From 3fce501ed3d9ccb714b68b42a43e2799a05f490c Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Wed, 30 Oct 2024 17:58:52 +0000 Subject: [PATCH 1/2] Lock all installs of `@solana/web3.js` to version 1 --- docs/de/getting-started/installation.md | 4 ++-- docs/de/references/keypairs-and-wallets.md | 2 +- docs/es/getting-started/installation.md | 4 ++-- docs/es/references/keypairs-and-wallets.md | 2 +- docs/fil/getting-started/installation.md | 4 ++-- docs/fil/references/keypairs-and-wallets.md | 2 +- docs/fr/getting-started/installation.md | 4 ++-- docs/fr/references/keypairs-and-wallets.md | 2 +- docs/getting-started/installation.md | 4 ++-- docs/id/getting-started/installation.md | 4 ++-- docs/id/references/keypairs-and-wallets.md | 2 +- docs/ja/getting-started/installation.md | 4 ++-- docs/ja/references/keypairs-and-wallets.md | 2 +- docs/kr/getting-started/installation.md | 4 ++-- docs/kr/references/keypairs-and-wallets.md | 2 +- docs/pt/getting-started/installation.md | 4 ++-- docs/pt/references/keypairs-and-wallets.md | 2 +- docs/references/keypairs-and-wallets.md | 2 +- docs/th/getting-started/installation.md | 4 ++-- docs/th/references/keypairs-and-wallets.md | 2 +- docs/tr/getting-started/installation.md | 4 ++-- docs/tr/references/keypairs-and-wallets.md | 2 +- docs/vi/getting-started/installation.md | 4 ++-- docs/vi/references/keypairs-and-wallets.md | 2 +- docs/zh/getting-started/installation.md | 4 ++-- docs/zh/references/keypairs-and-wallets.md | 2 +- docs/zh_t/getting-started/installation.md | 4 ++-- docs/zh_t/references/keypairs-and-wallets.md | 2 +- 28 files changed, 42 insertions(+), 42 deletions(-) diff --git a/docs/de/getting-started/installation.md b/docs/de/getting-started/installation.md index 24b46ed08..32b5efafc 100644 --- a/docs/de/getting-started/installation.md +++ b/docs/de/getting-started/installation.md @@ -51,7 +51,7 @@ Sie können Folgendes installieren: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/de/references/keypairs-and-wallets.md b/docs/de/references/keypairs-and-wallets.md index 1c2cedcd6..0a1b4b5b5 100644 --- a/docs/de/references/keypairs-and-wallets.md +++ b/docs/de/references/keypairs-and-wallets.md @@ -760,7 +760,7 @@ Das Plugin [Solana Wallets Vue](https://github.com/lorisleiva/solana-wallets-vue Führen Sie den folgenden Befehl aus, um die erforderlichen Abhängigkeiten zu installieren: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` Das Paket [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) ermöglicht es, einen Svelte Store (`$walletStore`) hinzuzufügen, auf den unter allen JS-, TS- oder/und Svelte-Dateien zugegriffen werden kann innerhalb eines Projekts, das mit Svelte Template oder SvelteKit erstellt wurde. Unter Verwendung der Repo-Referenz [hier](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) können Sie den Adapter für SSR oder verwenden SPA. Das UI-Paket enthält eine ``-Komponente, mit der Benutzer eine Brieftasche auswählen können, um sich damit zu verbinden. diff --git a/docs/es/getting-started/installation.md b/docs/es/getting-started/installation.md index ff8eb7e13..025814dc3 100644 --- a/docs/es/getting-started/installation.md +++ b/docs/es/getting-started/installation.md @@ -51,7 +51,7 @@ Lo puedes instalar con algunos de los siguientes comandos: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/es/references/keypairs-and-wallets.md b/docs/es/references/keypairs-and-wallets.md index 298e5095f..b014bf07c 100644 --- a/docs/es/references/keypairs-and-wallets.md +++ b/docs/es/references/keypairs-and-wallets.md @@ -766,7 +766,7 @@ El complemento [Solana Wallets Vue](https://github.com/lorisleiva/solana-wallets Ejecute el siguiente comando para instalar las dependencias requeridas: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` El paquete [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) permite agregar una tienda Svelte (`$walletStore`) accesible entre todos los archivos JS, TS y/o Svelte dentro de un proyecto realizado con Svelte Template o SvelteKit. Usando la referencia del repositorio [aquí](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) puede usar el adaptador para SSR o SPA. El paquete de la interfaz de usuario contiene un componente `` que permite a los usuarios seleccionar una billetera para conectar a ella. diff --git a/docs/fil/getting-started/installation.md b/docs/fil/getting-started/installation.md index bd05d4637..8d80621c2 100644 --- a/docs/fil/getting-started/installation.md +++ b/docs/fil/getting-started/installation.md @@ -52,7 +52,7 @@ Maaari mong i-install gamit ang sumusunod: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -60,7 +60,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/fil/references/keypairs-and-wallets.md b/docs/fil/references/keypairs-and-wallets.md index 4cb7ddd59..77b9e823c 100644 --- a/docs/fil/references/keypairs-and-wallets.md +++ b/docs/fil/references/keypairs-and-wallets.md @@ -764,7 +764,7 @@ Ang [Solana Wallets Vue](https://github.com/lorisleiva/solana-wallets-vue) plugi Patakbuhin ang sumusunod na command upang i-install ang mga kinakailangang dependencies: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` Ang [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) package ay nagbibigay-daan upang magdagdag ng Svelte Store (`$walletStore`) na maa-access sa lahat ng JS, TS o/at Svelte file sa loob ng isang proyektong ginawa gamit ang Svelte Template o SvelteKit. Gamit ang repo reference [dito](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) maaari mong gamitin ang adapter para sa SSR o SPA. Ang UI package ay naglalaman ng `` component upang payagan ang mga user na pumili ng wallet para kumonekta dito. diff --git a/docs/fr/getting-started/installation.md b/docs/fr/getting-started/installation.md index 53141d6ac..3055f37fd 100644 --- a/docs/fr/getting-started/installation.md +++ b/docs/fr/getting-started/installation.md @@ -51,7 +51,7 @@ Vous pouvez l'installer avec l'une des commandes suivantes : ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/fr/references/keypairs-and-wallets.md b/docs/fr/references/keypairs-and-wallets.md index fc79fc3e6..4692fa1c8 100644 --- a/docs/fr/references/keypairs-and-wallets.md +++ b/docs/fr/references/keypairs-and-wallets.md @@ -752,7 +752,7 @@ Le plugin [Solana Wallets Vue](https://github.com/lorisleiva/solana-wallets-vue) Exécutez la commande suivante pour installer les dépendances requises : ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` Le package [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) package permet d'ajouter un Store Svelte (`$walletStore`) accessible parmi tous les fichiers JS, TS et/ou Svelte à l'intérieur d'un projet réalisé avec Svelte Template ou SvelteKit. En utilisant le répertoire de référence [ici](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) vous pouvez utiliser l'adaptateur pour SSR ou SPA. Le package UI contient un composant `` pour permettre aux utilisateurs de sélectionner un portefeuille et de s'y connecter. diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 0e0f5e025..9857fb92f 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -52,7 +52,7 @@ You can install with the following: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -60,7 +60,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/id/getting-started/installation.md b/docs/id/getting-started/installation.md index daf337156..19aa949a1 100644 --- a/docs/id/getting-started/installation.md +++ b/docs/id/getting-started/installation.md @@ -51,7 +51,7 @@ Anda bisa melakukan instalasi library ini dengan cara berikut : ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/id/references/keypairs-and-wallets.md b/docs/id/references/keypairs-and-wallets.md index ce55fc9fa..c7f34e793 100644 --- a/docs/id/references/keypairs-and-wallets.md +++ b/docs/id/references/keypairs-and-wallets.md @@ -754,7 +754,7 @@ npm install solana-wallets-vue @solana/wallet-adapter-wallets Run command berikut ini untuk menginstall dependencies yang dibutuhkan: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) package dapat menambahkan sebuah Svelte Store(`$walletStore`) yang dapat diakses oleh semua JS, TS dan/atau Svelte files di dalam sebuah project yang telah dikerjakan dengan Svelte Template atau SvelteKit. Menggunakan repo reference [ini](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) anda dapat mengunakan adapter untuk SSR atau SPA. UI package mempunyai sebuah `` component untuk membantu user untuk memilih wallet yang terkoneksi dengannya. diff --git a/docs/ja/getting-started/installation.md b/docs/ja/getting-started/installation.md index 3ec3634f1..5994d4b94 100644 --- a/docs/ja/getting-started/installation.md +++ b/docs/ja/getting-started/installation.md @@ -52,7 +52,7 @@ footer: MIT Licensed ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -60,7 +60,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/ja/references/keypairs-and-wallets.md b/docs/ja/references/keypairs-and-wallets.md index 8668a6fe3..133fa04ae 100644 --- a/docs/ja/references/keypairs-and-wallets.md +++ b/docs/ja/references/keypairs-and-wallets.md @@ -753,7 +753,7 @@ npm install solana-wallets-vue @solana/wallet-adapter-wallets 次のコマンドを実行して、必要な依存関係をインストールします: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter)パッケージを使うことにより、Svelte TemplateまたはSvelteKitで作成されたプロジェクト内のすべてのJS、TS、Svelte ファイル間でアクセス可能な Svelteストア(`$walletStore`) を追加できます。[こちら](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/)のリポジトリを参照の上、SSR または SPA 用のアダプターを使用できます。UI パッケージには、ユーザーがウォレットを選択して接続できるようにする `` コンポーネントが含まれています。 diff --git a/docs/kr/getting-started/installation.md b/docs/kr/getting-started/installation.md index 96ef79d28..a81a29e27 100644 --- a/docs/kr/getting-started/installation.md +++ b/docs/kr/getting-started/installation.md @@ -51,7 +51,7 @@ Solana에는 javascript와 typescript로 시작하기 위해 사용할 수 있 ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/kr/references/keypairs-and-wallets.md b/docs/kr/references/keypairs-and-wallets.md index 07fcf870d..f3f9d03b2 100644 --- a/docs/kr/references/keypairs-and-wallets.md +++ b/docs/kr/references/keypairs-and-wallets.md @@ -762,7 +762,7 @@ npm install solana-wallets-vue @solana/wallet-adapter-wallets 요구되는 의존성들을 설치하기 위해 아래의 명령어를 실행하세요: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) 패키지는 프로젝트 내의 모든 JS, TS 또는/그리고 Svelte 파일들에서 접근할 수 있는 Svelte Store (`$walletStore`)을 추가할 수 있게 해 줍니다. diff --git a/docs/pt/getting-started/installation.md b/docs/pt/getting-started/installation.md index 59f07f622..3f4d266e7 100644 --- a/docs/pt/getting-started/installation.md +++ b/docs/pt/getting-started/installation.md @@ -51,7 +51,7 @@ Você pode instalar esta biblioteca com o seguinte comando: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/pt/references/keypairs-and-wallets.md b/docs/pt/references/keypairs-and-wallets.md index 31a994f78..bc55a55e4 100644 --- a/docs/pt/references/keypairs-and-wallets.md +++ b/docs/pt/references/keypairs-and-wallets.md @@ -751,7 +751,7 @@ O plugin de integração [Solana Wallets - Vue](https://github.com/lorisleiva/so Execute o seguinte comando para instalar as dependências necessárias: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` O pacote [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) permite adicionar uma Loja Svelte (`$walletStore`) acessível em todos os arquivos JS, TS ou Svelte dentro de um projeto feito com Svelte Template ou SvelteKit. Usando a referência do repositório [aqui](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/), você pode usar o adaptador para SSR ou SPA. O pacote da interface do usuário contém um componente `` para permitir que os usuários selecionem uma carteira para se conectar a ela. diff --git a/docs/references/keypairs-and-wallets.md b/docs/references/keypairs-and-wallets.md index 3084f9e81..8e5e2c9c1 100644 --- a/docs/references/keypairs-and-wallets.md +++ b/docs/references/keypairs-and-wallets.md @@ -780,7 +780,7 @@ The [Solana Wallets Vue](https://github.com/lorisleiva/solana-wallets-vue) plugi Run the following command to install the required dependencies: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` The [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) package allows to add a Svelte Store (`$walletStore`) accessible among all the JS, TS or/and Svelte files inside a project done with Svelte Template or SvelteKit. Using the repo reference [here](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) you can be able to use the adapter for SSR or SPA. The UI package contains a `` component to allow users to select a wallet to connect to it. diff --git a/docs/th/getting-started/installation.md b/docs/th/getting-started/installation.md index 7f31164cb..bb397d0ed 100644 --- a/docs/th/getting-started/installation.md +++ b/docs/th/getting-started/installation.md @@ -51,7 +51,7 @@ footer: MIT Licensed ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/th/references/keypairs-and-wallets.md b/docs/th/references/keypairs-and-wallets.md index 337a5b073..6ec271f29 100644 --- a/docs/th/references/keypairs-and-wallets.md +++ b/docs/th/references/keypairs-and-wallets.md @@ -751,7 +751,7 @@ npm install solana-wallets-vue @solana/wallet-adapter-wallets Run คำสั่งข้างล่างเพื่อติดตั้ง dependencies ที่ต้องใช้: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) package จะทำให้เราสามารถเพิ่ม Svelte Store (`$walletStore`) ที่เข้าถึงได้ทั้ง JS, TS และ/หรือ Svelte files ใน project ที่สร้างด้วย Svelte Template หรือ SvelteKit. โดยใช้ repo [ที่นี่](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) เราสามารถที่จะใช้ adapter สำหรับ SSR หรือ SPA. ส่วน UI package จะมี `` component เพื่อให้ผู้ใช้สามารถเลือกและเชื่อมต่อ wallet ได้ diff --git a/docs/tr/getting-started/installation.md b/docs/tr/getting-started/installation.md index 2c1e1acb8..ddf4a33eb 100644 --- a/docs/tr/getting-started/installation.md +++ b/docs/tr/getting-started/installation.md @@ -51,7 +51,7 @@ Aşağıdaki kod satırı ile bu kütüphaneyi kurabilirsiniz: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/tr/references/keypairs-and-wallets.md b/docs/tr/references/keypairs-and-wallets.md index fb3384e10..099b3e049 100644 --- a/docs/tr/references/keypairs-and-wallets.md +++ b/docs/tr/references/keypairs-and-wallets.md @@ -193,7 +193,7 @@ import { WalletMultiButton } from "solana-wallets-vue"; Gerekli bağımlılıkları yüklemek için aşağıdaki komutu çalıştırın: ``` -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) paketi, Svelte Template veya SvelteKit ile yapılan bir proje içindeki tüm JS, TS ve/veya Svelte dosyaları arasında erişilebilir bir Svelte Mağazası (`$walletStore`) eklemeye olanak tanır. [Burada](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/)ki repo referansını kullanarak adaptörü SSR veya SPA için kullanabilirsiniz. Kullanıcı arabirimi paketi, kullanıcıların kendisine bağlanacak bir cüzdan seçmesine olanak tanıyan bir `` bileşeni içerir. diff --git a/docs/vi/getting-started/installation.md b/docs/vi/getting-started/installation.md index 579e9080c..cd821376c 100644 --- a/docs/vi/getting-started/installation.md +++ b/docs/vi/getting-started/installation.md @@ -51,7 +51,7 @@ Bạn có thể cài đặt thông qua các bước sau: ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -59,7 +59,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/vi/references/keypairs-and-wallets.md b/docs/vi/references/keypairs-and-wallets.md index 0a8d330f6..b09570ca1 100644 --- a/docs/vi/references/keypairs-and-wallets.md +++ b/docs/vi/references/keypairs-and-wallets.md @@ -719,7 +719,7 @@ Plugin [Solana Wallets Vue](https://github.com/lorisleiva/solana-wallets-vue) ch Chạy đoạn mã sau đây để cài các thư viện cần thiết: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` Gói [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) cho phép thêm một Svelte Store (`$walletStore`) có khả năng truy xuất từ các tập tin JS, TS or/and Svelte bên trong dự án được tạo từ Svelte Template hoặc SvelteKit. Sử dụng mã nguồn tham khảo [tại đây](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) bạn có thể sử dụng bộ tiếp hợp cho SSR và cả SPA. Gói giao diện người dùng có chứa một thành phần là ``, nó cho phép người dùng có thể chọn và tạo kết nối đến ví. diff --git a/docs/zh/getting-started/installation.md b/docs/zh/getting-started/installation.md index 095cf12ed..fbe030dba 100644 --- a/docs/zh/getting-started/installation.md +++ b/docs/zh/getting-started/installation.md @@ -52,7 +52,7 @@ footer: MIT Licensed ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -60,7 +60,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/zh/references/keypairs-and-wallets.md b/docs/zh/references/keypairs-and-wallets.md index ffbf837b7..c54336e0c 100644 --- a/docs/zh/references/keypairs-and-wallets.md +++ b/docs/zh/references/keypairs-and-wallets.md @@ -751,7 +751,7 @@ npm install solana-wallets-vue @solana/wallet-adapter-wallets 运行以下命令来安装所需的依赖项: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) 包允许我们在使用Svelte模板或SvelteKit创建的项目中,在所有JS、TS或/和Svelte文件之间添加一个可访问的Svelte Store(`$walletStore`)。使用 [此处](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) 的存储库引用,您可以在SSR或SPA中使用适配器。UI包含一个``组件,允许用户选择一个钱包并连接到它。 diff --git a/docs/zh_t/getting-started/installation.md b/docs/zh_t/getting-started/installation.md index eb3523c16..b573fbd49 100644 --- a/docs/zh_t/getting-started/installation.md +++ b/docs/zh_t/getting-started/installation.md @@ -52,7 +52,7 @@ footer: MIT Licensed ```bash -yarn add @solana/web3.js +yarn add @solana/web3.js@1 ``` @@ -60,7 +60,7 @@ yarn add @solana/web3.js ```bash -npm install --save @solana/web3.js +npm install --save @solana/web3.js@1 ``` diff --git a/docs/zh_t/references/keypairs-and-wallets.md b/docs/zh_t/references/keypairs-and-wallets.md index b6ce67141..285c858dd 100644 --- a/docs/zh_t/references/keypairs-and-wallets.md +++ b/docs/zh_t/references/keypairs-and-wallets.md @@ -751,7 +751,7 @@ npm install solana-wallets-vue @solana/wallet-adapter-wallets 運行以下命令來安裝所需的依賴項: ```/bin/bash -npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js +npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1 ``` [Svelte Wallet Adapter](https://github.com/svelte-on-solana/wallet-adapter) 包允许我们在使用Svelte模板或SvelteKit创建的项目中,在所有JS、TS或/和Svelte文件之间添加一个可访问的Svelte Store(`$walletStore`)。使用 [此处](https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/) 的存储库引用,您可以在SSR或SPA中使用适配器。UI包含一个``组件,允许用户选择一个钱包并连接到它。 From 84f86c89ede80492a4a4f2cb774593a4e3938585 Mon Sep 17 00:00:00 2001 From: Steven Luscher Date: Wed, 30 Oct 2024 21:17:59 +0000 Subject: [PATCH 2/2] Run `yarn build` --- docs/.vuepress/dist/404.html | 4 +- .../{404.e671120d.js => 404.97105336.js} | 2 +- .../dist/assets/404.html.0371c330.js | 1 + .../dist/assets/404.html.1873b0e7.js | 1 - ...{Layout.4ba2f342.js => Layout.895c939a.js} | 2 +- ...e89c2.js => account-maps.html.06b8612d.js} | 2 +- ...163f8.js => account-maps.html.15aa5004.js} | 2 +- ...5a232.js => account-maps.html.1a60d088.js} | 2 +- ...9e96e.js => account-maps.html.39d261ab.js} | 2 +- ...84b4e.js => account-maps.html.4343f319.js} | 2 +- ...95114.js => account-maps.html.470f6c52.js} | 2 +- ...98fd3.js => account-maps.html.61211f10.js} | 2 +- ...51567.js => account-maps.html.680b0ba3.js} | 2 +- ...4fe7b.js => account-maps.html.9f7ded52.js} | 2 +- ...ed2b1.js => account-maps.html.b6d2a040.js} | 2 +- ...0c007.js => account-maps.html.cc8377ca.js} | 2 +- ...24aa4.js => account-maps.html.d873a7bb.js} | 2 +- ...32932.js => account-maps.html.de5b004e.js} | 2 +- ...ca06e.js => account-maps.html.fb104fdb.js} | 2 +- ...e008e.js => account-maps.html.fb6e863b.js} | 2 +- ....5affc5f4.js => accounts.html.064c9f53.js} | 2 +- ....ef2241b1.js => accounts.html.150ec297.js} | 2 +- ....0cab14f0.js => accounts.html.3642f7bf.js} | 2 +- ....91bec01d.js => accounts.html.3805dda2.js} | 2 +- ....5ae3ae45.js => accounts.html.480effe2.js} | 2 +- ....89eb8977.js => accounts.html.50b5ecb7.js} | 2 +- ....8c2c7d40.js => accounts.html.6398d200.js} | 2 +- ....d0cb3dfd.js => accounts.html.67312eab.js} | 2 +- ....17535e68.js => accounts.html.72a92f16.js} | 2 +- ....d16b618e.js => accounts.html.74e46f84.js} | 2 +- ....e2d2d050.js => accounts.html.79fe9f62.js} | 2 +- ....d5fa2c98.js => accounts.html.7be50229.js} | 2 +- ....d65e9141.js => accounts.html.866c67ff.js} | 2 +- ....bcf82d40.js => accounts.html.8962baed.js} | 2 +- ....25738f4e.js => accounts.html.a8d96503.js} | 2 +- ....85e3e0a4.js => accounts.html.ab6f1b9a.js} | 2 +- ....7d878d86.js => accounts.html.af394751.js} | 2 +- ....527d0e94.js => accounts.html.b2dcd867.js} | 2 +- ....e2d854ed.js => accounts.html.b3afb2f5.js} | 2 +- ....4965c1bb.js => accounts.html.bddee016.js} | 2 +- ....369da584.js => accounts.html.c201028c.js} | 2 +- ....fedf3c54.js => accounts.html.c850f29d.js} | 2 +- ....629a8060.js => accounts.html.ccac86d6.js} | 2 +- ....9bb37cd5.js => accounts.html.dd8624e8.js} | 2 +- ....339a7b82.js => accounts.html.e3030cfb.js} | 2 +- ....62c56dc7.js => accounts.html.ec76ce30.js} | 2 +- ....b3e83490.js => accounts.html.f83a9427.js} | 2 +- ....0636922d.js => accounts.html.fe830ce6.js} | 2 +- .../{app.07ce7a66.js => app.d411e3b3.js} | 6 +- ...677ac.js => auto-approve.html.9a6c68ed.js} | 2 +- ...47577.js => auto-approve.html.e43815fe.js} | 2 +- ...2de0c.js => auto-approve.html.ef828a0c.js} | 2 +- ...js => basic-transactions.html.0aea27a9.js} | 7 +- ...js => basic-transactions.html.12dc4b82.js} | 7 +- ...js => basic-transactions.html.1bfd6fa8.js} | 7 +- ...js => basic-transactions.html.3f54c73c.js} | 7 +- ...js => basic-transactions.html.5d245536.js} | 7 +- ...js => basic-transactions.html.65ccec01.js} | 7 +- ...js => basic-transactions.html.6decd1d3.js} | 7 +- ...js => basic-transactions.html.9fa99f53.js} | 2 +- ...js => basic-transactions.html.b489c766.js} | 7 +- ...js => basic-transactions.html.b9b7efb5.js} | 7 +- ...js => basic-transactions.html.d3c2b6ec.js} | 7 +- ...js => basic-transactions.html.e80a4c69.js} | 7 +- ...js => basic-transactions.html.e97b7701.js} | 7 +- ...js => basic-transactions.html.ed839122.js} | 7 +- ....html.a340693f.js => cpi.html.64ff535f.js} | 2 +- ....html.9d257983.js => cpi.html.77c0f3ed.js} | 2 +- ....html.1a2d6d74.js => cpi.html.9b2c1583.js} | 2 +- ....html.68e45f97.js => cpi.html.cd0a0c70.js} | 2 +- ....html.fc0ddd7a.js => cpi.html.ce5147fe.js} | 2 +- ...8ea.js => data-migration.html.08e0b038.js} | 2 +- ...d02.js => data-migration.html.1425ff59.js} | 2 +- ...548.js => data-migration.html.4a37b76d.js} | 2 +- ...1d7.js => data-migration.html.558f508c.js} | 2 +- ...e8e.js => data-migration.html.6d313435.js} | 2 +- ...86d.js => data-migration.html.7eec80fc.js} | 2 +- ...1db.js => data-migration.html.85d3c82e.js} | 2 +- ...119.js => data-migration.html.a1c8731c.js} | 2 +- ...8f8.js => data-migration.html.cff77833.js} | 2 +- ...dd1.js => data-migration.html.df00c4c4.js} | 2 +- ...ad1.js => data-migration.html.e0732e8c.js} | 2 +- ...10f.js => data-migration.html.f0501f2c.js} | 2 +- ...eb8.js => data-migration.html.f1535631.js} | 2 +- ...316.js => data-migration.html.ff6c2789.js} | 2 +- ...ebugging-solana-programs.html.072a7ef4.js} | 2 +- ...ebugging-solana-programs.html.10f57b5c.js} | 2 +- ...ebugging-solana-programs.html.1b41db2c.js} | 2 +- ...ebugging-solana-programs.html.2cb6ae77.js} | 2 +- ...ebugging-solana-programs.html.3b218539.js} | 2 +- ...ebugging-solana-programs.html.812629be.js} | 2 +- ...ebugging-solana-programs.html.92d478f0.js} | 2 +- ...ebugging-solana-programs.html.a32bb038.js} | 2 +- ...ebugging-solana-programs.html.aa6fcacf.js} | 2 +- ...ebugging-solana-programs.html.b7310cda.js} | 2 +- ...ebugging-solana-programs.html.be5d826a.js} | 2 +- ...ebugging-solana-programs.html.c55c47bf.js} | 2 +- ...ebugging-solana-programs.html.d0d47d71.js} | 2 +- ...ebugging-solana-programs.html.f391ad32.js} | 2 +- ...2641f.js => distribution.html.992824c3.js} | 2 +- ...ec652.js => distribution.html.c5b39f53.js} | 2 +- ...e0c57.js => distribution.html.fd97f27d.js} | 2 +- ...0efc.js => energy-system.html.311556bd.js} | 2 +- ...62eb.js => energy-system.html.3fd21eea.js} | 2 +- ...c46f.js => energy-system.html.a79e6d47.js} | 2 +- ...> feature-parity-testing.html.21f8b814.js} | 2 +- ...> feature-parity-testing.html.4ad59f22.js} | 2 +- ...> feature-parity-testing.html.6403e730.js} | 2 +- ...> feature-parity-testing.html.67fc474d.js} | 2 +- ...> feature-parity-testing.html.76d20bfd.js} | 2 +- ...> feature-parity-testing.html.77612586.js} | 2 +- ...> feature-parity-testing.html.779577da.js} | 2 +- ...> feature-parity-testing.html.944582ed.js} | 2 +- ...> feature-parity-testing.html.9d3ad8df.js} | 2 +- ...> feature-parity-testing.html.a141aa71.js} | 2 +- ...> feature-parity-testing.html.a6057c8b.js} | 2 +- ...> feature-parity-testing.html.e9479f13.js} | 2 +- ...> feature-parity-testing.html.ec36c4c1.js} | 2 +- ...> feature-parity-testing.html.f4efd784.js} | 2 +- ...eba1.js => game-examples.html.633629bc.js} | 2 +- ...30cd.js => game-examples.html.806db4fe.js} | 2 +- ...4e80.js => game-examples.html.f01c9761.js} | 2 +- ...c0176ba6.js => game-sdks.html.1abe292d.js} | 2 +- ...92d7e729.js => game-sdks.html.3bfddaba.js} | 2 +- ...d18bd9d2.js => game-sdks.html.f364ca6f.js} | 2 +- ... => get-program-accounts.html.04314539.js} | 2 +- ... => get-program-accounts.html.0cf79cec.js} | 4 +- ... => get-program-accounts.html.1a158c6f.js} | 2 +- ... => get-program-accounts.html.1a4d6f7c.js} | 2 +- ... => get-program-accounts.html.39cc5e4a.js} | 2 +- ... => get-program-accounts.html.416a5c35.js} | 2 +- ... => get-program-accounts.html.47597b1d.js} | 2 +- ... => get-program-accounts.html.6e96a155.js} | 2 +- ... => get-program-accounts.html.713a03ab.js} | 2 +- ... => get-program-accounts.html.7d92e55d.js} | 2 +- ... => get-program-accounts.html.99c15661.js} | 2 +- ... => get-program-accounts.html.b6c20980.js} | 2 +- ... => get-program-accounts.html.c489ff46.js} | 2 +- ... => get-program-accounts.html.ca55546d.js} | 2 +- ... => get-program-accounts.html.dd8577dd.js} | 2 +- ...62bd1c.js => hello-world.html.888726f2.js} | 2 +- ...100458.js => hello-world.html.96baeba5.js} | 2 +- ...d1eb37.js => hello-world.html.acc4db6a.js} | 2 +- ...tml.92035043.js => index.html.1823d81d.js} | 2 +- ...tml.2017fef1.js => index.html.28db958b.js} | 2 +- ...tml.b594f3cc.js => index.html.37aeede1.js} | 2 +- ...tml.9bb2504f.js => index.html.45f0fd63.js} | 2 +- ...tml.550d93c2.js => index.html.5559972c.js} | 2 +- ...tml.caa2e1b4.js => index.html.611d98f3.js} | 2 +- ...tml.c5a39464.js => index.html.6698bb6d.js} | 2 +- ...tml.25f20e37.js => index.html.671bbc93.js} | 2 +- ...tml.b6c39787.js => index.html.73db6b25.js} | 2 +- ...tml.dd541d3c.js => index.html.859f0785.js} | 2 +- ...tml.d04c9063.js => index.html.8ba67a18.js} | 2 +- ...tml.8977d14d.js => index.html.92447802.js} | 2 +- ...tml.e7deec39.js => index.html.bc5a69e1.js} | 2 +- ...tml.f4a1e63e.js => index.html.f1c2ef80.js} | 2 +- ...0223e.js => installation.html.1baa10e4.js} | 2 +- ...9c1e2.js => installation.html.1bd39712.js} | 2 +- ...79ba8.js => installation.html.1d183c4d.js} | 2 +- ...039ec.js => installation.html.20ee85ab.js} | 2 +- ...83852.js => installation.html.266da2d0.js} | 2 +- ...204bb.js => installation.html.2ee5c8ec.js} | 4 +- ...00cbd.js => installation.html.36acf74c.js} | 4 +- ...c1ff4.js => installation.html.4c7b0806.js} | 4 +- ...51b6c.js => installation.html.55799980.js} | 2 +- ...86c17.js => installation.html.5e3228c9.js} | 2 +- ...5ac0f.js => installation.html.614be1d7.js} | 4 +- ...8836a.js => installation.html.6ebc9da6.js} | 4 +- ...adae7.js => installation.html.715b3b99.js} | 2 +- ...5f03a.js => installation.html.7f31ac87.js} | 4 +- ...c9172.js => installation.html.9592faa3.js} | 2 +- ...89678.js => installation.html.9991e5f0.js} | 2 +- ...4d3ce.js => installation.html.9b358507.js} | 4 +- ...6e599.js => installation.html.a11f9bd6.js} | 4 +- ...10efa.js => installation.html.a97a7fb2.js} | 2 +- ...66756.js => installation.html.aa2d111c.js} | 4 +- ...7de51.js => installation.html.b29e3de7.js} | 4 +- ...9cd42.js => installation.html.b85f5579.js} | 4 +- ...0283b.js => installation.html.d67ac4ef.js} | 4 +- ...550cf.js => installation.html.de1947ca.js} | 2 +- ...ddf91.js => installation.html.e9fcf7ff.js} | 2 +- ...43b03.js => installation.html.ee5d0d6b.js} | 4 +- ...edf44.js => installation.html.f915e5db.js} | 4 +- ...8573c.js => installation.html.fe3ab544.js} | 2 +- ... => interact-with-tokens.html.5ced5824.js} | 2 +- ... => interact-with-tokens.html.9a3c30e2.js} | 2 +- ... => interact-with-tokens.html.b490da89.js} | 2 +- ...tml.cccca287.js => intro.html.4a5cf141.js} | 2 +- ...tml.5c2ad8c4.js => intro.html.50d9f3dd.js} | 2 +- ...tml.afd41fab.js => intro.html.850ff3cd.js} | 2 +- ... => keypairs-and-wallets.html.12cb5c76.js} | 67 +++--- ... => keypairs-and-wallets.html.1759bcbe.js} | 71 ++++--- ... => keypairs-and-wallets.html.2d9f22b4.js} | 2 +- ... => keypairs-and-wallets.html.38d07f14.js} | 2 +- ... => keypairs-and-wallets.html.3a19760d.js} | 2 +- ... => keypairs-and-wallets.html.3f5752cd.js} | 2 +- ... => keypairs-and-wallets.html.45fae5f1.js} | 61 +++--- ... => keypairs-and-wallets.html.5b84c000.js} | 2 +- ... => keypairs-and-wallets.html.731d8b2d.js} | 85 ++++---- ... => keypairs-and-wallets.html.73be0d40.js} | 75 ++++--- ... => keypairs-and-wallets.html.7856d044.js} | 77 ++++--- ... => keypairs-and-wallets.html.7b4b2fca.js} | 2 +- ... => keypairs-and-wallets.html.7f32d8c6.js} | 107 ++++++---- ... => keypairs-and-wallets.html.830d46df.js} | 2 +- ... => keypairs-and-wallets.html.8fca2ff6.js} | 2 +- ... => keypairs-and-wallets.html.9661ed1e.js} | 75 ++++--- ... => keypairs-and-wallets.html.a22f3617.js} | 4 +- ... => keypairs-and-wallets.html.a79a299d.js} | 2 +- ... => keypairs-and-wallets.html.a83650c9.js} | 87 ++++---- ... => keypairs-and-wallets.html.a876964b.js} | 2 +- ... => keypairs-and-wallets.html.abc05e48.js} | 2 +- ... => keypairs-and-wallets.html.c4fc2c20.js} | 2 +- ... => keypairs-and-wallets.html.c5823658.js} | 75 ++++--- ... => keypairs-and-wallets.html.c8dbc763.js} | 2 +- ... => keypairs-and-wallets.html.df8bc1da.js} | 2 +- ... => keypairs-and-wallets.html.e2ea7de6.js} | 67 +++--- ... => keypairs-and-wallets.html.e586f774.js} | 59 ++++-- ... => keypairs-and-wallets.html.fe3970ec.js} | 67 +++--- ....js => local-development.html.0c928074.js} | 2 +- ....js => local-development.html.26e53f81.js} | 2 +- ....js => local-development.html.2f6f02fe.js} | 2 +- ....js => local-development.html.3c02c969.js} | 2 +- ....js => local-development.html.4297ed48.js} | 2 +- ....js => local-development.html.570a407e.js} | 2 +- ....js => local-development.html.74ef67b1.js} | 2 +- ....js => local-development.html.8ed37c1d.js} | 2 +- ....js => local-development.html.9a3616cd.js} | 2 +- ....js => local-development.html.b2f4a193.js} | 2 +- ....js => local-development.html.c91442a0.js} | 2 +- ....js => local-development.html.d4374bd4.js} | 2 +- ....js => local-development.html.f52317b1.js} | 2 +- ....js => local-development.html.f9975a55.js} | 2 +- ...70b32.js => name-service.html.1abc0fa0.js} | 2 +- ...127d5.js => name-service.html.3e027fa0.js} | 2 +- ...e381f.js => name-service.html.4f71f7ad.js} | 2 +- ...d90b0.js => name-service.html.68928b86.js} | 2 +- ...ad710.js => name-service.html.72c3ec5b.js} | 2 +- ...6ccbb.js => name-service.html.813f0670.js} | 2 +- ...5e238.js => name-service.html.8b66eeca.js} | 2 +- ...777a7.js => name-service.html.8e66e4bc.js} | 2 +- ...13da1.js => name-service.html.91342459.js} | 2 +- ...68d08.js => name-service.html.9dec4983.js} | 2 +- ...b0216.js => name-service.html.b0314bbe.js} | 2 +- ...7eb0f.js => name-service.html.c6a9339e.js} | 2 +- ...37cf7.js => name-service.html.f3d180f8.js} | 2 +- ...54d4f.js => name-service.html.f82624ec.js} | 2 +- ...7b87.js => nfts-in-games.html.4d0d92b9.js} | 2 +- ...2392.js => nfts-in-games.html.d5038ca4.js} | 2 +- ...cbf5.js => nfts-in-games.html.e55ae003.js} | 2 +- ...html.d9599439.js => nfts.html.0c0cb140.js} | 2 +- ...html.3a4dc806.js => nfts.html.1976c787.js} | 2 +- ...html.8062119a.js => nfts.html.1ad11441.js} | 2 +- ...html.0870f8d4.js => nfts.html.2e49b605.js} | 2 +- ...html.73b95415.js => nfts.html.3c31ce39.js} | 2 +- ...html.75a819e1.js => nfts.html.61a0212c.js} | 2 +- ...html.1e42ca51.js => nfts.html.6c227031.js} | 2 +- ...html.93f43d02.js => nfts.html.78d4bd36.js} | 2 +- ...html.cb306959.js => nfts.html.a54e18bd.js} | 2 +- ...html.6cf05cb7.js => nfts.html.bc8395bd.js} | 2 +- ...html.06449cbe.js => nfts.html.ca44adf3.js} | 2 +- ...html.88b22980.js => nfts.html.e4e4c010.js} | 2 +- ...html.4488b5bf.js => nfts.html.f6b5f79a.js} | 2 +- ...html.f3815a10.js => nfts.html.f888c16f.js} | 2 +- ... => offline-transactions.html.0827c37c.js} | 14 +- ... => offline-transactions.html.08d142d8.js} | 14 +- ... => offline-transactions.html.3661f39c.js} | 14 +- ... => offline-transactions.html.43fa2f34.js} | 14 +- ... => offline-transactions.html.467fd989.js} | 14 +- ... => offline-transactions.html.7895faf9.js} | 14 +- ... => offline-transactions.html.7d2ff671.js} | 14 +- ... => offline-transactions.html.8844fb23.js} | 20 +- ... => offline-transactions.html.9c9377a3.js} | 14 +- ... => offline-transactions.html.ba25b570.js} | 2 +- ... => offline-transactions.html.c710df8e.js} | 14 +- ... => offline-transactions.html.c7b8e6f1.js} | 14 +- ... => offline-transactions.html.c90e0a69.js} | 14 +- ... => offline-transactions.html.f368258e.js} | 20 +- ...html.cf2a36cd.js => pdas.html.12f9e1cc.js} | 2 +- ...html.dd1806d8.js => pdas.html.1b5e9aea.js} | 2 +- ...html.6d743213.js => pdas.html.20ee0dd7.js} | 2 +- ...html.9841e8a1.js => pdas.html.38085bda.js} | 2 +- ...html.56ea1967.js => pdas.html.3955a4b5.js} | 2 +- ...html.e5cff056.js => pdas.html.433df04a.js} | 2 +- ...html.6cdffc98.js => pdas.html.61b14f37.js} | 2 +- ...html.35c6152a.js => pdas.html.61fb8770.js} | 2 +- ...html.a4275910.js => pdas.html.6e5a8058.js} | 2 +- ...html.08e26e07.js => pdas.html.8eaf91cc.js} | 2 +- ...html.da9ce228.js => pdas.html.929e2544.js} | 2 +- ...html.eaddc26f.js => pdas.html.c12b509f.js} | 2 +- ...html.3b9289a8.js => pdas.html.d7edeb46.js} | 2 +- ...html.6fd7b3e7.js => pdas.html.eed3e90e.js} | 2 +- ... porting-anchor-to-unity.html.1b61517d.js} | 2 +- ... porting-anchor-to-unity.html.74618a6d.js} | 2 +- ... porting-anchor-to-unity.html.81c8bafe.js} | 2 +- ....fb2104eb.js => programs.html.11e7bbe0.js} | 2 +- ....c4b45e07.js => programs.html.263f47ee.js} | 2 +- ....3f12c384.js => programs.html.2cf46764.js} | 2 +- ....e8e9b38e.js => programs.html.49c7c645.js} | 116 ++++++++--- ....98fb8b49.js => programs.html.55c372ec.js} | 2 +- ....2a06f575.js => programs.html.5fe96c87.js} | 2 +- ....6d41107a.js => programs.html.70fa58f4.js} | 114 +++++++--- ....3c48317e.js => programs.html.777bc9d0.js} | 116 ++++++++--- ....48b1db94.js => programs.html.82f73bda.js} | 2 +- ....9cdb4de3.js => programs.html.8726b1de.js} | 114 +++++++--- ....90aa36af.js => programs.html.8b269692.js} | 112 +++++++--- ....f73d3347.js => programs.html.933f8e90.js} | 2 +- ....01e229c2.js => programs.html.95125d01.js} | 112 +++++++--- ....dec531fb.js => programs.html.9539084b.js} | 116 ++++++++--- ....072a911a.js => programs.html.9975ecda.js} | 116 ++++++++--- ....ebf949b0.js => programs.html.a475d1f5.js} | 2 +- ....96701793.js => programs.html.a53991e5.js} | 2 +- ....d7e559f7.js => programs.html.a57b3d47.js} | 197 ++++++++---------- ....555fde3c.js => programs.html.b0aa64e9.js} | 116 ++++++++--- ....a673792c.js => programs.html.b4edbb78.js} | 2 +- ....09c93a73.js => programs.html.b5bf5151.js} | 2 +- ....6801ed73.js => programs.html.b7903707.js} | 116 ++++++++--- ....dd60d7aa.js => programs.html.cb377c15.js} | 112 +++++++--- ....7db6ff71.js => programs.html.d385e4fe.js} | 2 +- ....5860dd01.js => programs.html.d74f6c75.js} | 2 +- ....d77781f0.js => programs.html.dcaf461b.js} | 2 +- ....ea9dd7e3.js => programs.html.e55e9941.js} | 2 +- ....135d8a1e.js => programs.html.e6708ad9.js} | 116 ++++++++--- ....602c11ba.js => programs.html.f498c46e.js} | 2 +- ...=> retrying-transactions.html.fbbd8db1.js} | 2 +- ....js => saving-game-state.html.b6db54c5.js} | 2 +- ....js => saving-game-state.html.cde48a53.js} | 2 +- ....js => saving-game-state.html.ec310331.js} | 2 +- ...a263.js => serialization.html.1259c629.js} | 4 +- ...50dc.js => serialization.html.1a7f232d.js} | 2 +- ...791f.js => serialization.html.38ba2d1e.js} | 4 +- ...e7c6.js => serialization.html.39f2c0b1.js} | 4 +- ...e54c.js => serialization.html.489e403a.js} | 10 +- ...46cf.js => serialization.html.4c219ebc.js} | 4 +- ...2085.js => serialization.html.58ace6bc.js} | 10 +- ...0d5a.js => serialization.html.5e0ca063.js} | 4 +- ...4ad5.js => serialization.html.5f9eff00.js} | 4 +- ...6d3d.js => serialization.html.6e96a72c.js} | 4 +- ...5c96.js => serialization.html.8240c6c3.js} | 10 +- ...62af.js => serialization.html.96be53fb.js} | 4 +- ...6685.js => serialization.html.a08cd6dd.js} | 10 +- ...580e.js => serialization.html.c14aec9f.js} | 10 +- ...l.122e3dd7.js => staking.html.04132c3e.js} | 2 +- ...l.bbc62dff.js => staking.html.153d21d5.js} | 2 +- ...l.4f958a15.js => staking.html.35f01019.js} | 2 +- ...l.a5ae14b2.js => staking.html.42ce08fa.js} | 2 +- ...l.8f95d604.js => staking.html.4592916e.js} | 2 +- ...l.f374e09a.js => staking.html.4daf843b.js} | 2 +- ...l.48d1bd77.js => staking.html.4f2175bc.js} | 2 +- ...l.04e151a8.js => staking.html.631b26d4.js} | 2 +- ...l.0fd3c3b6.js => staking.html.91c6a606.js} | 2 +- ...l.79740434.js => staking.html.9cd0f2f1.js} | 2 +- ...l.6485c86f.js => staking.html.9cf17bbb.js} | 2 +- ...l.9a3a894a.js => staking.html.bb8a6029.js} | 2 +- ...l.59211856.js => staking.html.e3f01f71.js} | 2 +- ...l.420a515f.js => staking.html.f1bc25a4.js} | 2 +- ...c.js => store-sol-in-pda.html.149b88b0.js} | 2 +- ...c.js => store-sol-in-pda.html.85b3fbd8.js} | 2 +- ...8.js => store-sol-in-pda.html.b6c6b1ad.js} | 2 +- ...tml.12804e59.js => token.html.0c03dc96.js} | 2 +- ...tml.ea1f1398.js => token.html.24577b71.js} | 2 +- ...tml.edf00ffd.js => token.html.2c73b698.js} | 2 +- ...tml.cb53fbdc.js => token.html.5e6409cb.js} | 4 +- ...tml.1da2f0eb.js => token.html.65520f24.js} | 2 +- ...tml.e135cbcd.js => token.html.85b24b07.js} | 2 +- ...tml.87c9f9ba.js => token.html.8bed60f6.js} | 2 +- ...tml.858f2429.js => token.html.a75a9504.js} | 2 +- ...tml.0e5aea93.js => token.html.ab898bc4.js} | 2 +- ...tml.5b1ae1a2.js => token.html.b0c306ef.js} | 2 +- ...tml.de032bea.js => token.html.d6b6721b.js} | 2 +- ...tml.c555b525.js => token.html.e07b1965.js} | 2 +- ...tml.495dbb1a.js => token.html.e914f7d1.js} | 2 +- ...tml.77adbbb4.js => token.html.f94d11f9.js} | 2 +- ...tml.b6c1e5ff.js => token.html.ff5cac15.js} | 2 +- ...9a389.js => transactions.html.0c0860dc.js} | 2 +- ...36a28.js => transactions.html.110ef9af.js} | 2 +- ...c8b92.js => transactions.html.11b26fdb.js} | 2 +- ...bdb49.js => transactions.html.147b8767.js} | 2 +- ...6f901.js => transactions.html.15106f80.js} | 2 +- ...8d7c4.js => transactions.html.2469ccae.js} | 2 +- ...8eb8a.js => transactions.html.27adc8a8.js} | 2 +- ...4a37d.js => transactions.html.63dbd664.js} | 2 +- ...eb3d9.js => transactions.html.68be7740.js} | 2 +- ...f0379.js => transactions.html.a50662e6.js} | 2 +- ...88dfe.js => transactions.html.c46b5241.js} | 2 +- ...a2bf1.js => transactions.html.d4e068d2.js} | 2 +- ...ee4e9.js => transactions.html.eadd37e3.js} | 2 +- ...988c9.js => transactions.html.f177146a.js} | 2 +- ...184a8.js => transactions.html.f2c9858d.js} | 2 +- ...> versioned-transactions.html.097cf02b.js} | 2 +- ...> versioned-transactions.html.19d40b0d.js} | 2 +- ...> versioned-transactions.html.2c16ab97.js} | 2 +- ...> versioned-transactions.html.374bd78b.js} | 2 +- ...> versioned-transactions.html.78847d3c.js} | 2 +- ...> versioned-transactions.html.9a3f546a.js} | 2 +- ...> versioned-transactions.html.a1a0086a.js} | 2 +- ...> versioned-transactions.html.ee26ba8c.js} | 2 +- .../dist/core-concepts/accounts.html | 4 +- docs/.vuepress/dist/core-concepts/cpi.html | 4 +- docs/.vuepress/dist/core-concepts/pdas.html | 4 +- .../dist/core-concepts/programs.html | 4 +- .../dist/core-concepts/transactions.html | 4 +- .../dist/de/core-concepts/accounts.html | 4 +- .../.vuepress/dist/de/core-concepts/pdas.html | 4 +- .../dist/de/core-concepts/programs.html | 4 +- .../dist/de/core-concepts/transactions.html | 4 +- .../dist/de/getting-started/installation.html | 10 +- .../dist/de/guides/account-maps.html | 4 +- .../dist/de/guides/data-migration.html | 4 +- .../de/guides/debugging-solana-programs.html | 4 +- .../de/guides/feature-parity-testing.html | 4 +- .../dist/de/guides/get-program-accounts.html | 4 +- .../dist/de/guides/retrying-transactions.html | 4 +- .../dist/de/guides/serialization.html | 6 +- docs/.vuepress/dist/de/index.html | 4 +- .../dist/de/references/accounts.html | 4 +- .../de/references/basic-transactions.html | 9 +- .../de/references/keypairs-and-wallets.html | 47 +++-- .../dist/de/references/local-development.html | 4 +- .../dist/de/references/name-service.html | 4 +- docs/.vuepress/dist/de/references/nfts.html | 4 +- .../de/references/offline-transactions.html | 16 +- .../dist/de/references/programs.html | 102 ++++++--- .../.vuepress/dist/de/references/staking.html | 4 +- docs/.vuepress/dist/de/references/token.html | 4 +- .../dist/es/core-concepts/accounts.html | 4 +- .../.vuepress/dist/es/core-concepts/pdas.html | 4 +- .../dist/es/core-concepts/programs.html | 4 +- .../dist/es/core-concepts/transactions.html | 4 +- .../dist/es/getting-started/installation.html | 10 +- .../dist/es/guides/account-maps.html | 4 +- .../dist/es/guides/data-migration.html | 4 +- .../es/guides/debugging-solana-programs.html | 4 +- .../es/guides/feature-parity-testing.html | 4 +- .../dist/es/guides/get-program-accounts.html | 4 +- .../dist/es/guides/serialization.html | 6 +- docs/.vuepress/dist/es/index.html | 4 +- .../dist/es/references/accounts.html | 4 +- .../es/references/basic-transactions.html | 9 +- .../es/references/keypairs-and-wallets.html | 47 +++-- .../dist/es/references/local-development.html | 4 +- .../dist/es/references/name-service.html | 4 +- docs/.vuepress/dist/es/references/nfts.html | 4 +- .../es/references/offline-transactions.html | 16 +- .../dist/es/references/programs.html | 102 ++++++--- .../.vuepress/dist/es/references/staking.html | 4 +- docs/.vuepress/dist/es/references/token.html | 4 +- .../dist/fil/core-concepts/accounts.html | 4 +- .../.vuepress/dist/fil/core-concepts/cpi.html | 4 +- .../dist/fil/core-concepts/pdas.html | 4 +- .../dist/fil/core-concepts/programs.html | 4 +- .../dist/fil/core-concepts/transactions.html | 4 +- .../dist/fil/gaming/auto-approve.html | 4 +- .../dist/fil/gaming/distribution.html | 4 +- .../dist/fil/gaming/energy-system.html | 4 +- .../dist/fil/gaming/game-examples.html | 4 +- docs/.vuepress/dist/fil/gaming/game-sdks.html | 4 +- .../dist/fil/gaming/hello-world.html | 4 +- .../dist/fil/gaming/interact-with-tokens.html | 4 +- docs/.vuepress/dist/fil/gaming/intro.html | 4 +- .../dist/fil/gaming/nfts-in-games.html | 4 +- .../fil/gaming/porting-anchor-to-unity.html | 4 +- .../dist/fil/gaming/saving-game-state.html | 4 +- .../dist/fil/gaming/store-sol-in-pda.html | 4 +- .../fil/getting-started/installation.html | 10 +- .../dist/fil/guides/account-maps.html | 4 +- .../dist/fil/guides/data-migration.html | 4 +- .../fil/guides/debugging-solana-programs.html | 4 +- .../fil/guides/feature-parity-testing.html | 4 +- .../dist/fil/guides/get-program-accounts.html | 4 +- .../dist/fil/guides/serialization.html | 6 +- .../fil/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/fil/index.html | 4 +- .../dist/fil/references/accounts.html | 4 +- .../fil/references/basic-transactions.html | 9 +- .../fil/references/keypairs-and-wallets.html | 47 +++-- .../fil/references/local-development.html | 4 +- .../dist/fil/references/name-service.html | 4 +- docs/.vuepress/dist/fil/references/nfts.html | 4 +- .../fil/references/offline-transactions.html | 16 +- .../dist/fil/references/programs.html | 102 ++++++--- .../dist/fil/references/staking.html | 4 +- docs/.vuepress/dist/fil/references/token.html | 4 +- .../dist/fr/core-concepts/accounts.html | 4 +- docs/.vuepress/dist/fr/core-concepts/cpi.html | 4 +- .../.vuepress/dist/fr/core-concepts/pdas.html | 4 +- .../dist/fr/core-concepts/programs.html | 4 +- .../dist/fr/core-concepts/transactions.html | 4 +- .../dist/fr/gaming/auto-approve.html | 4 +- .../dist/fr/gaming/distribution.html | 4 +- .../dist/fr/gaming/energy-system.html | 4 +- .../dist/fr/gaming/game-examples.html | 4 +- docs/.vuepress/dist/fr/gaming/game-sdks.html | 4 +- .../.vuepress/dist/fr/gaming/hello-world.html | 4 +- .../dist/fr/gaming/interact-with-tokens.html | 4 +- docs/.vuepress/dist/fr/gaming/intro.html | 4 +- .../dist/fr/gaming/nfts-in-games.html | 4 +- .../fr/gaming/porting-anchor-to-unity.html | 4 +- .../dist/fr/gaming/saving-game-state.html | 4 +- .../dist/fr/gaming/store-sol-in-pda.html | 4 +- .../dist/fr/getting-started/installation.html | 10 +- .../dist/fr/guides/account-maps.html | 4 +- .../dist/fr/guides/data-migration.html | 4 +- .../fr/guides/debugging-solana-programs.html | 4 +- .../fr/guides/feature-parity-testing.html | 4 +- .../dist/fr/guides/get-program-accounts.html | 4 +- .../dist/fr/guides/serialization.html | 6 +- .../fr/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/fr/index.html | 4 +- .../dist/fr/references/accounts.html | 4 +- .../fr/references/basic-transactions.html | 9 +- .../fr/references/keypairs-and-wallets.html | 47 +++-- .../dist/fr/references/local-development.html | 4 +- .../dist/fr/references/name-service.html | 4 +- docs/.vuepress/dist/fr/references/nfts.html | 4 +- .../fr/references/offline-transactions.html | 16 +- .../dist/fr/references/programs.html | 102 ++++++--- .../.vuepress/dist/fr/references/staking.html | 4 +- docs/.vuepress/dist/fr/references/token.html | 4 +- docs/.vuepress/dist/gaming/auto-approve.html | 4 +- docs/.vuepress/dist/gaming/distribution.html | 4 +- docs/.vuepress/dist/gaming/energy-system.html | 4 +- docs/.vuepress/dist/gaming/game-examples.html | 4 +- docs/.vuepress/dist/gaming/game-sdks.html | 4 +- docs/.vuepress/dist/gaming/hello-world.html | 4 +- .../dist/gaming/interact-with-tokens.html | 4 +- docs/.vuepress/dist/gaming/intro.html | 4 +- docs/.vuepress/dist/gaming/nfts-in-games.html | 4 +- .../dist/gaming/porting-anchor-to-unity.html | 4 +- .../dist/gaming/saving-game-state.html | 4 +- .../dist/gaming/store-sol-in-pda.html | 4 +- .../dist/getting-started/installation.html | 10 +- docs/.vuepress/dist/guides/account-maps.html | 4 +- .../.vuepress/dist/guides/data-migration.html | 4 +- .../guides/debugging-solana-programs.html | 4 +- .../dist/guides/feature-parity-testing.html | 4 +- .../dist/guides/get-program-accounts.html | 4 +- docs/.vuepress/dist/guides/serialization.html | 6 +- .../dist/guides/versioned-transactions.html | 4 +- .../dist/id/core-concepts/accounts.html | 4 +- .../.vuepress/dist/id/core-concepts/pdas.html | 4 +- .../dist/id/core-concepts/programs.html | 4 +- .../dist/id/core-concepts/transactions.html | 4 +- .../dist/id/getting-started/installation.html | 10 +- .../dist/id/guides/account-maps.html | 4 +- .../dist/id/guides/data-migration.html | 4 +- .../id/guides/debugging-solana-programs.html | 4 +- .../id/guides/feature-parity-testing.html | 4 +- .../dist/id/guides/get-program-accounts.html | 4 +- .../dist/id/guides/serialization.html | 6 +- docs/.vuepress/dist/id/index.html | 4 +- .../dist/id/references/accounts.html | 4 +- .../id/references/basic-transactions.html | 9 +- .../id/references/keypairs-and-wallets.html | 47 +++-- .../dist/id/references/local-development.html | 4 +- .../dist/id/references/name-service.html | 4 +- docs/.vuepress/dist/id/references/nfts.html | 4 +- .../id/references/offline-transactions.html | 16 +- .../dist/id/references/programs.html | 102 ++++++--- .../.vuepress/dist/id/references/staking.html | 4 +- docs/.vuepress/dist/id/references/token.html | 4 +- docs/.vuepress/dist/index.html | 4 +- .../dist/ja/core-concepts/accounts.html | 4 +- docs/.vuepress/dist/ja/core-concepts/cpi.html | 4 +- .../.vuepress/dist/ja/core-concepts/pdas.html | 4 +- .../dist/ja/core-concepts/programs.html | 4 +- .../dist/ja/core-concepts/transactions.html | 4 +- .../dist/ja/getting-started/installation.html | 10 +- .../dist/ja/guides/account-maps.html | 4 +- .../dist/ja/guides/data-migration.html | 4 +- .../ja/guides/debugging-solana-programs.html | 4 +- .../ja/guides/feature-parity-testing.html | 4 +- .../dist/ja/guides/get-program-accounts.html | 4 +- .../dist/ja/guides/serialization.html | 6 +- .../ja/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/ja/index.html | 4 +- .../dist/ja/references/accounts.html | 4 +- .../ja/references/basic-transactions.html | 9 +- .../ja/references/keypairs-and-wallets.html | 47 +++-- .../dist/ja/references/local-development.html | 4 +- .../dist/ja/references/name-service.html | 4 +- docs/.vuepress/dist/ja/references/nfts.html | 4 +- .../ja/references/offline-transactions.html | 16 +- .../dist/ja/references/programs.html | 102 ++++++--- .../.vuepress/dist/ja/references/staking.html | 4 +- docs/.vuepress/dist/ja/references/token.html | 4 +- .../dist/kr/core-concepts/accounts.html | 4 +- .../.vuepress/dist/kr/core-concepts/pdas.html | 4 +- .../dist/kr/core-concepts/programs.html | 4 +- .../dist/kr/core-concepts/transactions.html | 4 +- .../dist/kr/getting-started/installation.html | 10 +- .../dist/kr/guides/account-maps.html | 4 +- .../dist/kr/guides/data-migration.html | 4 +- .../kr/guides/debugging-solana-programs.html | 4 +- .../kr/guides/feature-parity-testing.html | 4 +- .../dist/kr/guides/get-program-accounts.html | 4 +- .../dist/kr/guides/serialization.html | 6 +- docs/.vuepress/dist/kr/index.html | 4 +- .../dist/kr/references/accounts.html | 4 +- .../kr/references/basic-transactions.html | 9 +- .../kr/references/keypairs-and-wallets.html | 47 +++-- .../dist/kr/references/local-development.html | 4 +- .../dist/kr/references/name-service.html | 4 +- docs/.vuepress/dist/kr/references/nfts.html | 4 +- .../kr/references/offline-transactions.html | 16 +- .../dist/kr/references/programs.html | 102 ++++++--- .../.vuepress/dist/kr/references/staking.html | 4 +- docs/.vuepress/dist/kr/references/token.html | 4 +- .../dist/pt/core-concepts/accounts.html | 4 +- docs/.vuepress/dist/pt/core-concepts/cpi.html | 4 +- .../.vuepress/dist/pt/core-concepts/pdas.html | 4 +- .../dist/pt/core-concepts/programs.html | 4 +- .../dist/pt/core-concepts/transactions.html | 4 +- .../dist/pt/getting-started/installation.html | 10 +- .../dist/pt/guides/account-maps.html | 4 +- .../dist/pt/guides/data-migration.html | 4 +- .../pt/guides/debugging-solana-programs.html | 4 +- .../pt/guides/feature-parity-testing.html | 4 +- .../dist/pt/guides/get-program-accounts.html | 4 +- .../dist/pt/guides/serialization.html | 6 +- .../pt/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/pt/index.html | 4 +- .../dist/pt/references/accounts.html | 4 +- .../pt/references/basic-transactions.html | 9 +- .../pt/references/keypairs-and-wallets.html | 47 +++-- .../dist/pt/references/local-development.html | 4 +- .../dist/pt/references/name-service.html | 4 +- docs/.vuepress/dist/pt/references/nfts.html | 4 +- .../pt/references/offline-transactions.html | 16 +- .../dist/pt/references/programs.html | 102 ++++++--- .../.vuepress/dist/pt/references/staking.html | 4 +- docs/.vuepress/dist/pt/references/token.html | 4 +- docs/.vuepress/dist/references/accounts.html | 4 +- .../dist/references/basic-transactions.html | 9 +- .../dist/references/keypairs-and-wallets.html | 77 ++++--- .../dist/references/local-development.html | 4 +- .../dist/references/name-service.html | 4 +- docs/.vuepress/dist/references/nfts.html | 4 +- .../dist/references/offline-transactions.html | 16 +- docs/.vuepress/dist/references/programs.html | 187 +++++++---------- docs/.vuepress/dist/references/staking.html | 4 +- docs/.vuepress/dist/references/token.html | 4 +- .../dist/th/core-concepts/accounts.html | 4 +- .../.vuepress/dist/th/core-concepts/pdas.html | 4 +- .../dist/th/core-concepts/programs.html | 4 +- .../dist/th/core-concepts/transactions.html | 4 +- .../dist/th/getting-started/installation.html | 10 +- .../dist/th/guides/account-maps.html | 4 +- .../dist/th/guides/data-migration.html | 4 +- .../th/guides/debugging-solana-programs.html | 4 +- .../th/guides/feature-parity-testing.html | 4 +- .../dist/th/guides/get-program-accounts.html | 4 +- .../dist/th/guides/serialization.html | 6 +- .../th/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/th/index.html | 4 +- .../dist/th/references/accounts.html | 4 +- .../th/references/basic-transactions.html | 9 +- .../th/references/keypairs-and-wallets.html | 47 +++-- .../dist/th/references/local-development.html | 4 +- .../dist/th/references/name-service.html | 4 +- docs/.vuepress/dist/th/references/nfts.html | 4 +- .../th/references/offline-transactions.html | 16 +- .../dist/th/references/programs.html | 102 ++++++--- .../.vuepress/dist/th/references/staking.html | 4 +- docs/.vuepress/dist/th/references/token.html | 4 +- .../dist/tr/core-concepts/accounts.html | 4 +- .../.vuepress/dist/tr/core-concepts/pdas.html | 4 +- .../dist/tr/core-concepts/programs.html | 4 +- .../dist/tr/core-concepts/transactions.html | 4 +- .../dist/tr/getting-started/installation.html | 10 +- .../dist/tr/guides/account-maps.html | 4 +- .../dist/tr/guides/data-migration.html | 4 +- .../tr/guides/debugging-solana-programs.html | 4 +- .../tr/guides/feature-parity-testing.html | 4 +- .../dist/tr/guides/get-program-accounts.html | 4 +- .../dist/tr/guides/serialization.html | 4 +- docs/.vuepress/dist/tr/index.html | 4 +- .../dist/tr/references/accounts.html | 4 +- .../tr/references/basic-transactions.html | 4 +- .../tr/references/keypairs-and-wallets.html | 8 +- .../dist/tr/references/local-development.html | 4 +- .../dist/tr/references/name-service.html | 4 +- docs/.vuepress/dist/tr/references/nfts.html | 4 +- .../tr/references/offline-transactions.html | 4 +- .../dist/tr/references/programs.html | 4 +- .../.vuepress/dist/tr/references/staking.html | 4 +- docs/.vuepress/dist/tr/references/token.html | 4 +- .../dist/vi/core-concepts/accounts.html | 4 +- .../.vuepress/dist/vi/core-concepts/pdas.html | 4 +- .../dist/vi/core-concepts/programs.html | 4 +- .../dist/vi/core-concepts/transactions.html | 6 +- .../dist/vi/getting-started/installation.html | 10 +- .../dist/vi/guides/account-maps.html | 8 +- .../dist/vi/guides/data-migration.html | 4 +- .../vi/guides/debugging-solana-programs.html | 4 +- .../vi/guides/feature-parity-testing.html | 4 +- .../dist/vi/guides/get-program-accounts.html | 6 +- .../dist/vi/guides/serialization.html | 6 +- docs/.vuepress/dist/vi/index.html | 4 +- .../dist/vi/references/accounts.html | 4 +- .../vi/references/basic-transactions.html | 9 +- .../vi/references/keypairs-and-wallets.html | 47 +++-- .../dist/vi/references/local-development.html | 4 +- .../dist/vi/references/name-service.html | 4 +- docs/.vuepress/dist/vi/references/nfts.html | 4 +- .../vi/references/offline-transactions.html | 16 +- .../dist/vi/references/programs.html | 102 ++++++--- .../.vuepress/dist/vi/references/staking.html | 4 +- docs/.vuepress/dist/vi/references/token.html | 10 +- .../dist/zh/core-concepts/accounts.html | 4 +- .../.vuepress/dist/zh/core-concepts/pdas.html | 4 +- .../dist/zh/core-concepts/programs.html | 4 +- .../dist/zh/core-concepts/transactions.html | 4 +- .../dist/zh/getting-started/installation.html | 10 +- .../dist/zh/guides/account-maps.html | 4 +- .../dist/zh/guides/data-migration.html | 4 +- .../zh/guides/debugging-solana-programs.html | 4 +- .../zh/guides/feature-parity-testing.html | 4 +- .../dist/zh/guides/get-program-accounts.html | 4 +- .../dist/zh/guides/serialization.html | 6 +- .../zh/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/zh/index.html | 4 +- .../dist/zh/references/accounts.html | 4 +- .../zh/references/basic-transactions.html | 9 +- .../zh/references/keypairs-and-wallets.html | 47 +++-- .../dist/zh/references/local-development.html | 4 +- .../dist/zh/references/name-service.html | 4 +- docs/.vuepress/dist/zh/references/nfts.html | 4 +- .../zh/references/offline-transactions.html | 16 +- .../dist/zh/references/programs.html | 102 ++++++--- .../.vuepress/dist/zh/references/staking.html | 4 +- docs/.vuepress/dist/zh/references/token.html | 4 +- .../dist/zh_t/core-concepts/accounts.html | 4 +- .../dist/zh_t/core-concepts/pdas.html | 4 +- .../dist/zh_t/core-concepts/programs.html | 4 +- .../dist/zh_t/core-concepts/transactions.html | 4 +- .../zh_t/getting-started/installation.html | 10 +- .../dist/zh_t/guides/account-maps.html | 4 +- .../dist/zh_t/guides/data-migration.html | 4 +- .../guides/debugging-solana-programs.html | 4 +- .../zh_t/guides/feature-parity-testing.html | 4 +- .../zh_t/guides/get-program-accounts.html | 4 +- .../dist/zh_t/guides/serialization.html | 6 +- .../zh_t/guides/versioned-transactions.html | 4 +- docs/.vuepress/dist/zh_t/index.html | 4 +- .../dist/zh_t/references/accounts.html | 4 +- .../zh_t/references/basic-transactions.html | 9 +- .../zh_t/references/keypairs-and-wallets.html | 47 +++-- .../zh_t/references/local-development.html | 4 +- .../dist/zh_t/references/name-service.html | 4 +- docs/.vuepress/dist/zh_t/references/nfts.html | 4 +- .../zh_t/references/offline-transactions.html | 16 +- .../dist/zh_t/references/programs.html | 102 ++++++--- .../dist/zh_t/references/staking.html | 4 +- .../.vuepress/dist/zh_t/references/token.html | 4 +- 755 files changed, 4477 insertions(+), 2867 deletions(-) rename docs/.vuepress/dist/assets/{404.e671120d.js => 404.97105336.js} (89%) create mode 100644 docs/.vuepress/dist/assets/404.html.0371c330.js delete mode 100644 docs/.vuepress/dist/assets/404.html.1873b0e7.js rename docs/.vuepress/dist/assets/{Layout.4ba2f342.js => Layout.895c939a.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.a75e89c2.js => account-maps.html.06b8612d.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.a6d163f8.js => account-maps.html.15aa5004.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.62c5a232.js => account-maps.html.1a60d088.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.6ef9e96e.js => account-maps.html.39d261ab.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.47c84b4e.js => account-maps.html.4343f319.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.84595114.js => account-maps.html.470f6c52.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.84c98fd3.js => account-maps.html.61211f10.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.2bc51567.js => account-maps.html.680b0ba3.js} (90%) rename docs/.vuepress/dist/assets/{account-maps.html.cd84fe7b.js => account-maps.html.9f7ded52.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.573ed2b1.js => account-maps.html.b6d2a040.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.6070c007.js => account-maps.html.cc8377ca.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.61224aa4.js => account-maps.html.d873a7bb.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.84532932.js => account-maps.html.de5b004e.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.c84ca06e.js => account-maps.html.fb104fdb.js} (99%) rename docs/.vuepress/dist/assets/{account-maps.html.8c6e008e.js => account-maps.html.fb6e863b.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.5affc5f4.js => accounts.html.064c9f53.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.ef2241b1.js => accounts.html.150ec297.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.0cab14f0.js => accounts.html.3642f7bf.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.91bec01d.js => accounts.html.3805dda2.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.5ae3ae45.js => accounts.html.480effe2.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.89eb8977.js => accounts.html.50b5ecb7.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.8c2c7d40.js => accounts.html.6398d200.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.d0cb3dfd.js => accounts.html.67312eab.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.17535e68.js => accounts.html.72a92f16.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.d16b618e.js => accounts.html.74e46f84.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.e2d2d050.js => accounts.html.79fe9f62.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.d5fa2c98.js => accounts.html.7be50229.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.d65e9141.js => accounts.html.866c67ff.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.bcf82d40.js => accounts.html.8962baed.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.25738f4e.js => accounts.html.a8d96503.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.85e3e0a4.js => accounts.html.ab6f1b9a.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.7d878d86.js => accounts.html.af394751.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.527d0e94.js => accounts.html.b2dcd867.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.e2d854ed.js => accounts.html.b3afb2f5.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.4965c1bb.js => accounts.html.bddee016.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.369da584.js => accounts.html.c201028c.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.fedf3c54.js => accounts.html.c850f29d.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.629a8060.js => accounts.html.ccac86d6.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.9bb37cd5.js => accounts.html.dd8624e8.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.339a7b82.js => accounts.html.e3030cfb.js} (99%) rename docs/.vuepress/dist/assets/{accounts.html.62c56dc7.js => accounts.html.ec76ce30.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.b3e83490.js => accounts.html.f83a9427.js} (98%) rename docs/.vuepress/dist/assets/{accounts.html.0636922d.js => accounts.html.fe830ce6.js} (98%) rename docs/.vuepress/dist/assets/{app.07ce7a66.js => app.d411e3b3.js} (65%) rename docs/.vuepress/dist/assets/{auto-approve.html.4e3677ac.js => auto-approve.html.9a6c68ed.js} (97%) rename docs/.vuepress/dist/assets/{auto-approve.html.1e147577.js => auto-approve.html.e43815fe.js} (97%) rename docs/.vuepress/dist/assets/{auto-approve.html.e352de0c.js => auto-approve.html.ef828a0c.js} (97%) rename docs/.vuepress/dist/assets/{basic-transactions.html.75aca1d6.js => basic-transactions.html.0aea27a9.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.18d8290f.js => basic-transactions.html.12dc4b82.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.c93eecf9.js => basic-transactions.html.1bfd6fa8.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.ae0f79a3.js => basic-transactions.html.3f54c73c.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.85ad631b.js => basic-transactions.html.5d245536.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.1abb92a6.js => basic-transactions.html.65ccec01.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.a069dbca.js => basic-transactions.html.6decd1d3.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.8104955c.js => basic-transactions.html.9fa99f53.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.f38dcb54.js => basic-transactions.html.b489c766.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.e416b8f1.js => basic-transactions.html.b9b7efb5.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.8d04a74c.js => basic-transactions.html.d3c2b6ec.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.9492ba81.js => basic-transactions.html.e80a4c69.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.ab11cb9f.js => basic-transactions.html.e97b7701.js} (99%) rename docs/.vuepress/dist/assets/{basic-transactions.html.351c7904.js => basic-transactions.html.ed839122.js} (99%) rename docs/.vuepress/dist/assets/{cpi.html.a340693f.js => cpi.html.64ff535f.js} (99%) rename docs/.vuepress/dist/assets/{cpi.html.9d257983.js => cpi.html.77c0f3ed.js} (99%) rename docs/.vuepress/dist/assets/{cpi.html.1a2d6d74.js => cpi.html.9b2c1583.js} (99%) rename docs/.vuepress/dist/assets/{cpi.html.68e45f97.js => cpi.html.cd0a0c70.js} (99%) rename docs/.vuepress/dist/assets/{cpi.html.fc0ddd7a.js => cpi.html.ce5147fe.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.f3e868ea.js => data-migration.html.08e0b038.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.d5010d02.js => data-migration.html.1425ff59.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.07b84548.js => data-migration.html.4a37b76d.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.aa7491d7.js => data-migration.html.558f508c.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.d0acee8e.js => data-migration.html.6d313435.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.8520d86d.js => data-migration.html.7eec80fc.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.e0a081db.js => data-migration.html.85d3c82e.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.ac61c119.js => data-migration.html.a1c8731c.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.51e5d8f8.js => data-migration.html.cff77833.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.ec2afdd1.js => data-migration.html.df00c4c4.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.42889ad1.js => data-migration.html.e0732e8c.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.95cc310f.js => data-migration.html.f0501f2c.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.a0b30eb8.js => data-migration.html.f1535631.js} (99%) rename docs/.vuepress/dist/assets/{data-migration.html.611a3316.js => data-migration.html.ff6c2789.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.d82f151d.js => debugging-solana-programs.html.072a7ef4.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.c5eb5f04.js => debugging-solana-programs.html.10f57b5c.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.29a6acd8.js => debugging-solana-programs.html.1b41db2c.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.a0e3b858.js => debugging-solana-programs.html.2cb6ae77.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.2f9160d7.js => debugging-solana-programs.html.3b218539.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.3aacc1a8.js => debugging-solana-programs.html.812629be.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.56d02641.js => debugging-solana-programs.html.92d478f0.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.696e8511.js => debugging-solana-programs.html.a32bb038.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.3408b860.js => debugging-solana-programs.html.aa6fcacf.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.b7fb9288.js => debugging-solana-programs.html.b7310cda.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.2a0d6ae2.js => debugging-solana-programs.html.be5d826a.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.ff3a8325.js => debugging-solana-programs.html.c55c47bf.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.f0229576.js => debugging-solana-programs.html.d0d47d71.js} (99%) rename docs/.vuepress/dist/assets/{debugging-solana-programs.html.a9ad9801.js => debugging-solana-programs.html.f391ad32.js} (99%) rename docs/.vuepress/dist/assets/{distribution.html.e6e2641f.js => distribution.html.992824c3.js} (98%) rename docs/.vuepress/dist/assets/{distribution.html.ebcec652.js => distribution.html.c5b39f53.js} (98%) rename docs/.vuepress/dist/assets/{distribution.html.1a2e0c57.js => distribution.html.fd97f27d.js} (98%) rename docs/.vuepress/dist/assets/{energy-system.html.446d0efc.js => energy-system.html.311556bd.js} (99%) rename docs/.vuepress/dist/assets/{energy-system.html.36ae62eb.js => energy-system.html.3fd21eea.js} (99%) rename docs/.vuepress/dist/assets/{energy-system.html.c939c46f.js => energy-system.html.a79e6d47.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.2d03e4b5.js => feature-parity-testing.html.21f8b814.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.9895d411.js => feature-parity-testing.html.4ad59f22.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.5be01a44.js => feature-parity-testing.html.6403e730.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.93063fd3.js => feature-parity-testing.html.67fc474d.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.9edac1d3.js => feature-parity-testing.html.76d20bfd.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.7eebcb7c.js => feature-parity-testing.html.77612586.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.64de3bfa.js => feature-parity-testing.html.779577da.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.8332b8fc.js => feature-parity-testing.html.944582ed.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.60d0cda5.js => feature-parity-testing.html.9d3ad8df.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.441250fa.js => feature-parity-testing.html.a141aa71.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.110a0e04.js => feature-parity-testing.html.a6057c8b.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.6b5afb2f.js => feature-parity-testing.html.e9479f13.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.e87e0e6e.js => feature-parity-testing.html.ec36c4c1.js} (99%) rename docs/.vuepress/dist/assets/{feature-parity-testing.html.90d3050b.js => feature-parity-testing.html.f4efd784.js} (99%) rename docs/.vuepress/dist/assets/{game-examples.html.e048eba1.js => game-examples.html.633629bc.js} (99%) rename docs/.vuepress/dist/assets/{game-examples.html.8ba930cd.js => game-examples.html.806db4fe.js} (99%) rename docs/.vuepress/dist/assets/{game-examples.html.4e1c4e80.js => game-examples.html.f01c9761.js} (99%) rename docs/.vuepress/dist/assets/{game-sdks.html.c0176ba6.js => game-sdks.html.1abe292d.js} (98%) rename docs/.vuepress/dist/assets/{game-sdks.html.92d7e729.js => game-sdks.html.3bfddaba.js} (98%) rename docs/.vuepress/dist/assets/{game-sdks.html.d18bd9d2.js => game-sdks.html.f364ca6f.js} (98%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.19ef2dee.js => get-program-accounts.html.04314539.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.bcc96381.js => get-program-accounts.html.0cf79cec.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.01717eeb.js => get-program-accounts.html.1a158c6f.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.05c9c5aa.js => get-program-accounts.html.1a4d6f7c.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.beec38ff.js => get-program-accounts.html.39cc5e4a.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.43b20beb.js => get-program-accounts.html.416a5c35.js} (93%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.2b6451b4.js => get-program-accounts.html.47597b1d.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.2d157240.js => get-program-accounts.html.6e96a155.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.703fb6bd.js => get-program-accounts.html.713a03ab.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.a9d0e53c.js => get-program-accounts.html.7d92e55d.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.b068cc8a.js => get-program-accounts.html.99c15661.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.5f716fa3.js => get-program-accounts.html.b6c20980.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.58aa1eba.js => get-program-accounts.html.c489ff46.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.382d13c1.js => get-program-accounts.html.ca55546d.js} (99%) rename docs/.vuepress/dist/assets/{get-program-accounts.html.f563091d.js => get-program-accounts.html.dd8577dd.js} (99%) rename docs/.vuepress/dist/assets/{hello-world.html.7962bd1c.js => hello-world.html.888726f2.js} (99%) rename docs/.vuepress/dist/assets/{hello-world.html.46100458.js => hello-world.html.96baeba5.js} (99%) rename docs/.vuepress/dist/assets/{hello-world.html.97d1eb37.js => hello-world.html.acc4db6a.js} (99%) rename docs/.vuepress/dist/assets/{index.html.92035043.js => index.html.1823d81d.js} (98%) rename docs/.vuepress/dist/assets/{index.html.2017fef1.js => index.html.28db958b.js} (97%) rename docs/.vuepress/dist/assets/{index.html.b594f3cc.js => index.html.37aeede1.js} (97%) rename docs/.vuepress/dist/assets/{index.html.9bb2504f.js => index.html.45f0fd63.js} (98%) rename docs/.vuepress/dist/assets/{index.html.550d93c2.js => index.html.5559972c.js} (97%) rename docs/.vuepress/dist/assets/{index.html.caa2e1b4.js => index.html.611d98f3.js} (97%) rename docs/.vuepress/dist/assets/{index.html.c5a39464.js => index.html.6698bb6d.js} (97%) rename docs/.vuepress/dist/assets/{index.html.25f20e37.js => index.html.671bbc93.js} (97%) rename docs/.vuepress/dist/assets/{index.html.b6c39787.js => index.html.73db6b25.js} (97%) rename docs/.vuepress/dist/assets/{index.html.dd541d3c.js => index.html.859f0785.js} (97%) rename docs/.vuepress/dist/assets/{index.html.d04c9063.js => index.html.8ba67a18.js} (97%) rename docs/.vuepress/dist/assets/{index.html.8977d14d.js => index.html.92447802.js} (97%) rename docs/.vuepress/dist/assets/{index.html.e7deec39.js => index.html.bc5a69e1.js} (98%) rename docs/.vuepress/dist/assets/{index.html.f4a1e63e.js => index.html.f1c2ef80.js} (97%) rename docs/.vuepress/dist/assets/{installation.html.1f30223e.js => installation.html.1baa10e4.js} (85%) rename docs/.vuepress/dist/assets/{installation.html.f389c1e2.js => installation.html.1bd39712.js} (83%) rename docs/.vuepress/dist/assets/{installation.html.3b279ba8.js => installation.html.1d183c4d.js} (86%) rename docs/.vuepress/dist/assets/{installation.html.eeb039ec.js => installation.html.20ee85ab.js} (86%) rename docs/.vuepress/dist/assets/{installation.html.fd583852.js => installation.html.266da2d0.js} (90%) rename docs/.vuepress/dist/assets/{installation.html.3ee204bb.js => installation.html.2ee5c8ec.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.5e200cbd.js => installation.html.36acf74c.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.81cc1ff4.js => installation.html.4c7b0806.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.ef551b6c.js => installation.html.55799980.js} (86%) rename docs/.vuepress/dist/assets/{installation.html.91886c17.js => installation.html.5e3228c9.js} (86%) rename docs/.vuepress/dist/assets/{installation.html.aa25ac0f.js => installation.html.614be1d7.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.4e98836a.js => installation.html.6ebc9da6.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.98badae7.js => installation.html.715b3b99.js} (84%) rename docs/.vuepress/dist/assets/{installation.html.3865f03a.js => installation.html.7f31ac87.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.447c9172.js => installation.html.9592faa3.js} (81%) rename docs/.vuepress/dist/assets/{installation.html.9dc89678.js => installation.html.9991e5f0.js} (85%) rename docs/.vuepress/dist/assets/{installation.html.7b74d3ce.js => installation.html.9b358507.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.a516e599.js => installation.html.a11f9bd6.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.dad10efa.js => installation.html.a97a7fb2.js} (65%) rename docs/.vuepress/dist/assets/{installation.html.75866756.js => installation.html.aa2d111c.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.cff7de51.js => installation.html.b29e3de7.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.0539cd42.js => installation.html.b85f5579.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.33a0283b.js => installation.html.d67ac4ef.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.2e4550cf.js => installation.html.de1947ca.js} (88%) rename docs/.vuepress/dist/assets/{installation.html.04bddf91.js => installation.html.e9fcf7ff.js} (89%) rename docs/.vuepress/dist/assets/{installation.html.0fd43b03.js => installation.html.ee5d0d6b.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.aa3edf44.js => installation.html.f915e5db.js} (99%) rename docs/.vuepress/dist/assets/{installation.html.5338573c.js => installation.html.fe3ab544.js} (86%) rename docs/.vuepress/dist/assets/{interact-with-tokens.html.98196941.js => interact-with-tokens.html.5ced5824.js} (99%) rename docs/.vuepress/dist/assets/{interact-with-tokens.html.64318398.js => interact-with-tokens.html.9a3c30e2.js} (99%) rename docs/.vuepress/dist/assets/{interact-with-tokens.html.2bce6086.js => interact-with-tokens.html.b490da89.js} (99%) rename docs/.vuepress/dist/assets/{intro.html.cccca287.js => intro.html.4a5cf141.js} (98%) rename docs/.vuepress/dist/assets/{intro.html.5c2ad8c4.js => intro.html.50d9f3dd.js} (97%) rename docs/.vuepress/dist/assets/{intro.html.afd41fab.js => intro.html.850ff3cd.js} (98%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.67ed01d6.js => keypairs-and-wallets.html.12cb5c76.js} (97%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.52178133.js => keypairs-and-wallets.html.1759bcbe.js} (97%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.caac507d.js => keypairs-and-wallets.html.2d9f22b4.js} (87%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.06b48140.js => keypairs-and-wallets.html.38d07f14.js} (92%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.06ba1dde.js => keypairs-and-wallets.html.3a19760d.js} (89%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.7c422ff4.js => keypairs-and-wallets.html.3f5752cd.js} (90%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.cc8fbf04.js => keypairs-and-wallets.html.45fae5f1.js} (97%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.5d3230ee.js => keypairs-and-wallets.html.5b84c000.js} (70%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.41fab86d.js => keypairs-and-wallets.html.731d8b2d.js} (96%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.7c453b59.js => keypairs-and-wallets.html.73be0d40.js} (96%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.61911f3c.js => keypairs-and-wallets.html.7856d044.js} (96%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.4fa11b3e.js => keypairs-and-wallets.html.7b4b2fca.js} (94%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.51f378e3.js => keypairs-and-wallets.html.7f32d8c6.js} (95%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.cc9959ad.js => keypairs-and-wallets.html.830d46df.js} (87%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.8d42bf89.js => keypairs-and-wallets.html.8fca2ff6.js} (89%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.f22c3901.js => keypairs-and-wallets.html.9661ed1e.js} (96%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.9ba5746a.js => keypairs-and-wallets.html.a22f3617.js} (99%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.f62ce6aa.js => keypairs-and-wallets.html.a79a299d.js} (92%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.e67c0c51.js => keypairs-and-wallets.html.a83650c9.js} (96%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.35579864.js => keypairs-and-wallets.html.a876964b.js} (90%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.96505086.js => keypairs-and-wallets.html.abc05e48.js} (89%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.c98a65c6.js => keypairs-and-wallets.html.c4fc2c20.js} (91%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.af37857f.js => keypairs-and-wallets.html.c5823658.js} (97%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.87a50ba3.js => keypairs-and-wallets.html.c8dbc763.js} (90%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.8a36f79a.js => keypairs-and-wallets.html.df8bc1da.js} (91%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.de41b5c5.js => keypairs-and-wallets.html.e2ea7de6.js} (97%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.68a4f8a1.js => keypairs-and-wallets.html.e586f774.js} (97%) rename docs/.vuepress/dist/assets/{keypairs-and-wallets.html.7c474929.js => keypairs-and-wallets.html.fe3970ec.js} (97%) rename docs/.vuepress/dist/assets/{local-development.html.c30f3958.js => local-development.html.0c928074.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.83d30cd3.js => local-development.html.26e53f81.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.987c051d.js => local-development.html.2f6f02fe.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.04b39972.js => local-development.html.3c02c969.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.87708b9b.js => local-development.html.4297ed48.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.5b9c11f5.js => local-development.html.570a407e.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.56a49f49.js => local-development.html.74ef67b1.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.d92b65d2.js => local-development.html.8ed37c1d.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.94d5f03d.js => local-development.html.9a3616cd.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.edd1e5da.js => local-development.html.b2f4a193.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.57651167.js => local-development.html.c91442a0.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.a46df64b.js => local-development.html.d4374bd4.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.46e27ce6.js => local-development.html.f52317b1.js} (99%) rename docs/.vuepress/dist/assets/{local-development.html.6fe99a83.js => local-development.html.f9975a55.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.31d70b32.js => name-service.html.1abc0fa0.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.2a6127d5.js => name-service.html.3e027fa0.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.92fe381f.js => name-service.html.4f71f7ad.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.f9dd90b0.js => name-service.html.68928b86.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.87ead710.js => name-service.html.72c3ec5b.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.9126ccbb.js => name-service.html.813f0670.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.8945e238.js => name-service.html.8b66eeca.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.569777a7.js => name-service.html.8e66e4bc.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.7f713da1.js => name-service.html.91342459.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.84a68d08.js => name-service.html.9dec4983.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.ea9b0216.js => name-service.html.b0314bbe.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.c487eb0f.js => name-service.html.c6a9339e.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.40d37cf7.js => name-service.html.f3d180f8.js} (99%) rename docs/.vuepress/dist/assets/{name-service.html.73354d4f.js => name-service.html.f82624ec.js} (99%) rename docs/.vuepress/dist/assets/{nfts-in-games.html.e1b77b87.js => nfts-in-games.html.4d0d92b9.js} (99%) rename docs/.vuepress/dist/assets/{nfts-in-games.html.46772392.js => nfts-in-games.html.d5038ca4.js} (99%) rename docs/.vuepress/dist/assets/{nfts-in-games.html.2b65cbf5.js => nfts-in-games.html.e55ae003.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.d9599439.js => nfts.html.0c0cb140.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.3a4dc806.js => nfts.html.1976c787.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.8062119a.js => nfts.html.1ad11441.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.0870f8d4.js => nfts.html.2e49b605.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.73b95415.js => nfts.html.3c31ce39.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.75a819e1.js => nfts.html.61a0212c.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.1e42ca51.js => nfts.html.6c227031.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.93f43d02.js => nfts.html.78d4bd36.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.cb306959.js => nfts.html.a54e18bd.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.6cf05cb7.js => nfts.html.bc8395bd.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.06449cbe.js => nfts.html.ca44adf3.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.88b22980.js => nfts.html.e4e4c010.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.4488b5bf.js => nfts.html.f6b5f79a.js} (99%) rename docs/.vuepress/dist/assets/{nfts.html.f3815a10.js => nfts.html.f888c16f.js} (99%) rename docs/.vuepress/dist/assets/{offline-transactions.html.6bb56d3c.js => offline-transactions.html.0827c37c.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.a7cb4369.js => offline-transactions.html.08d142d8.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.d0d3f6bf.js => offline-transactions.html.3661f39c.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.1cebdb75.js => offline-transactions.html.43fa2f34.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.26de122f.js => offline-transactions.html.467fd989.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.411f2083.js => offline-transactions.html.7895faf9.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.cd22f1cb.js => offline-transactions.html.7d2ff671.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.62c2bb84.js => offline-transactions.html.8844fb23.js} (97%) rename docs/.vuepress/dist/assets/{offline-transactions.html.5d4f9b52.js => offline-transactions.html.9c9377a3.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.328bb708.js => offline-transactions.html.ba25b570.js} (99%) rename docs/.vuepress/dist/assets/{offline-transactions.html.0bf4dc0d.js => offline-transactions.html.c710df8e.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.ef38def6.js => offline-transactions.html.c7b8e6f1.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.afa81fed.js => offline-transactions.html.c90e0a69.js} (98%) rename docs/.vuepress/dist/assets/{offline-transactions.html.93364c85.js => offline-transactions.html.f368258e.js} (97%) rename docs/.vuepress/dist/assets/{pdas.html.cf2a36cd.js => pdas.html.12f9e1cc.js} (98%) rename docs/.vuepress/dist/assets/{pdas.html.dd1806d8.js => pdas.html.1b5e9aea.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.6d743213.js => pdas.html.20ee0dd7.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.9841e8a1.js => pdas.html.38085bda.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.56ea1967.js => pdas.html.3955a4b5.js} (98%) rename docs/.vuepress/dist/assets/{pdas.html.e5cff056.js => pdas.html.433df04a.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.6cdffc98.js => pdas.html.61b14f37.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.35c6152a.js => pdas.html.61fb8770.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.a4275910.js => pdas.html.6e5a8058.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.08e26e07.js => pdas.html.8eaf91cc.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.da9ce228.js => pdas.html.929e2544.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.eaddc26f.js => pdas.html.c12b509f.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.3b9289a8.js => pdas.html.d7edeb46.js} (99%) rename docs/.vuepress/dist/assets/{pdas.html.6fd7b3e7.js => pdas.html.eed3e90e.js} (98%) rename docs/.vuepress/dist/assets/{porting-anchor-to-unity.html.a3b74cb4.js => porting-anchor-to-unity.html.1b61517d.js} (99%) rename docs/.vuepress/dist/assets/{porting-anchor-to-unity.html.2d7da15e.js => porting-anchor-to-unity.html.74618a6d.js} (99%) rename docs/.vuepress/dist/assets/{porting-anchor-to-unity.html.d93d3149.js => porting-anchor-to-unity.html.81c8bafe.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.fb2104eb.js => programs.html.11e7bbe0.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.c4b45e07.js => programs.html.263f47ee.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.3f12c384.js => programs.html.2cf46764.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.e8e9b38e.js => programs.html.49c7c645.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.98fb8b49.js => programs.html.55c372ec.js} (84%) rename docs/.vuepress/dist/assets/{programs.html.2a06f575.js => programs.html.5fe96c87.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.6d41107a.js => programs.html.70fa58f4.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.3c48317e.js => programs.html.777bc9d0.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.48b1db94.js => programs.html.82f73bda.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.9cdb4de3.js => programs.html.8726b1de.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.90aa36af.js => programs.html.8b269692.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.f73d3347.js => programs.html.933f8e90.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.01e229c2.js => programs.html.95125d01.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.dec531fb.js => programs.html.9539084b.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.072a911a.js => programs.html.9975ecda.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.ebf949b0.js => programs.html.a475d1f5.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.96701793.js => programs.html.a53991e5.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.d7e559f7.js => programs.html.a57b3d47.js} (92%) rename docs/.vuepress/dist/assets/{programs.html.555fde3c.js => programs.html.b0aa64e9.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.a673792c.js => programs.html.b4edbb78.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.09c93a73.js => programs.html.b5bf5151.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.6801ed73.js => programs.html.b7903707.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.dd60d7aa.js => programs.html.cb377c15.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.7db6ff71.js => programs.html.d385e4fe.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.5860dd01.js => programs.html.d74f6c75.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.d77781f0.js => programs.html.dcaf461b.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.ea9dd7e3.js => programs.html.e55e9941.js} (99%) rename docs/.vuepress/dist/assets/{programs.html.135d8a1e.js => programs.html.e6708ad9.js} (95%) rename docs/.vuepress/dist/assets/{programs.html.602c11ba.js => programs.html.f498c46e.js} (99%) rename docs/.vuepress/dist/assets/{retrying-transactions.html.63745293.js => retrying-transactions.html.fbbd8db1.js} (99%) rename docs/.vuepress/dist/assets/{saving-game-state.html.40bb41f5.js => saving-game-state.html.b6db54c5.js} (99%) rename docs/.vuepress/dist/assets/{saving-game-state.html.9d6e5e66.js => saving-game-state.html.cde48a53.js} (99%) rename docs/.vuepress/dist/assets/{saving-game-state.html.aa5750ab.js => saving-game-state.html.ec310331.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.0d68a263.js => serialization.html.1259c629.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.a08f50dc.js => serialization.html.1a7f232d.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.89a2791f.js => serialization.html.38ba2d1e.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.d1ade7c6.js => serialization.html.39f2c0b1.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.ff6ce54c.js => serialization.html.489e403a.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.a34c46cf.js => serialization.html.4c219ebc.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.fc2b2085.js => serialization.html.58ace6bc.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.4cfc0d5a.js => serialization.html.5e0ca063.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.b36b4ad5.js => serialization.html.5f9eff00.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.bb0b6d3d.js => serialization.html.6e96a72c.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.d1b35c96.js => serialization.html.8240c6c3.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.932862af.js => serialization.html.96be53fb.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.cd6e6685.js => serialization.html.a08cd6dd.js} (99%) rename docs/.vuepress/dist/assets/{serialization.html.a93f580e.js => serialization.html.c14aec9f.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.122e3dd7.js => staking.html.04132c3e.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.bbc62dff.js => staking.html.153d21d5.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.4f958a15.js => staking.html.35f01019.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.a5ae14b2.js => staking.html.42ce08fa.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.8f95d604.js => staking.html.4592916e.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.f374e09a.js => staking.html.4daf843b.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.48d1bd77.js => staking.html.4f2175bc.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.04e151a8.js => staking.html.631b26d4.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.0fd3c3b6.js => staking.html.91c6a606.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.79740434.js => staking.html.9cd0f2f1.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.6485c86f.js => staking.html.9cf17bbb.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.9a3a894a.js => staking.html.bb8a6029.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.59211856.js => staking.html.e3f01f71.js} (99%) rename docs/.vuepress/dist/assets/{staking.html.420a515f.js => staking.html.f1bc25a4.js} (99%) rename docs/.vuepress/dist/assets/{store-sol-in-pda.html.c79c00ec.js => store-sol-in-pda.html.149b88b0.js} (99%) rename docs/.vuepress/dist/assets/{store-sol-in-pda.html.11610e9c.js => store-sol-in-pda.html.85b3fbd8.js} (99%) rename docs/.vuepress/dist/assets/{store-sol-in-pda.html.e4ee6008.js => store-sol-in-pda.html.b6c6b1ad.js} (99%) rename docs/.vuepress/dist/assets/{token.html.12804e59.js => token.html.0c03dc96.js} (99%) rename docs/.vuepress/dist/assets/{token.html.ea1f1398.js => token.html.24577b71.js} (99%) rename docs/.vuepress/dist/assets/{token.html.edf00ffd.js => token.html.2c73b698.js} (99%) rename docs/.vuepress/dist/assets/{token.html.cb53fbdc.js => token.html.5e6409cb.js} (99%) rename docs/.vuepress/dist/assets/{token.html.1da2f0eb.js => token.html.65520f24.js} (99%) rename docs/.vuepress/dist/assets/{token.html.e135cbcd.js => token.html.85b24b07.js} (53%) rename docs/.vuepress/dist/assets/{token.html.87c9f9ba.js => token.html.8bed60f6.js} (99%) rename docs/.vuepress/dist/assets/{token.html.858f2429.js => token.html.a75a9504.js} (99%) rename docs/.vuepress/dist/assets/{token.html.0e5aea93.js => token.html.ab898bc4.js} (99%) rename docs/.vuepress/dist/assets/{token.html.5b1ae1a2.js => token.html.b0c306ef.js} (99%) rename docs/.vuepress/dist/assets/{token.html.de032bea.js => token.html.d6b6721b.js} (99%) rename docs/.vuepress/dist/assets/{token.html.c555b525.js => token.html.e07b1965.js} (99%) rename docs/.vuepress/dist/assets/{token.html.495dbb1a.js => token.html.e914f7d1.js} (99%) rename docs/.vuepress/dist/assets/{token.html.77adbbb4.js => token.html.f94d11f9.js} (99%) rename docs/.vuepress/dist/assets/{token.html.b6c1e5ff.js => token.html.ff5cac15.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.e6d9a389.js => transactions.html.0c0860dc.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.f5f36a28.js => transactions.html.110ef9af.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.46bc8b92.js => transactions.html.11b26fdb.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.93abdb49.js => transactions.html.147b8767.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.1cb6f901.js => transactions.html.15106f80.js} (98%) rename docs/.vuepress/dist/assets/{transactions.html.73b8d7c4.js => transactions.html.2469ccae.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.0168eb8a.js => transactions.html.27adc8a8.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.0b44a37d.js => transactions.html.63dbd664.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.999eb3d9.js => transactions.html.68be7740.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.bc7f0379.js => transactions.html.a50662e6.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.b7388dfe.js => transactions.html.c46b5241.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.48ea2bf1.js => transactions.html.d4e068d2.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.f33ee4e9.js => transactions.html.eadd37e3.js} (90%) rename docs/.vuepress/dist/assets/{transactions.html.a1a988c9.js => transactions.html.f177146a.js} (99%) rename docs/.vuepress/dist/assets/{transactions.html.5f4184a8.js => transactions.html.f2c9858d.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.8ea1a104.js => versioned-transactions.html.097cf02b.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.1e1e264b.js => versioned-transactions.html.19d40b0d.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.7972f188.js => versioned-transactions.html.2c16ab97.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.1e457979.js => versioned-transactions.html.374bd78b.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.dd6b2982.js => versioned-transactions.html.78847d3c.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.5b1ec8d4.js => versioned-transactions.html.9a3f546a.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.7131c1ef.js => versioned-transactions.html.a1a0086a.js} (99%) rename docs/.vuepress/dist/assets/{versioned-transactions.html.20e4c983.js => versioned-transactions.html.ee26ba8c.js} (99%) diff --git a/docs/.vuepress/dist/404.html b/docs/.vuepress/dist/404.html index d63336b07..6fedfc1a0 100644 --- a/docs/.vuepress/dist/404.html +++ b/docs/.vuepress/dist/404.html @@ -23,11 +23,11 @@ } Solana Cookbook - +

404

Looks like we've got some broken links.
Take me home
- + diff --git a/docs/.vuepress/dist/assets/404.e671120d.js b/docs/.vuepress/dist/assets/404.97105336.js similarity index 89% rename from docs/.vuepress/dist/assets/404.e671120d.js rename to docs/.vuepress/dist/assets/404.97105336.js index c8c1cbe1b..7a463f1b6 100644 --- a/docs/.vuepress/dist/assets/404.e671120d.js +++ b/docs/.vuepress/dist/assets/404.97105336.js @@ -1 +1 @@ -import{f as i,u as _,g as p,r as f,o as k,c as v,a as o,t as c,b as L,w as g,h as l,d as x}from"./app.07ce7a66.js";const B={class:"theme-container"},N={class:"theme-default-content"},T=o("h1",null,"404",-1),V=i({setup(b){var a,s,n;const u=_(),e=p(),t=(a=e.value.notFound)!=null?a:["Not Found"],r=()=>t[Math.floor(Math.random()*t.length)],h=(s=e.value.home)!=null?s:u.value,m=(n=e.value.backToHome)!=null?n:"Back to home";return(C,M)=>{const d=f("RouterLink");return k(),v("div",B,[o("div",N,[T,o("blockquote",null,c(r()),1),L(d,{to:l(h)},{default:g(()=>[x(c(l(m)),1)]),_:1},8,["to"])])])}}});export{V as default}; +import{f as i,u as _,g as p,r as f,o as k,c as v,a as o,t as c,b as L,w as g,h as l,d as x}from"./app.d411e3b3.js";const B={class:"theme-container"},N={class:"theme-default-content"},T=o("h1",null,"404",-1),V=i({setup(b){var a,s,n;const u=_(),e=p(),t=(a=e.value.notFound)!=null?a:["Not Found"],r=()=>t[Math.floor(Math.random()*t.length)],h=(s=e.value.home)!=null?s:u.value,m=(n=e.value.backToHome)!=null?n:"Back to home";return(C,M)=>{const d=f("RouterLink");return k(),v("div",B,[o("div",N,[T,o("blockquote",null,c(r()),1),L(d,{to:l(h)},{default:g(()=>[x(c(l(m)),1)]),_:1},8,["to"])])])}}});export{V as default}; diff --git a/docs/.vuepress/dist/assets/404.html.0371c330.js b/docs/.vuepress/dist/assets/404.html.0371c330.js new file mode 100644 index 000000000..8d8792826 --- /dev/null +++ b/docs/.vuepress/dist/assets/404.html.0371c330.js @@ -0,0 +1 @@ +import{_ as r}from"./app.d411e3b3.js";const _={};function e(t,c){return null}var a=r(_,[["render",e]]);export{a as default}; diff --git a/docs/.vuepress/dist/assets/404.html.1873b0e7.js b/docs/.vuepress/dist/assets/404.html.1873b0e7.js deleted file mode 100644 index fa1f705d2..000000000 --- a/docs/.vuepress/dist/assets/404.html.1873b0e7.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as r}from"./app.07ce7a66.js";const _={};function e(t,c){return null}var a=r(_,[["render",e]]);export{a as default}; diff --git a/docs/.vuepress/dist/assets/Layout.4ba2f342.js b/docs/.vuepress/dist/assets/Layout.895c939a.js similarity index 99% rename from docs/.vuepress/dist/assets/Layout.4ba2f342.js rename to docs/.vuepress/dist/assets/Layout.895c939a.js index d8d9b34cf..37be14d09 100644 --- a/docs/.vuepress/dist/assets/Layout.4ba2f342.js +++ b/docs/.vuepress/dist/assets/Layout.895c939a.js @@ -1 +1 @@ -var Be=Object.defineProperty,Me=Object.defineProperties;var De=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ve=(l,t,e)=>t in l?Be(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,X=(l,t)=>{for(var e in t||(t={}))Ne.call(t,e)&&ve(l,e,t[e]);if(de)for(var e of de(t))Ee.call(t,e)&&ve(l,e,t[e]);return l},Y=(l,t)=>Me(l,De(t));import{_ as Ie,r as R,o as a,c,b as $,f as x,i as I,j as p,k as _e,h as n,F as D,l as A,m as w,a as g,t as T,n as G,p as J,q as C,w as B,s as pe,v as y,d as U,x as q,y as Pe,z as Re,A as Ae,B as Q,C as Z,D as V,E as fe,G as me,H as P,u as be,g as M,T as ge,I as O,J as He,K as j,L as K,M as Oe,N as ze,O as ee,P as ke,Q as $e,e as Fe,R as Le,S as We,U as W,V as te,W as Ue,X as Ve,Y as je,Z as Ke}from"./app.07ce7a66.js";const Ge={},qe={class:"theme-default-content custom"};function Xe(l,t){const e=R("Content");return a(),c("div",qe,[$(e)])}var Ye=Ie(Ge,[["render",Xe]]);const Je={key:0,class:"features"},Qe=x({setup(l){const t=I(),e=p(()=>_e(t.value.features)?t.value.features:[]);return(i,r)=>n(e).length?(a(),c("div",Je,[(a(!0),c(D,null,A(n(e),_=>(a(),c("div",{key:_.title,class:"feature"},[g("h2",null,T(_.title),1),g("p",null,T(_.details),1)]))),128))])):w("",!0)}}),Ze=["innerHTML"],et=["textContent"],tt=x({setup(l){const t=I(),e=p(()=>t.value.footer),i=p(()=>t.value.footerHtml);return(r,_)=>n(e)?(a(),c(D,{key:0},[n(i)?(a(),c("div",{key:0,class:"footer",innerHTML:n(e)},null,8,Ze)):(a(),c("div",{key:1,class:"footer",textContent:T(n(e))},null,8,et))],64)):w("",!0)}}),nt=["href","rel","target","aria-label"],at=x({inheritAttrs:!1}),E=x(Y(X({},at),{props:{item:{type:Object,required:!0}},setup(l){const t=l,e=G(),i=Ae(),{item:r}=J(t),_=p(()=>q(r.value.link)),f=p(()=>Pe(r.value.link)||Re(r.value.link)),h=p(()=>{if(!f.value){if(r.value.target)return r.value.target;if(_.value)return"_blank"}}),s=p(()=>h.value==="_blank"),o=p(()=>!_.value&&!f.value&&!s.value),u=p(()=>{if(!f.value){if(r.value.rel)return r.value.rel;if(s.value)return"noopener noreferrer"}}),d=p(()=>r.value.ariaLabel||r.value.text),v=p(()=>{const L=Object.keys(i.value.locales);return L.length?!L.some(m=>m===r.value.link):r.value.link!=="/"}),b=p(()=>v.value?e.path.startsWith(r.value.link):!1),k=p(()=>o.value?r.value.activeMatch?new RegExp(r.value.activeMatch).test(e.path):b.value:!1);return(L,m)=>{const S=R("RouterLink"),N=R("ExternalLinkIcon");return n(o)?(a(),C(S,pe({key:0,class:{"router-link-active":n(k)},to:n(r).link,"aria-label":n(d)},L.$attrs),{default:B(()=>[y(L.$slots,"before"),U(" "+T(n(r).text)+" ",1),y(L.$slots,"after")]),_:3},16,["class","to","aria-label"])):(a(),c("a",pe({key:1,class:"external-link",href:n(r).link,rel:n(u),target:n(h),"aria-label":n(d)},L.$attrs),[y(L.$slots,"before"),U(" "+T(n(r).text)+" ",1),n(s)?(a(),C(N,{key:0})):w("",!0),y(L.$slots,"after")],16,nt))}}})),st={class:"hero"},rt={key:0,id:"main-title"},ot={key:1,class:"description"},lt={key:2,class:"actions"},ut=x({setup(l){const t=I(),e=Q(),i=Z(),r=p(()=>i.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),_=p(()=>t.value.heroText===null?null:t.value.heroText||e.value.title||"Hello"),f=p(()=>t.value.heroAlt||_.value||"hero"),h=p(()=>t.value.tagline===null?null:t.value.tagline||e.value.description||"Welcome to your VuePress site"),s=p(()=>_e(t.value.actions)?t.value.actions.map(({text:u,link:d,type:v="primary"})=>({text:u,link:d,type:v})):[]),o=()=>{if(!r.value)return null;const u=V("img",{src:fe(r.value),alt:f.value});return t.value.heroImageDark===void 0?u:V(me,()=>u)};return(u,d)=>(a(),c("header",st,[$(o),n(_)?(a(),c("h1",rt,T(n(_)),1)):w("",!0),n(h)?(a(),c("p",ot,T(n(h)),1)):w("",!0),n(s).length?(a(),c("p",lt,[(a(!0),c(D,null,A(n(s),v=>(a(),C(E,{key:v.text,class:P(["action-button",[v.type]]),item:v},null,8,["class","item"]))),128))])):w("",!0)]))}}),it={class:"home"},ct=x({setup(l){return(t,e)=>(a(),c("main",it,[$(ut),$(Qe),$(Ye),$(tt)]))}}),dt=x({setup(l){const t=be(),e=Q(),i=M(),r=Z(),_=p(()=>i.value.home||t.value),f=p(()=>e.value.title),h=p(()=>r.value&&i.value.logoDark!==void 0?i.value.logoDark:i.value.logo),s=()=>{if(!h.value)return null;const o=V("img",{class:"logo",src:fe(h.value),alt:f.value});return i.value.logoDark===void 0?o:V(me,()=>o)};return(o,u)=>{const d=R("RouterLink");return a(),C(d,{to:n(_)},{default:B(()=>[$(s),n(f)?(a(),c("span",{key:0,class:P(["site-name",{"can-hide":n(h)}])},T(n(f)),3)):w("",!0)]),_:1},8,["to"])}}}),ye=x({setup(l){const t=i=>{i.style.height=i.scrollHeight+"px"},e=i=>{i.style.height=""};return(i,r)=>(a(),C(ge,{name:"dropdown",onEnter:t,onAfterEnter:e,onBeforeLeave:t},{default:B(()=>[y(i.$slots,"default")]),_:3}))}}),vt=["aria-label"],pt={class:"title"},ht=g("span",{class:"arrow down"},null,-1),_t=["aria-label"],ft={class:"title"},mt={class:"navbar-dropdown"},bt={class:"navbar-dropdown-subtitle"},gt={key:1},kt={class:"navbar-dropdown-subitem-wrapper"},$t=x({props:{item:{type:Object,required:!0}},setup(l){const t=l,{item:e}=J(t),i=p(()=>e.value.ariaLabel||e.value.text),r=O(!1),_=G();He(()=>_.path,()=>{r.value=!1});const f=s=>{s.detail===0?r.value=!r.value:r.value=!1},h=(s,o)=>o[o.length-1]===s;return(s,o)=>(a(),c("div",{class:P(["navbar-dropdown-wrapper",{open:r.value}])},[g("button",{class:"navbar-dropdown-title",type:"button","aria-label":n(i),onClick:f},[g("span",pt,T(n(e).text),1),ht],8,vt),g("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":n(i),onClick:o[0]||(o[0]=u=>r.value=!r.value)},[g("span",ft,T(n(e).text),1),g("span",{class:P(["arrow",r.value?"down":"right"])},null,2)],8,_t),$(ye,null,{default:B(()=>[j(g("ul",mt,[(a(!0),c(D,null,A(n(e).children,u=>(a(),c("li",{key:u.text,class:"navbar-dropdown-item"},[u.children?(a(),c(D,{key:0},[g("h4",bt,[u.link?(a(),C(E,{key:0,item:u,onFocusout:d=>h(u,n(e).children)&&u.children.length===0&&(r.value=!1)},null,8,["item","onFocusout"])):(a(),c("span",gt,T(u.text),1))]),g("ul",kt,[(a(!0),c(D,null,A(u.children,d=>(a(),c("li",{key:d.link,class:"navbar-dropdown-subitem"},[$(E,{item:d,onFocusout:v=>h(d,u.children)&&h(u,n(e).children)&&(r.value=!1)},null,8,["item","onFocusout"])]))),128))])],64)):(a(),C(E,{key:1,item:u,onFocusout:d=>h(u,n(e).children)&&(r.value=!1)},null,8,["item","onFocusout"]))]))),128))],512),[[K,r.value]])]),_:1})],2))}}),he=l=>decodeURI(l).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Lt=(l,t)=>{if(t.hash===l)return!0;const e=he(t.path),i=he(l);return e===i},we=(l,t)=>l.link&&Lt(l.link,t)?!0:l.children?l.children.some(e=>we(e,t)):!1,xe=l=>!q(l)||/github\.com/.test(l)?"GitHub":/bitbucket\.org/.test(l)?"Bitbucket":/gitlab\.com/.test(l)?"GitLab":/gitee\.com/.test(l)?"Gitee":null,yt={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},wt=({docsRepo:l,editLinkPattern:t})=>{if(t)return t;const e=xe(l);return e!==null?yt[e]:null},xt=({docsRepo:l,docsBranch:t,docsDir:e,filePathRelative:i,editLinkPattern:r})=>{if(!i)return null;const _=wt({docsRepo:l,editLinkPattern:r});return _?_.replace(/:repo/,q(l)?l:`https://github.com/${l}`).replace(/:branch/,t).replace(/:path/,Oe(`${ze(e)}/${i}`)):null},Ct={key:0,class:"navbar-items"},Ce=x({setup(l){const t=()=>{const o=ee(),u=be(),d=Q(),v=M();return p(()=>{var S,N;const b=Object.keys(d.value.locales);if(b.length<2)return[];const k=o.currentRoute.value.path,L=o.currentRoute.value.fullPath;return[{text:(S=v.value.selectLanguageText)!=null?S:"unknown language",ariaLabel:(N=v.value.selectLanguageAriaLabel)!=null?N:"unkown language",children:b.map(H=>{var se,re,oe,le,ue,ie;const z=(re=(se=d.value.locales)==null?void 0:se[H])!=null?re:{},ne=(le=(oe=v.value.locales)==null?void 0:oe[H])!=null?le:{},ae=`${z.lang}`,Te=(ue=ne.selectLanguageName)!=null?ue:ae;let F;if(ae===d.value.lang)F=L;else{const ce=k.replace(u.value,H);o.getRoutes().some(Se=>Se.path===ce)?F=ce:F=(ie=ne.home)!=null?ie:H}return{text:Te,link:F}})}]})},e=()=>{const o=M(),u=p(()=>o.value.repo),d=p(()=>u.value?xe(u.value):null),v=p(()=>u.value&&!q(u.value)?`https://github.com/${u.value}`:u.value),b=p(()=>v.value?o.value.repoLabel?o.value.repoLabel:d.value===null?"Source":d.value:null);return p(()=>!v.value||!b.value?[]:[{text:b.value,link:v.value}])},i=o=>ke(o)?$e(o):o.children?Y(X({},o),{children:o.children.map(i)}):o,_=(()=>{const o=M();return p(()=>(o.value.navbar||[]).map(i))})(),f=t(),h=e(),s=p(()=>[..._.value,...f.value,...h.value]);return(o,u)=>n(s).length?(a(),c("nav",Ct,[(a(!0),c(D,null,A(n(s),d=>(a(),c("div",{key:d.text,class:"navbar-item"},[d.children?(a(),C($t,{key:0,item:d},null,8,["item"])):(a(),C(E,{key:1,item:d},null,8,["item"]))]))),128))])):w("",!0)}}),Tt=["title"],St={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Bt=Fe('',9),Mt=[Bt],Dt={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Nt=g("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),Et=[Nt],It=x({setup(l){const t=M(),e=Z(),i=()=>{e.value=!e.value};return(r,_)=>(a(),c("button",{class:"toggle-dark-button",title:n(t).toggleDarkMode,onClick:i},[j((a(),c("svg",St,Mt,512)),[[K,!n(e)]]),j((a(),c("svg",Dt,Et,512)),[[K,n(e)]])],8,Tt))}}),Pt=["title"],Rt=g("div",{class:"icon","aria-hidden":"true"},[g("span"),g("span"),g("span")],-1),At=[Rt],Ht=x({emits:["toggle"],setup(l){const t=M();return(e,i)=>(a(),c("div",{class:"toggle-sidebar-button",title:n(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:i[0]||(i[0]=r=>e.$emit("toggle"))},At,8,Pt))}}),Ot=x({emits:["toggle-sidebar"],setup(l){const t=M(),e=O(null),i=O(null),r=O(0),_=p(()=>r.value?{maxWidth:r.value+"px"}:{}),f=p(()=>t.value.darkMode);Le(()=>{const o=h(e.value,"paddingLeft")+h(e.value,"paddingRight"),u=()=>{var d;window.innerWidth<=719?r.value=0:r.value=e.value.offsetWidth-o-(((d=i.value)==null?void 0:d.offsetWidth)||0)};u(),window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1)});function h(s,o){var v,b,k;const u=(k=(b=(v=s==null?void 0:s.ownerDocument)==null?void 0:v.defaultView)==null?void 0:b.getComputedStyle(s,null))==null?void 0:k[o],d=Number.parseInt(u,10);return Number.isNaN(d)?0:d}return(s,o)=>{const u=R("NavbarSearch");return a(),c("header",{ref_key:"navbar",ref:e,class:"navbar"},[$(Ht,{onToggle:o[0]||(o[0]=d=>s.$emit("toggle-sidebar"))}),g("span",{ref_key:"navbarBrand",ref:i},[$(dt)],512),g("div",{class:"navbar-items-wrapper",style:We(n(_))},[y(s.$slots,"before"),$(Ce,{class:"can-hide"}),y(s.$slots,"after"),n(f)?(a(),C(It,{key:0})):w("",!0),$(u)],4)],512)}}}),zt={class:"page-meta"},Ft={key:0,class:"meta-item edit-link"},Wt={key:1,class:"meta-item last-updated"},Ut={class:"meta-item-label"},Vt={class:"meta-item-info"},jt={key:2,class:"meta-item contributors"},Kt={class:"meta-item-label"},Gt={class:"meta-item-info"},qt=["title"],Xt=U(", "),Yt=x({setup(l){const t=()=>{const s=M(),o=W(),u=I();return p(()=>{var N,H,z;if(!((H=(N=u.value.editLink)!=null?N:s.value.editLink)!=null?H:!0))return null;const{repo:v,docsRepo:b=v,docsBranch:k="main",docsDir:L="",editLinkText:m}=s.value;if(!b)return null;const S=xt({docsRepo:b,docsBranch:k,docsDir:L,filePathRelative:o.value.filePathRelative,editLinkPattern:(z=u.value.editLinkPattern)!=null?z:s.value.editLinkPattern});return S?{text:m!=null?m:"Edit this page",link:S}:null})},e=()=>{const s=M(),o=W(),u=I();return p(()=>{var b,k,L,m;return!((k=(b=u.value.lastUpdated)!=null?b:s.value.lastUpdated)!=null?k:!0)||!((L=o.value.git)!=null&&L.updatedTime)?null:new Date((m=o.value.git)==null?void 0:m.updatedTime).toLocaleString()})},i=()=>{const s=M(),o=W(),u=I();return p(()=>{var v,b,k,L;return((b=(v=u.value.contributors)!=null?v:s.value.contributors)!=null?b:!0)&&(L=(k=o.value.git)==null?void 0:k.contributors)!=null?L:null})},r=M(),_=t(),f=e(),h=i();return(s,o)=>{const u=R("ClientOnly");return a(),c("footer",zt,[n(_)?(a(),c("div",Ft,[$(E,{class:"meta-item-label",item:n(_)},null,8,["item"])])):w("",!0),n(f)?(a(),c("div",Wt,[g("span",Ut,T(n(r).lastUpdatedText)+": ",1),$(u,null,{default:B(()=>[g("span",Vt,T(n(f)),1)]),_:1})])):w("",!0),n(h)&&n(h).length?(a(),c("div",jt,[g("span",Kt,T(n(r).contributorsText)+": ",1),g("span",Gt,[(a(!0),c(D,null,A(n(h),(d,v)=>(a(),c(D,{key:v},[g("span",{class:"contributor",title:`email: ${d.email}`},T(d.name),9,qt),v!==n(h).length-1?(a(),c(D,{key:0},[Xt],64)):w("",!0)],64))),128))])])):w("",!0)])}}}),Jt={key:0,class:"page-nav"},Qt={class:"inner"},Zt={key:0,class:"prev"},en={key:1,class:"next"},tn=x({setup(l){const t=s=>s===!1?null:ke(s)?$e(s):Ue(s)?s:!1,e=(s,o,u)=>{const d=s.findIndex(v=>v.link===o);if(d!==-1){const v=s[d+u];return v!=null&&v.link?v:null}for(const v of s)if(v.children){const b=e(v.children,o,u);if(b)return b}return null},i=I(),r=te(),_=G(),f=p(()=>{const s=t(i.value.prev);return s!==!1?s:e(r.value,_.path,-1)}),h=p(()=>{const s=t(i.value.next);return s!==!1?s:e(r.value,_.path,1)});return(s,o)=>n(f)||n(h)?(a(),c("nav",Jt,[g("p",Qt,[n(f)?(a(),c("span",Zt,[$(E,{item:n(f)},null,8,["item"])])):w("",!0),n(h)?(a(),c("span",en,[$(E,{item:n(h)},null,8,["item"])])):w("",!0)])])):w("",!0)}}),nn={class:"page"},an={class:"theme-default-content"},sn=x({setup(l){return(t,e)=>{const i=R("Content");return a(),c("main",nn,[y(t.$slots,"top"),g("div",an,[$(i)]),$(Yt),$(tn),y(t.$slots,"bottom")])}}}),rn={class:"sidebar-item-children"},on=x({props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(l){const t=l,{item:e,depth:i}=J(t),r=G(),_=ee(),f=p(()=>we(e.value,r)),h=p(()=>({"sidebar-item":!0,"sidebar-heading":i.value===0,active:f.value,collapsible:e.value.collapsible})),s=O(!0),o=O(void 0);return e.value.collapsible&&(s.value=f.value,o.value=()=>{s.value=!s.value},_.afterEach(()=>{s.value=f.value})),(u,d)=>{var b;const v=R("SidebarItem",!0);return a(),c("li",null,[n(e).link?(a(),C(E,{key:0,class:P(n(h)),item:n(e)},null,8,["class","item"])):(a(),c("p",{key:1,tabindex:"0",class:P(n(h)),onClick:d[0]||(d[0]=(...k)=>o.value&&o.value(...k)),onKeydown:d[1]||(d[1]=Ve((...k)=>o.value&&o.value(...k),["enter"]))},[U(T(n(e).text)+" ",1),n(e).collapsible?(a(),c("span",{key:0,class:P(["arrow",s.value?"down":"right"])},null,2)):w("",!0)],34)),(b=n(e).children)!=null&&b.length?(a(),C(ye,{key:2},{default:B(()=>[j(g("ul",rn,[(a(!0),c(D,null,A(n(e).children,k=>(a(),C(v,{key:`${n(i)}${k.text}${k.link}`,item:k,depth:n(i)+1},null,8,["item","depth"]))),128))],512),[[K,s.value]])]),_:1})):w("",!0)])}}}),ln={key:0,class:"sidebar-items"},un=x({setup(l){const t=te();return(e,i)=>n(t).length?(a(),c("ul",ln,[(a(!0),c(D,null,A(n(t),r=>(a(),C(on,{key:r.link||r.text,item:r},null,8,["item"]))),128))])):w("",!0)}}),cn={class:"sidebar"},dn=x({setup(l){return(t,e)=>(a(),c("aside",cn,[$(Ce),y(t.$slots,"top"),$(un),y(t.$slots,"bottom")]))}}),hn=x({setup(l){const t=W(),e=I(),i=M(),r=p(()=>e.value.navbar!==!1&&i.value.navbar!==!1),_=te(),f=O(!1),h=m=>{f.value=typeof m=="boolean"?m:!f.value},s={x:0,y:0},o=m=>{s.x=m.changedTouches[0].clientX,s.y=m.changedTouches[0].clientY},u=m=>{const S=m.changedTouches[0].clientX-s.x,N=m.changedTouches[0].clientY-s.y;Math.abs(S)>Math.abs(N)&&Math.abs(S)>40&&(S>0&&s.x<=80?h(!0):h(!1))},d=p(()=>[{"no-navbar":!r.value,"no-sidebar":!_.value.length,"sidebar-open":f.value},e.value.pageClass]);let v;Le(()=>{v=ee().afterEach(()=>{h(!1)})}),je(()=>{v()});const b=Ke(),k=b.resolve,L=b.pending;return(m,S)=>(a(),c("div",{class:P(["theme-container",n(d)]),onTouchstart:o,onTouchend:u},[y(m.$slots,"navbar",{},()=>[n(r)?(a(),C(Ot,{key:0,onToggleSidebar:h},{before:B(()=>[y(m.$slots,"navbar-before")]),after:B(()=>[y(m.$slots,"navbar-after")]),_:3})):w("",!0)]),g("div",{class:"sidebar-mask",onClick:S[0]||(S[0]=N=>h(!1))}),y(m.$slots,"sidebar",{},()=>[$(dn,null,{top:B(()=>[y(m.$slots,"sidebar-top")]),bottom:B(()=>[y(m.$slots,"sidebar-bottom")]),_:3})]),y(m.$slots,"page",{},()=>[n(e).home?(a(),C(ct,{key:0})):(a(),C(ge,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:n(k),onBeforeLeave:n(L)},{default:B(()=>[(a(),C(sn,{key:n(t).path},{top:B(()=>[y(m.$slots,"page-top")]),bottom:B(()=>[y(m.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}});export{hn as default}; +var Be=Object.defineProperty,Me=Object.defineProperties;var De=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Ne=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ve=(l,t,e)=>t in l?Be(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e,X=(l,t)=>{for(var e in t||(t={}))Ne.call(t,e)&&ve(l,e,t[e]);if(de)for(var e of de(t))Ee.call(t,e)&&ve(l,e,t[e]);return l},Y=(l,t)=>Me(l,De(t));import{_ as Ie,r as R,o as a,c,b as $,f as x,i as I,j as p,k as _e,h as n,F as D,l as A,m as w,a as g,t as T,n as G,p as J,q as C,w as B,s as pe,v as y,d as U,x as q,y as Pe,z as Re,A as Ae,B as Q,C as Z,D as V,E as fe,G as me,H as P,u as be,g as M,T as ge,I as O,J as He,K as j,L as K,M as Oe,N as ze,O as ee,P as ke,Q as $e,e as Fe,R as Le,S as We,U as W,V as te,W as Ue,X as Ve,Y as je,Z as Ke}from"./app.d411e3b3.js";const Ge={},qe={class:"theme-default-content custom"};function Xe(l,t){const e=R("Content");return a(),c("div",qe,[$(e)])}var Ye=Ie(Ge,[["render",Xe]]);const Je={key:0,class:"features"},Qe=x({setup(l){const t=I(),e=p(()=>_e(t.value.features)?t.value.features:[]);return(i,r)=>n(e).length?(a(),c("div",Je,[(a(!0),c(D,null,A(n(e),_=>(a(),c("div",{key:_.title,class:"feature"},[g("h2",null,T(_.title),1),g("p",null,T(_.details),1)]))),128))])):w("",!0)}}),Ze=["innerHTML"],et=["textContent"],tt=x({setup(l){const t=I(),e=p(()=>t.value.footer),i=p(()=>t.value.footerHtml);return(r,_)=>n(e)?(a(),c(D,{key:0},[n(i)?(a(),c("div",{key:0,class:"footer",innerHTML:n(e)},null,8,Ze)):(a(),c("div",{key:1,class:"footer",textContent:T(n(e))},null,8,et))],64)):w("",!0)}}),nt=["href","rel","target","aria-label"],at=x({inheritAttrs:!1}),E=x(Y(X({},at),{props:{item:{type:Object,required:!0}},setup(l){const t=l,e=G(),i=Ae(),{item:r}=J(t),_=p(()=>q(r.value.link)),f=p(()=>Pe(r.value.link)||Re(r.value.link)),h=p(()=>{if(!f.value){if(r.value.target)return r.value.target;if(_.value)return"_blank"}}),s=p(()=>h.value==="_blank"),o=p(()=>!_.value&&!f.value&&!s.value),u=p(()=>{if(!f.value){if(r.value.rel)return r.value.rel;if(s.value)return"noopener noreferrer"}}),d=p(()=>r.value.ariaLabel||r.value.text),v=p(()=>{const L=Object.keys(i.value.locales);return L.length?!L.some(m=>m===r.value.link):r.value.link!=="/"}),b=p(()=>v.value?e.path.startsWith(r.value.link):!1),k=p(()=>o.value?r.value.activeMatch?new RegExp(r.value.activeMatch).test(e.path):b.value:!1);return(L,m)=>{const S=R("RouterLink"),N=R("ExternalLinkIcon");return n(o)?(a(),C(S,pe({key:0,class:{"router-link-active":n(k)},to:n(r).link,"aria-label":n(d)},L.$attrs),{default:B(()=>[y(L.$slots,"before"),U(" "+T(n(r).text)+" ",1),y(L.$slots,"after")]),_:3},16,["class","to","aria-label"])):(a(),c("a",pe({key:1,class:"external-link",href:n(r).link,rel:n(u),target:n(h),"aria-label":n(d)},L.$attrs),[y(L.$slots,"before"),U(" "+T(n(r).text)+" ",1),n(s)?(a(),C(N,{key:0})):w("",!0),y(L.$slots,"after")],16,nt))}}})),st={class:"hero"},rt={key:0,id:"main-title"},ot={key:1,class:"description"},lt={key:2,class:"actions"},ut=x({setup(l){const t=I(),e=Q(),i=Z(),r=p(()=>i.value&&t.value.heroImageDark!==void 0?t.value.heroImageDark:t.value.heroImage),_=p(()=>t.value.heroText===null?null:t.value.heroText||e.value.title||"Hello"),f=p(()=>t.value.heroAlt||_.value||"hero"),h=p(()=>t.value.tagline===null?null:t.value.tagline||e.value.description||"Welcome to your VuePress site"),s=p(()=>_e(t.value.actions)?t.value.actions.map(({text:u,link:d,type:v="primary"})=>({text:u,link:d,type:v})):[]),o=()=>{if(!r.value)return null;const u=V("img",{src:fe(r.value),alt:f.value});return t.value.heroImageDark===void 0?u:V(me,()=>u)};return(u,d)=>(a(),c("header",st,[$(o),n(_)?(a(),c("h1",rt,T(n(_)),1)):w("",!0),n(h)?(a(),c("p",ot,T(n(h)),1)):w("",!0),n(s).length?(a(),c("p",lt,[(a(!0),c(D,null,A(n(s),v=>(a(),C(E,{key:v.text,class:P(["action-button",[v.type]]),item:v},null,8,["class","item"]))),128))])):w("",!0)]))}}),it={class:"home"},ct=x({setup(l){return(t,e)=>(a(),c("main",it,[$(ut),$(Qe),$(Ye),$(tt)]))}}),dt=x({setup(l){const t=be(),e=Q(),i=M(),r=Z(),_=p(()=>i.value.home||t.value),f=p(()=>e.value.title),h=p(()=>r.value&&i.value.logoDark!==void 0?i.value.logoDark:i.value.logo),s=()=>{if(!h.value)return null;const o=V("img",{class:"logo",src:fe(h.value),alt:f.value});return i.value.logoDark===void 0?o:V(me,()=>o)};return(o,u)=>{const d=R("RouterLink");return a(),C(d,{to:n(_)},{default:B(()=>[$(s),n(f)?(a(),c("span",{key:0,class:P(["site-name",{"can-hide":n(h)}])},T(n(f)),3)):w("",!0)]),_:1},8,["to"])}}}),ye=x({setup(l){const t=i=>{i.style.height=i.scrollHeight+"px"},e=i=>{i.style.height=""};return(i,r)=>(a(),C(ge,{name:"dropdown",onEnter:t,onAfterEnter:e,onBeforeLeave:t},{default:B(()=>[y(i.$slots,"default")]),_:3}))}}),vt=["aria-label"],pt={class:"title"},ht=g("span",{class:"arrow down"},null,-1),_t=["aria-label"],ft={class:"title"},mt={class:"navbar-dropdown"},bt={class:"navbar-dropdown-subtitle"},gt={key:1},kt={class:"navbar-dropdown-subitem-wrapper"},$t=x({props:{item:{type:Object,required:!0}},setup(l){const t=l,{item:e}=J(t),i=p(()=>e.value.ariaLabel||e.value.text),r=O(!1),_=G();He(()=>_.path,()=>{r.value=!1});const f=s=>{s.detail===0?r.value=!r.value:r.value=!1},h=(s,o)=>o[o.length-1]===s;return(s,o)=>(a(),c("div",{class:P(["navbar-dropdown-wrapper",{open:r.value}])},[g("button",{class:"navbar-dropdown-title",type:"button","aria-label":n(i),onClick:f},[g("span",pt,T(n(e).text),1),ht],8,vt),g("button",{class:"navbar-dropdown-title-mobile",type:"button","aria-label":n(i),onClick:o[0]||(o[0]=u=>r.value=!r.value)},[g("span",ft,T(n(e).text),1),g("span",{class:P(["arrow",r.value?"down":"right"])},null,2)],8,_t),$(ye,null,{default:B(()=>[j(g("ul",mt,[(a(!0),c(D,null,A(n(e).children,u=>(a(),c("li",{key:u.text,class:"navbar-dropdown-item"},[u.children?(a(),c(D,{key:0},[g("h4",bt,[u.link?(a(),C(E,{key:0,item:u,onFocusout:d=>h(u,n(e).children)&&u.children.length===0&&(r.value=!1)},null,8,["item","onFocusout"])):(a(),c("span",gt,T(u.text),1))]),g("ul",kt,[(a(!0),c(D,null,A(u.children,d=>(a(),c("li",{key:d.link,class:"navbar-dropdown-subitem"},[$(E,{item:d,onFocusout:v=>h(d,u.children)&&h(u,n(e).children)&&(r.value=!1)},null,8,["item","onFocusout"])]))),128))])],64)):(a(),C(E,{key:1,item:u,onFocusout:d=>h(u,n(e).children)&&(r.value=!1)},null,8,["item","onFocusout"]))]))),128))],512),[[K,r.value]])]),_:1})],2))}}),he=l=>decodeURI(l).replace(/#.*$/,"").replace(/(index)?\.(md|html)$/,""),Lt=(l,t)=>{if(t.hash===l)return!0;const e=he(t.path),i=he(l);return e===i},we=(l,t)=>l.link&&Lt(l.link,t)?!0:l.children?l.children.some(e=>we(e,t)):!1,xe=l=>!q(l)||/github\.com/.test(l)?"GitHub":/bitbucket\.org/.test(l)?"Bitbucket":/gitlab\.com/.test(l)?"GitLab":/gitee\.com/.test(l)?"Gitee":null,yt={GitHub:":repo/edit/:branch/:path",GitLab:":repo/-/edit/:branch/:path",Gitee:":repo/edit/:branch/:path",Bitbucket:":repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default"},wt=({docsRepo:l,editLinkPattern:t})=>{if(t)return t;const e=xe(l);return e!==null?yt[e]:null},xt=({docsRepo:l,docsBranch:t,docsDir:e,filePathRelative:i,editLinkPattern:r})=>{if(!i)return null;const _=wt({docsRepo:l,editLinkPattern:r});return _?_.replace(/:repo/,q(l)?l:`https://github.com/${l}`).replace(/:branch/,t).replace(/:path/,Oe(`${ze(e)}/${i}`)):null},Ct={key:0,class:"navbar-items"},Ce=x({setup(l){const t=()=>{const o=ee(),u=be(),d=Q(),v=M();return p(()=>{var S,N;const b=Object.keys(d.value.locales);if(b.length<2)return[];const k=o.currentRoute.value.path,L=o.currentRoute.value.fullPath;return[{text:(S=v.value.selectLanguageText)!=null?S:"unknown language",ariaLabel:(N=v.value.selectLanguageAriaLabel)!=null?N:"unkown language",children:b.map(H=>{var se,re,oe,le,ue,ie;const z=(re=(se=d.value.locales)==null?void 0:se[H])!=null?re:{},ne=(le=(oe=v.value.locales)==null?void 0:oe[H])!=null?le:{},ae=`${z.lang}`,Te=(ue=ne.selectLanguageName)!=null?ue:ae;let F;if(ae===d.value.lang)F=L;else{const ce=k.replace(u.value,H);o.getRoutes().some(Se=>Se.path===ce)?F=ce:F=(ie=ne.home)!=null?ie:H}return{text:Te,link:F}})}]})},e=()=>{const o=M(),u=p(()=>o.value.repo),d=p(()=>u.value?xe(u.value):null),v=p(()=>u.value&&!q(u.value)?`https://github.com/${u.value}`:u.value),b=p(()=>v.value?o.value.repoLabel?o.value.repoLabel:d.value===null?"Source":d.value:null);return p(()=>!v.value||!b.value?[]:[{text:b.value,link:v.value}])},i=o=>ke(o)?$e(o):o.children?Y(X({},o),{children:o.children.map(i)}):o,_=(()=>{const o=M();return p(()=>(o.value.navbar||[]).map(i))})(),f=t(),h=e(),s=p(()=>[..._.value,...f.value,...h.value]);return(o,u)=>n(s).length?(a(),c("nav",Ct,[(a(!0),c(D,null,A(n(s),d=>(a(),c("div",{key:d.text,class:"navbar-item"},[d.children?(a(),C($t,{key:0,item:d},null,8,["item"])):(a(),C(E,{key:1,item:d},null,8,["item"]))]))),128))])):w("",!0)}}),Tt=["title"],St={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Bt=Fe('',9),Mt=[Bt],Dt={class:"icon",focusable:"false",viewBox:"0 0 32 32"},Nt=g("path",{d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3z",fill:"currentColor"},null,-1),Et=[Nt],It=x({setup(l){const t=M(),e=Z(),i=()=>{e.value=!e.value};return(r,_)=>(a(),c("button",{class:"toggle-dark-button",title:n(t).toggleDarkMode,onClick:i},[j((a(),c("svg",St,Mt,512)),[[K,!n(e)]]),j((a(),c("svg",Dt,Et,512)),[[K,n(e)]])],8,Tt))}}),Pt=["title"],Rt=g("div",{class:"icon","aria-hidden":"true"},[g("span"),g("span"),g("span")],-1),At=[Rt],Ht=x({emits:["toggle"],setup(l){const t=M();return(e,i)=>(a(),c("div",{class:"toggle-sidebar-button",title:n(t).toggleSidebar,"aria-expanded":"false",role:"button",tabindex:"0",onClick:i[0]||(i[0]=r=>e.$emit("toggle"))},At,8,Pt))}}),Ot=x({emits:["toggle-sidebar"],setup(l){const t=M(),e=O(null),i=O(null),r=O(0),_=p(()=>r.value?{maxWidth:r.value+"px"}:{}),f=p(()=>t.value.darkMode);Le(()=>{const o=h(e.value,"paddingLeft")+h(e.value,"paddingRight"),u=()=>{var d;window.innerWidth<=719?r.value=0:r.value=e.value.offsetWidth-o-(((d=i.value)==null?void 0:d.offsetWidth)||0)};u(),window.addEventListener("resize",u,!1),window.addEventListener("orientationchange",u,!1)});function h(s,o){var v,b,k;const u=(k=(b=(v=s==null?void 0:s.ownerDocument)==null?void 0:v.defaultView)==null?void 0:b.getComputedStyle(s,null))==null?void 0:k[o],d=Number.parseInt(u,10);return Number.isNaN(d)?0:d}return(s,o)=>{const u=R("NavbarSearch");return a(),c("header",{ref_key:"navbar",ref:e,class:"navbar"},[$(Ht,{onToggle:o[0]||(o[0]=d=>s.$emit("toggle-sidebar"))}),g("span",{ref_key:"navbarBrand",ref:i},[$(dt)],512),g("div",{class:"navbar-items-wrapper",style:We(n(_))},[y(s.$slots,"before"),$(Ce,{class:"can-hide"}),y(s.$slots,"after"),n(f)?(a(),C(It,{key:0})):w("",!0),$(u)],4)],512)}}}),zt={class:"page-meta"},Ft={key:0,class:"meta-item edit-link"},Wt={key:1,class:"meta-item last-updated"},Ut={class:"meta-item-label"},Vt={class:"meta-item-info"},jt={key:2,class:"meta-item contributors"},Kt={class:"meta-item-label"},Gt={class:"meta-item-info"},qt=["title"],Xt=U(", "),Yt=x({setup(l){const t=()=>{const s=M(),o=W(),u=I();return p(()=>{var N,H,z;if(!((H=(N=u.value.editLink)!=null?N:s.value.editLink)!=null?H:!0))return null;const{repo:v,docsRepo:b=v,docsBranch:k="main",docsDir:L="",editLinkText:m}=s.value;if(!b)return null;const S=xt({docsRepo:b,docsBranch:k,docsDir:L,filePathRelative:o.value.filePathRelative,editLinkPattern:(z=u.value.editLinkPattern)!=null?z:s.value.editLinkPattern});return S?{text:m!=null?m:"Edit this page",link:S}:null})},e=()=>{const s=M(),o=W(),u=I();return p(()=>{var b,k,L,m;return!((k=(b=u.value.lastUpdated)!=null?b:s.value.lastUpdated)!=null?k:!0)||!((L=o.value.git)!=null&&L.updatedTime)?null:new Date((m=o.value.git)==null?void 0:m.updatedTime).toLocaleString()})},i=()=>{const s=M(),o=W(),u=I();return p(()=>{var v,b,k,L;return((b=(v=u.value.contributors)!=null?v:s.value.contributors)!=null?b:!0)&&(L=(k=o.value.git)==null?void 0:k.contributors)!=null?L:null})},r=M(),_=t(),f=e(),h=i();return(s,o)=>{const u=R("ClientOnly");return a(),c("footer",zt,[n(_)?(a(),c("div",Ft,[$(E,{class:"meta-item-label",item:n(_)},null,8,["item"])])):w("",!0),n(f)?(a(),c("div",Wt,[g("span",Ut,T(n(r).lastUpdatedText)+": ",1),$(u,null,{default:B(()=>[g("span",Vt,T(n(f)),1)]),_:1})])):w("",!0),n(h)&&n(h).length?(a(),c("div",jt,[g("span",Kt,T(n(r).contributorsText)+": ",1),g("span",Gt,[(a(!0),c(D,null,A(n(h),(d,v)=>(a(),c(D,{key:v},[g("span",{class:"contributor",title:`email: ${d.email}`},T(d.name),9,qt),v!==n(h).length-1?(a(),c(D,{key:0},[Xt],64)):w("",!0)],64))),128))])])):w("",!0)])}}}),Jt={key:0,class:"page-nav"},Qt={class:"inner"},Zt={key:0,class:"prev"},en={key:1,class:"next"},tn=x({setup(l){const t=s=>s===!1?null:ke(s)?$e(s):Ue(s)?s:!1,e=(s,o,u)=>{const d=s.findIndex(v=>v.link===o);if(d!==-1){const v=s[d+u];return v!=null&&v.link?v:null}for(const v of s)if(v.children){const b=e(v.children,o,u);if(b)return b}return null},i=I(),r=te(),_=G(),f=p(()=>{const s=t(i.value.prev);return s!==!1?s:e(r.value,_.path,-1)}),h=p(()=>{const s=t(i.value.next);return s!==!1?s:e(r.value,_.path,1)});return(s,o)=>n(f)||n(h)?(a(),c("nav",Jt,[g("p",Qt,[n(f)?(a(),c("span",Zt,[$(E,{item:n(f)},null,8,["item"])])):w("",!0),n(h)?(a(),c("span",en,[$(E,{item:n(h)},null,8,["item"])])):w("",!0)])])):w("",!0)}}),nn={class:"page"},an={class:"theme-default-content"},sn=x({setup(l){return(t,e)=>{const i=R("Content");return a(),c("main",nn,[y(t.$slots,"top"),g("div",an,[$(i)]),$(Yt),$(tn),y(t.$slots,"bottom")])}}}),rn={class:"sidebar-item-children"},on=x({props:{item:{type:Object,required:!0},depth:{type:Number,required:!1,default:0}},setup(l){const t=l,{item:e,depth:i}=J(t),r=G(),_=ee(),f=p(()=>we(e.value,r)),h=p(()=>({"sidebar-item":!0,"sidebar-heading":i.value===0,active:f.value,collapsible:e.value.collapsible})),s=O(!0),o=O(void 0);return e.value.collapsible&&(s.value=f.value,o.value=()=>{s.value=!s.value},_.afterEach(()=>{s.value=f.value})),(u,d)=>{var b;const v=R("SidebarItem",!0);return a(),c("li",null,[n(e).link?(a(),C(E,{key:0,class:P(n(h)),item:n(e)},null,8,["class","item"])):(a(),c("p",{key:1,tabindex:"0",class:P(n(h)),onClick:d[0]||(d[0]=(...k)=>o.value&&o.value(...k)),onKeydown:d[1]||(d[1]=Ve((...k)=>o.value&&o.value(...k),["enter"]))},[U(T(n(e).text)+" ",1),n(e).collapsible?(a(),c("span",{key:0,class:P(["arrow",s.value?"down":"right"])},null,2)):w("",!0)],34)),(b=n(e).children)!=null&&b.length?(a(),C(ye,{key:2},{default:B(()=>[j(g("ul",rn,[(a(!0),c(D,null,A(n(e).children,k=>(a(),C(v,{key:`${n(i)}${k.text}${k.link}`,item:k,depth:n(i)+1},null,8,["item","depth"]))),128))],512),[[K,s.value]])]),_:1})):w("",!0)])}}}),ln={key:0,class:"sidebar-items"},un=x({setup(l){const t=te();return(e,i)=>n(t).length?(a(),c("ul",ln,[(a(!0),c(D,null,A(n(t),r=>(a(),C(on,{key:r.link||r.text,item:r},null,8,["item"]))),128))])):w("",!0)}}),cn={class:"sidebar"},dn=x({setup(l){return(t,e)=>(a(),c("aside",cn,[$(Ce),y(t.$slots,"top"),$(un),y(t.$slots,"bottom")]))}}),hn=x({setup(l){const t=W(),e=I(),i=M(),r=p(()=>e.value.navbar!==!1&&i.value.navbar!==!1),_=te(),f=O(!1),h=m=>{f.value=typeof m=="boolean"?m:!f.value},s={x:0,y:0},o=m=>{s.x=m.changedTouches[0].clientX,s.y=m.changedTouches[0].clientY},u=m=>{const S=m.changedTouches[0].clientX-s.x,N=m.changedTouches[0].clientY-s.y;Math.abs(S)>Math.abs(N)&&Math.abs(S)>40&&(S>0&&s.x<=80?h(!0):h(!1))},d=p(()=>[{"no-navbar":!r.value,"no-sidebar":!_.value.length,"sidebar-open":f.value},e.value.pageClass]);let v;Le(()=>{v=ee().afterEach(()=>{h(!1)})}),je(()=>{v()});const b=Ke(),k=b.resolve,L=b.pending;return(m,S)=>(a(),c("div",{class:P(["theme-container",n(d)]),onTouchstart:o,onTouchend:u},[y(m.$slots,"navbar",{},()=>[n(r)?(a(),C(Ot,{key:0,onToggleSidebar:h},{before:B(()=>[y(m.$slots,"navbar-before")]),after:B(()=>[y(m.$slots,"navbar-after")]),_:3})):w("",!0)]),g("div",{class:"sidebar-mask",onClick:S[0]||(S[0]=N=>h(!1))}),y(m.$slots,"sidebar",{},()=>[$(dn,null,{top:B(()=>[y(m.$slots,"sidebar-top")]),bottom:B(()=>[y(m.$slots,"sidebar-bottom")]),_:3})]),y(m.$slots,"page",{},()=>[n(e).home?(a(),C(ct,{key:0})):(a(),C(ge,{key:1,name:"fade-slide-y",mode:"out-in",onBeforeEnter:n(k),onBeforeLeave:n(L)},{default:B(()=>[(a(),C(sn,{key:n(t).path},{top:B(()=>[y(m.$slots,"page-top")]),bottom:B(()=>[y(m.$slots,"page-bottom")]),_:3}))]),_:3},8,["onBeforeEnter","onBeforeLeave"]))])],34))}});export{hn as default}; diff --git a/docs/.vuepress/dist/assets/account-maps.html.a75e89c2.js b/docs/.vuepress/dist/assets/account-maps.html.06b8612d.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.a75e89c2.js rename to docs/.vuepress/dist/assets/account-maps.html.06b8612d.js index 18aa03fbd..d02d0735b 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.a75e89c2.js +++ b/docs/.vuepress/dist/assets/account-maps.html.06b8612d.js @@ -1,4 +1,4 @@ -import{_ as u,r as e,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"\u8CEC\u6236\u6620\u5C04",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CEC\u6236\u6620\u5C04","aria-hidden":"true"},"#"),s(" \u8CEC\u6236\u6620\u5C04")],-1),d=n("p",null,"\u5728\u7DE8\u7A0B\u4E2D\uFF0C\u6211\u5011\u7D93\u5E38\u4F7F\u7528\u6620\u5C04\uFF08Map\uFF09\u9019\u7A2E\u6578\u64DA\u7D50\u69CB\uFF0C\u5C07\u4E00\u500B\u9375\u8207\u67D0\u7A2E\u503C\u95DC\u806F\u8D77\u4F86\u3002\u9375\u548C\u503C\u53EF\u4EE5\u662F\u4EFB\u610F\u985E\u578B\u7684\u6578\u64DA\uFF0C\u9375\u7528\u4F5C\u6A19\u8B58\u8981\u4FDD\u5B58\u7684\u7279\u5B9A\u503C\u7684\u6A19\u8B58\u7B26\u3002\u901A\u904E\u9375\uFF0C\u6211\u5011\u53EF\u4EE5\u9AD8\u6548\u5730\u63D2\u5165\u3001\u6AA2\u7D22\u548C\u66F4\u65B0\u9019\u4E9B\u503C\u3002",-1),_=s("\u6B63\u5982\u6211\u5011\u6240\u77AD\u89E3\u7684\uFF0CSolana\u7684\u8CEC\u6236\u6A21\u578B\u8981\u6C42\u7A0B\u5E8F\u6578\u64DA\u548C\u76F8\u95DC\u72C0\u614B\u6578\u64DA\u5B58\u5132\u5728\u4E0D\u540C\u7684\u8CEC\u6236\u4E2D\u3002\u9019\u4E9B\u8CEC\u6236\u90FD\u6709\u8207\u4E4B\u95DC\u806F\u7684\u5730\u5740\uFF0C\u9019\u672C\u8EAB\u5C31\u6709\u6620\u5C04\u7684\u4F5C\u7528\uFF01\u5728"),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u9019\u88CF"),g=s("\u77AD\u89E3\u66F4\u591A\u95DC\u65BCSolana\u8CEC\u6236\u6A21\u578B\u7684\u4FE1\u606F\u3002"),w=n("p",null,"\u56E0\u6B64\uFF0C\u5C07\u503C\u5B58\u5132\u5728\u55AE\u7368\u7684\u8CEC\u6236\u4E2D\uFF0C\u4EE5\u5176\u5730\u5740\u4F5C\u7232\u6AA2\u7D22\u503C\u6240\u9700\u7684\u9375\u662F\u6709\u610F\u7FA9\u7684\u3002\u4F46\u9019\u4E5F\u5E36\u4F86\u4E86\u4E00\u4E9B\u554F\u984C\uFF0C\u6BD4\u5982\uFF1A",-1),A=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u5F88\u53EF\u80FD\u4E0D\u662F\u7406\u60F3\u7684\u9375\uFF0C\u4F60\u53EF\u80FD\u96E3\u4EE5\u8A18\u4F4F\u4E26\u6AA2\u7D22\u6240\u9700\u7684\u503C\u3002",-1),h=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u662F\u4E0D\u540CKeypair\u7684\u516C\u9470\uFF0C\u6BCF\u500B\u516C\u9470\uFF08\u6216\u5730\u5740\uFF09\u90FD\u6709\u8207\u4E4B\u95DC\u806F\u7684\u79C1\u9470\u3002\u5982\u679C\u9700\u8981\uFF0C\u9019\u500B\u79C1\u9470\u5C07\u7528\u65BC\u5C0D\u4E0D\u540C\u7684\u6307\u4EE4\u9032\u884C\u7C3D\u540D\uFF0C\u9019\u610F\u5473\u7740\u6211\u5011\u9700\u8981\u5728\u67D0\u500B\u5730\u65B9\u5B58\u5132\u79C1\u9470\uFF0C\u9019\u7D55\u5C0D\u4E0D\u662F\u63A8\u85A6\u7684\u505A\u6CD5\uFF01",-1),P=n("p",null,[s("\u9019\u7D66\u8A31\u591ASolana\u958B\u767C\u8005\u5E36\u4F86\u4E86\u4E00\u500B\u554F\u984C\uFF0C\u5373\u5982\u4F55\u5728\u4ED6\u5011\u7684\u7A0B\u5E8F\u4E2D\u5BE6\u73FE\u985E\u4F3C"),n("code",null,"Map"),s("\u7684\u908F\u8F2F\u3002\u8B93\u6211\u5011\u770B\u770B\u5E7E\u7A2E\u89E3\u6C7A\u9019\u500B\u554F\u984C\u7684\u65B9\u6CD5\u3002")],-1),B=n("h2",{id:"\u6D3E\u751Fpda",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6D3E\u751Fpda","aria-hidden":"true"},"#"),s(" \u6D3E\u751FPDA")],-1),I=s("PDA\u7684\u5168\u7A31\u662F\u201C\u7A0B\u5E8F\u6D3E\u751F\u5730\u5740\u201D - "),S={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},x=s("Program Derived Address"),E=s("\uFF0C\u7C21\u800C\u8A00\u4E4B\uFF0C\u5B83\u5011\u662F\u5F9E\u4E00\u7D44\u7A2E\u5B50\u548C\u7A0B\u5E8FID\uFF08\u6216\u5730\u5740\uFF09\u6D3E\u751F\u51FA\u4F86\u7684\u5730\u5740\u3002"),v=l("

PDAs\u7684\u7368\u7279\u4E4B\u8655\u5728\u65BC\uFF0C\u9019\u4E9B\u5730\u5740\u4E0D\u8207\u4EFB\u4F55\u79C1\u9470\u76F8\u95DC\u806F\u3002\u9019\u662F\u56E0\u7232\u9019\u4E9B\u5730\u5740\u4E0D\u4F4D\u65BCED25519\u66F2\u7DDA\u4E0A\u3002\u56E0\u6B64\uFF0C\u53EA\u6709\u6D3E\u751F\u6B64\u5730\u5740\u7684\u7A0B\u5E8F\u53EF\u4EE5\u4F7F\u7528\u63D0\u4F9B\u7684\u5BC6\u9470\u548C\u7A2E\u5B50\u5C0D\u6307\u4EE4\u9032\u884C\u7C3D\u540D\u3002\u5728\u9019\u88CF\u77AD\u89E3\u66F4\u591A\u4FE1\u606F\u3002

\u73FE\u5728\u6211\u5011\u5C0DPDAs\u6709\u4E86\u4E00\u500B\u6982\u5FF5\uFF0C\u8B93\u6211\u5011\u4F7F\u7528\u5B83\u5011\u4F86\u6620\u5C04\u4E00\u4E9B\u8CEC\u6236\uFF01\u6211\u5011\u4EE5\u4E00\u500B\u535A\u5BA2\u7A0B\u5E8F\u4F5C\u7232\u793A\u4F8B\uFF0C\u6F14\u793A\u5982\u4F55\u5BE6\u73FE\u9019\u4E00\u9EDE\u3002

\u5728\u9019\u500B\u535A\u5BA2\u7A0B\u5E8F\u4E2D\uFF0C\u6211\u5011\u5E0C\u671B\u6BCF\u500BUser\u90FD\u64C1\u6709\u4E00\u500BBlog\u3002\u9019\u500B\u535A\u5BA2\u53EF\u4EE5\u6709\u4EFB\u610F\u6578\u91CF\u7684Posts\u3002\u9019\u610F\u5473\u7740\u6211\u5011\u5C07\u6BCF\u500B\u7528\u6236\u6620\u5C04\u5230\u4E00\u500B\u535A\u5BA2\uFF0C\u6BCF\u500B\u5E16\u5B50\u6620\u5C04\u5230\u67D0\u500B\u535A\u5BA2\u3002

\u7C21\u800C\u8A00\u4E4B\uFF0C\u7528\u6236\u548C\u4ED6/\u5979\u7684\u535A\u5BA2\u4E4B\u9593\u662F1:1\u7684\u6620\u5C04\uFF0C\u800C\u535A\u5BA2\u548C\u5176\u5E16\u5B50\u4E4B\u9593\u662F1:N\u7684\u6620\u5C04\u3002

\u5C0D\u65BC1:1\u7684\u6620\u5C04\uFF0C\u6211\u5011\u5E0C\u671B\u4E00\u500B\u535A\u5BA2\u7684\u5730\u5740\u50C5\u5F9E\u5176\u7528\u6236\u6D3E\u751F\uFF0C\u9019\u6A23\u6211\u5011\u53EF\u4EE5\u901A\u904E\u5176\u6B0A\u9650\uFF08\u6216\u7528\u6236\uFF09\u4F86\u6AA2\u7D22\u535A\u5BA2\u3002\u56E0\u6B64\uFF0C\u535A\u5BA2\u7684\u7A2E\u5B50\u5C07\u5305\u62EC\u5176\u6B0A\u9650\u7684\u5BC6\u9470\uFF0C\u53EF\u80FD\u9084\u6709\u4E00\u500B\u524D\u7DB4\u535A\u5BA2\uFF0C\u4F5C\u7232\u985E\u578B\u6A19\u8B58\u7B26\u3002

\u5C0D\u65BC1:N\u7684\u6620\u5C04\uFF0C\u6211\u5011\u5E0C\u671B\u6BCF\u500B\u5E16\u5B50\u7684\u5730\u5740\u4E0D\u50C5\u5F9E\u5B83\u6240\u95DC\u806F\u7684\u535A\u5BA2\u6D3E\u751F\uFF0C\u9084\u5F9E\u53E6\u4E00\u500B\u6A19\u8B58\u7B26\u6D3E\u751F\uFF0C\u4EE5\u5340\u5206\u535A\u5BA2\u4E2D\u7684\u591A\u500B\u5E16\u5B50\u3002\u5728\u4E0B\u9762\u7684\u793A\u4F8B\u4E2D\uFF0C\u6BCF\u500B\u5E16\u5B50\u7684\u5730\u5740\u662F\u5F9E\u535A\u5BA2\u7684\u5BC6\u9470\u3001\u4E00\u500B\u7528\u65BC\u6A19\u8B58\u6BCF\u500B\u5E16\u5B50\u7684slug\u548C\u4E00\u500B\u524D\u7DB4\u5E16\u5B50\u6D3E\u751F\u51FA\u4F86\u7684\uFF0C\u4F5C\u7232\u985E\u578B\u6A19\u8B58\u7B26\u3002

\u4EE3\u78BC\u5982\u4E0B\u6240\u793A\uFF1A

",7),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as e,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"\u8CEC\u6236\u6620\u5C04",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CEC\u6236\u6620\u5C04","aria-hidden":"true"},"#"),s(" \u8CEC\u6236\u6620\u5C04")],-1),d=n("p",null,"\u5728\u7DE8\u7A0B\u4E2D\uFF0C\u6211\u5011\u7D93\u5E38\u4F7F\u7528\u6620\u5C04\uFF08Map\uFF09\u9019\u7A2E\u6578\u64DA\u7D50\u69CB\uFF0C\u5C07\u4E00\u500B\u9375\u8207\u67D0\u7A2E\u503C\u95DC\u806F\u8D77\u4F86\u3002\u9375\u548C\u503C\u53EF\u4EE5\u662F\u4EFB\u610F\u985E\u578B\u7684\u6578\u64DA\uFF0C\u9375\u7528\u4F5C\u6A19\u8B58\u8981\u4FDD\u5B58\u7684\u7279\u5B9A\u503C\u7684\u6A19\u8B58\u7B26\u3002\u901A\u904E\u9375\uFF0C\u6211\u5011\u53EF\u4EE5\u9AD8\u6548\u5730\u63D2\u5165\u3001\u6AA2\u7D22\u548C\u66F4\u65B0\u9019\u4E9B\u503C\u3002",-1),_=s("\u6B63\u5982\u6211\u5011\u6240\u77AD\u89E3\u7684\uFF0CSolana\u7684\u8CEC\u6236\u6A21\u578B\u8981\u6C42\u7A0B\u5E8F\u6578\u64DA\u548C\u76F8\u95DC\u72C0\u614B\u6578\u64DA\u5B58\u5132\u5728\u4E0D\u540C\u7684\u8CEC\u6236\u4E2D\u3002\u9019\u4E9B\u8CEC\u6236\u90FD\u6709\u8207\u4E4B\u95DC\u806F\u7684\u5730\u5740\uFF0C\u9019\u672C\u8EAB\u5C31\u6709\u6620\u5C04\u7684\u4F5C\u7528\uFF01\u5728"),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u9019\u88CF"),g=s("\u77AD\u89E3\u66F4\u591A\u95DC\u65BCSolana\u8CEC\u6236\u6A21\u578B\u7684\u4FE1\u606F\u3002"),w=n("p",null,"\u56E0\u6B64\uFF0C\u5C07\u503C\u5B58\u5132\u5728\u55AE\u7368\u7684\u8CEC\u6236\u4E2D\uFF0C\u4EE5\u5176\u5730\u5740\u4F5C\u7232\u6AA2\u7D22\u503C\u6240\u9700\u7684\u9375\u662F\u6709\u610F\u7FA9\u7684\u3002\u4F46\u9019\u4E5F\u5E36\u4F86\u4E86\u4E00\u4E9B\u554F\u984C\uFF0C\u6BD4\u5982\uFF1A",-1),A=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u5F88\u53EF\u80FD\u4E0D\u662F\u7406\u60F3\u7684\u9375\uFF0C\u4F60\u53EF\u80FD\u96E3\u4EE5\u8A18\u4F4F\u4E26\u6AA2\u7D22\u6240\u9700\u7684\u503C\u3002",-1),h=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u662F\u4E0D\u540CKeypair\u7684\u516C\u9470\uFF0C\u6BCF\u500B\u516C\u9470\uFF08\u6216\u5730\u5740\uFF09\u90FD\u6709\u8207\u4E4B\u95DC\u806F\u7684\u79C1\u9470\u3002\u5982\u679C\u9700\u8981\uFF0C\u9019\u500B\u79C1\u9470\u5C07\u7528\u65BC\u5C0D\u4E0D\u540C\u7684\u6307\u4EE4\u9032\u884C\u7C3D\u540D\uFF0C\u9019\u610F\u5473\u7740\u6211\u5011\u9700\u8981\u5728\u67D0\u500B\u5730\u65B9\u5B58\u5132\u79C1\u9470\uFF0C\u9019\u7D55\u5C0D\u4E0D\u662F\u63A8\u85A6\u7684\u505A\u6CD5\uFF01",-1),P=n("p",null,[s("\u9019\u7D66\u8A31\u591ASolana\u958B\u767C\u8005\u5E36\u4F86\u4E86\u4E00\u500B\u554F\u984C\uFF0C\u5373\u5982\u4F55\u5728\u4ED6\u5011\u7684\u7A0B\u5E8F\u4E2D\u5BE6\u73FE\u985E\u4F3C"),n("code",null,"Map"),s("\u7684\u908F\u8F2F\u3002\u8B93\u6211\u5011\u770B\u770B\u5E7E\u7A2E\u89E3\u6C7A\u9019\u500B\u554F\u984C\u7684\u65B9\u6CD5\u3002")],-1),B=n("h2",{id:"\u6D3E\u751Fpda",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6D3E\u751Fpda","aria-hidden":"true"},"#"),s(" \u6D3E\u751FPDA")],-1),I=s("PDA\u7684\u5168\u7A31\u662F\u201C\u7A0B\u5E8F\u6D3E\u751F\u5730\u5740\u201D - "),S={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},x=s("Program Derived Address"),E=s("\uFF0C\u7C21\u800C\u8A00\u4E4B\uFF0C\u5B83\u5011\u662F\u5F9E\u4E00\u7D44\u7A2E\u5B50\u548C\u7A0B\u5E8FID\uFF08\u6216\u5730\u5740\uFF09\u6D3E\u751F\u51FA\u4F86\u7684\u5730\u5740\u3002"),v=l("

PDAs\u7684\u7368\u7279\u4E4B\u8655\u5728\u65BC\uFF0C\u9019\u4E9B\u5730\u5740\u4E0D\u8207\u4EFB\u4F55\u79C1\u9470\u76F8\u95DC\u806F\u3002\u9019\u662F\u56E0\u7232\u9019\u4E9B\u5730\u5740\u4E0D\u4F4D\u65BCED25519\u66F2\u7DDA\u4E0A\u3002\u56E0\u6B64\uFF0C\u53EA\u6709\u6D3E\u751F\u6B64\u5730\u5740\u7684\u7A0B\u5E8F\u53EF\u4EE5\u4F7F\u7528\u63D0\u4F9B\u7684\u5BC6\u9470\u548C\u7A2E\u5B50\u5C0D\u6307\u4EE4\u9032\u884C\u7C3D\u540D\u3002\u5728\u9019\u88CF\u77AD\u89E3\u66F4\u591A\u4FE1\u606F\u3002

\u73FE\u5728\u6211\u5011\u5C0DPDAs\u6709\u4E86\u4E00\u500B\u6982\u5FF5\uFF0C\u8B93\u6211\u5011\u4F7F\u7528\u5B83\u5011\u4F86\u6620\u5C04\u4E00\u4E9B\u8CEC\u6236\uFF01\u6211\u5011\u4EE5\u4E00\u500B\u535A\u5BA2\u7A0B\u5E8F\u4F5C\u7232\u793A\u4F8B\uFF0C\u6F14\u793A\u5982\u4F55\u5BE6\u73FE\u9019\u4E00\u9EDE\u3002

\u5728\u9019\u500B\u535A\u5BA2\u7A0B\u5E8F\u4E2D\uFF0C\u6211\u5011\u5E0C\u671B\u6BCF\u500BUser\u90FD\u64C1\u6709\u4E00\u500BBlog\u3002\u9019\u500B\u535A\u5BA2\u53EF\u4EE5\u6709\u4EFB\u610F\u6578\u91CF\u7684Posts\u3002\u9019\u610F\u5473\u7740\u6211\u5011\u5C07\u6BCF\u500B\u7528\u6236\u6620\u5C04\u5230\u4E00\u500B\u535A\u5BA2\uFF0C\u6BCF\u500B\u5E16\u5B50\u6620\u5C04\u5230\u67D0\u500B\u535A\u5BA2\u3002

\u7C21\u800C\u8A00\u4E4B\uFF0C\u7528\u6236\u548C\u4ED6/\u5979\u7684\u535A\u5BA2\u4E4B\u9593\u662F1:1\u7684\u6620\u5C04\uFF0C\u800C\u535A\u5BA2\u548C\u5176\u5E16\u5B50\u4E4B\u9593\u662F1:N\u7684\u6620\u5C04\u3002

\u5C0D\u65BC1:1\u7684\u6620\u5C04\uFF0C\u6211\u5011\u5E0C\u671B\u4E00\u500B\u535A\u5BA2\u7684\u5730\u5740\u50C5\u5F9E\u5176\u7528\u6236\u6D3E\u751F\uFF0C\u9019\u6A23\u6211\u5011\u53EF\u4EE5\u901A\u904E\u5176\u6B0A\u9650\uFF08\u6216\u7528\u6236\uFF09\u4F86\u6AA2\u7D22\u535A\u5BA2\u3002\u56E0\u6B64\uFF0C\u535A\u5BA2\u7684\u7A2E\u5B50\u5C07\u5305\u62EC\u5176\u6B0A\u9650\u7684\u5BC6\u9470\uFF0C\u53EF\u80FD\u9084\u6709\u4E00\u500B\u524D\u7DB4\u535A\u5BA2\uFF0C\u4F5C\u7232\u985E\u578B\u6A19\u8B58\u7B26\u3002

\u5C0D\u65BC1:N\u7684\u6620\u5C04\uFF0C\u6211\u5011\u5E0C\u671B\u6BCF\u500B\u5E16\u5B50\u7684\u5730\u5740\u4E0D\u50C5\u5F9E\u5B83\u6240\u95DC\u806F\u7684\u535A\u5BA2\u6D3E\u751F\uFF0C\u9084\u5F9E\u53E6\u4E00\u500B\u6A19\u8B58\u7B26\u6D3E\u751F\uFF0C\u4EE5\u5340\u5206\u535A\u5BA2\u4E2D\u7684\u591A\u500B\u5E16\u5B50\u3002\u5728\u4E0B\u9762\u7684\u793A\u4F8B\u4E2D\uFF0C\u6BCF\u500B\u5E16\u5B50\u7684\u5730\u5740\u662F\u5F9E\u535A\u5BA2\u7684\u5BC6\u9470\u3001\u4E00\u500B\u7528\u65BC\u6A19\u8B58\u6BCF\u500B\u5E16\u5B50\u7684slug\u548C\u4E00\u500B\u524D\u7DB4\u5E16\u5B50\u6D3E\u751F\u51FA\u4F86\u7684\uFF0C\u4F5C\u7232\u985E\u578B\u6A19\u8B58\u7B26\u3002

\u4EE3\u78BC\u5982\u4E0B\u6240\u793A\uFF1A

",7),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.a6d163f8.js b/docs/.vuepress/dist/assets/account-maps.html.15aa5004.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.a6d163f8.js rename to docs/.vuepress/dist/assets/account-maps.html.15aa5004.js index fd363cd5a..6f70a73fe 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.a6d163f8.js +++ b/docs/.vuepress/dist/assets/account-maps.html.15aa5004.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"como-usar-map-en-cuentas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-usar-map-en-cuentas","aria-hidden":"true"},"#"),s(" C\xF3mo usar Map en cuentas")],-1),d=n("p",null,[s("Los mapas son estructuras de datos que usamos con frecuencia en la programaci\xF3n para asociar una "),n("strong",null,"clave"),s(" con un "),n("strong",null,"valor"),s(" de alg\xFAn tipo. La clave y el valor pueden ser de cualquier tipo arbitrario y la clave act\xFAa como un identificador para un valor dado que se est\xE1 guardando. Luego, dada su clave, nos permite insertar, recuperar y actualizar estos valores de manera eficiente.")],-1),_=s("El modelo de cuenta de Solana, como sabemos, requiere que los datos del programa y sus datos de estado relevantes se almacenen en diferentes cuentas. Estas cuentas tienen una direcci\xF3n asociada a ellas. \xA1Esto, en s\xED mismo, act\xFAa como un mapa! Obtenga m\xE1s informaci\xF3n sobre el modo de cuenta de Solana [aqu\xED] "),y={href:"https://solanacookbook.com/es/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("AccountCookbook"),g=s("."),w=l('

Por lo tanto, tendr\xEDa sentido almacenar sus valores en cuentas separadas, siendo su direcci\xF3n la clave necesaria para recuperar el valor. Pero esto trae algunos problemas, tales como,

  • Las direcciones mencionadas anteriormente probablemente no sean las claves ideales porque son dif\xEDciles de recordar.

  • Las direcciones mencionadas anteriormente se refer\xEDan a claves p\xFAblicas de diferentes Pares de claves, donde cada clave p\xFAblica (o direcci\xF3n) tendr\xEDa asociada una clave privada. Se requerir\xEDa esta clave privada para firmar diferentes instrucciones cuando sea necesario, lo que requiere que almacenemos la clave privada en alg\xFAn lugar, \xA1lo cual definitivamente no se recomienda!

Esto presenta un problema al que se enfrentan muchos desarrolladores de Solana, que es implementar una l\xF3gica similar a Map en sus programas. Veamos un par de formas para solucionar este problema,

Derivando PDAs

',4),h=s("PDA significa "),A={href:"https://solanacookbook.com/references/es/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),v=s(" o en espa\xF1ol, direcciones derivadas de programa, que de forma simple podemos decir que son cuentas "),B=n("strong",null,"derivadas",-1),I=s(" de un conjunto de semillas y un id de programa (o "),S=n("em",null,"direcci\xF3n",-1),E=s(")."),x=s("Lo \xFAnico de las PDA es que estas direcciones "),M=n("strong",null,"no",-1),C=s(" est\xE1n asociadas con ninguna clave privada. Esto se debe a que estas direcciones no se encuentran en la curva ED25519. Por lo tanto, "),R=n("strong",null,"solo",-1),T=s(" el programa, del cual se deriv\xF3 esta "),D=n("em",null,"direcci\xF3n",-1),O=s(", puede firmar una instrucci\xF3n con las semillas y el id del programa. Obtenga m\xE1s informaci\xF3n sobre esto "),z={href:"https://solanacookbook.com/references/es/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},q=s("aqu\xED"),K=s("."),L=l("

Ahora que tenemos una idea de lo que son las PDA, \xA1utilic\xE9moslas para mapear algunas cuentas! Tomaremos un ejemplo de un programa Blog para demostrar c\xF3mo se implementar\xEDa.

En este programa de Blog, nos gustar\xEDa que cada 'Usuario' tuviera un solo 'Blog'. Este blog podr\xEDa tener cualquier n\xFAmero de 'Publicaciones'. Eso significar\xEDa que estamos asignando a cada usuario a un blog, y cada publicaci\xF3n est\xE1 asignada a un blog determinado.

En resumen, hay un mapeo 1:1 entre un usuario y su blog, mientras que un mapeo 1:N entre un blog y sus publicaciones.

Para el mapeo 1:1, nos gustar\xEDa que la direcci\xF3n de un blog se derive solo de su usuario, lo que nos permitir\xEDa recuperar un blog, dada su autoridad (o usuario). Por lo tanto, las semillas de un blog consistir\xEDan en su clave de autoridad y posiblemente un prefijo de "blog", para actuar como un identificador de tipo.

Para el mapeo 1:N, nos gustar\xEDa que la direcci\xF3n de cada publicaci\xF3n se derive no solo del blog con el que est\xE1 asociada, sino tambi\xE9n de otro identificador, lo que nos permite diferenciar entre N n\xFAmero de publicaciones en el blog. En el siguiente ejemplo, la direcci\xF3n de cada publicaci\xF3n se deriva de la clave del blog, un slug para identificar cada publicaci\xF3n y un prefijo de "publicaci\xF3n", para actuar como un identificador de tipo.

El c\xF3digo es como se muestra a continuaci\xF3n,

",6),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"como-usar-map-en-cuentas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-usar-map-en-cuentas","aria-hidden":"true"},"#"),s(" C\xF3mo usar Map en cuentas")],-1),d=n("p",null,[s("Los mapas son estructuras de datos que usamos con frecuencia en la programaci\xF3n para asociar una "),n("strong",null,"clave"),s(" con un "),n("strong",null,"valor"),s(" de alg\xFAn tipo. La clave y el valor pueden ser de cualquier tipo arbitrario y la clave act\xFAa como un identificador para un valor dado que se est\xE1 guardando. Luego, dada su clave, nos permite insertar, recuperar y actualizar estos valores de manera eficiente.")],-1),_=s("El modelo de cuenta de Solana, como sabemos, requiere que los datos del programa y sus datos de estado relevantes se almacenen en diferentes cuentas. Estas cuentas tienen una direcci\xF3n asociada a ellas. \xA1Esto, en s\xED mismo, act\xFAa como un mapa! Obtenga m\xE1s informaci\xF3n sobre el modo de cuenta de Solana [aqu\xED] "),y={href:"https://solanacookbook.com/es/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("AccountCookbook"),g=s("."),w=l('

Por lo tanto, tendr\xEDa sentido almacenar sus valores en cuentas separadas, siendo su direcci\xF3n la clave necesaria para recuperar el valor. Pero esto trae algunos problemas, tales como,

  • Las direcciones mencionadas anteriormente probablemente no sean las claves ideales porque son dif\xEDciles de recordar.

  • Las direcciones mencionadas anteriormente se refer\xEDan a claves p\xFAblicas de diferentes Pares de claves, donde cada clave p\xFAblica (o direcci\xF3n) tendr\xEDa asociada una clave privada. Se requerir\xEDa esta clave privada para firmar diferentes instrucciones cuando sea necesario, lo que requiere que almacenemos la clave privada en alg\xFAn lugar, \xA1lo cual definitivamente no se recomienda!

Esto presenta un problema al que se enfrentan muchos desarrolladores de Solana, que es implementar una l\xF3gica similar a Map en sus programas. Veamos un par de formas para solucionar este problema,

Derivando PDAs

',4),h=s("PDA significa "),A={href:"https://solanacookbook.com/references/es/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),v=s(" o en espa\xF1ol, direcciones derivadas de programa, que de forma simple podemos decir que son cuentas "),B=n("strong",null,"derivadas",-1),I=s(" de un conjunto de semillas y un id de programa (o "),S=n("em",null,"direcci\xF3n",-1),E=s(")."),x=s("Lo \xFAnico de las PDA es que estas direcciones "),M=n("strong",null,"no",-1),C=s(" est\xE1n asociadas con ninguna clave privada. Esto se debe a que estas direcciones no se encuentran en la curva ED25519. Por lo tanto, "),R=n("strong",null,"solo",-1),T=s(" el programa, del cual se deriv\xF3 esta "),D=n("em",null,"direcci\xF3n",-1),O=s(", puede firmar una instrucci\xF3n con las semillas y el id del programa. Obtenga m\xE1s informaci\xF3n sobre esto "),z={href:"https://solanacookbook.com/references/es/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},q=s("aqu\xED"),K=s("."),L=l("

Ahora que tenemos una idea de lo que son las PDA, \xA1utilic\xE9moslas para mapear algunas cuentas! Tomaremos un ejemplo de un programa Blog para demostrar c\xF3mo se implementar\xEDa.

En este programa de Blog, nos gustar\xEDa que cada 'Usuario' tuviera un solo 'Blog'. Este blog podr\xEDa tener cualquier n\xFAmero de 'Publicaciones'. Eso significar\xEDa que estamos asignando a cada usuario a un blog, y cada publicaci\xF3n est\xE1 asignada a un blog determinado.

En resumen, hay un mapeo 1:1 entre un usuario y su blog, mientras que un mapeo 1:N entre un blog y sus publicaciones.

Para el mapeo 1:1, nos gustar\xEDa que la direcci\xF3n de un blog se derive solo de su usuario, lo que nos permitir\xEDa recuperar un blog, dada su autoridad (o usuario). Por lo tanto, las semillas de un blog consistir\xEDan en su clave de autoridad y posiblemente un prefijo de "blog", para actuar como un identificador de tipo.

Para el mapeo 1:N, nos gustar\xEDa que la direcci\xF3n de cada publicaci\xF3n se derive no solo del blog con el que est\xE1 asociada, sino tambi\xE9n de otro identificador, lo que nos permite diferenciar entre N n\xFAmero de publicaciones en el blog. En el siguiente ejemplo, la direcci\xF3n de cada publicaci\xF3n se deriva de la clave del blog, un slug para identificar cada publicaci\xF3n y un prefijo de "publicaci\xF3n", para actuar como un identificador de tipo.

El c\xF3digo es como se muestra a continuaci\xF3n,

",6),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.62c5a232.js b/docs/.vuepress/dist/assets/account-maps.html.1a60d088.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.62c5a232.js rename to docs/.vuepress/dist/assets/account-maps.html.1a60d088.js index d6f032c06..97e301e13 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.62c5a232.js +++ b/docs/.vuepress/dist/assets/account-maps.html.1a60d088.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("hr",null,null,-1),d=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),_=n("p",null,[s("Map l\xE0 m\u1ED9t ki\u1EC3u c\u1EA5u tr\xFAc th\u01B0\u1EDDng d\xF9ng trong l\u1EADp tr\xECnh v\xE0 bao g\u1ED3m m\u1ED9t "),n("strong",null,"key"),s(" t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t "),n("strong",null,"value"),s(". C\u1EB7p key-value c\xF3 th\u1EC3 l\xE0 b\u1EA5t k\u1EF3 ki\u1EC3u d\u1EEF li\u1EC7u n\xE0o trong \u0111\xF3 key nh\u01B0 l\xE0 ch\xECa kho\xE1 \u0111\u1ECBnh danh d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c l\u01B0u trong value. Do \u0111\xF3, v\u1EDBi m\u1ED7i key, ch\u0169ng ta c\xF3 th\u1EC3 th\xEAm, xo\xE1, c\u1EADp nh\u1EADt d\u1EEF li\u1EC7u v\xE0o value m\u1ED9t c\xE1ch hi\u1EC7u qu\u1EA3.")],-1),y=s("M\xF4 h\xECnh Account trong Solana, nh\u01B0 \u0111\xE3 bi\u1EBFt, y\xEAu c\u1EA7u d\u1EEF li\u1EC7u c\u1EE7a Program v\xE0 c\xE1c tr\u1EA1ng th\xE1i c\u1EE7a n\xF3 ph\u1EA3i \u0111\u01B0\u1EE3c l\u01B0u \u1EDF nh\u1EEFng Account ri\xEAng bi\u1EC7t. Nh\u1EEFng Account n\xE0y c\xF3 m\u1ED9t \u0111\u1ECBa ch\u1EC9 \u0111\u1ECBnh danh t\u01B0\u01A1ng \u1EE9ng v\xE0 m\xF4 h\xECnh \u0111\xF3 r\u1EA5t gi\u1ED1ng v\u1EDBi map! T\xECm hi\u1EC3u th\xEAm v\u1EC1 m\xF4 h\xECnh Account trong Solana "),g={href:"https://solanacookbook.com/vi/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("t\u1EA1i \u0111\xE2y"),w=s("."),h=l('

Nh\u01B0 v\u1EADy, d\u1EC5 hi\u1EC3u khi m\xE0 ta l\u01B0u values v\xE0o nh\u1EEFng Account t\xE1ch bi\u1EC7t v\xE0 d\xF9ng key \u0111\u1EC3 truy v\u1EA5n d\u1EEF li\u1EC7u trong values. Tuy nhi\xEAn, \u0111i\u1EC1u n\xE0y l\u1EA1i g\xE2y ra m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 nh\u01B0 l\xE0:

  • Nh\u1EEFng \u0111\u1ECBa ch\u1EC9 \u0111\u1EC1 c\u1EADp h\u1EA7u h\u1EBFt kh\xF4ng ph\u1EA3i l\xE0 m\u1ED9t keys l\xFD t\u01B0\u1EDFng, khi m\xE0 b\u1EA1n c\u1EA7n ph\u1EA3i ghi nh\u1EDB t\u1EA5t c\u1EA3 ch\xFAng \u0111\u1EC3 truy v\u1EA5n c\xE1c d\u1EEF li\u1EC7u t\u01B0\u01A1ng \u1EE9ng.

  • Nh\u1EEFng \u0111\u1ECBa ch\u1EC9 \u0111\u1EC1 c\u1EADp b\xEAn tr\xEAn \u0111\u01B0\u1EE3c tham chi\u1EBFu b\u1EB1ng kho\xE1 c\xF4ng khai c\u1EE7a nh\u1EEFng Keypairs (c\u1EB7p kho\xE1) kh\xE1c nhau, trong \u0111\xF3 kho\xE1 c\xF4ng khai b\u1EAFt bu\u1ED9c ph\u1EA3i c\xF3 kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE9ng. Kho\xE1 ri\xEAng t\u01B0 l\u1EA1i c\u1EA7n thi\u1EBFt \u0111\u1EC3 k\xFD c\xE1c ch\u1EC9 th\u1ECB v\xE0 l\u1EA1i b\u1EAFt bu\u1ED9c ch\xFAng ta ph\u1EA3i l\u01B0u \u1EDF m\u1ED9t n\u01A1i n\xE0o \u0111\xF3, \u0111i\u1EC1u m\xE0 th\u1EADt s\u1EF1 kh\xF4ng \u0111\u01B0\u1EE3c khuy\u1EBFn kh\xEDch trong th\u1EF1c ti\u1EC5n.

\u0110i\u1EBFu \u0111\xF3 d\u1EABn \u0111\u1EBFn r\u1EA5t nhi\u1EC1u v\u1EA5n \u0111\u1EC1 cho l\u1EADp tr\xECnh vi\xEAn mu\u1ED1n hi\u1EC7n th\u1EF1c Map tr\u1EF1c ti\u1EBFp v\xE0o Program tr\xEAn Solana. Gi\u1EDD h\xE3y quan s\xE1t m\u1ED9t v\xE0i c\xE1ch \u0111\u1EC3 gi\u1EA3i quy\u1EBFt v\u1EA5n \u0111\u1EC1 tr\xEAn.

T\xECm PDA

',4),A=s("PDA l\xE0 vi\u1EBFt t\u1EAFt "),P={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},v=s("Program Derived Address"),B=s(". Ch\xFAng l\xE0 nh\u1EEFng \u0111\u1ECBa ch\u1EC9 \u0111\u01B0\u1EE3c "),I=n("strong",null,"t\xECm th\u1EA5y",-1),S=s(" th\xF4ng qua t\u1EADp h\u1EE3p g\u1ED3m "),x=n("code",null,"seeds",-1),E=s(" v\xE0 "),M=n("code",null,"program_id",-1),C=s("."),R=s("\u0110i\u1EC3m \u0111\u1EB7c bi\u1EC7t c\u1EE7a PDA l\xE0 ch\xFAng "),T=n("strong",null,"kh\xF4ng",-1),D=s(" t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE9ng. \u0110i\u1EC1u n\xE0y b\u1EDFi v\xEC nh\u1EEFng \u0111\u1ECBa ch\u1EC9 n\xE0y kh\xF4ng n\u1EB1m tr\xEAn \u0111\u01B0\u1EDDng cong ED25519. V\xEC v\u1EADy, "),O=n("strong",null,"duy nh\u1EA5t",-1),K=s(" Program sinh ra PDA m\u1EDBi c\xF3 th\u1EC3 k\xFD l\xEAn c\xE1c ch\u1EC9 th\u1ECB cho c\xE1c PDA \u0111\xF3 b\u1EB1ng "),z=n("code",null,"seeds",-1),L=s(". T\xECm hi\u1EC3u th\xEAm "),N={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},U=s("t\u1EA1i \u0111\xE2y"),G=s("."),W=l("

Sau khi \u0111\xE3 n\u1EAFm \u0111\u01B0\u1EE3c kh\xE1i ni\u1EC7m PDA, ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng \u0111\u1EC3 t\u1EA1o ki\u1EC3u Map! H\xE3y l\u1EA5y v\xED d\u1EE5 m\u1ED9t Blog Program \u0111\u1EC3 hi\u1EC3u r\xF5 h\u01A1n c\xE1ch s\u1EED d\u1EE5ng.

Trong Blog Program, ch\xFAng ta mu\u1ED1n m\u1ED7i User s\u1EBD c\xF3 m\u1ED9t trang Blog. B\xE0i blog c\xF3 th\u1EC3 c\xF3 nhi\u1EC1u Posts. C\u1EE5 th\u1EC3 h\u01A1n, m\u1ED7i User s\u1EBD map \u0111\u1EBFn m\u1ED9t trang Blog. Nhi\u1EC1u b\xE0i Posts s\u1EBD \u0111\u01B0\u1EE3c map v\u1EC1 m\u1ED9t trang Blog.

User s\u1EBD c\xF3 k\u1EBFt n\u1ED1i 1:1 v\u1EDBi Blog trong khi Blog s\u1EBD c\xF3 k\u1EBFt n\u1ED1i 1:N v\u1EDBi Posts.

V\u1EDBi 1:1, ch\xFAng ta mong m\u1ED1n \u0111\u1ECBa ch\u1EC9 c\u1EE7a trang blog c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c suy ra \u0111\u1ED9c nh\u1EA5t t\u1EEB \u0111\u1ECBa ch\u1EC9 ng\u01B0\u1EDDi d\xF9ng. C\u01A1 ch\u1EBF n\xE0y s\u1EBD gi\xFAp ch\xFAng ta l\u1EA5y \u0111\u01B0\u1EE3c d\u1EEF li\u1EC7u c\u1EE7a blog khi bi\u1EBFt \u0111\u01B0\u1EE3c \u0111\u1ECBa ch\u1EC9 ch\u1EED s\u1EDF h\u1EEFu blog \u0111\xF3. Hi\u1EC3n nhi\xEAn, seeds cho Blog ph\u1EA3i ch\u1EE9a \u0111\u1ECBa ch\u1EC9 ch\u1EE7 s\u1EDF h\u1EEFu, v\xE0 c\xF3 th\u1EC3 th\xEAm m\u1ED9t ti\u1EC1n t\u1ED1 nh\u01B0 "blog" \u0111\u1EC3 gi\xFAp ch\xFA th\xEDch.

V\u1EDBi 1:N, ch\xFAng ta mong mu\u1ED1n \u0111\u1ECBa ch\u1EC9 m\u1ED7i b\xE0i post s\u1EBD \u0111\u01B0\u1EE3c suy ra t\u1EEB kh\xF4ng ch\u1EC9 \u0111\u1ECBa ch\u1EC9 trang blog m\xE0 c\xF2n t\u1EEB c\xE1ch th\xE0nh t\u1ED1 kh\xE1c gi\xFAp t\u1EA1o ra N \u0111\u1ECBa ch\u1EC9 b\xE0i post trong m\u1ED9t trang blog. Trong v\xED d\u1EE5 b\xEAn d\u01B0\u1EDBi, m\u1ED7i \u0111\u1ECBa ch\u1EC9 b\xE0i post \u0111\u01B0\u1EE3c suy ra b\u1EB1ng \u0111\u1ECBa ch\u1EC9 trang blog, m\u1ED9t th\xE0nh t\u1ED1 ph\u1EE5 - slug - \u0111\u1EC3 \u0111\u1ECBnh danh cho m\u1ED7i b\xE0i post, v\xE0 ti\u1EC1n t\u1ED1 "post" \u0111\u1EC3 ch\xFA th\xEDch.

Code m\u1EABu \u0111\u01B0\u1EE3c vi\u1EBFt nh\u01B0 sau:

",6),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("hr",null,null,-1),d=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),_=n("p",null,[s("Map l\xE0 m\u1ED9t ki\u1EC3u c\u1EA5u tr\xFAc th\u01B0\u1EDDng d\xF9ng trong l\u1EADp tr\xECnh v\xE0 bao g\u1ED3m m\u1ED9t "),n("strong",null,"key"),s(" t\u01B0\u01A1ng \u1EE9ng v\u1EDBi m\u1ED9t "),n("strong",null,"value"),s(". C\u1EB7p key-value c\xF3 th\u1EC3 l\xE0 b\u1EA5t k\u1EF3 ki\u1EC3u d\u1EEF li\u1EC7u n\xE0o trong \u0111\xF3 key nh\u01B0 l\xE0 ch\xECa kho\xE1 \u0111\u1ECBnh danh d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c l\u01B0u trong value. Do \u0111\xF3, v\u1EDBi m\u1ED7i key, ch\u0169ng ta c\xF3 th\u1EC3 th\xEAm, xo\xE1, c\u1EADp nh\u1EADt d\u1EEF li\u1EC7u v\xE0o value m\u1ED9t c\xE1ch hi\u1EC7u qu\u1EA3.")],-1),y=s("M\xF4 h\xECnh Account trong Solana, nh\u01B0 \u0111\xE3 bi\u1EBFt, y\xEAu c\u1EA7u d\u1EEF li\u1EC7u c\u1EE7a Program v\xE0 c\xE1c tr\u1EA1ng th\xE1i c\u1EE7a n\xF3 ph\u1EA3i \u0111\u01B0\u1EE3c l\u01B0u \u1EDF nh\u1EEFng Account ri\xEAng bi\u1EC7t. Nh\u1EEFng Account n\xE0y c\xF3 m\u1ED9t \u0111\u1ECBa ch\u1EC9 \u0111\u1ECBnh danh t\u01B0\u01A1ng \u1EE9ng v\xE0 m\xF4 h\xECnh \u0111\xF3 r\u1EA5t gi\u1ED1ng v\u1EDBi map! T\xECm hi\u1EC3u th\xEAm v\u1EC1 m\xF4 h\xECnh Account trong Solana "),g={href:"https://solanacookbook.com/vi/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("t\u1EA1i \u0111\xE2y"),w=s("."),h=l('

Nh\u01B0 v\u1EADy, d\u1EC5 hi\u1EC3u khi m\xE0 ta l\u01B0u values v\xE0o nh\u1EEFng Account t\xE1ch bi\u1EC7t v\xE0 d\xF9ng key \u0111\u1EC3 truy v\u1EA5n d\u1EEF li\u1EC7u trong values. Tuy nhi\xEAn, \u0111i\u1EC1u n\xE0y l\u1EA1i g\xE2y ra m\u1ED9t s\u1ED1 v\u1EA5n \u0111\u1EC1 nh\u01B0 l\xE0:

  • Nh\u1EEFng \u0111\u1ECBa ch\u1EC9 \u0111\u1EC1 c\u1EADp h\u1EA7u h\u1EBFt kh\xF4ng ph\u1EA3i l\xE0 m\u1ED9t keys l\xFD t\u01B0\u1EDFng, khi m\xE0 b\u1EA1n c\u1EA7n ph\u1EA3i ghi nh\u1EDB t\u1EA5t c\u1EA3 ch\xFAng \u0111\u1EC3 truy v\u1EA5n c\xE1c d\u1EEF li\u1EC7u t\u01B0\u01A1ng \u1EE9ng.

  • Nh\u1EEFng \u0111\u1ECBa ch\u1EC9 \u0111\u1EC1 c\u1EADp b\xEAn tr\xEAn \u0111\u01B0\u1EE3c tham chi\u1EBFu b\u1EB1ng kho\xE1 c\xF4ng khai c\u1EE7a nh\u1EEFng Keypairs (c\u1EB7p kho\xE1) kh\xE1c nhau, trong \u0111\xF3 kho\xE1 c\xF4ng khai b\u1EAFt bu\u1ED9c ph\u1EA3i c\xF3 kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE9ng. Kho\xE1 ri\xEAng t\u01B0 l\u1EA1i c\u1EA7n thi\u1EBFt \u0111\u1EC3 k\xFD c\xE1c ch\u1EC9 th\u1ECB v\xE0 l\u1EA1i b\u1EAFt bu\u1ED9c ch\xFAng ta ph\u1EA3i l\u01B0u \u1EDF m\u1ED9t n\u01A1i n\xE0o \u0111\xF3, \u0111i\u1EC1u m\xE0 th\u1EADt s\u1EF1 kh\xF4ng \u0111\u01B0\u1EE3c khuy\u1EBFn kh\xEDch trong th\u1EF1c ti\u1EC5n.

\u0110i\u1EC1u \u0111\xF3 d\u1EABn \u0111\u1EBFn r\u1EA5t nhi\u1EC1u v\u1EA5n \u0111\u1EC1 cho l\u1EADp tr\xECnh vi\xEAn mu\u1ED1n hi\u1EC7n th\u1EF1c Map tr\u1EF1c ti\u1EBFp v\xE0o Program tr\xEAn Solana. Gi\u1EDD h\xE3y quan s\xE1t m\u1ED9t v\xE0i c\xE1ch \u0111\u1EC3 gi\u1EA3i quy\u1EBFt v\u1EA5n \u0111\u1EC1 tr\xEAn.

T\xECm PDA

',4),A=s("PDA l\xE0 vi\u1EBFt t\u1EAFt "),P={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},v=s("Program Derived Address"),B=s(". Ch\xFAng l\xE0 nh\u1EEFng \u0111\u1ECBa ch\u1EC9 \u0111\u01B0\u1EE3c "),I=n("strong",null,"t\xECm th\u1EA5y",-1),S=s(" th\xF4ng qua t\u1EADp h\u1EE3p g\u1ED3m "),x=n("code",null,"seeds",-1),E=s(" v\xE0 "),M=n("code",null,"program_id",-1),C=s("."),R=s("\u0110i\u1EC3m \u0111\u1EB7c bi\u1EC7t c\u1EE7a PDA l\xE0 ch\xFAng "),T=n("strong",null,"kh\xF4ng",-1),D=s(" t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE9ng. \u0110i\u1EC1u n\xE0y b\u1EDFi v\xEC nh\u1EEFng \u0111\u1ECBa ch\u1EC9 n\xE0y kh\xF4ng n\u1EB1m tr\xEAn \u0111\u01B0\u1EDDng cong ED25519. V\xEC v\u1EADy, "),O=n("strong",null,"duy nh\u1EA5t",-1),K=s(" Program sinh ra PDA m\u1EDBi c\xF3 th\u1EC3 k\xFD l\xEAn c\xE1c ch\u1EC9 th\u1ECB cho c\xE1c PDA \u0111\xF3 b\u1EB1ng "),z=n("code",null,"seeds",-1),L=s(". T\xECm hi\u1EC3u th\xEAm "),N={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},U=s("t\u1EA1i \u0111\xE2y"),G=s("."),W=l("

Sau khi \u0111\xE3 n\u1EAFm \u0111\u01B0\u1EE3c kh\xE1i ni\u1EC7m PDA, ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng \u0111\u1EC3 t\u1EA1o ki\u1EC3u Map! H\xE3y l\u1EA5y v\xED d\u1EE5 m\u1ED9t Blog Program \u0111\u1EC3 hi\u1EC3u r\xF5 h\u01A1n c\xE1ch s\u1EED d\u1EE5ng.

Trong Blog Program, ch\xFAng ta mu\u1ED1n m\u1ED7i User s\u1EBD c\xF3 m\u1ED9t trang Blog. B\xE0i blog c\xF3 th\u1EC3 c\xF3 nhi\u1EC1u Posts. C\u1EE5 th\u1EC3 h\u01A1n, m\u1ED7i User s\u1EBD map \u0111\u1EBFn m\u1ED9t trang Blog. Nhi\u1EC1u b\xE0i Posts s\u1EBD \u0111\u01B0\u1EE3c map v\u1EC1 m\u1ED9t trang Blog.

User s\u1EBD c\xF3 k\u1EBFt n\u1ED1i 1:1 v\u1EDBi Blog trong khi Blog s\u1EBD c\xF3 k\u1EBFt n\u1ED1i 1:N v\u1EDBi Posts.

V\u1EDBi 1:1, ch\xFAng ta mong m\u1ED1n \u0111\u1ECBa ch\u1EC9 c\u1EE7a trang blog c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c suy ra \u0111\u1ED9c nh\u1EA5t t\u1EEB \u0111\u1ECBa ch\u1EC9 ng\u01B0\u1EDDi d\xF9ng. C\u01A1 ch\u1EBF n\xE0y s\u1EBD gi\xFAp ch\xFAng ta l\u1EA5y \u0111\u01B0\u1EE3c d\u1EEF li\u1EC7u c\u1EE7a blog khi bi\u1EBFt \u0111\u01B0\u1EE3c \u0111\u1ECBa ch\u1EC9 ch\u1EED s\u1EDF h\u1EEFu blog \u0111\xF3. Hi\u1EC3n nhi\xEAn, seeds cho Blog ph\u1EA3i ch\u1EE9a \u0111\u1ECBa ch\u1EC9 ch\u1EE7 s\u1EDF h\u1EEFu, v\xE0 c\xF3 th\u1EC3 th\xEAm m\u1ED9t ti\u1EC1n t\u1ED1 nh\u01B0 "blog" \u0111\u1EC3 gi\xFAp ch\xFA th\xEDch.

V\u1EDBi 1:N, ch\xFAng ta mong mu\u1ED1n \u0111\u1ECBa ch\u1EC9 m\u1ED7i b\xE0i post s\u1EBD \u0111\u01B0\u1EE3c suy ra t\u1EEB kh\xF4ng ch\u1EC9 \u0111\u1ECBa ch\u1EC9 trang blog m\xE0 c\xF2n t\u1EEB c\xE1ch th\xE0nh t\u1ED1 kh\xE1c gi\xFAp t\u1EA1o ra N \u0111\u1ECBa ch\u1EC9 b\xE0i post trong m\u1ED9t trang blog. Trong v\xED d\u1EE5 b\xEAn d\u01B0\u1EDBi, m\u1ED7i \u0111\u1ECBa ch\u1EC9 b\xE0i post \u0111\u01B0\u1EE3c suy ra b\u1EB1ng \u0111\u1ECBa ch\u1EC9 trang blog, m\u1ED9t th\xE0nh t\u1ED1 ph\u1EE5 - slug - \u0111\u1EC3 \u0111\u1ECBnh danh cho m\u1ED7i b\xE0i post, v\xE0 ti\u1EC1n t\u1ED1 "post" \u0111\u1EC3 ch\xFA th\xEDch.

Code m\u1EABu \u0111\u01B0\u1EE3c vi\u1EBFt nh\u01B0 sau:

",6),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.6ef9e96e.js b/docs/.vuepress/dist/assets/account-maps.html.39d261ab.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.6ef9e96e.js rename to docs/.vuepress/dist/assets/account-maps.html.39d261ab.js index 5051e3e7c..606fd901d 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.6ef9e96e.js +++ b/docs/.vuepress/dist/assets/account-maps.html.39d261ab.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("\u30DE\u30C3\u30D7\u306F\u3001"),n("strong",null,"key"),s(" \u3068\u3092\u4F55\u3089\u304B\u306E "),n("strong",null,"value"),s(" \u306B\u95A2\u9023\u4ED8\u3051\u308B\u305F\u3081\u306B\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u3067\u3088\u304F\u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u69CB\u9020\u3067\u3059\u3002\u30AD\u30FC\u3068\u5024\u306F\u4EFB\u610F\u306E\u578B\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u3001\u30AD\u30FC\u306F\u4FDD\u5B58\u3055\u308C\u308B\u7279\u5B9A\u306E\u5024\u306E\u8B58\u5225\u5B50\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002 \u6B21\u306B\u3001\u305D\u306E\u30AD\u30FC\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u3053\u308C\u3089\u306E\u5024\u3092\u52B9\u7387\u7684\u306B\u633F\u5165\u3001\u53D6\u5F97\u3001\u66F4\u65B0\u3067\u304D\u307E\u3059\u3002")],-1),_=s("\u3054\u5B58\u77E5\u306E\u3088\u3046\u306B\u3001Solana \u306E Account \u30E2\u30C7\u30EB\u3067\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF\u3068\u305D\u308C\u306B\u95A2\u9023\u3059\u308B\u72B6\u614B\u30C7\u30FC\u30BF\u3092\u7570\u306A\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306F\u30A2\u30C9\u30EC\u30B9\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u81EA\u4F53\u304C\u30DE\u30C3\u30D7\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002 Solana \u306EAccount \u30E2\u30FC\u30C9\u306E\u8A73\u7D30\u306B\u3064\u3044\u3066\u306F\u3001"),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u3053\u3061\u3089"),g=s("\u3002"),w=l('

\u305D\u306E\u305F\u3081\u3001\u5024\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u306A\u30AD\u30FC\u3092\u30A2\u30C9\u30EC\u30B9\u3068\u3057\u3066\u3001\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5024\u3092\u4FDD\u5B58\u3059\u308B\u3053\u3068\u306F\u7406\u306B\u304B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u306F\u6B21\u306E\u3088\u3046\u306A\u3044\u304F\u3064\u304B\u306E\u554F\u984C\u3092\u5F15\u304D\u8D77\u3053\u3057\u307E\u3059\u3002

  • \u4E0A\u8A18\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u8A18\u61B6\u3057\u3066\u5FC5\u8981\u306A\u5024\u3092\u53D6\u5F97\u3067\u304D\u308B\u7406\u60F3\u7684\u306Akey\u3067\u306F\u306A\u3044\u53EF\u80FD\u6027\u304C\u9AD8\u3044\u3067\u3059\u3002

  • \u4E0A\u8A18\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u7570\u306A\u308B\u9375\u30DA\u30A2\u306E\u516C\u958B\u9375\u3092\u53C2\u7167\u3057\u3066\u304A\u308A\u3001\u5404\u516C\u958B\u9375 (\u307E\u305F\u306F\u30A2\u30C9\u30EC\u30B9) \u306B\u306F\u79D8\u5BC6\u9375\u3082\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u79D8\u5BC6\u9375\u306F\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5225\u306E\u6307\u793A\u306B\u7F72\u540D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u79D8\u5BC6\u9375\u3092\u3069\u3053\u304B\u306B\u4FDD\u7BA1\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u7D76\u5BFE\u306B\u304A\u52E7\u3081\u3067\u304D\u307E\u305B\u3093\uFF01

\u3053\u308C\u306F\u3001\u591A\u304F\u306E Solana \u958B\u767A\u8005\u304C\u76F4\u9762\u3059\u308B\u554F\u984C\u3067\u3042\u308A\u3001Map \u306E\u3088\u3046\u306A\u30ED\u30B8\u30C3\u30AF\u3092\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u554F\u984C\u3092\u89E3\u6C7A\u3059\u308B\u65B9\u6CD5\u3092\u3044\u304F\u3064\u304B\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002

Deriving PDAs

',4),h=s("PDA \u306F "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),I=s("\u306E\u7565\u3067\u3001\u8981\u3059\u308B\u306B\u4E00\u9023\u306E\u30B7\u30FC\u30C9\u304B\u3089\u6D3E\u751F\u3057\u305F("),B=n("strong",null,"derived",-1),S=s(")\u30A2\u30C9\u30EC\u30B9\u3068\u30D7\u30ED\u30B0\u30E9\u30E0 ID (\u307E\u305F\u306F\u30A2\u30C9\u30EC\u30B9) \u3067\u3059\u3002"),x=s("PDA \u306E\u30E6\u30CB\u30FC\u30AF\u306A\u70B9\u306F\u3001\u3053\u308C\u3089\u306E\u30A2\u30C9\u30EC\u30B9\u304C\u79D8\u5BC6\u9375\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u306A\u3044\u3053\u3068\u3067\u3059\u3002 \u3053\u308C\u306F\u3001\u3053\u308C\u3089\u306E\u30A2\u30C9\u30EC\u30B9\u304C ED25519 \u66F2\u7DDA\u4E0A\u306B\u306A\u3044\u305F\u3081\u3067\u3059\u3002 \u8A73\u7D30\u306F"),v={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},E=s("\u3053\u3061\u3089"),M=s("."),C=l("

PDA \u3068\u306F\u4F55\u304B\u304C\u308F\u304B\u3063\u305F\u306E\u3067\u3001\u305D\u308C\u3089\u3092\u4F7F\u7528\u3057\u3066\u3044\u304F\u3064\u304B\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30DE\u30C3\u30D4\u30F3\u30B0\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002 \u3053\u308C\u304C\u3069\u306E\u3088\u3046\u306B\u5B9F\u88C5\u3055\u308C\u308B\u304B\u3092\u793A\u3059\u305F\u3081\u306B\u3001\u30D6\u30ED\u30B0 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F8B\u3092\u53D6\u308A\u4E0A\u3052\u307E\u3059\u3002

\u3053\u306E\u30D6\u30ED\u30B0\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u306F\u3001\u5404\u30E6\u30FC\u30B6\u30FC\u306B 1 \u3064\u306E\u30D6\u30ED\u30B0\u3092\u4F5C\u6210\u3057\u3066\u3082\u3089\u3044\u307E\u3059\u3002\u3053\u306E\u30D6\u30ED\u30B0\u306B\u306F\u3001\u4EFB\u610F\u306E\u6570\u306E\u6295\u7A3F\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 \u3053\u308C\u306F\u3001\u5404\u30E6\u30FC\u30B6\u30FC\u3092\u4E00\u3064\u306E\u30D6\u30ED\u30B0\u306B\u30DE\u30C3\u30D4\u30F3\u30B0\u3057\u3001\u8907\u6570\u306E\u6295\u7A3F\u3092\u7279\u5B9A\u306E\u30D6\u30ED\u30B0\u306B\u30DE\u30C3\u30D4\u30F3\u30B0\u3059\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002

\u3064\u307E\u308A\u3001\u30E6\u30FC\u30B6\u30FC\u3068\u30D6\u30ED\u30B0\u306E\u9593\u306B\u306F 1:1 \u306E\u30DE\u30C3\u30D4\u30F3\u30B0\u304C\u3042\u308A\u3001\u30D6\u30ED\u30B0\u3068\u305D\u306E\u6295\u7A3F\u306E\u9593\u306B\u306F 1:N \u306E\u30DE\u30C3\u30D4\u30F3\u30B0\u304C\u3042\u308A\u307E\u3059\u3002

1:1 \u30DE\u30C3\u30D4\u30F3\u30B0\u306E\u5834\u5408\u3001\u30D6\u30ED\u30B0\u306E\u30A2\u30C9\u30EC\u30B9\u3092\u305D\u306E\u30E6\u30FC\u30B6\u30FC\u304B\u3089\u306E\u307F \u53D6\u5F97\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u6A29\u9650 (\u307E\u305F\u306F\u30E6\u30FC\u30B6\u30FC) \u3092\u6307\u5B9A\u3057\u3066\u30D6\u30ED\u30B0\u3092\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002 \u3057\u305F\u304C\u3063\u3066\u3001\u30D6\u30ED\u30B0\u306E\u30B7\u30FC\u30C9\u306F\u3001\u305D\u306E\u6A29\u9650\u306E\u30AD\u30FC\u3068\u3001\u5834\u5408\u306B\u3088\u3063\u3066\u306F\u300C\u30D6\u30ED\u30B0\u300D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3067\u69CB\u6210\u3055\u308C\u3001\u578B\u5225\u5B50\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002 1:N \u30DE\u30C3\u30D4\u30F3\u30B0\u306E\u5834\u5408\u3001\u5404\u6295\u7A3F\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u30D6\u30ED\u30B0\u3060\u3051\u3067\u306A\u304F\u3001\u30D6\u30ED\u30B0\u5185\u306E N \u500B\u306E\u6295\u7A3F\u3092\u533A\u5225\u3067\u304D\u308B\u5225\u306E\u8B58\u5225\u5B50\u304B\u3089\u53D6\u5F97\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 \u4EE5\u4E0B\u306E\u4F8B\u3067\u306F\u3001\u5404\u6295\u7A3F\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u30D6\u30ED\u30B0\u306E\u30AD\u30FC\u3001\u5404\u6295\u7A3F\u3092\u8B58\u5225\u3059\u308B\u305F\u3081\u306E\u30B9\u30E9\u30C3\u30B0\u3001\u304A\u3088\u3073\u30BF\u30A4\u30D7\u8B58\u5225\u5B50\u3068\u3057\u3066\u6A5F\u80FD\u3059\u308B\u300C\u6295\u7A3F\u300D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u304B\u3089\u6D3E\u751F\u3057\u307E\u3059\u3002

\u30B3\u30FC\u30C9\u306F\u4EE5\u4E0B\u306E\u3068\u304A\u308A\u3067\u3059\u3002

",5),R=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("\u30DE\u30C3\u30D7\u306F\u3001"),n("strong",null,"key"),s(" \u3068\u3092\u4F55\u3089\u304B\u306E "),n("strong",null,"value"),s(" \u306B\u95A2\u9023\u4ED8\u3051\u308B\u305F\u3081\u306B\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0\u3067\u3088\u304F\u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u69CB\u9020\u3067\u3059\u3002\u30AD\u30FC\u3068\u5024\u306F\u4EFB\u610F\u306E\u578B\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u3001\u30AD\u30FC\u306F\u4FDD\u5B58\u3055\u308C\u308B\u7279\u5B9A\u306E\u5024\u306E\u8B58\u5225\u5B50\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002 \u6B21\u306B\u3001\u305D\u306E\u30AD\u30FC\u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u3053\u308C\u3089\u306E\u5024\u3092\u52B9\u7387\u7684\u306B\u633F\u5165\u3001\u53D6\u5F97\u3001\u66F4\u65B0\u3067\u304D\u307E\u3059\u3002")],-1),_=s("\u3054\u5B58\u77E5\u306E\u3088\u3046\u306B\u3001Solana \u306E Account \u30E2\u30C7\u30EB\u3067\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF\u3068\u305D\u308C\u306B\u95A2\u9023\u3059\u308B\u72B6\u614B\u30C7\u30FC\u30BF\u3092\u7570\u306A\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306F\u30A2\u30C9\u30EC\u30B9\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u308C\u81EA\u4F53\u304C\u30DE\u30C3\u30D7\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002 Solana \u306EAccount \u30E2\u30FC\u30C9\u306E\u8A73\u7D30\u306B\u3064\u3044\u3066\u306F\u3001"),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u3053\u3061\u3089"),g=s("\u3002"),w=l('

\u305D\u306E\u305F\u3081\u3001\u5024\u3092\u53D6\u5F97\u3059\u308B\u305F\u3081\u306B\u5FC5\u8981\u306A\u30AD\u30FC\u3092\u30A2\u30C9\u30EC\u30B9\u3068\u3057\u3066\u3001\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5024\u3092\u4FDD\u5B58\u3059\u308B\u3053\u3068\u306F\u7406\u306B\u304B\u306A\u3063\u3066\u3044\u307E\u3059\u3002\u3057\u304B\u3057\u3001\u3053\u308C\u306F\u6B21\u306E\u3088\u3046\u306A\u3044\u304F\u3064\u304B\u306E\u554F\u984C\u3092\u5F15\u304D\u8D77\u3053\u3057\u307E\u3059\u3002

  • \u4E0A\u8A18\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u8A18\u61B6\u3057\u3066\u5FC5\u8981\u306A\u5024\u3092\u53D6\u5F97\u3067\u304D\u308B\u7406\u60F3\u7684\u306Akey\u3067\u306F\u306A\u3044\u53EF\u80FD\u6027\u304C\u9AD8\u3044\u3067\u3059\u3002

  • \u4E0A\u8A18\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u7570\u306A\u308B\u9375\u30DA\u30A2\u306E\u516C\u958B\u9375\u3092\u53C2\u7167\u3057\u3066\u304A\u308A\u3001\u5404\u516C\u958B\u9375 (\u307E\u305F\u306F\u30A2\u30C9\u30EC\u30B9) \u306B\u306F\u79D8\u5BC6\u9375\u3082\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u79D8\u5BC6\u9375\u306F\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5225\u306E\u6307\u793A\u306B\u7F72\u540D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u79D8\u5BC6\u9375\u3092\u3069\u3053\u304B\u306B\u4FDD\u7BA1\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u3053\u308C\u306F\u7D76\u5BFE\u306B\u304A\u52E7\u3081\u3067\u304D\u307E\u305B\u3093\uFF01

\u3053\u308C\u306F\u3001\u591A\u304F\u306E Solana \u958B\u767A\u8005\u304C\u76F4\u9762\u3059\u308B\u554F\u984C\u3067\u3042\u308A\u3001Map \u306E\u3088\u3046\u306A\u30ED\u30B8\u30C3\u30AF\u3092\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u5B9F\u88C5\u3057\u3066\u3044\u307E\u3059\u3002\u3053\u306E\u554F\u984C\u3092\u89E3\u6C7A\u3059\u308B\u65B9\u6CD5\u3092\u3044\u304F\u3064\u304B\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002

Deriving PDAs

',4),h=s("PDA \u306F "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),I=s("\u306E\u7565\u3067\u3001\u8981\u3059\u308B\u306B\u4E00\u9023\u306E\u30B7\u30FC\u30C9\u304B\u3089\u6D3E\u751F\u3057\u305F("),B=n("strong",null,"derived",-1),S=s(")\u30A2\u30C9\u30EC\u30B9\u3068\u30D7\u30ED\u30B0\u30E9\u30E0 ID (\u307E\u305F\u306F\u30A2\u30C9\u30EC\u30B9) \u3067\u3059\u3002"),x=s("PDA \u306E\u30E6\u30CB\u30FC\u30AF\u306A\u70B9\u306F\u3001\u3053\u308C\u3089\u306E\u30A2\u30C9\u30EC\u30B9\u304C\u79D8\u5BC6\u9375\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u306A\u3044\u3053\u3068\u3067\u3059\u3002 \u3053\u308C\u306F\u3001\u3053\u308C\u3089\u306E\u30A2\u30C9\u30EC\u30B9\u304C ED25519 \u66F2\u7DDA\u4E0A\u306B\u306A\u3044\u305F\u3081\u3067\u3059\u3002 \u8A73\u7D30\u306F"),v={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},E=s("\u3053\u3061\u3089"),M=s("."),C=l("

PDA \u3068\u306F\u4F55\u304B\u304C\u308F\u304B\u3063\u305F\u306E\u3067\u3001\u305D\u308C\u3089\u3092\u4F7F\u7528\u3057\u3066\u3044\u304F\u3064\u304B\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30DE\u30C3\u30D4\u30F3\u30B0\u3057\u3066\u307F\u307E\u3057\u3087\u3046\u3002 \u3053\u308C\u304C\u3069\u306E\u3088\u3046\u306B\u5B9F\u88C5\u3055\u308C\u308B\u304B\u3092\u793A\u3059\u305F\u3081\u306B\u3001\u30D6\u30ED\u30B0 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F8B\u3092\u53D6\u308A\u4E0A\u3052\u307E\u3059\u3002

\u3053\u306E\u30D6\u30ED\u30B0\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u306F\u3001\u5404\u30E6\u30FC\u30B6\u30FC\u306B 1 \u3064\u306E\u30D6\u30ED\u30B0\u3092\u4F5C\u6210\u3057\u3066\u3082\u3089\u3044\u307E\u3059\u3002\u3053\u306E\u30D6\u30ED\u30B0\u306B\u306F\u3001\u4EFB\u610F\u306E\u6570\u306E\u6295\u7A3F\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 \u3053\u308C\u306F\u3001\u5404\u30E6\u30FC\u30B6\u30FC\u3092\u4E00\u3064\u306E\u30D6\u30ED\u30B0\u306B\u30DE\u30C3\u30D4\u30F3\u30B0\u3057\u3001\u8907\u6570\u306E\u6295\u7A3F\u3092\u7279\u5B9A\u306E\u30D6\u30ED\u30B0\u306B\u30DE\u30C3\u30D4\u30F3\u30B0\u3059\u308B\u3053\u3068\u3092\u610F\u5473\u3057\u307E\u3059\u3002

\u3064\u307E\u308A\u3001\u30E6\u30FC\u30B6\u30FC\u3068\u30D6\u30ED\u30B0\u306E\u9593\u306B\u306F 1:1 \u306E\u30DE\u30C3\u30D4\u30F3\u30B0\u304C\u3042\u308A\u3001\u30D6\u30ED\u30B0\u3068\u305D\u306E\u6295\u7A3F\u306E\u9593\u306B\u306F 1:N \u306E\u30DE\u30C3\u30D4\u30F3\u30B0\u304C\u3042\u308A\u307E\u3059\u3002

1:1 \u30DE\u30C3\u30D4\u30F3\u30B0\u306E\u5834\u5408\u3001\u30D6\u30ED\u30B0\u306E\u30A2\u30C9\u30EC\u30B9\u3092\u305D\u306E\u30E6\u30FC\u30B6\u30FC\u304B\u3089\u306E\u307F \u53D6\u5F97\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u308A\u3001\u6A29\u9650 (\u307E\u305F\u306F\u30E6\u30FC\u30B6\u30FC) \u3092\u6307\u5B9A\u3057\u3066\u30D6\u30ED\u30B0\u3092\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002 \u3057\u305F\u304C\u3063\u3066\u3001\u30D6\u30ED\u30B0\u306E\u30B7\u30FC\u30C9\u306F\u3001\u305D\u306E\u6A29\u9650\u306E\u30AD\u30FC\u3068\u3001\u5834\u5408\u306B\u3088\u3063\u3066\u306F\u300C\u30D6\u30ED\u30B0\u300D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3067\u69CB\u6210\u3055\u308C\u3001\u578B\u5225\u5B50\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002 1:N \u30DE\u30C3\u30D4\u30F3\u30B0\u306E\u5834\u5408\u3001\u5404\u6295\u7A3F\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u30D6\u30ED\u30B0\u3060\u3051\u3067\u306A\u304F\u3001\u30D6\u30ED\u30B0\u5185\u306E N \u500B\u306E\u6295\u7A3F\u3092\u533A\u5225\u3067\u304D\u308B\u5225\u306E\u8B58\u5225\u5B50\u304B\u3089\u53D6\u5F97\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 \u4EE5\u4E0B\u306E\u4F8B\u3067\u306F\u3001\u5404\u6295\u7A3F\u306E\u30A2\u30C9\u30EC\u30B9\u306F\u3001\u30D6\u30ED\u30B0\u306E\u30AD\u30FC\u3001\u5404\u6295\u7A3F\u3092\u8B58\u5225\u3059\u308B\u305F\u3081\u306E\u30B9\u30E9\u30C3\u30B0\u3001\u304A\u3088\u3073\u30BF\u30A4\u30D7\u8B58\u5225\u5B50\u3068\u3057\u3066\u6A5F\u80FD\u3059\u308B\u300C\u6295\u7A3F\u300D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u304B\u3089\u6D3E\u751F\u3057\u307E\u3059\u3002

\u30B3\u30FC\u30C9\u306F\u4EE5\u4E0B\u306E\u3068\u304A\u308A\u3067\u3059\u3002

",5),R=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.47c84b4e.js b/docs/.vuepress/dist/assets/account-maps.html.4343f319.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.47c84b4e.js rename to docs/.vuepress/dist/assets/account-maps.html.4343f319.js index 27ed42464..fc9089e9c 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.47c84b4e.js +++ b/docs/.vuepress/dist/assets/account-maps.html.4343f319.js @@ -1,4 +1,4 @@ -import{_ as u,r as e,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"\u8D26\u6237\u6620\u5C04",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D26\u6237\u6620\u5C04","aria-hidden":"true"},"#"),s(" \u8D26\u6237\u6620\u5C04")],-1),d=n("p",null,"\u5728\u7F16\u7A0B\u4E2D\uFF0C\u6211\u4EEC\u7ECF\u5E38\u4F7F\u7528\u6620\u5C04\uFF08Map\uFF09\u8FD9\u79CD\u6570\u636E\u7ED3\u6784\uFF0C\u5C06\u4E00\u4E2A\u952E\u4E0E\u67D0\u79CD\u503C\u5173\u8054\u8D77\u6765\u3002\u952E\u548C\u503C\u53EF\u4EE5\u662F\u4EFB\u610F\u7C7B\u578B\u7684\u6570\u636E\uFF0C\u952E\u7528\u4F5C\u6807\u8BC6\u8981\u4FDD\u5B58\u7684\u7279\u5B9A\u503C\u7684\u6807\u8BC6\u7B26\u3002\u901A\u8FC7\u952E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u9AD8\u6548\u5730\u63D2\u5165\u3001\u68C0\u7D22\u548C\u66F4\u65B0\u8FD9\u4E9B\u503C\u3002",-1),_=s("\u6B63\u5982\u6211\u4EEC\u6240\u4E86\u89E3\u7684\uFF0CSolana\u7684\u8D26\u6237\u6A21\u578B\u8981\u6C42\u7A0B\u5E8F\u6570\u636E\u548C\u76F8\u5173\u72B6\u6001\u6570\u636E\u5B58\u50A8\u5728\u4E0D\u540C\u7684\u8D26\u6237\u4E2D\u3002\u8FD9\u4E9B\u8D26\u6237\u90FD\u6709\u4E0E\u4E4B\u5173\u8054\u7684\u5730\u5740\uFF0C\u8FD9\u672C\u8EAB\u5C31\u6709\u6620\u5C04\u7684\u4F5C\u7528\uFF01\u5728"),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u8FD9\u91CC"),g=s("\u4E86\u89E3\u66F4\u591A\u5173\u4E8ESolana\u8D26\u6237\u6A21\u578B\u7684\u4FE1\u606F\u3002"),w=n("p",null,"\u56E0\u6B64\uFF0C\u5C06\u503C\u5B58\u50A8\u5728\u5355\u72EC\u7684\u8D26\u6237\u4E2D\uFF0C\u4EE5\u5176\u5730\u5740\u4F5C\u4E3A\u68C0\u7D22\u503C\u6240\u9700\u7684\u952E\u662F\u6709\u610F\u4E49\u7684\u3002\u4F46\u8FD9\u4E5F\u5E26\u6765\u4E86\u4E00\u4E9B\u95EE\u9898\uFF0C\u6BD4\u5982\uFF1A",-1),A=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u5F88\u53EF\u80FD\u4E0D\u662F\u7406\u60F3\u7684\u952E\uFF0C\u4F60\u53EF\u80FD\u96BE\u4EE5\u8BB0\u4F4F\u5E76\u68C0\u7D22\u6240\u9700\u7684\u503C\u3002",-1),h=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u662F\u4E0D\u540CKeypair\u7684\u516C\u94A5\uFF0C\u6BCF\u4E2A\u516C\u94A5\uFF08\u6216\u5730\u5740\uFF09\u90FD\u6709\u4E0E\u4E4B\u5173\u8054\u7684\u79C1\u94A5\u3002\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u4E2A\u79C1\u94A5\u5C06\u7528\u4E8E\u5BF9\u4E0D\u540C\u7684\u6307\u4EE4\u8FDB\u884C\u7B7E\u540D\uFF0C\u8FD9\u610F\u5473\u7740\u6211\u4EEC\u9700\u8981\u5728\u67D0\u4E2A\u5730\u65B9\u5B58\u50A8\u79C1\u94A5\uFF0C\u8FD9\u7EDD\u5BF9\u4E0D\u662F\u63A8\u8350\u7684\u505A\u6CD5\uFF01",-1),P=n("p",null,[s("\u8FD9\u7ED9\u8BB8\u591ASolana\u5F00\u53D1\u8005\u5E26\u6765\u4E86\u4E00\u4E2A\u95EE\u9898\uFF0C\u5373\u5982\u4F55\u5728\u4ED6\u4EEC\u7684\u7A0B\u5E8F\u4E2D\u5B9E\u73B0\u7C7B\u4F3C"),n("code",null,"Map"),s("\u7684\u903B\u8F91\u3002\u8BA9\u6211\u4EEC\u770B\u770B\u51E0\u79CD\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\u7684\u65B9\u6CD5\u3002")],-1),B=n("h2",{id:"\u6D3E\u751Fpda",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6D3E\u751Fpda","aria-hidden":"true"},"#"),s(" \u6D3E\u751FPDA")],-1),I=s("PDA\u7684\u5168\u79F0\u662F\u201C\u7A0B\u5E8F\u6D3E\u751F\u5730\u5740\u201D - "),S={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},x=s("Program Derived Address"),E=s("\uFF0C\u7B80\u800C\u8A00\u4E4B\uFF0C\u5B83\u4EEC\u662F\u4ECE\u4E00\u7EC4\u79CD\u5B50\u548C\u7A0B\u5E8FID\uFF08\u6216\u5730\u5740\uFF09\u6D3E\u751F\u51FA\u6765\u7684\u5730\u5740\u3002"),v=l("

PDAs\u7684\u72EC\u7279\u4E4B\u5904\u5728\u4E8E\uFF0C\u8FD9\u4E9B\u5730\u5740\u4E0D\u4E0E\u4EFB\u4F55\u79C1\u94A5\u76F8\u5173\u8054\u3002\u8FD9\u662F\u56E0\u4E3A\u8FD9\u4E9B\u5730\u5740\u4E0D\u4F4D\u4E8EED25519\u66F2\u7EBF\u4E0A\u3002\u56E0\u6B64\uFF0C\u53EA\u6709\u6D3E\u751F\u6B64\u5730\u5740\u7684\u7A0B\u5E8F\u53EF\u4EE5\u4F7F\u7528\u63D0\u4F9B\u7684\u5BC6\u94A5\u548C\u79CD\u5B50\u5BF9\u6307\u4EE4\u8FDB\u884C\u7B7E\u540D\u3002\u5728\u8FD9\u91CC\u4E86\u89E3\u66F4\u591A\u4FE1\u606F\u3002

\u73B0\u5728\u6211\u4EEC\u5BF9PDAs\u6709\u4E86\u4E00\u4E2A\u6982\u5FF5\uFF0C\u8BA9\u6211\u4EEC\u4F7F\u7528\u5B83\u4EEC\u6765\u6620\u5C04\u4E00\u4E9B\u8D26\u6237\uFF01\u6211\u4EEC\u4EE5\u4E00\u4E2A\u535A\u5BA2\u7A0B\u5E8F\u4F5C\u4E3A\u793A\u4F8B\uFF0C\u6F14\u793A\u5982\u4F55\u5B9E\u73B0\u8FD9\u4E00\u70B9\u3002

\u5728\u8FD9\u4E2A\u535A\u5BA2\u7A0B\u5E8F\u4E2D\uFF0C\u6211\u4EEC\u5E0C\u671B\u6BCF\u4E2AUser\u90FD\u62E5\u6709\u4E00\u4E2ABlog\u3002\u8FD9\u4E2A\u535A\u5BA2\u53EF\u4EE5\u6709\u4EFB\u610F\u6570\u91CF\u7684Posts\u3002\u8FD9\u610F\u5473\u7740\u6211\u4EEC\u5C06\u6BCF\u4E2A\u7528\u6237\u6620\u5C04\u5230\u4E00\u4E2A\u535A\u5BA2\uFF0C\u6BCF\u4E2A\u5E16\u5B50\u6620\u5C04\u5230\u67D0\u4E2A\u535A\u5BA2\u3002

\u7B80\u800C\u8A00\u4E4B\uFF0C\u7528\u6237\u548C\u4ED6/\u5979\u7684\u535A\u5BA2\u4E4B\u95F4\u662F1:1\u7684\u6620\u5C04\uFF0C\u800C\u535A\u5BA2\u548C\u5176\u5E16\u5B50\u4E4B\u95F4\u662F1:N\u7684\u6620\u5C04\u3002

\u5BF9\u4E8E1:1\u7684\u6620\u5C04\uFF0C\u6211\u4EEC\u5E0C\u671B\u4E00\u4E2A\u535A\u5BA2\u7684\u5730\u5740\u4EC5\u4ECE\u5176\u7528\u6237\u6D3E\u751F\uFF0C\u8FD9\u6837\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u5176\u6743\u9650\uFF08\u6216\u7528\u6237\uFF09\u6765\u68C0\u7D22\u535A\u5BA2\u3002\u56E0\u6B64\uFF0C\u535A\u5BA2\u7684\u79CD\u5B50\u5C06\u5305\u62EC\u5176\u6743\u9650\u7684\u5BC6\u94A5\uFF0C\u53EF\u80FD\u8FD8\u6709\u4E00\u4E2A\u524D\u7F00\u535A\u5BA2\uFF0C\u4F5C\u4E3A\u7C7B\u578B\u6807\u8BC6\u7B26\u3002

\u5BF9\u4E8E1:N\u7684\u6620\u5C04\uFF0C\u6211\u4EEC\u5E0C\u671B\u6BCF\u4E2A\u5E16\u5B50\u7684\u5730\u5740\u4E0D\u4EC5\u4ECE\u5B83\u6240\u5173\u8054\u7684\u535A\u5BA2\u6D3E\u751F\uFF0C\u8FD8\u4ECE\u53E6\u4E00\u4E2A\u6807\u8BC6\u7B26\u6D3E\u751F\uFF0C\u4EE5\u533A\u5206\u535A\u5BA2\u4E2D\u7684\u591A\u4E2A\u5E16\u5B50\u3002\u5728\u4E0B\u9762\u7684\u793A\u4F8B\u4E2D\uFF0C\u6BCF\u4E2A\u5E16\u5B50\u7684\u5730\u5740\u662F\u4ECE\u535A\u5BA2\u7684\u5BC6\u94A5\u3001\u4E00\u4E2A\u7528\u4E8E\u6807\u8BC6\u6BCF\u4E2A\u5E16\u5B50\u7684slug\u548C\u4E00\u4E2A\u524D\u7F00\u5E16\u5B50\u6D3E\u751F\u51FA\u6765\u7684\uFF0C\u4F5C\u4E3A\u7C7B\u578B\u6807\u8BC6\u7B26\u3002

\u4EE3\u7801\u5982\u4E0B\u6240\u793A\uFF1A

",7),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as e,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"\u8D26\u6237\u6620\u5C04",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D26\u6237\u6620\u5C04","aria-hidden":"true"},"#"),s(" \u8D26\u6237\u6620\u5C04")],-1),d=n("p",null,"\u5728\u7F16\u7A0B\u4E2D\uFF0C\u6211\u4EEC\u7ECF\u5E38\u4F7F\u7528\u6620\u5C04\uFF08Map\uFF09\u8FD9\u79CD\u6570\u636E\u7ED3\u6784\uFF0C\u5C06\u4E00\u4E2A\u952E\u4E0E\u67D0\u79CD\u503C\u5173\u8054\u8D77\u6765\u3002\u952E\u548C\u503C\u53EF\u4EE5\u662F\u4EFB\u610F\u7C7B\u578B\u7684\u6570\u636E\uFF0C\u952E\u7528\u4F5C\u6807\u8BC6\u8981\u4FDD\u5B58\u7684\u7279\u5B9A\u503C\u7684\u6807\u8BC6\u7B26\u3002\u901A\u8FC7\u952E\uFF0C\u6211\u4EEC\u53EF\u4EE5\u9AD8\u6548\u5730\u63D2\u5165\u3001\u68C0\u7D22\u548C\u66F4\u65B0\u8FD9\u4E9B\u503C\u3002",-1),_=s("\u6B63\u5982\u6211\u4EEC\u6240\u4E86\u89E3\u7684\uFF0CSolana\u7684\u8D26\u6237\u6A21\u578B\u8981\u6C42\u7A0B\u5E8F\u6570\u636E\u548C\u76F8\u5173\u72B6\u6001\u6570\u636E\u5B58\u50A8\u5728\u4E0D\u540C\u7684\u8D26\u6237\u4E2D\u3002\u8FD9\u4E9B\u8D26\u6237\u90FD\u6709\u4E0E\u4E4B\u5173\u8054\u7684\u5730\u5740\uFF0C\u8FD9\u672C\u8EAB\u5C31\u6709\u6620\u5C04\u7684\u4F5C\u7528\uFF01\u5728"),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u8FD9\u91CC"),g=s("\u4E86\u89E3\u66F4\u591A\u5173\u4E8ESolana\u8D26\u6237\u6A21\u578B\u7684\u4FE1\u606F\u3002"),w=n("p",null,"\u56E0\u6B64\uFF0C\u5C06\u503C\u5B58\u50A8\u5728\u5355\u72EC\u7684\u8D26\u6237\u4E2D\uFF0C\u4EE5\u5176\u5730\u5740\u4F5C\u4E3A\u68C0\u7D22\u503C\u6240\u9700\u7684\u952E\u662F\u6709\u610F\u4E49\u7684\u3002\u4F46\u8FD9\u4E5F\u5E26\u6765\u4E86\u4E00\u4E9B\u95EE\u9898\uFF0C\u6BD4\u5982\uFF1A",-1),A=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u5F88\u53EF\u80FD\u4E0D\u662F\u7406\u60F3\u7684\u952E\uFF0C\u4F60\u53EF\u80FD\u96BE\u4EE5\u8BB0\u4F4F\u5E76\u68C0\u7D22\u6240\u9700\u7684\u503C\u3002",-1),h=n("p",null,"*\u4E0A\u8FF0\u5730\u5740\u662F\u4E0D\u540CKeypair\u7684\u516C\u94A5\uFF0C\u6BCF\u4E2A\u516C\u94A5\uFF08\u6216\u5730\u5740\uFF09\u90FD\u6709\u4E0E\u4E4B\u5173\u8054\u7684\u79C1\u94A5\u3002\u5982\u679C\u9700\u8981\uFF0C\u8FD9\u4E2A\u79C1\u94A5\u5C06\u7528\u4E8E\u5BF9\u4E0D\u540C\u7684\u6307\u4EE4\u8FDB\u884C\u7B7E\u540D\uFF0C\u8FD9\u610F\u5473\u7740\u6211\u4EEC\u9700\u8981\u5728\u67D0\u4E2A\u5730\u65B9\u5B58\u50A8\u79C1\u94A5\uFF0C\u8FD9\u7EDD\u5BF9\u4E0D\u662F\u63A8\u8350\u7684\u505A\u6CD5\uFF01",-1),P=n("p",null,[s("\u8FD9\u7ED9\u8BB8\u591ASolana\u5F00\u53D1\u8005\u5E26\u6765\u4E86\u4E00\u4E2A\u95EE\u9898\uFF0C\u5373\u5982\u4F55\u5728\u4ED6\u4EEC\u7684\u7A0B\u5E8F\u4E2D\u5B9E\u73B0\u7C7B\u4F3C"),n("code",null,"Map"),s("\u7684\u903B\u8F91\u3002\u8BA9\u6211\u4EEC\u770B\u770B\u51E0\u79CD\u89E3\u51B3\u8FD9\u4E2A\u95EE\u9898\u7684\u65B9\u6CD5\u3002")],-1),B=n("h2",{id:"\u6D3E\u751Fpda",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6D3E\u751Fpda","aria-hidden":"true"},"#"),s(" \u6D3E\u751FPDA")],-1),I=s("PDA\u7684\u5168\u79F0\u662F\u201C\u7A0B\u5E8F\u6D3E\u751F\u5730\u5740\u201D - "),S={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},x=s("Program Derived Address"),E=s("\uFF0C\u7B80\u800C\u8A00\u4E4B\uFF0C\u5B83\u4EEC\u662F\u4ECE\u4E00\u7EC4\u79CD\u5B50\u548C\u7A0B\u5E8FID\uFF08\u6216\u5730\u5740\uFF09\u6D3E\u751F\u51FA\u6765\u7684\u5730\u5740\u3002"),v=l("

PDAs\u7684\u72EC\u7279\u4E4B\u5904\u5728\u4E8E\uFF0C\u8FD9\u4E9B\u5730\u5740\u4E0D\u4E0E\u4EFB\u4F55\u79C1\u94A5\u76F8\u5173\u8054\u3002\u8FD9\u662F\u56E0\u4E3A\u8FD9\u4E9B\u5730\u5740\u4E0D\u4F4D\u4E8EED25519\u66F2\u7EBF\u4E0A\u3002\u56E0\u6B64\uFF0C\u53EA\u6709\u6D3E\u751F\u6B64\u5730\u5740\u7684\u7A0B\u5E8F\u53EF\u4EE5\u4F7F\u7528\u63D0\u4F9B\u7684\u5BC6\u94A5\u548C\u79CD\u5B50\u5BF9\u6307\u4EE4\u8FDB\u884C\u7B7E\u540D\u3002\u5728\u8FD9\u91CC\u4E86\u89E3\u66F4\u591A\u4FE1\u606F\u3002

\u73B0\u5728\u6211\u4EEC\u5BF9PDAs\u6709\u4E86\u4E00\u4E2A\u6982\u5FF5\uFF0C\u8BA9\u6211\u4EEC\u4F7F\u7528\u5B83\u4EEC\u6765\u6620\u5C04\u4E00\u4E9B\u8D26\u6237\uFF01\u6211\u4EEC\u4EE5\u4E00\u4E2A\u535A\u5BA2\u7A0B\u5E8F\u4F5C\u4E3A\u793A\u4F8B\uFF0C\u6F14\u793A\u5982\u4F55\u5B9E\u73B0\u8FD9\u4E00\u70B9\u3002

\u5728\u8FD9\u4E2A\u535A\u5BA2\u7A0B\u5E8F\u4E2D\uFF0C\u6211\u4EEC\u5E0C\u671B\u6BCF\u4E2AUser\u90FD\u62E5\u6709\u4E00\u4E2ABlog\u3002\u8FD9\u4E2A\u535A\u5BA2\u53EF\u4EE5\u6709\u4EFB\u610F\u6570\u91CF\u7684Posts\u3002\u8FD9\u610F\u5473\u7740\u6211\u4EEC\u5C06\u6BCF\u4E2A\u7528\u6237\u6620\u5C04\u5230\u4E00\u4E2A\u535A\u5BA2\uFF0C\u6BCF\u4E2A\u5E16\u5B50\u6620\u5C04\u5230\u67D0\u4E2A\u535A\u5BA2\u3002

\u7B80\u800C\u8A00\u4E4B\uFF0C\u7528\u6237\u548C\u4ED6/\u5979\u7684\u535A\u5BA2\u4E4B\u95F4\u662F1:1\u7684\u6620\u5C04\uFF0C\u800C\u535A\u5BA2\u548C\u5176\u5E16\u5B50\u4E4B\u95F4\u662F1:N\u7684\u6620\u5C04\u3002

\u5BF9\u4E8E1:1\u7684\u6620\u5C04\uFF0C\u6211\u4EEC\u5E0C\u671B\u4E00\u4E2A\u535A\u5BA2\u7684\u5730\u5740\u4EC5\u4ECE\u5176\u7528\u6237\u6D3E\u751F\uFF0C\u8FD9\u6837\u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u5176\u6743\u9650\uFF08\u6216\u7528\u6237\uFF09\u6765\u68C0\u7D22\u535A\u5BA2\u3002\u56E0\u6B64\uFF0C\u535A\u5BA2\u7684\u79CD\u5B50\u5C06\u5305\u62EC\u5176\u6743\u9650\u7684\u5BC6\u94A5\uFF0C\u53EF\u80FD\u8FD8\u6709\u4E00\u4E2A\u524D\u7F00\u535A\u5BA2\uFF0C\u4F5C\u4E3A\u7C7B\u578B\u6807\u8BC6\u7B26\u3002

\u5BF9\u4E8E1:N\u7684\u6620\u5C04\uFF0C\u6211\u4EEC\u5E0C\u671B\u6BCF\u4E2A\u5E16\u5B50\u7684\u5730\u5740\u4E0D\u4EC5\u4ECE\u5B83\u6240\u5173\u8054\u7684\u535A\u5BA2\u6D3E\u751F\uFF0C\u8FD8\u4ECE\u53E6\u4E00\u4E2A\u6807\u8BC6\u7B26\u6D3E\u751F\uFF0C\u4EE5\u533A\u5206\u535A\u5BA2\u4E2D\u7684\u591A\u4E2A\u5E16\u5B50\u3002\u5728\u4E0B\u9762\u7684\u793A\u4F8B\u4E2D\uFF0C\u6BCF\u4E2A\u5E16\u5B50\u7684\u5730\u5740\u662F\u4ECE\u535A\u5BA2\u7684\u5BC6\u94A5\u3001\u4E00\u4E2A\u7528\u4E8E\u6807\u8BC6\u6BCF\u4E2A\u5E16\u5B50\u7684slug\u548C\u4E00\u4E2A\u524D\u7F00\u5E16\u5B50\u6D3E\u751F\u51FA\u6765\u7684\uFF0C\u4F5C\u4E3A\u7C7B\u578B\u6807\u8BC6\u7B26\u3002

\u4EE3\u7801\u5982\u4E0B\u6240\u793A\uFF1A

",7),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.84595114.js b/docs/.vuepress/dist/assets/account-maps.html.470f6c52.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.84595114.js rename to docs/.vuepress/dist/assets/account-maps.html.470f6c52.js index f5648d037..501c69089 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.84595114.js +++ b/docs/.vuepress/dist/assets/account-maps.html.470f6c52.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"peta-akun",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#peta-akun","aria-hidden":"true"},"#"),s(" Peta Akun")],-1),d=n("p",null,[s("Peta ("),n("em",null,"Maps"),s(") adalah sebuah struktur data yang sering kita gunakan dalam pemrograman untuk mengaitkan sebuah "),n("strong",null,"kunci"),s(" dengan suatu "),n("strong",null,"nilai"),s(". Kunci dan nilai ini dapat bertipe data apa saja. Kunci ini berperan sebagai pengenal dari nilai yang diberikan yang sedang disimpan. Kunci dari peta ini memungkinkan kita untuk memasukkan, mengambil dan memperbarui nilai tersebut secara efisien.")],-1),_=s("Model dari akun Solana seperti yang kita ketahui memerlukan data program dan data posisi saat itu untuk dapat disimpan di akun yang berbeda. Akun tersebut memiliki alamat yang berkaitan dengan diri mereka. Hal ini sendiri sebenarnya merupakan sebuah peta! Pelajari lebih lanjut mengenai model akun solana "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},g=s("disini"),f=s("."),w=l('

Jadi, tentunya masuk akal untuk menyimpan nilai di akun yang berbeda, dengan alamat berperan sebagai kunci yang dibutuhkan untuk mengambil nilainya. Tetapi terdapat beberapa masalah yang muncul akibat metode ini, antara lain

  • Alamat - alamat yang disebutkan di atas kemungkinan besar bukanlah sebuah kunci yang ideal, yang dapat Anda ingat dan gunakan untuk mengambil nilai yang diperlukan.

  • Alamat - alamat yang disebutkan di atas merujuk ke kunci publik dari Pasangan Kunci yang berbeda, dimana setiap kunci publik (atau alamat) memiliki kunci pribadi yang berkaitan dengannya. Kunci pribadi ini akan diperlukan untuk menandatangani instruksi yang berbeda jika dan bila diperlukan, mengharuskan kita untuk menyimpan kunci pribadi di suatu tempat, yang tentunya tidak direkomendasikan!

Ini menghadirkan masalah yang dihadapi banyak pengembang Solana, yang menerapkan logika seperti Peta ke dalam program mereka. Mari kita lihat beberapa cara bagaimana kita akan mengatasi masalah ini,

Menghasilkan PDA

',4),h=s("PDA adalah singkatan dari "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s(", dan secara singkat merupakan alamat - alamat yang "),I=n("strong",null,"diperoleh",-1),S=s(" dari sekumpulan benih, dan id program (atau "),x=n("em",null,"alamat",-1),E=s(")."),v=s("Hal unik tentang PDA adalah, alamat ini "),M=n("strong",null,"tidak",-1),C=s(" terkait dengan kunci pribadi apa pun. Ini karena alamat ini tidak terletak pada kurva ED25519. Oleh karena itu, "),R=n("strong",null,"hanya",-1),T=s(" program dari mana "),D=n("em",null,"alamat",-1),O=s(" ini diturunkan yang dapat menandatangani instruksi dengan kunci tersebut, dengan menyediakan benih juga. Pelajari lebih lanjut tentang ini "),K={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("di sini"),L=s("."),N=l("

Sekarang setelah mengetahui apa itu PDA, mari kita gunakan mereka untuk memetakan beberapa akun! Kita akan mengambil sebuah contoh dari sebuah program Blog untuk mendemonstrasikan bagaimana hal ini dapat diimplementasikan.

Di dalam program Blog ini, kita ingin agar setiap Pengguna untuk memiliki sebuah Blog. Blog ini dapat memiliki sejumlah Artikel. Itu berarti kita memetakan setiap pengguna ke sebuah blog, dan setiap artikel dipetakan ke blog tertentu.

Singkatnya, ada pemetaan 1:1 antara pengguna dan blognya, sedangkan pemetaan 1:N antara blog dan artikelnya.

Untuk pemetaan 1:1, kita ingin alamat blog diturunkan hanya dari penggunanya, yang memungkinkan kita mengambil blog berdasarkan otoritasnya (atau pengguna). Oleh karena itu, benih untuk blog akan terdiri dari kunci otoritas, dan mungkin awalan "blog", untuk bertindak sebagai pengenal tipe.

Untuk pemetaan 1:N, kita ingin setiap alamat artikel diturunkan tidak hanya dari blog yang terkait dengannya, tetapi juga pengidentifikasi lain, yang memungkinkan kita untuk membedakan antara N jumlah artikel di blog. Dalam contoh di bawah ini, setiap alamat artikel diturunkan dari kunci blog, sebuah slug untuk mengidentifikasi setiap postingan, dan awalan "post", untuk bertindak sebagai pengenal tipe.

Untuk kodenya dapat dilihat pada gambar di bawah ini,

",6),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"peta-akun",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#peta-akun","aria-hidden":"true"},"#"),s(" Peta Akun")],-1),d=n("p",null,[s("Peta ("),n("em",null,"Maps"),s(") adalah sebuah struktur data yang sering kita gunakan dalam pemrograman untuk mengaitkan sebuah "),n("strong",null,"kunci"),s(" dengan suatu "),n("strong",null,"nilai"),s(". Kunci dan nilai ini dapat bertipe data apa saja. Kunci ini berperan sebagai pengenal dari nilai yang diberikan yang sedang disimpan. Kunci dari peta ini memungkinkan kita untuk memasukkan, mengambil dan memperbarui nilai tersebut secara efisien.")],-1),_=s("Model dari akun Solana seperti yang kita ketahui memerlukan data program dan data posisi saat itu untuk dapat disimpan di akun yang berbeda. Akun tersebut memiliki alamat yang berkaitan dengan diri mereka. Hal ini sendiri sebenarnya merupakan sebuah peta! Pelajari lebih lanjut mengenai model akun solana "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},g=s("disini"),f=s("."),w=l('

Jadi, tentunya masuk akal untuk menyimpan nilai di akun yang berbeda, dengan alamat berperan sebagai kunci yang dibutuhkan untuk mengambil nilainya. Tetapi terdapat beberapa masalah yang muncul akibat metode ini, antara lain

  • Alamat - alamat yang disebutkan di atas kemungkinan besar bukanlah sebuah kunci yang ideal, yang dapat Anda ingat dan gunakan untuk mengambil nilai yang diperlukan.

  • Alamat - alamat yang disebutkan di atas merujuk ke kunci publik dari Pasangan Kunci yang berbeda, dimana setiap kunci publik (atau alamat) memiliki kunci pribadi yang berkaitan dengannya. Kunci pribadi ini akan diperlukan untuk menandatangani instruksi yang berbeda jika dan bila diperlukan, mengharuskan kita untuk menyimpan kunci pribadi di suatu tempat, yang tentunya tidak direkomendasikan!

Ini menghadirkan masalah yang dihadapi banyak pengembang Solana, yang menerapkan logika seperti Peta ke dalam program mereka. Mari kita lihat beberapa cara bagaimana kita akan mengatasi masalah ini,

Menghasilkan PDA

',4),h=s("PDA adalah singkatan dari "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s(", dan secara singkat merupakan alamat - alamat yang "),I=n("strong",null,"diperoleh",-1),S=s(" dari sekumpulan benih, dan id program (atau "),x=n("em",null,"alamat",-1),E=s(")."),v=s("Hal unik tentang PDA adalah, alamat ini "),M=n("strong",null,"tidak",-1),C=s(" terkait dengan kunci pribadi apa pun. Ini karena alamat ini tidak terletak pada kurva ED25519. Oleh karena itu, "),R=n("strong",null,"hanya",-1),T=s(" program dari mana "),D=n("em",null,"alamat",-1),O=s(" ini diturunkan yang dapat menandatangani instruksi dengan kunci tersebut, dengan menyediakan benih juga. Pelajari lebih lanjut tentang ini "),K={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("di sini"),L=s("."),N=l("

Sekarang setelah mengetahui apa itu PDA, mari kita gunakan mereka untuk memetakan beberapa akun! Kita akan mengambil sebuah contoh dari sebuah program Blog untuk mendemonstrasikan bagaimana hal ini dapat diimplementasikan.

Di dalam program Blog ini, kita ingin agar setiap Pengguna untuk memiliki sebuah Blog. Blog ini dapat memiliki sejumlah Artikel. Itu berarti kita memetakan setiap pengguna ke sebuah blog, dan setiap artikel dipetakan ke blog tertentu.

Singkatnya, ada pemetaan 1:1 antara pengguna dan blognya, sedangkan pemetaan 1:N antara blog dan artikelnya.

Untuk pemetaan 1:1, kita ingin alamat blog diturunkan hanya dari penggunanya, yang memungkinkan kita mengambil blog berdasarkan otoritasnya (atau pengguna). Oleh karena itu, benih untuk blog akan terdiri dari kunci otoritas, dan mungkin awalan "blog", untuk bertindak sebagai pengenal tipe.

Untuk pemetaan 1:N, kita ingin setiap alamat artikel diturunkan tidak hanya dari blog yang terkait dengannya, tetapi juga pengidentifikasi lain, yang memungkinkan kita untuk membedakan antara N jumlah artikel di blog. Dalam contoh di bawah ini, setiap alamat artikel diturunkan dari kunci blog, sebuah slug untuk mengidentifikasi setiap postingan, dan awalan "post", untuk bertindak sebagai pengenal tipe.

Untuk kodenya dapat dilihat pada gambar di bawah ini,

",6),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.84c98fd3.js b/docs/.vuepress/dist/assets/account-maps.html.61211f10.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.84c98fd3.js rename to docs/.vuepress/dist/assets/account-maps.html.61211f10.js index 08e56271b..1a5864c8c 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.84c98fd3.js +++ b/docs/.vuepress/dist/assets/account-maps.html.61211f10.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"mapeamentos-de-conta",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mapeamentos-de-conta","aria-hidden":"true"},"#"),s(" Mapeamentos de Conta")],-1),d=n("p",null,[s("Mapeamentos s\xE3o estruturas de dados que usamos frequentemente na programa\xE7\xE3o para associar uma "),n("strong",null,"chave"),s(" com um "),n("strong",null,"valor"),s(" de algum tipo. A chave e o valor podem ser de qualquer tipo arbitr\xE1rio e a chave atua como um identificador para um determinado valor que est\xE1 sendo salvo. Em seguida, dada sua chave, nos \xE9 permitido inserir, recuperar e atualizar esses valores de forma eficiente.")],-1),_=s("O modelo de conta da Solana, como sabemos, requer que os dados do programa e seus dados de estado relevantes sejam armazenados em contas diferentes. Essas contas t\xEAm um endere\xE7o associado a elas. Isso, por si s\xF3, atua como um mapeamento! Saiba mais sobre o modelo de conta da Solana "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("aqui"),g=s("."),w=l('

Portanto, faria sentido armazenar seus valores em contas separadas, com seu endere\xE7o sendo a chave necess\xE1ria para recuperar o valor. Mas isso traz algumas quest\xF5es, como:

  • Os endere\xE7os mencionados acima provavelmente n\xE3o ser\xE3o chaves ideais, que voc\xEA pode lembrar e recuperar o valor necess\xE1rio.

  • Os endere\xE7os mencionados acima referem-se a chaves p\xFAblicas de diferentes pares de chaves, ou Keypairs, em que cada chave p\xFAblica (ou endere\xE7o) teria uma chave privada associada a ela tamb\xE9m. Essa chave privada seria necess\xE1ria para assinar diferentes instru\xE7\xF5es quando necess\xE1rio, exigindo que armazenemos a chave privada em algum lugar, o que definitivamente n\xE3o \xE9 recomendado!

Isso apresenta um problema que muitos desenvolvedores da Solana enfrentam, que \xE9 implementar uma l\xF3gica semelhante a um Map em seus programas. Vamos analisar algumas maneiras de como lidar com esse problema.

Derivando PDAs

',4),h=s("PDA significa "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Endere\xE7os Derivados de Programa"),v=s(", que s\xE3o, em resumo, endere\xE7os "),I=n("strong",null,"derivados",-1),B=s(" de um conjunto de sementes (seeds) e um ID do programa (ou "),x=n("em",null,"endere\xE7o",-1),S=s(")."),E=s("O aspecto \xFAnico dos PDAs \xE9 que esses endere\xE7os "),M=n("strong",null,"n\xE3o",-1),C=s(" est\xE3o associados a nenhuma chave privada. Isso ocorre porque esses endere\xE7os n\xE3o est\xE3o na curva ED25519. Portanto, "),R=n("strong",null,"apenas",-1),O=s(" o programa do qual este "),T=n("em",null,"endere\xE7o",-1),z=s(" foi derivado pode assinar uma instru\xE7\xE3o com a chave, desde que as sementes tamb\xE9m sejam fornecidas. Saiba mais sobre isso "),D={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},q=s("aqui"),K=s("."),L=l("

Agora que temos uma ideia do que s\xE3o os PDAs, vamos us\xE1-los para mapear algumas contas! Vamos usar um exemplo de um programa de blog para demonstrar como isso seria implementado.

Neste programa de blog, gostar\xEDamos que cada usu\xE1rio (User) tivesse um \xFAnico blog. Este blog pode ter qualquer n\xFAmero de Posts. Isso significa que estamos mapeando cada usu\xE1rio para um blog e cada postagem \xE9 mapeada para um determinado blog.

Em resumo, h\xE1 uma correspond\xEAncia 1:1 entre um usu\xE1rio e seu blog, enquanto uma correspond\xEAncia 1:N entre um blog e suas postagens.

Para a correspond\xEAncia 1:1, gostar\xEDamos que o endere\xE7o de um blog fosse derivado apenas do seu usu\xE1rio, o que nos permitiria recuperar um blog, dada sua autoridade (ou usu\xE1rio). Portanto, as sementes para um blog consistiriam na chave de sua autoridade e possivelmente um prefixo de "blog", para atuar como um identificador de tipo.

Para a correspond\xEAncia 1:N, gostar\xEDamos que o endere\xE7o de cada postagem fosse derivado n\xE3o apenas do blog com o qual est\xE1 associado, mas tamb\xE9m de outro identificador, permitindo-nos diferenciar entre as N postagens no blog. No exemplo abaixo, o endere\xE7o de cada postagem \xE9 derivado da chave do blog, um slug para identificar cada postagem e um prefixo de "post", para atuar como um identificador de tipo.

O c\xF3digo \xE9 mostrado abaixo:

",6),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"mapeamentos-de-conta",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mapeamentos-de-conta","aria-hidden":"true"},"#"),s(" Mapeamentos de Conta")],-1),d=n("p",null,[s("Mapeamentos s\xE3o estruturas de dados que usamos frequentemente na programa\xE7\xE3o para associar uma "),n("strong",null,"chave"),s(" com um "),n("strong",null,"valor"),s(" de algum tipo. A chave e o valor podem ser de qualquer tipo arbitr\xE1rio e a chave atua como um identificador para um determinado valor que est\xE1 sendo salvo. Em seguida, dada sua chave, nos \xE9 permitido inserir, recuperar e atualizar esses valores de forma eficiente.")],-1),_=s("O modelo de conta da Solana, como sabemos, requer que os dados do programa e seus dados de estado relevantes sejam armazenados em contas diferentes. Essas contas t\xEAm um endere\xE7o associado a elas. Isso, por si s\xF3, atua como um mapeamento! Saiba mais sobre o modelo de conta da Solana "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("aqui"),g=s("."),w=l('

Portanto, faria sentido armazenar seus valores em contas separadas, com seu endere\xE7o sendo a chave necess\xE1ria para recuperar o valor. Mas isso traz algumas quest\xF5es, como:

  • Os endere\xE7os mencionados acima provavelmente n\xE3o ser\xE3o chaves ideais, que voc\xEA pode lembrar e recuperar o valor necess\xE1rio.

  • Os endere\xE7os mencionados acima referem-se a chaves p\xFAblicas de diferentes pares de chaves, ou Keypairs, em que cada chave p\xFAblica (ou endere\xE7o) teria uma chave privada associada a ela tamb\xE9m. Essa chave privada seria necess\xE1ria para assinar diferentes instru\xE7\xF5es quando necess\xE1rio, exigindo que armazenemos a chave privada em algum lugar, o que definitivamente n\xE3o \xE9 recomendado!

Isso apresenta um problema que muitos desenvolvedores da Solana enfrentam, que \xE9 implementar uma l\xF3gica semelhante a um Map em seus programas. Vamos analisar algumas maneiras de como lidar com esse problema.

Derivando PDAs

',4),h=s("PDA significa "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Endere\xE7os Derivados de Programa"),v=s(", que s\xE3o, em resumo, endere\xE7os "),I=n("strong",null,"derivados",-1),B=s(" de um conjunto de sementes (seeds) e um ID do programa (ou "),x=n("em",null,"endere\xE7o",-1),S=s(")."),E=s("O aspecto \xFAnico dos PDAs \xE9 que esses endere\xE7os "),M=n("strong",null,"n\xE3o",-1),C=s(" est\xE3o associados a nenhuma chave privada. Isso ocorre porque esses endere\xE7os n\xE3o est\xE3o na curva ED25519. Portanto, "),R=n("strong",null,"apenas",-1),O=s(" o programa do qual este "),T=n("em",null,"endere\xE7o",-1),z=s(" foi derivado pode assinar uma instru\xE7\xE3o com a chave, desde que as sementes tamb\xE9m sejam fornecidas. Saiba mais sobre isso "),D={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},q=s("aqui"),K=s("."),L=l("

Agora que temos uma ideia do que s\xE3o os PDAs, vamos us\xE1-los para mapear algumas contas! Vamos usar um exemplo de um programa de blog para demonstrar como isso seria implementado.

Neste programa de blog, gostar\xEDamos que cada usu\xE1rio (User) tivesse um \xFAnico blog. Este blog pode ter qualquer n\xFAmero de Posts. Isso significa que estamos mapeando cada usu\xE1rio para um blog e cada postagem \xE9 mapeada para um determinado blog.

Em resumo, h\xE1 uma correspond\xEAncia 1:1 entre um usu\xE1rio e seu blog, enquanto uma correspond\xEAncia 1:N entre um blog e suas postagens.

Para a correspond\xEAncia 1:1, gostar\xEDamos que o endere\xE7o de um blog fosse derivado apenas do seu usu\xE1rio, o que nos permitiria recuperar um blog, dada sua autoridade (ou usu\xE1rio). Portanto, as sementes para um blog consistiriam na chave de sua autoridade e possivelmente um prefixo de "blog", para atuar como um identificador de tipo.

Para a correspond\xEAncia 1:N, gostar\xEDamos que o endere\xE7o de cada postagem fosse derivado n\xE3o apenas do blog com o qual est\xE1 associado, mas tamb\xE9m de outro identificador, permitindo-nos diferenciar entre as N postagens no blog. No exemplo abaixo, o endere\xE7o de cada postagem \xE9 derivado da chave do blog, um slug para identificar cada postagem e um prefixo de "post", para atuar como um identificador de tipo.

O c\xF3digo \xE9 mostrado abaixo:

",6),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.2bc51567.js b/docs/.vuepress/dist/assets/account-maps.html.680b0ba3.js similarity index 90% rename from docs/.vuepress/dist/assets/account-maps.html.2bc51567.js rename to docs/.vuepress/dist/assets/account-maps.html.680b0ba3.js index dfba9e66a..2c6ec06d7 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.2bc51567.js +++ b/docs/.vuepress/dist/assets/account-maps.html.680b0ba3.js @@ -1 +1 @@ -const t={key:"v-02feff2d",path:"/vi/guides/account-maps.html",title:"Account Maps",lang:"vi-VN",frontmatter:{title:"Account Maps",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | Account Maps"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | Account Maps"}],["meta",{name:"description",content:"Account Map l\xE0 m\u1ED9t ki\u1EC3u c\u1EA5u tr\xFAc d\u1EEF li\u1EC7u h\u1EEFu \xEDch v\xE0 th\u01B0\u1EDDng d\xF9ng trong l\u1EADp tr\xECnh Solana. Chi ti\u1EBFt v\u1EC1 N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Account Map v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:description",content:"Account Map l\xE0 m\u1ED9t ki\u1EC3u c\u1EA5u tr\xFAc d\u1EEF li\u1EC7u h\u1EEFu \xEDch v\xE0 th\u01B0\u1EDDng d\xF9ng trong l\u1EADp tr\xECnh Solana. Chi ti\u1EBFt v\u1EC1 N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Account Map v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"T\xECm PDA",slug:"tim-pda",children:[]},{level:2,title:"Map b\u1EB1ng Account \u0111\u01A1n",slug:"map-bang-account-\u0111on",children:[]}],git:{updatedTime:1677551527e3,contributors:[{name:"Tr\u1EA7n Minh Quang",email:"quangtmps12135@fpt.edu.vn",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/guides/account-maps.md"};export{t as data}; +const t={key:"v-02feff2d",path:"/vi/guides/account-maps.html",title:"Account Maps",lang:"vi-VN",frontmatter:{title:"Account Maps",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | Account Maps"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | Account Maps"}],["meta",{name:"description",content:"Account Map l\xE0 m\u1ED9t ki\u1EC3u c\u1EA5u tr\xFAc d\u1EEF li\u1EC7u h\u1EEFu \xEDch v\xE0 th\u01B0\u1EDDng d\xF9ng trong l\u1EADp tr\xECnh Solana. Chi ti\u1EBFt v\u1EC1 N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Account Map v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:description",content:"Account Map l\xE0 m\u1ED9t ki\u1EC3u c\u1EA5u tr\xFAc d\u1EEF li\u1EC7u h\u1EEFu \xEDch v\xE0 th\u01B0\u1EDDng d\xF9ng trong l\u1EADp tr\xECnh Solana. Chi ti\u1EBFt v\u1EC1 N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Account Map v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"T\xECm PDA",slug:"tim-pda",children:[]},{level:2,title:"Map b\u1EB1ng Account \u0111\u01A1n",slug:"map-bang-account-\u0111on",children:[]}],git:{updatedTime:1714582408e3,contributors:[{name:"Tr\u1EA7n Minh Quang",email:"quangtmps12135@fpt.edu.vn",commits:1},{name:"lainhathoang",email:"nhathoang8c01@gmail.com",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/guides/account-maps.md"};export{t as data}; diff --git a/docs/.vuepress/dist/assets/account-maps.html.cd84fe7b.js b/docs/.vuepress/dist/assets/account-maps.html.9f7ded52.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.cd84fe7b.js rename to docs/.vuepress/dist/assets/account-maps.html.9f7ded52.js index dbe2f0dc6..1cc442b47 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.cd84fe7b.js +++ b/docs/.vuepress/dist/assets/account-maps.html.9f7ded52.js @@ -1,4 +1,4 @@ -import{_ as u,r as c,o as r,c as i,a as n,b as t,w as a,F as k,e as p,d as s}from"./app.07ce7a66.js";const b={},m=p('

Kontozuordnungen

Zuordnungen (Maps) sind Datenstrukturen, die wir h\xE4ufig beim Programmieren verwenden, um einen Schl\xFCssel mit einem Wert irgendeiner Art zu verkn\xFCpfen. Der Schl\xFCssel und der Wert k\xF6nnen von jedem beliebigen Typ sein, und der Schl\xFCssel dient als Kennung f\xFCr einen bestimmten Wert, der gespeichert wird. Es erm\xF6glicht uns dann, angesichts seines Schl\xFCssels, diese Werte effizient einzuf\xFCgen, abzurufen und zu aktualisieren.

Wie wir wissen, erfordert das Kontomodell von Solana, dass Programmdaten und ihre relevanten Zustandsdaten in verschiedenen Konten gespeichert werden. Diesen Konten ist eine Adresse zugeordnet. Dies dient an sich als Karte! Erfahren Sie [hier][AccountCookbook] mehr \xFCber den Kontomodus von Solana.

Es w\xE4re also sinnvoll, Ihre Werte in separaten Konten zu speichern, wobei deren Adresse der Schl\xFCssel ist, der zum Abrufen des Werts erforderlich ist. Aber das bringt ein paar Probleme mit sich, wie z.B.

  • Die oben genannten Adressen sind h\xF6chstwahrscheinlich keine idealen Schl\xFCssel, an die Sie sich erinnern und den erforderlichen Wert abrufen k\xF6nnten.

  • Die oben erw\xE4hnten Adressen beziehen sich auf \xF6ffentliche Schl\xFCssel verschiedener Schl\xFCsselpaare, wobei jedem \xF6ffentlichen Schl\xFCssel (oder Adresse) auch ein privater Schl\xFCssel zugeordnet w\xE4re. Dieser private Schl\xFCssel m\xFCsste bei Bedarf verschiedene Anweisungen unterzeichnen, sodass wir den privaten Schl\xFCssel irgendwo speichern m\xFCssen, was definitiv nicht empfohlen wird!

Dies stellt ein Problem dar, mit dem viele Solana-Entwickler konfrontiert sind, n\xE4mlich das Implementieren einer "Map"-\xE4hnlichen Logik in ihre Programme. Schauen wir uns ein paar M\xF6glichkeiten an, wie wir dieses Problem angehen w\xFCrden.

Ableitende PDAs

',7),d=s("PDA steht f\xFCr "),_={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},f=s("Program Derived Address"),y=s(", und sind kurz gesagt Adressen "),g=n("strong",null,"abgeleitet",-1),w=s(" von einer Reihe von Seeds und einer Programm-ID (oder "),h=n("em",null,"address",-1),A=s(")."),P=s("The unique thing about PDAs is that, these addresses are "),B=n("strong",null,"not",-1),S=s(" associated with any private key. This is because these addresses do not lie on the ED25519 curve. Hence, "),I=n("strong",null,"only",-1),v=s(" the program, from which this "),x=n("em",null,"address",-1),E=s(" was derived, can sign an instruction with the key, provided the seeds as well. Learn more about this "),z={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},M=s("here"),C=s("."),D=p("

Nachdem wir nun eine Vorstellung davon haben, was PDAs sind, verwenden wir sie, um einige Konten zuzuordnen! Wir nehmen ein Beispiel eines Blog-Programms, um zu demonstrieren, wie dies implementiert werden w\xFCrde.

In diesem Blog-Programm m\xF6chten wir, dass jeder \u201EBenutzer\u201C einen einzigen \u201EBlog\u201C hat. Dieser Blog kann beliebig viele Beitr\xE4ge haben. Das w\xFCrde bedeuten, dass wir jeden Benutzer einem Blog zuordnen und jeder Beitrag einem bestimmten Blog zugeordnet wird.

Kurz gesagt, es gibt eine 1:1-Zuordnung zwischen einem Benutzer und seinem/ihrem Blog, w\xE4hrend eine 1:N-Zuordnung zwischen einem Blog und seinen Beitr\xE4gen besteht.

F\xFCr die 1:1-Zuordnung m\xF6chten wir, dass die Adresse eines Blogs nur von seinem Benutzer abgeleitet wird, was es uns erm\xF6glichen w\xFCrde, ein Blog abzurufen, wenn seine Autorit\xE4t (oder user) gegeben ist. Daher w\xFCrden die Schl\xFCssel f\xFCr einrn Blog aus dem Schl\xFCssel seiner Autorit\xE4t und m\xF6glicherweise einem Pr\xE4fix von "Blog" bestehen, das als Typidentifizierer fungiert.

For the 1:N mapping, we would want each post's address to be derived not only from the blog which it is associated with, but also another identifier, allowing us to differentiate between the N number of posts in the blog. In the example below, each post's address is derived from the blog's key, a slug to identify each post, and a prefix of "post", to act as a type identifier.

Der Code ist wie unten gezeigt,

",6),R=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as c,o as r,c as i,a as n,b as t,w as a,F as k,e as p,d as s}from"./app.d411e3b3.js";const b={},m=p('

Kontozuordnungen

Zuordnungen (Maps) sind Datenstrukturen, die wir h\xE4ufig beim Programmieren verwenden, um einen Schl\xFCssel mit einem Wert irgendeiner Art zu verkn\xFCpfen. Der Schl\xFCssel und der Wert k\xF6nnen von jedem beliebigen Typ sein, und der Schl\xFCssel dient als Kennung f\xFCr einen bestimmten Wert, der gespeichert wird. Es erm\xF6glicht uns dann, angesichts seines Schl\xFCssels, diese Werte effizient einzuf\xFCgen, abzurufen und zu aktualisieren.

Wie wir wissen, erfordert das Kontomodell von Solana, dass Programmdaten und ihre relevanten Zustandsdaten in verschiedenen Konten gespeichert werden. Diesen Konten ist eine Adresse zugeordnet. Dies dient an sich als Karte! Erfahren Sie [hier][AccountCookbook] mehr \xFCber den Kontomodus von Solana.

Es w\xE4re also sinnvoll, Ihre Werte in separaten Konten zu speichern, wobei deren Adresse der Schl\xFCssel ist, der zum Abrufen des Werts erforderlich ist. Aber das bringt ein paar Probleme mit sich, wie z.B.

  • Die oben genannten Adressen sind h\xF6chstwahrscheinlich keine idealen Schl\xFCssel, an die Sie sich erinnern und den erforderlichen Wert abrufen k\xF6nnten.

  • Die oben erw\xE4hnten Adressen beziehen sich auf \xF6ffentliche Schl\xFCssel verschiedener Schl\xFCsselpaare, wobei jedem \xF6ffentlichen Schl\xFCssel (oder Adresse) auch ein privater Schl\xFCssel zugeordnet w\xE4re. Dieser private Schl\xFCssel m\xFCsste bei Bedarf verschiedene Anweisungen unterzeichnen, sodass wir den privaten Schl\xFCssel irgendwo speichern m\xFCssen, was definitiv nicht empfohlen wird!

Dies stellt ein Problem dar, mit dem viele Solana-Entwickler konfrontiert sind, n\xE4mlich das Implementieren einer "Map"-\xE4hnlichen Logik in ihre Programme. Schauen wir uns ein paar M\xF6glichkeiten an, wie wir dieses Problem angehen w\xFCrden.

Ableitende PDAs

',7),d=s("PDA steht f\xFCr "),_={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},f=s("Program Derived Address"),y=s(", und sind kurz gesagt Adressen "),g=n("strong",null,"abgeleitet",-1),w=s(" von einer Reihe von Seeds und einer Programm-ID (oder "),h=n("em",null,"address",-1),A=s(")."),P=s("The unique thing about PDAs is that, these addresses are "),B=n("strong",null,"not",-1),S=s(" associated with any private key. This is because these addresses do not lie on the ED25519 curve. Hence, "),I=n("strong",null,"only",-1),v=s(" the program, from which this "),x=n("em",null,"address",-1),E=s(" was derived, can sign an instruction with the key, provided the seeds as well. Learn more about this "),z={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},M=s("here"),C=s("."),D=p("

Nachdem wir nun eine Vorstellung davon haben, was PDAs sind, verwenden wir sie, um einige Konten zuzuordnen! Wir nehmen ein Beispiel eines Blog-Programms, um zu demonstrieren, wie dies implementiert werden w\xFCrde.

In diesem Blog-Programm m\xF6chten wir, dass jeder \u201EBenutzer\u201C einen einzigen \u201EBlog\u201C hat. Dieser Blog kann beliebig viele Beitr\xE4ge haben. Das w\xFCrde bedeuten, dass wir jeden Benutzer einem Blog zuordnen und jeder Beitrag einem bestimmten Blog zugeordnet wird.

Kurz gesagt, es gibt eine 1:1-Zuordnung zwischen einem Benutzer und seinem/ihrem Blog, w\xE4hrend eine 1:N-Zuordnung zwischen einem Blog und seinen Beitr\xE4gen besteht.

F\xFCr die 1:1-Zuordnung m\xF6chten wir, dass die Adresse eines Blogs nur von seinem Benutzer abgeleitet wird, was es uns erm\xF6glichen w\xFCrde, ein Blog abzurufen, wenn seine Autorit\xE4t (oder user) gegeben ist. Daher w\xFCrden die Schl\xFCssel f\xFCr einrn Blog aus dem Schl\xFCssel seiner Autorit\xE4t und m\xF6glicherweise einem Pr\xE4fix von "Blog" bestehen, das als Typidentifizierer fungiert.

For the 1:N mapping, we would want each post's address to be derived not only from the blog which it is associated with, but also another identifier, allowing us to differentiate between the N number of posts in the blog. In the example below, each post's address is derived from the blog's key, a slug to identify each post, and a prefix of "post", to act as a type identifier.

Der Code ist wie unten gezeigt,

",6),R=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.573ed2b1.js b/docs/.vuepress/dist/assets/account-maps.html.b6d2a040.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.573ed2b1.js rename to docs/.vuepress/dist/assets/account-maps.html.b6d2a040.js index 7d5c756b5..23897bd6b 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.573ed2b1.js +++ b/docs/.vuepress/dist/assets/account-maps.html.b6d2a040.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("Maps \u0E04\u0E37\u0E2D data structures \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E43\u0E0A\u0E49\u0E1A\u0E48\u0E2D\u0E22\u0E46 \u0E15\u0E2D\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19 program \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A "),n("strong",null,"key"),s(" \u0E41\u0E25\u0E30 "),n("strong",null,"value"),s(" \u0E02\u0E2D\u0E07\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07.\u0E0B\u0E36\u0E48\u0E07 value \u0E2D\u0E32\u0E08\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 type \u0E2D\u0E30\u0E44\u0E23\u0E01\u0E47\u0E44\u0E14\u0E49 \u0E2A\u0E48\u0E27\u0E19 key \u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 identifier \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A value \u0E19\u0E31\u0E49\u0E19\u0E46 \u0E01\u0E32\u0E23\u0E21\u0E35 key \u0E01\u0E47\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E17\u0E23\u0E01 (insert), \u0E2D\u0E48\u0E32\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32 (retrieve) \u0E41\u0E25\u0E30 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 (update) values \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E14\u0E49\u0E2A\u0E30\u0E14\u0E27\u0E01")],-1),_=s("\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E23\u0E39\u0E49 \u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E02\u0E2D\u0E07 Solana's Account \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 program data \u0E41\u0E25\u0E30 state data \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E40\u0E01\u0E47\u0E1A\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19 accounts \u0E41\u0E22\u0E01\u0E01\u0E31\u0E19 \u0E0B\u0E36\u0E48\u0E07\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48 accounts \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E21\u0E35 address associated \u0E2D\u0E22\u0E39\u0E48\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E21\u0E31\u0E19\u0E21\u0E35\u0E25\u0E31\u0E01\u0E29\u0E13\u0E30\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 map \u0E19\u0E31\u0E48\u0E19\u0E40\u0E2D\u0E07! \u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A Solana's Account mode "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),g=s("."),w=l('

\u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E21\u0E31\u0E19\u0E01\u0E47\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E2A\u0E21\u0E41\u0E25\u0E49\u0E27\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A values \u0E44\u0E27\u0E49\u0E43\u0E19 accounts \u0E41\u0E22\u0E01 \u0E42\u0E14\u0E22\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 address \u0E40\u0E1B\u0E47\u0E19 key \u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07 value \u0E2D\u0E2D\u0E01\u0E21\u0E32. \u0E41\u0E15\u0E48\u0E21\u0E31\u0E19\u0E01\u0E47\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E15\u0E32\u0E21\u0E21\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E49\u0E32\u0E07\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E19 \u0E40\u0E0A\u0E48\u0E19,

  • \u0E1E\u0E2D\u0E43\u0E0A\u0E49 addresses \u0E40\u0E1B\u0E47\u0E19 keys \u0E41\u0E25\u0E49\u0E27\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E08\u0E33\u0E22\u0E32\u0E01

  • \u0E1E\u0E2D\u0E43\u0E0A\u0E49 addresses \u0E01\u0E47\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E23\u0E39\u0E49\u0E27\u0E48\u0E32 public keys \u0E02\u0E2D\u0E07 Keypairs \u0E08\u0E30\u0E21\u0E35 public key (\u0E2B\u0E23\u0E37\u0E2D address) \u0E41\u0E25\u0E30 private key \u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E27\u0E22 \u0E0B\u0E36\u0E48\u0E07 private key \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49 sign instructions \u0E15\u0E48\u0E32\u0E07\u0E46 \u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23, \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E01\u0E47\u0E1A private key \u0E44\u0E27\u0E49\u0E14\u0E49\u0E27\u0E22 \u0E0B\u0E36\u0E48\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E17\u0E32\u0E07\u0E17\u0E35\u0E48\u0E14\u0E35 \u0E41\u0E19\u0E48\u0E46!

\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E49\u0E35\u0E40\u0E1B\u0E47\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E17\u0E35\u0E48\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 Solana \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E08\u0E2D\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 Map \u0E43\u0E19 programs \u0E40\u0E23\u0E32\u0E25\u0E2D\u0E07\u0E21\u0E32\u0E14\u0E39\u0E17\u0E32\u0E07\u0E41\u0E01\u0E49\u0E01\u0E31\u0E19\u0E14\u0E35\u0E01\u0E27\u0E48\u0E32

Deriving PDAs

',4),h=s("PDA \u0E22\u0E48\u0E2D\u0E21\u0E32\u0E08\u0E32\u0E01 "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s(", \u0E41\u0E25\u0E30\u0E2A\u0E31\u0E49\u0E19\u0E46 \u0E04\u0E37\u0E2D addresses "),I=n("strong",null,"\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14 (derived)",-1),S=s(" \u0E08\u0E32\u0E01 seeds \u0E41\u0E25\u0E30 a program id (\u0E2B\u0E23\u0E37\u0E2D "),v=n("em",null,"address",-1),x=s(")."),E=s("\u0E17\u0E35\u0E48\u0E1E\u0E34\u0E40\u0E28\u0E29\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A PDAs \u0E04\u0E37\u0E2D addresses \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E08\u0E30"),M=n("strong",null,"\u0E44\u0E21\u0E48",-1),C=s("\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A private key \u0E43\u0E14\u0E46 \u0E17\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E23\u0E32\u0E30 addresses \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 ED25519 curve \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E08\u0E30\u0E21\u0E35 "),R=n("strong",null,"\u0E40\u0E09\u0E1E\u0E32\u0E30",-1),T=s(" program \u0E17\u0E35\u0E48 "),D=n("em",null,"address",-1),O=s(" \u0E19\u0E35\u0E49\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14\u0E21\u0E32\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19\u0E16\u0E36\u0E07\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign instruction \u0E19\u0E35\u0E49\u0E14\u0E49\u0E27\u0E22 key \u0E44\u0E14\u0E49 \u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E1A seeds \u0E17\u0E35\u0E48\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E44\u0E27\u0E49 \u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49\u0E44\u0E14\u0E49 "),K={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),L=s("."),N=l("

\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E01\u0E47\u0E44\u0E14\u0E49\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E01\u0E31\u0E1A PDAs \u0E41\u0E25\u0E49\u0E27\u0E27\u0E48\u0E32\u0E21\u0E31\u0E19\u0E04\u0E37\u0E2D\u0E2D\u0E30\u0E44\u0E23, \u0E21\u0E32\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E1E\u0E27\u0E01\u0E21\u0E31\u0E19\u0E43\u0E19\u0E01\u0E32\u0E23 map accounts \u0E01\u0E31\u0E19\u0E40\u0E16\u0E2D\u0E30! \u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E08\u0E32\u0E01 Blog program \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E21\u0E31\u0E19\u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07

\u0E43\u0E19 Blog program \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49\u0E41\u0E15\u0E48\u0E25\u0E30 User \u0E21\u0E35 Blog \u0E04\u0E19\u0E25\u0E30\u0E15\u0E31\u0E27 \u0E41\u0E25\u0E30 blog \u0E19\u0E35\u0E49\u0E08\u0E30\u0E21\u0E35\u0E44\u0E14\u0E49\u0E2B\u0E25\u0E32\u0E22 Posts \u0E19\u0E31\u0E48\u0E19\u0E2B\u0E21\u0E32\u0E22\u0E04\u0E27\u0E32\u0E21\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33\u0E01\u0E32\u0E23 mapping \u0E41\u0E15\u0E48\u0E25\u0E30 user \u0E44\u0E1B\u0E17\u0E35\u0E48 blog \u0E41\u0E25\u0E30\u0E41\u0E15\u0E48\u0E25\u0E30 post \u0E08\u0E30\u0E21\u0E35\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E04\u0E2D\u0E22 mapped \u0E44\u0E1B\u0E17\u0E35\u0E48 blog

\u0E1E\u0E39\u0E14\u0E2A\u0E31\u0E49\u0E19\u0E46 \u0E01\u0E47\u0E04\u0E37\u0E2D, \u0E21\u0E35 1:1 mapping \u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 user \u0E01\u0E31\u0E1A blog \u0E41\u0E25\u0E30 1:N mapping \u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 blog \u0E01\u0E31\u0E1A posts.

\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A 1:1 mapping, \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49 blog address \u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14\u0E21\u0E32\u0E08\u0E32\u0E01 user \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19, \u0E08\u0E30\u0E44\u0E14\u0E49\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E14\u0E36\u0E07 blog \u0E44\u0E14\u0E49\u0E15\u0E32\u0E21 authority (\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E32\u0E21 user \u0E19\u0E31\u0E48\u0E19\u0E40\u0E2D\u0E07). \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19 seed \u0E08\u0E36\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 authority's key \u0E41\u0E25\u0E30\u0E04\u0E27\u0E23\u0E08\u0E30\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "blog" \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 (type identifier)

\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A 1:N mapping, \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49\u0E41\u0E15\u0E48\u0E25\u0E30 post address \u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14\u0E44\u0E14\u0E49\u0E08\u0E32\u0E01 \u0E2B\u0E25\u0E32\u0E22\u0E46 blog \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07 \u0E41\u0E15\u0E48\u0E43\u0E0A\u0E49\u0E04\u0E19\u0E25\u0E30 identifier, \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E08\u0E30\u0E44\u0E14\u0E49\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 posts \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E17\u0E38\u0E01\u0E46 N posts \u0E43\u0E19 blog \u0E25\u0E2D\u0E07\u0E14\u0E39\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32\u0E43\u0E19\u0E41\u0E15\u0E48\u0E25\u0E30 post address \u0E08\u0E30\u0E16\u0E39\u0E01\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14 (derived from) \u200B\u0E21\u0E32\u0E08\u0E32\u0E01 blog's key, slug \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E08\u0E33\u0E41\u0E19\u0E01\u0E41\u0E15\u0E48\u0E48\u0E25\u0E30 post, \u0E41\u0E25\u0E30\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "post" \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 (type identifier) \u0E2D\u0E35\u0E01\u0E17\u0E35\u0E19\u0E36\u0E07.

\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 code \u0E2D\u0E22\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07,

",6),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("Maps \u0E04\u0E37\u0E2D data structures \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E43\u0E0A\u0E49\u0E1A\u0E48\u0E2D\u0E22\u0E46 \u0E15\u0E2D\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19 program \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A "),n("strong",null,"key"),s(" \u0E41\u0E25\u0E30 "),n("strong",null,"value"),s(" \u0E02\u0E2D\u0E07\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07.\u0E0B\u0E36\u0E48\u0E07 value \u0E2D\u0E32\u0E08\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 type \u0E2D\u0E30\u0E44\u0E23\u0E01\u0E47\u0E44\u0E14\u0E49 \u0E2A\u0E48\u0E27\u0E19 key \u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 identifier \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A value \u0E19\u0E31\u0E49\u0E19\u0E46 \u0E01\u0E32\u0E23\u0E21\u0E35 key \u0E01\u0E47\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E17\u0E23\u0E01 (insert), \u0E2D\u0E48\u0E32\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32 (retrieve) \u0E41\u0E25\u0E30 \u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 (update) values \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E14\u0E49\u0E2A\u0E30\u0E14\u0E27\u0E01")],-1),_=s("\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E23\u0E39\u0E49 \u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E02\u0E2D\u0E07 Solana's Account \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 program data \u0E41\u0E25\u0E30 state data \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E40\u0E01\u0E47\u0E1A\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19 accounts \u0E41\u0E22\u0E01\u0E01\u0E31\u0E19 \u0E0B\u0E36\u0E48\u0E07\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48 accounts \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E21\u0E35 address associated \u0E2D\u0E22\u0E39\u0E48\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E21\u0E31\u0E19\u0E21\u0E35\u0E25\u0E31\u0E01\u0E29\u0E13\u0E30\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 map \u0E19\u0E31\u0E48\u0E19\u0E40\u0E2D\u0E07! \u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A Solana's Account mode "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),g=s("."),w=l('

\u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E21\u0E31\u0E19\u0E01\u0E47\u0E40\u0E2B\u0E21\u0E32\u0E30\u0E2A\u0E21\u0E41\u0E25\u0E49\u0E27\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A values \u0E44\u0E27\u0E49\u0E43\u0E19 accounts \u0E41\u0E22\u0E01 \u0E42\u0E14\u0E22\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 address \u0E40\u0E1B\u0E47\u0E19 key \u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E36\u0E07 value \u0E2D\u0E2D\u0E01\u0E21\u0E32. \u0E41\u0E15\u0E48\u0E21\u0E31\u0E19\u0E01\u0E47\u0E21\u0E35\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E15\u0E32\u0E21\u0E21\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E49\u0E32\u0E07\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E19 \u0E40\u0E0A\u0E48\u0E19,

  • \u0E1E\u0E2D\u0E43\u0E0A\u0E49 addresses \u0E40\u0E1B\u0E47\u0E19 keys \u0E41\u0E25\u0E49\u0E27\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E08\u0E33\u0E22\u0E32\u0E01

  • \u0E1E\u0E2D\u0E43\u0E0A\u0E49 addresses \u0E01\u0E47\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E23\u0E39\u0E49\u0E27\u0E48\u0E32 public keys \u0E02\u0E2D\u0E07 Keypairs \u0E08\u0E30\u0E21\u0E35 public key (\u0E2B\u0E23\u0E37\u0E2D address) \u0E41\u0E25\u0E30 private key \u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E14\u0E49\u0E27\u0E22 \u0E0B\u0E36\u0E48\u0E07 private key \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49 sign instructions \u0E15\u0E48\u0E32\u0E07\u0E46 \u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23, \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E01\u0E47\u0E1A private key \u0E44\u0E27\u0E49\u0E14\u0E49\u0E27\u0E22 \u0E0B\u0E36\u0E48\u0E07 \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E17\u0E32\u0E07\u0E17\u0E35\u0E48\u0E14\u0E35 \u0E41\u0E19\u0E48\u0E46!

\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E49\u0E35\u0E40\u0E1B\u0E47\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E17\u0E35\u0E48\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 Solana \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E08\u0E2D\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 Map \u0E43\u0E19 programs \u0E40\u0E23\u0E32\u0E25\u0E2D\u0E07\u0E21\u0E32\u0E14\u0E39\u0E17\u0E32\u0E07\u0E41\u0E01\u0E49\u0E01\u0E31\u0E19\u0E14\u0E35\u0E01\u0E27\u0E48\u0E32

Deriving PDAs

',4),h=s("PDA \u0E22\u0E48\u0E2D\u0E21\u0E32\u0E08\u0E32\u0E01 "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s(", \u0E41\u0E25\u0E30\u0E2A\u0E31\u0E49\u0E19\u0E46 \u0E04\u0E37\u0E2D addresses "),I=n("strong",null,"\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14 (derived)",-1),S=s(" \u0E08\u0E32\u0E01 seeds \u0E41\u0E25\u0E30 a program id (\u0E2B\u0E23\u0E37\u0E2D "),v=n("em",null,"address",-1),x=s(")."),E=s("\u0E17\u0E35\u0E48\u0E1E\u0E34\u0E40\u0E28\u0E29\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A PDAs \u0E04\u0E37\u0E2D addresses \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E08\u0E30"),M=n("strong",null,"\u0E44\u0E21\u0E48",-1),C=s("\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A private key \u0E43\u0E14\u0E46 \u0E17\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49\u0E40\u0E1E\u0E23\u0E32\u0E30 addresses \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 ED25519 curve \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E08\u0E30\u0E21\u0E35 "),R=n("strong",null,"\u0E40\u0E09\u0E1E\u0E32\u0E30",-1),T=s(" program \u0E17\u0E35\u0E48 "),D=n("em",null,"address",-1),O=s(" \u0E19\u0E35\u0E49\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14\u0E21\u0E32\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19\u0E16\u0E36\u0E07\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign instruction \u0E19\u0E35\u0E49\u0E14\u0E49\u0E27\u0E22 key \u0E44\u0E14\u0E49 \u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E1A seeds \u0E17\u0E35\u0E48\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E44\u0E27\u0E49 \u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E35\u0E49\u0E44\u0E14\u0E49 "),K={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),L=s("."),N=l("

\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E01\u0E47\u0E44\u0E14\u0E49\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E01\u0E31\u0E1A PDAs \u0E41\u0E25\u0E49\u0E27\u0E27\u0E48\u0E32\u0E21\u0E31\u0E19\u0E04\u0E37\u0E2D\u0E2D\u0E30\u0E44\u0E23, \u0E21\u0E32\u0E25\u0E2D\u0E07\u0E43\u0E0A\u0E49\u0E1E\u0E27\u0E01\u0E21\u0E31\u0E19\u0E43\u0E19\u0E01\u0E32\u0E23 map accounts \u0E01\u0E31\u0E19\u0E40\u0E16\u0E2D\u0E30! \u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E08\u0E32\u0E01 Blog program \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E21\u0E31\u0E19\u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07

\u0E43\u0E19 Blog program \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49\u0E41\u0E15\u0E48\u0E25\u0E30 User \u0E21\u0E35 Blog \u0E04\u0E19\u0E25\u0E30\u0E15\u0E31\u0E27 \u0E41\u0E25\u0E30 blog \u0E19\u0E35\u0E49\u0E08\u0E30\u0E21\u0E35\u0E44\u0E14\u0E49\u0E2B\u0E25\u0E32\u0E22 Posts \u0E19\u0E31\u0E48\u0E19\u0E2B\u0E21\u0E32\u0E22\u0E04\u0E27\u0E32\u0E21\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33\u0E01\u0E32\u0E23 mapping \u0E41\u0E15\u0E48\u0E25\u0E30 user \u0E44\u0E1B\u0E17\u0E35\u0E48 blog \u0E41\u0E25\u0E30\u0E41\u0E15\u0E48\u0E25\u0E30 post \u0E08\u0E30\u0E21\u0E35\u0E15\u0E31\u0E27\u0E0A\u0E35\u0E49\u0E04\u0E2D\u0E22 mapped \u0E44\u0E1B\u0E17\u0E35\u0E48 blog

\u0E1E\u0E39\u0E14\u0E2A\u0E31\u0E49\u0E19\u0E46 \u0E01\u0E47\u0E04\u0E37\u0E2D, \u0E21\u0E35 1:1 mapping \u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 user \u0E01\u0E31\u0E1A blog \u0E41\u0E25\u0E30 1:N mapping \u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 blog \u0E01\u0E31\u0E1A posts.

\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A 1:1 mapping, \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49 blog address \u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14\u0E21\u0E32\u0E08\u0E32\u0E01 user \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19, \u0E08\u0E30\u0E44\u0E14\u0E49\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E14\u0E36\u0E07 blog \u0E44\u0E14\u0E49\u0E15\u0E32\u0E21 authority (\u0E2B\u0E23\u0E37\u0E2D\u0E15\u0E32\u0E21 user \u0E19\u0E31\u0E48\u0E19\u0E40\u0E2D\u0E07). \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19 seed \u0E08\u0E36\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 authority's key \u0E41\u0E25\u0E30\u0E04\u0E27\u0E23\u0E08\u0E30\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "blog" \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 (type identifier)

\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A 1:N mapping, \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49\u0E41\u0E15\u0E48\u0E25\u0E30 post address \u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14\u0E44\u0E14\u0E49\u0E08\u0E32\u0E01 \u0E2B\u0E25\u0E32\u0E22\u0E46 blog \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07 \u0E41\u0E15\u0E48\u0E43\u0E0A\u0E49\u0E04\u0E19\u0E25\u0E30 identifier, \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E08\u0E30\u0E44\u0E14\u0E49\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07 posts \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E17\u0E38\u0E01\u0E46 N posts \u0E43\u0E19 blog \u0E25\u0E2D\u0E07\u0E14\u0E39\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32\u0E43\u0E19\u0E41\u0E15\u0E48\u0E25\u0E30 post address \u0E08\u0E30\u0E16\u0E39\u0E01\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14 (derived from) \u200B\u0E21\u0E32\u0E08\u0E32\u0E01 blog's key, slug \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E08\u0E33\u0E41\u0E19\u0E01\u0E41\u0E15\u0E48\u0E48\u0E25\u0E30 post, \u0E41\u0E25\u0E30\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "post" \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17 (type identifier) \u0E2D\u0E35\u0E01\u0E17\u0E35\u0E19\u0E36\u0E07.

\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 code \u0E2D\u0E22\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07,

",6),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.6070c007.js b/docs/.vuepress/dist/assets/account-maps.html.cc8377ca.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.6070c007.js rename to docs/.vuepress/dist/assets/account-maps.html.cc8377ca.js index b47116b67..100ed97d2 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.6070c007.js +++ b/docs/.vuepress/dist/assets/account-maps.html.cc8377ca.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"maps-de-comptes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#maps-de-comptes","aria-hidden":"true"},"#"),s(" Maps de Comptes")],-1),d=n("p",null,[s("Les Maps sont des structures de donn\xE9es qui sont fr\xE9quemment utilis\xE9es en programmation pour associer une "),n("strong",null,"cl\xE9"),s(" \xE0 une "),n("strong",null,"valeur"),s(" quelconque. La cl\xE9 et la valeur peuvent \xEAtre de n'importe quel type. De plus, la cl\xE9 sert d'identifiant pour une valeur donn\xE9e qui est sauvegard\xE9e. Ensuite, selon la cl\xE9 donn\xE9e, elle nous permet d'ins\xE9rer, de r\xE9cup\xE9rer et de mettre \xE0 jour efficacement sa valeur.")],-1),_=s("Le mod\xE8le de compte Solana, comme nous le savons, exige que les donn\xE9es du programme et ses donn\xE9es d'\xE9tat correspondantes soient stock\xE9es dans des comptes diff\xE9rents. Ces comptes ont une adresse associ\xE9e. Ce qui, en soi, fait office de map ! D\xE9couvrez le mod\xE8le de compte de Solana "),f={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},y=s("ici"),g=s("."),w=l('

Il serait donc logique de stocker vos valeurs dans des comptes distincts, dont l'adresse serait la cl\xE9 n\xE9cessaire pour r\xE9cup\xE9rer la valeur. Mais cela soul\xE8ve quelques probl\xE8mes, tels que :

  • Les adresses mentionn\xE9es ci-dessus ne seront tr\xE8s probablement pas des cl\xE9s id\xE9ales, dont vous pourriez vous souvenir et r\xE9cup\xE9rer la valeur requise.

  • Les adresses mentionn\xE9es ci-dessus font r\xE9f\xE9rence \xE0 des cl\xE9s publiques de diff\xE9rentes Paires de Cl\xE9s, o\xF9 chaque cl\xE9 publique (ou adresse) est associ\xE9e \xE0 une cl\xE9 priv\xE9e. Cette cl\xE9 priv\xE9e serait n\xE9cessaire pour signer diff\xE9rentes instructions si et quand cela est n\xE9cessaire, ce qui nous obligerait \xE0 stocker la cl\xE9 priv\xE9e quelque part, ce qui n'est absolument pas recommand\xE9 !

Cela pr\xE9sente un probl\xE8me auquel de nombreux d\xE9veloppeurs Solana sont confront\xE9s, \xE0 savoir l'impl\xE9mentation d'une logique de type Map dans leurs programmes. Voyons comment nous pourrions aborder ce probl\xE8me.

D\xE9rivation des PDAs

',4),h=s("PDA signifie "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address (Adresse D\xE9riv\xE9e du Programme)"),v=s(" et sont, en bref, des adresses "),B=n("strong",null,"d\xE9riv\xE9es",-1),I=s(" d'un ensemble de seeds et d'un identifiant de programme (ou "),S=n("em",null,"adresse",-1),x=s(")."),E=s("La particularit\xE9 des PDAs est que ces adresses ne sont "),M=n("strong",null,"pas",-1),q=s(" associ\xE9es \xE0 une cl\xE9 priv\xE9e. Cela est d\xFB au fait que ces adresses ne se trouvent pas sur la courbe ED25519. Par cons\xE9quent, "),C=n("strong",null,"seul",-1),R=s(" le programme, dont cette "),D=n("em",null,"adresse",-1),T=s(" a \xE9t\xE9 d\xE9riv\xE9e, peut signer une instruction avec la cl\xE9, pourvu que les seeds soient \xE9galement fournies. Plus d'informations \xE0 ce sujet "),z={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},O=s("ici"),K=s("."),L=l("

Maintenant que nous avons une id\xE9e de ce que sont les PDAs, utilisons-les pour mapper quelques comptes ! Nous allons prendre l'exemple d'un programme de Blog pour montrer comment cela pourrait \xEAtre mis en \u0153uvre.

Dans ce programme de Blog, nous souhaitons que chaque Utilisateur ait un seul Blog. Ce blog peut avoir un nombre quelconque de "Posts". Cela signifie que nous mappons chaque utilisateur \xE0 un blog, et que chaque post est mapp\xE9 \xE0 un certain blog.

En bref, il existe une correspondance "1:1" entre un utilisateur et son blog, et une correspondance "1:N" entre un blog et ses articles.

Pour la correspondance 1:1, nous voudrions que l'adresse d'un blog soit d\xE9riv\xE9e uniquement de son utilisateur, ce qui nous permettrait de retrouver un blog, \xE9tant donn\xE9 son autorit\xE9 (ou utilisateur). Ainsi, les seeds d'un blog seraient constitu\xE9es de sa cl\xE9 d'autorit\xE9, et \xE9ventuellement d'un pr\xE9fixe "blog" pour servir d'identifiant de type.

Pour la correspondance 1:N, nous voudrions que l'adresse de chaque post soit d\xE9riv\xE9e non seulement du blog auquel il est associ\xE9, mais aussi d'un autre identifiant qui nous permet de faire la diff\xE9rence entre un nombre N de posts de blog. Dans l'exemple ci-dessous, l'adresse de chaque post est d\xE9riv\xE9e de la cl\xE9 du blog, d'un slug pour identifier chaque post, et d'un pr\xE9fixe "post" qui sert d'identifiant de type.

Le code est le suivant :

",6),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"maps-de-comptes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#maps-de-comptes","aria-hidden":"true"},"#"),s(" Maps de Comptes")],-1),d=n("p",null,[s("Les Maps sont des structures de donn\xE9es qui sont fr\xE9quemment utilis\xE9es en programmation pour associer une "),n("strong",null,"cl\xE9"),s(" \xE0 une "),n("strong",null,"valeur"),s(" quelconque. La cl\xE9 et la valeur peuvent \xEAtre de n'importe quel type. De plus, la cl\xE9 sert d'identifiant pour une valeur donn\xE9e qui est sauvegard\xE9e. Ensuite, selon la cl\xE9 donn\xE9e, elle nous permet d'ins\xE9rer, de r\xE9cup\xE9rer et de mettre \xE0 jour efficacement sa valeur.")],-1),_=s("Le mod\xE8le de compte Solana, comme nous le savons, exige que les donn\xE9es du programme et ses donn\xE9es d'\xE9tat correspondantes soient stock\xE9es dans des comptes diff\xE9rents. Ces comptes ont une adresse associ\xE9e. Ce qui, en soi, fait office de map ! D\xE9couvrez le mod\xE8le de compte de Solana "),f={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},y=s("ici"),g=s("."),w=l('

Il serait donc logique de stocker vos valeurs dans des comptes distincts, dont l'adresse serait la cl\xE9 n\xE9cessaire pour r\xE9cup\xE9rer la valeur. Mais cela soul\xE8ve quelques probl\xE8mes, tels que :

  • Les adresses mentionn\xE9es ci-dessus ne seront tr\xE8s probablement pas des cl\xE9s id\xE9ales, dont vous pourriez vous souvenir et r\xE9cup\xE9rer la valeur requise.

  • Les adresses mentionn\xE9es ci-dessus font r\xE9f\xE9rence \xE0 des cl\xE9s publiques de diff\xE9rentes Paires de Cl\xE9s, o\xF9 chaque cl\xE9 publique (ou adresse) est associ\xE9e \xE0 une cl\xE9 priv\xE9e. Cette cl\xE9 priv\xE9e serait n\xE9cessaire pour signer diff\xE9rentes instructions si et quand cela est n\xE9cessaire, ce qui nous obligerait \xE0 stocker la cl\xE9 priv\xE9e quelque part, ce qui n'est absolument pas recommand\xE9 !

Cela pr\xE9sente un probl\xE8me auquel de nombreux d\xE9veloppeurs Solana sont confront\xE9s, \xE0 savoir l'impl\xE9mentation d'une logique de type Map dans leurs programmes. Voyons comment nous pourrions aborder ce probl\xE8me.

D\xE9rivation des PDAs

',4),h=s("PDA signifie "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address (Adresse D\xE9riv\xE9e du Programme)"),v=s(" et sont, en bref, des adresses "),B=n("strong",null,"d\xE9riv\xE9es",-1),I=s(" d'un ensemble de seeds et d'un identifiant de programme (ou "),S=n("em",null,"adresse",-1),x=s(")."),E=s("La particularit\xE9 des PDAs est que ces adresses ne sont "),M=n("strong",null,"pas",-1),q=s(" associ\xE9es \xE0 une cl\xE9 priv\xE9e. Cela est d\xFB au fait que ces adresses ne se trouvent pas sur la courbe ED25519. Par cons\xE9quent, "),C=n("strong",null,"seul",-1),R=s(" le programme, dont cette "),D=n("em",null,"adresse",-1),T=s(" a \xE9t\xE9 d\xE9riv\xE9e, peut signer une instruction avec la cl\xE9, pourvu que les seeds soient \xE9galement fournies. Plus d'informations \xE0 ce sujet "),z={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},O=s("ici"),K=s("."),L=l("

Maintenant que nous avons une id\xE9e de ce que sont les PDAs, utilisons-les pour mapper quelques comptes ! Nous allons prendre l'exemple d'un programme de Blog pour montrer comment cela pourrait \xEAtre mis en \u0153uvre.

Dans ce programme de Blog, nous souhaitons que chaque Utilisateur ait un seul Blog. Ce blog peut avoir un nombre quelconque de "Posts". Cela signifie que nous mappons chaque utilisateur \xE0 un blog, et que chaque post est mapp\xE9 \xE0 un certain blog.

En bref, il existe une correspondance "1:1" entre un utilisateur et son blog, et une correspondance "1:N" entre un blog et ses articles.

Pour la correspondance 1:1, nous voudrions que l'adresse d'un blog soit d\xE9riv\xE9e uniquement de son utilisateur, ce qui nous permettrait de retrouver un blog, \xE9tant donn\xE9 son autorit\xE9 (ou utilisateur). Ainsi, les seeds d'un blog seraient constitu\xE9es de sa cl\xE9 d'autorit\xE9, et \xE9ventuellement d'un pr\xE9fixe "blog" pour servir d'identifiant de type.

Pour la correspondance 1:N, nous voudrions que l'adresse de chaque post soit d\xE9riv\xE9e non seulement du blog auquel il est associ\xE9, mais aussi d'un autre identifiant qui nous permet de faire la diff\xE9rence entre un nombre N de posts de blog. Dans l'exemple ci-dessous, l'adresse de chaque post est d\xE9riv\xE9e de la cl\xE9 du blog, d'un slug pour identifier chaque post, et d'un pr\xE9fixe "post" qui sert d'identifiant de type.

Le code est le suivant :

",6),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.61224aa4.js b/docs/.vuepress/dist/assets/account-maps.html.d873a7bb.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.61224aa4.js rename to docs/.vuepress/dist/assets/account-maps.html.d873a7bb.js index 09f139e77..d735ffe0d 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.61224aa4.js +++ b/docs/.vuepress/dist/assets/account-maps.html.d873a7bb.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("Map\uB4E4\uC740 \uC6B0\uB9AC\uAC00 \uD504\uB85C\uADF8\uB798\uBC0D\uC5D0\uC11C "),n("strong",null,"key"),s("\uB97C \uC5B4\uB5A4 \uC885\uB958\uC758 "),n("strong",null,"value"),s("\uC640 \uC5F0\uAD00\uC2DC\uD0A4\uAE30 \uC704\uD574 \uC790\uC8FC \uC0AC\uC6A9\uD558\uB294 \uB370\uC774\uD130 \uAD6C\uC870\uB4E4\uC785\uB2C8\uB2E4. key\uC640 value\uB294 \uC784\uC758\uC758 \uD0C0\uC785\uC774 \uB420 \uC218 \uC788\uACE0 key\uB294 \uC800\uC7A5\uD560 value\uB97C \uC704\uD55C \uC2DD\uBCC4\uC790\uB85C\uC368 \uAE30\uB2A5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uADF8\uB7EC\uBA74, \uC8FC\uC5B4\uC9C4 key\uB4E4\uC740 \uC6B0\uB9AC\uAC00 \uC774 value\uB4E4\uC744 \uD6A8\uC728\uC801\uC73C\uB85C insert, retrieve \uADF8\uB9AC\uACE0 update \uD560 \uC218 \uC788\uAC8C \uD574\uC90D\uB2C8\uB2E4.")],-1),_=s("\uC6B0\uB9AC\uAC00 \uC54C\uACE0 \uC788\uB4EF\uC774, Solana\uC758 Account \uBAA8\uB378\uC740 Program Data\uC640 \uC774\uAC83\uACFC \uAD00\uB828\uC788\uB294 \uB2E4\uB978 Account\uB4E4\uC5D0 \uC800\uC7A5\uB420 \uC0C1\uD0DC \uB370\uC774\uD130\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC774\uB7EC\uD55C Account\uB4E4\uC740 Address\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC790\uCCB4\uC801\uC73C\uB85C Map\uC73C\uB85C \uB3D9\uC791\uD569\uB2C8\uB2E4. Solana\uC758 Account \uBAA8\uB378\uC5D0 \uB300\uD55C \uB354 \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\uC5EC\uAE30"),g=s("\uC5D0\uC11C \uD655\uC778 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),w=l('

\uADF8\uB798\uC11C, \uC774\uC81C key\uAC00 \uB418\uB294 Account\uC758 address\uB97C \uAC00\uC9C0\uACE0 \uB098\uB204\uC5B4\uC9C4 Account\uB4E4\uC5D0 values\uB97C \uC800\uC7A5\uD558\uACE0, \uAC00\uC838\uC624\uB294 \uAC83\uC744 \uC774\uD574\uD560 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774\uAC83\uC740 \uB2E4\uC74C\uACFC \uAC19\uC740 \uBA87 \uAC00\uC9C0 \uC774\uC288\uB4E4\uC744 \uC57C\uAE30\uD569\uB2C8\uB2E4.

  • \uC704\uC5D0\uC11C \uC5B8\uAE09\uB41C address\uB4E4\uC740 \uC544\uB9C8\uB3C4 \uC774\uC0C1\uC801\uC778 keys\uAC00 \uB420 \uC218\uB294 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uB4E4\uC740 \uB2F9\uC2E0\uC774 \uAE30\uC5B5\uD560 \uC218 \uC5C6\uACE0 \uC6D0\uD558\uB294 \uAC12\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.

\uB2E4\uB978 Keypairs\uC758 public key\uB4E4\uB85C \uC5B8\uAE09\uB41C Address\uB4E4\uC5D0\uC11C, \uAC01 public key (or address)\uB294 \uC5F0\uAD00\uB41C private key \uB610\uD55C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774 private key\uB294 \uD544\uC694\uD560\uB54C instruction\uB4E4\uC5D0 \uC11C\uBA85\uD558\uAE30 \uC704\uD574 \uC694\uAD6C\uB420 \uAC83\uC785\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC6B0\uB9AC\uAC00 private key\uB97C \uC5B4\uB518\uAC00\uC5D0 \uC800\uC7A5\uD574\uC57C \uD558\uB294 \uAC83\uC744 \uC758\uBBF8\uD558\uBA70 \uC774\uAC83\uC740 \uC644\uC804\uD788 \uCD94\uCC9C\uB418\uC9C0 \uC54A\uB294 \uBC29\uC2DD\uC785\uB2C8\uB2E4.

\uC774\uAC83\uC740 Program\uB4E4\uC5D0 Map\uACFC \uAC19\uC740 \uB85C\uC9C1\uC744 \uAD6C\uD604\uD558\uB294 \uB370 \uBB38\uC81C\uAC00 \uC788\uACE0, \uB9CE\uC740 Solana \uAC1C\uBC1C\uC790\uB4E4\uC774 \uB2F9\uBA74\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uAC00 \uC774 \uBB38\uC81C\uB97C \uC5B4\uB5BB\uAC8C \uD560\uC9C0 \uBA87 \uAC00\uC9C0 \uBC29\uBC95\uC744 \uC0B4\uD3B4 \uBD04\uC2DC\uB2E4.

Deriving PDAs

',5),A=s("PDA\uB294 "),h={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s("\uB97C \uC758\uBBF8\uD558\uB294 \uC904\uC784\uB9D0\uC774\uACE0, seeds\uB4E4\uC758 \uC9D1\uD569\uC73C\uB85C\uBD80\uD130 "),I=n("strong",null,"\uBE44\uB86F\uB41C",-1),S=s(" Address\uB4E4\uC774\uBA70, Program id(or "),v=n("em",null,"address",-1),x=s(")\uC785\uB2C8\uB2E4."),E=s("PDA\uB4E4\uC5D0 \uAD00\uD574 \uC720\uB2C8\uD06C\uD55C \uAC83\uC740 \uC774\uB4E4 Address\uB4E4\uC740 \uC5B4\uB5A4 private key\uC640\uB3C4 \uC5F0\uAD00\uB418\uC5B4 \uC788\uC9C0 \uC54A\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC774\uAC83\uC740 Address\uB4E4\uC774 ED25519 \uACE1\uC120\uC5D0 \uB193\uC5EC \uC788\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC774\uB7F0 \uC774\uC720\uB85C, \uC624\uC9C1 \uC774 "),M=n("em",null,"address",-1),C=s(" \uB97C \uAD6C\uD55C program\uB9CC\uC774 key\uB97C \uAC00\uC9C0\uACE0 instruction\uC5D0 \uC11C\uBA85\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774 key \uB610\uD55C \uC81C\uACF5\uB41C seeds\uC785\uB2C8\uB2E4. \uB354 \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),R={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},T=s("\uC5EC\uAE30"),D=s("\uC5D0 \uC788\uC2B5\uB2C8\uB2E4."),O=l("

\uC6B0\uB9AC\uB294 \uC774\uC81C PDA\uB4E4\uC774 \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC558\uC2B5\uB2C8\uB2E4. PDA\uB4E4\uC744 \uC0AC\uC6A9\uD574 \uBA87 \uAC00\uC9C0 Account\uB4E4\uC744 \uB9F5\uD551 \uD574\uBD05\uC2DC\uB2E4. \uC6B0\uB9AC\uB294 \uC5B4\uB5BB\uAC8C \uAD6C\uD604\uB418\uB294\uC9C0 \uC124\uBA85\uD558\uAE30 \uC704\uD574 Blog Program\uC5D0 \uB300\uD55C \uD55C \uC608\uC81C\uB97C \uC0B4\uD3B4\uBCFC \uAC83\uC785\uB2C8\uB2E4.

\uC774 Blog Program\uC5D0\uC11C \uC6B0\uB9AC\uB294 \uAC01 User\uAC00 \uD558\uB098\uC758 Blog\uB97C \uAC16\uB3C4\uB85D \uD558\uACE0 \uC2F6\uC2B5\uB2C8\uB2E4. \uC774 blog\uB294 \uC5EC\uB7EC\uAC1C\uC758 Posts\uB97C \uAC00\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC6B0\uB9AC\uAC00 \uAC01 user\uB97C \uD558\uB098\uC758 blog\uC5D0 \uB9F5\uD551\uD558\uACE0 \uAC01 post\uB294 \uD2B9\uC815 blog\uC5D0 \uB9F5\uD551\uB41C\uB2E4\uB294 \uAC83\uC744 \uC758\uBBF8\uD569\uB2C8\uB2E4.

\uC694\uC57D\uD558\uBA74, user\uC640 \uADF8/\uADF8\uB140\uC758 blog \uC0AC\uC774\uC5D0\uB294 1:1 \uB9F5\uD551 \uAD00\uACC4\uAC00 \uC788\uACE0, \uD558\uB098\uC758 blog\uC640 \uC774\uAC83\uC758 posts \uC5D0\uB294 1:N \uB9F5\uD551 \uAD00\uACC4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.

1:1 \uB9F5\uD551 \uAD00\uAC8C\uB97C \uC704\uD574\uC11C, \uC6B0\uB9AC\uB294 blog\uC758 address\uAC00 \uC624\uC9C1 blog\uC758 \uC0AC\uC6A9\uC790\uB85C\uBD80\uD130 \uB9CC\uB4E4\uC5B4\uC9C0\uAE38 \uC6D0\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 blog\uC758 authority (or user)\uAC00 \uC8FC\uC5B4\uC84C\uC744 \uB54C, \uD558\uB098\uC758 blog\uB97C \uAC00\uC838\uC624\uB294 \uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uD569\uB2C8\uB2E4. \uC774\uB7F0 \uC774\uC720\uB85C, blog\uC758 seeds\uB294 blog\uC758 authority's key \uB85C \uAD6C\uC131\uB420 \uAC83\uC774\uACE0, \uD0C0\uC785 \uC2DD\uBCC4\uC790\uB85C\uC368 \uAE30\uB2A5\uD558\uAE30 \uC704\uD574 \uAC00\uB2A5\uD558\uBA74 **"blog"**\uB77C\uB294 prefix\uB97C \uAC00\uC9C0\uB3C4\uB85D \uAD6C\uC131\uB420 \uAC83\uC785\uB2C8\uB2E4.

1:N \uB9F5\uD551 \uAD00\uACC4\uB97C \uC704\uD574\uC11C, \uC6B0\uB9AC\uB294 \uAC01 post\uC758 address\uAC00 \uC624\uC9C1 \uC5F0\uAD00\uB41C blog\uB85C\uBD80\uD130\uB9CC \uB9CC\uB4E4\uC5B4\uC9C0\uAE38 \uC6D0\uD558\uC9C0 \uC54A\uACE0, \uB610 \uB2E4\uB978 \uC2DD\uBCC4\uC790\uB85C\uBD80\uD130 \uD568\uAED8 \uB9CC\uB4E4\uC5B4\uC9C0\uAE38 \uC6D0\uD569\uB2C8\uB2E4. \uC774 \uC2DD\uBCC4\uC790\uB294 \uC6B0\uB9AC\uAC00 blog\uC5D0\uC11C N \uAC1C\uC758 post\uB4E4\uC744 \uAD6C\uBCC4\uD560 \uC218 \uC788\uAC8C \uD574\uC90D\uB2C8\uB2E4. \uC544\uB798\uC758 \uC608\uC81C\uC5D0\uC11C \uAC01 post\uC758 address\uB294 \uAC01 post\uB97C \uC2DD\uBCC4\uD558\uAE30 \uC704\uD574 blog's key\uC640 \uD558\uB098\uC758 slug, \uADF8\uB9AC\uACE0 \uD0C0\uC785 \uC2DD\uBCC4\uC790\uB85C\uC368 \uAE30\uB2A5\uD558\uAE30 \uC704\uD55C **"post"**\uB77C\uB294 prefix\uB85C\uBD80\uD130 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4.

\uCF54\uB4DC\uB294 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4.

",6),K=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("Map\uB4E4\uC740 \uC6B0\uB9AC\uAC00 \uD504\uB85C\uADF8\uB798\uBC0D\uC5D0\uC11C "),n("strong",null,"key"),s("\uB97C \uC5B4\uB5A4 \uC885\uB958\uC758 "),n("strong",null,"value"),s("\uC640 \uC5F0\uAD00\uC2DC\uD0A4\uAE30 \uC704\uD574 \uC790\uC8FC \uC0AC\uC6A9\uD558\uB294 \uB370\uC774\uD130 \uAD6C\uC870\uB4E4\uC785\uB2C8\uB2E4. key\uC640 value\uB294 \uC784\uC758\uC758 \uD0C0\uC785\uC774 \uB420 \uC218 \uC788\uACE0 key\uB294 \uC800\uC7A5\uD560 value\uB97C \uC704\uD55C \uC2DD\uBCC4\uC790\uB85C\uC368 \uAE30\uB2A5\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uADF8\uB7EC\uBA74, \uC8FC\uC5B4\uC9C4 key\uB4E4\uC740 \uC6B0\uB9AC\uAC00 \uC774 value\uB4E4\uC744 \uD6A8\uC728\uC801\uC73C\uB85C insert, retrieve \uADF8\uB9AC\uACE0 update \uD560 \uC218 \uC788\uAC8C \uD574\uC90D\uB2C8\uB2E4.")],-1),_=s("\uC6B0\uB9AC\uAC00 \uC54C\uACE0 \uC788\uB4EF\uC774, Solana\uC758 Account \uBAA8\uB378\uC740 Program Data\uC640 \uC774\uAC83\uACFC \uAD00\uB828\uC788\uB294 \uB2E4\uB978 Account\uB4E4\uC5D0 \uC800\uC7A5\uB420 \uC0C1\uD0DC \uB370\uC774\uD130\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC774\uB7EC\uD55C Account\uB4E4\uC740 Address\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC790\uCCB4\uC801\uC73C\uB85C Map\uC73C\uB85C \uB3D9\uC791\uD569\uB2C8\uB2E4. Solana\uC758 Account \uBAA8\uB378\uC5D0 \uB300\uD55C \uB354 \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("\uC5EC\uAE30"),g=s("\uC5D0\uC11C \uD655\uC778 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),w=l('

\uADF8\uB798\uC11C, \uC774\uC81C key\uAC00 \uB418\uB294 Account\uC758 address\uB97C \uAC00\uC9C0\uACE0 \uB098\uB204\uC5B4\uC9C4 Account\uB4E4\uC5D0 values\uB97C \uC800\uC7A5\uD558\uACE0, \uAC00\uC838\uC624\uB294 \uAC83\uC744 \uC774\uD574\uD560 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774\uAC83\uC740 \uB2E4\uC74C\uACFC \uAC19\uC740 \uBA87 \uAC00\uC9C0 \uC774\uC288\uB4E4\uC744 \uC57C\uAE30\uD569\uB2C8\uB2E4.

  • \uC704\uC5D0\uC11C \uC5B8\uAE09\uB41C address\uB4E4\uC740 \uC544\uB9C8\uB3C4 \uC774\uC0C1\uC801\uC778 keys\uAC00 \uB420 \uC218\uB294 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uB4E4\uC740 \uB2F9\uC2E0\uC774 \uAE30\uC5B5\uD560 \uC218 \uC5C6\uACE0 \uC6D0\uD558\uB294 \uAC12\uC744 \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.

\uB2E4\uB978 Keypairs\uC758 public key\uB4E4\uB85C \uC5B8\uAE09\uB41C Address\uB4E4\uC5D0\uC11C, \uAC01 public key (or address)\uB294 \uC5F0\uAD00\uB41C private key \uB610\uD55C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774 private key\uB294 \uD544\uC694\uD560\uB54C instruction\uB4E4\uC5D0 \uC11C\uBA85\uD558\uAE30 \uC704\uD574 \uC694\uAD6C\uB420 \uAC83\uC785\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC6B0\uB9AC\uAC00 private key\uB97C \uC5B4\uB518\uAC00\uC5D0 \uC800\uC7A5\uD574\uC57C \uD558\uB294 \uAC83\uC744 \uC758\uBBF8\uD558\uBA70 \uC774\uAC83\uC740 \uC644\uC804\uD788 \uCD94\uCC9C\uB418\uC9C0 \uC54A\uB294 \uBC29\uC2DD\uC785\uB2C8\uB2E4.

\uC774\uAC83\uC740 Program\uB4E4\uC5D0 Map\uACFC \uAC19\uC740 \uB85C\uC9C1\uC744 \uAD6C\uD604\uD558\uB294 \uB370 \uBB38\uC81C\uAC00 \uC788\uACE0, \uB9CE\uC740 Solana \uAC1C\uBC1C\uC790\uB4E4\uC774 \uB2F9\uBA74\uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uAC00 \uC774 \uBB38\uC81C\uB97C \uC5B4\uB5BB\uAC8C \uD560\uC9C0 \uBA87 \uAC00\uC9C0 \uBC29\uBC95\uC744 \uC0B4\uD3B4 \uBD04\uC2DC\uB2E4.

Deriving PDAs

',5),A=s("PDA\uB294 "),h={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s("\uB97C \uC758\uBBF8\uD558\uB294 \uC904\uC784\uB9D0\uC774\uACE0, seeds\uB4E4\uC758 \uC9D1\uD569\uC73C\uB85C\uBD80\uD130 "),I=n("strong",null,"\uBE44\uB86F\uB41C",-1),S=s(" Address\uB4E4\uC774\uBA70, Program id(or "),v=n("em",null,"address",-1),x=s(")\uC785\uB2C8\uB2E4."),E=s("PDA\uB4E4\uC5D0 \uAD00\uD574 \uC720\uB2C8\uD06C\uD55C \uAC83\uC740 \uC774\uB4E4 Address\uB4E4\uC740 \uC5B4\uB5A4 private key\uC640\uB3C4 \uC5F0\uAD00\uB418\uC5B4 \uC788\uC9C0 \uC54A\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC774\uAC83\uC740 Address\uB4E4\uC774 ED25519 \uACE1\uC120\uC5D0 \uB193\uC5EC \uC788\uC9C0 \uC54A\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC774\uB7F0 \uC774\uC720\uB85C, \uC624\uC9C1 \uC774 "),M=n("em",null,"address",-1),C=s(" \uB97C \uAD6C\uD55C program\uB9CC\uC774 key\uB97C \uAC00\uC9C0\uACE0 instruction\uC5D0 \uC11C\uBA85\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774 key \uB610\uD55C \uC81C\uACF5\uB41C seeds\uC785\uB2C8\uB2E4. \uB354 \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 "),R={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},T=s("\uC5EC\uAE30"),D=s("\uC5D0 \uC788\uC2B5\uB2C8\uB2E4."),O=l("

\uC6B0\uB9AC\uB294 \uC774\uC81C PDA\uB4E4\uC774 \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC558\uC2B5\uB2C8\uB2E4. PDA\uB4E4\uC744 \uC0AC\uC6A9\uD574 \uBA87 \uAC00\uC9C0 Account\uB4E4\uC744 \uB9F5\uD551 \uD574\uBD05\uC2DC\uB2E4. \uC6B0\uB9AC\uB294 \uC5B4\uB5BB\uAC8C \uAD6C\uD604\uB418\uB294\uC9C0 \uC124\uBA85\uD558\uAE30 \uC704\uD574 Blog Program\uC5D0 \uB300\uD55C \uD55C \uC608\uC81C\uB97C \uC0B4\uD3B4\uBCFC \uAC83\uC785\uB2C8\uB2E4.

\uC774 Blog Program\uC5D0\uC11C \uC6B0\uB9AC\uB294 \uAC01 User\uAC00 \uD558\uB098\uC758 Blog\uB97C \uAC16\uB3C4\uB85D \uD558\uACE0 \uC2F6\uC2B5\uB2C8\uB2E4. \uC774 blog\uB294 \uC5EC\uB7EC\uAC1C\uC758 Posts\uB97C \uAC00\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC6B0\uB9AC\uAC00 \uAC01 user\uB97C \uD558\uB098\uC758 blog\uC5D0 \uB9F5\uD551\uD558\uACE0 \uAC01 post\uB294 \uD2B9\uC815 blog\uC5D0 \uB9F5\uD551\uB41C\uB2E4\uB294 \uAC83\uC744 \uC758\uBBF8\uD569\uB2C8\uB2E4.

\uC694\uC57D\uD558\uBA74, user\uC640 \uADF8/\uADF8\uB140\uC758 blog \uC0AC\uC774\uC5D0\uB294 1:1 \uB9F5\uD551 \uAD00\uACC4\uAC00 \uC788\uACE0, \uD558\uB098\uC758 blog\uC640 \uC774\uAC83\uC758 posts \uC5D0\uB294 1:N \uB9F5\uD551 \uAD00\uACC4\uAC00 \uC788\uC2B5\uB2C8\uB2E4.

1:1 \uB9F5\uD551 \uAD00\uAC8C\uB97C \uC704\uD574\uC11C, \uC6B0\uB9AC\uB294 blog\uC758 address\uAC00 \uC624\uC9C1 blog\uC758 \uC0AC\uC6A9\uC790\uB85C\uBD80\uD130 \uB9CC\uB4E4\uC5B4\uC9C0\uAE38 \uC6D0\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 blog\uC758 authority (or user)\uAC00 \uC8FC\uC5B4\uC84C\uC744 \uB54C, \uD558\uB098\uC758 blog\uB97C \uAC00\uC838\uC624\uB294 \uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uD569\uB2C8\uB2E4. \uC774\uB7F0 \uC774\uC720\uB85C, blog\uC758 seeds\uB294 blog\uC758 authority's key \uB85C \uAD6C\uC131\uB420 \uAC83\uC774\uACE0, \uD0C0\uC785 \uC2DD\uBCC4\uC790\uB85C\uC368 \uAE30\uB2A5\uD558\uAE30 \uC704\uD574 \uAC00\uB2A5\uD558\uBA74 **"blog"**\uB77C\uB294 prefix\uB97C \uAC00\uC9C0\uB3C4\uB85D \uAD6C\uC131\uB420 \uAC83\uC785\uB2C8\uB2E4.

1:N \uB9F5\uD551 \uAD00\uACC4\uB97C \uC704\uD574\uC11C, \uC6B0\uB9AC\uB294 \uAC01 post\uC758 address\uAC00 \uC624\uC9C1 \uC5F0\uAD00\uB41C blog\uB85C\uBD80\uD130\uB9CC \uB9CC\uB4E4\uC5B4\uC9C0\uAE38 \uC6D0\uD558\uC9C0 \uC54A\uACE0, \uB610 \uB2E4\uB978 \uC2DD\uBCC4\uC790\uB85C\uBD80\uD130 \uD568\uAED8 \uB9CC\uB4E4\uC5B4\uC9C0\uAE38 \uC6D0\uD569\uB2C8\uB2E4. \uC774 \uC2DD\uBCC4\uC790\uB294 \uC6B0\uB9AC\uAC00 blog\uC5D0\uC11C N \uAC1C\uC758 post\uB4E4\uC744 \uAD6C\uBCC4\uD560 \uC218 \uC788\uAC8C \uD574\uC90D\uB2C8\uB2E4. \uC544\uB798\uC758 \uC608\uC81C\uC5D0\uC11C \uAC01 post\uC758 address\uB294 \uAC01 post\uB97C \uC2DD\uBCC4\uD558\uAE30 \uC704\uD574 blog's key\uC640 \uD558\uB098\uC758 slug, \uADF8\uB9AC\uACE0 \uD0C0\uC785 \uC2DD\uBCC4\uC790\uB85C\uC368 \uAE30\uB2A5\uD558\uAE30 \uC704\uD55C **"post"**\uB77C\uB294 prefix\uB85C\uBD80\uD130 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4.

\uCF54\uB4DC\uB294 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4.

",6),K=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.84532932.js b/docs/.vuepress/dist/assets/account-maps.html.de5b004e.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.84532932.js rename to docs/.vuepress/dist/assets/account-maps.html.de5b004e.js index 5a17ba630..4f1251dc5 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.84532932.js +++ b/docs/.vuepress/dist/assets/account-maps.html.de5b004e.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"mapa-ng-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mapa-ng-account","aria-hidden":"true"},"#"),s(" Mapa ng Account")],-1),g=n("p",null,[s("Ang mga mapa ay mga istruktura ng data na madalas nating ginagamit sa programming upang iugnay ang isang "),n("strong",null,"key"),s(" sa isang "),n("strong",null,"value"),s(" ng ilang uri. Ang susi at halaga ay maaaring maging anumang arbitrary na uri at ang key ay gumaganap bilang isang identifier para sa isang naibigay na halaga na sini-save. Pagkatapos, dahil sa susi nito, ay nagbibigay-daan sa amin na mahusay na maipasok, kunin at i-update ang mga halagang ito nang mahusay.")],-1),d=s("Ang modelo ng Account ng Solana, tulad ng alam natin, ay nangangailangan ng data ng programa at ang nauugnay na data ng estado nito na maiimbak sa iba't ibang mga account. Ang mga account na ito ay may isang address na nauugnay sa kanila. Ito, sa kanyang sarili, ay gumaganap bilang isang mapa! Matuto pa tungkol sa Account mode ni Solana "),_={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},y=s("dito"),f=s("."),w=l('

Kaya, makatuwirang iimbak ang iyong mga halaga sa magkahiwalay na mga account, na ang address nito ang key na kinakailangan upang makuha ang halaga. Ngunit nagdudulot ito ng ilang isyu, tulad ng,

  • Ang mga address na binanggit sa itaas ay malamang na hindi magiging perpektong mga susi, na maaari mong matandaan at makuha ang kinakailangang halaga.

  • Ang mga address na binanggit sa itaas, ay tumutukoy sa mga pampublikong key ng iba't ibang Pares ng Key, kung saan ang bawat pampublikong susi (o address) ay magkakaroon ng pribadong key na nauugnay din dito. Ang pribadong key na ito ay kinakailangan na pumirma ng iba't ibang mga instruction kung at kapag kinakailangan, na nangangailangan sa amin na iimbak ang pribadong key sa isang lugar, na talagang hindi inirerekomenda!

Nagpapakita ito ng problemang kinakaharap ng maraming developer ng Solana, na nagpapatupad ng lohika na parang Map sa kanilang mga programa. Tingnan natin ang ilang paraan kung paano natin gagawin ang problemang ito,

Pagkuha ng mga PDA

',4),h=s("Ang PDA ay nangangahulugang "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s(", at sa madaling sabi, mga address "),I=n("strong",null,"derived",-1),S=s(" mula sa isang set ng seeds, at isang program id (o "),x=n("em",null,"address",-1),v=s(")."),E=s("Ang natatanging bagay tungkol sa mga PDA ay, ang mga address na ito ay "),M=n("strong",null,"hindi",-1),C=s(" nauugnay sa anumang pribadong key. Ito ay dahil ang mga address na ito ay hindi nasa ED25519 curve. Kaya naman, "),R=n("strong",null,"lamang",-1),T=s(" ang programa, kung saan nagmula ang "),D=n("em",null,"address",-1),K=s(" na ito, ang maaaring pumirma sa isang instruction gamit ang susi, basta ang mga buto rin. Matuto pa tungkol dito "),O={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("dito"),L=s("."),N=l("

Ngayong may ideya na tayo tungkol sa kung ano ang mga PDA, gamitin natin ang mga ito para imapa ang ilang account! Kukuha kami ng halimbawa ng isang Blog program upang ipakita kung paano ito ipapatupad.

Sa Blog program na ito, gusto nating magkaroon ng iisang Blog ang bawat User. Ang blog na ito ay maaaring magkaroon ng anumang bilang ng Mga Post. Nangangahulugan iyon na namamapa namin ang bawat user sa isang blog, at ang bawat post ay namamapa sa isang partikular na blog.

Sa madaling salita, mayroong 1:1 na pagmamapa sa pagitan ng isang user at ng kanyang blog, samantalang isang 1:N na pagmamapa sa pagitan ng isang blog at mga post nito.

Para sa pagmamapa ng 1:1, nais nating makuha ang address ng isang blog lamang mula sa user nito, na magbibigay-daan sa amin na kunin ang isang blog, na ibinigay sa awtoridad nito (o user). Samakatuwid, ang mga buto para sa isang blog ay bubuuin ng authority's key nito, at posibleng prefix ng "blog", upang kumilos bilang type identifier.

Para sa pagmamapa ng 1:N, gugustuhin nating makuha ang address ng bawat post hindi lamang mula sa blog kung saan ito nauugnay, kundi pati na rin sa isa pang identifier, na nagbibigay-daan sa amin na pag-iba-ibahin ang pagitan ng N bilang ng mga post sa blog. Sa halimbawa sa ibaba, ang address ng bawat post ay hinango mula sa blog's key, isang slug upang matukoy ang bawat post, at isang prefix ng "post", upang kumilos bilang type identifier.

Ang code ay tulad ng ipinapakita sa ibaba,

",6),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"mapa-ng-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mapa-ng-account","aria-hidden":"true"},"#"),s(" Mapa ng Account")],-1),g=n("p",null,[s("Ang mga mapa ay mga istruktura ng data na madalas nating ginagamit sa programming upang iugnay ang isang "),n("strong",null,"key"),s(" sa isang "),n("strong",null,"value"),s(" ng ilang uri. Ang susi at halaga ay maaaring maging anumang arbitrary na uri at ang key ay gumaganap bilang isang identifier para sa isang naibigay na halaga na sini-save. Pagkatapos, dahil sa susi nito, ay nagbibigay-daan sa amin na mahusay na maipasok, kunin at i-update ang mga halagang ito nang mahusay.")],-1),d=s("Ang modelo ng Account ng Solana, tulad ng alam natin, ay nangangailangan ng data ng programa at ang nauugnay na data ng estado nito na maiimbak sa iba't ibang mga account. Ang mga account na ito ay may isang address na nauugnay sa kanila. Ito, sa kanyang sarili, ay gumaganap bilang isang mapa! Matuto pa tungkol sa Account mode ni Solana "),_={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},y=s("dito"),f=s("."),w=l('

Kaya, makatuwirang iimbak ang iyong mga halaga sa magkahiwalay na mga account, na ang address nito ang key na kinakailangan upang makuha ang halaga. Ngunit nagdudulot ito ng ilang isyu, tulad ng,

  • Ang mga address na binanggit sa itaas ay malamang na hindi magiging perpektong mga susi, na maaari mong matandaan at makuha ang kinakailangang halaga.

  • Ang mga address na binanggit sa itaas, ay tumutukoy sa mga pampublikong key ng iba't ibang Pares ng Key, kung saan ang bawat pampublikong susi (o address) ay magkakaroon ng pribadong key na nauugnay din dito. Ang pribadong key na ito ay kinakailangan na pumirma ng iba't ibang mga instruction kung at kapag kinakailangan, na nangangailangan sa amin na iimbak ang pribadong key sa isang lugar, na talagang hindi inirerekomenda!

Nagpapakita ito ng problemang kinakaharap ng maraming developer ng Solana, na nagpapatupad ng lohika na parang Map sa kanilang mga programa. Tingnan natin ang ilang paraan kung paano natin gagawin ang problemang ito,

Pagkuha ng mga PDA

',4),h=s("Ang PDA ay nangangahulugang "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),B=s(", at sa madaling sabi, mga address "),I=n("strong",null,"derived",-1),S=s(" mula sa isang set ng seeds, at isang program id (o "),x=n("em",null,"address",-1),v=s(")."),E=s("Ang natatanging bagay tungkol sa mga PDA ay, ang mga address na ito ay "),M=n("strong",null,"hindi",-1),C=s(" nauugnay sa anumang pribadong key. Ito ay dahil ang mga address na ito ay hindi nasa ED25519 curve. Kaya naman, "),R=n("strong",null,"lamang",-1),T=s(" ang programa, kung saan nagmula ang "),D=n("em",null,"address",-1),K=s(" na ito, ang maaaring pumirma sa isang instruction gamit ang susi, basta ang mga buto rin. Matuto pa tungkol dito "),O={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("dito"),L=s("."),N=l("

Ngayong may ideya na tayo tungkol sa kung ano ang mga PDA, gamitin natin ang mga ito para imapa ang ilang account! Kukuha kami ng halimbawa ng isang Blog program upang ipakita kung paano ito ipapatupad.

Sa Blog program na ito, gusto nating magkaroon ng iisang Blog ang bawat User. Ang blog na ito ay maaaring magkaroon ng anumang bilang ng Mga Post. Nangangahulugan iyon na namamapa namin ang bawat user sa isang blog, at ang bawat post ay namamapa sa isang partikular na blog.

Sa madaling salita, mayroong 1:1 na pagmamapa sa pagitan ng isang user at ng kanyang blog, samantalang isang 1:N na pagmamapa sa pagitan ng isang blog at mga post nito.

Para sa pagmamapa ng 1:1, nais nating makuha ang address ng isang blog lamang mula sa user nito, na magbibigay-daan sa amin na kunin ang isang blog, na ibinigay sa awtoridad nito (o user). Samakatuwid, ang mga buto para sa isang blog ay bubuuin ng authority's key nito, at posibleng prefix ng "blog", upang kumilos bilang type identifier.

Para sa pagmamapa ng 1:N, gugustuhin nating makuha ang address ng bawat post hindi lamang mula sa blog kung saan ito nauugnay, kundi pati na rin sa isa pang identifier, na nagbibigay-daan sa amin na pag-iba-ibahin ang pagitan ng N bilang ng mga post sa blog. Sa halimbawa sa ibaba, ang address ng bawat post ay hinango mula sa blog's key, isang slug upang matukoy ang bawat post, at isang prefix ng "post", upang kumilos bilang type identifier.

Ang code ay tulad ng ipinapakita sa ibaba,

",6),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.c84ca06e.js b/docs/.vuepress/dist/assets/account-maps.html.fb104fdb.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.c84ca06e.js rename to docs/.vuepress/dist/assets/account-maps.html.fb104fdb.js index 7ea2cae3f..9e9b03067 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.c84ca06e.js +++ b/docs/.vuepress/dist/assets/account-maps.html.fb104fdb.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("Maps are data structures we frequently use in programming to associate a "),n("strong",null,"key"),s(" with a "),n("strong",null,"value"),s(" of some kind. The key and value could be any arbitrary type and the key acts as an identifier for a given value that is being saved. It then, given its key, allows us to efficiently insert, retrieve and update these values efficiently.")],-1),_=s("Solana's Account model, as we know, requires program data and its relevant state data to be stored in different accounts. These accounts have an address associated with them. This, in itself, acts as a map! Learn more about Solana's Account mode "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("here"),g=s("."),w=l('

So, it would make sense to store your values in separate accounts, with its address being the key required to retrieve the value. But this brings up a few issues, such as,

  • The addresses mentioned above are most probably not going to be ideal keys, which you could remember and retrieve the required value.

  • The addresses mentioned above, referred to public keys of different Keypairs, where each public key (or address) would have a private key associated with it as well. This private key would be required to sign different instructions if and when needed, requiring us to store the private key somewhere, which is most definitely not recommended!

This presents a problem many Solana developers face, which is implementing a Map-like logic into their programs. Let's look at a couple of way how we would go about this problem,

Deriving PDAs

',4),h=s("PDA stands for "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),v=s(", and are in short, addresses "),B=n("strong",null,"derived",-1),I=s(" from a set of seeds, and a program id (or "),S=n("em",null,"address",-1),x=s(")."),E=s("The unique thing about PDAs is that, these addresses are "),M=n("strong",null,"not",-1),T=s(" associated with any private key. This is because these addresses do not lie on the ED25519 curve. Hence, "),C=n("strong",null,"only",-1),R=s(" the program, from which this "),D=n("em",null,"address",-1),O=s(" was derived, can sign an instruction with the key, provided the seeds as well. Learn more about this "),K={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("here"),L=s("."),N=l("

Now that we have an idea about what PDAs are, let's use them to map some accounts! We'll take an example of a Blog program to demonstrate how this would be implemented.

In this Blog program, we would like each User to have a single Blog. This blog could have any number of Posts. That would mean that we are mapping each user to a blog, and each post is mapped to a certain blog.

In short, there is a 1:1 mapping between a user and his/her blog, whereas a 1:N mapping between a blog and its posts.

For the 1:1 mapping, we would want a blog's address to be derived only from its user, which would allow us to retrieve a blog, given its authority (or user). Hence, the seeds for a blog would consist of its authority's key, and possibly a prefix of "blog", to act as a type identifier.

For the 1:N mapping, we would want each post's address to be derived not only from the blog which it is associated with, but also another identifier, allowing us to differentiate between the N number of posts in the blog. In the example below, each post's address is derived from the blog's key, a slug to identify each post, and a prefix of "post", to act as a type identifier.

The code is as shown below,

",6),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as r,c as i,a as n,b as t,w as a,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"account-maps",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#account-maps","aria-hidden":"true"},"#"),s(" Account Maps")],-1),d=n("p",null,[s("Maps are data structures we frequently use in programming to associate a "),n("strong",null,"key"),s(" with a "),n("strong",null,"value"),s(" of some kind. The key and value could be any arbitrary type and the key acts as an identifier for a given value that is being saved. It then, given its key, allows us to efficiently insert, retrieve and update these values efficiently.")],-1),_=s("Solana's Account model, as we know, requires program data and its relevant state data to be stored in different accounts. These accounts have an address associated with them. This, in itself, acts as a map! Learn more about Solana's Account mode "),y={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},f=s("here"),g=s("."),w=l('

So, it would make sense to store your values in separate accounts, with its address being the key required to retrieve the value. But this brings up a few issues, such as,

  • The addresses mentioned above are most probably not going to be ideal keys, which you could remember and retrieve the required value.

  • The addresses mentioned above, referred to public keys of different Keypairs, where each public key (or address) would have a private key associated with it as well. This private key would be required to sign different instructions if and when needed, requiring us to store the private key somewhere, which is most definitely not recommended!

This presents a problem many Solana developers face, which is implementing a Map-like logic into their programs. Let's look at a couple of way how we would go about this problem,

Deriving PDAs

',4),h=s("PDA stands for "),A={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},P=s("Program Derived Address"),v=s(", and are in short, addresses "),B=n("strong",null,"derived",-1),I=s(" from a set of seeds, and a program id (or "),S=n("em",null,"address",-1),x=s(")."),E=s("The unique thing about PDAs is that, these addresses are "),M=n("strong",null,"not",-1),T=s(" associated with any private key. This is because these addresses do not lie on the ED25519 curve. Hence, "),C=n("strong",null,"only",-1),R=s(" the program, from which this "),D=n("em",null,"address",-1),O=s(" was derived, can sign an instruction with the key, provided the seeds as well. Learn more about this "),K={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=s("here"),L=s("."),N=l("

Now that we have an idea about what PDAs are, let's use them to map some accounts! We'll take an example of a Blog program to demonstrate how this would be implemented.

In this Blog program, we would like each User to have a single Blog. This blog could have any number of Posts. That would mean that we are mapping each user to a blog, and each post is mapped to a certain blog.

In short, there is a 1:1 mapping between a user and his/her blog, whereas a 1:N mapping between a blog and its posts.

For the 1:1 mapping, we would want a blog's address to be derived only from its user, which would allow us to retrieve a blog, given its authority (or user). Hence, the seeds for a blog would consist of its authority's key, and possibly a prefix of "blog", to act as a type identifier.

For the 1:N mapping, we would want each post's address to be derived not only from the blog which it is associated with, but also another identifier, allowing us to differentiate between the N number of posts in the blog. In the example below, each post's address is derived from the blog's key, a slug to identify each post, and a prefix of "post", to act as a type identifier.

The code is as shown below,

",6),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("anchor_lang"),n("span",{class:"token punctuation"},"::"),s("prelude"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token operator"},"*"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"declare_id!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/account-maps.html.8c6e008e.js b/docs/.vuepress/dist/assets/account-maps.html.fb6e863b.js similarity index 99% rename from docs/.vuepress/dist/assets/account-maps.html.8c6e008e.js rename to docs/.vuepress/dist/assets/account-maps.html.fb6e863b.js index 003b24ec8..72b57cba4 100644 --- a/docs/.vuepress/dist/assets/account-maps.html.8c6e008e.js +++ b/docs/.vuepress/dist/assets/account-maps.html.fb6e863b.js @@ -1,4 +1,4 @@ -import{_ as e,r as o,o as c,c as l,a as s,b as p,F as u,d as n,e as t}from"./app.07ce7a66.js";const i={},r=s("h1",{id:"account-maps-hesap-haritalar\u0131",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#account-maps-hesap-haritalar\u0131","aria-hidden":"true"},"#"),n(" Account Maps (Hesap Haritalar\u0131)")],-1),k=s("p",null,[n("Maps, bir key\u2019i bir t\xFCr de\u011Ferle ili\u015Fkilendirmek i\xE7in programlamada s\u0131kl\u0131kla kulland\u0131\u011F\u0131m\u0131z veri yap\u0131lar\u0131d\u0131r. "),s("strong",null,"Key"),n(" ve "),s("strong",null,"de\u011Fer"),n(" herhangi bir t\xFCrde olabilir ve key, kaydedilmekte olan belirli bir de\u011Fer i\xE7in tan\u0131mlay\u0131c\u0131 g\xF6revi g\xF6r\xFCr. Daha sonra, key\u2019i verildi\u011Finde, bu de\u011Ferleri verimli bir \u015Fekilde eklememize, almam\u0131za ve g\xFCncellememize izin verir.")],-1),b=n("Solana'n\u0131n Hesap modeli, bildi\u011Fimiz gibi, program verilerinin ve ilgili durum verilerinin farkl\u0131 account'larda depolanmas\u0131n\u0131 gerektirir. Bu account'lar\u0131n kendileriyle ili\u015Fkili bir adresi vard\u0131r. Bu, kendi i\xE7inde bir map g\xF6revi g\xF6r\xFCr! Solana'n\u0131n Hesap modu hakk\u0131nda daha fazla bilgiyi "),m={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},d=n("buradan"),g=n(" edinebilirsiniz."),y=t('

Bu nedenle, de\u011Feri almak i\xE7in gereken key adresiyle de\u011Ferlerinizi ayr\u0131 account'larda saklamak mant\u0131kl\u0131 olacakt\u0131r. Ancak bu, a\u015Fa\u011F\u0131daki gibi birka\xE7 sorunu beraberinde getirir:

  • Yukar\u0131da bahsedilen adresler, b\xFCy\xFCk olas\u0131l\u0131kla, hat\u0131rlayabilece\u011Finiz ve gerekli de\u011Feri alabilece\u011Finiz ideal key\u2019ler olmayacakt\u0131r.

  • Yukar\u0131da bahsedilen adresler, her bir public key\u2019in (veya adresin) kendisiyle ili\u015Fkilendirilmi\u015F bir private key\u2019e sahip olaca\u011F\u0131 farkl\u0131 Keypair\u2019lerin public key\u2019lerine at\u0131fta bulunur. Bu private key, gerekti\u011Finde ve gerekti\u011Finde farkl\u0131 talimatlar\u0131 imzalamak i\xE7in gerekli olacakt\u0131r, bu da private key\u2019i bir yerde saklamam\u0131z\u0131 gerektirir, ki bu kesinlikle \xF6nerilmez!

Bu, bir\xE7ok Solana geli\u015Ftiricisinin kar\u015F\u0131la\u015Ft\u0131\u011F\u0131 ve programlar\u0131na Map benzeri bir logic uygulayan bir sorun sunuyor. Bu sorunla nas\u0131l ba\u015Fa \xE7\u0131kaca\u011F\u0131m\u0131za birka\xE7 yoldan bakal\u0131m:

Deriving PDAs

',4),f=n("PDA, "),_={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},h=n("Program Derived Address"),w=n(" (Programdan T\xFCretilmi\u015F Adres) anlam\u0131na gelir ve k\u0131saca, bir dizi seed ve bir program kimli\u011Finden (veya adresinden) t\xFCretilen adreslerdir."),A=n("PDA'larla ilgili benzersiz olan \u015Fey, bu adreslerin herhangi bir private key ile ili\u015Fkili olmamas\u0131d\u0131r. Bunun nedeni, bu adreslerin ED25519 e\u011Frisi \xFCzerinde yer almamas\u0131d\u0131r. Bu nedenle, yaln\u0131zca bu adresin t\xFCretildi\u011Fi program, seedler de sa\u011Flanm\u0131\u015Fsa, key\u2019le bir talimat imzalayabilir. Bu konuda "),v={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=n("buradan"),B=n(" daha fazla bilgi edinebilirsiniz."),q=t(`

Art\u0131k PDA'lar\u0131n ne oldu\u011Fu hakk\u0131nda bir fikrimiz oldu\u011Funa g\xF6re, onlar\u0131 baz\u0131 account'lar\u0131 e\u015Fle\u015Ftirmek i\xE7in kullanal\u0131m! Bunun nas\u0131l uygulanaca\u011F\u0131n\u0131 g\xF6stermek i\xE7in bir Blog program\u0131 \xF6rne\u011Fi alaca\u011F\u0131z.

Bu Blog program\u0131nda, her Kullan\u0131c\u0131n\u0131n(User) tek bir Blog'u olmas\u0131n\u0131 istiyoruz. Bu blog herhangi bir say\u0131da Post i\xE7erebilir. Bu, her kullan\u0131c\u0131y\u0131 bir blogla e\u015Fle\u015Ftirdi\u011Fimiz (mapping) ve her yaz\u0131n\u0131n belirli bir blogla e\u015Fle\u015Ftirildi\u011Fi (mapped) anlam\u0131na gelir.

K\u0131sacas\u0131, bir kullan\u0131c\u0131 ile blogu aras\u0131nda 1:1 e\u015Fleme varken, blog ve g\xF6nderileri aras\u0131nda 1:N e\u015Fleme vard\u0131r.

1:1 e\u015Fleme i\xE7in, bir blog adresinin yaln\u0131zca kullan\u0131c\u0131s\u0131ndan t\xFCretilmesini isteriz; bu, yetkisi (veya kullan\u0131c\u0131s\u0131) verildi\u011Finde bir blogu geri almam\u0131za izin verir. Bu nedenle, bir blogun seed\u2019leri, authority's key\u2019den(otorite anahtar\u0131ndan) ve muhtemelen bir t\xFCr tan\u0131mlay\u0131c\u0131s\u0131 olarak i\u015Flev g\xF6rmesi i\xE7in "blog" \xF6n ekinden olu\u015Facakt\u0131r. 1:N e\u015Fleme i\xE7in, her bir g\xF6nderinin adresinin yaln\u0131zca ili\u015Fkili oldu\u011Fu blogdan de\u011Fil, ayn\u0131 zamanda blogdaki N say\u0131da g\xF6nderi aras\u0131nda ayr\u0131m yapmam\u0131za izin veren ba\u015Fka bir tan\u0131mlay\u0131c\u0131dan t\xFCretilmesini isteriz. A\u015Fa\u011F\u0131daki \xF6rnekte, her g\xF6nderinin adresi, blog anahtar\u0131ndan, her g\xF6nderiyi tan\u0131mlamak i\xE7in bir bilgi i\u015Faretinden ve bir t\xFCr tan\u0131mlay\u0131c\u0131s\u0131 olarak i\u015Flev g\xF6rmek i\xE7in "Post" \xF6n ekinden t\xFCretilmi\u015Ftir.

Kod a\u015Fa\u011F\u0131da g\xF6sterildi\u011Fi gibidir:

#[derive(Accounts)]
+import{_ as e,r as o,o as c,c as l,a as s,b as p,F as u,d as n,e as t}from"./app.d411e3b3.js";const i={},r=s("h1",{id:"account-maps-hesap-haritalar\u0131",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#account-maps-hesap-haritalar\u0131","aria-hidden":"true"},"#"),n(" Account Maps (Hesap Haritalar\u0131)")],-1),k=s("p",null,[n("Maps, bir key\u2019i bir t\xFCr de\u011Ferle ili\u015Fkilendirmek i\xE7in programlamada s\u0131kl\u0131kla kulland\u0131\u011F\u0131m\u0131z veri yap\u0131lar\u0131d\u0131r. "),s("strong",null,"Key"),n(" ve "),s("strong",null,"de\u011Fer"),n(" herhangi bir t\xFCrde olabilir ve key, kaydedilmekte olan belirli bir de\u011Fer i\xE7in tan\u0131mlay\u0131c\u0131 g\xF6revi g\xF6r\xFCr. Daha sonra, key\u2019i verildi\u011Finde, bu de\u011Ferleri verimli bir \u015Fekilde eklememize, almam\u0131za ve g\xFCncellememize izin verir.")],-1),b=n("Solana'n\u0131n Hesap modeli, bildi\u011Fimiz gibi, program verilerinin ve ilgili durum verilerinin farkl\u0131 account'larda depolanmas\u0131n\u0131 gerektirir. Bu account'lar\u0131n kendileriyle ili\u015Fkili bir adresi vard\u0131r. Bu, kendi i\xE7inde bir map g\xF6revi g\xF6r\xFCr! Solana'n\u0131n Hesap modu hakk\u0131nda daha fazla bilgiyi "),m={href:"https://solanacookbook.com/core-concepts/accounts.html",target:"_blank",rel:"noopener noreferrer"},d=n("buradan"),g=n(" edinebilirsiniz."),y=t('

Bu nedenle, de\u011Feri almak i\xE7in gereken key adresiyle de\u011Ferlerinizi ayr\u0131 account'larda saklamak mant\u0131kl\u0131 olacakt\u0131r. Ancak bu, a\u015Fa\u011F\u0131daki gibi birka\xE7 sorunu beraberinde getirir:

  • Yukar\u0131da bahsedilen adresler, b\xFCy\xFCk olas\u0131l\u0131kla, hat\u0131rlayabilece\u011Finiz ve gerekli de\u011Feri alabilece\u011Finiz ideal key\u2019ler olmayacakt\u0131r.

  • Yukar\u0131da bahsedilen adresler, her bir public key\u2019in (veya adresin) kendisiyle ili\u015Fkilendirilmi\u015F bir private key\u2019e sahip olaca\u011F\u0131 farkl\u0131 Keypair\u2019lerin public key\u2019lerine at\u0131fta bulunur. Bu private key, gerekti\u011Finde ve gerekti\u011Finde farkl\u0131 talimatlar\u0131 imzalamak i\xE7in gerekli olacakt\u0131r, bu da private key\u2019i bir yerde saklamam\u0131z\u0131 gerektirir, ki bu kesinlikle \xF6nerilmez!

Bu, bir\xE7ok Solana geli\u015Ftiricisinin kar\u015F\u0131la\u015Ft\u0131\u011F\u0131 ve programlar\u0131na Map benzeri bir logic uygulayan bir sorun sunuyor. Bu sorunla nas\u0131l ba\u015Fa \xE7\u0131kaca\u011F\u0131m\u0131za birka\xE7 yoldan bakal\u0131m:

Deriving PDAs

',4),f=n("PDA, "),_={href:"https://solanacookbook.com/references/accounts.html#program-derived-address",target:"_blank",rel:"noopener noreferrer"},h=n("Program Derived Address"),w=n(" (Programdan T\xFCretilmi\u015F Adres) anlam\u0131na gelir ve k\u0131saca, bir dizi seed ve bir program kimli\u011Finden (veya adresinden) t\xFCretilen adreslerdir."),A=n("PDA'larla ilgili benzersiz olan \u015Fey, bu adreslerin herhangi bir private key ile ili\u015Fkili olmamas\u0131d\u0131r. Bunun nedeni, bu adreslerin ED25519 e\u011Frisi \xFCzerinde yer almamas\u0131d\u0131r. Bu nedenle, yaln\u0131zca bu adresin t\xFCretildi\u011Fi program, seedler de sa\u011Flanm\u0131\u015Fsa, key\u2019le bir talimat imzalayabilir. Bu konuda "),v={href:"https://solanacookbook.com/references/programs.html#create-a-program-derived-address",target:"_blank",rel:"noopener noreferrer"},z=n("buradan"),B=n(" daha fazla bilgi edinebilirsiniz."),q=t(`

Art\u0131k PDA'lar\u0131n ne oldu\u011Fu hakk\u0131nda bir fikrimiz oldu\u011Funa g\xF6re, onlar\u0131 baz\u0131 account'lar\u0131 e\u015Fle\u015Ftirmek i\xE7in kullanal\u0131m! Bunun nas\u0131l uygulanaca\u011F\u0131n\u0131 g\xF6stermek i\xE7in bir Blog program\u0131 \xF6rne\u011Fi alaca\u011F\u0131z.

Bu Blog program\u0131nda, her Kullan\u0131c\u0131n\u0131n(User) tek bir Blog'u olmas\u0131n\u0131 istiyoruz. Bu blog herhangi bir say\u0131da Post i\xE7erebilir. Bu, her kullan\u0131c\u0131y\u0131 bir blogla e\u015Fle\u015Ftirdi\u011Fimiz (mapping) ve her yaz\u0131n\u0131n belirli bir blogla e\u015Fle\u015Ftirildi\u011Fi (mapped) anlam\u0131na gelir.

K\u0131sacas\u0131, bir kullan\u0131c\u0131 ile blogu aras\u0131nda 1:1 e\u015Fleme varken, blog ve g\xF6nderileri aras\u0131nda 1:N e\u015Fleme vard\u0131r.

1:1 e\u015Fleme i\xE7in, bir blog adresinin yaln\u0131zca kullan\u0131c\u0131s\u0131ndan t\xFCretilmesini isteriz; bu, yetkisi (veya kullan\u0131c\u0131s\u0131) verildi\u011Finde bir blogu geri almam\u0131za izin verir. Bu nedenle, bir blogun seed\u2019leri, authority's key\u2019den(otorite anahtar\u0131ndan) ve muhtemelen bir t\xFCr tan\u0131mlay\u0131c\u0131s\u0131 olarak i\u015Flev g\xF6rmesi i\xE7in "blog" \xF6n ekinden olu\u015Facakt\u0131r. 1:N e\u015Fleme i\xE7in, her bir g\xF6nderinin adresinin yaln\u0131zca ili\u015Fkili oldu\u011Fu blogdan de\u011Fil, ayn\u0131 zamanda blogdaki N say\u0131da g\xF6nderi aras\u0131nda ayr\u0131m yapmam\u0131za izin veren ba\u015Fka bir tan\u0131mlay\u0131c\u0131dan t\xFCretilmesini isteriz. A\u015Fa\u011F\u0131daki \xF6rnekte, her g\xF6nderinin adresi, blog anahtar\u0131ndan, her g\xF6nderiyi tan\u0131mlamak i\xE7in bir bilgi i\u015Faretinden ve bir t\xFCr tan\u0131mlay\u0131c\u0131s\u0131 olarak i\u015Flev g\xF6rmek i\xE7in "Post" \xF6n ekinden t\xFCretilmi\u015Ftir.

Kod a\u015Fa\u011F\u0131da g\xF6sterildi\u011Fi gibidir:

#[derive(Accounts)]
 #[instruction(blog_account_bump: u8)]
 pub struct InitializeBlog<'info> {
     #[account(
diff --git a/docs/.vuepress/dist/assets/accounts.html.5affc5f4.js b/docs/.vuepress/dist/assets/accounts.html.064c9f53.js
similarity index 99%
rename from docs/.vuepress/dist/assets/accounts.html.5affc5f4.js
rename to docs/.vuepress/dist/assets/accounts.html.064c9f53.js
index 5becc7084..a48b8ec2a 100644
--- a/docs/.vuepress/dist/assets/accounts.html.5affc5f4.js
+++ b/docs/.vuepress/dist/assets/accounts.html.064c9f53.js
@@ -1,4 +1,4 @@
-import{_ as r,r as p,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"\u8D26\u6237",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D26\u6237","aria-hidden":"true"},"#"),s(" \u8D26\u6237")],-1),f=n("h2",{id:"\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237")],-1),g=s("\u521B\u5EFA\u4E00\u4E2A\u7531"),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("\u7CFB\u7EDF\u7A0B\u5E8F"),P=s(" \u62E5\u6709\u7684\u8D26\u6237\u3002Solana\u8FD0\u884C\u65F6\u5C06\u6388\u4E88\u8D26\u6237\u7684\u6240\u6709\u8005\u5BF9\u5176\u6570\u636E\u7684\u5199\u5165\u6743\u9650\u6216\u8F6C\u79FBLamports\u7684\u8BBF\u95EE\u6743\u9650\u3002\u5728\u521B\u5EFA\u8D26\u6237\u65F6\uFF0C\u6211\u4EEC\u9700\u8981\u9884\u5148\u5206\u914D\u4E00\u5B9A\u5927\u5C0F\u7684\u5B58\u50A8\u7A7A\u95F4\uFF08space\uFF09\u548C\u8DB3\u591F\u7684Lamports\u6765\u652F\u4ED8\u79DF\u91D1\u3002 "),v={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},S=s("\u79DF\u91D1\uFF08Rent\uFF09"),A=s(" \u662F\u5728Solana\u4E0A\u4FDD\u6301\u8D26\u6237\u6D3B\u8DC3\u6240\u9700\u652F\u4ED8\u7684\u8D39\u7528\u3002"),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as r,r as p,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"\u8D26\u6237",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D26\u6237","aria-hidden":"true"},"#"),s(" \u8D26\u6237")],-1),f=n("h2",{id:"\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237")],-1),g=s("\u521B\u5EFA\u4E00\u4E2A\u7531"),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("\u7CFB\u7EDF\u7A0B\u5E8F"),P=s(" \u62E5\u6709\u7684\u8D26\u6237\u3002Solana\u8FD0\u884C\u65F6\u5C06\u6388\u4E88\u8D26\u6237\u7684\u6240\u6709\u8005\u5BF9\u5176\u6570\u636E\u7684\u5199\u5165\u6743\u9650\u6216\u8F6C\u79FBLamports\u7684\u8BBF\u95EE\u6743\u9650\u3002\u5728\u521B\u5EFA\u8D26\u6237\u65F6\uFF0C\u6211\u4EEC\u9700\u8981\u9884\u5148\u5206\u914D\u4E00\u5B9A\u5927\u5C0F\u7684\u5B58\u50A8\u7A7A\u95F4\uFF08space\uFF09\u548C\u8DB3\u591F\u7684Lamports\u6765\u652F\u4ED8\u79DF\u91D1\u3002 "),v={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},S=s("\u79DF\u91D1\uFF08Rent\uFF09"),A=s(" \u662F\u5728Solana\u4E0A\u4FDD\u6301\u8D26\u6237\u6D3B\u8DC3\u6240\u9700\u652F\u4ED8\u7684\u8D39\u7528\u3002"),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   Transaction`),n("span",{class:"token punctuation"},","),s(`
diff --git a/docs/.vuepress/dist/assets/accounts.html.ef2241b1.js b/docs/.vuepress/dist/assets/accounts.html.150ec297.js
similarity index 99%
rename from docs/.vuepress/dist/assets/accounts.html.ef2241b1.js
rename to docs/.vuepress/dist/assets/accounts.html.150ec297.js
index b568191fe..11b783133 100644
--- a/docs/.vuepress/dist/assets/accounts.html.ef2241b1.js
+++ b/docs/.vuepress/dist/assets/accounts.html.150ec297.js
@@ -1,4 +1,4 @@
-import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),g=n("h2",{id:"lam-the-nao-\u0111e-tao-mot-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-tao-mot-system-account","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t System Account")],-1),f=s("T\u1EA1o m\u1ED9t System Account ngh\u0129a l\xE0 t\u1EA1o m\u1ED9t Account v\u1EDBi ch\u1EE7 s\u1EDF h\u1EEFu l\xE0 "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(". Khi th\u1EF1c thi, Solana s\u1EBD \u0111\u01B0\u1EE3c g\xE1n v\xE0o m\u1ED9t Account, truy c\xE2n \u0111\u1EC3 ghi d\u1EEF li\u1EC7u, ho\u1EB7c chuy\u1EC3n lamports. Khi kh\u1EDFi t\u1EA1o Account, ch\xFAng ta ph\u1EA3i ph\xE2n ph\xE1t m\u1ED9t v\xF9ng nh\u1EDB v\u1EDBi \u0111\u1ECD d\xE0i c\u1ED1 \u0111\u1ECBnh tr\u01B0\u1EDBc ti\xEAn ("),v=n("code",null,"space",-1),S=s(") v\xE0 s\u1ED1 lamports \u0111\u1EE7 \u0111\u1EC3 thu\xEA v\xF9ng nh\u1EDB \u0111\xF3. "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Ph\xED thu\xEA"),K=s(" l\xE0 chi ph\xED tr\u1EA3 cho vi\u1EC7c gi\u1EEF v\xF9ng nh\u1EDB c\u1EE7a Account t\u1ED3n t\u1EA1i tr\xEAn Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),g=n("h2",{id:"lam-the-nao-\u0111e-tao-mot-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-tao-mot-system-account","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t System Account")],-1),f=s("T\u1EA1o m\u1ED9t System Account ngh\u0129a l\xE0 t\u1EA1o m\u1ED9t Account v\u1EDBi ch\u1EE7 s\u1EDF h\u1EEFu l\xE0 "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(". Khi th\u1EF1c thi, Solana s\u1EBD \u0111\u01B0\u1EE3c g\xE1n v\xE0o m\u1ED9t Account, truy c\xE2n \u0111\u1EC3 ghi d\u1EEF li\u1EC7u, ho\u1EB7c chuy\u1EC3n lamports. Khi kh\u1EDFi t\u1EA1o Account, ch\xFAng ta ph\u1EA3i ph\xE2n ph\xE1t m\u1ED9t v\xF9ng nh\u1EDB v\u1EDBi \u0111\u1ECD d\xE0i c\u1ED1 \u0111\u1ECBnh tr\u01B0\u1EDBc ti\xEAn ("),v=n("code",null,"space",-1),S=s(") v\xE0 s\u1ED1 lamports \u0111\u1EE7 \u0111\u1EC3 thu\xEA v\xF9ng nh\u1EDB \u0111\xF3. "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Ph\xED thu\xEA"),K=s(" l\xE0 chi ph\xED tr\u1EA3 cho vi\u1EC7c gi\u1EEF v\xF9ng nh\u1EDB c\u1EE7a Account t\u1ED3n t\u1EA1i tr\xEAn Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   Transaction`),n("span",{class:"token punctuation"},","),s(`
diff --git a/docs/.vuepress/dist/assets/accounts.html.0cab14f0.js b/docs/.vuepress/dist/assets/accounts.html.3642f7bf.js
similarity index 99%
rename from docs/.vuepress/dist/assets/accounts.html.0cab14f0.js
rename to docs/.vuepress/dist/assets/accounts.html.3642f7bf.js
index 6d3962244..fc2eb0693 100644
--- a/docs/.vuepress/dist/assets/accounts.html.0cab14f0.js
+++ b/docs/.vuepress/dist/assets/accounts.html.3642f7bf.js
@@ -1,4 +1,4 @@
-import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as i}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"akun",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#akun","aria-hidden":"true"},"#"),s(" Akun")],-1),g=n("h2",{id:"bagaimana-cara-membuat-sebuah-sistem-akun",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-membuat-sebuah-sistem-akun","aria-hidden":"true"},"#"),s(" Bagaimana cara membuat sebuah sistem akun")],-1),f=s("Membuat sistem akun ("),w=n("em",null,"system account",-1),h=s(") yang dimiliki oleh "),P={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},v=s("System Program"),S=s(". Solana runtime akan memberikan akses ke pemilik akun, akses untuk menulis ke dalam datanya sendiri dana mentransfer lamports. Ketika membuat sebuah account, kita harus mempersiapkan kapasitas penyimpanan tetap dalam bytes ("),A=n("code",null,"space",-1),x=s(") dan lamports yang cukup untuk mencover rent. "),K={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},T=s("Rent"),C=s(" adalah biaya yang ditimbulkan untuk menjaga agar account tetap hidup di Solana."),R=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as i}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"akun",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#akun","aria-hidden":"true"},"#"),s(" Akun")],-1),g=n("h2",{id:"bagaimana-cara-membuat-sebuah-sistem-akun",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-membuat-sebuah-sistem-akun","aria-hidden":"true"},"#"),s(" Bagaimana cara membuat sebuah sistem akun")],-1),f=s("Membuat sistem akun ("),w=n("em",null,"system account",-1),h=s(") yang dimiliki oleh "),P={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},v=s("System Program"),S=s(". Solana runtime akan memberikan akses ke pemilik akun, akses untuk menulis ke dalam datanya sendiri dana mentransfer lamports. Ketika membuat sebuah account, kita harus mempersiapkan kapasitas penyimpanan tetap dalam bytes ("),A=n("code",null,"space",-1),x=s(") dan lamports yang cukup untuk mencover rent. "),K={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},T=s("Rent"),C=s(" adalah biaya yang ditimbulkan untuk menjaga agar account tetap hidup di Solana."),R=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   Transaction`),n("span",{class:"token punctuation"},","),s(`
diff --git a/docs/.vuepress/dist/assets/accounts.html.91bec01d.js b/docs/.vuepress/dist/assets/accounts.html.3805dda2.js
similarity index 98%
rename from docs/.vuepress/dist/assets/accounts.html.91bec01d.js
rename to docs/.vuepress/dist/assets/accounts.html.3805dda2.js
index effbf5b09..a361596cf 100644
--- a/docs/.vuepress/dist/assets/accounts.html.91bec01d.js
+++ b/docs/.vuepress/dist/assets/accounts.html.3805dda2.js
@@ -1 +1 @@
-import{_ as e,r as i,o as g,c as r,a,b as o,F as c,d as n,e as s}from"./app.07ce7a66.js";var l="/assets/account_example.5b70d95a.jpeg";const d={},u=a("h1",{id:"accounts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),n(" Accounts")],-1),m=a("p",null,"Ang mga account sa loob ng Solana ay ginagamit upang mag-imbak ng estado. Mahalaga sila building block para sa pagbuo sa Solana.",-1),p=a("h2",{id:"facts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),h={class:"custom-container tip"},_=a("p",{class:"custom-container-title"},"Fact Sheet",-1),b=a("li",null,"Ang mga account ay ginagamit upang mag-imbak ng data",-1),y=a("li",null,"Ang bawat account ay may natatanging address",-1),k=a("li",null,"Ang mga account ay may maximum na laki na 10MB (10 Mega Bytes)",-1),f=a("li",null,"Ang mga PDA account ay may max na laki na 10KB (10 Kilo Bytes)",-1),w=a("li",null,"Maaaring gamitin ang mga PDA account para mag-sign sa ngalan ng isang programa",-1),A=n("Ang laki ng mga account ay naayos sa oras ng paggawa, ngunit maaaring isaayos gamit ang "),x={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},S=n("realloc"),M=a("li",null,"Ang imbakan ng data ng account ay binabayaran ng upa",-1),v=a("li",null,"Default na may-ari ng account ay ang System Program",-1),D=s('

Deep Dive

Account Model

Mayroong 3 uri ng mga account sa Solana:

  • Nag-iimbak ng data ang mga data account
  • Nag-iimbak ang mga program account ng mga executable na programa
  • Mga katutubong account na nagsasaad ng mga katutubong programa sa Solana gaya ng System, Stake, at Vote

Sa loob ng mga data account, mayroong 2 uri:

  • Mga account na pagmamay-ari ng system
  • Mga PDA (Program Derived Address) account

Ang bawat account ay may address (karaniwang pampublikong susi) at may-ari (address ng isang program account). Ang buong field ay naglilista ng isang account store ay matatagpuan sa ibaba.

FieldDescription
lamportsThe number of lamports owned by this account
ownerThe program owner of this account
executableWhether this account can process instructions
dataThe raw data byte array stored by this account
rent_epochThe next epoch that this account will owe rent

Mayroong ilang mahahalagang tuntunin sa pagmamay-ari:

  • Tanging ang may-ari ng data account ang makakapagbago ng data at mga debit na lampor nito
  • Sinuman ay pinahihintulutan na i-credit ang mga lampor sa isang data account
  • Ang may-ari ng isang account ay maaaring magtalaga ng bagong may-ari kung ang data ng account ay na-zero out

Ang mga account ng programa ay hindi nag-iimbak ng estado.

Halimbawa, kung mayroon kang counter program na hinahayaan kang dagdagan ang isang counter, ikaw dapat gumawa ng dalawang account, isang account para mag-imbak ng code ng program, at isa para mag-imbak ang counter.

Upang maiwasang matanggal ang isang account, dapat kang magbayad ng upa.

Rent

Ang pag-iimbak ng data sa mga account ay nagkakahalaga ng SOL upang mapanatili, at ito ay pinondohan ng tinatawag na upa. Kung nagpapanatili ka ng isang minimum na balanse na katumbas ng 2 taon ng mga pagbabayad sa upa sa isang account, ang iyong account ay magiging exempt sa pagbabayad ng upa. Maaari mong kunin ang upa sa pamamagitan ng pagsasara ang account at ibabalik ang mga lamport sa iyong wallet.

Binabayaran ang upa sa dalawang magkaibang timing:

  1. Kapag tinukoy ng isang transaksyon
  2. Sa sandaling panahon

Ang isang porsyento ng upa na nakolekta ng mga account ay nawasak, habang ang iba ay ipinamamahagi para bumoto ng mga account sa dulo ng bawat slot.

Kung ang account ay walang sapat na pambayad ng renta, ang account ay ipagkakaloob at ang data inalis.

Mahalaga ring tandaan na ang mga bagong account ay dapat na walang bayad sa pagrenta.

Other Resources

',22),B={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},T=n("Solana Account Model"),F={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},N=n("Official Documentation"),P={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},K=n("pencilflip account thread"),V=a("h3",{id:"credit",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),n(" Credit")],-1),z=n("Ang pangunahing konsepto na ito ay kredito sa Pencilflip. "),E={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},L=n("Follow him on Twitter"),O=n(".");function C(I,R){const t=i("ExternalLinkIcon");return g(),r(c,null,[u,m,p,a("div",h,[_,a("ul",null,[b,y,k,f,w,a("li",null,[A,a("a",x,[S,o(t)])]),M,v])]),D,a("ul",null,[a("li",null,[a("a",B,[T,o(t)])]),a("li",null,[a("a",F,[N,o(t)])]),a("li",null,[a("a",P,[K,o(t)])])]),V,a("p",null,[z,a("a",E,[L,o(t)]),O])],64)}var H=e(d,[["render",C]]);export{H as default}; +import{_ as e,r as i,o as g,c as r,a,b as o,F as c,d as n,e as s}from"./app.d411e3b3.js";var l="/assets/account_example.5b70d95a.jpeg";const d={},u=a("h1",{id:"accounts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),n(" Accounts")],-1),m=a("p",null,"Ang mga account sa loob ng Solana ay ginagamit upang mag-imbak ng estado. Mahalaga sila building block para sa pagbuo sa Solana.",-1),p=a("h2",{id:"facts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),h={class:"custom-container tip"},_=a("p",{class:"custom-container-title"},"Fact Sheet",-1),b=a("li",null,"Ang mga account ay ginagamit upang mag-imbak ng data",-1),y=a("li",null,"Ang bawat account ay may natatanging address",-1),k=a("li",null,"Ang mga account ay may maximum na laki na 10MB (10 Mega Bytes)",-1),f=a("li",null,"Ang mga PDA account ay may max na laki na 10KB (10 Kilo Bytes)",-1),w=a("li",null,"Maaaring gamitin ang mga PDA account para mag-sign sa ngalan ng isang programa",-1),A=n("Ang laki ng mga account ay naayos sa oras ng paggawa, ngunit maaaring isaayos gamit ang "),x={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},S=n("realloc"),M=a("li",null,"Ang imbakan ng data ng account ay binabayaran ng upa",-1),v=a("li",null,"Default na may-ari ng account ay ang System Program",-1),D=s('

Deep Dive

Account Model

Mayroong 3 uri ng mga account sa Solana:

  • Nag-iimbak ng data ang mga data account
  • Nag-iimbak ang mga program account ng mga executable na programa
  • Mga katutubong account na nagsasaad ng mga katutubong programa sa Solana gaya ng System, Stake, at Vote

Sa loob ng mga data account, mayroong 2 uri:

  • Mga account na pagmamay-ari ng system
  • Mga PDA (Program Derived Address) account

Ang bawat account ay may address (karaniwang pampublikong susi) at may-ari (address ng isang program account). Ang buong field ay naglilista ng isang account store ay matatagpuan sa ibaba.

FieldDescription
lamportsThe number of lamports owned by this account
ownerThe program owner of this account
executableWhether this account can process instructions
dataThe raw data byte array stored by this account
rent_epochThe next epoch that this account will owe rent

Mayroong ilang mahahalagang tuntunin sa pagmamay-ari:

  • Tanging ang may-ari ng data account ang makakapagbago ng data at mga debit na lampor nito
  • Sinuman ay pinahihintulutan na i-credit ang mga lampor sa isang data account
  • Ang may-ari ng isang account ay maaaring magtalaga ng bagong may-ari kung ang data ng account ay na-zero out

Ang mga account ng programa ay hindi nag-iimbak ng estado.

Halimbawa, kung mayroon kang counter program na hinahayaan kang dagdagan ang isang counter, ikaw dapat gumawa ng dalawang account, isang account para mag-imbak ng code ng program, at isa para mag-imbak ang counter.

Upang maiwasang matanggal ang isang account, dapat kang magbayad ng upa.

Rent

Ang pag-iimbak ng data sa mga account ay nagkakahalaga ng SOL upang mapanatili, at ito ay pinondohan ng tinatawag na upa. Kung nagpapanatili ka ng isang minimum na balanse na katumbas ng 2 taon ng mga pagbabayad sa upa sa isang account, ang iyong account ay magiging exempt sa pagbabayad ng upa. Maaari mong kunin ang upa sa pamamagitan ng pagsasara ang account at ibabalik ang mga lamport sa iyong wallet.

Binabayaran ang upa sa dalawang magkaibang timing:

  1. Kapag tinukoy ng isang transaksyon
  2. Sa sandaling panahon

Ang isang porsyento ng upa na nakolekta ng mga account ay nawasak, habang ang iba ay ipinamamahagi para bumoto ng mga account sa dulo ng bawat slot.

Kung ang account ay walang sapat na pambayad ng renta, ang account ay ipagkakaloob at ang data inalis.

Mahalaga ring tandaan na ang mga bagong account ay dapat na walang bayad sa pagrenta.

Other Resources

',22),B={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},T=n("Solana Account Model"),F={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},N=n("Official Documentation"),P={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},K=n("pencilflip account thread"),V=a("h3",{id:"credit",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),n(" Credit")],-1),z=n("Ang pangunahing konsepto na ito ay kredito sa Pencilflip. "),E={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},L=n("Follow him on Twitter"),O=n(".");function C(I,R){const t=i("ExternalLinkIcon");return g(),r(c,null,[u,m,p,a("div",h,[_,a("ul",null,[b,y,k,f,w,a("li",null,[A,a("a",x,[S,o(t)])]),M,v])]),D,a("ul",null,[a("li",null,[a("a",B,[T,o(t)])]),a("li",null,[a("a",F,[N,o(t)])]),a("li",null,[a("a",P,[K,o(t)])])]),V,a("p",null,[z,a("a",E,[L,o(t)]),O])],64)}var H=e(d,[["render",C]]);export{H as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.5ae3ae45.js b/docs/.vuepress/dist/assets/accounts.html.480effe2.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.5ae3ae45.js rename to docs/.vuepress/dist/assets/accounts.html.480effe2.js index bf67b6bc3..29d0b52b0 100644 --- a/docs/.vuepress/dist/assets/accounts.html.5ae3ae45.js +++ b/docs/.vuepress/dist/assets/accounts.html.480effe2.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const g={},y=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),_=n("h2",{id:"how-to-create-a-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-system-account","aria-hidden":"true"},"#"),s(" How to create a system account")],-1),f=s("Gumawa ng account na pagmamay-ari ng "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(". Ang Solana runtime ay magbibigay sa may-ari ng isang account, ng access sa sumulat sa data nito o maglipat ng mga laport. Kapag gumagawa ng account, kailangan nating maglaan ng isang nakapirming espasyo sa imbakan sa mga byte ("),v=n("code",null,"space",-1),S=s(") at sapat na laport para mabayaran ang renta. Ang "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(" ay isang gastos na natamo upang mapanatiling buhay ang mga account sa Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const g={},y=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),_=n("h2",{id:"how-to-create-a-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-system-account","aria-hidden":"true"},"#"),s(" How to create a system account")],-1),f=s("Gumawa ng account na pagmamay-ari ng "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(". Ang Solana runtime ay magbibigay sa may-ari ng isang account, ng access sa sumulat sa data nito o maglipat ng mga laport. Kapag gumagawa ng account, kailangan nating maglaan ng isang nakapirming espasyo sa imbakan sa mga byte ("),v=n("code",null,"space",-1),S=s(") at sapat na laport para mabayaran ang renta. Ang "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(" ay isang gastos na natamo upang mapanatiling buhay ang mga account sa Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.89eb8977.js b/docs/.vuepress/dist/assets/accounts.html.50b5ecb7.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.89eb8977.js rename to docs/.vuepress/dist/assets/accounts.html.50b5ecb7.js index cdbd3130e..f40a630db 100644 --- a/docs/.vuepress/dist/assets/accounts.html.89eb8977.js +++ b/docs/.vuepress/dist/assets/accounts.html.50b5ecb7.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"cuentas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cuentas","aria-hidden":"true"},"#"),s(" Cuentas")],-1),f=n("h2",{id:"como-crear-una-cuenta-del-sistema",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-crear-una-cuenta-del-sistema","aria-hidden":"true"},"#"),s(" C\xF3mo crear una cuenta del sistema")],-1),g=s("Crea una cuenta del sistema que pertenezca al programa "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(". El runtime de Solana dar\xE1 acceso al due\xF1o de la cuenta a escribir datos y transferir lamports. Cuando se crea una cuenta, debemos definir un espacio de almacenamiento en bytes ("),v=n("code",null,"space",-1),S=s(") y lamports suficientes para cubrir la renta. La renta ("),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(") es un costo en Solana para mantener las cuentas activas."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"cuentas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cuentas","aria-hidden":"true"},"#"),s(" Cuentas")],-1),f=n("h2",{id:"como-crear-una-cuenta-del-sistema",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-crear-una-cuenta-del-sistema","aria-hidden":"true"},"#"),s(" C\xF3mo crear una cuenta del sistema")],-1),g=s("Crea una cuenta del sistema que pertenezca al programa "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(". El runtime de Solana dar\xE1 acceso al due\xF1o de la cuenta a escribir datos y transferir lamports. Cuando se crea una cuenta, debemos definir un espacio de almacenamiento en bytes ("),v=n("code",null,"space",-1),S=s(") y lamports suficientes para cubrir la renta. La renta ("),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(") es un costo en Solana para mantener las cuentas activas."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.8c2c7d40.js b/docs/.vuepress/dist/assets/accounts.html.6398d200.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.8c2c7d40.js rename to docs/.vuepress/dist/assets/accounts.html.6398d200.js index 986a809ab..6f4a46f83 100644 --- a/docs/.vuepress/dist/assets/accounts.html.8c2c7d40.js +++ b/docs/.vuepress/dist/assets/accounts.html.6398d200.js @@ -1 +1 @@ -import{_ as c,r as n,o as r,c as s,a as t,b as o,F as l,d as e,e as i}from"./app.07ce7a66.js";var d="/assets/account_example.5b70d95a.jpeg";const u={},h=t("h1",{id:"accounts",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),e(" Accounts")],-1),p=t("p",null,"Accounts \u0E43\u0E19 Solana \u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A state \u0E41\u0E25\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E2A\u0E33\u0E04\u0E31\u0E0D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana.",-1),_=t("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),e(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),m={class:"custom-container tip"},f=t("p",{class:"custom-container-title"},"Fact Sheet",-1),g=t("li",null,"Accounts \u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 (data)",-1),b=t("li",null,"\u0E41\u0E15\u0E48\u0E25\u0E30 account \u0E21\u0E35 address \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19",-1),x=t("li",null,"Accounts \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 10MB (10 Mega Bytes)",-1),k=t("li",null,"PDA accounts \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 10KB (10 Kilo Bytes)",-1),A=t("li",null,"PDA accounts \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49 sign \u0E41\u0E17\u0E19 program \u0E44\u0E14\u0E49",-1),S=e("\u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 Accounts \u0E08\u0E30\u0E16\u0E39\u0E01\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48\u0E15\u0E2D\u0E19\u0E2A\u0E23\u0E49\u0E32\u0E07 \u0E41\u0E15\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E44\u0E14\u0E49\u0E17\u0E35\u0E2B\u0E25\u0E31\u0E07\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23 "),y={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},v=e("realloc"),w=t("li",null,"\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A data \u0E43\u0E19 Account \u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22\u0E22\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32 (rent)",-1),P=t("li",null,"\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E15\u0E32\u0E21 default \u0E04\u0E37\u0E2D System Program",-1),B=i('

\u0E25\u0E07\u0E25\u0E36\u0E01

Account Model

accounts \u0E1A\u0E19 Solana \u0E08\u0E30\u0E21\u0E35 3 \u0E41\u0E1A\u0E1A:

  • Data accounts \u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A data
  • Program accounts \u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A executable programs
  • Native accounts \u0E04\u0E37\u0E2D\u0E1E\u0E27\u0E01 native programs \u0E1A\u0E19 Solana \u0E40\u0E0A\u0E48\u0E19 System, Stake, \u0E41\u0E25\u0E30 Vote

data accounts \u0E21\u0E35 2 \u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17:

  • accounts \u0E17\u0E35\u0E48\u0E21\u0E35 System \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07
  • PDA (Program Derived Address) accounts

\u0E41\u0E15\u0E48\u0E25\u0E30 account \u0E08\u0E30\u0E21\u0E35 address (\u0E01\u0E47\u0E04\u0E37\u0E2D public key) \u0E41\u0E25\u0E30\u0E21\u0E35 owner (address \u0E02\u0E2D\u0E07 program account). \u0E42\u0E14\u0E22 account \u0E08\u0E30\u0E21\u0E35 field \u0E15\u0E32\u0E21\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49

Field\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22
lamports\u0E08\u0E33\u0E19\u0E27\u0E19 lamports \u0E17\u0E35\u0E48 account \u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48
ownerprogram \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E19\u0E35\u0E49
executableaccount \u0E19\u0E35\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 instructions \u0E44\u0E14\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48
data\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E14\u0E34\u0E1A\u0E40\u0E1B\u0E47\u0E19 byte array \u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19 account \u0E19\u0E35\u0E49
rent_epochepoch \u0E16\u0E31\u0E14\u0E44\u0E1B\u0E17\u0E35\u0E48 account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E35\u0E49\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32 rent

\u0E01\u0E0F\u0E17\u0E35\u0E48\u0E2A\u0E33\u0E04\u0E31\u0E0D\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A ownership:

  • \u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 data account \u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E01\u0E49\u0E44\u0E02\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07\u0E15\u0E31\u0E27\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49 \u0E41\u0E25\u0E30\u0E16\u0E2D\u0E19 lamports \u0E2D\u0E2D\u0E01\u0E21\u0E32\u0E44\u0E14\u0E49
  • \u0E17\u0E38\u0E01\u0E04\u0E19\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1D\u0E32\u0E01 lamports \u0E40\u0E02\u0E49\u0E32 data account \u0E44\u0E14\u0E49
  • \u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E42\u0E2D\u0E19\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E16\u0E49\u0E32 data \u0E43\u0E19 account \u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E25\u0E49\u0E27 (zeroed out)

Program accounts \u0E44\u0E21\u0E48\u0E40\u0E01\u0E47\u0E1A state.

\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E0A\u0E48\u0E19 \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E21\u0E35 counter program \u0E17\u0E35\u0E48\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19 counter \u0E44\u0E14\u0E49, \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 2 accounts \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 account \u0E41\u0E23\u0E01\u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A code \u0E02\u0E2D\u0E07 program \u0E41\u0E25\u0E30\u0E2D\u0E35\u0E01\u0E2D\u0E31\u0E19\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A\u0E08\u0E33\u0E19\u0E27\u0E19 counter

\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22 Rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32) \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E1B\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E19 account \u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E16\u0E39\u0E01\u0E25\u0E1A

Rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32)

\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1A\u0E19 account \u0E08\u0E30\u0E40\u0E2A\u0E35\u0E22 SOL \u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E39\u0E41\u0E25 \u0E41\u0E25\u0E30\u0E21\u0E31\u0E19\u0E08\u0E30\u0E16\u0E39\u0E01\u0E08\u0E48\u0E32\u0E22\u0E42\u0E14\u0E22\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32) \u0E16\u0E49\u0E32\u0E04\u0E38\u0E13\u0E08\u0E48\u0E32\u0E22\u0E17\u0E34\u0E49\u0E07\u0E44\u0E27\u0E49\u0E43\u0E2B\u0E49\u0E04\u0E23\u0E2D\u0E1A\u0E04\u0E25\u0E38\u0E21\u0E02\u0E31\u0E49\u0E19\u0E15\u0E48\u0E33 2 \u0E1B\u0E35 \u0E04\u0E38\u0E13\u0E01\u0E47\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E22\u0E01\u0E40\u0E27\u0E49\u0E19\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32 (rent exempt) \u0E41\u0E25\u0E30\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2D\u0E32 lamports \u0E04\u0E37\u0E19\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E1B\u0E34\u0E14 (close) account \u0E41\u0E25\u0E30\u0E2A\u0E48\u0E07 lamports \u0E04\u0E37\u0E19\u0E2A\u0E39\u0E48 wallet

Rent \u0E08\u0E30\u0E16\u0E39\u0E01\u0E08\u0E48\u0E32\u0E22\u0E40\u0E21\u0E37\u0E48\u0E2D 2 \u0E40\u0E2B\u0E15\u0E38\u0E01\u0E32\u0E23\u0E13\u0E4C\u0E19\u0E35\u0E49\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19:

  1. \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E16\u0E39\u0E01\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E14\u0E49\u0E27\u0E22 transaction
  2. \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E08\u0E1A\u0E23\u0E2D\u0E1A epoch

\u0E08\u0E33\u0E19\u0E27\u0E19 % \u0E02\u0E2D\u0E07 rent \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E08\u0E32\u0E01 accounts \u0E08\u0E30\u0E16\u0E39\u0E01\u0E17\u0E33\u0E25\u0E32\u0E22 \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E08\u0E30\u0E16\u0E39\u0E01\u0E41\u0E08\u0E01\u0E08\u0E48\u0E32\u0E22\u0E44\u0E1B\u0E43\u0E2B\u0E49 vote account \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E08\u0E1A\u0E23\u0E2D\u0E1A\u0E02\u0E2D\u0E07\u0E17\u0E38\u0E01 slot

\u0E16\u0E49\u0E32 account \u0E44\u0E21\u0E48\u0E21\u0E35 lamports \u0E40\u0E1E\u0E35\u0E22\u0E07\u0E1E\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E48\u0E32\u0E22 rent \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 account \u0E16\u0E39\u0E01\u0E08\u0E31\u0E14\u0E2A\u0E23\u0E23\u0E04\u0E37\u0E19 deallocated \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E01\u0E47\u0E08\u0E30\u0E2B\u0E32\u0E22\u0E44\u0E1B

\u0E41\u0E25\u0E30\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E33\u0E44\u0E27\u0E49\u0E14\u0E49\u0E27\u0E22\u0E27\u0E48\u0E32 account \u0E43\u0E2B\u0E21\u0E48\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22\u0E04\u0E48\u0E32 rent exempt \u0E2A\u0E33\u0E23\u0E2D\u0E07\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E01\u0E40\u0E27\u0E49\u0E19\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32\u0E40\u0E2A\u0E21\u0E2D

\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19

',22),D={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},N=e("Solana Account Model"),V={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},F=e("Official Documentation"),M={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},z=e("pencilflip account thread"),E=t("h3",{id:"credit",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),e(" Credit")],-1),L=e("\u0E2B\u0E25\u0E31\u0E01\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19 credit \u0E02\u0E2D\u0E07 Pencilflip. "),R={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},C=e("\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E40\u0E04\u0E49\u0E32\u0E44\u0E14\u0E49\u0E17\u0E32\u0E07 Twitter"),I=e(".");function K(O,T){const a=n("ExternalLinkIcon");return r(),s(l,null,[h,p,_,t("div",m,[f,t("ul",null,[g,b,x,k,A,t("li",null,[S,t("a",y,[v,o(a)])]),w,P])]),B,t("ul",null,[t("li",null,[t("a",D,[N,o(a)])]),t("li",null,[t("a",V,[F,o(a)])]),t("li",null,[t("a",M,[z,o(a)])])]),E,t("p",null,[L,t("a",R,[C,o(a)]),I])],64)}var q=c(u,[["render",K]]);export{q as default}; +import{_ as c,r as n,o as r,c as s,a as t,b as o,F as l,d as e,e as i}from"./app.d411e3b3.js";var d="/assets/account_example.5b70d95a.jpeg";const u={},h=t("h1",{id:"accounts",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),e(" Accounts")],-1),p=t("p",null,"Accounts \u0E43\u0E19 Solana \u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A state \u0E41\u0E25\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E2A\u0E33\u0E04\u0E31\u0E0D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana.",-1),_=t("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),e(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),m={class:"custom-container tip"},f=t("p",{class:"custom-container-title"},"Fact Sheet",-1),g=t("li",null,"Accounts \u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 (data)",-1),b=t("li",null,"\u0E41\u0E15\u0E48\u0E25\u0E30 account \u0E21\u0E35 address \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E0B\u0E49\u0E33\u0E01\u0E31\u0E19",-1),x=t("li",null,"Accounts \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 10MB (10 Mega Bytes)",-1),k=t("li",null,"PDA accounts \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E44\u0E14\u0E49\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 10KB (10 Kilo Bytes)",-1),A=t("li",null,"PDA accounts \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49 sign \u0E41\u0E17\u0E19 program \u0E44\u0E14\u0E49",-1),S=e("\u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 Accounts \u0E08\u0E30\u0E16\u0E39\u0E01\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48\u0E15\u0E2D\u0E19\u0E2A\u0E23\u0E49\u0E32\u0E07 \u0E41\u0E15\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E44\u0E14\u0E49\u0E17\u0E35\u0E2B\u0E25\u0E31\u0E07\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23 "),y={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},v=e("realloc"),w=t("li",null,"\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A data \u0E43\u0E19 Account \u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22\u0E22\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32 (rent)",-1),P=t("li",null,"\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E15\u0E32\u0E21 default \u0E04\u0E37\u0E2D System Program",-1),B=i('

\u0E25\u0E07\u0E25\u0E36\u0E01

Account Model

accounts \u0E1A\u0E19 Solana \u0E08\u0E30\u0E21\u0E35 3 \u0E41\u0E1A\u0E1A:

  • Data accounts \u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A data
  • Program accounts \u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A executable programs
  • Native accounts \u0E04\u0E37\u0E2D\u0E1E\u0E27\u0E01 native programs \u0E1A\u0E19 Solana \u0E40\u0E0A\u0E48\u0E19 System, Stake, \u0E41\u0E25\u0E30 Vote

data accounts \u0E21\u0E35 2 \u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17:

  • accounts \u0E17\u0E35\u0E48\u0E21\u0E35 System \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07
  • PDA (Program Derived Address) accounts

\u0E41\u0E15\u0E48\u0E25\u0E30 account \u0E08\u0E30\u0E21\u0E35 address (\u0E01\u0E47\u0E04\u0E37\u0E2D public key) \u0E41\u0E25\u0E30\u0E21\u0E35 owner (address \u0E02\u0E2D\u0E07 program account). \u0E42\u0E14\u0E22 account \u0E08\u0E30\u0E21\u0E35 field \u0E15\u0E32\u0E21\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49

Field\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22
lamports\u0E08\u0E33\u0E19\u0E27\u0E19 lamports \u0E17\u0E35\u0E48 account \u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48
ownerprogram \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E19\u0E35\u0E49
executableaccount \u0E19\u0E35\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 instructions \u0E44\u0E14\u0E49\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48
data\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E14\u0E34\u0E1A\u0E40\u0E1B\u0E47\u0E19 byte array \u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19 account \u0E19\u0E35\u0E49
rent_epochepoch \u0E16\u0E31\u0E14\u0E44\u0E1B\u0E17\u0E35\u0E48 account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E35\u0E49\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32 rent

\u0E01\u0E0F\u0E17\u0E35\u0E48\u0E2A\u0E33\u0E04\u0E31\u0E0D\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A ownership:

  • \u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 data account \u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E01\u0E49\u0E44\u0E02\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07\u0E15\u0E31\u0E27\u0E40\u0E2D\u0E07\u0E44\u0E14\u0E49 \u0E41\u0E25\u0E30\u0E16\u0E2D\u0E19 lamports \u0E2D\u0E2D\u0E01\u0E21\u0E32\u0E44\u0E14\u0E49
  • \u0E17\u0E38\u0E01\u0E04\u0E19\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1D\u0E32\u0E01 lamports \u0E40\u0E02\u0E49\u0E32 data account \u0E44\u0E14\u0E49
  • \u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E42\u0E2D\u0E19\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E16\u0E49\u0E32 data \u0E43\u0E19 account \u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E25\u0E49\u0E27 (zeroed out)

Program accounts \u0E44\u0E21\u0E48\u0E40\u0E01\u0E47\u0E1A state.

\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E0A\u0E48\u0E19 \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E21\u0E35 counter program \u0E17\u0E35\u0E48\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19 counter \u0E44\u0E14\u0E49, \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 2 accounts \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 account \u0E41\u0E23\u0E01\u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A code \u0E02\u0E2D\u0E07 program \u0E41\u0E25\u0E30\u0E2D\u0E35\u0E01\u0E2D\u0E31\u0E19\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A\u0E08\u0E33\u0E19\u0E27\u0E19 counter

\u0E04\u0E38\u0E13\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22 Rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32) \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E1B\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E19 account \u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E16\u0E39\u0E01\u0E25\u0E1A

Rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32)

\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E1A\u0E19 account \u0E08\u0E30\u0E40\u0E2A\u0E35\u0E22 SOL \u0E43\u0E19\u0E01\u0E32\u0E23\u0E14\u0E39\u0E41\u0E25 \u0E41\u0E25\u0E30\u0E21\u0E31\u0E19\u0E08\u0E30\u0E16\u0E39\u0E01\u0E08\u0E48\u0E32\u0E22\u0E42\u0E14\u0E22\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32) \u0E16\u0E49\u0E32\u0E04\u0E38\u0E13\u0E08\u0E48\u0E32\u0E22\u0E17\u0E34\u0E49\u0E07\u0E44\u0E27\u0E49\u0E43\u0E2B\u0E49\u0E04\u0E23\u0E2D\u0E1A\u0E04\u0E25\u0E38\u0E21\u0E02\u0E31\u0E49\u0E19\u0E15\u0E48\u0E33 2 \u0E1B\u0E35 \u0E04\u0E38\u0E13\u0E01\u0E47\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E22\u0E01\u0E40\u0E27\u0E49\u0E19\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32 (rent exempt) \u0E41\u0E25\u0E30\u0E04\u0E38\u0E13\u0E22\u0E31\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2D\u0E32 lamports \u0E04\u0E37\u0E19\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E1B\u0E34\u0E14 (close) account \u0E41\u0E25\u0E30\u0E2A\u0E48\u0E07 lamports \u0E04\u0E37\u0E19\u0E2A\u0E39\u0E48 wallet

Rent \u0E08\u0E30\u0E16\u0E39\u0E01\u0E08\u0E48\u0E32\u0E22\u0E40\u0E21\u0E37\u0E48\u0E2D 2 \u0E40\u0E2B\u0E15\u0E38\u0E01\u0E32\u0E23\u0E13\u0E4C\u0E19\u0E35\u0E49\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19:

  1. \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E16\u0E39\u0E01\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E14\u0E49\u0E27\u0E22 transaction
  2. \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E08\u0E1A\u0E23\u0E2D\u0E1A epoch

\u0E08\u0E33\u0E19\u0E27\u0E19 % \u0E02\u0E2D\u0E07 rent \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E08\u0E32\u0E01 accounts \u0E08\u0E30\u0E16\u0E39\u0E01\u0E17\u0E33\u0E25\u0E32\u0E22 \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E08\u0E30\u0E16\u0E39\u0E01\u0E41\u0E08\u0E01\u0E08\u0E48\u0E32\u0E22\u0E44\u0E1B\u0E43\u0E2B\u0E49 vote account \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E08\u0E1A\u0E23\u0E2D\u0E1A\u0E02\u0E2D\u0E07\u0E17\u0E38\u0E01 slot

\u0E16\u0E49\u0E32 account \u0E44\u0E21\u0E48\u0E21\u0E35 lamports \u0E40\u0E1E\u0E35\u0E22\u0E07\u0E1E\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E48\u0E32\u0E22 rent \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 account \u0E16\u0E39\u0E01\u0E08\u0E31\u0E14\u0E2A\u0E23\u0E23\u0E04\u0E37\u0E19 deallocated \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E01\u0E47\u0E08\u0E30\u0E2B\u0E32\u0E22\u0E44\u0E1B

\u0E41\u0E25\u0E30\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E33\u0E44\u0E27\u0E49\u0E14\u0E49\u0E27\u0E22\u0E27\u0E48\u0E32 account \u0E43\u0E2B\u0E21\u0E48\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22\u0E04\u0E48\u0E32 rent exempt \u0E2A\u0E33\u0E23\u0E2D\u0E07\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E22\u0E01\u0E40\u0E27\u0E49\u0E19\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32\u0E40\u0E2A\u0E21\u0E2D

\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19

',22),D={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},N=e("Solana Account Model"),V={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},F=e("Official Documentation"),M={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},z=e("pencilflip account thread"),E=t("h3",{id:"credit",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),e(" Credit")],-1),L=e("\u0E2B\u0E25\u0E31\u0E01\u0E01\u0E32\u0E23\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19 credit \u0E02\u0E2D\u0E07 Pencilflip. "),R={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},C=e("\u0E15\u0E34\u0E14\u0E15\u0E32\u0E21\u0E40\u0E04\u0E49\u0E32\u0E44\u0E14\u0E49\u0E17\u0E32\u0E07 Twitter"),I=e(".");function K(O,T){const a=n("ExternalLinkIcon");return r(),s(l,null,[h,p,_,t("div",m,[f,t("ul",null,[g,b,x,k,A,t("li",null,[S,t("a",y,[v,o(a)])]),w,P])]),B,t("ul",null,[t("li",null,[t("a",D,[N,o(a)])]),t("li",null,[t("a",V,[F,o(a)])]),t("li",null,[t("a",M,[z,o(a)])])]),E,t("p",null,[L,t("a",R,[C,o(a)]),I])],64)}var q=c(u,[["render",K]]);export{q as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.d0cb3dfd.js b/docs/.vuepress/dist/assets/accounts.html.67312eab.js similarity index 98% rename from docs/.vuepress/dist/assets/accounts.html.d0cb3dfd.js rename to docs/.vuepress/dist/assets/accounts.html.67312eab.js index 12e7cffb8..def541f0b 100644 --- a/docs/.vuepress/dist/assets/accounts.html.d0cb3dfd.js +++ b/docs/.vuepress/dist/assets/accounts.html.67312eab.js @@ -1 +1 @@ -import{_ as r,r as s,o as n,c as d,a,b as t,F as i,d as e,e as l}from"./app.07ce7a66.js";var c="/assets/account_example.5b70d95a.jpeg";const m={},u=a("h1",{id:"contas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#contas","aria-hidden":"true"},"#"),e(" Contas")],-1),p=a("p",null,"As contas do ecossistema Solana s\xE3o usadas para armazenar estado. Elas s\xE3o um bloco de constru\xE7\xE3o essencial para o desenvolvimento na Solana.",-1),h=a("h2",{id:"fatos",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fatos","aria-hidden":"true"},"#"),e(" Fatos")],-1),_={class:"custom-container tip"},g=a("p",{class:"custom-container-title"},"Ficha Informativa",-1),f=a("li",null,"As contas s\xE3o usadas para armazenar dados",-1),v=a("li",null,"Cada conta tem um endere\xE7o \xFAnico",-1),b=a("li",null,"As contas t\xEAm um tamanho m\xE1ximo de 10 MB (10 Megabytes)",-1),x=a("li",null,"As contas PDA (Program Derived Address, ou Endere\xE7o Derivado de Programa) t\xEAm um tamanho m\xE1ximo de 10 KB (10 Kilobytes)",-1),S=a("li",null,"As contas PDA podem ser usadas para assinar em nome de um programa",-1),z=e("O tamanho das contas \xE9 fixo no momento da cria\xE7\xE3o, mas pode ser ajustado usando o "),C={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},k=e("realloc"),A=a("li",null,"O armazenamento de dados da conta \xE9 pago com aluguel",-1),P=a("li",null,"O propriet\xE1rio padr\xE3o da conta \xE9 o Programa do Sistema (System Program)",-1),q=l('

Mergulho Profundo

Modelo de Conta

Existem 3 tipos de contas na Solana:

  • Contas de dados armazenam dados
  • Contas de programas armazenam programas execut\xE1veis
  • Contas nativas que indicam programas nativos na Solana, como o System, Stake e Vote

Dentro das contas de dados, existem 2 tipos:

  • Contas de propriedade do sistema
  • Contas PDA

Cada conta possui um endere\xE7o (geralmente uma chave p\xFAblica) e um propriet\xE1rio (endere\xE7o de uma conta de programa). A lista completa de campos que uma conta armazena est\xE1 abaixo.

CampoDescri\xE7\xE3o
lamportsO n\xFAmero de lamports (unidade de medida de valor na rede Solana) possu\xEDdos por esta conta.
ownerO propriet\xE1rio do programa desta conta
executableSe esta conta pode processar instru\xE7\xF5es
dataO array de bytes de dados brutos armazenados por esta conta
rent_epochA pr\xF3xima \xE9poca em que esta conta ter\xE1 que pagar aluguel

Existem algumas regras de propriedade importantes:

  • Somente o propriet\xE1rio de uma conta de dados pode modificar seus dados e debitar lamports
  • Qualquer pessoa pode creditar lamports a uma conta de dados
  • O propriet\xE1rio de uma conta pode atribuir um novo propriet\xE1rio se os dados da conta estiverem zerados

Contas de programa n\xE3o armazenam estado.

Por exemplo, se voc\xEA tiver um programa de contador que permita incrementar um contador, voc\xEA deve criar duas contas, uma conta para armazenar o c\xF3digo do programa e outra para armazenar o contador.

Para evitar que uma conta seja exclu\xEDda, voc\xEA deve pagar aluguel.

Aluguel

A manuten\xE7\xE3o do armazenamento de dados em contas custa SOL e \xE9 pago pelo que \xE9 chamado de aluguel. Se voc\xEA mantiver um saldo m\xEDnimo equivalente a 2 anos de pagamentos de aluguel em uma conta, sua conta ficar\xE1 isenta de pagar aluguel. Voc\xEA pode recuperar o aluguel fechando a conta e enviando os lamports de volta para sua carteira.

O aluguel \xE9 pago em dois momentos diferentes:

  1. Quando referenciado por uma transa\xE7\xE3o
  2. Uma vez por \xE9poca

Uma porcentagem do aluguel coletado pelas contas \xE9 destru\xEDda, enquanto o restante \xE9 distribu\xEDdo para contas de voto no final de cada slot.

Se a conta n\xE3o tiver o suficiente para pagar o aluguel, a conta ser\xE1 desalocada e os dados removidos.

Tamb\xE9m \xE9 importante observar que novas contas devem adotar a isen\xE7\xE3o de aluguel.

Outros Recursos

',22),O={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},y=e("Modelo de Conta da Solana"),D={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},E=e("Documenta\xE7\xE3o Oficial"),w={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},V=e("Thread do Twitter criado pelo Pencilflip"),B=a("h3",{id:"creditos",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#creditos","aria-hidden":"true"},"#"),e(" Cr\xE9ditos")],-1),M=e("Este conceito principal \xE9 creditado ao Pencilflip. "),T={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},F=e("Siga ele no Twitter"),N=e(".");function j(I,L){const o=s("ExternalLinkIcon");return n(),d(i,null,[u,p,h,a("div",_,[g,a("ul",null,[f,v,b,x,S,a("li",null,[z,a("a",C,[k,t(o)])]),A,P])]),q,a("ul",null,[a("li",null,[a("a",O,[y,t(o)])]),a("li",null,[a("a",D,[E,t(o)])]),a("li",null,[a("a",w,[V,t(o)])])]),B,a("p",null,[M,a("a",T,[F,t(o)]),N])],64)}var Q=r(m,[["render",j]]);export{Q as default}; +import{_ as r,r as s,o as n,c as d,a,b as t,F as i,d as e,e as l}from"./app.d411e3b3.js";var c="/assets/account_example.5b70d95a.jpeg";const m={},u=a("h1",{id:"contas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#contas","aria-hidden":"true"},"#"),e(" Contas")],-1),p=a("p",null,"As contas do ecossistema Solana s\xE3o usadas para armazenar estado. Elas s\xE3o um bloco de constru\xE7\xE3o essencial para o desenvolvimento na Solana.",-1),h=a("h2",{id:"fatos",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fatos","aria-hidden":"true"},"#"),e(" Fatos")],-1),_={class:"custom-container tip"},g=a("p",{class:"custom-container-title"},"Ficha Informativa",-1),f=a("li",null,"As contas s\xE3o usadas para armazenar dados",-1),v=a("li",null,"Cada conta tem um endere\xE7o \xFAnico",-1),b=a("li",null,"As contas t\xEAm um tamanho m\xE1ximo de 10 MB (10 Megabytes)",-1),x=a("li",null,"As contas PDA (Program Derived Address, ou Endere\xE7o Derivado de Programa) t\xEAm um tamanho m\xE1ximo de 10 KB (10 Kilobytes)",-1),S=a("li",null,"As contas PDA podem ser usadas para assinar em nome de um programa",-1),z=e("O tamanho das contas \xE9 fixo no momento da cria\xE7\xE3o, mas pode ser ajustado usando o "),C={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},k=e("realloc"),A=a("li",null,"O armazenamento de dados da conta \xE9 pago com aluguel",-1),P=a("li",null,"O propriet\xE1rio padr\xE3o da conta \xE9 o Programa do Sistema (System Program)",-1),q=l('

Mergulho Profundo

Modelo de Conta

Existem 3 tipos de contas na Solana:

  • Contas de dados armazenam dados
  • Contas de programas armazenam programas execut\xE1veis
  • Contas nativas que indicam programas nativos na Solana, como o System, Stake e Vote

Dentro das contas de dados, existem 2 tipos:

  • Contas de propriedade do sistema
  • Contas PDA

Cada conta possui um endere\xE7o (geralmente uma chave p\xFAblica) e um propriet\xE1rio (endere\xE7o de uma conta de programa). A lista completa de campos que uma conta armazena est\xE1 abaixo.

CampoDescri\xE7\xE3o
lamportsO n\xFAmero de lamports (unidade de medida de valor na rede Solana) possu\xEDdos por esta conta.
ownerO propriet\xE1rio do programa desta conta
executableSe esta conta pode processar instru\xE7\xF5es
dataO array de bytes de dados brutos armazenados por esta conta
rent_epochA pr\xF3xima \xE9poca em que esta conta ter\xE1 que pagar aluguel

Existem algumas regras de propriedade importantes:

  • Somente o propriet\xE1rio de uma conta de dados pode modificar seus dados e debitar lamports
  • Qualquer pessoa pode creditar lamports a uma conta de dados
  • O propriet\xE1rio de uma conta pode atribuir um novo propriet\xE1rio se os dados da conta estiverem zerados

Contas de programa n\xE3o armazenam estado.

Por exemplo, se voc\xEA tiver um programa de contador que permita incrementar um contador, voc\xEA deve criar duas contas, uma conta para armazenar o c\xF3digo do programa e outra para armazenar o contador.

Para evitar que uma conta seja exclu\xEDda, voc\xEA deve pagar aluguel.

Aluguel

A manuten\xE7\xE3o do armazenamento de dados em contas custa SOL e \xE9 pago pelo que \xE9 chamado de aluguel. Se voc\xEA mantiver um saldo m\xEDnimo equivalente a 2 anos de pagamentos de aluguel em uma conta, sua conta ficar\xE1 isenta de pagar aluguel. Voc\xEA pode recuperar o aluguel fechando a conta e enviando os lamports de volta para sua carteira.

O aluguel \xE9 pago em dois momentos diferentes:

  1. Quando referenciado por uma transa\xE7\xE3o
  2. Uma vez por \xE9poca

Uma porcentagem do aluguel coletado pelas contas \xE9 destru\xEDda, enquanto o restante \xE9 distribu\xEDdo para contas de voto no final de cada slot.

Se a conta n\xE3o tiver o suficiente para pagar o aluguel, a conta ser\xE1 desalocada e os dados removidos.

Tamb\xE9m \xE9 importante observar que novas contas devem adotar a isen\xE7\xE3o de aluguel.

Outros Recursos

',22),O={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},y=e("Modelo de Conta da Solana"),D={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},E=e("Documenta\xE7\xE3o Oficial"),w={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},V=e("Thread do Twitter criado pelo Pencilflip"),B=a("h3",{id:"creditos",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#creditos","aria-hidden":"true"},"#"),e(" Cr\xE9ditos")],-1),M=e("Este conceito principal \xE9 creditado ao Pencilflip. "),T={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},F=e("Siga ele no Twitter"),N=e(".");function j(I,L){const o=s("ExternalLinkIcon");return n(),d(i,null,[u,p,h,a("div",_,[g,a("ul",null,[f,v,b,x,S,a("li",null,[z,a("a",C,[k,t(o)])]),A,P])]),q,a("ul",null,[a("li",null,[a("a",O,[y,t(o)])]),a("li",null,[a("a",D,[E,t(o)])]),a("li",null,[a("a",w,[V,t(o)])])]),B,a("p",null,[M,a("a",T,[F,t(o)]),N])],64)}var Q=r(m,[["render",j]]);export{Q as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.17535e68.js b/docs/.vuepress/dist/assets/accounts.html.72a92f16.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.17535e68.js rename to docs/.vuepress/dist/assets/accounts.html.72a92f16.js index 8f327e8d2..15073f4e3 100644 --- a/docs/.vuepress/dist/assets/accounts.html.17535e68.js +++ b/docs/.vuepress/dist/assets/accounts.html.72a92f16.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"comptes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comptes","aria-hidden":"true"},"#"),s(" Comptes")],-1),f=n("h2",{id:"comment-creer-un-compte-de-systeme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-creer-un-compte-de-systeme","aria-hidden":"true"},"#"),s(" Comment cr\xE9er un compte de syst\xE8me")],-1),g=s("Cr\xE9ez un compte que le "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("Programme du Syst\xE8me"),v=s(" poss\xE8de. Le runtime de Solana donnera au propri\xE9taire du compte l'acc\xE8s \xE0 l'\xE9criture des donn\xE9es et au transfert des lamports. Lors de la cr\xE9ation d'un compte, nous devons pr\xE9-allouer un espace de stockage fixe en bytes ("),P=n("code",null,"space",-1),S=s(") et suffisamment de lamports pour couvrir la rente. La "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rente"),K=s(" est un co\xFBt encouru pour maintenir les comptes en vie sur Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"comptes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comptes","aria-hidden":"true"},"#"),s(" Comptes")],-1),f=n("h2",{id:"comment-creer-un-compte-de-systeme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-creer-un-compte-de-systeme","aria-hidden":"true"},"#"),s(" Comment cr\xE9er un compte de syst\xE8me")],-1),g=s("Cr\xE9ez un compte que le "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("Programme du Syst\xE8me"),v=s(" poss\xE8de. Le runtime de Solana donnera au propri\xE9taire du compte l'acc\xE8s \xE0 l'\xE9criture des donn\xE9es et au transfert des lamports. Lors de la cr\xE9ation d'un compte, nous devons pr\xE9-allouer un espace de stockage fixe en bytes ("),P=n("code",null,"space",-1),S=s(") et suffisamment de lamports pour couvrir la rente. La "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rente"),K=s(" est un co\xFBt encouru pour maintenir les comptes en vie sur Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.d16b618e.js b/docs/.vuepress/dist/assets/accounts.html.74e46f84.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.d16b618e.js rename to docs/.vuepress/dist/assets/accounts.html.74e46f84.js index 197d3c614..852900607 100644 --- a/docs/.vuepress/dist/assets/accounts.html.d16b618e.js +++ b/docs/.vuepress/dist/assets/accounts.html.74e46f84.js @@ -1 +1 @@ -import{_ as n,r,o as a,c as s,a as t,b as c,F as l,d as e,e as i}from"./app.07ce7a66.js";var d="/assets/account_example.5b70d95a.jpeg";const u={},h=t("h1",{id:"accounts",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),e(" Accounts")],-1),_=t("p",null,[e("Solana\uC5D0\uC11C Account\uB294 \uC0C1\uD0DC\uB97C \uC800\uC7A5\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),t("br"),e(" Account\uB294 Solana\uC5D0\uC11C \uAC1C\uBC1C\uC744 \uC704\uD55C \uAC00\uC7A5 \uD544\uC218\uC801\uC778 \uAD6C\uC131 \uC694\uC18C\uC785\uB2C8\uB2E4.")],-1),p=t("h2",{id:"facts",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),e(" Facts")],-1),A={class:"custom-container tip"},m=t("p",{class:"custom-container-title"},"Fact Sheet",-1),f=t("li",null,"Account\uB294 \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.",-1),b=t("li",null,"\uAC01 Account\uB294 \uC720\uC77C\uD55C address\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4.",-1),g=t("li",null,"Account\uB294 10MB\uC758 \uCD5C\uB300 \uD06C\uAE30\uB97C \uAC00\uC9D1\uB2C8\uB2E4.",-1),x=t("li",null,"PDA Account\uB294 10KB\uC758 \uCD5C\uB300 \uD06C\uAE30\uB97C \uAC00\uC9D1\uB2C8\uB2E4.",-1),k=t("li",null,"PDA Account\uB294 Program\uC744 \uB300\uC2E0\uD574 \uC11C\uBA85\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),v=e("Account \uD06C\uAE30\uB294 \uC0DD\uC131 \uC2DC\uC810\uC5D0 \uACE0\uC815\uB429\uB2C8\uB2E4. \uD558\uC9C0\uB9CC "),D={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},y=e("realloc"),P=e("\uC744 \uC0AC\uC6A9\uD574\uC11C \uC870\uC815\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),S=t("li",null,"Account \uB370\uC774\uD130 \uC800\uC7A5\uC740 rent\uB77C\uB294 \uBE44\uC6A9\uC774 \uBC1C\uC0DD\uD569\uB2C8\uB2E4.",-1),w=t("li",null,"\uAE30\uBCF8\uC801\uC73C\uB85C Account\uC758 \uC18C\uC720\uC790\uB294 System Program\uC785\uB2C8\uB2E4.",-1),F=i('

Deep Dive

Account Model

\uC194\uB77C\uB098\uC5D0\uB294 3\uAC00\uC9C0 \uC885\uB958\uC758 Accounts\uAC00 \uC788\uC2B5\uB2C8\uB2E4:

  • Data Account\uB294 \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD569\uB2C8\uB2E4.
  • Program Account\uB294 \uC2E4\uD589 \uAC00\uB2A5\uD55C \uD504\uB85C\uADF8\uB7A8\uB4E4\uC744 \uC800\uC7A5\uD569\uB2C8\uB2E4.
  • Native Account\uB294 \uC194\uB77C\uB098\uC5D0 \uC788\uB294 System, Stake, Vote \uAC19\uC740 Native \uD504\uB85C\uADF8\uB7A8\uC785\uB2C8\uB2E4.

Data Account\uC5D0\uB294 2\uAC00\uC9C0 \uD0C0\uC785\uC774 \uC788\uC2B5\uB2C8\uB2E4:

  • System\uC774 \uC18C\uC720\uD55C Account
  • PDA (Program Derived Address) Account

\uAC01 Account\uB294 \uC8FC\uC18C(\uBCF4\uD1B5 public key)\uC640 \uC18C\uC720\uC790(\uD504\uB85C\uADF8\uB7A8 Account\uC758 \uC8FC\uC18C)\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4.
\uD55C Account\uAC00 \uC800\uC7A5\uD558\uB294 \uC804\uCCB4 \uD544\uB4DC \uB9AC\uC2A4\uD2B8\uB294 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4.

FieldDescription
lamportsAccount\uAC00 \uC18C\uC720\uD558\uACE0 \uC788\uB294 lamport\uC758 \uAC1C\uC218
ownerAccount\uB97C \uC18C\uC720\uD558\uACE0 \uC788\uB294 Program
executableAccount\uAC00 Instruction\uB4E4\uC744 \uCC98\uB9AC\uD560 \uC218 \uC788\uB294\uC9C0 \uC5EC\uBD80
dataAccount\uAC00 \uC800\uC7A5\uD55C byte array \uC6D0\uBCF8 \uB370\uC774\uD130
rent_epochAccount\uAC00 rent\uB97C \uD560 \uB2E4\uC74C epoch

ownership\uC5D0 \uB300\uD55C \uC911\uC694\uD55C \uBA87 \uAC00\uC9C0 \uADDC\uCE59\uC774 \uC788\uC2B5\uB2C8\uB2E4.:

  • Data Account\uC758 \uC18C\uC720\uC790\uB9CC \uC624\uC9C1 \uC774 Account\uC758 \uB370\uC774\uD130\uB97C \uC218\uC815\uD560 \uC218 \uC788\uACE0, lamports\uB97C \uC778\uCD9C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
  • \uB204\uAD6C\uB098 Data Account\uC5D0 lamports\uB4E4\uC744 \uC785\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
  • Account\uC758 \uC18C\uC720\uC790\uB294 \uC774 Account\uC758 \uB370\uC774\uD130\uAC00 \uBE44\uC5B4\uC788\uB2E4\uBA74 \uC0C8\uB85C\uC6B4 \uC18C\uC720\uC790\uC5D0\uAC8C \uC774 Account\uB97C \uD560\uB2F9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

Program Account\uB294 \uC0C1\uD0DC\uB97C \uC800\uC7A5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.

\uC608\uB97C \uB4E4\uC5B4, \uB9CC\uC57D counter\uB97C \uC99D\uAC00\uC2DC\uD0AC \uC218 \uC788\uB294 counter program\uC744 \uAC00\uC9C0\uACE0 \uC788\uB2E4\uBA74, \uB450 \uAC1C\uC758 Account\uB97C \uC0DD\uC131\uD574\uC57C \uD569\uB2C8\uB2E4.
\uD558\uB098\uB294 Program\uC758 Code\uB97C \uC800\uC7A5\uD558\uB294 Account\uC774\uACE0, \uB2E4\uB978 \uD558\uB098\uB294 counter \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD558\uB294 Account\uC785\uB2C8\uB2E4.

Account\uAC00 \uC0AD\uC81C\uB418\uB294 \uAC83\uC744 \uB9C9\uAE30 \uC704\uD574\uC11C\uB294 rent\uB97C \uC9C0\uBD88\uD574\uC57C \uD569\uB2C8\uB2E4.

Rent

Account\uC5D0 \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD558\uB294 \uAC83\uC740 \uBA54\uC778\uB137\uC5D0 SOL \uBE44\uC6A9\uC744 \uBC1C\uC0DD\uC2DC\uD0A4\uACE0, rent\uB77C\uACE0 \uBD88\uB9AC\uB294 \uAC83\uC5D0 \uC758\uD574 \uAC77\uC5B4\uC9D1\uB2C8\uB2E4.
\uB9CC\uC57D \uD55C Account\uC5D0 2\uB144 \uCE58\uC758 rent \uC9C0\uBD88\uACFC \uB3D9\uB4F1\uD55C balance\uB97C \uC720\uC9C0\uD55C\uB2E4\uBA74, Account\uB294 rent\uB97C \uC9C0\uBD88\uD558\uB294 \uAC83\uC774 \uBA74\uC81C\uB429\uB2C8\uB2E4.
Account \uC0AC\uC6A9\uC744 \uB9C8\uCE58\uBA74 rent\uB97C \uB418\uCC3E\uC744 \uC218 \uC788\uACE0 lamports\uB97C \uC9C0\uAC11\uC5D0 \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4.

Rent\uB294 \uB450 \uAC00\uC9C0 \uD0C0\uC774\uBC0D\uC5D0 \uC9C0\uBD88\uB429\uB2C8\uB2E4:

  1. Transaction\uC5D0 \uC758\uD574 \uCC38\uC870\uB420 \uB54C
  2. \uB9E4 epoch \uB9C8\uB2E4

A percentage of rent collected by accounts is destroyed, while the rest is distributed to vote accounts at the end of every slot.

\uB9CC\uC57D Account\uAC00 rent\uB97C \uC9C0\uBD88\uD558\uAE30 \uC704\uD55C \uCDA9\uBD84\uD55C lamports\uB97C \uAC16\uACE0 \uC788\uC9C0 \uC54A\uB2E4\uBA74, Account\uB294 \uD560\uB2F9 \uD574\uC81C\uB418\uBA70 \uB370\uC774\uD130\uB294 \uC9C0\uC6CC\uC9D1\uB2C8\uB2E4.

\uC0C8\uB85C\uC6B4 Account\uB4E4\uC740 rent \uBA74\uC81C\uB418\uB3C4\uB85D \uD558\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4.

Other Resources

',22),N={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},B=e("Solana Account Model"),V={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},T=e("Official Documentation"),C={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},E=e("pencilflip account thread"),I=t("h3",{id:"credit",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),e(" Credit")],-1),L=e("This core concept is credited to Pencilflip. "),M={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},O=e("Follow him on Twitter"),R=e(".");function z(j,K){const o=r("ExternalLinkIcon");return a(),s(l,null,[h,_,p,t("div",A,[m,t("ul",null,[f,b,g,x,k,t("li",null,[v,t("a",D,[y,c(o)]),P]),S,w])]),F,t("ul",null,[t("li",null,[t("a",N,[B,c(o)])]),t("li",null,[t("a",V,[T,c(o)])]),t("li",null,[t("a",C,[E,c(o)])])]),I,t("p",null,[L,t("a",M,[O,c(o)]),R])],64)}var G=n(u,[["render",z]]);export{G as default}; +import{_ as n,r,o as a,c as s,a as t,b as c,F as l,d as e,e as i}from"./app.d411e3b3.js";var d="/assets/account_example.5b70d95a.jpeg";const u={},h=t("h1",{id:"accounts",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),e(" Accounts")],-1),_=t("p",null,[e("Solana\uC5D0\uC11C Account\uB294 \uC0C1\uD0DC\uB97C \uC800\uC7A5\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),t("br"),e(" Account\uB294 Solana\uC5D0\uC11C \uAC1C\uBC1C\uC744 \uC704\uD55C \uAC00\uC7A5 \uD544\uC218\uC801\uC778 \uAD6C\uC131 \uC694\uC18C\uC785\uB2C8\uB2E4.")],-1),p=t("h2",{id:"facts",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),e(" Facts")],-1),A={class:"custom-container tip"},m=t("p",{class:"custom-container-title"},"Fact Sheet",-1),f=t("li",null,"Account\uB294 \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.",-1),b=t("li",null,"\uAC01 Account\uB294 \uC720\uC77C\uD55C address\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4.",-1),g=t("li",null,"Account\uB294 10MB\uC758 \uCD5C\uB300 \uD06C\uAE30\uB97C \uAC00\uC9D1\uB2C8\uB2E4.",-1),x=t("li",null,"PDA Account\uB294 10KB\uC758 \uCD5C\uB300 \uD06C\uAE30\uB97C \uAC00\uC9D1\uB2C8\uB2E4.",-1),k=t("li",null,"PDA Account\uB294 Program\uC744 \uB300\uC2E0\uD574 \uC11C\uBA85\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),v=e("Account \uD06C\uAE30\uB294 \uC0DD\uC131 \uC2DC\uC810\uC5D0 \uACE0\uC815\uB429\uB2C8\uB2E4. \uD558\uC9C0\uB9CC "),D={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},y=e("realloc"),P=e("\uC744 \uC0AC\uC6A9\uD574\uC11C \uC870\uC815\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),S=t("li",null,"Account \uB370\uC774\uD130 \uC800\uC7A5\uC740 rent\uB77C\uB294 \uBE44\uC6A9\uC774 \uBC1C\uC0DD\uD569\uB2C8\uB2E4.",-1),w=t("li",null,"\uAE30\uBCF8\uC801\uC73C\uB85C Account\uC758 \uC18C\uC720\uC790\uB294 System Program\uC785\uB2C8\uB2E4.",-1),F=i('

Deep Dive

Account Model

\uC194\uB77C\uB098\uC5D0\uB294 3\uAC00\uC9C0 \uC885\uB958\uC758 Accounts\uAC00 \uC788\uC2B5\uB2C8\uB2E4:

  • Data Account\uB294 \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD569\uB2C8\uB2E4.
  • Program Account\uB294 \uC2E4\uD589 \uAC00\uB2A5\uD55C \uD504\uB85C\uADF8\uB7A8\uB4E4\uC744 \uC800\uC7A5\uD569\uB2C8\uB2E4.
  • Native Account\uB294 \uC194\uB77C\uB098\uC5D0 \uC788\uB294 System, Stake, Vote \uAC19\uC740 Native \uD504\uB85C\uADF8\uB7A8\uC785\uB2C8\uB2E4.

Data Account\uC5D0\uB294 2\uAC00\uC9C0 \uD0C0\uC785\uC774 \uC788\uC2B5\uB2C8\uB2E4:

  • System\uC774 \uC18C\uC720\uD55C Account
  • PDA (Program Derived Address) Account

\uAC01 Account\uB294 \uC8FC\uC18C(\uBCF4\uD1B5 public key)\uC640 \uC18C\uC720\uC790(\uD504\uB85C\uADF8\uB7A8 Account\uC758 \uC8FC\uC18C)\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4.
\uD55C Account\uAC00 \uC800\uC7A5\uD558\uB294 \uC804\uCCB4 \uD544\uB4DC \uB9AC\uC2A4\uD2B8\uB294 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4.

FieldDescription
lamportsAccount\uAC00 \uC18C\uC720\uD558\uACE0 \uC788\uB294 lamport\uC758 \uAC1C\uC218
ownerAccount\uB97C \uC18C\uC720\uD558\uACE0 \uC788\uB294 Program
executableAccount\uAC00 Instruction\uB4E4\uC744 \uCC98\uB9AC\uD560 \uC218 \uC788\uB294\uC9C0 \uC5EC\uBD80
dataAccount\uAC00 \uC800\uC7A5\uD55C byte array \uC6D0\uBCF8 \uB370\uC774\uD130
rent_epochAccount\uAC00 rent\uB97C \uD560 \uB2E4\uC74C epoch

ownership\uC5D0 \uB300\uD55C \uC911\uC694\uD55C \uBA87 \uAC00\uC9C0 \uADDC\uCE59\uC774 \uC788\uC2B5\uB2C8\uB2E4.:

  • Data Account\uC758 \uC18C\uC720\uC790\uB9CC \uC624\uC9C1 \uC774 Account\uC758 \uB370\uC774\uD130\uB97C \uC218\uC815\uD560 \uC218 \uC788\uACE0, lamports\uB97C \uC778\uCD9C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
  • \uB204\uAD6C\uB098 Data Account\uC5D0 lamports\uB4E4\uC744 \uC785\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
  • Account\uC758 \uC18C\uC720\uC790\uB294 \uC774 Account\uC758 \uB370\uC774\uD130\uAC00 \uBE44\uC5B4\uC788\uB2E4\uBA74 \uC0C8\uB85C\uC6B4 \uC18C\uC720\uC790\uC5D0\uAC8C \uC774 Account\uB97C \uD560\uB2F9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

Program Account\uB294 \uC0C1\uD0DC\uB97C \uC800\uC7A5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.

\uC608\uB97C \uB4E4\uC5B4, \uB9CC\uC57D counter\uB97C \uC99D\uAC00\uC2DC\uD0AC \uC218 \uC788\uB294 counter program\uC744 \uAC00\uC9C0\uACE0 \uC788\uB2E4\uBA74, \uB450 \uAC1C\uC758 Account\uB97C \uC0DD\uC131\uD574\uC57C \uD569\uB2C8\uB2E4.
\uD558\uB098\uB294 Program\uC758 Code\uB97C \uC800\uC7A5\uD558\uB294 Account\uC774\uACE0, \uB2E4\uB978 \uD558\uB098\uB294 counter \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD558\uB294 Account\uC785\uB2C8\uB2E4.

Account\uAC00 \uC0AD\uC81C\uB418\uB294 \uAC83\uC744 \uB9C9\uAE30 \uC704\uD574\uC11C\uB294 rent\uB97C \uC9C0\uBD88\uD574\uC57C \uD569\uB2C8\uB2E4.

Rent

Account\uC5D0 \uB370\uC774\uD130\uB97C \uC800\uC7A5\uD558\uB294 \uAC83\uC740 \uBA54\uC778\uB137\uC5D0 SOL \uBE44\uC6A9\uC744 \uBC1C\uC0DD\uC2DC\uD0A4\uACE0, rent\uB77C\uACE0 \uBD88\uB9AC\uB294 \uAC83\uC5D0 \uC758\uD574 \uAC77\uC5B4\uC9D1\uB2C8\uB2E4.
\uB9CC\uC57D \uD55C Account\uC5D0 2\uB144 \uCE58\uC758 rent \uC9C0\uBD88\uACFC \uB3D9\uB4F1\uD55C balance\uB97C \uC720\uC9C0\uD55C\uB2E4\uBA74, Account\uB294 rent\uB97C \uC9C0\uBD88\uD558\uB294 \uAC83\uC774 \uBA74\uC81C\uB429\uB2C8\uB2E4.
Account \uC0AC\uC6A9\uC744 \uB9C8\uCE58\uBA74 rent\uB97C \uB418\uCC3E\uC744 \uC218 \uC788\uACE0 lamports\uB97C \uC9C0\uAC11\uC5D0 \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4.

Rent\uB294 \uB450 \uAC00\uC9C0 \uD0C0\uC774\uBC0D\uC5D0 \uC9C0\uBD88\uB429\uB2C8\uB2E4:

  1. Transaction\uC5D0 \uC758\uD574 \uCC38\uC870\uB420 \uB54C
  2. \uB9E4 epoch \uB9C8\uB2E4

A percentage of rent collected by accounts is destroyed, while the rest is distributed to vote accounts at the end of every slot.

\uB9CC\uC57D Account\uAC00 rent\uB97C \uC9C0\uBD88\uD558\uAE30 \uC704\uD55C \uCDA9\uBD84\uD55C lamports\uB97C \uAC16\uACE0 \uC788\uC9C0 \uC54A\uB2E4\uBA74, Account\uB294 \uD560\uB2F9 \uD574\uC81C\uB418\uBA70 \uB370\uC774\uD130\uB294 \uC9C0\uC6CC\uC9D1\uB2C8\uB2E4.

\uC0C8\uB85C\uC6B4 Account\uB4E4\uC740 rent \uBA74\uC81C\uB418\uB3C4\uB85D \uD558\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4.

Other Resources

',22),N={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},B=e("Solana Account Model"),V={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},T=e("Official Documentation"),C={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},E=e("pencilflip account thread"),I=t("h3",{id:"credit",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),e(" Credit")],-1),L=e("This core concept is credited to Pencilflip. "),M={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},O=e("Follow him on Twitter"),R=e(".");function z(j,K){const o=r("ExternalLinkIcon");return a(),s(l,null,[h,_,p,t("div",A,[m,t("ul",null,[f,b,g,x,k,t("li",null,[v,t("a",D,[y,c(o)]),P]),S,w])]),F,t("ul",null,[t("li",null,[t("a",N,[B,c(o)])]),t("li",null,[t("a",V,[T,c(o)])]),t("li",null,[t("a",C,[E,c(o)])])]),I,t("p",null,[L,t("a",M,[O,c(o)]),R])],64)}var G=n(u,[["render",z]]);export{G as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.e2d2d050.js b/docs/.vuepress/dist/assets/accounts.html.79fe9f62.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.e2d2d050.js rename to docs/.vuepress/dist/assets/accounts.html.79fe9f62.js index 4a0c457ce..c290831c2 100644 --- a/docs/.vuepress/dist/assets/accounts.html.e2d2d050.js +++ b/docs/.vuepress/dist/assets/accounts.html.79fe9f62.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"so-erstellen-sie-ein-systemkonto",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-erstellen-sie-ein-systemkonto","aria-hidden":"true"},"#"),s(" So erstellen Sie ein Systemkonto")],-1),g=s("Erstellen Sie ein Konto, das dem "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("Systemprogramm"),P=s(" geh\xF6rt. Die Solana-Laufzeit gew\xE4hrt dem Besitzer eines Kontos Zugriff darauf in seine Daten schreiben oder Lamports \xFCbertragen. Beim Erstellen eines Kontos m\xFCssen wir einen festen Speicherplatz in Bytes vorbelegen ("),v=n("code",null,"Raum",-1),S=s(") und gen\xFCgend Lamports, um die Miete zu decken. "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},K=s("Miete"),x=s(" sind Kosten, die anfallen, um Konten auf Solana am Leben zu erhalten."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"so-erstellen-sie-ein-systemkonto",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-erstellen-sie-ein-systemkonto","aria-hidden":"true"},"#"),s(" So erstellen Sie ein Systemkonto")],-1),g=s("Erstellen Sie ein Konto, das dem "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("Systemprogramm"),P=s(" geh\xF6rt. Die Solana-Laufzeit gew\xE4hrt dem Besitzer eines Kontos Zugriff darauf in seine Daten schreiben oder Lamports \xFCbertragen. Beim Erstellen eines Kontos m\xFCssen wir einen festen Speicherplatz in Bytes vorbelegen ("),v=n("code",null,"Raum",-1),S=s(") und gen\xFCgend Lamports, um die Miete zu decken. "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},K=s("Miete"),x=s(" sind Kosten, die anfallen, um Konten auf Solana am Leben zu erhalten."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.d5fa2c98.js b/docs/.vuepress/dist/assets/accounts.html.7be50229.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.d5fa2c98.js rename to docs/.vuepress/dist/assets/accounts.html.7be50229.js index 219ef444f..8508e66cd 100644 --- a/docs/.vuepress/dist/assets/accounts.html.d5fa2c98.js +++ b/docs/.vuepress/dist/assets/accounts.html.7be50229.js @@ -1 +1 @@ -import{_ as a,r,o as l,c as s,a as t,b as n,F as i,d as e,e as c}from"./app.07ce7a66.js";var d="/assets/account_example.5b70d95a.jpeg";const h={},_=t("h1",{id:"\u30A2\u30AB\u30A6\u30F3\u30C8",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u30A2\u30AB\u30A6\u30F3\u30C8","aria-hidden":"true"},"#"),e(" \u30A2\u30AB\u30A6\u30F3\u30C8")],-1),p=t("p",null,"Solana\u306B\u304A\u3051\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u72B6\u614B\u306E\u4FDD\u5B58\u306B\u5229\u7528\u3055\u308C\u308B\u3001Solana\u958B\u767A\u306B\u304A\u3051\u308B\u5FC5\u8981\u4E0D\u53EF\u6B20\u306A\u69CB\u6210\u8981\u7D20\u3067\u3059\u3002",-1),u=t("h2",{id:"\u6982\u8981",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u6982\u8981","aria-hidden":"true"},"#"),e(" \u6982\u8981")],-1),m={class:"custom-container tip"},f=t("p",{class:"custom-container-title"},"Fact Sheet",-1),b=t("li",null,"\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u30C7\u30FC\u30BF\u306E\u4FDD\u5B58\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002",-1),g=t("li",null,"\u305D\u308C\u305E\u308C\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u4E00\u4F4D\u306E\u30A2\u30C9\u30EC\u30B9\u3092\u6301\u3061\u307E\u3059\u3002",-1),x=t("li",null,"\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4FDD\u6301\u3067\u304D\u308B\u30C7\u30FC\u30BF\u306E\u6700\u5927\u5BB9\u91CF\u306F10MB (10 Mega Bytes)\u3067\u3059\u3002",-1),k=t("li",null,"PDA\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4FDD\u6301\u3067\u304D\u308B\u30C7\u30FC\u30BF\u306E\u6700\u5927\u5BB9\u91CF\u306F10KB (10 Kilo Bytes)\u3067\u3059\u3002",-1),S=t("li",null,"PDA \u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u4EE3\u308F\u308A\u3001\u7F72\u540D\u306E\u5B9F\u884C\u306B\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002",-1),w=e("\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30B5\u30A4\u30BA\u306F\u4F5C\u6210\u6642\u306B\u56FA\u5B9A\u3055\u308C\u307E\u3059\u304C\u3001"),B={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},v=e("realloc"),y=e("\u3092\u4F7F\u7528\u3057\u3066\u5909\u66F4\u53EF\u80FD\u3067\u3059\u3002"),A=t("li",null,"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C7\u30FC\u30BF\u30B9\u30C8\u30EC\u30FC\u30B8\u306B\u5BFE\u3057\u3001rent(\u5BB6\u8CC3)\u304C\u652F\u6255\u308F\u308C\u307E\u3059\u3002",-1),D=t("li",null,"\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u6240\u6709\u8005\u306F\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u3059\u3002",-1),P=c('

\u8A73\u7D30

\u30A2\u30AB\u30A6\u30F3\u30C8\u30E2\u30C7\u30EB

Solana\u306B\u306F\u4E09\u7A2E\u985E\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u3042\u308A\u307E\u3059\u3002:

  • \u300C\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u306F\u30C7\u30FC\u30BF\u306E\u4FDD\u5B58\u3092\u884C\u3044\u307E\u3059\u3002
  • \u300C\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u306F\u5B9F\u884C\u53EF\u80FD\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4FDD\u5B58\u3092\u884C\u3044\u307E\u3059\u3002
  • \u300C\u30CD\u30A4\u30C6\u30A3\u30D6\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u306F\u3001System\u3001Stake\u3001Vote\u306A\u3069\u306ESolana\u306E\u30CD\u30A4\u30C6\u30A3\u30D6\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u610F\u5473\u3057\u307E\u3059\u3002

\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306F\u3001\u3055\u3089\u306B\u4E8C\u7A2E\u985E\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u3042\u308A\u307E\u3059\u3002:

  • \u30B7\u30B9\u30C6\u30E0\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8
  • PDA (\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9/Program Derived Address) \u30A2\u30AB\u30A6\u30F3\u30C8

\u5404\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u30A2\u30C9\u30EC\u30B9(\u901A\u5E38\u306F\u516C\u958B\u9375)\u3068\u6240\u6709\u8005(\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C9\u30EC\u30B9)\u3092\u6301\u3061\u307E\u3059\u3002 \u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4FDD\u5B58\u3059\u308B\u3059\u3079\u3066\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u4E0B\u8A18\u306E\u30EA\u30B9\u30C8\u306B\u793A\u3057\u307E\u3059\u3002

\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u8AAC\u660E
lamports\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6240\u6709\u3059\u308Blamports\u306E\u6570
owner\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u6240\u6709\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u30AA\u30FC\u30CA\u30FC
executable\u652F\u6301\u3055\u308C\u305F\u51E6\u7406\u3092\u51E6\u7406\u53EF\u80FD\u304B\u3069\u3046\u304B
data\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u3088\u3063\u3066\u4FDD\u5B58\u3055\u308C\u305F\u751F\u30C7\u30FC\u30BF\u306E\u30D0\u30A4\u30C8\u914D\u5217
rent_epoch\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5BB6\u8CC3\u3092\u652F\u6255\u3046\u6B21\u306Eepoch

\u6240\u6709\u306B\u95A2\u3057\u3066\u3044\u304F\u3064\u304B\u306E\u91CD\u8981\u306A\u898F\u5247\u304C\u3042\u308A\u307E\u3059\u3002:

  • \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u306E\u307F\u304C\u305D\u306E\u30C7\u30FC\u30BF\u3092\u5909\u66F4\u3057\u3001\u30E9\u30F3\u30DD\u30FC\u30C8\u3092\u5F15\u304D\u843D\u3068\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
  • \u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u3078\u306Elamports\u306E\u5165\u91D1\u306F\u8AB0\u3067\u3082\u53EF\u80FD\u3067\u3059\u3002
  • \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C7\u30FC\u30BF\u304C\u30BC\u30ED\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u306F\u65B0\u3057\u3044\u6240\u6709\u8005\u3092\u5272\u308A\u5F53\u3066\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002

\u30D7\u30ED\u30B0\u30E9\u30E0 \u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u72B6\u614B\u3092\u4FDD\u5B58\u3057\u307E\u305B\u3093\u3002

\u305F\u3068\u3048\u3070\u3001counter\u3068\u3044\u3046\u6570\u5024\u3092\u30A4\u30F3\u30AF\u30EA\u30E1\u30F3\u30C8\u3059\u308B\u30AB\u30A6\u30F3\u30BF\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u5834\u5408\u3001 \u30AB\u30A6\u30F3\u30C8\u30A2\u30C3\u30D7\u3092\u5B9F\u884C\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u683C\u7D0D\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u3001counter\u306E\u6570\u5024\u3092\u4FDD\u5B58\u3059\u308B\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u306E 2 \u3064\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u524A\u9664\u3055\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u5BB6\u8CC3(rent)\u3092\u6255\u3044\u7D9A\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

rent(\u5BB6\u8CC3)

\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30C7\u30FC\u30BF\u3092\u4FDD\u5B58\u3057\u7D9A\u3051\u308B\u305F\u3081\u306B\u306FSOL\u306E\u652F\u6255\u3044\u304C\u5FC5\u8981\u3068\u306A\u308A\u3001 \u3053\u308C\u306Frent(\u5BB6\u8CC3)\u3068\u547C\u3070\u308C\u308B\u3082\u306E\u306B\u3088\u308A\u8CC4\u308F\u308C\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002 \u53E3\u5EA7\u306B2\u5E74\u5206\u306E\u5BB6\u8CC3\u306E\u652F\u6255\u3044\u306B\u76F8\u5F53\u3059\u308B\u6700\u4F4E\u6B8B\u9AD8\u3092\u7DAD\u6301\u3057\u3066\u3044\u308B\u5834\u5408\u3001\u3042\u306A\u305F\u306Ewallet\u306F\u5BB6\u8CC3\u306E\u652F\u6255\u3044\u304C\u514D\u9664\u3055\u308C\u307E\u3059\u3002 rent\u306F\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u9589\u9396\u3057lamports\u3092wallet\u306B\u9001\u308A\u8FD4\u3059\u3053\u3068\u3067\u56DE\u53CE\u3067\u304D\u307E\u3059\u3002

rent\u306F\u6B21\u306E\u4E8C\u3064\u306E\u30BF\u30A4\u30DF\u30F3\u30B0\u3067\u652F\u6255\u308F\u308C\u307E\u3059\u3002:

  1. \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u53C2\u7167\u3055\u308C\u305F\u3068\u304D
  2. epoch\u3054\u3068

\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u3088\u308A\u53CE\u96C6\u3055\u308C\u305F\u5272\u5408\u306Erent\u304C\u7834\u68C4\u3055\u308C\u3001\u6B8B\u308A\u306F\u5404slot\u306E\u6700\u5F8C\u306B\u6295\u7968\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5206\u914D\u304C\u3055\u308C\u307E\u3059\u3002

\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5BB6\u8CC3\u3092\u652F\u6255\u3046\u306E\u306B\u5341\u5206\u306A\u6B8B\u9AD8\u3092\u6301\u305F\u306A\u3044\u5834\u5408\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u5272\u308A\u5F53\u3066\u306F\u89E3\u9664\u3055\u308C\u30C7\u30FC\u30BF\u304C\u524A\u9664\u3055\u308C\u307E\u3059\u3002

\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u5BB6\u8CC3\u306E\u652F\u6255\u3044\u304C\u514D\u9664\u3055\u308C\u308B\u3053\u3068\u306B\u3082\u6CE8\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002

\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599

',22),V={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},N=e("Solana Account Model"),E={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},F=e("Official Documentation"),L={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},M=e("pencilflip account thread"),z=t("h3",{id:"credit",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),e(" Credit")],-1),C=e("Pencilflip\u306E\u529F\u7E3E\u306B\u3088\u308A\u3053\u306E\u30DA\u30FC\u30B8\u306F\u4F5C\u6210\u3055\u308C\u307E\u3057\u305F\u3002"),I={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},K=e("Twitter\u3092\u30D5\u30A9\u30ED\u30FC"),O=e(".");function T(j,q){const o=r("ExternalLinkIcon");return l(),s(i,null,[_,p,u,t("div",m,[f,t("ul",null,[b,g,x,k,S,t("li",null,[w,t("a",B,[v,n(o)]),y]),A,D])]),P,t("ul",null,[t("li",null,[t("a",V,[N,n(o)])]),t("li",null,[t("a",E,[F,n(o)])]),t("li",null,[t("a",L,[M,n(o)])])]),z,t("p",null,[C,t("a",I,[K,n(o)]),O])],64)}var H=a(h,[["render",T]]);export{H as default}; +import{_ as a,r,o as l,c as s,a as t,b as n,F as i,d as e,e as c}from"./app.d411e3b3.js";var d="/assets/account_example.5b70d95a.jpeg";const h={},_=t("h1",{id:"\u30A2\u30AB\u30A6\u30F3\u30C8",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u30A2\u30AB\u30A6\u30F3\u30C8","aria-hidden":"true"},"#"),e(" \u30A2\u30AB\u30A6\u30F3\u30C8")],-1),p=t("p",null,"Solana\u306B\u304A\u3051\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u72B6\u614B\u306E\u4FDD\u5B58\u306B\u5229\u7528\u3055\u308C\u308B\u3001Solana\u958B\u767A\u306B\u304A\u3051\u308B\u5FC5\u8981\u4E0D\u53EF\u6B20\u306A\u69CB\u6210\u8981\u7D20\u3067\u3059\u3002",-1),u=t("h2",{id:"\u6982\u8981",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u6982\u8981","aria-hidden":"true"},"#"),e(" \u6982\u8981")],-1),m={class:"custom-container tip"},f=t("p",{class:"custom-container-title"},"Fact Sheet",-1),b=t("li",null,"\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u30C7\u30FC\u30BF\u306E\u4FDD\u5B58\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002",-1),g=t("li",null,"\u305D\u308C\u305E\u308C\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u4E00\u4F4D\u306E\u30A2\u30C9\u30EC\u30B9\u3092\u6301\u3061\u307E\u3059\u3002",-1),x=t("li",null,"\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4FDD\u6301\u3067\u304D\u308B\u30C7\u30FC\u30BF\u306E\u6700\u5927\u5BB9\u91CF\u306F10MB (10 Mega Bytes)\u3067\u3059\u3002",-1),k=t("li",null,"PDA\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4FDD\u6301\u3067\u304D\u308B\u30C7\u30FC\u30BF\u306E\u6700\u5927\u5BB9\u91CF\u306F10KB (10 Kilo Bytes)\u3067\u3059\u3002",-1),S=t("li",null,"PDA \u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u4EE3\u308F\u308A\u3001\u7F72\u540D\u306E\u5B9F\u884C\u306B\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002",-1),w=e("\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30B5\u30A4\u30BA\u306F\u4F5C\u6210\u6642\u306B\u56FA\u5B9A\u3055\u308C\u307E\u3059\u304C\u3001"),B={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},v=e("realloc"),y=e("\u3092\u4F7F\u7528\u3057\u3066\u5909\u66F4\u53EF\u80FD\u3067\u3059\u3002"),A=t("li",null,"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C7\u30FC\u30BF\u30B9\u30C8\u30EC\u30FC\u30B8\u306B\u5BFE\u3057\u3001rent(\u5BB6\u8CC3)\u304C\u652F\u6255\u308F\u308C\u307E\u3059\u3002",-1),D=t("li",null,"\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u6240\u6709\u8005\u306F\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u3059\u3002",-1),P=c('

\u8A73\u7D30

\u30A2\u30AB\u30A6\u30F3\u30C8\u30E2\u30C7\u30EB

Solana\u306B\u306F\u4E09\u7A2E\u985E\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u3042\u308A\u307E\u3059\u3002:

  • \u300C\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u306F\u30C7\u30FC\u30BF\u306E\u4FDD\u5B58\u3092\u884C\u3044\u307E\u3059\u3002
  • \u300C\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u306F\u5B9F\u884C\u53EF\u80FD\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4FDD\u5B58\u3092\u884C\u3044\u307E\u3059\u3002
  • \u300C\u30CD\u30A4\u30C6\u30A3\u30D6\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u306F\u3001System\u3001Stake\u3001Vote\u306A\u3069\u306ESolana\u306E\u30CD\u30A4\u30C6\u30A3\u30D6\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u610F\u5473\u3057\u307E\u3059\u3002

\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306F\u3001\u3055\u3089\u306B\u4E8C\u7A2E\u985E\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u3042\u308A\u307E\u3059\u3002:

  • \u30B7\u30B9\u30C6\u30E0\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8
  • PDA (\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9/Program Derived Address) \u30A2\u30AB\u30A6\u30F3\u30C8

\u5404\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u30A2\u30C9\u30EC\u30B9(\u901A\u5E38\u306F\u516C\u958B\u9375)\u3068\u6240\u6709\u8005(\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C9\u30EC\u30B9)\u3092\u6301\u3061\u307E\u3059\u3002 \u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u4FDD\u5B58\u3059\u308B\u3059\u3079\u3066\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u4E0B\u8A18\u306E\u30EA\u30B9\u30C8\u306B\u793A\u3057\u307E\u3059\u3002

\u30D5\u30A3\u30FC\u30EB\u30C9\u540D\u8AAC\u660E
lamports\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6240\u6709\u3059\u308Blamports\u306E\u6570
owner\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u6240\u6709\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u30AA\u30FC\u30CA\u30FC
executable\u652F\u6301\u3055\u308C\u305F\u51E6\u7406\u3092\u51E6\u7406\u53EF\u80FD\u304B\u3069\u3046\u304B
data\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u3088\u3063\u3066\u4FDD\u5B58\u3055\u308C\u305F\u751F\u30C7\u30FC\u30BF\u306E\u30D0\u30A4\u30C8\u914D\u5217
rent_epoch\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5BB6\u8CC3\u3092\u652F\u6255\u3046\u6B21\u306Eepoch

\u6240\u6709\u306B\u95A2\u3057\u3066\u3044\u304F\u3064\u304B\u306E\u91CD\u8981\u306A\u898F\u5247\u304C\u3042\u308A\u307E\u3059\u3002:

  • \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u306E\u307F\u304C\u305D\u306E\u30C7\u30FC\u30BF\u3092\u5909\u66F4\u3057\u3001\u30E9\u30F3\u30DD\u30FC\u30C8\u3092\u5F15\u304D\u843D\u3068\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
  • \u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u3078\u306Elamports\u306E\u5165\u91D1\u306F\u8AB0\u3067\u3082\u53EF\u80FD\u3067\u3059\u3002
  • \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C7\u30FC\u30BF\u304C\u30BC\u30ED\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u306F\u65B0\u3057\u3044\u6240\u6709\u8005\u3092\u5272\u308A\u5F53\u3066\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002

\u30D7\u30ED\u30B0\u30E9\u30E0 \u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u72B6\u614B\u3092\u4FDD\u5B58\u3057\u307E\u305B\u3093\u3002

\u305F\u3068\u3048\u3070\u3001counter\u3068\u3044\u3046\u6570\u5024\u3092\u30A4\u30F3\u30AF\u30EA\u30E1\u30F3\u30C8\u3059\u308B\u30AB\u30A6\u30F3\u30BF\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u5834\u5408\u3001 \u30AB\u30A6\u30F3\u30C8\u30A2\u30C3\u30D7\u3092\u5B9F\u884C\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u683C\u7D0D\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u3001counter\u306E\u6570\u5024\u3092\u4FDD\u5B58\u3059\u308B\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u306E 2 \u3064\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u524A\u9664\u3055\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u305F\u3081\u306B\u306F\u3001\u5BB6\u8CC3(rent)\u3092\u6255\u3044\u7D9A\u3051\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

rent(\u5BB6\u8CC3)

\u30C7\u30FC\u30BF\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30C7\u30FC\u30BF\u3092\u4FDD\u5B58\u3057\u7D9A\u3051\u308B\u305F\u3081\u306B\u306FSOL\u306E\u652F\u6255\u3044\u304C\u5FC5\u8981\u3068\u306A\u308A\u3001 \u3053\u308C\u306Frent(\u5BB6\u8CC3)\u3068\u547C\u3070\u308C\u308B\u3082\u306E\u306B\u3088\u308A\u8CC4\u308F\u308C\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002 \u53E3\u5EA7\u306B2\u5E74\u5206\u306E\u5BB6\u8CC3\u306E\u652F\u6255\u3044\u306B\u76F8\u5F53\u3059\u308B\u6700\u4F4E\u6B8B\u9AD8\u3092\u7DAD\u6301\u3057\u3066\u3044\u308B\u5834\u5408\u3001\u3042\u306A\u305F\u306Ewallet\u306F\u5BB6\u8CC3\u306E\u652F\u6255\u3044\u304C\u514D\u9664\u3055\u308C\u307E\u3059\u3002 rent\u306F\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u9589\u9396\u3057lamports\u3092wallet\u306B\u9001\u308A\u8FD4\u3059\u3053\u3068\u3067\u56DE\u53CE\u3067\u304D\u307E\u3059\u3002

rent\u306F\u6B21\u306E\u4E8C\u3064\u306E\u30BF\u30A4\u30DF\u30F3\u30B0\u3067\u652F\u6255\u308F\u308C\u307E\u3059\u3002:

  1. \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u53C2\u7167\u3055\u308C\u305F\u3068\u304D
  2. epoch\u3054\u3068

\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u3088\u308A\u53CE\u96C6\u3055\u308C\u305F\u5272\u5408\u306Erent\u304C\u7834\u68C4\u3055\u308C\u3001\u6B8B\u308A\u306F\u5404slot\u306E\u6700\u5F8C\u306B\u6295\u7968\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5206\u914D\u304C\u3055\u308C\u307E\u3059\u3002

\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5BB6\u8CC3\u3092\u652F\u6255\u3046\u306E\u306B\u5341\u5206\u306A\u6B8B\u9AD8\u3092\u6301\u305F\u306A\u3044\u5834\u5408\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u5272\u308A\u5F53\u3066\u306F\u89E3\u9664\u3055\u308C\u30C7\u30FC\u30BF\u304C\u524A\u9664\u3055\u308C\u307E\u3059\u3002

\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u5BB6\u8CC3\u306E\u652F\u6255\u3044\u304C\u514D\u9664\u3055\u308C\u308B\u3053\u3068\u306B\u3082\u6CE8\u610F\u304C\u5FC5\u8981\u3067\u3059\u3002

\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599

',22),V={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},N=e("Solana Account Model"),E={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},F=e("Official Documentation"),L={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},M=e("pencilflip account thread"),z=t("h3",{id:"credit",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),e(" Credit")],-1),C=e("Pencilflip\u306E\u529F\u7E3E\u306B\u3088\u308A\u3053\u306E\u30DA\u30FC\u30B8\u306F\u4F5C\u6210\u3055\u308C\u307E\u3057\u305F\u3002"),I={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},K=e("Twitter\u3092\u30D5\u30A9\u30ED\u30FC"),O=e(".");function T(j,q){const o=r("ExternalLinkIcon");return l(),s(i,null,[_,p,u,t("div",m,[f,t("ul",null,[b,g,x,k,S,t("li",null,[w,t("a",B,[v,n(o)]),y]),A,D])]),P,t("ul",null,[t("li",null,[t("a",V,[N,n(o)])]),t("li",null,[t("a",E,[F,n(o)])]),t("li",null,[t("a",L,[M,n(o)])])]),z,t("p",null,[C,t("a",I,[K,n(o)]),O])],64)}var H=a(h,[["render",T]]);export{H as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.d65e9141.js b/docs/.vuepress/dist/assets/accounts.html.866c67ff.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.d65e9141.js rename to docs/.vuepress/dist/assets/accounts.html.866c67ff.js index d7be4b31c..2ac683891 100644 --- a/docs/.vuepress/dist/assets/accounts.html.d65e9141.js +++ b/docs/.vuepress/dist/assets/accounts.html.866c67ff.js @@ -1 +1 @@ -import{_ as h,r as e,o as i,c as a,a as t,b as o,F as r,d as c,e as l}from"./app.07ce7a66.js";var u="/assets/account_example.5b70d95a.jpeg";const s={},d=t("h1",{id:"account",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#account","aria-hidden":"true"},"#"),c(" Account")],-1),p=t("p",null,"Account trong l\u1EADp tr\xECnh Solana \u0111\u01B0\u1EE3c hi\u1EC3u nh\u01B0 m\u1ED9t v\xF9ng nh\u1EDB \u0111\u1EC3 l\u01B0u d\u1EEF li\u1EC7u. Ch\xFAng l\xE0 m\u1ED9t kh\u1ED1i c\u01A1 s\u1EDF trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng tr\xEAn Solana.",-1),m=t("h2",{id:"co-the-ban-chua-biet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#co-the-ban-chua-biet","aria-hidden":"true"},"#"),c(" C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt")],-1),g={class:"custom-container tip"},_=t("p",{class:"custom-container-title"},"Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",-1),A=t("li",null,"Account \u0111\u01B0\u01A1c d\xF9ng \u0111\u1EC3 l\u01B0u tr\u1EEF d\u1EEF li\u1EC7u",-1),b=t("li",null,"M\u1ED7i Account s\u1EBD c\xF3 m\u1ED9t \u0111\u1ECBa ch\u1EC9 duy nh\u1EA5t",-1),k=t("li",null,"Account c\xF3 k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 10MB (10 Mega Bytes)",-1),f=t("li",null,"PDA Account c\xF3 k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 10KB (10 Kilo Bytes)",-1),v=t("li",null,"PDA Account c\xF3 th\u1EC3 d\xF9ng \u0111\u1EC3 k\xFD \u0111\u1EA1i di\u1EC7n cho m\u1ED9t program",-1),y=c("K\xEDch th\u01B0\u1EDBc Account \u0111\u01B0\u1EE3c c\u1ED1 \u0111\u1ECBnh t\u1EA1i th\u1EDDi \u0111i\u1EC3m kh\u1EDFi t\u1EA1o, nh\u01B0ng v\u1EABn c\xF3 th\u1EC3 \u0111i\u1EC1u ch\u1EC9nh b\u1EB1ng "),x={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},S=c("realloc"),P=t("li",null,"V\xF9ng nh\u1EDB d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c c\u1EA5p ph\xE1t cho Account ph\u1EA3i \u0111\u01B0\u1EE3c thu\xEA b\u1EB1ng c\xE1ch tr\u1EA3 ph\xED",-1),w=t("li",null,"Account owner trong tr\u01B0\u1EDDng h\u1EE3p m\u1EB7c \u0111\u1ECBnh s\u1EBD l\xE0 System Program",-1),C=l('

Chi ti\u1EBFt

C\u1EA5u tr\xFAc Account

C\xF3 3 ki\u1EC3u Account tr\xEAn Solana:

  • Data Accounts d\xF9ng \u0111\u1EC3 l\u01B0u tr\u1EEF d\u1EEF li\u1EC7u
  • Program Accounts d\xF9ng \u0111\u1EC3 l\u01B0u ch\u01B0\u01A1ng tr\xECnh th\u1EF1c thi
  • Native Accounts \xE1m ch\u1EC9 native programs tr\xEAn Solana nh\u01B0 l\xE0 System, Stake, v\xE0 Vote

Ki\u1EC3u Data Account l\u1EA1i c\xF3 2 ki\u1EC3u con:

  • Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi System
  • PDA (Program Derived Address) Accounts

M\u1ED7i Account l\u1EA1i c\xF3 m\u1ED9t \u0111\u1ECBa ch\u1EC9 (th\u01B0\u1EDDng l\xE0 public key - kho\xE1 c\xF4ng khai) v\xE0 m\u1ED9t owner (\u0111\u1ECBa ch\u1EC9 c\u1EE7a m\u1ED9t Program Account). \u0110\u1EA7y \u0111\u1EE7 c\xE1c tr\u01B0\u1EDDng c\u1EE7a m\u1ED9t Account \u0111\u01B0\u1EE3c tr\xECnh b\xE0y \u1EDF b\u1EA3ng d\u01B0\u1EDBi.

Tr\u01B0\u1EDDngM\xF4 t\u1EA3
lamportsS\u1ED1 l\u01B0\u1EE3ng lamports thu\u1ED9c s\u1EDF h\u1EEFu b\u1EDFi Account \u0111\xF3
owner\u0110\u1ECBa ch\u1EC9 Program Account \u0111ang ki\u1EBFm so\xE1t Account \u0111\xF3
executableAccount n\xE0y c\xF3 th\u1EC3 th\u1EF1c thi c\xE1c instructions hay kh\xF4ng?
dataD\u1EEF li\u1EC7u th\xF4 d\u01B0\u1EDBi d\u1EA1ng c\xE1c bytes \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF trong Account
rent_epochK\u1EF3 h\u1EA1n thu\xEA v\xF9ng nh\u1EDB ti\u1EBFp theo cho Account

C\xF3 m\u1ED9t v\xE0i quy t\u1EAFc quan tr\u1ECDng v\u1EC1 quy\u1EC1n s\u1EDF h\u1EEFu:

  • Ch\u1EC9 owner m\u1EDBi \u0111\u01B0\u1EE3c ch\u1EC9nh s\u1EEDa c\u0169ng nh\u01B0 r\xFAt s\u1ED1 lamports t\u1EEB m\u1ED9t Data Account
  • B\u1EA5t k\u1EF3 ai c\u0169ng \u0111\u01B0\u1EE3c ph\xE9p n\u1EA1p lamports v\xE0o m\u1ED9t Data Account
  • Owner c\u1EE7a m\u1ED9t Account c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c g\xE1n cho m\u1ED9t owner m\u1EDBi khi v\xE0 ch\u1EC9 khi v\xF9ng nh\u1EDB c\u1EE7a Account \u0111\xF3 \u0111\u01B0\u1EE3c ho\xE0n tr\u1EA3

Program Accounts kh\xF4ng \u0111\u01B0\u1EE3c l\u01B0u state.

V\xED d\u1EE5, n\u1EBFu b\u1EA1n c\xF3 m\u1ED9t ch\u01B0\u01A1ng tr\xECnh \u0111\u1EBFm tr\xEAn m\u1ED9t Program Account v\xE0 cho ph\xE9p t\u0103ng b\u1ED9 \u0111\u1EBFm l\xEAn sau m\u1ED7i l\u1EA7n t\u01B0\u01A1ng t\xE1c, b\u1EA1n ph\u1EA3i t\u1EA1o t\u1ED1i thi\u1EC3u 2 Account. Trong \u0111\xF3, m\u1ED9t cho Program Account \u0111\u1EC3 l\u01B0u code th\u1EF1c thi, v\xE0 m\u1ED9t cho Data Account \u0111\u1EC3 l\u01B0u d\u1EEF li\u1EC7u b\u1ED9 \u0111\u1EBFm.

\u0110\u1EC3 tr\xE1nh vi\u1EC7c m\u1ED9t Account b\u1ECB xo\xE1, b\u1EA1n ph\u1EA3i tr\u1EA3 chi ph\xED \u0111\u1EC3 thu\xEA v\xF9ng nh\u1EDB cho Account \u0111\xF3.

Thu\xEA

L\u01B0u tr\u1EEF d\u1EEF li\u1EC7u v\xE0o Account v\xE0 duy tr\xEC Account \u0111\xF3 s\u1EBD ph\xE1t sinh chi ph\xED SOL. Chi ph\xED n\xE0y \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 chi ph\xED thu\xEA. N\u1EBFu chi ph\xED thu\xEA \u0111\u01B0\u1EE3c duy tr\xEC \u1EDF m\u1EE9c t\u1ED1i thi\u1EC3u l\xE0 2 n\u0103m cho Account \u0111\xF3, th\xEC b\u1EA1n s\u1EBD \u0111\u01B0\u1EE3c mi\u1EC5n ph\xED l\u01B0u tr\u1EEF. B\u1EA1n c\u0169ng c\xF3 th\u1EC3 thu h\u1ED3i l\u1EA1i ph\xED c\u1ECDc b\u1EB1ng c\xE1ch \u0111\xF3ng Account. S\u1ED1 lamports c\u1ECDc s\u1EBD \u0111\u01B0\u1EE3c ho\xE0n tr\u1EA3 v\u1EC1 \u0111\u1ECBa ch\u1EC9 v\xED c\u1EE7a b\u1EA1n.

Chi ph\xED thu\xEA \u0111\u01B0\u1EE3c t\xEDnh to\xE1n v\xE0 chi tr\u1EA3 \u1EDF 2 th\u1EDDi \u0111i\u1EC3m kh\xE1c nhau:

  1. Khi c\xF3 b\u1EA5t k\u1EF3 giao d\u1ECBch n\xE0o c\xF3 tham chi\u1EBFu \u0111\u1EBFn Account \u0111\xF3.
  2. \u0110\u1ECBnh k\u1EF3 m\u1ED7i epoch.

M\u1ED9t ph\u1EA7n c\u1EE7a chi ph\xED thu\xEA thu \u0111\u01B0\u1EE3c s\u1EBD \u0111\u01B0\u1EE3c ti\xEAu hu\u1EF7, trong khi ph\u1EA7n c\xF2n l\u1EA1i s\u1EBD \u0111\u01B0\u1EE3c ph\xE2n chia cho c\xE1c Vote Account sau m\u1ED7i slot.

N\u1EBFu m\u1ED9t Account kh\xF4ng \u0111\u1EE7 c\u1ECDc \u0111\u1EC3 chi tr\u1EA3 ph\xED thu\xEA, Account \u0111\xF3 s\u1EBD b\u1ECB thu h\u1ED3i v\xE0 to\xE0n b\u1ED9 d\u1EEF li\u1EC7u s\u1EBD b\u1ECB xo\xE1.

C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c

',21),D={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},B=c("Solana Account Model"),N={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},V=c("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),K={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},M=c("pencilflip account thread"),T=t("h3",{id:"loi-cam-on",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#loi-cam-on","aria-hidden":"true"},"#"),c(" L\u1EDDi c\u1EA3m \u01A1n")],-1),L=c("Kh\xE1i ni\u1EC7m c\u0103n b\u1EA3n n\xE0y \u0111\u01B0\u1EE3c \u0111\xF3ng g\xF3p c\u1EE7a Pencilflip. "),q={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},E=c("Theo d\xF5i anh \u1EA5y tr\xEAn Twitter"),z=c(".");function F(I,O){const n=e("ExternalLinkIcon");return i(),a(r,null,[d,p,m,t("div",g,[_,t("ul",null,[A,b,k,f,v,t("li",null,[y,t("a",x,[S,o(n)])]),P,w])]),C,t("ul",null,[t("li",null,[t("a",D,[B,o(n)])]),t("li",null,[t("a",N,[V,o(n)])]),t("li",null,[t("a",K,[M,o(n)])])]),T,t("p",null,[L,t("a",q,[E,o(n)]),z])],64)}var G=h(s,[["render",F]]);export{G as default}; +import{_ as h,r as e,o as i,c as a,a as t,b as o,F as r,d as c,e as l}from"./app.d411e3b3.js";var u="/assets/account_example.5b70d95a.jpeg";const s={},d=t("h1",{id:"account",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#account","aria-hidden":"true"},"#"),c(" Account")],-1),p=t("p",null,"Account trong l\u1EADp tr\xECnh Solana \u0111\u01B0\u1EE3c hi\u1EC3u nh\u01B0 m\u1ED9t v\xF9ng nh\u1EDB \u0111\u1EC3 l\u01B0u d\u1EEF li\u1EC7u. Ch\xFAng l\xE0 m\u1ED9t kh\u1ED1i c\u01A1 s\u1EDF trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng tr\xEAn Solana.",-1),m=t("h2",{id:"co-the-ban-chua-biet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#co-the-ban-chua-biet","aria-hidden":"true"},"#"),c(" C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt")],-1),g={class:"custom-container tip"},_=t("p",{class:"custom-container-title"},"Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",-1),A=t("li",null,"Account \u0111\u01B0\u01A1c d\xF9ng \u0111\u1EC3 l\u01B0u tr\u1EEF d\u1EEF li\u1EC7u",-1),b=t("li",null,"M\u1ED7i Account s\u1EBD c\xF3 m\u1ED9t \u0111\u1ECBa ch\u1EC9 duy nh\u1EA5t",-1),k=t("li",null,"Account c\xF3 k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 10MB (10 Mega Bytes)",-1),f=t("li",null,"PDA Account c\xF3 k\xEDch th\u01B0\u1EDBc t\u1ED1i \u0111a l\xE0 10KB (10 Kilo Bytes)",-1),v=t("li",null,"PDA Account c\xF3 th\u1EC3 d\xF9ng \u0111\u1EC3 k\xFD \u0111\u1EA1i di\u1EC7n cho m\u1ED9t program",-1),y=c("K\xEDch th\u01B0\u1EDBc Account \u0111\u01B0\u1EE3c c\u1ED1 \u0111\u1ECBnh t\u1EA1i th\u1EDDi \u0111i\u1EC3m kh\u1EDFi t\u1EA1o, nh\u01B0ng v\u1EABn c\xF3 th\u1EC3 \u0111i\u1EC1u ch\u1EC9nh b\u1EB1ng "),x={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},S=c("realloc"),P=t("li",null,"V\xF9ng nh\u1EDB d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c c\u1EA5p ph\xE1t cho Account ph\u1EA3i \u0111\u01B0\u1EE3c thu\xEA b\u1EB1ng c\xE1ch tr\u1EA3 ph\xED",-1),w=t("li",null,"Account owner trong tr\u01B0\u1EDDng h\u1EE3p m\u1EB7c \u0111\u1ECBnh s\u1EBD l\xE0 System Program",-1),C=l('

Chi ti\u1EBFt

C\u1EA5u tr\xFAc Account

C\xF3 3 ki\u1EC3u Account tr\xEAn Solana:

  • Data Accounts d\xF9ng \u0111\u1EC3 l\u01B0u tr\u1EEF d\u1EEF li\u1EC7u
  • Program Accounts d\xF9ng \u0111\u1EC3 l\u01B0u ch\u01B0\u01A1ng tr\xECnh th\u1EF1c thi
  • Native Accounts \xE1m ch\u1EC9 native programs tr\xEAn Solana nh\u01B0 l\xE0 System, Stake, v\xE0 Vote

Ki\u1EC3u Data Account l\u1EA1i c\xF3 2 ki\u1EC3u con:

  • Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi System
  • PDA (Program Derived Address) Accounts

M\u1ED7i Account l\u1EA1i c\xF3 m\u1ED9t \u0111\u1ECBa ch\u1EC9 (th\u01B0\u1EDDng l\xE0 public key - kho\xE1 c\xF4ng khai) v\xE0 m\u1ED9t owner (\u0111\u1ECBa ch\u1EC9 c\u1EE7a m\u1ED9t Program Account). \u0110\u1EA7y \u0111\u1EE7 c\xE1c tr\u01B0\u1EDDng c\u1EE7a m\u1ED9t Account \u0111\u01B0\u1EE3c tr\xECnh b\xE0y \u1EDF b\u1EA3ng d\u01B0\u1EDBi.

Tr\u01B0\u1EDDngM\xF4 t\u1EA3
lamportsS\u1ED1 l\u01B0\u1EE3ng lamports thu\u1ED9c s\u1EDF h\u1EEFu b\u1EDFi Account \u0111\xF3
owner\u0110\u1ECBa ch\u1EC9 Program Account \u0111ang ki\u1EBFm so\xE1t Account \u0111\xF3
executableAccount n\xE0y c\xF3 th\u1EC3 th\u1EF1c thi c\xE1c instructions hay kh\xF4ng?
dataD\u1EEF li\u1EC7u th\xF4 d\u01B0\u1EDBi d\u1EA1ng c\xE1c bytes \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF trong Account
rent_epochK\u1EF3 h\u1EA1n thu\xEA v\xF9ng nh\u1EDB ti\u1EBFp theo cho Account

C\xF3 m\u1ED9t v\xE0i quy t\u1EAFc quan tr\u1ECDng v\u1EC1 quy\u1EC1n s\u1EDF h\u1EEFu:

  • Ch\u1EC9 owner m\u1EDBi \u0111\u01B0\u1EE3c ch\u1EC9nh s\u1EEDa c\u0169ng nh\u01B0 r\xFAt s\u1ED1 lamports t\u1EEB m\u1ED9t Data Account
  • B\u1EA5t k\u1EF3 ai c\u0169ng \u0111\u01B0\u1EE3c ph\xE9p n\u1EA1p lamports v\xE0o m\u1ED9t Data Account
  • Owner c\u1EE7a m\u1ED9t Account c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c g\xE1n cho m\u1ED9t owner m\u1EDBi khi v\xE0 ch\u1EC9 khi v\xF9ng nh\u1EDB c\u1EE7a Account \u0111\xF3 \u0111\u01B0\u1EE3c ho\xE0n tr\u1EA3

Program Accounts kh\xF4ng \u0111\u01B0\u1EE3c l\u01B0u state.

V\xED d\u1EE5, n\u1EBFu b\u1EA1n c\xF3 m\u1ED9t ch\u01B0\u01A1ng tr\xECnh \u0111\u1EBFm tr\xEAn m\u1ED9t Program Account v\xE0 cho ph\xE9p t\u0103ng b\u1ED9 \u0111\u1EBFm l\xEAn sau m\u1ED7i l\u1EA7n t\u01B0\u01A1ng t\xE1c, b\u1EA1n ph\u1EA3i t\u1EA1o t\u1ED1i thi\u1EC3u 2 Account. Trong \u0111\xF3, m\u1ED9t cho Program Account \u0111\u1EC3 l\u01B0u code th\u1EF1c thi, v\xE0 m\u1ED9t cho Data Account \u0111\u1EC3 l\u01B0u d\u1EEF li\u1EC7u b\u1ED9 \u0111\u1EBFm.

\u0110\u1EC3 tr\xE1nh vi\u1EC7c m\u1ED9t Account b\u1ECB xo\xE1, b\u1EA1n ph\u1EA3i tr\u1EA3 chi ph\xED \u0111\u1EC3 thu\xEA v\xF9ng nh\u1EDB cho Account \u0111\xF3.

Thu\xEA

L\u01B0u tr\u1EEF d\u1EEF li\u1EC7u v\xE0o Account v\xE0 duy tr\xEC Account \u0111\xF3 s\u1EBD ph\xE1t sinh chi ph\xED SOL. Chi ph\xED n\xE0y \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 chi ph\xED thu\xEA. N\u1EBFu chi ph\xED thu\xEA \u0111\u01B0\u1EE3c duy tr\xEC \u1EDF m\u1EE9c t\u1ED1i thi\u1EC3u l\xE0 2 n\u0103m cho Account \u0111\xF3, th\xEC b\u1EA1n s\u1EBD \u0111\u01B0\u1EE3c mi\u1EC5n ph\xED l\u01B0u tr\u1EEF. B\u1EA1n c\u0169ng c\xF3 th\u1EC3 thu h\u1ED3i l\u1EA1i ph\xED c\u1ECDc b\u1EB1ng c\xE1ch \u0111\xF3ng Account. S\u1ED1 lamports c\u1ECDc s\u1EBD \u0111\u01B0\u1EE3c ho\xE0n tr\u1EA3 v\u1EC1 \u0111\u1ECBa ch\u1EC9 v\xED c\u1EE7a b\u1EA1n.

Chi ph\xED thu\xEA \u0111\u01B0\u1EE3c t\xEDnh to\xE1n v\xE0 chi tr\u1EA3 \u1EDF 2 th\u1EDDi \u0111i\u1EC3m kh\xE1c nhau:

  1. Khi c\xF3 b\u1EA5t k\u1EF3 giao d\u1ECBch n\xE0o c\xF3 tham chi\u1EBFu \u0111\u1EBFn Account \u0111\xF3.
  2. \u0110\u1ECBnh k\u1EF3 m\u1ED7i epoch.

M\u1ED9t ph\u1EA7n c\u1EE7a chi ph\xED thu\xEA thu \u0111\u01B0\u1EE3c s\u1EBD \u0111\u01B0\u1EE3c ti\xEAu hu\u1EF7, trong khi ph\u1EA7n c\xF2n l\u1EA1i s\u1EBD \u0111\u01B0\u1EE3c ph\xE2n chia cho c\xE1c Vote Account sau m\u1ED7i slot.

N\u1EBFu m\u1ED9t Account kh\xF4ng \u0111\u1EE7 c\u1ECDc \u0111\u1EC3 chi tr\u1EA3 ph\xED thu\xEA, Account \u0111\xF3 s\u1EBD b\u1ECB thu h\u1ED3i v\xE0 to\xE0n b\u1ED9 d\u1EEF li\u1EC7u s\u1EBD b\u1ECB xo\xE1.

C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c

',21),D={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},B=c("Solana Account Model"),N={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},V=c("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),K={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},M=c("pencilflip account thread"),T=t("h3",{id:"loi-cam-on",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#loi-cam-on","aria-hidden":"true"},"#"),c(" L\u1EDDi c\u1EA3m \u01A1n")],-1),L=c("Kh\xE1i ni\u1EC7m c\u0103n b\u1EA3n n\xE0y \u0111\u01B0\u1EE3c \u0111\xF3ng g\xF3p c\u1EE7a Pencilflip. "),q={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},E=c("Theo d\xF5i anh \u1EA5y tr\xEAn Twitter"),z=c(".");function F(I,O){const n=e("ExternalLinkIcon");return i(),a(r,null,[d,p,m,t("div",g,[_,t("ul",null,[A,b,k,f,v,t("li",null,[y,t("a",x,[S,o(n)])]),P,w])]),C,t("ul",null,[t("li",null,[t("a",D,[B,o(n)])]),t("li",null,[t("a",N,[V,o(n)])]),t("li",null,[t("a",K,[M,o(n)])])]),T,t("p",null,[L,t("a",q,[E,o(n)]),z])],64)}var G=h(s,[["render",F]]);export{G as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.bcf82d40.js b/docs/.vuepress/dist/assets/accounts.html.8962baed.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.bcf82d40.js rename to docs/.vuepress/dist/assets/accounts.html.8962baed.js index 528782f40..135d15cfd 100644 --- a/docs/.vuepress/dist/assets/accounts.html.bcf82d40.js +++ b/docs/.vuepress/dist/assets/accounts.html.8962baed.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-system-account","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 system account")],-1),g=s("\u0E43\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 account \u0E17\u0E35\u0E48 "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(" \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 Solana runtime \u0E08\u0E30\u0E43\u0E2B\u0E49\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 data \u0E2B\u0E23\u0E37\u0E2D transfer lamports \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07 account \u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E2D\u0E07\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48 storage space \u0E40\u0E1B\u0E47\u0E19 bytes \u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07 ("),v=n("code",null,"\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48",-1),S=s(") \u0E41\u0E25\u0E30 lamports \u0E17\u0E35\u0E48\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E1E\u0E2D\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E04\u0E48\u0E32 rent \u0E0B\u0E36\u0E48\u0E07 "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(" \u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D\u0E04\u0E48\u0E32 cost \u0E17\u0E35\u0E48\u0E21\u0E35\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32 accounts \u0E04\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 Solana"),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-system-account","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 system account")],-1),g=s("\u0E43\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 account \u0E17\u0E35\u0E48 "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(" \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 Solana runtime \u0E08\u0E30\u0E43\u0E2B\u0E49\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 data \u0E2B\u0E23\u0E37\u0E2D transfer lamports \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07 account \u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E2D\u0E07\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48 storage space \u0E40\u0E1B\u0E47\u0E19 bytes \u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07 ("),v=n("code",null,"\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48",-1),S=s(") \u0E41\u0E25\u0E30 lamports \u0E17\u0E35\u0E48\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E1E\u0E2D\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E04\u0E48\u0E32 rent \u0E0B\u0E36\u0E48\u0E07 "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(" \u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D\u0E04\u0E48\u0E32 cost \u0E17\u0E35\u0E48\u0E21\u0E35\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32 accounts \u0E04\u0E07\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 Solana"),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.25738f4e.js b/docs/.vuepress/dist/assets/accounts.html.a8d96503.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.25738f4e.js rename to docs/.vuepress/dist/assets/accounts.html.a8d96503.js index 8e526ec31..49f0f808b 100644 --- a/docs/.vuepress/dist/assets/accounts.html.25738f4e.js +++ b/docs/.vuepress/dist/assets/accounts.html.a8d96503.js @@ -1 +1 @@ -import{_ as l,r as o,o as i,c as n,a as t,b as r,F as d,e as s,d as e}from"./app.07ce7a66.js";var c="/assets/account_example.8a777374.png";const h={},p=s('

\u8CEC\u6236

\u5728Solana\u4E2D\uFF0C\u8CEC\u6236\u662F\u7528\u4F86\u5B58\u5132\u72C0\u614B\u7684\u3002\u8CEC\u6236\u662FSolana\u958B\u767C\u4E2D\u975E\u5E38\u91CD\u8981\u7684\u69CB\u6210\u8981\u7D20\u3002

\u7D9C\u8FF0

\u8981\u9EDE

  • \u8CEC\u6236\u662F\u7528\u4F86\u5B58\u653E\u6578\u64DA\u7684
  • \u6BCF\u500B\u8CEC\u6236\u90FD\u6709\u4E00\u500B\u7368\u4E00\u7121\u4E8C\u7684\u5730\u5740
  • \u6BCF\u500B\u8CEC\u6236\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E10MB
  • \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E10KB
  • \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\u53EF\u4EE5\u7528\u5176\u5C0D\u61C9\u7A0B\u5E8F\u9032\u884C\u7C3D\u540D
  • \u8CEC\u6236\u5927\u5C0F\u662F\u975C\u614B\u7684
  • \u8CEC\u6236\u6578\u64DA\u5B58\u5132\u9700\u8981\u4ED8\u79DF\u91D1
  • \u9ED8\u8A8D\u7684\u8CEC\u6236\u6240\u6709\u8005\u662F"\u7CFB\u7D71\u7A0B\u5E8F"

\u6DF1\u5165

\u8CEC\u6236\u6A21\u578B

\u5728Solana\u4E2D\u6709\u4E09\u985E\u8CEC\u6236\uFF1A

  • \u6578\u64DA\u8CEC\u6236\uFF0C\u7528\u4F86\u5B58\u5132\u6578\u64DA
  • \u7A0B\u5E8F\u8CEC\u6236\uFF0C\u7528\u4F86\u5B58\u5132\u53EF\u57F7\u884C\u7A0B\u5E8F
  • \u539F\u751F\u8CEC\u6236\uFF0C\u6307Solana\u4E0A\u7684\u539F\u751F\u7A0B\u5E8F\uFF0C\u4F8B\u5982"System"\uFF0C"Stake"\uFF0C\u4EE5\u53CA"Vote"\u3002

\u6578\u64DA\u8CEC\u6236\u53C8\u5206\u7232\u5169\u985E\uFF1A

  • \u7CFB\u7D71\u6240\u6709\u8CEC\u6236
  • \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF08PDA\uFF09

\u6BCF\u500B\u8CEC\u6236\u90FD\u6709\u4E00\u500B\u5730\u5740\uFF08\u4E00\u822C\u60C5\u6CC1\u4E0B\u662F\u4E00\u500B\u516C\u9470\uFF09\u4EE5\u53CA\u4E00\u500B\u6240\u6709\u8005\uFF08\u7A0B\u5E8F\u8CEC\u6236\u7684\u5730\u5740\uFF09\u3002 \u4E0B\u9762\u8A73\u7D30\u5217\u51FA\u4E00\u500B\u8CEC\u6236\u5B58\u5132\u7684\u5B8C\u6574\u5B57\u6BB5\u5217\u8868\u3002

\u5B57\u6BB5\u63CF\u8FF0
lamports\u9019\u500B\u8CEC\u6236\u64C1\u6709\u7684lamport\uFF08\u862D\u6CE2\u7279\uFF09\u6578\u91CF
owner\u9019\u500B\u8CEC\u6236\u7684\u6240\u6709\u8005\u7A0B\u5E8F
executable\u9019\u500B\u8CEC\u6236\u6210\u662F\u5426\u53EF\u4EE5\u8655\u7406\u6307\u4EE4
data\u9019\u500B\u8CEC\u6236\u5B58\u5132\u7684\u6578\u64DA\u7684\u5B57\u7BC0\u78BC
rent_epoch\u4E0B\u4E00\u500B\u9700\u8981\u4ED8\u79DF\u91D1\u7684epoch\uFF08\u4EE3\uFF09

\u95DC\u65BC\u6240\u6709\u6B0A\uFF0C\u6709\u5E7E\u689D\u91CD\u8981\u7684\u898F\u5247\uFF1A

  • \u53EA\u6709\u8CEC\u6236\u7684\u6240\u6709\u8005\u624D\u80FD\u6539\u8B8A\u8CEC\u6236\u4E2D\u7684\u6578\u64DA\uFF0C\u63D0\u53D6lamport
  • \u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5411\u6578\u64DA\u8CEC\u6236\u4E2D\u5B58\u5165lamport
  • \u7576\u8CEC\u6236\u4E2D\u7684\u6578\u64DA\u88AB\u62B9\u9664\u4E4B\u5F8C\uFF0C\u8CEC\u6236\u7684\u6240\u6709\u8005\u53EF\u4EE5\u6307\u5B9A\u65B0\u7684\u6240\u6709\u8005

\u7A0B\u5E8F\u8CEC\u6236\u4E0D\u5132\u5B58\u72C0\u614B\u3002

\u4F8B\u5982\uFF0C\u5047\u8A2D\u6709\u4E00\u500B\u8A08\u6578\u7A0B\u5E8F\uFF0C\u9019\u500B\u7A0B\u5E8F\u7528\u4F86\u7232\u4E00\u500B\u8A08\u6578\u5668\u52A0\u6578\uFF0C\u4F60\u9700\u8981\u5275\u5EFA\u5169\u500B\u8CEC\u6236\uFF0C\u4E00\u500B\u7528\u65BC\u5B58\u5132\u7A0B\u5E8F\u7684\u4EE3\u78BC\uFF0C \u53E6\u4E00\u500B\u7528\u65BC\u5B58\u5132\u8A08\u6578\u5668\u672C\u8EAB\u3002

\u7232\u4E86\u907F\u514D\u8CEC\u6236\u88AB\u522A\u9664\uFF0C\u5FC5\u9808\u4ED8\u79DF\u91D1\u3002

\u79DF\u91D1

\u5728\u8CEC\u6236\u4E2D\u5B58\u5132\u6578\u64DA\u9700\u8981\u82B1\u8CBBSOL\u4F86\u7DAD\u6301\uFF0C\u9019\u90E8\u5206\u82B1\u8CBB\u7684SOL\u88AB\u7A31\u4F5C\u79DF\u91D1\u3002\u5982\u679C\u4F60\u5728\u4E00\u500B\u8CEC\u6236\u4E2D\u5B58\u5165\u5927\u65BC\u5169\u5E74\u79DF\u91D1\u7684SOL\uFF0C \u9019\u500B\u8CEC\u6236\u5C31\u53EF\u4EE5\u88AB\u8C41\u514D\u4ED8\u79DF\u3002\u79DF\u91D1\u53EF\u4EE5\u901A\u904E\u95DC\u9589\u8CEC\u6236\u7684\u65B9\u5F0F\u4F86\u53D6\u56DE\u3002lamport\u6703\u88AB\u8FD4\u9084\u56DE\u4F60\u7684\u9322\u5305\u3002

\u79DF\u91D1\u5728\u9019\u5169\u500B\u4E0D\u540C\u7684\u6642\u9593\u9EDE\u88AB\u652F\u53D6\uFF1A

  1. \u88AB\u4E00\u500B\u4EA4\u6613\u5F15\u7528\u7684\u6642\u5019
  2. epoch\u66F4\u8FED\u6642

\u6536\u53D6\u7684\u79DF\u91D1\uFF0C\u4E00\u5B9A\u767E\u5206\u6BD4\u6703\u88AB\u92B7\u71EC\uFF0C\u53E6\u4E00\u90E8\u5206\u6703\u5728\u6BCF\u500Bslot\uFF08\u63D2\u69FD\uFF09\u7D50\u675F\u6642\u88AB\u5206\u914D\u7D66\u6295\u7968\u8CEC\u6236\u3002

\u7576\u4E00\u500B\u8CEC\u6236\u6C92\u6709\u8DB3\u5920\u7684\u9918\u984D\u652F\u4ED8\u79DF\u91D1\u6642\uFF0C\u9019\u500B\u8CEC\u6236\u6703\u88AB\u91CB\u653E\uFF0C\u6578\u64DA\u6703\u88AB\u6E05\u9664\u3002

\u5176\u4ED6\u8CC7\u6599

',25),_={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},u=e("Solana\u8CEC\u6236\u6A21\u578B"),m={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},f=e("\u5B98\u65B9\u6587\u6A94"),b={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},x=e("pencilflip\u8CEC\u6236\u4E3B\u984C"),g=t("h3",{id:"\u81F4\u8B1D",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u81F4\u8B1D","aria-hidden":"true"},"#"),e(" \u81F4\u8B1D")],-1),S=e("\u9019\u4E9B\u6838\u5FC3\u6982\u5FF5\u4F86\u6E90\u65BCPencilflip. "),k={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},q=e("\u5728Twitter\u4E0A\u95DC\u6CE8\u4ED6"),v=e(".");function w(B,L){const a=o("ExternalLinkIcon");return i(),n(d,null,[p,t("ul",null,[t("li",null,[t("a",_,[u,r(a)])]),t("li",null,[t("a",m,[f,r(a)])]),t("li",null,[t("a",b,[x,r(a)])])]),g,t("p",null,[S,t("a",k,[q,r(a)]),v])],64)}var N=l(h,[["render",w]]);export{N as default}; +import{_ as l,r as o,o as i,c as n,a as t,b as r,F as d,e as s,d as e}from"./app.d411e3b3.js";var c="/assets/account_example.8a777374.png";const h={},p=s('

\u8CEC\u6236

\u5728Solana\u4E2D\uFF0C\u8CEC\u6236\u662F\u7528\u4F86\u5B58\u5132\u72C0\u614B\u7684\u3002\u8CEC\u6236\u662FSolana\u958B\u767C\u4E2D\u975E\u5E38\u91CD\u8981\u7684\u69CB\u6210\u8981\u7D20\u3002

\u7D9C\u8FF0

\u8981\u9EDE

  • \u8CEC\u6236\u662F\u7528\u4F86\u5B58\u653E\u6578\u64DA\u7684
  • \u6BCF\u500B\u8CEC\u6236\u90FD\u6709\u4E00\u500B\u7368\u4E00\u7121\u4E8C\u7684\u5730\u5740
  • \u6BCF\u500B\u8CEC\u6236\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E10MB
  • \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E10KB
  • \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\u53EF\u4EE5\u7528\u5176\u5C0D\u61C9\u7A0B\u5E8F\u9032\u884C\u7C3D\u540D
  • \u8CEC\u6236\u5927\u5C0F\u662F\u975C\u614B\u7684
  • \u8CEC\u6236\u6578\u64DA\u5B58\u5132\u9700\u8981\u4ED8\u79DF\u91D1
  • \u9ED8\u8A8D\u7684\u8CEC\u6236\u6240\u6709\u8005\u662F"\u7CFB\u7D71\u7A0B\u5E8F"

\u6DF1\u5165

\u8CEC\u6236\u6A21\u578B

\u5728Solana\u4E2D\u6709\u4E09\u985E\u8CEC\u6236\uFF1A

  • \u6578\u64DA\u8CEC\u6236\uFF0C\u7528\u4F86\u5B58\u5132\u6578\u64DA
  • \u7A0B\u5E8F\u8CEC\u6236\uFF0C\u7528\u4F86\u5B58\u5132\u53EF\u57F7\u884C\u7A0B\u5E8F
  • \u539F\u751F\u8CEC\u6236\uFF0C\u6307Solana\u4E0A\u7684\u539F\u751F\u7A0B\u5E8F\uFF0C\u4F8B\u5982"System"\uFF0C"Stake"\uFF0C\u4EE5\u53CA"Vote"\u3002

\u6578\u64DA\u8CEC\u6236\u53C8\u5206\u7232\u5169\u985E\uFF1A

  • \u7CFB\u7D71\u6240\u6709\u8CEC\u6236
  • \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF08PDA\uFF09

\u6BCF\u500B\u8CEC\u6236\u90FD\u6709\u4E00\u500B\u5730\u5740\uFF08\u4E00\u822C\u60C5\u6CC1\u4E0B\u662F\u4E00\u500B\u516C\u9470\uFF09\u4EE5\u53CA\u4E00\u500B\u6240\u6709\u8005\uFF08\u7A0B\u5E8F\u8CEC\u6236\u7684\u5730\u5740\uFF09\u3002 \u4E0B\u9762\u8A73\u7D30\u5217\u51FA\u4E00\u500B\u8CEC\u6236\u5B58\u5132\u7684\u5B8C\u6574\u5B57\u6BB5\u5217\u8868\u3002

\u5B57\u6BB5\u63CF\u8FF0
lamports\u9019\u500B\u8CEC\u6236\u64C1\u6709\u7684lamport\uFF08\u862D\u6CE2\u7279\uFF09\u6578\u91CF
owner\u9019\u500B\u8CEC\u6236\u7684\u6240\u6709\u8005\u7A0B\u5E8F
executable\u9019\u500B\u8CEC\u6236\u6210\u662F\u5426\u53EF\u4EE5\u8655\u7406\u6307\u4EE4
data\u9019\u500B\u8CEC\u6236\u5B58\u5132\u7684\u6578\u64DA\u7684\u5B57\u7BC0\u78BC
rent_epoch\u4E0B\u4E00\u500B\u9700\u8981\u4ED8\u79DF\u91D1\u7684epoch\uFF08\u4EE3\uFF09

\u95DC\u65BC\u6240\u6709\u6B0A\uFF0C\u6709\u5E7E\u689D\u91CD\u8981\u7684\u898F\u5247\uFF1A

  • \u53EA\u6709\u8CEC\u6236\u7684\u6240\u6709\u8005\u624D\u80FD\u6539\u8B8A\u8CEC\u6236\u4E2D\u7684\u6578\u64DA\uFF0C\u63D0\u53D6lamport
  • \u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5411\u6578\u64DA\u8CEC\u6236\u4E2D\u5B58\u5165lamport
  • \u7576\u8CEC\u6236\u4E2D\u7684\u6578\u64DA\u88AB\u62B9\u9664\u4E4B\u5F8C\uFF0C\u8CEC\u6236\u7684\u6240\u6709\u8005\u53EF\u4EE5\u6307\u5B9A\u65B0\u7684\u6240\u6709\u8005

\u7A0B\u5E8F\u8CEC\u6236\u4E0D\u5132\u5B58\u72C0\u614B\u3002

\u4F8B\u5982\uFF0C\u5047\u8A2D\u6709\u4E00\u500B\u8A08\u6578\u7A0B\u5E8F\uFF0C\u9019\u500B\u7A0B\u5E8F\u7528\u4F86\u7232\u4E00\u500B\u8A08\u6578\u5668\u52A0\u6578\uFF0C\u4F60\u9700\u8981\u5275\u5EFA\u5169\u500B\u8CEC\u6236\uFF0C\u4E00\u500B\u7528\u65BC\u5B58\u5132\u7A0B\u5E8F\u7684\u4EE3\u78BC\uFF0C \u53E6\u4E00\u500B\u7528\u65BC\u5B58\u5132\u8A08\u6578\u5668\u672C\u8EAB\u3002

\u7232\u4E86\u907F\u514D\u8CEC\u6236\u88AB\u522A\u9664\uFF0C\u5FC5\u9808\u4ED8\u79DF\u91D1\u3002

\u79DF\u91D1

\u5728\u8CEC\u6236\u4E2D\u5B58\u5132\u6578\u64DA\u9700\u8981\u82B1\u8CBBSOL\u4F86\u7DAD\u6301\uFF0C\u9019\u90E8\u5206\u82B1\u8CBB\u7684SOL\u88AB\u7A31\u4F5C\u79DF\u91D1\u3002\u5982\u679C\u4F60\u5728\u4E00\u500B\u8CEC\u6236\u4E2D\u5B58\u5165\u5927\u65BC\u5169\u5E74\u79DF\u91D1\u7684SOL\uFF0C \u9019\u500B\u8CEC\u6236\u5C31\u53EF\u4EE5\u88AB\u8C41\u514D\u4ED8\u79DF\u3002\u79DF\u91D1\u53EF\u4EE5\u901A\u904E\u95DC\u9589\u8CEC\u6236\u7684\u65B9\u5F0F\u4F86\u53D6\u56DE\u3002lamport\u6703\u88AB\u8FD4\u9084\u56DE\u4F60\u7684\u9322\u5305\u3002

\u79DF\u91D1\u5728\u9019\u5169\u500B\u4E0D\u540C\u7684\u6642\u9593\u9EDE\u88AB\u652F\u53D6\uFF1A

  1. \u88AB\u4E00\u500B\u4EA4\u6613\u5F15\u7528\u7684\u6642\u5019
  2. epoch\u66F4\u8FED\u6642

\u6536\u53D6\u7684\u79DF\u91D1\uFF0C\u4E00\u5B9A\u767E\u5206\u6BD4\u6703\u88AB\u92B7\u71EC\uFF0C\u53E6\u4E00\u90E8\u5206\u6703\u5728\u6BCF\u500Bslot\uFF08\u63D2\u69FD\uFF09\u7D50\u675F\u6642\u88AB\u5206\u914D\u7D66\u6295\u7968\u8CEC\u6236\u3002

\u7576\u4E00\u500B\u8CEC\u6236\u6C92\u6709\u8DB3\u5920\u7684\u9918\u984D\u652F\u4ED8\u79DF\u91D1\u6642\uFF0C\u9019\u500B\u8CEC\u6236\u6703\u88AB\u91CB\u653E\uFF0C\u6578\u64DA\u6703\u88AB\u6E05\u9664\u3002

\u5176\u4ED6\u8CC7\u6599

',25),_={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},u=e("Solana\u8CEC\u6236\u6A21\u578B"),m={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},f=e("\u5B98\u65B9\u6587\u6A94"),b={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},x=e("pencilflip\u8CEC\u6236\u4E3B\u984C"),g=t("h3",{id:"\u81F4\u8B1D",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u81F4\u8B1D","aria-hidden":"true"},"#"),e(" \u81F4\u8B1D")],-1),S=e("\u9019\u4E9B\u6838\u5FC3\u6982\u5FF5\u4F86\u6E90\u65BCPencilflip. "),k={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},q=e("\u5728Twitter\u4E0A\u95DC\u6CE8\u4ED6"),v=e(".");function w(B,L){const a=o("ExternalLinkIcon");return i(),n(d,null,[p,t("ul",null,[t("li",null,[t("a",_,[u,r(a)])]),t("li",null,[t("a",m,[f,r(a)])]),t("li",null,[t("a",b,[x,r(a)])])]),g,t("p",null,[S,t("a",k,[q,r(a)]),v])],64)}var N=l(h,[["render",w]]);export{N as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.85e3e0a4.js b/docs/.vuepress/dist/assets/accounts.html.ab6f1b9a.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.85e3e0a4.js rename to docs/.vuepress/dist/assets/accounts.html.ab6f1b9a.js index 6e0477978..d9d863738 100644 --- a/docs/.vuepress/dist/assets/accounts.html.85e3e0a4.js +++ b/docs/.vuepress/dist/assets/accounts.html.ab6f1b9a.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),_=n("h2",{id:"how-to-create-a-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-system-account","aria-hidden":"true"},"#"),s(" How to create a system account")],-1),g=s("Create an account that the "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(" owns. The Solana runtime will grant the owner of an account, access to write to its data or transfer lamports. When creating an account, we have to preallocate a fixed storage space in bytes ("),v=n("code",null,"space",-1),A=s(") and enough lamports to cover the rent. "),S={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(" is a cost incurred to keep accounts alive on Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),_=n("h2",{id:"how-to-create-a-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-system-account","aria-hidden":"true"},"#"),s(" How to create a system account")],-1),g=s("Create an account that the "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("System Program"),P=s(" owns. The Solana runtime will grant the owner of an account, access to write to its data or transfer lamports. When creating an account, we have to preallocate a fixed storage space in bytes ("),v=n("code",null,"space",-1),A=s(") and enough lamports to cover the rent. "),S={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("Rent"),K=s(" is a cost incurred to keep accounts alive on Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.7d878d86.js b/docs/.vuepress/dist/assets/accounts.html.af394751.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.7d878d86.js rename to docs/.vuepress/dist/assets/accounts.html.af394751.js index 2bb7cdf3c..c907d962b 100644 --- a/docs/.vuepress/dist/assets/accounts.html.7d878d86.js +++ b/docs/.vuepress/dist/assets/accounts.html.af394751.js @@ -1 +1 @@ -import{_ as l,r as o,o as i,c as n,a as t,b as r,F as d,e as s,d as e}from"./app.07ce7a66.js";var c="/assets/account_example.8a777374.png";const h={},p=s('

\u8D26\u6237

\u5728Solana\u4E2D\uFF0C\u8D26\u6237\u662F\u7528\u6765\u5B58\u50A8\u72B6\u6001\u7684\u3002\u8D26\u6237\u662FSolana\u5F00\u53D1\u4E2D\u975E\u5E38\u91CD\u8981\u7684\u6784\u6210\u8981\u7D20\u3002

\u7EFC\u8FF0

\u8981\u70B9

  • \u8D26\u6237\u662F\u7528\u6765\u5B58\u653E\u6570\u636E\u7684
  • \u6BCF\u4E2A\u8D26\u6237\u90FD\u6709\u4E00\u4E2A\u72EC\u4E00\u65E0\u4E8C\u7684\u5730\u5740
  • \u6BCF\u4E2A\u8D26\u6237\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710MB
  • \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710KB
  • \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\u53EF\u4EE5\u7528\u5176\u5BF9\u5E94\u7A0B\u5E8F\u8FDB\u884C\u7B7E\u540D
  • \u8D26\u6237\u5927\u5C0F\u662F\u9759\u6001\u7684
  • \u8D26\u6237\u6570\u636E\u5B58\u50A8\u9700\u8981\u4ED8\u79DF\u91D1
  • \u9ED8\u8BA4\u7684\u8D26\u6237\u6240\u6709\u8005\u662F"\u7CFB\u7EDF\u7A0B\u5E8F"

\u6DF1\u5165

\u8D26\u6237\u6A21\u578B

\u5728Solana\u4E2D\u6709\u4E09\u7C7B\u8D26\u6237\uFF1A

  • \u6570\u636E\u8D26\u6237\uFF0C\u7528\u6765\u5B58\u50A8\u6570\u636E
  • \u7A0B\u5E8F\u8D26\u6237\uFF0C\u7528\u6765\u5B58\u50A8\u53EF\u6267\u884C\u7A0B\u5E8F
  • \u539F\u751F\u8D26\u6237\uFF0C\u6307Solana\u4E0A\u7684\u539F\u751F\u7A0B\u5E8F\uFF0C\u4F8B\u5982"System"\uFF0C"Stake"\uFF0C\u4EE5\u53CA"Vote"\u3002

\u6570\u636E\u8D26\u6237\u53C8\u5206\u4E3A\u4E24\u7C7B\uFF1A

  • \u7CFB\u7EDF\u6240\u6709\u8D26\u6237
  • \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF08PDA\uFF09

\u6BCF\u4E2A\u8D26\u6237\u90FD\u6709\u4E00\u4E2A\u5730\u5740\uFF08\u4E00\u822C\u60C5\u51B5\u4E0B\u662F\u4E00\u4E2A\u516C\u94A5\uFF09\u4EE5\u53CA\u4E00\u4E2A\u6240\u6709\u8005\uFF08\u7A0B\u5E8F\u8D26\u6237\u7684\u5730\u5740\uFF09\u3002 \u4E0B\u9762\u8BE6\u7EC6\u5217\u51FA\u4E00\u4E2A\u8D26\u6237\u5B58\u50A8\u7684\u5B8C\u6574\u5B57\u6BB5\u5217\u8868\u3002

\u5B57\u6BB5\u63CF\u8FF0
lamports\u8FD9\u4E2A\u8D26\u6237\u62E5\u6709\u7684lamport\uFF08\u5170\u6CE2\u7279\uFF09\u6570\u91CF
owner\u8FD9\u4E2A\u8D26\u6237\u7684\u6240\u6709\u8005\u7A0B\u5E8F
executable\u8FD9\u4E2A\u8D26\u6237\u6210\u662F\u5426\u53EF\u4EE5\u5904\u7406\u6307\u4EE4
data\u8FD9\u4E2A\u8D26\u6237\u5B58\u50A8\u7684\u6570\u636E\u7684\u5B57\u8282\u7801
rent_epoch\u4E0B\u4E00\u4E2A\u9700\u8981\u4ED8\u79DF\u91D1\u7684epoch\uFF08\u4EE3\uFF09

\u5173\u4E8E\u6240\u6709\u6743\uFF0C\u6709\u51E0\u6761\u91CD\u8981\u7684\u89C4\u5219\uFF1A

  • \u53EA\u6709\u8D26\u6237\u7684\u6240\u6709\u8005\u624D\u80FD\u6539\u53D8\u8D26\u6237\u4E2D\u7684\u6570\u636E\uFF0C\u63D0\u53D6lamport
  • \u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5411\u6570\u636E\u8D26\u6237\u4E2D\u5B58\u5165lamport
  • \u5F53\u8D26\u6237\u4E2D\u7684\u6570\u636E\u88AB\u62B9\u9664\u4E4B\u540E\uFF0C\u8D26\u6237\u7684\u6240\u6709\u8005\u53EF\u4EE5\u6307\u5B9A\u65B0\u7684\u6240\u6709\u8005

\u7A0B\u5E8F\u8D26\u6237\u4E0D\u50A8\u5B58\u72B6\u6001\u3002

\u4F8B\u5982\uFF0C\u5047\u8BBE\u6709\u4E00\u4E2A\u8BA1\u6570\u7A0B\u5E8F\uFF0C\u8FD9\u4E2A\u7A0B\u5E8F\u7528\u6765\u4E3A\u4E00\u4E2A\u8BA1\u6570\u5668\u52A0\u6570\uFF0C\u4F60\u9700\u8981\u521B\u5EFA\u4E24\u4E2A\u8D26\u6237\uFF0C\u4E00\u4E2A\u7528\u4E8E\u5B58\u50A8\u7A0B\u5E8F\u7684\u4EE3\u7801\uFF0C \u53E6\u4E00\u4E2A\u7528\u4E8E\u5B58\u50A8\u8BA1\u6570\u5668\u672C\u8EAB\u3002

\u4E3A\u4E86\u907F\u514D\u8D26\u6237\u88AB\u5220\u9664\uFF0C\u5FC5\u987B\u4ED8\u79DF\u91D1\u3002

\u79DF\u91D1

\u5728\u8D26\u6237\u4E2D\u5B58\u50A8\u6570\u636E\u9700\u8981\u82B1\u8D39SOL\u6765\u7EF4\u6301\uFF0C\u8FD9\u90E8\u5206\u82B1\u8D39\u7684SOL\u88AB\u79F0\u4F5C\u79DF\u91D1\u3002\u5982\u679C\u4F60\u5728\u4E00\u4E2A\u8D26\u6237\u4E2D\u5B58\u5165\u5927\u4E8E\u4E24\u5E74\u79DF\u91D1\u7684SOL\uFF0C \u8FD9\u4E2A\u8D26\u6237\u5C31\u53EF\u4EE5\u88AB\u8C41\u514D\u4ED8\u79DF\u3002\u79DF\u91D1\u53EF\u4EE5\u901A\u8FC7\u5173\u95ED\u8D26\u6237\u7684\u65B9\u5F0F\u6765\u53D6\u56DE\u3002lamport\u4F1A\u88AB\u8FD4\u8FD8\u56DE\u4F60\u7684\u94B1\u5305\u3002

\u79DF\u91D1\u5728\u8FD9\u4E24\u4E2A\u4E0D\u540C\u7684\u65F6\u95F4\u70B9\u88AB\u652F\u53D6\uFF1A

  1. \u88AB\u4E00\u4E2A\u4EA4\u6613\u5F15\u7528\u7684\u65F6\u5019
  2. epoch\u66F4\u8FED\u65F6

\u6536\u53D6\u7684\u79DF\u91D1\uFF0C\u4E00\u5B9A\u767E\u5206\u6BD4\u4F1A\u88AB\u9500\u6BC1\uFF0C\u53E6\u4E00\u90E8\u5206\u4F1A\u5728\u6BCF\u4E2Aslot\uFF08\u63D2\u69FD\uFF09\u7ED3\u675F\u65F6\u88AB\u5206\u914D\u7ED9\u6295\u7968\u8D26\u6237\u3002

\u5F53\u4E00\u4E2A\u8D26\u6237\u6CA1\u6709\u8DB3\u591F\u7684\u4F59\u989D\u652F\u4ED8\u79DF\u91D1\u65F6\uFF0C\u8FD9\u4E2A\u8D26\u6237\u4F1A\u88AB\u91CA\u653E\uFF0C\u6570\u636E\u4F1A\u88AB\u6E05\u9664\u3002

\u5176\u4ED6\u8D44\u6599

',25),_={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},u=e("Solana\u8D26\u6237\u6A21\u578B"),m={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},f=e("\u5B98\u65B9\u6587\u6863"),b={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},x=e("pencilflip\u8D26\u6237\u4E3B\u9898"),g=t("h3",{id:"\u81F4\u8C22",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u81F4\u8C22","aria-hidden":"true"},"#"),e(" \u81F4\u8C22")],-1),S=e("\u8FD9\u4E9B\u6838\u5FC3\u6982\u5FF5\u6765\u6E90\u4E8EPencilflip. "),k={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},q=e("\u5728Twitter\u4E0A\u5173\u6CE8\u4ED6"),v=e(".");function w(B,L){const a=o("ExternalLinkIcon");return i(),n(d,null,[p,t("ul",null,[t("li",null,[t("a",_,[u,r(a)])]),t("li",null,[t("a",m,[f,r(a)])]),t("li",null,[t("a",b,[x,r(a)])])]),g,t("p",null,[S,t("a",k,[q,r(a)]),v])],64)}var N=l(h,[["render",w]]);export{N as default}; +import{_ as l,r as o,o as i,c as n,a as t,b as r,F as d,e as s,d as e}from"./app.d411e3b3.js";var c="/assets/account_example.8a777374.png";const h={},p=s('

\u8D26\u6237

\u5728Solana\u4E2D\uFF0C\u8D26\u6237\u662F\u7528\u6765\u5B58\u50A8\u72B6\u6001\u7684\u3002\u8D26\u6237\u662FSolana\u5F00\u53D1\u4E2D\u975E\u5E38\u91CD\u8981\u7684\u6784\u6210\u8981\u7D20\u3002

\u7EFC\u8FF0

\u8981\u70B9

  • \u8D26\u6237\u662F\u7528\u6765\u5B58\u653E\u6570\u636E\u7684
  • \u6BCF\u4E2A\u8D26\u6237\u90FD\u6709\u4E00\u4E2A\u72EC\u4E00\u65E0\u4E8C\u7684\u5730\u5740
  • \u6BCF\u4E2A\u8D26\u6237\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710MB
  • \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC710KB
  • \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\u53EF\u4EE5\u7528\u5176\u5BF9\u5E94\u7A0B\u5E8F\u8FDB\u884C\u7B7E\u540D
  • \u8D26\u6237\u5927\u5C0F\u662F\u9759\u6001\u7684
  • \u8D26\u6237\u6570\u636E\u5B58\u50A8\u9700\u8981\u4ED8\u79DF\u91D1
  • \u9ED8\u8BA4\u7684\u8D26\u6237\u6240\u6709\u8005\u662F"\u7CFB\u7EDF\u7A0B\u5E8F"

\u6DF1\u5165

\u8D26\u6237\u6A21\u578B

\u5728Solana\u4E2D\u6709\u4E09\u7C7B\u8D26\u6237\uFF1A

  • \u6570\u636E\u8D26\u6237\uFF0C\u7528\u6765\u5B58\u50A8\u6570\u636E
  • \u7A0B\u5E8F\u8D26\u6237\uFF0C\u7528\u6765\u5B58\u50A8\u53EF\u6267\u884C\u7A0B\u5E8F
  • \u539F\u751F\u8D26\u6237\uFF0C\u6307Solana\u4E0A\u7684\u539F\u751F\u7A0B\u5E8F\uFF0C\u4F8B\u5982"System"\uFF0C"Stake"\uFF0C\u4EE5\u53CA"Vote"\u3002

\u6570\u636E\u8D26\u6237\u53C8\u5206\u4E3A\u4E24\u7C7B\uFF1A

  • \u7CFB\u7EDF\u6240\u6709\u8D26\u6237
  • \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF08PDA\uFF09

\u6BCF\u4E2A\u8D26\u6237\u90FD\u6709\u4E00\u4E2A\u5730\u5740\uFF08\u4E00\u822C\u60C5\u51B5\u4E0B\u662F\u4E00\u4E2A\u516C\u94A5\uFF09\u4EE5\u53CA\u4E00\u4E2A\u6240\u6709\u8005\uFF08\u7A0B\u5E8F\u8D26\u6237\u7684\u5730\u5740\uFF09\u3002 \u4E0B\u9762\u8BE6\u7EC6\u5217\u51FA\u4E00\u4E2A\u8D26\u6237\u5B58\u50A8\u7684\u5B8C\u6574\u5B57\u6BB5\u5217\u8868\u3002

\u5B57\u6BB5\u63CF\u8FF0
lamports\u8FD9\u4E2A\u8D26\u6237\u62E5\u6709\u7684lamport\uFF08\u5170\u6CE2\u7279\uFF09\u6570\u91CF
owner\u8FD9\u4E2A\u8D26\u6237\u7684\u6240\u6709\u8005\u7A0B\u5E8F
executable\u8FD9\u4E2A\u8D26\u6237\u6210\u662F\u5426\u53EF\u4EE5\u5904\u7406\u6307\u4EE4
data\u8FD9\u4E2A\u8D26\u6237\u5B58\u50A8\u7684\u6570\u636E\u7684\u5B57\u8282\u7801
rent_epoch\u4E0B\u4E00\u4E2A\u9700\u8981\u4ED8\u79DF\u91D1\u7684epoch\uFF08\u4EE3\uFF09

\u5173\u4E8E\u6240\u6709\u6743\uFF0C\u6709\u51E0\u6761\u91CD\u8981\u7684\u89C4\u5219\uFF1A

  • \u53EA\u6709\u8D26\u6237\u7684\u6240\u6709\u8005\u624D\u80FD\u6539\u53D8\u8D26\u6237\u4E2D\u7684\u6570\u636E\uFF0C\u63D0\u53D6lamport
  • \u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5411\u6570\u636E\u8D26\u6237\u4E2D\u5B58\u5165lamport
  • \u5F53\u8D26\u6237\u4E2D\u7684\u6570\u636E\u88AB\u62B9\u9664\u4E4B\u540E\uFF0C\u8D26\u6237\u7684\u6240\u6709\u8005\u53EF\u4EE5\u6307\u5B9A\u65B0\u7684\u6240\u6709\u8005

\u7A0B\u5E8F\u8D26\u6237\u4E0D\u50A8\u5B58\u72B6\u6001\u3002

\u4F8B\u5982\uFF0C\u5047\u8BBE\u6709\u4E00\u4E2A\u8BA1\u6570\u7A0B\u5E8F\uFF0C\u8FD9\u4E2A\u7A0B\u5E8F\u7528\u6765\u4E3A\u4E00\u4E2A\u8BA1\u6570\u5668\u52A0\u6570\uFF0C\u4F60\u9700\u8981\u521B\u5EFA\u4E24\u4E2A\u8D26\u6237\uFF0C\u4E00\u4E2A\u7528\u4E8E\u5B58\u50A8\u7A0B\u5E8F\u7684\u4EE3\u7801\uFF0C \u53E6\u4E00\u4E2A\u7528\u4E8E\u5B58\u50A8\u8BA1\u6570\u5668\u672C\u8EAB\u3002

\u4E3A\u4E86\u907F\u514D\u8D26\u6237\u88AB\u5220\u9664\uFF0C\u5FC5\u987B\u4ED8\u79DF\u91D1\u3002

\u79DF\u91D1

\u5728\u8D26\u6237\u4E2D\u5B58\u50A8\u6570\u636E\u9700\u8981\u82B1\u8D39SOL\u6765\u7EF4\u6301\uFF0C\u8FD9\u90E8\u5206\u82B1\u8D39\u7684SOL\u88AB\u79F0\u4F5C\u79DF\u91D1\u3002\u5982\u679C\u4F60\u5728\u4E00\u4E2A\u8D26\u6237\u4E2D\u5B58\u5165\u5927\u4E8E\u4E24\u5E74\u79DF\u91D1\u7684SOL\uFF0C \u8FD9\u4E2A\u8D26\u6237\u5C31\u53EF\u4EE5\u88AB\u8C41\u514D\u4ED8\u79DF\u3002\u79DF\u91D1\u53EF\u4EE5\u901A\u8FC7\u5173\u95ED\u8D26\u6237\u7684\u65B9\u5F0F\u6765\u53D6\u56DE\u3002lamport\u4F1A\u88AB\u8FD4\u8FD8\u56DE\u4F60\u7684\u94B1\u5305\u3002

\u79DF\u91D1\u5728\u8FD9\u4E24\u4E2A\u4E0D\u540C\u7684\u65F6\u95F4\u70B9\u88AB\u652F\u53D6\uFF1A

  1. \u88AB\u4E00\u4E2A\u4EA4\u6613\u5F15\u7528\u7684\u65F6\u5019
  2. epoch\u66F4\u8FED\u65F6

\u6536\u53D6\u7684\u79DF\u91D1\uFF0C\u4E00\u5B9A\u767E\u5206\u6BD4\u4F1A\u88AB\u9500\u6BC1\uFF0C\u53E6\u4E00\u90E8\u5206\u4F1A\u5728\u6BCF\u4E2Aslot\uFF08\u63D2\u69FD\uFF09\u7ED3\u675F\u65F6\u88AB\u5206\u914D\u7ED9\u6295\u7968\u8D26\u6237\u3002

\u5F53\u4E00\u4E2A\u8D26\u6237\u6CA1\u6709\u8DB3\u591F\u7684\u4F59\u989D\u652F\u4ED8\u79DF\u91D1\u65F6\uFF0C\u8FD9\u4E2A\u8D26\u6237\u4F1A\u88AB\u91CA\u653E\uFF0C\u6570\u636E\u4F1A\u88AB\u6E05\u9664\u3002

\u5176\u4ED6\u8D44\u6599

',25),_={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},u=e("Solana\u8D26\u6237\u6A21\u578B"),m={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},f=e("\u5B98\u65B9\u6587\u6863"),b={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},x=e("pencilflip\u8D26\u6237\u4E3B\u9898"),g=t("h3",{id:"\u81F4\u8C22",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u81F4\u8C22","aria-hidden":"true"},"#"),e(" \u81F4\u8C22")],-1),S=e("\u8FD9\u4E9B\u6838\u5FC3\u6982\u5FF5\u6765\u6E90\u4E8EPencilflip. "),k={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},q=e("\u5728Twitter\u4E0A\u5173\u6CE8\u4ED6"),v=e(".");function w(B,L){const a=o("ExternalLinkIcon");return i(),n(d,null,[p,t("ul",null,[t("li",null,[t("a",_,[u,r(a)])]),t("li",null,[t("a",m,[f,r(a)])]),t("li",null,[t("a",b,[x,r(a)])])]),g,t("p",null,[S,t("a",k,[q,r(a)]),v])],64)}var N=l(h,[["render",w]]);export{N as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.527d0e94.js b/docs/.vuepress/dist/assets/accounts.html.b2dcd867.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.527d0e94.js rename to docs/.vuepress/dist/assets/accounts.html.b2dcd867.js index 703932406..33890256b 100644 --- a/docs/.vuepress/dist/assets/accounts.html.527d0e94.js +++ b/docs/.vuepress/dist/assets/accounts.html.b2dcd867.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"contas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#contas","aria-hidden":"true"},"#"),s(" Contas")],-1),f=n("h2",{id:"como-criar-uma-conta-do-sistema",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-criar-uma-conta-do-sistema","aria-hidden":"true"},"#"),s(" Como criar uma conta do sistema")],-1),g=s("Crie uma conta que perten\xE7a ao "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("Programa do Sistema"),P=s(". O tempo de execu\xE7\xE3o da Solana conceder\xE1 ao propriet\xE1rio de uma conta acesso para gravar seus dados ou transferir lamports. Ao criar uma conta, \xE9 necess\xE1rio alocar previamente um espa\xE7o de armazenamento fixo em bytes ("),v=n("code",null,"space",-1),S=s(") e lamports suficientes para cobrir o aluguel. O "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("aluguel"),K=s(" \xE9 um custo incorrido para manter as contas ativas na rede Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"contas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#contas","aria-hidden":"true"},"#"),s(" Contas")],-1),f=n("h2",{id:"como-criar-uma-conta-do-sistema",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-criar-uma-conta-do-sistema","aria-hidden":"true"},"#"),s(" Como criar uma conta do sistema")],-1),g=s("Crie uma conta que perten\xE7a ao "),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("Programa do Sistema"),P=s(". O tempo de execu\xE7\xE3o da Solana conceder\xE1 ao propriet\xE1rio de uma conta acesso para gravar seus dados ou transferir lamports. Ao criar uma conta, \xE9 necess\xE1rio alocar previamente um espa\xE7o de armazenamento fixo em bytes ("),v=n("code",null,"space",-1),S=s(") e lamports suficientes para cobrir o aluguel. O "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},x=s("aluguel"),K=s(" \xE9 um custo incorrido para manter as contas ativas na rede Solana."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.e2d854ed.js b/docs/.vuepress/dist/assets/accounts.html.b3afb2f5.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.e2d854ed.js rename to docs/.vuepress/dist/assets/accounts.html.b3afb2f5.js index 464429554..c4f4b3f34 100644 --- a/docs/.vuepress/dist/assets/accounts.html.e2d854ed.js +++ b/docs/.vuepress/dist/assets/accounts.html.b3afb2f5.js @@ -1,4 +1,4 @@ -import{_ as l,r as o,o as u,c as r,a,b as s,w as c,F as i,d as n,e as t}from"./app.07ce7a66.js";const k={},b=a("h1",{id:"accounts-account-lar",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#accounts-account-lar","aria-hidden":"true"},"#"),n(" Accounts (Account\u2019lar)")],-1),m=a("h2",{id:"how-to-create-a-system-account-system-account-olusturma",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#how-to-create-a-system-account-system-account-olusturma","aria-hidden":"true"},"#"),n(" How to create a system account (System account olu\u015Fturma)")],-1),d={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},g=n("Sistem Program\u0131n\u0131"),h=n("n sahip oldu\u011Fu bir account olu\u015Fturun. Solana \xE7al\u0131\u015Fma zaman\u0131, bir account'\u0131n sahibine, verilerine yazma veya lamp ba\u011Flant\u0131lar\u0131n\u0131 aktarma eri\u015Fimi verir. Bir account olu\u015Ftururken, bayt ("),f=a("code",null,"space",-1),y=n(") cinsinden sabit bir depolama alan\u0131 ve rent\u2019i kar\u015F\u0131lamak i\xE7in yeterli lamp pay\u0131 \xF6nceden tahsis etmeliyiz. "),_={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},w=n("Rent"),v=n(", Solana'da account'lar\u0131 canl\u0131 tutmak i\xE7in yap\u0131lan bir maliyettir."),P=t(`
const createAccountParams = {
+import{_ as l,r as o,o as u,c as r,a,b as s,w as c,F as i,d as n,e as t}from"./app.d411e3b3.js";const k={},b=a("h1",{id:"accounts-account-lar",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#accounts-account-lar","aria-hidden":"true"},"#"),n(" Accounts (Account\u2019lar)")],-1),m=a("h2",{id:"how-to-create-a-system-account-system-account-olusturma",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#how-to-create-a-system-account-system-account-olusturma","aria-hidden":"true"},"#"),n(" How to create a system account (System account olu\u015Fturma)")],-1),d={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},g=n("Sistem Program\u0131n\u0131"),h=n("n sahip oldu\u011Fu bir account olu\u015Fturun. Solana \xE7al\u0131\u015Fma zaman\u0131, bir account'\u0131n sahibine, verilerine yazma veya lamp ba\u011Flant\u0131lar\u0131n\u0131 aktarma eri\u015Fimi verir. Bir account olu\u015Ftururken, bayt ("),f=a("code",null,"space",-1),y=n(") cinsinden sabit bir depolama alan\u0131 ve rent\u2019i kar\u015F\u0131lamak i\xE7in yeterli lamp pay\u0131 \xF6nceden tahsis etmeliyiz. "),_={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},w=n("Rent"),v=n(", Solana'da account'lar\u0131 canl\u0131 tutmak i\xE7in yap\u0131lan bir maliyettir."),P=t(`
const createAccountParams = {
   fromPubkey: fromPubkey.publicKey,
   newAccountPubkey: newAccountPubkey.publicKey,
   lamports: rentExemptionAmount,
diff --git a/docs/.vuepress/dist/assets/accounts.html.4965c1bb.js b/docs/.vuepress/dist/assets/accounts.html.bddee016.js
similarity index 98%
rename from docs/.vuepress/dist/assets/accounts.html.4965c1bb.js
rename to docs/.vuepress/dist/assets/accounts.html.bddee016.js
index b1af06879..4b36643d3 100644
--- a/docs/.vuepress/dist/assets/accounts.html.4965c1bb.js
+++ b/docs/.vuepress/dist/assets/accounts.html.bddee016.js
@@ -1 +1 @@
-import{_ as n,r as t,o as l,c as o,a,b as i,F as c,e as d,d as e}from"./app.07ce7a66.js";var s="/assets/account_example.5b70d95a.jpeg";const u={},m=d('

Accounts (Account\u2019lar)

Solana i\xE7indeki account\u2019lar (hesaplar), durumu saklamak i\xE7in kullan\u0131l\u0131r. Account, Solana'da geli\u015Fme yapmak i\xE7in \xF6nemli bir yap\u0131 ta\u015F\u0131d\u0131r.

Facts (\xD6zet Bilgiler)

Bilgi tablosu

  • Account\u2019lar veri depolamak i\xE7in kullan\u0131l\u0131r.
  • Her account'\u0131n benzersiz bir adresi vard\u0131r.
  • Account\u2019lar\u0131n maksimum boyutu 10 MB (10 Mega Bayt)\u2019d\u0131r.
  • PDA account'lar\u0131n\u0131n maksimum boyutu 10 KB (10 Kilo Bayt)\u2019d\u0131r.
  • PDA account'lar\u0131, bir program ad\u0131na imzalamak i\xE7in kullan\u0131labilir.
  • Account boyutu olu\u015Fturma s\u0131ras\u0131nda sabitlenir, ancak realloc kullan\u0131larak ayarlanabilir.
  • Account veri depolamas\u0131 rent ile \xF6denir.
  • Varsay\u0131lan account sahibi Sistem Program\u0131d\u0131r.

Deep Dive (Derinlemesine Bak\u0131\u015F)

Account Model (Account Modeli)

Solana'da 3 \xE7e\u015Fit account vard\u0131r:

  • Veri account'lar\u0131, verileri depolar.
  • Program account'lar\u0131, executable programlar\u0131 depolar.
  • System, Stake ve Vote gibi yerel programlar\u0131 g\xF6steren yerel account'lar bulunur.

Veri account'lar\u0131n\u0131n 2 t\xFCr\xFC bulunur:

  • Sisteme ait account'lar
  • PDA (Program Derived Address/Programdan T\xFCretilmi\u015F Adres) account'lar\u0131

Her account'\u0131n bir adresi (genellikle bir public key) ve bir sahibi (bir program account'\u0131n\u0131n adresi) vard\u0131r. Bir account'\u0131n depolad\u0131\u011F\u0131 tam alan listesi a\u015Fa\u011F\u0131da bulunur.

AlanA\xE7\u0131klamas\u0131
lamportsHesaba ait "lamport" say\u0131s\u0131
ownerAccount sahibi
executableHesab\u0131n talimatlar\u0131 i\u015Fleyip i\u015Fleyemeyece\u011Fi bilgisi
dataAccount taraf\u0131ndan depolanan ham veri byte array
rent_epochBu account'\u0131n rent borcu olaca\u011F\u0131 bir sonraki epoch

Birka\xE7 \xF6nemli sahiplik kural\u0131 vard\u0131r:

  • Yaln\u0131zca bir data account'\u0131n\u0131n sahibi, lamports verilerini ve bor\xE7 bilgisini de\u011Fi\u015Ftirebilir.
  • Herhangi birinin bir data account'\u0131na Lamports kredisi vermesine izin verilir.
  • Hesab\u0131n verileri s\u0131f\u0131rlan\u0131rsa, bir account'\u0131n sahibi yeni bir sahip atayabilir.
  • Program account'lar\u0131 durumu saklamaz.

\xD6rne\u011Fin, bir sayac\u0131 art\u0131rman\u0131za izin veren bir saya\xE7 program\u0131n\u0131z varsa, biri program kodunu depolamak i\xE7in di\u011Feri de sayac\u0131 depolamak i\xE7in iki account olu\u015Fturman\u0131z gerekir.

Bir account'\u0131n silinmesini \xF6nlemek i\xE7in rent \xF6demeniz gerekir.

Rent

Hesaplarda veri depolaman\u0131n bak\u0131m\u0131 SOL gerektirir ve rent(kira) ile finanse edilir. Bir account'ta en az 2 y\u0131ll\u0131k rent \xF6demesine e\u015Fde\u011Fer bir bakiyeniz varsa, account'\u0131n\u0131z rent \xF6demekten muaf tutulacakt\u0131r. Hesab\u0131 kapatarak ve Lamport'lar\u0131 c\xFCzdan\u0131n\u0131za geri g\xF6ndererek rent\u2019i geri alabilirsiniz.

Rent iki farkl\u0131 zamanlamada \xF6denir:

  1. Bir i\u015Flem taraf\u0131ndan referans al\u0131nd\u0131\u011F\u0131nda
  2. Her bir epoch(d\xF6ng\xFC)\u2019da

Hesaplar taraf\u0131ndan toplanan rent\u2019in belirli bir b\xF6l\xFCm\xFC yok edilirken geri kalan\u0131 her slotun sonunda vote account'lar\u0131na da\u011F\u0131t\u0131l\u0131r.

Hesab\u0131n rent \xF6demesi i\xE7in yeterli olmamas\u0131 durumunda, account serbest b\u0131rak\u0131l\u0131r ve veriler silinir.

Yeni account'lar\u0131n rent \xF6demesinden muaf olmas\u0131 gerekti\u011Fini de belirtmek \xF6nemlidir.

Other Resources (Di\u011Fer Kaynaklar)

',26),p={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},h=e("Solana Hesap Modeli"),b={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},k=e("Resmi Dok\xFCmantasyon"),g={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},_=e("Pencilflip Account Threadi"),f=a("h3",{id:"referans",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#referans","aria-hidden":"true"},"#"),e(" Referans")],-1),y=e("Bu bilgiler Pencilflip taraf\u0131ndan yaz\u0131ld\u0131, kendisini "),v={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},z=e("Twitter"),A=e("\u2019dan takip edebilirsiniz.");function B(x,H){const r=t("ExternalLinkIcon");return l(),o(c,null,[m,a("ul",null,[a("li",null,[a("a",p,[h,i(r)])]),a("li",null,[a("a",b,[k,i(r)])]),a("li",null,[a("a",g,[_,i(r)])])]),f,a("p",null,[y,a("a",v,[z,i(r)]),A])],64)}var S=n(u,[["render",B]]);export{S as default}; +import{_ as n,r as t,o as l,c as o,a,b as i,F as c,e as d,d as e}from"./app.d411e3b3.js";var s="/assets/account_example.5b70d95a.jpeg";const u={},m=d('

Accounts (Account\u2019lar)

Solana i\xE7indeki account\u2019lar (hesaplar), durumu saklamak i\xE7in kullan\u0131l\u0131r. Account, Solana'da geli\u015Fme yapmak i\xE7in \xF6nemli bir yap\u0131 ta\u015F\u0131d\u0131r.

Facts (\xD6zet Bilgiler)

Bilgi tablosu

  • Account\u2019lar veri depolamak i\xE7in kullan\u0131l\u0131r.
  • Her account'\u0131n benzersiz bir adresi vard\u0131r.
  • Account\u2019lar\u0131n maksimum boyutu 10 MB (10 Mega Bayt)\u2019d\u0131r.
  • PDA account'lar\u0131n\u0131n maksimum boyutu 10 KB (10 Kilo Bayt)\u2019d\u0131r.
  • PDA account'lar\u0131, bir program ad\u0131na imzalamak i\xE7in kullan\u0131labilir.
  • Account boyutu olu\u015Fturma s\u0131ras\u0131nda sabitlenir, ancak realloc kullan\u0131larak ayarlanabilir.
  • Account veri depolamas\u0131 rent ile \xF6denir.
  • Varsay\u0131lan account sahibi Sistem Program\u0131d\u0131r.

Deep Dive (Derinlemesine Bak\u0131\u015F)

Account Model (Account Modeli)

Solana'da 3 \xE7e\u015Fit account vard\u0131r:

  • Veri account'lar\u0131, verileri depolar.
  • Program account'lar\u0131, executable programlar\u0131 depolar.
  • System, Stake ve Vote gibi yerel programlar\u0131 g\xF6steren yerel account'lar bulunur.

Veri account'lar\u0131n\u0131n 2 t\xFCr\xFC bulunur:

  • Sisteme ait account'lar
  • PDA (Program Derived Address/Programdan T\xFCretilmi\u015F Adres) account'lar\u0131

Her account'\u0131n bir adresi (genellikle bir public key) ve bir sahibi (bir program account'\u0131n\u0131n adresi) vard\u0131r. Bir account'\u0131n depolad\u0131\u011F\u0131 tam alan listesi a\u015Fa\u011F\u0131da bulunur.

AlanA\xE7\u0131klamas\u0131
lamportsHesaba ait "lamport" say\u0131s\u0131
ownerAccount sahibi
executableHesab\u0131n talimatlar\u0131 i\u015Fleyip i\u015Fleyemeyece\u011Fi bilgisi
dataAccount taraf\u0131ndan depolanan ham veri byte array
rent_epochBu account'\u0131n rent borcu olaca\u011F\u0131 bir sonraki epoch

Birka\xE7 \xF6nemli sahiplik kural\u0131 vard\u0131r:

  • Yaln\u0131zca bir data account'\u0131n\u0131n sahibi, lamports verilerini ve bor\xE7 bilgisini de\u011Fi\u015Ftirebilir.
  • Herhangi birinin bir data account'\u0131na Lamports kredisi vermesine izin verilir.
  • Hesab\u0131n verileri s\u0131f\u0131rlan\u0131rsa, bir account'\u0131n sahibi yeni bir sahip atayabilir.
  • Program account'lar\u0131 durumu saklamaz.

\xD6rne\u011Fin, bir sayac\u0131 art\u0131rman\u0131za izin veren bir saya\xE7 program\u0131n\u0131z varsa, biri program kodunu depolamak i\xE7in di\u011Feri de sayac\u0131 depolamak i\xE7in iki account olu\u015Fturman\u0131z gerekir.

Bir account'\u0131n silinmesini \xF6nlemek i\xE7in rent \xF6demeniz gerekir.

Rent

Hesaplarda veri depolaman\u0131n bak\u0131m\u0131 SOL gerektirir ve rent(kira) ile finanse edilir. Bir account'ta en az 2 y\u0131ll\u0131k rent \xF6demesine e\u015Fde\u011Fer bir bakiyeniz varsa, account'\u0131n\u0131z rent \xF6demekten muaf tutulacakt\u0131r. Hesab\u0131 kapatarak ve Lamport'lar\u0131 c\xFCzdan\u0131n\u0131za geri g\xF6ndererek rent\u2019i geri alabilirsiniz.

Rent iki farkl\u0131 zamanlamada \xF6denir:

  1. Bir i\u015Flem taraf\u0131ndan referans al\u0131nd\u0131\u011F\u0131nda
  2. Her bir epoch(d\xF6ng\xFC)\u2019da

Hesaplar taraf\u0131ndan toplanan rent\u2019in belirli bir b\xF6l\xFCm\xFC yok edilirken geri kalan\u0131 her slotun sonunda vote account'lar\u0131na da\u011F\u0131t\u0131l\u0131r.

Hesab\u0131n rent \xF6demesi i\xE7in yeterli olmamas\u0131 durumunda, account serbest b\u0131rak\u0131l\u0131r ve veriler silinir.

Yeni account'lar\u0131n rent \xF6demesinden muaf olmas\u0131 gerekti\u011Fini de belirtmek \xF6nemlidir.

Other Resources (Di\u011Fer Kaynaklar)

',26),p={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},h=e("Solana Hesap Modeli"),b={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},k=e("Resmi Dok\xFCmantasyon"),g={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},_=e("Pencilflip Account Threadi"),f=a("h3",{id:"referans",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#referans","aria-hidden":"true"},"#"),e(" Referans")],-1),y=e("Bu bilgiler Pencilflip taraf\u0131ndan yaz\u0131ld\u0131, kendisini "),v={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},z=e("Twitter"),A=e("\u2019dan takip edebilirsiniz.");function B(x,H){const r=t("ExternalLinkIcon");return l(),o(c,null,[m,a("ul",null,[a("li",null,[a("a",p,[h,i(r)])]),a("li",null,[a("a",b,[k,i(r)])]),a("li",null,[a("a",g,[_,i(r)])])]),f,a("p",null,[y,a("a",v,[z,i(r)]),A])],64)}var S=n(u,[["render",B]]);export{S as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.369da584.js b/docs/.vuepress/dist/assets/accounts.html.c201028c.js similarity index 98% rename from docs/.vuepress/dist/assets/accounts.html.369da584.js rename to docs/.vuepress/dist/assets/accounts.html.c201028c.js index 82d388be4..f1ac24b51 100644 --- a/docs/.vuepress/dist/assets/accounts.html.369da584.js +++ b/docs/.vuepress/dist/assets/accounts.html.c201028c.js @@ -1 +1 @@ -import{_ as s,r,o,c as a,a as e,b as i,F as c,d as n,e as d}from"./app.07ce7a66.js";var l="/assets/account_example.5b70d95a.jpeg";const h={},u=e("h1",{id:"accounts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),n(" Accounts")],-1),m=e("p",null,"Accounts innerhalb von Solana werden zum Speichern des Zustands verwendet. Sie sind ein wesentlicher Baustein f\xFCr die Entwicklung auf Solana.",-1),p=e("h2",{id:"fakten",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fakten","aria-hidden":"true"},"#"),n(" Fakten")],-1),_={class:"custom-container tip"},g=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,"Accounts werden genutzt um Daten zu speichern",-1),b=e("li",null,"Jedes Konto hat eine eindeutige (einmalig vorhandene) Adresse",-1),A=e("li",null,"Accounts haben eine maximale Gr\xF6\xDFe von 10MB (10 Mega Bytes)",-1),z=e("li",null,"PDA Accounts haben eine maximale Gr\xF6\xDFe von 10KB (10 Kilo Bytes)",-1),w=e("li",null,"PDA Accounts k\xF6nnen verwendet werden, um im Namen eines Programms zu signieren",-1),k=n("Accountgr\xF6\xDFen sind bei erstellung festgelegt, k\xF6nnen aber mit "),v={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},D=n("realloc"),S=n(" angepasst werden"),x=e("li",null,'F\xFCr Accountsdatenspeicher wird "Miete" gezahlt (in SOL)',-1),K=e("li",null,"Der Standard-Accounts-Besitzer ist das Systemprogramm",-1),M=d('

Deep Dive

Accounts Model

Auf Solana gibt es 3 Arten von Accounts:

  • Daten Accounts speichern Daten
  • Program Accounts speichern ausf\xFChrbare Programme
  • Native Accounts die native Programme auf Solana angeben (wie z.B. System, Stake, und Vote )

Es gibt 2 Arten von Daten Accounts:

  • Systemeigene Accounts
  • PDA-Accounts (Program Derived Address).

Jedes Konto hat eine Adresse (normalerweise einen \xF6ffentlichen Schl\xFCssel) und einen Besitzer (Adresse eines Programmkontos). Die vollst\xE4ndige Feldliste speichert ein Konto ist unten zu finden.

FeldBeschreibung
lamportsDie Anzahl der Lamports im Besitz dieses Kontos
ownerDer Programmbesitzer dieses Kontos
executableOb dieses Konto Anweisungen verarbeiten kann
dataDas Rohdaten-Byte-Array, das von diesem Konto gespeichert wird
rent_epochDie n\xE4chste Epoche, in der dieses Konto Miete schuldet

Es gibt ein paar wichtige Eigentumsregeln:

  • Nur der Besitzer eines Datenkontos kann seine Daten \xE4ndern und Lamports belasten
  • Jeder darf Lamports auf ein Datenkonto gutschreiben
  • Der Inhaber eines Kontos kann einen neuen Inhaber zuweisen, wenn die Daten des Kontos auf Null gesetzt werden

ProgrammAccounts speichern keinen Status.

Wenn Du beispielsweise ein Z\xE4hlerprogramm hast, mit dem Du einen Z\xE4hler erh\xF6hen kannst, musst Du zwei Accounts erstellen - ein Konto zum Speichern des Programmcodes und eines zum Speichern der Z\xE4hler.

Um zu verhindern, dass ein Konto gel\xF6scht wird, m\xFCssen Sie Miete zahlen.

Miete

Daten auf Accounts zu speichern kostet SOL - diese Zahlung wird Miete genannt. Wenn du eine Mindesteinzahlung von 2 Jahren Miete t\xE4tigst, wird dein Account von zuk\xFCnftiger Miete befreit. Du kannst vorausgezahlte Miete durch schlie\xDFen von Accounts zur\xFCck in deine Wallet bekommen.

Die Miete wird zu zwei verschiedenen Zeitpunkten gezahlt:

  1. Wenn es von einer Transaktion referenziert wird
  2. Einmal pro Epoche

Ein Teil der \xFCber Accounts eingezogenen Miete wird vernichtet, w\xE4hrend der Rest verteilt wird Accounts am Ende jedes Slots zu bestimmen.

Reicht das Konto nicht aus, um die Miete zu zahlen, wird das Konto aufgel\xF6st und die Daten ENTFERNT.

Wichtig ist auch zu beachten, dass NeuAccounts mietfrei sein m\xFCssen.

Andere Ressourcen

',22),B={href:"https://solana.wiki/zh-cn/docs/de/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},E=n("Solana Accounts Model"),P={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},N=n("Official Documentation"),y={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},F=n("pencilflip account thread"),L=e("h3",{id:"credit",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),n(" Credit")],-1),T=n("Dieses Kernkonzept wird Pencilflip zugeschrieben. "),Z={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},R=n("Folgt ihm auf Twitter"),V=n(".");function W(I,J){const t=r("ExternalLinkIcon");return o(),a(c,null,[u,m,p,e("div",_,[g,e("ul",null,[f,b,A,z,w,e("li",null,[k,e("a",v,[D,i(t)]),S]),x,K])]),M,e("ul",null,[e("li",null,[e("a",B,[E,i(t)])]),e("li",null,[e("a",P,[N,i(t)])]),e("li",null,[e("a",y,[F,i(t)])])]),L,e("p",null,[T,e("a",Z,[R,i(t)]),V])],64)}var j=s(h,[["render",W]]);export{j as default}; +import{_ as s,r,o,c as a,a as e,b as i,F as c,d as n,e as d}from"./app.d411e3b3.js";var l="/assets/account_example.5b70d95a.jpeg";const h={},u=e("h1",{id:"accounts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),n(" Accounts")],-1),m=e("p",null,"Accounts innerhalb von Solana werden zum Speichern des Zustands verwendet. Sie sind ein wesentlicher Baustein f\xFCr die Entwicklung auf Solana.",-1),p=e("h2",{id:"fakten",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fakten","aria-hidden":"true"},"#"),n(" Fakten")],-1),_={class:"custom-container tip"},g=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,"Accounts werden genutzt um Daten zu speichern",-1),b=e("li",null,"Jedes Konto hat eine eindeutige (einmalig vorhandene) Adresse",-1),A=e("li",null,"Accounts haben eine maximale Gr\xF6\xDFe von 10MB (10 Mega Bytes)",-1),z=e("li",null,"PDA Accounts haben eine maximale Gr\xF6\xDFe von 10KB (10 Kilo Bytes)",-1),w=e("li",null,"PDA Accounts k\xF6nnen verwendet werden, um im Namen eines Programms zu signieren",-1),k=n("Accountgr\xF6\xDFen sind bei erstellung festgelegt, k\xF6nnen aber mit "),v={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},D=n("realloc"),S=n(" angepasst werden"),x=e("li",null,'F\xFCr Accountsdatenspeicher wird "Miete" gezahlt (in SOL)',-1),K=e("li",null,"Der Standard-Accounts-Besitzer ist das Systemprogramm",-1),M=d('

Deep Dive

Accounts Model

Auf Solana gibt es 3 Arten von Accounts:

  • Daten Accounts speichern Daten
  • Program Accounts speichern ausf\xFChrbare Programme
  • Native Accounts die native Programme auf Solana angeben (wie z.B. System, Stake, und Vote )

Es gibt 2 Arten von Daten Accounts:

  • Systemeigene Accounts
  • PDA-Accounts (Program Derived Address).

Jedes Konto hat eine Adresse (normalerweise einen \xF6ffentlichen Schl\xFCssel) und einen Besitzer (Adresse eines Programmkontos). Die vollst\xE4ndige Feldliste speichert ein Konto ist unten zu finden.

FeldBeschreibung
lamportsDie Anzahl der Lamports im Besitz dieses Kontos
ownerDer Programmbesitzer dieses Kontos
executableOb dieses Konto Anweisungen verarbeiten kann
dataDas Rohdaten-Byte-Array, das von diesem Konto gespeichert wird
rent_epochDie n\xE4chste Epoche, in der dieses Konto Miete schuldet

Es gibt ein paar wichtige Eigentumsregeln:

  • Nur der Besitzer eines Datenkontos kann seine Daten \xE4ndern und Lamports belasten
  • Jeder darf Lamports auf ein Datenkonto gutschreiben
  • Der Inhaber eines Kontos kann einen neuen Inhaber zuweisen, wenn die Daten des Kontos auf Null gesetzt werden

ProgrammAccounts speichern keinen Status.

Wenn Du beispielsweise ein Z\xE4hlerprogramm hast, mit dem Du einen Z\xE4hler erh\xF6hen kannst, musst Du zwei Accounts erstellen - ein Konto zum Speichern des Programmcodes und eines zum Speichern der Z\xE4hler.

Um zu verhindern, dass ein Konto gel\xF6scht wird, m\xFCssen Sie Miete zahlen.

Miete

Daten auf Accounts zu speichern kostet SOL - diese Zahlung wird Miete genannt. Wenn du eine Mindesteinzahlung von 2 Jahren Miete t\xE4tigst, wird dein Account von zuk\xFCnftiger Miete befreit. Du kannst vorausgezahlte Miete durch schlie\xDFen von Accounts zur\xFCck in deine Wallet bekommen.

Die Miete wird zu zwei verschiedenen Zeitpunkten gezahlt:

  1. Wenn es von einer Transaktion referenziert wird
  2. Einmal pro Epoche

Ein Teil der \xFCber Accounts eingezogenen Miete wird vernichtet, w\xE4hrend der Rest verteilt wird Accounts am Ende jedes Slots zu bestimmen.

Reicht das Konto nicht aus, um die Miete zu zahlen, wird das Konto aufgel\xF6st und die Daten ENTFERNT.

Wichtig ist auch zu beachten, dass NeuAccounts mietfrei sein m\xFCssen.

Andere Ressourcen

',22),B={href:"https://solana.wiki/zh-cn/docs/de/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},E=n("Solana Accounts Model"),P={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},N=n("Official Documentation"),y={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},F=n("pencilflip account thread"),L=e("h3",{id:"credit",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),n(" Credit")],-1),T=n("Dieses Kernkonzept wird Pencilflip zugeschrieben. "),Z={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},R=n("Folgt ihm auf Twitter"),V=n(".");function W(I,J){const t=r("ExternalLinkIcon");return o(),a(c,null,[u,m,p,e("div",_,[g,e("ul",null,[f,b,A,z,w,e("li",null,[k,e("a",v,[D,i(t)]),S]),x,K])]),M,e("ul",null,[e("li",null,[e("a",B,[E,i(t)])]),e("li",null,[e("a",P,[N,i(t)])]),e("li",null,[e("a",y,[F,i(t)])])]),L,e("p",null,[T,e("a",Z,[R,i(t)]),V])],64)}var j=s(h,[["render",W]]);export{j as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.fedf3c54.js b/docs/.vuepress/dist/assets/accounts.html.c850f29d.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.fedf3c54.js rename to docs/.vuepress/dist/assets/accounts.html.c850f29d.js index 771d1318f..c87960700 100644 --- a/docs/.vuepress/dist/assets/accounts.html.fedf3c54.js +++ b/docs/.vuepress/dist/assets/accounts.html.c850f29d.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9","aria-hidden":"true"},"#"),s(" \u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9")],-1),g={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},w=s("System Program"),h=s("\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002Solana\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u306B\u3001\u305D\u306E\u30C7\u30FC\u30BF\u3078\u306E\u66F8\u304D\u8FBC\u307F\u30A2\u30AF\u30BB\u30B9\u307E\u305F\u306F\u30E9\u30F3\u30DD\u30FC\u30C8\u306E\u8EE2\u9001\u30A2\u30AF\u30BB\u30B9\u3092\u8A31\u53EF\u3057\u307E\u3059\u3002 \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u3068\u304D\u3001\u56FA\u5B9A\u30D0\u30A4\u30C8\u30B9\u30C8\u30EC\u30FC\u30B8 ("),P=n("code",null,"space",-1),v=s(") \u3068\u3001\u5BB6\u8CC3\u3092\u30AB\u30D0\u30FC\u3059\u308B\u306E\u306B\u5341\u5206\u306A\u30E9\u30F3\u30DD\u30FC\u30C8\u3092\u4E8B\u524D\u306B\u5272\u308A\u5F53\u3066\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 "),S={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},A=s("Rent"),x=s("\u306F\u3001Solana \u3067\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u7DAD\u6301\u3059\u308B\u305F\u3081\u306B\u767A\u751F\u3059\u308B\u8CBB\u7528\u3067\u3059"),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9","aria-hidden":"true"},"#"),s(" \u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9")],-1),g={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},w=s("System Program"),h=s("\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3057\u307E\u3059\u3002Solana\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u306B\u3001\u305D\u306E\u30C7\u30FC\u30BF\u3078\u306E\u66F8\u304D\u8FBC\u307F\u30A2\u30AF\u30BB\u30B9\u307E\u305F\u306F\u30E9\u30F3\u30DD\u30FC\u30C8\u306E\u8EE2\u9001\u30A2\u30AF\u30BB\u30B9\u3092\u8A31\u53EF\u3057\u307E\u3059\u3002 \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u3068\u304D\u3001\u56FA\u5B9A\u30D0\u30A4\u30C8\u30B9\u30C8\u30EC\u30FC\u30B8 ("),P=n("code",null,"space",-1),v=s(") \u3068\u3001\u5BB6\u8CC3\u3092\u30AB\u30D0\u30FC\u3059\u308B\u306E\u306B\u5341\u5206\u306A\u30E9\u30F3\u30DD\u30FC\u30C8\u3092\u4E8B\u524D\u306B\u5272\u308A\u5F53\u3066\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059 "),S={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},A=s("Rent"),x=s("\u306F\u3001Solana \u3067\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u7DAD\u6301\u3059\u308B\u305F\u3081\u306B\u767A\u751F\u3059\u308B\u8CBB\u7528\u3067\u3059"),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.629a8060.js b/docs/.vuepress/dist/assets/accounts.html.ccac86d6.js similarity index 98% rename from docs/.vuepress/dist/assets/accounts.html.629a8060.js rename to docs/.vuepress/dist/assets/accounts.html.ccac86d6.js index d43d88ba9..490ec6b4a 100644 --- a/docs/.vuepress/dist/assets/accounts.html.629a8060.js +++ b/docs/.vuepress/dist/assets/accounts.html.ccac86d6.js @@ -1 +1 @@ -import{_ as n,r,o as c,c as s,a as e,b as o,F as i,d as t,e as d}from"./app.07ce7a66.js";var l="/assets/account_example.ee1160f0.jpeg";const h={},u=e("h1",{id:"accounts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),t(" Accounts")],-1),p=e("p",null,"Accounts within Solana are used to store state. They are an essential building block for developing on Solana.",-1),_=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),m={class:"custom-container tip"},f=e("p",{class:"custom-container-title"},"Fact Sheet",-1),b=e("li",null,"Accounts are used to store data",-1),g=e("li",null,"Each account has a unique address",-1),y=e("li",null,"Accounts have a max size of 10MB (10 Mega Bytes)",-1),w=e("li",null,"PDA accounts have a max size of 10KB (10 Kilo Bytes)",-1),x=e("li",null,"PDA accounts can be used to sign on behalf of a program",-1),v=t("Accounts size are fixed at creation time, but can be adjusted using "),k={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},A=t("realloc"),S=e("li",null,"Account data storage is paid with rent",-1),T=e("li",null,"Default account owner is the System Program",-1),D=d('

Deep Dive

Account Model

There are 3 kinds of accounts on Solana:

  • Data accounts store data
  • Program accounts store executable programs
  • Native accounts that indicate native programs on Solana such as System, Stake, and Vote

Within data accounts, there are 2 types:

  • System owned accounts
  • PDA (Program Derived Address) accounts

Each account has an address (usually a public key) and an owner (address of a program account). The full field list an account stores is found below.

FieldDescription
lamportsThe number of lamports owned by this account
ownerThe program owner of this account
executableWhether this account can process instructions
dataThe raw data byte array stored by this account
rent_epochThe next epoch that this account will owe rent

There are a few important ownership rules:

  • Only a data account's owner can modify its data and debit lamports
  • Anyone is allowed to credit lamports to a data account
  • The owner of an account may assign a new owner if the account's data is zeroed out

Program accounts do not store state.

For example, if you have a counter program that lets you increment a counter, you must create two accounts, one account to store the program's code, and one to store the counter.

To prevent an account from being deleted, you must pay rent.

Rent

Storing data on accounts costs SOL to maintain, and it is funded by what is called rent. If you maintain a minimum balance equivalent to 2 years of rent payments in an account, your account will be exempt from paying rent. You can retrieve rent by closing the account and sending the lamports back to your wallet.

Rent is paid during two different timings:

  1. When referenced by a transaction
  2. Once an epoch

A percentage of rent collected by accounts is destroyed, while the rest is distributed to vote accounts at the end of every slot.

If the account does not have enough to pay rent, the account will be deallocated and the data removed.

It is also important to note that new accounts must be rent exempt.

Other Resources

',22),P={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},B=t("Solana Account Model"),F={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},z=t("Official Documentation"),E={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},I=t("pencilflip account thread"),N=e("h3",{id:"credit",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),t(" Credit")],-1),O=t("This core concept is credited to Pencilflip. "),V={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},M=t("Follow him on Twitter"),L=t(".");function R(W,j){const a=r("ExternalLinkIcon");return c(),s(i,null,[u,p,_,e("div",m,[f,e("ul",null,[b,g,y,w,x,e("li",null,[v,e("a",k,[A,o(a)])]),S,T])]),D,e("ul",null,[e("li",null,[e("a",P,[B,o(a)])]),e("li",null,[e("a",F,[z,o(a)])]),e("li",null,[e("a",E,[I,o(a)])])]),N,e("p",null,[O,e("a",V,[M,o(a)]),L])],64)}var C=n(h,[["render",R]]);export{C as default}; +import{_ as n,r,o as c,c as s,a as e,b as o,F as i,d as t,e as d}from"./app.d411e3b3.js";var l="/assets/account_example.ee1160f0.jpeg";const h={},u=e("h1",{id:"accounts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),t(" Accounts")],-1),p=e("p",null,"Accounts within Solana are used to store state. They are an essential building block for developing on Solana.",-1),_=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),m={class:"custom-container tip"},f=e("p",{class:"custom-container-title"},"Fact Sheet",-1),b=e("li",null,"Accounts are used to store data",-1),g=e("li",null,"Each account has a unique address",-1),y=e("li",null,"Accounts have a max size of 10MB (10 Mega Bytes)",-1),w=e("li",null,"PDA accounts have a max size of 10KB (10 Kilo Bytes)",-1),x=e("li",null,"PDA accounts can be used to sign on behalf of a program",-1),v=t("Accounts size are fixed at creation time, but can be adjusted using "),k={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},A=t("realloc"),S=e("li",null,"Account data storage is paid with rent",-1),T=e("li",null,"Default account owner is the System Program",-1),D=d('

Deep Dive

Account Model

There are 3 kinds of accounts on Solana:

  • Data accounts store data
  • Program accounts store executable programs
  • Native accounts that indicate native programs on Solana such as System, Stake, and Vote

Within data accounts, there are 2 types:

  • System owned accounts
  • PDA (Program Derived Address) accounts

Each account has an address (usually a public key) and an owner (address of a program account). The full field list an account stores is found below.

FieldDescription
lamportsThe number of lamports owned by this account
ownerThe program owner of this account
executableWhether this account can process instructions
dataThe raw data byte array stored by this account
rent_epochThe next epoch that this account will owe rent

There are a few important ownership rules:

  • Only a data account's owner can modify its data and debit lamports
  • Anyone is allowed to credit lamports to a data account
  • The owner of an account may assign a new owner if the account's data is zeroed out

Program accounts do not store state.

For example, if you have a counter program that lets you increment a counter, you must create two accounts, one account to store the program's code, and one to store the counter.

To prevent an account from being deleted, you must pay rent.

Rent

Storing data on accounts costs SOL to maintain, and it is funded by what is called rent. If you maintain a minimum balance equivalent to 2 years of rent payments in an account, your account will be exempt from paying rent. You can retrieve rent by closing the account and sending the lamports back to your wallet.

Rent is paid during two different timings:

  1. When referenced by a transaction
  2. Once an epoch

A percentage of rent collected by accounts is destroyed, while the rest is distributed to vote accounts at the end of every slot.

If the account does not have enough to pay rent, the account will be deallocated and the data removed.

It is also important to note that new accounts must be rent exempt.

Other Resources

',22),P={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},B=t("Solana Account Model"),F={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},z=t("Official Documentation"),E={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},I=t("pencilflip account thread"),N=e("h3",{id:"credit",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),t(" Credit")],-1),O=t("This core concept is credited to Pencilflip. "),V={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},M=t("Follow him on Twitter"),L=t(".");function R(W,j){const a=r("ExternalLinkIcon");return c(),s(i,null,[u,p,_,e("div",m,[f,e("ul",null,[b,g,y,w,x,e("li",null,[v,e("a",k,[A,o(a)])]),S,T])]),D,e("ul",null,[e("li",null,[e("a",P,[B,o(a)])]),e("li",null,[e("a",F,[z,o(a)])]),e("li",null,[e("a",E,[I,o(a)])])]),N,e("p",null,[O,e("a",V,[M,o(a)]),L])],64)}var C=n(h,[["render",R]]);export{C as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.9bb37cd5.js b/docs/.vuepress/dist/assets/accounts.html.dd8624e8.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.9bb37cd5.js rename to docs/.vuepress/dist/assets/accounts.html.dd8624e8.js index 0d8f8e713..f8a4a1c3d 100644 --- a/docs/.vuepress/dist/assets/accounts.html.9bb37cd5.js +++ b/docs/.vuepress/dist/assets/accounts.html.dd8624e8.js @@ -1,4 +1,4 @@ -import{_ as r,r as p,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"\u8CEC\u6236",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CEC\u6236","aria-hidden":"true"},"#"),s(" \u8CEC\u6236")],-1),f=n("h2",{id:"\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236")],-1),g=s("\u5275\u5EFA\u4E00\u500B\u7531"),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("\u7CFB\u7D71\u7A0B\u5E8F"),P=s(" \u64C1\u6709\u7684\u8CEC\u6236\u3002Solana\u904B\u884C\u6642\u5C07\u6388\u4E88\u8CEC\u6236\u7684\u6240\u6709\u8005\u5C0D\u5176\u6578\u64DA\u7684\u5BEB\u5165\u6B0A\u9650\u6216\u8F49\u79FBLamports\u7684\u8A2A\u554F\u6B0A\u9650\u3002\u5728\u5275\u5EFA\u8CEC\u6236\u6642\uFF0C\u6211\u5011\u9700\u8981\u9810\u5148\u5206\u914D\u4E00\u5B9A\u5927\u5C0F\u7684\u5B58\u5132\u7A7A\u9593\uFF08space\uFF09\u548C\u8DB3\u5920\u7684Lamports\u4F86\u652F\u4ED8\u79DF\u91D1\u3002 "),v={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},S=s("\u79DF\u91D1\uFF08Rent\uFF09"),A=s(" \u662F\u5728Solana\u4E0A\u4FDD\u6301\u8CEC\u6236\u6D3B\u8E8D\u6240\u9700\u652F\u4ED8\u7684\u8CBB\u7528\u3002"),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as r,r as p,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"\u8CEC\u6236",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CEC\u6236","aria-hidden":"true"},"#"),s(" \u8CEC\u6236")],-1),f=n("h2",{id:"\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236")],-1),g=s("\u5275\u5EFA\u4E00\u500B\u7531"),w={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},h=s("\u7CFB\u7D71\u7A0B\u5E8F"),P=s(" \u64C1\u6709\u7684\u8CEC\u6236\u3002Solana\u904B\u884C\u6642\u5C07\u6388\u4E88\u8CEC\u6236\u7684\u6240\u6709\u8005\u5C0D\u5176\u6578\u64DA\u7684\u5BEB\u5165\u6B0A\u9650\u6216\u8F49\u79FBLamports\u7684\u8A2A\u554F\u6B0A\u9650\u3002\u5728\u5275\u5EFA\u8CEC\u6236\u6642\uFF0C\u6211\u5011\u9700\u8981\u9810\u5148\u5206\u914D\u4E00\u5B9A\u5927\u5C0F\u7684\u5B58\u5132\u7A7A\u9593\uFF08space\uFF09\u548C\u8DB3\u5920\u7684Lamports\u4F86\u652F\u4ED8\u79DF\u91D1\u3002 "),v={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},S=s("\u79DF\u91D1\uFF08Rent\uFF09"),A=s(" \u662F\u5728Solana\u4E0A\u4FDD\u6301\u8CEC\u6236\u6D3B\u8E8D\u6240\u9700\u652F\u4ED8\u7684\u8CBB\u7528\u3002"),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.339a7b82.js b/docs/.vuepress/dist/assets/accounts.html.e3030cfb.js similarity index 99% rename from docs/.vuepress/dist/assets/accounts.html.339a7b82.js rename to docs/.vuepress/dist/assets/accounts.html.e3030cfb.js index f9a2dc704..a65b153a8 100644 --- a/docs/.vuepress/dist/assets/accounts.html.339a7b82.js +++ b/docs/.vuepress/dist/assets/accounts.html.e3030cfb.js @@ -1,4 +1,4 @@ -import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.07ce7a66.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"how-to-create-a-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-system-account","aria-hidden":"true"},"#"),s(" How to create a system account")],-1),g={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},w=s("System Program"),h=s(" \uC774 \uC18C\uC720\uD558\uB294 Account \uB9CC\uB4DC\uC138\uC694. Solana runtime\uC740 acount\uC758 \uC18C\uC720\uC790\uC5D0\uAC8C \uB370\uC774\uD130\uB97C \uC4F0\uACE0 lamports\uB97C \uBCF4\uB0BC \uAD8C\uD55C\uC744 \uC904 \uAC83\uC785\uB2C8\uB2E4. Account\uB97C \uC0DD\uC131\uD560 \uB584, \uC6B0\uB9AC\uB294 \uACE0\uC815\uB41C bytes("),P=n("code",null,"space",-1),v=s(")\uB85C \uC800\uC7A5 \uACF5\uAC04\uACFC rent\uB97C \uCEE4\uBC84\uD558\uAE30 \uC704\uD55C \uCDA9\uBD84\uD55C lamports\uB97C \uBBF8\uB9AC \uD560\uB2F9\uD574\uC57C \uD569\uB2C8\uB2E4. "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},S=s("Rent"),x=s(" \uB294 Solana\uC5D0\uC11C account\uB97C \uC720\uC9C0\uD558\uAE30 \uC704\uD574 \uBC1C\uC0DD\uD558\uB294 \uBE44\uC6A9\uC785\uB2C8\uB2E4."),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as k,r as p,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as r}from"./app.d411e3b3.js";const y={},_=n("h1",{id:"accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accounts","aria-hidden":"true"},"#"),s(" Accounts")],-1),f=n("h2",{id:"how-to-create-a-system-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-system-account","aria-hidden":"true"},"#"),s(" How to create a system account")],-1),g={href:"https://docs.solana.com/developing/clients/javascript-reference#systemprogram",target:"_blank",rel:"noopener noreferrer"},w=s("System Program"),h=s(" \uC774 \uC18C\uC720\uD558\uB294 Account \uB9CC\uB4DC\uC138\uC694. Solana runtime\uC740 acount\uC758 \uC18C\uC720\uC790\uC5D0\uAC8C \uB370\uC774\uD130\uB97C \uC4F0\uACE0 lamports\uB97C \uBCF4\uB0BC \uAD8C\uD55C\uC744 \uC904 \uAC83\uC785\uB2C8\uB2E4. Account\uB97C \uC0DD\uC131\uD560 \uB584, \uC6B0\uB9AC\uB294 \uACE0\uC815\uB41C bytes("),P=n("code",null,"space",-1),v=s(")\uB85C \uC800\uC7A5 \uACF5\uAC04\uACFC rent\uB97C \uCEE4\uBC84\uD558\uAE30 \uC704\uD55C \uCDA9\uBD84\uD55C lamports\uB97C \uBBF8\uB9AC \uD560\uB2F9\uD574\uC57C \uD569\uB2C8\uB2E4. "),A={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},S=s("Rent"),x=s(" \uB294 Solana\uC5D0\uC11C account\uB97C \uC720\uC9C0\uD558\uAE30 \uC704\uD574 \uBC1C\uC0DD\uD558\uB294 \uBE44\uC6A9\uC785\uB2C8\uB2E4."),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` diff --git a/docs/.vuepress/dist/assets/accounts.html.62c56dc7.js b/docs/.vuepress/dist/assets/accounts.html.ec76ce30.js similarity index 98% rename from docs/.vuepress/dist/assets/accounts.html.62c56dc7.js rename to docs/.vuepress/dist/assets/accounts.html.ec76ce30.js index d214cd7d0..5b0f1ac56 100644 --- a/docs/.vuepress/dist/assets/accounts.html.62c56dc7.js +++ b/docs/.vuepress/dist/assets/accounts.html.ec76ce30.js @@ -1 +1 @@ -import{_ as r,r as n,o as a,c as i,a as e,b as o,F as l,d as t,e as d}from"./app.07ce7a66.js";var p="/assets/account_example.5b70d95a.jpeg";const c={},u=e("h1",{id:"comptes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#comptes","aria-hidden":"true"},"#"),t(" Comptes")],-1),m=e("p",null,"Les comptes dans Solana sont utilis\xE9s pour stocker des \xE9tats. Ils constituent un \xE9l\xE9ment essentiel pour le d\xE9veloppement sur Solana.",-1),h=e("h2",{id:"faits",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),t(" Faits")],-1),_={class:"custom-container tip"},f=e("p",{class:"custom-container-title"},"Fiche d'Information",-1),g=e("li",null,"Les comptes sont utilis\xE9s pour stocker des donn\xE9es",-1),x=e("li",null,"Chaque compte a une adresse unique",-1),b=e("li",null,"Les comptes ont une taille maximale de 10MB (10 Mega Bytes)",-1),v=e("li",null,"Les comptes des adresses d\xE9riv\xE9es d'un programme (PDA) ont une taille maximale de 10KB (10 Kilo Bytes)",-1),L=e("li",null,"Les comptes des adresses d\xE9riv\xE9es d'un programme (PDA) peuvent \xEAtre utilis\xE9s pour signer au nom d'un programme",-1),k=t("La taille des comptes est fix\xE9e au moment de leur cr\xE9ation, mais elle peut \xEAtre ajust\xE9e en utilisant la fonctionnalit\xE9 "),q={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},y=t("realloc"),S=e("li",null,"Le stockage des donn\xE9es sur un compte est pay\xE9 par une rente",-1),z=e("li",null,"Le propri\xE9taire par d\xE9faut d'un compte est le programme syst\xE8me (System Program)",-1),I=d('

Examen plus approfondi

Le mod\xE8le d'un compte

Il existe 3 types de comptes sur Solana :

  • Les comptes de donn\xE9es pour le stockage des donn\xE9es
  • Les comptes de programmes pour le stockage des programmes ex\xE9cutables
  • Les comptes natifs pour les programmes natifs de Solana tels que System, Stake, et Vote

Il existe deux types de comptes de donn\xE9es :

  • Les comptes appartenant au syst\xE8me
  • Les comptes PDA (adresse d\xE9riv\xE9e du programme)

Chaque compte a une adresse (g\xE9n\xE9ralement une cl\xE9 publique) et un propri\xE9taire (adresse d'un compte de programme). La liste compl\xE8te des champs qu'un compte stocke est \xE9num\xE9r\xE9 ci-dessous.

ChampsDescription
lamportsLe nombre de lamports appartenant \xE0 ce compte
ownerLe programme propri\xE9taire de ce compte
executableIndique si ce compte peut traiter des instructions
dataLe tableau d'octets de donn\xE9es brutes stock\xE9 par ce compte
rent_epochLa prochaine \xE9poque \xE0 laquelle ce compte doit payer une rente

Il existe quelques r\xE8gles importantes concernant la propri\xE9t\xE9 des comptes :

  • Seul le propri\xE9taire d'un compte de donn\xE9es peut modifier ses donn\xE9es et d\xE9biter les lamports
  • Tout le monde est autoris\xE9 \xE0 envoyer des lamports sur un compte de donn\xE9es
  • Le propri\xE9taire d'un compte peut d\xE9signer un nouveau propri\xE9taire si les donn\xE9es de celui-ci sont mises \xE0 z\xE9ro

Les comptes de programme ne stockent pas d'\xE9tat.

Par exemple, si vous avez un programme de comptage qui permet d'incr\xE9menter un compteur, vous devez cr\xE9er deux comptes, un compte pour stocker le code du programme, et un autre pour stocker le compteur.

Pour \xE9viter qu'un compte soit supprim\xE9, vous devez payer une rente.

Rente

Le stockage des donn\xE9es sur les comptes co\xFBte des SOL, et il est financ\xE9 par ce qu'on appelle une rente. Si vous maintenez un solde minimum \xE9quivalent \xE0 deux ann\xE9es de rente sur un compte, celui-ci sera exempt\xE9 du paiement de cette rente. Vous pouvez r\xE9cup\xE9rer la rente en fermant le compte et en renvoyant les lamports dans votre portefeuille.

La rente est pay\xE9e \xE0 deux moments diff\xE9rents :

  1. Lorsqu'il est r\xE9f\xE9renc\xE9 par une transaction
  2. Une fois par \xE9poque

Un pourcentage des rentes collect\xE9es par les comptes est d\xE9truit, tandis que le reste est distribu\xE9 aux comptes de vote \xE0 la fin de chaque slot.

Si le compte ne dispose pas d'assez d'argent pour payer la rente, le compte sera supprim\xE9 ainsi que ses donn\xE9es.

Il est \xE9galement important de noter que les nouveaux comptes doivent \xEAtre exempts de rente.

Autres Ressources

',22),P={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},w=t("Mod\xE8le de compte de Solana"),B={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},C=t("Documentation officielle"),V={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},D=t("Thread Twitter sur les comptes par Pencilflip"),T=e("h3",{id:"credit",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),t(" Cr\xE9dit")],-1),A=t("Ce concept de base est attribu\xE9 \xE0 Pencilflip. "),E={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},F=t("Suivez-le sur Twitter"),N=t(".");function M(j,K){const s=n("ExternalLinkIcon");return a(),i(l,null,[u,m,h,e("div",_,[f,e("ul",null,[g,x,b,v,L,e("li",null,[k,e("a",q,[y,o(s)])]),S,z])]),I,e("ul",null,[e("li",null,[e("a",P,[w,o(s)])]),e("li",null,[e("a",B,[C,o(s)])]),e("li",null,[e("a",V,[D,o(s)])])]),T,e("p",null,[A,e("a",E,[F,o(s)]),N])],64)}var U=r(c,[["render",M]]);export{U as default}; +import{_ as r,r as n,o as a,c as i,a as e,b as o,F as l,d as t,e as d}from"./app.d411e3b3.js";var p="/assets/account_example.5b70d95a.jpeg";const c={},u=e("h1",{id:"comptes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#comptes","aria-hidden":"true"},"#"),t(" Comptes")],-1),m=e("p",null,"Les comptes dans Solana sont utilis\xE9s pour stocker des \xE9tats. Ils constituent un \xE9l\xE9ment essentiel pour le d\xE9veloppement sur Solana.",-1),h=e("h2",{id:"faits",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),t(" Faits")],-1),_={class:"custom-container tip"},f=e("p",{class:"custom-container-title"},"Fiche d'Information",-1),g=e("li",null,"Les comptes sont utilis\xE9s pour stocker des donn\xE9es",-1),x=e("li",null,"Chaque compte a une adresse unique",-1),b=e("li",null,"Les comptes ont une taille maximale de 10MB (10 Mega Bytes)",-1),v=e("li",null,"Les comptes des adresses d\xE9riv\xE9es d'un programme (PDA) ont une taille maximale de 10KB (10 Kilo Bytes)",-1),L=e("li",null,"Les comptes des adresses d\xE9riv\xE9es d'un programme (PDA) peuvent \xEAtre utilis\xE9s pour signer au nom d'un programme",-1),k=t("La taille des comptes est fix\xE9e au moment de leur cr\xE9ation, mais elle peut \xEAtre ajust\xE9e en utilisant la fonctionnalit\xE9 "),q={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},y=t("realloc"),S=e("li",null,"Le stockage des donn\xE9es sur un compte est pay\xE9 par une rente",-1),z=e("li",null,"Le propri\xE9taire par d\xE9faut d'un compte est le programme syst\xE8me (System Program)",-1),I=d('

Examen plus approfondi

Le mod\xE8le d'un compte

Il existe 3 types de comptes sur Solana :

  • Les comptes de donn\xE9es pour le stockage des donn\xE9es
  • Les comptes de programmes pour le stockage des programmes ex\xE9cutables
  • Les comptes natifs pour les programmes natifs de Solana tels que System, Stake, et Vote

Il existe deux types de comptes de donn\xE9es :

  • Les comptes appartenant au syst\xE8me
  • Les comptes PDA (adresse d\xE9riv\xE9e du programme)

Chaque compte a une adresse (g\xE9n\xE9ralement une cl\xE9 publique) et un propri\xE9taire (adresse d'un compte de programme). La liste compl\xE8te des champs qu'un compte stocke est \xE9num\xE9r\xE9 ci-dessous.

ChampsDescription
lamportsLe nombre de lamports appartenant \xE0 ce compte
ownerLe programme propri\xE9taire de ce compte
executableIndique si ce compte peut traiter des instructions
dataLe tableau d'octets de donn\xE9es brutes stock\xE9 par ce compte
rent_epochLa prochaine \xE9poque \xE0 laquelle ce compte doit payer une rente

Il existe quelques r\xE8gles importantes concernant la propri\xE9t\xE9 des comptes :

  • Seul le propri\xE9taire d'un compte de donn\xE9es peut modifier ses donn\xE9es et d\xE9biter les lamports
  • Tout le monde est autoris\xE9 \xE0 envoyer des lamports sur un compte de donn\xE9es
  • Le propri\xE9taire d'un compte peut d\xE9signer un nouveau propri\xE9taire si les donn\xE9es de celui-ci sont mises \xE0 z\xE9ro

Les comptes de programme ne stockent pas d'\xE9tat.

Par exemple, si vous avez un programme de comptage qui permet d'incr\xE9menter un compteur, vous devez cr\xE9er deux comptes, un compte pour stocker le code du programme, et un autre pour stocker le compteur.

Pour \xE9viter qu'un compte soit supprim\xE9, vous devez payer une rente.

Rente

Le stockage des donn\xE9es sur les comptes co\xFBte des SOL, et il est financ\xE9 par ce qu'on appelle une rente. Si vous maintenez un solde minimum \xE9quivalent \xE0 deux ann\xE9es de rente sur un compte, celui-ci sera exempt\xE9 du paiement de cette rente. Vous pouvez r\xE9cup\xE9rer la rente en fermant le compte et en renvoyant les lamports dans votre portefeuille.

La rente est pay\xE9e \xE0 deux moments diff\xE9rents :

  1. Lorsqu'il est r\xE9f\xE9renc\xE9 par une transaction
  2. Une fois par \xE9poque

Un pourcentage des rentes collect\xE9es par les comptes est d\xE9truit, tandis que le reste est distribu\xE9 aux comptes de vote \xE0 la fin de chaque slot.

Si le compte ne dispose pas d'assez d'argent pour payer la rente, le compte sera supprim\xE9 ainsi que ses donn\xE9es.

Il est \xE9galement important de noter que les nouveaux comptes doivent \xEAtre exempts de rente.

Autres Ressources

',22),P={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},w=t("Mod\xE8le de compte de Solana"),B={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},C=t("Documentation officielle"),V={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},D=t("Thread Twitter sur les comptes par Pencilflip"),T=e("h3",{id:"credit",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),t(" Cr\xE9dit")],-1),A=t("Ce concept de base est attribu\xE9 \xE0 Pencilflip. "),E={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},F=t("Suivez-le sur Twitter"),N=t(".");function M(j,K){const s=n("ExternalLinkIcon");return a(),i(l,null,[u,m,h,e("div",_,[f,e("ul",null,[g,x,b,v,L,e("li",null,[k,e("a",q,[y,o(s)])]),S,z])]),I,e("ul",null,[e("li",null,[e("a",P,[w,o(s)])]),e("li",null,[e("a",B,[C,o(s)])]),e("li",null,[e("a",V,[D,o(s)])])]),T,e("p",null,[A,e("a",E,[F,o(s)]),N])],64)}var U=r(c,[["render",M]]);export{U as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.b3e83490.js b/docs/.vuepress/dist/assets/accounts.html.f83a9427.js similarity index 98% rename from docs/.vuepress/dist/assets/accounts.html.b3e83490.js rename to docs/.vuepress/dist/assets/accounts.html.f83a9427.js index 14027d65f..d5d42ece6 100644 --- a/docs/.vuepress/dist/assets/accounts.html.b3e83490.js +++ b/docs/.vuepress/dist/assets/accounts.html.f83a9427.js @@ -1 +1 @@ -import{_ as i,r as d,o as r,c as s,a,b as t,F as u,d as n,e as l}from"./app.07ce7a66.js";var o="/assets/account_example.5b70d95a.jpeg";const k={},m=a("h1",{id:"akun",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#akun","aria-hidden":"true"},"#"),n(" Akun")],-1),p=a("p",null,"Akun-akun di dalam solana digunakan untuk menyimpan status. Akun-akun itu adalah blok yang sangat penting dalam pengembangan di Solana.",-1),h=a("h2",{id:"fakta-fakta",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fakta-fakta","aria-hidden":"true"},"#"),n(" Fakta-Fakta")],-1),c={class:"custom-container tip"},_=a("p",{class:"custom-container-title"},"Fakta",-1),b=a("li",null,"Akun-akun digunakan untuk menyimpan data",-1),g=a("li",null,"Setiap akun memiliki alamat unik",-1),y=a("li",null,"Akun-akun memiliki ukuran maksimal yaitu 10MB (10 Mega Bytes)",-1),f=a("li",null,"Akun-akun PDA memiliki ukuran maksimal yaitu 10KB (10 Kilo Bytes)",-1),w=a("li",null,"Akun-akun PDA bisa digunakan untuk menandatangani atas nama program",-1),A=n("Ukuran akun-akun sudah ditetapkan pada waktu pembuatan, tapi bisa dilakukan penyesuaian menggunakan "),x={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},S=n("realloc"),D=a("li",null,"Penyimpanan data akun dibayarkan dengan sewa",-1),P=a("li",null,"Pemilik akun bawaan adalah Program Sistem",-1),B=l('

Lebih Dalam

Model Akun

Ada 3 macam akun di Solana :

  • Data akun penyimpan data
  • Akun program menyimpan program yang dapat dieksekusi
  • Akun Bawaan (native) yang menunjukkan program bawaan di solana seperti Sistem, Stake, dan Vote

Dalam data akun, ada 2 jenis yaitu:

  • Akun-akun yang dimiliki sistem
  • Akun PDA (Program Derived Address)

Setiap akun memiliki sebuah alamat (biasanya disebut public key) dan seorang pemilik (alamat dari akun program). Daftar lengkap tipe apa saja yang disimpan oleh akun dapat ditemukan di bawah ini.

TipeDeskripsi
lamportsJumlah lamports yang dimiliki oleh akun ini
ownerPemilik program akun ini
executableApakah akun ini bisa untuk memproses intruksi
dataArray byte data mentah yang disimpan oleh akun ini
rent_epochDi epoch berikutnya, akun ini akan berutang sewa

Berikut ini beberapa aturan penting kepemilikan :

  • Hanya pemilik data akun yang bisa mengubah datanya dan data lamports
  • Siapapun diizinkan untuk mengkreditkan lamports ke data akun
  • Pemilik akun dapat menetapkan pemilik baru jika data akun tidak ada

Akun program tidak menyimpan status.

Sebagai contoh, jika anda memiliki program penghitung yang memungkinkan anda menambah penghitung, anda harus membuat dua akun, satu akun untuk menyimpan kode program, dan satu untuk menyimpan konter.

Untuk mencegah sebuah akun dihapus, anda harus membayar sewa.

Menyewa

Menyimpan data pada akun membutuhkan biaya berupa SOL untuk pemeliharaan, dan itu didanai oleh apa yang disebut dengan sewa. Jika anda menyediakan biaya pemeliharaan minimum yang setara untuk 2 tahun pembayaran sewa di akun, akun anda akan dibebaskan dari pembayaran sewa. Anda bisa mengambil sewa dengan menutup akun dan mengirimkan lamports kembali ke wallet anda.

Sewa dibayarkan selama dua waktu yang berbeda:

  1. Ketika dirujuk oleh suatu transaksi
  2. Sekali dalam satu masa epoch

Persentase sewa yang dikumpulkan oleh akun-akun akan dihancurkan, sementara sisanya didistribusikan untuk memilih akun di akhir setiap slot.

Jika akun tidak punya saldo yang cukup untuk membayar seewa, akun akan dibatalkan alokasinya dan datanya akan dihapus.

Sumber Lainnya

',21),j={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},v=n("Solana Account Model"),F={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},M=n("Official Documentation"),L={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},V=n("pencilflip account thread"),K=a("h3",{id:"credit",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),n(" Credit")],-1),N=n("Konsep dasar ini dikreditkan ke Pencilflip. "),z={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},E=n("Follow him on Twitter"),J=n(".");function T(C,I){const e=d("ExternalLinkIcon");return r(),s(u,null,[m,p,h,a("div",c,[_,a("ul",null,[b,g,y,f,w,a("li",null,[A,a("a",x,[S,t(e)])]),D,P])]),B,a("ul",null,[a("li",null,[a("a",j,[v,t(e)])]),a("li",null,[a("a",F,[M,t(e)])]),a("li",null,[a("a",L,[V,t(e)])])]),K,a("p",null,[N,a("a",z,[E,t(e)]),J])],64)}var U=i(k,[["render",T]]);export{U as default}; +import{_ as i,r as d,o as r,c as s,a,b as t,F as u,d as n,e as l}from"./app.d411e3b3.js";var o="/assets/account_example.5b70d95a.jpeg";const k={},m=a("h1",{id:"akun",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#akun","aria-hidden":"true"},"#"),n(" Akun")],-1),p=a("p",null,"Akun-akun di dalam solana digunakan untuk menyimpan status. Akun-akun itu adalah blok yang sangat penting dalam pengembangan di Solana.",-1),h=a("h2",{id:"fakta-fakta",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fakta-fakta","aria-hidden":"true"},"#"),n(" Fakta-Fakta")],-1),c={class:"custom-container tip"},_=a("p",{class:"custom-container-title"},"Fakta",-1),b=a("li",null,"Akun-akun digunakan untuk menyimpan data",-1),g=a("li",null,"Setiap akun memiliki alamat unik",-1),y=a("li",null,"Akun-akun memiliki ukuran maksimal yaitu 10MB (10 Mega Bytes)",-1),f=a("li",null,"Akun-akun PDA memiliki ukuran maksimal yaitu 10KB (10 Kilo Bytes)",-1),w=a("li",null,"Akun-akun PDA bisa digunakan untuk menandatangani atas nama program",-1),A=n("Ukuran akun-akun sudah ditetapkan pada waktu pembuatan, tapi bisa dilakukan penyesuaian menggunakan "),x={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},S=n("realloc"),D=a("li",null,"Penyimpanan data akun dibayarkan dengan sewa",-1),P=a("li",null,"Pemilik akun bawaan adalah Program Sistem",-1),B=l('

Lebih Dalam

Model Akun

Ada 3 macam akun di Solana :

  • Data akun penyimpan data
  • Akun program menyimpan program yang dapat dieksekusi
  • Akun Bawaan (native) yang menunjukkan program bawaan di solana seperti Sistem, Stake, dan Vote

Dalam data akun, ada 2 jenis yaitu:

  • Akun-akun yang dimiliki sistem
  • Akun PDA (Program Derived Address)

Setiap akun memiliki sebuah alamat (biasanya disebut public key) dan seorang pemilik (alamat dari akun program). Daftar lengkap tipe apa saja yang disimpan oleh akun dapat ditemukan di bawah ini.

TipeDeskripsi
lamportsJumlah lamports yang dimiliki oleh akun ini
ownerPemilik program akun ini
executableApakah akun ini bisa untuk memproses intruksi
dataArray byte data mentah yang disimpan oleh akun ini
rent_epochDi epoch berikutnya, akun ini akan berutang sewa

Berikut ini beberapa aturan penting kepemilikan :

  • Hanya pemilik data akun yang bisa mengubah datanya dan data lamports
  • Siapapun diizinkan untuk mengkreditkan lamports ke data akun
  • Pemilik akun dapat menetapkan pemilik baru jika data akun tidak ada

Akun program tidak menyimpan status.

Sebagai contoh, jika anda memiliki program penghitung yang memungkinkan anda menambah penghitung, anda harus membuat dua akun, satu akun untuk menyimpan kode program, dan satu untuk menyimpan konter.

Untuk mencegah sebuah akun dihapus, anda harus membayar sewa.

Menyewa

Menyimpan data pada akun membutuhkan biaya berupa SOL untuk pemeliharaan, dan itu didanai oleh apa yang disebut dengan sewa. Jika anda menyediakan biaya pemeliharaan minimum yang setara untuk 2 tahun pembayaran sewa di akun, akun anda akan dibebaskan dari pembayaran sewa. Anda bisa mengambil sewa dengan menutup akun dan mengirimkan lamports kembali ke wallet anda.

Sewa dibayarkan selama dua waktu yang berbeda:

  1. Ketika dirujuk oleh suatu transaksi
  2. Sekali dalam satu masa epoch

Persentase sewa yang dikumpulkan oleh akun-akun akan dihancurkan, sementara sisanya didistribusikan untuk memilih akun di akhir setiap slot.

Jika akun tidak punya saldo yang cukup untuk membayar seewa, akun akan dibatalkan alokasinya dan datanya akan dihapus.

Sumber Lainnya

',21),j={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},v=n("Solana Account Model"),F={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},M=n("Official Documentation"),L={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},V=n("pencilflip account thread"),K=a("h3",{id:"credit",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#credit","aria-hidden":"true"},"#"),n(" Credit")],-1),N=n("Konsep dasar ini dikreditkan ke Pencilflip. "),z={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},E=n("Follow him on Twitter"),J=n(".");function T(C,I){const e=d("ExternalLinkIcon");return r(),s(u,null,[m,p,h,a("div",c,[_,a("ul",null,[b,g,y,f,w,a("li",null,[A,a("a",x,[S,t(e)])]),D,P])]),B,a("ul",null,[a("li",null,[a("a",j,[v,t(e)])]),a("li",null,[a("a",F,[M,t(e)])]),a("li",null,[a("a",L,[V,t(e)])])]),K,a("p",null,[N,a("a",z,[E,t(e)]),J])],64)}var U=i(k,[["render",T]]);export{U as default}; diff --git a/docs/.vuepress/dist/assets/accounts.html.0636922d.js b/docs/.vuepress/dist/assets/accounts.html.fe830ce6.js similarity index 98% rename from docs/.vuepress/dist/assets/accounts.html.0636922d.js rename to docs/.vuepress/dist/assets/accounts.html.fe830ce6.js index a9119c88e..0ce9650ec 100644 --- a/docs/.vuepress/dist/assets/accounts.html.0636922d.js +++ b/docs/.vuepress/dist/assets/accounts.html.fe830ce6.js @@ -1 +1 @@ -import{_ as o,r as s,o as r,c as d,a as e,b as n,F as l,d as a,e as i}from"./app.07ce7a66.js";var c="/assets/account_example.5b70d95a.jpeg";const u={},p=e("h1",{id:"cuentas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cuentas","aria-hidden":"true"},"#"),a(" Cuentas")],-1),m=e("p",null,"Las Cuentas en Solana son usadas para almacenar el estado. Son una pieza fundamental en el desarrollo de programas en Solana.",-1),h=e("h2",{id:"hechos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),a(" Hechos")],-1),_={class:"custom-container tip"},g=e("p",{class:"custom-container-title"},"Lista de hechos",-1),f=e("li",null,"Las cuentas son usadas para almacenar estado",-1),b=e("li",null,"Cada cuenta tiene una direcci\xF3n \xFAnica",-1),v=e("li",null,"Las cuentas tienen un tama\xF1o m\xE1ximo de 10MB (10 Mega Bytes)",-1),y=e("li",null,"Las cuentas de direcciones derivadas de programa (PDA) tienen un tama\xF1o m\xE1ximo de 10KB (10 Kilo Bytes)",-1),x=e("li",null,"Las cuentas de direcciones derivadas de programa (PDA) pueden ser usadas para firmar a nombre de un programa",-1),L=a("Los tama\xF1os de las cuentas son definidos al momento de la creaci\xF3n, pero pueden ser ajustados usando "),S={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},k=a("realloc"),C=e("li",null,"El almacenamiento de datos en una cuenta es pagado con la renta",-1),E=e("li",null,"El due\xF1o por defecto de una cuenta es el programa del sistema (System Program)",-1),q=i('

Un vistazo m\xE1s profundo

El modelo de una cuenta

Hay 3 tipos de cuentas en Solana:

  • Cuentas de datos para almacenar datos
  • Cuentas de programas para almacenar programas ejecutables
  • Cuentas nativas para los programas nativos de Solana como System, Stake, y Vote

En las cuentas de datos hay 2 tipos:

  • Cuentas de propiedad del sistema (System owned accounts)
  • Cuentas de direcciones derivadas de programa o PDA (Program Derived Address)

Cada cuenta tiene una direcci\xF3n (usualmente una llave p\xFAblica) y un due\xF1o (direcci\xF3n de la cuenta del programa). La lista completa de los campos que tiene una cuenta se encuentra a continuaci\xF3n.

FieldDescription
lamportsEl n\xFAmero de lamports que tiene la cuenta
ownerEl programa due\xF1o de esa cuenta
executableIndica si la cuenta procesa transacciones
dataEl array de bytes de datos que tiene la cuenta
rent_epochLa siguiente \xE9poca que esta cuenta deber\xE1 renta

Hay algunos reglas importantes de propiedad de la cuenta:

  • Solo el due\xF1o de la cuenta de datos puede modificar sus datos y debitar lamports
  • Cualquier puede enviar lamports a una cuenta de datos
  • El duse\xF1o de la cuenta puede asignar un nuevo due\xF1o si la cuenta no tiene datos

Las cuentas de programa no almacenan datos.

Por ejemplo, si existiera un programa que cuenta que permite incrementar el contador, debes crear 2 cuentas, una para almacenar el c\xF3digo del programa (ejecutable) y otra para almacenar el contador (no ejecutable).

Para evitar que las cuentas sean elmininadas se debe pagar renta.

Renta

Almacenar datos en las cuentas cuesta SOL para mantenerlas y es pagado a trav\xE9s de las rentas. Si mantienes un balance m\xEDnimo equivalente a 2 a\xF1os de renta en la cuenta, la cuenta no tendr\xE1 que pagar renta, como un dep\xF3sito de garant\xEDa. Luego puedes obtener de vuelta el valor de la renta al cerrar la cuenta y enviar los lamports hacia tu wallet.

La renta es pagada en dos momentos:

  1. Cuando es iniciado por una transacci\xF3n
  2. Una vez por \xE9poca (cantidad de slots)

Un porcentaje de las rentas es eliminado y el resto es distribuido para votar al final de cada slot.

Si la cuenta no tiene suficiente renta para pagar, la cuenta ser\xE1 eliminada junto con sus datos.

Otros recursos

',21),P={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},w=a("Modelo de cuentas de Solana"),j={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},z=a("Documentaci\xF3n oficial"),B={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},D=a("Hilo de la cuenta de Twitter de pencilflip"),A=e("h3",{id:"creditos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#creditos","aria-hidden":"true"},"#"),a(" Creditos")],-1),V=a("El concepto de cuentas es gracias a Pencilflip. "),H={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},N=a("Pueden seguir a Penciflip en Twitter"),F=a(".");function I(M,T){const t=s("ExternalLinkIcon");return r(),d(l,null,[p,m,h,e("div",_,[g,e("ul",null,[f,b,v,y,x,e("li",null,[L,e("a",S,[k,n(t)])]),C,E])]),q,e("ul",null,[e("li",null,[e("a",P,[w,n(t)])]),e("li",null,[e("a",j,[z,n(t)])]),e("li",null,[e("a",B,[D,n(t)])])]),A,e("p",null,[V,e("a",H,[N,n(t)]),F])],64)}var K=o(u,[["render",I]]);export{K as default}; +import{_ as o,r as s,o as r,c as d,a as e,b as n,F as l,d as a,e as i}from"./app.d411e3b3.js";var c="/assets/account_example.5b70d95a.jpeg";const u={},p=e("h1",{id:"cuentas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cuentas","aria-hidden":"true"},"#"),a(" Cuentas")],-1),m=e("p",null,"Las Cuentas en Solana son usadas para almacenar el estado. Son una pieza fundamental en el desarrollo de programas en Solana.",-1),h=e("h2",{id:"hechos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),a(" Hechos")],-1),_={class:"custom-container tip"},g=e("p",{class:"custom-container-title"},"Lista de hechos",-1),f=e("li",null,"Las cuentas son usadas para almacenar estado",-1),b=e("li",null,"Cada cuenta tiene una direcci\xF3n \xFAnica",-1),v=e("li",null,"Las cuentas tienen un tama\xF1o m\xE1ximo de 10MB (10 Mega Bytes)",-1),y=e("li",null,"Las cuentas de direcciones derivadas de programa (PDA) tienen un tama\xF1o m\xE1ximo de 10KB (10 Kilo Bytes)",-1),x=e("li",null,"Las cuentas de direcciones derivadas de programa (PDA) pueden ser usadas para firmar a nombre de un programa",-1),L=a("Los tama\xF1os de las cuentas son definidos al momento de la creaci\xF3n, pero pueden ser ajustados usando "),S={href:"https://solanacookbook.com/references/programs.html#how-to-change-account-size",target:"_blank",rel:"noopener noreferrer"},k=a("realloc"),C=e("li",null,"El almacenamiento de datos en una cuenta es pagado con la renta",-1),E=e("li",null,"El due\xF1o por defecto de una cuenta es el programa del sistema (System Program)",-1),q=i('

Un vistazo m\xE1s profundo

El modelo de una cuenta

Hay 3 tipos de cuentas en Solana:

  • Cuentas de datos para almacenar datos
  • Cuentas de programas para almacenar programas ejecutables
  • Cuentas nativas para los programas nativos de Solana como System, Stake, y Vote

En las cuentas de datos hay 2 tipos:

  • Cuentas de propiedad del sistema (System owned accounts)
  • Cuentas de direcciones derivadas de programa o PDA (Program Derived Address)

Cada cuenta tiene una direcci\xF3n (usualmente una llave p\xFAblica) y un due\xF1o (direcci\xF3n de la cuenta del programa). La lista completa de los campos que tiene una cuenta se encuentra a continuaci\xF3n.

FieldDescription
lamportsEl n\xFAmero de lamports que tiene la cuenta
ownerEl programa due\xF1o de esa cuenta
executableIndica si la cuenta procesa transacciones
dataEl array de bytes de datos que tiene la cuenta
rent_epochLa siguiente \xE9poca que esta cuenta deber\xE1 renta

Hay algunos reglas importantes de propiedad de la cuenta:

  • Solo el due\xF1o de la cuenta de datos puede modificar sus datos y debitar lamports
  • Cualquier puede enviar lamports a una cuenta de datos
  • El duse\xF1o de la cuenta puede asignar un nuevo due\xF1o si la cuenta no tiene datos

Las cuentas de programa no almacenan datos.

Por ejemplo, si existiera un programa que cuenta que permite incrementar el contador, debes crear 2 cuentas, una para almacenar el c\xF3digo del programa (ejecutable) y otra para almacenar el contador (no ejecutable).

Para evitar que las cuentas sean elmininadas se debe pagar renta.

Renta

Almacenar datos en las cuentas cuesta SOL para mantenerlas y es pagado a trav\xE9s de las rentas. Si mantienes un balance m\xEDnimo equivalente a 2 a\xF1os de renta en la cuenta, la cuenta no tendr\xE1 que pagar renta, como un dep\xF3sito de garant\xEDa. Luego puedes obtener de vuelta el valor de la renta al cerrar la cuenta y enviar los lamports hacia tu wallet.

La renta es pagada en dos momentos:

  1. Cuando es iniciado por una transacci\xF3n
  2. Una vez por \xE9poca (cantidad de slots)

Un porcentaje de las rentas es eliminado y el resto es distribuido para votar al final de cada slot.

Si la cuenta no tiene suficiente renta para pagar, la cuenta ser\xE1 eliminada junto con sus datos.

Otros recursos

',21),P={href:"https://solana.wiki/zh-cn/docs/account-model/#account-storage",target:"_blank",rel:"noopener noreferrer"},w=a("Modelo de cuentas de Solana"),j={href:"https://docs.solana.com/developing/programming-model/accounts",target:"_blank",rel:"noopener noreferrer"},z=a("Documentaci\xF3n oficial"),B={href:"https://twitter.com/pencilflip/status/1452402100470644739",target:"_blank",rel:"noopener noreferrer"},D=a("Hilo de la cuenta de Twitter de pencilflip"),A=e("h3",{id:"creditos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#creditos","aria-hidden":"true"},"#"),a(" Creditos")],-1),V=a("El concepto de cuentas es gracias a Pencilflip. "),H={href:"https://twitter.com/intent/user?screen_name=pencilflip",target:"_blank",rel:"noopener noreferrer"},N=a("Pueden seguir a Penciflip en Twitter"),F=a(".");function I(M,T){const t=s("ExternalLinkIcon");return r(),d(l,null,[p,m,h,e("div",_,[g,e("ul",null,[f,b,v,y,x,e("li",null,[L,e("a",S,[k,n(t)])]),C,E])]),q,e("ul",null,[e("li",null,[e("a",P,[w,n(t)])]),e("li",null,[e("a",j,[z,n(t)])]),e("li",null,[e("a",B,[D,n(t)])])]),A,e("p",null,[V,e("a",H,[N,n(t)]),F])],64)}var K=o(u,[["render",I]]);export{K as default}; diff --git a/docs/.vuepress/dist/assets/app.07ce7a66.js b/docs/.vuepress/dist/assets/app.d411e3b3.js similarity index 65% rename from docs/.vuepress/dist/assets/app.07ce7a66.js rename to docs/.vuepress/dist/assets/app.d411e3b3.js index 2364b518b..c314f14c6 100644 --- a/docs/.vuepress/dist/assets/app.07ce7a66.js +++ b/docs/.vuepress/dist/assets/app.d411e3b3.js @@ -2,9 +2,9 @@ var wu=Object.defineProperty,Tu=Object.defineProperties;var Lu=Object.getOwnProp * vue-router v4.0.12 * (c) 2021 Eduardo San Martin Morote * @license MIT - */const sc=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",_l=e=>sc?Symbol(e):"_vr_"+e,ig=_l("rvlm"),Oa=_l("rvd"),rr=_l("r"),Ci=_l("rl"),Kr=_l("rvl"),tl=typeof window!="undefined";function ag(e){return e.__esModule||sc&&e[Symbol.toStringTag]==="Module"}const pe=Object.assign;function _r(e,t){const l={};for(const n in t){const r=t[n];l[n]=Array.isArray(r)?r.map(e):e(r)}return l}const Fl=()=>{},og=/\/$/,sg=e=>e.replace(og,"");function br(e,t,l="/"){let n,r={},i="",o="";const s=t.indexOf("?"),c=t.indexOf("#",s>-1?s:0);return s>-1&&(n=t.slice(0,s),i=t.slice(s+1,c>-1?c:t.length),r=e(i)),c>-1&&(n=n||t.slice(0,c),o=t.slice(c,t.length)),n=hg(n!=null?n:t,l),{fullPath:n+(i&&"?")+i+o,path:n,query:r,hash:o}}function cg(e,t){const l=t.query?e(t.query):"";return t.path+(l&&"?")+l+(t.hash||"")}function Aa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ug(e,t,l){const n=t.matched.length-1,r=l.matched.length-1;return n>-1&&n===r&&hl(t.matched[n],l.matched[r])&&cc(t.params,l.params)&&e(t.query)===e(l.query)&&t.hash===l.hash}function hl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const l in e)if(!dg(e[l],t[l]))return!1;return!0}function dg(e,t){return Array.isArray(e)?Da(e,t):Array.isArray(t)?Da(t,e):e===t}function Da(e,t){return Array.isArray(t)?e.length===t.length&&e.every((l,n)=>l===t[n]):e.length===1&&e[0]===t}function hg(e,t){if(e.startsWith("/"))return e;if(!e)return t;const l=t.split("/"),n=e.split("/");let r=l.length-1,i,o;for(i=0;i({left:window.pageXOffset,top:window.pageYOffset});function fg(e){let t;if("el"in e){const l=e.el,n=typeof l=="string"&&l.startsWith("#"),r=typeof l=="string"?n?document.getElementById(l.slice(1)):document.querySelector(l):l;if(!r)return;t=pg(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Sa(e,t){return(history.state?history.state.position-t:-1)+e}const Ur=new Map;function _g(e,t){Ur.set(e,t)}function bg(e){const t=Ur.get(e);return Ur.delete(e),t}let yg=()=>location.protocol+"//"+location.host;function uc(e,t){const{pathname:l,search:n,hash:r}=t,i=e.indexOf("#");if(i>-1){let s=r.includes(e.slice(i))?e.slice(i).length:1,c=r.slice(s);return c[0]!=="/"&&(c="/"+c),Aa(c,"")}return Aa(l,e)+n+r}function kg(e,t,l,n){let r=[],i=[],o=null;const s=({state:g})=>{const b=uc(e,location),m=l.value,_=t.value;let f=0;if(g){if(l.value=b,t.value=g,o&&o===m){o=null;return}f=_?g.position-_.position:0}else n(b);r.forEach(y=>{y(l.value,m,{delta:f,type:ql.pop,direction:f?f>0?jl.forward:jl.back:jl.unknown})})};function c(){o=l.value}function u(g){r.push(g);const b=()=>{const m=r.indexOf(g);m>-1&&r.splice(m,1)};return i.push(b),b}function d(){const{history:g}=window;!g.state||g.replaceState(pe({},g.state,{scroll:ir()}),"")}function v(){for(const g of i)g();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",d),{pauseListeners:c,listen:u,destroy:v}}function Ia(e,t,l,n=!1,r=!1){return{back:e,current:t,forward:l,replaced:n,position:window.history.length,scroll:r?ir():null}}function Eg(e){const{history:t,location:l}=window,n={value:uc(e,l)},r={value:t.state};r.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,u,d){const v=e.indexOf("#"),g=v>-1?(l.host&&document.querySelector("base")?e:e.slice(v))+c:yg()+e+c;try{t[d?"replaceState":"pushState"](u,"",g),r.value=u}catch(b){console.error(b),l[d?"replace":"assign"](g)}}function o(c,u){const d=pe({},t.state,Ia(r.value.back,c,r.value.forward,!0),u,{position:r.value.position});i(c,d,!0),n.value=c}function s(c,u){const d=pe({},r.value,t.state,{forward:c,scroll:ir()});i(d.current,d,!0);const v=pe({},Ia(n.value,c,null),{position:d.position+1},u);i(c,v,!1),n.value=c}return{location:n,state:r,push:s,replace:o}}function Pg(e){e=gg(e);const t=Eg(e),l=kg(e,t.state,t.location,t.replace);function n(i,o=!0){o||l.pauseListeners(),history.go(i)}const r=pe({location:"",base:e,go:n,createHref:vg.bind(null,e)},t,l);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function wg(e){return typeof e=="string"||e&&typeof e=="object"}function dc(e){return typeof e=="string"||typeof e=="symbol"}const st={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},hc=_l("nf");var Ra;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Ra||(Ra={}));function gl(e,t){return pe(new Error,{type:e,[hc]:!0},t)}function Rt(e,t){return e instanceof Error&&hc in e&&(t==null||!!(e.type&t))}const Ca="[^/]+?",Tg={sensitive:!1,strict:!1,start:!0,end:!0},Lg=/[.+*?^${}()[\]/\\]/g;function Og(e,t){const l=pe({},Tg,t),n=[];let r=l.start?"^":"";const i=[];for(const u of e){const d=u.length?[]:[90];l.strict&&!u.length&&(r+="/");for(let v=0;vt.length?t.length===1&&t[0]===40+40?1:-1:0}function Dg(e,t){let l=0;const n=e.score,r=t.score;for(;l1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function g(){u+=c}for(;s{o(P)}:Fl}function o(d){if(dc(d)){const v=n.get(d);v&&(n.delete(d),l.splice(l.indexOf(v),1),v.children.forEach(o),v.alias.forEach(o))}else{const v=l.indexOf(d);v>-1&&(l.splice(v,1),d.record.name&&n.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function s(){return l}function c(d){let v=0;for(;v=0;)v++;l.splice(v,0,d),d.record.name&&!xa(d)&&n.set(d.record.name,d)}function u(d,v){let g,b={},m,_;if("name"in d&&d.name){if(g=n.get(d.name),!g)throw gl(1,{location:d});_=g.record.name,b=pe(Vg(v.params,g.keys.filter(P=>!P.optional).map(P=>P.name)),d.params),m=g.stringify(b)}else if("path"in d)m=d.path,g=l.find(P=>P.re.test(m)),g&&(b=g.parse(m),_=g.record.name);else{if(g=v.name?n.get(v.name):l.find(P=>P.re.test(v.path)),!g)throw gl(1,{location:d,currentLocation:v});_=g.record.name,b=pe({},v.params,d.params),m=g.stringify(b)}const f=[];let y=g;for(;y;)f.unshift(y.record),y=y.parent;return{name:_,path:m,params:b,matched:f,meta:zg(f)}}return e.forEach(d=>i(d)),{addRoute:i,resolve:u,removeRoute:o,getRoutes:s,getRecordMatcher:r}}function Vg(e,t){const l={};for(const n of t)n in e&&(l[n]=e[n]);return l}function Fg(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:jg(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function jg(e){const t={},l=e.props||!1;if("component"in e)t.default=l;else for(const n in e.components)t[n]=typeof l=="boolean"?l:l[n];return t}function xa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function zg(e){return e.reduce((t,l)=>pe(t,l.meta),{})}function Va(e,t){const l={};for(const n in e)l[n]=n in t?t[n]:e[n];return l}const gc=/#/g,Ng=/&/g,Mg=/\//g,Hg=/=/g,Bg=/\?/g,mc=/\+/g,Kg=/%5B/g,Ug=/%5D/g,vc=/%5E/g,Wg=/%60/g,pc=/%7B/g,qg=/%7C/g,fc=/%7D/g,$g=/%20/g;function xi(e){return encodeURI(""+e).replace(qg,"|").replace(Kg,"[").replace(Ug,"]")}function Gg(e){return xi(e).replace(pc,"{").replace(fc,"}").replace(vc,"^")}function Wr(e){return xi(e).replace(mc,"%2B").replace($g,"+").replace(gc,"%23").replace(Ng,"%26").replace(Wg,"`").replace(pc,"{").replace(fc,"}").replace(vc,"^")}function Jg(e){return Wr(e).replace(Hg,"%3D")}function Qg(e){return xi(e).replace(gc,"%23").replace(Bg,"%3F")}function Yg(e){return e==null?"":Qg(e).replace(Mg,"%2F")}function Mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Zg(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&Wr(i)):[n&&Wr(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+l,i!=null&&(t+="="+i))})}return t}function Xg(e){const t={};for(const l in e){const n=e[l];n!==void 0&&(t[l]=Array.isArray(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}function El(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function l(){e=[]}return{add:t,list:()=>e,reset:l}}function kt(e,t,l,n,r){const i=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((o,s)=>{const c=v=>{v===!1?s(gl(4,{from:l,to:t})):v instanceof Error?s(v):wg(v)?s(gl(2,{from:t,to:v})):(i&&n.enterCallbacks[r]===i&&typeof v=="function"&&i.push(v),o())},u=e.call(n&&n.instances[r],t,l,c);let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(v=>s(v))})}function yr(e,t,l,n){const r=[];for(const i of e)for(const o in i.components){let s=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(em(s)){const u=(s.__vccOpts||s)[t];u&&r.push(kt(u,l,n,i,o))}else{let c=s();r.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const d=ag(u)?u.default:u;i.components[o]=d;const g=(d.__vccOpts||d)[t];return g&&kt(g,l,n,i,o)()}))}}return r}function em(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ja(e){const t=Ie(rr),l=Ie(Ci),n=_e(()=>t.resolve(Bt(e.to))),r=_e(()=>{const{matched:c}=n.value,{length:u}=c,d=c[u-1],v=l.matched;if(!d||!v.length)return-1;const g=v.findIndex(hl.bind(null,d));if(g>-1)return g;const b=za(c[u-2]);return u>1&&za(d)===b&&v[v.length-1].path!==b?v.findIndex(hl.bind(null,c[u-2])):g}),i=_e(()=>r.value>-1&&rm(l.params,n.value.params)),o=_e(()=>r.value>-1&&r.value===l.matched.length-1&&cc(l.params,n.value.params));function s(c={}){return nm(c)?t[Bt(e.replace)?"replace":"push"](Bt(e.to)).catch(Fl):Promise.resolve()}return{route:n,href:_e(()=>n.value.href),isActive:i,isExactActive:o,navigate:s}}const tm=Me({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ja,setup(e,{slots:t}){const l=fl(ja(e)),{options:n}=Ie(rr),r=_e(()=>({[Na(e.activeClass,n.linkActiveClass,"router-link-active")]:l.isActive,[Na(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:l.isExactActive}));return()=>{const i=t.default&&t.default(l);return e.custom?i:ee("a",{"aria-current":l.isExactActive?e.ariaCurrentValue:null,href:l.href,onClick:l.navigate,class:r.value},i)}}}),lm=tm;function nm(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function rm(e,t){for(const l in t){const n=t[l],r=e[l];if(typeof n=="string"){if(n!==r)return!1}else if(!Array.isArray(r)||r.length!==n.length||n.some((i,o)=>i!==r[o]))return!1}return!0}function za(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Na=(e,t,l)=>e!=null?e:t!=null?t:l,im=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:l}){const n=Ie(Kr),r=_e(()=>e.route||n.value),i=Ie(Oa,0),o=_e(()=>r.value.matched[i]);Kt(Oa,i+1),Kt(ig,o),Kt(Kr,r);const s=Ee();return et(()=>[s.value,o.value,e.name],([c,u,d],[v,g,b])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===v&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!hl(u,g)||!v)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=r.value,u=o.value,d=u&&u.components[e.name],v=e.name;if(!d)return Ma(l.default,{Component:d,route:c});const g=u.props[e.name],b=g?g===!0?c.params:typeof g=="function"?g(c):g:null,_=ee(d,pe({},b,t,{onVnodeUnmounted:f=>{f.component.isUnmounted&&(u.instances[v]=null)},ref:s}));return Ma(l.default,{Component:_,route:c})||_}}});function Ma(e,t){if(!e)return null;const l=e(t);return l.length===1?l[0]:l}const _c=im;function am(e){const t=xg(e.routes,e),l=e.parseQuery||Zg,n=e.stringifyQuery||Fa,r=e.history,i=El(),o=El(),s=El(),c=Os(st);let u=st;tl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=_r.bind(null,R=>""+R),v=_r.bind(null,Yg),g=_r.bind(null,Mn);function b(R,K){let z,W;return dc(R)?(z=t.getRecordMatcher(R),W=K):W=R,t.addRoute(W,z)}function m(R){const K=t.getRecordMatcher(R);K&&t.removeRoute(K)}function _(){return t.getRoutes().map(R=>R.record)}function f(R){return!!t.getRecordMatcher(R)}function y(R,K){if(K=pe({},K||c.value),typeof R=="string"){const le=br(l,R,K.path),p=t.resolve({path:le.path},K),k=r.createHref(le.fullPath);return pe(le,p,{params:g(p.params),hash:Mn(le.hash),redirectedFrom:void 0,href:k})}let z;if("path"in R)z=pe({},R,{path:br(l,R.path,K.path).path});else{const le=pe({},R.params);for(const p in le)le[p]==null&&delete le[p];z=pe({},R,{params:v(R.params)}),K.params=v(K.params)}const W=t.resolve(z,K),ue=R.hash||"";W.params=d(g(W.params));const me=cg(n,pe({},R,{hash:Gg(ue),path:W.path})),ie=r.createHref(me);return pe({fullPath:me,hash:ue,query:n===Fa?Xg(R.query):R.query||{}},W,{redirectedFrom:void 0,href:ie})}function P(R){return typeof R=="string"?br(l,R,c.value.path):pe({},R)}function w(R,K){if(u!==R)return gl(8,{from:K,to:R})}function L(R){return D(R)}function S(R){return L(pe(P(R),{replace:!0}))}function j(R){const K=R.matched[R.matched.length-1];if(K&&K.redirect){const{redirect:z}=K;let W=typeof z=="function"?z(R):z;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=P(W):{path:W},W.params={}),pe({query:R.query,hash:R.hash,params:R.params},W)}}function D(R,K){const z=u=y(R),W=c.value,ue=R.state,me=R.force,ie=R.replace===!0,le=j(z);if(le)return D(pe(P(le),{state:ue,force:me,replace:ie}),K||z);const p=z;p.redirectedFrom=K;let k;return!me&&ug(n,W,z)&&(k=gl(16,{to:p,from:W}),Le(W,W,!0,!1)),(k?Promise.resolve(k):U(p,W)).catch(T=>Rt(T)?T:ne(T,p,W)).then(T=>{if(T){if(Rt(T,2))return D(pe(P(T.to),{state:ue,force:me,replace:ie}),K||p)}else T=q(p,W,!0,ie,ue);return B(p,W,T),T})}function O(R,K){const z=w(R,K);return z?Promise.reject(z):Promise.resolve()}function U(R,K){let z;const[W,ue,me]=om(R,K);z=yr(W.reverse(),"beforeRouteLeave",R,K);for(const le of W)le.leaveGuards.forEach(p=>{z.push(kt(p,R,K))});const ie=O.bind(null,R,K);return z.push(ie),Jt(z).then(()=>{z=[];for(const le of i.list())z.push(kt(le,R,K));return z.push(ie),Jt(z)}).then(()=>{z=yr(ue,"beforeRouteUpdate",R,K);for(const le of ue)le.updateGuards.forEach(p=>{z.push(kt(p,R,K))});return z.push(ie),Jt(z)}).then(()=>{z=[];for(const le of R.matched)if(le.beforeEnter&&!K.matched.includes(le))if(Array.isArray(le.beforeEnter))for(const p of le.beforeEnter)z.push(kt(p,R,K));else z.push(kt(le.beforeEnter,R,K));return z.push(ie),Jt(z)}).then(()=>(R.matched.forEach(le=>le.enterCallbacks={}),z=yr(me,"beforeRouteEnter",R,K),z.push(ie),Jt(z))).then(()=>{z=[];for(const le of o.list())z.push(kt(le,R,K));return z.push(ie),Jt(z)}).catch(le=>Rt(le,8)?le:Promise.reject(le))}function B(R,K,z){for(const W of s.list())W(R,K,z)}function q(R,K,z,W,ue){const me=w(R,K);if(me)return me;const ie=K===st,le=tl?history.state:{};z&&(W||ie?r.replace(R.fullPath,pe({scroll:ie&&le&&le.scroll},ue)):r.push(R.fullPath,ue)),c.value=R,Le(R,K,z,ie),Pe()}let A;function H(){A=r.listen((R,K,z)=>{const W=y(R),ue=j(W);if(ue){D(pe(ue,{replace:!0}),W).catch(Fl);return}u=W;const me=c.value;tl&&_g(Sa(me.fullPath,z.delta),ir()),U(W,me).catch(ie=>Rt(ie,12)?ie:Rt(ie,2)?(D(ie.to,W).then(le=>{Rt(le,20)&&!z.delta&&z.type===ql.pop&&r.go(-1,!1)}).catch(Fl),Promise.reject()):(z.delta&&r.go(-z.delta,!1),ne(ie,W,me))).then(ie=>{ie=ie||q(W,me,!1),ie&&(z.delta?r.go(-z.delta,!1):z.type===ql.pop&&Rt(ie,20)&&r.go(-1,!1)),B(W,me,ie)}).catch(Fl)})}let Y=El(),se=El(),J;function ne(R,K,z){Pe(R);const W=se.list();return W.length?W.forEach(ue=>ue(R,K,z)):console.error(R),Promise.reject(R)}function re(){return J&&c.value!==st?Promise.resolve():new Promise((R,K)=>{Y.add([R,K])})}function Pe(R){J||(J=!0,H(),Y.list().forEach(([K,z])=>R?z(R):K()),Y.reset())}function Le(R,K,z,W){const{scrollBehavior:ue}=e;if(!tl||!ue)return Promise.resolve();const me=!z&&bg(Sa(R.fullPath,0))||(W||!z)&&history.state&&history.state.scroll||null;return Ei().then(()=>ue(R,K,me)).then(ie=>ie&&fg(ie)).catch(ie=>ne(ie,R,K))}const Ae=R=>r.go(R);let we;const Re=new Set;return{currentRoute:c,addRoute:b,removeRoute:m,hasRoute:f,getRoutes:_,resolve:y,options:e,push:L,replace:S,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:i.add,beforeResolve:o.add,afterEach:s.add,onError:se.add,isReady:re,install(R){const K=this;R.component("RouterLink",lm),R.component("RouterView",_c),R.config.globalProperties.$router=K,Object.defineProperty(R.config.globalProperties,"$route",{enumerable:!0,get:()=>Bt(c)}),tl&&!we&&c.value===st&&(we=!0,L(r.location).catch(ue=>{}));const z={};for(const ue in st)z[ue]=_e(()=>c.value[ue]);R.provide(rr,K),R.provide(Ci,fl(z)),R.provide(Kr,c);const W=R.unmount;Re.add(R),R.unmount=function(){Re.delete(R),Re.size<1&&(u=st,A&&A(),c.value=st,we=!1,J=!1),W()}}}}function Jt(e){return e.reduce((t,l)=>t.then(()=>l()),Promise.resolve())}function om(e,t){const l=[],n=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;ohl(u,s))?n.push(s):l.push(s));const c=e.matched[o];c&&(t.matched.find(u=>hl(u,c))||r.push(c))}return[l,n,r]}function ln(){return Ie(rr)}function Vi(){return Ie(Ci)}const sm=Me({setup(e,t){const l=Ee(!1);return tt(()=>{l.value=!0}),()=>{var n,r;return l.value?(r=(n=t.slots).default)===null||r===void 0?void 0:r.call(n):null}}}),cm="modulepreload",Ha={},um="/",a=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${um}${n}`,n in Ha)return;Ha[n]=!0;const r=n.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${i}`))return;const o=document.createElement("link");if(o.rel=r?"stylesheet":cm,r||(o.as="script",o.crossOrigin=""),o.href=n,document.head.appendChild(o),r)return new Promise((s,c)=>{o.addEventListener("load",s),o.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},bc={"v-8daa1a0e":h(()=>a(()=>import("./index.html.f4a1e63e.js"),[])),"v-2d0a8235":h(()=>a(()=>import("./index.html.8977d14d.js"),[])),"v-6bf54404":h(()=>a(()=>import("./accounts.html.629a8060.js"),[])),"v-5f0a12cc":h(()=>a(()=>import("./cpi.html.fc0ddd7a.js"),[])),"v-130ca978":h(()=>a(()=>import("./pdas.html.cf2a36cd.js"),[])),"v-882009ca":h(()=>a(()=>import("./programs.html.09c93a73.js"),[])),"v-63197375":h(()=>a(()=>import("./transactions.html.48ea2bf1.js"),[])),"v-7446c3bf":h(()=>a(()=>import("./index.html.dd541d3c.js"),[])),"v-2d0a8b4a":h(()=>a(()=>import("./index.html.caa2e1b4.js"),[])),"v-345c0323":h(()=>a(()=>import("./auto-approve.html.1e147577.js"),[])),"v-2119e6ee":h(()=>a(()=>import("./distribution.html.e6e2641f.js"),[])),"v-33bd6568":h(()=>a(()=>import("./energy-system.html.c939c46f.js"),[])),"v-687f189c":h(()=>a(()=>import("./game-examples.html.8ba930cd.js"),[])),"v-00547d6c":h(()=>a(()=>import("./game-sdks.html.c0176ba6.js"),[])),"v-3edbe329":h(()=>a(()=>import("./hello-world.html.46100458.js"),[])),"v-3d8530c8":h(()=>a(()=>import("./interact-with-tokens.html.2bce6086.js"),[])),"v-c08c9418":h(()=>a(()=>import("./intro.html.5c2ad8c4.js"),[])),"v-c4d04f5e":h(()=>a(()=>import("./nfts-in-games.html.46772392.js"),[])),"v-4ea6aa5e":h(()=>a(()=>import("./porting-anchor-to-unity.html.a3b74cb4.js"),[])),"v-1e0c6857":h(()=>a(()=>import("./saving-game-state.html.aa5750ab.js"),[])),"v-61d730b8":h(()=>a(()=>import("./store-sol-in-pda.html.e4ee6008.js"),[])),"v-2d0a87a8":h(()=>a(()=>import("./index.html.c5a39464.js"),[])),"v-4e8563af":h(()=>a(()=>import("./installation.html.81cc1ff4.js"),[])),"v-76b1e9e3":h(()=>a(()=>import("./account-maps.html.c84ca06e.js"),[])),"v-6da58eef":h(()=>a(()=>import("./data-migration.html.d5010d02.js"),[])),"v-4684263f":h(()=>a(()=>import("./debugging-solana-programs.html.696e8511.js"),[])),"v-4740871a":h(()=>a(()=>import("./feature-parity-testing.html.2d03e4b5.js"),[])),"v-2b9a5458":h(()=>a(()=>import("./get-program-accounts.html.b068cc8a.js"),[])),"v-2e379628":h(()=>a(()=>import("./serialization.html.bb0b6d3d.js"),[])),"v-7e81f36f":h(()=>a(()=>import("./versioned-transactions.html.5b1ec8d4.js"),[])),"v-2d0a94db":h(()=>a(()=>import("./index.html.25f20e37.js"),[])),"v-2d0a983f":h(()=>a(()=>import("./index.html.e7deec39.js"),[])),"v-2d0a9e0f":h(()=>a(()=>import("./index.html.d04c9063.js"),[])),"v-2d0ab112":h(()=>a(()=>import("./index.html.b594f3cc.js"),[])),"v-6c467d65":h(()=>a(()=>import("./accounts.html.85e3e0a4.js"),[])),"v-70f9aa12":h(()=>a(()=>import("./basic-transactions.html.9492ba81.js"),[])),"v-4dc29afa":h(()=>a(()=>import("./keypairs-and-wallets.html.51f378e3.js"),[])),"v-10b56a2e":h(()=>a(()=>import("./local-development.html.a46df64b.js"),[])),"v-9eccd210":h(()=>a(()=>import("./name-service.html.40d37cf7.js"),[])),"v-d2aec298":h(()=>a(()=>import("./nfts.html.4488b5bf.js"),[])),"v-f8950628":h(()=>a(()=>import("./offline-transactions.html.62c2bb84.js"),[])),"v-877d9708":h(()=>a(()=>import("./programs.html.d7e559f7.js"),[])),"v-26f90ae0":h(()=>a(()=>import("./staking.html.48d1bd77.js"),[])),"v-0d096f0e":h(()=>a(()=>import("./token.html.77adbbb4.js"),[])),"v-2d0abea2":h(()=>a(()=>import("./index.html.92035043.js"),[])),"v-2d0abfd8":h(()=>a(()=>import("./index.html.550d93c2.js"),[])),"v-2d0ac643":h(()=>a(()=>import("./index.html.9bb2504f.js"),[])),"v-2d0ad528":h(()=>a(()=>import("./index.html.2017fef1.js"),[])),"v-15aaed93":h(()=>a(()=>import("./index.html.b6c39787.js"),[])),"v-8e5be170":h(()=>a(()=>import("./accounts.html.369da584.js"),[])),"v-f2328ef0":h(()=>a(()=>import("./pdas.html.6fd7b3e7.js"),[])),"v-08ccc65f":h(()=>a(()=>import("./programs.html.a673792c.js"),[])),"v-1256fcb9":h(()=>a(()=>import("./transactions.html.46bc8b92.js"),[])),"v-2485abf3":h(()=>a(()=>import("./installation.html.aa25ac0f.js"),[])),"v-1832f5c2":h(()=>a(()=>import("./account-maps.html.cd84fe7b.js"),[])),"v-70204b2b":h(()=>a(()=>import("./data-migration.html.ac61c119.js"),[])),"v-16deac83":h(()=>a(()=>import("./debugging-solana-programs.html.b7fb9288.js"),[])),"v-732f06a2":h(()=>a(()=>import("./feature-parity-testing.html.93063fd3.js"),[])),"v-22a67510":h(()=>a(()=>import("./get-program-accounts.html.2d157240.js"),[])),"v-309da254":h(()=>a(()=>import("./retrying-transactions.html.63745293.js"),[])),"v-5796626c":h(()=>a(()=>import("./serialization.html.a93f580e.js"),[])),"v-2d09cebe":h(()=>a(()=>import("./accounts.html.e2d2d050.js"),[])),"v-9ce8299a":h(()=>a(()=>import("./basic-transactions.html.c93eecf9.js"),[])),"v-4ec78794":h(()=>a(()=>import("./keypairs-and-wallets.html.52178133.js"),[])),"v-32949b1c":h(()=>a(()=>import("./local-development.html.46e27ce6.js"),[])),"v-01539798":h(()=>a(()=>import("./name-service.html.31d70b32.js"),[])),"v-6bf79020":h(()=>a(()=>import("./nfts.html.d9599439.js"),[])),"v-0e8f1e28":h(()=>a(()=>import("./offline-transactions.html.26de122f.js"),[])),"v-3975cfb8":h(()=>a(()=>import("./programs.html.dd60d7aa.js"),[])),"v-7cf087d4":h(()=>a(()=>import("./staking.html.420a515f.js"),[])),"v-4520fd52":h(()=>a(()=>import("./token.html.87c9f9ba.js"),[])),"v-a0b9b104":h(()=>a(()=>import("./accounts.html.91bec01d.js"),[])),"v-9a7329dc":h(()=>a(()=>import("./cpi.html.a340693f.js"),[])),"v-1a485bbe":h(()=>a(()=>import("./pdas.html.08e26e07.js"),[])),"v-00c442d6":h(()=>a(()=>import("./programs.html.ebf949b0.js"),[])),"v-e455ec22":h(()=>a(()=>import("./transactions.html.b7388dfe.js"),[])),"v-eb393c2e":h(()=>a(()=>import("./auto-approve.html.4e3677ac.js"),[])),"v-772145b4":h(()=>a(()=>import("./distribution.html.1a2e0c57.js"),[])),"v-5105c746":h(()=>a(()=>import("./energy-system.html.446d0efc.js"),[])),"v-5938dad4":h(()=>a(()=>import("./game-examples.html.4e1c4e80.js"),[])),"v-f1adf734":h(()=>a(()=>import("./game-sdks.html.d18bd9d2.js"),[])),"v-62aa93a3":h(()=>a(()=>import("./hello-world.html.97d1eb37.js"),[])),"v-6a3c698e":h(()=>a(()=>import("./interact-with-tokens.html.64318398.js"),[])),"v-a2e66c24":h(()=>a(()=>import("./intro.html.afd41fab.js"),[])),"v-087c524b":h(()=>a(()=>import("./nfts-in-games.html.e1b77b87.js"),[])),"v-7664744b":h(()=>a(()=>import("./porting-anchor-to-unity.html.2d7da15e.js"),[])),"v-2dcf5551":h(()=>a(()=>import("./saving-game-state.html.40bb41f5.js"),[])),"v-0122f36a":h(()=>a(()=>import("./store-sol-in-pda.html.11610e9c.js"),[])),"v-8e9578ae":h(()=>a(()=>import("./installation.html.75866756.js"),[])),"v-668d6eae":h(()=>a(()=>import("./account-maps.html.84532932.js"),[])),"v-5f505435":h(()=>a(()=>import("./data-migration.html.51e5d8f8.js"),[])),"v-556f7939":h(()=>a(()=>import("./debugging-solana-programs.html.a0e3b858.js"),[])),"v-8fa8488e":h(()=>a(()=>import("./feature-parity-testing.html.5be01a44.js"),[])),"v-16ea0e9a":h(()=>a(()=>import("./get-program-accounts.html.382d13c1.js"),[])),"v-cdc7dfbc":h(()=>a(()=>import("./serialization.html.b36b4ad5.js"),[])),"v-5a4e12b5":h(()=>a(()=>import("./versioned-transactions.html.7972f188.js"),[])),"v-7b6447aa":h(()=>a(()=>import("./accounts.html.5ae3ae45.js"),[])),"v-b9616b86":h(()=>a(()=>import("./basic-transactions.html.ab11cb9f.js"),[])),"v-670400c0":h(()=>a(()=>import("./keypairs-and-wallets.html.61911f3c.js"),[])),"v-7ae54a28":h(()=>a(()=>import("./local-development.html.94d5f03d.js"),[])),"v-3aafba84":h(()=>a(()=>import("./name-service.html.84a68d08.js"),[])),"v-87eb5f0c":h(()=>a(()=>import("./nfts.html.75a819e1.js"),[])),"v-c6123a9c":h(()=>a(()=>import("./offline-transactions.html.0bf4dc0d.js"),[])),"v-12489342":h(()=>a(()=>import("./programs.html.3c48317e.js"),[])),"v-10522b0a":h(()=>a(()=>import("./staking.html.4f958a15.js"),[])),"v-d84413f0":h(()=>a(()=>import("./token.html.5b1ae1a2.js"),[])),"v-598bfdda":h(()=>a(()=>import("./accounts.html.62c56dc7.js"),[])),"v-034daf46":h(()=>a(()=>import("./cpi.html.1a2d6d74.js"),[])),"v-410d47d3":h(()=>a(()=>import("./pdas.html.e5cff056.js"),[])),"v-2334b82a":h(()=>a(()=>import("./programs.html.d77781f0.js"),[])),"v-1ee9ddf8":h(()=>a(()=>import("./transactions.html.e6d9a389.js"),[])),"v-3c3bf874":h(()=>a(()=>import("./auto-approve.html.e352de0c.js"),[])),"v-28f9dc3f":h(()=>a(()=>import("./distribution.html.ebcec652.js"),[])),"v-4b7ffbca":h(()=>a(()=>import("./energy-system.html.36ae62eb.js"),[])),"v-5c9dcd6b":h(()=>a(()=>import("./game-examples.html.e048eba1.js"),[])),"v-16181c8a":h(()=>a(()=>import("./game-sdks.html.92d7e729.js"),[])),"v-ed210090":h(()=>a(()=>import("./hello-world.html.7962bd1c.js"),[])),"v-5e474519":h(()=>a(()=>import("./interact-with-tokens.html.98196941.js"),[])),"v-5625a9c3":h(()=>a(()=>import("./intro.html.cccca287.js"),[])),"v-dc92e5c0":h(()=>a(()=>import("./nfts-in-games.html.2b65cbf5.js"),[])),"v-1c322e40":h(()=>a(()=>import("./porting-anchor-to-unity.html.d93d3149.js"),[])),"v-71d3c4b4":h(()=>a(()=>import("./saving-game-state.html.9d6e5e66.js"),[])),"v-50674c75":h(()=>a(()=>import("./store-sol-in-pda.html.c79c00ec.js"),[])),"v-4605d97e":h(()=>a(()=>import("./installation.html.5e200cbd.js"),[])),"v-7e91df34":h(()=>a(()=>import("./account-maps.html.6070c007.js"),[])),"v-05451800":h(()=>a(()=>import("./data-migration.html.07b84548.js"),[])),"v-0bb1c6e4":h(()=>a(()=>import("./debugging-solana-programs.html.a9ad9801.js"),[])),"v-5623fef8":h(()=>a(()=>import("./feature-parity-testing.html.110a0e04.js"),[])),"v-0af4ea25":h(()=>a(()=>import("./get-program-accounts.html.2b6451b4.js"),[])),"v-22564af7":h(()=>a(()=>import("./serialization.html.4cfc0d5a.js"),[])),"v-77103780":h(()=>a(()=>import("./versioned-transactions.html.dd6b2982.js"),[])),"v-742672b6":h(()=>a(()=>import("./accounts.html.17535e68.js"),[])),"v-7fdd21f0":h(()=>a(()=>import("./basic-transactions.html.ae0f79a3.js"),[])),"v-5bd01ecb":h(()=>a(()=>import("./keypairs-and-wallets.html.cc8fbf04.js"),[])),"v-0835dffd":h(()=>a(()=>import("./local-development.html.edd1e5da.js"),[])),"v-31ec7bc9":h(()=>a(()=>import("./name-service.html.2a6127d5.js"),[])),"v-3331e485":h(()=>a(()=>import("./nfts.html.6cf05cb7.js"),[])),"v-dc79fe86":h(()=>a(()=>import("./offline-transactions.html.6bb56d3c.js"),[])),"v-77bdac66":h(()=>a(()=>import("./programs.html.01e229c2.js"),[])),"v-3717171f":h(()=>a(()=>import("./staking.html.8f95d604.js"),[])),"v-01a8e35d":h(()=>a(()=>import("./token.html.c555b525.js"),[])),"v-08458c16":h(()=>a(()=>import("./accounts.html.0636922d.js"),[])),"v-79377c96":h(()=>a(()=>import("./pdas.html.3b9289a8.js"),[])),"v-4bd7f10c":h(()=>a(()=>import("./programs.html.f73d3347.js"),[])),"v-314308e6":h(()=>a(()=>import("./transactions.html.0b44a37d.js"),[])),"v-389f60e0":h(()=>a(()=>import("./installation.html.4e98836a.js"),[])),"v-471a2192":h(()=>a(()=>import("./account-maps.html.a6d163f8.js"),[])),"v-7642d244":h(()=>a(()=>import("./data-migration.html.e0a081db.js"),[])),"v-6c0a22f0":h(()=>a(()=>import("./debugging-solana-programs.html.d82f151d.js"),[])),"v-35856562":h(()=>a(()=>import("./feature-parity-testing.html.60d0cda5.js"),[])),"v-3d8822fa":h(()=>a(()=>import("./get-program-accounts.html.a9d0e53c.js"),[])),"v-6ad65459":h(()=>a(()=>import("./serialization.html.fc2b2085.js"),[])),"v-3caeb514":h(()=>a(()=>import("./accounts.html.89eb8977.js"),[])),"v-20a8d3e6":h(()=>a(()=>import("./basic-transactions.html.85ad631b.js"),[])),"v-17bc77ae":h(()=>a(()=>import("./keypairs-and-wallets.html.7c474929.js"),[])),"v-0a613142":h(()=>a(()=>import("./local-development.html.c30f3958.js"),[])),"v-1db05f27":h(()=>a(()=>import("./name-service.html.f9dd90b0.js"),[])),"v-6f8605e3":h(()=>a(()=>import("./nfts.html.06449cbe.js"),[])),"v-2a14a61b":h(()=>a(()=>import("./offline-transactions.html.ef38def6.js"),[])),"v-e6ad27aa":h(()=>a(()=>import("./programs.html.dec531fb.js"),[])),"v-8d23ddfe":h(()=>a(()=>import("./staking.html.6485c86f.js"),[])),"v-4fd8edbf":h(()=>a(()=>import("./token.html.12804e59.js"),[])),"v-da3cf63c":h(()=>a(()=>import("./accounts.html.b3e83490.js"),[])),"v-0bf50b22":h(()=>a(()=>import("./pdas.html.56ea1967.js"),[])),"v-3a47880e":h(()=>a(()=>import("./programs.html.96701793.js"),[])),"v-73c3d55a":h(()=>a(()=>import("./transactions.html.73b8d7c4.js"),[])),"v-02e9060d":h(()=>a(()=>import("./installation.html.aa3edf44.js"),[])),"v-10a285c5":h(()=>a(()=>import("./account-maps.html.84595114.js"),[])),"v-4ddeba51":h(()=>a(()=>import("./data-migration.html.8520d86d.js"),[])),"v-0173699d":h(()=>a(()=>import("./debugging-solana-programs.html.2f9160d7.js"),[])),"v-971f3456":h(()=>a(()=>import("./feature-parity-testing.html.7eebcb7c.js"),[])),"v-307b2094":h(()=>a(()=>import("./get-program-accounts.html.703fb6bd.js"),[])),"v-5b4b12f4":h(()=>a(()=>import("./serialization.html.89a2791f.js"),[])),"v-06371947":h(()=>a(()=>import("./accounts.html.0cab14f0.js"),[])),"v-c0d8574e":h(()=>a(()=>import("./basic-transactions.html.75aca1d6.js"),[])),"v-644e73dc":h(()=>a(()=>import("./keypairs-and-wallets.html.68a4f8a1.js"),[])),"v-75cde6e8":h(()=>a(()=>import("./local-development.html.6fe99a83.js"),[])),"v-673571da":h(()=>a(()=>import("./name-service.html.7f713da1.js"),[])),"v-931308d4":h(()=>a(()=>import("./nfts.html.0870f8d4.js"),[])),"v-cb7d5464":h(()=>a(()=>import("./offline-transactions.html.cd22f1cb.js"),[])),"v-5631d05e":h(()=>a(()=>import("./programs.html.135d8a1e.js"),[])),"v-01feda6e":h(()=>a(()=>import("./staking.html.04e151a8.js"),[])),"v-3211a328":h(()=>a(()=>import("./token.html.ea1f1398.js"),[])),"v-179e82fe":h(()=>a(()=>import("./accounts.html.d5fa2c98.js"),[])),"v-52ffdf92":h(()=>a(()=>import("./cpi.html.68e45f97.js"),[])),"v-fd851184":h(()=>a(()=>import("./pdas.html.6d743213.js"),[])),"v-67993a15":h(()=>a(()=>import("./programs.html.ea9dd7e3.js"),[])),"v-ec92b522":h(()=>a(()=>import("./transactions.html.f5f36a28.js"),[])),"v-429dff29":h(()=>a(()=>import("./installation.html.3ee204bb.js"),[])),"v-44679d29":h(()=>a(()=>import("./account-maps.html.6ef9e96e.js"),[])),"v-b688ee96":h(()=>a(()=>import("./data-migration.html.d0acee8e.js"),[])),"v-04e3168e":h(()=>a(()=>import("./debugging-solana-programs.html.c5eb5f04.js"),[])),"v-6b5a9039":h(()=>a(()=>import("./feature-parity-testing.html.e87e0e6e.js"),[])),"v-d18839cc":h(()=>a(()=>import("./get-program-accounts.html.01717eeb.js"),[])),"v-17384ba2":h(()=>a(()=>import("./serialization.html.a34c46cf.js"),[])),"v-0d7cc735":h(()=>a(()=>import("./versioned-transactions.html.1e1e264b.js"),[])),"v-39fc30ab":h(()=>a(()=>import("./accounts.html.fedf3c54.js"),[])),"v-567dfebd":h(()=>a(()=>import("./basic-transactions.html.f38dcb54.js"),[])),"v-09579540":h(()=>a(()=>import("./keypairs-and-wallets.html.af37857f.js"),[])),"v-04ce05a8":h(()=>a(()=>import("./local-development.html.56a49f49.js"),[])),"v-7a18373e":h(()=>a(()=>import("./name-service.html.87ead710.js"),[])),"v-6d16e4fa":h(()=>a(()=>import("./nfts.html.73b95415.js"),[])),"v-3f4a7732":h(()=>a(()=>import("./offline-transactions.html.d0d3f6bf.js"),[])),"v-ec12307c":h(()=>a(()=>import("./programs.html.6801ed73.js"),[])),"v-7747468a":h(()=>a(()=>import("./staking.html.122e3dd7.js"),[])),"v-0463f188":h(()=>a(()=>import("./token.html.0e5aea93.js"),[])),"v-52cd49a4":h(()=>a(()=>import("./accounts.html.d16b618e.js"),[])),"v-4a4be76e":h(()=>a(()=>import("./pdas.html.6cdffc98.js"),[])),"v-26941245":h(()=>a(()=>import("./programs.html.3f12c384.js"),[])),"v-2229e59f":h(()=>a(()=>import("./transactions.html.93abdb49.js"),[])),"v-e97c194e":h(()=>a(()=>import("./installation.html.33a0283b.js"),[])),"v-c5b19a0e":h(()=>a(()=>import("./account-maps.html.61224aa4.js"),[])),"v-68262af6":h(()=>a(()=>import("./data-migration.html.611a3316.js"),[])),"v-a4865e2e":h(()=>a(()=>import("./debugging-solana-programs.html.3408b860.js"),[])),"v-37352209":h(()=>a(()=>import("./feature-parity-testing.html.90d3050b.js"),[])),"v-0d30a8ea":h(()=>a(()=>import("./get-program-accounts.html.05c9c5aa.js"),[])),"v-5329205c":h(()=>a(()=>import("./serialization.html.932862af.js"),[])),"v-da88730a":h(()=>a(()=>import("./accounts.html.339a7b82.js"),[])),"v-2258908d":h(()=>a(()=>import("./basic-transactions.html.351c7904.js"),[])),"v-48d4f310":h(()=>a(()=>import("./keypairs-and-wallets.html.e67c0c51.js"),[])),"v-4d71f9d8":h(()=>a(()=>import("./local-development.html.87708b9b.js"),[])),"v-cb0f35e4":h(()=>a(()=>import("./name-service.html.9126ccbb.js"),[])),"v-b3ac3a6c":h(()=>a(()=>import("./nfts.html.93f43d02.js"),[])),"v-7ec7d502":h(()=>a(()=>import("./offline-transactions.html.1cebdb75.js"),[])),"v-3a9304dc":h(()=>a(()=>import("./programs.html.9cdb4de3.js"),[])),"v-4055b6ba":h(()=>a(()=>import("./staking.html.9a3a894a.js"),[])),"v-249ea490":h(()=>a(()=>import("./token.html.1da2f0eb.js"),[])),"v-2c987e4b":h(()=>a(()=>import("./accounts.html.d0cb3dfd.js"),[])),"v-203f4825":h(()=>a(()=>import("./cpi.html.9d257983.js"),[])),"v-5beb210b":h(()=>a(()=>import("./pdas.html.dd1806d8.js"),[])),"v-7c933562":h(()=>a(()=>import("./programs.html.5860dd01.js"),[])),"v-4f78323c":h(()=>a(()=>import("./transactions.html.bc7f0379.js"),[])),"v-c3a0e694":h(()=>a(()=>import("./installation.html.3865f03a.js"),[])),"v-8121a608":h(()=>a(()=>import("./account-maps.html.84c98fd3.js"),[])),"v-7c1e6fc8":h(()=>a(()=>import("./data-migration.html.42889ad1.js"),[])),"v-19571874":h(()=>a(()=>import("./debugging-solana-programs.html.ff3a8325.js"),[])),"v-fc0a9768":h(()=>a(()=>import("./feature-parity-testing.html.64de3bfa.js"),[])),"v-eca82026":h(()=>a(()=>import("./get-program-accounts.html.58aa1eba.js"),[])),"v-05ba93a2":h(()=>a(()=>import("./serialization.html.d1ade7c6.js"),[])),"v-241ceb48":h(()=>a(()=>import("./versioned-transactions.html.20e4c983.js"),[])),"v-95f87f04":h(()=>a(()=>import("./accounts.html.527d0e94.js"),[])),"v-6d1e22d0":h(()=>a(()=>import("./basic-transactions.html.8d04a74c.js"),[])),"v-0f01feda":h(()=>a(()=>import("./keypairs-and-wallets.html.de41b5c5.js"),[])),"v-605f9335":h(()=>a(()=>import("./local-development.html.57651167.js"),[])),"v-045da591":h(()=>a(()=>import("./name-service.html.ea9b0216.js"),[])),"v-262d564d":h(()=>a(()=>import("./nfts.html.8062119a.js"),[])),"v-2e71e285":h(()=>a(()=>import("./offline-transactions.html.93364c85.js"),[])),"v-04fe7795":h(()=>a(()=>import("./programs.html.90aa36af.js"),[])),"v-51f4f057":h(()=>a(()=>import("./staking.html.79740434.js"),[])),"v-6e1baa95":h(()=>a(()=>import("./token.html.b6c1e5ff.js"),[])),"v-3f8c76bb":h(()=>a(()=>import("./accounts.html.8c2c7d40.js"),[])),"v-310cd17b":h(()=>a(()=>import("./pdas.html.da9ce228.js"),[])),"v-e0f1a45c":h(()=>a(()=>import("./programs.html.fb2104eb.js"),[])),"v-5dda72ac":h(()=>a(()=>import("./transactions.html.999eb3d9.js"),[])),"v-c5f91db4":h(()=>a(()=>import("./installation.html.0539cd42.js"),[])),"v-e2f8eae8":h(()=>a(()=>import("./account-maps.html.573ed2b1.js"),[])),"v-50dcad50":h(()=>a(()=>import("./data-migration.html.aa7491d7.js"),[])),"v-387ebf94":h(()=>a(()=>import("./debugging-solana-programs.html.56d02641.js"),[])),"v-5da35ddc":h(()=>a(()=>import("./feature-parity-testing.html.9895d411.js"),[])),"v-4791bd7d":h(()=>a(()=>import("./get-program-accounts.html.19ef2dee.js"),[])),"v-109a0a9f":h(()=>a(()=>import("./serialization.html.d1b35c96.js"),[])),"v-0074d650":h(()=>a(()=>import("./versioned-transactions.html.7131c1ef.js"),[])),"v-f7cfc3e4":h(()=>a(()=>import("./accounts.html.bcf82d40.js"),[])),"v-48c6cc60":h(()=>a(()=>import("./basic-transactions.html.a069dbca.js"),[])),"v-e6b8f3ba":h(()=>a(()=>import("./keypairs-and-wallets.html.41fab86d.js"),[])),"v-5f3377a5":h(()=>a(()=>import("./local-development.html.5b9c11f5.js"),[])),"v-4fe8bb21":h(()=>a(()=>import("./name-service.html.569777a7.js"),[])),"v-00aefbdd":h(()=>a(()=>import("./nfts.html.cb306959.js"),[])),"v-7ad32fd6":h(()=>a(()=>import("./offline-transactions.html.411f2083.js"),[])),"v-57da55b6":h(()=>a(()=>import("./programs.html.6d41107a.js"),[])),"v-2716a0c7":h(()=>a(()=>import("./staking.html.0fd3c3b6.js"),[])),"v-386291f6":h(()=>a(()=>import("./token.html.de032bea.js"),[])),"v-46a93876":h(()=>a(()=>import("./accounts.html.4965c1bb.js"),[])),"v-5aefd385":h(()=>a(()=>import("./pdas.html.eaddc26f.js"),[])),"v-2ca61adc":h(()=>a(()=>import("./programs.html.c4b45e07.js"),[])),"v-4847cab6":h(()=>a(()=>import("./transactions.html.0168eb8a.js"),[])),"v-bd0a22a0":h(()=>a(()=>import("./installation.html.cff7de51.js"),[])),"v-bdfe6c7c":h(()=>a(()=>import("./account-maps.html.8c6e008e.js"),[])),"v-3fbbf30e":h(()=>a(()=>import("./data-migration.html.f3e868ea.js"),[])),"v-846b6e80":h(()=>a(()=>import("./debugging-solana-programs.html.2a0d6ae2.js"),[])),"v-2fc8dcdc":h(()=>a(()=>import("./feature-parity-testing.html.6b5afb2f.js"),[])),"v-aa61329a":h(()=>a(()=>import("./get-program-accounts.html.beec38ff.js"),[])),"v-4dc4b229":h(()=>a(()=>import("./serialization.html.a08f50dc.js"),[])),"v-d2d54578":h(()=>a(()=>import("./accounts.html.e2d854ed.js"),[])),"v-5981ffd4":h(()=>a(()=>import("./basic-transactions.html.8104955c.js"),[])),"v-59dda459":h(()=>a(()=>import("./keypairs-and-wallets.html.9ba5746a.js"),[])),"v-63aaf52f":h(()=>a(()=>import("./local-development.html.04b39972.js"),[])),"v-56a76f57":h(()=>a(()=>import("./name-service.html.73354d4f.js"),[])),"v-41e84613":h(()=>a(()=>import("./nfts.html.f3815a10.js"),[])),"v-e05ef36a":h(()=>a(()=>import("./offline-transactions.html.328bb708.js"),[])),"v-32dfd74a":h(()=>a(()=>import("./programs.html.7db6ff71.js"),[])),"v-50f9a2d1":h(()=>a(()=>import("./staking.html.bbc62dff.js"),[])),"v-6c8298e2":h(()=>a(()=>import("./token.html.858f2429.js"),[])),"v-6a35b27a":h(()=>a(()=>import("./accounts.html.d65e9141.js"),[])),"v-8e20768c":h(()=>a(()=>import("./pdas.html.a4275910.js"),[])),"v-8b9f2cde":h(()=>a(()=>import("./programs.html.48b1db94.js"),[])),"v-55f1b6eb":h(()=>a(()=>import("./transactions.html.1cb6f901.js"),[])),"v-274abcb6":h(()=>a(()=>import("./installation.html.7b74d3ce.js"),[])),"v-02feff2d":h(()=>a(()=>import("./account-maps.html.62c5a232.js"),[])),"v-1b0279b9":h(()=>a(()=>import("./data-migration.html.a0b30eb8.js"),[])),"v-5afd7935":h(()=>a(()=>import("./debugging-solana-programs.html.f0229576.js"),[])),"v-0d9b8586":h(()=>a(()=>import("./feature-parity-testing.html.8332b8fc.js"),[])),"v-5263011e":h(()=>a(()=>import("./get-program-accounts.html.bcc96381.js"),[])),"v-2b8d2a1e":h(()=>a(()=>import("./serialization.html.0d68a263.js"),[])),"v-0ed8daa2":h(()=>a(()=>import("./accounts.html.ef2241b1.js"),[])),"v-3754a87e":h(()=>a(()=>import("./basic-transactions.html.e416b8f1.js"),[])),"v-7ff81144":h(()=>a(()=>import("./keypairs-and-wallets.html.67ed01d6.js"),[])),"v-a2eaafb8":h(()=>a(()=>import("./local-development.html.83d30cd3.js"),[])),"v-7a66f742":h(()=>a(()=>import("./name-service.html.8945e238.js"),[])),"v-1b97e8fe":h(()=>a(()=>import("./nfts.html.3a4dc806.js"),[])),"v-942a1994":h(()=>a(()=>import("./offline-transactions.html.a7cb4369.js"),[])),"v-488e49c6":h(()=>a(()=>import("./programs.html.555fde3c.js"),[])),"v-a20cd7f4":h(()=>a(()=>import("./staking.html.59211856.js"),[])),"v-26036e04":h(()=>a(()=>import("./token.html.cb53fbdc.js"),[])),"v-43987c75":h(()=>a(()=>import("./accounts.html.7d878d86.js"),[])),"v-3c24c435":h(()=>a(()=>import("./pdas.html.9841e8a1.js"),[])),"v-d8d998e8":h(()=>a(()=>import("./programs.html.602c11ba.js"),[])),"v-66cde934":h(()=>a(()=>import("./transactions.html.a1a988c9.js"),[])),"v-567ec360":h(()=>a(()=>import("./installation.html.0fd43b03.js"),[])),"v-332c21dc":h(()=>a(()=>import("./account-maps.html.47c84b4e.js"),[])),"v-611df744":h(()=>a(()=>import("./data-migration.html.95cc310f.js"),[])),"v-23177520":h(()=>a(()=>import("./debugging-solana-programs.html.3aacc1a8.js"),[])),"v-58db5a3c":h(()=>a(()=>import("./feature-parity-testing.html.441250fa.js"),[])),"v-9eb387fa":h(()=>a(()=>import("./get-program-accounts.html.f563091d.js"),[])),"v-94ff924e":h(()=>a(()=>import("./serialization.html.ff6ce54c.js"),[])),"v-75b489de":h(()=>a(()=>import("./versioned-transactions.html.8ea1a104.js"),[])),"v-4802fad8":h(()=>a(()=>import("./accounts.html.5affc5f4.js"),[])),"v-82947d34":h(()=>a(()=>import("./basic-transactions.html.18d8290f.js"),[])),"v-42a951a9":h(()=>a(()=>import("./keypairs-and-wallets.html.f22c3901.js"),[])),"v-18aec9df":h(()=>a(()=>import("./local-development.html.987c051d.js"),[])),"v-654526b2":h(()=>a(()=>import("./name-service.html.c487eb0f.js"),[])),"v-844ed93a":h(()=>a(()=>import("./nfts.html.88b22980.js"),[])),"v-789c339b":h(()=>a(()=>import("./offline-transactions.html.afa81fed.js"),[])),"v-2bf939ab":h(()=>a(()=>import("./programs.html.072a911a.js"),[])),"v-322e9381":h(()=>a(()=>import("./staking.html.f374e09a.js"),[])),"v-684fdf82":h(()=>a(()=>import("./token.html.edf00ffd.js"),[])),"v-3707792a":h(()=>a(()=>import("./accounts.html.25738f4e.js"),[])),"v-1990636a":h(()=>a(()=>import("./pdas.html.35c6152a.js"),[])),"v-f1fb9f7e":h(()=>a(()=>import("./programs.html.2a06f575.js"),[])),"v-4220a59b":h(()=>a(()=>import("./transactions.html.5f4184a8.js"),[])),"v-eeeeb756":h(()=>a(()=>import("./installation.html.a516e599.js"),[])),"v-931b9306":h(()=>a(()=>import("./account-maps.html.a75e89c2.js"),[])),"v-82f5c5ee":h(()=>a(()=>import("./data-migration.html.ec2afdd1.js"),[])),"v-560aa3e5":h(()=>a(()=>import("./debugging-solana-programs.html.29a6acd8.js"),[])),"v-3a76dee6":h(()=>a(()=>import("./feature-parity-testing.html.9edac1d3.js"),[])),"v-27dc2f24":h(()=>a(()=>import("./get-program-accounts.html.5f716fa3.js"),[])),"v-32fe4664":h(()=>a(()=>import("./serialization.html.cd6e6685.js"),[])),"v-f63270ee":h(()=>a(()=>import("./versioned-transactions.html.1e457979.js"),[])),"v-a7f26c02":h(()=>a(()=>import("./accounts.html.9bb37cd5.js"),[])),"v-643001de":h(()=>a(()=>import("./basic-transactions.html.1abb92a6.js"),[])),"v-4e42d094":h(()=>a(()=>import("./keypairs-and-wallets.html.7c453b59.js"),[])),"v-4ab8aad4":h(()=>a(()=>import("./local-development.html.d92b65d2.js"),[])),"v-47ce0692":h(()=>a(()=>import("./name-service.html.92fe381f.js"),[])),"v-9d296f64":h(()=>a(()=>import("./nfts.html.1e42ca51.js"),[])),"v-f7949af4":h(()=>a(()=>import("./offline-transactions.html.5d4f9b52.js"),[])),"v-07fcfdd4":h(()=>a(()=>import("./programs.html.e8e9b38e.js"),[])),"v-0f9a32b6":h(()=>a(()=>import("./staking.html.a5ae14b2.js"),[])),"v-4a9bf8b4":h(()=>a(()=>import("./token.html.495dbb1a.js"),[])),"v-3706649a":h(()=>a(()=>import("./404.html.1873b0e7.js"),[]))},dm={"v-8daa1a0e":()=>a(()=>import("./index.html.4eb1f1ba.js"),[]).then(({data:e})=>e),"v-2d0a8235":()=>a(()=>import("./index.html.abf8251d.js"),[]).then(({data:e})=>e),"v-6bf54404":()=>a(()=>import("./accounts.html.8879a9c1.js"),[]).then(({data:e})=>e),"v-5f0a12cc":()=>a(()=>import("./cpi.html.7575fce3.js"),[]).then(({data:e})=>e),"v-130ca978":()=>a(()=>import("./pdas.html.a117908d.js"),[]).then(({data:e})=>e),"v-882009ca":()=>a(()=>import("./programs.html.4d7d8768.js"),[]).then(({data:e})=>e),"v-63197375":()=>a(()=>import("./transactions.html.188c913a.js"),[]).then(({data:e})=>e),"v-7446c3bf":()=>a(()=>import("./index.html.4943c0a7.js"),[]).then(({data:e})=>e),"v-2d0a8b4a":()=>a(()=>import("./index.html.c8f43f44.js"),[]).then(({data:e})=>e),"v-345c0323":()=>a(()=>import("./auto-approve.html.f8eb4c51.js"),[]).then(({data:e})=>e),"v-2119e6ee":()=>a(()=>import("./distribution.html.1e4a8b99.js"),[]).then(({data:e})=>e),"v-33bd6568":()=>a(()=>import("./energy-system.html.1af785c7.js"),[]).then(({data:e})=>e),"v-687f189c":()=>a(()=>import("./game-examples.html.2dcfe766.js"),[]).then(({data:e})=>e),"v-00547d6c":()=>a(()=>import("./game-sdks.html.75e8b177.js"),[]).then(({data:e})=>e),"v-3edbe329":()=>a(()=>import("./hello-world.html.dbee0508.js"),[]).then(({data:e})=>e),"v-3d8530c8":()=>a(()=>import("./interact-with-tokens.html.f2419630.js"),[]).then(({data:e})=>e),"v-c08c9418":()=>a(()=>import("./intro.html.e782eb8d.js"),[]).then(({data:e})=>e),"v-c4d04f5e":()=>a(()=>import("./nfts-in-games.html.cbea4492.js"),[]).then(({data:e})=>e),"v-4ea6aa5e":()=>a(()=>import("./porting-anchor-to-unity.html.29a097d5.js"),[]).then(({data:e})=>e),"v-1e0c6857":()=>a(()=>import("./saving-game-state.html.0656b997.js"),[]).then(({data:e})=>e),"v-61d730b8":()=>a(()=>import("./store-sol-in-pda.html.9ee3497a.js"),[]).then(({data:e})=>e),"v-2d0a87a8":()=>a(()=>import("./index.html.ed59c6f5.js"),[]).then(({data:e})=>e),"v-4e8563af":()=>a(()=>import("./installation.html.dad10efa.js"),[]).then(({data:e})=>e),"v-76b1e9e3":()=>a(()=>import("./account-maps.html.f32682b9.js"),[]).then(({data:e})=>e),"v-6da58eef":()=>a(()=>import("./data-migration.html.084ac250.js"),[]).then(({data:e})=>e),"v-4684263f":()=>a(()=>import("./debugging-solana-programs.html.24149e6d.js"),[]).then(({data:e})=>e),"v-4740871a":()=>a(()=>import("./feature-parity-testing.html.61786585.js"),[]).then(({data:e})=>e),"v-2b9a5458":()=>a(()=>import("./get-program-accounts.html.4f4498ed.js"),[]).then(({data:e})=>e),"v-2e379628":()=>a(()=>import("./serialization.html.32c33a1b.js"),[]).then(({data:e})=>e),"v-7e81f36f":()=>a(()=>import("./versioned-transactions.html.acaac8aa.js"),[]).then(({data:e})=>e),"v-2d0a94db":()=>a(()=>import("./index.html.ca0d0ddc.js"),[]).then(({data:e})=>e),"v-2d0a983f":()=>a(()=>import("./index.html.60dd15bd.js"),[]).then(({data:e})=>e),"v-2d0a9e0f":()=>a(()=>import("./index.html.618f6255.js"),[]).then(({data:e})=>e),"v-2d0ab112":()=>a(()=>import("./index.html.9bb5a8db.js"),[]).then(({data:e})=>e),"v-6c467d65":()=>a(()=>import("./accounts.html.27fae06b.js"),[]).then(({data:e})=>e),"v-70f9aa12":()=>a(()=>import("./basic-transactions.html.dfe4490b.js"),[]).then(({data:e})=>e),"v-4dc29afa":()=>a(()=>import("./keypairs-and-wallets.html.5d3230ee.js"),[]).then(({data:e})=>e),"v-10b56a2e":()=>a(()=>import("./local-development.html.c5836b09.js"),[]).then(({data:e})=>e),"v-9eccd210":()=>a(()=>import("./name-service.html.5051d1dd.js"),[]).then(({data:e})=>e),"v-d2aec298":()=>a(()=>import("./nfts.html.39ed8786.js"),[]).then(({data:e})=>e),"v-f8950628":()=>a(()=>import("./offline-transactions.html.8d1d2de8.js"),[]).then(({data:e})=>e),"v-877d9708":()=>a(()=>import("./programs.html.98fb8b49.js"),[]).then(({data:e})=>e),"v-26f90ae0":()=>a(()=>import("./staking.html.bbf4c1ac.js"),[]).then(({data:e})=>e),"v-0d096f0e":()=>a(()=>import("./token.html.43db4402.js"),[]).then(({data:e})=>e),"v-2d0abea2":()=>a(()=>import("./index.html.7d9ea062.js"),[]).then(({data:e})=>e),"v-2d0abfd8":()=>a(()=>import("./index.html.7ae71288.js"),[]).then(({data:e})=>e),"v-2d0ac643":()=>a(()=>import("./index.html.5b3f2ada.js"),[]).then(({data:e})=>e),"v-2d0ad528":()=>a(()=>import("./index.html.10c6341f.js"),[]).then(({data:e})=>e),"v-15aaed93":()=>a(()=>import("./index.html.b4991d27.js"),[]).then(({data:e})=>e),"v-8e5be170":()=>a(()=>import("./accounts.html.05949c32.js"),[]).then(({data:e})=>e),"v-f2328ef0":()=>a(()=>import("./pdas.html.77efba8f.js"),[]).then(({data:e})=>e),"v-08ccc65f":()=>a(()=>import("./programs.html.340e959e.js"),[]).then(({data:e})=>e),"v-1256fcb9":()=>a(()=>import("./transactions.html.50802ba1.js"),[]).then(({data:e})=>e),"v-2485abf3":()=>a(()=>import("./installation.html.98badae7.js"),[]).then(({data:e})=>e),"v-1832f5c2":()=>a(()=>import("./account-maps.html.17bd8d7d.js"),[]).then(({data:e})=>e),"v-70204b2b":()=>a(()=>import("./data-migration.html.50964a4b.js"),[]).then(({data:e})=>e),"v-16deac83":()=>a(()=>import("./debugging-solana-programs.html.3eeeb833.js"),[]).then(({data:e})=>e),"v-732f06a2":()=>a(()=>import("./feature-parity-testing.html.94cf4ee3.js"),[]).then(({data:e})=>e),"v-22a67510":()=>a(()=>import("./get-program-accounts.html.7e74d8ff.js"),[]).then(({data:e})=>e),"v-309da254":()=>a(()=>import("./retrying-transactions.html.8880b234.js"),[]).then(({data:e})=>e),"v-5796626c":()=>a(()=>import("./serialization.html.f6d36f31.js"),[]).then(({data:e})=>e),"v-2d09cebe":()=>a(()=>import("./accounts.html.1c2ce3f3.js"),[]).then(({data:e})=>e),"v-9ce8299a":()=>a(()=>import("./basic-transactions.html.3e9e6a63.js"),[]).then(({data:e})=>e),"v-4ec78794":()=>a(()=>import("./keypairs-and-wallets.html.7c422ff4.js"),[]).then(({data:e})=>e),"v-32949b1c":()=>a(()=>import("./local-development.html.f5643536.js"),[]).then(({data:e})=>e),"v-01539798":()=>a(()=>import("./name-service.html.326a6c13.js"),[]).then(({data:e})=>e),"v-6bf79020":()=>a(()=>import("./nfts.html.d679a608.js"),[]).then(({data:e})=>e),"v-0e8f1e28":()=>a(()=>import("./offline-transactions.html.d4e0be3d.js"),[]).then(({data:e})=>e),"v-3975cfb8":()=>a(()=>import("./programs.html.11032af6.js"),[]).then(({data:e})=>e),"v-7cf087d4":()=>a(()=>import("./staking.html.9da955fb.js"),[]).then(({data:e})=>e),"v-4520fd52":()=>a(()=>import("./token.html.7f6e6e11.js"),[]).then(({data:e})=>e),"v-a0b9b104":()=>a(()=>import("./accounts.html.3d33092a.js"),[]).then(({data:e})=>e),"v-9a7329dc":()=>a(()=>import("./cpi.html.25f2d5bd.js"),[]).then(({data:e})=>e),"v-1a485bbe":()=>a(()=>import("./pdas.html.02bdc9f3.js"),[]).then(({data:e})=>e),"v-00c442d6":()=>a(()=>import("./programs.html.d0219ea7.js"),[]).then(({data:e})=>e),"v-e455ec22":()=>a(()=>import("./transactions.html.74d43318.js"),[]).then(({data:e})=>e),"v-eb393c2e":()=>a(()=>import("./auto-approve.html.78a21927.js"),[]).then(({data:e})=>e),"v-772145b4":()=>a(()=>import("./distribution.html.5054629b.js"),[]).then(({data:e})=>e),"v-5105c746":()=>a(()=>import("./energy-system.html.247dc971.js"),[]).then(({data:e})=>e),"v-5938dad4":()=>a(()=>import("./game-examples.html.40ac5dd2.js"),[]).then(({data:e})=>e),"v-f1adf734":()=>a(()=>import("./game-sdks.html.b7b1489e.js"),[]).then(({data:e})=>e),"v-62aa93a3":()=>a(()=>import("./hello-world.html.e99409d5.js"),[]).then(({data:e})=>e),"v-6a3c698e":()=>a(()=>import("./interact-with-tokens.html.3c85d257.js"),[]).then(({data:e})=>e),"v-a2e66c24":()=>a(()=>import("./intro.html.51f00446.js"),[]).then(({data:e})=>e),"v-087c524b":()=>a(()=>import("./nfts-in-games.html.5898ff02.js"),[]).then(({data:e})=>e),"v-7664744b":()=>a(()=>import("./porting-anchor-to-unity.html.8ad16b00.js"),[]).then(({data:e})=>e),"v-2dcf5551":()=>a(()=>import("./saving-game-state.html.2ee97311.js"),[]).then(({data:e})=>e),"v-0122f36a":()=>a(()=>import("./store-sol-in-pda.html.4ff617de.js"),[]).then(({data:e})=>e),"v-8e9578ae":()=>a(()=>import("./installation.html.ef551b6c.js"),[]).then(({data:e})=>e),"v-668d6eae":()=>a(()=>import("./account-maps.html.c9249bbc.js"),[]).then(({data:e})=>e),"v-5f505435":()=>a(()=>import("./data-migration.html.06870b65.js"),[]).then(({data:e})=>e),"v-556f7939":()=>a(()=>import("./debugging-solana-programs.html.1d099feb.js"),[]).then(({data:e})=>e),"v-8fa8488e":()=>a(()=>import("./feature-parity-testing.html.61551d89.js"),[]).then(({data:e})=>e),"v-16ea0e9a":()=>a(()=>import("./get-program-accounts.html.88cda781.js"),[]).then(({data:e})=>e),"v-cdc7dfbc":()=>a(()=>import("./serialization.html.279a312f.js"),[]).then(({data:e})=>e),"v-5a4e12b5":()=>a(()=>import("./versioned-transactions.html.e1209342.js"),[]).then(({data:e})=>e),"v-7b6447aa":()=>a(()=>import("./accounts.html.f6ab334e.js"),[]).then(({data:e})=>e),"v-b9616b86":()=>a(()=>import("./basic-transactions.html.13d601ed.js"),[]).then(({data:e})=>e),"v-670400c0":()=>a(()=>import("./keypairs-and-wallets.html.35579864.js"),[]).then(({data:e})=>e),"v-7ae54a28":()=>a(()=>import("./local-development.html.0592ee0b.js"),[]).then(({data:e})=>e),"v-3aafba84":()=>a(()=>import("./name-service.html.c5f60f0b.js"),[]).then(({data:e})=>e),"v-87eb5f0c":()=>a(()=>import("./nfts.html.8ab155e7.js"),[]).then(({data:e})=>e),"v-c6123a9c":()=>a(()=>import("./offline-transactions.html.c95a953c.js"),[]).then(({data:e})=>e),"v-12489342":()=>a(()=>import("./programs.html.a2b54a7a.js"),[]).then(({data:e})=>e),"v-10522b0a":()=>a(()=>import("./staking.html.7be45709.js"),[]).then(({data:e})=>e),"v-d84413f0":()=>a(()=>import("./token.html.e2d8e013.js"),[]).then(({data:e})=>e),"v-598bfdda":()=>a(()=>import("./accounts.html.c9e84ab5.js"),[]).then(({data:e})=>e),"v-034daf46":()=>a(()=>import("./cpi.html.667a7166.js"),[]).then(({data:e})=>e),"v-410d47d3":()=>a(()=>import("./pdas.html.b3879735.js"),[]).then(({data:e})=>e),"v-2334b82a":()=>a(()=>import("./programs.html.23a73b36.js"),[]).then(({data:e})=>e),"v-1ee9ddf8":()=>a(()=>import("./transactions.html.ba8c17fa.js"),[]).then(({data:e})=>e),"v-3c3bf874":()=>a(()=>import("./auto-approve.html.00c95edb.js"),[]).then(({data:e})=>e),"v-28f9dc3f":()=>a(()=>import("./distribution.html.566e7a4c.js"),[]).then(({data:e})=>e),"v-4b7ffbca":()=>a(()=>import("./energy-system.html.71e02b64.js"),[]).then(({data:e})=>e),"v-5c9dcd6b":()=>a(()=>import("./game-examples.html.4c517700.js"),[]).then(({data:e})=>e),"v-16181c8a":()=>a(()=>import("./game-sdks.html.3a17cfa1.js"),[]).then(({data:e})=>e),"v-ed210090":()=>a(()=>import("./hello-world.html.e42a81e2.js"),[]).then(({data:e})=>e),"v-5e474519":()=>a(()=>import("./interact-with-tokens.html.4c6e3333.js"),[]).then(({data:e})=>e),"v-5625a9c3":()=>a(()=>import("./intro.html.48bcd940.js"),[]).then(({data:e})=>e),"v-dc92e5c0":()=>a(()=>import("./nfts-in-games.html.31ac6411.js"),[]).then(({data:e})=>e),"v-1c322e40":()=>a(()=>import("./porting-anchor-to-unity.html.a9555d2b.js"),[]).then(({data:e})=>e),"v-71d3c4b4":()=>a(()=>import("./saving-game-state.html.e30bfd02.js"),[]).then(({data:e})=>e),"v-50674c75":()=>a(()=>import("./store-sol-in-pda.html.e343d4f5.js"),[]).then(({data:e})=>e),"v-4605d97e":()=>a(()=>import("./installation.html.3b279ba8.js"),[]).then(({data:e})=>e),"v-7e91df34":()=>a(()=>import("./account-maps.html.2bcb32db.js"),[]).then(({data:e})=>e),"v-05451800":()=>a(()=>import("./data-migration.html.9963dda2.js"),[]).then(({data:e})=>e),"v-0bb1c6e4":()=>a(()=>import("./debugging-solana-programs.html.43aa08db.js"),[]).then(({data:e})=>e),"v-5623fef8":()=>a(()=>import("./feature-parity-testing.html.d784a27d.js"),[]).then(({data:e})=>e),"v-0af4ea25":()=>a(()=>import("./get-program-accounts.html.1208b27a.js"),[]).then(({data:e})=>e),"v-22564af7":()=>a(()=>import("./serialization.html.99337bc6.js"),[]).then(({data:e})=>e),"v-77103780":()=>a(()=>import("./versioned-transactions.html.f7668ac4.js"),[]).then(({data:e})=>e),"v-742672b6":()=>a(()=>import("./accounts.html.d07565e6.js"),[]).then(({data:e})=>e),"v-7fdd21f0":()=>a(()=>import("./basic-transactions.html.b8e697ee.js"),[]).then(({data:e})=>e),"v-5bd01ecb":()=>a(()=>import("./keypairs-and-wallets.html.8d42bf89.js"),[]).then(({data:e})=>e),"v-0835dffd":()=>a(()=>import("./local-development.html.c3972821.js"),[]).then(({data:e})=>e),"v-31ec7bc9":()=>a(()=>import("./name-service.html.b1fdc398.js"),[]).then(({data:e})=>e),"v-3331e485":()=>a(()=>import("./nfts.html.965a9b0c.js"),[]).then(({data:e})=>e),"v-dc79fe86":()=>a(()=>import("./offline-transactions.html.0ba69adc.js"),[]).then(({data:e})=>e),"v-77bdac66":()=>a(()=>import("./programs.html.f54b94ed.js"),[]).then(({data:e})=>e),"v-3717171f":()=>a(()=>import("./staking.html.8fb2ba56.js"),[]).then(({data:e})=>e),"v-01a8e35d":()=>a(()=>import("./token.html.a4239a10.js"),[]).then(({data:e})=>e),"v-08458c16":()=>a(()=>import("./accounts.html.fab56f07.js"),[]).then(({data:e})=>e),"v-79377c96":()=>a(()=>import("./pdas.html.4a946dac.js"),[]).then(({data:e})=>e),"v-4bd7f10c":()=>a(()=>import("./programs.html.d01e378b.js"),[]).then(({data:e})=>e),"v-314308e6":()=>a(()=>import("./transactions.html.cfd147cc.js"),[]).then(({data:e})=>e),"v-389f60e0":()=>a(()=>import("./installation.html.5338573c.js"),[]).then(({data:e})=>e),"v-471a2192":()=>a(()=>import("./account-maps.html.5696ae7f.js"),[]).then(({data:e})=>e),"v-7642d244":()=>a(()=>import("./data-migration.html.86082ff9.js"),[]).then(({data:e})=>e),"v-6c0a22f0":()=>a(()=>import("./debugging-solana-programs.html.ede954b0.js"),[]).then(({data:e})=>e),"v-35856562":()=>a(()=>import("./feature-parity-testing.html.b2696a90.js"),[]).then(({data:e})=>e),"v-3d8822fa":()=>a(()=>import("./get-program-accounts.html.94ffca18.js"),[]).then(({data:e})=>e),"v-6ad65459":()=>a(()=>import("./serialization.html.6a6635c1.js"),[]).then(({data:e})=>e),"v-3caeb514":()=>a(()=>import("./accounts.html.b91c3a6f.js"),[]).then(({data:e})=>e),"v-20a8d3e6":()=>a(()=>import("./basic-transactions.html.f7122c53.js"),[]).then(({data:e})=>e),"v-17bc77ae":()=>a(()=>import("./keypairs-and-wallets.html.87a50ba3.js"),[]).then(({data:e})=>e),"v-0a613142":()=>a(()=>import("./local-development.html.b97186da.js"),[]).then(({data:e})=>e),"v-1db05f27":()=>a(()=>import("./name-service.html.e0d6e448.js"),[]).then(({data:e})=>e),"v-6f8605e3":()=>a(()=>import("./nfts.html.f28f6d5c.js"),[]).then(({data:e})=>e),"v-2a14a61b":()=>a(()=>import("./offline-transactions.html.269432a1.js"),[]).then(({data:e})=>e),"v-e6ad27aa":()=>a(()=>import("./programs.html.96b262ce.js"),[]).then(({data:e})=>e),"v-8d23ddfe":()=>a(()=>import("./staking.html.76101920.js"),[]).then(({data:e})=>e),"v-4fd8edbf":()=>a(()=>import("./token.html.3affc20f.js"),[]).then(({data:e})=>e),"v-da3cf63c":()=>a(()=>import("./accounts.html.79c0ca0e.js"),[]).then(({data:e})=>e),"v-0bf50b22":()=>a(()=>import("./pdas.html.27a51730.js"),[]).then(({data:e})=>e),"v-3a47880e":()=>a(()=>import("./programs.html.740744ad.js"),[]).then(({data:e})=>e),"v-73c3d55a":()=>a(()=>import("./transactions.html.263aeafa.js"),[]).then(({data:e})=>e),"v-02e9060d":()=>a(()=>import("./installation.html.447c9172.js"),[]).then(({data:e})=>e),"v-10a285c5":()=>a(()=>import("./account-maps.html.f4daf1b2.js"),[]).then(({data:e})=>e),"v-4ddeba51":()=>a(()=>import("./data-migration.html.db91eb39.js"),[]).then(({data:e})=>e),"v-0173699d":()=>a(()=>import("./debugging-solana-programs.html.02363b40.js"),[]).then(({data:e})=>e),"v-971f3456":()=>a(()=>import("./feature-parity-testing.html.abd7566e.js"),[]).then(({data:e})=>e),"v-307b2094":()=>a(()=>import("./get-program-accounts.html.d8ef5734.js"),[]).then(({data:e})=>e),"v-5b4b12f4":()=>a(()=>import("./serialization.html.baac0ece.js"),[]).then(({data:e})=>e),"v-06371947":()=>a(()=>import("./accounts.html.cf985a2a.js"),[]).then(({data:e})=>e),"v-c0d8574e":()=>a(()=>import("./basic-transactions.html.710d7d5d.js"),[]).then(({data:e})=>e),"v-644e73dc":()=>a(()=>import("./keypairs-and-wallets.html.caac507d.js"),[]).then(({data:e})=>e),"v-75cde6e8":()=>a(()=>import("./local-development.html.7e1bd7bf.js"),[]).then(({data:e})=>e),"v-673571da":()=>a(()=>import("./name-service.html.e670bb57.js"),[]).then(({data:e})=>e),"v-931308d4":()=>a(()=>import("./nfts.html.61f329ef.js"),[]).then(({data:e})=>e),"v-cb7d5464":()=>a(()=>import("./offline-transactions.html.805d36b8.js"),[]).then(({data:e})=>e),"v-5631d05e":()=>a(()=>import("./programs.html.db98f647.js"),[]).then(({data:e})=>e),"v-01feda6e":()=>a(()=>import("./staking.html.e8c26eca.js"),[]).then(({data:e})=>e),"v-3211a328":()=>a(()=>import("./token.html.59c78a7f.js"),[]).then(({data:e})=>e),"v-179e82fe":()=>a(()=>import("./accounts.html.70ea6ada.js"),[]).then(({data:e})=>e),"v-52ffdf92":()=>a(()=>import("./cpi.html.a071110c.js"),[]).then(({data:e})=>e),"v-fd851184":()=>a(()=>import("./pdas.html.1bf322c2.js"),[]).then(({data:e})=>e),"v-67993a15":()=>a(()=>import("./programs.html.98e92214.js"),[]).then(({data:e})=>e),"v-ec92b522":()=>a(()=>import("./transactions.html.aceea138.js"),[]).then(({data:e})=>e),"v-429dff29":()=>a(()=>import("./installation.html.2e4550cf.js"),[]).then(({data:e})=>e),"v-44679d29":()=>a(()=>import("./account-maps.html.bdfb893c.js"),[]).then(({data:e})=>e),"v-b688ee96":()=>a(()=>import("./data-migration.html.6e4730c8.js"),[]).then(({data:e})=>e),"v-04e3168e":()=>a(()=>import("./debugging-solana-programs.html.73a43e11.js"),[]).then(({data:e})=>e),"v-6b5a9039":()=>a(()=>import("./feature-parity-testing.html.e7b6289c.js"),[]).then(({data:e})=>e),"v-d18839cc":()=>a(()=>import("./get-program-accounts.html.bc5b3f33.js"),[]).then(({data:e})=>e),"v-17384ba2":()=>a(()=>import("./serialization.html.0fd086ee.js"),[]).then(({data:e})=>e),"v-0d7cc735":()=>a(()=>import("./versioned-transactions.html.cb88ab6b.js"),[]).then(({data:e})=>e),"v-39fc30ab":()=>a(()=>import("./accounts.html.705daa54.js"),[]).then(({data:e})=>e),"v-567dfebd":()=>a(()=>import("./basic-transactions.html.e4233694.js"),[]).then(({data:e})=>e),"v-09579540":()=>a(()=>import("./keypairs-and-wallets.html.4fa11b3e.js"),[]).then(({data:e})=>e),"v-04ce05a8":()=>a(()=>import("./local-development.html.2a116d81.js"),[]).then(({data:e})=>e),"v-7a18373e":()=>a(()=>import("./name-service.html.65503a5f.js"),[]).then(({data:e})=>e),"v-6d16e4fa":()=>a(()=>import("./nfts.html.8f57b7b1.js"),[]).then(({data:e})=>e),"v-3f4a7732":()=>a(()=>import("./offline-transactions.html.1d7f75c0.js"),[]).then(({data:e})=>e),"v-ec12307c":()=>a(()=>import("./programs.html.6e6eaba0.js"),[]).then(({data:e})=>e),"v-7747468a":()=>a(()=>import("./staking.html.0e9ae4bd.js"),[]).then(({data:e})=>e),"v-0463f188":()=>a(()=>import("./token.html.abb20884.js"),[]).then(({data:e})=>e),"v-52cd49a4":()=>a(()=>import("./accounts.html.8e89eb52.js"),[]).then(({data:e})=>e),"v-4a4be76e":()=>a(()=>import("./pdas.html.360db77f.js"),[]).then(({data:e})=>e),"v-26941245":()=>a(()=>import("./programs.html.12722776.js"),[]).then(({data:e})=>e),"v-2229e59f":()=>a(()=>import("./transactions.html.4904b5fe.js"),[]).then(({data:e})=>e),"v-e97c194e":()=>a(()=>import("./installation.html.9dc89678.js"),[]).then(({data:e})=>e),"v-c5b19a0e":()=>a(()=>import("./account-maps.html.d79562dd.js"),[]).then(({data:e})=>e),"v-68262af6":()=>a(()=>import("./data-migration.html.cd8a5967.js"),[]).then(({data:e})=>e),"v-a4865e2e":()=>a(()=>import("./debugging-solana-programs.html.6d280979.js"),[]).then(({data:e})=>e),"v-37352209":()=>a(()=>import("./feature-parity-testing.html.a8a66110.js"),[]).then(({data:e})=>e),"v-0d30a8ea":()=>a(()=>import("./get-program-accounts.html.dfc1f9ed.js"),[]).then(({data:e})=>e),"v-5329205c":()=>a(()=>import("./serialization.html.4b397ef0.js"),[]).then(({data:e})=>e),"v-da88730a":()=>a(()=>import("./accounts.html.ff5e6a4d.js"),[]).then(({data:e})=>e),"v-2258908d":()=>a(()=>import("./basic-transactions.html.22d5c3fa.js"),[]).then(({data:e})=>e),"v-48d4f310":()=>a(()=>import("./keypairs-and-wallets.html.96505086.js"),[]).then(({data:e})=>e),"v-4d71f9d8":()=>a(()=>import("./local-development.html.0eff045a.js"),[]).then(({data:e})=>e),"v-cb0f35e4":()=>a(()=>import("./name-service.html.d6069fdf.js"),[]).then(({data:e})=>e),"v-b3ac3a6c":()=>a(()=>import("./nfts.html.cf97bb6d.js"),[]).then(({data:e})=>e),"v-7ec7d502":()=>a(()=>import("./offline-transactions.html.cff454eb.js"),[]).then(({data:e})=>e),"v-3a9304dc":()=>a(()=>import("./programs.html.6895a158.js"),[]).then(({data:e})=>e),"v-4055b6ba":()=>a(()=>import("./staking.html.ad2f2638.js"),[]).then(({data:e})=>e),"v-249ea490":()=>a(()=>import("./token.html.edd7bd6b.js"),[]).then(({data:e})=>e),"v-2c987e4b":()=>a(()=>import("./accounts.html.d72d5885.js"),[]).then(({data:e})=>e),"v-203f4825":()=>a(()=>import("./cpi.html.dc41f18c.js"),[]).then(({data:e})=>e),"v-5beb210b":()=>a(()=>import("./pdas.html.580eb019.js"),[]).then(({data:e})=>e),"v-7c933562":()=>a(()=>import("./programs.html.2d618e60.js"),[]).then(({data:e})=>e),"v-4f78323c":()=>a(()=>import("./transactions.html.f505a02d.js"),[]).then(({data:e})=>e),"v-c3a0e694":()=>a(()=>import("./installation.html.eeb039ec.js"),[]).then(({data:e})=>e),"v-8121a608":()=>a(()=>import("./account-maps.html.2fa44b58.js"),[]).then(({data:e})=>e),"v-7c1e6fc8":()=>a(()=>import("./data-migration.html.352a418b.js"),[]).then(({data:e})=>e),"v-19571874":()=>a(()=>import("./debugging-solana-programs.html.30d528f0.js"),[]).then(({data:e})=>e),"v-fc0a9768":()=>a(()=>import("./feature-parity-testing.html.a793ec94.js"),[]).then(({data:e})=>e),"v-eca82026":()=>a(()=>import("./get-program-accounts.html.18585c23.js"),[]).then(({data:e})=>e),"v-05ba93a2":()=>a(()=>import("./serialization.html.7fc385dd.js"),[]).then(({data:e})=>e),"v-241ceb48":()=>a(()=>import("./versioned-transactions.html.8ddb12df.js"),[]).then(({data:e})=>e),"v-95f87f04":()=>a(()=>import("./accounts.html.9e729942.js"),[]).then(({data:e})=>e),"v-6d1e22d0":()=>a(()=>import("./basic-transactions.html.508e4c5e.js"),[]).then(({data:e})=>e),"v-0f01feda":()=>a(()=>import("./keypairs-and-wallets.html.06ba1dde.js"),[]).then(({data:e})=>e),"v-605f9335":()=>a(()=>import("./local-development.html.fd41bc0d.js"),[]).then(({data:e})=>e),"v-045da591":()=>a(()=>import("./name-service.html.8fa8af28.js"),[]).then(({data:e})=>e),"v-262d564d":()=>a(()=>import("./nfts.html.b43c7325.js"),[]).then(({data:e})=>e),"v-2e71e285":()=>a(()=>import("./offline-transactions.html.9e334e4b.js"),[]).then(({data:e})=>e),"v-04fe7795":()=>a(()=>import("./programs.html.55412d52.js"),[]).then(({data:e})=>e),"v-51f4f057":()=>a(()=>import("./staking.html.192ee479.js"),[]).then(({data:e})=>e),"v-6e1baa95":()=>a(()=>import("./token.html.060a50ce.js"),[]).then(({data:e})=>e),"v-3f8c76bb":()=>a(()=>import("./accounts.html.9a24f48b.js"),[]).then(({data:e})=>e),"v-310cd17b":()=>a(()=>import("./pdas.html.8ac3fb57.js"),[]).then(({data:e})=>e),"v-e0f1a45c":()=>a(()=>import("./programs.html.ee69815a.js"),[]).then(({data:e})=>e),"v-5dda72ac":()=>a(()=>import("./transactions.html.a94c32b0.js"),[]).then(({data:e})=>e),"v-c5f91db4":()=>a(()=>import("./installation.html.04bddf91.js"),[]).then(({data:e})=>e),"v-e2f8eae8":()=>a(()=>import("./account-maps.html.54fde3f5.js"),[]).then(({data:e})=>e),"v-50dcad50":()=>a(()=>import("./data-migration.html.c9b6d0c5.js"),[]).then(({data:e})=>e),"v-387ebf94":()=>a(()=>import("./debugging-solana-programs.html.125832d7.js"),[]).then(({data:e})=>e),"v-5da35ddc":()=>a(()=>import("./feature-parity-testing.html.c3ce27d5.js"),[]).then(({data:e})=>e),"v-4791bd7d":()=>a(()=>import("./get-program-accounts.html.d60be8fc.js"),[]).then(({data:e})=>e),"v-109a0a9f":()=>a(()=>import("./serialization.html.d3083af5.js"),[]).then(({data:e})=>e),"v-0074d650":()=>a(()=>import("./versioned-transactions.html.dc527468.js"),[]).then(({data:e})=>e),"v-f7cfc3e4":()=>a(()=>import("./accounts.html.6a7a3655.js"),[]).then(({data:e})=>e),"v-48c6cc60":()=>a(()=>import("./basic-transactions.html.145d9f79.js"),[]).then(({data:e})=>e),"v-e6b8f3ba":()=>a(()=>import("./keypairs-and-wallets.html.06b48140.js"),[]).then(({data:e})=>e),"v-5f3377a5":()=>a(()=>import("./local-development.html.8d6577e9.js"),[]).then(({data:e})=>e),"v-4fe8bb21":()=>a(()=>import("./name-service.html.2caf8c15.js"),[]).then(({data:e})=>e),"v-00aefbdd":()=>a(()=>import("./nfts.html.d0725425.js"),[]).then(({data:e})=>e),"v-7ad32fd6":()=>a(()=>import("./offline-transactions.html.694e5a9c.js"),[]).then(({data:e})=>e),"v-57da55b6":()=>a(()=>import("./programs.html.39ac6b79.js"),[]).then(({data:e})=>e),"v-2716a0c7":()=>a(()=>import("./staking.html.6dbe22bd.js"),[]).then(({data:e})=>e),"v-386291f6":()=>a(()=>import("./token.html.997564bc.js"),[]).then(({data:e})=>e),"v-46a93876":()=>a(()=>import("./accounts.html.5a5d0844.js"),[]).then(({data:e})=>e),"v-5aefd385":()=>a(()=>import("./pdas.html.2b207b9f.js"),[]).then(({data:e})=>e),"v-2ca61adc":()=>a(()=>import("./programs.html.3d46bb1d.js"),[]).then(({data:e})=>e),"v-4847cab6":()=>a(()=>import("./transactions.html.ee5db7dc.js"),[]).then(({data:e})=>e),"v-bd0a22a0":()=>a(()=>import("./installation.html.f389c1e2.js"),[]).then(({data:e})=>e),"v-bdfe6c7c":()=>a(()=>import("./account-maps.html.c1ccf667.js"),[]).then(({data:e})=>e),"v-3fbbf30e":()=>a(()=>import("./data-migration.html.81a46ce7.js"),[]).then(({data:e})=>e),"v-846b6e80":()=>a(()=>import("./debugging-solana-programs.html.be9db9a6.js"),[]).then(({data:e})=>e),"v-2fc8dcdc":()=>a(()=>import("./feature-parity-testing.html.1da58904.js"),[]).then(({data:e})=>e),"v-aa61329a":()=>a(()=>import("./get-program-accounts.html.34a6b3c3.js"),[]).then(({data:e})=>e),"v-4dc4b229":()=>a(()=>import("./serialization.html.7c84274e.js"),[]).then(({data:e})=>e),"v-d2d54578":()=>a(()=>import("./accounts.html.dde6cff9.js"),[]).then(({data:e})=>e),"v-5981ffd4":()=>a(()=>import("./basic-transactions.html.598e40ad.js"),[]).then(({data:e})=>e),"v-59dda459":()=>a(()=>import("./keypairs-and-wallets.html.cc9959ad.js"),[]).then(({data:e})=>e),"v-63aaf52f":()=>a(()=>import("./local-development.html.61336a2a.js"),[]).then(({data:e})=>e),"v-56a76f57":()=>a(()=>import("./name-service.html.1a8fc34e.js"),[]).then(({data:e})=>e),"v-41e84613":()=>a(()=>import("./nfts.html.fdb7230c.js"),[]).then(({data:e})=>e),"v-e05ef36a":()=>a(()=>import("./offline-transactions.html.9b30c0d6.js"),[]).then(({data:e})=>e),"v-32dfd74a":()=>a(()=>import("./programs.html.23836cb0.js"),[]).then(({data:e})=>e),"v-50f9a2d1":()=>a(()=>import("./staking.html.cffbd136.js"),[]).then(({data:e})=>e),"v-6c8298e2":()=>a(()=>import("./token.html.64ba1d3c.js"),[]).then(({data:e})=>e),"v-6a35b27a":()=>a(()=>import("./accounts.html.149df989.js"),[]).then(({data:e})=>e),"v-8e20768c":()=>a(()=>import("./pdas.html.eca9a894.js"),[]).then(({data:e})=>e),"v-8b9f2cde":()=>a(()=>import("./programs.html.fcfb4c07.js"),[]).then(({data:e})=>e),"v-55f1b6eb":()=>a(()=>import("./transactions.html.f33ee4e9.js"),[]).then(({data:e})=>e),"v-274abcb6":()=>a(()=>import("./installation.html.fd583852.js"),[]).then(({data:e})=>e),"v-02feff2d":()=>a(()=>import("./account-maps.html.2bc51567.js"),[]).then(({data:e})=>e),"v-1b0279b9":()=>a(()=>import("./data-migration.html.159d137d.js"),[]).then(({data:e})=>e),"v-5afd7935":()=>a(()=>import("./debugging-solana-programs.html.afe6a517.js"),[]).then(({data:e})=>e),"v-0d9b8586":()=>a(()=>import("./feature-parity-testing.html.270f9679.js"),[]).then(({data:e})=>e),"v-5263011e":()=>a(()=>import("./get-program-accounts.html.43b20beb.js"),[]).then(({data:e})=>e),"v-2b8d2a1e":()=>a(()=>import("./serialization.html.b936ab13.js"),[]).then(({data:e})=>e),"v-0ed8daa2":()=>a(()=>import("./accounts.html.928ccf41.js"),[]).then(({data:e})=>e),"v-3754a87e":()=>a(()=>import("./basic-transactions.html.81d4c6bc.js"),[]).then(({data:e})=>e),"v-7ff81144":()=>a(()=>import("./keypairs-and-wallets.html.f62ce6aa.js"),[]).then(({data:e})=>e),"v-a2eaafb8":()=>a(()=>import("./local-development.html.2abc6315.js"),[]).then(({data:e})=>e),"v-7a66f742":()=>a(()=>import("./name-service.html.625e197d.js"),[]).then(({data:e})=>e),"v-1b97e8fe":()=>a(()=>import("./nfts.html.595f8f64.js"),[]).then(({data:e})=>e),"v-942a1994":()=>a(()=>import("./offline-transactions.html.81a50c51.js"),[]).then(({data:e})=>e),"v-488e49c6":()=>a(()=>import("./programs.html.d21ae222.js"),[]).then(({data:e})=>e),"v-a20cd7f4":()=>a(()=>import("./staking.html.65c2cb9f.js"),[]).then(({data:e})=>e),"v-26036e04":()=>a(()=>import("./token.html.e135cbcd.js"),[]).then(({data:e})=>e),"v-43987c75":()=>a(()=>import("./accounts.html.34134782.js"),[]).then(({data:e})=>e),"v-3c24c435":()=>a(()=>import("./pdas.html.ea02eb75.js"),[]).then(({data:e})=>e),"v-d8d998e8":()=>a(()=>import("./programs.html.34dde9fb.js"),[]).then(({data:e})=>e),"v-66cde934":()=>a(()=>import("./transactions.html.63c9ce66.js"),[]).then(({data:e})=>e),"v-567ec360":()=>a(()=>import("./installation.html.91886c17.js"),[]).then(({data:e})=>e),"v-332c21dc":()=>a(()=>import("./account-maps.html.938d8c12.js"),[]).then(({data:e})=>e),"v-611df744":()=>a(()=>import("./data-migration.html.ce4aed9f.js"),[]).then(({data:e})=>e),"v-23177520":()=>a(()=>import("./debugging-solana-programs.html.c57d7b64.js"),[]).then(({data:e})=>e),"v-58db5a3c":()=>a(()=>import("./feature-parity-testing.html.c4705572.js"),[]).then(({data:e})=>e),"v-9eb387fa":()=>a(()=>import("./get-program-accounts.html.f1b24dac.js"),[]).then(({data:e})=>e),"v-94ff924e":()=>a(()=>import("./serialization.html.aa4dde2f.js"),[]).then(({data:e})=>e),"v-75b489de":()=>a(()=>import("./versioned-transactions.html.82642eca.js"),[]).then(({data:e})=>e),"v-4802fad8":()=>a(()=>import("./accounts.html.8f47d5db.js"),[]).then(({data:e})=>e),"v-82947d34":()=>a(()=>import("./basic-transactions.html.e7edd2e8.js"),[]).then(({data:e})=>e),"v-42a951a9":()=>a(()=>import("./keypairs-and-wallets.html.8a36f79a.js"),[]).then(({data:e})=>e),"v-18aec9df":()=>a(()=>import("./local-development.html.3d4bf8da.js"),[]).then(({data:e})=>e),"v-654526b2":()=>a(()=>import("./name-service.html.34b8f57a.js"),[]).then(({data:e})=>e),"v-844ed93a":()=>a(()=>import("./nfts.html.522cff97.js"),[]).then(({data:e})=>e),"v-789c339b":()=>a(()=>import("./offline-transactions.html.dad115e4.js"),[]).then(({data:e})=>e),"v-2bf939ab":()=>a(()=>import("./programs.html.7c34ad36.js"),[]).then(({data:e})=>e),"v-322e9381":()=>a(()=>import("./staking.html.87a92c5a.js"),[]).then(({data:e})=>e),"v-684fdf82":()=>a(()=>import("./token.html.c6b0e0c2.js"),[]).then(({data:e})=>e),"v-3707792a":()=>a(()=>import("./accounts.html.c4066a49.js"),[]).then(({data:e})=>e),"v-1990636a":()=>a(()=>import("./pdas.html.19706e9c.js"),[]).then(({data:e})=>e),"v-f1fb9f7e":()=>a(()=>import("./programs.html.b67b45cc.js"),[]).then(({data:e})=>e),"v-4220a59b":()=>a(()=>import("./transactions.html.8e008dcb.js"),[]).then(({data:e})=>e),"v-eeeeb756":()=>a(()=>import("./installation.html.1f30223e.js"),[]).then(({data:e})=>e),"v-931b9306":()=>a(()=>import("./account-maps.html.ec99597b.js"),[]).then(({data:e})=>e),"v-82f5c5ee":()=>a(()=>import("./data-migration.html.6ed17ef4.js"),[]).then(({data:e})=>e),"v-560aa3e5":()=>a(()=>import("./debugging-solana-programs.html.d0ab2086.js"),[]).then(({data:e})=>e),"v-3a76dee6":()=>a(()=>import("./feature-parity-testing.html.0478ce69.js"),[]).then(({data:e})=>e),"v-27dc2f24":()=>a(()=>import("./get-program-accounts.html.c29868e4.js"),[]).then(({data:e})=>e),"v-32fe4664":()=>a(()=>import("./serialization.html.8a29cfeb.js"),[]).then(({data:e})=>e),"v-f63270ee":()=>a(()=>import("./versioned-transactions.html.027ceb3d.js"),[]).then(({data:e})=>e),"v-a7f26c02":()=>a(()=>import("./accounts.html.5a2213a5.js"),[]).then(({data:e})=>e),"v-643001de":()=>a(()=>import("./basic-transactions.html.1913df43.js"),[]).then(({data:e})=>e),"v-4e42d094":()=>a(()=>import("./keypairs-and-wallets.html.c98a65c6.js"),[]).then(({data:e})=>e),"v-4ab8aad4":()=>a(()=>import("./local-development.html.720fba0c.js"),[]).then(({data:e})=>e),"v-47ce0692":()=>a(()=>import("./name-service.html.38938728.js"),[]).then(({data:e})=>e),"v-9d296f64":()=>a(()=>import("./nfts.html.2c1ad270.js"),[]).then(({data:e})=>e),"v-f7949af4":()=>a(()=>import("./offline-transactions.html.7dc3f34e.js"),[]).then(({data:e})=>e),"v-07fcfdd4":()=>a(()=>import("./programs.html.bc91a8b3.js"),[]).then(({data:e})=>e),"v-0f9a32b6":()=>a(()=>import("./staking.html.5cf7a6ff.js"),[]).then(({data:e})=>e),"v-4a9bf8b4":()=>a(()=>import("./token.html.36202d18.js"),[]).then(({data:e})=>e),"v-3706649a":()=>a(()=>import("./404.html.f166316b.js"),[]).then(({data:e})=>e)},yc=Ee(dm),kc=_i({key:"",path:"",title:"",lang:"",frontmatter:{},excerpt:"",headers:[]}),ut=Ee(kc),nn=()=>ut;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updatePageData=e=>{yc.value[e.key]=()=>Promise.resolve(e),e.key===ut.value.key&&(ut.value=e)});const Ec=Symbol(""),hm=()=>{const e=Ie(Ec);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},Pc=Symbol(""),gm=()=>{const e=Ie(Pc);if(!e)throw new Error("usePageHead() is called without provider.");return e},mm=Symbol(""),wc=Symbol(""),Tc=()=>{const e=Ie(wc);if(!e)throw new Error("usePageLang() is called without provider.");return e},Fi=Symbol(""),ji=()=>{const e=Ie(Fi);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},vm={base:"/",lang:"en-US",title:"Solana Cookbook",description:"",head:[["link",{rel:"icon",href:"/solana_cookbook_lightmode.svg"}],["script",{"data-domain":"solanacookbook.com",src:"https://plausible.io/js/plausible.js"}]],locales:{"/":{lang:"en-US",title:"Solana Cookbook"},"/zh/":{lang:"zh-CN",title:"Solana\u79D8\u7C4D"},"/es/":{lang:"es",title:"Solana Cookbook"},"/pt/":{lang:"pt-BR",title:"Solana Cookbook"},"/de/":{lang:"de-DE",title:"Solana Cookbook"},"/vi/":{lang:"vi-VN",title:"To\xE0n t\u1EADp Solana"},"/th/":{lang:"th-TH",title:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana"},"/fr/":{lang:"fr-FR",title:"Solana Cookbook"},"/id/":{lang:"id-ID",title:"Buku Panduan Solana"},"/kr/":{lang:"kr-KR",title:"Solana Cookbook"},"/tr/":{lang:"tr-TR",title:"Solana Cookbook"},"/ja/":{lang:"ja-JP",title:"Solana Cookbook"},"/fil/":{lang:"fil-PH",title:"Solana Cookbook"}}},Et=Ee(vm),Lc=()=>Et;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updateSiteData=e=>{Et.value=e});const Oc=Symbol(""),q_=()=>{const e=Ie(Oc);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},pm=Symbol(""),zi=e=>{let t;e.pageKey?t=e.pageKey:t=nn().value.key;const l=bc[t];return l?ee(l):ee("div","404 Not Found")};zi.displayName="Content";zi.props={pageKey:{type:String,required:!1}};const fm={"404":h(()=>a(()=>import("./404.e671120d.js"),[])),Layout:h(()=>a(()=>import("./Layout.4ba2f342.js"),[]))},_m=([e,t,l])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,l]),bm=e=>{const t=new Set,l=[];return e.forEach(n=>{const r=_m(n);t.has(r)||(t.add(r),l.push(n))}),l},ym=e=>/^(https?:)?\/\//.test(e),$_=e=>/^mailto:/.test(e),G_=e=>/^tel:/.test(e),Ac=e=>Object.prototype.toString.call(e)==="[object Object]",km=e=>e.replace(/\/$/,""),Em=e=>e.replace(/^\//,""),Dc=(e,t)=>{const l=Object.keys(e).sort((n,r)=>{const i=r.split("/").length-n.split("/").length;return i!==0?i:r.length-n.length});for(const n of l)if(t.startsWith(n))return n;return"/"},Pm=(e,t="/")=>e.replace(/^(https?:)?\/\/[^/]*/,"").replace(new RegExp(`^${t}`),"/"),Ba=Me({name:"Vuepress",setup(){const e=nn(),t=_e(()=>{let l;if(e.value.path){const n=e.value.frontmatter.layout;be(n)?l=n:l="Layout"}else l="404";return fm[l]||gh(l,!1)});return()=>ee(t.value)}}),At=e=>e,Ni=e=>e,wm=e=>ym(e)?e:`${Lc().value.base}${Em(e)}`,Ft=fl({resolvePageData:async e=>{const t=yc.value[e],l=await(t==null?void 0:t());return l!=null?l:kc},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,l)=>{const n=be(t.description)?t.description:l.description,r=[...te(t.head)?t.head:[],...l.head,["title",{},e],["meta",{name:"description",content:n}]];return bm(r)},resolvePageHeadTitle:(e,t)=>`${e.title?`${e.title} | `:""}${t.title}`,resolvePageLang:e=>e.lang||"en",resolveRouteLocale:(e,t)=>Dc(e,t),resolveSiteLocaleData:(e,t)=>xe(xe({},e),e.locales[t])});const Tm=ee("svg",{class:"external-link-icon",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"},[ee("path",{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}),ee("polygon",{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"})]),Lm=Me({name:"ExternalLinkIcon",props:{locales:{type:Object,required:!1,default:()=>({})}},setup(e){const t=ji(),l=_e(()=>{var n;return(n=e.locales[t.value])!==null&&n!==void 0?n:{openInNewWindow:"open in new window"}});return()=>ee("span",[Tm,ee("span",{class:"external-link-icon-sr-only"},l.value.openInNewWindow)])}}),Om={"/":{openInNewWindow:"open in new window"},"/zh/":{openInNewWindow:"open in new window"},"/zh_t/":{openInNewWindow:"open in new window"},"/es/":{openInNewWindow:"open in new window"},"/de/":{openInNewWindow:"open in new window"},"/vi/":{openInNewWindow:"open in new window"},"/th/":{openInNewWindow:"open in new window"},"/fr/":{openInNewWindow:"open in new window"},"/id/":{openInNewWindow:"open in new window"},"/pt/":{openInNewWindow:"open in new window"},"/tr/":{openInNewWindow:"open in new window"},"/kr/":{openInNewWindow:"open in new window"},"/ja/":{openInNewWindow:"open in new window"},"/fil/":{openInNewWindow:"open in new window"}};var Am=At(({app:e})=>{e.component("ExternalLinkIcon",ee(Lm,{locales:Om}))});/*! medium-zoom 1.0.6 | MIT License | https://github.com/francoischalifour/medium-zoom */var jt=Object.assign||function(e){for(var t=1;tsc?Symbol(e):"_vr_"+e,ig=_l("rvlm"),Oa=_l("rvd"),rr=_l("r"),Ci=_l("rl"),Kr=_l("rvl"),tl=typeof window!="undefined";function ag(e){return e.__esModule||sc&&e[Symbol.toStringTag]==="Module"}const pe=Object.assign;function _r(e,t){const l={};for(const n in t){const r=t[n];l[n]=Array.isArray(r)?r.map(e):e(r)}return l}const Fl=()=>{},og=/\/$/,sg=e=>e.replace(og,"");function br(e,t,l="/"){let n,r={},i="",o="";const s=t.indexOf("?"),c=t.indexOf("#",s>-1?s:0);return s>-1&&(n=t.slice(0,s),i=t.slice(s+1,c>-1?c:t.length),r=e(i)),c>-1&&(n=n||t.slice(0,c),o=t.slice(c,t.length)),n=hg(n!=null?n:t,l),{fullPath:n+(i&&"?")+i+o,path:n,query:r,hash:o}}function cg(e,t){const l=t.query?e(t.query):"";return t.path+(l&&"?")+l+(t.hash||"")}function Aa(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ug(e,t,l){const n=t.matched.length-1,r=l.matched.length-1;return n>-1&&n===r&&hl(t.matched[n],l.matched[r])&&cc(t.params,l.params)&&e(t.query)===e(l.query)&&t.hash===l.hash}function hl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function cc(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const l in e)if(!dg(e[l],t[l]))return!1;return!0}function dg(e,t){return Array.isArray(e)?Da(e,t):Array.isArray(t)?Da(t,e):e===t}function Da(e,t){return Array.isArray(t)?e.length===t.length&&e.every((l,n)=>l===t[n]):e.length===1&&e[0]===t}function hg(e,t){if(e.startsWith("/"))return e;if(!e)return t;const l=t.split("/"),n=e.split("/");let r=l.length-1,i,o;for(i=0;i({left:window.pageXOffset,top:window.pageYOffset});function fg(e){let t;if("el"in e){const l=e.el,n=typeof l=="string"&&l.startsWith("#"),r=typeof l=="string"?n?document.getElementById(l.slice(1)):document.querySelector(l):l;if(!r)return;t=pg(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Sa(e,t){return(history.state?history.state.position-t:-1)+e}const Ur=new Map;function _g(e,t){Ur.set(e,t)}function bg(e){const t=Ur.get(e);return Ur.delete(e),t}let yg=()=>location.protocol+"//"+location.host;function uc(e,t){const{pathname:l,search:n,hash:r}=t,i=e.indexOf("#");if(i>-1){let s=r.includes(e.slice(i))?e.slice(i).length:1,c=r.slice(s);return c[0]!=="/"&&(c="/"+c),Aa(c,"")}return Aa(l,e)+n+r}function kg(e,t,l,n){let r=[],i=[],o=null;const s=({state:g})=>{const b=uc(e,location),m=l.value,_=t.value;let f=0;if(g){if(l.value=b,t.value=g,o&&o===m){o=null;return}f=_?g.position-_.position:0}else n(b);r.forEach(y=>{y(l.value,m,{delta:f,type:ql.pop,direction:f?f>0?jl.forward:jl.back:jl.unknown})})};function c(){o=l.value}function u(g){r.push(g);const b=()=>{const m=r.indexOf(g);m>-1&&r.splice(m,1)};return i.push(b),b}function d(){const{history:g}=window;!g.state||g.replaceState(pe({},g.state,{scroll:ir()}),"")}function v(){for(const g of i)g();i=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",d),{pauseListeners:c,listen:u,destroy:v}}function Ia(e,t,l,n=!1,r=!1){return{back:e,current:t,forward:l,replaced:n,position:window.history.length,scroll:r?ir():null}}function Eg(e){const{history:t,location:l}=window,n={value:uc(e,l)},r={value:t.state};r.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(c,u,d){const v=e.indexOf("#"),g=v>-1?(l.host&&document.querySelector("base")?e:e.slice(v))+c:yg()+e+c;try{t[d?"replaceState":"pushState"](u,"",g),r.value=u}catch(b){console.error(b),l[d?"replace":"assign"](g)}}function o(c,u){const d=pe({},t.state,Ia(r.value.back,c,r.value.forward,!0),u,{position:r.value.position});i(c,d,!0),n.value=c}function s(c,u){const d=pe({},r.value,t.state,{forward:c,scroll:ir()});i(d.current,d,!0);const v=pe({},Ia(n.value,c,null),{position:d.position+1},u);i(c,v,!1),n.value=c}return{location:n,state:r,push:s,replace:o}}function Pg(e){e=gg(e);const t=Eg(e),l=kg(e,t.state,t.location,t.replace);function n(i,o=!0){o||l.pauseListeners(),history.go(i)}const r=pe({location:"",base:e,go:n,createHref:vg.bind(null,e)},t,l);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function wg(e){return typeof e=="string"||e&&typeof e=="object"}function dc(e){return typeof e=="string"||typeof e=="symbol"}const st={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},hc=_l("nf");var Ra;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Ra||(Ra={}));function gl(e,t){return pe(new Error,{type:e,[hc]:!0},t)}function Rt(e,t){return e instanceof Error&&hc in e&&(t==null||!!(e.type&t))}const Ca="[^/]+?",Tg={sensitive:!1,strict:!1,start:!0,end:!0},Lg=/[.+*?^${}()[\]/\\]/g;function Og(e,t){const l=pe({},Tg,t),n=[];let r=l.start?"^":"";const i=[];for(const u of e){const d=u.length?[]:[90];l.strict&&!u.length&&(r+="/");for(let v=0;vt.length?t.length===1&&t[0]===40+40?1:-1:0}function Dg(e,t){let l=0;const n=e.score,r=t.score;for(;l1&&(c==="*"||c==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),u="")}function g(){u+=c}for(;s{o(P)}:Fl}function o(d){if(dc(d)){const v=n.get(d);v&&(n.delete(d),l.splice(l.indexOf(v),1),v.children.forEach(o),v.alias.forEach(o))}else{const v=l.indexOf(d);v>-1&&(l.splice(v,1),d.record.name&&n.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function s(){return l}function c(d){let v=0;for(;v=0;)v++;l.splice(v,0,d),d.record.name&&!xa(d)&&n.set(d.record.name,d)}function u(d,v){let g,b={},m,_;if("name"in d&&d.name){if(g=n.get(d.name),!g)throw gl(1,{location:d});_=g.record.name,b=pe(Vg(v.params,g.keys.filter(P=>!P.optional).map(P=>P.name)),d.params),m=g.stringify(b)}else if("path"in d)m=d.path,g=l.find(P=>P.re.test(m)),g&&(b=g.parse(m),_=g.record.name);else{if(g=v.name?n.get(v.name):l.find(P=>P.re.test(v.path)),!g)throw gl(1,{location:d,currentLocation:v});_=g.record.name,b=pe({},v.params,d.params),m=g.stringify(b)}const f=[];let y=g;for(;y;)f.unshift(y.record),y=y.parent;return{name:_,path:m,params:b,matched:f,meta:zg(f)}}return e.forEach(d=>i(d)),{addRoute:i,resolve:u,removeRoute:o,getRoutes:s,getRecordMatcher:r}}function Vg(e,t){const l={};for(const n of t)n in e&&(l[n]=e[n]);return l}function Fg(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:jg(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||{}:{default:e.component}}}function jg(e){const t={},l=e.props||!1;if("component"in e)t.default=l;else for(const n in e.components)t[n]=typeof l=="boolean"?l:l[n];return t}function xa(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function zg(e){return e.reduce((t,l)=>pe(t,l.meta),{})}function Va(e,t){const l={};for(const n in e)l[n]=n in t?t[n]:e[n];return l}const gc=/#/g,Ng=/&/g,Mg=/\//g,Hg=/=/g,Bg=/\?/g,mc=/\+/g,Kg=/%5B/g,Ug=/%5D/g,vc=/%5E/g,Wg=/%60/g,pc=/%7B/g,qg=/%7C/g,fc=/%7D/g,$g=/%20/g;function xi(e){return encodeURI(""+e).replace(qg,"|").replace(Kg,"[").replace(Ug,"]")}function Gg(e){return xi(e).replace(pc,"{").replace(fc,"}").replace(vc,"^")}function Wr(e){return xi(e).replace(mc,"%2B").replace($g,"+").replace(gc,"%23").replace(Ng,"%26").replace(Wg,"`").replace(pc,"{").replace(fc,"}").replace(vc,"^")}function Jg(e){return Wr(e).replace(Hg,"%3D")}function Qg(e){return xi(e).replace(gc,"%23").replace(Bg,"%3F")}function Yg(e){return e==null?"":Qg(e).replace(Mg,"%2F")}function Mn(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function Zg(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&Wr(i)):[n&&Wr(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+l,i!=null&&(t+="="+i))})}return t}function Xg(e){const t={};for(const l in e){const n=e[l];n!==void 0&&(t[l]=Array.isArray(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}function El(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function l(){e=[]}return{add:t,list:()=>e,reset:l}}function kt(e,t,l,n,r){const i=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((o,s)=>{const c=v=>{v===!1?s(gl(4,{from:l,to:t})):v instanceof Error?s(v):wg(v)?s(gl(2,{from:t,to:v})):(i&&n.enterCallbacks[r]===i&&typeof v=="function"&&i.push(v),o())},u=e.call(n&&n.instances[r],t,l,c);let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(v=>s(v))})}function yr(e,t,l,n){const r=[];for(const i of e)for(const o in i.components){let s=i.components[o];if(!(t!=="beforeRouteEnter"&&!i.instances[o]))if(em(s)){const u=(s.__vccOpts||s)[t];u&&r.push(kt(u,l,n,i,o))}else{let c=s();r.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${i.path}"`));const d=ag(u)?u.default:u;i.components[o]=d;const g=(d.__vccOpts||d)[t];return g&&kt(g,l,n,i,o)()}))}}return r}function em(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function ja(e){const t=Ie(rr),l=Ie(Ci),n=_e(()=>t.resolve(Bt(e.to))),r=_e(()=>{const{matched:c}=n.value,{length:u}=c,d=c[u-1],v=l.matched;if(!d||!v.length)return-1;const g=v.findIndex(hl.bind(null,d));if(g>-1)return g;const b=za(c[u-2]);return u>1&&za(d)===b&&v[v.length-1].path!==b?v.findIndex(hl.bind(null,c[u-2])):g}),i=_e(()=>r.value>-1&&rm(l.params,n.value.params)),o=_e(()=>r.value>-1&&r.value===l.matched.length-1&&cc(l.params,n.value.params));function s(c={}){return nm(c)?t[Bt(e.replace)?"replace":"push"](Bt(e.to)).catch(Fl):Promise.resolve()}return{route:n,href:_e(()=>n.value.href),isActive:i,isExactActive:o,navigate:s}}const tm=Me({name:"RouterLink",props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ja,setup(e,{slots:t}){const l=fl(ja(e)),{options:n}=Ie(rr),r=_e(()=>({[Na(e.activeClass,n.linkActiveClass,"router-link-active")]:l.isActive,[Na(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:l.isExactActive}));return()=>{const i=t.default&&t.default(l);return e.custom?i:ee("a",{"aria-current":l.isExactActive?e.ariaCurrentValue:null,href:l.href,onClick:l.navigate,class:r.value},i)}}}),lm=tm;function nm(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function rm(e,t){for(const l in t){const n=t[l],r=e[l];if(typeof n=="string"){if(n!==r)return!1}else if(!Array.isArray(r)||r.length!==n.length||n.some((i,o)=>i!==r[o]))return!1}return!0}function za(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Na=(e,t,l)=>e!=null?e:t!=null?t:l,im=Me({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},setup(e,{attrs:t,slots:l}){const n=Ie(Kr),r=_e(()=>e.route||n.value),i=Ie(Oa,0),o=_e(()=>r.value.matched[i]);Kt(Oa,i+1),Kt(ig,o),Kt(Kr,r);const s=Ee();return et(()=>[s.value,o.value,e.name],([c,u,d],[v,g,b])=>{u&&(u.instances[d]=c,g&&g!==u&&c&&c===v&&(u.leaveGuards.size||(u.leaveGuards=g.leaveGuards),u.updateGuards.size||(u.updateGuards=g.updateGuards))),c&&u&&(!g||!hl(u,g)||!v)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=r.value,u=o.value,d=u&&u.components[e.name],v=e.name;if(!d)return Ma(l.default,{Component:d,route:c});const g=u.props[e.name],b=g?g===!0?c.params:typeof g=="function"?g(c):g:null,_=ee(d,pe({},b,t,{onVnodeUnmounted:f=>{f.component.isUnmounted&&(u.instances[v]=null)},ref:s}));return Ma(l.default,{Component:_,route:c})||_}}});function Ma(e,t){if(!e)return null;const l=e(t);return l.length===1?l[0]:l}const _c=im;function am(e){const t=xg(e.routes,e),l=e.parseQuery||Zg,n=e.stringifyQuery||Fa,r=e.history,i=El(),o=El(),s=El(),c=Os(st);let u=st;tl&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=_r.bind(null,R=>""+R),v=_r.bind(null,Yg),g=_r.bind(null,Mn);function b(R,K){let z,W;return dc(R)?(z=t.getRecordMatcher(R),W=K):W=R,t.addRoute(W,z)}function m(R){const K=t.getRecordMatcher(R);K&&t.removeRoute(K)}function _(){return t.getRoutes().map(R=>R.record)}function f(R){return!!t.getRecordMatcher(R)}function y(R,K){if(K=pe({},K||c.value),typeof R=="string"){const le=br(l,R,K.path),p=t.resolve({path:le.path},K),k=r.createHref(le.fullPath);return pe(le,p,{params:g(p.params),hash:Mn(le.hash),redirectedFrom:void 0,href:k})}let z;if("path"in R)z=pe({},R,{path:br(l,R.path,K.path).path});else{const le=pe({},R.params);for(const p in le)le[p]==null&&delete le[p];z=pe({},R,{params:v(R.params)}),K.params=v(K.params)}const W=t.resolve(z,K),ue=R.hash||"";W.params=d(g(W.params));const me=cg(n,pe({},R,{hash:Gg(ue),path:W.path})),ie=r.createHref(me);return pe({fullPath:me,hash:ue,query:n===Fa?Xg(R.query):R.query||{}},W,{redirectedFrom:void 0,href:ie})}function P(R){return typeof R=="string"?br(l,R,c.value.path):pe({},R)}function w(R,K){if(u!==R)return gl(8,{from:K,to:R})}function L(R){return D(R)}function S(R){return L(pe(P(R),{replace:!0}))}function j(R){const K=R.matched[R.matched.length-1];if(K&&K.redirect){const{redirect:z}=K;let W=typeof z=="function"?z(R):z;return typeof W=="string"&&(W=W.includes("?")||W.includes("#")?W=P(W):{path:W},W.params={}),pe({query:R.query,hash:R.hash,params:R.params},W)}}function D(R,K){const z=u=y(R),W=c.value,ue=R.state,me=R.force,ie=R.replace===!0,le=j(z);if(le)return D(pe(P(le),{state:ue,force:me,replace:ie}),K||z);const p=z;p.redirectedFrom=K;let k;return!me&&ug(n,W,z)&&(k=gl(16,{to:p,from:W}),Le(W,W,!0,!1)),(k?Promise.resolve(k):U(p,W)).catch(T=>Rt(T)?T:ne(T,p,W)).then(T=>{if(T){if(Rt(T,2))return D(pe(P(T.to),{state:ue,force:me,replace:ie}),K||p)}else T=q(p,W,!0,ie,ue);return B(p,W,T),T})}function O(R,K){const z=w(R,K);return z?Promise.reject(z):Promise.resolve()}function U(R,K){let z;const[W,ue,me]=om(R,K);z=yr(W.reverse(),"beforeRouteLeave",R,K);for(const le of W)le.leaveGuards.forEach(p=>{z.push(kt(p,R,K))});const ie=O.bind(null,R,K);return z.push(ie),Jt(z).then(()=>{z=[];for(const le of i.list())z.push(kt(le,R,K));return z.push(ie),Jt(z)}).then(()=>{z=yr(ue,"beforeRouteUpdate",R,K);for(const le of ue)le.updateGuards.forEach(p=>{z.push(kt(p,R,K))});return z.push(ie),Jt(z)}).then(()=>{z=[];for(const le of R.matched)if(le.beforeEnter&&!K.matched.includes(le))if(Array.isArray(le.beforeEnter))for(const p of le.beforeEnter)z.push(kt(p,R,K));else z.push(kt(le.beforeEnter,R,K));return z.push(ie),Jt(z)}).then(()=>(R.matched.forEach(le=>le.enterCallbacks={}),z=yr(me,"beforeRouteEnter",R,K),z.push(ie),Jt(z))).then(()=>{z=[];for(const le of o.list())z.push(kt(le,R,K));return z.push(ie),Jt(z)}).catch(le=>Rt(le,8)?le:Promise.reject(le))}function B(R,K,z){for(const W of s.list())W(R,K,z)}function q(R,K,z,W,ue){const me=w(R,K);if(me)return me;const ie=K===st,le=tl?history.state:{};z&&(W||ie?r.replace(R.fullPath,pe({scroll:ie&&le&&le.scroll},ue)):r.push(R.fullPath,ue)),c.value=R,Le(R,K,z,ie),Pe()}let A;function H(){A=r.listen((R,K,z)=>{const W=y(R),ue=j(W);if(ue){D(pe(ue,{replace:!0}),W).catch(Fl);return}u=W;const me=c.value;tl&&_g(Sa(me.fullPath,z.delta),ir()),U(W,me).catch(ie=>Rt(ie,12)?ie:Rt(ie,2)?(D(ie.to,W).then(le=>{Rt(le,20)&&!z.delta&&z.type===ql.pop&&r.go(-1,!1)}).catch(Fl),Promise.reject()):(z.delta&&r.go(-z.delta,!1),ne(ie,W,me))).then(ie=>{ie=ie||q(W,me,!1),ie&&(z.delta?r.go(-z.delta,!1):z.type===ql.pop&&Rt(ie,20)&&r.go(-1,!1)),B(W,me,ie)}).catch(Fl)})}let Y=El(),se=El(),J;function ne(R,K,z){Pe(R);const W=se.list();return W.length?W.forEach(ue=>ue(R,K,z)):console.error(R),Promise.reject(R)}function re(){return J&&c.value!==st?Promise.resolve():new Promise((R,K)=>{Y.add([R,K])})}function Pe(R){J||(J=!0,H(),Y.list().forEach(([K,z])=>R?z(R):K()),Y.reset())}function Le(R,K,z,W){const{scrollBehavior:ue}=e;if(!tl||!ue)return Promise.resolve();const me=!z&&bg(Sa(R.fullPath,0))||(W||!z)&&history.state&&history.state.scroll||null;return Ei().then(()=>ue(R,K,me)).then(ie=>ie&&fg(ie)).catch(ie=>ne(ie,R,K))}const Ae=R=>r.go(R);let we;const Re=new Set;return{currentRoute:c,addRoute:b,removeRoute:m,hasRoute:f,getRoutes:_,resolve:y,options:e,push:L,replace:S,go:Ae,back:()=>Ae(-1),forward:()=>Ae(1),beforeEach:i.add,beforeResolve:o.add,afterEach:s.add,onError:se.add,isReady:re,install(R){const K=this;R.component("RouterLink",lm),R.component("RouterView",_c),R.config.globalProperties.$router=K,Object.defineProperty(R.config.globalProperties,"$route",{enumerable:!0,get:()=>Bt(c)}),tl&&!we&&c.value===st&&(we=!0,L(r.location).catch(ue=>{}));const z={};for(const ue in st)z[ue]=_e(()=>c.value[ue]);R.provide(rr,K),R.provide(Ci,fl(z)),R.provide(Kr,c);const W=R.unmount;Re.add(R),R.unmount=function(){Re.delete(R),Re.size<1&&(u=st,A&&A(),c.value=st,we=!1,J=!1),W()}}}}function Jt(e){return e.reduce((t,l)=>t.then(()=>l()),Promise.resolve())}function om(e,t){const l=[],n=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;ohl(u,s))?n.push(s):l.push(s));const c=e.matched[o];c&&(t.matched.find(u=>hl(u,c))||r.push(c))}return[l,n,r]}function ln(){return Ie(rr)}function Vi(){return Ie(Ci)}const sm=Me({setup(e,t){const l=Ee(!1);return tt(()=>{l.value=!0}),()=>{var n,r;return l.value?(r=(n=t.slots).default)===null||r===void 0?void 0:r.call(n):null}}}),cm="modulepreload",Ha={},um="/",a=function(t,l){return!l||l.length===0?t():Promise.all(l.map(n=>{if(n=`${um}${n}`,n in Ha)return;Ha[n]=!0;const r=n.endsWith(".css"),i=r?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${i}`))return;const o=document.createElement("link");if(o.rel=r?"stylesheet":cm,r||(o.as="script",o.crossOrigin=""),o.href=n,document.head.appendChild(o),r)return new Promise((s,c)=>{o.addEventListener("load",s),o.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},bc={"v-8daa1a0e":h(()=>a(()=>import("./index.html.f1c2ef80.js"),[])),"v-6bf54404":h(()=>a(()=>import("./accounts.html.ccac86d6.js"),[])),"v-5f0a12cc":h(()=>a(()=>import("./cpi.html.ce5147fe.js"),[])),"v-130ca978":h(()=>a(()=>import("./pdas.html.12f9e1cc.js"),[])),"v-882009ca":h(()=>a(()=>import("./programs.html.b5bf5151.js"),[])),"v-63197375":h(()=>a(()=>import("./transactions.html.d4e068d2.js"),[])),"v-7446c3bf":h(()=>a(()=>import("./index.html.859f0785.js"),[])),"v-2d0a8235":h(()=>a(()=>import("./index.html.92447802.js"),[])),"v-2d0a87a8":h(()=>a(()=>import("./index.html.6698bb6d.js"),[])),"v-2d0a8b4a":h(()=>a(()=>import("./index.html.611d98f3.js"),[])),"v-345c0323":h(()=>a(()=>import("./auto-approve.html.e43815fe.js"),[])),"v-2119e6ee":h(()=>a(()=>import("./distribution.html.992824c3.js"),[])),"v-33bd6568":h(()=>a(()=>import("./energy-system.html.a79e6d47.js"),[])),"v-687f189c":h(()=>a(()=>import("./game-examples.html.806db4fe.js"),[])),"v-00547d6c":h(()=>a(()=>import("./game-sdks.html.1abe292d.js"),[])),"v-3edbe329":h(()=>a(()=>import("./hello-world.html.96baeba5.js"),[])),"v-3d8530c8":h(()=>a(()=>import("./interact-with-tokens.html.b490da89.js"),[])),"v-c08c9418":h(()=>a(()=>import("./intro.html.50d9f3dd.js"),[])),"v-c4d04f5e":h(()=>a(()=>import("./nfts-in-games.html.d5038ca4.js"),[])),"v-4ea6aa5e":h(()=>a(()=>import("./porting-anchor-to-unity.html.1b61517d.js"),[])),"v-1e0c6857":h(()=>a(()=>import("./saving-game-state.html.ec310331.js"),[])),"v-61d730b8":h(()=>a(()=>import("./store-sol-in-pda.html.b6c6b1ad.js"),[])),"v-4e8563af":h(()=>a(()=>import("./installation.html.4c7b0806.js"),[])),"v-76b1e9e3":h(()=>a(()=>import("./account-maps.html.fb104fdb.js"),[])),"v-6da58eef":h(()=>a(()=>import("./data-migration.html.1425ff59.js"),[])),"v-4684263f":h(()=>a(()=>import("./debugging-solana-programs.html.a32bb038.js"),[])),"v-4740871a":h(()=>a(()=>import("./feature-parity-testing.html.21f8b814.js"),[])),"v-2b9a5458":h(()=>a(()=>import("./get-program-accounts.html.99c15661.js"),[])),"v-2e379628":h(()=>a(()=>import("./serialization.html.6e96a72c.js"),[])),"v-7e81f36f":h(()=>a(()=>import("./versioned-transactions.html.19d40b0d.js"),[])),"v-2d0a94db":h(()=>a(()=>import("./index.html.671bbc93.js"),[])),"v-2d0a983f":h(()=>a(()=>import("./index.html.bc5a69e1.js"),[])),"v-2d0a9e0f":h(()=>a(()=>import("./index.html.8ba67a18.js"),[])),"v-2d0ab112":h(()=>a(()=>import("./index.html.37aeede1.js"),[])),"v-6c467d65":h(()=>a(()=>import("./accounts.html.ab6f1b9a.js"),[])),"v-70f9aa12":h(()=>a(()=>import("./basic-transactions.html.e80a4c69.js"),[])),"v-4dc29afa":h(()=>a(()=>import("./keypairs-and-wallets.html.7f32d8c6.js"),[])),"v-10b56a2e":h(()=>a(()=>import("./local-development.html.d4374bd4.js"),[])),"v-9eccd210":h(()=>a(()=>import("./name-service.html.f3d180f8.js"),[])),"v-d2aec298":h(()=>a(()=>import("./nfts.html.f6b5f79a.js"),[])),"v-f8950628":h(()=>a(()=>import("./offline-transactions.html.8844fb23.js"),[])),"v-877d9708":h(()=>a(()=>import("./programs.html.a57b3d47.js"),[])),"v-26f90ae0":h(()=>a(()=>import("./staking.html.4f2175bc.js"),[])),"v-0d096f0e":h(()=>a(()=>import("./token.html.f94d11f9.js"),[])),"v-2d0abea2":h(()=>a(()=>import("./index.html.1823d81d.js"),[])),"v-2d0abfd8":h(()=>a(()=>import("./index.html.5559972c.js"),[])),"v-2d0ac643":h(()=>a(()=>import("./index.html.45f0fd63.js"),[])),"v-2d0ad528":h(()=>a(()=>import("./index.html.28db958b.js"),[])),"v-15aaed93":h(()=>a(()=>import("./index.html.73db6b25.js"),[])),"v-a0b9b104":h(()=>a(()=>import("./accounts.html.3805dda2.js"),[])),"v-9a7329dc":h(()=>a(()=>import("./cpi.html.64ff535f.js"),[])),"v-1a485bbe":h(()=>a(()=>import("./pdas.html.8eaf91cc.js"),[])),"v-00c442d6":h(()=>a(()=>import("./programs.html.a475d1f5.js"),[])),"v-e455ec22":h(()=>a(()=>import("./transactions.html.c46b5241.js"),[])),"v-eb393c2e":h(()=>a(()=>import("./auto-approve.html.9a6c68ed.js"),[])),"v-772145b4":h(()=>a(()=>import("./distribution.html.fd97f27d.js"),[])),"v-5105c746":h(()=>a(()=>import("./energy-system.html.311556bd.js"),[])),"v-5938dad4":h(()=>a(()=>import("./game-examples.html.f01c9761.js"),[])),"v-f1adf734":h(()=>a(()=>import("./game-sdks.html.f364ca6f.js"),[])),"v-62aa93a3":h(()=>a(()=>import("./hello-world.html.acc4db6a.js"),[])),"v-6a3c698e":h(()=>a(()=>import("./interact-with-tokens.html.9a3c30e2.js"),[])),"v-a2e66c24":h(()=>a(()=>import("./intro.html.850ff3cd.js"),[])),"v-087c524b":h(()=>a(()=>import("./nfts-in-games.html.4d0d92b9.js"),[])),"v-7664744b":h(()=>a(()=>import("./porting-anchor-to-unity.html.74618a6d.js"),[])),"v-2dcf5551":h(()=>a(()=>import("./saving-game-state.html.b6db54c5.js"),[])),"v-0122f36a":h(()=>a(()=>import("./store-sol-in-pda.html.85b3fbd8.js"),[])),"v-8e9578ae":h(()=>a(()=>import("./installation.html.aa2d111c.js"),[])),"v-668d6eae":h(()=>a(()=>import("./account-maps.html.de5b004e.js"),[])),"v-5f505435":h(()=>a(()=>import("./data-migration.html.cff77833.js"),[])),"v-556f7939":h(()=>a(()=>import("./debugging-solana-programs.html.2cb6ae77.js"),[])),"v-8fa8488e":h(()=>a(()=>import("./feature-parity-testing.html.6403e730.js"),[])),"v-16ea0e9a":h(()=>a(()=>import("./get-program-accounts.html.ca55546d.js"),[])),"v-cdc7dfbc":h(()=>a(()=>import("./serialization.html.5f9eff00.js"),[])),"v-5a4e12b5":h(()=>a(()=>import("./versioned-transactions.html.2c16ab97.js"),[])),"v-7b6447aa":h(()=>a(()=>import("./accounts.html.480effe2.js"),[])),"v-b9616b86":h(()=>a(()=>import("./basic-transactions.html.e97b7701.js"),[])),"v-670400c0":h(()=>a(()=>import("./keypairs-and-wallets.html.7856d044.js"),[])),"v-7ae54a28":h(()=>a(()=>import("./local-development.html.9a3616cd.js"),[])),"v-3aafba84":h(()=>a(()=>import("./name-service.html.9dec4983.js"),[])),"v-87eb5f0c":h(()=>a(()=>import("./nfts.html.61a0212c.js"),[])),"v-c6123a9c":h(()=>a(()=>import("./offline-transactions.html.c710df8e.js"),[])),"v-12489342":h(()=>a(()=>import("./programs.html.777bc9d0.js"),[])),"v-10522b0a":h(()=>a(()=>import("./staking.html.35f01019.js"),[])),"v-d84413f0":h(()=>a(()=>import("./token.html.b0c306ef.js"),[])),"v-8e5be170":h(()=>a(()=>import("./accounts.html.c201028c.js"),[])),"v-f2328ef0":h(()=>a(()=>import("./pdas.html.eed3e90e.js"),[])),"v-08ccc65f":h(()=>a(()=>import("./programs.html.b4edbb78.js"),[])),"v-1256fcb9":h(()=>a(()=>import("./transactions.html.11b26fdb.js"),[])),"v-2485abf3":h(()=>a(()=>import("./installation.html.614be1d7.js"),[])),"v-2d09cebe":h(()=>a(()=>import("./accounts.html.79fe9f62.js"),[])),"v-9ce8299a":h(()=>a(()=>import("./basic-transactions.html.1bfd6fa8.js"),[])),"v-4ec78794":h(()=>a(()=>import("./keypairs-and-wallets.html.1759bcbe.js"),[])),"v-32949b1c":h(()=>a(()=>import("./local-development.html.f52317b1.js"),[])),"v-01539798":h(()=>a(()=>import("./name-service.html.1abc0fa0.js"),[])),"v-6bf79020":h(()=>a(()=>import("./nfts.html.0c0cb140.js"),[])),"v-0e8f1e28":h(()=>a(()=>import("./offline-transactions.html.467fd989.js"),[])),"v-3975cfb8":h(()=>a(()=>import("./programs.html.cb377c15.js"),[])),"v-7cf087d4":h(()=>a(()=>import("./staking.html.f1bc25a4.js"),[])),"v-4520fd52":h(()=>a(()=>import("./token.html.8bed60f6.js"),[])),"v-1832f5c2":h(()=>a(()=>import("./account-maps.html.9f7ded52.js"),[])),"v-70204b2b":h(()=>a(()=>import("./data-migration.html.a1c8731c.js"),[])),"v-16deac83":h(()=>a(()=>import("./debugging-solana-programs.html.b7310cda.js"),[])),"v-732f06a2":h(()=>a(()=>import("./feature-parity-testing.html.67fc474d.js"),[])),"v-22a67510":h(()=>a(()=>import("./get-program-accounts.html.6e96a155.js"),[])),"v-309da254":h(()=>a(()=>import("./retrying-transactions.html.fbbd8db1.js"),[])),"v-5796626c":h(()=>a(()=>import("./serialization.html.c14aec9f.js"),[])),"v-389f60e0":h(()=>a(()=>import("./installation.html.6ebc9da6.js"),[])),"v-08458c16":h(()=>a(()=>import("./accounts.html.fe830ce6.js"),[])),"v-79377c96":h(()=>a(()=>import("./pdas.html.d7edeb46.js"),[])),"v-4bd7f10c":h(()=>a(()=>import("./programs.html.933f8e90.js"),[])),"v-314308e6":h(()=>a(()=>import("./transactions.html.63dbd664.js"),[])),"v-471a2192":h(()=>a(()=>import("./account-maps.html.15aa5004.js"),[])),"v-7642d244":h(()=>a(()=>import("./data-migration.html.85d3c82e.js"),[])),"v-6c0a22f0":h(()=>a(()=>import("./debugging-solana-programs.html.072a7ef4.js"),[])),"v-35856562":h(()=>a(()=>import("./feature-parity-testing.html.9d3ad8df.js"),[])),"v-3d8822fa":h(()=>a(()=>import("./get-program-accounts.html.7d92e55d.js"),[])),"v-6ad65459":h(()=>a(()=>import("./serialization.html.58ace6bc.js"),[])),"v-3caeb514":h(()=>a(()=>import("./accounts.html.50b5ecb7.js"),[])),"v-20a8d3e6":h(()=>a(()=>import("./basic-transactions.html.5d245536.js"),[])),"v-17bc77ae":h(()=>a(()=>import("./keypairs-and-wallets.html.fe3970ec.js"),[])),"v-0a613142":h(()=>a(()=>import("./local-development.html.0c928074.js"),[])),"v-1db05f27":h(()=>a(()=>import("./name-service.html.68928b86.js"),[])),"v-6f8605e3":h(()=>a(()=>import("./nfts.html.ca44adf3.js"),[])),"v-2a14a61b":h(()=>a(()=>import("./offline-transactions.html.c7b8e6f1.js"),[])),"v-e6ad27aa":h(()=>a(()=>import("./programs.html.9539084b.js"),[])),"v-8d23ddfe":h(()=>a(()=>import("./staking.html.9cf17bbb.js"),[])),"v-4fd8edbf":h(()=>a(()=>import("./token.html.0c03dc96.js"),[])),"v-598bfdda":h(()=>a(()=>import("./accounts.html.ec76ce30.js"),[])),"v-034daf46":h(()=>a(()=>import("./cpi.html.9b2c1583.js"),[])),"v-410d47d3":h(()=>a(()=>import("./pdas.html.433df04a.js"),[])),"v-2334b82a":h(()=>a(()=>import("./programs.html.dcaf461b.js"),[])),"v-1ee9ddf8":h(()=>a(()=>import("./transactions.html.0c0860dc.js"),[])),"v-4605d97e":h(()=>a(()=>import("./installation.html.36acf74c.js"),[])),"v-3c3bf874":h(()=>a(()=>import("./auto-approve.html.ef828a0c.js"),[])),"v-28f9dc3f":h(()=>a(()=>import("./distribution.html.c5b39f53.js"),[])),"v-4b7ffbca":h(()=>a(()=>import("./energy-system.html.3fd21eea.js"),[])),"v-5c9dcd6b":h(()=>a(()=>import("./game-examples.html.633629bc.js"),[])),"v-16181c8a":h(()=>a(()=>import("./game-sdks.html.3bfddaba.js"),[])),"v-ed210090":h(()=>a(()=>import("./hello-world.html.888726f2.js"),[])),"v-5e474519":h(()=>a(()=>import("./interact-with-tokens.html.5ced5824.js"),[])),"v-5625a9c3":h(()=>a(()=>import("./intro.html.4a5cf141.js"),[])),"v-dc92e5c0":h(()=>a(()=>import("./nfts-in-games.html.e55ae003.js"),[])),"v-1c322e40":h(()=>a(()=>import("./porting-anchor-to-unity.html.81c8bafe.js"),[])),"v-71d3c4b4":h(()=>a(()=>import("./saving-game-state.html.cde48a53.js"),[])),"v-50674c75":h(()=>a(()=>import("./store-sol-in-pda.html.149b88b0.js"),[])),"v-742672b6":h(()=>a(()=>import("./accounts.html.72a92f16.js"),[])),"v-7fdd21f0":h(()=>a(()=>import("./basic-transactions.html.3f54c73c.js"),[])),"v-5bd01ecb":h(()=>a(()=>import("./keypairs-and-wallets.html.45fae5f1.js"),[])),"v-0835dffd":h(()=>a(()=>import("./local-development.html.b2f4a193.js"),[])),"v-31ec7bc9":h(()=>a(()=>import("./name-service.html.3e027fa0.js"),[])),"v-3331e485":h(()=>a(()=>import("./nfts.html.bc8395bd.js"),[])),"v-dc79fe86":h(()=>a(()=>import("./offline-transactions.html.0827c37c.js"),[])),"v-77bdac66":h(()=>a(()=>import("./programs.html.95125d01.js"),[])),"v-3717171f":h(()=>a(()=>import("./staking.html.4592916e.js"),[])),"v-01a8e35d":h(()=>a(()=>import("./token.html.e07b1965.js"),[])),"v-7e91df34":h(()=>a(()=>import("./account-maps.html.cc8377ca.js"),[])),"v-05451800":h(()=>a(()=>import("./data-migration.html.4a37b76d.js"),[])),"v-0bb1c6e4":h(()=>a(()=>import("./debugging-solana-programs.html.f391ad32.js"),[])),"v-5623fef8":h(()=>a(()=>import("./feature-parity-testing.html.a6057c8b.js"),[])),"v-0af4ea25":h(()=>a(()=>import("./get-program-accounts.html.47597b1d.js"),[])),"v-22564af7":h(()=>a(()=>import("./serialization.html.5e0ca063.js"),[])),"v-77103780":h(()=>a(()=>import("./versioned-transactions.html.78847d3c.js"),[])),"v-da3cf63c":h(()=>a(()=>import("./accounts.html.f83a9427.js"),[])),"v-0bf50b22":h(()=>a(()=>import("./pdas.html.3955a4b5.js"),[])),"v-3a47880e":h(()=>a(()=>import("./programs.html.a53991e5.js"),[])),"v-73c3d55a":h(()=>a(()=>import("./transactions.html.2469ccae.js"),[])),"v-02e9060d":h(()=>a(()=>import("./installation.html.f915e5db.js"),[])),"v-10a285c5":h(()=>a(()=>import("./account-maps.html.470f6c52.js"),[])),"v-4ddeba51":h(()=>a(()=>import("./data-migration.html.7eec80fc.js"),[])),"v-0173699d":h(()=>a(()=>import("./debugging-solana-programs.html.3b218539.js"),[])),"v-971f3456":h(()=>a(()=>import("./feature-parity-testing.html.77612586.js"),[])),"v-307b2094":h(()=>a(()=>import("./get-program-accounts.html.713a03ab.js"),[])),"v-5b4b12f4":h(()=>a(()=>import("./serialization.html.38ba2d1e.js"),[])),"v-06371947":h(()=>a(()=>import("./accounts.html.3642f7bf.js"),[])),"v-c0d8574e":h(()=>a(()=>import("./basic-transactions.html.0aea27a9.js"),[])),"v-644e73dc":h(()=>a(()=>import("./keypairs-and-wallets.html.e586f774.js"),[])),"v-75cde6e8":h(()=>a(()=>import("./local-development.html.f9975a55.js"),[])),"v-673571da":h(()=>a(()=>import("./name-service.html.91342459.js"),[])),"v-931308d4":h(()=>a(()=>import("./nfts.html.2e49b605.js"),[])),"v-cb7d5464":h(()=>a(()=>import("./offline-transactions.html.7d2ff671.js"),[])),"v-5631d05e":h(()=>a(()=>import("./programs.html.e6708ad9.js"),[])),"v-01feda6e":h(()=>a(()=>import("./staking.html.631b26d4.js"),[])),"v-3211a328":h(()=>a(()=>import("./token.html.24577b71.js"),[])),"v-179e82fe":h(()=>a(()=>import("./accounts.html.7be50229.js"),[])),"v-52ffdf92":h(()=>a(()=>import("./cpi.html.cd0a0c70.js"),[])),"v-fd851184":h(()=>a(()=>import("./pdas.html.20ee0dd7.js"),[])),"v-67993a15":h(()=>a(()=>import("./programs.html.e55e9941.js"),[])),"v-ec92b522":h(()=>a(()=>import("./transactions.html.110ef9af.js"),[])),"v-429dff29":h(()=>a(()=>import("./installation.html.2ee5c8ec.js"),[])),"v-44679d29":h(()=>a(()=>import("./account-maps.html.39d261ab.js"),[])),"v-b688ee96":h(()=>a(()=>import("./data-migration.html.6d313435.js"),[])),"v-04e3168e":h(()=>a(()=>import("./debugging-solana-programs.html.10f57b5c.js"),[])),"v-6b5a9039":h(()=>a(()=>import("./feature-parity-testing.html.ec36c4c1.js"),[])),"v-d18839cc":h(()=>a(()=>import("./get-program-accounts.html.1a158c6f.js"),[])),"v-17384ba2":h(()=>a(()=>import("./serialization.html.4c219ebc.js"),[])),"v-0d7cc735":h(()=>a(()=>import("./versioned-transactions.html.9a3f546a.js"),[])),"v-39fc30ab":h(()=>a(()=>import("./accounts.html.c850f29d.js"),[])),"v-567dfebd":h(()=>a(()=>import("./basic-transactions.html.b489c766.js"),[])),"v-09579540":h(()=>a(()=>import("./keypairs-and-wallets.html.c5823658.js"),[])),"v-04ce05a8":h(()=>a(()=>import("./local-development.html.74ef67b1.js"),[])),"v-7a18373e":h(()=>a(()=>import("./name-service.html.72c3ec5b.js"),[])),"v-6d16e4fa":h(()=>a(()=>import("./nfts.html.3c31ce39.js"),[])),"v-3f4a7732":h(()=>a(()=>import("./offline-transactions.html.3661f39c.js"),[])),"v-ec12307c":h(()=>a(()=>import("./programs.html.b7903707.js"),[])),"v-7747468a":h(()=>a(()=>import("./staking.html.04132c3e.js"),[])),"v-0463f188":h(()=>a(()=>import("./token.html.ab898bc4.js"),[])),"v-52cd49a4":h(()=>a(()=>import("./accounts.html.74e46f84.js"),[])),"v-4a4be76e":h(()=>a(()=>import("./pdas.html.61b14f37.js"),[])),"v-26941245":h(()=>a(()=>import("./programs.html.2cf46764.js"),[])),"v-2229e59f":h(()=>a(()=>import("./transactions.html.147b8767.js"),[])),"v-e97c194e":h(()=>a(()=>import("./installation.html.d67ac4ef.js"),[])),"v-c5b19a0e":h(()=>a(()=>import("./account-maps.html.d873a7bb.js"),[])),"v-68262af6":h(()=>a(()=>import("./data-migration.html.ff6c2789.js"),[])),"v-a4865e2e":h(()=>a(()=>import("./debugging-solana-programs.html.aa6fcacf.js"),[])),"v-37352209":h(()=>a(()=>import("./feature-parity-testing.html.f4efd784.js"),[])),"v-0d30a8ea":h(()=>a(()=>import("./get-program-accounts.html.1a4d6f7c.js"),[])),"v-5329205c":h(()=>a(()=>import("./serialization.html.96be53fb.js"),[])),"v-da88730a":h(()=>a(()=>import("./accounts.html.e3030cfb.js"),[])),"v-2258908d":h(()=>a(()=>import("./basic-transactions.html.ed839122.js"),[])),"v-48d4f310":h(()=>a(()=>import("./keypairs-and-wallets.html.a83650c9.js"),[])),"v-4d71f9d8":h(()=>a(()=>import("./local-development.html.4297ed48.js"),[])),"v-cb0f35e4":h(()=>a(()=>import("./name-service.html.813f0670.js"),[])),"v-b3ac3a6c":h(()=>a(()=>import("./nfts.html.78d4bd36.js"),[])),"v-7ec7d502":h(()=>a(()=>import("./offline-transactions.html.43fa2f34.js"),[])),"v-3a9304dc":h(()=>a(()=>import("./programs.html.8726b1de.js"),[])),"v-4055b6ba":h(()=>a(()=>import("./staking.html.bb8a6029.js"),[])),"v-249ea490":h(()=>a(()=>import("./token.html.65520f24.js"),[])),"v-2c987e4b":h(()=>a(()=>import("./accounts.html.67312eab.js"),[])),"v-203f4825":h(()=>a(()=>import("./cpi.html.77c0f3ed.js"),[])),"v-5beb210b":h(()=>a(()=>import("./pdas.html.1b5e9aea.js"),[])),"v-7c933562":h(()=>a(()=>import("./programs.html.d74f6c75.js"),[])),"v-4f78323c":h(()=>a(()=>import("./transactions.html.a50662e6.js"),[])),"v-c3a0e694":h(()=>a(()=>import("./installation.html.7f31ac87.js"),[])),"v-8121a608":h(()=>a(()=>import("./account-maps.html.61211f10.js"),[])),"v-7c1e6fc8":h(()=>a(()=>import("./data-migration.html.e0732e8c.js"),[])),"v-19571874":h(()=>a(()=>import("./debugging-solana-programs.html.c55c47bf.js"),[])),"v-fc0a9768":h(()=>a(()=>import("./feature-parity-testing.html.779577da.js"),[])),"v-eca82026":h(()=>a(()=>import("./get-program-accounts.html.c489ff46.js"),[])),"v-05ba93a2":h(()=>a(()=>import("./serialization.html.39f2c0b1.js"),[])),"v-241ceb48":h(()=>a(()=>import("./versioned-transactions.html.ee26ba8c.js"),[])),"v-95f87f04":h(()=>a(()=>import("./accounts.html.b2dcd867.js"),[])),"v-6d1e22d0":h(()=>a(()=>import("./basic-transactions.html.d3c2b6ec.js"),[])),"v-0f01feda":h(()=>a(()=>import("./keypairs-and-wallets.html.e2ea7de6.js"),[])),"v-605f9335":h(()=>a(()=>import("./local-development.html.c91442a0.js"),[])),"v-045da591":h(()=>a(()=>import("./name-service.html.b0314bbe.js"),[])),"v-262d564d":h(()=>a(()=>import("./nfts.html.1ad11441.js"),[])),"v-2e71e285":h(()=>a(()=>import("./offline-transactions.html.f368258e.js"),[])),"v-04fe7795":h(()=>a(()=>import("./programs.html.8b269692.js"),[])),"v-51f4f057":h(()=>a(()=>import("./staking.html.9cd0f2f1.js"),[])),"v-6e1baa95":h(()=>a(()=>import("./token.html.ff5cac15.js"),[])),"v-c5f91db4":h(()=>a(()=>import("./installation.html.b85f5579.js"),[])),"v-3f8c76bb":h(()=>a(()=>import("./accounts.html.6398d200.js"),[])),"v-310cd17b":h(()=>a(()=>import("./pdas.html.929e2544.js"),[])),"v-e0f1a45c":h(()=>a(()=>import("./programs.html.11e7bbe0.js"),[])),"v-5dda72ac":h(()=>a(()=>import("./transactions.html.68be7740.js"),[])),"v-f7cfc3e4":h(()=>a(()=>import("./accounts.html.8962baed.js"),[])),"v-48c6cc60":h(()=>a(()=>import("./basic-transactions.html.6decd1d3.js"),[])),"v-e6b8f3ba":h(()=>a(()=>import("./keypairs-and-wallets.html.731d8b2d.js"),[])),"v-5f3377a5":h(()=>a(()=>import("./local-development.html.570a407e.js"),[])),"v-4fe8bb21":h(()=>a(()=>import("./name-service.html.8e66e4bc.js"),[])),"v-00aefbdd":h(()=>a(()=>import("./nfts.html.a54e18bd.js"),[])),"v-7ad32fd6":h(()=>a(()=>import("./offline-transactions.html.7895faf9.js"),[])),"v-57da55b6":h(()=>a(()=>import("./programs.html.70fa58f4.js"),[])),"v-2716a0c7":h(()=>a(()=>import("./staking.html.91c6a606.js"),[])),"v-386291f6":h(()=>a(()=>import("./token.html.d6b6721b.js"),[])),"v-e2f8eae8":h(()=>a(()=>import("./account-maps.html.b6d2a040.js"),[])),"v-50dcad50":h(()=>a(()=>import("./data-migration.html.558f508c.js"),[])),"v-387ebf94":h(()=>a(()=>import("./debugging-solana-programs.html.92d478f0.js"),[])),"v-5da35ddc":h(()=>a(()=>import("./feature-parity-testing.html.4ad59f22.js"),[])),"v-4791bd7d":h(()=>a(()=>import("./get-program-accounts.html.04314539.js"),[])),"v-109a0a9f":h(()=>a(()=>import("./serialization.html.8240c6c3.js"),[])),"v-0074d650":h(()=>a(()=>import("./versioned-transactions.html.a1a0086a.js"),[])),"v-46a93876":h(()=>a(()=>import("./accounts.html.bddee016.js"),[])),"v-5aefd385":h(()=>a(()=>import("./pdas.html.c12b509f.js"),[])),"v-2ca61adc":h(()=>a(()=>import("./programs.html.263f47ee.js"),[])),"v-4847cab6":h(()=>a(()=>import("./transactions.html.27adc8a8.js"),[])),"v-bd0a22a0":h(()=>a(()=>import("./installation.html.b29e3de7.js"),[])),"v-bdfe6c7c":h(()=>a(()=>import("./account-maps.html.fb6e863b.js"),[])),"v-3fbbf30e":h(()=>a(()=>import("./data-migration.html.08e0b038.js"),[])),"v-846b6e80":h(()=>a(()=>import("./debugging-solana-programs.html.be5d826a.js"),[])),"v-2fc8dcdc":h(()=>a(()=>import("./feature-parity-testing.html.e9479f13.js"),[])),"v-aa61329a":h(()=>a(()=>import("./get-program-accounts.html.39cc5e4a.js"),[])),"v-4dc4b229":h(()=>a(()=>import("./serialization.html.1a7f232d.js"),[])),"v-d2d54578":h(()=>a(()=>import("./accounts.html.b3afb2f5.js"),[])),"v-5981ffd4":h(()=>a(()=>import("./basic-transactions.html.9fa99f53.js"),[])),"v-59dda459":h(()=>a(()=>import("./keypairs-and-wallets.html.a22f3617.js"),[])),"v-63aaf52f":h(()=>a(()=>import("./local-development.html.3c02c969.js"),[])),"v-56a76f57":h(()=>a(()=>import("./name-service.html.f82624ec.js"),[])),"v-41e84613":h(()=>a(()=>import("./nfts.html.f888c16f.js"),[])),"v-e05ef36a":h(()=>a(()=>import("./offline-transactions.html.ba25b570.js"),[])),"v-32dfd74a":h(()=>a(()=>import("./programs.html.d385e4fe.js"),[])),"v-50f9a2d1":h(()=>a(()=>import("./staking.html.153d21d5.js"),[])),"v-6c8298e2":h(()=>a(()=>import("./token.html.a75a9504.js"),[])),"v-6a35b27a":h(()=>a(()=>import("./accounts.html.866c67ff.js"),[])),"v-8e20768c":h(()=>a(()=>import("./pdas.html.6e5a8058.js"),[])),"v-8b9f2cde":h(()=>a(()=>import("./programs.html.82f73bda.js"),[])),"v-55f1b6eb":h(()=>a(()=>import("./transactions.html.15106f80.js"),[])),"v-274abcb6":h(()=>a(()=>import("./installation.html.9b358507.js"),[])),"v-02feff2d":h(()=>a(()=>import("./account-maps.html.1a60d088.js"),[])),"v-1b0279b9":h(()=>a(()=>import("./data-migration.html.f1535631.js"),[])),"v-5afd7935":h(()=>a(()=>import("./debugging-solana-programs.html.d0d47d71.js"),[])),"v-0d9b8586":h(()=>a(()=>import("./feature-parity-testing.html.944582ed.js"),[])),"v-5263011e":h(()=>a(()=>import("./get-program-accounts.html.0cf79cec.js"),[])),"v-2b8d2a1e":h(()=>a(()=>import("./serialization.html.1259c629.js"),[])),"v-0ed8daa2":h(()=>a(()=>import("./accounts.html.150ec297.js"),[])),"v-3754a87e":h(()=>a(()=>import("./basic-transactions.html.b9b7efb5.js"),[])),"v-7ff81144":h(()=>a(()=>import("./keypairs-and-wallets.html.12cb5c76.js"),[])),"v-a2eaafb8":h(()=>a(()=>import("./local-development.html.26e53f81.js"),[])),"v-7a66f742":h(()=>a(()=>import("./name-service.html.8b66eeca.js"),[])),"v-1b97e8fe":h(()=>a(()=>import("./nfts.html.1976c787.js"),[])),"v-942a1994":h(()=>a(()=>import("./offline-transactions.html.08d142d8.js"),[])),"v-488e49c6":h(()=>a(()=>import("./programs.html.b0aa64e9.js"),[])),"v-a20cd7f4":h(()=>a(()=>import("./staking.html.e3f01f71.js"),[])),"v-26036e04":h(()=>a(()=>import("./token.html.5e6409cb.js"),[])),"v-43987c75":h(()=>a(()=>import("./accounts.html.af394751.js"),[])),"v-3c24c435":h(()=>a(()=>import("./pdas.html.38085bda.js"),[])),"v-d8d998e8":h(()=>a(()=>import("./programs.html.f498c46e.js"),[])),"v-66cde934":h(()=>a(()=>import("./transactions.html.f177146a.js"),[])),"v-567ec360":h(()=>a(()=>import("./installation.html.ee5d0d6b.js"),[])),"v-332c21dc":h(()=>a(()=>import("./account-maps.html.4343f319.js"),[])),"v-611df744":h(()=>a(()=>import("./data-migration.html.f0501f2c.js"),[])),"v-23177520":h(()=>a(()=>import("./debugging-solana-programs.html.812629be.js"),[])),"v-58db5a3c":h(()=>a(()=>import("./feature-parity-testing.html.a141aa71.js"),[])),"v-9eb387fa":h(()=>a(()=>import("./get-program-accounts.html.dd8577dd.js"),[])),"v-94ff924e":h(()=>a(()=>import("./serialization.html.489e403a.js"),[])),"v-75b489de":h(()=>a(()=>import("./versioned-transactions.html.097cf02b.js"),[])),"v-4802fad8":h(()=>a(()=>import("./accounts.html.064c9f53.js"),[])),"v-82947d34":h(()=>a(()=>import("./basic-transactions.html.12dc4b82.js"),[])),"v-42a951a9":h(()=>a(()=>import("./keypairs-and-wallets.html.9661ed1e.js"),[])),"v-18aec9df":h(()=>a(()=>import("./local-development.html.2f6f02fe.js"),[])),"v-654526b2":h(()=>a(()=>import("./name-service.html.c6a9339e.js"),[])),"v-844ed93a":h(()=>a(()=>import("./nfts.html.e4e4c010.js"),[])),"v-789c339b":h(()=>a(()=>import("./offline-transactions.html.c90e0a69.js"),[])),"v-2bf939ab":h(()=>a(()=>import("./programs.html.9975ecda.js"),[])),"v-322e9381":h(()=>a(()=>import("./staking.html.4daf843b.js"),[])),"v-684fdf82":h(()=>a(()=>import("./token.html.2c73b698.js"),[])),"v-3707792a":h(()=>a(()=>import("./accounts.html.a8d96503.js"),[])),"v-1990636a":h(()=>a(()=>import("./pdas.html.61fb8770.js"),[])),"v-f1fb9f7e":h(()=>a(()=>import("./programs.html.5fe96c87.js"),[])),"v-4220a59b":h(()=>a(()=>import("./transactions.html.f2c9858d.js"),[])),"v-eeeeb756":h(()=>a(()=>import("./installation.html.a11f9bd6.js"),[])),"v-931b9306":h(()=>a(()=>import("./account-maps.html.06b8612d.js"),[])),"v-82f5c5ee":h(()=>a(()=>import("./data-migration.html.df00c4c4.js"),[])),"v-560aa3e5":h(()=>a(()=>import("./debugging-solana-programs.html.1b41db2c.js"),[])),"v-3a76dee6":h(()=>a(()=>import("./feature-parity-testing.html.76d20bfd.js"),[])),"v-27dc2f24":h(()=>a(()=>import("./get-program-accounts.html.b6c20980.js"),[])),"v-32fe4664":h(()=>a(()=>import("./serialization.html.a08cd6dd.js"),[])),"v-f63270ee":h(()=>a(()=>import("./versioned-transactions.html.374bd78b.js"),[])),"v-a7f26c02":h(()=>a(()=>import("./accounts.html.dd8624e8.js"),[])),"v-643001de":h(()=>a(()=>import("./basic-transactions.html.65ccec01.js"),[])),"v-4e42d094":h(()=>a(()=>import("./keypairs-and-wallets.html.73be0d40.js"),[])),"v-4ab8aad4":h(()=>a(()=>import("./local-development.html.8ed37c1d.js"),[])),"v-47ce0692":h(()=>a(()=>import("./name-service.html.4f71f7ad.js"),[])),"v-9d296f64":h(()=>a(()=>import("./nfts.html.6c227031.js"),[])),"v-f7949af4":h(()=>a(()=>import("./offline-transactions.html.9c9377a3.js"),[])),"v-07fcfdd4":h(()=>a(()=>import("./programs.html.49c7c645.js"),[])),"v-0f9a32b6":h(()=>a(()=>import("./staking.html.42ce08fa.js"),[])),"v-4a9bf8b4":h(()=>a(()=>import("./token.html.e914f7d1.js"),[])),"v-3706649a":h(()=>a(()=>import("./404.html.0371c330.js"),[]))},dm={"v-8daa1a0e":()=>a(()=>import("./index.html.4eb1f1ba.js"),[]).then(({data:e})=>e),"v-6bf54404":()=>a(()=>import("./accounts.html.8879a9c1.js"),[]).then(({data:e})=>e),"v-5f0a12cc":()=>a(()=>import("./cpi.html.7575fce3.js"),[]).then(({data:e})=>e),"v-130ca978":()=>a(()=>import("./pdas.html.a117908d.js"),[]).then(({data:e})=>e),"v-882009ca":()=>a(()=>import("./programs.html.4d7d8768.js"),[]).then(({data:e})=>e),"v-63197375":()=>a(()=>import("./transactions.html.188c913a.js"),[]).then(({data:e})=>e),"v-7446c3bf":()=>a(()=>import("./index.html.4943c0a7.js"),[]).then(({data:e})=>e),"v-2d0a8235":()=>a(()=>import("./index.html.abf8251d.js"),[]).then(({data:e})=>e),"v-2d0a87a8":()=>a(()=>import("./index.html.ed59c6f5.js"),[]).then(({data:e})=>e),"v-2d0a8b4a":()=>a(()=>import("./index.html.c8f43f44.js"),[]).then(({data:e})=>e),"v-345c0323":()=>a(()=>import("./auto-approve.html.f8eb4c51.js"),[]).then(({data:e})=>e),"v-2119e6ee":()=>a(()=>import("./distribution.html.1e4a8b99.js"),[]).then(({data:e})=>e),"v-33bd6568":()=>a(()=>import("./energy-system.html.1af785c7.js"),[]).then(({data:e})=>e),"v-687f189c":()=>a(()=>import("./game-examples.html.2dcfe766.js"),[]).then(({data:e})=>e),"v-00547d6c":()=>a(()=>import("./game-sdks.html.75e8b177.js"),[]).then(({data:e})=>e),"v-3edbe329":()=>a(()=>import("./hello-world.html.dbee0508.js"),[]).then(({data:e})=>e),"v-3d8530c8":()=>a(()=>import("./interact-with-tokens.html.f2419630.js"),[]).then(({data:e})=>e),"v-c08c9418":()=>a(()=>import("./intro.html.e782eb8d.js"),[]).then(({data:e})=>e),"v-c4d04f5e":()=>a(()=>import("./nfts-in-games.html.cbea4492.js"),[]).then(({data:e})=>e),"v-4ea6aa5e":()=>a(()=>import("./porting-anchor-to-unity.html.29a097d5.js"),[]).then(({data:e})=>e),"v-1e0c6857":()=>a(()=>import("./saving-game-state.html.0656b997.js"),[]).then(({data:e})=>e),"v-61d730b8":()=>a(()=>import("./store-sol-in-pda.html.9ee3497a.js"),[]).then(({data:e})=>e),"v-4e8563af":()=>a(()=>import("./installation.html.a97a7fb2.js"),[]).then(({data:e})=>e),"v-76b1e9e3":()=>a(()=>import("./account-maps.html.f32682b9.js"),[]).then(({data:e})=>e),"v-6da58eef":()=>a(()=>import("./data-migration.html.084ac250.js"),[]).then(({data:e})=>e),"v-4684263f":()=>a(()=>import("./debugging-solana-programs.html.24149e6d.js"),[]).then(({data:e})=>e),"v-4740871a":()=>a(()=>import("./feature-parity-testing.html.61786585.js"),[]).then(({data:e})=>e),"v-2b9a5458":()=>a(()=>import("./get-program-accounts.html.4f4498ed.js"),[]).then(({data:e})=>e),"v-2e379628":()=>a(()=>import("./serialization.html.32c33a1b.js"),[]).then(({data:e})=>e),"v-7e81f36f":()=>a(()=>import("./versioned-transactions.html.acaac8aa.js"),[]).then(({data:e})=>e),"v-2d0a94db":()=>a(()=>import("./index.html.ca0d0ddc.js"),[]).then(({data:e})=>e),"v-2d0a983f":()=>a(()=>import("./index.html.60dd15bd.js"),[]).then(({data:e})=>e),"v-2d0a9e0f":()=>a(()=>import("./index.html.618f6255.js"),[]).then(({data:e})=>e),"v-2d0ab112":()=>a(()=>import("./index.html.9bb5a8db.js"),[]).then(({data:e})=>e),"v-6c467d65":()=>a(()=>import("./accounts.html.27fae06b.js"),[]).then(({data:e})=>e),"v-70f9aa12":()=>a(()=>import("./basic-transactions.html.dfe4490b.js"),[]).then(({data:e})=>e),"v-4dc29afa":()=>a(()=>import("./keypairs-and-wallets.html.5b84c000.js"),[]).then(({data:e})=>e),"v-10b56a2e":()=>a(()=>import("./local-development.html.c5836b09.js"),[]).then(({data:e})=>e),"v-9eccd210":()=>a(()=>import("./name-service.html.5051d1dd.js"),[]).then(({data:e})=>e),"v-d2aec298":()=>a(()=>import("./nfts.html.39ed8786.js"),[]).then(({data:e})=>e),"v-f8950628":()=>a(()=>import("./offline-transactions.html.8d1d2de8.js"),[]).then(({data:e})=>e),"v-877d9708":()=>a(()=>import("./programs.html.55c372ec.js"),[]).then(({data:e})=>e),"v-26f90ae0":()=>a(()=>import("./staking.html.bbf4c1ac.js"),[]).then(({data:e})=>e),"v-0d096f0e":()=>a(()=>import("./token.html.43db4402.js"),[]).then(({data:e})=>e),"v-2d0abea2":()=>a(()=>import("./index.html.7d9ea062.js"),[]).then(({data:e})=>e),"v-2d0abfd8":()=>a(()=>import("./index.html.7ae71288.js"),[]).then(({data:e})=>e),"v-2d0ac643":()=>a(()=>import("./index.html.5b3f2ada.js"),[]).then(({data:e})=>e),"v-2d0ad528":()=>a(()=>import("./index.html.10c6341f.js"),[]).then(({data:e})=>e),"v-15aaed93":()=>a(()=>import("./index.html.b4991d27.js"),[]).then(({data:e})=>e),"v-a0b9b104":()=>a(()=>import("./accounts.html.3d33092a.js"),[]).then(({data:e})=>e),"v-9a7329dc":()=>a(()=>import("./cpi.html.25f2d5bd.js"),[]).then(({data:e})=>e),"v-1a485bbe":()=>a(()=>import("./pdas.html.02bdc9f3.js"),[]).then(({data:e})=>e),"v-00c442d6":()=>a(()=>import("./programs.html.d0219ea7.js"),[]).then(({data:e})=>e),"v-e455ec22":()=>a(()=>import("./transactions.html.74d43318.js"),[]).then(({data:e})=>e),"v-eb393c2e":()=>a(()=>import("./auto-approve.html.78a21927.js"),[]).then(({data:e})=>e),"v-772145b4":()=>a(()=>import("./distribution.html.5054629b.js"),[]).then(({data:e})=>e),"v-5105c746":()=>a(()=>import("./energy-system.html.247dc971.js"),[]).then(({data:e})=>e),"v-5938dad4":()=>a(()=>import("./game-examples.html.40ac5dd2.js"),[]).then(({data:e})=>e),"v-f1adf734":()=>a(()=>import("./game-sdks.html.b7b1489e.js"),[]).then(({data:e})=>e),"v-62aa93a3":()=>a(()=>import("./hello-world.html.e99409d5.js"),[]).then(({data:e})=>e),"v-6a3c698e":()=>a(()=>import("./interact-with-tokens.html.3c85d257.js"),[]).then(({data:e})=>e),"v-a2e66c24":()=>a(()=>import("./intro.html.51f00446.js"),[]).then(({data:e})=>e),"v-087c524b":()=>a(()=>import("./nfts-in-games.html.5898ff02.js"),[]).then(({data:e})=>e),"v-7664744b":()=>a(()=>import("./porting-anchor-to-unity.html.8ad16b00.js"),[]).then(({data:e})=>e),"v-2dcf5551":()=>a(()=>import("./saving-game-state.html.2ee97311.js"),[]).then(({data:e})=>e),"v-0122f36a":()=>a(()=>import("./store-sol-in-pda.html.4ff617de.js"),[]).then(({data:e})=>e),"v-8e9578ae":()=>a(()=>import("./installation.html.55799980.js"),[]).then(({data:e})=>e),"v-668d6eae":()=>a(()=>import("./account-maps.html.c9249bbc.js"),[]).then(({data:e})=>e),"v-5f505435":()=>a(()=>import("./data-migration.html.06870b65.js"),[]).then(({data:e})=>e),"v-556f7939":()=>a(()=>import("./debugging-solana-programs.html.1d099feb.js"),[]).then(({data:e})=>e),"v-8fa8488e":()=>a(()=>import("./feature-parity-testing.html.61551d89.js"),[]).then(({data:e})=>e),"v-16ea0e9a":()=>a(()=>import("./get-program-accounts.html.88cda781.js"),[]).then(({data:e})=>e),"v-cdc7dfbc":()=>a(()=>import("./serialization.html.279a312f.js"),[]).then(({data:e})=>e),"v-5a4e12b5":()=>a(()=>import("./versioned-transactions.html.e1209342.js"),[]).then(({data:e})=>e),"v-7b6447aa":()=>a(()=>import("./accounts.html.f6ab334e.js"),[]).then(({data:e})=>e),"v-b9616b86":()=>a(()=>import("./basic-transactions.html.13d601ed.js"),[]).then(({data:e})=>e),"v-670400c0":()=>a(()=>import("./keypairs-and-wallets.html.a876964b.js"),[]).then(({data:e})=>e),"v-7ae54a28":()=>a(()=>import("./local-development.html.0592ee0b.js"),[]).then(({data:e})=>e),"v-3aafba84":()=>a(()=>import("./name-service.html.c5f60f0b.js"),[]).then(({data:e})=>e),"v-87eb5f0c":()=>a(()=>import("./nfts.html.8ab155e7.js"),[]).then(({data:e})=>e),"v-c6123a9c":()=>a(()=>import("./offline-transactions.html.c95a953c.js"),[]).then(({data:e})=>e),"v-12489342":()=>a(()=>import("./programs.html.a2b54a7a.js"),[]).then(({data:e})=>e),"v-10522b0a":()=>a(()=>import("./staking.html.7be45709.js"),[]).then(({data:e})=>e),"v-d84413f0":()=>a(()=>import("./token.html.e2d8e013.js"),[]).then(({data:e})=>e),"v-8e5be170":()=>a(()=>import("./accounts.html.05949c32.js"),[]).then(({data:e})=>e),"v-f2328ef0":()=>a(()=>import("./pdas.html.77efba8f.js"),[]).then(({data:e})=>e),"v-08ccc65f":()=>a(()=>import("./programs.html.340e959e.js"),[]).then(({data:e})=>e),"v-1256fcb9":()=>a(()=>import("./transactions.html.50802ba1.js"),[]).then(({data:e})=>e),"v-2485abf3":()=>a(()=>import("./installation.html.715b3b99.js"),[]).then(({data:e})=>e),"v-2d09cebe":()=>a(()=>import("./accounts.html.1c2ce3f3.js"),[]).then(({data:e})=>e),"v-9ce8299a":()=>a(()=>import("./basic-transactions.html.3e9e6a63.js"),[]).then(({data:e})=>e),"v-4ec78794":()=>a(()=>import("./keypairs-and-wallets.html.3f5752cd.js"),[]).then(({data:e})=>e),"v-32949b1c":()=>a(()=>import("./local-development.html.f5643536.js"),[]).then(({data:e})=>e),"v-01539798":()=>a(()=>import("./name-service.html.326a6c13.js"),[]).then(({data:e})=>e),"v-6bf79020":()=>a(()=>import("./nfts.html.d679a608.js"),[]).then(({data:e})=>e),"v-0e8f1e28":()=>a(()=>import("./offline-transactions.html.d4e0be3d.js"),[]).then(({data:e})=>e),"v-3975cfb8":()=>a(()=>import("./programs.html.11032af6.js"),[]).then(({data:e})=>e),"v-7cf087d4":()=>a(()=>import("./staking.html.9da955fb.js"),[]).then(({data:e})=>e),"v-4520fd52":()=>a(()=>import("./token.html.7f6e6e11.js"),[]).then(({data:e})=>e),"v-1832f5c2":()=>a(()=>import("./account-maps.html.17bd8d7d.js"),[]).then(({data:e})=>e),"v-70204b2b":()=>a(()=>import("./data-migration.html.50964a4b.js"),[]).then(({data:e})=>e),"v-16deac83":()=>a(()=>import("./debugging-solana-programs.html.3eeeb833.js"),[]).then(({data:e})=>e),"v-732f06a2":()=>a(()=>import("./feature-parity-testing.html.94cf4ee3.js"),[]).then(({data:e})=>e),"v-22a67510":()=>a(()=>import("./get-program-accounts.html.7e74d8ff.js"),[]).then(({data:e})=>e),"v-309da254":()=>a(()=>import("./retrying-transactions.html.8880b234.js"),[]).then(({data:e})=>e),"v-5796626c":()=>a(()=>import("./serialization.html.f6d36f31.js"),[]).then(({data:e})=>e),"v-389f60e0":()=>a(()=>import("./installation.html.fe3ab544.js"),[]).then(({data:e})=>e),"v-08458c16":()=>a(()=>import("./accounts.html.fab56f07.js"),[]).then(({data:e})=>e),"v-79377c96":()=>a(()=>import("./pdas.html.4a946dac.js"),[]).then(({data:e})=>e),"v-4bd7f10c":()=>a(()=>import("./programs.html.d01e378b.js"),[]).then(({data:e})=>e),"v-314308e6":()=>a(()=>import("./transactions.html.cfd147cc.js"),[]).then(({data:e})=>e),"v-471a2192":()=>a(()=>import("./account-maps.html.5696ae7f.js"),[]).then(({data:e})=>e),"v-7642d244":()=>a(()=>import("./data-migration.html.86082ff9.js"),[]).then(({data:e})=>e),"v-6c0a22f0":()=>a(()=>import("./debugging-solana-programs.html.ede954b0.js"),[]).then(({data:e})=>e),"v-35856562":()=>a(()=>import("./feature-parity-testing.html.b2696a90.js"),[]).then(({data:e})=>e),"v-3d8822fa":()=>a(()=>import("./get-program-accounts.html.94ffca18.js"),[]).then(({data:e})=>e),"v-6ad65459":()=>a(()=>import("./serialization.html.6a6635c1.js"),[]).then(({data:e})=>e),"v-3caeb514":()=>a(()=>import("./accounts.html.b91c3a6f.js"),[]).then(({data:e})=>e),"v-20a8d3e6":()=>a(()=>import("./basic-transactions.html.f7122c53.js"),[]).then(({data:e})=>e),"v-17bc77ae":()=>a(()=>import("./keypairs-and-wallets.html.c8dbc763.js"),[]).then(({data:e})=>e),"v-0a613142":()=>a(()=>import("./local-development.html.b97186da.js"),[]).then(({data:e})=>e),"v-1db05f27":()=>a(()=>import("./name-service.html.e0d6e448.js"),[]).then(({data:e})=>e),"v-6f8605e3":()=>a(()=>import("./nfts.html.f28f6d5c.js"),[]).then(({data:e})=>e),"v-2a14a61b":()=>a(()=>import("./offline-transactions.html.269432a1.js"),[]).then(({data:e})=>e),"v-e6ad27aa":()=>a(()=>import("./programs.html.96b262ce.js"),[]).then(({data:e})=>e),"v-8d23ddfe":()=>a(()=>import("./staking.html.76101920.js"),[]).then(({data:e})=>e),"v-4fd8edbf":()=>a(()=>import("./token.html.3affc20f.js"),[]).then(({data:e})=>e),"v-598bfdda":()=>a(()=>import("./accounts.html.c9e84ab5.js"),[]).then(({data:e})=>e),"v-034daf46":()=>a(()=>import("./cpi.html.667a7166.js"),[]).then(({data:e})=>e),"v-410d47d3":()=>a(()=>import("./pdas.html.b3879735.js"),[]).then(({data:e})=>e),"v-2334b82a":()=>a(()=>import("./programs.html.23a73b36.js"),[]).then(({data:e})=>e),"v-1ee9ddf8":()=>a(()=>import("./transactions.html.ba8c17fa.js"),[]).then(({data:e})=>e),"v-4605d97e":()=>a(()=>import("./installation.html.1d183c4d.js"),[]).then(({data:e})=>e),"v-3c3bf874":()=>a(()=>import("./auto-approve.html.00c95edb.js"),[]).then(({data:e})=>e),"v-28f9dc3f":()=>a(()=>import("./distribution.html.566e7a4c.js"),[]).then(({data:e})=>e),"v-4b7ffbca":()=>a(()=>import("./energy-system.html.71e02b64.js"),[]).then(({data:e})=>e),"v-5c9dcd6b":()=>a(()=>import("./game-examples.html.4c517700.js"),[]).then(({data:e})=>e),"v-16181c8a":()=>a(()=>import("./game-sdks.html.3a17cfa1.js"),[]).then(({data:e})=>e),"v-ed210090":()=>a(()=>import("./hello-world.html.e42a81e2.js"),[]).then(({data:e})=>e),"v-5e474519":()=>a(()=>import("./interact-with-tokens.html.4c6e3333.js"),[]).then(({data:e})=>e),"v-5625a9c3":()=>a(()=>import("./intro.html.48bcd940.js"),[]).then(({data:e})=>e),"v-dc92e5c0":()=>a(()=>import("./nfts-in-games.html.31ac6411.js"),[]).then(({data:e})=>e),"v-1c322e40":()=>a(()=>import("./porting-anchor-to-unity.html.a9555d2b.js"),[]).then(({data:e})=>e),"v-71d3c4b4":()=>a(()=>import("./saving-game-state.html.e30bfd02.js"),[]).then(({data:e})=>e),"v-50674c75":()=>a(()=>import("./store-sol-in-pda.html.e343d4f5.js"),[]).then(({data:e})=>e),"v-742672b6":()=>a(()=>import("./accounts.html.d07565e6.js"),[]).then(({data:e})=>e),"v-7fdd21f0":()=>a(()=>import("./basic-transactions.html.b8e697ee.js"),[]).then(({data:e})=>e),"v-5bd01ecb":()=>a(()=>import("./keypairs-and-wallets.html.8fca2ff6.js"),[]).then(({data:e})=>e),"v-0835dffd":()=>a(()=>import("./local-development.html.c3972821.js"),[]).then(({data:e})=>e),"v-31ec7bc9":()=>a(()=>import("./name-service.html.b1fdc398.js"),[]).then(({data:e})=>e),"v-3331e485":()=>a(()=>import("./nfts.html.965a9b0c.js"),[]).then(({data:e})=>e),"v-dc79fe86":()=>a(()=>import("./offline-transactions.html.0ba69adc.js"),[]).then(({data:e})=>e),"v-77bdac66":()=>a(()=>import("./programs.html.f54b94ed.js"),[]).then(({data:e})=>e),"v-3717171f":()=>a(()=>import("./staking.html.8fb2ba56.js"),[]).then(({data:e})=>e),"v-01a8e35d":()=>a(()=>import("./token.html.a4239a10.js"),[]).then(({data:e})=>e),"v-7e91df34":()=>a(()=>import("./account-maps.html.2bcb32db.js"),[]).then(({data:e})=>e),"v-05451800":()=>a(()=>import("./data-migration.html.9963dda2.js"),[]).then(({data:e})=>e),"v-0bb1c6e4":()=>a(()=>import("./debugging-solana-programs.html.43aa08db.js"),[]).then(({data:e})=>e),"v-5623fef8":()=>a(()=>import("./feature-parity-testing.html.d784a27d.js"),[]).then(({data:e})=>e),"v-0af4ea25":()=>a(()=>import("./get-program-accounts.html.1208b27a.js"),[]).then(({data:e})=>e),"v-22564af7":()=>a(()=>import("./serialization.html.99337bc6.js"),[]).then(({data:e})=>e),"v-77103780":()=>a(()=>import("./versioned-transactions.html.f7668ac4.js"),[]).then(({data:e})=>e),"v-da3cf63c":()=>a(()=>import("./accounts.html.79c0ca0e.js"),[]).then(({data:e})=>e),"v-0bf50b22":()=>a(()=>import("./pdas.html.27a51730.js"),[]).then(({data:e})=>e),"v-3a47880e":()=>a(()=>import("./programs.html.740744ad.js"),[]).then(({data:e})=>e),"v-73c3d55a":()=>a(()=>import("./transactions.html.263aeafa.js"),[]).then(({data:e})=>e),"v-02e9060d":()=>a(()=>import("./installation.html.9592faa3.js"),[]).then(({data:e})=>e),"v-10a285c5":()=>a(()=>import("./account-maps.html.f4daf1b2.js"),[]).then(({data:e})=>e),"v-4ddeba51":()=>a(()=>import("./data-migration.html.db91eb39.js"),[]).then(({data:e})=>e),"v-0173699d":()=>a(()=>import("./debugging-solana-programs.html.02363b40.js"),[]).then(({data:e})=>e),"v-971f3456":()=>a(()=>import("./feature-parity-testing.html.abd7566e.js"),[]).then(({data:e})=>e),"v-307b2094":()=>a(()=>import("./get-program-accounts.html.d8ef5734.js"),[]).then(({data:e})=>e),"v-5b4b12f4":()=>a(()=>import("./serialization.html.baac0ece.js"),[]).then(({data:e})=>e),"v-06371947":()=>a(()=>import("./accounts.html.cf985a2a.js"),[]).then(({data:e})=>e),"v-c0d8574e":()=>a(()=>import("./basic-transactions.html.710d7d5d.js"),[]).then(({data:e})=>e),"v-644e73dc":()=>a(()=>import("./keypairs-and-wallets.html.2d9f22b4.js"),[]).then(({data:e})=>e),"v-75cde6e8":()=>a(()=>import("./local-development.html.7e1bd7bf.js"),[]).then(({data:e})=>e),"v-673571da":()=>a(()=>import("./name-service.html.e670bb57.js"),[]).then(({data:e})=>e),"v-931308d4":()=>a(()=>import("./nfts.html.61f329ef.js"),[]).then(({data:e})=>e),"v-cb7d5464":()=>a(()=>import("./offline-transactions.html.805d36b8.js"),[]).then(({data:e})=>e),"v-5631d05e":()=>a(()=>import("./programs.html.db98f647.js"),[]).then(({data:e})=>e),"v-01feda6e":()=>a(()=>import("./staking.html.e8c26eca.js"),[]).then(({data:e})=>e),"v-3211a328":()=>a(()=>import("./token.html.59c78a7f.js"),[]).then(({data:e})=>e),"v-179e82fe":()=>a(()=>import("./accounts.html.70ea6ada.js"),[]).then(({data:e})=>e),"v-52ffdf92":()=>a(()=>import("./cpi.html.a071110c.js"),[]).then(({data:e})=>e),"v-fd851184":()=>a(()=>import("./pdas.html.1bf322c2.js"),[]).then(({data:e})=>e),"v-67993a15":()=>a(()=>import("./programs.html.98e92214.js"),[]).then(({data:e})=>e),"v-ec92b522":()=>a(()=>import("./transactions.html.aceea138.js"),[]).then(({data:e})=>e),"v-429dff29":()=>a(()=>import("./installation.html.de1947ca.js"),[]).then(({data:e})=>e),"v-44679d29":()=>a(()=>import("./account-maps.html.bdfb893c.js"),[]).then(({data:e})=>e),"v-b688ee96":()=>a(()=>import("./data-migration.html.6e4730c8.js"),[]).then(({data:e})=>e),"v-04e3168e":()=>a(()=>import("./debugging-solana-programs.html.73a43e11.js"),[]).then(({data:e})=>e),"v-6b5a9039":()=>a(()=>import("./feature-parity-testing.html.e7b6289c.js"),[]).then(({data:e})=>e),"v-d18839cc":()=>a(()=>import("./get-program-accounts.html.bc5b3f33.js"),[]).then(({data:e})=>e),"v-17384ba2":()=>a(()=>import("./serialization.html.0fd086ee.js"),[]).then(({data:e})=>e),"v-0d7cc735":()=>a(()=>import("./versioned-transactions.html.cb88ab6b.js"),[]).then(({data:e})=>e),"v-39fc30ab":()=>a(()=>import("./accounts.html.705daa54.js"),[]).then(({data:e})=>e),"v-567dfebd":()=>a(()=>import("./basic-transactions.html.e4233694.js"),[]).then(({data:e})=>e),"v-09579540":()=>a(()=>import("./keypairs-and-wallets.html.7b4b2fca.js"),[]).then(({data:e})=>e),"v-04ce05a8":()=>a(()=>import("./local-development.html.2a116d81.js"),[]).then(({data:e})=>e),"v-7a18373e":()=>a(()=>import("./name-service.html.65503a5f.js"),[]).then(({data:e})=>e),"v-6d16e4fa":()=>a(()=>import("./nfts.html.8f57b7b1.js"),[]).then(({data:e})=>e),"v-3f4a7732":()=>a(()=>import("./offline-transactions.html.1d7f75c0.js"),[]).then(({data:e})=>e),"v-ec12307c":()=>a(()=>import("./programs.html.6e6eaba0.js"),[]).then(({data:e})=>e),"v-7747468a":()=>a(()=>import("./staking.html.0e9ae4bd.js"),[]).then(({data:e})=>e),"v-0463f188":()=>a(()=>import("./token.html.abb20884.js"),[]).then(({data:e})=>e),"v-52cd49a4":()=>a(()=>import("./accounts.html.8e89eb52.js"),[]).then(({data:e})=>e),"v-4a4be76e":()=>a(()=>import("./pdas.html.360db77f.js"),[]).then(({data:e})=>e),"v-26941245":()=>a(()=>import("./programs.html.12722776.js"),[]).then(({data:e})=>e),"v-2229e59f":()=>a(()=>import("./transactions.html.4904b5fe.js"),[]).then(({data:e})=>e),"v-e97c194e":()=>a(()=>import("./installation.html.9991e5f0.js"),[]).then(({data:e})=>e),"v-c5b19a0e":()=>a(()=>import("./account-maps.html.d79562dd.js"),[]).then(({data:e})=>e),"v-68262af6":()=>a(()=>import("./data-migration.html.cd8a5967.js"),[]).then(({data:e})=>e),"v-a4865e2e":()=>a(()=>import("./debugging-solana-programs.html.6d280979.js"),[]).then(({data:e})=>e),"v-37352209":()=>a(()=>import("./feature-parity-testing.html.a8a66110.js"),[]).then(({data:e})=>e),"v-0d30a8ea":()=>a(()=>import("./get-program-accounts.html.dfc1f9ed.js"),[]).then(({data:e})=>e),"v-5329205c":()=>a(()=>import("./serialization.html.4b397ef0.js"),[]).then(({data:e})=>e),"v-da88730a":()=>a(()=>import("./accounts.html.ff5e6a4d.js"),[]).then(({data:e})=>e),"v-2258908d":()=>a(()=>import("./basic-transactions.html.22d5c3fa.js"),[]).then(({data:e})=>e),"v-48d4f310":()=>a(()=>import("./keypairs-and-wallets.html.abc05e48.js"),[]).then(({data:e})=>e),"v-4d71f9d8":()=>a(()=>import("./local-development.html.0eff045a.js"),[]).then(({data:e})=>e),"v-cb0f35e4":()=>a(()=>import("./name-service.html.d6069fdf.js"),[]).then(({data:e})=>e),"v-b3ac3a6c":()=>a(()=>import("./nfts.html.cf97bb6d.js"),[]).then(({data:e})=>e),"v-7ec7d502":()=>a(()=>import("./offline-transactions.html.cff454eb.js"),[]).then(({data:e})=>e),"v-3a9304dc":()=>a(()=>import("./programs.html.6895a158.js"),[]).then(({data:e})=>e),"v-4055b6ba":()=>a(()=>import("./staking.html.ad2f2638.js"),[]).then(({data:e})=>e),"v-249ea490":()=>a(()=>import("./token.html.edd7bd6b.js"),[]).then(({data:e})=>e),"v-2c987e4b":()=>a(()=>import("./accounts.html.d72d5885.js"),[]).then(({data:e})=>e),"v-203f4825":()=>a(()=>import("./cpi.html.dc41f18c.js"),[]).then(({data:e})=>e),"v-5beb210b":()=>a(()=>import("./pdas.html.580eb019.js"),[]).then(({data:e})=>e),"v-7c933562":()=>a(()=>import("./programs.html.2d618e60.js"),[]).then(({data:e})=>e),"v-4f78323c":()=>a(()=>import("./transactions.html.f505a02d.js"),[]).then(({data:e})=>e),"v-c3a0e694":()=>a(()=>import("./installation.html.20ee85ab.js"),[]).then(({data:e})=>e),"v-8121a608":()=>a(()=>import("./account-maps.html.2fa44b58.js"),[]).then(({data:e})=>e),"v-7c1e6fc8":()=>a(()=>import("./data-migration.html.352a418b.js"),[]).then(({data:e})=>e),"v-19571874":()=>a(()=>import("./debugging-solana-programs.html.30d528f0.js"),[]).then(({data:e})=>e),"v-fc0a9768":()=>a(()=>import("./feature-parity-testing.html.a793ec94.js"),[]).then(({data:e})=>e),"v-eca82026":()=>a(()=>import("./get-program-accounts.html.18585c23.js"),[]).then(({data:e})=>e),"v-05ba93a2":()=>a(()=>import("./serialization.html.7fc385dd.js"),[]).then(({data:e})=>e),"v-241ceb48":()=>a(()=>import("./versioned-transactions.html.8ddb12df.js"),[]).then(({data:e})=>e),"v-95f87f04":()=>a(()=>import("./accounts.html.9e729942.js"),[]).then(({data:e})=>e),"v-6d1e22d0":()=>a(()=>import("./basic-transactions.html.508e4c5e.js"),[]).then(({data:e})=>e),"v-0f01feda":()=>a(()=>import("./keypairs-and-wallets.html.3a19760d.js"),[]).then(({data:e})=>e),"v-605f9335":()=>a(()=>import("./local-development.html.fd41bc0d.js"),[]).then(({data:e})=>e),"v-045da591":()=>a(()=>import("./name-service.html.8fa8af28.js"),[]).then(({data:e})=>e),"v-262d564d":()=>a(()=>import("./nfts.html.b43c7325.js"),[]).then(({data:e})=>e),"v-2e71e285":()=>a(()=>import("./offline-transactions.html.9e334e4b.js"),[]).then(({data:e})=>e),"v-04fe7795":()=>a(()=>import("./programs.html.55412d52.js"),[]).then(({data:e})=>e),"v-51f4f057":()=>a(()=>import("./staking.html.192ee479.js"),[]).then(({data:e})=>e),"v-6e1baa95":()=>a(()=>import("./token.html.060a50ce.js"),[]).then(({data:e})=>e),"v-c5f91db4":()=>a(()=>import("./installation.html.e9fcf7ff.js"),[]).then(({data:e})=>e),"v-3f8c76bb":()=>a(()=>import("./accounts.html.9a24f48b.js"),[]).then(({data:e})=>e),"v-310cd17b":()=>a(()=>import("./pdas.html.8ac3fb57.js"),[]).then(({data:e})=>e),"v-e0f1a45c":()=>a(()=>import("./programs.html.ee69815a.js"),[]).then(({data:e})=>e),"v-5dda72ac":()=>a(()=>import("./transactions.html.a94c32b0.js"),[]).then(({data:e})=>e),"v-f7cfc3e4":()=>a(()=>import("./accounts.html.6a7a3655.js"),[]).then(({data:e})=>e),"v-48c6cc60":()=>a(()=>import("./basic-transactions.html.145d9f79.js"),[]).then(({data:e})=>e),"v-e6b8f3ba":()=>a(()=>import("./keypairs-and-wallets.html.38d07f14.js"),[]).then(({data:e})=>e),"v-5f3377a5":()=>a(()=>import("./local-development.html.8d6577e9.js"),[]).then(({data:e})=>e),"v-4fe8bb21":()=>a(()=>import("./name-service.html.2caf8c15.js"),[]).then(({data:e})=>e),"v-00aefbdd":()=>a(()=>import("./nfts.html.d0725425.js"),[]).then(({data:e})=>e),"v-7ad32fd6":()=>a(()=>import("./offline-transactions.html.694e5a9c.js"),[]).then(({data:e})=>e),"v-57da55b6":()=>a(()=>import("./programs.html.39ac6b79.js"),[]).then(({data:e})=>e),"v-2716a0c7":()=>a(()=>import("./staking.html.6dbe22bd.js"),[]).then(({data:e})=>e),"v-386291f6":()=>a(()=>import("./token.html.997564bc.js"),[]).then(({data:e})=>e),"v-e2f8eae8":()=>a(()=>import("./account-maps.html.54fde3f5.js"),[]).then(({data:e})=>e),"v-50dcad50":()=>a(()=>import("./data-migration.html.c9b6d0c5.js"),[]).then(({data:e})=>e),"v-387ebf94":()=>a(()=>import("./debugging-solana-programs.html.125832d7.js"),[]).then(({data:e})=>e),"v-5da35ddc":()=>a(()=>import("./feature-parity-testing.html.c3ce27d5.js"),[]).then(({data:e})=>e),"v-4791bd7d":()=>a(()=>import("./get-program-accounts.html.d60be8fc.js"),[]).then(({data:e})=>e),"v-109a0a9f":()=>a(()=>import("./serialization.html.d3083af5.js"),[]).then(({data:e})=>e),"v-0074d650":()=>a(()=>import("./versioned-transactions.html.dc527468.js"),[]).then(({data:e})=>e),"v-46a93876":()=>a(()=>import("./accounts.html.5a5d0844.js"),[]).then(({data:e})=>e),"v-5aefd385":()=>a(()=>import("./pdas.html.2b207b9f.js"),[]).then(({data:e})=>e),"v-2ca61adc":()=>a(()=>import("./programs.html.3d46bb1d.js"),[]).then(({data:e})=>e),"v-4847cab6":()=>a(()=>import("./transactions.html.ee5db7dc.js"),[]).then(({data:e})=>e),"v-bd0a22a0":()=>a(()=>import("./installation.html.1bd39712.js"),[]).then(({data:e})=>e),"v-bdfe6c7c":()=>a(()=>import("./account-maps.html.c1ccf667.js"),[]).then(({data:e})=>e),"v-3fbbf30e":()=>a(()=>import("./data-migration.html.81a46ce7.js"),[]).then(({data:e})=>e),"v-846b6e80":()=>a(()=>import("./debugging-solana-programs.html.be9db9a6.js"),[]).then(({data:e})=>e),"v-2fc8dcdc":()=>a(()=>import("./feature-parity-testing.html.1da58904.js"),[]).then(({data:e})=>e),"v-aa61329a":()=>a(()=>import("./get-program-accounts.html.34a6b3c3.js"),[]).then(({data:e})=>e),"v-4dc4b229":()=>a(()=>import("./serialization.html.7c84274e.js"),[]).then(({data:e})=>e),"v-d2d54578":()=>a(()=>import("./accounts.html.dde6cff9.js"),[]).then(({data:e})=>e),"v-5981ffd4":()=>a(()=>import("./basic-transactions.html.598e40ad.js"),[]).then(({data:e})=>e),"v-59dda459":()=>a(()=>import("./keypairs-and-wallets.html.830d46df.js"),[]).then(({data:e})=>e),"v-63aaf52f":()=>a(()=>import("./local-development.html.61336a2a.js"),[]).then(({data:e})=>e),"v-56a76f57":()=>a(()=>import("./name-service.html.1a8fc34e.js"),[]).then(({data:e})=>e),"v-41e84613":()=>a(()=>import("./nfts.html.fdb7230c.js"),[]).then(({data:e})=>e),"v-e05ef36a":()=>a(()=>import("./offline-transactions.html.9b30c0d6.js"),[]).then(({data:e})=>e),"v-32dfd74a":()=>a(()=>import("./programs.html.23836cb0.js"),[]).then(({data:e})=>e),"v-50f9a2d1":()=>a(()=>import("./staking.html.cffbd136.js"),[]).then(({data:e})=>e),"v-6c8298e2":()=>a(()=>import("./token.html.64ba1d3c.js"),[]).then(({data:e})=>e),"v-6a35b27a":()=>a(()=>import("./accounts.html.149df989.js"),[]).then(({data:e})=>e),"v-8e20768c":()=>a(()=>import("./pdas.html.eca9a894.js"),[]).then(({data:e})=>e),"v-8b9f2cde":()=>a(()=>import("./programs.html.fcfb4c07.js"),[]).then(({data:e})=>e),"v-55f1b6eb":()=>a(()=>import("./transactions.html.eadd37e3.js"),[]).then(({data:e})=>e),"v-274abcb6":()=>a(()=>import("./installation.html.266da2d0.js"),[]).then(({data:e})=>e),"v-02feff2d":()=>a(()=>import("./account-maps.html.680b0ba3.js"),[]).then(({data:e})=>e),"v-1b0279b9":()=>a(()=>import("./data-migration.html.159d137d.js"),[]).then(({data:e})=>e),"v-5afd7935":()=>a(()=>import("./debugging-solana-programs.html.afe6a517.js"),[]).then(({data:e})=>e),"v-0d9b8586":()=>a(()=>import("./feature-parity-testing.html.270f9679.js"),[]).then(({data:e})=>e),"v-5263011e":()=>a(()=>import("./get-program-accounts.html.416a5c35.js"),[]).then(({data:e})=>e),"v-2b8d2a1e":()=>a(()=>import("./serialization.html.b936ab13.js"),[]).then(({data:e})=>e),"v-0ed8daa2":()=>a(()=>import("./accounts.html.928ccf41.js"),[]).then(({data:e})=>e),"v-3754a87e":()=>a(()=>import("./basic-transactions.html.81d4c6bc.js"),[]).then(({data:e})=>e),"v-7ff81144":()=>a(()=>import("./keypairs-and-wallets.html.a79a299d.js"),[]).then(({data:e})=>e),"v-a2eaafb8":()=>a(()=>import("./local-development.html.2abc6315.js"),[]).then(({data:e})=>e),"v-7a66f742":()=>a(()=>import("./name-service.html.625e197d.js"),[]).then(({data:e})=>e),"v-1b97e8fe":()=>a(()=>import("./nfts.html.595f8f64.js"),[]).then(({data:e})=>e),"v-942a1994":()=>a(()=>import("./offline-transactions.html.81a50c51.js"),[]).then(({data:e})=>e),"v-488e49c6":()=>a(()=>import("./programs.html.d21ae222.js"),[]).then(({data:e})=>e),"v-a20cd7f4":()=>a(()=>import("./staking.html.65c2cb9f.js"),[]).then(({data:e})=>e),"v-26036e04":()=>a(()=>import("./token.html.85b24b07.js"),[]).then(({data:e})=>e),"v-43987c75":()=>a(()=>import("./accounts.html.34134782.js"),[]).then(({data:e})=>e),"v-3c24c435":()=>a(()=>import("./pdas.html.ea02eb75.js"),[]).then(({data:e})=>e),"v-d8d998e8":()=>a(()=>import("./programs.html.34dde9fb.js"),[]).then(({data:e})=>e),"v-66cde934":()=>a(()=>import("./transactions.html.63c9ce66.js"),[]).then(({data:e})=>e),"v-567ec360":()=>a(()=>import("./installation.html.5e3228c9.js"),[]).then(({data:e})=>e),"v-332c21dc":()=>a(()=>import("./account-maps.html.938d8c12.js"),[]).then(({data:e})=>e),"v-611df744":()=>a(()=>import("./data-migration.html.ce4aed9f.js"),[]).then(({data:e})=>e),"v-23177520":()=>a(()=>import("./debugging-solana-programs.html.c57d7b64.js"),[]).then(({data:e})=>e),"v-58db5a3c":()=>a(()=>import("./feature-parity-testing.html.c4705572.js"),[]).then(({data:e})=>e),"v-9eb387fa":()=>a(()=>import("./get-program-accounts.html.f1b24dac.js"),[]).then(({data:e})=>e),"v-94ff924e":()=>a(()=>import("./serialization.html.aa4dde2f.js"),[]).then(({data:e})=>e),"v-75b489de":()=>a(()=>import("./versioned-transactions.html.82642eca.js"),[]).then(({data:e})=>e),"v-4802fad8":()=>a(()=>import("./accounts.html.8f47d5db.js"),[]).then(({data:e})=>e),"v-82947d34":()=>a(()=>import("./basic-transactions.html.e7edd2e8.js"),[]).then(({data:e})=>e),"v-42a951a9":()=>a(()=>import("./keypairs-and-wallets.html.df8bc1da.js"),[]).then(({data:e})=>e),"v-18aec9df":()=>a(()=>import("./local-development.html.3d4bf8da.js"),[]).then(({data:e})=>e),"v-654526b2":()=>a(()=>import("./name-service.html.34b8f57a.js"),[]).then(({data:e})=>e),"v-844ed93a":()=>a(()=>import("./nfts.html.522cff97.js"),[]).then(({data:e})=>e),"v-789c339b":()=>a(()=>import("./offline-transactions.html.dad115e4.js"),[]).then(({data:e})=>e),"v-2bf939ab":()=>a(()=>import("./programs.html.7c34ad36.js"),[]).then(({data:e})=>e),"v-322e9381":()=>a(()=>import("./staking.html.87a92c5a.js"),[]).then(({data:e})=>e),"v-684fdf82":()=>a(()=>import("./token.html.c6b0e0c2.js"),[]).then(({data:e})=>e),"v-3707792a":()=>a(()=>import("./accounts.html.c4066a49.js"),[]).then(({data:e})=>e),"v-1990636a":()=>a(()=>import("./pdas.html.19706e9c.js"),[]).then(({data:e})=>e),"v-f1fb9f7e":()=>a(()=>import("./programs.html.b67b45cc.js"),[]).then(({data:e})=>e),"v-4220a59b":()=>a(()=>import("./transactions.html.8e008dcb.js"),[]).then(({data:e})=>e),"v-eeeeb756":()=>a(()=>import("./installation.html.1baa10e4.js"),[]).then(({data:e})=>e),"v-931b9306":()=>a(()=>import("./account-maps.html.ec99597b.js"),[]).then(({data:e})=>e),"v-82f5c5ee":()=>a(()=>import("./data-migration.html.6ed17ef4.js"),[]).then(({data:e})=>e),"v-560aa3e5":()=>a(()=>import("./debugging-solana-programs.html.d0ab2086.js"),[]).then(({data:e})=>e),"v-3a76dee6":()=>a(()=>import("./feature-parity-testing.html.0478ce69.js"),[]).then(({data:e})=>e),"v-27dc2f24":()=>a(()=>import("./get-program-accounts.html.c29868e4.js"),[]).then(({data:e})=>e),"v-32fe4664":()=>a(()=>import("./serialization.html.8a29cfeb.js"),[]).then(({data:e})=>e),"v-f63270ee":()=>a(()=>import("./versioned-transactions.html.027ceb3d.js"),[]).then(({data:e})=>e),"v-a7f26c02":()=>a(()=>import("./accounts.html.5a2213a5.js"),[]).then(({data:e})=>e),"v-643001de":()=>a(()=>import("./basic-transactions.html.1913df43.js"),[]).then(({data:e})=>e),"v-4e42d094":()=>a(()=>import("./keypairs-and-wallets.html.c4fc2c20.js"),[]).then(({data:e})=>e),"v-4ab8aad4":()=>a(()=>import("./local-development.html.720fba0c.js"),[]).then(({data:e})=>e),"v-47ce0692":()=>a(()=>import("./name-service.html.38938728.js"),[]).then(({data:e})=>e),"v-9d296f64":()=>a(()=>import("./nfts.html.2c1ad270.js"),[]).then(({data:e})=>e),"v-f7949af4":()=>a(()=>import("./offline-transactions.html.7dc3f34e.js"),[]).then(({data:e})=>e),"v-07fcfdd4":()=>a(()=>import("./programs.html.bc91a8b3.js"),[]).then(({data:e})=>e),"v-0f9a32b6":()=>a(()=>import("./staking.html.5cf7a6ff.js"),[]).then(({data:e})=>e),"v-4a9bf8b4":()=>a(()=>import("./token.html.36202d18.js"),[]).then(({data:e})=>e),"v-3706649a":()=>a(()=>import("./404.html.f166316b.js"),[]).then(({data:e})=>e)},yc=Ee(dm),kc=_i({key:"",path:"",title:"",lang:"",frontmatter:{},excerpt:"",headers:[]}),ut=Ee(kc),nn=()=>ut;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updatePageData=e=>{yc.value[e.key]=()=>Promise.resolve(e),e.key===ut.value.key&&(ut.value=e)});const Ec=Symbol(""),hm=()=>{const e=Ie(Ec);if(!e)throw new Error("usePageFrontmatter() is called without provider.");return e},Pc=Symbol(""),gm=()=>{const e=Ie(Pc);if(!e)throw new Error("usePageHead() is called without provider.");return e},mm=Symbol(""),wc=Symbol(""),Tc=()=>{const e=Ie(wc);if(!e)throw new Error("usePageLang() is called without provider.");return e},Fi=Symbol(""),ji=()=>{const e=Ie(Fi);if(!e)throw new Error("useRouteLocale() is called without provider.");return e},vm={base:"/",lang:"en-US",title:"Solana Cookbook",description:"",head:[["link",{rel:"icon",href:"/solana_cookbook_lightmode.svg"}],["script",{"data-domain":"solanacookbook.com",src:"https://plausible.io/js/plausible.js"}]],locales:{"/":{lang:"en-US",title:"Solana Cookbook"},"/zh/":{lang:"zh-CN",title:"Solana\u79D8\u7C4D"},"/es/":{lang:"es",title:"Solana Cookbook"},"/pt/":{lang:"pt-BR",title:"Solana Cookbook"},"/de/":{lang:"de-DE",title:"Solana Cookbook"},"/vi/":{lang:"vi-VN",title:"To\xE0n t\u1EADp Solana"},"/th/":{lang:"th-TH",title:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana"},"/fr/":{lang:"fr-FR",title:"Solana Cookbook"},"/id/":{lang:"id-ID",title:"Buku Panduan Solana"},"/kr/":{lang:"kr-KR",title:"Solana Cookbook"},"/tr/":{lang:"tr-TR",title:"Solana Cookbook"},"/ja/":{lang:"ja-JP",title:"Solana Cookbook"},"/fil/":{lang:"fil-PH",title:"Solana Cookbook"}}},Et=Ee(vm),Lc=()=>Et;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updateSiteData=e=>{Et.value=e});const Oc=Symbol(""),q_=()=>{const e=Ie(Oc);if(!e)throw new Error("useSiteLocaleData() is called without provider.");return e},pm=Symbol(""),zi=e=>{let t;e.pageKey?t=e.pageKey:t=nn().value.key;const l=bc[t];return l?ee(l):ee("div","404 Not Found")};zi.displayName="Content";zi.props={pageKey:{type:String,required:!1}};const fm={"404":h(()=>a(()=>import("./404.97105336.js"),[])),Layout:h(()=>a(()=>import("./Layout.895c939a.js"),[]))},_m=([e,t,l])=>e==="meta"&&t.name?`${e}.${t.name}`:["title","base"].includes(e)?e:e==="template"&&t.id?`${e}.${t.id}`:JSON.stringify([e,t,l]),bm=e=>{const t=new Set,l=[];return e.forEach(n=>{const r=_m(n);t.has(r)||(t.add(r),l.push(n))}),l},ym=e=>/^(https?:)?\/\//.test(e),$_=e=>/^mailto:/.test(e),G_=e=>/^tel:/.test(e),Ac=e=>Object.prototype.toString.call(e)==="[object Object]",km=e=>e.replace(/\/$/,""),Em=e=>e.replace(/^\//,""),Dc=(e,t)=>{const l=Object.keys(e).sort((n,r)=>{const i=r.split("/").length-n.split("/").length;return i!==0?i:r.length-n.length});for(const n of l)if(t.startsWith(n))return n;return"/"},Pm=(e,t="/")=>e.replace(/^(https?:)?\/\/[^/]*/,"").replace(new RegExp(`^${t}`),"/"),Ba=Me({name:"Vuepress",setup(){const e=nn(),t=_e(()=>{let l;if(e.value.path){const n=e.value.frontmatter.layout;be(n)?l=n:l="Layout"}else l="404";return fm[l]||gh(l,!1)});return()=>ee(t.value)}}),At=e=>e,Ni=e=>e,wm=e=>ym(e)?e:`${Lc().value.base}${Em(e)}`,Ft=fl({resolvePageData:async e=>{const t=yc.value[e],l=await(t==null?void 0:t());return l!=null?l:kc},resolvePageFrontmatter:e=>e.frontmatter,resolvePageHead:(e,t,l)=>{const n=be(t.description)?t.description:l.description,r=[...te(t.head)?t.head:[],...l.head,["title",{},e],["meta",{name:"description",content:n}]];return bm(r)},resolvePageHeadTitle:(e,t)=>`${e.title?`${e.title} | `:""}${t.title}`,resolvePageLang:e=>e.lang||"en",resolveRouteLocale:(e,t)=>Dc(e,t),resolveSiteLocaleData:(e,t)=>xe(xe({},e),e.locales[t])});const Tm=ee("svg",{class:"external-link-icon",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",focusable:"false",x:"0px",y:"0px",viewBox:"0 0 100 100",width:"15",height:"15"},[ee("path",{fill:"currentColor",d:"M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"}),ee("polygon",{fill:"currentColor",points:"45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"})]),Lm=Me({name:"ExternalLinkIcon",props:{locales:{type:Object,required:!1,default:()=>({})}},setup(e){const t=ji(),l=_e(()=>{var n;return(n=e.locales[t.value])!==null&&n!==void 0?n:{openInNewWindow:"open in new window"}});return()=>ee("span",[Tm,ee("span",{class:"external-link-icon-sr-only"},l.value.openInNewWindow)])}}),Om={"/":{openInNewWindow:"open in new window"},"/zh/":{openInNewWindow:"open in new window"},"/zh_t/":{openInNewWindow:"open in new window"},"/es/":{openInNewWindow:"open in new window"},"/de/":{openInNewWindow:"open in new window"},"/vi/":{openInNewWindow:"open in new window"},"/th/":{openInNewWindow:"open in new window"},"/fr/":{openInNewWindow:"open in new window"},"/id/":{openInNewWindow:"open in new window"},"/pt/":{openInNewWindow:"open in new window"},"/tr/":{openInNewWindow:"open in new window"},"/kr/":{openInNewWindow:"open in new window"},"/ja/":{openInNewWindow:"open in new window"},"/fil/":{openInNewWindow:"open in new window"}};var Am=At(({app:e})=>{e.component("ExternalLinkIcon",ee(Lm,{locales:Om}))});/*! medium-zoom 1.0.6 | MIT License | https://github.com/francoischalifour/medium-zoom */var jt=Object.assign||function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(A){function H(){}A(H,H)},r=function(A){var H=A.target;if(H===U){m();return}w.indexOf(H)!==-1&&_({target:H})},i=function(){if(!(S||!O.original)){var A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(j-A)>D.scrollOffset&&setTimeout(m,150)}},o=function(A){var H=A.key||A.keyCode;(H==="Escape"||H==="Esc"||H===27)&&m()},s=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=A;if(A.background&&(U.style.background=A.background),A.container&&A.container instanceof Object&&(H.container=jt({},D.container,A.container)),A.template){var Y=kn(A.template)?A.template:document.querySelector(A.template);H.template=Y}return D=jt({},D,H),w.forEach(function(se){se.dispatchEvent(Qt("medium-zoom:update",{detail:{zoom:B}}))}),B},c=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(jt({},D,A))},u=function(){for(var A=arguments.length,H=Array(A),Y=0;Y0?H.reduce(function(J,ne){return[].concat(J,Ua(ne))},[]):w;return se.forEach(function(J){J.classList.remove("medium-zoom-image"),J.dispatchEvent(Qt("medium-zoom:detach",{detail:{zoom:B}}))}),w=w.filter(function(J){return se.indexOf(J)===-1}),B},v=function(A,H){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return w.forEach(function(se){se.addEventListener("medium-zoom:"+A,H,Y)}),L.push({type:"medium-zoom:"+A,listener:H,options:Y}),B},g=function(A,H){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return w.forEach(function(se){se.removeEventListener("medium-zoom:"+A,H,Y)}),L=L.filter(function(se){return!(se.type==="medium-zoom:"+A&&se.listener.toString()===H.toString())}),B},b=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=A.target,Y=function(){var J={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},ne=void 0,re=void 0;if(D.container)if(D.container instanceof Object)J=jt({},J,D.container),ne=J.width-J.left-J.right-D.margin*2,re=J.height-J.top-J.bottom-D.margin*2;else{var Pe=kn(D.container)?D.container:document.querySelector(D.container),Le=Pe.getBoundingClientRect(),Ae=Le.width,we=Le.height,Re=Le.left,He=Le.top;J=jt({},J,{width:Ae,height:we,left:Re,top:He})}ne=ne||J.width-D.margin*2,re=re||J.height-D.margin*2;var R=O.zoomedHd||O.original,K=Ka(R)?ne:R.naturalWidth||ne,z=Ka(R)?re:R.naturalHeight||re,W=R.getBoundingClientRect(),ue=W.top,me=W.left,ie=W.width,le=W.height,p=Math.min(K,ne)/ie,k=Math.min(z,re)/le,T=Math.min(p,k),I=(-me+(ne-ie)/2+D.margin+J.left)/T,C=(-ue+(re-le)/2+D.margin+J.top)/T,x="scale("+T+") translate3d("+I+"px, "+C+"px, 0)";O.zoomed.style.transform=x,O.zoomedHd&&(O.zoomedHd.style.transform=x)};return new n(function(se){if(H&&w.indexOf(H)===-1){se(B);return}var J=function Ae(){S=!1,O.zoomed.removeEventListener("transitionend",Ae),O.original.dispatchEvent(Qt("medium-zoom:opened",{detail:{zoom:B}})),se(B)};if(O.zoomed){se(B);return}if(H)O.original=H;else if(w.length>0){var ne=w;O.original=ne[0]}else{se(B);return}if(O.original.dispatchEvent(Qt("medium-zoom:open",{detail:{zoom:B}})),j=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,S=!0,O.zoomed=Im(O.original),document.body.appendChild(U),D.template){var re=kn(D.template)?D.template:document.querySelector(D.template);O.template=document.createElement("div"),O.template.appendChild(re.content.cloneNode(!0)),document.body.appendChild(O.template)}if(document.body.appendChild(O.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),O.original.classList.add("medium-zoom-image--hidden"),O.zoomed.classList.add("medium-zoom-image--opened"),O.zoomed.addEventListener("click",m),O.zoomed.addEventListener("transitionend",J),O.original.getAttribute("data-zoom-src")){O.zoomedHd=O.zoomed.cloneNode(),O.zoomedHd.removeAttribute("srcset"),O.zoomedHd.removeAttribute("sizes"),O.zoomedHd.src=O.zoomed.getAttribute("data-zoom-src"),O.zoomedHd.onerror=function(){clearInterval(Pe),console.warn("Unable to reach the zoom image target "+O.zoomedHd.src),O.zoomedHd=null,Y()};var Pe=setInterval(function(){O.zoomedHd.complete&&(clearInterval(Pe),O.zoomedHd.classList.add("medium-zoom-image--opened"),O.zoomedHd.addEventListener("click",m),document.body.appendChild(O.zoomedHd),Y())},10)}else if(O.original.hasAttribute("srcset")){O.zoomedHd=O.zoomed.cloneNode(),O.zoomedHd.removeAttribute("sizes"),O.zoomedHd.removeAttribute("loading");var Le=O.zoomedHd.addEventListener("load",function(){O.zoomedHd.removeEventListener("load",Le),O.zoomedHd.classList.add("medium-zoom-image--opened"),O.zoomedHd.addEventListener("click",m),document.body.appendChild(O.zoomedHd),Y()})}else Y()})},m=function(){return new n(function(A){if(S||!O.original){A(B);return}var H=function Y(){O.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(O.zoomed),O.zoomedHd&&document.body.removeChild(O.zoomedHd),document.body.removeChild(U),O.zoomed.classList.remove("medium-zoom-image--opened"),O.template&&document.body.removeChild(O.template),S=!1,O.zoomed.removeEventListener("transitionend",Y),O.original.dispatchEvent(Qt("medium-zoom:closed",{detail:{zoom:B}})),O.original=null,O.zoomed=null,O.zoomedHd=null,O.template=null,A(B)};S=!0,document.body.classList.remove("medium-zoom--opened"),O.zoomed.style.transform="",O.zoomedHd&&(O.zoomedHd.style.transform=""),O.template&&(O.template.style.transition="opacity 150ms",O.template.style.opacity=0),O.original.dispatchEvent(Qt("medium-zoom:close",{detail:{zoom:B}})),O.zoomed.addEventListener("transitionend",H)})},_=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=A.target;return O.original?m():b({target:H})},f=function(){return D},y=function(){return w},P=function(){return O.original},w=[],L=[],S=!1,j=0,D=l,O={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&u(t),D=jt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var U=Sm(D.background);document.addEventListener("click",r),document.addEventListener("keyup",o),document.addEventListener("scroll",i),window.addEventListener("resize",m);var B={open:b,close:m,toggle:_,update:s,clone:c,attach:u,detach:d,on:v,off:g,getOptions:f,getImages:y,getZoomedImage:P};return B};function Cm(e,t){t===void 0&&(t={});var l=t.insertAt;if(!(!e||typeof document=="undefined")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",l==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var xm=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Cm(xm);var Vm=Rm;const Fm=Symbol("mediumZoom");const jm=".theme-default-content > img, .theme-default-content :not(a) > img",zm={},Nm=300;var Mm=At(({app:e,router:t})=>{const l=Vm(zm);l.refresh=(n=jm)=>{l.detach(),l.attach(n)},e.provide(Fm,l),t.afterEach(()=>{setTimeout(()=>l.refresh(),Nm)})});const Hm={logo:"/solana_cookbook_lightmode.svg",logoDark:"/solana_cookbook_darkmode.svg",contributors:!0,algolia:{apiKey:"1831a64a81ffef4f85d5c0aa28cb801f",indexName:"solanacookbook",appId:"QMKSKREFKN",algoliaOptions:{hitsPerPage:10}},locales:{"/":{navbar:[{text:"Contribute",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Getting Started",children:["/","/getting-started/installation.md"]},{text:"Core Concepts",children:["/core-concepts/accounts.md","/core-concepts/programs.md","/core-concepts/transactions.md","/core-concepts/pdas.md","/core-concepts/cpi.md"]},{text:"Guides",children:["/guides/get-program-accounts.md","/guides/serialization.md","/guides/data-migration.md","/guides/account-maps.md","/guides/debugging-solana-programs.md","/guides/feature-parity-testing.md","/guides/versioned-transactions.md"]},{text:"References",children:["/references/local-development.md","/references/keypairs-and-wallets.md","/references/basic-transactions.md","/references/accounts.md","/references/programs.md","/references/token.md","/references/staking.md","/references/nfts.md","/references/offline-transactions.md","/references/name-service.md",{text:"Gaming",collapsible:!0,children:["/gaming/intro.md","/gaming/game-sdks.md","/gaming/nfts-in-games.md","/gaming/hello-world.md","/gaming/store-sol-in-pda.md","/gaming/saving-game-state.md","/gaming/energy-system.md","/gaming/interact-with-tokens.md","/gaming/porting-anchor-to-unity.md","/gaming/distribution.md","/gaming/game-examples.md"]}]}]},selectLanguageName:"English"},"/zh/":{selectLanguageName:"\u4E2D\u6587\uFF08\u7B80\u4F53\uFF09",navbar:[{text:"\u8D21\u732E\u4EE3\u7801",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:[{text:"\u5F00\u59CB\u4F7F\u7528",children:["/zh/","/zh/getting-started/installation.md"]},{text:"\u6838\u5FC3\u6982\u5FF5",children:["/zh/core-concepts/accounts.md","/zh/core-concepts/programs.md","/zh/core-concepts/transactions.md","/zh/core-concepts/pdas.md"]},{text:"\u6307\u5357",children:["/zh/guides/get-program-accounts.md","/zh/guides/serialization.md","/zh/guides/data-migration.md","/zh/guides/account-maps.md","/zh/guides/debugging-solana-programs.md","/zh/guides/feature-parity-testing.md"]},{text:"\u53C2\u8003",children:["/zh/references/local-development.md","/zh/references/keypairs-and-wallets.md","/zh/references/basic-transactions.md","/zh/references/accounts.md","/zh/references/programs.md","/zh/references/token.md","/zh/references/anchor.md","/zh/references/staking.md","/zh/references/nfts.md","/zh/references/offline-transactions.md","/zh/references/name-service.md"]}]},"/zh_t/":{selectLanguageName:"\u4E2D\u6587\uFF08\u7E41\u4F53\uFF09",navbar:[{text:"\u8CA2\u737B\u4EE3\u78BC",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:[{text:"\u958B\u59CB\u4F7F\u7528",children:["/zh_t/","/zh_t/getting-started/installation.md"]},{text:"\u6838\u5FC3\u6982\u5FF5",children:["/zh_t/core-concepts/accounts.md","/zh_t/core-concepts/programs.md","/zh_t/core-concepts/transactions.md","/zh_t/core-concepts/pdas.md"]},{text:"\u6307\u5357",children:["/zh_t/guides/get-program-accounts.md","/zh_t/guides/serialization.md","/zh_t/guides/data-migration.md","/zh_t/guides/account-maps.md","/zh_t/guides/debugging-solana-programs.md","/zh_t/guides/feature-parity-testing.md"]},{text:"\u53C3\u8003",children:["/zh_t/references/local-development.md","/zh_t/references/keypairs-and-wallets.md","/zh_t/references/basic-transactions.md","/zh_t/references/accounts.md","/zh_t/references/programs.md","/zh_t/references/token.md","/zh_t/references/anchor.md","/zh_t/references/staking.md","/zh_t/references/nfts.md","/zh_t/references/offline-transactions.md","/zh_t/references/name-service.md"]}]},"/es/":{selectLanguageName:"Spanish",navbar:[{text:"Contribuir",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Primeros pasos",children:["/es/","/es/getting-started/installation.md"]},{text:"Conceptos clave",children:["/es/core-concepts/accounts.md","/es/core-concepts/programs.md","/es/core-concepts/transactions.md","/es/core-concepts/pdas.md"]},{text:"Gu\xEDas",children:["/es/guides/get-program-accounts.md","/es/guides/serialization.md","/es/guides/data-migration.md","/es/guides/account-maps.md","/es/guides/debugging-solana-programs.md","/es/guides/feature-parity-testing.md"]},{text:"Referencias",children:["/es/references/local-development.md","/es/references/keypairs-and-wallets.md","/es/references/basic-transactions.md","/es/references/accounts.md","/es/references/programs.md","/es/references/token.md","/es/references/staking.md","/es/references/nfts.md","/es/references/offline-transactions.md","/es/references/name-service.md"]}]}},"/de/":{selectLanguageName:"Deutsch",navbar:[{text:"Kontributor",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"F\xFCr Beginner",children:["/de/","/de/getting-started/installation.md"]},{text:"Fundamentale Konzepte",children:["/de/core-concepts/accounts.md","/de/core-concepts/programs.md","/de/core-concepts/transactions.md","/de/core-concepts/pdas.md"]},{text:"Guides",children:["/de/guides/get-program-accounts.md","/de/guides/serialization.md","/de/guides/data-migration.md","/de/guides/account-maps.md","/de/guides/debugging-solana-programs.md","/de/guides/feature-parity-testing.md"]},{text:"Referenzen",children:["/de/references/local-development.md","/de/references/keypairs-and-wallets.md","/de/references/basic-transactions.md","/de/references/accounts.md","/de/references/programs.md","/de/references/token.md","/de/references/staking.md","/de/references/nfts.md","/de/references/offline-transactions.md","/de/references/name-service.md"]}]}},"/vi/":{selectLanguageName:"Ti\u1EBFng Vi\u1EC7t",navbar:[{text:"\u0110\xF3ng g\xF3p",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/vi/":[{text:"M\u1EDF \u0111\u1EA7u",children:["/vi/","/vi/getting-started/installation.md"]},{text:"Kh\xE1i ni\u1EC7m c\u0103n b\u1EA3n",children:["/vi/core-concepts/accounts.md","/vi/core-concepts/programs.md","/vi/core-concepts/transactions.md","/vi/core-concepts/pdas.md"]},{text:"H\u01B0\u1EDBng d\u1EABn",children:["/vi/guides/get-program-accounts.md","/vi/guides/serialization.md","/vi/guides/data-migration.md","/vi/guides/account-maps.md","/vi/guides/debugging-solana-programs.md","/vi/guides/feature-parity-testing.md"]},{text:"Tham kh\u1EA3o",children:["/vi/references/local-development.md","/vi/references/keypairs-and-wallets.md","/vi/references/basic-transactions.md","/vi/references/accounts.md","/vi/references/programs.md","/vi/references/token.md","/vi/references/staking.md","/vi/references/nfts.md","/vi/references/offline-transactions.md","/vi/references/name-service.md"]}]}},"/th/":{selectLanguageName:"\u0E44\u0E17\u0E22",navbar:[{text:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/th/":[{text:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",children:["/th/","/th/getting-started/installation.md"]},{text:"\u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E2B\u0E25\u0E31\u0E01",children:["/th/core-concepts/accounts.md","/th/core-concepts/programs.md","/th/core-concepts/transactions.md","/th/core-concepts/pdas.md"]},{text:"\u0E41\u0E19\u0E27\u0E17\u0E32\u0E07",children:["/th/guides/get-program-accounts.md","/th/guides/serialization.md","/th/guides/data-migration.md","/th/guides/account-maps.md","/th/guides/debugging-solana-programs.md","/th/guides/feature-parity-testing.md","/th/guides/versioned-transactions.md"]},{text:"\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07",children:["/th/references/local-development.md","/th/references/keypairs-and-wallets.md","/th/references/basic-transactions.md","/th/references/accounts.md","/th/references/programs.md","/th/references/token.md","/th/references/staking.md","/th/references/nfts.md","/th/references/offline-transactions.md","/th/references/name-service.md"]}]}},"/fr/":{selectLanguageName:"Fran\xE7ais",navbar:[{text:"Contribuer",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/fr/":[{text:"Pour Commencer",children:["/fr/","/fr/getting-started/installation.md"]},{text:"Concepts Fondamentaux",children:["/fr/core-concepts/accounts.md","/fr/core-concepts/programs.md","/fr/core-concepts/transactions.md","/fr/core-concepts/pdas.md","/fr/core-concepts/cpi.md"]},{text:"Guides",children:["/fr/guides/get-program-accounts.md","/fr/guides/serialization.md","/fr/guides/data-migration.md","/fr/guides/account-maps.md","/fr/guides/debugging-solana-programs.md","/fr/guides/feature-parity-testing.md"]},{text:"R\xE9f\xE9rences",children:["/fr/references/local-development.md","/fr/references/keypairs-and-wallets.md","/fr/references/basic-transactions.md","/fr/references/accounts.md","/fr/references/programs.md","/fr/references/token.md","/fr/references/staking.md","/fr/references/nfts.md","/fr/references/offline-transactions.md","/fr/references/name-service.md",{text:"Gaming",collapsible:!0,children:["/fr/gaming/intro.md","/fr/gaming/game-sdks.md","/fr/gaming/nfts-in-games.md","/fr/gaming/hello-world.md","/fr/gaming/store-sol-in-pda.md","/fr/gaming/saving-game-state.md","/fr/gaming/energy-system.md","/fr/gaming/interact-with-tokens.md","/fr/gaming/porting-anchor-to-unity.md","/fr/gaming/distribution.md","/fr/gaming/game-examples.md"]}]}]}},"/id/":{selectLanguageName:"Bahasa Indonesia",navbar:[{text:"Kontribusi",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Memulai",children:["/id/","/id/getting-started/installation.md"]},{text:"Konsep Utama",children:["/id/core-concepts/accounts.md","/id/core-concepts/programs.md","/id/core-concepts/transactions.md","/id/core-concepts/pdas.md"]},{text:"Panduan",children:["/id/guides/get-program-accounts.md","/id/guides/serialization.md","/id/guides/data-migration.md","/id/guides/account-maps.md","/id/guides/debugging-solana-programs.md","/id/guides/feature-parity-testing.md"]},{text:"Referensi",children:["/id/references/local-development.md","/id/references/keypairs-and-wallets.md","/id/references/basic-transactions.md","/id/references/accounts.md","/id/references/programs.md","/id/references/token.md","/id/references/staking.md","/id/references/nfts.md","/id/references/offline-transactions.md","/id/references/name-service.md"]}]}},"/pt/":{selectLanguageName:"Portugu\xEAs",navbar:[{text:"Contribuir",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Primeiros pasos",children:["/pt/","/pt/getting-started/installation.md"]},{text:"Conceitos chaves",children:["/pt/core-concepts/accounts.md","/pt/core-concepts/programs.md","/pt/core-concepts/transactions.md","/pt/core-concepts/pdas.md"]},{text:"Guias",children:["/pt/guides/get-program-accounts.md","/pt/guides/serialization.md","/pt/guides/data-migration.md","/pt/guides/account-maps.md","/pt/guides/debugging-solana-programs.md","/pt/guides/feature-parity-testing.md"]},{text:"Refer\xEAncias",children:["/pt/references/local-development.md","/pt/references/keypairs-and-wallets.md","/pt/references/basic-transactions.md","/pt/references/accounts.md","/pt/references/programs.md","/pt/references/token.md","/pt/references/staking.md","/pt/references/nfts.md","/pt/references/offline-transactions.md","/pt/references/name-service.md"]}]}},"/tr/":{selectLanguageName:"T\xFCrk\xE7e",navbar:[{text:"Katk\u0131 yapmak",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/tr/":[{text:"Ba\u015Flarken",children:["/tr/","/tr/getting-started/installation.md"]},{text:"Temel Kavramlar",children:["/tr/core-concepts/accounts.md","/tr/core-concepts/programs.md","/tr/core-concepts/transactions.md","/tr/core-concepts/pdas.md"]},{text:"K\u0131lavuzlar",children:["/tr/guides/get-program-accounts.md","/tr/guides/serialization.md","/tr/guides/data-migration.md","/tr/guides/account-maps.md","/tr/guides/debugging-solana-programs.md","/tr/guides/feature-parity-testing.md"]},{text:"Referanslar",children:["/tr/references/local-development.md","/tr/references/keypairs-and-wallets.md","/tr/references/basic-transactions.md","/tr/references/accounts.md","/tr/references/programs.md","/tr/references/token.md","/tr/references/staking.md","/tr/references/nfts.md","/tr/references/offline-transactions.md","/tr/references/name-service.md"]}]}},"/kr/":{selectLanguageName:"\uD55C\uAD6D\uC5B4",navbar:[{text:"Contribute",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Getting Started",children:["/kr/","/kr/getting-started/installation.md"]},{text:"Core Concepts",children:["/kr/core-concepts/accounts.md","/kr/core-concepts/programs.md","/kr/core-concepts/transactions.md","/kr/core-concepts/pdas.md"]},{text:"Guides",children:["/kr/guides/get-program-accounts.md","/kr/guides/serialization.md","/kr/guides/data-migration.md","/kr/guides/account-maps.md","/kr/guides/debugging-solana-programs.md","/kr/guides/feature-parity-testing.md"]},{text:"References",children:["/kr/references/local-development.md","/kr/references/keypairs-and-wallets.md","/kr/references/basic-transactions.md","/kr/references/accounts.md","/kr/references/programs.md","/kr/references/token.md","/kr/references/staking.md","/kr/references/nfts.md","/kr/references/offline-transactions.md","/kr/references/name-service.md"]}]}},"/ja/":{selectLanguageName:"\u65E5\u672C\u8A9E",navbar:[{text:"\u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30C8",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"\u306F\u3058\u3081\u306B",children:["/ja/","/ja/getting-started/installation.md"]},{text:"\u30B3\u30A2\u30B3\u30F3\u30BB\u30D7\u30C8",children:["/ja/core-concepts/accounts.md","/ja/core-concepts/programs.md","/ja/core-concepts/transactions.md","/ja/core-concepts/pdas.md","/ja/core-concepts/cpi.md"]},{text:"\u30AC\u30A4\u30C9",children:["/ja/guides/get-program-accounts.md","/ja/guides/serialization.md","/ja/guides/data-migration.md","/ja/guides/account-maps.md","/ja/guides/debugging-solana-programs.md","/ja/guides/feature-parity-testing.md"]},{text:"\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9",children:["/ja/references/local-development.md","/ja/references/keypairs-and-wallets.md","/ja/references/basic-transactions.md","/ja/references/accounts.md","/ja/references/programs.md","/ja/references/token.md","/ja/references/staking.md","/ja/references/nfts.md","/ja/references/offline-transactions.md","/ja/references/name-service.md"]}]}},"/fil/":{selectLanguageName:"Filipino",navbar:[{text:"Pag-ambag",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Pagsisimula",children:["/fil/","/fil/getting-started/installation.md"]},{text:"Mga pangunahing konsepto",children:["/fil/core-concepts/accounts.md","/fil/core-concepts/programs.md","/fil/core-concepts/transactions.md","/fil/core-concepts/pdas.md"]},{text:"Mga Gabay",children:["/fil/guides/get-program-accounts.md","/fil/guides/serialization.md","/fil/guides/data-migration.md","/fil/guides/account-maps.md","/fil/guides/debugging-solana-programs.md","/fil/guides/feature-parity-testing.md"]},{text:"Mga sanggunian",children:["/fil/references/local-development.md","/fil/references/keypairs-and-wallets.md","/fil/references/basic-transactions.md","/fil/references/accounts.md","/fil/references/programs.md","/fil/references/token.md","/fil/references/staking.md","/fil/references/nfts.md","/fil/references/offline-transactions.md","/fil/references/name-service.md"]}]}}},navbar:[],darkMode:!0,repo:null,selectLanguageText:"Languages",selectLanguageAriaLabel:"Select language",sidebar:"auto",sidebarDepth:2,editLink:!0,editLinkText:"Edit this page",lastUpdated:!0,lastUpdatedText:"Last Updated",contributorsText:"Contributors",notFound:["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],backToHome:"Take me home",openInNewWindow:"open in new window",toggleDarkMode:"toggle dark mode",toggleSidebar:"toggle sidebar"},Sc=Ee(Hm),Bm=()=>Sc;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updateThemeData=e=>{Sc.value=e});const Ic=Symbol(""),Km=()=>{const e=Ie(Ic);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Um=(e,t)=>{var l;return xe(xe({},e),(l=e.locales)===null||l===void 0?void 0:l[t])};var Wm=At(({app:e})=>{const t=Bm(),l=e._context.provides[Fi],n=_e(()=>Um(t.value,l.value));e.provide(Ic,n),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return n.value}}})});const qm=Me({props:{type:{type:String,required:!1,default:"tip"},text:{type:String,required:!1,default:""},vertical:{type:String,required:!1,default:void 0}},setup(e){return(t,l)=>(tn(),Ai("span",{class:Pt(["badge",e.type]),style:Qn({verticalAlign:e.vertical})},[jn(t.$slots,"default",{},()=>[Di(xu(e.text),1)])],6))}});var $m=Me({name:"CodeGroup",setup(e,{slots:t}){const l=Ee(-1),n=Ee([]),r=(s=l.value)=>{s{s>0?l.value=s-1:l.value=n.value.length-1,n.value[l.value].focus()},o=(s,c)=>{s.key===" "||s.key==="Enter"?(s.preventDefault(),l.value=c):s.key==="ArrowRight"?(s.preventDefault(),r(c)):s.key==="ArrowLeft"&&(s.preventDefault(),i(c))};return()=>{var s;const c=(((s=t.default)===null||s===void 0?void 0:s.call(t))||[]).filter(u=>u.type.name==="CodeGroupItem").map(u=>(u.props===null&&(u.props={}),u));return c.length===0?null:(l.value<0||l.value>c.length-1?(l.value=c.findIndex(u=>u.props.active===""||u.props.active===!0),l.value===-1&&(l.value=0)):c.forEach((u,d)=>{u.props.active=d===l.value}),ee("div",{class:"code-group"},[ee("div",{class:"code-group__nav"},ee("ul",{class:"code-group__ul"},c.map((u,d)=>{const v=d===l.value;return ee("li",{class:"code-group__li"},ee("button",{ref:g=>{g&&(n.value[d]=g)},class:{"code-group__nav-tab":!0,"code-group__nav-tab-active":v},ariaPressed:v,ariaExpanded:v,onClick:()=>l.value=d,onKeydown:g=>o(g,d)},u.props.title))}))),c]))}}});const Gm=["aria-selected"],Jm=Me({name:"CodeGroupItem"}),Qm=Me(Dt(xe({},Jm),{props:{title:{type:String,required:!0},active:{type:Boolean,required:!1,default:!1}},setup(e){return(t,l)=>(tn(),Ai("div",{class:Pt(["code-group-item",{"code-group-item__active":e.active}]),"aria-selected":e.active},[jn(t.$slots,"default")],10,Gm))}}));function Rc(e){return Uu()?(Wu(e),!0):!1}const rn=typeof window!="undefined",Ym=e=>typeof e=="string",kr=()=>{};function Zm(e,t){function l(...n){e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})}return l}const Xm=e=>e();var Wa=Object.getOwnPropertySymbols,ev=Object.prototype.hasOwnProperty,tv=Object.prototype.propertyIsEnumerable,lv=(e,t)=>{var l={};for(var n in e)ev.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(e!=null&&Wa)for(var n of Wa(e))t.indexOf(n)<0&&tv.call(e,n)&&(l[n]=e[n]);return l};function nv(e,t,l={}){const n=l,{eventFilter:r=Xm}=n,i=lv(n,["eventFilter"]);return et(e,Zm(r,t),i)}function rv(e,t=!0){nc()?tt(e):t?e():Ei(e)}const Hn=rn?window:void 0;rn&&window.document;rn&&window.navigator;rn&&window.location;function iv(...e){let t,l,n,r;if(Ym(e[0])?([l,n,r]=e,t=Hn):[t,l,n,r]=e,!t)return kr;let i=kr;const o=et(()=>Bt(t),c=>{i(),c&&(c.addEventListener(l,n,r),i=()=>{c.removeEventListener(l,n,r),i=kr})},{immediate:!0,flush:"post"}),s=()=>{o(),i()};return Rc(s),s}function av(e,t={}){const{window:l=Hn}=t;let n;const r=Ee(!1),i=()=>{!l||(n||(n=l.matchMedia(e)),r.value=n.matches)};return rv(()=>{i(),n&&("addEventListener"in n?n.addEventListener("change",i):n.addListener(i),Rc(()=>{"removeEventListener"in i?n.removeEventListener("change",i):n.removeListener(i)}))}),r}const qr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},$r="__vueuse_ssr_handlers__";qr[$r]=qr[$r]||{};const ov=qr[$r];function sv(e,t){return ov[e]||t}function cv(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const uv={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))}};function dv(e,t,l,n={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,shallow:u,window:d=Hn,eventFilter:v,onError:g=P=>{console.error(P)}}=n,b=Bt(t),m=cv(b),_=(u?Os:Ee)(t),f=(r=n.serializer)!=null?r:uv[m];if(!l)try{l=sv("getDefaultStorage",()=>{var P;return(P=Hn)==null?void 0:P.localStorage})()}catch(P){g(P)}function y(P){if(!(!l||P&&P.key!==e))try{const w=P?P.newValue:l.getItem(e);w==null?(_.value=b,c&&b!==null&&l.setItem(e,f.write(b))):typeof w!="string"?_.value=w:_.value=f.read(w)}catch(w){g(w)}}return y(),d&&s&&iv(d,"storage",P=>setTimeout(()=>y(P),0)),l&&nv(_,()=>{try{_.value==null?l.removeItem(e):l.setItem(e,f.write(_.value))}catch(P){g(P)}},{flush:i,deep:o,eventFilter:v}),_}function hv(e){return av("(prefers-color-scheme: dark)",e)}var qa,$a;rn&&(window==null?void 0:window.navigator)&&((qa=window==null?void 0:window.navigator)==null?void 0:qa.platform)&&/iP(ad|hone|od)/.test(($a=window==null?void 0:window.navigator)==null?void 0:$a.platform);var gv=Object.defineProperty,Ga=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,vv=Object.prototype.propertyIsEnumerable,Ja=(e,t,l)=>t in e?gv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,pv=(e,t)=>{for(var l in t||(t={}))mv.call(t,l)&&Ja(e,l,t[l]);if(Ga)for(var l of Ga(t))vv.call(t,l)&&Ja(e,l,t[l]);return e};const fv={top:0,left:0,bottom:0,right:0,height:0,width:0};pv({text:""},fv);const Cc=Symbol(""),J_=()=>{const e=Ie(Cc);if(!e)throw new Error("useDarkMode() is called without provider.");return e},_v=()=>{const e=jc(),t=hv(),l=dv("vuepress-color-scheme","auto"),n=_e({get(){return e.value.darkMode?l.value==="auto"?t.value:l.value==="dark":!1},set(r){r===t.value?l.value="auto":l.value=r?"dark":"light"}});Kt(Cc,n),bv(n)},bv=e=>{const t=(l=e.value)=>{const n=window==null?void 0:window.document.querySelector("html");n==null||n.classList.toggle("dark",l)};tt(()=>{et(e,t,{immediate:!0})}),Li(()=>t())},xc=(...e)=>{const l=ln().resolve(...e),n=l.matched[l.matched.length-1];if(!(n!=null&&n.redirect))return l;const{redirect:r}=n,i=ae(r)?r(l):r,o=be(i)?{path:i}:i;return xc(xe({hash:l.hash,query:l.query,params:l.params},o))},yv=e=>{const t=xc(e);return{text:t.meta.title||e,link:t.name==="404"?e:t.fullPath}};let Er=null,Pl=null;const kv={wait:()=>Er,pending:()=>{Er=new Promise(e=>Pl=e)},resolve:()=>{Pl==null||Pl(),Er=null,Pl=null}},Ev=()=>kv,Vc=Symbol("sidebarItems"),Q_=()=>{const e=Ie(Vc);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},Pv=()=>{const e=jc(),t=hm(),l=_e(()=>wv(t.value,e.value));Kt(Vc,l)},wv=(e,t)=>{var l,n,r,i;const o=(n=(l=e.sidebar)!==null&&l!==void 0?l:t.sidebar)!==null&&n!==void 0?n:"auto",s=(i=(r=e.sidebarDepth)!==null&&r!==void 0?r:t.sidebarDepth)!==null&&i!==void 0?i:2;return e.home||o===!1?[]:o==="auto"?Lv(s):te(o)?Fc(o,s):Ac(o)?Ov(o,s):[]},Tv=(e,t)=>({text:e.title,link:`#${e.slug}`,children:Mi(e.children,t)}),Mi=(e,t)=>t>0?e.map(l=>Tv(l,t-1)):[],Lv=e=>{const t=nn();return[{text:t.value.title,children:Mi(t.value.headers,e)}]},Fc=(e,t)=>{const l=Vi(),n=nn(),r=i=>{var o;let s;if(be(i)?s=yv(i):s=i,s.children)return Dt(xe({},s),{children:s.children.map(c=>r(c))});if(s.link===l.path){const c=((o=n.value.headers[0])===null||o===void 0?void 0:o.level)===1?n.value.headers[0].children:n.value.headers;return Dt(xe({},s),{children:Mi(c,t)})}return s};return e.map(i=>r(i))},Ov=(e,t)=>{var l;const n=Vi(),r=Dc(e,n.path),i=(l=e[r])!==null&&l!==void 0?l:[];return Fc(i,t)},jc=()=>Km();var Av=At(({app:e,router:t})=>{e.component("Badge",qm),e.component("CodeGroup",$m),e.component("CodeGroupItem",Qm),e.component("NavbarSearch",()=>{const n=e.component("Docsearch")||e.component("SearchBox");return n?ee(n):null});const l=t.options.scrollBehavior;t.options.scrollBehavior=async(...n)=>(await Ev().wait(),l(...n))});const Dv=e=>{if(window.dataLayer&&window.gtag)return;const t=document.createElement("script");t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,t.async=!0,document.head.appendChild(t),window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},gtag("js",new Date),gtag("config",e)},Sv="UA-213843360-1";var Iv=At(()=>{Dv(Sv)});const Rv=({input:e,hotKeys:t})=>{const l=n=>{!e.value||t.value.length===0||n.target===document.body&&t.value.includes(n.key)&&(e.value.focus(),n.preventDefault())};tt(()=>{document.addEventListener("keydown",l)}),lr(()=>{document.removeEventListener("keydown",l)})},Cv=[{title:"Cooking with Solana",headers:[{level:2,title:"Contributing",slug:"contributing",children:[]},{level:2,title:"How to Read the Cookbook",slug:"how-to-read-the-cookbook",children:[]}],path:"/",pathLocale:"/",extraFields:[]},{title:"Kochen mit Solana",headers:[{level:2,title:"Beitragen",slug:"beitragen",children:[]},{level:2,title:"Wie man das Kochbuch liest",slug:"wie-man-das-kochbuch-liest",children:[]}],path:"/de/",pathLocale:"/de/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/core-concepts/accounts.html",pathLocale:"/",extraFields:[]},{title:"Cross Program Invocations (CPIs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"CPI with\xA0invoke",slug:"cpi-with-invoke",children:[]},{level:3,title:"CPI with\xA0invoke_signed",slug:"cpi-with-invoke-signed",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/cpi.html",pathLocale:"/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interacting with PDAs",slug:"interacting-with-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/pdas.html",pathLocale:"/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/programs.html",pathLocale:"/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Fees",slug:"fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/transactions.html",pathLocale:"/",extraFields:[]},{title:"Cooking with Solana",headers:[{level:2,title:"Paano mag-ambag",slug:"paano-mag-ambag",children:[]},{level:2,title:"How to Read the Cookbook",slug:"how-to-read-the-cookbook",children:[]}],path:"/fil/",pathLocale:"/fil/",extraFields:[]},{title:"Solana Cookbook",headers:[{level:2,title:"Contribution",slug:"contribution",children:[]},{level:2,title:"Comment lire le Cookbook",slug:"comment-lire-le-cookbook",children:[]}],path:"/fr/",pathLocale:"/fr/",extraFields:[]},{title:"How to auto approve transactions",headers:[],path:"/gaming/auto-approve.html",pathLocale:"/",extraFields:[]},{title:"Distribution",headers:[{level:2,title:"Publishing Platforms",slug:"publishing-platforms",children:[]}],path:"/gaming/distribution.html",pathLocale:"/",extraFields:[]},{title:"Energy System",headers:[{level:2,title:"Anchor program",slug:"anchor-program",children:[{level:3,title:"Creating the player account",slug:"creating-the-player-account",children:[]},{level:3,title:"Choping trees",slug:"choping-trees",children:[]},{level:3,title:"Calculating the energy",slug:"calculating-the-energy",children:[]}]},{level:2,title:"Js client",slug:"js-client",children:[{level:3,title:"Create connection",slug:"create-connection",children:[]},{level:3,title:"Initialize player data",slug:"initialize-player-data",children:[]},{level:3,title:"Subscribe to account updates",slug:"subscribe-to-account-updates",children:[]},{level:3,title:"Calculate energy and show count down",slug:"calculate-energy-and-show-count-down",children:[]}]}],path:"/gaming/energy-system.html",pathLocale:"/",extraFields:[]},{title:"Learn By Example",headers:[{level:2,title:"Interact with Anchor Program from Unity",slug:"interact-with-anchor-program-from-unity",children:[]},{level:2,title:"Saving Sol in a PDA",slug:"saving-sol-in-a-pda",children:[]},{level:2,title:"On chain matchmaking",slug:"on-chain-matchmaking",children:[]},{level:2,title:"Use Solana Pay Qr codes to control a game",slug:"use-solana-pay-qr-codes-to-control-a-game",children:[]},{level:2,title:"Hide game state from other players",slug:"hide-game-state-from-other-players",children:[]},{level:2,title:"How to build a round based multiplayer game",slug:"how-to-build-a-round-based-multiplayer-game",children:[]},{level:2,title:"On Chain Chess",slug:"on-chain-chess",children:[]},{level:2,title:"Multiplayer Game using voting system",slug:"multiplayer-game-using-voting-system",children:[]},{level:2,title:"Entity component system example",slug:"entity-component-system-example",children:[]},{level:2,title:"Adventure killing monsters and gaining xp",slug:"adventure-killing-monsters-and-gaining-xp",children:[]},{level:2,title:"Real-time pvp on chain game",slug:"real-time-pvp-on-chain-game",children:[]}],path:"/gaming/game-examples.html",pathLocale:"/",extraFields:[]},{title:"Solana Gaming SDKs",headers:[{level:3,title:"Unity SDK",slug:"unity-sdk",children:[]},{level:3,title:"Unreal SDK",slug:"unreal-sdk",children:[]},{level:3,title:"Flutter",slug:"flutter",children:[]},{level:3,title:"Next.js/React + Anchor",slug:"next-js-react-anchor",children:[]},{level:3,title:"Python",slug:"python",children:[]},{level:3,title:"Native C#",slug:"native-c",children:[]}],path:"/gaming/game-sdks.html",pathLocale:"/",extraFields:[]},{title:"Hello World example",headers:[{level:2,title:"Getting started with your first Solana game",slug:"getting-started-with-your-first-solana-game",children:[]},{level:2,title:"Tiny Adventure",slug:"tiny-adventure",children:[{level:3,title:"Getting Started",slug:"getting-started",children:[]},{level:3,title:"Defining the Game Data Account",slug:"defining-the-game-data-account",children:[]},{level:3,title:"Initialize Instruction",slug:"initialize-instruction",children:[]},{level:3,title:"Move Left Instruction",slug:"move-left-instruction",children:[]},{level:3,title:"Move Right Instruction",slug:"move-right-instruction",children:[]},{level:3,title:"Build and Deploy",slug:"build-and-deploy",children:[]},{level:3,title:"Get Started with the Client",slug:"get-started-with-the-client",children:[]},{level:3,title:"Where to Go from Here",slug:"where-to-go-from-here",children:[]}]}],path:"/gaming/hello-world.html",pathLocale:"/",extraFields:[]},{title:"How interact with tokens in programs",headers:[{level:2,title:"Create, Mint, and Burn Tokens with Anchor",slug:"create-mint-and-burn-tokens-with-anchor",children:[{level:3,title:"Getting Started",slug:"getting-started",children:[]},{level:3,title:"Create Mint instruction",slug:"create-mint-instruction",children:[]},{level:3,title:"Init Player Instruction",slug:"init-player-instruction",children:[]},{level:3,title:"Kill Enemy Instruction",slug:"kill-enemy-instruction",children:[]},{level:3,title:"Heal Instruction",slug:"heal-instruction",children:[]},{level:3,title:"Build and Deploy",slug:"build-and-deploy",children:[]},{level:3,title:"Get Started with the Client",slug:"get-started-with-the-client",children:[]}]}],path:"/gaming/interact-with-tokens.html",pathLocale:"/",extraFields:[]},{title:"Introduction to Gaming on Solana",headers:[],path:"/gaming/intro.html",pathLocale:"/",extraFields:[]},{title:"Gaming with NFTs",headers:[{level:2,title:"Token gating with NFTs",slug:"token-gating-with-nfts",children:[]},{level:2,title:"Bonus Effects with NFTs",slug:"bonus-effects-with-nfts",children:[]},{level:2,title:"Using NFT Metadata for Player Stats",slug:"using-nft-metadata-for-player-stats",children:[]},{level:2,title:"Fusing NFTs Together",slug:"fusing-nfts-together",children:[]},{level:2,title:"Use 3D Nfts in a game",slug:"use-3d-nfts-in-a-game",children:[]},{level:2,title:"Customize NFTs with items and traits (Raindrops boots)",slug:"customize-nfts-with-items-and-traits-raindrops-boots",children:[]},{level:2,title:"How to create an NFT collection",slug:"how-to-create-an-nft-collection",children:[]}],path:"/gaming/nfts-in-games.html",pathLocale:"/",extraFields:[]},{title:"Port Anchor to Unity",headers:[{level:2,title:"Generating the Client",slug:"generating-the-client",children:[]},{level:2,title:"Building the Transaction in Unity C#",slug:"building-the-transaction-in-unity-c",children:[]}],path:"/gaming/porting-anchor-to-unity.html",pathLocale:"/",extraFields:[]},{title:"Saving game state",headers:[],path:"/gaming/saving-game-state.html",pathLocale:"/",extraFields:[]},{title:"Storing SOL in a PDA",headers:[{level:2,title:"Tiny Adventure Anchor Program - Part Two",slug:"tiny-adventure-anchor-program-part-two",children:[{level:3,title:"Getting Started",slug:"getting-started",children:[]},{level:3,title:"Defining the Chest Vault Account",slug:"defining-the-chest-vault-account",children:[]},{level:3,title:"Defining the Game Data Account",slug:"defining-the-game-data-account",children:[]},{level:3,title:"Initialize Level One Instruction",slug:"initialize-level-one-instruction",children:[]},{level:3,title:"Reset Level and Spawn Chest Instruction",slug:"reset-level-and-spawn-chest-instruction",children:[]},{level:3,title:"Move Right Instruction",slug:"move-right-instruction",children:[]},{level:3,title:"Build and Deploy",slug:"build-and-deploy",children:[]},{level:3,title:"Get Started with the Client",slug:"get-started-with-the-client",children:[]}]}],path:"/gaming/store-sol-in-pda.html",pathLocale:"/",extraFields:[]},{title:"Libro de recetas de Solana",headers:[{level:2,title:"Contribuyendo",slug:"contribuyendo",children:[]},{level:2,title:"Como Leer el Cookbook",slug:"como-leer-el-cookbook",children:[]}],path:"/es/",pathLocale:"/es/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/getting-started/installation.html",pathLocale:"/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/guides/account-maps.html",pathLocale:"/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"How can you migrate a program's data accounts?",slug:"how-can-you-migrate-a-program-s-data-accounts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Upgrading the Account",slug:"upgrading-the-account",children:[{level:3,title:"1. Add account conversion logic",slug:"_1-add-account-conversion-logic",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/data-migration.html",pathLocale:"/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Runtime Testing and Debugging in editor",slug:"runtime-testing-and-debugging-in-editor",children:[]},{level:2,title:"Local Validator Node Testing in editor",slug:"local-validator-node-testing-in-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/debugging-solana-programs.html",pathLocale:"/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parity Testing",slug:"parity-testing",children:[]},{level:2,title:"Simple Demonstration",slug:"simple-demonstration",children:[{level:3,title:"All features activated",slug:"all-features-activated",children:[]},{level:3,title:"Selective features deactivated",slug:"selective-features-deactivated",children:[]}]},{level:2,title:"Full Parity Testing",slug:"full-parity-testing",children:[]},{level:2,title:"Full Parity Testing Programmatically",slug:"full-parity-testing-programmatically",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/feature-parity-testing.html",pathLocale:"/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/guides/get-program-accounts.html",pathLocale:"/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"Setting up for Borsh Serialization",slug:"setting-up-for-borsh-serialization",children:[]},{level:2,title:"How to serialize instruction data on the client",slug:"how-to-serialize-instruction-data-on-the-client",children:[]},{level:2,title:"How to deserialize instruction data on the program",slug:"how-to-deserialize-instruction-data-on-the-program",children:[]},{level:2,title:"How to serialize account data on the program",slug:"how-to-serialize-account-data-on-the-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"How to deserialize account data on the client",slug:"how-to-deserialize-account-data-on-the-client",children:[]},{level:2,title:"Common Solana TS/JS Mappings",slug:"common-solana-ts-js-mappings",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/serialization.html",pathLocale:"/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Legacy Transaction",slug:"legacy-transaction",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array of account addresses",slug:"compact-array-of-account-addresses",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions",children:[]}]},{level:2,title:"Issues with Legacy Transactions",slug:"issues-with-legacy-transactions",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Versioned Transactions: TransactionV0",slug:"versioned-transactions-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact array of address table lookups",slug:"compact-array-of-address-table-lookups",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions-1",children:[]}]},{level:2,title:"RPC Changes",slug:"rpc-changes",children:[]},{level:2,title:"Other Resources",slug:"other-resources",children:[]},{level:2,title:"References",slug:"references",children:[]}],path:"/guides/versioned-transactions.html",pathLocale:"/",extraFields:[]},{title:"Buku Panduan Solana",headers:[{level:2,title:"Cara untuk berkontribusi",slug:"cara-untuk-berkontribusi",children:[]},{level:2,title:"Cara untuk membaca Buku Panduan",slug:"cara-untuk-membaca-buku-panduan",children:[]}],path:"/id/",pathLocale:"/id/",extraFields:[]},{title:"Cooking with Solana",headers:[{level:2,title:"\u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3",slug:"\u30B3\u30F3\u30C8\u30EA\u30D2\u3099\u30E5\u30FC\u30B7\u30E7\u30F3",children:[]},{level:2,title:"Cookbook\u306E\u8AAD\u307F\u65B9",slug:"cookbook\u306E\u8AAD\u307F\u65B9",children:[]}],path:"/ja/",pathLocale:"/ja/",extraFields:[]},{title:"Cooking with Solana",headers:[{level:2,title:"Contributing",slug:"contributing",children:[]},{level:2,title:"How to Read the Cookbook",slug:"how-to-read-the-cookbook",children:[]}],path:"/kr/",pathLocale:"/kr/",extraFields:[]},{title:"Cozinhando com a Solana",headers:[{level:2,title:"Contribuindo",slug:"contribuindo",children:[]},{level:2,title:"Como Ler o Livro de Receitas",slug:"como-ler-o-livro-de-receitas",children:[]}],path:"/pt/",pathLocale:"/pt/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"How to create a system account",slug:"how-to-create-a-system-account",children:[]},{level:2,title:"How to calculate account cost",slug:"how-to-calculate-account-cost",children:[]},{level:2,title:"How to create accounts with seeds",slug:"how-to-create-accounts-with-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"How to create PDAs",slug:"how-to-create-pdas",children:[{level:3,title:"Generate a PDA",slug:"generate-a-pda",children:[]},{level:3,title:"Create a PDA",slug:"create-a-pda",children:[]}]},{level:2,title:"How to sign with a PDA",slug:"how-to-sign-with-a-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"How to get program accounts",slug:"how-to-get-program-accounts",children:[]},{level:2,title:"How to close accounts",slug:"how-to-close-accounts",children:[]},{level:2,title:"How to get account balance",slug:"how-to-get-account-balance",children:[]}],path:"/references/accounts.html",pathLocale:"/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"How to send SOL",slug:"how-to-send-sol",children:[]},{level:2,title:"How to send SPL-Tokens",slug:"how-to-send-spl-tokens",children:[]},{level:2,title:"How to calculate transaction cost",slug:"how-to-calculate-transaction-cost",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"How to add a memo to a transaction",slug:"how-to-add-a-memo-to-a-transaction",children:[]},{level:2,title:"How to change compute budget, fee, & priority for a transaction",slug:"how-to-change-compute-budget-fee-priority-for-a-transaction",children:[]}],path:"/references/basic-transactions.html",pathLocale:"/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/references/keypairs-and-wallets.html",pathLocale:"/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Starting a Local Validator",slug:"starting-a-local-validator",children:[]},{level:2,title:"Connecting to Environments",slug:"connecting-to-environments",children:[]},{level:2,title:"Subscribing to Events",slug:"subscribing-to-events",children:[]},{level:2,title:"Getting Test SOL",slug:"getting-test-sol",children:[]},{level:2,title:"Using Mainnet Accounts and Programs",slug:"using-mainnet-accounts-and-programs",children:[{level:3,title:"How to load accounts from mainnet",slug:"how-to-load-accounts-from-mainnet",children:[]},{level:3,title:"How to load programs from mainnet",slug:"how-to-load-programs-from-mainnet",children:[]}]}],path:"/references/local-development.html",pathLocale:"/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"Find all the domain names owned by a public key",slug:"find-all-the-domain-names-owned-by-a-public-key",children:[]},{level:2,title:"Resolve a Twitter handle",slug:"resolve-a-twitter-handle",children:[]},{level:2,title:"Reverse look up of a Twitter handle",slug:"reverse-look-up-of-a-twitter-handle",children:[]}],path:"/references/name-service.html",pathLocale:"/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"How to create an NFT",slug:"how-to-create-an-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint the NFT",slug:"mint-the-nft",children:[]}]},{level:2,title:"How to get NFT Metadata",slug:"how-to-get-nft-metadata",children:[]},{level:2,title:"How to get the owner of an NFT",slug:"how-to-get-the-owner-of-an-nft",children:[]},{level:2,title:"How to get NFT Mint Addresses",slug:"how-to-get-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"How to get all NFTs from a wallet?",slug:"how-to-get-all-nfts-from-a-wallet",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"How to create a Candy Machine",slug:"how-to-create-a-candy-machine",children:[]},{level:3,title:"How to delete a Candy Machine",slug:"how-to-delete-a-candy-machine",children:[]},{level:3,title:"How to find Candy Machine via authority",slug:"how-to-find-candy-machine-via-authority",children:[]},{level:3,title:"How to find Candy Machine using wallet address",slug:"how-to-find-candy-machine-using-wallet-address",children:[]},{level:3,title:"How to find Candy Machine using its address",slug:"how-to-find-candy-machine-using-its-address",children:[]},{level:3,title:"How to find minted NFTs from a Candy Machine",slug:"how-to-find-minted-nfts-from-a-candy-machine",children:[]},{level:3,title:"How to insert items into a Candy Machine",slug:"how-to-insert-items-into-a-candy-machine",children:[]},{level:3,title:"How to mint an NFT from a Candy Machine",slug:"how-to-mint-an-nft-from-a-candy-machine",children:[]}]}],path:"/references/nfts.html",pathLocale:"/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Sign Transaction",slug:"sign-transaction",children:[]},{level:2,title:"Partial Sign Transaction",slug:"partial-sign-transaction",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Create Nonce Account",slug:"create-nonce-account",children:[]},{level:3,title:"Get Nonce Account",slug:"get-nonce-account",children:[]},{level:3,title:"Use Nonce Account",slug:"use-nonce-account",children:[]}]}],path:"/references/offline-transactions.html",pathLocale:"/",extraFields:[]},{title:"Writing Programs",headers:[{level:2,title:"How to transfer SOL in a program",slug:"how-to-transfer-sol-in-a-program",children:[]},{level:2,title:"How to get clock in a program",slug:"how-to-get-clock-in-a-program",children:[{level:3,title:"Passing Clock as an account inside an instruction",slug:"passing-clock-as-an-account-inside-an-instruction",children:[]},{level:3,title:"Accessing Clock directly inside an instruction",slug:"accessing-clock-directly-inside-an-instruction",children:[]}]},{level:2,title:"How to change account size",slug:"how-to-change-account-size",children:[]},{level:2,title:"How to do Cross Program Invocation",slug:"how-to-do-cross-program-invocation",children:[]},{level:2,title:"How to create a PDA",slug:"how-to-create-a-pda",children:[]},{level:2,title:"How to read accounts",slug:"how-to-read-accounts",children:[]},{level:2,title:"How to verify accounts",slug:"how-to-verify-accounts",children:[]},{level:2,title:"How to read multiple instructions from a transaction",slug:"how-to-read-multiple-instructions-from-a-transaction",children:[]}],path:"/references/programs.html",pathLocale:"/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Get Current Validators",slug:"get-current-validators",children:[]},{level:2,title:"Create Stake Account",slug:"create-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"Get Delegator by Validators",slug:"get-delegator-by-validators",children:[]},{level:2,title:"Deactivate Stake",slug:"deactivate-stake",children:[]},{level:2,title:"Withdraw Stake",slug:"withdraw-stake",children:[]},{level:2,title:"Get Stake Amount",slug:"get-stake-amount",children:[]}],path:"/references/staking.html",pathLocale:"/",extraFields:[]},{title:"Interacting with Tokens",headers:[{level:2,title:"What do I need to get started with SPL-Tokens?",slug:"what-do-i-need-to-get-started-with-spl-tokens",children:[]},{level:2,title:"How to create a new Token",slug:"how-to-create-a-new-token",children:[]},{level:2,title:"How to get a token mint",slug:"how-to-get-a-token-mint",children:[]},{level:2,title:"How to create a token account",slug:"how-to-create-a-token-account",children:[]},{level:2,title:"How to get a Token Account",slug:"how-to-get-a-token-account",children:[]},{level:2,title:"How to get a token account's balance",slug:"how-to-get-a-token-account-s-balance",children:[]},{level:2,title:"How to mint tokens",slug:"how-to-mint-tokens",children:[]},{level:2,title:"How to transfer tokens",slug:"how-to-transfer-tokens",children:[]},{level:2,title:"How to burn tokens",slug:"how-to-burn-tokens",children:[]},{level:2,title:"How to close token accounts",slug:"how-to-close-token-accounts",children:[]},{level:2,title:"How to set authority on token accounts or mints",slug:"how-to-set-authority-on-token-accounts-or-mints",children:[]},{level:2,title:"How to approve a token delegate",slug:"how-to-approve-a-token-delegate",children:[]},{level:2,title:"How to revoke a token delegate",slug:"how-to-revoke-a-token-delegate",children:[]},{level:2,title:"How to manage wrapped SOL",slug:"how-to-manage-wrapped-sol",children:[{level:3,title:"Create Token Account",slug:"create-token-account",children:[]},{level:3,title:"Add Balance",slug:"add-balance",children:[]}]},{level:2,title:"How to get all token accounts by owner",slug:"how-to-get-all-token-accounts-by-owner",children:[]}],path:"/references/token.html",pathLocale:"/",extraFields:[]},{title:"Cooking \u0E01\u0E31\u0E1A Solana",headers:[{level:2,title:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",slug:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D",children:[]}],path:"/th/",pathLocale:"/th/",extraFields:[]},{title:"Solana Cookbook",headers:[{level:2,title:"Contributing (Nas\u0131l Katk\u0131 Verebilirsiniz?)",slug:"contributing-nas\u0131l-katk\u0131-verebilirsiniz",children:[]},{level:2,title:"How to Read the Cookbook (Cookbook Nas\u0131l Okunur?)",slug:"how-to-read-the-cookbook-cookbook-nas\u0131l-okunur",children:[]}],path:"/tr/",pathLocale:"/tr/",extraFields:[]},{title:"Nh\u1EADp m\xF4n Solana",headers:[{level:2,title:"\u0110\xF3ng g\xF3p",slug:"\u0111ong-gop",children:[]},{level:2,title:"C\u1EA5u tr\xFAc c\u1EE7a To\xE0n t\u1EADp Solana",slug:"cau-truc-cua-toan-tap-solana",children:[]},{level:2,title:"L\u1EDDi c\u1EE7a d\u1ECBch gi\u1EA3",slug:"loi-cua-dich-gia",children:[]}],path:"/vi/",pathLocale:"/vi/",extraFields:[]},{title:"Solana\u79D8\u7C4D",headers:[{level:2,title:"\u8D21\u732E\u4EE3\u7801",slug:"\u8D21\u732E\u4EE3\u7801",children:[]},{level:2,title:"\u5982\u4F55\u9605\u8BFBSolana\u79D8\u7C4D",slug:"\u5982\u4F55\u9605\u8BFBsolana\u79D8\u7C4D",children:[]}],path:"/zh/",pathLocale:"/zh/",extraFields:[]},{title:"Solana\u7955\u7C4D",headers:[{level:2,title:"\u8CA2\u737B\u4EE3\u78BC",slug:"\u8CA2\u737B\u4EE3\u78BC",children:[]},{level:2,title:"\u5982\u4F55\u95B1\u8B80Solana\u7955\u7C4D",slug:"\u5982\u4F55\u95B1\u8B80solana\u7955\u7C4D",children:[]}],path:"/zh_t/",pathLocale:"/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Accounts Model",slug:"accounts-model",children:[]},{level:3,title:"Miete",slug:"miete",children:[]}]},{level:2,title:"Andere Ressourcen",slug:"andere-ressourcen",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/de/core-concepts/accounts.html",pathLocale:"/de/",extraFields:[]},{title:"Programmabgeleitete Adressen (PDAs)",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interaktion mit PDAs",slug:"interaktion-mit-pdas",children:[]}]},{level:2,title:"Andere Quellen",slug:"andere-quellen",children:[]}],path:"/de/core-concepts/pdas.html",pathLocale:"/de/",extraFields:[]},{title:"Programme",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programme & Die Solana Programm Bibliothek (SPL - Solana Program Library)",slug:"native-programme-die-solana-programm-bibliothek-spl-solana-program-library",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Bereitstellen von Programmen",slug:"bereitstellen-von-programmen",children:[]}]},{level:2,title:"Weitere Quellen",slug:"weitere-quellen",children:[]}],path:"/de/core-concepts/programs.html",pathLocale:"/de/",extraFields:[]},{title:"Transaktionen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Geb\xFChren",slug:"gebuhren",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/de/core-concepts/transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Installieren von Web3.js",slug:"installieren-von-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Aus Quelle erstellen",slug:"aus-quelle-erstellen",children:[]}]}],path:"/de/getting-started/installation.html",pathLocale:"/de/",extraFields:[]},{title:"Kontozuordnungen",headers:[{level:2,title:"Ableitende PDAs",slug:"ableitende-pdas",children:[]},{level:2,title:"Einzelnes Kartenkonto",slug:"einzelnes-kartenkonto",children:[]}],path:"/de/guides/account-maps.html",pathLocale:"/de/",extraFields:[]},{title:"Migrieren von Programmdatenkonten",headers:[{level:2,title:"Wie k\xF6nnen Sie die Datenkonten eines Programms migrieren?",slug:"wie-konnen-sie-die-datenkonten-eines-programms-migrieren",children:[]},{level:2,title:"Szenario",slug:"szenario",children:[]},{level:2,title:"Upgrade des Kontos",slug:"upgrade-des-kontos",children:[{level:3,title:"1. Kontoumwandlungslogik hinzuf\xFCgen",slug:"_1-kontoumwandlungslogik-hinzufugen",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/de/guides/data-migration.html",pathLocale:"/de/",extraFields:[]},{title:"Debuggen von Solana-Programmen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Laufzeittests und Debugging im Editor",slug:"laufzeittests-und-debugging-im-editor",children:[]},{level:2,title:"Testen des lokalen Validator-Knotens im Editor",slug:"testen-des-lokalen-validator-knotens-im-editor",children:[]},{level:2,title:"Testen lokaler Validator-Knoten von Client-Apps",slug:"testen-lokaler-validator-knoten-von-client-apps",children:[]},{level:2,title:"Ressourcen",slug:"ressourcen",children:[]}],path:"/de/guides/debugging-solana-programs.html",pathLocale:"/de/",extraFields:[]},{title:"Funktionsparit\xE4tstest",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Szenario",slug:"szenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parit\xE4tstest",slug:"paritatstest",children:[]},{level:2,title:"Einfache Vorf\xFChrung",slug:"einfache-vorfuhrung",children:[{level:3,title:"Alle Funktionen aktiviert",slug:"alle-funktionen-aktiviert",children:[]},{level:3,title:"Selektive Funktionen deaktiviert",slug:"selektive-funktionen-deaktiviert",children:[]}]},{level:2,title:"Vollst\xE4ndiger Parit\xE4tstest",slug:"vollstandiger-paritatstest",children:[]},{level:2,title:"Vollst\xE4ndiger Parit\xE4tstest programmgesteuert",slug:"vollstandiger-paritatstest-programmgesteuert",children:[]},{level:2,title:"Ressourcen",slug:"ressourcen",children:[]}],path:"/de/guides/feature-parity-testing.html",pathLocale:"/de/",extraFields:[]},{title:"Programmkonten Abfragen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/de/guides/get-program-accounts.html",pathLocale:"/de/",extraFields:[]},{title:"Transaktionen Wiederholen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Die Reise einer Transaktion",slug:"die-reise-einer-transaktion-1",children:[{level:3,title:"Wie Anwender Transaktionen \xFCbermitteln",slug:"wie-anwender-transaktionen-ubermitteln",children:[]},{level:3,title:"Wie RPC-Knoten Transaktionen senden",slug:"wie-rpc-knoten-transaktionen-senden",children:[]}]},{level:2,title:"Wie Transaktionen verworfen werden",slug:"wie-transaktionen-verworfen-werden",children:[{level:3,title:"Bevor eine Transaktion verarbeitet wird",slug:"bevor-eine-transaktion-verarbeitet-wird",children:[]},{level:3,title:"Nachdem eine Transaktion verarbeitet wurde und bevor sie abgeschlossen wird",slug:"nachdem-eine-transaktion-verarbeitet-wurde-und-bevor-sie-abgeschlossen-wird",children:[]}]},{level:2,title:"Umgang mit abgebrochenen Transaktionen",slug:"umgang-mit-abgebrochenen-transaktionen",children:[{level:3,title:"Ein eingehender Blick in sendTransaction",slug:"ein-eingehender-blick-in-sendtransaction",children:[]}]},{level:2,title:"Anpassen der Reroadcast-Logik",slug:"anpassen-der-reroadcast-logik",children:[{level:3,title:"Die Kosten f\xFCr das \xDCberspringen des Preflights",slug:"die-kosten-fur-das-uberspringen-des-preflights",children:[]},{level:3,title:"Wann Transaktionen neu signiert werden m\xFCssen",slug:"wann-transaktionen-neu-signiert-werden-mussen",children:[]}]},{level:2,title:"Danksagungen",slug:"danksagungen",children:[]}],path:"/de/guides/retrying-transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Serialisieren von Daten",headers:[{level:2,title:"Einrichten der Borsh-Serialisierung",slug:"einrichten-der-borsh-serialisierung",children:[]},{level:2,title:"So serialisieren Sie Anweisungsdaten auf dem Client",slug:"so-serialisieren-sie-anweisungsdaten-auf-dem-client",children:[]},{level:2,title:"So deserialisieren Sie Befehlsdaten im Programm",slug:"so-deserialisieren-sie-befehlsdaten-im-programm",children:[]},{level:2,title:"So serialisieren Sie Kontodaten im Programm",slug:"so-serialisieren-sie-kontodaten-im-programm",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialisierung/Deserialisierung",slug:"serialisierung-deserialisierung",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"So deserialisieren Sie Kontodaten auf dem Client",slug:"so-deserialisieren-sie-kontodaten-auf-dem-client",children:[]},{level:2,title:"Common Solana TS/JS Mappings",slug:"common-solana-ts-js-mappings",children:[]},{level:2,title:"Fortgeschrittene Konstrukte",slug:"fortgeschrittene-konstrukte",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Ressourcen",slug:"ressourcen",children:[]}],path:"/de/guides/serialization.html",pathLocale:"/de/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"So erstellen Sie ein Systemkonto",slug:"so-erstellen-sie-ein-systemkonto",children:[]},{level:2,title:"So berechnen Sie die Kontokosten",slug:"so-berechnen-sie-die-kontokosten",children:[]},{level:2,title:"So erstellen Sie Konten mit Seeds",slug:"so-erstellen-sie-konten-mit-seeds",children:[{level:3,title:"Generieren",slug:"generieren",children:[]},{level:3,title:"Erstellen",slug:"erstellen",children:[]},{level:3,title:"Transferieren",slug:"transferieren",children:[]}]},{level:2,title:"So erstellen Sie PDAs",slug:"so-erstellen-sie-pdas",children:[{level:3,title:"Generieren Sie einen PDA",slug:"generieren-sie-einen-pda",children:[]},{level:3,title:"Erstellen Sie einen PDA",slug:"erstellen-sie-einen-pda",children:[]}]},{level:2,title:"So signieren Sie mit einem PDA",slug:"so-signieren-sie-mit-einem-pda",children:[{level:3,title:"Programm",slug:"programm",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"So erhalten Sie Programmkonten",slug:"so-erhalten-sie-programmkonten",children:[]},{level:2,title:"So schlie\xDFen Sie Konten",slug:"so-schlie\xDFen-sie-konten",children:[]},{level:2,title:"So erhalten Sie den Kontostand",slug:"so-erhalten-sie-den-kontostand",children:[]}],path:"/de/references/accounts.html",pathLocale:"/de/",extraFields:[]},{title:"Transaktionen versenden",headers:[{level:2,title:"So senden Sie SPL-Tokens",slug:"so-senden-sie-spl-tokens",children:[]},{level:2,title:"So berechnen Sie die Transaktionskosten",slug:"so-berechnen-sie-die-transaktionskosten",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"So f\xFCgen Sie einer Transaktion eine Notiz hinzu",slug:"so-fugen-sie-einer-transaktion-eine-notiz-hinzu",children:[]},{level:2,title:"So \xE4ndern Sie das Computing-Budget, die Geb\xFChr & Priorit\xE4t f\xFCr eine Transaktion",slug:"so-andern-sie-das-computing-budget-die-gebuhr-prioritat-fur-eine-transaktion",children:[]}],path:"/de/references/basic-transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"So generieren Sie ein neues Schl\xFCsselpaar",slug:"so-generieren-sie-ein-neues-schlusselpaar",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einem Geheimnis wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einem-geheimnis-wieder-her",children:[]},{level:2,title:"So verifizieren Sie ein Schl\xFCsselpaar",slug:"so-verifizieren-sie-ein-schlusselpaar",children:[]},{level:2,title:"So \xFCberpr\xFCfen Sie, ob ein \xF6ffentlicher Schl\xFCssel einen zugeh\xF6rigen privaten Schl\xFCssel hat",slug:"so-uberprufen-sie-ob-ein-offentlicher-schlussel-einen-zugehorigen-privaten-schlussel-hat",children:[]},{level:2,title:"Wie man eine mnemonische Phrase generiert",slug:"wie-man-eine-mnemonische-phrase-generiert",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einer mnemonischen Phrase wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einer-mnemonischen-phrase-wieder-her",children:[]},{level:2,title:"So generieren Sie eine Vanity-Adresse",slug:"so-generieren-sie-eine-vanity-adresse",children:[]},{level:2,title:"So signieren und verifizieren Sie Nachrichten mit Wallets",slug:"so-signieren-und-verifizieren-sie-nachrichten-mit-wallets",children:[]},{level:2,title:"So verbinden Sie sich mit einer Brieftasche",slug:"so-verbinden-sie-sich-mit-einer-brieftasche",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/de/references/keypairs-and-wallets.html",pathLocale:"/de/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Starten eines lokalen Validators",slug:"starten-eines-lokalen-validators",children:[]},{level:2,title:"Verbindung zu Umgebungen",slug:"verbindung-zu-umgebungen",children:[]},{level:2,title:"Abonnieren von Veranstaltungen",slug:"abonnieren-von-veranstaltungen",children:[]},{level:2,title:"Test SOL erhalten",slug:"test-sol-erhalten",children:[]},{level:2,title:"Verwenden von Mainnet-Konten und -Programmen",slug:"verwenden-von-mainnet-konten-und-programmen",children:[{level:3,title:"So laden Sie Konten aus dem Mainnet",slug:"so-laden-sie-konten-aus-dem-mainnet",children:[]},{level:3,title:"So laden Sie Programme aus dem Mainnet",slug:"so-laden-sie-programme-aus-dem-mainnet",children:[]}]}],path:"/de/references/local-development.html",pathLocale:"/de/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Namensregister",slug:"namensregister",children:[]},{level:2,title:"SOL-Dom\xE4nen aufl\xF6sen",slug:"sol-domanen-auflosen",children:[]},{level:2,title:"R\xFCckw\xE4rtssuche",slug:"ruckwartssuche",children:[]},{level:2,title:"Subdomain nachschlagen",slug:"subdomain-nachschlagen",children:[]},{level:2,title:"Finden Sie alle Domainnamen, die einem \xF6ffentlichen Schl\xFCssel geh\xF6ren",slug:"finden-sie-alle-domainnamen-die-einem-offentlichen-schlussel-gehoren",children:[]},{level:2,title:"Ein Twitter-Handle aufl\xF6sen",slug:"ein-twitter-handle-auflosen",children:[]},{level:2,title:"Umgekehrte Suche nach einem Twitter-Handle",slug:"umgekehrte-suche-nach-einem-twitter-handle",children:[]}],path:"/de/references/name-service.html",pathLocale:"/de/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"So erstellen Sie eine NFT",slug:"so-erstellen-sie-eine-nft",children:[{level:3,title:"Upload zu Arweave",slug:"upload-zu-arweave",children:[]},{level:3,title:"Minte das NFT",slug:"minte-das-nft",children:[]}]},{level:2,title:"So erhalten Sie NFT-Metadaten",slug:"so-erhalten-sie-nft-metadaten",children:[]},{level:2,title:"So erhalten Sie den Besitzer eines NFT",slug:"so-erhalten-sie-den-besitzer-eines-nft",children:[]},{level:2,title:"So erhalten Sie NFT Mint-Adressen",slug:"so-erhalten-sie-nft-mint-adressen",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Wie bekomme ich alle NFTs aus einem Wallet?",slug:"wie-bekomme-ich-alle-nfts-aus-einem-wallet",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Wie erstelle ich eine Candy Machine?",slug:"wie-erstelle-ich-eine-candy-machine",children:[]},{level:3,title:"Wie Sie eine Candy Machine l\xF6schen",slug:"wie-sie-eine-candy-machine-loschen",children:[]},{level:3,title:"So finden Sie die Candy Machine Autorit\xE4t",slug:"so-finden-sie-die-candy-machine-autoritat",children:[]},{level:3,title:"So finden Sie Candy Machine mit der Wallet-Adresse",slug:"so-finden-sie-candy-machine-mit-der-wallet-adresse",children:[]},{level:3,title:"So finden Sie Candy Machine anhand seiner Adresse",slug:"so-finden-sie-candy-machine-anhand-seiner-adresse",children:[]},{level:3,title:"So finden Sie gepr\xE4gte NFTs von einer Candy Machine",slug:"so-finden-sie-gepragte-nfts-von-einer-candy-machine",children:[]},{level:3,title:"So f\xFCgen Sie Artikel in einer Candy Machine bei",slug:"so-fugen-sie-artikel-in-einer-candy-machine-bei",children:[]},{level:3,title:"Wie man einen NFT von einer Candy Machine pr\xE4gt",slug:"wie-man-einen-nft-von-einer-candy-machine-pragt",children:[]}]}],path:"/de/references/nfts.html",pathLocale:"/de/",extraFields:[]},{title:"Senden von Offline-Transaktionen",headers:[{level:2,title:"Transaktion unterzeichnen",slug:"transaktion-unterzeichnen",children:[]},{level:2,title:"Transaktion teilweise signieren",slug:"transaktion-teilweise-signieren",children:[]},{level:2,title:"Langlebige Nonce",slug:"langlebige-nonce",children:[{level:3,title:"Erstellen Sie ein Nonce-Konto",slug:"erstellen-sie-ein-nonce-konto",children:[]},{level:3,title:"Holen Sie sich ein Nonce-Konto",slug:"holen-sie-sich-ein-nonce-konto",children:[]},{level:3,title:"Verwenden Sie das Nonce-Konto",slug:"verwenden-sie-das-nonce-konto",children:[]}]}],path:"/de/references/offline-transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Programme schreiben",headers:[{level:2,title:"So \xFCbertragen Sie SOL in einem Programm",slug:"so-ubertragen-sie-sol-in-einem-programm",children:[]},{level:2,title:"Wie bekomme ich die Uhr in ein Programm?",slug:"wie-bekomme-ich-die-uhr-in-ein-programm",children:[{level:3,title:"Passing Clock als Konto innerhalb einer Anweisung",slug:"passing-clock-als-konto-innerhalb-einer-anweisung",children:[]},{level:3,title:"Direkter Zugriff auf die Uhr innerhalb einer Anweisung",slug:"direkter-zugriff-auf-die-uhr-innerhalb-einer-anweisung",children:[]}]},{level:2,title:"So \xE4ndern Sie die Kontogr\xF6\xDFe",slug:"so-andern-sie-die-kontogro\xDFe",children:[]},{level:2,title:"Wie man einen programm\xFCbergreifenden Aufruf durchf\xFChrt",slug:"wie-man-einen-programmubergreifenden-aufruf-durchfuhrt",children:[]},{level:2,title:"So erstellen Sie einen PDA",slug:"so-erstellen-sie-einen-pda",children:[]},{level:2,title:"Wie man Konten liest",slug:"wie-man-konten-liest",children:[]},{level:2,title:"So verifizieren Sie Konten",slug:"so-verifizieren-sie-konten",children:[]},{level:2,title:"So lesen Sie mehrere Anweisungen aus einer Transaktion",slug:"so-lesen-sie-mehrere-anweisungen-aus-einer-transaktion",children:[]}],path:"/de/references/programs.html",pathLocale:"/de/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Holen Sie sich aktuelle Validatoren",slug:"holen-sie-sich-aktuelle-validatoren",children:[]},{level:2,title:"Einsatzkonto erstellen",slug:"einsatzkonto-erstellen",children:[]},{level:2,title:"Stake delegieren",slug:"stake-delegieren",children:[]},{level:2,title:"Delegator durch Validatoren abrufen",slug:"delegator-durch-validatoren-abrufen",children:[]},{level:2,title:"Stake deaktivieren",slug:"stake-deaktivieren",children:[]},{level:2,title:"Stake Auszahlen",slug:"stake-auszahlen",children:[]}],path:"/de/references/staking.html",pathLocale:"/de/",extraFields:[]},{title:"Interaktion mit Tokens",headers:[{level:2,title:"Was ben\xF6tige ich, um mit SPL-Tokens zu beginnen?",slug:"was-benotige-ich-um-mit-spl-tokens-zu-beginnen",children:[]},{level:2,title:"So erstellen Sie ein neues Token",slug:"so-erstellen-sie-ein-neues-token",children:[]},{level:2,title:"So erhalten Sie eine Token-Minze",slug:"so-erhalten-sie-eine-token-minze",children:[]},{level:2,title:"So erstellen Sie ein Token-Konto",slug:"so-erstellen-sie-ein-token-konto",children:[]},{level:2,title:"So erhalten Sie ein Token-Konto",slug:"so-erhalten-sie-ein-token-konto",children:[]},{level:2,title:"So erhalten Sie das Guthaben eines Token-Kontos",slug:"so-erhalten-sie-das-guthaben-eines-token-kontos",children:[]},{level:2,title:"Wie man Token pr\xE4gt",slug:"wie-man-token-pragt",children:[]},{level:2,title:"So \xFCbertragen Sie Token",slug:"so-ubertragen-sie-token",children:[]},{level:2,title:"Wie man Token verbrennt",slug:"wie-man-token-verbrennt",children:[]},{level:2,title:"So schlie\xDFen Sie Token-Konten",slug:"so-schlie\xDFen-sie-token-konten",children:[]},{level:2,title:"So legen Sie die Autorit\xE4t f\xFCr Token-Konten oder Mints fest",slug:"so-legen-sie-die-autoritat-fur-token-konten-oder-mints-fest",children:[]},{level:2,title:"So genehmigen Sie einen Token-Delegierten",slug:"so-genehmigen-sie-einen-token-delegierten",children:[]},{level:2,title:"So widerrufen Sie einen Token-Delegierten",slug:"so-widerrufen-sie-einen-token-delegierten",children:[]},{level:2,title:"So verwalten Sie verpackte SOL",slug:"so-verwalten-sie-verpackte-sol",children:[{level:3,title:"Token-Konto erstellen",slug:"token-konto-erstellen",children:[]},{level:3,title:"Guthaben hinzuf\xFCgen",slug:"guthaben-hinzufugen",children:[]}]},{level:2,title:"So erhalten Sie alle Token-Konten nach Eigent\xFCmer",slug:"so-erhalten-sie-alle-token-konten-nach-eigentumer",children:[]}],path:"/de/references/token.html",pathLocale:"/de/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/fil/core-concepts/accounts.html",pathLocale:"/fil/",extraFields:[]},{title:"Cross Program Invocations (CPIs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"CPI with\xA0invoke",slug:"cpi-with-invoke",children:[]},{level:3,title:"CPI with\xA0invoke_signed",slug:"cpi-with-invoke-signed",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/cpi.html",pathLocale:"/fil/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interacting with PDAs",slug:"interacting-with-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/pdas.html",pathLocale:"/fil/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/programs.html",pathLocale:"/fil/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Fees",slug:"fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"How to auto approve transactions",headers:[],path:"/fil/gaming/auto-approve.html",pathLocale:"/fil/",extraFields:[]},{title:"Distribution",headers:[{level:2,title:"Mga Platform sa Pag-publish",slug:"mga-platform-sa-pag-publish",children:[]}],path:"/fil/gaming/distribution.html",pathLocale:"/fil/",extraFields:[]},{title:"Energy System",headers:[{level:2,title:"Anchor program",slug:"anchor-program",children:[{level:3,title:"Paggawa ng player account",slug:"paggawa-ng-player-account",children:[]},{level:3,title:"Pagputol ng mga puno",slug:"pagputol-ng-mga-puno",children:[]},{level:3,title:"Kinakalkula ang enerhiya",slug:"kinakalkula-ang-enerhiya",children:[]}]},{level:2,title:"Js client",slug:"js-client",children:[{level:3,title:"Lumikha ng koneksyon",slug:"lumikha-ng-koneksyon",children:[]},{level:3,title:"Magsimula ng data ng player",slug:"magsimula-ng-data-ng-player",children:[]},{level:3,title:"Mag-subscribe sa mga update sa account",slug:"mag-subscribe-sa-mga-update-sa-account",children:[]},{level:3,title:"Kalkulahin ang enerhiya at ipakita ang count down",slug:"kalkulahin-ang-enerhiya-at-ipakita-ang-count-down",children:[]}]}],path:"/fil/gaming/energy-system.html",pathLocale:"/fil/",extraFields:[]},{title:"Learn By Example",headers:[{level:2,title:"Makipag-ugnayan sa Anchor Program mula sa Unity",slug:"makipag-ugnayan-sa-anchor-program-mula-sa-unity",children:[]},{level:2,title:"Pag-save ng Sol sa isang PDA",slug:"pag-save-ng-sol-sa-isang-pda",children:[]},{level:2,title:"Sa chain matchmaking",slug:"sa-chain-matchmaking",children:[]},{level:2,title:"Gumamit ng mga Solana Pay Qr code para makontrol ang isang laro",slug:"gumamit-ng-mga-solana-pay-qr-code-para-makontrol-ang-isang-laro",children:[]},{level:2,title:"Itago ang estado ng laro mula sa iba pang mga manlalaro",slug:"itago-ang-estado-ng-laro-mula-sa-iba-pang-mga-manlalaro",children:[]},{level:2,title:"Paano bumuo ng isang round based na multiplayer na laro",slug:"paano-bumuo-ng-isang-round-based-na-multiplayer-na-laro",children:[]},{level:2,title:"Sa Chain Chess",slug:"sa-chain-chess",children:[]},{level:2,title:"Larong Multiplayer gamit ang sistema ng pagboto",slug:"larong-multiplayer-gamit-ang-sistema-ng-pagboto",children:[]},{level:2,title:"Halimbawa ng sistema ng sangkap ng entity",slug:"halimbawa-ng-sistema-ng-sangkap-ng-entity",children:[]},{level:2,title:"Pakikipagsapalaran sa pagpatay ng mga halimaw at pagkakaroon ng xp",slug:"pakikipagsapalaran-sa-pagpatay-ng-mga-halimaw-at-pagkakaroon-ng-xp",children:[]},{level:2,title:"Real-time na pvp sa chain game",slug:"real-time-na-pvp-sa-chain-game",children:[]}],path:"/fil/gaming/game-examples.html",pathLocale:"/fil/",extraFields:[]},{title:"Solana Gaming SDKs",headers:[{level:3,title:"Unity SDK",slug:"unity-sdk",children:[]},{level:3,title:"Unreal SDK",slug:"unreal-sdk",children:[]},{level:3,title:"Flutter",slug:"flutter",children:[]},{level:3,title:"Next.js/React + Anchor",slug:"next-js-react-anchor",children:[]},{level:3,title:"Python",slug:"python",children:[]},{level:3,title:"Native C#",slug:"native-c",children:[]}],path:"/fil/gaming/game-sdks.html",pathLocale:"/fil/",extraFields:[]},{title:"Hello World example",headers:[{level:2,title:"Pagsisimula sa iyong unang laro ng Solana",slug:"pagsisimula-sa-iyong-unang-laro-ng-solana",children:[]},{level:2,title:"Tiny Adventure",slug:"tiny-adventure",children:[{level:3,title:"Pagsisimula",slug:"pagsisimula",children:[]},{level:3,title:"Pagtukoy sa Game Data Account",slug:"pagtukoy-sa-game-data-account",children:[]},{level:3,title:"Magsimula ng Instruksyon",slug:"magsimula-ng-instruksyon",children:[]},{level:3,title:"Ilipat ang Instruksyon sa Kaliwa",slug:"ilipat-ang-instruksyon-sa-kaliwa",children:[]},{level:3,title:"Pagtuturo sa Pakanan",slug:"pagtuturo-sa-pakanan",children:[]},{level:3,title:"I-build at I-deploy",slug:"i-build-at-i-deploy",children:[]},{level:3,title:"Magsimula sa Kliyente",slug:"magsimula-sa-kliyente",children:[]},{level:3,title:"Where to Go from Here",slug:"where-to-go-from-here",children:[]},{level:3,title:"Saan Pupunta Mula Dito",slug:"saan-pupunta-mula-dito",children:[]}]}],path:"/fil/gaming/hello-world.html",pathLocale:"/fil/",extraFields:[]},{title:"How interact with tokens in programs",headers:[{level:2,title:"Lumikha, Mint, at Mag-burn ng mga Token gamit ang Anchor",slug:"lumikha-mint-at-mag-burn-ng-mga-token-gamit-ang-anchor",children:[{level:3,title:"Pagsisimula",slug:"pagsisimula",children:[]},{level:3,title:"Lumikha ng pagtuturo ng Mint",slug:"lumikha-ng-pagtuturo-ng-mint",children:[]},{level:3,title:"Init Player Instruction",slug:"init-player-instruction",children:[]},{level:3,title:"Instruksyon ng Patayin ang Kaaway",slug:"instruksyon-ng-patayin-ang-kaaway",children:[]},{level:3,title:"Heal Instruction",slug:"heal-instruction",children:[]},{level:3,title:"Bumuo at I-deploy",slug:"bumuo-at-i-deploy",children:[]},{level:3,title:"Magsimula sa Kliyente",slug:"magsimula-sa-kliyente",children:[]}]}],path:"/fil/gaming/interact-with-tokens.html",pathLocale:"/fil/",extraFields:[]},{title:"Introduction to Gaming on Solana",headers:[],path:"/fil/gaming/intro.html",pathLocale:"/fil/",extraFields:[]},{title:"Gaming with NFTs",headers:[{level:2,title:"Token gating sa mga NFT",slug:"token-gating-sa-mga-nft",children:[]},{level:2,title:"Bonus Effects sa mga NFT",slug:"bonus-effects-sa-mga-nft",children:[]},{level:2,title:"Paggamit ng NFT Metadata para sa Player Stats",slug:"paggamit-ng-nft-metadata-para-sa-player-stats",children:[]},{level:2,title:"Pinagsasama-sama ang mga NFT",slug:"pinagsasama-sama-ang-mga-nft",children:[]},{level:2,title:"Gumamit ng 3D Nfts sa isang laro",slug:"gumamit-ng-3d-nfts-sa-isang-laro",children:[]},{level:2,title:"I-customize ang mga NFT gamit ang mga item at katangian (Mga patak ng ulan na bota)",slug:"i-customize-ang-mga-nft-gamit-ang-mga-item-at-katangian-mga-patak-ng-ulan-na-bota",children:[]},{level:2,title:"Paano lumikha ng isang koleksyon ng NFT",slug:"paano-lumikha-ng-isang-koleksyon-ng-nft",children:[]}],path:"/fil/gaming/nfts-in-games.html",pathLocale:"/fil/",extraFields:[]},{title:"Port Anchor to Unity",headers:[{level:2,title:"Pagbuo ng Kliyente",slug:"pagbuo-ng-kliyente",children:[]},{level:2,title:"Pagbuo ng Transaksyon sa Unity C#",slug:"pagbuo-ng-transaksyon-sa-unity-c",children:[]}],path:"/fil/gaming/porting-anchor-to-unity.html",pathLocale:"/fil/",extraFields:[]},{title:"Saving game state",headers:[],path:"/fil/gaming/saving-game-state.html",pathLocale:"/fil/",extraFields:[]},{title:"Storing SOL in a PDA",headers:[{level:2,title:"Tiny Adventure Anchor Program - Ikalawang Bahagi",slug:"tiny-adventure-anchor-program-ikalawang-bahagi",children:[{level:3,title:"Nagsisimula",slug:"nagsisimula",children:[]},{level:3,title:"Pagtukoy sa Chest Vault Account",slug:"pagtukoy-sa-chest-vault-account",children:[]},{level:3,title:"Pagtukoy sa Game Data Account",slug:"pagtukoy-sa-game-data-account",children:[]},{level:3,title:"Simulan ang Level One Instruction",slug:"simulan-ang-level-one-instruction",children:[]},{level:3,title:"I-reset ang Antas at Pagtuturo sa Dibdib ng Spawn",slug:"i-reset-ang-antas-at-pagtuturo-sa-dibdib-ng-spawn",children:[]},{level:3,title:"Pagtuturo sa Pakanan",slug:"pagtuturo-sa-pakanan",children:[]},{level:3,title:"Bumuo at I-deploy",slug:"bumuo-at-i-deploy",children:[]},{level:3,title:"Magsimula sa Kliyente",slug:"magsimula-sa-kliyente",children:[]}]}],path:"/fil/gaming/store-sol-in-pda.html",pathLocale:"/fil/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"I-install ang Web3.js",slug:"i-install-ang-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"I-install ang CLI",slug:"i-install-ang-cli",children:[{level:3,title:"macOS at Linux",slug:"macos-at-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bumuo Mula sa Source",slug:"bumuo-mula-sa-source",children:[]}]}],path:"/fil/getting-started/installation.html",pathLocale:"/fil/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Pagkuha ng mga PDA",slug:"pagkuha-ng-mga-pda",children:[]},{level:2,title:"Isang Account sa Mapa",slug:"isang-account-sa-mapa",children:[]}],path:"/fil/guides/account-maps.html",pathLocale:"/fil/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"Paano mo maililipat ang mga data account ng isang programa?",slug:"paano-mo-maililipat-ang-mga-data-account-ng-isang-programa",children:[]},{level:2,title:"Sitwasyon",slug:"sitwasyon",children:[]},{level:2,title:"Pag-upgrade ng Account",slug:"pag-upgrade-ng-account",children:[{level:3,title:"1. Magdagdag ng lohika ng conversion ng account",slug:"_1-magdagdag-ng-lohika-ng-conversion-ng-account",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/data-migration.html",pathLocale:"/fil/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"Mga Katotohanan",slug:"mga-katotohanan",children:[]},{level:2,title:"Runtime Testing at Debugging sa editor",slug:"runtime-testing-at-debugging-sa-editor",children:[]},{level:2,title:"Lokal na Validator Node Testing sa editor",slug:"lokal-na-validator-node-testing-sa-editor",children:[]},{level:2,title:"Lokal na Validator Node Testing mula sa Client Apps",slug:"lokal-na-validator-node-testing-mula-sa-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/debugging-solana-programs.html",pathLocale:"/fil/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"Mga Katotohanan",slug:"mga-katotohanan",children:[]},{level:2,title:"Sitwasyon",slug:"sitwasyon",children:[]},{level:2,title:"Katayuan ng Tampok",slug:"katayuan-ng-tampok",children:[]},{level:2,title:"Pagsubok sa Pagkakapantay-pantay",slug:"pagsubok-sa-pagkakapantay-pantay",children:[]},{level:2,title:"Simpleng Pagpapakita",slug:"simpleng-pagpapakita",children:[{level:3,title:"Na-activate ang lahat ng feature",slug:"na-activate-ang-lahat-ng-feature",children:[]},{level:3,title:"Na-deactivate ang mga piling feature",slug:"na-deactivate-ang-mga-piling-feature",children:[]}]},{level:2,title:"Buong Parity Testing",slug:"buong-parity-testing",children:[]},{level:2,title:"Buong Parity Testing sa pamamagitan ng pag-program",slug:"buong-parity-testing-sa-pamamagitan-ng-pag-program",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/feature-parity-testing.html",pathLocale:"/fil/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"mga filter",slug:"mga-filter",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/guides/get-program-accounts.html",pathLocale:"/fil/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"Pagse-set up para sa Borsh Serialization",slug:"pagse-set-up-para-sa-borsh-serialization",children:[]},{level:2,title:"Paano i-serialize ang data ng pagtuturo sa kliyente",slug:"paano-i-serialize-ang-data-ng-pagtuturo-sa-kliyente",children:[]},{level:2,title:"Paano i-deserialize ang data ng instruction sa programa",slug:"paano-i-deserialize-ang-data-ng-instruction-sa-programa",children:[]},{level:2,title:"Paano i-serialize ang data ng account sa program",slug:"paano-i-serialize-ang-data-ng-account-sa-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Paggamit",slug:"paggamit",children:[]}]},{level:2,title:"Paano i-deserialize ang data ng account sa kliyente",slug:"paano-i-deserialize-ang-data-ng-account-sa-kliyente",children:[]},{level:2,title:"Mga Karaniwang Solana TS/JS Mappings",slug:"mga-karaniwang-solana-ts-js-mappings",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/serialization.html",pathLocale:"/fil/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Legacy na Transaksyon",slug:"legacy-na-transaksyon",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array ng mga address ng account",slug:"compact-array-ng-mga-address-ng-account",children:[]},{level:3,title:"Compact na hanay ng mga instruction",slug:"compact-na-hanay-ng-mga-instruction",children:[]}]},{level:2,title:"Mga Isyu sa Mga Legacy na Transaksyon",slug:"mga-isyu-sa-mga-legacy-na-transaksyon",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Mga Bersyon na Transaksyon: TransaksyonV0",slug:"mga-bersyon-na-transaksyon-transaksyonv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact na hanay ng mga paghahanap sa talahanayan ng address",slug:"compact-na-hanay-ng-mga-paghahanap-sa-talahanayan-ng-address",children:[]},{level:3,title:"Compact na hanay ng mga instruction",slug:"compact-na-hanay-ng-mga-instruction-1",children:[]}]},{level:2,title:"Mga Pagbabago sa RPC",slug:"mga-pagbabago-sa-rpc",children:[]},{level:2,title:"Other Resources",slug:"other-resources",children:[]},{level:2,title:"References",slug:"references",children:[]}],path:"/fil/guides/versioned-transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"How to create a system account",slug:"how-to-create-a-system-account",children:[]},{level:2,title:"Paano kalkulahin ang halaga ng account",slug:"paano-kalkulahin-ang-halaga-ng-account",children:[]},{level:2,title:"Paano gumawa ng mga account gamit ang mga buto",slug:"paano-gumawa-ng-mga-account-gamit-ang-mga-buto",children:[{level:3,title:"Bumuo",slug:"bumuo",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"Paano gumawa ng mga PDA",slug:"paano-gumawa-ng-mga-pda",children:[{level:3,title:"Bumuo ng PDA",slug:"bumuo-ng-pda",children:[]},{level:3,title:"Gumawa ng PDA",slug:"gumawa-ng-pda",children:[]}]},{level:2,title:"Paano mag-sign gamit ang isang PDA",slug:"paano-mag-sign-gamit-ang-isang-pda",children:[{level:3,title:"Programa",slug:"programa-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"Paano makakuha ng mga program account",slug:"paano-makakuha-ng-mga-program-account",children:[]},{level:2,title:"Paano isara ang mga account",slug:"paano-isara-ang-mga-account",children:[]},{level:2,title:"Paano makakuha ng balanse sa account",slug:"paano-makakuha-ng-balanse-sa-account",children:[]}],path:"/fil/references/accounts.html",pathLocale:"/fil/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"Paano magpadala ng SOL",slug:"paano-magpadala-ng-sol",children:[]},{level:2,title:"Paano magpadala ng mga SPL-Token",slug:"paano-magpadala-ng-mga-spl-token",children:[]},{level:2,title:"Paano kalkulahin ang gastos sa transaksyon",slug:"paano-kalkulahin-ang-gastos-sa-transaksyon",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Paano magdagdag ng memo sa isang transaksyon",slug:"paano-magdagdag-ng-memo-sa-isang-transaksyon",children:[]},{level:2,title:"Paano baguhin ang pagkalkula ng badyet, bayad, & priyoridad para sa isang transaksyon",slug:"paano-baguhin-ang-pagkalkula-ng-badyet-bayad-priyoridad-para-sa-isang-transaksyon",children:[]}],path:"/fil/references/basic-transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"Paano bumuo ng bagong Keypair",slug:"paano-bumuo-ng-bagong-keypair",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang lihim",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim",children:[]},{level:2,title:"Paano i-verify ang isang Keypair",slug:"paano-i-verify-ang-isang-keypair",children:[]},{level:2,title:"Paano tingnan kung ang isang pampublikong susi ay may nauugnay na pribadong susi",slug:"paano-tingnan-kung-ang-isang-pampublikong-susi-ay-may-nauugnay-na-pribadong-susi",children:[]},{level:2,title:"Paano bumuo ng isang mnemonic na parirala",slug:"paano-bumuo-ng-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang mnemonic na parirala",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano bumuo ng vanity address",slug:"paano-bumuo-ng-vanity-address",children:[]},{level:2,title:"Paano mag-sign at mag-verify ng mga mensahe gamit ang mga wallet",slug:"paano-mag-sign-at-mag-verify-ng-mga-mensahe-gamit-ang-mga-wallet",children:[]},{level:2,title:"Paano kumonekta sa isang wallet",slug:"paano-kumonekta-sa-isang-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/fil/references/keypairs-and-wallets.html",pathLocale:"/fil/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Pagsisimula ng Lokal na Validator",slug:"pagsisimula-ng-lokal-na-validator",children:[]},{level:2,title:"Kumokonekta sa Mga Environment",slug:"kumokonekta-sa-mga-environment",children:[]},{level:2,title:"Pag-subscribe sa Mga Kaganapan",slug:"pag-subscribe-sa-mga-kaganapan",children:[]},{level:2,title:"Pagkuha ng Test SOL",slug:"pagkuha-ng-test-sol",children:[]},{level:2,title:"Paggamit ng Mainnet Accounts at Programs",slug:"paggamit-ng-mainnet-accounts-at-programs",children:[{level:3,title:"Paano mag-load ng mga account mula sa mainnet",slug:"paano-mag-load-ng-mga-account-mula-sa-mainnet",children:[]},{level:3,title:"Paano mag-load ng mga programa mula sa mainnet",slug:"paano-mag-load-ng-mga-programa-mula-sa-mainnet",children:[]}]}],path:"/fil/references/local-development.html",pathLocale:"/fil/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Rehistro ng pangalan",slug:"rehistro-ng-pangalan",children:[]},{level:2,title:"Pag-resolve ng mga domain ng SOL",slug:"pag-resolve-ng-mga-domain-ng-sol",children:[]},{level:2,title:"Reverse lookup",slug:"reverse-lookup",children:[]},{level:2,title:"Hanapin ang subdomain",slug:"hanapin-ang-subdomain",children:[]},{level:2,title:"Hanapin ang lahat ng domain name na pagmamay-ari ng isang pampublikong key",slug:"hanapin-ang-lahat-ng-domain-name-na-pagmamay-ari-ng-isang-pampublikong-key",children:[]},{level:2,title:"Lutasin ang isang Twitter handle",slug:"lutasin-ang-isang-twitter-handle",children:[]},{level:2,title:"Baliktarin ang paghahanap ng isang Twitter handle",slug:"baliktarin-ang-paghahanap-ng-isang-twitter-handle",children:[]}],path:"/fil/references/name-service.html",pathLocale:"/fil/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"Paano lumikha ng isang NFT",slug:"paano-lumikha-ng-isang-nft",children:[{level:3,title:"I-upload sa Arweave",slug:"i-upload-sa-arweave",children:[]},{level:3,title:"Mint ang NFT",slug:"mint-ang-nft",children:[]}]},{level:2,title:"Paano makakuha ng NFT Metadata",slug:"paano-makakuha-ng-nft-metadata",children:[]},{level:2,title:"Paano makuha ang may-ari ng isang NFT",slug:"paano-makuha-ang-may-ari-ng-isang-nft",children:[]},{level:2,title:"Paano makakuha ng NFT Mint Address",slug:"paano-makakuha-ng-nft-mint-address",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Paano makukuha ang lahat ng NFT mula sa isang wallet?",slug:"paano-makukuha-ang-lahat-ng-nft-mula-sa-isang-wallet",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Paano gumawa ng Candy Machine",slug:"paano-gumawa-ng-candy-machine",children:[]},{level:3,title:"How to delete a Candy Machine",slug:"how-to-delete-a-candy-machine",children:[]},{level:3,title:"Paano makahanap ng Candy Machine sa pamamagitan ng awtoridad",slug:"paano-makahanap-ng-candy-machine-sa-pamamagitan-ng-awtoridad",children:[]},{level:3,title:"Paano makahanap ng Candy Machine gamit ang address ng wallet",slug:"paano-makahanap-ng-candy-machine-gamit-ang-address-ng-wallet",children:[]},{level:3,title:"Paano mahahanap ang Candy Machine gamit ang address nito",slug:"paano-mahahanap-ang-candy-machine-gamit-ang-address-nito",children:[]},{level:3,title:"How to find minted NFTs from a Candy Machine",slug:"how-to-find-minted-nfts-from-a-candy-machine",children:[]},{level:3,title:"How to insert items into a Candy Machine",slug:"how-to-insert-items-into-a-candy-machine",children:[]},{level:3,title:"Paano mag-mint ng NFT mula sa isang Candy Machine",slug:"paano-mag-mint-ng-nft-mula-sa-isang-candy-machine",children:[]}]}],path:"/fil/references/nfts.html",pathLocale:"/fil/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Mag-sign Transaksyon",slug:"mag-sign-transaksyon",children:[]},{level:2,title:"Bahagyang Sign Transaksyon",slug:"bahagyang-sign-transaksyon",children:[]},{level:2,title:"Matibay Nonce",slug:"matibay-nonce",children:[{level:3,title:"Lumikha ng Nonce Account",slug:"lumikha-ng-nonce-account",children:[]},{level:3,title:"Kumuha ng Nonce Account",slug:"kumuha-ng-nonce-account",children:[]},{level:3,title:"Gumamit ng Nonce Account",slug:"gumamit-ng-nonce-account",children:[]}]}],path:"/fil/references/offline-transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"Writing Programs",headers:[{level:2,title:"Paano maglipat ng SOL sa isang programa",slug:"paano-maglipat-ng-sol-sa-isang-programa",children:[]},{level:2,title:"Paano makakuha ng orasan sa isang programa",slug:"paano-makakuha-ng-orasan-sa-isang-programa",children:[{level:3,title:"Pagpasa ng Orasan bilang isang account sa loob ng isang pagtuturo",slug:"pagpasa-ng-orasan-bilang-isang-account-sa-loob-ng-isang-pagtuturo",children:[]},{level:3,title:"Pag-access sa Orasan nang direkta sa loob ng isang pagtuturo",slug:"pag-access-sa-orasan-nang-direkta-sa-loob-ng-isang-pagtuturo",children:[]}]},{level:2,title:"Paano baguhin ang laki ng account",slug:"paano-baguhin-ang-laki-ng-account",children:[]},{level:2,title:"Paano gawin ang Cross Program Invocation",slug:"paano-gawin-ang-cross-program-invocation",children:[]},{level:2,title:"Paano gumawa ng PDA",slug:"paano-gumawa-ng-pda",children:[]},{level:2,title:"Paano magbasa ng mga account",slug:"paano-magbasa-ng-mga-account",children:[]},{level:2,title:"Paano i-verify ang mga account",slug:"paano-i-verify-ang-mga-account",children:[]},{level:2,title:"Paano magbasa ng maraming instruction mula sa isang transaksyon",slug:"paano-magbasa-ng-maraming-instruction-mula-sa-isang-transaksyon",children:[]}],path:"/fil/references/programs.html",pathLocale:"/fil/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Kumuha ng Mga Kasalukuyang Validator",slug:"kumuha-ng-mga-kasalukuyang-validator",children:[]},{level:2,title:"Gumawa ng Stake Account",slug:"gumawa-ng-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"Kumuha ng Delegator ng mga Validator",slug:"kumuha-ng-delegator-ng-mga-validator",children:[]},{level:2,title:"I-deactivate ang Stake",slug:"i-deactivate-ang-stake",children:[]},{level:2,title:"I-withdraw ang Stake",slug:"i-withdraw-ang-stake",children:[]}],path:"/fil/references/staking.html",pathLocale:"/fil/",extraFields:[]},{title:"Interacting with Tokens",headers:[{level:2,title:"Ano ang kailangan ko para makapagsimula sa SPL-Tokens?",slug:"ano-ang-kailangan-ko-para-makapagsimula-sa-spl-tokens",children:[]},{level:2,title:"Paano gumawa ng bagong Token",slug:"paano-gumawa-ng-bagong-token",children:[]},{level:2,title:"Paano makakuha ng token mint",slug:"paano-makakuha-ng-token-mint",children:[]},{level:2,title:"Paano gumawa ng token account",slug:"paano-gumawa-ng-token-account",children:[]},{level:2,title:"Paano makakuha ng Token Account",slug:"paano-makakuha-ng-token-account",children:[]},{level:2,title:"Paano makakuha ng balanse ng token account",slug:"paano-makakuha-ng-balanse-ng-token-account",children:[]},{level:2,title:"Paano mag-mint ng mga token",slug:"paano-mag-mint-ng-mga-token",children:[]},{level:2,title:"Paano maglipat ng mga token",slug:"paano-maglipat-ng-mga-token",children:[]},{level:2,title:"Paano magsunog ng mga token",slug:"paano-magsunog-ng-mga-token",children:[]},{level:2,title:"Paano isara ang mga token account",slug:"paano-isara-ang-mga-token-account",children:[]},{level:2,title:"Paano magtakda ng awtoridad sa mga token account o mints",slug:"paano-magtakda-ng-awtoridad-sa-mga-token-account-o-mints",children:[]},{level:2,title:"Paano mag-apruba ng token delegate",slug:"paano-mag-apruba-ng-token-delegate",children:[]},{level:2,title:"Paano bawiin ang isang token delegate",slug:"paano-bawiin-ang-isang-token-delegate",children:[]},{level:2,title:"Paano i-manage ang wrapped SOL",slug:"paano-i-manage-ang-wrapped-sol",children:[{level:3,title:"Lumikha ng Token Account",slug:"lumikha-ng-token-account",children:[]},{level:3,title:"Magdagdag ng Balanse",slug:"magdagdag-ng-balanse",children:[]}]},{level:2,title:"Paano makuha ang lahat ng token account ng may-ari",slug:"paano-makuha-ang-lahat-ng-token-account-ng-may-ari",children:[]}],path:"/fil/references/token.html",pathLocale:"/fil/",extraFields:[]},{title:"Comptes",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"Le mod\xE8le d'un compte",slug:"le-modele-d-un-compte",children:[]},{level:3,title:"Rente",slug:"rente",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[{level:3,title:"Cr\xE9dit",slug:"credit",children:[]}]}],path:"/fr/core-concepts/accounts.html",pathLocale:"/fr/",extraFields:[]},{title:"Invocations de Programme Crois\xE9 (CPIs)",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"CPI avec\xA0invoke",slug:"cpi-avec-invoke",children:[]},{level:3,title:"CPI avec invoke_signed",slug:"cpi-avec-invoke-signed",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/cpi.html",pathLocale:"/fr/",extraFields:[]},{title:"Adresses d\xE9riv\xE9es de programmes (PDAs)",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"G\xE9n\xE9ration des PDAs",slug:"generation-des-pdas",children:[]},{level:3,title:"Interaction avec les PDAs",slug:"interaction-avec-les-pdas",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/pdas.html",pathLocale:"/fr/",extraFields:[]},{title:"Programmes",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"Programmes Natifs & La Biblioth\xE8que des Programmes de Solana (SPL)",slug:"programmes-natifs-la-bibliotheque-des-programmes-de-solana-spl",children:[]},{level:3,title:"Ecrire des programmes",slug:"ecrire-des-programmes",children:[]},{level:3,title:"D\xE9ployer des programmes",slug:"deployer-des-programmes",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/programs.html",pathLocale:"/fr/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"Frais",slug:"frais",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"How to auto approve transactions",headers:[],path:"/fr/gaming/auto-approve.html",pathLocale:"/fr/",extraFields:[]},{title:"Distribution",headers:[{level:2,title:"Plateformes de publication",slug:"plateformes-de-publication",children:[]}],path:"/fr/gaming/distribution.html",pathLocale:"/fr/",extraFields:[]},{title:"Syst\xE8me d'Energie",headers:[{level:2,title:"Program Anchor",slug:"program-anchor",children:[{level:3,title:"Cr\xE9ation du compte du joueur",slug:"creation-du-compte-du-joueur",children:[]},{level:3,title:"Coupe des arbres",slug:"coupe-des-arbres",children:[]},{level:3,title:"Calcul de l'\xE9nergie",slug:"calcul-de-l-energie",children:[]}]},{level:2,title:"Client Js",slug:"client-js",children:[{level:3,title:"Cr\xE9er une connexion",slug:"creer-une-connexion",children:[]},{level:3,title:"Initialisation des donn\xE9es du joueur",slug:"initialisation-des-donnees-du-joueur",children:[]},{level:3,title:"S'abonner aux mises \xE0 jour du compte",slug:"s-abonner-aux-mises-a-jour-du-compte",children:[]},{level:3,title:"Calculer l'\xE9nergie et afficher le d\xE9compte",slug:"calculer-l-energie-et-afficher-le-decompte",children:[]}]}],path:"/fr/gaming/energy-system.html",pathLocale:"/fr/",extraFields:[]},{title:"Apprendre par l'exemple",headers:[{level:2,title:"Interagir avec un programme Anchor depuis Unity",slug:"interagir-avec-un-programme-anchor-depuis-unity",children:[]},{level:2,title:"Stocker des SOL dans un PDA",slug:"stocker-des-sol-dans-un-pda",children:[]},{level:2,title:"Matchmaking on-chain",slug:"matchmaking-on-chain",children:[]},{level:2,title:"Utiliser les QR codes de Solana Pay pour contr\xF4ler un jeu",slug:"utiliser-les-qr-codes-de-solana-pay-pour-controler-un-jeu",children:[]},{level:2,title:"Cacher l'\xE9tat du jeu aux autres joueurs",slug:"cacher-l-etat-du-jeu-aux-autres-joueurs",children:[]},{level:2,title:"Comment construire un jeu multijoueur au tour par tour",slug:"comment-construire-un-jeu-multijoueur-au-tour-par-tour",children:[]},{level:2,title:"Jeu d'\xE9checs on-chain",slug:"jeu-d-echecs-on-chain",children:[]},{level:2,title:"Jeu multijoueurs utilisant un syst\xE8me de vote",slug:"jeu-multijoueurs-utilisant-un-systeme-de-vote",children:[]},{level:2,title:"Exemple de syst\xE8me de composants d'entit\xE9",slug:"exemple-de-systeme-de-composants-d-entite",children:[]},{level:2,title:"Jeu d'aventure avec la mort de monstres et l'obtention de points d'exp\xE9rience",slug:"jeu-d-aventure-avec-la-mort-de-monstres-et-l-obtention-de-points-d-experience",children:[]},{level:2,title:"Jeu PvP en temps r\xE9el on-chain",slug:"jeu-pvp-en-temps-reel-on-chain",children:[]}],path:"/fr/gaming/game-examples.html",pathLocale:"/fr/",extraFields:[]},{title:"SDKs pour le gaming sur Solana",headers:[{level:3,title:"SDK Unity",slug:"sdk-unity",children:[]},{level:3,title:"SDK Unreal",slug:"sdk-unreal",children:[]},{level:3,title:"Flutter",slug:"flutter",children:[]},{level:3,title:"Next.js/React + Anchor",slug:"next-js-react-anchor",children:[]},{level:3,title:"Python",slug:"python",children:[]},{level:3,title:"C# natif",slug:"c-natif",children:[]}],path:"/fr/gaming/game-sdks.html",pathLocale:"/fr/",extraFields:[]},{title:"Exemple Hello World",headers:[{level:2,title:"Commencez votre premier jeu Solana",slug:"commencez-votre-premier-jeu-solana",children:[]},{level:2,title:"Tiny Adventure",slug:"tiny-adventure",children:[{level:3,title:"Pour commencer",slug:"pour-commencer",children:[]},{level:3,title:"D\xE9finition du Compte de Donn\xE9es du Jeu",slug:"definition-du-compte-de-donnees-du-jeu",children:[]},{level:3,title:"Instruction d'Initialisation",slug:"instruction-d-initialisation",children:[]},{level:3,title:"Instruction de D\xE9placement vers la Gauche",slug:"instruction-de-deplacement-vers-la-gauche",children:[]},{level:3,title:"Instruction de D\xE9placement vers la Droite",slug:"instruction-de-deplacement-vers-la-droite",children:[]},{level:3,title:"Compilation et D\xE9ploiement",slug:"compilation-et-deploiement",children:[]},{level:3,title:"D\xE9buter avec le Client",slug:"debuter-avec-le-client",children:[]},{level:3,title:"Que faire \xE0 partir de maintenant ?",slug:"que-faire-a-partir-de-maintenant",children:[]}]}],path:"/fr/gaming/hello-world.html",pathLocale:"/fr/",extraFields:[]},{title:"Comment interagir avec des jetons dans des programmes",headers:[{level:2,title:"Cr\xE9er, Mint et Br\xFBler des jetons avec Anchor",slug:"creer-mint-et-bruler-des-jetons-avec-anchor",children:[{level:3,title:"Pour commencer",slug:"pour-commencer",children:[]},{level:3,title:"Instruction de cr\xE9ation d'un jeton",slug:"instruction-de-creation-d-un-jeton",children:[]},{level:3,title:"Instruction d'initialisation du joueur",slug:"instruction-d-initialisation-du-joueur",children:[]},{level:3,title:"Instruction pour tuer un ennemi",slug:"instruction-pour-tuer-un-ennemi",children:[]},{level:3,title:"Instruction de gu\xE9rison",slug:"instruction-de-guerison",children:[]},{level:3,title:"Compilation et D\xE9ploiement",slug:"compilation-et-deploiement",children:[]},{level:3,title:"D\xE9buter avec le Client",slug:"debuter-avec-le-client",children:[]}]}],path:"/fr/gaming/interact-with-tokens.html",pathLocale:"/fr/",extraFields:[]},{title:"Introduction au gaming sur Solana",headers:[],path:"/fr/gaming/intro.html",pathLocale:"/fr/",extraFields:[]},{title:"Gaming avec des NFTs",headers:[{level:2,title:"Token gating avec des NFTs",slug:"token-gating-avec-des-nfts",children:[]},{level:2,title:"Bonus d'Effets avec des NFTs",slug:"bonus-d-effets-avec-des-nfts",children:[]},{level:2,title:"Utilisation des m\xE9tadonn\xE9es d'un NFT pour les statistiques des joueurs",slug:"utilisation-des-metadonnees-d-un-nft-pour-les-statistiques-des-joueurs",children:[]},{level:2,title:"Fusionner des NFTs",slug:"fusionner-des-nfts",children:[]},{level:2,title:"Utilisation de NFTs 3D dans un jeu",slug:"utilisation-de-nfts-3d-dans-un-jeu",children:[]},{level:2,title:"Personnaliser des NFTs avec des items et des traits (Raindrops boots)",slug:"personnaliser-des-nfts-avec-des-items-et-des-traits-raindrops-boots",children:[]},{level:2,title:"Comment cr\xE9er une collection NFT",slug:"comment-creer-une-collection-nft",children:[]}],path:"/fr/gaming/nfts-in-games.html",pathLocale:"/fr/",extraFields:[]},{title:"Portage d'Anchor vers Unity",headers:[{level:2,title:"Cr\xE9ation du client",slug:"creation-du-client",children:[]},{level:2,title:"Cr\xE9ation de la transaction dans Unity C#",slug:"creation-de-la-transaction-dans-unity-c",children:[]}],path:"/fr/gaming/porting-anchor-to-unity.html",pathLocale:"/fr/",extraFields:[]},{title:"Sauvegarder l'\xE9tat d'un jeu",headers:[],path:"/fr/gaming/saving-game-state.html",pathLocale:"/fr/",extraFields:[]},{title:"Stockage de SOL dans un PDA",headers:[{level:2,title:"Programme Anchor Tiny Adventure - Deuxi\xE8me Partie",slug:"programme-anchor-tiny-adventure-deuxieme-partie",children:[{level:3,title:"Pour commencer",slug:"pour-commencer",children:[]},{level:3,title:"D\xE9finition du compte du coffre \xE0 r\xE9compense",slug:"definition-du-compte-du-coffre-a-recompense",children:[]},{level:3,title:"D\xE9finition du Compte de Donn\xE9es du Jeu",slug:"definition-du-compte-de-donnees-du-jeu",children:[]},{level:3,title:"Instruction d'initialisation du niveau un",slug:"instruction-d-initialisation-du-niveau-un",children:[]},{level:3,title:"R\xE9initialisation du niveau et instruction d'apparition du coffre",slug:"reinitialisation-du-niveau-et-instruction-d-apparition-du-coffre",children:[]},{level:3,title:"Instruction de D\xE9placement vers la Droite",slug:"instruction-de-deplacement-vers-la-droite",children:[]},{level:3,title:"Compilation et D\xE9ploiement",slug:"compilation-et-deploiement",children:[]},{level:3,title:"D\xE9buter avec le Client",slug:"debuter-avec-le-client",children:[]}]}],path:"/fr/gaming/store-sol-in-pda.html",pathLocale:"/fr/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Installer Web3.js",slug:"installer-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Installer Rust",slug:"installer-rust",children:[]},{level:2,title:"Installer CLI",slug:"installer-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compiler \xE0 partir du code source",slug:"compiler-a-partir-du-code-source",children:[]}]}],path:"/fr/getting-started/installation.html",pathLocale:"/fr/",extraFields:[]},{title:"Maps de Comptes",headers:[{level:2,title:"D\xE9rivation des PDAs",slug:"derivation-des-pdas",children:[]},{level:2,title:"Compte de Map Unique",slug:"compte-de-map-unique",children:[]}],path:"/fr/guides/account-maps.html",pathLocale:"/fr/",extraFields:[]},{title:"Migration des Comptes de Donn\xE9es de Programmes",headers:[{level:2,title:"Comment migrer les comptes de donn\xE9es d'un programme ?",slug:"comment-migrer-les-comptes-de-donnees-d-un-programme",children:[]},{level:2,title:"Sc\xE9nario",slug:"scenario",children:[]},{level:2,title:"Mise \xE0 jour du Compte",slug:"mise-a-jour-du-compte",children:[{level:3,title:"1. Ajouter une logique de conversion de compte",slug:"_1-ajouter-une-logique-de-conversion-de-compte",children:[]}]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/data-migration.html",pathLocale:"/fr/",extraFields:[]},{title:"D\xE9bogage des Programmes Solana",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Tests d'Ex\xE9cution et D\xE9bogage dans l'\xE9diteur",slug:"tests-d-execution-et-debogage-dans-l-editeur",children:[]},{level:2,title:"Test avec un N\u0153ud de Validation Local dans l'\xE9diteur",slug:"test-avec-un-n\u0153ud-de-validation-local-dans-l-editeur",children:[]},{level:2,title:"Test avec un N\u0153ud de Validation Local \xE0 partir des Applications Clients",slug:"test-avec-un-n\u0153ud-de-validation-local-a-partir-des-applications-clients",children:[]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/debugging-solana-programs.html",pathLocale:"/fr/",extraFields:[]},{title:"Test de Conformit\xE9 des Fonctionnalit\xE9s",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Sc\xE9nario",slug:"scenario",children:[]},{level:2,title:"Statut de la Fonctionnalit\xE9",slug:"statut-de-la-fonctionnalite",children:[]},{level:2,title:"Test de Conformit\xE9",slug:"test-de-conformite",children:[]},{level:2,title:"D\xE9monstration Simple",slug:"demonstration-simple",children:[{level:3,title:"Toutes les fonctionnalit\xE9s activ\xE9es",slug:"toutes-les-fonctionnalites-activees",children:[]},{level:3,title:"Fonctionnalit\xE9s s\xE9lectives d\xE9sactiv\xE9es",slug:"fonctionnalites-selectives-desactivees",children:[]}]},{level:2,title:"Tests de Conformit\xE9 Compl\xE8te",slug:"tests-de-conformite-complete",children:[]},{level:2,title:"Test de Conformit\xE9 Compl\xE8te programm\xE9",slug:"test-de-conformite-complete-programme",children:[]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/feature-parity-testing.html",pathLocale:"/fr/",extraFields:[]},{title:"Obtenir les comptes d'un programme",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/guides/get-program-accounts.html",pathLocale:"/fr/",extraFields:[]},{title:"S\xE9rialisation des donn\xE9es",headers:[{level:2,title:"Configuration pour la s\xE9rialisation avec Borsh",slug:"configuration-pour-la-serialisation-avec-borsh",children:[]},{level:2,title:"Comment s\xE9rialiser les donn\xE9es d'instruction c\xF4t\xE9 client",slug:"comment-serialiser-les-donnees-d-instruction-cote-client",children:[]},{level:2,title:"Comment d\xE9s\xE9rialiser les donn\xE9es d'instruction dans le programme",slug:"comment-deserialiser-les-donnees-d-instruction-dans-le-programme",children:[]},{level:2,title:"Comment s\xE9rialiser des donn\xE9es du compte dans le programme",slug:"comment-serialiser-des-donnees-du-compte-dans-le-programme",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"S\xE9rialisation/D\xE9s\xE9rialisation",slug:"serialisation-deserialisation",children:[]},{level:3,title:"Utilisation",slug:"utilisation",children:[]}]},{level:2,title:"Comment d\xE9s\xE9rialisation des donn\xE9es du compte c\xF4t\xE9 client",slug:"comment-deserialisation-des-donnees-du-compte-cote-client",children:[]},{level:2,title:"Mappages courants de Solana TS/JS",slug:"mappages-courants-de-solana-ts-js",children:[]},{level:2,title:"Constructions Avanc\xE9es",slug:"constructions-avancees",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/serialization.html",pathLocale:"/fr/",extraFields:[]},{title:"Transactions Versionn\xE9es",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Transaction H\xE9rit\xE9e",slug:"transaction-heritee",children:[]},{level:2,title:"Message H\xE9rit\xE9",slug:"message-herite",children:[{level:3,title:"En-t\xEAte",slug:"en-tete",children:[]},{level:3,title:"Tableau compact d'adresses de comptes",slug:"tableau-compact-d-adresses-de-comptes",children:[]},{level:3,title:"Tableau compact d'instructions",slug:"tableau-compact-d-instructions",children:[]}]},{level:2,title:"Probl\xE8mes li\xE9s aux Transactions H\xE9rit\xE9es",slug:"problemes-lies-aux-transactions-heritees",children:[]},{level:2,title:"Tables de Consultation d'Adresses (LUT)",slug:"tables-de-consultation-d-adresses-lut",children:[]},{level:2,title:"Transactions Versionn\xE9es : TransactionV0",slug:"transactions-versionnees-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Tableau compact de consultations de tables d'adresses",slug:"tableau-compact-de-consultations-de-tables-d-adresses",children:[]},{level:3,title:"Tableau compact d'instructions",slug:"tableau-compact-d-instructions-1",children:[]}]},{level:2,title:"Modifications du RPC",slug:"modifications-du-rpc",children:[]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]},{level:2,title:"R\xE9f\xE9rences",slug:"references",children:[]}],path:"/fr/guides/versioned-transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"Comptes",headers:[{level:2,title:"Comment cr\xE9er un compte de syst\xE8me",slug:"comment-creer-un-compte-de-systeme",children:[]},{level:2,title:"Comment calculer les frais de compte",slug:"comment-calculer-les-frais-de-compte",children:[]},{level:2,title:"Comment cr\xE9er des comptes avec des seeds",slug:"comment-creer-des-comptes-avec-des-seeds",children:[{level:3,title:"G\xE9n\xE9rer",slug:"generer",children:[]},{level:3,title:"Cr\xE9er",slug:"creer",children:[]},{level:3,title:"Transf\xE9rer",slug:"transferer",children:[]}]},{level:2,title:"Comment cr\xE9er des PDAs",slug:"comment-creer-des-pdas",children:[{level:3,title:"G\xE9n\xE9rer un PDA",slug:"generer-un-pda",children:[]},{level:3,title:"Cr\xE9er un PDA",slug:"creer-un-pda",children:[]}]},{level:2,title:"Comment signer avec un PDA",slug:"comment-signer-avec-un-pda",children:[{level:3,title:"Programme",slug:"programme-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"Comment obtenir les comptes du programme",slug:"comment-obtenir-les-comptes-du-programme",children:[]},{level:2,title:"Comment fermer des comptes",slug:"comment-fermer-des-comptes",children:[]},{level:2,title:"Comment obtenir le solde d'un compte",slug:"comment-obtenir-le-solde-d-un-compte",children:[]}],path:"/fr/references/accounts.html",pathLocale:"/fr/",extraFields:[]},{title:"Envoyer des Transactions",headers:[{level:2,title:"Comment envoyer des SOL",slug:"comment-envoyer-des-sol",children:[]},{level:2,title:"Comment envoyer des jetons SPL",slug:"comment-envoyer-des-jetons-spl",children:[]},{level:2,title:"Comment calculer les co\xFBts de transaction",slug:"comment-calculer-les-couts-de-transaction",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Comment ajouter un m\xE9mo \xE0 une transaction",slug:"comment-ajouter-un-memo-a-une-transaction",children:[]},{level:2,title:"Comment changer le budget de calcul, les frais, & la priorisation d'une transaction",slug:"comment-changer-le-budget-de-calcul-les-frais-la-priorisation-d-une-transaction",children:[]}],path:"/fr/references/basic-transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"Paires de Cl\xE9s et Portefeuilles",headers:[{level:2,title:"Comment g\xE9n\xE9rer une nouvelle Paire de Cl\xE9s",slug:"comment-generer-une-nouvelle-paire-de-cles",children:[]},{level:2,title:"Comment restaurer une Paire de cl\xE9s \xE0 partir d'une cl\xE9 priv\xE9e",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee",children:[]},{level:2,title:"Comment v\xE9rifier une Paire de Cl\xE9s",slug:"comment-verifier-une-paire-de-cles",children:[]},{level:2,title:"Comment v\xE9rifier si une cl\xE9 publique a une cl\xE9 priv\xE9e associ\xE9e",slug:"comment-verifier-si-une-cle-publique-a-une-cle-privee-associee",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une phrase mn\xE9monique",slug:"comment-generer-une-phrase-mnemonique",children:[]},{level:2,title:"Comment restaurer une paire de cl\xE9s \xE0 partir d'une phrase mn\xE9monique",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-phrase-mnemonique",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une adresse personnalis\xE9e",slug:"comment-generer-une-adresse-personnalisee",children:[]},{level:2,title:"Comment signer et v\xE9rifier des messages avec les portefeuilles",slug:"comment-signer-et-verifier-des-messages-avec-les-portefeuilles",children:[]},{level:2,title:"Comment se connecter \xE0 un portefeuille",slug:"comment-se-connecter-a-un-portefeuille",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/fr/references/keypairs-and-wallets.html",pathLocale:"/fr/",extraFields:[]},{title:"D\xE9veloppement Local",headers:[{level:2,title:"D\xE9marrer un Validateur Local",slug:"demarrer-un-validateur-local",children:[]},{level:2,title:"Connexion aux Environnements",slug:"connexion-aux-environnements",children:[]},{level:2,title:"Inscription \xE0 des Ev\xE9nements",slug:"inscription-a-des-evenements",children:[]},{level:2,title:"Obtention de SOL pour les Tests",slug:"obtention-de-sol-pour-les-tests",children:[]},{level:2,title:"Utilisation des Comptes et des Programmes du Mainnet",slug:"utilisation-des-comptes-et-des-programmes-du-mainnet",children:[{level:3,title:"Comment charger des comptes depuis le mainnet",slug:"comment-charger-des-comptes-depuis-le-mainnet",children:[]},{level:3,title:"Comment charger des programmes depuis le mainnet",slug:"comment-charger-des-programmes-depuis-le-mainnet",children:[]}]}],path:"/fr/references/local-development.html",pathLocale:"/fr/",extraFields:[]},{title:"Service de Noms",headers:[{level:2,title:"Registre de noms",slug:"registre-de-noms",children:[]},{level:2,title:"R\xE9solution des domaines SOL",slug:"resolution-des-domaines-sol",children:[]},{level:2,title:"Recherche invers\xE9e",slug:"recherche-inversee",children:[]},{level:2,title:"Recherche des sous-domaines",slug:"recherche-des-sous-domaines",children:[]},{level:2,title:"Trouver tous les noms de domaine appartenant \xE0 une cl\xE9 publique",slug:"trouver-tous-les-noms-de-domaine-appartenant-a-une-cle-publique",children:[]},{level:2,title:"R\xE9soudre un pseudo Twitter",slug:"resoudre-un-pseudo-twitter",children:[]},{level:2,title:"Recherche invers\xE9e d'un pseudo Twitter",slug:"recherche-inversee-d-un-pseudo-twitter",children:[]}],path:"/fr/references/name-service.html",pathLocale:"/fr/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"Comment cr\xE9er un NFT",slug:"comment-creer-un-nft",children:[{level:3,title:"T\xE9l\xE9charger sur Arweave",slug:"telecharger-sur-arweave",children:[]},{level:3,title:"Cr\xE9er le NFT",slug:"creer-le-nft",children:[]}]},{level:2,title:"Comment obtenir les m\xE9tadonn\xE9es des NFTs",slug:"comment-obtenir-les-metadonnees-des-nfts",children:[]},{level:2,title:"Comment obtenir le propri\xE9taire d'un NFT",slug:"comment-obtenir-le-proprietaire-d-un-nft",children:[]},{level:2,title:"Comment obtenir les adresses de cr\xE9ation des NFTs",slug:"comment-obtenir-les-adresses-de-creation-des-nfts",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Comment r\xE9cup\xE9rer tous les NFTs d'un portefeuille ?",slug:"comment-recuperer-tous-les-nfts-d-un-portefeuille",children:[]}],path:"/fr/references/nfts.html",pathLocale:"/fr/",extraFields:[]},{title:"Envoi de transactions hors connexion",headers:[{level:2,title:"Signer la Transaction",slug:"signer-la-transaction",children:[]},{level:2,title:"Transaction avec Signature Partielle",slug:"transaction-avec-signature-partielle",children:[]},{level:2,title:"Nonce Durable",slug:"nonce-durable",children:[{level:3,title:"Cr\xE9er un Compte de Nonce",slug:"creer-un-compte-de-nonce",children:[]},{level:3,title:"Obtenir le Compte de Nonce",slug:"obtenir-le-compte-de-nonce",children:[]},{level:3,title:"Utiliser le Compte de Nonce",slug:"utiliser-le-compte-de-nonce",children:[]}]}],path:"/fr/references/offline-transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"\xC9crire des Programmes",headers:[{level:2,title:"Comment transf\xE9rer SOL dans un programme",slug:"comment-transferer-sol-dans-un-programme",children:[]},{level:2,title:"Comment obtenir une r\xE9f\xE9rence \xE0 l'horloge dans un programme",slug:"comment-obtenir-une-reference-a-l-horloge-dans-un-programme",children:[{level:3,title:"Passer l'Horloge comme un compte dans une instruction",slug:"passer-l-horloge-comme-un-compte-dans-une-instruction",children:[]},{level:3,title:"Acc\xE9der \xE0 l'horloge directement dans une instruction",slug:"acceder-a-l-horloge-directement-dans-une-instruction",children:[]}]},{level:2,title:"Comment modifier la taille d'un compte",slug:"comment-modifier-la-taille-d-un-compte",children:[]},{level:2,title:"Comment faire l'Invocation de Programme Crois\xE9",slug:"comment-faire-l-invocation-de-programme-croise",children:[]},{level:2,title:"Comment cr\xE9er un PDA",slug:"comment-creer-un-pda",children:[]},{level:2,title:"Comment lire des comptes",slug:"comment-lire-des-comptes",children:[]},{level:2,title:"Comment v\xE9rifier des comptes",slug:"comment-verifier-des-comptes",children:[]},{level:2,title:"Comment lire plusieurs instructions \xE0 partir d'une transaction",slug:"comment-lire-plusieurs-instructions-a-partir-d-une-transaction",children:[]}],path:"/fr/references/programs.html",pathLocale:"/fr/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Obtenir les Validateurs Actuels",slug:"obtenir-les-validateurs-actuels",children:[]},{level:2,title:"Cr\xE9er un Compte de Stake",slug:"creer-un-compte-de-stake",children:[]},{level:2,title:"D\xE9l\xE9guer un Stake",slug:"deleguer-un-stake",children:[]},{level:2,title:"Obtenir les D\xE9l\xE9gu\xE9s par Validateurs",slug:"obtenir-les-delegues-par-validateurs",children:[]},{level:2,title:"D\xE9sactiver le Stake",slug:"desactiver-le-stake",children:[]},{level:2,title:"Retirer le Stake",slug:"retirer-le-stake",children:[]}],path:"/fr/references/staking.html",pathLocale:"/fr/",extraFields:[]},{title:"Interaction avec les Jetons",headers:[{level:2,title:"De quoi ai-je besoin pour commencer avec SPL-Tokens ?",slug:"de-quoi-ai-je-besoin-pour-commencer-avec-spl-tokens",children:[]},{level:2,title:"Comment cr\xE9er un nouveau Jeton",slug:"comment-creer-un-nouveau-jeton",children:[]},{level:2,title:'Comment obtenir un "mint" de jeton',slug:"comment-obtenir-un-mint-de-jeton",children:[]},{level:2,title:"Comment cr\xE9er un compte de jeton",slug:"comment-creer-un-compte-de-jeton",children:[]},{level:2,title:"Comment obtenir un compte de jetons",slug:"comment-obtenir-un-compte-de-jetons",children:[]},{level:2,title:"Comment obtenir le solde d'un compte de jetons",slug:"comment-obtenir-le-solde-d-un-compte-de-jetons",children:[]},{level:2,title:"Comment cr\xE9er (mint) de nouveaux jetons",slug:"comment-creer-mint-de-nouveaux-jetons",children:[]},{level:2,title:"Comment transf\xE9rer des jetons",slug:"comment-transferer-des-jetons",children:[]},{level:2,title:"Comment br\xFBler des jetons",slug:"comment-bruler-des-jetons",children:[]},{level:2,title:"Comment fermer des comptes de jetons",slug:"comment-fermer-des-comptes-de-jetons",children:[]},{level:2,title:"Comment d\xE9finir l'autorit\xE9 sur les comptes de jetons ou de mints ?",slug:"comment-definir-l-autorite-sur-les-comptes-de-jetons-ou-de-mints",children:[]},{level:2,title:"Comment approuver une d\xE9l\xE9gation de jetons",slug:"comment-approuver-une-delegation-de-jetons",children:[]},{level:2,title:"Comment r\xE9voquer une d\xE9l\xE9gation de jetons",slug:"comment-revoquer-une-delegation-de-jetons",children:[]},{level:2,title:"Comment g\xE9rer les wrapped SOL",slug:"comment-gerer-les-wrapped-sol",children:[{level:3,title:"Cr\xE9er un Compte de Jetons",slug:"creer-un-compte-de-jetons",children:[]},{level:3,title:"Ajouter un solde",slug:"ajouter-un-solde",children:[]}]},{level:2,title:"Comment obtenir tous les comptes de jetons par propri\xE9taire",slug:"comment-obtenir-tous-les-comptes-de-jetons-par-proprietaire",children:[]}],path:"/fr/references/token.html",pathLocale:"/fr/",extraFields:[]},{title:"Cuentas",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"El modelo de una cuenta",slug:"el-modelo-de-una-cuenta",children:[]},{level:3,title:"Renta",slug:"renta",children:[]}]},{level:2,title:"Otros recursos",slug:"otros-recursos",children:[{level:3,title:"Creditos",slug:"creditos",children:[]}]}],path:"/es/core-concepts/accounts.html",pathLocale:"/es/",extraFields:[]},{title:"Direcciones derivadas de programa (PDAs)",headers:[{level:2,title:"Hechos",slug:"hechos",children:[{level:3,title:"Generando PDAs",slug:"generando-pdas",children:[]},{level:3,title:"Interactuando con PDAs",slug:"interactuando-con-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/es/core-concepts/pdas.html",pathLocale:"/es/",extraFields:[]},{title:"Programas",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"Programas nativos & La librer\xEDa de Programas de Solana (SPL)",slug:"programas-nativos-la-libreria-de-programas-de-solana-spl",children:[]},{level:3,title:"Escribiendo programas",slug:"escribiendo-programas",children:[]},{level:3,title:"Desplegando Programas",slug:"desplegando-programas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/es/core-concepts/programs.html",pathLocale:"/es/",extraFields:[]},{title:"Transacciones",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"Cargos (fees)",slug:"cargos-fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/es/core-concepts/transactions.html",pathLocale:"/es/",extraFields:[]},{title:"Instalaci\xF3n",headers:[{level:2,title:"Instalaci\xF3n de Web3.js",slug:"instalacion-de-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instalaci\xF3n de Rust",slug:"instalacion-de-rust",children:[]},{level:2,title:"Instalaci\xF3n de CLI",slug:"instalacion-de-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compilaci\xF3n desde el C\xF3digo Fuente",slug:"compilacion-desde-el-codigo-fuente",children:[]}]}],path:"/es/getting-started/installation.html",pathLocale:"/es/",extraFields:[]},{title:"C\xF3mo usar Map en cuentas",headers:[{level:2,title:"Derivando PDAs",slug:"derivando-pdas",children:[]},{level:2,title:"Map simple",slug:"map-simple",children:[]}],path:"/es/guides/account-maps.html",pathLocale:"/es/",extraFields:[]},{title:"Migrando cuentas de datos de programas",headers:[{level:2,title:"\xBFC\xF3mo se pueden migrar las cuentas de datos de un programa?",slug:"\xBFcomo-se-pueden-migrar-las-cuentas-de-datos-de-un-programa",children:[]},{level:2,title:"Escenario",slug:"escenario",children:[]},{level:2,title:"Actualizando la cuenta",slug:"actualizando-la-cuenta",children:[{level:3,title:"1. Agregar la l\xF3gica de conversi\xF3n de cuenta",slug:"_1-agregar-la-logica-de-conversion-de-cuenta",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/es/guides/data-migration.html",pathLocale:"/es/",extraFields:[]},{title:"Depurando Programas en Solana",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Pruebas de tiempo de ejecuci\xF3n y depuraci\xF3n en el editor",slug:"pruebas-de-tiempo-de-ejecucion-y-depuracion-en-el-editor",children:[]},{level:2,title:"Pruebas de nodo de validaci\xF3n local en el editor (Local Validator)",slug:"pruebas-de-nodo-de-validacion-local-en-el-editor-local-validator",children:[]},{level:2,title:"Pruebas de nodos de validadores locales desde aplicaciones cliente",slug:"pruebas-de-nodos-de-validadores-locales-desde-aplicaciones-cliente",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/es/guides/debugging-solana-programs.html",pathLocale:"/es/",extraFields:[]},{title:"Prueba de paridad de caracter\xEDsticas",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Escenario",slug:"escenario",children:[]},{level:2,title:"Estado de la funci\xF3n",slug:"estado-de-la-funcion",children:[]},{level:2,title:"Pruebas de paridad",slug:"pruebas-de-paridad",children:[]},{level:2,title:"Demostraci\xF3n sencilla",slug:"demostracion-sencilla",children:[{level:3,title:"Todas las funciones activadas",slug:"todas-las-funciones-activadas",children:[]},{level:3,title:"Funciones selectivas desactivadas",slug:"funciones-selectivas-desactivadas",children:[]}]},{level:2,title:"Pruebas de paridad completa",slug:"pruebas-de-paridad-completa",children:[]},{level:2,title:"Pruebas de paridad completa program\xE1ticamente",slug:"pruebas-de-paridad-completa-programaticamente",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/es/guides/feature-parity-testing.html",pathLocale:"/es/",extraFields:[]},{title:"Obtener cuentas de programa",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Otros recursos",slug:"otros-recursos",children:[]}],path:"/es/guides/get-program-accounts.html",pathLocale:"/es/",extraFields:[]},{title:"Serializando datos",headers:[{level:2,title:"Configuraci\xF3n para la serializaci\xF3n con Borsh",slug:"configuracion-para-la-serializacion-con-borsh",children:[]},{level:2,title:"C\xF3mo serializar datos de instrucciones en el cliente",slug:"como-serializar-datos-de-instrucciones-en-el-cliente",children:[]},{level:2,title:"How to deserialize instruction data on the program",slug:"how-to-deserialize-instruction-data-on-the-program",children:[]},{level:2,title:"C\xF3mo serializar los datos de la cuenta en el programa",slug:"como-serializar-los-datos-de-la-cuenta-en-el-programa",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serializaci\xF3n/Deserealizaci\xF3n",slug:"serializacion-deserealizacion",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"C\xF3mo deserializar los datos de la cuenta en el cliente",slug:"como-deserializar-los-datos-de-la-cuenta-en-el-cliente",children:[]},{level:2,title:"Mappins comunes de Solana TS/JS",slug:"mappins-comunes-de-solana-ts-js",children:[]},{level:2,title:"Construcciones avanzadas",slug:"construcciones-avanzadas",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/es/guides/serialization.html",pathLocale:"/es/",extraFields:[]},{title:"Cuentas",headers:[{level:2,title:"C\xF3mo crear una cuenta del sistema",slug:"como-crear-una-cuenta-del-sistema",children:[]},{level:2,title:"C\xF3mo calcular el costo de una cuenta",slug:"como-calcular-el-costo-de-una-cuenta",children:[]},{level:2,title:"C\xF3mo crear cuentas con semillas",slug:"como-crear-cuentas-con-semillas",children:[{level:3,title:"Generar",slug:"generar",children:[]},{level:3,title:"Crear",slug:"crear",children:[]},{level:3,title:"Transferir",slug:"transferir",children:[]}]},{level:2,title:"C\xF3mo crear PDAs",slug:"como-crear-pdas",children:[{level:3,title:"Generar una cuenta derivada de programa (PDA)",slug:"generar-una-cuenta-derivada-de-programa-pda",children:[]},{level:3,title:"Crear una cuenta derivada de programa (PDA)",slug:"crear-una-cuenta-derivada-de-programa-pda",children:[]}]},{level:2,title:"C\xF3mo firmar con una cuenta derivada de programa (PDA)",slug:"como-firmar-con-una-cuenta-derivada-de-programa-pda",children:[{level:3,title:"Programa",slug:"programa-1",children:[]},{level:3,title:"Cliente",slug:"cliente-1",children:[]}]},{level:2,title:"C\xF3mo obtener cuentas de programas",slug:"como-obtener-cuentas-de-programas",children:[]},{level:2,title:"C\xF3mo cerrar cuentas",slug:"como-cerrar-cuentas",children:[]},{level:2,title:"C\xF3mo obtener el balance de una cuenta",slug:"como-obtener-el-balance-de-una-cuenta",children:[]}],path:"/es/references/accounts.html",pathLocale:"/es/",extraFields:[]},{title:"Enviando transacciones",headers:[{level:2,title:"C\xF3mo enviar SOL",slug:"como-enviar-sol",children:[]},{level:2,title:"How to send SPL-Tokens",slug:"how-to-send-spl-tokens",children:[]},{level:2,title:"C\xF3mo calcular el costo de una transacci\xF3n",slug:"como-calcular-el-costo-de-una-transaccion",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"C\xF3mo agregar un memo en una transacci\xF3n",slug:"como-agregar-un-memo-en-una-transaccion",children:[]},{level:2,title:"C\xF3mo cambiar el presupuesto de c\xF3mputo para una transacci\xF3n",slug:"como-cambiar-el-presupuesto-de-computo-para-una-transaccion",children:[]}],path:"/es/references/basic-transactions.html",pathLocale:"/es/",extraFields:[]},{title:"Pares de llaves y billeteras",headers:[{level:2,title:"C\xF3mo generar un nuevo Keypair (par de llaves)",slug:"como-generar-un-nuevo-keypair-par-de-llaves",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves a partir de una llave privada",slug:"como-restaurar-un-par-de-llaves-a-partir-de-una-llave-privada",children:[]},{level:2,title:"C\xF3mo verificar un par de llaves",slug:"como-verificar-un-par-de-llaves",children:[]},{level:2,title:"C\xF3mo comprobar si una llave p\xFAblica tiene una llave privada asociada",slug:"como-comprobar-si-una-llave-publica-tiene-una-llave-privada-asociada",children:[]},{level:2,title:"C\xF3mo generar una frase semilla (mnemonic)",slug:"como-generar-una-frase-semilla-mnemonic",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves desde una frase semilla",slug:"como-restaurar-un-par-de-llaves-desde-una-frase-semilla",children:[]},{level:2,title:"C\xF3mo generar una direcci\xF3n personalizada",slug:"como-generar-una-direccion-personalizada",children:[]},{level:2,title:"C\xF3mo firmar y verificar mensajes con wallets",slug:"como-firmar-y-verificar-mensajes-con-wallets",children:[]},{level:2,title:"C\xF3mo conectar una wallet",slug:"como-conectar-una-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/es/references/keypairs-and-wallets.html",pathLocale:"/es/",extraFields:[]},{title:"Desarrollo en entorno local",headers:[{level:2,title:"Iniciando un validador",slug:"iniciando-un-validador",children:[]},{level:2,title:"Conect\xE1ndote con los diferentes entornos",slug:"conectandote-con-los-diferentes-entornos",children:[]},{level:2,title:"Suscripci\xF3n a eventos",slug:"suscripcion-a-eventos",children:[]},{level:2,title:"Obteniendo SOL para pruebas",slug:"obteniendo-sol-para-pruebas",children:[]},{level:2,title:"Usando cuentas de mainnet y programas",slug:"usando-cuentas-de-mainnet-y-programas",children:[{level:3,title:"C\xF3mo cargar cuentas de mainnet",slug:"como-cargar-cuentas-de-mainnet",children:[]},{level:3,title:"C\xF3mo cargar programas de mainnet",slug:"como-cargar-programas-de-mainnet",children:[]}]}],path:"/es/references/local-development.html",pathLocale:"/es/",extraFields:[]},{title:"Servicio de nombres",headers:[{level:2,title:"Registro de nombres",slug:"registro-de-nombres",children:[]},{level:2,title:"Resolviendo dominios SOL",slug:"resolviendo-dominios-sol",children:[]},{level:2,title:"B\xFAsqueda inversa",slug:"busqueda-inversa",children:[]},{level:2,title:"B\xFAsqueda de subdominios",slug:"busqueda-de-subdominios",children:[]},{level:2,title:"Encuentre todos los nombres de dominio que pertenecen a una clave p\xFAblica",slug:"encuentre-todos-los-nombres-de-dominio-que-pertenecen-a-una-clave-publica",children:[]},{level:2,title:"Resolver un identificador de Twitter",slug:"resolver-un-identificador-de-twitter",children:[]},{level:2,title:"B\xFAsqueda inversa de un identificador de Twitter",slug:"busqueda-inversa-de-un-identificador-de-twitter",children:[]}],path:"/es/references/name-service.html",pathLocale:"/es/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"\xBFC\xF3mo crear un NFT?",slug:"\xBFcomo-crear-un-nft",children:[{level:3,title:"Subir a Arweave",slug:"subir-a-arweave",children:[]},{level:3,title:"Crear (mint) el NFT",slug:"crear-mint-el-nft",children:[]}]},{level:2,title:"\xBFC\xF3mo obtener metadatos de un NFT?",slug:"\xBFcomo-obtener-metadatos-de-un-nft",children:[]},{level:2,title:"\xBFC\xF3mo obtener el due\xF1o de un NFT?",slug:"\xBFcomo-obtener-el-dueno-de-un-nft",children:[]},{level:2,title:"\xBFC\xF3mo obtener direcciones de mint de NFT?",slug:"\xBFcomo-obtener-direcciones-de-mint-de-nft",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\xBFC\xF3mo obtener todos los NFT de una billetera?",slug:"\xBFcomo-obtener-todos-los-nft-de-una-billetera",children:[]}],path:"/es/references/nfts.html",pathLocale:"/es/",extraFields:[]},{title:"Enviando transacciones offline",headers:[{level:2,title:"Firmar una transacci\xF3n",slug:"firmar-una-transaccion",children:[]},{level:2,title:"Firma parcial de una transacci\xF3n",slug:"firma-parcial-de-una-transaccion",children:[]},{level:2,title:"Nonce de larga duraci\xF3n (Durable Nonce)",slug:"nonce-de-larga-duracion-durable-nonce",children:[{level:3,title:"Crear una cuenta nonce",slug:"crear-una-cuenta-nonce",children:[]},{level:3,title:"Obtener una cuenta nonce",slug:"obtener-una-cuenta-nonce",children:[]},{level:3,title:"Usar una cuenta nonce",slug:"usar-una-cuenta-nonce",children:[]}]}],path:"/es/references/offline-transactions.html",pathLocale:"/es/",extraFields:[]},{title:"Escribiendo Programas",headers:[{level:2,title:"C\xF3mo transferir SOL a un programa",slug:"como-transferir-sol-a-un-programa",children:[]},{level:2,title:"C\xF3mo obtener una referencia al reloj en un programa",slug:"como-obtener-una-referencia-al-reloj-en-un-programa",children:[{level:3,title:"Enviando Clock c\xF3mo una cuenta dentro de una instrucci\xF3n",slug:"enviando-clock-como-una-cuenta-dentro-de-una-instruccion",children:[]},{level:3,title:"Accediendo al reloj directamente dentro de una instrucci\xF3n",slug:"accediendo-al-reloj-directamente-dentro-de-una-instruccion",children:[]}]},{level:2,title:"C\xF3mo cambiar el tama\xF1o de una cuenta",slug:"como-cambiar-el-tamano-de-una-cuenta",children:[]},{level:2,title:"C\xF3mo hacer una invocaci\xF3n entre programas (Cross Program Invocation)",slug:"como-hacer-una-invocacion-entre-programas-cross-program-invocation",children:[]},{level:2,title:"C\xF3mo crear una cuenta derivada de programa (PDA)",slug:"como-crear-una-cuenta-derivada-de-programa-pda",children:[]},{level:2,title:"C\xF3mo leer cuentas",slug:"como-leer-cuentas",children:[]},{level:2,title:"C\xF3mo verificar cuentas",slug:"como-verificar-cuentas",children:[]},{level:2,title:"C\xF3mo leer m\xFAltiples instrucciones de una transacci\xF3n",slug:"como-leer-multiples-instrucciones-de-una-transaccion",children:[]}],path:"/es/references/programs.html",pathLocale:"/es/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Obtener los validadores actuales",slug:"obtener-los-validadores-actuales",children:[]},{level:2,title:"\xBFCrear una cuenta de stake?",slug:"\xBFcrear-una-cuenta-de-stake",children:[]},{level:2,title:"Delegar Stake",slug:"delegar-stake",children:[]},{level:2,title:"Obtener el delegador por los validadores",slug:"obtener-el-delegador-por-los-validadores",children:[]},{level:2,title:"Desactivar Stake",slug:"desactivar-stake",children:[]},{level:2,title:"Retirar Stake",slug:"retirar-stake",children:[]}],path:"/es/references/staking.html",pathLocale:"/es/",extraFields:[]},{title:"Interactuando con tokens",headers:[{level:2,title:"\xBFQu\xE9 necesito para comenzar a trabajar con SPL-Tokens?",slug:"\xBFque-necesito-para-comenzar-a-trabajar-con-spl-tokens",children:[]},{level:2,title:"\xBFC\xF3mo crear un nuevo token?",slug:"\xBFcomo-crear-un-nuevo-token",children:[]},{level:2,title:'\xBFC\xF3mo obtener un token "mint"?',slug:"\xBFcomo-obtener-un-token-mint",children:[]},{level:2,title:"\xBFC\xF3mo crear una cuenta de token?",slug:"\xBFcomo-crear-una-cuenta-de-token",children:[]},{level:2,title:"\xBFC\xF3mo obtener un cuenta de token?",slug:"\xBFcomo-obtener-un-cuenta-de-token",children:[]},{level:2,title:"\xBFC\xF3mo obtener el saldo de una cuenta token?",slug:"\xBFcomo-obtener-el-saldo-de-una-cuenta-token",children:[]},{level:2,title:"\xBFC\xF3mo crear (mint) nuevos tokens?",slug:"\xBFcomo-crear-mint-nuevos-tokens",children:[]},{level:2,title:"\xBFC\xF3mo transferir tokens?",slug:"\xBFcomo-transferir-tokens",children:[]},{level:2,title:"\xBFC\xF3mo quemar tokens?",slug:"\xBFcomo-quemar-tokens",children:[]},{level:2,title:"\xBFC\xF3mo cerrar cuentas de token?",slug:"\xBFcomo-cerrar-cuentas-de-token",children:[]},{level:2,title:"\xBFC\xF3mo establecer la autoridad en cuentas de tokens o mints?",slug:"\xBFcomo-establecer-la-autoridad-en-cuentas-de-tokens-o-mints",children:[]},{level:2,title:"\xBFC\xF3mo aprobar una delegaci\xF3n de token?",slug:"\xBFcomo-aprobar-una-delegacion-de-token",children:[]},{level:2,title:"\xBFC\xF3mo revocar una delegaci\xF3n de token?",slug:"\xBFcomo-revocar-una-delegacion-de-token",children:[]},{level:2,title:"\xBFC\xF3mo manejar Wrapped SOL?",slug:"\xBFcomo-manejar-wrapped-sol",children:[{level:3,title:"Crear una cuenta de token",slug:"crear-una-cuenta-de-token",children:[]},{level:3,title:"Agregar saldo",slug:"agregar-saldo",children:[]}]},{level:2,title:"\xBFC\xF3mo obtener todas las cuentas de token por propietario?",slug:"\xBFcomo-obtener-todas-las-cuentas-de-token-por-propietario",children:[]}],path:"/es/references/token.html",pathLocale:"/es/",extraFields:[]},{title:"Akun",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[]},{level:2,title:"Lebih Dalam",slug:"lebih-dalam",children:[{level:3,title:"Model Akun",slug:"model-akun",children:[]},{level:3,title:"Menyewa",slug:"menyewa",children:[]}]},{level:2,title:"Sumber Lainnya",slug:"sumber-lainnya",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/id/core-concepts/accounts.html",pathLocale:"/id/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[{level:3,title:"Membuat PDA",slug:"membuat-pda",children:[]},{level:3,title:"Berinteraksi dengan PDAs",slug:"berinteraksi-dengan-pdas",children:[]}]},{level:2,title:"Sumber lainnya",slug:"sumber-lainnya",children:[]}],path:"/id/core-concepts/pdas.html",pathLocale:"/id/",extraFields:[]},{title:"Program",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[]},{level:2,title:"Lebih Dalam",slug:"lebih-dalam",children:[{level:3,title:"Native Program & Solana Program Library (SPL)",slug:"native-program-solana-program-library-spl",children:[]},{level:3,title:"Menulis Program",slug:"menulis-program",children:[]},{level:3,title:"Deploy Program",slug:"deploy-program",children:[]}]},{level:2,title:"Sumber Lainnya",slug:"sumber-lainnya",children:[]}],path:"/id/core-concepts/programs.html",pathLocale:"/id/",extraFields:[]},{title:"Transaksi",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[]},{level:2,title:"Lebih Dalam",slug:"lebih-dalam",children:[{level:3,title:"Biaya",slug:"biaya",children:[]}]},{level:2,title:"Sumber lainnya",slug:"sumber-lainnya",children:[]}],path:"/id/core-concepts/transactions.html",pathLocale:"/id/",extraFields:[]},{title:"Instalasi",headers:[{level:2,title:"Unduh Web3.js",slug:"unduh-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Membangun dari Source",slug:"membangun-dari-source",children:[]}]}],path:"/id/getting-started/installation.html",pathLocale:"/id/",extraFields:[]},{title:"Peta Akun",headers:[{level:2,title:"Menghasilkan PDA",slug:"menghasilkan-pda",children:[]},{level:2,title:"Akun Peta Tunggal",slug:"akun-peta-tunggal",children:[]}],path:"/id/guides/account-maps.html",pathLocale:"/id/",extraFields:[]},{title:"Migrasi Akun Data Program",headers:[{level:2,title:"Bagaimana cara melakukan migrasi akun data sebuah program?",slug:"bagaimana-cara-melakukan-migrasi-akun-data-sebuah-program",children:[]},{level:2,title:"Skenario",slug:"skenario",children:[]},{level:2,title:"Melakukan upgrade Akun",slug:"melakukan-upgrade-akun",children:[{level:3,title:"1. Tambahkan logika konversi akun",slug:"_1-tambahkan-logika-konversi-akun",children:[]}]},{level:2,title:"Resource",slug:"resource",children:[]}],path:"/id/guides/data-migration.html",pathLocale:"/id/",extraFields:[]},{title:"Debug Program Solana",headers:[{level:2,title:"Fakta",slug:"fakta",children:[]},{level:2,title:"Uji Runtime dan Debugging di editor",slug:"uji-runtime-dan-debugging-di-editor",children:[]},{level:2,title:"Uji Node Validator Lokal di editor",slug:"uji-node-validator-lokal-di-editor",children:[]},{level:2,title:"Uji Node Validator Lokal dari Aplikasi Klien",slug:"uji-node-validator-lokal-dari-aplikasi-klien",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/id/guides/debugging-solana-programs.html",pathLocale:"/id/",extraFields:[]},{title:"Pengujian Paritas Fitur",headers:[{level:2,title:"Fakta",slug:"fakta",children:[]},{level:2,title:"Skenario",slug:"skenario",children:[]},{level:2,title:"Status Fitur",slug:"status-fitur",children:[]},{level:2,title:"Uji Paritas",slug:"uji-paritas",children:[]},{level:2,title:"Demonstrasi Sederhana",slug:"demonstrasi-sederhana",children:[{level:3,title:"Semua fitur diaktifkan",slug:"semua-fitur-diaktifkan",children:[]},{level:3,title:"Fitur selektif dinonaktifkan",slug:"fitur-selektif-dinonaktifkan",children:[]}]},{level:2,title:"Uji Paritas Penuh",slug:"uji-paritas-penuh",children:[]},{level:2,title:"Uji Paritas Penuh Secara Terprogram",slug:"uji-paritas-penuh-secara-terprogram",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/id/guides/feature-parity-testing.html",pathLocale:"/id/",extraFields:[]},{title:"Mendapatkan Akun Program",headers:[{level:2,title:"Fakta",slug:"fakta",children:[]},{level:2,title:"Memahami lebih dalam",slug:"memahami-lebih-dalam",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Resource lainnya",slug:"resource-lainnya",children:[]}],path:"/id/guides/get-program-accounts.html",pathLocale:"/id/",extraFields:[]},{title:"Serialisasi Data",headers:[{level:2,title:"Persiapan untuk Borsh Serialization",slug:"persiapan-untuk-borsh-serialization",children:[]},{level:2,title:"Cara serialize data instruksi pada klien",slug:"cara-serialize-data-instruksi-pada-klien",children:[]},{level:2,title:"Cara deserialisasi data instruksi pada program",slug:"cara-deserialisasi-data-instruksi-pada-program",children:[]},{level:2,title:"Cara serialisasi data akun pada program",slug:"cara-serialisasi-data-akun-pada-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialisasi/Deserialisasi",slug:"serialisasi-deserialisasi",children:[]},{level:3,title:"Penggunaan",slug:"penggunaan",children:[]}]},{level:2,title:"Cara deserialisasi data akun pada klien",slug:"cara-deserialisasi-data-akun-pada-klien",children:[]},{level:2,title:"Pemetaan Solana TS/JS Umum",slug:"pemetaan-solana-ts-js-umum",children:[]},{level:2,title:"Metode Lanjutan",slug:"metode-lanjutan",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resource",slug:"resource",children:[]}],path:"/id/guides/serialization.html",pathLocale:"/id/",extraFields:[]},{title:"Akun",headers:[{level:2,title:"Bagaimana cara membuat sebuah sistem akun",slug:"bagaimana-cara-membuat-sebuah-sistem-akun",children:[]},{level:2,title:"Bagaimana cara mengkalkulasi biaya akun",slug:"bagaimana-cara-mengkalkulasi-biaya-akun",children:[]},{level:2,title:"Bagaimana cara membuat akun dengan seeds",slug:"bagaimana-cara-membuat-akun-dengan-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"Bagaimana cara membuat PDAs",slug:"bagaimana-cara-membuat-pdas",children:[{level:3,title:"Menghasilkan sebuah PDA",slug:"menghasilkan-sebuah-pda",children:[]},{level:3,title:"Membuat sebuah PDA",slug:"membuat-sebuah-pda",children:[]}]},{level:2,title:"Bagaimana cara untuk sign sebuah PDA",slug:"bagaimana-cara-untuk-sign-sebuah-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"Bagaimana Cara Mendapatkan Program Akun",slug:"bagaimana-cara-mendapatkan-program-akun",children:[]},{level:2,title:"Bagaimana Cara Menutup Akun",slug:"bagaimana-cara-menutup-akun",children:[]},{level:2,title:"Bagaimana Cara Mendapatkan Balance Akun",slug:"bagaimana-cara-mendapatkan-balance-akun",children:[]}],path:"/id/references/accounts.html",pathLocale:"/id/",extraFields:[]},{title:"Mengirim Transaksi",headers:[{level:2,title:"Bagaimana cara mengirim SOL",slug:"bagaimana-cara-mengirim-sol",children:[]},{level:2,title:"Bagimana cara mengirim SPL-Tokens",slug:"bagimana-cara-mengirim-spl-tokens",children:[]},{level:2,title:"Bagaimana cara mengkalkulasi biaya transaksi",slug:"bagaimana-cara-mengkalkulasi-biaya-transaksi",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Bagaimana menambah catatan ke dalam sebuah transaksi",slug:"bagaimana-menambah-catatan-ke-dalam-sebuah-transaksi",children:[]},{level:2,title:"Bagaimana cara merubah perhitungan budget untuk sebuah transaksi",slug:"bagaimana-cara-merubah-perhitungan-budget-untuk-sebuah-transaksi",children:[]}],path:"/id/references/basic-transactions.html",pathLocale:"/id/",extraFields:[]},{title:"Keypairs & Wallets",headers:[{level:2,title:"Bagaimana cara membuat sebuah Keypair baru",slug:"bagaimana-cara-membuat-sebuah-keypair-baru",children:[]},{level:2,title:"Bagaimana cara me-restore sebuah Keypair dari sebuah secret",slug:"bagaimana-cara-me-restore-sebuah-keypair-dari-sebuah-secret",children:[]},{level:2,title:"Bagaimana cara menverifikasi sebuah Keypair",slug:"bagaimana-cara-menverifikasi-sebuah-keypair",children:[]},{level:2,title:"Bagaimana cara untuk check jika sebuah public key telah terhubung dengan sebuah private key",slug:"bagaimana-cara-untuk-check-jika-sebuah-public-key-telah-terhubung-dengan-sebuah-private-key",children:[]},{level:2,title:"Bagaimana cara membuat mnemonic phrase",slug:"bagaimana-cara-membuat-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara restore sebuah Keypair dari sebuah mnemonic phrase",slug:"bagaimana-cara-restore-sebuah-keypair-dari-sebuah-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara membuat sebuah vanity address",slug:"bagaimana-cara-membuat-sebuah-vanity-address",children:[]},{level:2,title:"Bagaimana cara untuk sign dan menverifikasi messages dalam wallet",slug:"bagaimana-cara-untuk-sign-dan-menverifikasi-messages-dalam-wallet",children:[]},{level:2,title:"Bagaimana cara mengkoneksi ke sebuah wallet",slug:"bagaimana-cara-mengkoneksi-ke-sebuah-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/id/references/keypairs-and-wallets.html",pathLocale:"/id/",extraFields:[]},{title:"Development Lokal",headers:[{level:2,title:"Memulai Validator Lokal",slug:"memulai-validator-lokal",children:[]},{level:2,title:"Menghubungkan Ke Environment",slug:"menghubungkan-ke-environment",children:[]},{level:2,title:"Subskripsi Event",slug:"subskripsi-event",children:[]},{level:2,title:"Mendapatkan Tes SOL",slug:"mendapatkan-tes-sol",children:[]},{level:2,title:"Menggunakan Akun dan Program Mainnet",slug:"menggunakan-akun-dan-program-mainnet",children:[{level:3,title:"Cara memuat akun dari mainnet",slug:"cara-memuat-akun-dari-mainnet",children:[]},{level:3,title:"Cara memuat program dari mainnet",slug:"cara-memuat-program-dari-mainnet",children:[]}]}],path:"/id/references/local-development.html",pathLocale:"/id/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"Menemukan semua domain name yang dimiliki oleh suatu public key",slug:"menemukan-semua-domain-name-yang-dimiliki-oleh-suatu-public-key",children:[]},{level:2,title:"Resolve Twitter handle",slug:"resolve-twitter-handle",children:[]},{level:2,title:"Reverse look up suatu Twitter handle",slug:"reverse-look-up-suatu-twitter-handle",children:[]}],path:"/id/references/name-service.html",pathLocale:"/id/",extraFields:[]},{title:"NFT",headers:[{level:2,title:"Cara membuat NFT",slug:"cara-membuat-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint NFT-nya",slug:"mint-nft-nya",children:[]}]},{level:2,title:"Cara Mendapatkan Metadata NFT",slug:"cara-mendapatkan-metadata-nft",children:[]},{level:2,title:"Cara Mengetahui Pemilik Sebuah NFT",slug:"cara-mengetahui-pemilik-sebuah-nft",children:[]},{level:2,title:"Cara untuk mengambil NFT Mint Addresses",slug:"cara-untuk-mengambil-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Cara Mendapatkan Semua NFT dari Suatu Wallet",slug:"cara-mendapatkan-semua-nft-dari-suatu-wallet",children:[]}],path:"/id/references/nfts.html",pathLocale:"/id/",extraFields:[]},{title:"Mengirim Transaksi Offline",headers:[{level:2,title:"Sign Transaksi",slug:"sign-transaksi",children:[]},{level:2,title:"Sign Transaksi Sebagian",slug:"sign-transaksi-sebagian",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Membuat Akun Nonce",slug:"membuat-akun-nonce",children:[]},{level:3,title:"Mendapatkan Akun Nonce",slug:"mendapatkan-akun-nonce",children:[]},{level:3,title:"Menggunakan Akun Nonce",slug:"menggunakan-akun-nonce",children:[]}]}],path:"/id/references/offline-transactions.html",pathLocale:"/id/",extraFields:[]},{title:"Menulis Program",headers:[{level:2,title:"Bagaimana cara mentransfer SOL di dalam sebuah program",slug:"bagaimana-cara-mentransfer-sol-di-dalam-sebuah-program",children:[]},{level:2,title:"Bagaimana cara mendapatkan waktu dalam sebuah program",slug:"bagaimana-cara-mendapatkan-waktu-dalam-sebuah-program",children:[{level:3,title:"Passing Waktu sebagai sebuah account di dalam sebuah instruksi",slug:"passing-waktu-sebagai-sebuah-account-di-dalam-sebuah-instruksi",children:[]},{level:3,title:"Mengakses Waktu secara langsung di dalam sebuah instruksi",slug:"mengakses-waktu-secara-langsung-di-dalam-sebuah-instruksi",children:[]}]},{level:2,title:"Bagaimana cara merubah size akun",slug:"bagaimana-cara-merubah-size-akun",children:[]},{level:2,title:"Bagaimana cara untuk membuat program Cross Invocation",slug:"bagaimana-cara-untuk-membuat-program-cross-invocation",children:[]},{level:2,title:"Bagaimana cara membuat sebuah PDA",slug:"bagaimana-cara-membuat-sebuah-pda",children:[]},{level:2,title:"Bagaimana cara membaca akun",slug:"bagaimana-cara-membaca-akun",children:[]},{level:2,title:"Bagaimana cara men-verifikasi akun",slug:"bagaimana-cara-men-verifikasi-akun",children:[]},{level:2,title:"Bagaimana cara membaca beberapa instruksi dalam sebuah transaksi",slug:"bagaimana-cara-membaca-beberapa-instruksi-dalam-sebuah-transaksi",children:[]}],path:"/id/references/programs.html",pathLocale:"/id/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Mendapatkan Validators",slug:"mendapatkan-validators",children:[]},{level:2,title:"Membuat Stake Account",slug:"membuat-stake-account",children:[]},{level:2,title:"Mendelegasi Stake",slug:"mendelegasi-stake",children:[]},{level:2,title:"Mendapatkan Delegator dengan Validator",slug:"mendapatkan-delegator-dengan-validator",children:[]},{level:2,title:"Deactivate Stake",slug:"deactivate-stake",children:[]},{level:2,title:"Withdraw Stake",slug:"withdraw-stake",children:[]}],path:"/id/references/staking.html",pathLocale:"/id/",extraFields:[]},{title:"Interaksi dengan Token",headers:[{level:2,title:"Apa yang saya perlukan untuk memulai dengan SPL-Tokens?",slug:"apa-yang-saya-perlukan-untuk-memulai-dengan-spl-tokens",children:[]},{level:2,title:"Bagaimana cara untuk membuat sebuah Token baru",slug:"bagaimana-cara-untuk-membuat-sebuah-token-baru",children:[]},{level:2,title:"Bagaimana cara mendapatkan sebuah token mint",slug:"bagaimana-cara-mendapatkan-sebuah-token-mint",children:[]},{level:2,title:"Bagaimana cara membuat sebuah akun token",slug:"bagaimana-cara-membuat-sebuah-akun-token",children:[]},{level:2,title:"Bagaimana cara mendapatkan sebuah Akun Token",slug:"bagaimana-cara-mendapatkan-sebuah-akun-token",children:[]},{level:2,title:"Bagaimana cara mendapatkan saldo dari akun token",slug:"bagaimana-cara-mendapatkan-saldo-dari-akun-token",children:[]},{level:2,title:"Bagaimana cara untuk me-mint token-token",slug:"bagaimana-cara-untuk-me-mint-token-token",children:[]},{level:2,title:"Bagaimana cara mentransfer token-token",slug:"bagaimana-cara-mentransfer-token-token",children:[]},{level:2,title:"Bagaimana cara membakar token-token",slug:"bagaimana-cara-membakar-token-token",children:[]},{level:2,title:"Bagaimana cara menutup akun-akun token",slug:"bagaimana-cara-menutup-akun-akun-token",children:[]},{level:2,title:"Bagaimana cara untuk men-set authority pada akun-akun token atau mints",slug:"bagaimana-cara-untuk-men-set-authority-pada-akun-akun-token-atau-mints",children:[]},{level:2,title:"Bagaimana cara untuk men-approve delegasi sebuah token",slug:"bagaimana-cara-untuk-men-approve-delegasi-sebuah-token",children:[]},{level:2,title:"Bagaimana cara menarik kembali delegasi token",slug:"bagaimana-cara-menarik-kembali-delegasi-token",children:[]},{level:2,title:"Bagaimana cara mengature wrapped SOL",slug:"bagaimana-cara-mengature-wrapped-sol",children:[{level:3,title:"Membuat Akun Token",slug:"membuat-akun-token",children:[]},{level:3,title:"Menambah Saldo",slug:"menambah-saldo",children:[]}]},{level:2,title:"Bagaimana cara mendapatkan semua akun-akun token sebagai pemilik",slug:"bagaimana-cara-mendapatkan-semua-akun-akun-token-sebagai-pemilik",children:[]}],path:"/id/references/token.html",pathLocale:"/id/",extraFields:[]},{title:"\u30A2\u30AB\u30A6\u30F3\u30C8",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30E2\u30C7\u30EB",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30E2\u30C6\u3099\u30EB",children:[]},{level:3,title:"rent(\u5BB6\u8CC3)",slug:"rent-\u5BB6\u8CC3",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/ja/core-concepts/accounts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI)",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"invoke\u3092\u7528\u3044\u305FCPI",slug:"invoke\u3092\u7528\u3044\u305Fcpi",children:[]},{level:3,title:"invoke_signed\u3092\u7528\u3044\u305FCPI",slug:"invoke-signed\u3092\u7528\u3044\u305Fcpi",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/cpi.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(PDA)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"PDA \u306E\u751F\u6210",slug:"pda-\u306E\u751F\u6210",children:[]},{level:3,title:"PDA\u3068\u5BFE\u8A71\u3059\u308B",slug:"pda\u3068\u5BFE\u8A71\u3059\u308B",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/pdas.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30DF\u30F3\u30AF\u3099",children:[]},{level:3,title:"\u30C7\u30D7\u30ED\u30A4",slug:"\u30C6\u3099\u30D5\u309A\u30ED\u30A4",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/programs.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"\u624B\u6570\u6599",slug:"\u624B\u6570\u6599",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/ja/getting-started/installation.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30DE\u30C3\u30D7",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"\u5358\u4E00\u306E\u30DE\u30C3\u30D7 \u30A2\u30AB\u30A6\u30F3\u30C8",slug:"\u5358\u4E00\u306E\u30DE\u30C3\u30D5\u309A-\u30A2\u30AB\u30A6\u30F3\u30C8",children:[]}],path:"/ja/guides/account-maps.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u79FB\u884C",headers:[{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u79FB\u884C\u3059\u308B\u306B\u306F\u3069\u3046\u3059\u308C\u3070\u3088\u3044\u3067\u3059\u304B\uFF1F",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u30C6\u3099\u30FC\u30BF-\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u79FB\u884C\u3059\u308B\u306B\u306F\u3068\u3099\u3046\u3059\u308C\u306F\u3099\u3088\u3044\u3066\u3099\u3059\u304B",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C3\u30D5\u309A\u30AF\u3099\u30EC\u30FC\u30C8\u3099",children:[{level:3,title:"1. \u30A2\u30AB\u30A6\u30F3\u30C8\u5909\u63DB\u30ED\u30B8\u30C3\u30AF\u3092\u8FFD\u52A0\u3059\u308B",slug:"_1-\u30A2\u30AB\u30A6\u30F3\u30C8\u5909\u63DB\u30ED\u30B7\u3099\u30C3\u30AF\u3092\u8FFD\u52A0\u3059\u308B",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/data-migration.html",pathLocale:"/ja/",extraFields:[]},{title:"Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30D0\u30C3\u30B0",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Runtime Testing and Debugging in editor",slug:"runtime-testing-and-debugging-in-editor",children:[]},{level:2,title:"Local Validator Node Testing in editor",slug:"local-validator-node-testing-in-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/debugging-solana-programs.html",pathLocale:"/ja/",extraFields:[]},{title:"\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u30B7\u30CA\u30EA\u30AA",slug:"\u30B7\u30CA\u30EA\u30AA",children:[]},{level:2,title:"\u6A5F\u80FD\u30B9\u30C6\u30FC\u30BF\u30B9",slug:"\u6A5F\u80FD\u30B9\u30C6\u30FC\u30BF\u30B9",children:[]},{level:2,title:"\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",slug:"\u30CF\u309A\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",children:[]},{level:2,title:"\u7C21\u5358\u306A\u30C7\u30E2\u30F3\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",slug:"\u7C21\u5358\u306A\u30C6\u3099\u30E2\u30F3\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",children:[{level:3,title:"\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u3059\u3079\u3066\u306E\u6A5F\u80FD",slug:"\u30A2\u30AF\u30C6\u30A3\u30D5\u3099\u306A\u3059\u3078\u3099\u3066\u306E\u6A5F\u80FD",children:[]},{level:3,title:"\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u9078\u629E\u6A5F\u80FD",slug:"\u975E\u30A2\u30AF\u30C6\u30A3\u30D5\u3099\u306A\u9078\u629E\u6A5F\u80FD",children:[]}]},{level:2,title:"\u5B8C\u5168\u306A\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",slug:"\u5B8C\u5168\u306A\u30CF\u309A\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u306E\u5B8C\u5168\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099\u306E\u5B8C\u5168\u30CF\u309A\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",children:[]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/feature-parity-testing.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/get-program-accounts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3",headers:[{level:2,title:"Setting up for Borsh Serialization",slug:"setting-up-for-borsh-serialization",children:[]},{level:2,title:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u547D\u4EE4\u30C7\u30FC\u30BF\u3092\u30B7\u30EA\u30A2\u30EB\u5316\u3059\u308B\u65B9\u6CD5",slug:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3066\u3099\u547D\u4EE4\u30C6\u3099\u30FC\u30BF\u3092\u30B7\u30EA\u30A2\u30EB\u5316\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u3092\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u547D\u4EE4\u30C6\u3099\u30FC\u30BF\u3092\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30B9\u3099\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u3092\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u547D\u4EE4\u30C6\u3099\u30FC\u30BF\u3092\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30B9\u3099\u3059\u308B\u65B9\u6CD5-1",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3/\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3",slug:"\u30B7\u30EA\u30A2\u30E9\u30A4\u30BB\u3099\u30FC\u30B7\u30E7\u30F3-\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30BB\u3099\u30FC\u30B7\u30E7\u30F3",children:[]},{level:3,title:"\u4F7F\u7528\u65B9\u6CD5",slug:"\u4F7F\u7528\u65B9\u6CD5",children:[]}]},{level:2,title:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u30A2\u30AB\u30A6\u30F3\u30C8 \u30C7\u30FC\u30BF\u3092\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u65B9\u6CD5",slug:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3066\u3099\u30A2\u30AB\u30A6\u30F3\u30C8-\u30C6\u3099\u30FC\u30BF\u3092\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30B9\u3099\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u4E00\u822C\u7684\u306A Solana TS/JS \u30DE\u30C3\u30D4\u30F3\u30B0",slug:"\u4E00\u822C\u7684\u306A-solana-ts-js-\u30DE\u30C3\u30D2\u309A\u30F3\u30AF\u3099",children:[]},{level:2,title:"\u3088\u308A\u9AD8\u5EA6\u306A\u69CB\u9020",slug:"\u3088\u308A\u9AD8\u5EA6\u306A\u69CB\u9020",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/serialization.html",pathLocale:"/ja/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Legacy Transaction",slug:"legacy-transaction",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array of account addresses",slug:"compact-array-of-account-addresses",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions",children:[]}]},{level:2,title:"Issues with Legacy Transactions",slug:"issues-with-legacy-transactions",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Versioned Transactions: TransactionV0",slug:"versioned-transactions-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact array of address table lookups",slug:"compact-array-of-address-table-lookups",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions-1",children:[]}]},{level:2,title:"RPC Changes",slug:"rpc-changes",children:[]},{level:2,title:"Other Resources",slug:"other-resources",children:[]},{level:2,title:"References",slug:"references",children:[]}],path:"/ja/guides/versioned-transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30A2\u30AB\u30A6\u30F3\u30C8",headers:[{level:2,title:"\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9",slug:"\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u8CBB\u7528\u306E\u8A08\u7B97\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u8CBB\u7528\u306E\u8A08\u7B97\u65B9\u6CD5",children:[]},{level:2,title:"\u30B7\u30FC\u30C9\u4ED8\u304D\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",slug:"\u30B7\u30FC\u30C8\u3099\u4ED8\u304D\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"\u751F\u6210",slug:"\u751F\u6210",children:[]},{level:3,title:"\u4F5C\u6210",slug:"\u4F5C\u6210",children:[]},{level:3,title:"\u9001\u4FE1",slug:"\u9001\u4FE1",children:[]}]},{level:2,title:"PDA \u306E\u4F5C\u6210\u65B9\u6CD5",slug:"pda-\u306E\u4F5C\u6210\u65B9\u6CD5",children:[{level:3,title:"PDA\u306E\u751F\u6210",slug:"pda\u306E\u751F\u6210",children:[]},{level:3,title:"Create a PDA",slug:"create-a-pda",children:[]}]},{level:2,title:"PDA\u3067\u7F72\u540D\u3059\u308B\u65B9\u6CD5",slug:"pda\u3066\u3099\u7F72\u540D\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"program account\u306E\u53D6\u5F97\u65B9\u6CD5",slug:"program-account\u306E\u53D6\u5F97\u65B9\u6CD5",children:[]},{level:2,title:"account\u306E\u9589\u9396",slug:"account\u306E\u9589\u9396",children:[]},{level:2,title:"account\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"account\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/accounts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1",headers:[{level:2,title:"SOL\u306E\u9001\u91D1\u65B9\u6CD5",slug:"sol\u306E\u9001\u91D1\u65B9\u6CD5",children:[]},{level:2,title:"SPL-Token\u306E\u9001\u4FE1\u65B9\u6CD5",slug:"spl-token\u306E\u9001\u4FE1\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u30B3\u30B9\u30C8\u306E\u8A08\u7B97\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u30B3\u30B9\u30C8\u306E\u8A08\u7B97\u65B9\u6CD5",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3078\u306E\u30E1\u30E2\u306E\u8FFD\u52A0\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u3078\u306E\u30E1\u30E2\u306E\u8FFD\u52A0\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u8A08\u7B97\u4E88\u7B97\u3001\u6599\u91D1\u3001\u304A\u3088\u3073\u512A\u5148\u5EA6\u3092\u5909\u66F4\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u8A08\u7B97\u4E88\u7B97\u3001\u6599\u91D1\u3001\u304A\u3088\u3072\u3099\u512A\u5148\u5EA6\u3092\u5909\u66F4\u3059\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/basic-transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8",headers:[{level:2,title:"\u65B0\u3057\u3044\u30AD\u30FC\u30DA\u30A2\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30AD\u30FC\u30DA\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304B\u3099\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3068\u3099\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D0\u30CB\u30C6\u30A3\u30A2\u30C9\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CF\u3099\u30CB\u30C6\u30A3\u30A2\u30C8\u3099\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/ja/references/keypairs-and-wallets.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30ED\u30FC\u30AB\u30EB\u958B\u767A",headers:[{level:2,title:"\u30ED\u30FC\u30AB\u30EB\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306E\u958B\u59CB",slug:"\u30ED\u30FC\u30AB\u30EB\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306E\u958B\u59CB",children:[]},{level:2,title:"\u74B0\u5883\u3078\u306E\u63A5\u7D9A",slug:"\u74B0\u5883\u3078\u306E\u63A5\u7D9A",children:[]},{level:2,title:"\u30A4\u30D9\u30F3\u30C8\u306E\u30B5\u30D6\u30B9\u30AF\u30E9\u30A4\u30D6",slug:"\u30A4\u30D8\u3099\u30F3\u30C8\u306E\u30B5\u30D5\u3099\u30B9\u30AF\u30E9\u30A4\u30D5\u3099",children:[]},{level:2,title:"\u30C6\u30B9\u30C8SOL\u306E\u53D6\u5F97",slug:"\u30C6\u30B9\u30C8sol\u306E\u53D6\u5F97",children:[]},{level:2,title:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F7F\u7528",slug:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u4F7F\u7528",children:[{level:3,title:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u65B9\u6CD5",slug:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30ED\u30FC\u30C8\u3099\u3059\u308B\u65B9\u6CD5",children:[]},{level:3,title:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30ED\u30FC\u30C9\u3059\u308B\u65B9\u6CD5",slug:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3092\u30ED\u30FC\u30C8\u3099\u3059\u308B\u65B9\u6CD5",children:[]}]}],path:"/ja/references/local-development.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9",headers:[{level:2,title:"\u30CD\u30FC\u30E0\u30EC\u30B8\u30B9\u30C8\u30EA",slug:"\u30CD\u30FC\u30E0\u30EC\u30B7\u3099\u30B9\u30C8\u30EA",children:[]},{level:2,title:"SOL\u30C9\u30E1\u30A4\u30F3\u306E\u89E3\u6C7A",slug:"sol\u30C8\u3099\u30E1\u30A4\u30F3\u306E\u89E3\u6C7A",children:[]},{level:2,title:"\u9006\u5F15\u304D",slug:"\u9006\u5F15\u304D",children:[]},{level:2,title:"\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\u306E\u691C\u7D22",slug:"\u30B5\u30D5\u3099\u30C8\u3099\u30E1\u30A4\u30F3\u306E\u691C\u7D22",children:[]},{level:2,title:"\u516C\u958B\u9375\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30C9\u30E1\u30A4\u30F3\u540D\u3092\u898B\u3064\u3051\u308B",slug:"\u516C\u958B\u9375\u304B\u3099\u6240\u6709\u3059\u308B\u3059\u3078\u3099\u3066\u306E\u30C8\u3099\u30E1\u30A4\u30F3\u540D\u3092\u898B\u3064\u3051\u308B",children:[]},{level:2,title:"Twitter handle\u3092\u89E3\u6C7A\u3059\u308B",slug:"twitter-handle\u3092\u89E3\u6C7A\u3059\u308B",children:[]},{level:2,title:"Twitter handle\u306E\u9006\u5F15\u304D",slug:"twitter-handle\u306E\u9006\u5F15\u304D",children:[]}],path:"/ja/references/name-service.html",pathLocale:"/ja/",extraFields:[]},{title:"NFT",headers:[{level:2,title:"NFT \u306E\u4F5C\u6210\u65B9\u6CD5",slug:"nft-\u306E\u4F5C\u6210\u65B9\u6CD5",children:[{level:3,title:"Arweave\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",slug:"arweave\u306B\u30A2\u30C3\u30D5\u309A\u30ED\u30FC\u30C8\u3099",children:[]},{level:3,title:"NFT\u3092\u30DF\u30F3\u30C8",slug:"nft\u3092\u30DF\u30F3\u30C8",children:[]}]},{level:2,title:"NFT\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\u65B9\u6CD5",slug:"nft\u30E1\u30BF\u30C6\u3099\u30FC\u30BF\u306E\u53D6\u5F97\u65B9\u6CD5",children:[]},{level:2,title:"NFT\u306E\u6240\u6709\u8005\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"nft\u306E\u6240\u6709\u8005\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"NFT\u30DF\u30F3\u30C8\u30A2\u30C9\u30EC\u30B9\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"nft\u30DF\u30F3\u30C8\u30A2\u30C8\u3099\u30EC\u30B9\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u304B\u3089\u3059\u3079\u3066\u306E NFT \u3092\u53D6\u5F97\u3059\u308B\u306B\u306F\uFF1F",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u304B\u3089\u3059\u3078\u3099\u3066\u306E-nft-\u3092\u53D6\u5F97\u3059\u308B\u306B\u306F",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Candy Machine\u306E\u4F5C\u6210\u65B9\u6CD5",slug:"candy-machine\u306E\u4F5C\u6210\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u306E\u524A\u9664\u65B9\u6CD5",slug:"candy-machine\u306E\u524A\u9664\u65B9\u6CD5",children:[]},{level:3,title:"authority\u3092\u4ECB\u3057\u3066Candy Machine\u3092\u63A2\u3059\u65B9\u6CD5",slug:"authority\u3092\u4ECB\u3057\u3066candy-machine\u3092\u63A2\u3059\u65B9\u6CD5",children:[]},{level:3,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066Candy Machine\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C8\u3099\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066candy-machine\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",children:[]},{level:3,title:"\u30A2\u30C9\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066Candy Machine\u3092\u63A2\u3059\u65B9\u6CD5",slug:"\u30A2\u30C8\u3099\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066candy-machine\u3092\u63A2\u3059\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u304B\u3089\u30DF\u30F3\u30C8\u3055\u308C\u305FNFT\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",slug:"candy-machine\u304B\u3089\u30DF\u30F3\u30C8\u3055\u308C\u305Fnft\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u306B\u30A2\u30A4\u30C6\u30E0\u3092\u633F\u5165\u3059\u308B\u65B9\u6CD5",slug:"candy-machine\u306B\u30A2\u30A4\u30C6\u30E0\u3092\u633F\u5165\u3059\u308B\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u304B\u3089NFT\u3092\u30DF\u30F3\u30C8\u3059\u308B\u65B9\u6CD5",slug:"candy-machine\u304B\u3089nft\u3092\u30DF\u30F3\u30C8\u3059\u308B\u65B9\u6CD5",children:[]}]}],path:"/ja/references/nfts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1",headers:[{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D",children:[]},{level:2,title:"\u90E8\u5206\u7F72\u540D\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3",slug:"\u90E8\u5206\u7F72\u540D\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3",children:[]},{level:2,title:"\u8010\u4E45\u6027\u306E\u3042\u308B\u30CA\u30F3\u30B9",slug:"\u8010\u4E45\u6027\u306E\u3042\u308B\u30CA\u30F3\u30B9",children:[{level:3,title:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97",slug:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97",children:[]},{level:3,title:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97",slug:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97-1",children:[]},{level:3,title:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F7F\u7528",slug:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F7F\u7528",children:[]}]}],path:"/ja/references/offline-transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F5C\u6210",headers:[{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u3067SOL\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099sol\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u3067clock\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099clock\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u3057\u3066Clock\u3092\u6E21\u3059",slug:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u3057\u3066clock\u3092\u6E21\u3059",children:[]},{level:3,title:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u3067Clock\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B",slug:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u3066\u3099clock\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B",children:[]}]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30B5\u30A4\u30BA\u306E\u5909\u66F4\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30B5\u30A4\u30B9\u3099\u306E\u5909\u66F4\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u540C\u58EB\u306E\u547C\u3073\u51FA\u3057\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u540C\u58EB\u306E\u547C\u3072\u3099\u51FA\u3057\u65B9\u6CD5",children:[]},{level:2,title:"PDA\u306E\u4F5C\u6210\u65B9\u6CD5",slug:"pda\u306E\u4F5C\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u65B9\u6CD5",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304B\u3089\u8907\u6570\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u304B\u3089\u8907\u6570\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/programs.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30B9\u30C6\u30FC\u30AD\u30F3\u30B0",headers:[{level:2,title:"\u73FE\u5728\u306E\u30D0\u30EA\u30C7\u30FC\u30BF\u3092\u53D6\u5F97",slug:"\u73FE\u5728\u306E\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u3092\u53D6\u5F97",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210",slug:"\u30B9\u30C6\u30FC\u30AF\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u306E\u59D4\u4EFB",slug:"\u30B9\u30C6\u30FC\u30AF\u306E\u59D4\u4EFB",children:[]},{level:2,title:"\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u3088\u308B\u30C7\u30EA\u30B2\u30FC\u30BF\u30FC\u306E\u53D6\u5F97",slug:"\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306B\u3088\u308B\u30C6\u3099\u30EA\u30B1\u3099\u30FC\u30BF\u30FC\u306E\u53D6\u5F97",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u3092\u7121\u52B9\u306B\u3059\u308B",slug:"\u30B9\u30C6\u30FC\u30AF\u3092\u7121\u52B9\u306B\u3059\u308B",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u3092\u5F15\u304D\u51FA\u3059",slug:"\u30B9\u30C6\u30FC\u30AF\u3092\u5F15\u304D\u51FA\u3059",children:[]}],path:"/ja/references/staking.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u306E\u5BFE\u8A71",headers:[{level:2,title:"SPL-Tokens \u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304C\u5FC5\u8981\u3067\u3059\u304B\uFF1F",slug:"spl-tokens-\u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304B\u3099\u5FC5\u8981\u3066\u3099\u3059\u304B",children:[]},{level:2,title:"\u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",slug:"\u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30DF\u30F3\u30C8\u306E\u5165\u624B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30DF\u30F3\u30C8\u306E\u5165\u624B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u306E\u767A\u884C\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u306E\u767A\u884C\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u306E\u8EE2\u9001\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u306E\u8EE2\u9001\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u306E\u30D0\u30FC\u30F3\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u306E\u30CF\u3099\u30FC\u30F3\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u9589\u3058\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u9589\u3057\u3099\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u307E\u305F\u306Fmint\u306B\u6A29\u9650\u3092\u8A2D\u5B9A\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u307E\u305F\u306Fmint\u306B\u6A29\u9650\u3092\u8A2D\u5B9A\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30C7\u30EA\u30B2\u30FC\u30C8\u3092\u627F\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30C6\u3099\u30EA\u30B1\u3099\u30FC\u30C8\u3092\u627F\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30C7\u30EA\u30B2\u30FC\u30C8\u3092\u53D6\u308A\u6D88\u3059\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30C6\u3099\u30EA\u30B1\u3099\u30FC\u30C8\u3092\u53D6\u308A\u6D88\u3059\u65B9\u6CD5",children:[]},{level:2,title:"wrapped SOL\u306E\u7BA1\u7406\u65B9\u6CD5",slug:"wrapped-sol\u306E\u7BA1\u7406\u65B9\u6CD5",children:[{level:3,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B",children:[]},{level:3,title:"\u6B8B\u9AD8\u306E\u8FFD\u52A0",slug:"\u6B8B\u9AD8\u306E\u8FFD\u52A0",children:[]}]},{level:2,title:"\u6240\u6709\u8005\u3054\u3068\u306E\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"\u6240\u6709\u8005\u3053\u3099\u3068\u306E\u3059\u3078\u3099\u3066\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/token.html",pathLocale:"/ja/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/kr/core-concepts/accounts.html",pathLocale:"/kr/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interacting with PDAs",slug:"interacting-with-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/core-concepts/pdas.html",pathLocale:"/kr/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/core-concepts/programs.html",pathLocale:"/kr/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Fees",slug:"fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/core-concepts/transactions.html",pathLocale:"/kr/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/kr/getting-started/installation.html",pathLocale:"/kr/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/kr/guides/account-maps.html",pathLocale:"/kr/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"How can you migrate a program's data accounts?",slug:"how-can-you-migrate-a-program-s-data-accounts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Upgrading the Account",slug:"upgrading-the-account",children:[{level:3,title:"1. Add account conversion logic",slug:"_1-add-account-conversion-logic",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/data-migration.html",pathLocale:"/kr/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Runtime Testing and Debugging in editor",slug:"runtime-testing-and-debugging-in-editor",children:[]},{level:2,title:"Local Validator Node Testing in editor",slug:"local-validator-node-testing-in-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/debugging-solana-programs.html",pathLocale:"/kr/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parity Testing",slug:"parity-testing",children:[]},{level:2,title:"Simple Demonstration",slug:"simple-demonstration",children:[{level:3,title:"All features activated",slug:"all-features-activated",children:[]},{level:3,title:"Selective features deactivated",slug:"selective-features-deactivated",children:[]}]},{level:2,title:"Full Parity Testing",slug:"full-parity-testing",children:[]},{level:2,title:"Full Parity Testing Programmatically",slug:"full-parity-testing-programmatically",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/feature-parity-testing.html",pathLocale:"/kr/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/guides/get-program-accounts.html",pathLocale:"/kr/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"Setting up for Borsh Serialization",slug:"setting-up-for-borsh-serialization",children:[]},{level:2,title:"How to serialize instruction data on the client",slug:"how-to-serialize-instruction-data-on-the-client",children:[]},{level:2,title:"How to deserialize instruction data on the program",slug:"how-to-deserialize-instruction-data-on-the-program",children:[]},{level:2,title:"How to serialize account data on the program",slug:"how-to-serialize-account-data-on-the-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"How to deserialize account data on the client",slug:"how-to-deserialize-account-data-on-the-client",children:[]},{level:2,title:"Common Solana TS/JS Mappings",slug:"common-solana-ts-js-mappings",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/serialization.html",pathLocale:"/kr/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"How to create a system account",slug:"how-to-create-a-system-account",children:[]},{level:2,title:"How to calculate account cost",slug:"how-to-calculate-account-cost",children:[]},{level:2,title:"How to create accounts with seeds",slug:"how-to-create-accounts-with-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"How to create PDAs",slug:"how-to-create-pdas",children:[{level:3,title:"Generate a PDA",slug:"generate-a-pda",children:[]},{level:3,title:"Create a PDA",slug:"create-a-pda",children:[]}]},{level:2,title:"How to sign with a PDA",slug:"how-to-sign-with-a-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"How to get program accounts",slug:"how-to-get-program-accounts",children:[]},{level:2,title:"How to close accounts",slug:"how-to-close-accounts",children:[]},{level:2,title:"How to get account balance",slug:"how-to-get-account-balance",children:[]}],path:"/kr/references/accounts.html",pathLocale:"/kr/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"How to send SOL",slug:"how-to-send-sol",children:[]},{level:2,title:"How to send SPL-Tokens",slug:"how-to-send-spl-tokens",children:[]},{level:2,title:"How to calculate transaction cost",slug:"how-to-calculate-transaction-cost",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"How to add a memo to a transaction",slug:"how-to-add-a-memo-to-a-transaction",children:[]},{level:2,title:"How to change compute budget, fee, & priority for a transaction",slug:"how-to-change-compute-budget-fee-priority-for-a-transaction",children:[]}],path:"/kr/references/basic-transactions.html",pathLocale:"/kr/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/kr/references/keypairs-and-wallets.html",pathLocale:"/kr/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Starting a Local Validator",slug:"starting-a-local-validator",children:[]},{level:2,title:"Connecting to Environments",slug:"connecting-to-environments",children:[]},{level:2,title:"Subscribing to Events",slug:"subscribing-to-events",children:[]},{level:2,title:"Getting Test SOL",slug:"getting-test-sol",children:[]},{level:2,title:"Using Mainnet Accounts and Programs",slug:"using-mainnet-accounts-and-programs",children:[{level:3,title:"How to load accounts from mainnet",slug:"how-to-load-accounts-from-mainnet",children:[]},{level:3,title:"How to load programs from mainnet",slug:"how-to-load-programs-from-mainnet",children:[]}]}],path:"/kr/references/local-development.html",pathLocale:"/kr/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"Find all the domain names owned by a public key",slug:"find-all-the-domain-names-owned-by-a-public-key",children:[]},{level:2,title:"Resolve a Twitter handle",slug:"resolve-a-twitter-handle",children:[]},{level:2,title:"Reverse look up of a Twitter handle",slug:"reverse-look-up-of-a-twitter-handle",children:[]}],path:"/kr/references/name-service.html",pathLocale:"/kr/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"How to create an NFT",slug:"how-to-create-an-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint the NFT",slug:"mint-the-nft",children:[]}]},{level:2,title:"How to get NFT Metadata",slug:"how-to-get-nft-metadata",children:[]},{level:2,title:"How to get the owner of an NFT",slug:"how-to-get-the-owner-of-an-nft",children:[]},{level:2,title:"How to get NFT Mint Addresses",slug:"how-to-get-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"How to get all NFTs from a wallet?",slug:"how-to-get-all-nfts-from-a-wallet",children:[]}],path:"/kr/references/nfts.html",pathLocale:"/kr/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Sign Transaction",slug:"sign-transaction",children:[]},{level:2,title:"Partial Sign Transaction",slug:"partial-sign-transaction",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Create Nonce Account",slug:"create-nonce-account",children:[]},{level:3,title:"Get Nonce Account",slug:"get-nonce-account",children:[]},{level:3,title:"Use Nonce Account",slug:"use-nonce-account",children:[]}]}],path:"/kr/references/offline-transactions.html",pathLocale:"/kr/",extraFields:[]},{title:"Writing Programs",headers:[{level:2,title:"How to transfer SOL in a program",slug:"how-to-transfer-sol-in-a-program",children:[]},{level:2,title:"How to get clock in a program",slug:"how-to-get-clock-in-a-program",children:[{level:3,title:"Passing Clock as an account inside an instruction",slug:"passing-clock-as-an-account-inside-an-instruction",children:[]},{level:3,title:"Accessing Clock directly inside an instruction",slug:"accessing-clock-directly-inside-an-instruction",children:[]}]},{level:2,title:"How to change account size",slug:"how-to-change-account-size",children:[]},{level:2,title:"How to do Cross Program Invocation",slug:"how-to-do-cross-program-invocation",children:[]},{level:2,title:"How to create a PDA",slug:"how-to-create-a-pda",children:[]},{level:2,title:"How to read accounts",slug:"how-to-read-accounts",children:[]},{level:2,title:"How to verify accounts",slug:"how-to-verify-accounts",children:[]},{level:2,title:"How to read multiple instructions from a transaction",slug:"how-to-read-multiple-instructions-from-a-transaction",children:[]}],path:"/kr/references/programs.html",pathLocale:"/kr/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Get Current Validators",slug:"get-current-validators",children:[]},{level:2,title:"Create Stake Account",slug:"create-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"Get Delegator by Validators",slug:"get-delegator-by-validators",children:[]},{level:2,title:"Deactivate Stake",slug:"deactivate-stake",children:[]},{level:2,title:"Withdraw Stake",slug:"withdraw-stake",children:[]}],path:"/kr/references/staking.html",pathLocale:"/kr/",extraFields:[]},{title:"Interacting with Tokens",headers:[{level:2,title:"What do I need to get started with SPL-Tokens?",slug:"what-do-i-need-to-get-started-with-spl-tokens",children:[]},{level:2,title:"How to create a new Token",slug:"how-to-create-a-new-token",children:[]},{level:2,title:"How to get a token mint",slug:"how-to-get-a-token-mint",children:[]},{level:2,title:"How to create a token account",slug:"how-to-create-a-token-account",children:[]},{level:2,title:"How to get a Token Account",slug:"how-to-get-a-token-account",children:[]},{level:2,title:"How to get a token account's balance",slug:"how-to-get-a-token-account-s-balance",children:[]},{level:2,title:"How to mint tokens",slug:"how-to-mint-tokens",children:[]},{level:2,title:"How to transfer tokens",slug:"how-to-transfer-tokens",children:[]},{level:2,title:"How to burn tokens",slug:"how-to-burn-tokens",children:[]},{level:2,title:"How to close token accounts",slug:"how-to-close-token-accounts",children:[]},{level:2,title:"How to set authority on token accounts or mints",slug:"how-to-set-authority-on-token-accounts-or-mints",children:[]},{level:2,title:"How to approve a token delegate",slug:"how-to-approve-a-token-delegate",children:[]},{level:2,title:"How to revoke a token delegate",slug:"how-to-revoke-a-token-delegate",children:[]},{level:2,title:"How to manage wrapped SOL",slug:"how-to-manage-wrapped-sol",children:[{level:3,title:"Create Token Account",slug:"create-token-account",children:[]},{level:3,title:"Add Balance",slug:"add-balance",children:[]}]},{level:2,title:"How to get all token accounts by owner",slug:"how-to-get-all-token-accounts-by-owner",children:[]}],path:"/kr/references/token.html",pathLocale:"/kr/",extraFields:[]},{title:"Contas",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Modelo de Conta",slug:"modelo-de-conta",children:[]},{level:3,title:"Aluguel",slug:"aluguel",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[{level:3,title:"Cr\xE9ditos",slug:"creditos",children:[]}]}],path:"/pt/core-concepts/accounts.html",pathLocale:"/pt/",extraFields:[]},{title:"Invoca\xE7\xF5es de Programas Cruzados (CPIs)",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"CPI com invoke",slug:"cpi-com-invoke",children:[]},{level:3,title:"CPI com invoke_signed",slug:"cpi-com-invoke-signed",children:[]},{level:3,title:"Struct da CPI - Instruction",slug:"struct-da-cpi-instruction",children:[]},{level:3,title:"Struct da CPI - AccountInfo",slug:"struct-da-cpi-accountinfo",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/cpi.html",pathLocale:"/pt/",extraFields:[]},{title:"Endere\xE7os Derivados de Programa (PDAs)",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Gerando PDAs",slug:"gerando-pdas",children:[]},{level:3,title:"Interagindo com PDAs",slug:"interagindo-com-pdas",children:[]}]},{level:2,title:"Outros recursos:",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/pdas.html",pathLocale:"/pt/",extraFields:[]},{title:"Programas",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Programas Nativos & Biblioteca de Programas da Solana (Solana Program Library, ou SPL)",slug:"programas-nativos-biblioteca-de-programas-da-solana-solana-program-library-ou-spl",children:[]},{level:3,title:"Escrevendo Programas",slug:"escrevendo-programas",children:[]},{level:3,title:"Implantando Programas",slug:"implantando-programas",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/programs.html",pathLocale:"/pt/",extraFields:[]},{title:"Transa\xE7\xF5es",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Taxas",slug:"taxas",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Instala\xE7\xE3o",headers:[{level:2,title:"Instale o Web3.js",slug:"instale-o-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instale o Rust",slug:"instale-o-rust",children:[]},{level:2,title:"Instale a CLI",slug:"instale-a-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compila\xE7\xE3o a Partir do C\xF3digo-Fonte",slug:"compilacao-a-partir-do-codigo-fonte",children:[]}]}],path:"/pt/getting-started/installation.html",pathLocale:"/pt/",extraFields:[]},{title:"Mapeamentos de Conta",headers:[{level:2,title:"Derivando PDAs",slug:"derivando-pdas",children:[]},{level:2,title:"Conta \xDAnica de Mapeamento",slug:"conta-unica-de-mapeamento",children:[]}],path:"/pt/guides/account-maps.html",pathLocale:"/pt/",extraFields:[]},{title:"Migrando Contas de Dados do Programa",headers:[{level:2,title:"Como voc\xEA pode migrar as contas de dados de um programa?",slug:"como-voce-pode-migrar-as-contas-de-dados-de-um-programa",children:[]},{level:2,title:"Cen\xE1rio",slug:"cenario",children:[]},{level:2,title:"Atualizando a conta",slug:"atualizando-a-conta",children:[{level:3,title:"1. Adicionar l\xF3gica de convers\xE3o de conta",slug:"_1-adicionar-logica-de-conversao-de-conta",children:[]}]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/pt/guides/data-migration.html",pathLocale:"/pt/",extraFields:[]},{title:"Depurando Programas da Solana",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Testes de Tempo de Execu\xE7\xE3o e Depura\xE7\xE3o no Editor",slug:"testes-de-tempo-de-execucao-e-depuracao-no-editor",children:[]},{level:2,title:"Teste de N\xF3 Validador Local no Editor",slug:"teste-de-no-validador-local-no-editor",children:[]},{level:2,title:"Teste de N\xF3 Validador Local a partir de Aplicativos Cliente",slug:"teste-de-no-validador-local-a-partir-de-aplicativos-cliente",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/pt/guides/debugging-solana-programs.html",pathLocale:"/pt/",extraFields:[]},{title:"Teste de Paridade de Recursos",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Cen\xE1rio",slug:"cenario",children:[]},{level:2,title:"Status do Recurso",slug:"status-do-recurso",children:[]},{level:2,title:"Teste de Paridade",slug:"teste-de-paridade",children:[]},{level:2,title:"Demonstra\xE7\xE3o Simples",slug:"demonstracao-simples",children:[{level:3,title:"Todos os recursos ativados",slug:"todos-os-recursos-ativados",children:[]},{level:3,title:"Recursos seletivos desativados",slug:"recursos-seletivos-desativados",children:[]}]},{level:2,title:"Teste de Paridade Total",slug:"teste-de-paridade-total",children:[]},{level:2,title:"Teste de Paridade Total Program\xE1tica",slug:"teste-de-paridade-total-programatica",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/pt/guides/feature-parity-testing.html",pathLocale:"/pt/",extraFields:[]},{title:"Obter Contas do Programa",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Outros recursos",slug:"outros-recursos",children:[]}],path:"/pt/guides/get-program-accounts.html",pathLocale:"/pt/",extraFields:[]},{title:"Serializando Dados",headers:[{level:2,title:"Configurando a Serializa\xE7\xE3o com o Borsh",slug:"configurando-a-serializacao-com-o-borsh",children:[]},{level:2,title:"Como serializar dados de instru\xE7\xE3o no cliente",slug:"como-serializar-dados-de-instrucao-no-cliente",children:[]},{level:2,title:"Como desserializar dados de instru\xE7\xE3o no programa",slug:"como-desserializar-dados-de-instrucao-no-programa",children:[]},{level:2,title:"Como serializar os dados da conta no programa",slug:"como-serializar-os-dados-da-conta-no-programa",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serializa\xE7\xE3o/Desserializa\xE7\xE3o",slug:"serializacao-desserializacao",children:[]},{level:3,title:"Utiliza\xE7\xE3o",slug:"utilizacao",children:[]}]},{level:2,title:"Como desserializar dados da conta no cliente",slug:"como-desserializar-dados-da-conta-no-cliente",children:[]},{level:2,title:"Mapeamentos comuns da Solana em TypeScript/JavaScript",slug:"mapeamentos-comuns-da-solana-em-typescript-javascript",children:[]},{level:2,title:"Constru\xE7\xF5es avan\xE7adas",slug:"construcoes-avancadas",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/pt/guides/serialization.html",pathLocale:"/pt/",extraFields:[]},{title:"Transa\xE7\xF5es Versionadas",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Transa\xE7\xE3o Legada",slug:"transacao-legada",children:[]},{level:2,title:"Mensagem Legada",slug:"mensagem-legada",children:[{level:3,title:"Cabe\xE7alho",slug:"cabecalho",children:[]},{level:3,title:"Array compacto de endere\xE7os de conta",slug:"array-compacto-de-enderecos-de-conta",children:[]},{level:3,title:"Array compacto de instru\xE7\xF5es",slug:"array-compacto-de-instrucoes",children:[]}]},{level:2,title:"Problemas com as Transa\xE7\xF5es Legadas",slug:"problemas-com-as-transacoes-legadas",children:[]},{level:2,title:"Tabelas de Pesquisa de Endere\xE7os (LUT)",slug:"tabelas-de-pesquisa-de-enderecos-lut",children:[]},{level:2,title:"Transa\xE7\xF5es Versionadas: Transa\xE7\xE3o V0 (TransactionV0)",slug:"transacoes-versionadas-transacao-v0-transactionv0",children:[]},{level:2,title:"Mensagem V0 (MessageV0)",slug:"mensagem-v0-messagev0",children:[{level:3,title:"Array compacto de pesquisas na tabela de endere\xE7os",slug:"array-compacto-de-pesquisas-na-tabela-de-enderecos",children:[]},{level:3,title:"Array compacto de instru\xE7\xF5es",slug:"array-compacto-de-instrucoes-1",children:[]}]},{level:2,title:"Mudan\xE7as na RPC",slug:"mudancas-na-rpc",children:[]},{level:2,title:"Outros recursos",slug:"outros-recursos",children:[]},{level:2,title:"Refer\xEAncias",slug:"referencias",children:[]}],path:"/pt/guides/versioned-transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Contas",headers:[{level:2,title:"Como criar uma conta do sistema",slug:"como-criar-uma-conta-do-sistema",children:[]},{level:2,title:"Como calcular o custo da conta",slug:"como-calcular-o-custo-da-conta",children:[]},{level:2,title:"Como criar contas com sementes",slug:"como-criar-contas-com-sementes",children:[{level:3,title:"Gere",slug:"gere",children:[]},{level:3,title:"Crie",slug:"crie",children:[]},{level:3,title:"Transfira",slug:"transfira",children:[]}]},{level:2,title:"Como criar PDAs",slug:"como-criar-pdas",children:[{level:3,title:"Gerando um PDA",slug:"gerando-um-pda",children:[]},{level:3,title:"Criando um PDA",slug:"criando-um-pda",children:[]}]},{level:2,title:"Como assinar com um PDA",slug:"como-assinar-com-um-pda",children:[{level:3,title:"Programa",slug:"programa-1",children:[]},{level:3,title:"Cliente",slug:"cliente-1",children:[]}]},{level:2,title:"Como obter contas de programa",slug:"como-obter-contas-de-programa",children:[]},{level:2,title:"Como encerrar contas",slug:"como-encerrar-contas",children:[]},{level:2,title:"Como obter o saldo da conta",slug:"como-obter-o-saldo-da-conta",children:[]}],path:"/pt/references/accounts.html",pathLocale:"/pt/",extraFields:[]},{title:"Enviando Transa\xE7\xF5es",headers:[{level:2,title:"Como enviar SOL",slug:"como-enviar-sol",children:[]},{level:2,title:"Como enviar Tokens SPL",slug:"como-enviar-tokens-spl",children:[]},{level:2,title:"Como calcular o custo da transa\xE7\xE3o",slug:"como-calcular-o-custo-da-transacao",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Como adicionar uma observa\xE7\xE3o em uma transa\xE7\xE3o",slug:"como-adicionar-uma-observacao-em-uma-transacao",children:[]},{level:2,title:"Como alterar o or\xE7amento de computa\xE7\xE3o, taxa e prioridade para uma transa\xE7\xE3o",slug:"como-alterar-o-orcamento-de-computacao-taxa-e-prioridade-para-uma-transacao",children:[]}],path:"/pt/references/basic-transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Pares de Chaves e Carteiras",headers:[{level:2,title:"Como gerar um novo Par de Chaves (Keypair)",slug:"como-gerar-um-novo-par-de-chaves-keypair",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma senha",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-senha",children:[]},{level:2,title:"Como verificar um Par de Chaves",slug:"como-verificar-um-par-de-chaves",children:[]},{level:2,title:"Como verificar se uma chave p\xFAblica tem uma chave privada associada",slug:"como-verificar-se-uma-chave-publica-tem-uma-chave-privada-associada",children:[]},{level:2,title:"Como gerar uma frase mnem\xF4nica",slug:"como-gerar-uma-frase-mnemonica",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma frase mnem\xF4nica",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-frase-mnemonica",children:[]},{level:2,title:"Como gerar um endere\xE7o personalizado",slug:"como-gerar-um-endereco-personalizado",children:[]},{level:2,title:"Como assinar e verificar mensagens com carteiras",slug:"como-assinar-e-verificar-mensagens-com-carteiras",children:[]},{level:2,title:"Como se conectar a uma carteira",slug:"como-se-conectar-a-uma-carteira",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/pt/references/keypairs-and-wallets.html",pathLocale:"/pt/",extraFields:[]},{title:"Desenvolvimento Local",headers:[{level:2,title:"Inicializando um Validador Local",slug:"inicializando-um-validador-local",children:[]},{level:2,title:"Conectando a Ambientes",slug:"conectando-a-ambientes",children:[]},{level:2,title:"Subscrevendo a Eventos",slug:"subscrevendo-a-eventos",children:[]},{level:2,title:"Obtendo SOL de Teste",slug:"obtendo-sol-de-teste",children:[]},{level:2,title:"Usando Contas e Programas Da Mainnet",slug:"usando-contas-e-programas-da-mainnet",children:[{level:3,title:"Como carregar contas da mainnet",slug:"como-carregar-contas-da-mainnet",children:[]},{level:3,title:"Como carregar programas da mainnet",slug:"como-carregar-programas-da-mainnet",children:[]}]}],path:"/pt/references/local-development.html",pathLocale:"/pt/",extraFields:[]},{title:"Servi\xE7o de Nomes",headers:[{level:2,title:"Registro de Nomes",slug:"registro-de-nomes",children:[]},{level:2,title:"Resolvendo dom\xEDnios SOL",slug:"resolvendo-dominios-sol",children:[]},{level:2,title:"Busca Reversa",slug:"busca-reversa",children:[]},{level:2,title:"Busca do Subdom\xEDnio",slug:"busca-do-subdominio",children:[]},{level:2,title:"Encontrar todos os nomes de dom\xEDnio de propriedade de uma chave p\xFAblica",slug:"encontrar-todos-os-nomes-de-dominio-de-propriedade-de-uma-chave-publica",children:[]},{level:2,title:"Resolver um identificador do Twitter",slug:"resolver-um-identificador-do-twitter",children:[]},{level:2,title:"Busca reversa de um identificador do Twitter",slug:"busca-reversa-de-um-identificador-do-twitter",children:[]}],path:"/pt/references/name-service.html",pathLocale:"/pt/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"Como criar um NFT",slug:"como-criar-um-nft",children:[{level:3,title:"Carregar para o Arweave",slug:"carregar-para-o-arweave",children:[]},{level:3,title:"Cunhar o NFT",slug:"cunhar-o-nft",children:[]}]},{level:2,title:"Como obter os metadados do NFT",slug:"como-obter-os-metadados-do-nft",children:[]},{level:2,title:"Como obter o propriet\xE1rio de um NFT",slug:"como-obter-o-proprietario-de-um-nft",children:[]},{level:2,title:"Como obter endere\xE7os de cunhagem de NFT",slug:"como-obter-enderecos-de-cunhagem-de-nft",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Como obter todos os NFTs de uma carteira?",slug:"como-obter-todos-os-nfts-de-uma-carteira",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Como criar uma Candy Machine",slug:"como-criar-uma-candy-machine",children:[]},{level:3,title:"Como excluir uma Candy Machine",slug:"como-excluir-uma-candy-machine",children:[]},{level:3,title:"Como encontrar a Candy Machine por meio de autoridade",slug:"como-encontrar-a-candy-machine-por-meio-de-autoridade",children:[]},{level:3,title:"Como encontrar a Candy Machine usando o endere\xE7o da carteira",slug:"como-encontrar-a-candy-machine-usando-o-endereco-da-carteira",children:[]},{level:3,title:"Como encontrar a Candy Machine usando seu endere\xE7o",slug:"como-encontrar-a-candy-machine-usando-seu-endereco",children:[]},{level:3,title:"Como encontrar NFTs cunhados pela Candy Machine",slug:"como-encontrar-nfts-cunhados-pela-candy-machine",children:[]},{level:3,title:"Como inserir itens em uma Candy Machine",slug:"como-inserir-itens-em-uma-candy-machine",children:[]},{level:3,title:"Como cunhar um NFT a partir de uma Candy Machine",slug:"como-cunhar-um-nft-a-partir-de-uma-candy-machine",children:[]}]}],path:"/pt/references/nfts.html",pathLocale:"/pt/",extraFields:[]},{title:"Enviando Transa\xE7\xF5es Offline",headers:[{level:2,title:"Assinatura de Transa\xE7\xE3o",slug:"assinatura-de-transacao",children:[]},{level:2,title:"Assinatura Parcial de Transa\xE7\xE3o",slug:"assinatura-parcial-de-transacao",children:[]},{level:2,title:"Nonce Dur\xE1vel",slug:"nonce-duravel",children:[{level:3,title:"Criar Conta de Nonce",slug:"criar-conta-de-nonce",children:[]},{level:3,title:"Obter Conta de Nonce",slug:"obter-conta-de-nonce",children:[]},{level:3,title:"Usar Conta de Nonce",slug:"usar-conta-de-nonce",children:[]}]}],path:"/pt/references/offline-transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Escrevendo Programas",headers:[{level:2,title:"Como transferir SOL em um programa",slug:"como-transferir-sol-em-um-programa",children:[]},{level:2,title:"Como obter o rel\xF3gio (clock) em um programa",slug:"como-obter-o-relogio-clock-em-um-programa",children:[{level:3,title:"Passando o Rel\xF3gio como uma conta dentro de uma instru\xE7\xE3o",slug:"passando-o-relogio-como-uma-conta-dentro-de-uma-instrucao",children:[]},{level:3,title:"Acessando o Rel\xF3gio diretamente dentro de uma instru\xE7\xE3o",slug:"acessando-o-relogio-diretamente-dentro-de-uma-instrucao",children:[]}]},{level:2,title:"Como alterar o tamanho da conta",slug:"como-alterar-o-tamanho-da-conta",children:[]},{level:2,title:"Como fazer uma Invoca\xE7\xE3o de Programas Cruzados",slug:"como-fazer-uma-invocacao-de-programas-cruzados",children:[]},{level:2,title:"Como criar um PDA",slug:"como-criar-um-pda",children:[]},{level:2,title:"Como ler contas",slug:"como-ler-contas",children:[]},{level:2,title:"Como verificar contas",slug:"como-verificar-contas",children:[]},{level:2,title:"Como ler v\xE1rias instru\xE7\xF5es de uma transa\xE7\xE3o",slug:"como-ler-varias-instrucoes-de-uma-transacao",children:[]}],path:"/pt/references/programs.html",pathLocale:"/pt/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Obter Validadores Atuais",slug:"obter-validadores-atuais",children:[]},{level:2,title:"Criar Conta de Stake",slug:"criar-conta-de-stake",children:[]},{level:2,title:"Delegar Stake",slug:"delegar-stake",children:[]},{level:2,title:"Obter Delegador pelos Validadores",slug:"obter-delegador-pelos-validadores",children:[]},{level:2,title:"Desativar Stake",slug:"desativar-stake",children:[]},{level:2,title:"Sacar Stake",slug:"sacar-stake",children:[]}],path:"/pt/references/staking.html",pathLocale:"/pt/",extraFields:[]},{title:"Interagindo com Tokens",headers:[{level:2,title:"O que eu preciso para come\xE7ar com Tokens SPL?",slug:"o-que-eu-preciso-para-comecar-com-tokens-spl",children:[]},{level:2,title:"Como criar um novo Token",slug:"como-criar-um-novo-token",children:[]},{level:2,title:"Como obter uma conta de cunhagem de tokens",slug:"como-obter-uma-conta-de-cunhagem-de-tokens",children:[]},{level:2,title:"Como criar uma conta de token",slug:"como-criar-uma-conta-de-token",children:[]},{level:2,title:"Como obter uma conta de token",slug:"como-obter-uma-conta-de-token",children:[]},{level:2,title:"Como obter o saldo de uma conta de token",slug:"como-obter-o-saldo-de-uma-conta-de-token",children:[]},{level:2,title:"Como cunhar novos tokens",slug:"como-cunhar-novos-tokens",children:[]},{level:2,title:"Como transferir tokens",slug:"como-transferir-tokens",children:[]},{level:2,title:"Como queimar tokens",slug:"como-queimar-tokens",children:[]},{level:2,title:"Como encerrar contas de token",slug:"como-encerrar-contas-de-token",children:[]},{level:2,title:"Como definir autoridade em contas ou cunhagem de token",slug:"como-definir-autoridade-em-contas-ou-cunhagem-de-token",children:[]},{level:2,title:"Como aprovar um delegado de token",slug:"como-aprovar-um-delegado-de-token",children:[]},{level:2,title:"Como revogar um delegado de token",slug:"como-revogar-um-delegado-de-token",children:[]},{level:2,title:"Como gerenciar o SOL encapsulado",slug:"como-gerenciar-o-sol-encapsulado",children:[{level:3,title:"Criar conta de token",slug:"criar-conta-de-token",children:[]},{level:3,title:"Adicionar saldo",slug:"adicionar-saldo",children:[]}]},{level:2,title:"Como obter todas as contas de token pelo propriet\xE1rio",slug:"como-obter-todas-as-contas-de-token-pelo-proprietario",children:[]}],path:"/pt/references/token.html",pathLocale:"/pt/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32)",slug:"rent-\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/th/core-concepts/accounts.html",pathLocale:"/th/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 PDAs",slug:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07-pdas",children:[]},{level:3,title:"\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 PDAs",slug:"\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-pdas",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/core-concepts/pdas.html",pathLocale:"/th/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"Native Programs \u0E41\u0E25\u0E30 The Solana Program Library (SPL)",slug:"native-programs-\u0E41\u0E25\u0E30-the-solana-program-library-spl",children:[]},{level:3,title:"\u0E40\u0E02\u0E35\u0E22\u0E19 Programs",slug:"\u0E40\u0E02\u0E35\u0E22\u0E19-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/core-concepts/programs.html",pathLocale:"/th/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21 (Fees)",slug:"\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21-fees",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/core-concepts/transactions.html",pathLocale:"/th/",extraFields:[]},{title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07",headers:[{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Web3.js",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Rust",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-rust",children:[]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/th/getting-started/installation.html",pathLocale:"/th/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/th/guides/account-maps.html",pathLocale:"/th/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 migrate program's data accounts \u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07?",slug:"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16-migrate-program-s-data-accounts-\u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07",children:[]},{level:2,title:"\u0E2A\u0E16\u0E32\u0E19\u0E01\u0E32\u0E23\u0E13\u0E4C (Scenario)",slug:"\u0E2A\u0E16\u0E32\u0E19\u0E01\u0E32\u0E23\u0E13\u0E4C-scenario",children:[]},{level:2,title:"Upgrading the Account",slug:"upgrading-the-account",children:[{level:3,title:"1. Add account conversion logic",slug:"_1-add-account-conversion-logic",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/data-migration.html",pathLocale:"/th/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"Runtime Testing \u0E41\u0E25\u0E30 Debugging \u0E43\u0E19 editor",slug:"runtime-testing-\u0E41\u0E25\u0E30-debugging-\u0E43\u0E19-editor",children:[]},{level:2,title:"\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22 Local Validator Node \u0E43\u0E19 editor",slug:"\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22-local-validator-node-\u0E43\u0E19-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/debugging-solana-programs.html",pathLocale:"/th/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parity Testing",slug:"parity-testing",children:[]},{level:2,title:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E07\u0E48\u0E32\u0E22\u0E46",slug:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E07\u0E48\u0E32\u0E22\u0E46",children:[{level:3,title:"\u0E40\u0E1B\u0E34\u0E14\u0E17\u0E38\u0E01 features",slug:"\u0E40\u0E1B\u0E34\u0E14\u0E17\u0E38\u0E01-features",children:[]},{level:3,title:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1B\u0E34\u0E14 features",slug:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1B\u0E34\u0E14-features",children:[]}]},{level:2,title:"Feature Parity Testing",slug:"feature-parity-testing",children:[]},{level:2,title:"Full Parity Testing Programmatically",slug:"full-parity-testing-programmatically",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/feature-parity-testing.html",pathLocale:"/th/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/guides/get-program-accounts.html",pathLocale:"/th/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Borsh Serialization",slug:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E4D\u0E32\u0E2B\u0E23\u0E31\u0E1A-borsh-serialization",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 serialize instruction data \u0E17\u0E35\u0E48 client",slug:"\u0E27\u0E34\u0E18\u0E35-serialize-instruction-data-\u0E17\u0E35\u0E48-client",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 deserialize instruction data \u0E43\u0E19 program",slug:"\u0E27\u0E34\u0E18\u0E35-deserialize-instruction-data-\u0E43\u0E19-program",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 serialize account data \u0E43\u0E19 program",slug:"\u0E27\u0E34\u0E18\u0E35-serialize-account-data-\u0E43\u0E19-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",slug:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 deserialize account data \u0E17\u0E35\u0E48 client",slug:"\u0E27\u0E34\u0E18\u0E35-deserialize-account-data-\u0E17\u0E35\u0E48-client",children:[]},{level:2,title:"Solana TS/JS Mappings \u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B",slug:"solana-ts-js-mappings-\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/serialization.html",pathLocale:"/th/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts (\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49)",slug:"facts-\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"Legacy Transaction",slug:"legacy-transaction",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array \u0E02\u0E2D\u0E07 account addresses",slug:"compact-array-\u0E02\u0E2D\u0E07-account-addresses",children:[]},{level:3,title:"Compact array \u0E02\u0E2D\u0E07 instructions",slug:"compact-array-\u0E02\u0E2D\u0E07-instructions",children:[]}]},{level:2,title:"\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07 Legacy Transactions",slug:"\u0E02\u0E49\u0E2D\u0E08\u0E4D\u0E32\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07-legacy-transactions",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Versioned Transactions: TransactionV0",slug:"versioned-transactions-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact array \u0E02\u0E2D\u0E07 address table lookups",slug:"compact-array-\u0E02\u0E2D\u0E07-address-table-lookups",children:[]},{level:3,title:"Compact array \u0E02\u0E2D\u0E07 instructions",slug:"compact-array-\u0E02\u0E2D\u0E07-instructions-1",children:[]}]},{level:2,title:"RPC Changes",slug:"rpc-changes",children:[]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19\u0E46",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19\u0E46",children:[]},{level:2,title:"\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07",slug:"\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07",children:[]}],path:"/th/guides/versioned-transactions.html",pathLocale:"/th/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 system account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-system-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E33\u0E19\u0E27\u0E13 account cost",slug:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E4D\u0E32\u0E19\u0E27\u0E13-account-cost",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 accounts \u0E14\u0E49\u0E27\u0E22 seeds",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-accounts-\u0E14\u0E49\u0E27\u0E22-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 PDAs",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-pdas",children:[{level:3,title:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 PDA",slug:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07-pda",children:[]},{level:3,title:"\u0E28\u0E23\u0E49\u0E32\u0E07 PDA",slug:"\u0E28\u0E23\u0E49\u0E32\u0E07-pda",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 sign \u0E14\u0E49\u0E27\u0E22 PDA",slug:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E14\u0E49\u0E27\u0E22-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 program accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-program-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14 accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 account balance",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-account-balance",children:[]}],path:"/th/references/accounts.html",pathLocale:"/th/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35 send SOL",slug:"\u0E27\u0E34\u0E18\u0E35-send-sol",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 send SPL-Tokens",slug:"\u0E27\u0E34\u0E18\u0E35-send-spl-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E33\u0E19\u0E27\u0E13\u0E2B\u0E32 transaction cost",slug:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E4D\u0E32\u0E19\u0E27\u0E13\u0E2B\u0E32-transaction-cost",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1E\u0E34\u0E48\u0E21 memo \u0E43\u0E19 transaction",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1E\u0E34\u0E48\u0E21-memo-\u0E43\u0E19-transaction",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 compute budget \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A transaction",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19-compute-budget-\u0E2A\u0E4D\u0E32\u0E2B\u0E23\u0E31\u0E1A-transaction",children:[]}],path:"/th/references/basic-transactions.html",pathLocale:"/th/",extraFields:[]},{title:"Keypairs \u0E41\u0E25\u0E30 Wallets",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E43\u0E2B\u0E21\u0E48",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 restore a Keypair from a secret",slug:"\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 verify a Keypair",slug:"\u0E27\u0E34\u0E18\u0E35-verify-a-keypair",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 check if a public key has an associated private key",slug:"\u0E27\u0E34\u0E18\u0E35-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49 Keypair \u0E08\u0E32\u0E01 mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49-keypair-\u0E08\u0E32\u0E01-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a vanity address",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-vanity-address",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 sign \u0E41\u0E25\u0E30 verify messages with wallets",slug:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A wallet",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/th/references/keypairs-and-wallets.html",pathLocale:"/th/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49 Local Validator",slug:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49-local-validator",children:[]},{level:2,title:"Connecting to Environments",slug:"connecting-to-environments",children:[]},{level:2,title:"Subscribing to Events",slug:"subscribing-to-events",children:[]},{level:2,title:"Getting Test SOL",slug:"getting-test-sol",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49 Mainnet Accounts \u0E41\u0E25\u0E30 Programs",slug:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49-mainnet-accounts-\u0E41\u0E25\u0E30-programs",children:[{level:3,title:"\u0E27\u0E34\u0E18\u0E35 load accounts \u0E08\u0E32\u0E01 mainnet",slug:"\u0E27\u0E34\u0E18\u0E35-load-accounts-\u0E08\u0E32\u0E01-mainnet",children:[]},{level:3,title:"\u0E27\u0E34\u0E18\u0E35 load programs from mainnet",slug:"\u0E27\u0E34\u0E18\u0E35-load-programs-from-mainnet",children:[]}]}],path:"/th/references/local-development.html",pathLocale:"/th/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"\u0E2B\u0E32\u0E17\u0E38\u0E01 domain names \u0E17\u0E35\u0E48 public key \u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07",slug:"\u0E2B\u0E32\u0E17\u0E38\u0E01-domain-names-\u0E17\u0E35\u0E48-public-key-\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07",children:[]},{level:2,title:"Resolve a Twitter handle",slug:"resolve-a-twitter-handle",children:[]},{level:2,title:"Reverse look up of a Twitter handle",slug:"reverse-look-up-of-a-twitter-handle",children:[]}],path:"/th/references/name-service.html",pathLocale:"/th/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 an NFT",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-an-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint the NFT",slug:"mint-the-nft",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 NFT Metadata",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-nft-metadata",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 (owner) \u0E02\u0E2D\u0E07 NFT",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07-owner-\u0E02\u0E2D\u0E07-nft",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 NFT Mint Addresses",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01 NFTs \u0E08\u0E32\u0E01 wallet?",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01-nfts-\u0E08\u0E32\u0E01-wallet",children:[]}],path:"/th/references/nfts.html",pathLocale:"/th/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Sign Transaction",slug:"sign-transaction",children:[]},{level:2,title:"Partial Sign Transaction",slug:"partial-sign-transaction",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Create Nonce Account",slug:"create-nonce-account",children:[]},{level:3,title:"Get Nonce Account",slug:"get-nonce-account",children:[]},{level:3,title:"Use Nonce Account",slug:"use-nonce-account",children:[]}]}],path:"/th/references/offline-transactions.html",pathLocale:"/th/",extraFields:[]},{title:"\u0E40\u0E02\u0E35\u0E22\u0E19 Programs",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35 transfer SOL in a program",slug:"\u0E27\u0E34\u0E18\u0E35-transfer-sol-in-a-program",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49\u0E19\u0E32\u0E2C\u0E34\u0E01\u0E32 (clock) \u0E43\u0E19 program",slug:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49\u0E19\u0E32\u0E2C\u0E34\u0E01\u0E32-clock-\u0E43\u0E19-program",children:[{level:3,title:"\u0E2A\u0E48\u0E07 Clock \u0E43\u0E19\u0E41\u0E1A\u0E1A account \u0E20\u0E32\u0E22\u0E43\u0E19 instruction",slug:"\u0E2A\u0E48\u0E07-clock-\u0E43\u0E19\u0E41\u0E1A\u0E1A-account-\u0E20\u0E32\u0E22\u0E43\u0E19-instruction",children:[]},{level:3,title:"\u0E43\u0E0A\u0E49 Clock \u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E43\u0E19 instruction",slug:"\u0E43\u0E0A\u0E49-clock-\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E43\u0E19-instruction",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 account size",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19-account-size",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E33 Cross Program Invocation",slug:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E4D\u0E32-cross-program-invocation",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 PDA",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-pda",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19 accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19 instructions \u0E2B\u0E25\u0E32\u0E22\u0E46 \u0E15\u0E31\u0E27\u0E08\u0E32\u0E01 transaction",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19-instructions-\u0E2B\u0E25\u0E32\u0E22\u0E46-\u0E15\u0E31\u0E27\u0E08\u0E32\u0E01-transaction",children:[]}],path:"/th/references/programs.html",pathLocale:"/th/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Validators \u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",slug:"\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-validators-\u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",children:[]},{level:2,title:"\u0E2A\u0E23\u0E49\u0E32\u0E07 Stake Account",slug:"\u0E2A\u0E23\u0E49\u0E32\u0E07-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Delegator \u0E14\u0E49\u0E27\u0E22 Validators",slug:"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-delegator-\u0E14\u0E49\u0E27\u0E22-validators",children:[]},{level:2,title:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01 Stake",slug:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01-stake",children:[]},{level:2,title:"\u0E16\u0E2D\u0E19 Stake",slug:"\u0E16\u0E2D\u0E19-stake",children:[]}],path:"/th/references/staking.html",pathLocale:"/th/",extraFields:[]},{title:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 Tokens",headers:[{level:2,title:"\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 SPL-Tokens?",slug:"\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-spl-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Token \u0E43\u0E2B\u0E21\u0E48",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-token-\u0E43\u0E2B\u0E21\u0E48",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 token mint",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-token-mint",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 token account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-token-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Token Account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-token-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 balance \u0E02\u0E2D\u0E07 token account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-balance-\u0E02\u0E2D\u0E07-token-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 mint tokens",slug:"\u0E27\u0E34\u0E18\u0E35-mint-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E48\u0E07 tokens",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E48\u0E07-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E33\u0E25\u0E32\u0E22 (burn) tokens",slug:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E4D\u0E32\u0E25\u0E32\u0E22-burn-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14 token accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14-token-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E31\u0E49\u0E07 authority \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A token accounts \u0E2B\u0E23\u0E37\u0E2D mints",slug:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E31\u0E49\u0E07-authority-\u0E2A\u0E4D\u0E32\u0E2B\u0E23\u0E31\u0E1A-token-accounts-\u0E2B\u0E23\u0E37\u0E2D-mints",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34 (approve) token \u0E43\u0E2B\u0E49 delegate \u0E44\u0E14\u0E49",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34-approve-token-\u0E43\u0E2B\u0E49-delegate-\u0E44\u0E14\u0E49",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01 (revoke) token \u0E17\u0E35\u0E48 delegate \u0E44\u0E27\u0E49",slug:"\u0E27\u0E34\u0E18\u0E35\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01-revoke-token-\u0E17\u0E35\u0E48-delegate-\u0E44\u0E27\u0E49",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23 wrapped SOL",slug:"\u0E27\u0E34\u0E18\u0E35\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23-wrapped-sol",children:[{level:3,title:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 Token Account",slug:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07-token-account",children:[]},{level:3,title:"\u0E40\u0E1E\u0E34\u0E48\u0E21 Balance",slug:"\u0E40\u0E1E\u0E34\u0E48\u0E21-balance",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01\u0E46 token accounts \u0E15\u0E32\u0E21 owner",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01\u0E46-token-accounts-\u0E15\u0E32\u0E21-owner",children:[]}],path:"/th/references/token.html",pathLocale:"/th/",extraFields:[]},{title:"Accounts (Account\u2019lar)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Account Model (Account Modeli)",slug:"account-model-account-modeli",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[{level:3,title:"Referans",slug:"referans",children:[]}]}],path:"/tr/core-concepts/accounts.html",pathLocale:"/tr/",extraFields:[]},{title:"Program Derived Addresses (PDAs) (Programdan T\xFCretilmi\u015F Adresler)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Generating PDAs (PDA\u2019lar Olu\u015Fturma)",slug:"generating-pdas-pda-lar-olusturma",children:[]},{level:3,title:"Interacting with PDAs (PDA\u2019lar ile Etkile\u015Fim)",slug:"interacting-with-pdas-pda-lar-ile-etkilesim",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[]}],path:"/tr/core-concepts/pdas.html",pathLocale:"/tr/",extraFields:[]},{title:"Programs (Programlar)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Native Program\u2019lar & Solana Program Library (SPL)",slug:"native-program-lar-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs (Program Yazma)",slug:"writing-programs-program-yazma",children:[]},{level:3,title:"Deploying Programs (Programlar\u0131 \xC7al\u0131\u015Ft\u0131rma)",slug:"deploying-programs-programlar\u0131-cal\u0131st\u0131rma",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[]}],path:"/tr/core-concepts/programs.html",pathLocale:"/tr/",extraFields:[]},{title:"Transactions (\u0130\u015Flemler)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Fees (\xDCcretler)",slug:"fees-ucretler",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[]}],path:"/tr/core-concepts/transactions.html",pathLocale:"/tr/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Install Web3.js (Web3.js Kurulumu)",slug:"install-web3-js-web3-js-kurulumu",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet Adapter (C\xFCzdan Adapt\xF6r\xFC)",slug:"wallet-adapter-cuzdan-adaptoru",children:[]}]},{level:2,title:"Install Rust (Rust Kurulumu)",slug:"install-rust-rust-kurulumu",children:[]},{level:2,title:"Install CLI (CLI Kurulumu)",slug:"install-cli-cli-kurulumu",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source (Kaynaktan Derleme)",slug:"build-from-source-kaynaktan-derleme",children:[]}]}],path:"/tr/getting-started/installation.html",pathLocale:"/tr/",extraFields:[]},{title:"Account Maps (Hesap Haritalar\u0131)",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/tr/guides/account-maps.html",pathLocale:"/tr/",extraFields:[]},{title:"Migrating a Programs Data Accounts (Programlar\u0131n Data Account\u2019lar\u0131n\u0131 Ta\u015F\u0131ma)",headers:[{level:2,title:"How can you migrate a program's data accounts? (Programlar\u0131n veri account\u2019lar\u0131 nas\u0131l ta\u015F\u0131n\u0131r)",slug:"how-can-you-migrate-a-program-s-data-accounts-programlar\u0131n-veri-account-lar\u0131-nas\u0131l-tas\u0131n\u0131r",children:[]},{level:2,title:"Scenario (Senaryo)",slug:"scenario-senaryo",children:[]},{level:2,title:"Upgrading the Account (Account\u2019\u0131 Y\xFCkseltme)",slug:"upgrading-the-account-account-\u0131-yukseltme",children:[{level:3,title:"1. Add account conversion logic (Hesap d\xF6n\xFC\u015Ft\xFCrme mant\u0131\u011F\u0131 ekleme)",slug:"_1-add-account-conversion-logic-hesap-donusturme-mant\u0131g\u0131-ekleme",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/data-migration.html",pathLocale:"/tr/",extraFields:[]},{title:"Debugging Solana Programs (Solana Programlar\u0131nda Hata Ay\u0131klama)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Runtime Testing and Debugging in editor (Edit\xF6rde Runtime Test ve Hata Ay\u0131klama)",slug:"runtime-testing-and-debugging-in-editor-editorde-runtime-test-ve-hata-ay\u0131klama",children:[]},{level:2,title:"Local Validator Node Testing in editor (D\xFCzenleyicide Yerel Do\u011Frulay\u0131c\u0131 Node Testi)",slug:"local-validator-node-testing-in-editor-duzenleyicide-yerel-dogrulay\u0131c\u0131-node-testi",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps (Client Uygulamalar\u0131nda Yerel Validator Node Testi)",slug:"local-validator-node-testing-from-client-apps-client-uygulamalar\u0131nda-yerel-validator-node-testi",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/debugging-solana-programs.html",pathLocale:"/tr/",extraFields:[]},{title:"Feature Parity Testing (\xD6zellik Parite Testi)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Scenario (Senaryo)",slug:"scenario-senaryo",children:[]},{level:2,title:"Feature Status (\xD6zellik Durumu)",slug:"feature-status-ozellik-durumu",children:[]},{level:2,title:"Parity Testing (Parite Testi)",slug:"parity-testing-parite-testi",children:[]},{level:2,title:"Simple Demonstration (Basit G\xF6sterim)",slug:"simple-demonstration-basit-gosterim",children:[{level:3,title:"All features activated (T\xFCm \xF6zellikler aktifle\u015Ftirildi)",slug:"all-features-activated-tum-ozellikler-aktiflestirildi",children:[]},{level:3,title:"Selective features deactivated (Se\xE7ici \xF6zellikler devre d\u0131\u015F\u0131 b\u0131rak\u0131ld\u0131)",slug:"selective-features-deactivated-secici-ozellikler-devre-d\u0131s\u0131-b\u0131rak\u0131ld\u0131",children:[]}]},{level:2,title:"Full Parity Testing Programmatically (Programl\u0131 Olarak Tam Parite Testi)",slug:"full-parity-testing-programmatically-programl\u0131-olarak-tam-parite-testi",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/feature-parity-testing.html",pathLocale:"/tr/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/tr/guides/get-program-accounts.html",pathLocale:"/tr/",extraFields:[]},{title:"Serializing Data (Serile\u015Ftirme)",headers:[{level:2,title:"Setting up for Borsh Serialization (Borsh Serialization i\xE7in Kurulum)",slug:"setting-up-for-borsh-serialization-borsh-serialization-icin-kurulum",children:[]},{level:2,title:"How to serialize instruction data on the client (Client\u2019taki y\xF6nerge verisi nas\u0131l serile\u015Ftirilir)",slug:"how-to-serialize-instruction-data-on-the-client-client-taki-yonerge-verisi-nas\u0131l-serilestirilir",children:[]},{level:2,title:"How to deserialize instruction data on the program (Instruction data programlarda nas\u0131l deserialize edilir)",slug:"how-to-deserialize-instruction-data-on-the-program-instruction-data-programlarda-nas\u0131l-deserialize-edilir",children:[]},{level:2,title:"How to serialize account data on the program (Programdaki account data nas\u0131l serialize edilir)",slug:"how-to-serialize-account-data-on-the-program-programdaki-account-data-nas\u0131l-serialize-edilir",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Usage (Kullan\u0131m)",slug:"usage-kullan\u0131m",children:[]}]},{level:2,title:"How to deserialize account data on the client (Client\u2019ta account data nas\u0131l deserialize edilir)",slug:"how-to-deserialize-account-data-on-the-client-client-ta-account-data-nas\u0131l-deserialize-edilir",children:[]},{level:2,title:"Common Solana TS/JS Mappings (Yayg\u0131n Solana TS/JS E\u015Flemeleri)",slug:"common-solana-ts-js-mappings-yayg\u0131n-solana-ts-js-eslemeleri",children:[]},{level:2,title:"Advanced Constructs (Geli\u015Fmi\u015F Yap\u0131lar)",slug:"advanced-constructs-gelismis-yap\u0131lar",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/serialization.html",pathLocale:"/tr/",extraFields:[]},{title:"Accounts (Account\u2019lar)",headers:[{level:2,title:"How to create a system account (System account olu\u015Fturma)",slug:"how-to-create-a-system-account-system-account-olusturma",children:[]},{level:2,title:"How to calculate account cost (Account maliyeti hesaplama)",slug:"how-to-calculate-account-cost-account-maliyeti-hesaplama",children:[]},{level:2,title:"How to calculate account cost (Account\u2019lar seed\u2019leri olu\u015Fturma)",slug:"how-to-calculate-account-cost-account-lar-seed-leri-olusturma",children:[{level:3,title:"Generate (\xDCretme)",slug:"generate-uretme",children:[]},{level:3,title:"Create (Olu\u015Fturma)",slug:"create-olusturma",children:[]},{level:3,title:"Transfer (Transfer)",slug:"transfer-transfer",children:[]}]},{level:2,title:"How to create PDAs (PDA\u2019leri olu\u015Fturma)",slug:"how-to-create-pdas-pda-leri-olusturma",children:[{level:3,title:"Generate a PDA (PDA \xFCretme)",slug:"generate-a-pda-pda-uretme",children:[]},{level:3,title:"Create a PDA (PDA olu\u015Fturma)",slug:"create-a-pda-pda-olusturma",children:[]}]},{level:2,title:"How to sign with a PDA (PDA ile imzalama)",slug:"how-to-sign-with-a-pda-pda-ile-imzalama",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"How to get program accounts (Program hesaplar\u0131n\u0131 getirme)",slug:"how-to-get-program-accounts-program-hesaplar\u0131n\u0131-getirme",children:[]},{level:2,title:"How to close accounts (Account\u2019lar\u0131 kapatma)",slug:"how-to-close-accounts-account-lar\u0131-kapatma",children:[]},{level:2,title:"How to get account balance (Account bakiyesi getirme)",slug:"how-to-get-account-balance-account-bakiyesi-getirme",children:[]}],path:"/tr/references/accounts.html",pathLocale:"/tr/",extraFields:[]},{title:"Sending Transactions(\u0130\u015Flem G\xF6nderimi)",headers:[{level:2,title:"How to send SOL (SOL nas\u0131l g\xF6nderilir)",slug:"how-to-send-sol-sol-nas\u0131l-gonderilir",children:[]},{level:2,title:"How to send SPL-Tokens (SPL-Token\u2019lar nas\u0131l g\xF6nderilir)",slug:"how-to-send-spl-tokens-spl-token-lar-nas\u0131l-gonderilir",children:[]},{level:2,title:"How to calculate transaction cost (\u0130\u015Flem maliyeti nas\u0131l hesaplan\u0131r)",slug:"how-to-calculate-transaction-cost-islem-maliyeti-nas\u0131l-hesaplan\u0131r",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"How to add a memo to a transaction (Bir i\u015Fleme mesaj nas\u0131l eklenir)",slug:"how-to-add-a-memo-to-a-transaction-bir-isleme-mesaj-nas\u0131l-eklenir",children:[]},{level:2,title:"How to change compute budget, fee, & priority for a transaction (Bir i\u015Flem i\xE7in i\u015Flem b\xFCt\xE7esi, bedeli ve \xF6nceli\u011Fi nas\u0131l de\u011Fi\u015Ftirilir)",slug:"how-to-change-compute-budget-fee-priority-for-a-transaction-bir-islem-icin-islem-butcesi-bedeli-ve-onceligi-nas\u0131l-degistirilir",children:[]}],path:"/tr/references/basic-transactions.html",pathLocale:"/tr/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"How to generate a new Keypair (Yeni Keypair nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-new-keypair-yeni-keypair-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to verify a Keypair (Keypair nas\u0131l do\u011Frulan\u0131r)",slug:"how-to-verify-a-keypair-keypair-nas\u0131l-dogrulan\u0131r",children:[]},{level:2,title:"How to check if a public key has an associated private key (Bir public key\u2019in ili\u015Fkili private key\u2019e sahip olup olmad\u0131\u011F\u0131 nas\u0131l kontrol edilir)",slug:"how-to-check-if-a-public-key-has-an-associated-private-key-bir-public-key-in-iliskili-private-key-e-sahip-olup-olmad\u0131g\u0131-nas\u0131l-kontrol-edilir",children:[]},{level:2,title:"How to generate a mnemonic phrase (Hat\u0131rlat\u0131c\u0131 bir ifade nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-mnemonic-phrase-hat\u0131rlat\u0131c\u0131-bir-ifade-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase (An\u0131msat\u0131c\u0131 bir c\xFCmleden Keypair nas\u0131l y\xFCklenir)",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase-an\u0131msat\u0131c\u0131-bir-cumleden-keypair-nas\u0131l-yuklenir",children:[]},{level:2,title:"How to generate a vanity address (\xD6zel bir adres nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-vanity-address-ozel-bir-adres-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to sign and verify messages with wallets (C\xFCzdanlarla mesajlar nas\u0131l imzalan\u0131r ve do\u011Frulan\u0131r)",slug:"how-to-sign-and-verify-messages-with-wallets-cuzdanlarla-mesajlar-nas\u0131l-imzalan\u0131r-ve-dogrulan\u0131r",children:[]},{level:2,title:"How to connect to a wallet (C\xFCzdana nas\u0131l ba\u011Flan\u0131l\u0131r)",slug:"how-to-connect-to-a-wallet-cuzdana-nas\u0131l-baglan\u0131l\u0131r",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/tr/references/keypairs-and-wallets.html",pathLocale:"/tr/",extraFields:[]},{title:"Local Development (Yerel Geli\u015Ftirme)",headers:[{level:2,title:"Starting a local validator (Yerel validator ba\u015Flatma)",slug:"starting-a-local-validator-yerel-validator-baslatma",children:[]},{level:2,title:"Connecting to Environments (Ortamlara Ba\u011Flanma)",slug:"connecting-to-environments-ortamlara-baglanma",children:[]},{level:2,title:"Subscribing to Events (Event\u2019lere Abone Olma)",slug:"subscribing-to-events-event-lere-abone-olma",children:[]},{level:2,title:"Getting Test SOL (Test SOL Edinme)",slug:"getting-test-sol-test-sol-edinme",children:[]},{level:2,title:"Using Mainnet Accounts and Programs (Mainnet Account ve Programlar\u0131n\u0131 Kullanma)",slug:"using-mainnet-accounts-and-programs-mainnet-account-ve-programlar\u0131n\u0131-kullanma",children:[{level:3,title:"How to load accounts from mainnet (Account\u2019lar mainnet\u2019ten nas\u0131l y\xFCklenir)",slug:"how-to-load-accounts-from-mainnet-account-lar-mainnet-ten-nas\u0131l-yuklenir",children:[]},{level:3,title:"How to load programs from mainnet (Programlar mainnet\u2019ten nas\u0131l y\xFCklenir)",slug:"how-to-load-programs-from-mainnet-programlar-mainnet-ten-nas\u0131l-yuklenir",children:[]}]}],path:"/tr/references/local-development.html",pathLocale:"/tr/",extraFields:[]},{title:"Name Service (Name Servisi)",headers:[{level:2,title:"Name registry (Name kayd\u0131)",slug:"name-registry-name-kayd\u0131",children:[]},{level:2,title:"Resolving SOL domains (SOL alan adlar\u0131n\u0131 \xE7\xF6zme)",slug:"resolving-sol-domains-sol-alan-adlar\u0131n\u0131-cozme",children:[]},{level:2,title:"Reverse lookup (Geriye do\u011Fru arama)",slug:"reverse-lookup-geriye-dogru-arama",children:[]},{level:2,title:"Subdomain lookup (Subdomain arama)",slug:"subdomain-lookup-subdomain-arama",children:[]},{level:2,title:"Find all the domain names owned by a public key (Bir public key\u2019in sahip oldu\u011Fu t\xFCm isimleri bulma)",slug:"find-all-the-domain-names-owned-by-a-public-key-bir-public-key-in-sahip-oldugu-tum-isimleri-bulma",children:[]},{level:2,title:"Resolve a Twitter handle (Twitter handle\u2019\u0131n\u0131 \xE7\xF6zme)",slug:"resolve-a-twitter-handle-twitter-handle-\u0131n\u0131-cozme",children:[]},{level:2,title:"Reverse lookup of a Twitter handle (Twitter handle\u2019\u0131n\u0131 geri aratma)",slug:"reverse-lookup-of-a-twitter-handle-twitter-handle-\u0131n\u0131-geri-aratma",children:[]}],path:"/tr/references/name-service.html",pathLocale:"/tr/",extraFields:[]},{title:"Non Fungible Tokens (NFTs)",headers:[{level:2,title:"How to create an NFT (NFT olu\u015Fturma)",slug:"how-to-create-an-nft-nft-olusturma",children:[{level:3,title:"Upload to Arweave (Arwave\u2019e y\xFCkleme)",slug:"upload-to-arweave-arwave-e-yukleme",children:[]},{level:3,title:"Mint the NFT (NFT Mint)",slug:"mint-the-nft-nft-mint",children:[]}]},{level:2,title:"How to get NFT Metadata (NFT Metadata\u2019y\u0131 getirme)",slug:"how-to-get-nft-metadata-nft-metadata-y\u0131-getirme",children:[]},{level:2,title:"How to get the owner of an NFT (Bir NFT\u2019nin sahibini getirme)",slug:"how-to-get-the-owner-of-an-nft-bir-nft-nin-sahibini-getirme",children:[]},{level:2,title:"How to get NFT Mint Addresses (NFT Mint Adres\u2019lerini getirme)",slug:"how-to-get-nft-mint-addresses-nft-mint-adres-lerini-getirme",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"How to get all NFTs from a wallet? (Bir c\xFCzdandan t\xFCm NFT\u2019leri alma)",slug:"how-to-get-all-nfts-from-a-wallet-bir-cuzdandan-tum-nft-leri-alma",children:[]}],path:"/tr/references/nfts.html",pathLocale:"/tr/",extraFields:[]},{title:"Offline Transaction (\xC7evrimd\u0131\u015F\u0131 i\u015Flem)",headers:[{level:2,title:"Sign Transaction (\u0130\u015Flem \u0130mzalama)",slug:"sign-transaction-islem-imzalama",children:[]},{level:2,title:"Partial Sign Transaction (K\u0131smi \u0130mzalama)",slug:"partial-sign-transaction-k\u0131smi-imzalama",children:[]},{level:2,title:"Durable Nonce(Uzun S\xFCreli Nonce)",slug:"durable-nonce-uzun-sureli-nonce",children:[{level:3,title:"Create Nonce Account (Nonce Account Olu\u015Fturma)",slug:"create-nonce-account-nonce-account-olusturma",children:[]},{level:3,title:"Get Nonce Account (Nonce Account Getirme)",slug:"get-nonce-account-nonce-account-getirme",children:[]},{level:3,title:"Use Nonce Account (Nonce Account Kullanma)",slug:"use-nonce-account-nonce-account-kullanma",children:[]}]}],path:"/tr/references/offline-transactions.html",pathLocale:"/tr/",extraFields:[]},{title:"Writing Programs (Programlar\u0131 Yazma)",headers:[{level:2,title:"How to transfer SOL in a program (Programda SOL aktarma)",slug:"how-to-transfer-sol-in-a-program-programda-sol-aktarma",children:[]},{level:2,title:"How to get clock in a program (Programlarda saat)",slug:"how-to-get-clock-in-a-program-programlarda-saat",children:[{level:3,title:"Passing Clock as an account inside an instruction (Saati bir intstruction i\xE7inde bir hesap olarak ge\xE7irme)",slug:"passing-clock-as-an-account-inside-an-instruction-saati-bir-intstruction-icinde-bir-hesap-olarak-gecirme",children:[]},{level:3,title:"Accessing Clock directly inside an instruction (Saate do\u011Frudan bir instruction i\xE7inden eri\u015Fme)",slug:"accessing-clock-directly-inside-an-instruction-saate-dogrudan-bir-instruction-icinden-erisme",children:[]}]},{level:2,title:"How to change account size (Account boyutu de\u011Fi\u015Ftirme)",slug:"how-to-change-account-size-account-boyutu-degistirme",children:[]},{level:2,title:"How to do Cross Program Invocation (\xC7apraz Program \xC7a\u011F\u0131rma)",slug:"how-to-do-cross-program-invocation-capraz-program-cag\u0131rma",children:[]},{level:2,title:"How to create a PDA (PDA olu\u015Fturma)",slug:"how-to-create-a-pda-pda-olusturma",children:[]},{level:2,title:"How to read accounts (Account\u2019lar\u0131 okuma)",slug:"how-to-read-accounts-account-lar\u0131-okuma",children:[]},{level:2,title:"How to verify accounts (Account\u2019lar\u0131 do\u011Frulama)",slug:"how-to-verify-accounts-account-lar\u0131-dogrulama",children:[]},{level:2,title:"How to read multiple instructions from a transaction (\u0130\u015Flemdeki \xE7oklu talimatlar\u0131 okuma)",slug:"how-to-read-multiple-instructions-from-a-transaction-islemdeki-coklu-talimatlar\u0131-okuma",children:[]}],path:"/tr/references/programs.html",pathLocale:"/tr/",extraFields:[]},{title:"Staking (Stake Etme)",headers:[{level:2,title:"Get Current Validators (Ge\xE7erli Validator\u2019lar\u0131 Getirme)",slug:"get-current-validators-gecerli-validator-lar\u0131-getirme",children:[]},{level:2,title:"Create Stake Account (Stake hesab\u0131 olu\u015Fturma)",slug:"create-stake-account-stake-hesab\u0131-olusturma",children:[]},{level:2,title:"Delegate Stake (Delegate Stake)",slug:"delegate-stake-delegate-stake",children:[]},{level:2,title:"Get Delegator by Validators (Validator account\u2019a stake eden account\u2019lar\u0131 getirme)",slug:"get-delegator-by-validators-validator-account-a-stake-eden-account-lar\u0131-getirme",children:[]},{level:2,title:"Deactivate Stake (Stake\u2019i Devre D\u0131\u015F\u0131 B\u0131rakma)",slug:"deactivate-stake-stake-i-devre-d\u0131s\u0131-b\u0131rakma",children:[]},{level:2,title:"Withdraw Stake (Stake\u2019i \xC7ekme)",slug:"withdraw-stake-stake-i-cekme",children:[]}],path:"/tr/references/staking.html",pathLocale:"/tr/",extraFields:[]},{title:"Interacting with Tokens (Token\u2019lar ile Etkile\u015Fim)",headers:[{level:2,title:"What do I need to get started with SPL-Tokens? (SPL Token\u2019lar\u0131 kullanmaya ba\u015Flamak i\xE7in neye ihtiyac\u0131m\u0131z var?)",slug:"what-do-i-need-to-get-started-with-spl-tokens-spl-token-lar\u0131-kullanmaya-baslamak-icin-neye-ihtiyac\u0131m\u0131z-var",children:[]},{level:2,title:"How to create a new Token (Yeni bir Token olu\u015Fturma)",slug:"how-to-create-a-new-token-yeni-bir-token-olusturma",children:[]},{level:2,title:"How to get a token mint (Token Mint etme)",slug:"how-to-get-a-token-mint-token-mint-etme",children:[]},{level:2,title:"How to create a token account (Token account olu\u015Fturma)",slug:"how-to-create-a-token-account-token-account-olusturma",children:[]},{level:2,title:"How to get a Token Account (Token account\u2019u getirme)",slug:"how-to-get-a-token-account-token-account-u-getirme",children:[]},{level:2,title:"How to get a token account's balance (Token account bakiyesi getirme)",slug:"how-to-get-a-token-account-s-balance-token-account-bakiyesi-getirme",children:[]},{level:2,title:"How to mint tokens (Token mint\u2019leme)",slug:"how-to-mint-tokens-token-mint-leme",children:[]},{level:2,title:"How to transfer tokens (Token transfer etme)",slug:"how-to-transfer-tokens-token-transfer-etme",children:[]},{level:2,title:"How to burn tokens (Token yakma(burn))",slug:"how-to-burn-tokens-token-yakma-burn",children:[]},{level:2,title:"How to close token accounts (Token account\u2019lar\u0131n\u0131 kapatma)",slug:"how-to-close-token-accounts-token-account-lar\u0131n\u0131-kapatma",children:[]},{level:2,title:"How to set authority on token accounts or mints (Token hesaplar\u0131nda ve mint\u2019lerinde yetki belirleme)",slug:"how-to-set-authority-on-token-accounts-or-mints-token-hesaplar\u0131nda-ve-mint-lerinde-yetki-belirleme",children:[]},{level:2,title:"How to approve a token delegate (Token delegate onaylama)",slug:"how-to-approve-a-token-delegate-token-delegate-onaylama",children:[]},{level:2,title:"How to revoke a token delegate (Token delegate iptal etme)",slug:"how-to-revoke-a-token-delegate-token-delegate-iptal-etme",children:[]},{level:2,title:"How to manage wrapped SOL (Wrapped SOL y\xF6netimi)",slug:"how-to-manage-wrapped-sol-wrapped-sol-yonetimi",children:[{level:3,title:"Create Token Account (Token Account Olu\u015Fturma)",slug:"create-token-account-token-account-olusturma",children:[]},{level:3,title:"Add Balance (Bakiye Ekleme)",slug:"add-balance-bakiye-ekleme",children:[]}]},{level:2,title:"How to get all token accounts by owner (T\xFCm token account\u2019lar\u0131 sahibi taraf\u0131ndan nas\u0131l al\u0131n\u0131r?)",slug:"how-to-get-all-token-accounts-by-owner-tum-token-account-lar\u0131-sahibi-taraf\u0131ndan-nas\u0131l-al\u0131n\u0131r",children:[]}],path:"/tr/references/token.html",pathLocale:"/tr/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"C\u1EA5u tr\xFAc Account",slug:"cau-truc-account",children:[]},{level:3,title:"Thu\xEA",slug:"thue",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[{level:3,title:"L\u1EDDi c\u1EA3m \u01A1n",slug:"loi-cam-on",children:[]}]}],path:"/vi/core-concepts/accounts.html",pathLocale:"/vi/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[{level:3,title:"C\xE1ch sinh PDA",slug:"cach-sinh-pda",children:[]},{level:3,title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi PDAs",slug:"tuong-tac-voi-pdas",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/core-concepts/pdas.html",pathLocale:"/vi/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"Native Programs & Solana Program Library (SPL) Programs",slug:"native-programs-solana-program-library-spl-programs",children:[]},{level:3,title:"Vi\u1EBFt m\u1ED9t Program",slug:"viet-mot-program",children:[]},{level:3,title:"Tri\u1EC3n khai Program",slug:"trien-khai-program",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/core-concepts/programs.html",pathLocale:"/vi/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"Ph\xED",slug:"phi",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/core-concepts/transactions.html",pathLocale:"/vi/",extraFields:[]},{title:"C\xE0i \u0111\u1EB7t",headers:[{level:2,title:"C\xE0i \u0111\u1EB7t Web3.js",slug:"cai-\u0111at-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"C\xE0i \u0111\u1EB7t Rust",slug:"cai-\u0111at-rust",children:[]},{level:2,title:"C\xE0i \u0111\u1EB7t CLI",slug:"cai-\u0111at-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bi\xEAn d\u1ECBch t\u1EEB m\xE3 ngu\u1ED3n",slug:"bien-dich-tu-ma-nguon",children:[]}]}],path:"/vi/getting-started/installation.html",pathLocale:"/vi/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"T\xECm PDA",slug:"tim-pda",children:[]},{level:2,title:"Map b\u1EB1ng Account \u0111\u01A1n",slug:"map-bang-account-\u0111on",children:[]}],path:"/vi/guides/account-maps.html",pathLocale:"/vi/",extraFields:[]},{title:"N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Program Account",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\xF3 th\u1EC3 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Program Account?",slug:"lam-the-nao-\u0111e-co-the-nang-cap-du-lieu-trong-program-account",children:[]},{level:2,title:"Ng\u1EEF c\u1EA3nh",slug:"ngu-canh",children:[]},{level:2,title:"N\xE2ng c\u1EA5p Account",slug:"nang-cap-account",children:[{level:3,title:"1. Th\xEAm lu\u1EADn l\xFD \u0111\u1EC3 chuy\u1EC3n \u0111\u1ED5i Account",slug:"_1-them-luan-ly-\u0111e-chuyen-\u0111oi-account",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/data-migration.html",pathLocale:"/vi/",extraFields:[]},{title:"So\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"M\xF4i tr\u01B0\u1EDDng ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i trong tr\xECnh bi\xEAn t\u1EADp",slug:"moi-truong-kiem-thu-va-soat-loi-trong-trinh-bien-tap",children:[]},{level:2,title:"Ki\u1EC3m th\u1EED b\u1EB1ng n\u1ED1t Local Validator trong tr\xECnh bi\xEAn t\u1EADp",slug:"kiem-thu-bang-not-local-validator-trong-trinh-bien-tap",children:[]},{level:2,title:"Ki\u1EC3m th\u1EED b\u1EB1ng n\u1ED1t Local Validator tr\xEAn \u1EE9ng d\u1EE5ng ng\u01B0\u1EDDi d\xF9ng",slug:"kiem-thu-bang-not-local-validator-tren-ung-dung-nguoi-dung",children:[]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/debugging-solana-programs.html",pathLocale:"/vi/",extraFields:[]},{title:"\u0110\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"T\xECnh hu\u1ED1ng gi\u1EA3 \u0111\u1ECBnh",slug:"tinh-huong-gia-\u0111inh",children:[]},{level:2,title:"\u0110\u1EC1 xu\u1EA5t Tr\u1EA1ng th\xE1i",slug:"\u0111e-xuat-trang-thai",children:[]},{level:2,title:"Ki\u1EC3m th\u1EED Parity",slug:"kiem-thu-parity",children:[]},{level:2,title:"V\xED d\u1EE5 \u0111\u01A1n gi\u1EA3n",slug:"vi-du-\u0111on-gian",children:[{level:3,title:"Khi t\u1EA5t c\u1EA3 c\xE1c \u0111\u1EC1 xu\u1EA5t \u0111\u1EC1u k\xEDch ho\u1EA1t",slug:"khi-tat-ca-cac-\u0111e-xuat-\u0111eu-kich-hoat",children:[]},{level:3,title:"V\xF4 hi\u1EC7u m\u1ED9t v\xE0i \u0111\u1EC1 xu\u1EA5t",slug:"vo-hieu-mot-vai-\u0111e-xuat",children:[]}]},{level:2,title:"Ki\u1EC3m th\u1EED Parity \u0110\u1EA7y \u0111\u1EE7",slug:"kiem-thu-parity-\u0111ay-\u0111u",children:[]},{level:2,title:"C\xE0i \u0111\u1EB7t t\u1EF1 \u0111\u1ED9ng cho Ki\u1EC3m th\u1EED Parity \u0110\u1EA7y \u0111\u1EE7",slug:"cai-\u0111at-tu-\u0111ong-cho-kiem-thu-parity-\u0111ay-\u0111u",children:[]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/feature-parity-testing.html",pathLocale:"/vi/",extraFields:[]},{title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/get-program-accounts.html",pathLocale:"/vi/",extraFields:[]},{title:"Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u",headers:[{level:2,title:"C\xE0i \u0111\u1EB7t Tu\u1EA7n t\u1EF1 ho\xE1 Borsh",slug:"cai-\u0111at-tuan-tu-hoa-borsh",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u c\u1EE7a c\xE1c ch\u1EC9 th\u1ECB t\u1EEB ph\xEDa ng\u01B0\u1EDDi d\xF9ng",slug:"lam-the-nao-\u0111e-tuan-tu-hoa-du-lieu-cua-cac-chi-thi-tu-phia-nguoi-dung",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u c\u1EE7a c\xE1c ch\u1EC9 th\u1ECB tr\xEAn Program",slug:"lam-the-nao-\u0111e-phi-tuan-tu-hoa-du-lieu-cua-cac-chi-thi-tren-program",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u Account tr\xEAn Program",slug:"lam-the-nao-\u0111e-tuan-tu-hoa-du-lieu-account-tren-program",children:[{level:3,title:"Pack (\u0110\xF3ng g\xF3i)",slug:"pack-\u0111ong-goi",children:[]},{level:3,title:"Tu\u1EA7n t\u1EF1 ho\xE1 v\xE0 Phi tu\u1EA7n t\u1EF1 ho\xE1",slug:"tuan-tu-hoa-va-phi-tuan-tu-hoa",children:[]},{level:3,title:"C\xE1ch d\xF9ng",slug:"cach-dung",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 tu\u1EA7n ho\xE1 d\u1EEF li\u1EC7u Account \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng",slug:"lam-the-nao-\u0111e-tuan-hoa-du-lieu-account-o-phia-nguoi-dung",children:[]},{level:2,title:"Mapping c\u01A1 b\u1EA3n b\u1EB1ng TS/JS cho Solana",slug:"mapping-co-ban-bang-ts-js-cho-solana",children:[]},{level:2,title:"Ki\u1EC3u d\u1EEF li\u1EC7u n\xE2ng cao",slug:"kieu-du-lieu-nang-cao",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/serialization.html",pathLocale:"/vi/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t System Account",slug:"lam-the-nao-\u0111e-tao-mot-system-account",children:[]},{level:2,title:"T\xEDnh chi ph\xED cho m\u1ED9t account",slug:"tinh-chi-phi-cho-mot-account",children:[]},{level:2,title:"L\xE0m th\u1EBF \xE0o \u0111\u1EC3 t\u1EA1o account v\u1EDBi seeds",slug:"lam-the-ao-\u0111e-tao-account-voi-seeds",children:[{level:3,title:"T\xECm Account",slug:"tim-account",children:[]},{level:3,title:"T\u1EA1o Account",slug:"tao-account",children:[]},{level:3,title:"Chuy\u1EC3n lamports",slug:"chuyen-lamports",children:[]}]},{level:2,title:"C\xE1ch t\u1EA1o PDAs",slug:"cach-tao-pdas",children:[{level:3,title:"Sinh ra m\u1ED9t PDA",slug:"sinh-ra-mot-pda",children:[]},{level:3,title:"T\u1EA1o m\u1ED9t PDA",slug:"tao-mot-pda",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 k\xFD b\u1EB1ng PDA",slug:"lam-the-nao-\u0111e-ky-bang-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Ng\u01B0\u1EDDi d\xF9ng",slug:"nguoi-dung-1",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n c\xE1c account c\u1EE7a m\u1ED9t program",slug:"lam-the-nao-\u0111e-truy-van-cac-account-cua-mot-program",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xF3ng account",slug:"lam-the-nao-\u0111e-\u0111ong-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n s\u1ED1 d\u01B0 c\u1EE7a m\u1ED9t account",slug:"lam-the-nao-\u0111e-truy-van-so-du-cua-mot-account",children:[]}],path:"/vi/references/accounts.html",pathLocale:"/vi/",extraFields:[]},{title:"G\u1EEDi Transaction",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1EEDi SOL",slug:"lam-the-nao-\u0111e-gui-sol",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1EEDi SPL-Tokens",slug:"lam-the-nao-\u0111e-gui-spl-tokens",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\xEDnh chi ph\xED g\u1EEDi transaction",slug:"lam-the-nao-\u0111e-tinh-chi-phi-gui-transaction",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 th\xEAm ghi ch\xFA v\xE0 m\u1ED9t transaction",slug:"lam-the-nao-\u0111e-them-ghi-chu-va-mot-transaction",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thay \u0111\u1ED5i ng\xE2n s\xE1ch t\xEDnh to\xE1n cho m\u1ED9t transaction",slug:"lam-the-nao-\u0111e-thay-\u0111oi-ngan-sach-tinh-toan-cho-mot-transaction",children:[]}],path:"/vi/references/basic-transactions.html",pathLocale:"/vi/",extraFields:[]},{title:"C\u1EB7p kho\xE1 v\xE0 V\xED",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh C\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-sinh-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i m\u1ED9t C\u1EB7p kho\xE1 t\u1EEB kho\xE1 ri\xEAng t\u01B0",slug:"lam-the-nao-\u0111e-phuc-hoi-mot-cap-khoa-tu-khoa-rieng-tu",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra m\u1ED9t c\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-kiem-tra-mot-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra n\u1EBFu m\u1ED9t kho\xE1 c\xF4ng khai kh\xF4ng t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE8ng",slug:"lam-the-nao-\u0111e-kiem-tra-neu-mot-khoa-cong-khai-khong-ton-tai-khoa-rieng-tu-tuong-ung",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh ra c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-sinh-ra-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i l\u1EA1i c\u1EB7p kho\xE1 t\u1EEB c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-phuc-hoi-lai-cap-khoa-tu-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh m\u1ED9t \u0111\u1ECBa ch\u1EC9 danh ngh\u0129a",slug:"lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o k\xFD v\xE0 ki\u1EC3m tra tinh nh\u1EAFn b\u1EB1ng v\xED",slug:"lam-the-nao-ky-va-kiem-tra-tinh-nhan-bang-vi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 k\u1EBFt n\u1ED1i v\xED",slug:"lam-the-nao-\u0111e-ket-noi-vi",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/vi/references/keypairs-and-wallets.html",pathLocale:"/vi/",extraFields:[]},{title:"L\u1EADp tr\xECnh \u1EDF Local",headers:[{level:2,title:"Kh\u1EDFi ch\u1EA1y Local Validator",slug:"khoi-chay-local-validator",children:[]},{level:2,title:"K\u1EBFt n\u1ED1i \u0111\u1EBFn m\xF4i tr\u01B0\u1EDDng",slug:"ket-noi-\u0111en-moi-truong",children:[]},{level:2,title:"L\u1EAFng nghe c\xE1c s\u1EF1 ki\u1EC7n",slug:"lang-nghe-cac-su-kien",children:[]},{level:2,title:"Nh\u1EADn SOL \u0111\u1EC3 ki\u1EC3m th\u1EED",slug:"nhan-sol-\u0111e-kiem-thu",children:[]},{level:2,title:"S\u1EED d\u1EE5ng Accounts v\xE0 Programs tr\xEAn Mainnet",slug:"su-dung-accounts-va-programs-tren-mainnet",children:[{level:3,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\xE0i \u0111\u1EB7t accounts t\u1EEB mainnet",slug:"lam-the-nao-\u0111e-cai-\u0111at-accounts-tu-mainnet",children:[]},{level:3,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\u1EA3i \u0111\u1EB7t programs t\u1EEB mainnet",slug:"lam-the-nao-\u0111e-cai-\u0111at-programs-tu-mainnet",children:[]}]}],path:"/vi/references/local-development.html",pathLocale:"/vi/",extraFields:[]},{title:"D\u1ECBch v\u1EE5 t\xEAn mi\u1EC1n",headers:[{level:2,title:"D\u1ECBch v\u1EE5 \u0111\u0103ng k\xFD t\xEAn mi\u1EC1n",slug:"dich-vu-\u0111ang-ky-ten-mien",children:[]},{level:2,title:"Ph\xE2n gi\u1EA3i t\xEAn mi\u1EC1n SOL",slug:"phan-giai-ten-mien-sol",children:[]},{level:2,title:"Tra c\u1EE9u ng\u01B0\u1EE3c",slug:"tra-cuu-nguoc",children:[]},{level:2,title:"Tra c\u1EE9u t\xEAn mi\u1EC1n con",slug:"tra-cuu-ten-mien-con",children:[]},{level:2,title:"T\xECm t\u1EA5t c\u1EA3 t\xEAn mi\u1EC1n \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi m\u1ED9t kho\xE1 c\xF4ng khai",slug:"tim-tat-ca-ten-mien-\u0111uoc-so-huu-boi-mot-khoa-cong-khai",children:[]},{level:2,title:"Ph\xE2n gi\u1EA3i m\u1ED9t Twitter Handle",slug:"phan-giai-mot-twitter-handle",children:[]},{level:2,title:"Tra c\u1EE9u ng\u01B0\u1EE3c c\u1EE7a m\u1ED9t Twitter Handle",slug:"tra-cuu-nguoc-cua-mot-twitter-handle",children:[]}],path:"/vi/references/name-service.html",pathLocale:"/vi/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t NFT",slug:"lam-the-nao-\u0111e-tao-mot-nft",children:[{level:3,title:"\u0110\u0103ng t\u1EA3i l\xEAn Arweave",slug:"\u0111ang-tai-len-arweave",children:[]},{level:3,title:"\u0110\xFAc NFT",slug:"\u0111uc-nft",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n NFT Metadata",slug:"lam-the-nao-\u0111e-truy-van-nft-metadata",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n ch\u1EE7 s\u1EDF h\u1EEFu c\u1EE7a m\u1ED9t NFTs",slug:"lam-the-nao-\u0111e-truy-van-chu-so-huu-cua-mot-nfts",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n \u0111\u1ECBa ch\u1EC9 mint c\u1EE7a NFT",slug:"lam-the-nao-\u0111e-truy-van-\u0111ia-chi-mint-cua-nft",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n t\u1EA5t c\u1EA3 NFT t\u1EEB m\u1ED9t v\xED?",slug:"lam-the-nao-\u0111e-truy-van-tat-ca-nft-tu-mot-vi",children:[]}],path:"/vi/references/nfts.html",pathLocale:"/vi/",extraFields:[]},{title:"G\u1EEDi Transactions Ngo\u1EA1i tuy\u1EBFn",headers:[{level:2,title:"K\xFD Transaction",slug:"ky-transaction",children:[]},{level:2,title:"K\xFD m\u1ED9t ph\u1EA7n Transaction",slug:"ky-mot-phan-transaction",children:[]},{level:2,title:"Nonce v\u0129nh vi\u1EC5n",slug:"nonce-vinh-vien",children:[{level:3,title:"T\u1EA1o Nonce Account",slug:"tao-nonce-account",children:[]},{level:3,title:"Truy v\u1EA5n Nonce Account",slug:"truy-van-nonce-account",children:[]},{level:3,title:"S\u1EED d\u1EE5ng Nonce Account",slug:"su-dung-nonce-account",children:[]}]}],path:"/vi/references/offline-transactions.html",pathLocale:"/vi/",extraFields:[]},{title:"X\xE2y d\u1EF1ng Programs",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n SOL trong m\u1ED9t program",slug:"lam-the-nao-\u0111e-chuyen-sol-trong-mot-program",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 l\u1EA5y th\u1EDDi gian trong m\u1ED9t program",slug:"lam-the-nao-\u0111e-lay-thoi-gian-trong-mot-program",children:[{level:3,title:"Truy\u1EC1n Clock nh\u01B0 l\xE0 m\u1ED9t account trong ch\u1EC9 th\u1ECB",slug:"truyen-clock-nhu-la-mot-account-trong-chi-thi",children:[]},{level:3,title:"Truy c\u1EADp Clock tr\u1EF1c ti\u1EBFp b\xEAn trong ch\u1EC9 th\u1ECB",slug:"truy-cap-clock-truc-tiep-ben-trong-chi-thi",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thay \u0111\u1ED5i k\xEDch th\u01B0\u1EDBc account",slug:"lam-the-nao-\u0111e-thay-\u0111oi-kich-thuoc-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1ECDi gi\u1EEFa c\xE1c program (Cross Program Invocation - CPI)",slug:"lam-the-nao-\u0111e-goi-giua-cac-program-cross-program-invocation-cpi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o PDA",slug:"lam-the-nao-\u0111e-tao-pda",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc Account",slug:"lam-the-nao-\u0111e-\u0111oc-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra account",slug:"lam-the-nao-\u0111e-kiem-tra-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc nhi\u1EC1u ch\u1EC9 th\u1ECB t\u1EEB m\u1ED9t Transaction",slug:"lam-the-nao-\u0111e-\u0111oc-nhieu-chi-thi-tu-mot-transaction",children:[]}],path:"/vi/references/programs.html",pathLocale:"/vi/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Truy v\u1EA5n danh s\xE1ch Validators hi\u1EC7n t\u1EA1i",slug:"truy-van-danh-sach-validators-hien-tai",children:[]},{level:2,title:"T\u1EA1o m\u1ED9t Stake Account",slug:"tao-mot-stake-account",children:[]},{level:2,title:"U\u1EF7 quy\u1EC1n Stake",slug:"uy-quyen-stake",children:[]},{level:2,title:"Truy v\u1EA5n c\xE1c nh\xE0 u\u1EF7 quy\u1EC1n b\u1EB1ng validator",slug:"truy-van-cac-nha-uy-quyen-bang-validator",children:[]},{level:2,title:"D\u1EEBng stake",slug:"dung-stake",children:[]},{level:2,title:"R\xFAt Stake",slug:"rut-stake",children:[]}],path:"/vi/references/staking.html",pathLocale:"/vi/",extraFields:[]},{title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens",headers:[{level:2,title:"T\xF4i n\xEAn c\u1EA7n g\xEC \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi SPL-Tokens?",slug:"toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token m\u1EDBi",slug:"lam-the-nao-\u0111e-tao-mot-token-moi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc truy v\u1EA5n token mint",slug:"lam-the-nao-\u0111e-\u0111oc-truy-van-token-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token account",slug:"lam-the-nao-\u0111e-tao-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n token acount",slug:"lam-the-nao-\u0111e-truy-van-token-acount",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n s\u1ED1 d\u01B0 c\u1EE7a token account",slug:"lam-the-nao-\u0111e-truy-van-so-du-cua-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 d\xFAc token",slug:"lam-the-nao-\u0111e-duc-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n token",slug:"lam-the-nao-\u0111e-chuyen-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ED1t token",slug:"lam-the-nao-\u0111e-\u0111ot-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xF3ng m\u1ED9t token account",slug:"lam-the-nao-\u0111e-\u0111ong-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thi\u1EBFt l\u1EADp ch\u1EE7 s\u1EDF h\u1EEFu cho token account v\xE0 mint",slug:"lam-the-nao-\u0111e-thiet-lap-chu-so-huu-cho-token-account-va-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 u\u1EF7 quy\u1EC1n cho m\u1ED9t token \u0111\u1EA1i di\u1EC7n (delegate)",slug:"lam-the-nao-\u0111e-uy-quyen-cho-mot-token-\u0111ai-dien-delegate",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thu h\u1ED3i m\u1ED9t token \u0111\u1EA1i di\u1EC7n",slug:"lam-the-nao-\u0111e-thu-hoi-mot-token-\u0111ai-dien",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 qu\u1EA3n l\xFD wrapped SOL",slug:"lam-the-nao-\u0111e-quan-ly-wrapped-sol",children:[{level:3,title:"T\u1EA1o token account",slug:"tao-token-account",children:[]},{level:3,title:"Th\xEAm s\u1ED1 d\u01B0",slug:"them-so-du",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n t\u1EA5t c\u1EA3 token account c\u1EE7a m\u1ED9t Ch\u1EE7",slug:"lam-the-nao-\u0111e-truy-van-tat-ca-token-account-cua-mot-chu",children:[]}],path:"/vi/references/token.html",pathLocale:"/vi/",extraFields:[]},{title:"\u8D26\u6237",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8D26\u6237\u6A21\u578B",slug:"\u8D26\u6237\u6A21\u578B",children:[]},{level:3,title:"\u79DF\u91D1",slug:"\u79DF\u91D1",children:[]}]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[{level:3,title:"\u81F4\u8C22",slug:"\u81F4\u8C22",children:[]}]}],path:"/zh/core-concepts/accounts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237 (PDA)",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[{level:3,title:"\u751F\u6210PDA",slug:"\u751F\u6210pda",children:[]},{level:3,title:"\u4E0EPDA\u4EA4\u4E92",slug:"\u4E0Epda\u4EA4\u4E92",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/zh/core-concepts/pdas.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7A0B\u5E8F",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5E93\uFF08SPL\uFF09",slug:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5E93-spl",children:[]},{level:3,title:"\u7F16\u5199\u7A0B\u5E8F",slug:"\u7F16\u5199\u7A0B\u5E8F",children:[]},{level:3,title:"\u90E8\u7F72\u7A0B\u5E8F",slug:"\u90E8\u7F72\u7A0B\u5E8F",children:[]}]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[]}],path:"/zh/core-concepts/programs.html",pathLocale:"/zh/",extraFields:[]},{title:"\u4EA4\u6613",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8D39\u7528",slug:"\u8D39\u7528",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/zh/core-concepts/transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u5B89\u88C5",headers:[{level:2,title:"\u5B89\u88C5Web3.js",slug:"\u5B89\u88C5web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E01\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E01-spl-token",children:[]},{level:3,title:"\u94B1\u5305\u9002\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u94B1\u5305\u9002\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88C5Rust",slug:"\u5B89\u88C5rust",children:[]},{level:2,title:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u4ECE\u6E90\u7801\u7F16\u8BD1",slug:"\u4ECE\u6E90\u7801\u7F16\u8BD1",children:[]}]}],path:"/zh/getting-started/installation.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8D26\u6237\u6620\u5C04",headers:[{level:2,title:"\u6D3E\u751FPDA",slug:"\u6D3E\u751Fpda",children:[]},{level:2,title:"\u5355\u4E2A\u6620\u5C04\u8D26\u6237",slug:"\u5355\u4E2A\u6620\u5C04\u8D26\u6237",children:[]}],path:"/zh/guides/account-maps.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8FC1\u79FB\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237",headers:[{level:2,title:"\u4F60\u5982\u4F55\u8FC1\u79FB\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237\uFF1F",slug:"\u4F60\u5982\u4F55\u8FC1\u79FB\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237",children:[]},{level:2,title:"\u573A\u666F",slug:"\u573A\u666F",children:[]},{level:2,title:"\u5347\u7EA7\u8D26\u6237",slug:"\u5347\u7EA7\u8D26\u6237",children:[{level:3,title:"1. \u6DFB\u52A0\u8D26\u6237\u8F6C\u6362\u903B\u8F91",slug:"_1-\u6DFB\u52A0\u8D26\u6237\u8F6C\u6362\u903B\u8F91",children:[]}]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/data-migration.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8C03\u8BD5 Solana \u7A0B\u5E8F",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u8FD0\u884C\u65F6\u6D4B\u8BD5\u548C\u8C03\u8BD5",slug:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u8FD0\u884C\u65F6\u6D4B\u8BD5\u548C\u8C03\u8BD5",children:[]},{level:2,title:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",slug:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",children:[]},{level:2,title:"\u4ECE\u5BA2\u6237\u7AEF\u5E94\u7528\u7A0B\u5E8F\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",slug:"\u4ECE\u5BA2\u6237\u7AEF\u5E94\u7528\u7A0B\u5E8F\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",children:[]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/debugging-solana-programs.html",pathLocale:"/zh/",extraFields:[]},{title:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u573A\u666F",slug:"\u573A\u666F",children:[]},{level:2,title:"\u529F\u80FD\u72B6\u6001",slug:"\u529F\u80FD\u72B6\u6001",children:[]},{level:2,title:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5",slug:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5-1",children:[]},{level:2,title:"\u7B80\u5355\u6F14\u793A",slug:"\u7B80\u5355\u6F14\u793A",children:[{level:3,title:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",slug:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",children:[]},{level:3,title:"\u9009\u62E9\u6027\u529F\u80FD\u5DF2\u505C\u7528",slug:"\u9009\u62E9\u6027\u529F\u80FD\u5DF2\u505C\u7528",children:[]}]},{level:2,title:"\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",slug:"\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",children:[]},{level:2,title:"\u4EE5\u7F16\u7A0B\u65B9\u5F0F\u8FDB\u884C\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",slug:"\u4EE5\u7F16\u7A0B\u65B9\u5F0F\u8FDB\u884C\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",children:[]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/feature-parity-testing.html",pathLocale:"/zh/",extraFields:[]},{title:"\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[]}],path:"/zh/guides/get-program-accounts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u5E8F\u5217\u6570\u636E",headers:[{level:2,title:"\u8BBE\u7F6EBorsh\u5E8F\u5217\u5316",slug:"\u8BBE\u7F6Eborsh\u5E8F\u5217\u5316",children:[]},{level:2,title:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6237\u7AEF\u4E0A\u7684\u6307\u4EE4\u6570\u636E",slug:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6237\u7AEF\u4E0A\u7684\u6307\u4EE4\u6570\u636E",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316",slug:"\u5E8F\u5217\u5316-\u53CD\u5E8F\u5217\u5316",children:[]},{level:3,title:"\u7528\u6CD5",slug:"\u7528\u6CD5",children:[]}]},{level:2,title:"\u5982\u4F55\u5728\u5BA2\u6237\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",slug:"\u5982\u4F55\u5728\u5BA2\u6237\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",children:[]},{level:2,title:"Solana TS/JS \u5E38\u7528\u6620\u5C04",slug:"solana-ts-js-\u5E38\u7528\u6620\u5C04",children:[]},{level:2,title:"\u9AD8\u7EA7\u6784\u9020",slug:"\u9AD8\u7EA7\u6784\u9020",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/serialization.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u4F20\u7EDF\u4EA4\u6613\uFF08Legacy Transactions\uFF09",slug:"\u4F20\u7EDF\u4EA4\u6613-legacy-transactions",children:[]},{level:2,title:"\u4F20\u7EDF\u6D88\u606F",slug:"\u4F20\u7EDF\u6D88\u606F",children:[{level:3,title:"\u5934\u90E8",slug:"\u5934\u90E8",children:[]},{level:3,title:"\u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4",slug:"\u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4",children:[]},{level:3,title:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4",slug:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4",children:[]}]},{level:2,title:"\u4F20\u7EDF\u4EA4\u6613\u7684\u95EE\u9898",slug:"\u4F20\u7EDF\u4EA4\u6613\u7684\u95EE\u9898",children:[]},{level:2,title:"\u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)",slug:"\u5730\u5740\u67E5\u627E\u8868-address-lookeup-tables",children:[]},{level:2,title:"\u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0",slug:"\u7248\u672C\u5316\u4EA4\u6613-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7D27\u51D1\u6570\u7EC4",slug:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7D27\u51D1\u6570\u7EC4",children:[]},{level:3,title:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4",slug:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4-1",children:[]}]},{level:2,title:"RPC\u53D8\u66F4",slug:"rpc\u53D8\u66F4",children:[]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[]},{level:2,title:"\u53C2\u8003\u8D44\u6599",slug:"\u53C2\u8003\u8D44\u6599",children:[]}],path:"/zh/guides/versioned-transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8D26\u6237",headers:[{level:2,title:"\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237",slug:"\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u8BA1\u7B97\u8D26\u6237\u8D39\u7528",slug:"\u5982\u4F55\u8BA1\u7B97\u8D26\u6237\u8D39\u7528",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u79CD\u5B50\u521B\u5EFA\u8D26\u6237",slug:"\u5982\u4F55\u4F7F\u7528\u79CD\u5B50\u521B\u5EFA\u8D26\u6237",children:[{level:3,title:"\u751F\u6210",slug:"\u751F\u6210",children:[]},{level:3,title:"\u521B\u5EFA",slug:"\u521B\u5EFA",children:[]},{level:3,title:"\u8F6C\u8D26",slug:"\u8F6C\u8D26",children:[]}]},{level:2,title:"\u5982\u4F55\u521B\u5EFAPDA",slug:"\u5982\u4F55\u521B\u5EFApda",children:[{level:3,title:"\u751F\u6210\u4E00\u4E2APDA",slug:"\u751F\u6210\u4E00\u4E2Apda",children:[]},{level:3,title:"\u521B\u5EFA\u4E00\u4E2APDA",slug:"\u521B\u5EFA\u4E00\u4E2Apda",children:[]}]},{level:2,title:"\u5982\u4F55\u4F7F\u7528PDA\u7B7E\u540D",slug:"\u5982\u4F55\u4F7F\u7528pda\u7B7E\u540D",children:[{level:3,title:"\u7A0B\u5E8F",slug:"\u7A0B\u5E8F-1",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF",slug:"\u5BA2\u6237\u7AEF-1",children:[]}]},{level:2,title:"\u5982\u4F55\u83B7\u53D6\u7A0B\u5E8F\u8D26\u6237",slug:"\u5982\u4F55\u83B7\u53D6\u7A0B\u5E8F\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u5173\u95ED\u8D26\u6237",slug:"\u5982\u4F55\u5173\u95ED\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u53D6\u8D26\u6237\u4F59\u989D",slug:"\u5982\u4F55\u83B7\u53D6\u8D26\u6237\u4F59\u989D",children:[]}],path:"/zh/references/accounts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u53D1\u9001\u4EA4\u6613",headers:[{level:2,title:"\u5982\u4F55\u53D1\u9001SOL",slug:"\u5982\u4F55\u53D1\u9001sol",children:[]},{level:2,title:"\u5982\u4F55\u53D1\u9001SPL-\u4EE3\u5E01",slug:"\u5982\u4F55\u53D1\u9001spl-\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u8BA1\u7B97\u4EA4\u6613\u6210\u672C",slug:"\u5982\u4F55\u8BA1\u7B97\u4EA4\u6613\u6210\u672C",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5907\u6CE8",slug:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5907\u6CE8",children:[]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8BA1\u7B97\u9884\u7B97\u3001\u8D39\u7528\u548C\u4F18\u5148\u7EA7",slug:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8BA1\u7B97\u9884\u7B97\u3001\u8D39\u7528\u548C\u4F18\u5148\u7EA7",children:[]}],path:"/zh/references/basic-transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",slug:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",children:[]},{level:2,title:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",slug:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",children:[{level:3,title:"\u53CD\u5E94",slug:"\u53CD\u5E94",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/zh/references/keypairs-and-wallets.html",pathLocale:"/zh/",extraFields:[]},{title:"\u672C\u5730\u5F00\u53D1",headers:[{level:2,title:"\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668",slug:"\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668",children:[]},{level:2,title:"\u8FDE\u63A5\u5230\u4E0D\u540C\u73AF\u5883",slug:"\u8FDE\u63A5\u5230\u4E0D\u540C\u73AF\u5883",children:[]},{level:2,title:"\u8BA2\u9605\u4E8B\u4EF6",slug:"\u8BA2\u9605\u4E8B\u4EF6",children:[]},{level:2,title:"\u83B7\u53D6\u6D4B\u8BD5\u7528\u7684SOL",slug:"\u83B7\u53D6\u6D4B\u8BD5\u7528\u7684sol",children:[]},{level:2,title:"\u4F7F\u7528\u4E3B\u7F51 \uFF08Mainnet) \u8D26\u6237\u548C\u7A0B\u5E8F",slug:"\u4F7F\u7528\u4E3B\u7F51-mainnet-\u8D26\u6237\u548C\u7A0B\u5E8F",children:[{level:3,title:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u8D26\u6237",slug:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u8D26\u6237",children:[]},{level:3,title:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u7A0B\u5E8F",slug:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u7A0B\u5E8F",children:[]}]}],path:"/zh/references/local-development.html",pathLocale:"/zh/",extraFields:[]},{title:"\u547D\u540D\u670D\u52A1",headers:[{level:2,title:"\u540D\u79F0\u6CE8\u518C\u8868",slug:"\u540D\u79F0\u6CE8\u518C\u8868",children:[]},{level:2,title:"\u89E3\u6790SOL\u57DF\u540D",slug:"\u89E3\u6790sol\u57DF\u540D",children:[]},{level:2,title:"\u53CD\u5411\u67E5\u627E",slug:"\u53CD\u5411\u67E5\u627E",children:[]},{level:2,title:"\u5B50\u57DF\u540D\u67E5\u627E",slug:"\u5B50\u57DF\u540D\u67E5\u627E",children:[]},{level:2,title:"\u67E5\u627E\u7531\u516C\u94A5\u62E5\u6709\u7684\u6240\u6709\u57DF\u540D",slug:"\u67E5\u627E\u7531\u516C\u94A5\u62E5\u6709\u7684\u6240\u6709\u57DF\u540D",children:[]},{level:2,title:"\u89E3\u6790\u4E00\u4E2ATwitter\u7528\u6237\u540D",slug:"\u89E3\u6790\u4E00\u4E2Atwitter\u7528\u6237\u540D",children:[]},{level:2,title:"Twitter\u7528\u6237\u540D\u7684\u53CD\u5411\u67E5\u627E",slug:"twitter\u7528\u6237\u540D\u7684\u53CD\u5411\u67E5\u627E",children:[]}],path:"/zh/references/name-service.html",pathLocale:"/zh/",extraFields:[]},{title:"\u975E\u540C\u8D28\u5316\u4EE3\u5E01 (NFTs)",headers:[{level:2,title:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2ANFT",slug:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2Anft",children:[{level:3,title:"\u4E0A\u4F20\u5230 Arweave",slug:"\u4E0A\u4F20\u5230-arweave",children:[]},{level:3,title:"\u94F8\u9020\uFF08Mint\uFF09\u8BE5 NFT",slug:"\u94F8\u9020-mint-\u8BE5-nft",children:[]}]},{level:2,title:"\u5982\u4F55\u83B7\u53D6 NFT \u5143\u6570\u636E",slug:"\u5982\u4F55\u83B7\u53D6-nft-\u5143\u6570\u636E",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u53D6NFT\u7684\u6240\u6709\u8005",slug:"\u5982\u4F55\u83B7\u53D6nft\u7684\u6240\u6709\u8005",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u53D6 NFT \u7684\u94F8\u5E01\u5730\u5740",slug:"\u5982\u4F55\u83B7\u53D6-nft-\u7684\u94F8\u5E01\u5730\u5740",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u5982\u4F55\u4ECE\u94B1\u5305\u83B7\u53D6\u6240\u6709 NFT\uFF1F",slug:"\u5982\u4F55\u4ECE\u94B1\u5305\u83B7\u53D6\u6240\u6709-nft",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"\u5982\u4F55\u521B\u5EFACandy Machine",slug:"\u5982\u4F55\u521B\u5EFAcandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u5220\u9664Candy Machine",slug:"\u5982\u4F55\u5220\u9664candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u8FC7\u6743\u9650\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u8FC7\u6743\u9650\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u8FC7\u94B1\u5305\u5730\u5740\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u8FC7\u94B1\u5305\u5730\u5740\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u8FC7Candy Machine\u7684\u5730\u5740\u67E5\u627E\u5B83",slug:"\u5982\u4F55\u901A\u8FC7candy-machine\u7684\u5730\u5740\u67E5\u627E\u5B83",children:[]},{level:3,title:"\u5982\u4F55\u4ECECandy Machine\u627E\u5230\u94F8\u9020(mint)\u7684 NFT",slug:"\u5982\u4F55\u4ECEcandy-machine\u627E\u5230\u94F8\u9020-mint-\u7684-nft",children:[]},{level:3,title:"\u5982\u4F55\u5C06\u7269\u54C1\u63D2\u5165\u5230Candy Machine",slug:"\u5982\u4F55\u5C06\u7269\u54C1\u63D2\u5165\u5230candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u4ECECandy Machine\u94F8\u9020(Mint)\u4E00\u4E2A NFT",slug:"\u5982\u4F55\u4ECEcandy-machine\u94F8\u9020-mint-\u4E00\u4E2A-nft",children:[]}]}],path:"/zh/references/nfts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613",headers:[{level:2,title:"\u7B7E\u7F72\u4EA4\u6613",slug:"\u7B7E\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u90E8\u5206\u7B7E\u7F72\u4EA4\u6613",slug:"\u90E8\u5206\u7B7E\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u8010\u4E45\u6027\u7684 Nonce",slug:"\u8010\u4E45\u6027\u7684-nonce",children:[{level:3,title:"\u521B\u5EFANonce\u8D26\u6237",slug:"\u521B\u5EFAnonce\u8D26\u6237",children:[]},{level:3,title:"\u83B7\u53D6Nonce\u8D26\u6237",slug:"\u83B7\u53D6nonce\u8D26\u6237",children:[]},{level:3,title:"\u4F7F\u7528Nonce\u8D26\u6237",slug:"\u4F7F\u7528nonce\u8D26\u6237",children:[]}]}],path:"/zh/references/offline-transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7F16\u5199\u7A0B\u5E8F",headers:[{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB SOL",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB-sol",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u83B7\u53D6\u65F6\u949F",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u83B7\u53D6\u65F6\u949F",children:[{level:3,title:"\u5728\u6307\u4EE4\u4E2D\u5C06\u65F6\u949F\u4F5C\u4E3A\u4E00\u4E2A\u8D26\u6237\u4F20\u9012",slug:"\u5728\u6307\u4EE4\u4E2D\u5C06\u65F6\u949F\u4F5C\u4E3A\u4E00\u4E2A\u8D26\u6237\u4F20\u9012",children:[]},{level:3,title:"\u5728\u6307\u4EE4\u5185\u90E8\u76F4\u63A5\u8BBF\u95EE\u65F6\u949F",slug:"\u5728\u6307\u4EE4\u5185\u90E8\u76F4\u63A5\u8BBF\u95EE\u65F6\u949F",children:[]}]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u8D26\u6237\u5927\u5C0F",slug:"\u5982\u4F55\u66F4\u6539\u8D26\u6237\u5927\u5C0F",children:[]},{level:2,title:"\u8DE8\u7A0B\u5E8F\u8C03\u7528\u7684\u65B9\u6CD5",slug:"\u8DE8\u7A0B\u5E8F\u8C03\u7528\u7684\u65B9\u6CD5",children:[]},{level:2,title:"\u5982\u4F55\u521B\u5EFAPDA",slug:"\u5982\u4F55\u521B\u5EFApda",children:[]},{level:2,title:"\u5982\u4F55\u8BFB\u53D6\u8D26\u6237",slug:"\u5982\u4F55\u8BFB\u53D6\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u9A8C\u8BC1\u8D26\u6237",slug:"\u5982\u4F55\u9A8C\u8BC1\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u4ECE\u4E00\u4E2A\u4EA4\u6613\u4E2D\u8BFB\u53D6\u591A\u4E2A\u6307\u4EE4",slug:"\u5982\u4F55\u4ECE\u4E00\u4E2A\u4EA4\u6613\u4E2D\u8BFB\u53D6\u591A\u4E2A\u6307\u4EE4",children:[]}],path:"/zh/references/programs.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8D28\u62BC",headers:[{level:2,title:"\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668",slug:"\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668",children:[]},{level:2,title:"\u521B\u5EFA\u8D28\u62BC\u8D26\u6237",slug:"\u521B\u5EFA\u8D28\u62BC\u8D26\u6237",children:[]},{level:2,title:"\u59D4\u6258\u8D28\u62BC",slug:"\u59D4\u6258\u8D28\u62BC",children:[]},{level:2,title:"\u901A\u8FC7\u9A8C\u8BC1\u5668\u83B7\u53D6\u59D4\u6258\u4EBA",slug:"\u901A\u8FC7\u9A8C\u8BC1\u5668\u83B7\u53D6\u59D4\u6258\u4EBA",children:[]},{level:2,title:"\u505C\u7528\u8D28\u62BC",slug:"\u505C\u7528\u8D28\u62BC",children:[]},{level:2,title:"\u63D0\u53D6\u8D28\u62BC",slug:"\u63D0\u53D6\u8D28\u62BC",children:[]},{level:2,title:"\u83B7\u53D6\u8D28\u62BC\u91D1\u989D",slug:"\u83B7\u53D6\u8D28\u62BC\u91D1\u989D",children:[]}],path:"/zh/references/staking.html",pathLocale:"/zh/",extraFields:[]},{title:"\u4E0E\u4EE3\u5E01\u4E92\u52A8",headers:[{level:2,title:"\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528SPL\u4EE3\u5E01\uFF1F",slug:"\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528spl\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01",slug:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u94F8\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u94F8\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237\u7684\u4F59\u989D",slug:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237\u7684\u4F59\u989D",children:[]},{level:2,title:"\u5982\u4F55\u94F8\u9020(mint)\u4EE3\u5E01",slug:"\u5982\u4F55\u94F8\u9020-mint-\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u8F6C\u79FB\u4EE3\u5E01",slug:"\u5982\u4F55\u8F6C\u79FB\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u9500\u4EE3\u5E01",slug:"\u5982\u4F55\u9500\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u5173\u95ED\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u5173\u95ED\u4EE3\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u5728\u4EE3\u5E01\u8D26\u6237\u6216\u94F8\u5E01\u8D26\u6237\u4E0A\u8BBE\u7F6E\u6743\u9650",slug:"\u5982\u4F55\u5728\u4EE3\u5E01\u8D26\u6237\u6216\u94F8\u5E01\u8D26\u6237\u4E0A\u8BBE\u7F6E\u6743\u9650",children:[]},{level:2,title:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E01\u59D4\u6258",slug:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E01\u59D4\u6258",children:[]},{level:2,title:"\u5982\u4F55\u64A4\u9500\u4EE3\u5E01\u59D4\u6258",slug:"\u5982\u4F55\u64A4\u9500\u4EE3\u5E01\u59D4\u6258",children:[]},{level:2,title:"\u5982\u4F55\u7BA1\u7406\u5305\u88C5\u7684SOL",slug:"\u5982\u4F55\u7BA1\u7406\u5305\u88C5\u7684sol",children:[{level:3,title:"\u521B\u5EFA\u4EE3\u5E01\u8D26\u6237",slug:"\u521B\u5EFA\u4EE3\u5E01\u8D26\u6237",children:[]},{level:3,title:"\u589E\u52A0\u4F59\u989D",slug:"\u589E\u52A0\u4F59\u989D",children:[]}]},{level:2,title:"\u5982\u4F55\u901A\u8FC7\u6240\u6709\u8005\u83B7\u53D6\u6240\u6709\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u901A\u8FC7\u6240\u6709\u8005\u83B7\u53D6\u6240\u6709\u4EE3\u5E01\u8D26\u6237",children:[]}],path:"/zh/references/token.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8CEC\u6236",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8CEC\u6236\u6A21\u578B",slug:"\u8CEC\u6236\u6A21\u578B",children:[]},{level:3,title:"\u79DF\u91D1",slug:"\u79DF\u91D1",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[{level:3,title:"\u81F4\u8B1D",slug:"\u81F4\u8B1D",children:[]}]}],path:"/zh_t/core-concepts/accounts.html",pathLocale:"/",extraFields:[]},{title:"\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236 (PDA)",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[{level:3,title:"\u751F\u6210PDA",slug:"\u751F\u6210pda",children:[]},{level:3,title:"\u8207PDA\u4EA4\u4E92",slug:"\u8207pda\u4EA4\u4E92",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/core-concepts/pdas.html",pathLocale:"/",extraFields:[]},{title:"\u7A0B\u5E8F",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5EAB\uFF08SPL\uFF09",slug:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5EAB-spl",children:[]},{level:3,title:"\u7DE8\u5BEB\u7A0B\u5E8F",slug:"\u7DE8\u5BEB\u7A0B\u5E8F",children:[]},{level:3,title:"\u90E8\u7F72\u7A0B\u5E8F",slug:"\u90E8\u7F72\u7A0B\u5E8F",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/core-concepts/programs.html",pathLocale:"/",extraFields:[]},{title:"\u4EA4\u6613",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8CBB\u7528",slug:"\u8CBB\u7528",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/core-concepts/transactions.html",pathLocale:"/",extraFields:[]},{title:"\u5B89\u88DD",headers:[{level:2,title:"\u5B89\u88DDWeb3.js",slug:"\u5B89\u88DDweb3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E63\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E63-spl-token",children:[]},{level:3,title:"\u9322\u5305\u9069\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u9322\u5305\u9069\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88DDRust",slug:"\u5B89\u88DDrust",children:[]},{level:2,title:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",slug:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",children:[]}]}],path:"/zh_t/getting-started/installation.html",pathLocale:"/",extraFields:[]},{title:"\u8CEC\u6236\u6620\u5C04",headers:[{level:2,title:"\u6D3E\u751FPDA",slug:"\u6D3E\u751Fpda",children:[]},{level:2,title:"\u55AE\u500B\u6620\u5C04\u8CEC\u6236",slug:"\u55AE\u500B\u6620\u5C04\u8CEC\u6236",children:[]}],path:"/zh_t/guides/account-maps.html",pathLocale:"/",extraFields:[]},{title:"\u9077\u79FB\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236",headers:[{level:2,title:"\u4F60\u5982\u4F55\u9077\u79FB\u4E00\u500B\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236\uFF1F",slug:"\u4F60\u5982\u4F55\u9077\u79FB\u4E00\u500B\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236",children:[]},{level:2,title:"\u5834\u666F",slug:"\u5834\u666F",children:[]},{level:2,title:"\u5347\u7D1A\u8CEC\u6236",slug:"\u5347\u7D1A\u8CEC\u6236",children:[{level:3,title:"1. \u6DFB\u52A0\u8CEC\u6236\u8F49\u63DB\u908F\u8F2F",slug:"_1-\u6DFB\u52A0\u8CEC\u6236\u8F49\u63DB\u908F\u8F2F",children:[]}]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/data-migration.html",pathLocale:"/",extraFields:[]},{title:"\u8ABF\u8A66 Solana \u7A0B\u5E8F",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u904B\u884C\u6642\u6E2C\u8A66\u548C\u8ABF\u8A66",slug:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u904B\u884C\u6642\u6E2C\u8A66\u548C\u8ABF\u8A66",children:[]},{level:2,title:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",slug:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",children:[]},{level:2,title:"\u5F9E\u5BA2\u6236\u7AEF\u61C9\u7528\u7A0B\u5E8F\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",slug:"\u5F9E\u5BA2\u6236\u7AEF\u61C9\u7528\u7A0B\u5E8F\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",children:[]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/debugging-solana-programs.html",pathLocale:"/",extraFields:[]},{title:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u5834\u666F",slug:"\u5834\u666F",children:[]},{level:2,title:"\u529F\u80FD\u72C0\u614B",slug:"\u529F\u80FD\u72C0\u614B",children:[]},{level:2,title:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66",slug:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66-1",children:[]},{level:2,title:"\u7C21\u55AE\u6F14\u793A",slug:"\u7C21\u55AE\u6F14\u793A",children:[{level:3,title:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",slug:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",children:[]},{level:3,title:"\u9078\u64C7\u6027\u529F\u80FD\u5DF2\u505C\u7528",slug:"\u9078\u64C7\u6027\u529F\u80FD\u5DF2\u505C\u7528",children:[]}]},{level:2,title:"\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",slug:"\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",children:[]},{level:2,title:"\u4EE5\u7DE8\u7A0B\u65B9\u5F0F\u9032\u884C\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",slug:"\u4EE5\u7DE8\u7A0B\u65B9\u5F0F\u9032\u884C\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",children:[]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/feature-parity-testing.html",pathLocale:"/",extraFields:[]},{title:"\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/guides/get-program-accounts.html",pathLocale:"/",extraFields:[]},{title:"\u5E8F\u5217\u6578\u64DA",headers:[{level:2,title:"\u8A2D\u7F6EBorsh\u5E8F\u5217\u5316",slug:"\u8A2D\u7F6Eborsh\u5E8F\u5217\u5316",children:[]},{level:2,title:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6236\u7AEF\u4E0A\u7684\u6307\u4EE4\u6578\u64DA",slug:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6236\u7AEF\u4E0A\u7684\u6307\u4EE4\u6578\u64DA",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316",slug:"\u5E8F\u5217\u5316-\u53CD\u5E8F\u5217\u5316",children:[]},{level:3,title:"\u7528\u6CD5",slug:"\u7528\u6CD5",children:[]}]},{level:2,title:"\u5982\u4F55\u5728\u5BA2\u6236\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",slug:"\u5982\u4F55\u5728\u5BA2\u6236\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",children:[]},{level:2,title:"Solana TS/JS \u5E38\u7528\u6620\u5C04",slug:"solana-ts-js-\u5E38\u7528\u6620\u5C04",children:[]},{level:2,title:"\u9AD8\u7D1A\u69CB\u9020",slug:"\u9AD8\u7D1A\u69CB\u9020",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/serialization.html",pathLocale:"/",extraFields:[]},{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u50B3\u7D71\u4EA4\u6613\uFF08Legacy Transactions\uFF09",slug:"\u50B3\u7D71\u4EA4\u6613-legacy-transactions",children:[]},{level:2,title:"\u50B3\u7D71\u6D88\u606F",slug:"\u50B3\u7D71\u6D88\u606F",children:[{level:3,title:"\u982D\u90E8",slug:"\u982D\u90E8",children:[]},{level:3,title:"\u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44",slug:"\u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44",children:[]},{level:3,title:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44",slug:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44",children:[]}]},{level:2,title:"\u50B3\u7D71\u4EA4\u6613\u7684\u554F\u984C",slug:"\u50B3\u7D71\u4EA4\u6613\u7684\u554F\u984C",children:[]},{level:2,title:"\u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)",slug:"\u5730\u5740\u67E5\u627E\u8868-address-lookeup-tables",children:[]},{level:2,title:"\u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0",slug:"\u7248\u672C\u5316\u4EA4\u6613-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7DCA\u6E4A\u6578\u7D44",slug:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7DCA\u6E4A\u6578\u7D44",children:[]},{level:3,title:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44",slug:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44-1",children:[]}]},{level:2,title:"RPC\u8B8A\u66F4",slug:"rpc\u8B8A\u66F4",children:[]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]},{level:2,title:"\u53C3\u8003\u8CC7\u6599",slug:"\u53C3\u8003\u8CC7\u6599",children:[]}],path:"/zh_t/guides/versioned-transactions.html",pathLocale:"/",extraFields:[]},{title:"\u8CEC\u6236",headers:[{level:2,title:"\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236",slug:"\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u8A08\u7B97\u8CEC\u6236\u8CBB\u7528",slug:"\u5982\u4F55\u8A08\u7B97\u8CEC\u6236\u8CBB\u7528",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u7A2E\u5B50\u5275\u5EFA\u8CEC\u6236",slug:"\u5982\u4F55\u4F7F\u7528\u7A2E\u5B50\u5275\u5EFA\u8CEC\u6236",children:[{level:3,title:"\u751F\u6210",slug:"\u751F\u6210",children:[]},{level:3,title:"\u5275\u5EFA",slug:"\u5275\u5EFA",children:[]},{level:3,title:"\u8F49\u8CEC",slug:"\u8F49\u8CEC",children:[]}]},{level:2,title:"\u5982\u4F55\u5275\u5EFAPDA",slug:"\u5982\u4F55\u5275\u5EFApda",children:[{level:3,title:"\u751F\u6210\u4E00\u500BPDA",slug:"\u751F\u6210\u4E00\u500Bpda",children:[]},{level:3,title:"\u5275\u5EFA\u4E00\u500BPDA",slug:"\u5275\u5EFA\u4E00\u500Bpda",children:[]}]},{level:2,title:"\u5982\u4F55\u4F7F\u7528PDA\u7C3D\u540D",slug:"\u5982\u4F55\u4F7F\u7528pda\u7C3D\u540D",children:[{level:3,title:"\u7A0B\u5E8F",slug:"\u7A0B\u5E8F-1",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF",slug:"\u5BA2\u6237\u7AEF",children:[]}]},{level:2,title:"\u5982\u4F55\u7372\u53D6\u7A0B\u5E8F\u8CEC\u6236",slug:"\u5982\u4F55\u7372\u53D6\u7A0B\u5E8F\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u95DC\u9589\u8CEC\u6236",slug:"\u5982\u4F55\u95DC\u9589\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u7372\u53D6\u8CEC\u6236\u9918\u984D",slug:"\u5982\u4F55\u7372\u53D6\u8CEC\u6236\u9918\u984D",children:[]}],path:"/zh_t/references/accounts.html",pathLocale:"/",extraFields:[]},{title:"\u767C\u9001\u4EA4\u6613",headers:[{level:2,title:"\u5982\u4F55\u767C\u9001SOL",slug:"\u5982\u4F55\u767C\u9001sol",children:[]},{level:2,title:"\u5982\u4F55\u767C\u9001SPL-\u4EE3\u5E63",slug:"\u5982\u4F55\u767C\u9001spl-\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u8A08\u7B97\u4EA4\u6613\u6210\u672C",slug:"\u5982\u4F55\u8A08\u7B97\u4EA4\u6613\u6210\u672C",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5099\u8A3B",slug:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5099\u8A3B",children:[]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8A08\u7B97\u9810\u7B97\u3001\u8CBB\u7528\u548C\u512A\u5148\u7D1A",slug:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8A08\u7B97\u9810\u7B97\u3001\u8CBB\u7528\u548C\u512A\u5148\u7D1A",children:[]}],path:"/zh_t/references/basic-transactions.html",pathLocale:"/",extraFields:[]},{title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",slug:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",children:[]},{level:2,title:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",slug:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",children:[{level:3,title:"\u53CD\u61C9",slug:"\u53CD\u61C9",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/zh_t/references/keypairs-and-wallets.html",pathLocale:"/",extraFields:[]},{title:"\u672C\u5730\u958B\u767C",headers:[{level:2,title:"\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668",slug:"\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668",children:[]},{level:2,title:"\u9023\u63A5\u5230\u4E0D\u540C\u74B0\u5883",slug:"\u9023\u63A5\u5230\u4E0D\u540C\u74B0\u5883",children:[]},{level:2,title:"\u8A02\u95B1\u4E8B\u4EF6",slug:"\u8A02\u95B1\u4E8B\u4EF6",children:[]},{level:2,title:"\u7372\u53D6\u6E2C\u8A66\u7528\u7684SOL",slug:"\u7372\u53D6\u6E2C\u8A66\u7528\u7684sol",children:[]},{level:2,title:"\u4F7F\u7528\u4E3B\u7DB2 \uFF08Mainnet) \u8CEC\u6236\u548C\u7A0B\u5E8F",slug:"\u4F7F\u7528\u4E3B\u7DB2-mainnet-\u8CEC\u6236\u548C\u7A0B\u5E8F",children:[{level:3,title:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u8CEC\u6236",slug:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u8CEC\u6236",children:[]},{level:3,title:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u7A0B\u5E8F",slug:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u7A0B\u5E8F",children:[]}]}],path:"/zh_t/references/local-development.html",pathLocale:"/",extraFields:[]},{title:"\u547D\u540D\u670D\u52D9",headers:[{level:2,title:"\u540D\u7A31\u8A3B\u518A\u8868",slug:"\u540D\u7A31\u8A3B\u518A\u8868",children:[]},{level:2,title:"\u89E3\u6790SOL\u57DF\u540D",slug:"\u89E3\u6790sol\u57DF\u540D",children:[]},{level:2,title:"\u53CD\u5411\u67E5\u627E",slug:"\u53CD\u5411\u67E5\u627E",children:[]},{level:2,title:"\u5B50\u57DF\u540D\u67E5\u627E",slug:"\u5B50\u57DF\u540D\u67E5\u627E",children:[]},{level:2,title:"\u67E5\u627E\u7531\u516C\u9470\u64C1\u6709\u7684\u6240\u6709\u57DF\u540D",slug:"\u67E5\u627E\u7531\u516C\u9470\u64C1\u6709\u7684\u6240\u6709\u57DF\u540D",children:[]},{level:2,title:"\u89E3\u6790\u4E00\u500BTwitter\u7528\u6236\u540D",slug:"\u89E3\u6790\u4E00\u500Btwitter\u7528\u6236\u540D",children:[]},{level:2,title:"Twitter\u7528\u6236\u540D\u7684\u53CD\u5411\u67E5\u627E",slug:"twitter\u7528\u6236\u540D\u7684\u53CD\u5411\u67E5\u627E",children:[]}],path:"/zh_t/references/name-service.html",pathLocale:"/",extraFields:[]},{title:"\u975E\u540C\u8CEA\u5316\u4EE3\u5E63 (NFTs)",headers:[{level:2,title:"\u5982\u4F55\u5275\u5EFA\u4E00\u500BNFT",slug:"\u5982\u4F55\u5275\u5EFA\u4E00\u500Bnft",children:[{level:3,title:"\u4E0A\u50B3\u5230 Arweave",slug:"\u4E0A\u50B3\u5230-arweave",children:[]},{level:3,title:"\u9444\u9020\uFF08Mint\uFF09\u8A72 NFT",slug:"\u9444\u9020-mint-\u8A72-nft",children:[]}]},{level:2,title:"\u5982\u4F55\u7372\u53D6 NFT \u5143\u6578\u64DA",slug:"\u5982\u4F55\u7372\u53D6-nft-\u5143\u6578\u64DA",children:[]},{level:2,title:"\u5982\u4F55\u7372\u53D6NFT\u7684\u6240\u6709\u8005",slug:"\u5982\u4F55\u7372\u53D6nft\u7684\u6240\u6709\u8005",children:[]},{level:2,title:"\u5982\u4F55\u7372\u53D6 NFT \u7684\u9444\u5E63\u5730\u5740",slug:"\u5982\u4F55\u7372\u53D6-nft-\u7684\u9444\u5E63\u5730\u5740",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u5982\u4F55\u5F9E\u9322\u5305\u7372\u53D6\u6240\u6709 NFT\uFF1F",slug:"\u5982\u4F55\u5F9E\u9322\u5305\u7372\u53D6\u6240\u6709-nft",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"\u5982\u4F55\u5275\u5EFACandy Machine",slug:"\u5982\u4F55\u5275\u5EFAcandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u522A\u9664Candy Machine",slug:"\u5982\u4F55\u522A\u9664candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u904E\u6B0A\u9650\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u904E\u6B0A\u9650\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u904E\u9322\u5305\u5730\u5740\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u904E\u9322\u5305\u5730\u5740\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u904ECandy Machine\u7684\u5730\u5740\u67E5\u627E\u5B83",slug:"\u5982\u4F55\u901A\u904Ecandy-machine\u7684\u5730\u5740\u67E5\u627E\u5B83",children:[]},{level:3,title:"\u5982\u4F55\u5F9ECandy Machine\u627E\u5230\u9444\u9020(mint)\u7684 NFT",slug:"\u5982\u4F55\u5F9Ecandy-machine\u627E\u5230\u9444\u9020-mint-\u7684-nft",children:[]},{level:3,title:"\u5982\u4F55\u5C07\u7269\u54C1\u63D2\u5165\u5230Candy Machine",slug:"\u5982\u4F55\u5C07\u7269\u54C1\u63D2\u5165\u5230candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u5F9ECandy Machine\u9444\u9020(Mint)\u4E00\u500B NFT",slug:"\u5982\u4F55\u5F9Ecandy-machine\u9444\u9020-mint-\u4E00\u500B-nft",children:[]}]}],path:"/zh_t/references/nfts.html",pathLocale:"/",extraFields:[]},{title:"\u767C\u9001\u96E2\u7DDA\u4EA4\u6613",headers:[{level:2,title:"\u7C3D\u7F72\u4EA4\u6613",slug:"\u7C3D\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u90E8\u5206\u7C3D\u7F72\u4EA4\u6613",slug:"\u90E8\u5206\u7C3D\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u8010\u4E45\u6027\u7684 Nonce",slug:"\u8010\u4E45\u6027\u7684-nonce",children:[{level:3,title:"\u5275\u5EFANonce\u8CEC\u6236",slug:"\u5275\u5EFAnonce\u8CEC\u6236",children:[]},{level:3,title:"\u7372\u53D6Nonce\u8CEC\u6236",slug:"\u7372\u53D6nonce\u8CEC\u6236",children:[]},{level:3,title:"\u4F7F\u7528Nonce\u8CEC\u6236",slug:"\u4F7F\u7528nonce\u8CEC\u6236",children:[]}]}],path:"/zh_t/references/offline-transactions.html",pathLocale:"/",extraFields:[]},{title:"\u7DE8\u5BEB\u7A0B\u5E8F",headers:[{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB SOL",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB-sol",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u7372\u53D6\u6642\u9418",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u7372\u53D6\u6642\u9418",children:[{level:3,title:"\u5728\u6307\u4EE4\u4E2D\u5C07\u6642\u9418\u4F5C\u7232\u4E00\u500B\u8CEC\u6236\u50B3\u905E",slug:"\u5728\u6307\u4EE4\u4E2D\u5C07\u6642\u9418\u4F5C\u7232\u4E00\u500B\u8CEC\u6236\u50B3\u905E",children:[]},{level:3,title:"\u5728\u6307\u4EE4\u5167\u90E8\u76F4\u63A5\u8A2A\u554F\u6642\u9418",slug:"\u5728\u6307\u4EE4\u5167\u90E8\u76F4\u63A5\u8A2A\u554F\u6642\u9418",children:[]}]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u8CEC\u6236\u5927\u5C0F",slug:"\u5982\u4F55\u66F4\u6539\u8CEC\u6236\u5927\u5C0F",children:[]},{level:2,title:"\u8DE8\u7A0B\u5E8F\u8ABF\u7528\u7684\u65B9\u6CD5",slug:"\u8DE8\u7A0B\u5E8F\u8ABF\u7528\u7684\u65B9\u6CD5",children:[]},{level:2,title:"\u5982\u4F55\u5275\u5EFAPDA",slug:"\u5982\u4F55\u5275\u5EFApda",children:[]},{level:2,title:"\u5982\u4F55\u8B80\u53D6\u8CEC\u6236",slug:"\u5982\u4F55\u8B80\u53D6\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u9A57\u8B49\u8CEC\u6236",slug:"\u5982\u4F55\u9A57\u8B49\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u5F9E\u4E00\u500B\u4EA4\u6613\u4E2D\u8B80\u53D6\u591A\u500B\u6307\u4EE4",slug:"\u5982\u4F55\u5F9E\u4E00\u500B\u4EA4\u6613\u4E2D\u8B80\u53D6\u591A\u500B\u6307\u4EE4",children:[]}],path:"/zh_t/references/programs.html",pathLocale:"/",extraFields:[]},{title:"\u8CEA\u62BC",headers:[{level:2,title:"\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668",slug:"\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668",children:[]},{level:2,title:"\u5275\u5EFA\u8CEA\u62BC\u8CEC\u6236",slug:"\u5275\u5EFA\u8CEA\u62BC\u8CEC\u6236",children:[]},{level:2,title:"\u59D4\u8A17\u8CEA\u62BC",slug:"\u59D4\u8A17\u8CEA\u62BC",children:[]},{level:2,title:"\u901A\u904E\u9A57\u8B49\u5668\u7372\u53D6\u59D4\u8A17\u4EBA",slug:"\u901A\u904E\u9A57\u8B49\u5668\u7372\u53D6\u59D4\u8A17\u4EBA",children:[]},{level:2,title:"\u505C\u7528\u8CEA\u62BC",slug:"\u505C\u7528\u8CEA\u62BC",children:[]},{level:2,title:"\u63D0\u53D6\u8CEA\u62BC",slug:"\u63D0\u53D6\u8CEA\u62BC",children:[]},{level:2,title:"\u7372\u53D6\u8CEA\u62BC\u91D1\u984D",slug:"\u7372\u53D6\u8CEA\u62BC\u91D1\u984D",children:[]}],path:"/zh_t/references/staking.html",pathLocale:"/",extraFields:[]},{title:"\u8207\u4EE3\u5E63\u4E92\u52D5",headers:[{level:2,title:"\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528SPL\u4EE3\u5E63\uFF1F",slug:"\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528spl\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63",slug:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u9444\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u9444\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236\u7684\u9918\u984D",slug:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236\u7684\u9918\u984D",children:[]},{level:2,title:"\u5982\u4F55\u9444\u9020(mint)\u4EE3\u5E63",slug:"\u5982\u4F55\u9444\u9020-mint-\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u8F49\u79FB\u4EE3\u5E63",slug:"\u5982\u4F55\u8F49\u79FB\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u92B7\u4EE3\u5E63",slug:"\u5982\u4F55\u92B7\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u95DC\u9589\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u95DC\u9589\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u5728\u4EE3\u5E63\u8CEC\u6236\u6216\u9444\u5E63\u8CEC\u6236\u4E0A\u8A2D\u7F6E\u6B0A\u9650",slug:"\u5982\u4F55\u5728\u4EE3\u5E63\u8CEC\u6236\u6216\u9444\u5E63\u8CEC\u6236\u4E0A\u8A2D\u7F6E\u6B0A\u9650",children:[]},{level:2,title:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E63\u59D4\u8A17",slug:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E63\u59D4\u8A17",children:[]},{level:2,title:"\u5982\u4F55\u64A4\u92B7\u4EE3\u5E63\u59D4\u8A17",slug:"\u5982\u4F55\u64A4\u92B7\u4EE3\u5E63\u59D4\u8A17",children:[]},{level:2,title:"\u5982\u4F55\u7BA1\u7406\u5305\u88DD\u7684SOL",slug:"\u5982\u4F55\u7BA1\u7406\u5305\u88DD\u7684sol",children:[{level:3,title:"\u5275\u5EFA\u4EE3\u5E63\u8CEC\u6236",slug:"\u5275\u5EFA\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:3,title:"\u589E\u52A0\u9918\u984D",slug:"\u589E\u52A0\u9918\u984D",children:[]}]},{level:2,title:"\u5982\u4F55\u901A\u904E\u6240\u6709\u8005\u7372\u53D6\u6240\u6709\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u901A\u904E\u6240\u6709\u8005\u7372\u53D6\u6240\u6709\u4EE3\u5E63\u8CEC\u6236",children:[]}],path:"/zh_t/references/token.html",pathLocale:"/",extraFields:[]},{title:"",headers:[],path:"/404.html",pathLocale:"/",extraFields:[]}],zc=Ee(Cv),xv=()=>zc;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updateSearchIndex=e=>{zc.value=e});const Vv=/[^\x00-\x7F]/,Fv=e=>e.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t),Qa=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),Ya=(e,t)=>{const l=t.join(" "),n=Fv(e);if(Vv.test(e))return n.some(o=>l.toLowerCase().indexOf(o)>-1);const r=e.endsWith(" ");return new RegExp(n.map((o,s)=>n.length===s+1&&!r?`(?=.*\\b${Qa(o)})`:`(?=.*\\b${Qa(o)}\\b)`).join("")+".+","gi").test(l)},jv=({searchIndex:e,routeLocale:t,query:l,maxSuggestions:n})=>{const r=_e(()=>e.value.filter(i=>i.pathLocale===t.value));return _e(()=>{const i=l.value.trim().toLowerCase();if(!i)return[];const o=[],s=(c,u)=>{Ya(i,[u.title])&&o.push({link:`${c.path}#${u.slug}`,title:c.title,header:u.title});for(const d of u.children){if(o.length>=n.value)return;s(c,d)}};for(const c of r.value){if(o.length>=n.value)break;if(Ya(i,[c.title,...c.extraFields])){o.push({link:c.path,title:c.title});continue}for(const u of c.headers){if(o.length>=n.value)break;s(c,u)}}return o})},zv=e=>{const t=Ee(0);return{focusIndex:t,focusNext:()=>{t.value{t.value>0?t.value-=1:t.value=e.value.length-1}}},Nv=Me({name:"SearchBox",props:{locales:{type:Object,required:!1,default:()=>({})},hotKeys:{type:Array,required:!1,default:()=>[]},maxSuggestions:{type:Number,required:!1,default:5}},setup(e){const{locales:t,hotKeys:l,maxSuggestions:n}=yd(e),r=ln(),i=ji(),o=xv(),s=Ee(null),c=Ee(!1),u=Ee(""),d=_e(()=>{var w;return(w=t.value[i.value])!==null&&w!==void 0?w:{}}),v=jv({searchIndex:o,routeLocale:i,query:u,maxSuggestions:n}),{focusIndex:g,focusNext:b,focusPrev:m}=zv(v);Rv({input:s,hotKeys:l});const _=_e(()=>c.value&&!!v.value.length),f=()=>{!_.value||m()},y=()=>{!_.value||b()},P=w=>{if(!_.value)return;const L=v.value[w];!L||r.push(L.link).then(()=>{u.value="",g.value=0})};return()=>ee("form",{class:"search-box",role:"search"},[ee("input",{ref:s,type:"search",placeholder:d.value.placeholder,autocomplete:"off",spellcheck:!1,value:u.value,onFocus:()=>c.value=!0,onBlur:()=>c.value=!1,onInput:w=>u.value=w.target.value,onKeydown:w=>{switch(w.key){case"ArrowUp":{f();break}case"ArrowDown":{y();break}case"Enter":{w.preventDefault(),P(g.value);break}}}}),_.value&&ee("ul",{class:"suggestions",onMouseleave:()=>g.value=-1},v.value.map(({link:w,title:L,header:S},j)=>ee("li",{class:["suggestion",{focus:g.value===j}],onMouseenter:()=>g.value=j,onMousedown:()=>P(j)},ee("a",{href:w,onClick:D=>D.preventDefault()},[ee("span",{class:"page-title"},L),S&&ee("span",{class:"page-header"},`> ${S}`)]))))])}});const Mv={"/":{placeholder:"Search"},"/zh/":{placeholder:"\u641C\u7D22"},"/vi/":{placeholder:"T\xECm ki\u1EBFm"},"/th/":{placeholder:"\u0E04\u0E49\u0E19\u0E2B\u0E32"},"/fr/":{placeholder:"Rechercher"},"/pt/":{placeholder:"Buscar"},"/id/":{placeholder:"Cari"},"/kr/":{placeholder:"\uAC80\uC0C9"},"/ja/":{placeholder:"\u691C\u7D22"},"/fil/":{placeholder:"Maghanap"}},Hv=["s","/"],Bv=10;var Kv=At(({app:e})=>{e.component("SearchBox",t=>ee(Nv,xe({locales:Mv,hotKeys:Hv,maxSuggestions:Bv},t)))}),Uv=({app:e})=>{e.component("SolanaCodeGroup",h(()=>a(()=>Promise.resolve().then(function(){return i_}),void 0))),e.component("SolanaCodeGroupItem",h(()=>a(()=>Promise.resolve().then(function(){return u_}),void 0)))};/*! @docsearch/js 3.0.0-alpha.42 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function $l(e){return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(e)}function Wv(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}function Gr(){return Gr=Object.assign||function(e){for(var t=1;t=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}function Bn(e,t){return function(l){if(Array.isArray(l))return l}(e)||function(l,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(l)))){var r=[],i=!0,o=!1,s=void 0;try{for(var c,u=l[Symbol.iterator]();!(i=(c=u.next()).done)&&(r.push(c.value),!n||r.length!==n);i=!0);}catch(d){o=!0,s=d}finally{try{i||u.return==null||u.return()}finally{if(o)throw s}}return r}}(e,t)||Nc(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +See: https://github.com/francoischalifour/medium-zoom`)}},Sm=function(t){var l=document.createElement("div");return l.classList.add("medium-zoom-overlay"),l.style.background=t,l},Im=function(t){var l=t.getBoundingClientRect(),n=l.top,r=l.left,i=l.width,o=l.height,s=t.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,u=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;return s.removeAttribute("id"),s.style.position="absolute",s.style.top=n+c+"px",s.style.left=r+u+"px",s.style.width=i+"px",s.style.height=o+"px",s.style.transform="",s},Qt=function(t,l){var n=jt({bubbles:!1,cancelable:!1,detail:void 0},l);if(typeof window.CustomEvent=="function")return new CustomEvent(t,n);var r=document.createEvent("CustomEvent");return r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail),r},Rm=function e(t){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=window.Promise||function(A){function H(){}A(H,H)},r=function(A){var H=A.target;if(H===U){m();return}w.indexOf(H)!==-1&&_({target:H})},i=function(){if(!(S||!O.original)){var A=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(j-A)>D.scrollOffset&&setTimeout(m,150)}},o=function(A){var H=A.key||A.keyCode;(H==="Escape"||H==="Esc"||H===27)&&m()},s=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=A;if(A.background&&(U.style.background=A.background),A.container&&A.container instanceof Object&&(H.container=jt({},D.container,A.container)),A.template){var Y=kn(A.template)?A.template:document.querySelector(A.template);H.template=Y}return D=jt({},D,H),w.forEach(function(se){se.dispatchEvent(Qt("medium-zoom:update",{detail:{zoom:B}}))}),B},c=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e(jt({},D,A))},u=function(){for(var A=arguments.length,H=Array(A),Y=0;Y0?H.reduce(function(J,ne){return[].concat(J,Ua(ne))},[]):w;return se.forEach(function(J){J.classList.remove("medium-zoom-image"),J.dispatchEvent(Qt("medium-zoom:detach",{detail:{zoom:B}}))}),w=w.filter(function(J){return se.indexOf(J)===-1}),B},v=function(A,H){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return w.forEach(function(se){se.addEventListener("medium-zoom:"+A,H,Y)}),L.push({type:"medium-zoom:"+A,listener:H,options:Y}),B},g=function(A,H){var Y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return w.forEach(function(se){se.removeEventListener("medium-zoom:"+A,H,Y)}),L=L.filter(function(se){return!(se.type==="medium-zoom:"+A&&se.listener.toString()===H.toString())}),B},b=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=A.target,Y=function(){var J={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},ne=void 0,re=void 0;if(D.container)if(D.container instanceof Object)J=jt({},J,D.container),ne=J.width-J.left-J.right-D.margin*2,re=J.height-J.top-J.bottom-D.margin*2;else{var Pe=kn(D.container)?D.container:document.querySelector(D.container),Le=Pe.getBoundingClientRect(),Ae=Le.width,we=Le.height,Re=Le.left,He=Le.top;J=jt({},J,{width:Ae,height:we,left:Re,top:He})}ne=ne||J.width-D.margin*2,re=re||J.height-D.margin*2;var R=O.zoomedHd||O.original,K=Ka(R)?ne:R.naturalWidth||ne,z=Ka(R)?re:R.naturalHeight||re,W=R.getBoundingClientRect(),ue=W.top,me=W.left,ie=W.width,le=W.height,p=Math.min(K,ne)/ie,k=Math.min(z,re)/le,T=Math.min(p,k),I=(-me+(ne-ie)/2+D.margin+J.left)/T,C=(-ue+(re-le)/2+D.margin+J.top)/T,x="scale("+T+") translate3d("+I+"px, "+C+"px, 0)";O.zoomed.style.transform=x,O.zoomedHd&&(O.zoomedHd.style.transform=x)};return new n(function(se){if(H&&w.indexOf(H)===-1){se(B);return}var J=function Ae(){S=!1,O.zoomed.removeEventListener("transitionend",Ae),O.original.dispatchEvent(Qt("medium-zoom:opened",{detail:{zoom:B}})),se(B)};if(O.zoomed){se(B);return}if(H)O.original=H;else if(w.length>0){var ne=w;O.original=ne[0]}else{se(B);return}if(O.original.dispatchEvent(Qt("medium-zoom:open",{detail:{zoom:B}})),j=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,S=!0,O.zoomed=Im(O.original),document.body.appendChild(U),D.template){var re=kn(D.template)?D.template:document.querySelector(D.template);O.template=document.createElement("div"),O.template.appendChild(re.content.cloneNode(!0)),document.body.appendChild(O.template)}if(document.body.appendChild(O.zoomed),window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")}),O.original.classList.add("medium-zoom-image--hidden"),O.zoomed.classList.add("medium-zoom-image--opened"),O.zoomed.addEventListener("click",m),O.zoomed.addEventListener("transitionend",J),O.original.getAttribute("data-zoom-src")){O.zoomedHd=O.zoomed.cloneNode(),O.zoomedHd.removeAttribute("srcset"),O.zoomedHd.removeAttribute("sizes"),O.zoomedHd.src=O.zoomed.getAttribute("data-zoom-src"),O.zoomedHd.onerror=function(){clearInterval(Pe),console.warn("Unable to reach the zoom image target "+O.zoomedHd.src),O.zoomedHd=null,Y()};var Pe=setInterval(function(){O.zoomedHd.complete&&(clearInterval(Pe),O.zoomedHd.classList.add("medium-zoom-image--opened"),O.zoomedHd.addEventListener("click",m),document.body.appendChild(O.zoomedHd),Y())},10)}else if(O.original.hasAttribute("srcset")){O.zoomedHd=O.zoomed.cloneNode(),O.zoomedHd.removeAttribute("sizes"),O.zoomedHd.removeAttribute("loading");var Le=O.zoomedHd.addEventListener("load",function(){O.zoomedHd.removeEventListener("load",Le),O.zoomedHd.classList.add("medium-zoom-image--opened"),O.zoomedHd.addEventListener("click",m),document.body.appendChild(O.zoomedHd),Y()})}else Y()})},m=function(){return new n(function(A){if(S||!O.original){A(B);return}var H=function Y(){O.original.classList.remove("medium-zoom-image--hidden"),document.body.removeChild(O.zoomed),O.zoomedHd&&document.body.removeChild(O.zoomedHd),document.body.removeChild(U),O.zoomed.classList.remove("medium-zoom-image--opened"),O.template&&document.body.removeChild(O.template),S=!1,O.zoomed.removeEventListener("transitionend",Y),O.original.dispatchEvent(Qt("medium-zoom:closed",{detail:{zoom:B}})),O.original=null,O.zoomed=null,O.zoomedHd=null,O.template=null,A(B)};S=!0,document.body.classList.remove("medium-zoom--opened"),O.zoomed.style.transform="",O.zoomedHd&&(O.zoomedHd.style.transform=""),O.template&&(O.template.style.transition="opacity 150ms",O.template.style.opacity=0),O.original.dispatchEvent(Qt("medium-zoom:close",{detail:{zoom:B}})),O.zoomed.addEventListener("transitionend",H)})},_=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},H=A.target;return O.original?m():b({target:H})},f=function(){return D},y=function(){return w},P=function(){return O.original},w=[],L=[],S=!1,j=0,D=l,O={original:null,zoomed:null,zoomedHd:null,template:null};Object.prototype.toString.call(t)==="[object Object]"?D=t:(t||typeof t=="string")&&u(t),D=jt({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},D);var U=Sm(D.background);document.addEventListener("click",r),document.addEventListener("keyup",o),document.addEventListener("scroll",i),window.addEventListener("resize",m);var B={open:b,close:m,toggle:_,update:s,clone:c,attach:u,detach:d,on:v,off:g,getOptions:f,getImages:y,getZoomedImage:P};return B};function Cm(e,t){t===void 0&&(t={});var l=t.insertAt;if(!(!e||typeof document=="undefined")){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",l==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}var xm=".medium-zoom-overlay{position:fixed;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;cursor:pointer;cursor:zoom-out;will-change:transform}";Cm(xm);var Vm=Rm;const Fm=Symbol("mediumZoom");const jm=".theme-default-content > img, .theme-default-content :not(a) > img",zm={},Nm=300;var Mm=At(({app:e,router:t})=>{const l=Vm(zm);l.refresh=(n=jm)=>{l.detach(),l.attach(n)},e.provide(Fm,l),t.afterEach(()=>{setTimeout(()=>l.refresh(),Nm)})});const Hm={logo:"/solana_cookbook_lightmode.svg",logoDark:"/solana_cookbook_darkmode.svg",contributors:!0,algolia:{apiKey:"1831a64a81ffef4f85d5c0aa28cb801f",indexName:"solanacookbook",appId:"QMKSKREFKN",algoliaOptions:{hitsPerPage:10}},locales:{"/":{navbar:[{text:"Contribute",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Getting Started",children:["/","/getting-started/installation.md"]},{text:"Core Concepts",children:["/core-concepts/accounts.md","/core-concepts/programs.md","/core-concepts/transactions.md","/core-concepts/pdas.md","/core-concepts/cpi.md"]},{text:"Guides",children:["/guides/get-program-accounts.md","/guides/serialization.md","/guides/data-migration.md","/guides/account-maps.md","/guides/debugging-solana-programs.md","/guides/feature-parity-testing.md","/guides/versioned-transactions.md"]},{text:"References",children:["/references/local-development.md","/references/keypairs-and-wallets.md","/references/basic-transactions.md","/references/accounts.md","/references/programs.md","/references/token.md","/references/staking.md","/references/nfts.md","/references/offline-transactions.md","/references/name-service.md",{text:"Gaming",collapsible:!0,children:["/gaming/intro.md","/gaming/game-sdks.md","/gaming/nfts-in-games.md","/gaming/hello-world.md","/gaming/store-sol-in-pda.md","/gaming/saving-game-state.md","/gaming/energy-system.md","/gaming/interact-with-tokens.md","/gaming/porting-anchor-to-unity.md","/gaming/distribution.md","/gaming/game-examples.md"]}]}]},selectLanguageName:"English"},"/zh/":{selectLanguageName:"\u4E2D\u6587\uFF08\u7B80\u4F53\uFF09",navbar:[{text:"\u8D21\u732E\u4EE3\u7801",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:[{text:"\u5F00\u59CB\u4F7F\u7528",children:["/zh/","/zh/getting-started/installation.md"]},{text:"\u6838\u5FC3\u6982\u5FF5",children:["/zh/core-concepts/accounts.md","/zh/core-concepts/programs.md","/zh/core-concepts/transactions.md","/zh/core-concepts/pdas.md"]},{text:"\u6307\u5357",children:["/zh/guides/get-program-accounts.md","/zh/guides/serialization.md","/zh/guides/data-migration.md","/zh/guides/account-maps.md","/zh/guides/debugging-solana-programs.md","/zh/guides/feature-parity-testing.md"]},{text:"\u53C2\u8003",children:["/zh/references/local-development.md","/zh/references/keypairs-and-wallets.md","/zh/references/basic-transactions.md","/zh/references/accounts.md","/zh/references/programs.md","/zh/references/token.md","/zh/references/anchor.md","/zh/references/staking.md","/zh/references/nfts.md","/zh/references/offline-transactions.md","/zh/references/name-service.md"]}]},"/zh_t/":{selectLanguageName:"\u4E2D\u6587\uFF08\u7E41\u4F53\uFF09",navbar:[{text:"\u8CA2\u737B\u4EE3\u78BC",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:[{text:"\u958B\u59CB\u4F7F\u7528",children:["/zh_t/","/zh_t/getting-started/installation.md"]},{text:"\u6838\u5FC3\u6982\u5FF5",children:["/zh_t/core-concepts/accounts.md","/zh_t/core-concepts/programs.md","/zh_t/core-concepts/transactions.md","/zh_t/core-concepts/pdas.md"]},{text:"\u6307\u5357",children:["/zh_t/guides/get-program-accounts.md","/zh_t/guides/serialization.md","/zh_t/guides/data-migration.md","/zh_t/guides/account-maps.md","/zh_t/guides/debugging-solana-programs.md","/zh_t/guides/feature-parity-testing.md"]},{text:"\u53C3\u8003",children:["/zh_t/references/local-development.md","/zh_t/references/keypairs-and-wallets.md","/zh_t/references/basic-transactions.md","/zh_t/references/accounts.md","/zh_t/references/programs.md","/zh_t/references/token.md","/zh_t/references/anchor.md","/zh_t/references/staking.md","/zh_t/references/nfts.md","/zh_t/references/offline-transactions.md","/zh_t/references/name-service.md"]}]},"/es/":{selectLanguageName:"Spanish",navbar:[{text:"Contribuir",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Primeros pasos",children:["/es/","/es/getting-started/installation.md"]},{text:"Conceptos clave",children:["/es/core-concepts/accounts.md","/es/core-concepts/programs.md","/es/core-concepts/transactions.md","/es/core-concepts/pdas.md"]},{text:"Gu\xEDas",children:["/es/guides/get-program-accounts.md","/es/guides/serialization.md","/es/guides/data-migration.md","/es/guides/account-maps.md","/es/guides/debugging-solana-programs.md","/es/guides/feature-parity-testing.md"]},{text:"Referencias",children:["/es/references/local-development.md","/es/references/keypairs-and-wallets.md","/es/references/basic-transactions.md","/es/references/accounts.md","/es/references/programs.md","/es/references/token.md","/es/references/staking.md","/es/references/nfts.md","/es/references/offline-transactions.md","/es/references/name-service.md"]}]}},"/de/":{selectLanguageName:"Deutsch",navbar:[{text:"Kontributor",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"F\xFCr Beginner",children:["/de/","/de/getting-started/installation.md"]},{text:"Fundamentale Konzepte",children:["/de/core-concepts/accounts.md","/de/core-concepts/programs.md","/de/core-concepts/transactions.md","/de/core-concepts/pdas.md"]},{text:"Guides",children:["/de/guides/get-program-accounts.md","/de/guides/serialization.md","/de/guides/data-migration.md","/de/guides/account-maps.md","/de/guides/debugging-solana-programs.md","/de/guides/feature-parity-testing.md"]},{text:"Referenzen",children:["/de/references/local-development.md","/de/references/keypairs-and-wallets.md","/de/references/basic-transactions.md","/de/references/accounts.md","/de/references/programs.md","/de/references/token.md","/de/references/staking.md","/de/references/nfts.md","/de/references/offline-transactions.md","/de/references/name-service.md"]}]}},"/vi/":{selectLanguageName:"Ti\u1EBFng Vi\u1EC7t",navbar:[{text:"\u0110\xF3ng g\xF3p",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/vi/":[{text:"M\u1EDF \u0111\u1EA7u",children:["/vi/","/vi/getting-started/installation.md"]},{text:"Kh\xE1i ni\u1EC7m c\u0103n b\u1EA3n",children:["/vi/core-concepts/accounts.md","/vi/core-concepts/programs.md","/vi/core-concepts/transactions.md","/vi/core-concepts/pdas.md"]},{text:"H\u01B0\u1EDBng d\u1EABn",children:["/vi/guides/get-program-accounts.md","/vi/guides/serialization.md","/vi/guides/data-migration.md","/vi/guides/account-maps.md","/vi/guides/debugging-solana-programs.md","/vi/guides/feature-parity-testing.md"]},{text:"Tham kh\u1EA3o",children:["/vi/references/local-development.md","/vi/references/keypairs-and-wallets.md","/vi/references/basic-transactions.md","/vi/references/accounts.md","/vi/references/programs.md","/vi/references/token.md","/vi/references/staking.md","/vi/references/nfts.md","/vi/references/offline-transactions.md","/vi/references/name-service.md"]}]}},"/th/":{selectLanguageName:"\u0E44\u0E17\u0E22",navbar:[{text:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/th/":[{text:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",children:["/th/","/th/getting-started/installation.md"]},{text:"\u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E2B\u0E25\u0E31\u0E01",children:["/th/core-concepts/accounts.md","/th/core-concepts/programs.md","/th/core-concepts/transactions.md","/th/core-concepts/pdas.md"]},{text:"\u0E41\u0E19\u0E27\u0E17\u0E32\u0E07",children:["/th/guides/get-program-accounts.md","/th/guides/serialization.md","/th/guides/data-migration.md","/th/guides/account-maps.md","/th/guides/debugging-solana-programs.md","/th/guides/feature-parity-testing.md","/th/guides/versioned-transactions.md"]},{text:"\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07",children:["/th/references/local-development.md","/th/references/keypairs-and-wallets.md","/th/references/basic-transactions.md","/th/references/accounts.md","/th/references/programs.md","/th/references/token.md","/th/references/staking.md","/th/references/nfts.md","/th/references/offline-transactions.md","/th/references/name-service.md"]}]}},"/fr/":{selectLanguageName:"Fran\xE7ais",navbar:[{text:"Contribuer",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/fr/":[{text:"Pour Commencer",children:["/fr/","/fr/getting-started/installation.md"]},{text:"Concepts Fondamentaux",children:["/fr/core-concepts/accounts.md","/fr/core-concepts/programs.md","/fr/core-concepts/transactions.md","/fr/core-concepts/pdas.md","/fr/core-concepts/cpi.md"]},{text:"Guides",children:["/fr/guides/get-program-accounts.md","/fr/guides/serialization.md","/fr/guides/data-migration.md","/fr/guides/account-maps.md","/fr/guides/debugging-solana-programs.md","/fr/guides/feature-parity-testing.md"]},{text:"R\xE9f\xE9rences",children:["/fr/references/local-development.md","/fr/references/keypairs-and-wallets.md","/fr/references/basic-transactions.md","/fr/references/accounts.md","/fr/references/programs.md","/fr/references/token.md","/fr/references/staking.md","/fr/references/nfts.md","/fr/references/offline-transactions.md","/fr/references/name-service.md",{text:"Gaming",collapsible:!0,children:["/fr/gaming/intro.md","/fr/gaming/game-sdks.md","/fr/gaming/nfts-in-games.md","/fr/gaming/hello-world.md","/fr/gaming/store-sol-in-pda.md","/fr/gaming/saving-game-state.md","/fr/gaming/energy-system.md","/fr/gaming/interact-with-tokens.md","/fr/gaming/porting-anchor-to-unity.md","/fr/gaming/distribution.md","/fr/gaming/game-examples.md"]}]}]}},"/id/":{selectLanguageName:"Bahasa Indonesia",navbar:[{text:"Kontribusi",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Memulai",children:["/id/","/id/getting-started/installation.md"]},{text:"Konsep Utama",children:["/id/core-concepts/accounts.md","/id/core-concepts/programs.md","/id/core-concepts/transactions.md","/id/core-concepts/pdas.md"]},{text:"Panduan",children:["/id/guides/get-program-accounts.md","/id/guides/serialization.md","/id/guides/data-migration.md","/id/guides/account-maps.md","/id/guides/debugging-solana-programs.md","/id/guides/feature-parity-testing.md"]},{text:"Referensi",children:["/id/references/local-development.md","/id/references/keypairs-and-wallets.md","/id/references/basic-transactions.md","/id/references/accounts.md","/id/references/programs.md","/id/references/token.md","/id/references/staking.md","/id/references/nfts.md","/id/references/offline-transactions.md","/id/references/name-service.md"]}]}},"/pt/":{selectLanguageName:"Portugu\xEAs",navbar:[{text:"Contribuir",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Primeiros pasos",children:["/pt/","/pt/getting-started/installation.md"]},{text:"Conceitos chaves",children:["/pt/core-concepts/accounts.md","/pt/core-concepts/programs.md","/pt/core-concepts/transactions.md","/pt/core-concepts/pdas.md"]},{text:"Guias",children:["/pt/guides/get-program-accounts.md","/pt/guides/serialization.md","/pt/guides/data-migration.md","/pt/guides/account-maps.md","/pt/guides/debugging-solana-programs.md","/pt/guides/feature-parity-testing.md"]},{text:"Refer\xEAncias",children:["/pt/references/local-development.md","/pt/references/keypairs-and-wallets.md","/pt/references/basic-transactions.md","/pt/references/accounts.md","/pt/references/programs.md","/pt/references/token.md","/pt/references/staking.md","/pt/references/nfts.md","/pt/references/offline-transactions.md","/pt/references/name-service.md"]}]}},"/tr/":{selectLanguageName:"T\xFCrk\xE7e",navbar:[{text:"Katk\u0131 yapmak",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/tr/":[{text:"Ba\u015Flarken",children:["/tr/","/tr/getting-started/installation.md"]},{text:"Temel Kavramlar",children:["/tr/core-concepts/accounts.md","/tr/core-concepts/programs.md","/tr/core-concepts/transactions.md","/tr/core-concepts/pdas.md"]},{text:"K\u0131lavuzlar",children:["/tr/guides/get-program-accounts.md","/tr/guides/serialization.md","/tr/guides/data-migration.md","/tr/guides/account-maps.md","/tr/guides/debugging-solana-programs.md","/tr/guides/feature-parity-testing.md"]},{text:"Referanslar",children:["/tr/references/local-development.md","/tr/references/keypairs-and-wallets.md","/tr/references/basic-transactions.md","/tr/references/accounts.md","/tr/references/programs.md","/tr/references/token.md","/tr/references/staking.md","/tr/references/nfts.md","/tr/references/offline-transactions.md","/tr/references/name-service.md"]}]}},"/kr/":{selectLanguageName:"\uD55C\uAD6D\uC5B4",navbar:[{text:"Contribute",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Getting Started",children:["/kr/","/kr/getting-started/installation.md"]},{text:"Core Concepts",children:["/kr/core-concepts/accounts.md","/kr/core-concepts/programs.md","/kr/core-concepts/transactions.md","/kr/core-concepts/pdas.md"]},{text:"Guides",children:["/kr/guides/get-program-accounts.md","/kr/guides/serialization.md","/kr/guides/data-migration.md","/kr/guides/account-maps.md","/kr/guides/debugging-solana-programs.md","/kr/guides/feature-parity-testing.md"]},{text:"References",children:["/kr/references/local-development.md","/kr/references/keypairs-and-wallets.md","/kr/references/basic-transactions.md","/kr/references/accounts.md","/kr/references/programs.md","/kr/references/token.md","/kr/references/staking.md","/kr/references/nfts.md","/kr/references/offline-transactions.md","/kr/references/name-service.md"]}]}},"/ja/":{selectLanguageName:"\u65E5\u672C\u8A9E",navbar:[{text:"\u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30C8",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"\u306F\u3058\u3081\u306B",children:["/ja/","/ja/getting-started/installation.md"]},{text:"\u30B3\u30A2\u30B3\u30F3\u30BB\u30D7\u30C8",children:["/ja/core-concepts/accounts.md","/ja/core-concepts/programs.md","/ja/core-concepts/transactions.md","/ja/core-concepts/pdas.md","/ja/core-concepts/cpi.md"]},{text:"\u30AC\u30A4\u30C9",children:["/ja/guides/get-program-accounts.md","/ja/guides/serialization.md","/ja/guides/data-migration.md","/ja/guides/account-maps.md","/ja/guides/debugging-solana-programs.md","/ja/guides/feature-parity-testing.md"]},{text:"\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9",children:["/ja/references/local-development.md","/ja/references/keypairs-and-wallets.md","/ja/references/basic-transactions.md","/ja/references/accounts.md","/ja/references/programs.md","/ja/references/token.md","/ja/references/staking.md","/ja/references/nfts.md","/ja/references/offline-transactions.md","/ja/references/name-service.md"]}]}},"/fil/":{selectLanguageName:"Filipino",navbar:[{text:"Pag-ambag",link:"https://github.com/solana-developers/solana-cookbook"}],sidebar:{"/":[{text:"Pagsisimula",children:["/fil/","/fil/getting-started/installation.md"]},{text:"Mga pangunahing konsepto",children:["/fil/core-concepts/accounts.md","/fil/core-concepts/programs.md","/fil/core-concepts/transactions.md","/fil/core-concepts/pdas.md"]},{text:"Mga Gabay",children:["/fil/guides/get-program-accounts.md","/fil/guides/serialization.md","/fil/guides/data-migration.md","/fil/guides/account-maps.md","/fil/guides/debugging-solana-programs.md","/fil/guides/feature-parity-testing.md"]},{text:"Mga sanggunian",children:["/fil/references/local-development.md","/fil/references/keypairs-and-wallets.md","/fil/references/basic-transactions.md","/fil/references/accounts.md","/fil/references/programs.md","/fil/references/token.md","/fil/references/staking.md","/fil/references/nfts.md","/fil/references/offline-transactions.md","/fil/references/name-service.md"]}]}}},navbar:[],darkMode:!0,repo:null,selectLanguageText:"Languages",selectLanguageAriaLabel:"Select language",sidebar:"auto",sidebarDepth:2,editLink:!0,editLinkText:"Edit this page",lastUpdated:!0,lastUpdatedText:"Last Updated",contributorsText:"Contributors",notFound:["There's nothing here.","How did we get here?","That's a Four-Oh-Four.","Looks like we've got some broken links."],backToHome:"Take me home",openInNewWindow:"open in new window",toggleDarkMode:"toggle dark mode",toggleSidebar:"toggle sidebar"},Sc=Ee(Hm),Bm=()=>Sc;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updateThemeData=e=>{Sc.value=e});const Ic=Symbol(""),Km=()=>{const e=Ie(Ic);if(!e)throw new Error("useThemeLocaleData() is called without provider.");return e},Um=(e,t)=>{var l;return xe(xe({},e),(l=e.locales)===null||l===void 0?void 0:l[t])};var Wm=At(({app:e})=>{const t=Bm(),l=e._context.provides[Fi],n=_e(()=>Um(t.value,l.value));e.provide(Ic,n),Object.defineProperties(e.config.globalProperties,{$theme:{get(){return t.value}},$themeLocale:{get(){return n.value}}})});const qm=Me({props:{type:{type:String,required:!1,default:"tip"},text:{type:String,required:!1,default:""},vertical:{type:String,required:!1,default:void 0}},setup(e){return(t,l)=>(tn(),Ai("span",{class:Pt(["badge",e.type]),style:Qn({verticalAlign:e.vertical})},[jn(t.$slots,"default",{},()=>[Di(xu(e.text),1)])],6))}});var $m=Me({name:"CodeGroup",setup(e,{slots:t}){const l=Ee(-1),n=Ee([]),r=(s=l.value)=>{s{s>0?l.value=s-1:l.value=n.value.length-1,n.value[l.value].focus()},o=(s,c)=>{s.key===" "||s.key==="Enter"?(s.preventDefault(),l.value=c):s.key==="ArrowRight"?(s.preventDefault(),r(c)):s.key==="ArrowLeft"&&(s.preventDefault(),i(c))};return()=>{var s;const c=(((s=t.default)===null||s===void 0?void 0:s.call(t))||[]).filter(u=>u.type.name==="CodeGroupItem").map(u=>(u.props===null&&(u.props={}),u));return c.length===0?null:(l.value<0||l.value>c.length-1?(l.value=c.findIndex(u=>u.props.active===""||u.props.active===!0),l.value===-1&&(l.value=0)):c.forEach((u,d)=>{u.props.active=d===l.value}),ee("div",{class:"code-group"},[ee("div",{class:"code-group__nav"},ee("ul",{class:"code-group__ul"},c.map((u,d)=>{const v=d===l.value;return ee("li",{class:"code-group__li"},ee("button",{ref:g=>{g&&(n.value[d]=g)},class:{"code-group__nav-tab":!0,"code-group__nav-tab-active":v},ariaPressed:v,ariaExpanded:v,onClick:()=>l.value=d,onKeydown:g=>o(g,d)},u.props.title))}))),c]))}}});const Gm=["aria-selected"],Jm=Me({name:"CodeGroupItem"}),Qm=Me(Dt(xe({},Jm),{props:{title:{type:String,required:!0},active:{type:Boolean,required:!1,default:!1}},setup(e){return(t,l)=>(tn(),Ai("div",{class:Pt(["code-group-item",{"code-group-item__active":e.active}]),"aria-selected":e.active},[jn(t.$slots,"default")],10,Gm))}}));function Rc(e){return Uu()?(Wu(e),!0):!1}const rn=typeof window!="undefined",Ym=e=>typeof e=="string",kr=()=>{};function Zm(e,t){function l(...n){e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})}return l}const Xm=e=>e();var Wa=Object.getOwnPropertySymbols,ev=Object.prototype.hasOwnProperty,tv=Object.prototype.propertyIsEnumerable,lv=(e,t)=>{var l={};for(var n in e)ev.call(e,n)&&t.indexOf(n)<0&&(l[n]=e[n]);if(e!=null&&Wa)for(var n of Wa(e))t.indexOf(n)<0&&tv.call(e,n)&&(l[n]=e[n]);return l};function nv(e,t,l={}){const n=l,{eventFilter:r=Xm}=n,i=lv(n,["eventFilter"]);return et(e,Zm(r,t),i)}function rv(e,t=!0){nc()?tt(e):t?e():Ei(e)}const Hn=rn?window:void 0;rn&&window.document;rn&&window.navigator;rn&&window.location;function iv(...e){let t,l,n,r;if(Ym(e[0])?([l,n,r]=e,t=Hn):[t,l,n,r]=e,!t)return kr;let i=kr;const o=et(()=>Bt(t),c=>{i(),c&&(c.addEventListener(l,n,r),i=()=>{c.removeEventListener(l,n,r),i=kr})},{immediate:!0,flush:"post"}),s=()=>{o(),i()};return Rc(s),s}function av(e,t={}){const{window:l=Hn}=t;let n;const r=Ee(!1),i=()=>{!l||(n||(n=l.matchMedia(e)),r.value=n.matches)};return rv(()=>{i(),n&&("addEventListener"in n?n.addEventListener("change",i):n.addListener(i),Rc(()=>{"removeEventListener"in i?n.removeEventListener("change",i):n.removeListener(i)}))}),r}const qr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},$r="__vueuse_ssr_handlers__";qr[$r]=qr[$r]||{};const ov=qr[$r];function sv(e,t){return ov[e]||t}function cv(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const uv={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))}};function dv(e,t,l,n={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,shallow:u,window:d=Hn,eventFilter:v,onError:g=P=>{console.error(P)}}=n,b=Bt(t),m=cv(b),_=(u?Os:Ee)(t),f=(r=n.serializer)!=null?r:uv[m];if(!l)try{l=sv("getDefaultStorage",()=>{var P;return(P=Hn)==null?void 0:P.localStorage})()}catch(P){g(P)}function y(P){if(!(!l||P&&P.key!==e))try{const w=P?P.newValue:l.getItem(e);w==null?(_.value=b,c&&b!==null&&l.setItem(e,f.write(b))):typeof w!="string"?_.value=w:_.value=f.read(w)}catch(w){g(w)}}return y(),d&&s&&iv(d,"storage",P=>setTimeout(()=>y(P),0)),l&&nv(_,()=>{try{_.value==null?l.removeItem(e):l.setItem(e,f.write(_.value))}catch(P){g(P)}},{flush:i,deep:o,eventFilter:v}),_}function hv(e){return av("(prefers-color-scheme: dark)",e)}var qa,$a;rn&&(window==null?void 0:window.navigator)&&((qa=window==null?void 0:window.navigator)==null?void 0:qa.platform)&&/iP(ad|hone|od)/.test(($a=window==null?void 0:window.navigator)==null?void 0:$a.platform);var gv=Object.defineProperty,Ga=Object.getOwnPropertySymbols,mv=Object.prototype.hasOwnProperty,vv=Object.prototype.propertyIsEnumerable,Ja=(e,t,l)=>t in e?gv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,pv=(e,t)=>{for(var l in t||(t={}))mv.call(t,l)&&Ja(e,l,t[l]);if(Ga)for(var l of Ga(t))vv.call(t,l)&&Ja(e,l,t[l]);return e};const fv={top:0,left:0,bottom:0,right:0,height:0,width:0};pv({text:""},fv);const Cc=Symbol(""),J_=()=>{const e=Ie(Cc);if(!e)throw new Error("useDarkMode() is called without provider.");return e},_v=()=>{const e=jc(),t=hv(),l=dv("vuepress-color-scheme","auto"),n=_e({get(){return e.value.darkMode?l.value==="auto"?t.value:l.value==="dark":!1},set(r){r===t.value?l.value="auto":l.value=r?"dark":"light"}});Kt(Cc,n),bv(n)},bv=e=>{const t=(l=e.value)=>{const n=window==null?void 0:window.document.querySelector("html");n==null||n.classList.toggle("dark",l)};tt(()=>{et(e,t,{immediate:!0})}),Li(()=>t())},xc=(...e)=>{const l=ln().resolve(...e),n=l.matched[l.matched.length-1];if(!(n!=null&&n.redirect))return l;const{redirect:r}=n,i=ae(r)?r(l):r,o=be(i)?{path:i}:i;return xc(xe({hash:l.hash,query:l.query,params:l.params},o))},yv=e=>{const t=xc(e);return{text:t.meta.title||e,link:t.name==="404"?e:t.fullPath}};let Er=null,Pl=null;const kv={wait:()=>Er,pending:()=>{Er=new Promise(e=>Pl=e)},resolve:()=>{Pl==null||Pl(),Er=null,Pl=null}},Ev=()=>kv,Vc=Symbol("sidebarItems"),Q_=()=>{const e=Ie(Vc);if(!e)throw new Error("useSidebarItems() is called without provider.");return e},Pv=()=>{const e=jc(),t=hm(),l=_e(()=>wv(t.value,e.value));Kt(Vc,l)},wv=(e,t)=>{var l,n,r,i;const o=(n=(l=e.sidebar)!==null&&l!==void 0?l:t.sidebar)!==null&&n!==void 0?n:"auto",s=(i=(r=e.sidebarDepth)!==null&&r!==void 0?r:t.sidebarDepth)!==null&&i!==void 0?i:2;return e.home||o===!1?[]:o==="auto"?Lv(s):te(o)?Fc(o,s):Ac(o)?Ov(o,s):[]},Tv=(e,t)=>({text:e.title,link:`#${e.slug}`,children:Mi(e.children,t)}),Mi=(e,t)=>t>0?e.map(l=>Tv(l,t-1)):[],Lv=e=>{const t=nn();return[{text:t.value.title,children:Mi(t.value.headers,e)}]},Fc=(e,t)=>{const l=Vi(),n=nn(),r=i=>{var o;let s;if(be(i)?s=yv(i):s=i,s.children)return Dt(xe({},s),{children:s.children.map(c=>r(c))});if(s.link===l.path){const c=((o=n.value.headers[0])===null||o===void 0?void 0:o.level)===1?n.value.headers[0].children:n.value.headers;return Dt(xe({},s),{children:Mi(c,t)})}return s};return e.map(i=>r(i))},Ov=(e,t)=>{var l;const n=Vi(),r=Dc(e,n.path),i=(l=e[r])!==null&&l!==void 0?l:[];return Fc(i,t)},jc=()=>Km();var Av=At(({app:e,router:t})=>{e.component("Badge",qm),e.component("CodeGroup",$m),e.component("CodeGroupItem",Qm),e.component("NavbarSearch",()=>{const n=e.component("Docsearch")||e.component("SearchBox");return n?ee(n):null});const l=t.options.scrollBehavior;t.options.scrollBehavior=async(...n)=>(await Ev().wait(),l(...n))});const Dv=e=>{if(window.dataLayer&&window.gtag)return;const t=document.createElement("script");t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,t.async=!0,document.head.appendChild(t),window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},gtag("js",new Date),gtag("config",e)},Sv="UA-213843360-1";var Iv=At(()=>{Dv(Sv)});const Rv=({input:e,hotKeys:t})=>{const l=n=>{!e.value||t.value.length===0||n.target===document.body&&t.value.includes(n.key)&&(e.value.focus(),n.preventDefault())};tt(()=>{document.addEventListener("keydown",l)}),lr(()=>{document.removeEventListener("keydown",l)})},Cv=[{title:"Cooking with Solana",headers:[{level:2,title:"Contributing",slug:"contributing",children:[]},{level:2,title:"How to Read the Cookbook",slug:"how-to-read-the-cookbook",children:[]}],path:"/",pathLocale:"/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/core-concepts/accounts.html",pathLocale:"/",extraFields:[]},{title:"Cross Program Invocations (CPIs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"CPI with\xA0invoke",slug:"cpi-with-invoke",children:[]},{level:3,title:"CPI with\xA0invoke_signed",slug:"cpi-with-invoke-signed",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/cpi.html",pathLocale:"/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interacting with PDAs",slug:"interacting-with-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/pdas.html",pathLocale:"/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/programs.html",pathLocale:"/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Fees",slug:"fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/core-concepts/transactions.html",pathLocale:"/",extraFields:[]},{title:"Cooking with Solana",headers:[{level:2,title:"Paano mag-ambag",slug:"paano-mag-ambag",children:[]},{level:2,title:"How to Read the Cookbook",slug:"how-to-read-the-cookbook",children:[]}],path:"/fil/",pathLocale:"/fil/",extraFields:[]},{title:"Kochen mit Solana",headers:[{level:2,title:"Beitragen",slug:"beitragen",children:[]},{level:2,title:"Wie man das Kochbuch liest",slug:"wie-man-das-kochbuch-liest",children:[]}],path:"/de/",pathLocale:"/de/",extraFields:[]},{title:"Libro de recetas de Solana",headers:[{level:2,title:"Contribuyendo",slug:"contribuyendo",children:[]},{level:2,title:"Como Leer el Cookbook",slug:"como-leer-el-cookbook",children:[]}],path:"/es/",pathLocale:"/es/",extraFields:[]},{title:"Solana Cookbook",headers:[{level:2,title:"Contribution",slug:"contribution",children:[]},{level:2,title:"Comment lire le Cookbook",slug:"comment-lire-le-cookbook",children:[]}],path:"/fr/",pathLocale:"/fr/",extraFields:[]},{title:"How to auto approve transactions",headers:[],path:"/gaming/auto-approve.html",pathLocale:"/",extraFields:[]},{title:"Distribution",headers:[{level:2,title:"Publishing Platforms",slug:"publishing-platforms",children:[]}],path:"/gaming/distribution.html",pathLocale:"/",extraFields:[]},{title:"Energy System",headers:[{level:2,title:"Anchor program",slug:"anchor-program",children:[{level:3,title:"Creating the player account",slug:"creating-the-player-account",children:[]},{level:3,title:"Choping trees",slug:"choping-trees",children:[]},{level:3,title:"Calculating the energy",slug:"calculating-the-energy",children:[]}]},{level:2,title:"Js client",slug:"js-client",children:[{level:3,title:"Create connection",slug:"create-connection",children:[]},{level:3,title:"Initialize player data",slug:"initialize-player-data",children:[]},{level:3,title:"Subscribe to account updates",slug:"subscribe-to-account-updates",children:[]},{level:3,title:"Calculate energy and show count down",slug:"calculate-energy-and-show-count-down",children:[]}]}],path:"/gaming/energy-system.html",pathLocale:"/",extraFields:[]},{title:"Learn By Example",headers:[{level:2,title:"Interact with Anchor Program from Unity",slug:"interact-with-anchor-program-from-unity",children:[]},{level:2,title:"Saving Sol in a PDA",slug:"saving-sol-in-a-pda",children:[]},{level:2,title:"On chain matchmaking",slug:"on-chain-matchmaking",children:[]},{level:2,title:"Use Solana Pay Qr codes to control a game",slug:"use-solana-pay-qr-codes-to-control-a-game",children:[]},{level:2,title:"Hide game state from other players",slug:"hide-game-state-from-other-players",children:[]},{level:2,title:"How to build a round based multiplayer game",slug:"how-to-build-a-round-based-multiplayer-game",children:[]},{level:2,title:"On Chain Chess",slug:"on-chain-chess",children:[]},{level:2,title:"Multiplayer Game using voting system",slug:"multiplayer-game-using-voting-system",children:[]},{level:2,title:"Entity component system example",slug:"entity-component-system-example",children:[]},{level:2,title:"Adventure killing monsters and gaining xp",slug:"adventure-killing-monsters-and-gaining-xp",children:[]},{level:2,title:"Real-time pvp on chain game",slug:"real-time-pvp-on-chain-game",children:[]}],path:"/gaming/game-examples.html",pathLocale:"/",extraFields:[]},{title:"Solana Gaming SDKs",headers:[{level:3,title:"Unity SDK",slug:"unity-sdk",children:[]},{level:3,title:"Unreal SDK",slug:"unreal-sdk",children:[]},{level:3,title:"Flutter",slug:"flutter",children:[]},{level:3,title:"Next.js/React + Anchor",slug:"next-js-react-anchor",children:[]},{level:3,title:"Python",slug:"python",children:[]},{level:3,title:"Native C#",slug:"native-c",children:[]}],path:"/gaming/game-sdks.html",pathLocale:"/",extraFields:[]},{title:"Hello World example",headers:[{level:2,title:"Getting started with your first Solana game",slug:"getting-started-with-your-first-solana-game",children:[]},{level:2,title:"Tiny Adventure",slug:"tiny-adventure",children:[{level:3,title:"Getting Started",slug:"getting-started",children:[]},{level:3,title:"Defining the Game Data Account",slug:"defining-the-game-data-account",children:[]},{level:3,title:"Initialize Instruction",slug:"initialize-instruction",children:[]},{level:3,title:"Move Left Instruction",slug:"move-left-instruction",children:[]},{level:3,title:"Move Right Instruction",slug:"move-right-instruction",children:[]},{level:3,title:"Build and Deploy",slug:"build-and-deploy",children:[]},{level:3,title:"Get Started with the Client",slug:"get-started-with-the-client",children:[]},{level:3,title:"Where to Go from Here",slug:"where-to-go-from-here",children:[]}]}],path:"/gaming/hello-world.html",pathLocale:"/",extraFields:[]},{title:"How interact with tokens in programs",headers:[{level:2,title:"Create, Mint, and Burn Tokens with Anchor",slug:"create-mint-and-burn-tokens-with-anchor",children:[{level:3,title:"Getting Started",slug:"getting-started",children:[]},{level:3,title:"Create Mint instruction",slug:"create-mint-instruction",children:[]},{level:3,title:"Init Player Instruction",slug:"init-player-instruction",children:[]},{level:3,title:"Kill Enemy Instruction",slug:"kill-enemy-instruction",children:[]},{level:3,title:"Heal Instruction",slug:"heal-instruction",children:[]},{level:3,title:"Build and Deploy",slug:"build-and-deploy",children:[]},{level:3,title:"Get Started with the Client",slug:"get-started-with-the-client",children:[]}]}],path:"/gaming/interact-with-tokens.html",pathLocale:"/",extraFields:[]},{title:"Introduction to Gaming on Solana",headers:[],path:"/gaming/intro.html",pathLocale:"/",extraFields:[]},{title:"Gaming with NFTs",headers:[{level:2,title:"Token gating with NFTs",slug:"token-gating-with-nfts",children:[]},{level:2,title:"Bonus Effects with NFTs",slug:"bonus-effects-with-nfts",children:[]},{level:2,title:"Using NFT Metadata for Player Stats",slug:"using-nft-metadata-for-player-stats",children:[]},{level:2,title:"Fusing NFTs Together",slug:"fusing-nfts-together",children:[]},{level:2,title:"Use 3D Nfts in a game",slug:"use-3d-nfts-in-a-game",children:[]},{level:2,title:"Customize NFTs with items and traits (Raindrops boots)",slug:"customize-nfts-with-items-and-traits-raindrops-boots",children:[]},{level:2,title:"How to create an NFT collection",slug:"how-to-create-an-nft-collection",children:[]}],path:"/gaming/nfts-in-games.html",pathLocale:"/",extraFields:[]},{title:"Port Anchor to Unity",headers:[{level:2,title:"Generating the Client",slug:"generating-the-client",children:[]},{level:2,title:"Building the Transaction in Unity C#",slug:"building-the-transaction-in-unity-c",children:[]}],path:"/gaming/porting-anchor-to-unity.html",pathLocale:"/",extraFields:[]},{title:"Saving game state",headers:[],path:"/gaming/saving-game-state.html",pathLocale:"/",extraFields:[]},{title:"Storing SOL in a PDA",headers:[{level:2,title:"Tiny Adventure Anchor Program - Part Two",slug:"tiny-adventure-anchor-program-part-two",children:[{level:3,title:"Getting Started",slug:"getting-started",children:[]},{level:3,title:"Defining the Chest Vault Account",slug:"defining-the-chest-vault-account",children:[]},{level:3,title:"Defining the Game Data Account",slug:"defining-the-game-data-account",children:[]},{level:3,title:"Initialize Level One Instruction",slug:"initialize-level-one-instruction",children:[]},{level:3,title:"Reset Level and Spawn Chest Instruction",slug:"reset-level-and-spawn-chest-instruction",children:[]},{level:3,title:"Move Right Instruction",slug:"move-right-instruction",children:[]},{level:3,title:"Build and Deploy",slug:"build-and-deploy",children:[]},{level:3,title:"Get Started with the Client",slug:"get-started-with-the-client",children:[]}]}],path:"/gaming/store-sol-in-pda.html",pathLocale:"/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/getting-started/installation.html",pathLocale:"/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/guides/account-maps.html",pathLocale:"/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"How can you migrate a program's data accounts?",slug:"how-can-you-migrate-a-program-s-data-accounts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Upgrading the Account",slug:"upgrading-the-account",children:[{level:3,title:"1. Add account conversion logic",slug:"_1-add-account-conversion-logic",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/data-migration.html",pathLocale:"/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Runtime Testing and Debugging in editor",slug:"runtime-testing-and-debugging-in-editor",children:[]},{level:2,title:"Local Validator Node Testing in editor",slug:"local-validator-node-testing-in-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/debugging-solana-programs.html",pathLocale:"/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parity Testing",slug:"parity-testing",children:[]},{level:2,title:"Simple Demonstration",slug:"simple-demonstration",children:[{level:3,title:"All features activated",slug:"all-features-activated",children:[]},{level:3,title:"Selective features deactivated",slug:"selective-features-deactivated",children:[]}]},{level:2,title:"Full Parity Testing",slug:"full-parity-testing",children:[]},{level:2,title:"Full Parity Testing Programmatically",slug:"full-parity-testing-programmatically",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/feature-parity-testing.html",pathLocale:"/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/guides/get-program-accounts.html",pathLocale:"/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"Setting up for Borsh Serialization",slug:"setting-up-for-borsh-serialization",children:[]},{level:2,title:"How to serialize instruction data on the client",slug:"how-to-serialize-instruction-data-on-the-client",children:[]},{level:2,title:"How to deserialize instruction data on the program",slug:"how-to-deserialize-instruction-data-on-the-program",children:[]},{level:2,title:"How to serialize account data on the program",slug:"how-to-serialize-account-data-on-the-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"How to deserialize account data on the client",slug:"how-to-deserialize-account-data-on-the-client",children:[]},{level:2,title:"Common Solana TS/JS Mappings",slug:"common-solana-ts-js-mappings",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/guides/serialization.html",pathLocale:"/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Legacy Transaction",slug:"legacy-transaction",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array of account addresses",slug:"compact-array-of-account-addresses",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions",children:[]}]},{level:2,title:"Issues with Legacy Transactions",slug:"issues-with-legacy-transactions",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Versioned Transactions: TransactionV0",slug:"versioned-transactions-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact array of address table lookups",slug:"compact-array-of-address-table-lookups",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions-1",children:[]}]},{level:2,title:"RPC Changes",slug:"rpc-changes",children:[]},{level:2,title:"Other Resources",slug:"other-resources",children:[]},{level:2,title:"References",slug:"references",children:[]}],path:"/guides/versioned-transactions.html",pathLocale:"/",extraFields:[]},{title:"Buku Panduan Solana",headers:[{level:2,title:"Cara untuk berkontribusi",slug:"cara-untuk-berkontribusi",children:[]},{level:2,title:"Cara untuk membaca Buku Panduan",slug:"cara-untuk-membaca-buku-panduan",children:[]}],path:"/id/",pathLocale:"/id/",extraFields:[]},{title:"Cooking with Solana",headers:[{level:2,title:"\u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3",slug:"\u30B3\u30F3\u30C8\u30EA\u30D2\u3099\u30E5\u30FC\u30B7\u30E7\u30F3",children:[]},{level:2,title:"Cookbook\u306E\u8AAD\u307F\u65B9",slug:"cookbook\u306E\u8AAD\u307F\u65B9",children:[]}],path:"/ja/",pathLocale:"/ja/",extraFields:[]},{title:"Cooking with Solana",headers:[{level:2,title:"Contributing",slug:"contributing",children:[]},{level:2,title:"How to Read the Cookbook",slug:"how-to-read-the-cookbook",children:[]}],path:"/kr/",pathLocale:"/kr/",extraFields:[]},{title:"Cozinhando com a Solana",headers:[{level:2,title:"Contribuindo",slug:"contribuindo",children:[]},{level:2,title:"Como Ler o Livro de Receitas",slug:"como-ler-o-livro-de-receitas",children:[]}],path:"/pt/",pathLocale:"/pt/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"How to create a system account",slug:"how-to-create-a-system-account",children:[]},{level:2,title:"How to calculate account cost",slug:"how-to-calculate-account-cost",children:[]},{level:2,title:"How to create accounts with seeds",slug:"how-to-create-accounts-with-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"How to create PDAs",slug:"how-to-create-pdas",children:[{level:3,title:"Generate a PDA",slug:"generate-a-pda",children:[]},{level:3,title:"Create a PDA",slug:"create-a-pda",children:[]}]},{level:2,title:"How to sign with a PDA",slug:"how-to-sign-with-a-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"How to get program accounts",slug:"how-to-get-program-accounts",children:[]},{level:2,title:"How to close accounts",slug:"how-to-close-accounts",children:[]},{level:2,title:"How to get account balance",slug:"how-to-get-account-balance",children:[]}],path:"/references/accounts.html",pathLocale:"/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"How to send SOL",slug:"how-to-send-sol",children:[]},{level:2,title:"How to send SPL-Tokens",slug:"how-to-send-spl-tokens",children:[]},{level:2,title:"How to calculate transaction cost",slug:"how-to-calculate-transaction-cost",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"How to add a memo to a transaction",slug:"how-to-add-a-memo-to-a-transaction",children:[]},{level:2,title:"How to change compute budget, fee, & priority for a transaction",slug:"how-to-change-compute-budget-fee-priority-for-a-transaction",children:[]}],path:"/references/basic-transactions.html",pathLocale:"/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/references/keypairs-and-wallets.html",pathLocale:"/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Starting a Local Validator",slug:"starting-a-local-validator",children:[]},{level:2,title:"Connecting to Environments",slug:"connecting-to-environments",children:[]},{level:2,title:"Subscribing to Events",slug:"subscribing-to-events",children:[]},{level:2,title:"Getting Test SOL",slug:"getting-test-sol",children:[]},{level:2,title:"Using Mainnet Accounts and Programs",slug:"using-mainnet-accounts-and-programs",children:[{level:3,title:"How to load accounts from mainnet",slug:"how-to-load-accounts-from-mainnet",children:[]},{level:3,title:"How to load programs from mainnet",slug:"how-to-load-programs-from-mainnet",children:[]}]}],path:"/references/local-development.html",pathLocale:"/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"Find all the domain names owned by a public key",slug:"find-all-the-domain-names-owned-by-a-public-key",children:[]},{level:2,title:"Resolve a Twitter handle",slug:"resolve-a-twitter-handle",children:[]},{level:2,title:"Reverse look up of a Twitter handle",slug:"reverse-look-up-of-a-twitter-handle",children:[]}],path:"/references/name-service.html",pathLocale:"/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"How to create an NFT",slug:"how-to-create-an-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint the NFT",slug:"mint-the-nft",children:[]}]},{level:2,title:"How to get NFT Metadata",slug:"how-to-get-nft-metadata",children:[]},{level:2,title:"How to get the owner of an NFT",slug:"how-to-get-the-owner-of-an-nft",children:[]},{level:2,title:"How to get NFT Mint Addresses",slug:"how-to-get-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"How to get all NFTs from a wallet?",slug:"how-to-get-all-nfts-from-a-wallet",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"How to create a Candy Machine",slug:"how-to-create-a-candy-machine",children:[]},{level:3,title:"How to delete a Candy Machine",slug:"how-to-delete-a-candy-machine",children:[]},{level:3,title:"How to find Candy Machine via authority",slug:"how-to-find-candy-machine-via-authority",children:[]},{level:3,title:"How to find Candy Machine using wallet address",slug:"how-to-find-candy-machine-using-wallet-address",children:[]},{level:3,title:"How to find Candy Machine using its address",slug:"how-to-find-candy-machine-using-its-address",children:[]},{level:3,title:"How to find minted NFTs from a Candy Machine",slug:"how-to-find-minted-nfts-from-a-candy-machine",children:[]},{level:3,title:"How to insert items into a Candy Machine",slug:"how-to-insert-items-into-a-candy-machine",children:[]},{level:3,title:"How to mint an NFT from a Candy Machine",slug:"how-to-mint-an-nft-from-a-candy-machine",children:[]}]}],path:"/references/nfts.html",pathLocale:"/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Sign Transaction",slug:"sign-transaction",children:[]},{level:2,title:"Partial Sign Transaction",slug:"partial-sign-transaction",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Create Nonce Account",slug:"create-nonce-account",children:[]},{level:3,title:"Get Nonce Account",slug:"get-nonce-account",children:[]},{level:3,title:"Use Nonce Account",slug:"use-nonce-account",children:[]}]}],path:"/references/offline-transactions.html",pathLocale:"/",extraFields:[]},{title:"Writing Programs",headers:[{level:2,title:"How to transfer SOL in a program",slug:"how-to-transfer-sol-in-a-program",children:[]},{level:2,title:"How to get clock in a program",slug:"how-to-get-clock-in-a-program",children:[{level:3,title:"Passing Clock as an account inside an instruction",slug:"passing-clock-as-an-account-inside-an-instruction",children:[]},{level:3,title:"Accessing Clock directly inside an instruction",slug:"accessing-clock-directly-inside-an-instruction",children:[]}]},{level:2,title:"How to change account size",slug:"how-to-change-account-size",children:[]},{level:2,title:"How to do Cross Program Invocation",slug:"how-to-do-cross-program-invocation",children:[]},{level:2,title:"How to create a PDA",slug:"how-to-create-a-pda",children:[]},{level:2,title:"How to read accounts",slug:"how-to-read-accounts",children:[]},{level:2,title:"How to verify accounts",slug:"how-to-verify-accounts",children:[]},{level:2,title:"How to read multiple instructions from a transaction",slug:"how-to-read-multiple-instructions-from-a-transaction",children:[]}],path:"/references/programs.html",pathLocale:"/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Get Current Validators",slug:"get-current-validators",children:[]},{level:2,title:"Create Stake Account",slug:"create-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"Get Delegator by Validators",slug:"get-delegator-by-validators",children:[]},{level:2,title:"Deactivate Stake",slug:"deactivate-stake",children:[]},{level:2,title:"Withdraw Stake",slug:"withdraw-stake",children:[]},{level:2,title:"Get Stake Amount",slug:"get-stake-amount",children:[]}],path:"/references/staking.html",pathLocale:"/",extraFields:[]},{title:"Interacting with Tokens",headers:[{level:2,title:"What do I need to get started with SPL-Tokens?",slug:"what-do-i-need-to-get-started-with-spl-tokens",children:[]},{level:2,title:"How to create a new Token",slug:"how-to-create-a-new-token",children:[]},{level:2,title:"How to get a token mint",slug:"how-to-get-a-token-mint",children:[]},{level:2,title:"How to create a token account",slug:"how-to-create-a-token-account",children:[]},{level:2,title:"How to get a Token Account",slug:"how-to-get-a-token-account",children:[]},{level:2,title:"How to get a token account's balance",slug:"how-to-get-a-token-account-s-balance",children:[]},{level:2,title:"How to mint tokens",slug:"how-to-mint-tokens",children:[]},{level:2,title:"How to transfer tokens",slug:"how-to-transfer-tokens",children:[]},{level:2,title:"How to burn tokens",slug:"how-to-burn-tokens",children:[]},{level:2,title:"How to close token accounts",slug:"how-to-close-token-accounts",children:[]},{level:2,title:"How to set authority on token accounts or mints",slug:"how-to-set-authority-on-token-accounts-or-mints",children:[]},{level:2,title:"How to approve a token delegate",slug:"how-to-approve-a-token-delegate",children:[]},{level:2,title:"How to revoke a token delegate",slug:"how-to-revoke-a-token-delegate",children:[]},{level:2,title:"How to manage wrapped SOL",slug:"how-to-manage-wrapped-sol",children:[{level:3,title:"Create Token Account",slug:"create-token-account",children:[]},{level:3,title:"Add Balance",slug:"add-balance",children:[]}]},{level:2,title:"How to get all token accounts by owner",slug:"how-to-get-all-token-accounts-by-owner",children:[]}],path:"/references/token.html",pathLocale:"/",extraFields:[]},{title:"Cooking \u0E01\u0E31\u0E1A Solana",headers:[{level:2,title:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",slug:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D",children:[]}],path:"/th/",pathLocale:"/th/",extraFields:[]},{title:"Solana Cookbook",headers:[{level:2,title:"Contributing (Nas\u0131l Katk\u0131 Verebilirsiniz?)",slug:"contributing-nas\u0131l-katk\u0131-verebilirsiniz",children:[]},{level:2,title:"How to Read the Cookbook (Cookbook Nas\u0131l Okunur?)",slug:"how-to-read-the-cookbook-cookbook-nas\u0131l-okunur",children:[]}],path:"/tr/",pathLocale:"/tr/",extraFields:[]},{title:"Nh\u1EADp m\xF4n Solana",headers:[{level:2,title:"\u0110\xF3ng g\xF3p",slug:"\u0111ong-gop",children:[]},{level:2,title:"C\u1EA5u tr\xFAc c\u1EE7a To\xE0n t\u1EADp Solana",slug:"cau-truc-cua-toan-tap-solana",children:[]},{level:2,title:"L\u1EDDi c\u1EE7a d\u1ECBch gi\u1EA3",slug:"loi-cua-dich-gia",children:[]}],path:"/vi/",pathLocale:"/vi/",extraFields:[]},{title:"Solana\u79D8\u7C4D",headers:[{level:2,title:"\u8D21\u732E\u4EE3\u7801",slug:"\u8D21\u732E\u4EE3\u7801",children:[]},{level:2,title:"\u5982\u4F55\u9605\u8BFBSolana\u79D8\u7C4D",slug:"\u5982\u4F55\u9605\u8BFBsolana\u79D8\u7C4D",children:[]}],path:"/zh/",pathLocale:"/zh/",extraFields:[]},{title:"Solana\u7955\u7C4D",headers:[{level:2,title:"\u8CA2\u737B\u4EE3\u78BC",slug:"\u8CA2\u737B\u4EE3\u78BC",children:[]},{level:2,title:"\u5982\u4F55\u95B1\u8B80Solana\u7955\u7C4D",slug:"\u5982\u4F55\u95B1\u8B80solana\u7955\u7C4D",children:[]}],path:"/zh_t/",pathLocale:"/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/fil/core-concepts/accounts.html",pathLocale:"/fil/",extraFields:[]},{title:"Cross Program Invocations (CPIs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"CPI with\xA0invoke",slug:"cpi-with-invoke",children:[]},{level:3,title:"CPI with\xA0invoke_signed",slug:"cpi-with-invoke-signed",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/cpi.html",pathLocale:"/fil/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interacting with PDAs",slug:"interacting-with-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/pdas.html",pathLocale:"/fil/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/programs.html",pathLocale:"/fil/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Fees",slug:"fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/core-concepts/transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"How to auto approve transactions",headers:[],path:"/fil/gaming/auto-approve.html",pathLocale:"/fil/",extraFields:[]},{title:"Distribution",headers:[{level:2,title:"Mga Platform sa Pag-publish",slug:"mga-platform-sa-pag-publish",children:[]}],path:"/fil/gaming/distribution.html",pathLocale:"/fil/",extraFields:[]},{title:"Energy System",headers:[{level:2,title:"Anchor program",slug:"anchor-program",children:[{level:3,title:"Paggawa ng player account",slug:"paggawa-ng-player-account",children:[]},{level:3,title:"Pagputol ng mga puno",slug:"pagputol-ng-mga-puno",children:[]},{level:3,title:"Kinakalkula ang enerhiya",slug:"kinakalkula-ang-enerhiya",children:[]}]},{level:2,title:"Js client",slug:"js-client",children:[{level:3,title:"Lumikha ng koneksyon",slug:"lumikha-ng-koneksyon",children:[]},{level:3,title:"Magsimula ng data ng player",slug:"magsimula-ng-data-ng-player",children:[]},{level:3,title:"Mag-subscribe sa mga update sa account",slug:"mag-subscribe-sa-mga-update-sa-account",children:[]},{level:3,title:"Kalkulahin ang enerhiya at ipakita ang count down",slug:"kalkulahin-ang-enerhiya-at-ipakita-ang-count-down",children:[]}]}],path:"/fil/gaming/energy-system.html",pathLocale:"/fil/",extraFields:[]},{title:"Learn By Example",headers:[{level:2,title:"Makipag-ugnayan sa Anchor Program mula sa Unity",slug:"makipag-ugnayan-sa-anchor-program-mula-sa-unity",children:[]},{level:2,title:"Pag-save ng Sol sa isang PDA",slug:"pag-save-ng-sol-sa-isang-pda",children:[]},{level:2,title:"Sa chain matchmaking",slug:"sa-chain-matchmaking",children:[]},{level:2,title:"Gumamit ng mga Solana Pay Qr code para makontrol ang isang laro",slug:"gumamit-ng-mga-solana-pay-qr-code-para-makontrol-ang-isang-laro",children:[]},{level:2,title:"Itago ang estado ng laro mula sa iba pang mga manlalaro",slug:"itago-ang-estado-ng-laro-mula-sa-iba-pang-mga-manlalaro",children:[]},{level:2,title:"Paano bumuo ng isang round based na multiplayer na laro",slug:"paano-bumuo-ng-isang-round-based-na-multiplayer-na-laro",children:[]},{level:2,title:"Sa Chain Chess",slug:"sa-chain-chess",children:[]},{level:2,title:"Larong Multiplayer gamit ang sistema ng pagboto",slug:"larong-multiplayer-gamit-ang-sistema-ng-pagboto",children:[]},{level:2,title:"Halimbawa ng sistema ng sangkap ng entity",slug:"halimbawa-ng-sistema-ng-sangkap-ng-entity",children:[]},{level:2,title:"Pakikipagsapalaran sa pagpatay ng mga halimaw at pagkakaroon ng xp",slug:"pakikipagsapalaran-sa-pagpatay-ng-mga-halimaw-at-pagkakaroon-ng-xp",children:[]},{level:2,title:"Real-time na pvp sa chain game",slug:"real-time-na-pvp-sa-chain-game",children:[]}],path:"/fil/gaming/game-examples.html",pathLocale:"/fil/",extraFields:[]},{title:"Solana Gaming SDKs",headers:[{level:3,title:"Unity SDK",slug:"unity-sdk",children:[]},{level:3,title:"Unreal SDK",slug:"unreal-sdk",children:[]},{level:3,title:"Flutter",slug:"flutter",children:[]},{level:3,title:"Next.js/React + Anchor",slug:"next-js-react-anchor",children:[]},{level:3,title:"Python",slug:"python",children:[]},{level:3,title:"Native C#",slug:"native-c",children:[]}],path:"/fil/gaming/game-sdks.html",pathLocale:"/fil/",extraFields:[]},{title:"Hello World example",headers:[{level:2,title:"Pagsisimula sa iyong unang laro ng Solana",slug:"pagsisimula-sa-iyong-unang-laro-ng-solana",children:[]},{level:2,title:"Tiny Adventure",slug:"tiny-adventure",children:[{level:3,title:"Pagsisimula",slug:"pagsisimula",children:[]},{level:3,title:"Pagtukoy sa Game Data Account",slug:"pagtukoy-sa-game-data-account",children:[]},{level:3,title:"Magsimula ng Instruksyon",slug:"magsimula-ng-instruksyon",children:[]},{level:3,title:"Ilipat ang Instruksyon sa Kaliwa",slug:"ilipat-ang-instruksyon-sa-kaliwa",children:[]},{level:3,title:"Pagtuturo sa Pakanan",slug:"pagtuturo-sa-pakanan",children:[]},{level:3,title:"I-build at I-deploy",slug:"i-build-at-i-deploy",children:[]},{level:3,title:"Magsimula sa Kliyente",slug:"magsimula-sa-kliyente",children:[]},{level:3,title:"Where to Go from Here",slug:"where-to-go-from-here",children:[]},{level:3,title:"Saan Pupunta Mula Dito",slug:"saan-pupunta-mula-dito",children:[]}]}],path:"/fil/gaming/hello-world.html",pathLocale:"/fil/",extraFields:[]},{title:"How interact with tokens in programs",headers:[{level:2,title:"Lumikha, Mint, at Mag-burn ng mga Token gamit ang Anchor",slug:"lumikha-mint-at-mag-burn-ng-mga-token-gamit-ang-anchor",children:[{level:3,title:"Pagsisimula",slug:"pagsisimula",children:[]},{level:3,title:"Lumikha ng pagtuturo ng Mint",slug:"lumikha-ng-pagtuturo-ng-mint",children:[]},{level:3,title:"Init Player Instruction",slug:"init-player-instruction",children:[]},{level:3,title:"Instruksyon ng Patayin ang Kaaway",slug:"instruksyon-ng-patayin-ang-kaaway",children:[]},{level:3,title:"Heal Instruction",slug:"heal-instruction",children:[]},{level:3,title:"Bumuo at I-deploy",slug:"bumuo-at-i-deploy",children:[]},{level:3,title:"Magsimula sa Kliyente",slug:"magsimula-sa-kliyente",children:[]}]}],path:"/fil/gaming/interact-with-tokens.html",pathLocale:"/fil/",extraFields:[]},{title:"Introduction to Gaming on Solana",headers:[],path:"/fil/gaming/intro.html",pathLocale:"/fil/",extraFields:[]},{title:"Gaming with NFTs",headers:[{level:2,title:"Token gating sa mga NFT",slug:"token-gating-sa-mga-nft",children:[]},{level:2,title:"Bonus Effects sa mga NFT",slug:"bonus-effects-sa-mga-nft",children:[]},{level:2,title:"Paggamit ng NFT Metadata para sa Player Stats",slug:"paggamit-ng-nft-metadata-para-sa-player-stats",children:[]},{level:2,title:"Pinagsasama-sama ang mga NFT",slug:"pinagsasama-sama-ang-mga-nft",children:[]},{level:2,title:"Gumamit ng 3D Nfts sa isang laro",slug:"gumamit-ng-3d-nfts-sa-isang-laro",children:[]},{level:2,title:"I-customize ang mga NFT gamit ang mga item at katangian (Mga patak ng ulan na bota)",slug:"i-customize-ang-mga-nft-gamit-ang-mga-item-at-katangian-mga-patak-ng-ulan-na-bota",children:[]},{level:2,title:"Paano lumikha ng isang koleksyon ng NFT",slug:"paano-lumikha-ng-isang-koleksyon-ng-nft",children:[]}],path:"/fil/gaming/nfts-in-games.html",pathLocale:"/fil/",extraFields:[]},{title:"Port Anchor to Unity",headers:[{level:2,title:"Pagbuo ng Kliyente",slug:"pagbuo-ng-kliyente",children:[]},{level:2,title:"Pagbuo ng Transaksyon sa Unity C#",slug:"pagbuo-ng-transaksyon-sa-unity-c",children:[]}],path:"/fil/gaming/porting-anchor-to-unity.html",pathLocale:"/fil/",extraFields:[]},{title:"Saving game state",headers:[],path:"/fil/gaming/saving-game-state.html",pathLocale:"/fil/",extraFields:[]},{title:"Storing SOL in a PDA",headers:[{level:2,title:"Tiny Adventure Anchor Program - Ikalawang Bahagi",slug:"tiny-adventure-anchor-program-ikalawang-bahagi",children:[{level:3,title:"Nagsisimula",slug:"nagsisimula",children:[]},{level:3,title:"Pagtukoy sa Chest Vault Account",slug:"pagtukoy-sa-chest-vault-account",children:[]},{level:3,title:"Pagtukoy sa Game Data Account",slug:"pagtukoy-sa-game-data-account",children:[]},{level:3,title:"Simulan ang Level One Instruction",slug:"simulan-ang-level-one-instruction",children:[]},{level:3,title:"I-reset ang Antas at Pagtuturo sa Dibdib ng Spawn",slug:"i-reset-ang-antas-at-pagtuturo-sa-dibdib-ng-spawn",children:[]},{level:3,title:"Pagtuturo sa Pakanan",slug:"pagtuturo-sa-pakanan",children:[]},{level:3,title:"Bumuo at I-deploy",slug:"bumuo-at-i-deploy",children:[]},{level:3,title:"Magsimula sa Kliyente",slug:"magsimula-sa-kliyente",children:[]}]}],path:"/fil/gaming/store-sol-in-pda.html",pathLocale:"/fil/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"I-install ang Web3.js",slug:"i-install-ang-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"I-install ang CLI",slug:"i-install-ang-cli",children:[{level:3,title:"macOS at Linux",slug:"macos-at-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bumuo Mula sa Source",slug:"bumuo-mula-sa-source",children:[]}]}],path:"/fil/getting-started/installation.html",pathLocale:"/fil/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Pagkuha ng mga PDA",slug:"pagkuha-ng-mga-pda",children:[]},{level:2,title:"Isang Account sa Mapa",slug:"isang-account-sa-mapa",children:[]}],path:"/fil/guides/account-maps.html",pathLocale:"/fil/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"Paano mo maililipat ang mga data account ng isang programa?",slug:"paano-mo-maililipat-ang-mga-data-account-ng-isang-programa",children:[]},{level:2,title:"Sitwasyon",slug:"sitwasyon",children:[]},{level:2,title:"Pag-upgrade ng Account",slug:"pag-upgrade-ng-account",children:[{level:3,title:"1. Magdagdag ng lohika ng conversion ng account",slug:"_1-magdagdag-ng-lohika-ng-conversion-ng-account",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/data-migration.html",pathLocale:"/fil/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"Mga Katotohanan",slug:"mga-katotohanan",children:[]},{level:2,title:"Runtime Testing at Debugging sa editor",slug:"runtime-testing-at-debugging-sa-editor",children:[]},{level:2,title:"Lokal na Validator Node Testing sa editor",slug:"lokal-na-validator-node-testing-sa-editor",children:[]},{level:2,title:"Lokal na Validator Node Testing mula sa Client Apps",slug:"lokal-na-validator-node-testing-mula-sa-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/debugging-solana-programs.html",pathLocale:"/fil/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"Mga Katotohanan",slug:"mga-katotohanan",children:[]},{level:2,title:"Sitwasyon",slug:"sitwasyon",children:[]},{level:2,title:"Katayuan ng Tampok",slug:"katayuan-ng-tampok",children:[]},{level:2,title:"Pagsubok sa Pagkakapantay-pantay",slug:"pagsubok-sa-pagkakapantay-pantay",children:[]},{level:2,title:"Simpleng Pagpapakita",slug:"simpleng-pagpapakita",children:[{level:3,title:"Na-activate ang lahat ng feature",slug:"na-activate-ang-lahat-ng-feature",children:[]},{level:3,title:"Na-deactivate ang mga piling feature",slug:"na-deactivate-ang-mga-piling-feature",children:[]}]},{level:2,title:"Buong Parity Testing",slug:"buong-parity-testing",children:[]},{level:2,title:"Buong Parity Testing sa pamamagitan ng pag-program",slug:"buong-parity-testing-sa-pamamagitan-ng-pag-program",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/feature-parity-testing.html",pathLocale:"/fil/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"mga filter",slug:"mga-filter",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/fil/guides/get-program-accounts.html",pathLocale:"/fil/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"Pagse-set up para sa Borsh Serialization",slug:"pagse-set-up-para-sa-borsh-serialization",children:[]},{level:2,title:"Paano i-serialize ang data ng pagtuturo sa kliyente",slug:"paano-i-serialize-ang-data-ng-pagtuturo-sa-kliyente",children:[]},{level:2,title:"Paano i-deserialize ang data ng instruction sa programa",slug:"paano-i-deserialize-ang-data-ng-instruction-sa-programa",children:[]},{level:2,title:"Paano i-serialize ang data ng account sa program",slug:"paano-i-serialize-ang-data-ng-account-sa-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Paggamit",slug:"paggamit",children:[]}]},{level:2,title:"Paano i-deserialize ang data ng account sa kliyente",slug:"paano-i-deserialize-ang-data-ng-account-sa-kliyente",children:[]},{level:2,title:"Mga Karaniwang Solana TS/JS Mappings",slug:"mga-karaniwang-solana-ts-js-mappings",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/fil/guides/serialization.html",pathLocale:"/fil/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Legacy na Transaksyon",slug:"legacy-na-transaksyon",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array ng mga address ng account",slug:"compact-array-ng-mga-address-ng-account",children:[]},{level:3,title:"Compact na hanay ng mga instruction",slug:"compact-na-hanay-ng-mga-instruction",children:[]}]},{level:2,title:"Mga Isyu sa Mga Legacy na Transaksyon",slug:"mga-isyu-sa-mga-legacy-na-transaksyon",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Mga Bersyon na Transaksyon: TransaksyonV0",slug:"mga-bersyon-na-transaksyon-transaksyonv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact na hanay ng mga paghahanap sa talahanayan ng address",slug:"compact-na-hanay-ng-mga-paghahanap-sa-talahanayan-ng-address",children:[]},{level:3,title:"Compact na hanay ng mga instruction",slug:"compact-na-hanay-ng-mga-instruction-1",children:[]}]},{level:2,title:"Mga Pagbabago sa RPC",slug:"mga-pagbabago-sa-rpc",children:[]},{level:2,title:"Other Resources",slug:"other-resources",children:[]},{level:2,title:"References",slug:"references",children:[]}],path:"/fil/guides/versioned-transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"How to create a system account",slug:"how-to-create-a-system-account",children:[]},{level:2,title:"Paano kalkulahin ang halaga ng account",slug:"paano-kalkulahin-ang-halaga-ng-account",children:[]},{level:2,title:"Paano gumawa ng mga account gamit ang mga buto",slug:"paano-gumawa-ng-mga-account-gamit-ang-mga-buto",children:[{level:3,title:"Bumuo",slug:"bumuo",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"Paano gumawa ng mga PDA",slug:"paano-gumawa-ng-mga-pda",children:[{level:3,title:"Bumuo ng PDA",slug:"bumuo-ng-pda",children:[]},{level:3,title:"Gumawa ng PDA",slug:"gumawa-ng-pda",children:[]}]},{level:2,title:"Paano mag-sign gamit ang isang PDA",slug:"paano-mag-sign-gamit-ang-isang-pda",children:[{level:3,title:"Programa",slug:"programa-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"Paano makakuha ng mga program account",slug:"paano-makakuha-ng-mga-program-account",children:[]},{level:2,title:"Paano isara ang mga account",slug:"paano-isara-ang-mga-account",children:[]},{level:2,title:"Paano makakuha ng balanse sa account",slug:"paano-makakuha-ng-balanse-sa-account",children:[]}],path:"/fil/references/accounts.html",pathLocale:"/fil/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"Paano magpadala ng SOL",slug:"paano-magpadala-ng-sol",children:[]},{level:2,title:"Paano magpadala ng mga SPL-Token",slug:"paano-magpadala-ng-mga-spl-token",children:[]},{level:2,title:"Paano kalkulahin ang gastos sa transaksyon",slug:"paano-kalkulahin-ang-gastos-sa-transaksyon",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Paano magdagdag ng memo sa isang transaksyon",slug:"paano-magdagdag-ng-memo-sa-isang-transaksyon",children:[]},{level:2,title:"Paano baguhin ang pagkalkula ng badyet, bayad, & priyoridad para sa isang transaksyon",slug:"paano-baguhin-ang-pagkalkula-ng-badyet-bayad-priyoridad-para-sa-isang-transaksyon",children:[]}],path:"/fil/references/basic-transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"Paano bumuo ng bagong Keypair",slug:"paano-bumuo-ng-bagong-keypair",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang lihim",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim",children:[]},{level:2,title:"Paano i-verify ang isang Keypair",slug:"paano-i-verify-ang-isang-keypair",children:[]},{level:2,title:"Paano tingnan kung ang isang pampublikong susi ay may nauugnay na pribadong susi",slug:"paano-tingnan-kung-ang-isang-pampublikong-susi-ay-may-nauugnay-na-pribadong-susi",children:[]},{level:2,title:"Paano bumuo ng isang mnemonic na parirala",slug:"paano-bumuo-ng-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang mnemonic na parirala",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano bumuo ng vanity address",slug:"paano-bumuo-ng-vanity-address",children:[]},{level:2,title:"Paano mag-sign at mag-verify ng mga mensahe gamit ang mga wallet",slug:"paano-mag-sign-at-mag-verify-ng-mga-mensahe-gamit-ang-mga-wallet",children:[]},{level:2,title:"Paano kumonekta sa isang wallet",slug:"paano-kumonekta-sa-isang-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/fil/references/keypairs-and-wallets.html",pathLocale:"/fil/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Pagsisimula ng Lokal na Validator",slug:"pagsisimula-ng-lokal-na-validator",children:[]},{level:2,title:"Kumokonekta sa Mga Environment",slug:"kumokonekta-sa-mga-environment",children:[]},{level:2,title:"Pag-subscribe sa Mga Kaganapan",slug:"pag-subscribe-sa-mga-kaganapan",children:[]},{level:2,title:"Pagkuha ng Test SOL",slug:"pagkuha-ng-test-sol",children:[]},{level:2,title:"Paggamit ng Mainnet Accounts at Programs",slug:"paggamit-ng-mainnet-accounts-at-programs",children:[{level:3,title:"Paano mag-load ng mga account mula sa mainnet",slug:"paano-mag-load-ng-mga-account-mula-sa-mainnet",children:[]},{level:3,title:"Paano mag-load ng mga programa mula sa mainnet",slug:"paano-mag-load-ng-mga-programa-mula-sa-mainnet",children:[]}]}],path:"/fil/references/local-development.html",pathLocale:"/fil/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Rehistro ng pangalan",slug:"rehistro-ng-pangalan",children:[]},{level:2,title:"Pag-resolve ng mga domain ng SOL",slug:"pag-resolve-ng-mga-domain-ng-sol",children:[]},{level:2,title:"Reverse lookup",slug:"reverse-lookup",children:[]},{level:2,title:"Hanapin ang subdomain",slug:"hanapin-ang-subdomain",children:[]},{level:2,title:"Hanapin ang lahat ng domain name na pagmamay-ari ng isang pampublikong key",slug:"hanapin-ang-lahat-ng-domain-name-na-pagmamay-ari-ng-isang-pampublikong-key",children:[]},{level:2,title:"Lutasin ang isang Twitter handle",slug:"lutasin-ang-isang-twitter-handle",children:[]},{level:2,title:"Baliktarin ang paghahanap ng isang Twitter handle",slug:"baliktarin-ang-paghahanap-ng-isang-twitter-handle",children:[]}],path:"/fil/references/name-service.html",pathLocale:"/fil/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"Paano lumikha ng isang NFT",slug:"paano-lumikha-ng-isang-nft",children:[{level:3,title:"I-upload sa Arweave",slug:"i-upload-sa-arweave",children:[]},{level:3,title:"Mint ang NFT",slug:"mint-ang-nft",children:[]}]},{level:2,title:"Paano makakuha ng NFT Metadata",slug:"paano-makakuha-ng-nft-metadata",children:[]},{level:2,title:"Paano makuha ang may-ari ng isang NFT",slug:"paano-makuha-ang-may-ari-ng-isang-nft",children:[]},{level:2,title:"Paano makakuha ng NFT Mint Address",slug:"paano-makakuha-ng-nft-mint-address",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Paano makukuha ang lahat ng NFT mula sa isang wallet?",slug:"paano-makukuha-ang-lahat-ng-nft-mula-sa-isang-wallet",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Paano gumawa ng Candy Machine",slug:"paano-gumawa-ng-candy-machine",children:[]},{level:3,title:"How to delete a Candy Machine",slug:"how-to-delete-a-candy-machine",children:[]},{level:3,title:"Paano makahanap ng Candy Machine sa pamamagitan ng awtoridad",slug:"paano-makahanap-ng-candy-machine-sa-pamamagitan-ng-awtoridad",children:[]},{level:3,title:"Paano makahanap ng Candy Machine gamit ang address ng wallet",slug:"paano-makahanap-ng-candy-machine-gamit-ang-address-ng-wallet",children:[]},{level:3,title:"Paano mahahanap ang Candy Machine gamit ang address nito",slug:"paano-mahahanap-ang-candy-machine-gamit-ang-address-nito",children:[]},{level:3,title:"How to find minted NFTs from a Candy Machine",slug:"how-to-find-minted-nfts-from-a-candy-machine",children:[]},{level:3,title:"How to insert items into a Candy Machine",slug:"how-to-insert-items-into-a-candy-machine",children:[]},{level:3,title:"Paano mag-mint ng NFT mula sa isang Candy Machine",slug:"paano-mag-mint-ng-nft-mula-sa-isang-candy-machine",children:[]}]}],path:"/fil/references/nfts.html",pathLocale:"/fil/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Mag-sign Transaksyon",slug:"mag-sign-transaksyon",children:[]},{level:2,title:"Bahagyang Sign Transaksyon",slug:"bahagyang-sign-transaksyon",children:[]},{level:2,title:"Matibay Nonce",slug:"matibay-nonce",children:[{level:3,title:"Lumikha ng Nonce Account",slug:"lumikha-ng-nonce-account",children:[]},{level:3,title:"Kumuha ng Nonce Account",slug:"kumuha-ng-nonce-account",children:[]},{level:3,title:"Gumamit ng Nonce Account",slug:"gumamit-ng-nonce-account",children:[]}]}],path:"/fil/references/offline-transactions.html",pathLocale:"/fil/",extraFields:[]},{title:"Writing Programs",headers:[{level:2,title:"Paano maglipat ng SOL sa isang programa",slug:"paano-maglipat-ng-sol-sa-isang-programa",children:[]},{level:2,title:"Paano makakuha ng orasan sa isang programa",slug:"paano-makakuha-ng-orasan-sa-isang-programa",children:[{level:3,title:"Pagpasa ng Orasan bilang isang account sa loob ng isang pagtuturo",slug:"pagpasa-ng-orasan-bilang-isang-account-sa-loob-ng-isang-pagtuturo",children:[]},{level:3,title:"Pag-access sa Orasan nang direkta sa loob ng isang pagtuturo",slug:"pag-access-sa-orasan-nang-direkta-sa-loob-ng-isang-pagtuturo",children:[]}]},{level:2,title:"Paano baguhin ang laki ng account",slug:"paano-baguhin-ang-laki-ng-account",children:[]},{level:2,title:"Paano gawin ang Cross Program Invocation",slug:"paano-gawin-ang-cross-program-invocation",children:[]},{level:2,title:"Paano gumawa ng PDA",slug:"paano-gumawa-ng-pda",children:[]},{level:2,title:"Paano magbasa ng mga account",slug:"paano-magbasa-ng-mga-account",children:[]},{level:2,title:"Paano i-verify ang mga account",slug:"paano-i-verify-ang-mga-account",children:[]},{level:2,title:"Paano magbasa ng maraming instruction mula sa isang transaksyon",slug:"paano-magbasa-ng-maraming-instruction-mula-sa-isang-transaksyon",children:[]}],path:"/fil/references/programs.html",pathLocale:"/fil/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Kumuha ng Mga Kasalukuyang Validator",slug:"kumuha-ng-mga-kasalukuyang-validator",children:[]},{level:2,title:"Gumawa ng Stake Account",slug:"gumawa-ng-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"Kumuha ng Delegator ng mga Validator",slug:"kumuha-ng-delegator-ng-mga-validator",children:[]},{level:2,title:"I-deactivate ang Stake",slug:"i-deactivate-ang-stake",children:[]},{level:2,title:"I-withdraw ang Stake",slug:"i-withdraw-ang-stake",children:[]}],path:"/fil/references/staking.html",pathLocale:"/fil/",extraFields:[]},{title:"Interacting with Tokens",headers:[{level:2,title:"Ano ang kailangan ko para makapagsimula sa SPL-Tokens?",slug:"ano-ang-kailangan-ko-para-makapagsimula-sa-spl-tokens",children:[]},{level:2,title:"Paano gumawa ng bagong Token",slug:"paano-gumawa-ng-bagong-token",children:[]},{level:2,title:"Paano makakuha ng token mint",slug:"paano-makakuha-ng-token-mint",children:[]},{level:2,title:"Paano gumawa ng token account",slug:"paano-gumawa-ng-token-account",children:[]},{level:2,title:"Paano makakuha ng Token Account",slug:"paano-makakuha-ng-token-account",children:[]},{level:2,title:"Paano makakuha ng balanse ng token account",slug:"paano-makakuha-ng-balanse-ng-token-account",children:[]},{level:2,title:"Paano mag-mint ng mga token",slug:"paano-mag-mint-ng-mga-token",children:[]},{level:2,title:"Paano maglipat ng mga token",slug:"paano-maglipat-ng-mga-token",children:[]},{level:2,title:"Paano magsunog ng mga token",slug:"paano-magsunog-ng-mga-token",children:[]},{level:2,title:"Paano isara ang mga token account",slug:"paano-isara-ang-mga-token-account",children:[]},{level:2,title:"Paano magtakda ng awtoridad sa mga token account o mints",slug:"paano-magtakda-ng-awtoridad-sa-mga-token-account-o-mints",children:[]},{level:2,title:"Paano mag-apruba ng token delegate",slug:"paano-mag-apruba-ng-token-delegate",children:[]},{level:2,title:"Paano bawiin ang isang token delegate",slug:"paano-bawiin-ang-isang-token-delegate",children:[]},{level:2,title:"Paano i-manage ang wrapped SOL",slug:"paano-i-manage-ang-wrapped-sol",children:[{level:3,title:"Lumikha ng Token Account",slug:"lumikha-ng-token-account",children:[]},{level:3,title:"Magdagdag ng Balanse",slug:"magdagdag-ng-balanse",children:[]}]},{level:2,title:"Paano makuha ang lahat ng token account ng may-ari",slug:"paano-makuha-ang-lahat-ng-token-account-ng-may-ari",children:[]}],path:"/fil/references/token.html",pathLocale:"/fil/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Accounts Model",slug:"accounts-model",children:[]},{level:3,title:"Miete",slug:"miete",children:[]}]},{level:2,title:"Andere Ressourcen",slug:"andere-ressourcen",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/de/core-concepts/accounts.html",pathLocale:"/de/",extraFields:[]},{title:"Programmabgeleitete Adressen (PDAs)",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interaktion mit PDAs",slug:"interaktion-mit-pdas",children:[]}]},{level:2,title:"Andere Quellen",slug:"andere-quellen",children:[]}],path:"/de/core-concepts/pdas.html",pathLocale:"/de/",extraFields:[]},{title:"Programme",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programme & Die Solana Programm Bibliothek (SPL - Solana Program Library)",slug:"native-programme-die-solana-programm-bibliothek-spl-solana-program-library",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Bereitstellen von Programmen",slug:"bereitstellen-von-programmen",children:[]}]},{level:2,title:"Weitere Quellen",slug:"weitere-quellen",children:[]}],path:"/de/core-concepts/programs.html",pathLocale:"/de/",extraFields:[]},{title:"Transaktionen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Geb\xFChren",slug:"gebuhren",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/de/core-concepts/transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Installieren von Web3.js",slug:"installieren-von-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Aus Quelle erstellen",slug:"aus-quelle-erstellen",children:[]}]}],path:"/de/getting-started/installation.html",pathLocale:"/de/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"So erstellen Sie ein Systemkonto",slug:"so-erstellen-sie-ein-systemkonto",children:[]},{level:2,title:"So berechnen Sie die Kontokosten",slug:"so-berechnen-sie-die-kontokosten",children:[]},{level:2,title:"So erstellen Sie Konten mit Seeds",slug:"so-erstellen-sie-konten-mit-seeds",children:[{level:3,title:"Generieren",slug:"generieren",children:[]},{level:3,title:"Erstellen",slug:"erstellen",children:[]},{level:3,title:"Transferieren",slug:"transferieren",children:[]}]},{level:2,title:"So erstellen Sie PDAs",slug:"so-erstellen-sie-pdas",children:[{level:3,title:"Generieren Sie einen PDA",slug:"generieren-sie-einen-pda",children:[]},{level:3,title:"Erstellen Sie einen PDA",slug:"erstellen-sie-einen-pda",children:[]}]},{level:2,title:"So signieren Sie mit einem PDA",slug:"so-signieren-sie-mit-einem-pda",children:[{level:3,title:"Programm",slug:"programm",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"So erhalten Sie Programmkonten",slug:"so-erhalten-sie-programmkonten",children:[]},{level:2,title:"So schlie\xDFen Sie Konten",slug:"so-schlie\xDFen-sie-konten",children:[]},{level:2,title:"So erhalten Sie den Kontostand",slug:"so-erhalten-sie-den-kontostand",children:[]}],path:"/de/references/accounts.html",pathLocale:"/de/",extraFields:[]},{title:"Transaktionen versenden",headers:[{level:2,title:"So senden Sie SPL-Tokens",slug:"so-senden-sie-spl-tokens",children:[]},{level:2,title:"So berechnen Sie die Transaktionskosten",slug:"so-berechnen-sie-die-transaktionskosten",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"So f\xFCgen Sie einer Transaktion eine Notiz hinzu",slug:"so-fugen-sie-einer-transaktion-eine-notiz-hinzu",children:[]},{level:2,title:"So \xE4ndern Sie das Computing-Budget, die Geb\xFChr & Priorit\xE4t f\xFCr eine Transaktion",slug:"so-andern-sie-das-computing-budget-die-gebuhr-prioritat-fur-eine-transaktion",children:[]}],path:"/de/references/basic-transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"So generieren Sie ein neues Schl\xFCsselpaar",slug:"so-generieren-sie-ein-neues-schlusselpaar",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einem Geheimnis wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einem-geheimnis-wieder-her",children:[]},{level:2,title:"So verifizieren Sie ein Schl\xFCsselpaar",slug:"so-verifizieren-sie-ein-schlusselpaar",children:[]},{level:2,title:"So \xFCberpr\xFCfen Sie, ob ein \xF6ffentlicher Schl\xFCssel einen zugeh\xF6rigen privaten Schl\xFCssel hat",slug:"so-uberprufen-sie-ob-ein-offentlicher-schlussel-einen-zugehorigen-privaten-schlussel-hat",children:[]},{level:2,title:"Wie man eine mnemonische Phrase generiert",slug:"wie-man-eine-mnemonische-phrase-generiert",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einer mnemonischen Phrase wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einer-mnemonischen-phrase-wieder-her",children:[]},{level:2,title:"So generieren Sie eine Vanity-Adresse",slug:"so-generieren-sie-eine-vanity-adresse",children:[]},{level:2,title:"So signieren und verifizieren Sie Nachrichten mit Wallets",slug:"so-signieren-und-verifizieren-sie-nachrichten-mit-wallets",children:[]},{level:2,title:"So verbinden Sie sich mit einer Brieftasche",slug:"so-verbinden-sie-sich-mit-einer-brieftasche",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/de/references/keypairs-and-wallets.html",pathLocale:"/de/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Starten eines lokalen Validators",slug:"starten-eines-lokalen-validators",children:[]},{level:2,title:"Verbindung zu Umgebungen",slug:"verbindung-zu-umgebungen",children:[]},{level:2,title:"Abonnieren von Veranstaltungen",slug:"abonnieren-von-veranstaltungen",children:[]},{level:2,title:"Test SOL erhalten",slug:"test-sol-erhalten",children:[]},{level:2,title:"Verwenden von Mainnet-Konten und -Programmen",slug:"verwenden-von-mainnet-konten-und-programmen",children:[{level:3,title:"So laden Sie Konten aus dem Mainnet",slug:"so-laden-sie-konten-aus-dem-mainnet",children:[]},{level:3,title:"So laden Sie Programme aus dem Mainnet",slug:"so-laden-sie-programme-aus-dem-mainnet",children:[]}]}],path:"/de/references/local-development.html",pathLocale:"/de/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Namensregister",slug:"namensregister",children:[]},{level:2,title:"SOL-Dom\xE4nen aufl\xF6sen",slug:"sol-domanen-auflosen",children:[]},{level:2,title:"R\xFCckw\xE4rtssuche",slug:"ruckwartssuche",children:[]},{level:2,title:"Subdomain nachschlagen",slug:"subdomain-nachschlagen",children:[]},{level:2,title:"Finden Sie alle Domainnamen, die einem \xF6ffentlichen Schl\xFCssel geh\xF6ren",slug:"finden-sie-alle-domainnamen-die-einem-offentlichen-schlussel-gehoren",children:[]},{level:2,title:"Ein Twitter-Handle aufl\xF6sen",slug:"ein-twitter-handle-auflosen",children:[]},{level:2,title:"Umgekehrte Suche nach einem Twitter-Handle",slug:"umgekehrte-suche-nach-einem-twitter-handle",children:[]}],path:"/de/references/name-service.html",pathLocale:"/de/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"So erstellen Sie eine NFT",slug:"so-erstellen-sie-eine-nft",children:[{level:3,title:"Upload zu Arweave",slug:"upload-zu-arweave",children:[]},{level:3,title:"Minte das NFT",slug:"minte-das-nft",children:[]}]},{level:2,title:"So erhalten Sie NFT-Metadaten",slug:"so-erhalten-sie-nft-metadaten",children:[]},{level:2,title:"So erhalten Sie den Besitzer eines NFT",slug:"so-erhalten-sie-den-besitzer-eines-nft",children:[]},{level:2,title:"So erhalten Sie NFT Mint-Adressen",slug:"so-erhalten-sie-nft-mint-adressen",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Wie bekomme ich alle NFTs aus einem Wallet?",slug:"wie-bekomme-ich-alle-nfts-aus-einem-wallet",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Wie erstelle ich eine Candy Machine?",slug:"wie-erstelle-ich-eine-candy-machine",children:[]},{level:3,title:"Wie Sie eine Candy Machine l\xF6schen",slug:"wie-sie-eine-candy-machine-loschen",children:[]},{level:3,title:"So finden Sie die Candy Machine Autorit\xE4t",slug:"so-finden-sie-die-candy-machine-autoritat",children:[]},{level:3,title:"So finden Sie Candy Machine mit der Wallet-Adresse",slug:"so-finden-sie-candy-machine-mit-der-wallet-adresse",children:[]},{level:3,title:"So finden Sie Candy Machine anhand seiner Adresse",slug:"so-finden-sie-candy-machine-anhand-seiner-adresse",children:[]},{level:3,title:"So finden Sie gepr\xE4gte NFTs von einer Candy Machine",slug:"so-finden-sie-gepragte-nfts-von-einer-candy-machine",children:[]},{level:3,title:"So f\xFCgen Sie Artikel in einer Candy Machine bei",slug:"so-fugen-sie-artikel-in-einer-candy-machine-bei",children:[]},{level:3,title:"Wie man einen NFT von einer Candy Machine pr\xE4gt",slug:"wie-man-einen-nft-von-einer-candy-machine-pragt",children:[]}]}],path:"/de/references/nfts.html",pathLocale:"/de/",extraFields:[]},{title:"Senden von Offline-Transaktionen",headers:[{level:2,title:"Transaktion unterzeichnen",slug:"transaktion-unterzeichnen",children:[]},{level:2,title:"Transaktion teilweise signieren",slug:"transaktion-teilweise-signieren",children:[]},{level:2,title:"Langlebige Nonce",slug:"langlebige-nonce",children:[{level:3,title:"Erstellen Sie ein Nonce-Konto",slug:"erstellen-sie-ein-nonce-konto",children:[]},{level:3,title:"Holen Sie sich ein Nonce-Konto",slug:"holen-sie-sich-ein-nonce-konto",children:[]},{level:3,title:"Verwenden Sie das Nonce-Konto",slug:"verwenden-sie-das-nonce-konto",children:[]}]}],path:"/de/references/offline-transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Programme schreiben",headers:[{level:2,title:"So \xFCbertragen Sie SOL in einem Programm",slug:"so-ubertragen-sie-sol-in-einem-programm",children:[]},{level:2,title:"Wie bekomme ich die Uhr in ein Programm?",slug:"wie-bekomme-ich-die-uhr-in-ein-programm",children:[{level:3,title:"Passing Clock als Konto innerhalb einer Anweisung",slug:"passing-clock-als-konto-innerhalb-einer-anweisung",children:[]},{level:3,title:"Direkter Zugriff auf die Uhr innerhalb einer Anweisung",slug:"direkter-zugriff-auf-die-uhr-innerhalb-einer-anweisung",children:[]}]},{level:2,title:"So \xE4ndern Sie die Kontogr\xF6\xDFe",slug:"so-andern-sie-die-kontogro\xDFe",children:[]},{level:2,title:"Wie man einen programm\xFCbergreifenden Aufruf durchf\xFChrt",slug:"wie-man-einen-programmubergreifenden-aufruf-durchfuhrt",children:[]},{level:2,title:"So erstellen Sie einen PDA",slug:"so-erstellen-sie-einen-pda",children:[]},{level:2,title:"Wie man Konten liest",slug:"wie-man-konten-liest",children:[]},{level:2,title:"So verifizieren Sie Konten",slug:"so-verifizieren-sie-konten",children:[]},{level:2,title:"So lesen Sie mehrere Anweisungen aus einer Transaktion",slug:"so-lesen-sie-mehrere-anweisungen-aus-einer-transaktion",children:[]}],path:"/de/references/programs.html",pathLocale:"/de/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Holen Sie sich aktuelle Validatoren",slug:"holen-sie-sich-aktuelle-validatoren",children:[]},{level:2,title:"Einsatzkonto erstellen",slug:"einsatzkonto-erstellen",children:[]},{level:2,title:"Stake delegieren",slug:"stake-delegieren",children:[]},{level:2,title:"Delegator durch Validatoren abrufen",slug:"delegator-durch-validatoren-abrufen",children:[]},{level:2,title:"Stake deaktivieren",slug:"stake-deaktivieren",children:[]},{level:2,title:"Stake Auszahlen",slug:"stake-auszahlen",children:[]}],path:"/de/references/staking.html",pathLocale:"/de/",extraFields:[]},{title:"Interaktion mit Tokens",headers:[{level:2,title:"Was ben\xF6tige ich, um mit SPL-Tokens zu beginnen?",slug:"was-benotige-ich-um-mit-spl-tokens-zu-beginnen",children:[]},{level:2,title:"So erstellen Sie ein neues Token",slug:"so-erstellen-sie-ein-neues-token",children:[]},{level:2,title:"So erhalten Sie eine Token-Minze",slug:"so-erhalten-sie-eine-token-minze",children:[]},{level:2,title:"So erstellen Sie ein Token-Konto",slug:"so-erstellen-sie-ein-token-konto",children:[]},{level:2,title:"So erhalten Sie ein Token-Konto",slug:"so-erhalten-sie-ein-token-konto",children:[]},{level:2,title:"So erhalten Sie das Guthaben eines Token-Kontos",slug:"so-erhalten-sie-das-guthaben-eines-token-kontos",children:[]},{level:2,title:"Wie man Token pr\xE4gt",slug:"wie-man-token-pragt",children:[]},{level:2,title:"So \xFCbertragen Sie Token",slug:"so-ubertragen-sie-token",children:[]},{level:2,title:"Wie man Token verbrennt",slug:"wie-man-token-verbrennt",children:[]},{level:2,title:"So schlie\xDFen Sie Token-Konten",slug:"so-schlie\xDFen-sie-token-konten",children:[]},{level:2,title:"So legen Sie die Autorit\xE4t f\xFCr Token-Konten oder Mints fest",slug:"so-legen-sie-die-autoritat-fur-token-konten-oder-mints-fest",children:[]},{level:2,title:"So genehmigen Sie einen Token-Delegierten",slug:"so-genehmigen-sie-einen-token-delegierten",children:[]},{level:2,title:"So widerrufen Sie einen Token-Delegierten",slug:"so-widerrufen-sie-einen-token-delegierten",children:[]},{level:2,title:"So verwalten Sie verpackte SOL",slug:"so-verwalten-sie-verpackte-sol",children:[{level:3,title:"Token-Konto erstellen",slug:"token-konto-erstellen",children:[]},{level:3,title:"Guthaben hinzuf\xFCgen",slug:"guthaben-hinzufugen",children:[]}]},{level:2,title:"So erhalten Sie alle Token-Konten nach Eigent\xFCmer",slug:"so-erhalten-sie-alle-token-konten-nach-eigentumer",children:[]}],path:"/de/references/token.html",pathLocale:"/de/",extraFields:[]},{title:"Kontozuordnungen",headers:[{level:2,title:"Ableitende PDAs",slug:"ableitende-pdas",children:[]},{level:2,title:"Einzelnes Kartenkonto",slug:"einzelnes-kartenkonto",children:[]}],path:"/de/guides/account-maps.html",pathLocale:"/de/",extraFields:[]},{title:"Migrieren von Programmdatenkonten",headers:[{level:2,title:"Wie k\xF6nnen Sie die Datenkonten eines Programms migrieren?",slug:"wie-konnen-sie-die-datenkonten-eines-programms-migrieren",children:[]},{level:2,title:"Szenario",slug:"szenario",children:[]},{level:2,title:"Upgrade des Kontos",slug:"upgrade-des-kontos",children:[{level:3,title:"1. Kontoumwandlungslogik hinzuf\xFCgen",slug:"_1-kontoumwandlungslogik-hinzufugen",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/de/guides/data-migration.html",pathLocale:"/de/",extraFields:[]},{title:"Debuggen von Solana-Programmen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Laufzeittests und Debugging im Editor",slug:"laufzeittests-und-debugging-im-editor",children:[]},{level:2,title:"Testen des lokalen Validator-Knotens im Editor",slug:"testen-des-lokalen-validator-knotens-im-editor",children:[]},{level:2,title:"Testen lokaler Validator-Knoten von Client-Apps",slug:"testen-lokaler-validator-knoten-von-client-apps",children:[]},{level:2,title:"Ressourcen",slug:"ressourcen",children:[]}],path:"/de/guides/debugging-solana-programs.html",pathLocale:"/de/",extraFields:[]},{title:"Funktionsparit\xE4tstest",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Szenario",slug:"szenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parit\xE4tstest",slug:"paritatstest",children:[]},{level:2,title:"Einfache Vorf\xFChrung",slug:"einfache-vorfuhrung",children:[{level:3,title:"Alle Funktionen aktiviert",slug:"alle-funktionen-aktiviert",children:[]},{level:3,title:"Selektive Funktionen deaktiviert",slug:"selektive-funktionen-deaktiviert",children:[]}]},{level:2,title:"Vollst\xE4ndiger Parit\xE4tstest",slug:"vollstandiger-paritatstest",children:[]},{level:2,title:"Vollst\xE4ndiger Parit\xE4tstest programmgesteuert",slug:"vollstandiger-paritatstest-programmgesteuert",children:[]},{level:2,title:"Ressourcen",slug:"ressourcen",children:[]}],path:"/de/guides/feature-parity-testing.html",pathLocale:"/de/",extraFields:[]},{title:"Programmkonten Abfragen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/de/guides/get-program-accounts.html",pathLocale:"/de/",extraFields:[]},{title:"Transaktionen Wiederholen",headers:[{level:2,title:"Fakten",slug:"fakten",children:[]},{level:2,title:"Die Reise einer Transaktion",slug:"die-reise-einer-transaktion-1",children:[{level:3,title:"Wie Anwender Transaktionen \xFCbermitteln",slug:"wie-anwender-transaktionen-ubermitteln",children:[]},{level:3,title:"Wie RPC-Knoten Transaktionen senden",slug:"wie-rpc-knoten-transaktionen-senden",children:[]}]},{level:2,title:"Wie Transaktionen verworfen werden",slug:"wie-transaktionen-verworfen-werden",children:[{level:3,title:"Bevor eine Transaktion verarbeitet wird",slug:"bevor-eine-transaktion-verarbeitet-wird",children:[]},{level:3,title:"Nachdem eine Transaktion verarbeitet wurde und bevor sie abgeschlossen wird",slug:"nachdem-eine-transaktion-verarbeitet-wurde-und-bevor-sie-abgeschlossen-wird",children:[]}]},{level:2,title:"Umgang mit abgebrochenen Transaktionen",slug:"umgang-mit-abgebrochenen-transaktionen",children:[{level:3,title:"Ein eingehender Blick in sendTransaction",slug:"ein-eingehender-blick-in-sendtransaction",children:[]}]},{level:2,title:"Anpassen der Reroadcast-Logik",slug:"anpassen-der-reroadcast-logik",children:[{level:3,title:"Die Kosten f\xFCr das \xDCberspringen des Preflights",slug:"die-kosten-fur-das-uberspringen-des-preflights",children:[]},{level:3,title:"Wann Transaktionen neu signiert werden m\xFCssen",slug:"wann-transaktionen-neu-signiert-werden-mussen",children:[]}]},{level:2,title:"Danksagungen",slug:"danksagungen",children:[]}],path:"/de/guides/retrying-transactions.html",pathLocale:"/de/",extraFields:[]},{title:"Serialisieren von Daten",headers:[{level:2,title:"Einrichten der Borsh-Serialisierung",slug:"einrichten-der-borsh-serialisierung",children:[]},{level:2,title:"So serialisieren Sie Anweisungsdaten auf dem Client",slug:"so-serialisieren-sie-anweisungsdaten-auf-dem-client",children:[]},{level:2,title:"So deserialisieren Sie Befehlsdaten im Programm",slug:"so-deserialisieren-sie-befehlsdaten-im-programm",children:[]},{level:2,title:"So serialisieren Sie Kontodaten im Programm",slug:"so-serialisieren-sie-kontodaten-im-programm",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialisierung/Deserialisierung",slug:"serialisierung-deserialisierung",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"So deserialisieren Sie Kontodaten auf dem Client",slug:"so-deserialisieren-sie-kontodaten-auf-dem-client",children:[]},{level:2,title:"Common Solana TS/JS Mappings",slug:"common-solana-ts-js-mappings",children:[]},{level:2,title:"Fortgeschrittene Konstrukte",slug:"fortgeschrittene-konstrukte",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Ressourcen",slug:"ressourcen",children:[]}],path:"/de/guides/serialization.html",pathLocale:"/de/",extraFields:[]},{title:"Instalaci\xF3n",headers:[{level:2,title:"Instalaci\xF3n de Web3.js",slug:"instalacion-de-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instalaci\xF3n de Rust",slug:"instalacion-de-rust",children:[]},{level:2,title:"Instalaci\xF3n de CLI",slug:"instalacion-de-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compilaci\xF3n desde el C\xF3digo Fuente",slug:"compilacion-desde-el-codigo-fuente",children:[]}]}],path:"/es/getting-started/installation.html",pathLocale:"/es/",extraFields:[]},{title:"Cuentas",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"El modelo de una cuenta",slug:"el-modelo-de-una-cuenta",children:[]},{level:3,title:"Renta",slug:"renta",children:[]}]},{level:2,title:"Otros recursos",slug:"otros-recursos",children:[{level:3,title:"Creditos",slug:"creditos",children:[]}]}],path:"/es/core-concepts/accounts.html",pathLocale:"/es/",extraFields:[]},{title:"Direcciones derivadas de programa (PDAs)",headers:[{level:2,title:"Hechos",slug:"hechos",children:[{level:3,title:"Generando PDAs",slug:"generando-pdas",children:[]},{level:3,title:"Interactuando con PDAs",slug:"interactuando-con-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/es/core-concepts/pdas.html",pathLocale:"/es/",extraFields:[]},{title:"Programas",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"Programas nativos & La librer\xEDa de Programas de Solana (SPL)",slug:"programas-nativos-la-libreria-de-programas-de-solana-spl",children:[]},{level:3,title:"Escribiendo programas",slug:"escribiendo-programas",children:[]},{level:3,title:"Desplegando Programas",slug:"desplegando-programas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/es/core-concepts/programs.html",pathLocale:"/es/",extraFields:[]},{title:"Transacciones",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"Cargos (fees)",slug:"cargos-fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/es/core-concepts/transactions.html",pathLocale:"/es/",extraFields:[]},{title:"C\xF3mo usar Map en cuentas",headers:[{level:2,title:"Derivando PDAs",slug:"derivando-pdas",children:[]},{level:2,title:"Map simple",slug:"map-simple",children:[]}],path:"/es/guides/account-maps.html",pathLocale:"/es/",extraFields:[]},{title:"Migrando cuentas de datos de programas",headers:[{level:2,title:"\xBFC\xF3mo se pueden migrar las cuentas de datos de un programa?",slug:"\xBFcomo-se-pueden-migrar-las-cuentas-de-datos-de-un-programa",children:[]},{level:2,title:"Escenario",slug:"escenario",children:[]},{level:2,title:"Actualizando la cuenta",slug:"actualizando-la-cuenta",children:[{level:3,title:"1. Agregar la l\xF3gica de conversi\xF3n de cuenta",slug:"_1-agregar-la-logica-de-conversion-de-cuenta",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/es/guides/data-migration.html",pathLocale:"/es/",extraFields:[]},{title:"Depurando Programas en Solana",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Pruebas de tiempo de ejecuci\xF3n y depuraci\xF3n en el editor",slug:"pruebas-de-tiempo-de-ejecucion-y-depuracion-en-el-editor",children:[]},{level:2,title:"Pruebas de nodo de validaci\xF3n local en el editor (Local Validator)",slug:"pruebas-de-nodo-de-validacion-local-en-el-editor-local-validator",children:[]},{level:2,title:"Pruebas de nodos de validadores locales desde aplicaciones cliente",slug:"pruebas-de-nodos-de-validadores-locales-desde-aplicaciones-cliente",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/es/guides/debugging-solana-programs.html",pathLocale:"/es/",extraFields:[]},{title:"Prueba de paridad de caracter\xEDsticas",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Escenario",slug:"escenario",children:[]},{level:2,title:"Estado de la funci\xF3n",slug:"estado-de-la-funcion",children:[]},{level:2,title:"Pruebas de paridad",slug:"pruebas-de-paridad",children:[]},{level:2,title:"Demostraci\xF3n sencilla",slug:"demostracion-sencilla",children:[{level:3,title:"Todas las funciones activadas",slug:"todas-las-funciones-activadas",children:[]},{level:3,title:"Funciones selectivas desactivadas",slug:"funciones-selectivas-desactivadas",children:[]}]},{level:2,title:"Pruebas de paridad completa",slug:"pruebas-de-paridad-completa",children:[]},{level:2,title:"Pruebas de paridad completa program\xE1ticamente",slug:"pruebas-de-paridad-completa-programaticamente",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/es/guides/feature-parity-testing.html",pathLocale:"/es/",extraFields:[]},{title:"Obtener cuentas de programa",headers:[{level:2,title:"Hechos",slug:"hechos",children:[]},{level:2,title:"Un vistazo m\xE1s profundo",slug:"un-vistazo-mas-profundo",children:[{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Otros recursos",slug:"otros-recursos",children:[]}],path:"/es/guides/get-program-accounts.html",pathLocale:"/es/",extraFields:[]},{title:"Serializando datos",headers:[{level:2,title:"Configuraci\xF3n para la serializaci\xF3n con Borsh",slug:"configuracion-para-la-serializacion-con-borsh",children:[]},{level:2,title:"C\xF3mo serializar datos de instrucciones en el cliente",slug:"como-serializar-datos-de-instrucciones-en-el-cliente",children:[]},{level:2,title:"How to deserialize instruction data on the program",slug:"how-to-deserialize-instruction-data-on-the-program",children:[]},{level:2,title:"C\xF3mo serializar los datos de la cuenta en el programa",slug:"como-serializar-los-datos-de-la-cuenta-en-el-programa",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serializaci\xF3n/Deserealizaci\xF3n",slug:"serializacion-deserealizacion",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"C\xF3mo deserializar los datos de la cuenta en el cliente",slug:"como-deserializar-los-datos-de-la-cuenta-en-el-cliente",children:[]},{level:2,title:"Mappins comunes de Solana TS/JS",slug:"mappins-comunes-de-solana-ts-js",children:[]},{level:2,title:"Construcciones avanzadas",slug:"construcciones-avanzadas",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/es/guides/serialization.html",pathLocale:"/es/",extraFields:[]},{title:"Cuentas",headers:[{level:2,title:"C\xF3mo crear una cuenta del sistema",slug:"como-crear-una-cuenta-del-sistema",children:[]},{level:2,title:"C\xF3mo calcular el costo de una cuenta",slug:"como-calcular-el-costo-de-una-cuenta",children:[]},{level:2,title:"C\xF3mo crear cuentas con semillas",slug:"como-crear-cuentas-con-semillas",children:[{level:3,title:"Generar",slug:"generar",children:[]},{level:3,title:"Crear",slug:"crear",children:[]},{level:3,title:"Transferir",slug:"transferir",children:[]}]},{level:2,title:"C\xF3mo crear PDAs",slug:"como-crear-pdas",children:[{level:3,title:"Generar una cuenta derivada de programa (PDA)",slug:"generar-una-cuenta-derivada-de-programa-pda",children:[]},{level:3,title:"Crear una cuenta derivada de programa (PDA)",slug:"crear-una-cuenta-derivada-de-programa-pda",children:[]}]},{level:2,title:"C\xF3mo firmar con una cuenta derivada de programa (PDA)",slug:"como-firmar-con-una-cuenta-derivada-de-programa-pda",children:[{level:3,title:"Programa",slug:"programa-1",children:[]},{level:3,title:"Cliente",slug:"cliente-1",children:[]}]},{level:2,title:"C\xF3mo obtener cuentas de programas",slug:"como-obtener-cuentas-de-programas",children:[]},{level:2,title:"C\xF3mo cerrar cuentas",slug:"como-cerrar-cuentas",children:[]},{level:2,title:"C\xF3mo obtener el balance de una cuenta",slug:"como-obtener-el-balance-de-una-cuenta",children:[]}],path:"/es/references/accounts.html",pathLocale:"/es/",extraFields:[]},{title:"Enviando transacciones",headers:[{level:2,title:"C\xF3mo enviar SOL",slug:"como-enviar-sol",children:[]},{level:2,title:"How to send SPL-Tokens",slug:"how-to-send-spl-tokens",children:[]},{level:2,title:"C\xF3mo calcular el costo de una transacci\xF3n",slug:"como-calcular-el-costo-de-una-transaccion",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"C\xF3mo agregar un memo en una transacci\xF3n",slug:"como-agregar-un-memo-en-una-transaccion",children:[]},{level:2,title:"C\xF3mo cambiar el presupuesto de c\xF3mputo para una transacci\xF3n",slug:"como-cambiar-el-presupuesto-de-computo-para-una-transaccion",children:[]}],path:"/es/references/basic-transactions.html",pathLocale:"/es/",extraFields:[]},{title:"Pares de llaves y billeteras",headers:[{level:2,title:"C\xF3mo generar un nuevo Keypair (par de llaves)",slug:"como-generar-un-nuevo-keypair-par-de-llaves",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves a partir de una llave privada",slug:"como-restaurar-un-par-de-llaves-a-partir-de-una-llave-privada",children:[]},{level:2,title:"C\xF3mo verificar un par de llaves",slug:"como-verificar-un-par-de-llaves",children:[]},{level:2,title:"C\xF3mo comprobar si una llave p\xFAblica tiene una llave privada asociada",slug:"como-comprobar-si-una-llave-publica-tiene-una-llave-privada-asociada",children:[]},{level:2,title:"C\xF3mo generar una frase semilla (mnemonic)",slug:"como-generar-una-frase-semilla-mnemonic",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves desde una frase semilla",slug:"como-restaurar-un-par-de-llaves-desde-una-frase-semilla",children:[]},{level:2,title:"C\xF3mo generar una direcci\xF3n personalizada",slug:"como-generar-una-direccion-personalizada",children:[]},{level:2,title:"C\xF3mo firmar y verificar mensajes con wallets",slug:"como-firmar-y-verificar-mensajes-con-wallets",children:[]},{level:2,title:"C\xF3mo conectar una wallet",slug:"como-conectar-una-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/es/references/keypairs-and-wallets.html",pathLocale:"/es/",extraFields:[]},{title:"Desarrollo en entorno local",headers:[{level:2,title:"Iniciando un validador",slug:"iniciando-un-validador",children:[]},{level:2,title:"Conect\xE1ndote con los diferentes entornos",slug:"conectandote-con-los-diferentes-entornos",children:[]},{level:2,title:"Suscripci\xF3n a eventos",slug:"suscripcion-a-eventos",children:[]},{level:2,title:"Obteniendo SOL para pruebas",slug:"obteniendo-sol-para-pruebas",children:[]},{level:2,title:"Usando cuentas de mainnet y programas",slug:"usando-cuentas-de-mainnet-y-programas",children:[{level:3,title:"C\xF3mo cargar cuentas de mainnet",slug:"como-cargar-cuentas-de-mainnet",children:[]},{level:3,title:"C\xF3mo cargar programas de mainnet",slug:"como-cargar-programas-de-mainnet",children:[]}]}],path:"/es/references/local-development.html",pathLocale:"/es/",extraFields:[]},{title:"Servicio de nombres",headers:[{level:2,title:"Registro de nombres",slug:"registro-de-nombres",children:[]},{level:2,title:"Resolviendo dominios SOL",slug:"resolviendo-dominios-sol",children:[]},{level:2,title:"B\xFAsqueda inversa",slug:"busqueda-inversa",children:[]},{level:2,title:"B\xFAsqueda de subdominios",slug:"busqueda-de-subdominios",children:[]},{level:2,title:"Encuentre todos los nombres de dominio que pertenecen a una clave p\xFAblica",slug:"encuentre-todos-los-nombres-de-dominio-que-pertenecen-a-una-clave-publica",children:[]},{level:2,title:"Resolver un identificador de Twitter",slug:"resolver-un-identificador-de-twitter",children:[]},{level:2,title:"B\xFAsqueda inversa de un identificador de Twitter",slug:"busqueda-inversa-de-un-identificador-de-twitter",children:[]}],path:"/es/references/name-service.html",pathLocale:"/es/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"\xBFC\xF3mo crear un NFT?",slug:"\xBFcomo-crear-un-nft",children:[{level:3,title:"Subir a Arweave",slug:"subir-a-arweave",children:[]},{level:3,title:"Crear (mint) el NFT",slug:"crear-mint-el-nft",children:[]}]},{level:2,title:"\xBFC\xF3mo obtener metadatos de un NFT?",slug:"\xBFcomo-obtener-metadatos-de-un-nft",children:[]},{level:2,title:"\xBFC\xF3mo obtener el due\xF1o de un NFT?",slug:"\xBFcomo-obtener-el-dueno-de-un-nft",children:[]},{level:2,title:"\xBFC\xF3mo obtener direcciones de mint de NFT?",slug:"\xBFcomo-obtener-direcciones-de-mint-de-nft",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\xBFC\xF3mo obtener todos los NFT de una billetera?",slug:"\xBFcomo-obtener-todos-los-nft-de-una-billetera",children:[]}],path:"/es/references/nfts.html",pathLocale:"/es/",extraFields:[]},{title:"Enviando transacciones offline",headers:[{level:2,title:"Firmar una transacci\xF3n",slug:"firmar-una-transaccion",children:[]},{level:2,title:"Firma parcial de una transacci\xF3n",slug:"firma-parcial-de-una-transaccion",children:[]},{level:2,title:"Nonce de larga duraci\xF3n (Durable Nonce)",slug:"nonce-de-larga-duracion-durable-nonce",children:[{level:3,title:"Crear una cuenta nonce",slug:"crear-una-cuenta-nonce",children:[]},{level:3,title:"Obtener una cuenta nonce",slug:"obtener-una-cuenta-nonce",children:[]},{level:3,title:"Usar una cuenta nonce",slug:"usar-una-cuenta-nonce",children:[]}]}],path:"/es/references/offline-transactions.html",pathLocale:"/es/",extraFields:[]},{title:"Escribiendo Programas",headers:[{level:2,title:"C\xF3mo transferir SOL a un programa",slug:"como-transferir-sol-a-un-programa",children:[]},{level:2,title:"C\xF3mo obtener una referencia al reloj en un programa",slug:"como-obtener-una-referencia-al-reloj-en-un-programa",children:[{level:3,title:"Enviando Clock c\xF3mo una cuenta dentro de una instrucci\xF3n",slug:"enviando-clock-como-una-cuenta-dentro-de-una-instruccion",children:[]},{level:3,title:"Accediendo al reloj directamente dentro de una instrucci\xF3n",slug:"accediendo-al-reloj-directamente-dentro-de-una-instruccion",children:[]}]},{level:2,title:"C\xF3mo cambiar el tama\xF1o de una cuenta",slug:"como-cambiar-el-tamano-de-una-cuenta",children:[]},{level:2,title:"C\xF3mo hacer una invocaci\xF3n entre programas (Cross Program Invocation)",slug:"como-hacer-una-invocacion-entre-programas-cross-program-invocation",children:[]},{level:2,title:"C\xF3mo crear una cuenta derivada de programa (PDA)",slug:"como-crear-una-cuenta-derivada-de-programa-pda",children:[]},{level:2,title:"C\xF3mo leer cuentas",slug:"como-leer-cuentas",children:[]},{level:2,title:"C\xF3mo verificar cuentas",slug:"como-verificar-cuentas",children:[]},{level:2,title:"C\xF3mo leer m\xFAltiples instrucciones de una transacci\xF3n",slug:"como-leer-multiples-instrucciones-de-una-transaccion",children:[]}],path:"/es/references/programs.html",pathLocale:"/es/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Obtener los validadores actuales",slug:"obtener-los-validadores-actuales",children:[]},{level:2,title:"\xBFCrear una cuenta de stake?",slug:"\xBFcrear-una-cuenta-de-stake",children:[]},{level:2,title:"Delegar Stake",slug:"delegar-stake",children:[]},{level:2,title:"Obtener el delegador por los validadores",slug:"obtener-el-delegador-por-los-validadores",children:[]},{level:2,title:"Desactivar Stake",slug:"desactivar-stake",children:[]},{level:2,title:"Retirar Stake",slug:"retirar-stake",children:[]}],path:"/es/references/staking.html",pathLocale:"/es/",extraFields:[]},{title:"Interactuando con tokens",headers:[{level:2,title:"\xBFQu\xE9 necesito para comenzar a trabajar con SPL-Tokens?",slug:"\xBFque-necesito-para-comenzar-a-trabajar-con-spl-tokens",children:[]},{level:2,title:"\xBFC\xF3mo crear un nuevo token?",slug:"\xBFcomo-crear-un-nuevo-token",children:[]},{level:2,title:'\xBFC\xF3mo obtener un token "mint"?',slug:"\xBFcomo-obtener-un-token-mint",children:[]},{level:2,title:"\xBFC\xF3mo crear una cuenta de token?",slug:"\xBFcomo-crear-una-cuenta-de-token",children:[]},{level:2,title:"\xBFC\xF3mo obtener un cuenta de token?",slug:"\xBFcomo-obtener-un-cuenta-de-token",children:[]},{level:2,title:"\xBFC\xF3mo obtener el saldo de una cuenta token?",slug:"\xBFcomo-obtener-el-saldo-de-una-cuenta-token",children:[]},{level:2,title:"\xBFC\xF3mo crear (mint) nuevos tokens?",slug:"\xBFcomo-crear-mint-nuevos-tokens",children:[]},{level:2,title:"\xBFC\xF3mo transferir tokens?",slug:"\xBFcomo-transferir-tokens",children:[]},{level:2,title:"\xBFC\xF3mo quemar tokens?",slug:"\xBFcomo-quemar-tokens",children:[]},{level:2,title:"\xBFC\xF3mo cerrar cuentas de token?",slug:"\xBFcomo-cerrar-cuentas-de-token",children:[]},{level:2,title:"\xBFC\xF3mo establecer la autoridad en cuentas de tokens o mints?",slug:"\xBFcomo-establecer-la-autoridad-en-cuentas-de-tokens-o-mints",children:[]},{level:2,title:"\xBFC\xF3mo aprobar una delegaci\xF3n de token?",slug:"\xBFcomo-aprobar-una-delegacion-de-token",children:[]},{level:2,title:"\xBFC\xF3mo revocar una delegaci\xF3n de token?",slug:"\xBFcomo-revocar-una-delegacion-de-token",children:[]},{level:2,title:"\xBFC\xF3mo manejar Wrapped SOL?",slug:"\xBFcomo-manejar-wrapped-sol",children:[{level:3,title:"Crear una cuenta de token",slug:"crear-una-cuenta-de-token",children:[]},{level:3,title:"Agregar saldo",slug:"agregar-saldo",children:[]}]},{level:2,title:"\xBFC\xF3mo obtener todas las cuentas de token por propietario?",slug:"\xBFcomo-obtener-todas-las-cuentas-de-token-por-propietario",children:[]}],path:"/es/references/token.html",pathLocale:"/es/",extraFields:[]},{title:"Comptes",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"Le mod\xE8le d'un compte",slug:"le-modele-d-un-compte",children:[]},{level:3,title:"Rente",slug:"rente",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[{level:3,title:"Cr\xE9dit",slug:"credit",children:[]}]}],path:"/fr/core-concepts/accounts.html",pathLocale:"/fr/",extraFields:[]},{title:"Invocations de Programme Crois\xE9 (CPIs)",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"CPI avec\xA0invoke",slug:"cpi-avec-invoke",children:[]},{level:3,title:"CPI avec invoke_signed",slug:"cpi-avec-invoke-signed",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/cpi.html",pathLocale:"/fr/",extraFields:[]},{title:"Adresses d\xE9riv\xE9es de programmes (PDAs)",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"G\xE9n\xE9ration des PDAs",slug:"generation-des-pdas",children:[]},{level:3,title:"Interaction avec les PDAs",slug:"interaction-avec-les-pdas",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/pdas.html",pathLocale:"/fr/",extraFields:[]},{title:"Programmes",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"Programmes Natifs & La Biblioth\xE8que des Programmes de Solana (SPL)",slug:"programmes-natifs-la-bibliotheque-des-programmes-de-solana-spl",children:[]},{level:3,title:"Ecrire des programmes",slug:"ecrire-des-programmes",children:[]},{level:3,title:"D\xE9ployer des programmes",slug:"deployer-des-programmes",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/programs.html",pathLocale:"/fr/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"Frais",slug:"frais",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/core-concepts/transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Installer Web3.js",slug:"installer-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Installer Rust",slug:"installer-rust",children:[]},{level:2,title:"Installer CLI",slug:"installer-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compiler \xE0 partir du code source",slug:"compiler-a-partir-du-code-source",children:[]}]}],path:"/fr/getting-started/installation.html",pathLocale:"/fr/",extraFields:[]},{title:"How to auto approve transactions",headers:[],path:"/fr/gaming/auto-approve.html",pathLocale:"/fr/",extraFields:[]},{title:"Distribution",headers:[{level:2,title:"Plateformes de publication",slug:"plateformes-de-publication",children:[]}],path:"/fr/gaming/distribution.html",pathLocale:"/fr/",extraFields:[]},{title:"Syst\xE8me d'Energie",headers:[{level:2,title:"Program Anchor",slug:"program-anchor",children:[{level:3,title:"Cr\xE9ation du compte du joueur",slug:"creation-du-compte-du-joueur",children:[]},{level:3,title:"Coupe des arbres",slug:"coupe-des-arbres",children:[]},{level:3,title:"Calcul de l'\xE9nergie",slug:"calcul-de-l-energie",children:[]}]},{level:2,title:"Client Js",slug:"client-js",children:[{level:3,title:"Cr\xE9er une connexion",slug:"creer-une-connexion",children:[]},{level:3,title:"Initialisation des donn\xE9es du joueur",slug:"initialisation-des-donnees-du-joueur",children:[]},{level:3,title:"S'abonner aux mises \xE0 jour du compte",slug:"s-abonner-aux-mises-a-jour-du-compte",children:[]},{level:3,title:"Calculer l'\xE9nergie et afficher le d\xE9compte",slug:"calculer-l-energie-et-afficher-le-decompte",children:[]}]}],path:"/fr/gaming/energy-system.html",pathLocale:"/fr/",extraFields:[]},{title:"Apprendre par l'exemple",headers:[{level:2,title:"Interagir avec un programme Anchor depuis Unity",slug:"interagir-avec-un-programme-anchor-depuis-unity",children:[]},{level:2,title:"Stocker des SOL dans un PDA",slug:"stocker-des-sol-dans-un-pda",children:[]},{level:2,title:"Matchmaking on-chain",slug:"matchmaking-on-chain",children:[]},{level:2,title:"Utiliser les QR codes de Solana Pay pour contr\xF4ler un jeu",slug:"utiliser-les-qr-codes-de-solana-pay-pour-controler-un-jeu",children:[]},{level:2,title:"Cacher l'\xE9tat du jeu aux autres joueurs",slug:"cacher-l-etat-du-jeu-aux-autres-joueurs",children:[]},{level:2,title:"Comment construire un jeu multijoueur au tour par tour",slug:"comment-construire-un-jeu-multijoueur-au-tour-par-tour",children:[]},{level:2,title:"Jeu d'\xE9checs on-chain",slug:"jeu-d-echecs-on-chain",children:[]},{level:2,title:"Jeu multijoueurs utilisant un syst\xE8me de vote",slug:"jeu-multijoueurs-utilisant-un-systeme-de-vote",children:[]},{level:2,title:"Exemple de syst\xE8me de composants d'entit\xE9",slug:"exemple-de-systeme-de-composants-d-entite",children:[]},{level:2,title:"Jeu d'aventure avec la mort de monstres et l'obtention de points d'exp\xE9rience",slug:"jeu-d-aventure-avec-la-mort-de-monstres-et-l-obtention-de-points-d-experience",children:[]},{level:2,title:"Jeu PvP en temps r\xE9el on-chain",slug:"jeu-pvp-en-temps-reel-on-chain",children:[]}],path:"/fr/gaming/game-examples.html",pathLocale:"/fr/",extraFields:[]},{title:"SDKs pour le gaming sur Solana",headers:[{level:3,title:"SDK Unity",slug:"sdk-unity",children:[]},{level:3,title:"SDK Unreal",slug:"sdk-unreal",children:[]},{level:3,title:"Flutter",slug:"flutter",children:[]},{level:3,title:"Next.js/React + Anchor",slug:"next-js-react-anchor",children:[]},{level:3,title:"Python",slug:"python",children:[]},{level:3,title:"C# natif",slug:"c-natif",children:[]}],path:"/fr/gaming/game-sdks.html",pathLocale:"/fr/",extraFields:[]},{title:"Exemple Hello World",headers:[{level:2,title:"Commencez votre premier jeu Solana",slug:"commencez-votre-premier-jeu-solana",children:[]},{level:2,title:"Tiny Adventure",slug:"tiny-adventure",children:[{level:3,title:"Pour commencer",slug:"pour-commencer",children:[]},{level:3,title:"D\xE9finition du Compte de Donn\xE9es du Jeu",slug:"definition-du-compte-de-donnees-du-jeu",children:[]},{level:3,title:"Instruction d'Initialisation",slug:"instruction-d-initialisation",children:[]},{level:3,title:"Instruction de D\xE9placement vers la Gauche",slug:"instruction-de-deplacement-vers-la-gauche",children:[]},{level:3,title:"Instruction de D\xE9placement vers la Droite",slug:"instruction-de-deplacement-vers-la-droite",children:[]},{level:3,title:"Compilation et D\xE9ploiement",slug:"compilation-et-deploiement",children:[]},{level:3,title:"D\xE9buter avec le Client",slug:"debuter-avec-le-client",children:[]},{level:3,title:"Que faire \xE0 partir de maintenant ?",slug:"que-faire-a-partir-de-maintenant",children:[]}]}],path:"/fr/gaming/hello-world.html",pathLocale:"/fr/",extraFields:[]},{title:"Comment interagir avec des jetons dans des programmes",headers:[{level:2,title:"Cr\xE9er, Mint et Br\xFBler des jetons avec Anchor",slug:"creer-mint-et-bruler-des-jetons-avec-anchor",children:[{level:3,title:"Pour commencer",slug:"pour-commencer",children:[]},{level:3,title:"Instruction de cr\xE9ation d'un jeton",slug:"instruction-de-creation-d-un-jeton",children:[]},{level:3,title:"Instruction d'initialisation du joueur",slug:"instruction-d-initialisation-du-joueur",children:[]},{level:3,title:"Instruction pour tuer un ennemi",slug:"instruction-pour-tuer-un-ennemi",children:[]},{level:3,title:"Instruction de gu\xE9rison",slug:"instruction-de-guerison",children:[]},{level:3,title:"Compilation et D\xE9ploiement",slug:"compilation-et-deploiement",children:[]},{level:3,title:"D\xE9buter avec le Client",slug:"debuter-avec-le-client",children:[]}]}],path:"/fr/gaming/interact-with-tokens.html",pathLocale:"/fr/",extraFields:[]},{title:"Introduction au gaming sur Solana",headers:[],path:"/fr/gaming/intro.html",pathLocale:"/fr/",extraFields:[]},{title:"Gaming avec des NFTs",headers:[{level:2,title:"Token gating avec des NFTs",slug:"token-gating-avec-des-nfts",children:[]},{level:2,title:"Bonus d'Effets avec des NFTs",slug:"bonus-d-effets-avec-des-nfts",children:[]},{level:2,title:"Utilisation des m\xE9tadonn\xE9es d'un NFT pour les statistiques des joueurs",slug:"utilisation-des-metadonnees-d-un-nft-pour-les-statistiques-des-joueurs",children:[]},{level:2,title:"Fusionner des NFTs",slug:"fusionner-des-nfts",children:[]},{level:2,title:"Utilisation de NFTs 3D dans un jeu",slug:"utilisation-de-nfts-3d-dans-un-jeu",children:[]},{level:2,title:"Personnaliser des NFTs avec des items et des traits (Raindrops boots)",slug:"personnaliser-des-nfts-avec-des-items-et-des-traits-raindrops-boots",children:[]},{level:2,title:"Comment cr\xE9er une collection NFT",slug:"comment-creer-une-collection-nft",children:[]}],path:"/fr/gaming/nfts-in-games.html",pathLocale:"/fr/",extraFields:[]},{title:"Portage d'Anchor vers Unity",headers:[{level:2,title:"Cr\xE9ation du client",slug:"creation-du-client",children:[]},{level:2,title:"Cr\xE9ation de la transaction dans Unity C#",slug:"creation-de-la-transaction-dans-unity-c",children:[]}],path:"/fr/gaming/porting-anchor-to-unity.html",pathLocale:"/fr/",extraFields:[]},{title:"Sauvegarder l'\xE9tat d'un jeu",headers:[],path:"/fr/gaming/saving-game-state.html",pathLocale:"/fr/",extraFields:[]},{title:"Stockage de SOL dans un PDA",headers:[{level:2,title:"Programme Anchor Tiny Adventure - Deuxi\xE8me Partie",slug:"programme-anchor-tiny-adventure-deuxieme-partie",children:[{level:3,title:"Pour commencer",slug:"pour-commencer",children:[]},{level:3,title:"D\xE9finition du compte du coffre \xE0 r\xE9compense",slug:"definition-du-compte-du-coffre-a-recompense",children:[]},{level:3,title:"D\xE9finition du Compte de Donn\xE9es du Jeu",slug:"definition-du-compte-de-donnees-du-jeu",children:[]},{level:3,title:"Instruction d'initialisation du niveau un",slug:"instruction-d-initialisation-du-niveau-un",children:[]},{level:3,title:"R\xE9initialisation du niveau et instruction d'apparition du coffre",slug:"reinitialisation-du-niveau-et-instruction-d-apparition-du-coffre",children:[]},{level:3,title:"Instruction de D\xE9placement vers la Droite",slug:"instruction-de-deplacement-vers-la-droite",children:[]},{level:3,title:"Compilation et D\xE9ploiement",slug:"compilation-et-deploiement",children:[]},{level:3,title:"D\xE9buter avec le Client",slug:"debuter-avec-le-client",children:[]}]}],path:"/fr/gaming/store-sol-in-pda.html",pathLocale:"/fr/",extraFields:[]},{title:"Comptes",headers:[{level:2,title:"Comment cr\xE9er un compte de syst\xE8me",slug:"comment-creer-un-compte-de-systeme",children:[]},{level:2,title:"Comment calculer les frais de compte",slug:"comment-calculer-les-frais-de-compte",children:[]},{level:2,title:"Comment cr\xE9er des comptes avec des seeds",slug:"comment-creer-des-comptes-avec-des-seeds",children:[{level:3,title:"G\xE9n\xE9rer",slug:"generer",children:[]},{level:3,title:"Cr\xE9er",slug:"creer",children:[]},{level:3,title:"Transf\xE9rer",slug:"transferer",children:[]}]},{level:2,title:"Comment cr\xE9er des PDAs",slug:"comment-creer-des-pdas",children:[{level:3,title:"G\xE9n\xE9rer un PDA",slug:"generer-un-pda",children:[]},{level:3,title:"Cr\xE9er un PDA",slug:"creer-un-pda",children:[]}]},{level:2,title:"Comment signer avec un PDA",slug:"comment-signer-avec-un-pda",children:[{level:3,title:"Programme",slug:"programme-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"Comment obtenir les comptes du programme",slug:"comment-obtenir-les-comptes-du-programme",children:[]},{level:2,title:"Comment fermer des comptes",slug:"comment-fermer-des-comptes",children:[]},{level:2,title:"Comment obtenir le solde d'un compte",slug:"comment-obtenir-le-solde-d-un-compte",children:[]}],path:"/fr/references/accounts.html",pathLocale:"/fr/",extraFields:[]},{title:"Envoyer des Transactions",headers:[{level:2,title:"Comment envoyer des SOL",slug:"comment-envoyer-des-sol",children:[]},{level:2,title:"Comment envoyer des jetons SPL",slug:"comment-envoyer-des-jetons-spl",children:[]},{level:2,title:"Comment calculer les co\xFBts de transaction",slug:"comment-calculer-les-couts-de-transaction",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Comment ajouter un m\xE9mo \xE0 une transaction",slug:"comment-ajouter-un-memo-a-une-transaction",children:[]},{level:2,title:"Comment changer le budget de calcul, les frais, & la priorisation d'une transaction",slug:"comment-changer-le-budget-de-calcul-les-frais-la-priorisation-d-une-transaction",children:[]}],path:"/fr/references/basic-transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"Paires de Cl\xE9s et Portefeuilles",headers:[{level:2,title:"Comment g\xE9n\xE9rer une nouvelle Paire de Cl\xE9s",slug:"comment-generer-une-nouvelle-paire-de-cles",children:[]},{level:2,title:"Comment restaurer une Paire de cl\xE9s \xE0 partir d'une cl\xE9 priv\xE9e",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee",children:[]},{level:2,title:"Comment v\xE9rifier une Paire de Cl\xE9s",slug:"comment-verifier-une-paire-de-cles",children:[]},{level:2,title:"Comment v\xE9rifier si une cl\xE9 publique a une cl\xE9 priv\xE9e associ\xE9e",slug:"comment-verifier-si-une-cle-publique-a-une-cle-privee-associee",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une phrase mn\xE9monique",slug:"comment-generer-une-phrase-mnemonique",children:[]},{level:2,title:"Comment restaurer une paire de cl\xE9s \xE0 partir d'une phrase mn\xE9monique",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-phrase-mnemonique",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une adresse personnalis\xE9e",slug:"comment-generer-une-adresse-personnalisee",children:[]},{level:2,title:"Comment signer et v\xE9rifier des messages avec les portefeuilles",slug:"comment-signer-et-verifier-des-messages-avec-les-portefeuilles",children:[]},{level:2,title:"Comment se connecter \xE0 un portefeuille",slug:"comment-se-connecter-a-un-portefeuille",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/fr/references/keypairs-and-wallets.html",pathLocale:"/fr/",extraFields:[]},{title:"D\xE9veloppement Local",headers:[{level:2,title:"D\xE9marrer un Validateur Local",slug:"demarrer-un-validateur-local",children:[]},{level:2,title:"Connexion aux Environnements",slug:"connexion-aux-environnements",children:[]},{level:2,title:"Inscription \xE0 des Ev\xE9nements",slug:"inscription-a-des-evenements",children:[]},{level:2,title:"Obtention de SOL pour les Tests",slug:"obtention-de-sol-pour-les-tests",children:[]},{level:2,title:"Utilisation des Comptes et des Programmes du Mainnet",slug:"utilisation-des-comptes-et-des-programmes-du-mainnet",children:[{level:3,title:"Comment charger des comptes depuis le mainnet",slug:"comment-charger-des-comptes-depuis-le-mainnet",children:[]},{level:3,title:"Comment charger des programmes depuis le mainnet",slug:"comment-charger-des-programmes-depuis-le-mainnet",children:[]}]}],path:"/fr/references/local-development.html",pathLocale:"/fr/",extraFields:[]},{title:"Service de Noms",headers:[{level:2,title:"Registre de noms",slug:"registre-de-noms",children:[]},{level:2,title:"R\xE9solution des domaines SOL",slug:"resolution-des-domaines-sol",children:[]},{level:2,title:"Recherche invers\xE9e",slug:"recherche-inversee",children:[]},{level:2,title:"Recherche des sous-domaines",slug:"recherche-des-sous-domaines",children:[]},{level:2,title:"Trouver tous les noms de domaine appartenant \xE0 une cl\xE9 publique",slug:"trouver-tous-les-noms-de-domaine-appartenant-a-une-cle-publique",children:[]},{level:2,title:"R\xE9soudre un pseudo Twitter",slug:"resoudre-un-pseudo-twitter",children:[]},{level:2,title:"Recherche invers\xE9e d'un pseudo Twitter",slug:"recherche-inversee-d-un-pseudo-twitter",children:[]}],path:"/fr/references/name-service.html",pathLocale:"/fr/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"Comment cr\xE9er un NFT",slug:"comment-creer-un-nft",children:[{level:3,title:"T\xE9l\xE9charger sur Arweave",slug:"telecharger-sur-arweave",children:[]},{level:3,title:"Cr\xE9er le NFT",slug:"creer-le-nft",children:[]}]},{level:2,title:"Comment obtenir les m\xE9tadonn\xE9es des NFTs",slug:"comment-obtenir-les-metadonnees-des-nfts",children:[]},{level:2,title:"Comment obtenir le propri\xE9taire d'un NFT",slug:"comment-obtenir-le-proprietaire-d-un-nft",children:[]},{level:2,title:"Comment obtenir les adresses de cr\xE9ation des NFTs",slug:"comment-obtenir-les-adresses-de-creation-des-nfts",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Comment r\xE9cup\xE9rer tous les NFTs d'un portefeuille ?",slug:"comment-recuperer-tous-les-nfts-d-un-portefeuille",children:[]}],path:"/fr/references/nfts.html",pathLocale:"/fr/",extraFields:[]},{title:"Envoi de transactions hors connexion",headers:[{level:2,title:"Signer la Transaction",slug:"signer-la-transaction",children:[]},{level:2,title:"Transaction avec Signature Partielle",slug:"transaction-avec-signature-partielle",children:[]},{level:2,title:"Nonce Durable",slug:"nonce-durable",children:[{level:3,title:"Cr\xE9er un Compte de Nonce",slug:"creer-un-compte-de-nonce",children:[]},{level:3,title:"Obtenir le Compte de Nonce",slug:"obtenir-le-compte-de-nonce",children:[]},{level:3,title:"Utiliser le Compte de Nonce",slug:"utiliser-le-compte-de-nonce",children:[]}]}],path:"/fr/references/offline-transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"\xC9crire des Programmes",headers:[{level:2,title:"Comment transf\xE9rer SOL dans un programme",slug:"comment-transferer-sol-dans-un-programme",children:[]},{level:2,title:"Comment obtenir une r\xE9f\xE9rence \xE0 l'horloge dans un programme",slug:"comment-obtenir-une-reference-a-l-horloge-dans-un-programme",children:[{level:3,title:"Passer l'Horloge comme un compte dans une instruction",slug:"passer-l-horloge-comme-un-compte-dans-une-instruction",children:[]},{level:3,title:"Acc\xE9der \xE0 l'horloge directement dans une instruction",slug:"acceder-a-l-horloge-directement-dans-une-instruction",children:[]}]},{level:2,title:"Comment modifier la taille d'un compte",slug:"comment-modifier-la-taille-d-un-compte",children:[]},{level:2,title:"Comment faire l'Invocation de Programme Crois\xE9",slug:"comment-faire-l-invocation-de-programme-croise",children:[]},{level:2,title:"Comment cr\xE9er un PDA",slug:"comment-creer-un-pda",children:[]},{level:2,title:"Comment lire des comptes",slug:"comment-lire-des-comptes",children:[]},{level:2,title:"Comment v\xE9rifier des comptes",slug:"comment-verifier-des-comptes",children:[]},{level:2,title:"Comment lire plusieurs instructions \xE0 partir d'une transaction",slug:"comment-lire-plusieurs-instructions-a-partir-d-une-transaction",children:[]}],path:"/fr/references/programs.html",pathLocale:"/fr/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Obtenir les Validateurs Actuels",slug:"obtenir-les-validateurs-actuels",children:[]},{level:2,title:"Cr\xE9er un Compte de Stake",slug:"creer-un-compte-de-stake",children:[]},{level:2,title:"D\xE9l\xE9guer un Stake",slug:"deleguer-un-stake",children:[]},{level:2,title:"Obtenir les D\xE9l\xE9gu\xE9s par Validateurs",slug:"obtenir-les-delegues-par-validateurs",children:[]},{level:2,title:"D\xE9sactiver le Stake",slug:"desactiver-le-stake",children:[]},{level:2,title:"Retirer le Stake",slug:"retirer-le-stake",children:[]}],path:"/fr/references/staking.html",pathLocale:"/fr/",extraFields:[]},{title:"Interaction avec les Jetons",headers:[{level:2,title:"De quoi ai-je besoin pour commencer avec SPL-Tokens ?",slug:"de-quoi-ai-je-besoin-pour-commencer-avec-spl-tokens",children:[]},{level:2,title:"Comment cr\xE9er un nouveau Jeton",slug:"comment-creer-un-nouveau-jeton",children:[]},{level:2,title:'Comment obtenir un "mint" de jeton',slug:"comment-obtenir-un-mint-de-jeton",children:[]},{level:2,title:"Comment cr\xE9er un compte de jeton",slug:"comment-creer-un-compte-de-jeton",children:[]},{level:2,title:"Comment obtenir un compte de jetons",slug:"comment-obtenir-un-compte-de-jetons",children:[]},{level:2,title:"Comment obtenir le solde d'un compte de jetons",slug:"comment-obtenir-le-solde-d-un-compte-de-jetons",children:[]},{level:2,title:"Comment cr\xE9er (mint) de nouveaux jetons",slug:"comment-creer-mint-de-nouveaux-jetons",children:[]},{level:2,title:"Comment transf\xE9rer des jetons",slug:"comment-transferer-des-jetons",children:[]},{level:2,title:"Comment br\xFBler des jetons",slug:"comment-bruler-des-jetons",children:[]},{level:2,title:"Comment fermer des comptes de jetons",slug:"comment-fermer-des-comptes-de-jetons",children:[]},{level:2,title:"Comment d\xE9finir l'autorit\xE9 sur les comptes de jetons ou de mints ?",slug:"comment-definir-l-autorite-sur-les-comptes-de-jetons-ou-de-mints",children:[]},{level:2,title:"Comment approuver une d\xE9l\xE9gation de jetons",slug:"comment-approuver-une-delegation-de-jetons",children:[]},{level:2,title:"Comment r\xE9voquer une d\xE9l\xE9gation de jetons",slug:"comment-revoquer-une-delegation-de-jetons",children:[]},{level:2,title:"Comment g\xE9rer les wrapped SOL",slug:"comment-gerer-les-wrapped-sol",children:[{level:3,title:"Cr\xE9er un Compte de Jetons",slug:"creer-un-compte-de-jetons",children:[]},{level:3,title:"Ajouter un solde",slug:"ajouter-un-solde",children:[]}]},{level:2,title:"Comment obtenir tous les comptes de jetons par propri\xE9taire",slug:"comment-obtenir-tous-les-comptes-de-jetons-par-proprietaire",children:[]}],path:"/fr/references/token.html",pathLocale:"/fr/",extraFields:[]},{title:"Maps de Comptes",headers:[{level:2,title:"D\xE9rivation des PDAs",slug:"derivation-des-pdas",children:[]},{level:2,title:"Compte de Map Unique",slug:"compte-de-map-unique",children:[]}],path:"/fr/guides/account-maps.html",pathLocale:"/fr/",extraFields:[]},{title:"Migration des Comptes de Donn\xE9es de Programmes",headers:[{level:2,title:"Comment migrer les comptes de donn\xE9es d'un programme ?",slug:"comment-migrer-les-comptes-de-donnees-d-un-programme",children:[]},{level:2,title:"Sc\xE9nario",slug:"scenario",children:[]},{level:2,title:"Mise \xE0 jour du Compte",slug:"mise-a-jour-du-compte",children:[{level:3,title:"1. Ajouter une logique de conversion de compte",slug:"_1-ajouter-une-logique-de-conversion-de-compte",children:[]}]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/data-migration.html",pathLocale:"/fr/",extraFields:[]},{title:"D\xE9bogage des Programmes Solana",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Tests d'Ex\xE9cution et D\xE9bogage dans l'\xE9diteur",slug:"tests-d-execution-et-debogage-dans-l-editeur",children:[]},{level:2,title:"Test avec un N\u0153ud de Validation Local dans l'\xE9diteur",slug:"test-avec-un-n\u0153ud-de-validation-local-dans-l-editeur",children:[]},{level:2,title:"Test avec un N\u0153ud de Validation Local \xE0 partir des Applications Clients",slug:"test-avec-un-n\u0153ud-de-validation-local-a-partir-des-applications-clients",children:[]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/debugging-solana-programs.html",pathLocale:"/fr/",extraFields:[]},{title:"Test de Conformit\xE9 des Fonctionnalit\xE9s",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Sc\xE9nario",slug:"scenario",children:[]},{level:2,title:"Statut de la Fonctionnalit\xE9",slug:"statut-de-la-fonctionnalite",children:[]},{level:2,title:"Test de Conformit\xE9",slug:"test-de-conformite",children:[]},{level:2,title:"D\xE9monstration Simple",slug:"demonstration-simple",children:[{level:3,title:"Toutes les fonctionnalit\xE9s activ\xE9es",slug:"toutes-les-fonctionnalites-activees",children:[]},{level:3,title:"Fonctionnalit\xE9s s\xE9lectives d\xE9sactiv\xE9es",slug:"fonctionnalites-selectives-desactivees",children:[]}]},{level:2,title:"Tests de Conformit\xE9 Compl\xE8te",slug:"tests-de-conformite-complete",children:[]},{level:2,title:"Test de Conformit\xE9 Compl\xE8te programm\xE9",slug:"test-de-conformite-complete-programme",children:[]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/feature-parity-testing.html",pathLocale:"/fr/",extraFields:[]},{title:"Obtenir les comptes d'un programme",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Examen plus approfondi",slug:"examen-plus-approfondi",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]}],path:"/fr/guides/get-program-accounts.html",pathLocale:"/fr/",extraFields:[]},{title:"S\xE9rialisation des donn\xE9es",headers:[{level:2,title:"Configuration pour la s\xE9rialisation avec Borsh",slug:"configuration-pour-la-serialisation-avec-borsh",children:[]},{level:2,title:"Comment s\xE9rialiser les donn\xE9es d'instruction c\xF4t\xE9 client",slug:"comment-serialiser-les-donnees-d-instruction-cote-client",children:[]},{level:2,title:"Comment d\xE9s\xE9rialiser les donn\xE9es d'instruction dans le programme",slug:"comment-deserialiser-les-donnees-d-instruction-dans-le-programme",children:[]},{level:2,title:"Comment s\xE9rialiser des donn\xE9es du compte dans le programme",slug:"comment-serialiser-des-donnees-du-compte-dans-le-programme",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"S\xE9rialisation/D\xE9s\xE9rialisation",slug:"serialisation-deserialisation",children:[]},{level:3,title:"Utilisation",slug:"utilisation",children:[]}]},{level:2,title:"Comment d\xE9s\xE9rialisation des donn\xE9es du compte c\xF4t\xE9 client",slug:"comment-deserialisation-des-donnees-du-compte-cote-client",children:[]},{level:2,title:"Mappages courants de Solana TS/JS",slug:"mappages-courants-de-solana-ts-js",children:[]},{level:2,title:"Constructions Avanc\xE9es",slug:"constructions-avancees",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Ressources",slug:"ressources",children:[]}],path:"/fr/guides/serialization.html",pathLocale:"/fr/",extraFields:[]},{title:"Transactions Versionn\xE9es",headers:[{level:2,title:"Faits",slug:"faits",children:[]},{level:2,title:"Transaction H\xE9rit\xE9e",slug:"transaction-heritee",children:[]},{level:2,title:"Message H\xE9rit\xE9",slug:"message-herite",children:[{level:3,title:"En-t\xEAte",slug:"en-tete",children:[]},{level:3,title:"Tableau compact d'adresses de comptes",slug:"tableau-compact-d-adresses-de-comptes",children:[]},{level:3,title:"Tableau compact d'instructions",slug:"tableau-compact-d-instructions",children:[]}]},{level:2,title:"Probl\xE8mes li\xE9s aux Transactions H\xE9rit\xE9es",slug:"problemes-lies-aux-transactions-heritees",children:[]},{level:2,title:"Tables de Consultation d'Adresses (LUT)",slug:"tables-de-consultation-d-adresses-lut",children:[]},{level:2,title:"Transactions Versionn\xE9es : TransactionV0",slug:"transactions-versionnees-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Tableau compact de consultations de tables d'adresses",slug:"tableau-compact-de-consultations-de-tables-d-adresses",children:[]},{level:3,title:"Tableau compact d'instructions",slug:"tableau-compact-d-instructions-1",children:[]}]},{level:2,title:"Modifications du RPC",slug:"modifications-du-rpc",children:[]},{level:2,title:"Autres Ressources",slug:"autres-ressources",children:[]},{level:2,title:"R\xE9f\xE9rences",slug:"references",children:[]}],path:"/fr/guides/versioned-transactions.html",pathLocale:"/fr/",extraFields:[]},{title:"Akun",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[]},{level:2,title:"Lebih Dalam",slug:"lebih-dalam",children:[{level:3,title:"Model Akun",slug:"model-akun",children:[]},{level:3,title:"Menyewa",slug:"menyewa",children:[]}]},{level:2,title:"Sumber Lainnya",slug:"sumber-lainnya",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/id/core-concepts/accounts.html",pathLocale:"/id/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[{level:3,title:"Membuat PDA",slug:"membuat-pda",children:[]},{level:3,title:"Berinteraksi dengan PDAs",slug:"berinteraksi-dengan-pdas",children:[]}]},{level:2,title:"Sumber lainnya",slug:"sumber-lainnya",children:[]}],path:"/id/core-concepts/pdas.html",pathLocale:"/id/",extraFields:[]},{title:"Program",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[]},{level:2,title:"Lebih Dalam",slug:"lebih-dalam",children:[{level:3,title:"Native Program & Solana Program Library (SPL)",slug:"native-program-solana-program-library-spl",children:[]},{level:3,title:"Menulis Program",slug:"menulis-program",children:[]},{level:3,title:"Deploy Program",slug:"deploy-program",children:[]}]},{level:2,title:"Sumber Lainnya",slug:"sumber-lainnya",children:[]}],path:"/id/core-concepts/programs.html",pathLocale:"/id/",extraFields:[]},{title:"Transaksi",headers:[{level:2,title:"Fakta-Fakta",slug:"fakta-fakta",children:[]},{level:2,title:"Lebih Dalam",slug:"lebih-dalam",children:[{level:3,title:"Biaya",slug:"biaya",children:[]}]},{level:2,title:"Sumber lainnya",slug:"sumber-lainnya",children:[]}],path:"/id/core-concepts/transactions.html",pathLocale:"/id/",extraFields:[]},{title:"Instalasi",headers:[{level:2,title:"Unduh Web3.js",slug:"unduh-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Membangun dari Source",slug:"membangun-dari-source",children:[]}]}],path:"/id/getting-started/installation.html",pathLocale:"/id/",extraFields:[]},{title:"Peta Akun",headers:[{level:2,title:"Menghasilkan PDA",slug:"menghasilkan-pda",children:[]},{level:2,title:"Akun Peta Tunggal",slug:"akun-peta-tunggal",children:[]}],path:"/id/guides/account-maps.html",pathLocale:"/id/",extraFields:[]},{title:"Migrasi Akun Data Program",headers:[{level:2,title:"Bagaimana cara melakukan migrasi akun data sebuah program?",slug:"bagaimana-cara-melakukan-migrasi-akun-data-sebuah-program",children:[]},{level:2,title:"Skenario",slug:"skenario",children:[]},{level:2,title:"Melakukan upgrade Akun",slug:"melakukan-upgrade-akun",children:[{level:3,title:"1. Tambahkan logika konversi akun",slug:"_1-tambahkan-logika-konversi-akun",children:[]}]},{level:2,title:"Resource",slug:"resource",children:[]}],path:"/id/guides/data-migration.html",pathLocale:"/id/",extraFields:[]},{title:"Debug Program Solana",headers:[{level:2,title:"Fakta",slug:"fakta",children:[]},{level:2,title:"Uji Runtime dan Debugging di editor",slug:"uji-runtime-dan-debugging-di-editor",children:[]},{level:2,title:"Uji Node Validator Lokal di editor",slug:"uji-node-validator-lokal-di-editor",children:[]},{level:2,title:"Uji Node Validator Lokal dari Aplikasi Klien",slug:"uji-node-validator-lokal-dari-aplikasi-klien",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/id/guides/debugging-solana-programs.html",pathLocale:"/id/",extraFields:[]},{title:"Pengujian Paritas Fitur",headers:[{level:2,title:"Fakta",slug:"fakta",children:[]},{level:2,title:"Skenario",slug:"skenario",children:[]},{level:2,title:"Status Fitur",slug:"status-fitur",children:[]},{level:2,title:"Uji Paritas",slug:"uji-paritas",children:[]},{level:2,title:"Demonstrasi Sederhana",slug:"demonstrasi-sederhana",children:[{level:3,title:"Semua fitur diaktifkan",slug:"semua-fitur-diaktifkan",children:[]},{level:3,title:"Fitur selektif dinonaktifkan",slug:"fitur-selektif-dinonaktifkan",children:[]}]},{level:2,title:"Uji Paritas Penuh",slug:"uji-paritas-penuh",children:[]},{level:2,title:"Uji Paritas Penuh Secara Terprogram",slug:"uji-paritas-penuh-secara-terprogram",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/id/guides/feature-parity-testing.html",pathLocale:"/id/",extraFields:[]},{title:"Mendapatkan Akun Program",headers:[{level:2,title:"Fakta",slug:"fakta",children:[]},{level:2,title:"Memahami lebih dalam",slug:"memahami-lebih-dalam",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Resource lainnya",slug:"resource-lainnya",children:[]}],path:"/id/guides/get-program-accounts.html",pathLocale:"/id/",extraFields:[]},{title:"Serialisasi Data",headers:[{level:2,title:"Persiapan untuk Borsh Serialization",slug:"persiapan-untuk-borsh-serialization",children:[]},{level:2,title:"Cara serialize data instruksi pada klien",slug:"cara-serialize-data-instruksi-pada-klien",children:[]},{level:2,title:"Cara deserialisasi data instruksi pada program",slug:"cara-deserialisasi-data-instruksi-pada-program",children:[]},{level:2,title:"Cara serialisasi data akun pada program",slug:"cara-serialisasi-data-akun-pada-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialisasi/Deserialisasi",slug:"serialisasi-deserialisasi",children:[]},{level:3,title:"Penggunaan",slug:"penggunaan",children:[]}]},{level:2,title:"Cara deserialisasi data akun pada klien",slug:"cara-deserialisasi-data-akun-pada-klien",children:[]},{level:2,title:"Pemetaan Solana TS/JS Umum",slug:"pemetaan-solana-ts-js-umum",children:[]},{level:2,title:"Metode Lanjutan",slug:"metode-lanjutan",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resource",slug:"resource",children:[]}],path:"/id/guides/serialization.html",pathLocale:"/id/",extraFields:[]},{title:"Akun",headers:[{level:2,title:"Bagaimana cara membuat sebuah sistem akun",slug:"bagaimana-cara-membuat-sebuah-sistem-akun",children:[]},{level:2,title:"Bagaimana cara mengkalkulasi biaya akun",slug:"bagaimana-cara-mengkalkulasi-biaya-akun",children:[]},{level:2,title:"Bagaimana cara membuat akun dengan seeds",slug:"bagaimana-cara-membuat-akun-dengan-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"Bagaimana cara membuat PDAs",slug:"bagaimana-cara-membuat-pdas",children:[{level:3,title:"Menghasilkan sebuah PDA",slug:"menghasilkan-sebuah-pda",children:[]},{level:3,title:"Membuat sebuah PDA",slug:"membuat-sebuah-pda",children:[]}]},{level:2,title:"Bagaimana cara untuk sign sebuah PDA",slug:"bagaimana-cara-untuk-sign-sebuah-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"Bagaimana Cara Mendapatkan Program Akun",slug:"bagaimana-cara-mendapatkan-program-akun",children:[]},{level:2,title:"Bagaimana Cara Menutup Akun",slug:"bagaimana-cara-menutup-akun",children:[]},{level:2,title:"Bagaimana Cara Mendapatkan Balance Akun",slug:"bagaimana-cara-mendapatkan-balance-akun",children:[]}],path:"/id/references/accounts.html",pathLocale:"/id/",extraFields:[]},{title:"Mengirim Transaksi",headers:[{level:2,title:"Bagaimana cara mengirim SOL",slug:"bagaimana-cara-mengirim-sol",children:[]},{level:2,title:"Bagimana cara mengirim SPL-Tokens",slug:"bagimana-cara-mengirim-spl-tokens",children:[]},{level:2,title:"Bagaimana cara mengkalkulasi biaya transaksi",slug:"bagaimana-cara-mengkalkulasi-biaya-transaksi",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Bagaimana menambah catatan ke dalam sebuah transaksi",slug:"bagaimana-menambah-catatan-ke-dalam-sebuah-transaksi",children:[]},{level:2,title:"Bagaimana cara merubah perhitungan budget untuk sebuah transaksi",slug:"bagaimana-cara-merubah-perhitungan-budget-untuk-sebuah-transaksi",children:[]}],path:"/id/references/basic-transactions.html",pathLocale:"/id/",extraFields:[]},{title:"Keypairs & Wallets",headers:[{level:2,title:"Bagaimana cara membuat sebuah Keypair baru",slug:"bagaimana-cara-membuat-sebuah-keypair-baru",children:[]},{level:2,title:"Bagaimana cara me-restore sebuah Keypair dari sebuah secret",slug:"bagaimana-cara-me-restore-sebuah-keypair-dari-sebuah-secret",children:[]},{level:2,title:"Bagaimana cara menverifikasi sebuah Keypair",slug:"bagaimana-cara-menverifikasi-sebuah-keypair",children:[]},{level:2,title:"Bagaimana cara untuk check jika sebuah public key telah terhubung dengan sebuah private key",slug:"bagaimana-cara-untuk-check-jika-sebuah-public-key-telah-terhubung-dengan-sebuah-private-key",children:[]},{level:2,title:"Bagaimana cara membuat mnemonic phrase",slug:"bagaimana-cara-membuat-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara restore sebuah Keypair dari sebuah mnemonic phrase",slug:"bagaimana-cara-restore-sebuah-keypair-dari-sebuah-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara membuat sebuah vanity address",slug:"bagaimana-cara-membuat-sebuah-vanity-address",children:[]},{level:2,title:"Bagaimana cara untuk sign dan menverifikasi messages dalam wallet",slug:"bagaimana-cara-untuk-sign-dan-menverifikasi-messages-dalam-wallet",children:[]},{level:2,title:"Bagaimana cara mengkoneksi ke sebuah wallet",slug:"bagaimana-cara-mengkoneksi-ke-sebuah-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/id/references/keypairs-and-wallets.html",pathLocale:"/id/",extraFields:[]},{title:"Development Lokal",headers:[{level:2,title:"Memulai Validator Lokal",slug:"memulai-validator-lokal",children:[]},{level:2,title:"Menghubungkan Ke Environment",slug:"menghubungkan-ke-environment",children:[]},{level:2,title:"Subskripsi Event",slug:"subskripsi-event",children:[]},{level:2,title:"Mendapatkan Tes SOL",slug:"mendapatkan-tes-sol",children:[]},{level:2,title:"Menggunakan Akun dan Program Mainnet",slug:"menggunakan-akun-dan-program-mainnet",children:[{level:3,title:"Cara memuat akun dari mainnet",slug:"cara-memuat-akun-dari-mainnet",children:[]},{level:3,title:"Cara memuat program dari mainnet",slug:"cara-memuat-program-dari-mainnet",children:[]}]}],path:"/id/references/local-development.html",pathLocale:"/id/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"Menemukan semua domain name yang dimiliki oleh suatu public key",slug:"menemukan-semua-domain-name-yang-dimiliki-oleh-suatu-public-key",children:[]},{level:2,title:"Resolve Twitter handle",slug:"resolve-twitter-handle",children:[]},{level:2,title:"Reverse look up suatu Twitter handle",slug:"reverse-look-up-suatu-twitter-handle",children:[]}],path:"/id/references/name-service.html",pathLocale:"/id/",extraFields:[]},{title:"NFT",headers:[{level:2,title:"Cara membuat NFT",slug:"cara-membuat-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint NFT-nya",slug:"mint-nft-nya",children:[]}]},{level:2,title:"Cara Mendapatkan Metadata NFT",slug:"cara-mendapatkan-metadata-nft",children:[]},{level:2,title:"Cara Mengetahui Pemilik Sebuah NFT",slug:"cara-mengetahui-pemilik-sebuah-nft",children:[]},{level:2,title:"Cara untuk mengambil NFT Mint Addresses",slug:"cara-untuk-mengambil-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Cara Mendapatkan Semua NFT dari Suatu Wallet",slug:"cara-mendapatkan-semua-nft-dari-suatu-wallet",children:[]}],path:"/id/references/nfts.html",pathLocale:"/id/",extraFields:[]},{title:"Mengirim Transaksi Offline",headers:[{level:2,title:"Sign Transaksi",slug:"sign-transaksi",children:[]},{level:2,title:"Sign Transaksi Sebagian",slug:"sign-transaksi-sebagian",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Membuat Akun Nonce",slug:"membuat-akun-nonce",children:[]},{level:3,title:"Mendapatkan Akun Nonce",slug:"mendapatkan-akun-nonce",children:[]},{level:3,title:"Menggunakan Akun Nonce",slug:"menggunakan-akun-nonce",children:[]}]}],path:"/id/references/offline-transactions.html",pathLocale:"/id/",extraFields:[]},{title:"Menulis Program",headers:[{level:2,title:"Bagaimana cara mentransfer SOL di dalam sebuah program",slug:"bagaimana-cara-mentransfer-sol-di-dalam-sebuah-program",children:[]},{level:2,title:"Bagaimana cara mendapatkan waktu dalam sebuah program",slug:"bagaimana-cara-mendapatkan-waktu-dalam-sebuah-program",children:[{level:3,title:"Passing Waktu sebagai sebuah account di dalam sebuah instruksi",slug:"passing-waktu-sebagai-sebuah-account-di-dalam-sebuah-instruksi",children:[]},{level:3,title:"Mengakses Waktu secara langsung di dalam sebuah instruksi",slug:"mengakses-waktu-secara-langsung-di-dalam-sebuah-instruksi",children:[]}]},{level:2,title:"Bagaimana cara merubah size akun",slug:"bagaimana-cara-merubah-size-akun",children:[]},{level:2,title:"Bagaimana cara untuk membuat program Cross Invocation",slug:"bagaimana-cara-untuk-membuat-program-cross-invocation",children:[]},{level:2,title:"Bagaimana cara membuat sebuah PDA",slug:"bagaimana-cara-membuat-sebuah-pda",children:[]},{level:2,title:"Bagaimana cara membaca akun",slug:"bagaimana-cara-membaca-akun",children:[]},{level:2,title:"Bagaimana cara men-verifikasi akun",slug:"bagaimana-cara-men-verifikasi-akun",children:[]},{level:2,title:"Bagaimana cara membaca beberapa instruksi dalam sebuah transaksi",slug:"bagaimana-cara-membaca-beberapa-instruksi-dalam-sebuah-transaksi",children:[]}],path:"/id/references/programs.html",pathLocale:"/id/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Mendapatkan Validators",slug:"mendapatkan-validators",children:[]},{level:2,title:"Membuat Stake Account",slug:"membuat-stake-account",children:[]},{level:2,title:"Mendelegasi Stake",slug:"mendelegasi-stake",children:[]},{level:2,title:"Mendapatkan Delegator dengan Validator",slug:"mendapatkan-delegator-dengan-validator",children:[]},{level:2,title:"Deactivate Stake",slug:"deactivate-stake",children:[]},{level:2,title:"Withdraw Stake",slug:"withdraw-stake",children:[]}],path:"/id/references/staking.html",pathLocale:"/id/",extraFields:[]},{title:"Interaksi dengan Token",headers:[{level:2,title:"Apa yang saya perlukan untuk memulai dengan SPL-Tokens?",slug:"apa-yang-saya-perlukan-untuk-memulai-dengan-spl-tokens",children:[]},{level:2,title:"Bagaimana cara untuk membuat sebuah Token baru",slug:"bagaimana-cara-untuk-membuat-sebuah-token-baru",children:[]},{level:2,title:"Bagaimana cara mendapatkan sebuah token mint",slug:"bagaimana-cara-mendapatkan-sebuah-token-mint",children:[]},{level:2,title:"Bagaimana cara membuat sebuah akun token",slug:"bagaimana-cara-membuat-sebuah-akun-token",children:[]},{level:2,title:"Bagaimana cara mendapatkan sebuah Akun Token",slug:"bagaimana-cara-mendapatkan-sebuah-akun-token",children:[]},{level:2,title:"Bagaimana cara mendapatkan saldo dari akun token",slug:"bagaimana-cara-mendapatkan-saldo-dari-akun-token",children:[]},{level:2,title:"Bagaimana cara untuk me-mint token-token",slug:"bagaimana-cara-untuk-me-mint-token-token",children:[]},{level:2,title:"Bagaimana cara mentransfer token-token",slug:"bagaimana-cara-mentransfer-token-token",children:[]},{level:2,title:"Bagaimana cara membakar token-token",slug:"bagaimana-cara-membakar-token-token",children:[]},{level:2,title:"Bagaimana cara menutup akun-akun token",slug:"bagaimana-cara-menutup-akun-akun-token",children:[]},{level:2,title:"Bagaimana cara untuk men-set authority pada akun-akun token atau mints",slug:"bagaimana-cara-untuk-men-set-authority-pada-akun-akun-token-atau-mints",children:[]},{level:2,title:"Bagaimana cara untuk men-approve delegasi sebuah token",slug:"bagaimana-cara-untuk-men-approve-delegasi-sebuah-token",children:[]},{level:2,title:"Bagaimana cara menarik kembali delegasi token",slug:"bagaimana-cara-menarik-kembali-delegasi-token",children:[]},{level:2,title:"Bagaimana cara mengature wrapped SOL",slug:"bagaimana-cara-mengature-wrapped-sol",children:[{level:3,title:"Membuat Akun Token",slug:"membuat-akun-token",children:[]},{level:3,title:"Menambah Saldo",slug:"menambah-saldo",children:[]}]},{level:2,title:"Bagaimana cara mendapatkan semua akun-akun token sebagai pemilik",slug:"bagaimana-cara-mendapatkan-semua-akun-akun-token-sebagai-pemilik",children:[]}],path:"/id/references/token.html",pathLocale:"/id/",extraFields:[]},{title:"\u30A2\u30AB\u30A6\u30F3\u30C8",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30E2\u30C7\u30EB",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30E2\u30C6\u3099\u30EB",children:[]},{level:3,title:"rent(\u5BB6\u8CC3)",slug:"rent-\u5BB6\u8CC3",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/ja/core-concepts/accounts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI)",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"invoke\u3092\u7528\u3044\u305FCPI",slug:"invoke\u3092\u7528\u3044\u305Fcpi",children:[]},{level:3,title:"invoke_signed\u3092\u7528\u3044\u305FCPI",slug:"invoke-signed\u3092\u7528\u3044\u305Fcpi",children:[]},{level:3,title:"CPI Instruction",slug:"cpi-instruction",children:[]},{level:3,title:"CPI AccountInfo",slug:"cpi-accountinfo",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/cpi.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(PDA)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"PDA \u306E\u751F\u6210",slug:"pda-\u306E\u751F\u6210",children:[]},{level:3,title:"PDA\u3068\u5BFE\u8A71\u3059\u308B",slug:"pda\u3068\u5BFE\u8A71\u3059\u308B",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/pdas.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"\u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30DF\u30F3\u30AF\u3099",children:[]},{level:3,title:"\u30C7\u30D7\u30ED\u30A4",slug:"\u30C6\u3099\u30D5\u309A\u30ED\u30A4",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/programs.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"\u624B\u6570\u6599",slug:"\u624B\u6570\u6599",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/core-concepts/transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/ja/getting-started/installation.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30DE\u30C3\u30D7",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"\u5358\u4E00\u306E\u30DE\u30C3\u30D7 \u30A2\u30AB\u30A6\u30F3\u30C8",slug:"\u5358\u4E00\u306E\u30DE\u30C3\u30D5\u309A-\u30A2\u30AB\u30A6\u30F3\u30C8",children:[]}],path:"/ja/guides/account-maps.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u79FB\u884C",headers:[{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u79FB\u884C\u3059\u308B\u306B\u306F\u3069\u3046\u3059\u308C\u3070\u3088\u3044\u3067\u3059\u304B\uFF1F",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u30C6\u3099\u30FC\u30BF-\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u79FB\u884C\u3059\u308B\u306B\u306F\u3068\u3099\u3046\u3059\u308C\u306F\u3099\u3088\u3044\u3066\u3099\u3059\u304B",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C3\u30D5\u309A\u30AF\u3099\u30EC\u30FC\u30C8\u3099",children:[{level:3,title:"1. \u30A2\u30AB\u30A6\u30F3\u30C8\u5909\u63DB\u30ED\u30B8\u30C3\u30AF\u3092\u8FFD\u52A0\u3059\u308B",slug:"_1-\u30A2\u30AB\u30A6\u30F3\u30C8\u5909\u63DB\u30ED\u30B7\u3099\u30C3\u30AF\u3092\u8FFD\u52A0\u3059\u308B",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/data-migration.html",pathLocale:"/ja/",extraFields:[]},{title:"Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30D0\u30C3\u30B0",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Runtime Testing and Debugging in editor",slug:"runtime-testing-and-debugging-in-editor",children:[]},{level:2,title:"Local Validator Node Testing in editor",slug:"local-validator-node-testing-in-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/debugging-solana-programs.html",pathLocale:"/ja/",extraFields:[]},{title:"\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u30B7\u30CA\u30EA\u30AA",slug:"\u30B7\u30CA\u30EA\u30AA",children:[]},{level:2,title:"\u6A5F\u80FD\u30B9\u30C6\u30FC\u30BF\u30B9",slug:"\u6A5F\u80FD\u30B9\u30C6\u30FC\u30BF\u30B9",children:[]},{level:2,title:"\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",slug:"\u30CF\u309A\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",children:[]},{level:2,title:"\u7C21\u5358\u306A\u30C7\u30E2\u30F3\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",slug:"\u7C21\u5358\u306A\u30C6\u3099\u30E2\u30F3\u30B9\u30C8\u30EC\u30FC\u30B7\u30E7\u30F3",children:[{level:3,title:"\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u3059\u3079\u3066\u306E\u6A5F\u80FD",slug:"\u30A2\u30AF\u30C6\u30A3\u30D5\u3099\u306A\u3059\u3078\u3099\u3066\u306E\u6A5F\u80FD",children:[]},{level:3,title:"\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u9078\u629E\u6A5F\u80FD",slug:"\u975E\u30A2\u30AF\u30C6\u30A3\u30D5\u3099\u306A\u9078\u629E\u6A5F\u80FD",children:[]}]},{level:2,title:"\u5B8C\u5168\u306A\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",slug:"\u5B8C\u5168\u306A\u30CF\u309A\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u306E\u5B8C\u5168\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099\u306E\u5B8C\u5168\u30CF\u309A\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8",children:[]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/feature-parity-testing.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97",headers:[{level:2,title:"\u6982\u8981",slug:"\u6982\u8981",children:[]},{level:2,title:"\u8A73\u7D30",slug:"\u8A73\u7D30",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/get-program-accounts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3",headers:[{level:2,title:"Setting up for Borsh Serialization",slug:"setting-up-for-borsh-serialization",children:[]},{level:2,title:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u547D\u4EE4\u30C7\u30FC\u30BF\u3092\u30B7\u30EA\u30A2\u30EB\u5316\u3059\u308B\u65B9\u6CD5",slug:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3066\u3099\u547D\u4EE4\u30C6\u3099\u30FC\u30BF\u3092\u30B7\u30EA\u30A2\u30EB\u5316\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u3092\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u547D\u4EE4\u30C6\u3099\u30FC\u30BF\u3092\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30B9\u3099\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u3092\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u547D\u4EE4\u30C6\u3099\u30FC\u30BF\u3092\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30B9\u3099\u3059\u308B\u65B9\u6CD5-1",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3/\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3",slug:"\u30B7\u30EA\u30A2\u30E9\u30A4\u30BB\u3099\u30FC\u30B7\u30E7\u30F3-\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30BB\u3099\u30FC\u30B7\u30E7\u30F3",children:[]},{level:3,title:"\u4F7F\u7528\u65B9\u6CD5",slug:"\u4F7F\u7528\u65B9\u6CD5",children:[]}]},{level:2,title:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u30A2\u30AB\u30A6\u30F3\u30C8 \u30C7\u30FC\u30BF\u3092\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3059\u308B\u65B9\u6CD5",slug:"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3066\u3099\u30A2\u30AB\u30A6\u30F3\u30C8-\u30C6\u3099\u30FC\u30BF\u3092\u30C6\u3099\u30B7\u30EA\u30A2\u30E9\u30A4\u30B9\u3099\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u4E00\u822C\u7684\u306A Solana TS/JS \u30DE\u30C3\u30D4\u30F3\u30B0",slug:"\u4E00\u822C\u7684\u306A-solana-ts-js-\u30DE\u30C3\u30D2\u309A\u30F3\u30AF\u3099",children:[]},{level:2,title:"\u3088\u308A\u9AD8\u5EA6\u306A\u69CB\u9020",slug:"\u3088\u308A\u9AD8\u5EA6\u306A\u69CB\u9020",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",slug:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",children:[]}],path:"/ja/guides/serialization.html",pathLocale:"/ja/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Legacy Transaction",slug:"legacy-transaction",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array of account addresses",slug:"compact-array-of-account-addresses",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions",children:[]}]},{level:2,title:"Issues with Legacy Transactions",slug:"issues-with-legacy-transactions",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Versioned Transactions: TransactionV0",slug:"versioned-transactions-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact array of address table lookups",slug:"compact-array-of-address-table-lookups",children:[]},{level:3,title:"Compact array of instructions",slug:"compact-array-of-instructions-1",children:[]}]},{level:2,title:"RPC Changes",slug:"rpc-changes",children:[]},{level:2,title:"Other Resources",slug:"other-resources",children:[]},{level:2,title:"References",slug:"references",children:[]}],path:"/ja/guides/versioned-transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30A2\u30AB\u30A6\u30F3\u30C8",headers:[{level:2,title:"\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9",slug:"\u30B7\u30B9\u30C6\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u308A\u65B9",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u8CBB\u7528\u306E\u8A08\u7B97\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u8CBB\u7528\u306E\u8A08\u7B97\u65B9\u6CD5",children:[]},{level:2,title:"\u30B7\u30FC\u30C9\u4ED8\u304D\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",slug:"\u30B7\u30FC\u30C8\u3099\u4ED8\u304D\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"\u751F\u6210",slug:"\u751F\u6210",children:[]},{level:3,title:"\u4F5C\u6210",slug:"\u4F5C\u6210",children:[]},{level:3,title:"\u9001\u4FE1",slug:"\u9001\u4FE1",children:[]}]},{level:2,title:"PDA \u306E\u4F5C\u6210\u65B9\u6CD5",slug:"pda-\u306E\u4F5C\u6210\u65B9\u6CD5",children:[{level:3,title:"PDA\u306E\u751F\u6210",slug:"pda\u306E\u751F\u6210",children:[]},{level:3,title:"Create a PDA",slug:"create-a-pda",children:[]}]},{level:2,title:"PDA\u3067\u7F72\u540D\u3059\u308B\u65B9\u6CD5",slug:"pda\u3066\u3099\u7F72\u540D\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"program account\u306E\u53D6\u5F97\u65B9\u6CD5",slug:"program-account\u306E\u53D6\u5F97\u65B9\u6CD5",children:[]},{level:2,title:"account\u306E\u9589\u9396",slug:"account\u306E\u9589\u9396",children:[]},{level:2,title:"account\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"account\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/accounts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1",headers:[{level:2,title:"SOL\u306E\u9001\u91D1\u65B9\u6CD5",slug:"sol\u306E\u9001\u91D1\u65B9\u6CD5",children:[]},{level:2,title:"SPL-Token\u306E\u9001\u4FE1\u65B9\u6CD5",slug:"spl-token\u306E\u9001\u4FE1\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u30B3\u30B9\u30C8\u306E\u8A08\u7B97\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u30B3\u30B9\u30C8\u306E\u8A08\u7B97\u65B9\u6CD5",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3078\u306E\u30E1\u30E2\u306E\u8FFD\u52A0\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u3078\u306E\u30E1\u30E2\u306E\u8FFD\u52A0\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u8A08\u7B97\u4E88\u7B97\u3001\u6599\u91D1\u3001\u304A\u3088\u3073\u512A\u5148\u5EA6\u3092\u5909\u66F4\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u8A08\u7B97\u4E88\u7B97\u3001\u6599\u91D1\u3001\u304A\u3088\u3072\u3099\u512A\u5148\u5EA6\u3092\u5909\u66F4\u3059\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/basic-transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8",headers:[{level:2,title:"\u65B0\u3057\u3044\u30AD\u30FC\u30DA\u30A2\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30AD\u30FC\u30DA\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304B\u3099\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3068\u3099\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D0\u30CB\u30C6\u30A3\u30A2\u30C9\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CF\u3099\u30CB\u30C6\u30A3\u30A2\u30C8\u3099\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/ja/references/keypairs-and-wallets.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30ED\u30FC\u30AB\u30EB\u958B\u767A",headers:[{level:2,title:"\u30ED\u30FC\u30AB\u30EB\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306E\u958B\u59CB",slug:"\u30ED\u30FC\u30AB\u30EB\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306E\u958B\u59CB",children:[]},{level:2,title:"\u74B0\u5883\u3078\u306E\u63A5\u7D9A",slug:"\u74B0\u5883\u3078\u306E\u63A5\u7D9A",children:[]},{level:2,title:"\u30A4\u30D9\u30F3\u30C8\u306E\u30B5\u30D6\u30B9\u30AF\u30E9\u30A4\u30D6",slug:"\u30A4\u30D8\u3099\u30F3\u30C8\u306E\u30B5\u30D5\u3099\u30B9\u30AF\u30E9\u30A4\u30D5\u3099",children:[]},{level:2,title:"\u30C6\u30B9\u30C8SOL\u306E\u53D6\u5F97",slug:"\u30C6\u30B9\u30C8sol\u306E\u53D6\u5F97",children:[]},{level:2,title:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F7F\u7528",slug:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u4F7F\u7528",children:[{level:3,title:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30ED\u30FC\u30C9\u3059\u308B\u65B9\u6CD5",slug:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30ED\u30FC\u30C8\u3099\u3059\u308B\u65B9\u6CD5",children:[]},{level:3,title:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30ED\u30FC\u30C9\u3059\u308B\u65B9\u6CD5",slug:"\u30E1\u30A4\u30F3\u30CD\u30C3\u30C8\u304B\u3089\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3092\u30ED\u30FC\u30C8\u3099\u3059\u308B\u65B9\u6CD5",children:[]}]}],path:"/ja/references/local-development.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9",headers:[{level:2,title:"\u30CD\u30FC\u30E0\u30EC\u30B8\u30B9\u30C8\u30EA",slug:"\u30CD\u30FC\u30E0\u30EC\u30B7\u3099\u30B9\u30C8\u30EA",children:[]},{level:2,title:"SOL\u30C9\u30E1\u30A4\u30F3\u306E\u89E3\u6C7A",slug:"sol\u30C8\u3099\u30E1\u30A4\u30F3\u306E\u89E3\u6C7A",children:[]},{level:2,title:"\u9006\u5F15\u304D",slug:"\u9006\u5F15\u304D",children:[]},{level:2,title:"\u30B5\u30D6\u30C9\u30E1\u30A4\u30F3\u306E\u691C\u7D22",slug:"\u30B5\u30D5\u3099\u30C8\u3099\u30E1\u30A4\u30F3\u306E\u691C\u7D22",children:[]},{level:2,title:"\u516C\u958B\u9375\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30C9\u30E1\u30A4\u30F3\u540D\u3092\u898B\u3064\u3051\u308B",slug:"\u516C\u958B\u9375\u304B\u3099\u6240\u6709\u3059\u308B\u3059\u3078\u3099\u3066\u306E\u30C8\u3099\u30E1\u30A4\u30F3\u540D\u3092\u898B\u3064\u3051\u308B",children:[]},{level:2,title:"Twitter handle\u3092\u89E3\u6C7A\u3059\u308B",slug:"twitter-handle\u3092\u89E3\u6C7A\u3059\u308B",children:[]},{level:2,title:"Twitter handle\u306E\u9006\u5F15\u304D",slug:"twitter-handle\u306E\u9006\u5F15\u304D",children:[]}],path:"/ja/references/name-service.html",pathLocale:"/ja/",extraFields:[]},{title:"NFT",headers:[{level:2,title:"NFT \u306E\u4F5C\u6210\u65B9\u6CD5",slug:"nft-\u306E\u4F5C\u6210\u65B9\u6CD5",children:[{level:3,title:"Arweave\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9",slug:"arweave\u306B\u30A2\u30C3\u30D5\u309A\u30ED\u30FC\u30C8\u3099",children:[]},{level:3,title:"NFT\u3092\u30DF\u30F3\u30C8",slug:"nft\u3092\u30DF\u30F3\u30C8",children:[]}]},{level:2,title:"NFT\u30E1\u30BF\u30C7\u30FC\u30BF\u306E\u53D6\u5F97\u65B9\u6CD5",slug:"nft\u30E1\u30BF\u30C6\u3099\u30FC\u30BF\u306E\u53D6\u5F97\u65B9\u6CD5",children:[]},{level:2,title:"NFT\u306E\u6240\u6709\u8005\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"nft\u306E\u6240\u6709\u8005\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"NFT\u30DF\u30F3\u30C8\u30A2\u30C9\u30EC\u30B9\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"nft\u30DF\u30F3\u30C8\u30A2\u30C8\u3099\u30EC\u30B9\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u304B\u3089\u3059\u3079\u3066\u306E NFT \u3092\u53D6\u5F97\u3059\u308B\u306B\u306F\uFF1F",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u304B\u3089\u3059\u3078\u3099\u3066\u306E-nft-\u3092\u53D6\u5F97\u3059\u308B\u306B\u306F",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Candy Machine\u306E\u4F5C\u6210\u65B9\u6CD5",slug:"candy-machine\u306E\u4F5C\u6210\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u306E\u524A\u9664\u65B9\u6CD5",slug:"candy-machine\u306E\u524A\u9664\u65B9\u6CD5",children:[]},{level:3,title:"authority\u3092\u4ECB\u3057\u3066Candy Machine\u3092\u63A2\u3059\u65B9\u6CD5",slug:"authority\u3092\u4ECB\u3057\u3066candy-machine\u3092\u63A2\u3059\u65B9\u6CD5",children:[]},{level:3,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066Candy Machine\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C8\u3099\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066candy-machine\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",children:[]},{level:3,title:"\u30A2\u30C9\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066Candy Machine\u3092\u63A2\u3059\u65B9\u6CD5",slug:"\u30A2\u30C8\u3099\u30EC\u30B9\u3092\u4F7F\u7528\u3057\u3066candy-machine\u3092\u63A2\u3059\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u304B\u3089\u30DF\u30F3\u30C8\u3055\u308C\u305FNFT\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",slug:"candy-machine\u304B\u3089\u30DF\u30F3\u30C8\u3055\u308C\u305Fnft\u3092\u898B\u3064\u3051\u308B\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u306B\u30A2\u30A4\u30C6\u30E0\u3092\u633F\u5165\u3059\u308B\u65B9\u6CD5",slug:"candy-machine\u306B\u30A2\u30A4\u30C6\u30E0\u3092\u633F\u5165\u3059\u308B\u65B9\u6CD5",children:[]},{level:3,title:"Candy Machine\u304B\u3089NFT\u3092\u30DF\u30F3\u30C8\u3059\u308B\u65B9\u6CD5",slug:"candy-machine\u304B\u3089nft\u3092\u30DF\u30F3\u30C8\u3059\u308B\u65B9\u6CD5",children:[]}]}],path:"/ja/references/nfts.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1",headers:[{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D",children:[]},{level:2,title:"\u90E8\u5206\u7F72\u540D\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3",slug:"\u90E8\u5206\u7F72\u540D\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3",children:[]},{level:2,title:"\u8010\u4E45\u6027\u306E\u3042\u308B\u30CA\u30F3\u30B9",slug:"\u8010\u4E45\u6027\u306E\u3042\u308B\u30CA\u30F3\u30B9",children:[{level:3,title:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97",slug:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97",children:[]},{level:3,title:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97",slug:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97-1",children:[]},{level:3,title:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F7F\u7528",slug:"\u30CA\u30F3\u30B9\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F7F\u7528",children:[]}]}],path:"/ja/references/offline-transactions.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F5C\u6210",headers:[{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u3067SOL\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099sol\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u3067clock\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099clock\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[{level:3,title:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u3057\u3066Clock\u3092\u6E21\u3059",slug:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u3057\u3066clock\u3092\u6E21\u3059",children:[]},{level:3,title:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u3067Clock\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B",slug:"\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u5185\u3066\u3099clock\u306B\u76F4\u63A5\u30A2\u30AF\u30BB\u30B9\u3059\u308B",children:[]}]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30B5\u30A4\u30BA\u306E\u5909\u66F4\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30B5\u30A4\u30B9\u3099\u306E\u5909\u66F4\u65B9\u6CD5",children:[]},{level:2,title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u540C\u58EB\u306E\u547C\u3073\u51FA\u3057\u65B9\u6CD5",slug:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u540C\u58EB\u306E\u547C\u3072\u3099\u51FA\u3057\u65B9\u6CD5",children:[]},{level:2,title:"PDA\u306E\u4F5C\u6210\u65B9\u6CD5",slug:"pda\u306E\u4F5C\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u65B9\u6CD5",children:[]},{level:2,title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",slug:"\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304B\u3089\u8907\u6570\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\u65B9\u6CD5",slug:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u304B\u3089\u8907\u6570\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3092\u8AAD\u307F\u53D6\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/programs.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30B9\u30C6\u30FC\u30AD\u30F3\u30B0",headers:[{level:2,title:"\u73FE\u5728\u306E\u30D0\u30EA\u30C7\u30FC\u30BF\u3092\u53D6\u5F97",slug:"\u73FE\u5728\u306E\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u3092\u53D6\u5F97",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210",slug:"\u30B9\u30C6\u30FC\u30AF\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u306E\u59D4\u4EFB",slug:"\u30B9\u30C6\u30FC\u30AF\u306E\u59D4\u4EFB",children:[]},{level:2,title:"\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u3088\u308B\u30C7\u30EA\u30B2\u30FC\u30BF\u30FC\u306E\u53D6\u5F97",slug:"\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306B\u3088\u308B\u30C6\u3099\u30EA\u30B1\u3099\u30FC\u30BF\u30FC\u306E\u53D6\u5F97",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u3092\u7121\u52B9\u306B\u3059\u308B",slug:"\u30B9\u30C6\u30FC\u30AF\u3092\u7121\u52B9\u306B\u3059\u308B",children:[]},{level:2,title:"\u30B9\u30C6\u30FC\u30AF\u3092\u5F15\u304D\u51FA\u3059",slug:"\u30B9\u30C6\u30FC\u30AF\u3092\u5F15\u304D\u51FA\u3059",children:[]}],path:"/ja/references/staking.html",pathLocale:"/ja/",extraFields:[]},{title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u306E\u5BFE\u8A71",headers:[{level:2,title:"SPL-Tokens \u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304C\u5FC5\u8981\u3067\u3059\u304B\uFF1F",slug:"spl-tokens-\u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304B\u3099\u5FC5\u8981\u3066\u3099\u3059\u304B",children:[]},{level:2,title:"\u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",slug:"\u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30DF\u30F3\u30C8\u306E\u5165\u624B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30DF\u30F3\u30C8\u306E\u5165\u624B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4F5C\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6B8B\u9AD8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u306E\u767A\u884C\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u306E\u767A\u884C\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u306E\u8EE2\u9001\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u306E\u8EE2\u9001\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u306E\u30D0\u30FC\u30F3\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u306E\u30CF\u3099\u30FC\u30F3\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u9589\u3058\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u9589\u3057\u3099\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u307E\u305F\u306Fmint\u306B\u6A29\u9650\u3092\u8A2D\u5B9A\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u307E\u305F\u306Fmint\u306B\u6A29\u9650\u3092\u8A2D\u5B9A\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30C7\u30EA\u30B2\u30FC\u30C8\u3092\u627F\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30C6\u3099\u30EA\u30B1\u3099\u30FC\u30C8\u3092\u627F\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30C8\u30FC\u30AF\u30F3\u30C7\u30EA\u30B2\u30FC\u30C8\u3092\u53D6\u308A\u6D88\u3059\u65B9\u6CD5",slug:"\u30C8\u30FC\u30AF\u30F3\u30C6\u3099\u30EA\u30B1\u3099\u30FC\u30C8\u3092\u53D6\u308A\u6D88\u3059\u65B9\u6CD5",children:[]},{level:2,title:"wrapped SOL\u306E\u7BA1\u7406\u65B9\u6CD5",slug:"wrapped-sol\u306E\u7BA1\u7406\u65B9\u6CD5",children:[{level:3,title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B",slug:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B",children:[]},{level:3,title:"\u6B8B\u9AD8\u306E\u8FFD\u52A0",slug:"\u6B8B\u9AD8\u306E\u8FFD\u52A0",children:[]}]},{level:2,title:"\u6240\u6709\u8005\u3054\u3068\u306E\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",slug:"\u6240\u6709\u8005\u3053\u3099\u3068\u306E\u3059\u3078\u3099\u3066\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u53D6\u5F97\u3059\u308B\u65B9\u6CD5",children:[]}],path:"/ja/references/token.html",pathLocale:"/ja/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/kr/core-concepts/accounts.html",pathLocale:"/kr/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Generating PDAs",slug:"generating-pdas",children:[]},{level:3,title:"Interacting with PDAs",slug:"interacting-with-pdas",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/core-concepts/pdas.html",pathLocale:"/kr/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Native Programs & The Solana Program Library (SPL)",slug:"native-programs-the-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs",slug:"writing-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/core-concepts/programs.html",pathLocale:"/kr/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"Fees",slug:"fees",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/core-concepts/transactions.html",pathLocale:"/kr/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/kr/getting-started/installation.html",pathLocale:"/kr/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/kr/guides/account-maps.html",pathLocale:"/kr/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"How can you migrate a program's data accounts?",slug:"how-can-you-migrate-a-program-s-data-accounts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Upgrading the Account",slug:"upgrading-the-account",children:[{level:3,title:"1. Add account conversion logic",slug:"_1-add-account-conversion-logic",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/data-migration.html",pathLocale:"/kr/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Runtime Testing and Debugging in editor",slug:"runtime-testing-and-debugging-in-editor",children:[]},{level:2,title:"Local Validator Node Testing in editor",slug:"local-validator-node-testing-in-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/debugging-solana-programs.html",pathLocale:"/kr/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parity Testing",slug:"parity-testing",children:[]},{level:2,title:"Simple Demonstration",slug:"simple-demonstration",children:[{level:3,title:"All features activated",slug:"all-features-activated",children:[]},{level:3,title:"Selective features deactivated",slug:"selective-features-deactivated",children:[]}]},{level:2,title:"Full Parity Testing",slug:"full-parity-testing",children:[]},{level:2,title:"Full Parity Testing Programmatically",slug:"full-parity-testing-programmatically",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/feature-parity-testing.html",pathLocale:"/kr/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts",slug:"facts",children:[]},{level:2,title:"Deep Dive",slug:"deep-dive",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/kr/guides/get-program-accounts.html",pathLocale:"/kr/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"Setting up for Borsh Serialization",slug:"setting-up-for-borsh-serialization",children:[]},{level:2,title:"How to serialize instruction data on the client",slug:"how-to-serialize-instruction-data-on-the-client",children:[]},{level:2,title:"How to deserialize instruction data on the program",slug:"how-to-deserialize-instruction-data-on-the-program",children:[]},{level:2,title:"How to serialize account data on the program",slug:"how-to-serialize-account-data-on-the-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Usage",slug:"usage",children:[]}]},{level:2,title:"How to deserialize account data on the client",slug:"how-to-deserialize-account-data-on-the-client",children:[]},{level:2,title:"Common Solana TS/JS Mappings",slug:"common-solana-ts-js-mappings",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/kr/guides/serialization.html",pathLocale:"/kr/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"How to create a system account",slug:"how-to-create-a-system-account",children:[]},{level:2,title:"How to calculate account cost",slug:"how-to-calculate-account-cost",children:[]},{level:2,title:"How to create accounts with seeds",slug:"how-to-create-accounts-with-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"How to create PDAs",slug:"how-to-create-pdas",children:[{level:3,title:"Generate a PDA",slug:"generate-a-pda",children:[]},{level:3,title:"Create a PDA",slug:"create-a-pda",children:[]}]},{level:2,title:"How to sign with a PDA",slug:"how-to-sign-with-a-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"How to get program accounts",slug:"how-to-get-program-accounts",children:[]},{level:2,title:"How to close accounts",slug:"how-to-close-accounts",children:[]},{level:2,title:"How to get account balance",slug:"how-to-get-account-balance",children:[]}],path:"/kr/references/accounts.html",pathLocale:"/kr/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"How to send SOL",slug:"how-to-send-sol",children:[]},{level:2,title:"How to send SPL-Tokens",slug:"how-to-send-spl-tokens",children:[]},{level:2,title:"How to calculate transaction cost",slug:"how-to-calculate-transaction-cost",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"How to add a memo to a transaction",slug:"how-to-add-a-memo-to-a-transaction",children:[]},{level:2,title:"How to change compute budget, fee, & priority for a transaction",slug:"how-to-change-compute-budget-fee-priority-for-a-transaction",children:[]}],path:"/kr/references/basic-transactions.html",pathLocale:"/kr/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/kr/references/keypairs-and-wallets.html",pathLocale:"/kr/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"Starting a Local Validator",slug:"starting-a-local-validator",children:[]},{level:2,title:"Connecting to Environments",slug:"connecting-to-environments",children:[]},{level:2,title:"Subscribing to Events",slug:"subscribing-to-events",children:[]},{level:2,title:"Getting Test SOL",slug:"getting-test-sol",children:[]},{level:2,title:"Using Mainnet Accounts and Programs",slug:"using-mainnet-accounts-and-programs",children:[{level:3,title:"How to load accounts from mainnet",slug:"how-to-load-accounts-from-mainnet",children:[]},{level:3,title:"How to load programs from mainnet",slug:"how-to-load-programs-from-mainnet",children:[]}]}],path:"/kr/references/local-development.html",pathLocale:"/kr/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"Find all the domain names owned by a public key",slug:"find-all-the-domain-names-owned-by-a-public-key",children:[]},{level:2,title:"Resolve a Twitter handle",slug:"resolve-a-twitter-handle",children:[]},{level:2,title:"Reverse look up of a Twitter handle",slug:"reverse-look-up-of-a-twitter-handle",children:[]}],path:"/kr/references/name-service.html",pathLocale:"/kr/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"How to create an NFT",slug:"how-to-create-an-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint the NFT",slug:"mint-the-nft",children:[]}]},{level:2,title:"How to get NFT Metadata",slug:"how-to-get-nft-metadata",children:[]},{level:2,title:"How to get the owner of an NFT",slug:"how-to-get-the-owner-of-an-nft",children:[]},{level:2,title:"How to get NFT Mint Addresses",slug:"how-to-get-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"How to get all NFTs from a wallet?",slug:"how-to-get-all-nfts-from-a-wallet",children:[]}],path:"/kr/references/nfts.html",pathLocale:"/kr/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Sign Transaction",slug:"sign-transaction",children:[]},{level:2,title:"Partial Sign Transaction",slug:"partial-sign-transaction",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Create Nonce Account",slug:"create-nonce-account",children:[]},{level:3,title:"Get Nonce Account",slug:"get-nonce-account",children:[]},{level:3,title:"Use Nonce Account",slug:"use-nonce-account",children:[]}]}],path:"/kr/references/offline-transactions.html",pathLocale:"/kr/",extraFields:[]},{title:"Writing Programs",headers:[{level:2,title:"How to transfer SOL in a program",slug:"how-to-transfer-sol-in-a-program",children:[]},{level:2,title:"How to get clock in a program",slug:"how-to-get-clock-in-a-program",children:[{level:3,title:"Passing Clock as an account inside an instruction",slug:"passing-clock-as-an-account-inside-an-instruction",children:[]},{level:3,title:"Accessing Clock directly inside an instruction",slug:"accessing-clock-directly-inside-an-instruction",children:[]}]},{level:2,title:"How to change account size",slug:"how-to-change-account-size",children:[]},{level:2,title:"How to do Cross Program Invocation",slug:"how-to-do-cross-program-invocation",children:[]},{level:2,title:"How to create a PDA",slug:"how-to-create-a-pda",children:[]},{level:2,title:"How to read accounts",slug:"how-to-read-accounts",children:[]},{level:2,title:"How to verify accounts",slug:"how-to-verify-accounts",children:[]},{level:2,title:"How to read multiple instructions from a transaction",slug:"how-to-read-multiple-instructions-from-a-transaction",children:[]}],path:"/kr/references/programs.html",pathLocale:"/kr/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Get Current Validators",slug:"get-current-validators",children:[]},{level:2,title:"Create Stake Account",slug:"create-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"Get Delegator by Validators",slug:"get-delegator-by-validators",children:[]},{level:2,title:"Deactivate Stake",slug:"deactivate-stake",children:[]},{level:2,title:"Withdraw Stake",slug:"withdraw-stake",children:[]}],path:"/kr/references/staking.html",pathLocale:"/kr/",extraFields:[]},{title:"Interacting with Tokens",headers:[{level:2,title:"What do I need to get started with SPL-Tokens?",slug:"what-do-i-need-to-get-started-with-spl-tokens",children:[]},{level:2,title:"How to create a new Token",slug:"how-to-create-a-new-token",children:[]},{level:2,title:"How to get a token mint",slug:"how-to-get-a-token-mint",children:[]},{level:2,title:"How to create a token account",slug:"how-to-create-a-token-account",children:[]},{level:2,title:"How to get a Token Account",slug:"how-to-get-a-token-account",children:[]},{level:2,title:"How to get a token account's balance",slug:"how-to-get-a-token-account-s-balance",children:[]},{level:2,title:"How to mint tokens",slug:"how-to-mint-tokens",children:[]},{level:2,title:"How to transfer tokens",slug:"how-to-transfer-tokens",children:[]},{level:2,title:"How to burn tokens",slug:"how-to-burn-tokens",children:[]},{level:2,title:"How to close token accounts",slug:"how-to-close-token-accounts",children:[]},{level:2,title:"How to set authority on token accounts or mints",slug:"how-to-set-authority-on-token-accounts-or-mints",children:[]},{level:2,title:"How to approve a token delegate",slug:"how-to-approve-a-token-delegate",children:[]},{level:2,title:"How to revoke a token delegate",slug:"how-to-revoke-a-token-delegate",children:[]},{level:2,title:"How to manage wrapped SOL",slug:"how-to-manage-wrapped-sol",children:[{level:3,title:"Create Token Account",slug:"create-token-account",children:[]},{level:3,title:"Add Balance",slug:"add-balance",children:[]}]},{level:2,title:"How to get all token accounts by owner",slug:"how-to-get-all-token-accounts-by-owner",children:[]}],path:"/kr/references/token.html",pathLocale:"/kr/",extraFields:[]},{title:"Contas",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Modelo de Conta",slug:"modelo-de-conta",children:[]},{level:3,title:"Aluguel",slug:"aluguel",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[{level:3,title:"Cr\xE9ditos",slug:"creditos",children:[]}]}],path:"/pt/core-concepts/accounts.html",pathLocale:"/pt/",extraFields:[]},{title:"Invoca\xE7\xF5es de Programas Cruzados (CPIs)",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"CPI com invoke",slug:"cpi-com-invoke",children:[]},{level:3,title:"CPI com invoke_signed",slug:"cpi-com-invoke-signed",children:[]},{level:3,title:"Struct da CPI - Instruction",slug:"struct-da-cpi-instruction",children:[]},{level:3,title:"Struct da CPI - AccountInfo",slug:"struct-da-cpi-accountinfo",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/cpi.html",pathLocale:"/pt/",extraFields:[]},{title:"Endere\xE7os Derivados de Programa (PDAs)",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Gerando PDAs",slug:"gerando-pdas",children:[]},{level:3,title:"Interagindo com PDAs",slug:"interagindo-com-pdas",children:[]}]},{level:2,title:"Outros recursos:",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/pdas.html",pathLocale:"/pt/",extraFields:[]},{title:"Programas",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Programas Nativos & Biblioteca de Programas da Solana (Solana Program Library, ou SPL)",slug:"programas-nativos-biblioteca-de-programas-da-solana-solana-program-library-ou-spl",children:[]},{level:3,title:"Escrevendo Programas",slug:"escrevendo-programas",children:[]},{level:3,title:"Implantando Programas",slug:"implantando-programas",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/programs.html",pathLocale:"/pt/",extraFields:[]},{title:"Transa\xE7\xF5es",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"Taxas",slug:"taxas",children:[]}]},{level:2,title:"Outros Recursos",slug:"outros-recursos",children:[]}],path:"/pt/core-concepts/transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Instala\xE7\xE3o",headers:[{level:2,title:"Instale o Web3.js",slug:"instale-o-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instale o Rust",slug:"instale-o-rust",children:[]},{level:2,title:"Instale a CLI",slug:"instale-a-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compila\xE7\xE3o a Partir do C\xF3digo-Fonte",slug:"compilacao-a-partir-do-codigo-fonte",children:[]}]}],path:"/pt/getting-started/installation.html",pathLocale:"/pt/",extraFields:[]},{title:"Mapeamentos de Conta",headers:[{level:2,title:"Derivando PDAs",slug:"derivando-pdas",children:[]},{level:2,title:"Conta \xDAnica de Mapeamento",slug:"conta-unica-de-mapeamento",children:[]}],path:"/pt/guides/account-maps.html",pathLocale:"/pt/",extraFields:[]},{title:"Migrando Contas de Dados do Programa",headers:[{level:2,title:"Como voc\xEA pode migrar as contas de dados de um programa?",slug:"como-voce-pode-migrar-as-contas-de-dados-de-um-programa",children:[]},{level:2,title:"Cen\xE1rio",slug:"cenario",children:[]},{level:2,title:"Atualizando a conta",slug:"atualizando-a-conta",children:[{level:3,title:"1. Adicionar l\xF3gica de convers\xE3o de conta",slug:"_1-adicionar-logica-de-conversao-de-conta",children:[]}]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/pt/guides/data-migration.html",pathLocale:"/pt/",extraFields:[]},{title:"Depurando Programas da Solana",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Testes de Tempo de Execu\xE7\xE3o e Depura\xE7\xE3o no Editor",slug:"testes-de-tempo-de-execucao-e-depuracao-no-editor",children:[]},{level:2,title:"Teste de N\xF3 Validador Local no Editor",slug:"teste-de-no-validador-local-no-editor",children:[]},{level:2,title:"Teste de N\xF3 Validador Local a partir de Aplicativos Cliente",slug:"teste-de-no-validador-local-a-partir-de-aplicativos-cliente",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/pt/guides/debugging-solana-programs.html",pathLocale:"/pt/",extraFields:[]},{title:"Teste de Paridade de Recursos",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Cen\xE1rio",slug:"cenario",children:[]},{level:2,title:"Status do Recurso",slug:"status-do-recurso",children:[]},{level:2,title:"Teste de Paridade",slug:"teste-de-paridade",children:[]},{level:2,title:"Demonstra\xE7\xE3o Simples",slug:"demonstracao-simples",children:[{level:3,title:"Todos os recursos ativados",slug:"todos-os-recursos-ativados",children:[]},{level:3,title:"Recursos seletivos desativados",slug:"recursos-seletivos-desativados",children:[]}]},{level:2,title:"Teste de Paridade Total",slug:"teste-de-paridade-total",children:[]},{level:2,title:"Teste de Paridade Total Program\xE1tica",slug:"teste-de-paridade-total-programatica",children:[]},{level:2,title:"Recursos",slug:"recursos",children:[]}],path:"/pt/guides/feature-parity-testing.html",pathLocale:"/pt/",extraFields:[]},{title:"Obter Contas do Programa",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Mergulho Profundo",slug:"mergulho-profundo",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Outros recursos",slug:"outros-recursos",children:[]}],path:"/pt/guides/get-program-accounts.html",pathLocale:"/pt/",extraFields:[]},{title:"Serializando Dados",headers:[{level:2,title:"Configurando a Serializa\xE7\xE3o com o Borsh",slug:"configurando-a-serializacao-com-o-borsh",children:[]},{level:2,title:"Como serializar dados de instru\xE7\xE3o no cliente",slug:"como-serializar-dados-de-instrucao-no-cliente",children:[]},{level:2,title:"Como desserializar dados de instru\xE7\xE3o no programa",slug:"como-desserializar-dados-de-instrucao-no-programa",children:[]},{level:2,title:"Como serializar os dados da conta no programa",slug:"como-serializar-os-dados-da-conta-no-programa",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serializa\xE7\xE3o/Desserializa\xE7\xE3o",slug:"serializacao-desserializacao",children:[]},{level:3,title:"Utiliza\xE7\xE3o",slug:"utilizacao",children:[]}]},{level:2,title:"Como desserializar dados da conta no cliente",slug:"como-desserializar-dados-da-conta-no-cliente",children:[]},{level:2,title:"Mapeamentos comuns da Solana em TypeScript/JavaScript",slug:"mapeamentos-comuns-da-solana-em-typescript-javascript",children:[]},{level:2,title:"Constru\xE7\xF5es avan\xE7adas",slug:"construcoes-avancadas",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/pt/guides/serialization.html",pathLocale:"/pt/",extraFields:[]},{title:"Transa\xE7\xF5es Versionadas",headers:[{level:2,title:"Fatos",slug:"fatos",children:[]},{level:2,title:"Transa\xE7\xE3o Legada",slug:"transacao-legada",children:[]},{level:2,title:"Mensagem Legada",slug:"mensagem-legada",children:[{level:3,title:"Cabe\xE7alho",slug:"cabecalho",children:[]},{level:3,title:"Array compacto de endere\xE7os de conta",slug:"array-compacto-de-enderecos-de-conta",children:[]},{level:3,title:"Array compacto de instru\xE7\xF5es",slug:"array-compacto-de-instrucoes",children:[]}]},{level:2,title:"Problemas com as Transa\xE7\xF5es Legadas",slug:"problemas-com-as-transacoes-legadas",children:[]},{level:2,title:"Tabelas de Pesquisa de Endere\xE7os (LUT)",slug:"tabelas-de-pesquisa-de-enderecos-lut",children:[]},{level:2,title:"Transa\xE7\xF5es Versionadas: Transa\xE7\xE3o V0 (TransactionV0)",slug:"transacoes-versionadas-transacao-v0-transactionv0",children:[]},{level:2,title:"Mensagem V0 (MessageV0)",slug:"mensagem-v0-messagev0",children:[{level:3,title:"Array compacto de pesquisas na tabela de endere\xE7os",slug:"array-compacto-de-pesquisas-na-tabela-de-enderecos",children:[]},{level:3,title:"Array compacto de instru\xE7\xF5es",slug:"array-compacto-de-instrucoes-1",children:[]}]},{level:2,title:"Mudan\xE7as na RPC",slug:"mudancas-na-rpc",children:[]},{level:2,title:"Outros recursos",slug:"outros-recursos",children:[]},{level:2,title:"Refer\xEAncias",slug:"referencias",children:[]}],path:"/pt/guides/versioned-transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Contas",headers:[{level:2,title:"Como criar uma conta do sistema",slug:"como-criar-uma-conta-do-sistema",children:[]},{level:2,title:"Como calcular o custo da conta",slug:"como-calcular-o-custo-da-conta",children:[]},{level:2,title:"Como criar contas com sementes",slug:"como-criar-contas-com-sementes",children:[{level:3,title:"Gere",slug:"gere",children:[]},{level:3,title:"Crie",slug:"crie",children:[]},{level:3,title:"Transfira",slug:"transfira",children:[]}]},{level:2,title:"Como criar PDAs",slug:"como-criar-pdas",children:[{level:3,title:"Gerando um PDA",slug:"gerando-um-pda",children:[]},{level:3,title:"Criando um PDA",slug:"criando-um-pda",children:[]}]},{level:2,title:"Como assinar com um PDA",slug:"como-assinar-com-um-pda",children:[{level:3,title:"Programa",slug:"programa-1",children:[]},{level:3,title:"Cliente",slug:"cliente-1",children:[]}]},{level:2,title:"Como obter contas de programa",slug:"como-obter-contas-de-programa",children:[]},{level:2,title:"Como encerrar contas",slug:"como-encerrar-contas",children:[]},{level:2,title:"Como obter o saldo da conta",slug:"como-obter-o-saldo-da-conta",children:[]}],path:"/pt/references/accounts.html",pathLocale:"/pt/",extraFields:[]},{title:"Enviando Transa\xE7\xF5es",headers:[{level:2,title:"Como enviar SOL",slug:"como-enviar-sol",children:[]},{level:2,title:"Como enviar Tokens SPL",slug:"como-enviar-tokens-spl",children:[]},{level:2,title:"Como calcular o custo da transa\xE7\xE3o",slug:"como-calcular-o-custo-da-transacao",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"Como adicionar uma observa\xE7\xE3o em uma transa\xE7\xE3o",slug:"como-adicionar-uma-observacao-em-uma-transacao",children:[]},{level:2,title:"Como alterar o or\xE7amento de computa\xE7\xE3o, taxa e prioridade para uma transa\xE7\xE3o",slug:"como-alterar-o-orcamento-de-computacao-taxa-e-prioridade-para-uma-transacao",children:[]}],path:"/pt/references/basic-transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Pares de Chaves e Carteiras",headers:[{level:2,title:"Como gerar um novo Par de Chaves (Keypair)",slug:"como-gerar-um-novo-par-de-chaves-keypair",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma senha",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-senha",children:[]},{level:2,title:"Como verificar um Par de Chaves",slug:"como-verificar-um-par-de-chaves",children:[]},{level:2,title:"Como verificar se uma chave p\xFAblica tem uma chave privada associada",slug:"como-verificar-se-uma-chave-publica-tem-uma-chave-privada-associada",children:[]},{level:2,title:"Como gerar uma frase mnem\xF4nica",slug:"como-gerar-uma-frase-mnemonica",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma frase mnem\xF4nica",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-frase-mnemonica",children:[]},{level:2,title:"Como gerar um endere\xE7o personalizado",slug:"como-gerar-um-endereco-personalizado",children:[]},{level:2,title:"Como assinar e verificar mensagens com carteiras",slug:"como-assinar-e-verificar-mensagens-com-carteiras",children:[]},{level:2,title:"Como se conectar a uma carteira",slug:"como-se-conectar-a-uma-carteira",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/pt/references/keypairs-and-wallets.html",pathLocale:"/pt/",extraFields:[]},{title:"Desenvolvimento Local",headers:[{level:2,title:"Inicializando um Validador Local",slug:"inicializando-um-validador-local",children:[]},{level:2,title:"Conectando a Ambientes",slug:"conectando-a-ambientes",children:[]},{level:2,title:"Subscrevendo a Eventos",slug:"subscrevendo-a-eventos",children:[]},{level:2,title:"Obtendo SOL de Teste",slug:"obtendo-sol-de-teste",children:[]},{level:2,title:"Usando Contas e Programas Da Mainnet",slug:"usando-contas-e-programas-da-mainnet",children:[{level:3,title:"Como carregar contas da mainnet",slug:"como-carregar-contas-da-mainnet",children:[]},{level:3,title:"Como carregar programas da mainnet",slug:"como-carregar-programas-da-mainnet",children:[]}]}],path:"/pt/references/local-development.html",pathLocale:"/pt/",extraFields:[]},{title:"Servi\xE7o de Nomes",headers:[{level:2,title:"Registro de Nomes",slug:"registro-de-nomes",children:[]},{level:2,title:"Resolvendo dom\xEDnios SOL",slug:"resolvendo-dominios-sol",children:[]},{level:2,title:"Busca Reversa",slug:"busca-reversa",children:[]},{level:2,title:"Busca do Subdom\xEDnio",slug:"busca-do-subdominio",children:[]},{level:2,title:"Encontrar todos os nomes de dom\xEDnio de propriedade de uma chave p\xFAblica",slug:"encontrar-todos-os-nomes-de-dominio-de-propriedade-de-uma-chave-publica",children:[]},{level:2,title:"Resolver um identificador do Twitter",slug:"resolver-um-identificador-do-twitter",children:[]},{level:2,title:"Busca reversa de um identificador do Twitter",slug:"busca-reversa-de-um-identificador-do-twitter",children:[]}],path:"/pt/references/name-service.html",pathLocale:"/pt/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"Como criar um NFT",slug:"como-criar-um-nft",children:[{level:3,title:"Carregar para o Arweave",slug:"carregar-para-o-arweave",children:[]},{level:3,title:"Cunhar o NFT",slug:"cunhar-o-nft",children:[]}]},{level:2,title:"Como obter os metadados do NFT",slug:"como-obter-os-metadados-do-nft",children:[]},{level:2,title:"Como obter o propriet\xE1rio de um NFT",slug:"como-obter-o-proprietario-de-um-nft",children:[]},{level:2,title:"Como obter endere\xE7os de cunhagem de NFT",slug:"como-obter-enderecos-de-cunhagem-de-nft",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"Como obter todos os NFTs de uma carteira?",slug:"como-obter-todos-os-nfts-de-uma-carteira",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"Como criar uma Candy Machine",slug:"como-criar-uma-candy-machine",children:[]},{level:3,title:"Como excluir uma Candy Machine",slug:"como-excluir-uma-candy-machine",children:[]},{level:3,title:"Como encontrar a Candy Machine por meio de autoridade",slug:"como-encontrar-a-candy-machine-por-meio-de-autoridade",children:[]},{level:3,title:"Como encontrar a Candy Machine usando o endere\xE7o da carteira",slug:"como-encontrar-a-candy-machine-usando-o-endereco-da-carteira",children:[]},{level:3,title:"Como encontrar a Candy Machine usando seu endere\xE7o",slug:"como-encontrar-a-candy-machine-usando-seu-endereco",children:[]},{level:3,title:"Como encontrar NFTs cunhados pela Candy Machine",slug:"como-encontrar-nfts-cunhados-pela-candy-machine",children:[]},{level:3,title:"Como inserir itens em uma Candy Machine",slug:"como-inserir-itens-em-uma-candy-machine",children:[]},{level:3,title:"Como cunhar um NFT a partir de uma Candy Machine",slug:"como-cunhar-um-nft-a-partir-de-uma-candy-machine",children:[]}]}],path:"/pt/references/nfts.html",pathLocale:"/pt/",extraFields:[]},{title:"Enviando Transa\xE7\xF5es Offline",headers:[{level:2,title:"Assinatura de Transa\xE7\xE3o",slug:"assinatura-de-transacao",children:[]},{level:2,title:"Assinatura Parcial de Transa\xE7\xE3o",slug:"assinatura-parcial-de-transacao",children:[]},{level:2,title:"Nonce Dur\xE1vel",slug:"nonce-duravel",children:[{level:3,title:"Criar Conta de Nonce",slug:"criar-conta-de-nonce",children:[]},{level:3,title:"Obter Conta de Nonce",slug:"obter-conta-de-nonce",children:[]},{level:3,title:"Usar Conta de Nonce",slug:"usar-conta-de-nonce",children:[]}]}],path:"/pt/references/offline-transactions.html",pathLocale:"/pt/",extraFields:[]},{title:"Escrevendo Programas",headers:[{level:2,title:"Como transferir SOL em um programa",slug:"como-transferir-sol-em-um-programa",children:[]},{level:2,title:"Como obter o rel\xF3gio (clock) em um programa",slug:"como-obter-o-relogio-clock-em-um-programa",children:[{level:3,title:"Passando o Rel\xF3gio como uma conta dentro de uma instru\xE7\xE3o",slug:"passando-o-relogio-como-uma-conta-dentro-de-uma-instrucao",children:[]},{level:3,title:"Acessando o Rel\xF3gio diretamente dentro de uma instru\xE7\xE3o",slug:"acessando-o-relogio-diretamente-dentro-de-uma-instrucao",children:[]}]},{level:2,title:"Como alterar o tamanho da conta",slug:"como-alterar-o-tamanho-da-conta",children:[]},{level:2,title:"Como fazer uma Invoca\xE7\xE3o de Programas Cruzados",slug:"como-fazer-uma-invocacao-de-programas-cruzados",children:[]},{level:2,title:"Como criar um PDA",slug:"como-criar-um-pda",children:[]},{level:2,title:"Como ler contas",slug:"como-ler-contas",children:[]},{level:2,title:"Como verificar contas",slug:"como-verificar-contas",children:[]},{level:2,title:"Como ler v\xE1rias instru\xE7\xF5es de uma transa\xE7\xE3o",slug:"como-ler-varias-instrucoes-de-uma-transacao",children:[]}],path:"/pt/references/programs.html",pathLocale:"/pt/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Obter Validadores Atuais",slug:"obter-validadores-atuais",children:[]},{level:2,title:"Criar Conta de Stake",slug:"criar-conta-de-stake",children:[]},{level:2,title:"Delegar Stake",slug:"delegar-stake",children:[]},{level:2,title:"Obter Delegador pelos Validadores",slug:"obter-delegador-pelos-validadores",children:[]},{level:2,title:"Desativar Stake",slug:"desativar-stake",children:[]},{level:2,title:"Sacar Stake",slug:"sacar-stake",children:[]}],path:"/pt/references/staking.html",pathLocale:"/pt/",extraFields:[]},{title:"Interagindo com Tokens",headers:[{level:2,title:"O que eu preciso para come\xE7ar com Tokens SPL?",slug:"o-que-eu-preciso-para-comecar-com-tokens-spl",children:[]},{level:2,title:"Como criar um novo Token",slug:"como-criar-um-novo-token",children:[]},{level:2,title:"Como obter uma conta de cunhagem de tokens",slug:"como-obter-uma-conta-de-cunhagem-de-tokens",children:[]},{level:2,title:"Como criar uma conta de token",slug:"como-criar-uma-conta-de-token",children:[]},{level:2,title:"Como obter uma conta de token",slug:"como-obter-uma-conta-de-token",children:[]},{level:2,title:"Como obter o saldo de uma conta de token",slug:"como-obter-o-saldo-de-uma-conta-de-token",children:[]},{level:2,title:"Como cunhar novos tokens",slug:"como-cunhar-novos-tokens",children:[]},{level:2,title:"Como transferir tokens",slug:"como-transferir-tokens",children:[]},{level:2,title:"Como queimar tokens",slug:"como-queimar-tokens",children:[]},{level:2,title:"Como encerrar contas de token",slug:"como-encerrar-contas-de-token",children:[]},{level:2,title:"Como definir autoridade em contas ou cunhagem de token",slug:"como-definir-autoridade-em-contas-ou-cunhagem-de-token",children:[]},{level:2,title:"Como aprovar um delegado de token",slug:"como-aprovar-um-delegado-de-token",children:[]},{level:2,title:"Como revogar um delegado de token",slug:"como-revogar-um-delegado-de-token",children:[]},{level:2,title:"Como gerenciar o SOL encapsulado",slug:"como-gerenciar-o-sol-encapsulado",children:[{level:3,title:"Criar conta de token",slug:"criar-conta-de-token",children:[]},{level:3,title:"Adicionar saldo",slug:"adicionar-saldo",children:[]}]},{level:2,title:"Como obter todas as contas de token pelo propriet\xE1rio",slug:"como-obter-todas-as-contas-de-token-pelo-proprietario",children:[]}],path:"/pt/references/token.html",pathLocale:"/pt/",extraFields:[]},{title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07",headers:[{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Web3.js",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Rust",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-rust",children:[]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],path:"/th/getting-started/installation.html",pathLocale:"/th/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"Account Model",slug:"account-model",children:[]},{level:3,title:"Rent (\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32)",slug:"rent-\u0E04\u0E48\u0E32\u0E40\u0E0A\u0E48\u0E32",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[{level:3,title:"Credit",slug:"credit",children:[]}]}],path:"/th/core-concepts/accounts.html",pathLocale:"/th/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 PDAs",slug:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07-pdas",children:[]},{level:3,title:"\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 PDAs",slug:"\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-pdas",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/core-concepts/pdas.html",pathLocale:"/th/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"Native Programs \u0E41\u0E25\u0E30 The Solana Program Library (SPL)",slug:"native-programs-\u0E41\u0E25\u0E30-the-solana-program-library-spl",children:[]},{level:3,title:"\u0E40\u0E02\u0E35\u0E22\u0E19 Programs",slug:"\u0E40\u0E02\u0E35\u0E22\u0E19-programs",children:[]},{level:3,title:"Deploying Programs",slug:"deploying-programs",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/core-concepts/programs.html",pathLocale:"/th/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21 (Fees)",slug:"\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21-fees",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/core-concepts/transactions.html",pathLocale:"/th/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 system account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-system-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E33\u0E19\u0E27\u0E13 account cost",slug:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E4D\u0E32\u0E19\u0E27\u0E13-account-cost",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 accounts \u0E14\u0E49\u0E27\u0E22 seeds",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-accounts-\u0E14\u0E49\u0E27\u0E22-seeds",children:[{level:3,title:"Generate",slug:"generate",children:[]},{level:3,title:"Create",slug:"create",children:[]},{level:3,title:"Transfer",slug:"transfer",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 PDAs",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-pdas",children:[{level:3,title:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 PDA",slug:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07-pda",children:[]},{level:3,title:"\u0E28\u0E23\u0E49\u0E32\u0E07 PDA",slug:"\u0E28\u0E23\u0E49\u0E32\u0E07-pda",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 sign \u0E14\u0E49\u0E27\u0E22 PDA",slug:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E14\u0E49\u0E27\u0E22-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 program accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-program-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14 accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 account balance",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-account-balance",children:[]}],path:"/th/references/accounts.html",pathLocale:"/th/",extraFields:[]},{title:"Sending Transactions",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35 send SOL",slug:"\u0E27\u0E34\u0E18\u0E35-send-sol",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 send SPL-Tokens",slug:"\u0E27\u0E34\u0E18\u0E35-send-spl-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E33\u0E19\u0E27\u0E13\u0E2B\u0E32 transaction cost",slug:"\u0E27\u0E34\u0E18\u0E35\u0E04\u0E4D\u0E32\u0E19\u0E27\u0E13\u0E2B\u0E32-transaction-cost",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1E\u0E34\u0E48\u0E21 memo \u0E43\u0E19 transaction",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1E\u0E34\u0E48\u0E21-memo-\u0E43\u0E19-transaction",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 compute budget \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A transaction",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19-compute-budget-\u0E2A\u0E4D\u0E32\u0E2B\u0E23\u0E31\u0E1A-transaction",children:[]}],path:"/th/references/basic-transactions.html",pathLocale:"/th/",extraFields:[]},{title:"Keypairs \u0E41\u0E25\u0E30 Wallets",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E43\u0E2B\u0E21\u0E48",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 restore a Keypair from a secret",slug:"\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 verify a Keypair",slug:"\u0E27\u0E34\u0E18\u0E35-verify-a-keypair",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 check if a public key has an associated private key",slug:"\u0E27\u0E34\u0E18\u0E35-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49 Keypair \u0E08\u0E32\u0E01 mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49-keypair-\u0E08\u0E32\u0E01-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a vanity address",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-vanity-address",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 sign \u0E41\u0E25\u0E30 verify messages with wallets",slug:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A wallet",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/th/references/keypairs-and-wallets.html",pathLocale:"/th/",extraFields:[]},{title:"Local Development",headers:[{level:2,title:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49 Local Validator",slug:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49-local-validator",children:[]},{level:2,title:"Connecting to Environments",slug:"connecting-to-environments",children:[]},{level:2,title:"Subscribing to Events",slug:"subscribing-to-events",children:[]},{level:2,title:"Getting Test SOL",slug:"getting-test-sol",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49 Mainnet Accounts \u0E41\u0E25\u0E30 Programs",slug:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49-mainnet-accounts-\u0E41\u0E25\u0E30-programs",children:[{level:3,title:"\u0E27\u0E34\u0E18\u0E35 load accounts \u0E08\u0E32\u0E01 mainnet",slug:"\u0E27\u0E34\u0E18\u0E35-load-accounts-\u0E08\u0E32\u0E01-mainnet",children:[]},{level:3,title:"\u0E27\u0E34\u0E18\u0E35 load programs from mainnet",slug:"\u0E27\u0E34\u0E18\u0E35-load-programs-from-mainnet",children:[]}]}],path:"/th/references/local-development.html",pathLocale:"/th/",extraFields:[]},{title:"Name Service",headers:[{level:2,title:"Name registry",slug:"name-registry",children:[]},{level:2,title:"Resolving SOL domains",slug:"resolving-sol-domains",children:[]},{level:2,title:"Reverse look up",slug:"reverse-look-up",children:[]},{level:2,title:"Subdomain look up",slug:"subdomain-look-up",children:[]},{level:2,title:"\u0E2B\u0E32\u0E17\u0E38\u0E01 domain names \u0E17\u0E35\u0E48 public key \u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07",slug:"\u0E2B\u0E32\u0E17\u0E38\u0E01-domain-names-\u0E17\u0E35\u0E48-public-key-\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07",children:[]},{level:2,title:"Resolve a Twitter handle",slug:"resolve-a-twitter-handle",children:[]},{level:2,title:"Reverse look up of a Twitter handle",slug:"reverse-look-up-of-a-twitter-handle",children:[]}],path:"/th/references/name-service.html",pathLocale:"/th/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 an NFT",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-an-nft",children:[{level:3,title:"Upload to Arweave",slug:"upload-to-arweave",children:[]},{level:3,title:"Mint the NFT",slug:"mint-the-nft",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 NFT Metadata",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-nft-metadata",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 (owner) \u0E02\u0E2D\u0E07 NFT",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07-owner-\u0E02\u0E2D\u0E07-nft",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 NFT Mint Addresses",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-nft-mint-addresses",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01 NFTs \u0E08\u0E32\u0E01 wallet?",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01-nfts-\u0E08\u0E32\u0E01-wallet",children:[]}],path:"/th/references/nfts.html",pathLocale:"/th/",extraFields:[]},{title:"Sending Offline Transactions",headers:[{level:2,title:"Sign Transaction",slug:"sign-transaction",children:[]},{level:2,title:"Partial Sign Transaction",slug:"partial-sign-transaction",children:[]},{level:2,title:"Durable Nonce",slug:"durable-nonce",children:[{level:3,title:"Create Nonce Account",slug:"create-nonce-account",children:[]},{level:3,title:"Get Nonce Account",slug:"get-nonce-account",children:[]},{level:3,title:"Use Nonce Account",slug:"use-nonce-account",children:[]}]}],path:"/th/references/offline-transactions.html",pathLocale:"/th/",extraFields:[]},{title:"\u0E40\u0E02\u0E35\u0E22\u0E19 Programs",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35 transfer SOL in a program",slug:"\u0E27\u0E34\u0E18\u0E35-transfer-sol-in-a-program",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49\u0E19\u0E32\u0E2C\u0E34\u0E01\u0E32 (clock) \u0E43\u0E19 program",slug:"\u0E27\u0E34\u0E18\u0E35\u0E43\u0E0A\u0E49\u0E19\u0E32\u0E2C\u0E34\u0E01\u0E32-clock-\u0E43\u0E19-program",children:[{level:3,title:"\u0E2A\u0E48\u0E07 Clock \u0E43\u0E19\u0E41\u0E1A\u0E1A account \u0E20\u0E32\u0E22\u0E43\u0E19 instruction",slug:"\u0E2A\u0E48\u0E07-clock-\u0E43\u0E19\u0E41\u0E1A\u0E1A-account-\u0E20\u0E32\u0E22\u0E43\u0E19-instruction",children:[]},{level:3,title:"\u0E43\u0E0A\u0E49 Clock \u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E43\u0E19 instruction",slug:"\u0E43\u0E0A\u0E49-clock-\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E43\u0E19-instruction",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 account size",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19-account-size",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E33 Cross Program Invocation",slug:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E4D\u0E32-cross-program-invocation",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 PDA",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-pda",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19 accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19 instructions \u0E2B\u0E25\u0E32\u0E22\u0E46 \u0E15\u0E31\u0E27\u0E08\u0E32\u0E01 transaction",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19-instructions-\u0E2B\u0E25\u0E32\u0E22\u0E46-\u0E15\u0E31\u0E27\u0E08\u0E32\u0E01-transaction",children:[]}],path:"/th/references/programs.html",pathLocale:"/th/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Validators \u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",slug:"\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-validators-\u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",children:[]},{level:2,title:"\u0E2A\u0E23\u0E49\u0E32\u0E07 Stake Account",slug:"\u0E2A\u0E23\u0E49\u0E32\u0E07-stake-account",children:[]},{level:2,title:"Delegate Stake",slug:"delegate-stake",children:[]},{level:2,title:"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Delegator \u0E14\u0E49\u0E27\u0E22 Validators",slug:"\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-delegator-\u0E14\u0E49\u0E27\u0E22-validators",children:[]},{level:2,title:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01 Stake",slug:"\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01-stake",children:[]},{level:2,title:"\u0E16\u0E2D\u0E19 Stake",slug:"\u0E16\u0E2D\u0E19-stake",children:[]}],path:"/th/references/staking.html",pathLocale:"/th/",extraFields:[]},{title:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 Tokens",headers:[{level:2,title:"\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 SPL-Tokens?",slug:"\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-spl-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Token \u0E43\u0E2B\u0E21\u0E48",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-token-\u0E43\u0E2B\u0E21\u0E48",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 token mint",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-token-mint",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 token account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-token-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Token Account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-token-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 balance \u0E02\u0E2D\u0E07 token account",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-balance-\u0E02\u0E2D\u0E07-token-account",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 mint tokens",slug:"\u0E27\u0E34\u0E18\u0E35-mint-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E48\u0E07 tokens",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E48\u0E07-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E33\u0E25\u0E32\u0E22 (burn) tokens",slug:"\u0E27\u0E34\u0E18\u0E35\u0E17\u0E4D\u0E32\u0E25\u0E32\u0E22-burn-tokens",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14 token accounts",slug:"\u0E27\u0E34\u0E18\u0E35\u0E1B\u0E34\u0E14-token-accounts",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E31\u0E49\u0E07 authority \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A token accounts \u0E2B\u0E23\u0E37\u0E2D mints",slug:"\u0E27\u0E34\u0E18\u0E35\u0E15\u0E31\u0E49\u0E07-authority-\u0E2A\u0E4D\u0E32\u0E2B\u0E23\u0E31\u0E1A-token-accounts-\u0E2B\u0E23\u0E37\u0E2D-mints",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34 (approve) token \u0E43\u0E2B\u0E49 delegate \u0E44\u0E14\u0E49",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2D\u0E19\u0E38\u0E21\u0E31\u0E15\u0E34-approve-token-\u0E43\u0E2B\u0E49-delegate-\u0E44\u0E14\u0E49",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01 (revoke) token \u0E17\u0E35\u0E48 delegate \u0E44\u0E27\u0E49",slug:"\u0E27\u0E34\u0E18\u0E35\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01-revoke-token-\u0E17\u0E35\u0E48-delegate-\u0E44\u0E27\u0E49",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23 wrapped SOL",slug:"\u0E27\u0E34\u0E18\u0E35\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23-wrapped-sol",children:[{level:3,title:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 Token Account",slug:"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07-token-account",children:[]},{level:3,title:"\u0E40\u0E1E\u0E34\u0E48\u0E21 Balance",slug:"\u0E40\u0E1E\u0E34\u0E48\u0E21-balance",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01\u0E46 token accounts \u0E15\u0E32\u0E21 owner",slug:"\u0E27\u0E34\u0E18\u0E35\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E38\u0E01\u0E46-token-accounts-\u0E15\u0E32\u0E21-owner",children:[]}],path:"/th/references/token.html",pathLocale:"/th/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/th/guides/account-maps.html",pathLocale:"/th/",extraFields:[]},{title:"Migrating Program Data Accounts",headers:[{level:2,title:"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 migrate program's data accounts \u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07?",slug:"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16-migrate-program-s-data-accounts-\u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07",children:[]},{level:2,title:"\u0E2A\u0E16\u0E32\u0E19\u0E01\u0E32\u0E23\u0E13\u0E4C (Scenario)",slug:"\u0E2A\u0E16\u0E32\u0E19\u0E01\u0E32\u0E23\u0E13\u0E4C-scenario",children:[]},{level:2,title:"Upgrading the Account",slug:"upgrading-the-account",children:[{level:3,title:"1. Add account conversion logic",slug:"_1-add-account-conversion-logic",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/data-migration.html",pathLocale:"/th/",extraFields:[]},{title:"Debugging Solana Programs",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"Runtime Testing \u0E41\u0E25\u0E30 Debugging \u0E43\u0E19 editor",slug:"runtime-testing-\u0E41\u0E25\u0E30-debugging-\u0E43\u0E19-editor",children:[]},{level:2,title:"\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22 Local Validator Node \u0E43\u0E19 editor",slug:"\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22-local-validator-node-\u0E43\u0E19-editor",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps",slug:"local-validator-node-testing-from-client-apps",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/debugging-solana-programs.html",pathLocale:"/th/",extraFields:[]},{title:"Feature Parity Testing",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"Scenario",slug:"scenario",children:[]},{level:2,title:"Feature Status",slug:"feature-status",children:[]},{level:2,title:"Parity Testing",slug:"parity-testing",children:[]},{level:2,title:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E07\u0E48\u0E32\u0E22\u0E46",slug:"\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E07\u0E48\u0E32\u0E22\u0E46",children:[{level:3,title:"\u0E40\u0E1B\u0E34\u0E14\u0E17\u0E38\u0E01 features",slug:"\u0E40\u0E1B\u0E34\u0E14\u0E17\u0E38\u0E01-features",children:[]},{level:3,title:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1B\u0E34\u0E14 features",slug:"\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E1B\u0E34\u0E14-features",children:[]}]},{level:2,title:"Feature Parity Testing",slug:"feature-parity-testing",children:[]},{level:2,title:"Full Parity Testing Programmatically",slug:"full-parity-testing-programmatically",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/feature-parity-testing.html",pathLocale:"/th/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",slug:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"\u0E25\u0E07\u0E25\u0E36\u0E01",slug:"\u0E25\u0E07\u0E25\u0E36\u0E01",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",children:[]}],path:"/th/guides/get-program-accounts.html",pathLocale:"/th/",extraFields:[]},{title:"Serializing Data",headers:[{level:2,title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Borsh Serialization",slug:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E4D\u0E32\u0E2B\u0E23\u0E31\u0E1A-borsh-serialization",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 serialize instruction data \u0E17\u0E35\u0E48 client",slug:"\u0E27\u0E34\u0E18\u0E35-serialize-instruction-data-\u0E17\u0E35\u0E48-client",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 deserialize instruction data \u0E43\u0E19 program",slug:"\u0E27\u0E34\u0E18\u0E35-deserialize-instruction-data-\u0E43\u0E19-program",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 serialize account data \u0E43\u0E19 program",slug:"\u0E27\u0E34\u0E18\u0E35-serialize-account-data-\u0E43\u0E19-program",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",slug:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19",children:[]}]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 deserialize account data \u0E17\u0E35\u0E48 client",slug:"\u0E27\u0E34\u0E18\u0E35-deserialize-account-data-\u0E17\u0E35\u0E48-client",children:[]},{level:2,title:"Solana TS/JS Mappings \u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B",slug:"solana-ts-js-mappings-\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B",children:[]},{level:2,title:"Advanced Constructs",slug:"advanced-constructs",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/th/guides/serialization.html",pathLocale:"/th/",extraFields:[]},{title:"Versioned Transactions",headers:[{level:2,title:"Facts (\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49)",slug:"facts-\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",children:[]},{level:2,title:"Legacy Transaction",slug:"legacy-transaction",children:[]},{level:2,title:"Legacy Message",slug:"legacy-message",children:[{level:3,title:"Header",slug:"header",children:[]},{level:3,title:"Compact-array \u0E02\u0E2D\u0E07 account addresses",slug:"compact-array-\u0E02\u0E2D\u0E07-account-addresses",children:[]},{level:3,title:"Compact array \u0E02\u0E2D\u0E07 instructions",slug:"compact-array-\u0E02\u0E2D\u0E07-instructions",children:[]}]},{level:2,title:"\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07 Legacy Transactions",slug:"\u0E02\u0E49\u0E2D\u0E08\u0E4D\u0E32\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07-legacy-transactions",children:[]},{level:2,title:"Address Lookup Tables (LUT)",slug:"address-lookup-tables-lut",children:[]},{level:2,title:"Versioned Transactions: TransactionV0",slug:"versioned-transactions-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"Compact array \u0E02\u0E2D\u0E07 address table lookups",slug:"compact-array-\u0E02\u0E2D\u0E07-address-table-lookups",children:[]},{level:3,title:"Compact array \u0E02\u0E2D\u0E07 instructions",slug:"compact-array-\u0E02\u0E2D\u0E07-instructions-1",children:[]}]},{level:2,title:"RPC Changes",slug:"rpc-changes",children:[]},{level:2,title:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19\u0E46",slug:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19\u0E46",children:[]},{level:2,title:"\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07",slug:"\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07",children:[]}],path:"/th/guides/versioned-transactions.html",pathLocale:"/th/",extraFields:[]},{title:"Accounts (Account\u2019lar)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Account Model (Account Modeli)",slug:"account-model-account-modeli",children:[]},{level:3,title:"Rent",slug:"rent",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[{level:3,title:"Referans",slug:"referans",children:[]}]}],path:"/tr/core-concepts/accounts.html",pathLocale:"/tr/",extraFields:[]},{title:"Program Derived Addresses (PDAs) (Programdan T\xFCretilmi\u015F Adresler)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Generating PDAs (PDA\u2019lar Olu\u015Fturma)",slug:"generating-pdas-pda-lar-olusturma",children:[]},{level:3,title:"Interacting with PDAs (PDA\u2019lar ile Etkile\u015Fim)",slug:"interacting-with-pdas-pda-lar-ile-etkilesim",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[]}],path:"/tr/core-concepts/pdas.html",pathLocale:"/tr/",extraFields:[]},{title:"Programs (Programlar)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Native Program\u2019lar & Solana Program Library (SPL)",slug:"native-program-lar-solana-program-library-spl",children:[]},{level:3,title:"Writing Programs (Program Yazma)",slug:"writing-programs-program-yazma",children:[]},{level:3,title:"Deploying Programs (Programlar\u0131 \xC7al\u0131\u015Ft\u0131rma)",slug:"deploying-programs-programlar\u0131-cal\u0131st\u0131rma",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[]}],path:"/tr/core-concepts/programs.html",pathLocale:"/tr/",extraFields:[]},{title:"Transactions (\u0130\u015Flemler)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"Fees (\xDCcretler)",slug:"fees-ucretler",children:[]}]},{level:2,title:"Other Resources (Di\u011Fer Kaynaklar)",slug:"other-resources-diger-kaynaklar",children:[]}],path:"/tr/core-concepts/transactions.html",pathLocale:"/tr/",extraFields:[]},{title:"Installation",headers:[{level:2,title:"Install Web3.js (Web3.js Kurulumu)",slug:"install-web3-js-web3-js-kurulumu",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet Adapter (C\xFCzdan Adapt\xF6r\xFC)",slug:"wallet-adapter-cuzdan-adaptoru",children:[]}]},{level:2,title:"Install Rust (Rust Kurulumu)",slug:"install-rust-rust-kurulumu",children:[]},{level:2,title:"Install CLI (CLI Kurulumu)",slug:"install-cli-cli-kurulumu",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source (Kaynaktan Derleme)",slug:"build-from-source-kaynaktan-derleme",children:[]}]}],path:"/tr/getting-started/installation.html",pathLocale:"/tr/",extraFields:[]},{title:"Account Maps (Hesap Haritalar\u0131)",headers:[{level:2,title:"Deriving PDAs",slug:"deriving-pdas",children:[]},{level:2,title:"Single Map Account",slug:"single-map-account",children:[]}],path:"/tr/guides/account-maps.html",pathLocale:"/tr/",extraFields:[]},{title:"Migrating a Programs Data Accounts (Programlar\u0131n Data Account\u2019lar\u0131n\u0131 Ta\u015F\u0131ma)",headers:[{level:2,title:"How can you migrate a program's data accounts? (Programlar\u0131n veri account\u2019lar\u0131 nas\u0131l ta\u015F\u0131n\u0131r)",slug:"how-can-you-migrate-a-program-s-data-accounts-programlar\u0131n-veri-account-lar\u0131-nas\u0131l-tas\u0131n\u0131r",children:[]},{level:2,title:"Scenario (Senaryo)",slug:"scenario-senaryo",children:[]},{level:2,title:"Upgrading the Account (Account\u2019\u0131 Y\xFCkseltme)",slug:"upgrading-the-account-account-\u0131-yukseltme",children:[{level:3,title:"1. Add account conversion logic (Hesap d\xF6n\xFC\u015Ft\xFCrme mant\u0131\u011F\u0131 ekleme)",slug:"_1-add-account-conversion-logic-hesap-donusturme-mant\u0131g\u0131-ekleme",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/data-migration.html",pathLocale:"/tr/",extraFields:[]},{title:"Debugging Solana Programs (Solana Programlar\u0131nda Hata Ay\u0131klama)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Runtime Testing and Debugging in editor (Edit\xF6rde Runtime Test ve Hata Ay\u0131klama)",slug:"runtime-testing-and-debugging-in-editor-editorde-runtime-test-ve-hata-ay\u0131klama",children:[]},{level:2,title:"Local Validator Node Testing in editor (D\xFCzenleyicide Yerel Do\u011Frulay\u0131c\u0131 Node Testi)",slug:"local-validator-node-testing-in-editor-duzenleyicide-yerel-dogrulay\u0131c\u0131-node-testi",children:[]},{level:2,title:"Local Validator Node Testing from Client Apps (Client Uygulamalar\u0131nda Yerel Validator Node Testi)",slug:"local-validator-node-testing-from-client-apps-client-uygulamalar\u0131nda-yerel-validator-node-testi",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/debugging-solana-programs.html",pathLocale:"/tr/",extraFields:[]},{title:"Feature Parity Testing (\xD6zellik Parite Testi)",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Scenario (Senaryo)",slug:"scenario-senaryo",children:[]},{level:2,title:"Feature Status (\xD6zellik Durumu)",slug:"feature-status-ozellik-durumu",children:[]},{level:2,title:"Parity Testing (Parite Testi)",slug:"parity-testing-parite-testi",children:[]},{level:2,title:"Simple Demonstration (Basit G\xF6sterim)",slug:"simple-demonstration-basit-gosterim",children:[{level:3,title:"All features activated (T\xFCm \xF6zellikler aktifle\u015Ftirildi)",slug:"all-features-activated-tum-ozellikler-aktiflestirildi",children:[]},{level:3,title:"Selective features deactivated (Se\xE7ici \xF6zellikler devre d\u0131\u015F\u0131 b\u0131rak\u0131ld\u0131)",slug:"selective-features-deactivated-secici-ozellikler-devre-d\u0131s\u0131-b\u0131rak\u0131ld\u0131",children:[]}]},{level:2,title:"Full Parity Testing Programmatically (Programl\u0131 Olarak Tam Parite Testi)",slug:"full-parity-testing-programmatically-programl\u0131-olarak-tam-parite-testi",children:[]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/feature-parity-testing.html",pathLocale:"/tr/",extraFields:[]},{title:"Get Program Accounts",headers:[{level:2,title:"Facts (\xD6zet Bilgiler)",slug:"facts-ozet-bilgiler",children:[]},{level:2,title:"Deep Dive (Derinlemesine Bak\u0131\u015F)",slug:"deep-dive-derinlemesine-bak\u0131s",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/tr/guides/get-program-accounts.html",pathLocale:"/tr/",extraFields:[]},{title:"Serializing Data (Serile\u015Ftirme)",headers:[{level:2,title:"Setting up for Borsh Serialization (Borsh Serialization i\xE7in Kurulum)",slug:"setting-up-for-borsh-serialization-borsh-serialization-icin-kurulum",children:[]},{level:2,title:"How to serialize instruction data on the client (Client\u2019taki y\xF6nerge verisi nas\u0131l serile\u015Ftirilir)",slug:"how-to-serialize-instruction-data-on-the-client-client-taki-yonerge-verisi-nas\u0131l-serilestirilir",children:[]},{level:2,title:"How to deserialize instruction data on the program (Instruction data programlarda nas\u0131l deserialize edilir)",slug:"how-to-deserialize-instruction-data-on-the-program-instruction-data-programlarda-nas\u0131l-deserialize-edilir",children:[]},{level:2,title:"How to serialize account data on the program (Programdaki account data nas\u0131l serialize edilir)",slug:"how-to-serialize-account-data-on-the-program-programdaki-account-data-nas\u0131l-serialize-edilir",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"Serialization/Deserialization",slug:"serialization-deserialization",children:[]},{level:3,title:"Usage (Kullan\u0131m)",slug:"usage-kullan\u0131m",children:[]}]},{level:2,title:"How to deserialize account data on the client (Client\u2019ta account data nas\u0131l deserialize edilir)",slug:"how-to-deserialize-account-data-on-the-client-client-ta-account-data-nas\u0131l-deserialize-edilir",children:[]},{level:2,title:"Common Solana TS/JS Mappings (Yayg\u0131n Solana TS/JS E\u015Flemeleri)",slug:"common-solana-ts-js-mappings-yayg\u0131n-solana-ts-js-eslemeleri",children:[]},{level:2,title:"Advanced Constructs (Geli\u015Fmi\u015F Yap\u0131lar)",slug:"advanced-constructs-gelismis-yap\u0131lar",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"Resources",slug:"resources",children:[]}],path:"/tr/guides/serialization.html",pathLocale:"/tr/",extraFields:[]},{title:"Accounts (Account\u2019lar)",headers:[{level:2,title:"How to create a system account (System account olu\u015Fturma)",slug:"how-to-create-a-system-account-system-account-olusturma",children:[]},{level:2,title:"How to calculate account cost (Account maliyeti hesaplama)",slug:"how-to-calculate-account-cost-account-maliyeti-hesaplama",children:[]},{level:2,title:"How to calculate account cost (Account\u2019lar seed\u2019leri olu\u015Fturma)",slug:"how-to-calculate-account-cost-account-lar-seed-leri-olusturma",children:[{level:3,title:"Generate (\xDCretme)",slug:"generate-uretme",children:[]},{level:3,title:"Create (Olu\u015Fturma)",slug:"create-olusturma",children:[]},{level:3,title:"Transfer (Transfer)",slug:"transfer-transfer",children:[]}]},{level:2,title:"How to create PDAs (PDA\u2019leri olu\u015Fturma)",slug:"how-to-create-pdas-pda-leri-olusturma",children:[{level:3,title:"Generate a PDA (PDA \xFCretme)",slug:"generate-a-pda-pda-uretme",children:[]},{level:3,title:"Create a PDA (PDA olu\u015Fturma)",slug:"create-a-pda-pda-olusturma",children:[]}]},{level:2,title:"How to sign with a PDA (PDA ile imzalama)",slug:"how-to-sign-with-a-pda-pda-ile-imzalama",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Client",slug:"client-1",children:[]}]},{level:2,title:"How to get program accounts (Program hesaplar\u0131n\u0131 getirme)",slug:"how-to-get-program-accounts-program-hesaplar\u0131n\u0131-getirme",children:[]},{level:2,title:"How to close accounts (Account\u2019lar\u0131 kapatma)",slug:"how-to-close-accounts-account-lar\u0131-kapatma",children:[]},{level:2,title:"How to get account balance (Account bakiyesi getirme)",slug:"how-to-get-account-balance-account-bakiyesi-getirme",children:[]}],path:"/tr/references/accounts.html",pathLocale:"/tr/",extraFields:[]},{title:"Sending Transactions(\u0130\u015Flem G\xF6nderimi)",headers:[{level:2,title:"How to send SOL (SOL nas\u0131l g\xF6nderilir)",slug:"how-to-send-sol-sol-nas\u0131l-gonderilir",children:[]},{level:2,title:"How to send SPL-Tokens (SPL-Token\u2019lar nas\u0131l g\xF6nderilir)",slug:"how-to-send-spl-tokens-spl-token-lar-nas\u0131l-gonderilir",children:[]},{level:2,title:"How to calculate transaction cost (\u0130\u015Flem maliyeti nas\u0131l hesaplan\u0131r)",slug:"how-to-calculate-transaction-cost-islem-maliyeti-nas\u0131l-hesaplan\u0131r",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"How to add a memo to a transaction (Bir i\u015Fleme mesaj nas\u0131l eklenir)",slug:"how-to-add-a-memo-to-a-transaction-bir-isleme-mesaj-nas\u0131l-eklenir",children:[]},{level:2,title:"How to change compute budget, fee, & priority for a transaction (Bir i\u015Flem i\xE7in i\u015Flem b\xFCt\xE7esi, bedeli ve \xF6nceli\u011Fi nas\u0131l de\u011Fi\u015Ftirilir)",slug:"how-to-change-compute-budget-fee-priority-for-a-transaction-bir-islem-icin-islem-butcesi-bedeli-ve-onceligi-nas\u0131l-degistirilir",children:[]}],path:"/tr/references/basic-transactions.html",pathLocale:"/tr/",extraFields:[]},{title:"Keypairs and Wallets",headers:[{level:2,title:"How to generate a new Keypair (Yeni Keypair nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-new-keypair-yeni-keypair-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to verify a Keypair (Keypair nas\u0131l do\u011Frulan\u0131r)",slug:"how-to-verify-a-keypair-keypair-nas\u0131l-dogrulan\u0131r",children:[]},{level:2,title:"How to check if a public key has an associated private key (Bir public key\u2019in ili\u015Fkili private key\u2019e sahip olup olmad\u0131\u011F\u0131 nas\u0131l kontrol edilir)",slug:"how-to-check-if-a-public-key-has-an-associated-private-key-bir-public-key-in-iliskili-private-key-e-sahip-olup-olmad\u0131g\u0131-nas\u0131l-kontrol-edilir",children:[]},{level:2,title:"How to generate a mnemonic phrase (Hat\u0131rlat\u0131c\u0131 bir ifade nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-mnemonic-phrase-hat\u0131rlat\u0131c\u0131-bir-ifade-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase (An\u0131msat\u0131c\u0131 bir c\xFCmleden Keypair nas\u0131l y\xFCklenir)",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase-an\u0131msat\u0131c\u0131-bir-cumleden-keypair-nas\u0131l-yuklenir",children:[]},{level:2,title:"How to generate a vanity address (\xD6zel bir adres nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-vanity-address-ozel-bir-adres-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to sign and verify messages with wallets (C\xFCzdanlarla mesajlar nas\u0131l imzalan\u0131r ve do\u011Frulan\u0131r)",slug:"how-to-sign-and-verify-messages-with-wallets-cuzdanlarla-mesajlar-nas\u0131l-imzalan\u0131r-ve-dogrulan\u0131r",children:[]},{level:2,title:"How to connect to a wallet (C\xFCzdana nas\u0131l ba\u011Flan\u0131l\u0131r)",slug:"how-to-connect-to-a-wallet-cuzdana-nas\u0131l-baglan\u0131l\u0131r",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/tr/references/keypairs-and-wallets.html",pathLocale:"/tr/",extraFields:[]},{title:"Local Development (Yerel Geli\u015Ftirme)",headers:[{level:2,title:"Starting a local validator (Yerel validator ba\u015Flatma)",slug:"starting-a-local-validator-yerel-validator-baslatma",children:[]},{level:2,title:"Connecting to Environments (Ortamlara Ba\u011Flanma)",slug:"connecting-to-environments-ortamlara-baglanma",children:[]},{level:2,title:"Subscribing to Events (Event\u2019lere Abone Olma)",slug:"subscribing-to-events-event-lere-abone-olma",children:[]},{level:2,title:"Getting Test SOL (Test SOL Edinme)",slug:"getting-test-sol-test-sol-edinme",children:[]},{level:2,title:"Using Mainnet Accounts and Programs (Mainnet Account ve Programlar\u0131n\u0131 Kullanma)",slug:"using-mainnet-accounts-and-programs-mainnet-account-ve-programlar\u0131n\u0131-kullanma",children:[{level:3,title:"How to load accounts from mainnet (Account\u2019lar mainnet\u2019ten nas\u0131l y\xFCklenir)",slug:"how-to-load-accounts-from-mainnet-account-lar-mainnet-ten-nas\u0131l-yuklenir",children:[]},{level:3,title:"How to load programs from mainnet (Programlar mainnet\u2019ten nas\u0131l y\xFCklenir)",slug:"how-to-load-programs-from-mainnet-programlar-mainnet-ten-nas\u0131l-yuklenir",children:[]}]}],path:"/tr/references/local-development.html",pathLocale:"/tr/",extraFields:[]},{title:"Name Service (Name Servisi)",headers:[{level:2,title:"Name registry (Name kayd\u0131)",slug:"name-registry-name-kayd\u0131",children:[]},{level:2,title:"Resolving SOL domains (SOL alan adlar\u0131n\u0131 \xE7\xF6zme)",slug:"resolving-sol-domains-sol-alan-adlar\u0131n\u0131-cozme",children:[]},{level:2,title:"Reverse lookup (Geriye do\u011Fru arama)",slug:"reverse-lookup-geriye-dogru-arama",children:[]},{level:2,title:"Subdomain lookup (Subdomain arama)",slug:"subdomain-lookup-subdomain-arama",children:[]},{level:2,title:"Find all the domain names owned by a public key (Bir public key\u2019in sahip oldu\u011Fu t\xFCm isimleri bulma)",slug:"find-all-the-domain-names-owned-by-a-public-key-bir-public-key-in-sahip-oldugu-tum-isimleri-bulma",children:[]},{level:2,title:"Resolve a Twitter handle (Twitter handle\u2019\u0131n\u0131 \xE7\xF6zme)",slug:"resolve-a-twitter-handle-twitter-handle-\u0131n\u0131-cozme",children:[]},{level:2,title:"Reverse lookup of a Twitter handle (Twitter handle\u2019\u0131n\u0131 geri aratma)",slug:"reverse-lookup-of-a-twitter-handle-twitter-handle-\u0131n\u0131-geri-aratma",children:[]}],path:"/tr/references/name-service.html",pathLocale:"/tr/",extraFields:[]},{title:"Non Fungible Tokens (NFTs)",headers:[{level:2,title:"How to create an NFT (NFT olu\u015Fturma)",slug:"how-to-create-an-nft-nft-olusturma",children:[{level:3,title:"Upload to Arweave (Arwave\u2019e y\xFCkleme)",slug:"upload-to-arweave-arwave-e-yukleme",children:[]},{level:3,title:"Mint the NFT (NFT Mint)",slug:"mint-the-nft-nft-mint",children:[]}]},{level:2,title:"How to get NFT Metadata (NFT Metadata\u2019y\u0131 getirme)",slug:"how-to-get-nft-metadata-nft-metadata-y\u0131-getirme",children:[]},{level:2,title:"How to get the owner of an NFT (Bir NFT\u2019nin sahibini getirme)",slug:"how-to-get-the-owner-of-an-nft-bir-nft-nin-sahibini-getirme",children:[]},{level:2,title:"How to get NFT Mint Addresses (NFT Mint Adres\u2019lerini getirme)",slug:"how-to-get-nft-mint-addresses-nft-mint-adres-lerini-getirme",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"How to get all NFTs from a wallet? (Bir c\xFCzdandan t\xFCm NFT\u2019leri alma)",slug:"how-to-get-all-nfts-from-a-wallet-bir-cuzdandan-tum-nft-leri-alma",children:[]}],path:"/tr/references/nfts.html",pathLocale:"/tr/",extraFields:[]},{title:"Offline Transaction (\xC7evrimd\u0131\u015F\u0131 i\u015Flem)",headers:[{level:2,title:"Sign Transaction (\u0130\u015Flem \u0130mzalama)",slug:"sign-transaction-islem-imzalama",children:[]},{level:2,title:"Partial Sign Transaction (K\u0131smi \u0130mzalama)",slug:"partial-sign-transaction-k\u0131smi-imzalama",children:[]},{level:2,title:"Durable Nonce(Uzun S\xFCreli Nonce)",slug:"durable-nonce-uzun-sureli-nonce",children:[{level:3,title:"Create Nonce Account (Nonce Account Olu\u015Fturma)",slug:"create-nonce-account-nonce-account-olusturma",children:[]},{level:3,title:"Get Nonce Account (Nonce Account Getirme)",slug:"get-nonce-account-nonce-account-getirme",children:[]},{level:3,title:"Use Nonce Account (Nonce Account Kullanma)",slug:"use-nonce-account-nonce-account-kullanma",children:[]}]}],path:"/tr/references/offline-transactions.html",pathLocale:"/tr/",extraFields:[]},{title:"Writing Programs (Programlar\u0131 Yazma)",headers:[{level:2,title:"How to transfer SOL in a program (Programda SOL aktarma)",slug:"how-to-transfer-sol-in-a-program-programda-sol-aktarma",children:[]},{level:2,title:"How to get clock in a program (Programlarda saat)",slug:"how-to-get-clock-in-a-program-programlarda-saat",children:[{level:3,title:"Passing Clock as an account inside an instruction (Saati bir intstruction i\xE7inde bir hesap olarak ge\xE7irme)",slug:"passing-clock-as-an-account-inside-an-instruction-saati-bir-intstruction-icinde-bir-hesap-olarak-gecirme",children:[]},{level:3,title:"Accessing Clock directly inside an instruction (Saate do\u011Frudan bir instruction i\xE7inden eri\u015Fme)",slug:"accessing-clock-directly-inside-an-instruction-saate-dogrudan-bir-instruction-icinden-erisme",children:[]}]},{level:2,title:"How to change account size (Account boyutu de\u011Fi\u015Ftirme)",slug:"how-to-change-account-size-account-boyutu-degistirme",children:[]},{level:2,title:"How to do Cross Program Invocation (\xC7apraz Program \xC7a\u011F\u0131rma)",slug:"how-to-do-cross-program-invocation-capraz-program-cag\u0131rma",children:[]},{level:2,title:"How to create a PDA (PDA olu\u015Fturma)",slug:"how-to-create-a-pda-pda-olusturma",children:[]},{level:2,title:"How to read accounts (Account\u2019lar\u0131 okuma)",slug:"how-to-read-accounts-account-lar\u0131-okuma",children:[]},{level:2,title:"How to verify accounts (Account\u2019lar\u0131 do\u011Frulama)",slug:"how-to-verify-accounts-account-lar\u0131-dogrulama",children:[]},{level:2,title:"How to read multiple instructions from a transaction (\u0130\u015Flemdeki \xE7oklu talimatlar\u0131 okuma)",slug:"how-to-read-multiple-instructions-from-a-transaction-islemdeki-coklu-talimatlar\u0131-okuma",children:[]}],path:"/tr/references/programs.html",pathLocale:"/tr/",extraFields:[]},{title:"Staking (Stake Etme)",headers:[{level:2,title:"Get Current Validators (Ge\xE7erli Validator\u2019lar\u0131 Getirme)",slug:"get-current-validators-gecerli-validator-lar\u0131-getirme",children:[]},{level:2,title:"Create Stake Account (Stake hesab\u0131 olu\u015Fturma)",slug:"create-stake-account-stake-hesab\u0131-olusturma",children:[]},{level:2,title:"Delegate Stake (Delegate Stake)",slug:"delegate-stake-delegate-stake",children:[]},{level:2,title:"Get Delegator by Validators (Validator account\u2019a stake eden account\u2019lar\u0131 getirme)",slug:"get-delegator-by-validators-validator-account-a-stake-eden-account-lar\u0131-getirme",children:[]},{level:2,title:"Deactivate Stake (Stake\u2019i Devre D\u0131\u015F\u0131 B\u0131rakma)",slug:"deactivate-stake-stake-i-devre-d\u0131s\u0131-b\u0131rakma",children:[]},{level:2,title:"Withdraw Stake (Stake\u2019i \xC7ekme)",slug:"withdraw-stake-stake-i-cekme",children:[]}],path:"/tr/references/staking.html",pathLocale:"/tr/",extraFields:[]},{title:"Interacting with Tokens (Token\u2019lar ile Etkile\u015Fim)",headers:[{level:2,title:"What do I need to get started with SPL-Tokens? (SPL Token\u2019lar\u0131 kullanmaya ba\u015Flamak i\xE7in neye ihtiyac\u0131m\u0131z var?)",slug:"what-do-i-need-to-get-started-with-spl-tokens-spl-token-lar\u0131-kullanmaya-baslamak-icin-neye-ihtiyac\u0131m\u0131z-var",children:[]},{level:2,title:"How to create a new Token (Yeni bir Token olu\u015Fturma)",slug:"how-to-create-a-new-token-yeni-bir-token-olusturma",children:[]},{level:2,title:"How to get a token mint (Token Mint etme)",slug:"how-to-get-a-token-mint-token-mint-etme",children:[]},{level:2,title:"How to create a token account (Token account olu\u015Fturma)",slug:"how-to-create-a-token-account-token-account-olusturma",children:[]},{level:2,title:"How to get a Token Account (Token account\u2019u getirme)",slug:"how-to-get-a-token-account-token-account-u-getirme",children:[]},{level:2,title:"How to get a token account's balance (Token account bakiyesi getirme)",slug:"how-to-get-a-token-account-s-balance-token-account-bakiyesi-getirme",children:[]},{level:2,title:"How to mint tokens (Token mint\u2019leme)",slug:"how-to-mint-tokens-token-mint-leme",children:[]},{level:2,title:"How to transfer tokens (Token transfer etme)",slug:"how-to-transfer-tokens-token-transfer-etme",children:[]},{level:2,title:"How to burn tokens (Token yakma(burn))",slug:"how-to-burn-tokens-token-yakma-burn",children:[]},{level:2,title:"How to close token accounts (Token account\u2019lar\u0131n\u0131 kapatma)",slug:"how-to-close-token-accounts-token-account-lar\u0131n\u0131-kapatma",children:[]},{level:2,title:"How to set authority on token accounts or mints (Token hesaplar\u0131nda ve mint\u2019lerinde yetki belirleme)",slug:"how-to-set-authority-on-token-accounts-or-mints-token-hesaplar\u0131nda-ve-mint-lerinde-yetki-belirleme",children:[]},{level:2,title:"How to approve a token delegate (Token delegate onaylama)",slug:"how-to-approve-a-token-delegate-token-delegate-onaylama",children:[]},{level:2,title:"How to revoke a token delegate (Token delegate iptal etme)",slug:"how-to-revoke-a-token-delegate-token-delegate-iptal-etme",children:[]},{level:2,title:"How to manage wrapped SOL (Wrapped SOL y\xF6netimi)",slug:"how-to-manage-wrapped-sol-wrapped-sol-yonetimi",children:[{level:3,title:"Create Token Account (Token Account Olu\u015Fturma)",slug:"create-token-account-token-account-olusturma",children:[]},{level:3,title:"Add Balance (Bakiye Ekleme)",slug:"add-balance-bakiye-ekleme",children:[]}]},{level:2,title:"How to get all token accounts by owner (T\xFCm token account\u2019lar\u0131 sahibi taraf\u0131ndan nas\u0131l al\u0131n\u0131r?)",slug:"how-to-get-all-token-accounts-by-owner-tum-token-account-lar\u0131-sahibi-taraf\u0131ndan-nas\u0131l-al\u0131n\u0131r",children:[]}],path:"/tr/references/token.html",pathLocale:"/tr/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"C\u1EA5u tr\xFAc Account",slug:"cau-truc-account",children:[]},{level:3,title:"Thu\xEA",slug:"thue",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[{level:3,title:"L\u1EDDi c\u1EA3m \u01A1n",slug:"loi-cam-on",children:[]}]}],path:"/vi/core-concepts/accounts.html",pathLocale:"/vi/",extraFields:[]},{title:"Program Derived Addresses (PDAs)",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[{level:3,title:"C\xE1ch sinh PDA",slug:"cach-sinh-pda",children:[]},{level:3,title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi PDAs",slug:"tuong-tac-voi-pdas",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/core-concepts/pdas.html",pathLocale:"/vi/",extraFields:[]},{title:"Programs",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"Native Programs & Solana Program Library (SPL) Programs",slug:"native-programs-solana-program-library-spl-programs",children:[]},{level:3,title:"Vi\u1EBFt m\u1ED9t Program",slug:"viet-mot-program",children:[]},{level:3,title:"Tri\u1EC3n khai Program",slug:"trien-khai-program",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/core-concepts/programs.html",pathLocale:"/vi/",extraFields:[]},{title:"Transactions",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"Ph\xED",slug:"phi",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/core-concepts/transactions.html",pathLocale:"/vi/",extraFields:[]},{title:"C\xE0i \u0111\u1EB7t",headers:[{level:2,title:"C\xE0i \u0111\u1EB7t Web3.js",slug:"cai-\u0111at-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"C\xE0i \u0111\u1EB7t Rust",slug:"cai-\u0111at-rust",children:[]},{level:2,title:"C\xE0i \u0111\u1EB7t CLI",slug:"cai-\u0111at-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bi\xEAn d\u1ECBch t\u1EEB m\xE3 ngu\u1ED3n",slug:"bien-dich-tu-ma-nguon",children:[]}]}],path:"/vi/getting-started/installation.html",pathLocale:"/vi/",extraFields:[]},{title:"Account Maps",headers:[{level:2,title:"T\xECm PDA",slug:"tim-pda",children:[]},{level:2,title:"Map b\u1EB1ng Account \u0111\u01A1n",slug:"map-bang-account-\u0111on",children:[]}],path:"/vi/guides/account-maps.html",pathLocale:"/vi/",extraFields:[]},{title:"N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Program Account",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\xF3 th\u1EC3 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Program Account?",slug:"lam-the-nao-\u0111e-co-the-nang-cap-du-lieu-trong-program-account",children:[]},{level:2,title:"Ng\u1EEF c\u1EA3nh",slug:"ngu-canh",children:[]},{level:2,title:"N\xE2ng c\u1EA5p Account",slug:"nang-cap-account",children:[{level:3,title:"1. Th\xEAm lu\u1EADn l\xFD \u0111\u1EC3 chuy\u1EC3n \u0111\u1ED5i Account",slug:"_1-them-luan-ly-\u0111e-chuyen-\u0111oi-account",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/data-migration.html",pathLocale:"/vi/",extraFields:[]},{title:"So\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"M\xF4i tr\u01B0\u1EDDng ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i trong tr\xECnh bi\xEAn t\u1EADp",slug:"moi-truong-kiem-thu-va-soat-loi-trong-trinh-bien-tap",children:[]},{level:2,title:"Ki\u1EC3m th\u1EED b\u1EB1ng n\u1ED1t Local Validator trong tr\xECnh bi\xEAn t\u1EADp",slug:"kiem-thu-bang-not-local-validator-trong-trinh-bien-tap",children:[]},{level:2,title:"Ki\u1EC3m th\u1EED b\u1EB1ng n\u1ED1t Local Validator tr\xEAn \u1EE9ng d\u1EE5ng ng\u01B0\u1EDDi d\xF9ng",slug:"kiem-thu-bang-not-local-validator-tren-ung-dung-nguoi-dung",children:[]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/debugging-solana-programs.html",pathLocale:"/vi/",extraFields:[]},{title:"\u0110\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"T\xECnh hu\u1ED1ng gi\u1EA3 \u0111\u1ECBnh",slug:"tinh-huong-gia-\u0111inh",children:[]},{level:2,title:"\u0110\u1EC1 xu\u1EA5t Tr\u1EA1ng th\xE1i",slug:"\u0111e-xuat-trang-thai",children:[]},{level:2,title:"Ki\u1EC3m th\u1EED Parity",slug:"kiem-thu-parity",children:[]},{level:2,title:"V\xED d\u1EE5 \u0111\u01A1n gi\u1EA3n",slug:"vi-du-\u0111on-gian",children:[{level:3,title:"Khi t\u1EA5t c\u1EA3 c\xE1c \u0111\u1EC1 xu\u1EA5t \u0111\u1EC1u k\xEDch ho\u1EA1t",slug:"khi-tat-ca-cac-\u0111e-xuat-\u0111eu-kich-hoat",children:[]},{level:3,title:"V\xF4 hi\u1EC7u m\u1ED9t v\xE0i \u0111\u1EC1 xu\u1EA5t",slug:"vo-hieu-mot-vai-\u0111e-xuat",children:[]}]},{level:2,title:"Ki\u1EC3m th\u1EED Parity \u0110\u1EA7y \u0111\u1EE7",slug:"kiem-thu-parity-\u0111ay-\u0111u",children:[]},{level:2,title:"C\xE0i \u0111\u1EB7t t\u1EF1 \u0111\u1ED9ng cho Ki\u1EC3m th\u1EED Parity \u0110\u1EA7y \u0111\u1EE7",slug:"cai-\u0111at-tu-\u0111ong-cho-kiem-thu-parity-\u0111ay-\u0111u",children:[]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/feature-parity-testing.html",pathLocale:"/vi/",extraFields:[]},{title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/get-program-accounts.html",pathLocale:"/vi/",extraFields:[]},{title:"Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u",headers:[{level:2,title:"C\xE0i \u0111\u1EB7t Tu\u1EA7n t\u1EF1 ho\xE1 Borsh",slug:"cai-\u0111at-tuan-tu-hoa-borsh",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u c\u1EE7a c\xE1c ch\u1EC9 th\u1ECB t\u1EEB ph\xEDa ng\u01B0\u1EDDi d\xF9ng",slug:"lam-the-nao-\u0111e-tuan-tu-hoa-du-lieu-cua-cac-chi-thi-tu-phia-nguoi-dung",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u c\u1EE7a c\xE1c ch\u1EC9 th\u1ECB tr\xEAn Program",slug:"lam-the-nao-\u0111e-phi-tuan-tu-hoa-du-lieu-cua-cac-chi-thi-tren-program",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u Account tr\xEAn Program",slug:"lam-the-nao-\u0111e-tuan-tu-hoa-du-lieu-account-tren-program",children:[{level:3,title:"Pack (\u0110\xF3ng g\xF3i)",slug:"pack-\u0111ong-goi",children:[]},{level:3,title:"Tu\u1EA7n t\u1EF1 ho\xE1 v\xE0 Phi tu\u1EA7n t\u1EF1 ho\xE1",slug:"tuan-tu-hoa-va-phi-tuan-tu-hoa",children:[]},{level:3,title:"C\xE1ch d\xF9ng",slug:"cach-dung",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 tu\u1EA7n ho\xE1 d\u1EEF li\u1EC7u Account \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng",slug:"lam-the-nao-\u0111e-tuan-hoa-du-lieu-account-o-phia-nguoi-dung",children:[]},{level:2,title:"Mapping c\u01A1 b\u1EA3n b\u1EB1ng TS/JS cho Solana",slug:"mapping-co-ban-bang-ts-js-cho-solana",children:[]},{level:2,title:"Ki\u1EC3u d\u1EEF li\u1EC7u n\xE2ng cao",slug:"kieu-du-lieu-nang-cao",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],path:"/vi/guides/serialization.html",pathLocale:"/vi/",extraFields:[]},{title:"Accounts",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t System Account",slug:"lam-the-nao-\u0111e-tao-mot-system-account",children:[]},{level:2,title:"T\xEDnh chi ph\xED cho m\u1ED9t account",slug:"tinh-chi-phi-cho-mot-account",children:[]},{level:2,title:"L\xE0m th\u1EBF \xE0o \u0111\u1EC3 t\u1EA1o account v\u1EDBi seeds",slug:"lam-the-ao-\u0111e-tao-account-voi-seeds",children:[{level:3,title:"T\xECm Account",slug:"tim-account",children:[]},{level:3,title:"T\u1EA1o Account",slug:"tao-account",children:[]},{level:3,title:"Chuy\u1EC3n lamports",slug:"chuyen-lamports",children:[]}]},{level:2,title:"C\xE1ch t\u1EA1o PDAs",slug:"cach-tao-pdas",children:[{level:3,title:"Sinh ra m\u1ED9t PDA",slug:"sinh-ra-mot-pda",children:[]},{level:3,title:"T\u1EA1o m\u1ED9t PDA",slug:"tao-mot-pda",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 k\xFD b\u1EB1ng PDA",slug:"lam-the-nao-\u0111e-ky-bang-pda",children:[{level:3,title:"Program",slug:"program-1",children:[]},{level:3,title:"Ng\u01B0\u1EDDi d\xF9ng",slug:"nguoi-dung-1",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n c\xE1c account c\u1EE7a m\u1ED9t program",slug:"lam-the-nao-\u0111e-truy-van-cac-account-cua-mot-program",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xF3ng account",slug:"lam-the-nao-\u0111e-\u0111ong-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n s\u1ED1 d\u01B0 c\u1EE7a m\u1ED9t account",slug:"lam-the-nao-\u0111e-truy-van-so-du-cua-mot-account",children:[]}],path:"/vi/references/accounts.html",pathLocale:"/vi/",extraFields:[]},{title:"G\u1EEDi Transaction",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1EEDi SOL",slug:"lam-the-nao-\u0111e-gui-sol",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1EEDi SPL-Tokens",slug:"lam-the-nao-\u0111e-gui-spl-tokens",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\xEDnh chi ph\xED g\u1EEDi transaction",slug:"lam-the-nao-\u0111e-tinh-chi-phi-gui-transaction",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 th\xEAm ghi ch\xFA v\xE0 m\u1ED9t transaction",slug:"lam-the-nao-\u0111e-them-ghi-chu-va-mot-transaction",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thay \u0111\u1ED5i ng\xE2n s\xE1ch t\xEDnh to\xE1n cho m\u1ED9t transaction",slug:"lam-the-nao-\u0111e-thay-\u0111oi-ngan-sach-tinh-toan-cho-mot-transaction",children:[]}],path:"/vi/references/basic-transactions.html",pathLocale:"/vi/",extraFields:[]},{title:"C\u1EB7p kho\xE1 v\xE0 V\xED",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh C\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-sinh-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i m\u1ED9t C\u1EB7p kho\xE1 t\u1EEB kho\xE1 ri\xEAng t\u01B0",slug:"lam-the-nao-\u0111e-phuc-hoi-mot-cap-khoa-tu-khoa-rieng-tu",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra m\u1ED9t c\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-kiem-tra-mot-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra n\u1EBFu m\u1ED9t kho\xE1 c\xF4ng khai kh\xF4ng t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE8ng",slug:"lam-the-nao-\u0111e-kiem-tra-neu-mot-khoa-cong-khai-khong-ton-tai-khoa-rieng-tu-tuong-ung",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh ra c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-sinh-ra-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i l\u1EA1i c\u1EB7p kho\xE1 t\u1EEB c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-phuc-hoi-lai-cap-khoa-tu-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh m\u1ED9t \u0111\u1ECBa ch\u1EC9 danh ngh\u0129a",slug:"lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o k\xFD v\xE0 ki\u1EC3m tra tinh nh\u1EAFn b\u1EB1ng v\xED",slug:"lam-the-nao-ky-va-kiem-tra-tinh-nhan-bang-vi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 k\u1EBFt n\u1ED1i v\xED",slug:"lam-the-nao-\u0111e-ket-noi-vi",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/vi/references/keypairs-and-wallets.html",pathLocale:"/vi/",extraFields:[]},{title:"L\u1EADp tr\xECnh \u1EDF Local",headers:[{level:2,title:"Kh\u1EDFi ch\u1EA1y Local Validator",slug:"khoi-chay-local-validator",children:[]},{level:2,title:"K\u1EBFt n\u1ED1i \u0111\u1EBFn m\xF4i tr\u01B0\u1EDDng",slug:"ket-noi-\u0111en-moi-truong",children:[]},{level:2,title:"L\u1EAFng nghe c\xE1c s\u1EF1 ki\u1EC7n",slug:"lang-nghe-cac-su-kien",children:[]},{level:2,title:"Nh\u1EADn SOL \u0111\u1EC3 ki\u1EC3m th\u1EED",slug:"nhan-sol-\u0111e-kiem-thu",children:[]},{level:2,title:"S\u1EED d\u1EE5ng Accounts v\xE0 Programs tr\xEAn Mainnet",slug:"su-dung-accounts-va-programs-tren-mainnet",children:[{level:3,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\xE0i \u0111\u1EB7t accounts t\u1EEB mainnet",slug:"lam-the-nao-\u0111e-cai-\u0111at-accounts-tu-mainnet",children:[]},{level:3,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\u1EA3i \u0111\u1EB7t programs t\u1EEB mainnet",slug:"lam-the-nao-\u0111e-cai-\u0111at-programs-tu-mainnet",children:[]}]}],path:"/vi/references/local-development.html",pathLocale:"/vi/",extraFields:[]},{title:"D\u1ECBch v\u1EE5 t\xEAn mi\u1EC1n",headers:[{level:2,title:"D\u1ECBch v\u1EE5 \u0111\u0103ng k\xFD t\xEAn mi\u1EC1n",slug:"dich-vu-\u0111ang-ky-ten-mien",children:[]},{level:2,title:"Ph\xE2n gi\u1EA3i t\xEAn mi\u1EC1n SOL",slug:"phan-giai-ten-mien-sol",children:[]},{level:2,title:"Tra c\u1EE9u ng\u01B0\u1EE3c",slug:"tra-cuu-nguoc",children:[]},{level:2,title:"Tra c\u1EE9u t\xEAn mi\u1EC1n con",slug:"tra-cuu-ten-mien-con",children:[]},{level:2,title:"T\xECm t\u1EA5t c\u1EA3 t\xEAn mi\u1EC1n \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi m\u1ED9t kho\xE1 c\xF4ng khai",slug:"tim-tat-ca-ten-mien-\u0111uoc-so-huu-boi-mot-khoa-cong-khai",children:[]},{level:2,title:"Ph\xE2n gi\u1EA3i m\u1ED9t Twitter Handle",slug:"phan-giai-mot-twitter-handle",children:[]},{level:2,title:"Tra c\u1EE9u ng\u01B0\u1EE3c c\u1EE7a m\u1ED9t Twitter Handle",slug:"tra-cuu-nguoc-cua-mot-twitter-handle",children:[]}],path:"/vi/references/name-service.html",pathLocale:"/vi/",extraFields:[]},{title:"NFTs",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t NFT",slug:"lam-the-nao-\u0111e-tao-mot-nft",children:[{level:3,title:"\u0110\u0103ng t\u1EA3i l\xEAn Arweave",slug:"\u0111ang-tai-len-arweave",children:[]},{level:3,title:"\u0110\xFAc NFT",slug:"\u0111uc-nft",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n NFT Metadata",slug:"lam-the-nao-\u0111e-truy-van-nft-metadata",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n ch\u1EE7 s\u1EDF h\u1EEFu c\u1EE7a m\u1ED9t NFTs",slug:"lam-the-nao-\u0111e-truy-van-chu-so-huu-cua-mot-nfts",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n \u0111\u1ECBa ch\u1EC9 mint c\u1EE7a NFT",slug:"lam-the-nao-\u0111e-truy-van-\u0111ia-chi-mint-cua-nft",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n t\u1EA5t c\u1EA3 NFT t\u1EEB m\u1ED9t v\xED?",slug:"lam-the-nao-\u0111e-truy-van-tat-ca-nft-tu-mot-vi",children:[]}],path:"/vi/references/nfts.html",pathLocale:"/vi/",extraFields:[]},{title:"G\u1EEDi Transactions Ngo\u1EA1i tuy\u1EBFn",headers:[{level:2,title:"K\xFD Transaction",slug:"ky-transaction",children:[]},{level:2,title:"K\xFD m\u1ED9t ph\u1EA7n Transaction",slug:"ky-mot-phan-transaction",children:[]},{level:2,title:"Nonce v\u0129nh vi\u1EC5n",slug:"nonce-vinh-vien",children:[{level:3,title:"T\u1EA1o Nonce Account",slug:"tao-nonce-account",children:[]},{level:3,title:"Truy v\u1EA5n Nonce Account",slug:"truy-van-nonce-account",children:[]},{level:3,title:"S\u1EED d\u1EE5ng Nonce Account",slug:"su-dung-nonce-account",children:[]}]}],path:"/vi/references/offline-transactions.html",pathLocale:"/vi/",extraFields:[]},{title:"X\xE2y d\u1EF1ng Programs",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n SOL trong m\u1ED9t program",slug:"lam-the-nao-\u0111e-chuyen-sol-trong-mot-program",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 l\u1EA5y th\u1EDDi gian trong m\u1ED9t program",slug:"lam-the-nao-\u0111e-lay-thoi-gian-trong-mot-program",children:[{level:3,title:"Truy\u1EC1n Clock nh\u01B0 l\xE0 m\u1ED9t account trong ch\u1EC9 th\u1ECB",slug:"truyen-clock-nhu-la-mot-account-trong-chi-thi",children:[]},{level:3,title:"Truy c\u1EADp Clock tr\u1EF1c ti\u1EBFp b\xEAn trong ch\u1EC9 th\u1ECB",slug:"truy-cap-clock-truc-tiep-ben-trong-chi-thi",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thay \u0111\u1ED5i k\xEDch th\u01B0\u1EDBc account",slug:"lam-the-nao-\u0111e-thay-\u0111oi-kich-thuoc-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1ECDi gi\u1EEFa c\xE1c program (Cross Program Invocation - CPI)",slug:"lam-the-nao-\u0111e-goi-giua-cac-program-cross-program-invocation-cpi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o PDA",slug:"lam-the-nao-\u0111e-tao-pda",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc Account",slug:"lam-the-nao-\u0111e-\u0111oc-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra account",slug:"lam-the-nao-\u0111e-kiem-tra-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc nhi\u1EC1u ch\u1EC9 th\u1ECB t\u1EEB m\u1ED9t Transaction",slug:"lam-the-nao-\u0111e-\u0111oc-nhieu-chi-thi-tu-mot-transaction",children:[]}],path:"/vi/references/programs.html",pathLocale:"/vi/",extraFields:[]},{title:"Staking",headers:[{level:2,title:"Truy v\u1EA5n danh s\xE1ch Validators hi\u1EC7n t\u1EA1i",slug:"truy-van-danh-sach-validators-hien-tai",children:[]},{level:2,title:"T\u1EA1o m\u1ED9t Stake Account",slug:"tao-mot-stake-account",children:[]},{level:2,title:"U\u1EF7 quy\u1EC1n Stake",slug:"uy-quyen-stake",children:[]},{level:2,title:"Truy v\u1EA5n c\xE1c nh\xE0 u\u1EF7 quy\u1EC1n b\u1EB1ng validator",slug:"truy-van-cac-nha-uy-quyen-bang-validator",children:[]},{level:2,title:"D\u1EEBng stake",slug:"dung-stake",children:[]},{level:2,title:"R\xFAt Stake",slug:"rut-stake",children:[]}],path:"/vi/references/staking.html",pathLocale:"/vi/",extraFields:[]},{title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens",headers:[{level:2,title:"T\xF4i n\xEAn c\u1EA7n g\xEC \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi SPL-Tokens?",slug:"toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token m\u1EDBi",slug:"lam-the-nao-\u0111e-tao-mot-token-moi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc truy v\u1EA5n token mint",slug:"lam-the-nao-\u0111e-\u0111oc-truy-van-token-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token account",slug:"lam-the-nao-\u0111e-tao-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n token acount",slug:"lam-the-nao-\u0111e-truy-van-token-acount",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n s\u1ED1 d\u01B0 c\u1EE7a token account",slug:"lam-the-nao-\u0111e-truy-van-so-du-cua-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xFAc token",slug:"lam-the-nao-\u0111e-\u0111uc-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n token",slug:"lam-the-nao-\u0111e-chuyen-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ED1t token",slug:"lam-the-nao-\u0111e-\u0111ot-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xF3ng m\u1ED9t token account",slug:"lam-the-nao-\u0111e-\u0111ong-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thi\u1EBFt l\u1EADp ch\u1EE7 s\u1EDF h\u1EEFu cho token account v\xE0 mint",slug:"lam-the-nao-\u0111e-thiet-lap-chu-so-huu-cho-token-account-va-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 u\u1EF7 quy\u1EC1n cho m\u1ED9t token \u0111\u1EA1i di\u1EC7n (delegate)",slug:"lam-the-nao-\u0111e-uy-quyen-cho-mot-token-\u0111ai-dien-delegate",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thu h\u1ED3i m\u1ED9t token \u0111\u1EA1i di\u1EC7n",slug:"lam-the-nao-\u0111e-thu-hoi-mot-token-\u0111ai-dien",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 qu\u1EA3n l\xFD wrapped SOL",slug:"lam-the-nao-\u0111e-quan-ly-wrapped-sol",children:[{level:3,title:"T\u1EA1o token account",slug:"tao-token-account",children:[]},{level:3,title:"Th\xEAm s\u1ED1 d\u01B0",slug:"them-so-du",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n t\u1EA5t c\u1EA3 token account c\u1EE7a m\u1ED9t Ch\u1EE7",slug:"lam-the-nao-\u0111e-truy-van-tat-ca-token-account-cua-mot-chu",children:[]}],path:"/vi/references/token.html",pathLocale:"/vi/",extraFields:[]},{title:"\u8D26\u6237",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8D26\u6237\u6A21\u578B",slug:"\u8D26\u6237\u6A21\u578B",children:[]},{level:3,title:"\u79DF\u91D1",slug:"\u79DF\u91D1",children:[]}]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[{level:3,title:"\u81F4\u8C22",slug:"\u81F4\u8C22",children:[]}]}],path:"/zh/core-concepts/accounts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237 (PDA)",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[{level:3,title:"\u751F\u6210PDA",slug:"\u751F\u6210pda",children:[]},{level:3,title:"\u4E0EPDA\u4EA4\u4E92",slug:"\u4E0Epda\u4EA4\u4E92",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/zh/core-concepts/pdas.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7A0B\u5E8F",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5E93\uFF08SPL\uFF09",slug:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5E93-spl",children:[]},{level:3,title:"\u7F16\u5199\u7A0B\u5E8F",slug:"\u7F16\u5199\u7A0B\u5E8F",children:[]},{level:3,title:"\u90E8\u7F72\u7A0B\u5E8F",slug:"\u90E8\u7F72\u7A0B\u5E8F",children:[]}]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[]}],path:"/zh/core-concepts/programs.html",pathLocale:"/zh/",extraFields:[]},{title:"\u4EA4\u6613",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8D39\u7528",slug:"\u8D39\u7528",children:[]}]},{level:2,title:"Other Resources",slug:"other-resources",children:[]}],path:"/zh/core-concepts/transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u5B89\u88C5",headers:[{level:2,title:"\u5B89\u88C5Web3.js",slug:"\u5B89\u88C5web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E01\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E01-spl-token",children:[]},{level:3,title:"\u94B1\u5305\u9002\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u94B1\u5305\u9002\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88C5Rust",slug:"\u5B89\u88C5rust",children:[]},{level:2,title:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u4ECE\u6E90\u7801\u7F16\u8BD1",slug:"\u4ECE\u6E90\u7801\u7F16\u8BD1",children:[]}]}],path:"/zh/getting-started/installation.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8D26\u6237\u6620\u5C04",headers:[{level:2,title:"\u6D3E\u751FPDA",slug:"\u6D3E\u751Fpda",children:[]},{level:2,title:"\u5355\u4E2A\u6620\u5C04\u8D26\u6237",slug:"\u5355\u4E2A\u6620\u5C04\u8D26\u6237",children:[]}],path:"/zh/guides/account-maps.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8FC1\u79FB\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237",headers:[{level:2,title:"\u4F60\u5982\u4F55\u8FC1\u79FB\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237\uFF1F",slug:"\u4F60\u5982\u4F55\u8FC1\u79FB\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237",children:[]},{level:2,title:"\u573A\u666F",slug:"\u573A\u666F",children:[]},{level:2,title:"\u5347\u7EA7\u8D26\u6237",slug:"\u5347\u7EA7\u8D26\u6237",children:[{level:3,title:"1. \u6DFB\u52A0\u8D26\u6237\u8F6C\u6362\u903B\u8F91",slug:"_1-\u6DFB\u52A0\u8D26\u6237\u8F6C\u6362\u903B\u8F91",children:[]}]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/data-migration.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8C03\u8BD5 Solana \u7A0B\u5E8F",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u8FD0\u884C\u65F6\u6D4B\u8BD5\u548C\u8C03\u8BD5",slug:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u8FD0\u884C\u65F6\u6D4B\u8BD5\u548C\u8C03\u8BD5",children:[]},{level:2,title:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",slug:"\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",children:[]},{level:2,title:"\u4ECE\u5BA2\u6237\u7AEF\u5E94\u7528\u7A0B\u5E8F\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",slug:"\u4ECE\u5BA2\u6237\u7AEF\u5E94\u7528\u7A0B\u5E8F\u8FDB\u884C\u672C\u5730\u9A8C\u8BC1\u8282\u70B9\u6D4B\u8BD5",children:[]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/debugging-solana-programs.html",pathLocale:"/zh/",extraFields:[]},{title:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u573A\u666F",slug:"\u573A\u666F",children:[]},{level:2,title:"\u529F\u80FD\u72B6\u6001",slug:"\u529F\u80FD\u72B6\u6001",children:[]},{level:2,title:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5",slug:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5-1",children:[]},{level:2,title:"\u7B80\u5355\u6F14\u793A",slug:"\u7B80\u5355\u6F14\u793A",children:[{level:3,title:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",slug:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",children:[]},{level:3,title:"\u9009\u62E9\u6027\u529F\u80FD\u5DF2\u505C\u7528",slug:"\u9009\u62E9\u6027\u529F\u80FD\u5DF2\u505C\u7528",children:[]}]},{level:2,title:"\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",slug:"\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",children:[]},{level:2,title:"\u4EE5\u7F16\u7A0B\u65B9\u5F0F\u8FDB\u884C\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",slug:"\u4EE5\u7F16\u7A0B\u65B9\u5F0F\u8FDB\u884C\u5168\u9762\u76F8\u7B49\u6027\u6D4B\u8BD5",children:[]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/feature-parity-testing.html",pathLocale:"/zh/",extraFields:[]},{title:"\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[]}],path:"/zh/guides/get-program-accounts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u5E8F\u5217\u6570\u636E",headers:[{level:2,title:"\u8BBE\u7F6EBorsh\u5E8F\u5217\u5316",slug:"\u8BBE\u7F6Eborsh\u5E8F\u5217\u5316",children:[]},{level:2,title:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6237\u7AEF\u4E0A\u7684\u6307\u4EE4\u6570\u636E",slug:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6237\u7AEF\u4E0A\u7684\u6307\u4EE4\u6570\u636E",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316",slug:"\u5E8F\u5217\u5316-\u53CD\u5E8F\u5217\u5316",children:[]},{level:3,title:"\u7528\u6CD5",slug:"\u7528\u6CD5",children:[]}]},{level:2,title:"\u5982\u4F55\u5728\u5BA2\u6237\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",slug:"\u5982\u4F55\u5728\u5BA2\u6237\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E",children:[]},{level:2,title:"Solana TS/JS \u5E38\u7528\u6620\u5C04",slug:"solana-ts-js-\u5E38\u7528\u6620\u5C04",children:[]},{level:2,title:"\u9AD8\u7EA7\u6784\u9020",slug:"\u9AD8\u7EA7\u6784\u9020",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"\u8D44\u6599",slug:"\u8D44\u6599",children:[]}],path:"/zh/guides/serialization.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)",headers:[{level:2,title:"\u7EFC\u8FF0",slug:"\u7EFC\u8FF0",children:[]},{level:2,title:"\u4F20\u7EDF\u4EA4\u6613\uFF08Legacy Transactions\uFF09",slug:"\u4F20\u7EDF\u4EA4\u6613-legacy-transactions",children:[]},{level:2,title:"\u4F20\u7EDF\u6D88\u606F",slug:"\u4F20\u7EDF\u6D88\u606F",children:[{level:3,title:"\u5934\u90E8",slug:"\u5934\u90E8",children:[]},{level:3,title:"\u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4",slug:"\u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4",children:[]},{level:3,title:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4",slug:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4",children:[]}]},{level:2,title:"\u4F20\u7EDF\u4EA4\u6613\u7684\u95EE\u9898",slug:"\u4F20\u7EDF\u4EA4\u6613\u7684\u95EE\u9898",children:[]},{level:2,title:"\u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)",slug:"\u5730\u5740\u67E5\u627E\u8868-address-lookeup-tables",children:[]},{level:2,title:"\u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0",slug:"\u7248\u672C\u5316\u4EA4\u6613-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7D27\u51D1\u6570\u7EC4",slug:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7D27\u51D1\u6570\u7EC4",children:[]},{level:3,title:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4",slug:"\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4-1",children:[]}]},{level:2,title:"RPC\u53D8\u66F4",slug:"rpc\u53D8\u66F4",children:[]},{level:2,title:"\u5176\u4ED6\u8D44\u6599",slug:"\u5176\u4ED6\u8D44\u6599",children:[]},{level:2,title:"\u53C2\u8003\u8D44\u6599",slug:"\u53C2\u8003\u8D44\u6599",children:[]}],path:"/zh/guides/versioned-transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8D26\u6237",headers:[{level:2,title:"\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237",slug:"\u5982\u4F55\u521B\u5EFA\u7CFB\u7EDF\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u8BA1\u7B97\u8D26\u6237\u8D39\u7528",slug:"\u5982\u4F55\u8BA1\u7B97\u8D26\u6237\u8D39\u7528",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u79CD\u5B50\u521B\u5EFA\u8D26\u6237",slug:"\u5982\u4F55\u4F7F\u7528\u79CD\u5B50\u521B\u5EFA\u8D26\u6237",children:[{level:3,title:"\u751F\u6210",slug:"\u751F\u6210",children:[]},{level:3,title:"\u521B\u5EFA",slug:"\u521B\u5EFA",children:[]},{level:3,title:"\u8F6C\u8D26",slug:"\u8F6C\u8D26",children:[]}]},{level:2,title:"\u5982\u4F55\u521B\u5EFAPDA",slug:"\u5982\u4F55\u521B\u5EFApda",children:[{level:3,title:"\u751F\u6210\u4E00\u4E2APDA",slug:"\u751F\u6210\u4E00\u4E2Apda",children:[]},{level:3,title:"\u521B\u5EFA\u4E00\u4E2APDA",slug:"\u521B\u5EFA\u4E00\u4E2Apda",children:[]}]},{level:2,title:"\u5982\u4F55\u4F7F\u7528PDA\u7B7E\u540D",slug:"\u5982\u4F55\u4F7F\u7528pda\u7B7E\u540D",children:[{level:3,title:"\u7A0B\u5E8F",slug:"\u7A0B\u5E8F-1",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF",slug:"\u5BA2\u6237\u7AEF-1",children:[]}]},{level:2,title:"\u5982\u4F55\u83B7\u53D6\u7A0B\u5E8F\u8D26\u6237",slug:"\u5982\u4F55\u83B7\u53D6\u7A0B\u5E8F\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u5173\u95ED\u8D26\u6237",slug:"\u5982\u4F55\u5173\u95ED\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u53D6\u8D26\u6237\u4F59\u989D",slug:"\u5982\u4F55\u83B7\u53D6\u8D26\u6237\u4F59\u989D",children:[]}],path:"/zh/references/accounts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u53D1\u9001\u4EA4\u6613",headers:[{level:2,title:"\u5982\u4F55\u53D1\u9001SOL",slug:"\u5982\u4F55\u53D1\u9001sol",children:[]},{level:2,title:"\u5982\u4F55\u53D1\u9001SPL-\u4EE3\u5E01",slug:"\u5982\u4F55\u53D1\u9001spl-\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u8BA1\u7B97\u4EA4\u6613\u6210\u672C",slug:"\u5982\u4F55\u8BA1\u7B97\u4EA4\u6613\u6210\u672C",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5907\u6CE8",slug:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5907\u6CE8",children:[]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8BA1\u7B97\u9884\u7B97\u3001\u8D39\u7528\u548C\u4F18\u5148\u7EA7",slug:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8BA1\u7B97\u9884\u7B97\u3001\u8D39\u7528\u548C\u4F18\u5148\u7EA7",children:[]}],path:"/zh/references/basic-transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",slug:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",children:[]},{level:2,title:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",slug:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",children:[{level:3,title:"\u53CD\u5E94",slug:"\u53CD\u5E94",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/zh/references/keypairs-and-wallets.html",pathLocale:"/zh/",extraFields:[]},{title:"\u672C\u5730\u5F00\u53D1",headers:[{level:2,title:"\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668",slug:"\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668",children:[]},{level:2,title:"\u8FDE\u63A5\u5230\u4E0D\u540C\u73AF\u5883",slug:"\u8FDE\u63A5\u5230\u4E0D\u540C\u73AF\u5883",children:[]},{level:2,title:"\u8BA2\u9605\u4E8B\u4EF6",slug:"\u8BA2\u9605\u4E8B\u4EF6",children:[]},{level:2,title:"\u83B7\u53D6\u6D4B\u8BD5\u7528\u7684SOL",slug:"\u83B7\u53D6\u6D4B\u8BD5\u7528\u7684sol",children:[]},{level:2,title:"\u4F7F\u7528\u4E3B\u7F51 \uFF08Mainnet) \u8D26\u6237\u548C\u7A0B\u5E8F",slug:"\u4F7F\u7528\u4E3B\u7F51-mainnet-\u8D26\u6237\u548C\u7A0B\u5E8F",children:[{level:3,title:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u8D26\u6237",slug:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u8D26\u6237",children:[]},{level:3,title:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u7A0B\u5E8F",slug:"\u5982\u4F55\u4ECE\u4E3B\u7F51\u52A0\u8F7D\u7A0B\u5E8F",children:[]}]}],path:"/zh/references/local-development.html",pathLocale:"/zh/",extraFields:[]},{title:"\u547D\u540D\u670D\u52A1",headers:[{level:2,title:"\u540D\u79F0\u6CE8\u518C\u8868",slug:"\u540D\u79F0\u6CE8\u518C\u8868",children:[]},{level:2,title:"\u89E3\u6790SOL\u57DF\u540D",slug:"\u89E3\u6790sol\u57DF\u540D",children:[]},{level:2,title:"\u53CD\u5411\u67E5\u627E",slug:"\u53CD\u5411\u67E5\u627E",children:[]},{level:2,title:"\u5B50\u57DF\u540D\u67E5\u627E",slug:"\u5B50\u57DF\u540D\u67E5\u627E",children:[]},{level:2,title:"\u67E5\u627E\u7531\u516C\u94A5\u62E5\u6709\u7684\u6240\u6709\u57DF\u540D",slug:"\u67E5\u627E\u7531\u516C\u94A5\u62E5\u6709\u7684\u6240\u6709\u57DF\u540D",children:[]},{level:2,title:"\u89E3\u6790\u4E00\u4E2ATwitter\u7528\u6237\u540D",slug:"\u89E3\u6790\u4E00\u4E2Atwitter\u7528\u6237\u540D",children:[]},{level:2,title:"Twitter\u7528\u6237\u540D\u7684\u53CD\u5411\u67E5\u627E",slug:"twitter\u7528\u6237\u540D\u7684\u53CD\u5411\u67E5\u627E",children:[]}],path:"/zh/references/name-service.html",pathLocale:"/zh/",extraFields:[]},{title:"\u975E\u540C\u8D28\u5316\u4EE3\u5E01 (NFTs)",headers:[{level:2,title:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2ANFT",slug:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2Anft",children:[{level:3,title:"\u4E0A\u4F20\u5230 Arweave",slug:"\u4E0A\u4F20\u5230-arweave",children:[]},{level:3,title:"\u94F8\u9020\uFF08Mint\uFF09\u8BE5 NFT",slug:"\u94F8\u9020-mint-\u8BE5-nft",children:[]}]},{level:2,title:"\u5982\u4F55\u83B7\u53D6 NFT \u5143\u6570\u636E",slug:"\u5982\u4F55\u83B7\u53D6-nft-\u5143\u6570\u636E",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u53D6NFT\u7684\u6240\u6709\u8005",slug:"\u5982\u4F55\u83B7\u53D6nft\u7684\u6240\u6709\u8005",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u53D6 NFT \u7684\u94F8\u5E01\u5730\u5740",slug:"\u5982\u4F55\u83B7\u53D6-nft-\u7684\u94F8\u5E01\u5730\u5740",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u5982\u4F55\u4ECE\u94B1\u5305\u83B7\u53D6\u6240\u6709 NFT\uFF1F",slug:"\u5982\u4F55\u4ECE\u94B1\u5305\u83B7\u53D6\u6240\u6709-nft",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"\u5982\u4F55\u521B\u5EFACandy Machine",slug:"\u5982\u4F55\u521B\u5EFAcandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u5220\u9664Candy Machine",slug:"\u5982\u4F55\u5220\u9664candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u8FC7\u6743\u9650\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u8FC7\u6743\u9650\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u8FC7\u94B1\u5305\u5730\u5740\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u8FC7\u94B1\u5305\u5730\u5740\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u8FC7Candy Machine\u7684\u5730\u5740\u67E5\u627E\u5B83",slug:"\u5982\u4F55\u901A\u8FC7candy-machine\u7684\u5730\u5740\u67E5\u627E\u5B83",children:[]},{level:3,title:"\u5982\u4F55\u4ECECandy Machine\u627E\u5230\u94F8\u9020(mint)\u7684 NFT",slug:"\u5982\u4F55\u4ECEcandy-machine\u627E\u5230\u94F8\u9020-mint-\u7684-nft",children:[]},{level:3,title:"\u5982\u4F55\u5C06\u7269\u54C1\u63D2\u5165\u5230Candy Machine",slug:"\u5982\u4F55\u5C06\u7269\u54C1\u63D2\u5165\u5230candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u4ECECandy Machine\u94F8\u9020(Mint)\u4E00\u4E2A NFT",slug:"\u5982\u4F55\u4ECEcandy-machine\u94F8\u9020-mint-\u4E00\u4E2A-nft",children:[]}]}],path:"/zh/references/nfts.html",pathLocale:"/zh/",extraFields:[]},{title:"\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613",headers:[{level:2,title:"\u7B7E\u7F72\u4EA4\u6613",slug:"\u7B7E\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u90E8\u5206\u7B7E\u7F72\u4EA4\u6613",slug:"\u90E8\u5206\u7B7E\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u8010\u4E45\u6027\u7684 Nonce",slug:"\u8010\u4E45\u6027\u7684-nonce",children:[{level:3,title:"\u521B\u5EFANonce\u8D26\u6237",slug:"\u521B\u5EFAnonce\u8D26\u6237",children:[]},{level:3,title:"\u83B7\u53D6Nonce\u8D26\u6237",slug:"\u83B7\u53D6nonce\u8D26\u6237",children:[]},{level:3,title:"\u4F7F\u7528Nonce\u8D26\u6237",slug:"\u4F7F\u7528nonce\u8D26\u6237",children:[]}]}],path:"/zh/references/offline-transactions.html",pathLocale:"/zh/",extraFields:[]},{title:"\u7F16\u5199\u7A0B\u5E8F",headers:[{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB SOL",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB-sol",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u83B7\u53D6\u65F6\u949F",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u83B7\u53D6\u65F6\u949F",children:[{level:3,title:"\u5728\u6307\u4EE4\u4E2D\u5C06\u65F6\u949F\u4F5C\u4E3A\u4E00\u4E2A\u8D26\u6237\u4F20\u9012",slug:"\u5728\u6307\u4EE4\u4E2D\u5C06\u65F6\u949F\u4F5C\u4E3A\u4E00\u4E2A\u8D26\u6237\u4F20\u9012",children:[]},{level:3,title:"\u5728\u6307\u4EE4\u5185\u90E8\u76F4\u63A5\u8BBF\u95EE\u65F6\u949F",slug:"\u5728\u6307\u4EE4\u5185\u90E8\u76F4\u63A5\u8BBF\u95EE\u65F6\u949F",children:[]}]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u8D26\u6237\u5927\u5C0F",slug:"\u5982\u4F55\u66F4\u6539\u8D26\u6237\u5927\u5C0F",children:[]},{level:2,title:"\u8DE8\u7A0B\u5E8F\u8C03\u7528\u7684\u65B9\u6CD5",slug:"\u8DE8\u7A0B\u5E8F\u8C03\u7528\u7684\u65B9\u6CD5",children:[]},{level:2,title:"\u5982\u4F55\u521B\u5EFAPDA",slug:"\u5982\u4F55\u521B\u5EFApda",children:[]},{level:2,title:"\u5982\u4F55\u8BFB\u53D6\u8D26\u6237",slug:"\u5982\u4F55\u8BFB\u53D6\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u9A8C\u8BC1\u8D26\u6237",slug:"\u5982\u4F55\u9A8C\u8BC1\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u4ECE\u4E00\u4E2A\u4EA4\u6613\u4E2D\u8BFB\u53D6\u591A\u4E2A\u6307\u4EE4",slug:"\u5982\u4F55\u4ECE\u4E00\u4E2A\u4EA4\u6613\u4E2D\u8BFB\u53D6\u591A\u4E2A\u6307\u4EE4",children:[]}],path:"/zh/references/programs.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8D28\u62BC",headers:[{level:2,title:"\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668",slug:"\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668",children:[]},{level:2,title:"\u521B\u5EFA\u8D28\u62BC\u8D26\u6237",slug:"\u521B\u5EFA\u8D28\u62BC\u8D26\u6237",children:[]},{level:2,title:"\u59D4\u6258\u8D28\u62BC",slug:"\u59D4\u6258\u8D28\u62BC",children:[]},{level:2,title:"\u901A\u8FC7\u9A8C\u8BC1\u5668\u83B7\u53D6\u59D4\u6258\u4EBA",slug:"\u901A\u8FC7\u9A8C\u8BC1\u5668\u83B7\u53D6\u59D4\u6258\u4EBA",children:[]},{level:2,title:"\u505C\u7528\u8D28\u62BC",slug:"\u505C\u7528\u8D28\u62BC",children:[]},{level:2,title:"\u63D0\u53D6\u8D28\u62BC",slug:"\u63D0\u53D6\u8D28\u62BC",children:[]},{level:2,title:"\u83B7\u53D6\u8D28\u62BC\u91D1\u989D",slug:"\u83B7\u53D6\u8D28\u62BC\u91D1\u989D",children:[]}],path:"/zh/references/staking.html",pathLocale:"/zh/",extraFields:[]},{title:"\u4E0E\u4EE3\u5E01\u4E92\u52A8",headers:[{level:2,title:"\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528SPL\u4EE3\u5E01\uFF1F",slug:"\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528spl\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01",slug:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u94F8\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u94F8\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237\u7684\u4F59\u989D",slug:"\u5982\u4F55\u83B7\u5F97\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237\u7684\u4F59\u989D",children:[]},{level:2,title:"\u5982\u4F55\u94F8\u9020(mint)\u4EE3\u5E01",slug:"\u5982\u4F55\u94F8\u9020-mint-\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u8F6C\u79FB\u4EE3\u5E01",slug:"\u5982\u4F55\u8F6C\u79FB\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u9500\u4EE3\u5E01",slug:"\u5982\u4F55\u9500\u4EE3\u5E01",children:[]},{level:2,title:"\u5982\u4F55\u5173\u95ED\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u5173\u95ED\u4EE3\u5E01\u8D26\u6237",children:[]},{level:2,title:"\u5982\u4F55\u5728\u4EE3\u5E01\u8D26\u6237\u6216\u94F8\u5E01\u8D26\u6237\u4E0A\u8BBE\u7F6E\u6743\u9650",slug:"\u5982\u4F55\u5728\u4EE3\u5E01\u8D26\u6237\u6216\u94F8\u5E01\u8D26\u6237\u4E0A\u8BBE\u7F6E\u6743\u9650",children:[]},{level:2,title:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E01\u59D4\u6258",slug:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E01\u59D4\u6258",children:[]},{level:2,title:"\u5982\u4F55\u64A4\u9500\u4EE3\u5E01\u59D4\u6258",slug:"\u5982\u4F55\u64A4\u9500\u4EE3\u5E01\u59D4\u6258",children:[]},{level:2,title:"\u5982\u4F55\u7BA1\u7406\u5305\u88C5\u7684SOL",slug:"\u5982\u4F55\u7BA1\u7406\u5305\u88C5\u7684sol",children:[{level:3,title:"\u521B\u5EFA\u4EE3\u5E01\u8D26\u6237",slug:"\u521B\u5EFA\u4EE3\u5E01\u8D26\u6237",children:[]},{level:3,title:"\u589E\u52A0\u4F59\u989D",slug:"\u589E\u52A0\u4F59\u989D",children:[]}]},{level:2,title:"\u5982\u4F55\u901A\u8FC7\u6240\u6709\u8005\u83B7\u53D6\u6240\u6709\u4EE3\u5E01\u8D26\u6237",slug:"\u5982\u4F55\u901A\u8FC7\u6240\u6709\u8005\u83B7\u53D6\u6240\u6709\u4EE3\u5E01\u8D26\u6237",children:[]}],path:"/zh/references/token.html",pathLocale:"/zh/",extraFields:[]},{title:"\u8CEC\u6236",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8CEC\u6236\u6A21\u578B",slug:"\u8CEC\u6236\u6A21\u578B",children:[]},{level:3,title:"\u79DF\u91D1",slug:"\u79DF\u91D1",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[{level:3,title:"\u81F4\u8B1D",slug:"\u81F4\u8B1D",children:[]}]}],path:"/zh_t/core-concepts/accounts.html",pathLocale:"/",extraFields:[]},{title:"\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236 (PDA)",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[{level:3,title:"\u751F\u6210PDA",slug:"\u751F\u6210pda",children:[]},{level:3,title:"\u8207PDA\u4EA4\u4E92",slug:"\u8207pda\u4EA4\u4E92",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/core-concepts/pdas.html",pathLocale:"/",extraFields:[]},{title:"\u7A0B\u5E8F",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5EAB\uFF08SPL\uFF09",slug:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5EAB-spl",children:[]},{level:3,title:"\u7DE8\u5BEB\u7A0B\u5E8F",slug:"\u7DE8\u5BEB\u7A0B\u5E8F",children:[]},{level:3,title:"\u90E8\u7F72\u7A0B\u5E8F",slug:"\u90E8\u7F72\u7A0B\u5E8F",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/core-concepts/programs.html",pathLocale:"/",extraFields:[]},{title:"\u4EA4\u6613",headers:[{level:2,title:"\u6982\u8FF0",slug:"\u6982\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"\u8CBB\u7528",slug:"\u8CBB\u7528",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/core-concepts/transactions.html",pathLocale:"/",extraFields:[]},{title:"\u5B89\u88DD",headers:[{level:2,title:"\u5B89\u88DDWeb3.js",slug:"\u5B89\u88DDweb3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E63\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E63-spl-token",children:[]},{level:3,title:"\u9322\u5305\u9069\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u9322\u5305\u9069\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88DDRust",slug:"\u5B89\u88DDrust",children:[]},{level:2,title:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",slug:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",children:[]}]}],path:"/zh_t/getting-started/installation.html",pathLocale:"/",extraFields:[]},{title:"\u8CEC\u6236\u6620\u5C04",headers:[{level:2,title:"\u6D3E\u751FPDA",slug:"\u6D3E\u751Fpda",children:[]},{level:2,title:"\u55AE\u500B\u6620\u5C04\u8CEC\u6236",slug:"\u55AE\u500B\u6620\u5C04\u8CEC\u6236",children:[]}],path:"/zh_t/guides/account-maps.html",pathLocale:"/",extraFields:[]},{title:"\u9077\u79FB\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236",headers:[{level:2,title:"\u4F60\u5982\u4F55\u9077\u79FB\u4E00\u500B\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236\uFF1F",slug:"\u4F60\u5982\u4F55\u9077\u79FB\u4E00\u500B\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236",children:[]},{level:2,title:"\u5834\u666F",slug:"\u5834\u666F",children:[]},{level:2,title:"\u5347\u7D1A\u8CEC\u6236",slug:"\u5347\u7D1A\u8CEC\u6236",children:[{level:3,title:"1. \u6DFB\u52A0\u8CEC\u6236\u8F49\u63DB\u908F\u8F2F",slug:"_1-\u6DFB\u52A0\u8CEC\u6236\u8F49\u63DB\u908F\u8F2F",children:[]}]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/data-migration.html",pathLocale:"/",extraFields:[]},{title:"\u8ABF\u8A66 Solana \u7A0B\u5E8F",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u904B\u884C\u6642\u6E2C\u8A66\u548C\u8ABF\u8A66",slug:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u904B\u884C\u6642\u6E2C\u8A66\u548C\u8ABF\u8A66",children:[]},{level:2,title:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",slug:"\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",children:[]},{level:2,title:"\u5F9E\u5BA2\u6236\u7AEF\u61C9\u7528\u7A0B\u5E8F\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",slug:"\u5F9E\u5BA2\u6236\u7AEF\u61C9\u7528\u7A0B\u5E8F\u9032\u884C\u672C\u5730\u9A57\u8B49\u7BC0\u9EDE\u6E2C\u8A66",children:[]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/debugging-solana-programs.html",pathLocale:"/",extraFields:[]},{title:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u5834\u666F",slug:"\u5834\u666F",children:[]},{level:2,title:"\u529F\u80FD\u72C0\u614B",slug:"\u529F\u80FD\u72C0\u614B",children:[]},{level:2,title:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66",slug:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66-1",children:[]},{level:2,title:"\u7C21\u55AE\u6F14\u793A",slug:"\u7C21\u55AE\u6F14\u793A",children:[{level:3,title:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",slug:"\u6240\u6709\u529F\u80FD\u5DF2\u6FC0\u6D3B",children:[]},{level:3,title:"\u9078\u64C7\u6027\u529F\u80FD\u5DF2\u505C\u7528",slug:"\u9078\u64C7\u6027\u529F\u80FD\u5DF2\u505C\u7528",children:[]}]},{level:2,title:"\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",slug:"\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",children:[]},{level:2,title:"\u4EE5\u7DE8\u7A0B\u65B9\u5F0F\u9032\u884C\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",slug:"\u4EE5\u7DE8\u7A0B\u65B9\u5F0F\u9032\u884C\u5168\u9762\u76F8\u7B49\u6027\u6E2C\u8A66",children:[]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/feature-parity-testing.html",pathLocale:"/",extraFields:[]},{title:"\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u6DF1\u5165",slug:"\u6DF1\u5165",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]}],path:"/zh_t/guides/get-program-accounts.html",pathLocale:"/",extraFields:[]},{title:"\u5E8F\u5217\u6578\u64DA",headers:[{level:2,title:"\u8A2D\u7F6EBorsh\u5E8F\u5217\u5316",slug:"\u8A2D\u7F6Eborsh\u5E8F\u5217\u5316",children:[]},{level:2,title:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6236\u7AEF\u4E0A\u7684\u6307\u4EE4\u6578\u64DA",slug:"\u5982\u4F55\u5E8F\u5217\u5316\u5BA2\u6236\u7AEF\u4E0A\u7684\u6307\u4EE4\u6578\u64DA",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",children:[{level:3,title:"Pack",slug:"pack",children:[]},{level:3,title:"\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316",slug:"\u5E8F\u5217\u5316-\u53CD\u5E8F\u5217\u5316",children:[]},{level:3,title:"\u7528\u6CD5",slug:"\u7528\u6CD5",children:[]}]},{level:2,title:"\u5982\u4F55\u5728\u5BA2\u6236\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",slug:"\u5982\u4F55\u5728\u5BA2\u6236\u7AEF\u4E2D\u53CD\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA",children:[]},{level:2,title:"Solana TS/JS \u5E38\u7528\u6620\u5C04",slug:"solana-ts-js-\u5E38\u7528\u6620\u5C04",children:[]},{level:2,title:"\u9AD8\u7D1A\u69CB\u9020",slug:"\u9AD8\u7D1A\u69CB\u9020",children:[{level:3,title:"COption",slug:"coption",children:[]}]},{level:2,title:"\u8CC7\u6599",slug:"\u8CC7\u6599",children:[]}],path:"/zh_t/guides/serialization.html",pathLocale:"/",extraFields:[]},{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)",headers:[{level:2,title:"\u7D9C\u8FF0",slug:"\u7D9C\u8FF0",children:[]},{level:2,title:"\u50B3\u7D71\u4EA4\u6613\uFF08Legacy Transactions\uFF09",slug:"\u50B3\u7D71\u4EA4\u6613-legacy-transactions",children:[]},{level:2,title:"\u50B3\u7D71\u6D88\u606F",slug:"\u50B3\u7D71\u6D88\u606F",children:[{level:3,title:"\u982D\u90E8",slug:"\u982D\u90E8",children:[]},{level:3,title:"\u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44",slug:"\u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44",children:[]},{level:3,title:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44",slug:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44",children:[]}]},{level:2,title:"\u50B3\u7D71\u4EA4\u6613\u7684\u554F\u984C",slug:"\u50B3\u7D71\u4EA4\u6613\u7684\u554F\u984C",children:[]},{level:2,title:"\u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)",slug:"\u5730\u5740\u67E5\u627E\u8868-address-lookeup-tables",children:[]},{level:2,title:"\u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0",slug:"\u7248\u672C\u5316\u4EA4\u6613-transactionv0",children:[]},{level:2,title:"MessageV0",slug:"messagev0",children:[{level:3,title:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7DCA\u6E4A\u6578\u7D44",slug:"\u5730\u5740\u8868\u67E5\u627E\u7684\u7DCA\u6E4A\u6578\u7D44",children:[]},{level:3,title:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44",slug:"\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44-1",children:[]}]},{level:2,title:"RPC\u8B8A\u66F4",slug:"rpc\u8B8A\u66F4",children:[]},{level:2,title:"\u5176\u4ED6\u8CC7\u6599",slug:"\u5176\u4ED6\u8CC7\u6599",children:[]},{level:2,title:"\u53C3\u8003\u8CC7\u6599",slug:"\u53C3\u8003\u8CC7\u6599",children:[]}],path:"/zh_t/guides/versioned-transactions.html",pathLocale:"/",extraFields:[]},{title:"\u8CEC\u6236",headers:[{level:2,title:"\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236",slug:"\u5982\u4F55\u5275\u5EFA\u7CFB\u7D71\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u8A08\u7B97\u8CEC\u6236\u8CBB\u7528",slug:"\u5982\u4F55\u8A08\u7B97\u8CEC\u6236\u8CBB\u7528",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u7A2E\u5B50\u5275\u5EFA\u8CEC\u6236",slug:"\u5982\u4F55\u4F7F\u7528\u7A2E\u5B50\u5275\u5EFA\u8CEC\u6236",children:[{level:3,title:"\u751F\u6210",slug:"\u751F\u6210",children:[]},{level:3,title:"\u5275\u5EFA",slug:"\u5275\u5EFA",children:[]},{level:3,title:"\u8F49\u8CEC",slug:"\u8F49\u8CEC",children:[]}]},{level:2,title:"\u5982\u4F55\u5275\u5EFAPDA",slug:"\u5982\u4F55\u5275\u5EFApda",children:[{level:3,title:"\u751F\u6210\u4E00\u500BPDA",slug:"\u751F\u6210\u4E00\u500Bpda",children:[]},{level:3,title:"\u5275\u5EFA\u4E00\u500BPDA",slug:"\u5275\u5EFA\u4E00\u500Bpda",children:[]}]},{level:2,title:"\u5982\u4F55\u4F7F\u7528PDA\u7C3D\u540D",slug:"\u5982\u4F55\u4F7F\u7528pda\u7C3D\u540D",children:[{level:3,title:"\u7A0B\u5E8F",slug:"\u7A0B\u5E8F-1",children:[]},{level:3,title:"\u5BA2\u6237\u7AEF",slug:"\u5BA2\u6237\u7AEF",children:[]}]},{level:2,title:"\u5982\u4F55\u7372\u53D6\u7A0B\u5E8F\u8CEC\u6236",slug:"\u5982\u4F55\u7372\u53D6\u7A0B\u5E8F\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u95DC\u9589\u8CEC\u6236",slug:"\u5982\u4F55\u95DC\u9589\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u7372\u53D6\u8CEC\u6236\u9918\u984D",slug:"\u5982\u4F55\u7372\u53D6\u8CEC\u6236\u9918\u984D",children:[]}],path:"/zh_t/references/accounts.html",pathLocale:"/",extraFields:[]},{title:"\u767C\u9001\u4EA4\u6613",headers:[{level:2,title:"\u5982\u4F55\u767C\u9001SOL",slug:"\u5982\u4F55\u767C\u9001sol",children:[]},{level:2,title:"\u5982\u4F55\u767C\u9001SPL-\u4EE3\u5E63",slug:"\u5982\u4F55\u767C\u9001spl-\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u8A08\u7B97\u4EA4\u6613\u6210\u672C",slug:"\u5982\u4F55\u8A08\u7B97\u4EA4\u6613\u6210\u672C",children:[{level:3,title:"getEstimatedFee",slug:"getestimatedfee",children:[]},{level:3,title:"getFeeForMessage",slug:"getfeeformessage",children:[]}]},{level:2,title:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5099\u8A3B",slug:"\u5982\u4F55\u5411\u4EA4\u6613\u6DFB\u52A0\u5099\u8A3B",children:[]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8A08\u7B97\u9810\u7B97\u3001\u8CBB\u7528\u548C\u512A\u5148\u7D1A",slug:"\u5982\u4F55\u66F4\u6539\u4EA4\u6613\u7684\u8A08\u7B97\u9810\u7B97\u3001\u8CBB\u7528\u548C\u512A\u5148\u7D1A",children:[]}],path:"/zh_t/references/basic-transactions.html",pathLocale:"/",extraFields:[]},{title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",slug:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",children:[]},{level:2,title:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",slug:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",children:[{level:3,title:"\u53CD\u61C9",slug:"\u53CD\u61C9",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],path:"/zh_t/references/keypairs-and-wallets.html",pathLocale:"/",extraFields:[]},{title:"\u672C\u5730\u958B\u767C",headers:[{level:2,title:"\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668",slug:"\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668",children:[]},{level:2,title:"\u9023\u63A5\u5230\u4E0D\u540C\u74B0\u5883",slug:"\u9023\u63A5\u5230\u4E0D\u540C\u74B0\u5883",children:[]},{level:2,title:"\u8A02\u95B1\u4E8B\u4EF6",slug:"\u8A02\u95B1\u4E8B\u4EF6",children:[]},{level:2,title:"\u7372\u53D6\u6E2C\u8A66\u7528\u7684SOL",slug:"\u7372\u53D6\u6E2C\u8A66\u7528\u7684sol",children:[]},{level:2,title:"\u4F7F\u7528\u4E3B\u7DB2 \uFF08Mainnet) \u8CEC\u6236\u548C\u7A0B\u5E8F",slug:"\u4F7F\u7528\u4E3B\u7DB2-mainnet-\u8CEC\u6236\u548C\u7A0B\u5E8F",children:[{level:3,title:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u8CEC\u6236",slug:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u8CEC\u6236",children:[]},{level:3,title:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u7A0B\u5E8F",slug:"\u5982\u4F55\u5F9E\u4E3B\u7DB2\u52A0\u8F09\u7A0B\u5E8F",children:[]}]}],path:"/zh_t/references/local-development.html",pathLocale:"/",extraFields:[]},{title:"\u547D\u540D\u670D\u52D9",headers:[{level:2,title:"\u540D\u7A31\u8A3B\u518A\u8868",slug:"\u540D\u7A31\u8A3B\u518A\u8868",children:[]},{level:2,title:"\u89E3\u6790SOL\u57DF\u540D",slug:"\u89E3\u6790sol\u57DF\u540D",children:[]},{level:2,title:"\u53CD\u5411\u67E5\u627E",slug:"\u53CD\u5411\u67E5\u627E",children:[]},{level:2,title:"\u5B50\u57DF\u540D\u67E5\u627E",slug:"\u5B50\u57DF\u540D\u67E5\u627E",children:[]},{level:2,title:"\u67E5\u627E\u7531\u516C\u9470\u64C1\u6709\u7684\u6240\u6709\u57DF\u540D",slug:"\u67E5\u627E\u7531\u516C\u9470\u64C1\u6709\u7684\u6240\u6709\u57DF\u540D",children:[]},{level:2,title:"\u89E3\u6790\u4E00\u500BTwitter\u7528\u6236\u540D",slug:"\u89E3\u6790\u4E00\u500Btwitter\u7528\u6236\u540D",children:[]},{level:2,title:"Twitter\u7528\u6236\u540D\u7684\u53CD\u5411\u67E5\u627E",slug:"twitter\u7528\u6236\u540D\u7684\u53CD\u5411\u67E5\u627E",children:[]}],path:"/zh_t/references/name-service.html",pathLocale:"/",extraFields:[]},{title:"\u975E\u540C\u8CEA\u5316\u4EE3\u5E63 (NFTs)",headers:[{level:2,title:"\u5982\u4F55\u5275\u5EFA\u4E00\u500BNFT",slug:"\u5982\u4F55\u5275\u5EFA\u4E00\u500Bnft",children:[{level:3,title:"\u4E0A\u50B3\u5230 Arweave",slug:"\u4E0A\u50B3\u5230-arweave",children:[]},{level:3,title:"\u9444\u9020\uFF08Mint\uFF09\u8A72 NFT",slug:"\u9444\u9020-mint-\u8A72-nft",children:[]}]},{level:2,title:"\u5982\u4F55\u7372\u53D6 NFT \u5143\u6578\u64DA",slug:"\u5982\u4F55\u7372\u53D6-nft-\u5143\u6578\u64DA",children:[]},{level:2,title:"\u5982\u4F55\u7372\u53D6NFT\u7684\u6240\u6709\u8005",slug:"\u5982\u4F55\u7372\u53D6nft\u7684\u6240\u6709\u8005",children:[]},{level:2,title:"\u5982\u4F55\u7372\u53D6 NFT \u7684\u9444\u5E63\u5730\u5740",slug:"\u5982\u4F55\u7372\u53D6-nft-\u7684\u9444\u5E63\u5730\u5740",children:[{level:3,title:"Candy Machine V1",slug:"candy-machine-v1",children:[]},{level:3,title:"Candy Machine V2",slug:"candy-machine-v2",children:[]}]},{level:2,title:"\u5982\u4F55\u5F9E\u9322\u5305\u7372\u53D6\u6240\u6709 NFT\uFF1F",slug:"\u5982\u4F55\u5F9E\u9322\u5305\u7372\u53D6\u6240\u6709-nft",children:[]},{level:2,title:"Candy Machine v2",slug:"candy-machine-v2-1",children:[{level:3,title:"\u5982\u4F55\u5275\u5EFACandy Machine",slug:"\u5982\u4F55\u5275\u5EFAcandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u522A\u9664Candy Machine",slug:"\u5982\u4F55\u522A\u9664candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u904E\u6B0A\u9650\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u904E\u6B0A\u9650\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u904E\u9322\u5305\u5730\u5740\u67E5\u627ECandy Machine",slug:"\u5982\u4F55\u901A\u904E\u9322\u5305\u5730\u5740\u67E5\u627Ecandy-machine",children:[]},{level:3,title:"\u5982\u4F55\u901A\u904ECandy Machine\u7684\u5730\u5740\u67E5\u627E\u5B83",slug:"\u5982\u4F55\u901A\u904Ecandy-machine\u7684\u5730\u5740\u67E5\u627E\u5B83",children:[]},{level:3,title:"\u5982\u4F55\u5F9ECandy Machine\u627E\u5230\u9444\u9020(mint)\u7684 NFT",slug:"\u5982\u4F55\u5F9Ecandy-machine\u627E\u5230\u9444\u9020-mint-\u7684-nft",children:[]},{level:3,title:"\u5982\u4F55\u5C07\u7269\u54C1\u63D2\u5165\u5230Candy Machine",slug:"\u5982\u4F55\u5C07\u7269\u54C1\u63D2\u5165\u5230candy-machine",children:[]},{level:3,title:"\u5982\u4F55\u5F9ECandy Machine\u9444\u9020(Mint)\u4E00\u500B NFT",slug:"\u5982\u4F55\u5F9Ecandy-machine\u9444\u9020-mint-\u4E00\u500B-nft",children:[]}]}],path:"/zh_t/references/nfts.html",pathLocale:"/",extraFields:[]},{title:"\u767C\u9001\u96E2\u7DDA\u4EA4\u6613",headers:[{level:2,title:"\u7C3D\u7F72\u4EA4\u6613",slug:"\u7C3D\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u90E8\u5206\u7C3D\u7F72\u4EA4\u6613",slug:"\u90E8\u5206\u7C3D\u7F72\u4EA4\u6613",children:[]},{level:2,title:"\u8010\u4E45\u6027\u7684 Nonce",slug:"\u8010\u4E45\u6027\u7684-nonce",children:[{level:3,title:"\u5275\u5EFANonce\u8CEC\u6236",slug:"\u5275\u5EFAnonce\u8CEC\u6236",children:[]},{level:3,title:"\u7372\u53D6Nonce\u8CEC\u6236",slug:"\u7372\u53D6nonce\u8CEC\u6236",children:[]},{level:3,title:"\u4F7F\u7528Nonce\u8CEC\u6236",slug:"\u4F7F\u7528nonce\u8CEC\u6236",children:[]}]}],path:"/zh_t/references/offline-transactions.html",pathLocale:"/",extraFields:[]},{title:"\u7DE8\u5BEB\u7A0B\u5E8F",headers:[{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB SOL",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB-sol",children:[]},{level:2,title:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u7372\u53D6\u6642\u9418",slug:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u7372\u53D6\u6642\u9418",children:[{level:3,title:"\u5728\u6307\u4EE4\u4E2D\u5C07\u6642\u9418\u4F5C\u7232\u4E00\u500B\u8CEC\u6236\u50B3\u905E",slug:"\u5728\u6307\u4EE4\u4E2D\u5C07\u6642\u9418\u4F5C\u7232\u4E00\u500B\u8CEC\u6236\u50B3\u905E",children:[]},{level:3,title:"\u5728\u6307\u4EE4\u5167\u90E8\u76F4\u63A5\u8A2A\u554F\u6642\u9418",slug:"\u5728\u6307\u4EE4\u5167\u90E8\u76F4\u63A5\u8A2A\u554F\u6642\u9418",children:[]}]},{level:2,title:"\u5982\u4F55\u66F4\u6539\u8CEC\u6236\u5927\u5C0F",slug:"\u5982\u4F55\u66F4\u6539\u8CEC\u6236\u5927\u5C0F",children:[]},{level:2,title:"\u8DE8\u7A0B\u5E8F\u8ABF\u7528\u7684\u65B9\u6CD5",slug:"\u8DE8\u7A0B\u5E8F\u8ABF\u7528\u7684\u65B9\u6CD5",children:[]},{level:2,title:"\u5982\u4F55\u5275\u5EFAPDA",slug:"\u5982\u4F55\u5275\u5EFApda",children:[]},{level:2,title:"\u5982\u4F55\u8B80\u53D6\u8CEC\u6236",slug:"\u5982\u4F55\u8B80\u53D6\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u9A57\u8B49\u8CEC\u6236",slug:"\u5982\u4F55\u9A57\u8B49\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u5F9E\u4E00\u500B\u4EA4\u6613\u4E2D\u8B80\u53D6\u591A\u500B\u6307\u4EE4",slug:"\u5982\u4F55\u5F9E\u4E00\u500B\u4EA4\u6613\u4E2D\u8B80\u53D6\u591A\u500B\u6307\u4EE4",children:[]}],path:"/zh_t/references/programs.html",pathLocale:"/",extraFields:[]},{title:"\u8CEA\u62BC",headers:[{level:2,title:"\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668",slug:"\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668",children:[]},{level:2,title:"\u5275\u5EFA\u8CEA\u62BC\u8CEC\u6236",slug:"\u5275\u5EFA\u8CEA\u62BC\u8CEC\u6236",children:[]},{level:2,title:"\u59D4\u8A17\u8CEA\u62BC",slug:"\u59D4\u8A17\u8CEA\u62BC",children:[]},{level:2,title:"\u901A\u904E\u9A57\u8B49\u5668\u7372\u53D6\u59D4\u8A17\u4EBA",slug:"\u901A\u904E\u9A57\u8B49\u5668\u7372\u53D6\u59D4\u8A17\u4EBA",children:[]},{level:2,title:"\u505C\u7528\u8CEA\u62BC",slug:"\u505C\u7528\u8CEA\u62BC",children:[]},{level:2,title:"\u63D0\u53D6\u8CEA\u62BC",slug:"\u63D0\u53D6\u8CEA\u62BC",children:[]},{level:2,title:"\u7372\u53D6\u8CEA\u62BC\u91D1\u984D",slug:"\u7372\u53D6\u8CEA\u62BC\u91D1\u984D",children:[]}],path:"/zh_t/references/staking.html",pathLocale:"/",extraFields:[]},{title:"\u8207\u4EE3\u5E63\u4E92\u52D5",headers:[{level:2,title:"\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528SPL\u4EE3\u5E63\uFF1F",slug:"\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528spl\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63",slug:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u9444\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u9444\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236\u7684\u9918\u984D",slug:"\u5982\u4F55\u7372\u5F97\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236\u7684\u9918\u984D",children:[]},{level:2,title:"\u5982\u4F55\u9444\u9020(mint)\u4EE3\u5E63",slug:"\u5982\u4F55\u9444\u9020-mint-\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u8F49\u79FB\u4EE3\u5E63",slug:"\u5982\u4F55\u8F49\u79FB\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u92B7\u4EE3\u5E63",slug:"\u5982\u4F55\u92B7\u4EE3\u5E63",children:[]},{level:2,title:"\u5982\u4F55\u95DC\u9589\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u95DC\u9589\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:2,title:"\u5982\u4F55\u5728\u4EE3\u5E63\u8CEC\u6236\u6216\u9444\u5E63\u8CEC\u6236\u4E0A\u8A2D\u7F6E\u6B0A\u9650",slug:"\u5982\u4F55\u5728\u4EE3\u5E63\u8CEC\u6236\u6216\u9444\u5E63\u8CEC\u6236\u4E0A\u8A2D\u7F6E\u6B0A\u9650",children:[]},{level:2,title:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E63\u59D4\u8A17",slug:"\u5982\u4F55\u6279\u51C6\u4EE3\u5E63\u59D4\u8A17",children:[]},{level:2,title:"\u5982\u4F55\u64A4\u92B7\u4EE3\u5E63\u59D4\u8A17",slug:"\u5982\u4F55\u64A4\u92B7\u4EE3\u5E63\u59D4\u8A17",children:[]},{level:2,title:"\u5982\u4F55\u7BA1\u7406\u5305\u88DD\u7684SOL",slug:"\u5982\u4F55\u7BA1\u7406\u5305\u88DD\u7684sol",children:[{level:3,title:"\u5275\u5EFA\u4EE3\u5E63\u8CEC\u6236",slug:"\u5275\u5EFA\u4EE3\u5E63\u8CEC\u6236",children:[]},{level:3,title:"\u589E\u52A0\u9918\u984D",slug:"\u589E\u52A0\u9918\u984D",children:[]}]},{level:2,title:"\u5982\u4F55\u901A\u904E\u6240\u6709\u8005\u7372\u53D6\u6240\u6709\u4EE3\u5E63\u8CEC\u6236",slug:"\u5982\u4F55\u901A\u904E\u6240\u6709\u8005\u7372\u53D6\u6240\u6709\u4EE3\u5E63\u8CEC\u6236",children:[]}],path:"/zh_t/references/token.html",pathLocale:"/",extraFields:[]},{title:"",headers:[],path:"/404.html",pathLocale:"/",extraFields:[]}],zc=Ee(Cv),xv=()=>zc;sr.webpackHot&&(__VUE_HMR_RUNTIME__.updateSearchIndex=e=>{zc.value=e});const Vv=/[^\x00-\x7F]/,Fv=e=>e.split(/\s+/g).map(t=>t.trim()).filter(t=>!!t),Qa=e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),Ya=(e,t)=>{const l=t.join(" "),n=Fv(e);if(Vv.test(e))return n.some(o=>l.toLowerCase().indexOf(o)>-1);const r=e.endsWith(" ");return new RegExp(n.map((o,s)=>n.length===s+1&&!r?`(?=.*\\b${Qa(o)})`:`(?=.*\\b${Qa(o)}\\b)`).join("")+".+","gi").test(l)},jv=({searchIndex:e,routeLocale:t,query:l,maxSuggestions:n})=>{const r=_e(()=>e.value.filter(i=>i.pathLocale===t.value));return _e(()=>{const i=l.value.trim().toLowerCase();if(!i)return[];const o=[],s=(c,u)=>{Ya(i,[u.title])&&o.push({link:`${c.path}#${u.slug}`,title:c.title,header:u.title});for(const d of u.children){if(o.length>=n.value)return;s(c,d)}};for(const c of r.value){if(o.length>=n.value)break;if(Ya(i,[c.title,...c.extraFields])){o.push({link:c.path,title:c.title});continue}for(const u of c.headers){if(o.length>=n.value)break;s(c,u)}}return o})},zv=e=>{const t=Ee(0);return{focusIndex:t,focusNext:()=>{t.value{t.value>0?t.value-=1:t.value=e.value.length-1}}},Nv=Me({name:"SearchBox",props:{locales:{type:Object,required:!1,default:()=>({})},hotKeys:{type:Array,required:!1,default:()=>[]},maxSuggestions:{type:Number,required:!1,default:5}},setup(e){const{locales:t,hotKeys:l,maxSuggestions:n}=yd(e),r=ln(),i=ji(),o=xv(),s=Ee(null),c=Ee(!1),u=Ee(""),d=_e(()=>{var w;return(w=t.value[i.value])!==null&&w!==void 0?w:{}}),v=jv({searchIndex:o,routeLocale:i,query:u,maxSuggestions:n}),{focusIndex:g,focusNext:b,focusPrev:m}=zv(v);Rv({input:s,hotKeys:l});const _=_e(()=>c.value&&!!v.value.length),f=()=>{!_.value||m()},y=()=>{!_.value||b()},P=w=>{if(!_.value)return;const L=v.value[w];!L||r.push(L.link).then(()=>{u.value="",g.value=0})};return()=>ee("form",{class:"search-box",role:"search"},[ee("input",{ref:s,type:"search",placeholder:d.value.placeholder,autocomplete:"off",spellcheck:!1,value:u.value,onFocus:()=>c.value=!0,onBlur:()=>c.value=!1,onInput:w=>u.value=w.target.value,onKeydown:w=>{switch(w.key){case"ArrowUp":{f();break}case"ArrowDown":{y();break}case"Enter":{w.preventDefault(),P(g.value);break}}}}),_.value&&ee("ul",{class:"suggestions",onMouseleave:()=>g.value=-1},v.value.map(({link:w,title:L,header:S},j)=>ee("li",{class:["suggestion",{focus:g.value===j}],onMouseenter:()=>g.value=j,onMousedown:()=>P(j)},ee("a",{href:w,onClick:D=>D.preventDefault()},[ee("span",{class:"page-title"},L),S&&ee("span",{class:"page-header"},`> ${S}`)]))))])}});const Mv={"/":{placeholder:"Search"},"/zh/":{placeholder:"\u641C\u7D22"},"/vi/":{placeholder:"T\xECm ki\u1EBFm"},"/th/":{placeholder:"\u0E04\u0E49\u0E19\u0E2B\u0E32"},"/fr/":{placeholder:"Rechercher"},"/pt/":{placeholder:"Buscar"},"/id/":{placeholder:"Cari"},"/kr/":{placeholder:"\uAC80\uC0C9"},"/ja/":{placeholder:"\u691C\u7D22"},"/fil/":{placeholder:"Maghanap"}},Hv=["s","/"],Bv=10;var Kv=At(({app:e})=>{e.component("SearchBox",t=>ee(Nv,xe({locales:Mv,hotKeys:Hv,maxSuggestions:Bv},t)))}),Uv=({app:e})=>{e.component("SolanaCodeGroup",h(()=>a(()=>Promise.resolve().then(function(){return i_}),void 0))),e.component("SolanaCodeGroupItem",h(()=>a(()=>Promise.resolve().then(function(){return u_}),void 0)))};/*! @docsearch/js 3.0.0-alpha.42 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */function $l(e){return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(e)}function Wv(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}function Gr(){return Gr=Object.assign||function(e){for(var t=1;t=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}function Bn(e,t){return function(l){if(Array.isArray(l))return l}(e)||function(l,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(l)))){var r=[],i=!0,o=!1,s=void 0;try{for(var c,u=l[Symbol.iterator]();!(i=(c=u.next()).done)&&(r.push(c.value),!n||r.length!==n);i=!0);}catch(d){o=!0,s=d}finally{try{i||u.return==null||u.return()}finally{if(o)throw s}}return r}}(e,t)||Nc(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Kn(e){return function(t){if(Array.isArray(t))return Jr(t)}(e)||function(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}(e)||Nc(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Nc(e,t){if(e){if(typeof e=="string")return Jr(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);return l==="Object"&&e.constructor&&(l=e.constructor.name),l==="Map"||l==="Set"?Array.from(e):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Jr(e,t):void 0}}function Jr(e,t){(t==null||t>e.length)&&(t=e.length);for(var l=0,n=new Array(t);l3)for(l=[l],i=3;i0?Nl(b.type,b.props,b.key,null,b.__v):b)!=null){if(b.__=l,b.__b=l.__b+1,(g=y[d])===null||g&&b.key==g.key&&b.type===g.type)y[d]=void 0;else for(v=0;v3)for(l=[l],i=3;i=l.__.length&&l.__.push({}),l.__[e]}function co(e,t,l){var n=Ql(ml++,2);return n.t=e,n.__c||(n.__=[l?l(t):Yc(void 0,t),function(r){var i=n.t(n.__[0],r);n.__[0]!==i&&(n.__=[i,n.__[1]],n.__c.setState({}))}],n.__c=je),n.__}function uo(e,t){var l=Ql(ml++,4);!Z.__s&&Ki(l.__H,t)&&(l.__=e,l.__H=t,je.__h.push(l))}function En(e,t){var l=Ql(ml++,7);return Ki(l.__H,t)&&(l.__=e(),l.__H=t,l.__h=e),l.__}function Yv(){Yr.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(Pn),e.__H.__h.forEach(Zr),e.__H.__h=[]}catch(t){e.__H.__h=[],Z.__e(t,e.__v)}}),Yr=[]}Z.__b=function(e){je=null,ro&&ro(e)},Z.__r=function(e){io&&io(e),ml=0;var t=(je=e.__c).__H;t&&(t.__h.forEach(Pn),t.__h.forEach(Zr),t.__h=[])},Z.diffed=function(e){ao&&ao(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(Yr.push(t)!==1&&no===Z.requestAnimationFrame||((no=Z.requestAnimationFrame)||function(l){var n,r=function(){clearTimeout(i),ho&&cancelAnimationFrame(n),setTimeout(l)},i=setTimeout(r,100);ho&&(n=requestAnimationFrame(r))})(Yv)),je=void 0},Z.__c=function(e,t){t.some(function(l){try{l.__h.forEach(Pn),l.__h=l.__h.filter(function(n){return!n.__||Zr(n)})}catch(n){t.some(function(r){r.__h&&(r.__h=[])}),t=[],Z.__e(n,l.__v)}}),oo&&oo(e,t)},Z.unmount=function(e){so&&so(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Pn)}catch(l){Z.__e(l,t.__v)}};var ho=typeof requestAnimationFrame=="function";function Pn(e){var t=je;typeof e.__c=="function"&&e.__c(),je=t}function Zr(e){var t=je;e.__c=e.__(),je=t}function Ki(e,t){return!e||e.length!==t.length||t.some(function(l,n){return l!==e[n]})}function Yc(e,t){return typeof t=="function"?t(e):t}function Zc(e,t){for(var l in t)e[l]=t[l];return e}function Xr(e,t){for(var l in e)if(l!=="__source"&&!(l in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ei(e){this.props=e}(ei.prototype=new at).isPureReactComponent=!0,ei.prototype.shouldComponentUpdate=function(e,t){return Xr(this.props,e)||Xr(this.state,t)};var go=Z.__b;Z.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),go&&go(e)};var Zv=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,mo=function(e,t){return e==null?null:ht(ht(e).map(t))},Xv={map:mo,forEach:mo,count:function(e){return e?ht(e).length:0},only:function(e){var t=ht(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:ht},ep=Z.__e;function wn(){this.__u=0,this.t=null,this.__b=null}function Xc(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function Dl(){this.u=null,this.o=null}Z.__e=function(e,t,l){if(e.then){for(var n,r=t;r=r.__;)if((n=r.__c)&&n.__c)return t.__e==null&&(t.__e=l.__e,t.__k=l.__k),n.__c(e,t)}ep(e,t,l)},(wn.prototype=new at).__c=function(e,t){var l=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(l);var r=Xc(n.__v),i=!1,o=function(){i||(i=!0,l.componentWillUnmount=l.__c,r?r(s):s())};l.__c=l.componentWillUnmount,l.componentWillUnmount=function(){o(),l.__c&&l.__c()};var s=function(){if(!--n.__u){if(n.state.__e){var u=n.state.__e;n.__v.__k[0]=function v(g,b,m){return g&&(g.__v=null,g.__k=g.__k&&g.__k.map(function(_){return v(_,b,m)}),g.__c&&g.__c.__P===b&&(g.__e&&m.insertBefore(g.__e,g.__d),g.__c.__e=!0,g.__c.__P=m)),g}(u,u.__c.__P,u.__c.__O)}var d;for(n.setState({__e:n.__b=null});d=n.t.pop();)d.forceUpdate()}},c=t.__h===!0;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),e.then(o,o)},wn.prototype.componentWillUnmount=function(){this.t=[]},wn.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var l=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=function i(o,s,c){return o&&(o.__c&&o.__c.__H&&(o.__c.__H.__.forEach(function(u){typeof u.__c=="function"&&u.__c()}),o.__c.__H=null),(o=Zc({},o)).__c!=null&&(o.__c.__P===c&&(o.__c.__P=s),o.__c=null),o.__k=o.__k&&o.__k.map(function(u){return i(u,s,c)})),o}(this.__b,l,n.__O=n.__P)}this.__b=null}var r=t.__e&&it(Ot,null,e.fallback);return r&&(r.__h=null),[it(Ot,null,t.__e?null:e.children),r]};var vo=function(e,t,l){if(++l[1]===l[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(l=e.u;l;){for(;l.length>3;)l.pop()();if(l[1]>>1,1),t.i.removeChild(n)}}),Jl(it(tp,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function eu(e,t){return it(lp,{__v:e,i:t})}(Dl.prototype=new at).__e=function(e){var t=this,l=Xc(t.__v),n=t.o.get(e);return n[0]++,function(r){var i=function(){t.props.revealOrder?(n.push(r),vo(t,e,n)):r()};l?l(i):i()}},Dl.prototype.render=function(e){this.u=null,this.o=new Map;var t=ht(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var l=t.length;l--;)this.o.set(t[l],this.u=[1,0,this.u]);return e.children},Dl.prototype.componentDidUpdate=Dl.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,l){vo(e,l,t)})};var tu=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,np=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,rp=function(e){return(typeof Symbol!="undefined"&&$l(Symbol())=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function lu(e,t,l){return t.__k==null&&(t.textContent=""),Jl(e,t),typeof l=="function"&&l(),e?e.__c:null}at.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(at.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var po=Z.event;function ip(){}function ap(){return this.cancelBubble}function op(){return this.defaultPrevented}Z.event=function(e){return po&&(e=po(e)),e.persist=ip,e.isPropagationStopped=ap,e.isDefaultPrevented=op,e.nativeEvent=e};var nu,fo={configurable:!0,get:function(){return this.class}},_o=Z.vnode;Z.vnode=function(e){var t=e.type,l=e.props,n=l;if(typeof t=="string"){for(var r in n={},l){var i=l[r];r==="value"&&"defaultValue"in l&&i==null||(r==="defaultValue"&&"value"in l&&l.value==null?r="value":r==="download"&&i===!0?i="":/ondoubleclick/i.test(r)?r="ondblclick":/^onchange(textarea|input)/i.test(r+t)&&!rp(l.type)?r="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(r)?r=r.toLowerCase():np.test(r)?r=r.replace(/[A-Z0-9]/,"-$&").toLowerCase():i===null&&(i=void 0),n[r]=i)}t=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=ht(l.children).forEach(function(o){o.props.selected=n.value.indexOf(o.props.value)!=-1})),t=="select"&&n.defaultValue!=null&&(n.value=ht(l.children).forEach(function(o){o.props.selected=n.multiple?n.defaultValue.indexOf(o.props.value)!=-1:n.defaultValue==o.props.value})),e.props=n}t&&l.class!=l.className&&(fo.enumerable="className"in l,l.className!=null&&(n.class=l.className),Object.defineProperty(n,"className",fo)),e.$$typeof=tu,_o&&_o(e)};var bo=Z.__r;Z.__r=function(e){bo&&bo(e),nu=e.__c};var sp={ReactCurrentDispatcher:{current:{readContext:function(e){return nu.__n[e.__c].props.value}}}};(typeof performance=="undefined"?"undefined":$l(performance))=="object"&&typeof performance.now=="function"&&performance.now.bind(performance);function yo(e){return!!e&&e.$$typeof===tu}var E={useState:function(e){return nl=1,co(Yc,e)},useReducer:co,useEffect:function(e,t){var l=Ql(ml++,3);!Z.__s&&Ki(l.__H,t)&&(l.__=e,l.__H=t,je.__H.__h.push(l))},useLayoutEffect:uo,useRef:function(e){return nl=5,En(function(){return{current:e}},[])},useImperativeHandle:function(e,t,l){nl=6,uo(function(){typeof e=="function"?e(t()):e&&(e.current=t())},l==null?l:l.concat(e))},useMemo:En,useCallback:function(e,t){return nl=8,En(function(){return e},t)},useContext:function(e){var t=je.context[e.__c],l=Ql(ml++,9);return l.__c=e,t?(l.__==null&&(l.__=!0,t.sub(je)),t.props.value):e.__},useDebugValue:function(e,t){Z.useDebugValue&&Z.useDebugValue(t?t(e):e)},version:"16.8.0",Children:Xv,render:lu,hydrate:function(e,t,l){return Qc(e,t),typeof l=="function"&&l(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(Jl(null,e),!0)},createPortal:eu,createElement:it,createContext:function(e,t){var l={__c:t="__cC"+Hc++,__:e,Consumer:function(n,r){return n.children(r)},Provider:function(n){var r,i;return this.getChildContext||(r=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&r.some(Qr)},this.sub=function(o){r.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r.splice(r.indexOf(o),1),s&&s.call(o)}}),n.children}};return l.Provider.__=l.Consumer.contextType=l},createFactory:function(e){return it.bind(null,e)},cloneElement:function(e){return yo(e)?Qv.apply(null,arguments):e},createRef:function(){return{current:null}},Fragment:Ot,isValidElement:yo,findDOMNode:function(e){return e&&(e.base||e.nodeType===1&&e)||null},Component:at,PureComponent:ei,memo:function(e,t){function l(r){var i=this.props.ref,o=i==r.ref;return!o&&i&&(i.call?i(null):i.current=null),t?!t(this.props,r)||!o:Xr(this.props,r)}function n(r){return this.shouldComponentUpdate=l,it(e,r)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n},forwardRef:function(e){function t(l,n){var r=Zc({},l);return delete r.ref,e(r,(n=l.ref||n)&&($l(n)!="object"||"current"in n)?n:null)}return t.$$typeof=Zv,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},StrictMode:Ot,Suspense:wn,SuspenseList:Dl,lazy:function(e){var t,l,n;function r(i){if(t||(t=e()).then(function(o){l=o.default||o},function(o){n=o}),n)throw n;if(!l)throw t;return it(l,i)}return r.displayName="Lazy",r.__f=!0,r},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:sp};function cp(){return E.createElement("svg",{width:"15",height:"15",className:"DocSearch-Control-Key-Icon"},E.createElement("path",{d:"M4.505 4.496h2M5.505 5.496v5M8.216 4.496l.055 5.993M10 7.5c.333.333.5.667.5 1v2M12.326 4.5v5.996M8.384 4.496c1.674 0 2.116 0 2.116 1.5s-.442 1.5-2.116 1.5M3.205 9.303c-.09.448-.277 1.21-1.241 1.203C1 10.5.5 9.513.5 8V7c0-1.57.5-2.5 1.464-2.494.964.006 1.134.598 1.24 1.342M12.553 10.5h1.953",strokeWidth:"1.2",stroke:"currentColor",fill:"none",strokeLinecap:"square"}))}function ru(){return E.createElement("svg",{width:"20",height:"20",className:"DocSearch-Search-Icon",viewBox:"0 0 20 20"},E.createElement("path",{d:"M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z",stroke:"currentColor",fill:"none",fillRule:"evenodd",strokeLinecap:"round",strokeLinejoin:"round"}))}var up=["translations"];function ti(){return ti=Object.assign||function(e){for(var t=1;t=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}var hp=E.forwardRef(function(e,t){var l=e.translations,n=l===void 0?{}:l,r=dp(e,up),i=n.buttonText,o=i===void 0?"Search":i,s=n.buttonAriaLabel,c=s===void 0?"Search":s,u=En(function(){return typeof navigator!="undefined"?/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?"\u2318":"Ctrl":null},[]);return E.createElement("button",ti({type:"button",className:"DocSearch DocSearch-Button","aria-label":c},r,{ref:t}),E.createElement("span",{className:"DocSearch-Button-Container"},E.createElement(ru,null),E.createElement("span",{className:"DocSearch-Button-Placeholder"},o)),E.createElement("span",{className:"DocSearch-Button-Keys"},u!==null&&E.createElement(E.Fragment,null,E.createElement("span",{className:"DocSearch-Button-Key"},u==="Ctrl"?E.createElement(cp,null):u),E.createElement("span",{className:"DocSearch-Button-Key"},"K"))))});function Yl(e){return e.reduce(function(t,l){return t.concat(l)},[])}var gp=0;function li(e){return e.collections.length===0?0:e.collections.reduce(function(t,l){return t+l.items.length},0)}var mp=function(){},vp=[{segment:"autocomplete-core",version:"1.5.0"}];function ko(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),l.push.apply(l,n)}return l}function pp(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}function fp(e,t,l){var n=t.initialState;return{getState:function(){return n},dispatch:function(r,i){var o=function(s){for(var c=1;c=l?n===null?null:0:r}function wo(e,t){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),l.push.apply(l,n)}return l}function bp(e,t,l){return t in e?Object.defineProperty(e,t,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[t]=l,e}function yp(e,t){var l=[];return Promise.resolve(e(t)).then(function(n){return Promise.all(n.filter(function(r){return Boolean(r)}).map(function(r){if(r.sourceId,l.includes(r.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(r.sourceId)," is not unique."));l.push(r.sourceId);var i=function(o){for(var s=1;se.length)&&(t=e.length);for(var l=0,n=new Array(t);le.length)&&(t=e.length);for(var l=0,n=new Array(t);l|<\/mark>)/g,ff=RegExp(ou.source);function su(e){var t,l,n,r,i,o=e;if(!o.__docsearch_parent&&!e._highlightResult)return e.hierarchy.lvl0;var s=((o.__docsearch_parent?(t=o.__docsearch_parent)===null||t===void 0||(l=t._highlightResult)===null||l===void 0||(n=l.hierarchy)===null||n===void 0?void 0:n.lvl0:(r=e._highlightResult)===null||r===void 0||(i=r.hierarchy)===null||i===void 0?void 0:i.lvl0)||{}).value;return s&&ff.test(s)?s.replace(ou,""):s}function ii(){return ii=Object.assign||function(e){for(var t=1;t=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}function kf(e){var t=e.translations,l=t===void 0?{}:t,n=yf(e,bf),r=l.recentSearchesTitle,i=r===void 0?"Recent":r,o=l.noRecentSearchesText,s=o===void 0?"No recent searches":o,c=l.saveRecentSearchButtonTitle,u=c===void 0?"Save this search":c,d=l.removeRecentSearchButtonTitle,v=d===void 0?"Remove this search from history":d,g=l.favoriteSearchesTitle,b=g===void 0?"Favorite":g,m=l.removeFavoriteSearchButtonTitle,_=m===void 0?"Remove this search from favorites":m;return n.state.status==="idle"&&n.hasCollections===!1?n.disableUserPersonalization?null:E.createElement("div",{className:"DocSearch-StartScreen"},E.createElement("p",{className:"DocSearch-Help"},s)):n.hasCollections===!1?null:E.createElement("div",{className:"DocSearch-Dropdown-Container"},E.createElement(ri,$n({},n,{title:i,collection:n.state.collections[0],renderIcon:function(){return E.createElement("div",{className:"DocSearch-Hit-icon"},E.createElement(Zp,null))},renderAction:function(f){var y=f.item,P=f.runFavoriteTransition,w=f.runDeleteTransition;return E.createElement(E.Fragment,null,E.createElement("div",{className:"DocSearch-Hit-action"},E.createElement("button",{className:"DocSearch-Hit-action-button",title:u,type:"submit",onClick:function(L){L.preventDefault(),L.stopPropagation(),P(function(){n.favoriteSearches.add(y),n.recentSearches.remove(y),n.refresh()})}},E.createElement(No,null))),E.createElement("div",{className:"DocSearch-Hit-action"},E.createElement("button",{className:"DocSearch-Hit-action-button",title:v,type:"submit",onClick:function(L){L.preventDefault(),L.stopPropagation(),w(function(){n.recentSearches.remove(y),n.refresh()})}},E.createElement(ni,null))))}})),E.createElement(ri,$n({},n,{title:b,collection:n.state.collections[1],renderIcon:function(){return E.createElement("div",{className:"DocSearch-Hit-icon"},E.createElement(No,null))},renderAction:function(f){var y=f.item,P=f.runDeleteTransition;return E.createElement("div",{className:"DocSearch-Hit-action"},E.createElement("button",{className:"DocSearch-Hit-action-button",title:_,type:"submit",onClick:function(w){w.preventDefault(),w.stopPropagation(),P(function(){n.favoriteSearches.remove(y),n.refresh()})}},E.createElement(ni,null)))}})))}var Ef=["translations"];function Gn(){return Gn=Object.assign||function(e){for(var t=1;t=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}var wf=E.memo(function(e){var t=e.translations,l=t===void 0?{}:t,n=Pf(e,Ef);if(n.state.status==="error")return E.createElement(of,{translations:l==null?void 0:l.errorScreen});var r=n.state.collections.some(function(i){return i.items.length>0});return n.state.query?r===!1?E.createElement(df,Gn({},n,{translations:l==null?void 0:l.noResultsScreen})):E.createElement(_f,n):E.createElement(kf,Gn({},n,{hasCollections:r,translations:l==null?void 0:l.startScreen}))},function(e,t){return t.state.status==="loading"||t.state.status==="stalled"}),Tf=["translations"];function Jn(){return Jn=Object.assign||function(e){for(var t=1;t=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}function Of(e){var t=e.translations,l=t===void 0?{}:t,n=Lf(e,Tf),r=l.resetButtonTitle,i=r===void 0?"Clear the query":r,o=l.resetButtonAriaLabel,s=o===void 0?"Clear the query":o,c=l.cancelButtonText,u=c===void 0?"Cancel":c,d=l.cancelButtonAriaLabel,v=d===void 0?"Cancel":d,g=n.getFormProps({inputElement:n.inputRef.current}).onReset;return E.useEffect(function(){n.autoFocus&&n.inputRef.current&&n.inputRef.current.focus()},[n.autoFocus,n.inputRef]),E.useEffect(function(){n.isFromSelection&&n.inputRef.current&&n.inputRef.current.select()},[n.isFromSelection,n.inputRef]),E.createElement(E.Fragment,null,E.createElement("form",{className:"DocSearch-Form",onSubmit:function(b){b.preventDefault()},onReset:g},E.createElement("label",Jn({className:"DocSearch-MagnifierLabel"},n.getLabelProps()),E.createElement(ru,null)),E.createElement("div",{className:"DocSearch-LoadingIndicator"},E.createElement(Yp,null)),E.createElement("input",Jn({className:"DocSearch-Input",ref:n.inputRef},n.getInputProps({inputElement:n.inputRef.current,autoFocus:n.autoFocus,maxLength:64}))),E.createElement("button",{type:"reset",title:i,className:"DocSearch-Reset","aria-label":s,hidden:!n.state.query},E.createElement(ni,null))),E.createElement("button",{className:"DocSearch-Cancel",type:"reset","aria-label":v,onClick:n.onClose},u))}var Af=["_highlightResult","_snippetResult"];function Df(e,t){if(e==null)return{};var l,n,r=function(o,s){if(o==null)return{};var c,u,d={},v=Object.keys(o);for(u=0;u=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}function Sf(e){return function(){var t="__TEST_KEY__";try{return localStorage.setItem(t,""),localStorage.removeItem(t),!0}catch{return!1}}()===!1?{setItem:function(){},getItem:function(){return[]}}:{setItem:function(t){return window.localStorage.setItem(e,JSON.stringify(t))},getItem:function(){var t=window.localStorage.getItem(e);return t?JSON.parse(t):[]}}}function $o(e){var t=e.key,l=e.limit,n=l===void 0?5:l,r=Sf(t),i=r.getItem().slice(0,n);return{add:function(o){var s=o,c=(s._highlightResult,s._snippetResult,Df(s,Af)),u=i.findIndex(function(d){return d.objectID===c.objectID});u>-1&&i.splice(u,1),i.unshift(c),i=i.slice(0,n),r.setItem(i)},remove:function(o){i=i.filter(function(s){return s.objectID!==o.objectID}),r.setItem(i)},getAll:function(){return i}}}var If=["facetName","facetQuery"];function Rf(e){var t,l="algoliasearch-client-js-".concat(e.key),n=function(){return t===void 0&&(t=e.localStorage||window.localStorage),t},r=function(){return JSON.parse(n().getItem(l)||"{}")};return{get:function(i,o){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then(function(){var c=JSON.stringify(i),u=r()[c];return Promise.all([u||o(),u!==void 0])}).then(function(c){var u=Bn(c,2),d=u[0],v=u[1];return Promise.all([d,v||s.miss(d)])}).then(function(c){return Bn(c,1)[0]})},set:function(i,o){return Promise.resolve().then(function(){var s=r();return s[JSON.stringify(i)]=o,n().setItem(l,JSON.stringify(s)),o})},delete:function(i){return Promise.resolve().then(function(){var o=r();delete o[JSON.stringify(i)],n().setItem(l,JSON.stringify(o))})},clear:function(){return Promise.resolve().then(function(){n().removeItem(l)})}}}function Sl(e){var t=Kn(e.caches),l=t.shift();return l===void 0?{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return r().then(function(o){return Promise.all([o,i.miss(o)])}).then(function(o){return Bn(o,1)[0]})},set:function(n,r){return Promise.resolve(r)},delete:function(n){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}};return l.get(n,r,i).catch(function(){return Sl({caches:t}).get(n,r,i)})},set:function(n,r){return l.set(n,r).catch(function(){return Sl({caches:t}).set(n,r)})},delete:function(n){return l.delete(n).catch(function(){return Sl({caches:t}).delete(n)})},clear:function(){return l.clear().catch(function(){return Sl({caches:t}).clear()})}}}function Or(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{serializable:!0},t={};return{get:function(l,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{miss:function(){return Promise.resolve()}},i=JSON.stringify(l);if(i in t)return Promise.resolve(e.serializable?JSON.parse(t[i]):t[i]);var o=n(),s=r&&r.miss||function(){return Promise.resolve()};return o.then(function(c){return s(c)}).then(function(){return o})},set:function(l,n){return t[JSON.stringify(l)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(l){return delete t[JSON.stringify(l)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function Cf(e){for(var t=e.length-1;t>0;t--){var l=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[l],e[l]=n}return e}function cu(e,t){return t&&Object.keys(t).forEach(function(l){e[l]=t[l](e)}),e}function ar(e){for(var t=arguments.length,l=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:l.timeout||t,headers:l.headers||{},queryParameters:l.queryParameters||{},cacheable:l.cacheable}}var il={Read:1,Write:2,Any:3},uu=1,xf=2,du=3;function hu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:uu;return he(he({},e),{},{status:t,lastUpdate:Date.now()})}function gu(e){return typeof e=="string"?{protocol:"https",url:e,accept:il.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||il.Any}}var Jo="GET",or="POST";function Vf(e,t){return Promise.all(t.map(function(l){return e.get(l,function(){return Promise.resolve(hu(l))})})).then(function(l){var n=l.filter(function(o){return function(s){return s.status===uu||Date.now()-s.lastUpdate>12e4}(o)}),r=l.filter(function(o){return function(s){return s.status===du&&Date.now()-s.lastUpdate<=12e4}(o)}),i=[].concat(Kn(n),Kn(r));return{getTimeout:function(o,s){return(r.length===0&&o===0?1:r.length+3+o)*s},statelessHosts:i.length>0?i.map(function(o){return gu(o)}):t}})}function Qo(e,t,l,n){var r=[],i=function(g,b){if(!(g.method===Jo||g.data===void 0&&b.data===void 0)){var m=Array.isArray(g.data)?g.data:he(he({},g.data),b.data);return JSON.stringify(m)}}(l,n),o=function(g,b){var m=he(he({},g.headers),b.headers),_={};return Object.keys(m).forEach(function(f){var y=m[f];_[f.toLowerCase()]=y}),_}(e,n),s=l.method,c=l.method!==Jo?{}:he(he({},l.data),n.data),u=he(he(he({"x-algolia-agent":e.userAgent.value},e.queryParameters),c),n.queryParameters),d=0,v=function g(b,m){var _=b.pop();if(_===void 0)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:Yo(r)};var f={data:i,headers:o,method:s,url:jf(_,l.path,u),connectTimeout:m(d,e.timeouts.connect),responseTimeout:m(d,n.timeout)},y=function(w){var L={request:f,response:w,host:_,triesLeft:b.length};return r.push(L),L},P={onSucess:function(w){return function(L){try{return JSON.parse(L.content)}catch(S){throw function(j,D){return{name:"DeserializationError",message:j,response:D}}(S.message,L)}}(w)},onRetry:function(w){var L=y(w);return w.isTimedOut&&d++,Promise.all([e.logger.info("Retryable failure",vu(L)),e.hostsCache.set(_,hu(_,w.isTimedOut?du:xf))]).then(function(){return g(b,m)})},onFail:function(w){throw y(w),function(L,S){var j=L.content,D=L.status,O=j;try{O=JSON.parse(j).message}catch{}return function(U,B,q){return{name:"ApiError",message:U,status:B,transporterStackTrace:q}}(O,D,S)}(w,Yo(r))}};return e.requester.send(f).then(function(w){return function(L,S){return function(j){var D=j.status;return j.isTimedOut||function(O){var U=O.isTimedOut,B=O.status;return!U&&~~B==0}(j)||~~(D/100)!=2&&~~(D/100)!=4}(L)?S.onRetry(L):~~(L.status/100)==2?S.onSucess(L):S.onFail(L)}(w,P)})};return Vf(e.hostsCache,t).then(function(g){return v(Kn(g.statelessHosts).reverse(),g.getTimeout)})}function Ff(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(l){var n="; ".concat(l.segment).concat(l.version!==void 0?" (".concat(l.version,")"):"");return t.value.indexOf(n)===-1&&(t.value="".concat(t.value).concat(n)),t}};return t}function jf(e,t,l){var n=mu(l),r="".concat(e.protocol,"://").concat(e.url,"/").concat(t.charAt(0)==="/"?t.substr(1):t);return n.length&&(r+="?".concat(n)),r}function mu(e){return Object.keys(e).map(function(t){return ar("%s=%s",t,(l=e[t],Object.prototype.toString.call(l)==="[object Object]"||Object.prototype.toString.call(l)==="[object Array]"?JSON.stringify(e[t]):e[t]));var l}).join("&")}function Yo(e){return e.map(function(t){return vu(t)})}function vu(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return he(he({},e),{},{request:he(he({},e.request),{},{headers:he(he({},e.request.headers),t)})})}var zf=function(e){var t=e.appId,l=function(i,o,s){var c={"x-algolia-api-key":s,"x-algolia-application-id":o};return{headers:function(){return i===Tn.WithinHeaders?c:{}},queryParameters:function(){return i===Tn.WithinQueryParameters?c:{}}}}(e.authMode!==void 0?e.authMode:Tn.WithinHeaders,t,e.apiKey),n=function(i){var o=i.hostsCache,s=i.logger,c=i.requester,u=i.requestsCache,d=i.responsesCache,v=i.timeouts,g=i.userAgent,b=i.hosts,m=i.queryParameters,_={hostsCache:o,logger:s,requester:c,requestsCache:u,responsesCache:d,timeouts:v,userAgent:g,headers:i.headers,queryParameters:m,hosts:b.map(function(f){return gu(f)}),read:function(f,y){var P=Go(y,_.timeouts.read),w=function(){return Qo(_,_.hosts.filter(function(S){return(S.accept&il.Read)!=0}),f,P)};if((P.cacheable!==void 0?P.cacheable:f.cacheable)!==!0)return w();var L={request:f,mappedRequestOptions:P,transporter:{queryParameters:_.queryParameters,headers:_.headers}};return _.responsesCache.get(L,function(){return _.requestsCache.get(L,function(){return _.requestsCache.set(L,w()).then(function(S){return Promise.all([_.requestsCache.delete(L),S])},function(S){return Promise.all([_.requestsCache.delete(L),Promise.reject(S)])}).then(function(S){var j=Bn(S,2);return j[0],j[1]})})},{miss:function(S){return _.responsesCache.set(L,S)}})},write:function(f,y){return Qo(_,_.hosts.filter(function(P){return(P.accept&il.Write)!=0}),f,Go(y,_.timeouts.write))}};return _}(he(he({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:il.Read},{url:"".concat(t,".algolia.net"),accept:il.Write}].concat(Cf([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:he(he(he({},l.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:he(he({},l.queryParameters()),e.queryParameters)})),r={transporter:n,appId:t,addAlgoliaAgent:function(i,o){n.userAgent.add({segment:i,version:o})},clearCache:function(){return Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then(function(){})}};return cu(r,e.methods)},pu=function(e){return function(t){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n={transporter:e.transporter,appId:e.appId,indexName:t};return cu(n,l.methods)}},Zo=function(e){return function(t,l){var n=t.map(function(r){return he(he({},r),{},{params:mu(r.params||{})})});return e.transporter.read({method:or,path:"1/indexes/*/queries",data:{requests:n},cacheable:!0},l)}},Xo=function(e){return function(t,l){return Promise.all(t.map(function(n){var r=n.params,i=r.facetName,o=r.facetQuery,s=qv(r,If);return pu(e)(n.indexName,{methods:{searchForFacetValues:fu}}).searchForFacetValues(i,o,he(he({},l),s))}))}},Nf=function(e){return function(t,l,n){return e.transporter.read({method:or,path:ar("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:l},cacheable:!0},n)}},Mf=function(e){return function(t,l){return e.transporter.read({method:or,path:ar("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},l)}},fu=function(e){return function(t,l,n){return e.transporter.read({method:or,path:ar("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:l},cacheable:!0},n)}},Hf=1,Bf=2,Kf=3;function _u(e,t,l){var n,r={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(i){return new Promise(function(o){var s=new XMLHttpRequest;s.open(i.method,i.url,!0),Object.keys(i.headers).forEach(function(v){return s.setRequestHeader(v,i.headers[v])});var c,u=function(v,g){return setTimeout(function(){s.abort(),o({status:0,content:g,isTimedOut:!0})},1e3*v)},d=u(i.connectTimeout,"Connection timeout");s.onreadystatechange=function(){s.readyState>s.OPENED&&c===void 0&&(clearTimeout(d),c=u(i.responseTimeout,"Socket timeout"))},s.onerror=function(){s.status===0&&(clearTimeout(d),clearTimeout(c),o({content:s.responseText||"Network request failed",status:s.status,isTimedOut:!1}))},s.onload=function(){clearTimeout(d),clearTimeout(c),o({content:s.responseText,status:s.status,isTimedOut:!1})},s.send(i.data)})}},logger:(n=Kf,{debug:function(i,o){return Hf>=n&&console.debug(i,o),Promise.resolve()},info:function(i,o){return Bf>=n&&console.info(i,o),Promise.resolve()},error:function(i,o){return console.error(i,o),Promise.resolve()}}),responsesCache:Or(),requestsCache:Or({serializable:!1}),hostsCache:Sl({caches:[Rf({key:"".concat("4.8.5","-").concat(e)}),Or()]}),userAgent:Ff("4.8.5").add({segment:"Browser",version:"lite"}),authMode:Tn.WithinQueryParameters};return zf(he(he(he({},r),l),{},{methods:{search:Zo,searchForFacetValues:Xo,multipleQueries:Zo,multipleSearchForFacetValues:Xo,initIndex:function(i){return function(o){return pu(i)(o,{methods:{search:Mf,searchForFacetValues:fu,findAnswers:Nf}})}}}}))}_u.version="4.8.5";var Uf=["footer","searchBox"];function Ml(){return Ml=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var l=0,n=new Array(t);l=0||(d[c]=o[c]);return d}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(r[l]=e[l])}return r}function Gf(e){var t=e.appId,l=t===void 0?"BH4D9OD16A":t,n=e.apiKey,r=e.indexName,i=e.placeholder,o=i===void 0?"Search docs":i,s=e.searchParameters,c=e.onClose,u=c===void 0?pf:c,d=e.transformItems,v=d===void 0?qo:d,g=e.hitComponent,b=g===void 0?Qp:g,m=e.resultsFooterComponent,_=m===void 0?function(){return null}:m,f=e.navigator,y=e.initialScrollY,P=y===void 0?0:y,w=e.transformSearchClient,L=w===void 0?qo:w,S=e.disableUserPersonalization,j=S!==void 0&&S,D=e.initialQuery,O=D===void 0?"":D,U=e.translations,B=U===void 0?{}:U,q=B.footer,A=B.searchBox,H=$f(B,Uf),Y=qf(E.useState({query:"",collections:[],completion:null,context:{},isOpen:!1,activeItemId:null,status:"idle"}),2),se=Y[0],J=Y[1],ne=E.useRef(null),re=E.useRef(null),Pe=E.useRef(null),Le=E.useRef(null),Ae=E.useRef(null),we=E.useRef(10),Re=E.useRef(typeof window!="undefined"?window.getSelection().toString().slice(0,64):"").current,He=E.useRef(O||Re).current,R=function(p,k,T){return E.useMemo(function(){var I=_u(p,k);return I.addAlgoliaAgent("docsearch","3.0.0-alpha.42"),/docsearch.js \(.*\)/.test(I.transporter.userAgent.value)===!1&&I.addAlgoliaAgent("docsearch-react","3.0.0-alpha.42"),T(I)},[p,k,T])}(l,n,L),K=E.useRef($o({key:"__DOCSEARCH_FAVORITE_SEARCHES__".concat(r),limit:10})).current,z=E.useRef($o({key:"__DOCSEARCH_RECENT_SEARCHES__".concat(r),limit:K.getAll().length===0?7:4})).current,W=E.useCallback(function(p){if(!j){var k=p.type==="content"?p.__docsearch_parent:p;k&&K.getAll().findIndex(function(T){return T.objectID===k.objectID})===-1&&z.add(k)}},[K,z,j]),ue=E.useMemo(function(){return $p({id:"docsearch",defaultActiveItemId:0,placeholder:o,openOnFocus:!0,initialState:{query:He,context:{searchSuggestions:[]}},navigator:f,onStateChange:function(p){J(p.state)},getSources:function(p){var k=p.query,T=p.state,I=p.setContext,C=p.setStatus;return k?R.search([{query:k,indexName:r,params:Ar({attributesToRetrieve:["hierarchy.lvl0","hierarchy.lvl1","hierarchy.lvl2","hierarchy.lvl3","hierarchy.lvl4","hierarchy.lvl5","hierarchy.lvl6","content","type","url"],attributesToSnippet:["hierarchy.lvl1:".concat(we.current),"hierarchy.lvl2:".concat(we.current),"hierarchy.lvl3:".concat(we.current),"hierarchy.lvl4:".concat(we.current),"hierarchy.lvl5:".concat(we.current),"hierarchy.lvl6:".concat(we.current),"content:".concat(we.current)],snippetEllipsisText:"\u2026",highlightPreTag:"",highlightPostTag:"",hitsPerPage:20},s)}]).catch(function(x){throw x.name==="RetryError"&&C("error"),x}).then(function(x){var N=x.results[0],V=N.hits,M=N.nbHits,F=Wo(V,function(Q){return su(Q)});return T.context.searchSuggestions.length0&&(le(),Ae.current&&Ae.current.focus())},[He,le]),E.useEffect(function(){function p(){if(re.current){var k=.01*window.innerHeight;re.current.style.setProperty("--docsearch-vh","".concat(k,"px"))}}return p(),window.addEventListener("resize",p),function(){window.removeEventListener("resize",p)}},[]),E.createElement("div",Ml({ref:ne},ie({"aria-expanded":!0}),{className:["DocSearch","DocSearch-Container",se.status==="stalled"&&"DocSearch-Container--Stalled",se.status==="error"&&"DocSearch-Container--Errored"].filter(Boolean).join(" "),role:"button",tabIndex:0,onMouseDown:function(p){p.target===p.currentTarget&&u()}}),E.createElement("div",{className:"DocSearch-Modal",ref:re},E.createElement("header",{className:"DocSearch-SearchBar",ref:Pe},E.createElement(Of,Ml({},ue,{state:se,autoFocus:He.length===0,inputRef:Ae,isFromSelection:Boolean(He)&&He===Re,translations:A,onClose:u}))),E.createElement("div",{className:"DocSearch-Dropdown",ref:Le},E.createElement(wf,Ml({},ue,{indexName:r,state:se,hitComponent:b,resultsFooterComponent:_,disableUserPersonalization:j,recentSearches:z,favoriteSearches:K,inputRef:Ae,translations:H,onItemClick:function(p){W(p),u()}}))),E.createElement("footer",{className:"DocSearch-Footer"},E.createElement(Jp,{translations:q}))))}function ai(){return ai=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var l=0,n=new Array(t);l1&&arguments[1]!==void 0?arguments[1]:window;return typeof t=="string"?l.document.querySelector(t):t}(e.container,e.environment))}var bu,oi,yu,Yf=[];function Zf(e,t,l){var n,r,i,o={};for(i in t)i=="key"?n=t[i]:i=="ref"?r=t[i]:o[i]=t[i];if(arguments.length>2&&(o.children=arguments.length>3?bu.call(arguments,2):l),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)o[i]===void 0&&(o[i]=e.defaultProps[i]);return Xf(e,o,n,r,null)}function Xf(e,t,l,n,r){var i={type:e,props:t,key:l,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:r==null?++yu:r};return r==null&&oi.vnode!=null&&oi.vnode(i),i}bu=Yf.slice,oi={__e:function(e,t){for(var l,n,r;t=t.__;)if((l=t.__c)&&!l.__)try{if((n=l.constructor)&&n.getDerivedStateFromError!=null&&(l.setState(n.getDerivedStateFromError(e)),r=l.__d),l.componentDidCatch!=null&&(l.componentDidCatch(e),r=l.__d),r)return l.__E=l}catch(i){e=i}throw e}},yu=0,typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());const e_=e=>e.button===1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey,t_=()=>{const e=ln(),t=Lc();return{transformItems:l=>l.map(n=>Dt(xe({},n),{url:Pm(n.url,t.value.base)})),hitComponent:({hit:l,children:n})=>Zf("a",{href:l.url,onClick:r=>{e_(r)||(r.preventDefault(),e.push(l.url))}},n),navigator:{navigate:({itemUrl:l})=>{e.push(l)}}}};const l_=Me({name:"Docsearch",props:{options:{type:Object,required:!0}},setup(e){const t=ji(),l=Tc(),n=t_(),r=_e(()=>{var s;return xe(xe({},e.options),(s=e.options.locales)===null||s===void 0?void 0:s[t.value])}),i=[],o=()=>{var s,c;const u=(c=(s=r.value.searchParameters)===null||s===void 0?void 0:s.facetFilters)!==null&&c!==void 0?c:[];i.splice(0,i.length,`lang:${l.value}`,...te(u)?u:[u]),Qf(Dt(xe(xe({},n),r.value),{container:"#docsearch-container",searchParameters:Dt(xe({},r.value.searchParameters),{facetFilters:i})}))};return tt(()=>{o(),et([t,r],([s,c],[u,d])=>{s!==u&&JSON.stringify(c)!==JSON.stringify(d)&&o()}),et(l,(s,c)=>{if(s!==c){const u=i.findIndex(d=>d===`lang:${c}`);u>-1&&i.splice(u,1,`lang:${s}`)}})}),()=>ee("div",{id:"docsearch-container"})}}),n_={apiKey:"1831a64a81ffef4f85d5c0aa28cb801f",indexName:"solanacookbook",appId:"QMKSKREFKN",algoliaOptions:{hitsPerPage:10},locales:{"/":{placeholder:"Search",translations:{button:{buttonText:"Search"}}},"/zh/":{placeholder:"\u641C\u7D22\u6587\u6863",translations:{button:{buttonText:"\u641C\u7D22\u6587\u6863"}}},"/vi/":{placeholder:"T\xECm ki\u1EBFm",translations:{button:{buttonText:"T\xECm ki\u1EBFm"}}},"/th/":{placeholder:"\u0E04\u0E49\u0E19\u0E2B\u0E32",translations:{button:{buttonText:"\u0E04\u0E49\u0E19\u0E2B\u0E32"}}},"/fr/":{placeholder:"Rechercher",translations:{button:{buttonText:"Rechercher"}}},"/pt/":{placeholder:"Buscar",translations:{button:{buttonText:"Buscar"}}},"/id/":{placeholder:"Cari",translations:{button:{buttonText:"Cari"}}},"/kr/":{placeholder:"\uAC80\uC0C9",translations:{button:{buttonText:"\uAC80\uC0C9"}}},"/ja/":{placeholder:"\u691C\u7D22",translations:{button:{buttonText:"\u691C\u7D22"}}},"/fil/":{placeholder:"Maghanap",translations:{button:{buttonText:"Maghanap"}}}}};var r_=At(({app:e})=>{e.component("Docsearch",()=>ee(l_,{options:n_}))});const ku=Me({name:"SolanaCodeGroup",setup(e,{slots:t}){var b;const l=Ee(-1),n=Ee([]),r=(m=l.value)=>{m{m>0?l.value=m-1:l.value=n.value.length-1,n.value[l.value].focus()},o=(m,_)=>{m.key===" "||m.key==="Enter"?(m.preventDefault(),l.value=_):m.key==="ArrowRight"?(m.preventDefault(),r(_)):m.key==="ArrowLeft"&&(m.preventDefault(),i(_))},s=((b=t.default)==null?void 0:b.call(t))||[];let c=!1;s.forEach(m=>{Object.keys(m.children).includes("preview")&&(c=!0)});const u=Ee(c),d=()=>{u.value=!u.value};function v(m){return m.map(_=>{var f;return((f=_.props)==null?void 0:f.class)==="line-number"?"":typeof _.children=="string"?_.children:Array.isArray(_.children)?v(_.children):""}).join("")}const g=()=>{let m=s.find((P,w)=>w===l.value),_=u.value?m.children.preview():m.children.default(),f=v(_),y=[new ClipboardItem({"text/plain":new Blob([f],{type:"text/plain"})})];navigator.clipboard.write(y)};return()=>{var _;const m=(((_=t.default)==null?void 0:_.call(t))||[]).map(f=>(f.props===null&&(f.props={preview:u}),f));return m.length===0?null:(l.value<0||l.value>m.length-1?(l.value=m.findIndex(f=>f.props.active===""||f.props.active===!0),l.value===-1&&(l.value=0)):m.forEach((f,y)=>{f.props.active=y===l.value,f.props.preview=u.value}),ee("div",{class:"code-group"},[ee("div",{class:"code-group__nav"},ee("ul",{class:"code-group__ul"},m.map((f,y)=>{const P=y===l.value;return ee("li",{class:"code-group__li"},ee("button",{ref:w=>{w&&(n.value[y]=w)},class:{"code-group__nav-tab":!0,"code-group__nav-tab-active":P},ariaPressed:P,ariaExpanded:P,onClick:()=>l.value=y,onKeydown:w=>o(w,y)},f.props.title))}),ee("li",{class:"flex-grow"}),ee("li",{class:"code-group__li"},ee("button",{class:{"code-group__nav-tab":!0},onClick:()=>d()},ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none"},ee("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})))),ee("li",{class:"code-group__li"},ee("button",{class:{"code-group__nav-tab":!0},onClick:()=>g()},ee("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none"},ee("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})))))),ee("div",[u.value?ee("div",{class:"code-info-title"},"Press button to view full source"):null]),m]))}}});var i_=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ku});var a_=(e,t)=>{const l=e.__vccOpts||e;for(const[n,r]of t)l[n]=r;return l};const o_={name:"SolanaCodeGroupItem",props:{title:{type:String,required:!0},active:{type:Boolean,required:!1,default:!1},preview:{type:Boolean,required:!1,default:!1}}},s_=["aria-selected"];function c_(e,t,l,n,r,i){return tn(),Ai("div",{class:Pt(["code-group-item",{"code-group-item__active":l.active}]),"aria-selected":l.active},[Fn("div",{class:Pt({hidden:l.preview})},[jn(e.$slots,"default",{},void 0,!0)],2),Fn("div",{class:Pt({hidden:!l.preview})},[jn(e.$slots,"preview",{},void 0,!0)],2)],10,s_)}var Eu=a_(o_,[["render",c_],["__scopeId","data-v-6ae3d40e"]]),u_=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Eu});var d_=At(({app:e,router:t,siteData:l})=>{e.component("SolanaCodeGroup",ku),e.component("SolanaCodeGroupItem",Eu)});const h_=[Am,Mm,Wm,Av,Iv,Kv,Uv,r_,d_];function Pu(e,t,l){var n,r,i;t===void 0&&(t=50),l===void 0&&(l={});var o=(n=l.isImmediate)!=null&&n,s=(r=l.callback)!=null&&r,c=l.maxWait,u=Date.now(),d=[];function v(){if(c!==void 0){var b=Date.now()-u;if(b+t>=c)return c-b}return t}var g=function(){var b=[].slice.call(arguments),m=this;return new Promise(function(_,f){var y=o&&i===void 0;if(i!==void 0&&clearTimeout(i),i=setTimeout(function(){if(i=void 0,u=Date.now(),!o){var w=e.apply(m,b);s&&s(w),d.forEach(function(L){return(0,L.resolve)(w)}),d=[]}},v()),y){var P=e.apply(m,b);return s&&s(P),_(P)}d.push({resolve:_,reject:f})})};return g.cancel=function(b){i!==void 0&&clearTimeout(i),d.forEach(function(m){return(0,m.reject)(b)}),d=[]},g}const rs=()=>window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,g_=()=>window.scrollTo({top:0,behavior:"smooth"});const m_=Me({name:"BackToTop",setup(){const e=Ee(0),t=_e(()=>e.value>300),l=Pu(()=>{e.value=rs()},100);tt(()=>{e.value=rs(),window.addEventListener("scroll",()=>l())});const n=ee("div",{class:"back-to-top",onClick:g_});return()=>ee(Ri,{name:"back-to-top"},()=>t.value?n:null)}}),v_=[m_],p_=({headerLinkSelector:e,headerAnchorSelector:t,delay:l,offset:n=5})=>{const r=ln(),i=nn(),s=Pu(()=>{var c,u,d,v;const g=Array.from(document.querySelectorAll(e)),m=Array.from(document.querySelectorAll(t)).filter(w=>g.some(L=>L.hash===w.hash)),_=Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop),f=window.innerHeight+_,y=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),P=Math.abs(y-f)=((u=(c=L.parentElement)===null||c===void 0?void 0:c.offsetTop)!==null&&u!==void 0?u:0)-n,O=!S||_<((v=(d=S.parentElement)===null||d===void 0?void 0:d.offsetTop)!==null&&v!==void 0?v:0)-n;if(!(j||D&&O))continue;const B=decodeURIComponent(r.currentRoute.value.hash),q=decodeURIComponent(L.hash);if(B===q)return;if(P){for(let A=w+1;A{s(),window.addEventListener("scroll",s)}),lr(()=>{window.removeEventListener("scroll",s)}),et(()=>i.value.path,s)},f_=async(e,...t)=>{const{scrollBehavior:l}=e.options;e.options.scrollBehavior=void 0,await e.replace(...t).finally(()=>e.options.scrollBehavior=l)},__="a.sidebar-item",b_=".header-anchor",y_=300,k_=5;var E_=Ni(()=>{p_({headerLinkSelector:__,headerAnchorSelector:b_,delay:y_,offset:k_})}),P_=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Ln={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress - * @license MIT */(function(e,t){(function(l,n){e.exports=n()})(P_,function(){var l={};l.version="0.2.0";var n=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};l.configure=function(m){var _,f;for(_ in m)f=m[_],f!==void 0&&m.hasOwnProperty(_)&&(n[_]=f);return this},l.status=null,l.set=function(m){var _=l.isStarted();m=r(m,n.minimum,1),l.status=m===1?null:m;var f=l.render(!_),y=f.querySelector(n.barSelector),P=n.speed,w=n.easing;return f.offsetWidth,s(function(L){n.positionUsing===""&&(n.positionUsing=l.getPositioningCSS()),c(y,o(m,P,w)),m===1?(c(f,{transition:"none",opacity:1}),f.offsetWidth,setTimeout(function(){c(f,{transition:"all "+P+"ms linear",opacity:0}),setTimeout(function(){l.remove(),L()},P)},P)):setTimeout(L,P)}),this},l.isStarted=function(){return typeof l.status=="number"},l.start=function(){l.status||l.set(0);var m=function(){setTimeout(function(){!l.status||(l.trickle(),m())},n.trickleSpeed)};return n.trickle&&m(),this},l.done=function(m){return!m&&!l.status?this:l.inc(.3+.5*Math.random()).set(1)},l.inc=function(m){var _=l.status;return _?(typeof m!="number"&&(m=(1-_)*r(Math.random()*_,.1,.95)),_=r(_+m,0,.994),l.set(_)):l.start()},l.trickle=function(){return l.inc(Math.random()*n.trickleRate)},function(){var m=0,_=0;l.promise=function(f){return!f||f.state()==="resolved"?this:(_===0&&l.start(),m++,_++,f.always(function(){_--,_===0?(m=0,l.done()):l.set((m-_)/m)}),this)}}(),l.render=function(m){if(l.isRendered())return document.getElementById("nprogress");d(document.documentElement,"nprogress-busy");var _=document.createElement("div");_.id="nprogress",_.innerHTML=n.template;var f=_.querySelector(n.barSelector),y=m?"-100":i(l.status||0),P=document.querySelector(n.parent),w;return c(f,{transition:"all 0 linear",transform:"translate3d("+y+"%,0,0)"}),n.showSpinner||(w=_.querySelector(n.spinnerSelector),w&&b(w)),P!=document.body&&d(P,"nprogress-custom-parent"),P.appendChild(_),_},l.remove=function(){v(document.documentElement,"nprogress-busy"),v(document.querySelector(n.parent),"nprogress-custom-parent");var m=document.getElementById("nprogress");m&&b(m)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var m=document.body.style,_="WebkitTransform"in m?"Webkit":"MozTransform"in m?"Moz":"msTransform"in m?"ms":"OTransform"in m?"O":"";return _+"Perspective"in m?"translate3d":_+"Transform"in m?"translate":"margin"};function r(m,_,f){return m<_?_:m>f?f:m}function i(m){return(-1+m)*100}function o(m,_,f){var y;return n.positionUsing==="translate3d"?y={transform:"translate3d("+i(m)+"%,0,0)"}:n.positionUsing==="translate"?y={transform:"translate("+i(m)+"%,0)"}:y={"margin-left":i(m)+"%"},y.transition="all "+_+"ms "+f,y}var s=function(){var m=[];function _(){var f=m.shift();f&&f(_)}return function(f){m.push(f),m.length==1&&_()}}(),c=function(){var m=["Webkit","O","Moz","ms"],_={};function f(L){return L.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(S,j){return j.toUpperCase()})}function y(L){var S=document.body.style;if(L in S)return L;for(var j=m.length,D=L.charAt(0).toUpperCase()+L.slice(1),O;j--;)if(O=m[j]+D,O in S)return O;return L}function P(L){return L=f(L),_[L]||(_[L]=y(L))}function w(L,S,j){S=P(S),L.style[S]=j}return function(L,S){var j=arguments,D,O;if(j.length==2)for(D in S)O=S[D],O!==void 0&&S.hasOwnProperty(D)&&w(L,D,O);else w(L,j[1],j[2])}}();function u(m,_){var f=typeof m=="string"?m:g(m);return f.indexOf(" "+_+" ")>=0}function d(m,_){var f=g(m),y=f+_;u(f,_)||(m.className=y.substring(1))}function v(m,_){var f=g(m),y;!u(m,_)||(y=f.replace(" "+_+" "," "),m.className=y.substring(1,y.length-1))}function g(m){return(" "+(m.className||"")+" ").replace(/\s+/gi," ")}function b(m){m&&m.parentNode&&m.parentNode.removeChild(m)}return l})})(Ln);const w_=()=>{tt(()=>{const e=ln(),t=new Set;t.add(e.currentRoute.value.path),Ln.exports.configure({showSpinner:!1}),e.beforeEach(l=>{t.has(l.path)||Ln.exports.start()}),e.afterEach(l=>{t.add(l.path),Ln.exports.done()})})};var T_=Ni(()=>{w_()}),L_=Ni(()=>{_v(),Pv()});const O_=[E_,T_,L_],A_=[["v-8daa1a0e","/",{title:"Cooking with Solana"},["/index.html","/README.md"]],["v-2d0a8235","/de/",{title:"Kochen mit Solana"},["/de/index.html","/de/README.md"]],["v-6bf54404","/core-concepts/accounts.html",{title:"Accounts"},["/core-concepts/accounts","/core-concepts/accounts.md"]],["v-5f0a12cc","/core-concepts/cpi.html",{title:"Cross Program Invocations (CPIs)"},["/core-concepts/cpi","/core-concepts/cpi.md"]],["v-130ca978","/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/core-concepts/pdas","/core-concepts/pdas.md"]],["v-882009ca","/core-concepts/programs.html",{title:"Programs"},["/core-concepts/programs","/core-concepts/programs.md"]],["v-63197375","/core-concepts/transactions.html",{title:"Transactions"},["/core-concepts/transactions","/core-concepts/transactions.md"]],["v-7446c3bf","/fil/",{title:"Cooking with Solana"},["/fil/index.html","/fil/README.md"]],["v-2d0a8b4a","/fr/",{title:"Solana Cookbook"},["/fr/index.html","/fr/README.md"]],["v-345c0323","/gaming/auto-approve.html",{title:"How to auto approve transactions"},["/gaming/auto-approve","/gaming/auto-approve.md"]],["v-2119e6ee","/gaming/distribution.html",{title:"Distribution"},["/gaming/distribution","/gaming/distribution.md"]],["v-33bd6568","/gaming/energy-system.html",{title:"Energy System"},["/gaming/energy-system","/gaming/energy-system.md"]],["v-687f189c","/gaming/game-examples.html",{title:"Learn By Example"},["/gaming/game-examples","/gaming/game-examples.md"]],["v-00547d6c","/gaming/game-sdks.html",{title:"Solana Gaming SDKs"},["/gaming/game-sdks","/gaming/game-sdks.md"]],["v-3edbe329","/gaming/hello-world.html",{title:"Hello World example"},["/gaming/hello-world","/gaming/hello-world.md"]],["v-3d8530c8","/gaming/interact-with-tokens.html",{title:"How interact with tokens in programs"},["/gaming/interact-with-tokens","/gaming/interact-with-tokens.md"]],["v-c08c9418","/gaming/intro.html",{title:"Introduction to Gaming on Solana"},["/gaming/intro","/gaming/intro.md"]],["v-c4d04f5e","/gaming/nfts-in-games.html",{title:"Gaming with NFTs"},["/gaming/nfts-in-games","/gaming/nfts-in-games.md"]],["v-4ea6aa5e","/gaming/porting-anchor-to-unity.html",{title:"Port Anchor to Unity"},["/gaming/porting-anchor-to-unity","/gaming/porting-anchor-to-unity.md"]],["v-1e0c6857","/gaming/saving-game-state.html",{title:"Saving game state"},["/gaming/saving-game-state","/gaming/saving-game-state.md"]],["v-61d730b8","/gaming/store-sol-in-pda.html",{title:"Storing SOL in a PDA"},["/gaming/store-sol-in-pda","/gaming/store-sol-in-pda.md"]],["v-2d0a87a8","/es/",{title:"Libro de recetas de Solana"},["/es/index.html","/es/README.md"]],["v-4e8563af","/getting-started/installation.html",{title:"Installation"},["/getting-started/installation","/getting-started/installation.md"]],["v-76b1e9e3","/guides/account-maps.html",{title:"Account Maps"},["/guides/account-maps","/guides/account-maps.md"]],["v-6da58eef","/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/guides/data-migration","/guides/data-migration.md"]],["v-4684263f","/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/guides/debugging-solana-programs","/guides/debugging-solana-programs.md"]],["v-4740871a","/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/guides/feature-parity-testing","/guides/feature-parity-testing.md"]],["v-2b9a5458","/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/guides/get-program-accounts","/guides/get-program-accounts.md"]],["v-2e379628","/guides/serialization.html",{title:"Serializing Data"},["/guides/serialization","/guides/serialization.md"]],["v-7e81f36f","/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/guides/versioned-transactions","/guides/versioned-transactions.md"]],["v-2d0a94db","/id/",{title:"Buku Panduan Solana"},["/id/index.html","/id/README.md"]],["v-2d0a983f","/ja/",{title:"Cooking with Solana"},["/ja/index.html","/ja/README.md"]],["v-2d0a9e0f","/kr/",{title:"Cooking with Solana"},["/kr/index.html","/kr/README.md"]],["v-2d0ab112","/pt/",{title:"Cozinhando com a Solana"},["/pt/index.html","/pt/README.md"]],["v-6c467d65","/references/accounts.html",{title:"Accounts"},["/references/accounts","/references/accounts.md"]],["v-70f9aa12","/references/basic-transactions.html",{title:"Sending Transactions"},["/references/basic-transactions","/references/basic-transactions.md"]],["v-4dc29afa","/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/references/keypairs-and-wallets","/references/keypairs-and-wallets.md"]],["v-10b56a2e","/references/local-development.html",{title:"Local Development"},["/references/local-development","/references/local-development.md"]],["v-9eccd210","/references/name-service.html",{title:"Name Service"},["/references/name-service","/references/name-service.md"]],["v-d2aec298","/references/nfts.html",{title:"NFTs"},["/references/nfts","/references/nfts.md"]],["v-f8950628","/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/references/offline-transactions","/references/offline-transactions.md"]],["v-877d9708","/references/programs.html",{title:"Writing Programs"},["/references/programs","/references/programs.md"]],["v-26f90ae0","/references/staking.html",{title:"Staking"},["/references/staking","/references/staking.md"]],["v-0d096f0e","/references/token.html",{title:"Interacting with Tokens"},["/references/token","/references/token.md"]],["v-2d0abea2","/th/",{title:"Cooking \u0E01\u0E31\u0E1A Solana"},["/th/index.html","/th/README.md"]],["v-2d0abfd8","/tr/",{title:"Solana Cookbook"},["/tr/index.html","/tr/README.md"]],["v-2d0ac643","/vi/",{title:"Nh\u1EADp m\xF4n Solana"},["/vi/index.html","/vi/README.md"]],["v-2d0ad528","/zh/",{title:"Solana\u79D8\u7C4D"},["/zh/index.html","/zh/README.md"]],["v-15aaed93","/zh_t/",{title:"Solana\u7955\u7C4D"},["/zh_t/index.html","/zh_t/README.md"]],["v-8e5be170","/de/core-concepts/accounts.html",{title:"Accounts"},["/de/core-concepts/accounts","/de/core-concepts/accounts.md"]],["v-f2328ef0","/de/core-concepts/pdas.html",{title:"Programmabgeleitete Adressen (PDAs)"},["/de/core-concepts/pdas","/de/core-concepts/pdas.md"]],["v-08ccc65f","/de/core-concepts/programs.html",{title:"Programme"},["/de/core-concepts/programs","/de/core-concepts/programs.md"]],["v-1256fcb9","/de/core-concepts/transactions.html",{title:"Transaktionen"},["/de/core-concepts/transactions","/de/core-concepts/transactions.md"]],["v-2485abf3","/de/getting-started/installation.html",{title:"Installation"},["/de/getting-started/installation","/de/getting-started/installation.md"]],["v-1832f5c2","/de/guides/account-maps.html",{title:"Kontozuordnungen"},["/de/guides/account-maps","/de/guides/account-maps.md"]],["v-70204b2b","/de/guides/data-migration.html",{title:"Migrieren von Programmdatenkonten"},["/de/guides/data-migration","/de/guides/data-migration.md"]],["v-16deac83","/de/guides/debugging-solana-programs.html",{title:"Debuggen von Solana-Programmen"},["/de/guides/debugging-solana-programs","/de/guides/debugging-solana-programs.md"]],["v-732f06a2","/de/guides/feature-parity-testing.html",{title:"Funktionsparit\xE4tstest"},["/de/guides/feature-parity-testing","/de/guides/feature-parity-testing.md"]],["v-22a67510","/de/guides/get-program-accounts.html",{title:"Programmkonten Abfragen"},["/de/guides/get-program-accounts","/de/guides/get-program-accounts.md"]],["v-309da254","/de/guides/retrying-transactions.html",{title:"Transaktionen Wiederholen"},["/de/guides/retrying-transactions","/de/guides/retrying-transactions.md"]],["v-5796626c","/de/guides/serialization.html",{title:"Serialisieren von Daten"},["/de/guides/serialization","/de/guides/serialization.md"]],["v-2d09cebe","/de/references/accounts.html",{title:"Accounts"},["/de/references/accounts","/de/references/accounts.md"]],["v-9ce8299a","/de/references/basic-transactions.html",{title:"Transaktionen versenden"},["/de/references/basic-transactions","/de/references/basic-transactions.md"]],["v-4ec78794","/de/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/de/references/keypairs-and-wallets","/de/references/keypairs-and-wallets.md"]],["v-32949b1c","/de/references/local-development.html",{title:"Local Development"},["/de/references/local-development","/de/references/local-development.md"]],["v-01539798","/de/references/name-service.html",{title:"Name Service"},["/de/references/name-service","/de/references/name-service.md"]],["v-6bf79020","/de/references/nfts.html",{title:"NFTs"},["/de/references/nfts","/de/references/nfts.md"]],["v-0e8f1e28","/de/references/offline-transactions.html",{title:"Senden von Offline-Transaktionen"},["/de/references/offline-transactions","/de/references/offline-transactions.md"]],["v-3975cfb8","/de/references/programs.html",{title:"Programme schreiben"},["/de/references/programs","/de/references/programs.md"]],["v-7cf087d4","/de/references/staking.html",{title:"Staking"},["/de/references/staking","/de/references/staking.md"]],["v-4520fd52","/de/references/token.html",{title:"Interaktion mit Tokens"},["/de/references/token","/de/references/token.md"]],["v-a0b9b104","/fil/core-concepts/accounts.html",{title:"Accounts"},["/fil/core-concepts/accounts","/fil/core-concepts/accounts.md"]],["v-9a7329dc","/fil/core-concepts/cpi.html",{title:"Cross Program Invocations (CPIs)"},["/fil/core-concepts/cpi","/fil/core-concepts/cpi.md"]],["v-1a485bbe","/fil/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/fil/core-concepts/pdas","/fil/core-concepts/pdas.md"]],["v-00c442d6","/fil/core-concepts/programs.html",{title:"Programs"},["/fil/core-concepts/programs","/fil/core-concepts/programs.md"]],["v-e455ec22","/fil/core-concepts/transactions.html",{title:"Transactions"},["/fil/core-concepts/transactions","/fil/core-concepts/transactions.md"]],["v-eb393c2e","/fil/gaming/auto-approve.html",{title:"How to auto approve transactions"},["/fil/gaming/auto-approve","/fil/gaming/auto-approve.md"]],["v-772145b4","/fil/gaming/distribution.html",{title:"Distribution"},["/fil/gaming/distribution","/fil/gaming/distribution.md"]],["v-5105c746","/fil/gaming/energy-system.html",{title:"Energy System"},["/fil/gaming/energy-system","/fil/gaming/energy-system.md"]],["v-5938dad4","/fil/gaming/game-examples.html",{title:"Learn By Example"},["/fil/gaming/game-examples","/fil/gaming/game-examples.md"]],["v-f1adf734","/fil/gaming/game-sdks.html",{title:"Solana Gaming SDKs"},["/fil/gaming/game-sdks","/fil/gaming/game-sdks.md"]],["v-62aa93a3","/fil/gaming/hello-world.html",{title:"Hello World example"},["/fil/gaming/hello-world","/fil/gaming/hello-world.md"]],["v-6a3c698e","/fil/gaming/interact-with-tokens.html",{title:"How interact with tokens in programs"},["/fil/gaming/interact-with-tokens","/fil/gaming/interact-with-tokens.md"]],["v-a2e66c24","/fil/gaming/intro.html",{title:"Introduction to Gaming on Solana"},["/fil/gaming/intro","/fil/gaming/intro.md"]],["v-087c524b","/fil/gaming/nfts-in-games.html",{title:"Gaming with NFTs"},["/fil/gaming/nfts-in-games","/fil/gaming/nfts-in-games.md"]],["v-7664744b","/fil/gaming/porting-anchor-to-unity.html",{title:"Port Anchor to Unity"},["/fil/gaming/porting-anchor-to-unity","/fil/gaming/porting-anchor-to-unity.md"]],["v-2dcf5551","/fil/gaming/saving-game-state.html",{title:"Saving game state"},["/fil/gaming/saving-game-state","/fil/gaming/saving-game-state.md"]],["v-0122f36a","/fil/gaming/store-sol-in-pda.html",{title:"Storing SOL in a PDA"},["/fil/gaming/store-sol-in-pda","/fil/gaming/store-sol-in-pda.md"]],["v-8e9578ae","/fil/getting-started/installation.html",{title:"Installation"},["/fil/getting-started/installation","/fil/getting-started/installation.md"]],["v-668d6eae","/fil/guides/account-maps.html",{title:"Account Maps"},["/fil/guides/account-maps","/fil/guides/account-maps.md"]],["v-5f505435","/fil/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/fil/guides/data-migration","/fil/guides/data-migration.md"]],["v-556f7939","/fil/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/fil/guides/debugging-solana-programs","/fil/guides/debugging-solana-programs.md"]],["v-8fa8488e","/fil/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/fil/guides/feature-parity-testing","/fil/guides/feature-parity-testing.md"]],["v-16ea0e9a","/fil/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/fil/guides/get-program-accounts","/fil/guides/get-program-accounts.md"]],["v-cdc7dfbc","/fil/guides/serialization.html",{title:"Serializing Data"},["/fil/guides/serialization","/fil/guides/serialization.md"]],["v-5a4e12b5","/fil/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/fil/guides/versioned-transactions","/fil/guides/versioned-transactions.md"]],["v-7b6447aa","/fil/references/accounts.html",{title:"Accounts"},["/fil/references/accounts","/fil/references/accounts.md"]],["v-b9616b86","/fil/references/basic-transactions.html",{title:"Sending Transactions"},["/fil/references/basic-transactions","/fil/references/basic-transactions.md"]],["v-670400c0","/fil/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/fil/references/keypairs-and-wallets","/fil/references/keypairs-and-wallets.md"]],["v-7ae54a28","/fil/references/local-development.html",{title:"Local Development"},["/fil/references/local-development","/fil/references/local-development.md"]],["v-3aafba84","/fil/references/name-service.html",{title:"Name Service"},["/fil/references/name-service","/fil/references/name-service.md"]],["v-87eb5f0c","/fil/references/nfts.html",{title:"NFTs"},["/fil/references/nfts","/fil/references/nfts.md"]],["v-c6123a9c","/fil/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/fil/references/offline-transactions","/fil/references/offline-transactions.md"]],["v-12489342","/fil/references/programs.html",{title:"Writing Programs"},["/fil/references/programs","/fil/references/programs.md"]],["v-10522b0a","/fil/references/staking.html",{title:"Staking"},["/fil/references/staking","/fil/references/staking.md"]],["v-d84413f0","/fil/references/token.html",{title:"Interacting with Tokens"},["/fil/references/token","/fil/references/token.md"]],["v-598bfdda","/fr/core-concepts/accounts.html",{title:"Comptes"},["/fr/core-concepts/accounts","/fr/core-concepts/accounts.md"]],["v-034daf46","/fr/core-concepts/cpi.html",{title:"Invocations de Programme Crois\xE9 (CPIs)"},["/fr/core-concepts/cpi","/fr/core-concepts/cpi.md"]],["v-410d47d3","/fr/core-concepts/pdas.html",{title:"Adresses d\xE9riv\xE9es de programmes (PDAs)"},["/fr/core-concepts/pdas","/fr/core-concepts/pdas.md"]],["v-2334b82a","/fr/core-concepts/programs.html",{title:"Programmes"},["/fr/core-concepts/programs","/fr/core-concepts/programs.md"]],["v-1ee9ddf8","/fr/core-concepts/transactions.html",{title:"Transactions"},["/fr/core-concepts/transactions","/fr/core-concepts/transactions.md"]],["v-3c3bf874","/fr/gaming/auto-approve.html",{title:"How to auto approve transactions"},["/fr/gaming/auto-approve","/fr/gaming/auto-approve.md"]],["v-28f9dc3f","/fr/gaming/distribution.html",{title:"Distribution"},["/fr/gaming/distribution","/fr/gaming/distribution.md"]],["v-4b7ffbca","/fr/gaming/energy-system.html",{title:"Syst\xE8me d'Energie"},["/fr/gaming/energy-system","/fr/gaming/energy-system.md"]],["v-5c9dcd6b","/fr/gaming/game-examples.html",{title:"Apprendre par l'exemple"},["/fr/gaming/game-examples","/fr/gaming/game-examples.md"]],["v-16181c8a","/fr/gaming/game-sdks.html",{title:"SDKs pour le gaming sur Solana"},["/fr/gaming/game-sdks","/fr/gaming/game-sdks.md"]],["v-ed210090","/fr/gaming/hello-world.html",{title:"Exemple Hello World"},["/fr/gaming/hello-world","/fr/gaming/hello-world.md"]],["v-5e474519","/fr/gaming/interact-with-tokens.html",{title:"Comment interagir avec des jetons dans des programmes"},["/fr/gaming/interact-with-tokens","/fr/gaming/interact-with-tokens.md"]],["v-5625a9c3","/fr/gaming/intro.html",{title:"Introduction au gaming sur Solana"},["/fr/gaming/intro","/fr/gaming/intro.md"]],["v-dc92e5c0","/fr/gaming/nfts-in-games.html",{title:"Gaming avec des NFTs"},["/fr/gaming/nfts-in-games","/fr/gaming/nfts-in-games.md"]],["v-1c322e40","/fr/gaming/porting-anchor-to-unity.html",{title:"Portage d'Anchor vers Unity"},["/fr/gaming/porting-anchor-to-unity","/fr/gaming/porting-anchor-to-unity.md"]],["v-71d3c4b4","/fr/gaming/saving-game-state.html",{title:"Sauvegarder l'\xE9tat d'un jeu"},["/fr/gaming/saving-game-state","/fr/gaming/saving-game-state.md"]],["v-50674c75","/fr/gaming/store-sol-in-pda.html",{title:"Stockage de SOL dans un PDA"},["/fr/gaming/store-sol-in-pda","/fr/gaming/store-sol-in-pda.md"]],["v-4605d97e","/fr/getting-started/installation.html",{title:"Installation"},["/fr/getting-started/installation","/fr/getting-started/installation.md"]],["v-7e91df34","/fr/guides/account-maps.html",{title:"Maps de Comptes"},["/fr/guides/account-maps","/fr/guides/account-maps.md"]],["v-05451800","/fr/guides/data-migration.html",{title:"Migration des Comptes de Donn\xE9es de Programmes"},["/fr/guides/data-migration","/fr/guides/data-migration.md"]],["v-0bb1c6e4","/fr/guides/debugging-solana-programs.html",{title:"D\xE9bogage des Programmes Solana"},["/fr/guides/debugging-solana-programs","/fr/guides/debugging-solana-programs.md"]],["v-5623fef8","/fr/guides/feature-parity-testing.html",{title:"Test de Conformit\xE9 des Fonctionnalit\xE9s"},["/fr/guides/feature-parity-testing","/fr/guides/feature-parity-testing.md"]],["v-0af4ea25","/fr/guides/get-program-accounts.html",{title:"Obtenir les comptes d'un programme"},["/fr/guides/get-program-accounts","/fr/guides/get-program-accounts.md"]],["v-22564af7","/fr/guides/serialization.html",{title:"S\xE9rialisation des donn\xE9es"},["/fr/guides/serialization","/fr/guides/serialization.md"]],["v-77103780","/fr/guides/versioned-transactions.html",{title:"Transactions Versionn\xE9es"},["/fr/guides/versioned-transactions","/fr/guides/versioned-transactions.md"]],["v-742672b6","/fr/references/accounts.html",{title:"Comptes"},["/fr/references/accounts","/fr/references/accounts.md"]],["v-7fdd21f0","/fr/references/basic-transactions.html",{title:"Envoyer des Transactions"},["/fr/references/basic-transactions","/fr/references/basic-transactions.md"]],["v-5bd01ecb","/fr/references/keypairs-and-wallets.html",{title:"Paires de Cl\xE9s et Portefeuilles"},["/fr/references/keypairs-and-wallets","/fr/references/keypairs-and-wallets.md"]],["v-0835dffd","/fr/references/local-development.html",{title:"D\xE9veloppement Local"},["/fr/references/local-development","/fr/references/local-development.md"]],["v-31ec7bc9","/fr/references/name-service.html",{title:"Service de Noms"},["/fr/references/name-service","/fr/references/name-service.md"]],["v-3331e485","/fr/references/nfts.html",{title:"NFTs"},["/fr/references/nfts","/fr/references/nfts.md"]],["v-dc79fe86","/fr/references/offline-transactions.html",{title:"Envoi de transactions hors connexion"},["/fr/references/offline-transactions","/fr/references/offline-transactions.md"]],["v-77bdac66","/fr/references/programs.html",{title:"\xC9crire des Programmes"},["/fr/references/programs","/fr/references/programs.md"]],["v-3717171f","/fr/references/staking.html",{title:"Staking"},["/fr/references/staking","/fr/references/staking.md"]],["v-01a8e35d","/fr/references/token.html",{title:"Interaction avec les Jetons"},["/fr/references/token","/fr/references/token.md"]],["v-08458c16","/es/core-concepts/accounts.html",{title:"Cuentas"},["/es/core-concepts/accounts","/es/core-concepts/accounts.md"]],["v-79377c96","/es/core-concepts/pdas.html",{title:"Direcciones derivadas de programa (PDAs)"},["/es/core-concepts/pdas","/es/core-concepts/pdas.md"]],["v-4bd7f10c","/es/core-concepts/programs.html",{title:"Programas"},["/es/core-concepts/programs","/es/core-concepts/programs.md"]],["v-314308e6","/es/core-concepts/transactions.html",{title:"Transacciones"},["/es/core-concepts/transactions","/es/core-concepts/transactions.md"]],["v-389f60e0","/es/getting-started/installation.html",{title:"Instalaci\xF3n"},["/es/getting-started/installation","/es/getting-started/installation.md"]],["v-471a2192","/es/guides/account-maps.html",{title:"C\xF3mo usar Map en cuentas"},["/es/guides/account-maps","/es/guides/account-maps.md"]],["v-7642d244","/es/guides/data-migration.html",{title:"Migrando cuentas de datos de programas"},["/es/guides/data-migration","/es/guides/data-migration.md"]],["v-6c0a22f0","/es/guides/debugging-solana-programs.html",{title:"Depurando Programas en Solana"},["/es/guides/debugging-solana-programs","/es/guides/debugging-solana-programs.md"]],["v-35856562","/es/guides/feature-parity-testing.html",{title:"Prueba de paridad de caracter\xEDsticas"},["/es/guides/feature-parity-testing","/es/guides/feature-parity-testing.md"]],["v-3d8822fa","/es/guides/get-program-accounts.html",{title:"Obtener cuentas de programa"},["/es/guides/get-program-accounts","/es/guides/get-program-accounts.md"]],["v-6ad65459","/es/guides/serialization.html",{title:"Serializando datos"},["/es/guides/serialization","/es/guides/serialization.md"]],["v-3caeb514","/es/references/accounts.html",{title:"Cuentas"},["/es/references/accounts","/es/references/accounts.md"]],["v-20a8d3e6","/es/references/basic-transactions.html",{title:"Enviando transacciones"},["/es/references/basic-transactions","/es/references/basic-transactions.md"]],["v-17bc77ae","/es/references/keypairs-and-wallets.html",{title:"Pares de llaves y billeteras"},["/es/references/keypairs-and-wallets","/es/references/keypairs-and-wallets.md"]],["v-0a613142","/es/references/local-development.html",{title:"Desarrollo en entorno local"},["/es/references/local-development","/es/references/local-development.md"]],["v-1db05f27","/es/references/name-service.html",{title:"Servicio de nombres"},["/es/references/name-service","/es/references/name-service.md"]],["v-6f8605e3","/es/references/nfts.html",{title:"NFTs"},["/es/references/nfts","/es/references/nfts.md"]],["v-2a14a61b","/es/references/offline-transactions.html",{title:"Enviando transacciones offline"},["/es/references/offline-transactions","/es/references/offline-transactions.md"]],["v-e6ad27aa","/es/references/programs.html",{title:"Escribiendo Programas"},["/es/references/programs","/es/references/programs.md"]],["v-8d23ddfe","/es/references/staking.html",{title:"Staking"},["/es/references/staking","/es/references/staking.md"]],["v-4fd8edbf","/es/references/token.html",{title:"Interactuando con tokens"},["/es/references/token","/es/references/token.md"]],["v-da3cf63c","/id/core-concepts/accounts.html",{title:"Akun"},["/id/core-concepts/accounts","/id/core-concepts/accounts.md"]],["v-0bf50b22","/id/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/id/core-concepts/pdas","/id/core-concepts/pdas.md"]],["v-3a47880e","/id/core-concepts/programs.html",{title:"Program"},["/id/core-concepts/programs","/id/core-concepts/programs.md"]],["v-73c3d55a","/id/core-concepts/transactions.html",{title:"Transaksi"},["/id/core-concepts/transactions","/id/core-concepts/transactions.md"]],["v-02e9060d","/id/getting-started/installation.html",{title:"Instalasi"},["/id/getting-started/installation","/id/getting-started/installation.md"]],["v-10a285c5","/id/guides/account-maps.html",{title:"Peta Akun"},["/id/guides/account-maps","/id/guides/account-maps.md"]],["v-4ddeba51","/id/guides/data-migration.html",{title:"Migrasi Akun Data Program"},["/id/guides/data-migration","/id/guides/data-migration.md"]],["v-0173699d","/id/guides/debugging-solana-programs.html",{title:"Debug Program Solana"},["/id/guides/debugging-solana-programs","/id/guides/debugging-solana-programs.md"]],["v-971f3456","/id/guides/feature-parity-testing.html",{title:"Pengujian Paritas Fitur"},["/id/guides/feature-parity-testing","/id/guides/feature-parity-testing.md"]],["v-307b2094","/id/guides/get-program-accounts.html",{title:"Mendapatkan Akun Program"},["/id/guides/get-program-accounts","/id/guides/get-program-accounts.md"]],["v-5b4b12f4","/id/guides/serialization.html",{title:"Serialisasi Data"},["/id/guides/serialization","/id/guides/serialization.md"]],["v-06371947","/id/references/accounts.html",{title:"Akun"},["/id/references/accounts","/id/references/accounts.md"]],["v-c0d8574e","/id/references/basic-transactions.html",{title:"Mengirim Transaksi"},["/id/references/basic-transactions","/id/references/basic-transactions.md"]],["v-644e73dc","/id/references/keypairs-and-wallets.html",{title:"Keypairs & Wallets"},["/id/references/keypairs-and-wallets","/id/references/keypairs-and-wallets.md"]],["v-75cde6e8","/id/references/local-development.html",{title:"Development Lokal"},["/id/references/local-development","/id/references/local-development.md"]],["v-673571da","/id/references/name-service.html",{title:"Name Service"},["/id/references/name-service","/id/references/name-service.md"]],["v-931308d4","/id/references/nfts.html",{title:"NFT"},["/id/references/nfts","/id/references/nfts.md"]],["v-cb7d5464","/id/references/offline-transactions.html",{title:"Mengirim Transaksi Offline"},["/id/references/offline-transactions","/id/references/offline-transactions.md"]],["v-5631d05e","/id/references/programs.html",{title:"Menulis Program"},["/id/references/programs","/id/references/programs.md"]],["v-01feda6e","/id/references/staking.html",{title:"Staking"},["/id/references/staking","/id/references/staking.md"]],["v-3211a328","/id/references/token.html",{title:"Interaksi dengan Token"},["/id/references/token","/id/references/token.md"]],["v-179e82fe","/ja/core-concepts/accounts.html",{title:"\u30A2\u30AB\u30A6\u30F3\u30C8"},["/ja/core-concepts/accounts","/ja/core-concepts/accounts.md"]],["v-52ffdf92","/ja/core-concepts/cpi.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI)"},["/ja/core-concepts/cpi","/ja/core-concepts/cpi.md"]],["v-fd851184","/ja/core-concepts/pdas.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(PDA)"},["/ja/core-concepts/pdas","/ja/core-concepts/pdas.md"]],["v-67993a15","/ja/core-concepts/programs.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0"},["/ja/core-concepts/programs","/ja/core-concepts/programs.md"]],["v-ec92b522","/ja/core-concepts/transactions.html",{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3"},["/ja/core-concepts/transactions","/ja/core-concepts/transactions.md"]],["v-429dff29","/ja/getting-started/installation.html",{title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB"},["/ja/getting-started/installation","/ja/getting-started/installation.md"]],["v-44679d29","/ja/guides/account-maps.html",{title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30DE\u30C3\u30D7"},["/ja/guides/account-maps","/ja/guides/account-maps.md"]],["v-b688ee96","/ja/guides/data-migration.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u79FB\u884C"},["/ja/guides/data-migration","/ja/guides/data-migration.md"]],["v-04e3168e","/ja/guides/debugging-solana-programs.html",{title:"Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30D0\u30C3\u30B0"},["/ja/guides/debugging-solana-programs","/ja/guides/debugging-solana-programs.md"]],["v-6b5a9039","/ja/guides/feature-parity-testing.html",{title:"\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8"},["/ja/guides/feature-parity-testing","/ja/guides/feature-parity-testing.md"]],["v-d18839cc","/ja/guides/get-program-accounts.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97"},["/ja/guides/get-program-accounts","/ja/guides/get-program-accounts.md"]],["v-17384ba2","/ja/guides/serialization.html",{title:"\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3"},["/ja/guides/serialization","/ja/guides/serialization.md"]],["v-0d7cc735","/ja/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/ja/guides/versioned-transactions","/ja/guides/versioned-transactions.md"]],["v-39fc30ab","/ja/references/accounts.html",{title:"\u30A2\u30AB\u30A6\u30F3\u30C8"},["/ja/references/accounts","/ja/references/accounts.md"]],["v-567dfebd","/ja/references/basic-transactions.html",{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1"},["/ja/references/basic-transactions","/ja/references/basic-transactions.md"]],["v-09579540","/ja/references/keypairs-and-wallets.html",{title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8"},["/ja/references/keypairs-and-wallets","/ja/references/keypairs-and-wallets.md"]],["v-04ce05a8","/ja/references/local-development.html",{title:"\u30ED\u30FC\u30AB\u30EB\u958B\u767A"},["/ja/references/local-development","/ja/references/local-development.md"]],["v-7a18373e","/ja/references/name-service.html",{title:"\u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9"},["/ja/references/name-service","/ja/references/name-service.md"]],["v-6d16e4fa","/ja/references/nfts.html",{title:"NFT"},["/ja/references/nfts","/ja/references/nfts.md"]],["v-3f4a7732","/ja/references/offline-transactions.html",{title:"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1"},["/ja/references/offline-transactions","/ja/references/offline-transactions.md"]],["v-ec12307c","/ja/references/programs.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F5C\u6210"},["/ja/references/programs","/ja/references/programs.md"]],["v-7747468a","/ja/references/staking.html",{title:"\u30B9\u30C6\u30FC\u30AD\u30F3\u30B0"},["/ja/references/staking","/ja/references/staking.md"]],["v-0463f188","/ja/references/token.html",{title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u306E\u5BFE\u8A71"},["/ja/references/token","/ja/references/token.md"]],["v-52cd49a4","/kr/core-concepts/accounts.html",{title:"Accounts"},["/kr/core-concepts/accounts","/kr/core-concepts/accounts.md"]],["v-4a4be76e","/kr/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/kr/core-concepts/pdas","/kr/core-concepts/pdas.md"]],["v-26941245","/kr/core-concepts/programs.html",{title:"Programs"},["/kr/core-concepts/programs","/kr/core-concepts/programs.md"]],["v-2229e59f","/kr/core-concepts/transactions.html",{title:"Transactions"},["/kr/core-concepts/transactions","/kr/core-concepts/transactions.md"]],["v-e97c194e","/kr/getting-started/installation.html",{title:"Installation"},["/kr/getting-started/installation","/kr/getting-started/installation.md"]],["v-c5b19a0e","/kr/guides/account-maps.html",{title:"Account Maps"},["/kr/guides/account-maps","/kr/guides/account-maps.md"]],["v-68262af6","/kr/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/kr/guides/data-migration","/kr/guides/data-migration.md"]],["v-a4865e2e","/kr/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/kr/guides/debugging-solana-programs","/kr/guides/debugging-solana-programs.md"]],["v-37352209","/kr/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/kr/guides/feature-parity-testing","/kr/guides/feature-parity-testing.md"]],["v-0d30a8ea","/kr/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/kr/guides/get-program-accounts","/kr/guides/get-program-accounts.md"]],["v-5329205c","/kr/guides/serialization.html",{title:"Serializing Data"},["/kr/guides/serialization","/kr/guides/serialization.md"]],["v-da88730a","/kr/references/accounts.html",{title:"Accounts"},["/kr/references/accounts","/kr/references/accounts.md"]],["v-2258908d","/kr/references/basic-transactions.html",{title:"Sending Transactions"},["/kr/references/basic-transactions","/kr/references/basic-transactions.md"]],["v-48d4f310","/kr/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/kr/references/keypairs-and-wallets","/kr/references/keypairs-and-wallets.md"]],["v-4d71f9d8","/kr/references/local-development.html",{title:"Local Development"},["/kr/references/local-development","/kr/references/local-development.md"]],["v-cb0f35e4","/kr/references/name-service.html",{title:"Name Service"},["/kr/references/name-service","/kr/references/name-service.md"]],["v-b3ac3a6c","/kr/references/nfts.html",{title:"NFTs"},["/kr/references/nfts","/kr/references/nfts.md"]],["v-7ec7d502","/kr/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/kr/references/offline-transactions","/kr/references/offline-transactions.md"]],["v-3a9304dc","/kr/references/programs.html",{title:"Writing Programs"},["/kr/references/programs","/kr/references/programs.md"]],["v-4055b6ba","/kr/references/staking.html",{title:"Staking"},["/kr/references/staking","/kr/references/staking.md"]],["v-249ea490","/kr/references/token.html",{title:"Interacting with Tokens"},["/kr/references/token","/kr/references/token.md"]],["v-2c987e4b","/pt/core-concepts/accounts.html",{title:"Contas"},["/pt/core-concepts/accounts","/pt/core-concepts/accounts.md"]],["v-203f4825","/pt/core-concepts/cpi.html",{title:"Invoca\xE7\xF5es de Programas Cruzados (CPIs)"},["/pt/core-concepts/cpi","/pt/core-concepts/cpi.md"]],["v-5beb210b","/pt/core-concepts/pdas.html",{title:"Endere\xE7os Derivados de Programa (PDAs)"},["/pt/core-concepts/pdas","/pt/core-concepts/pdas.md"]],["v-7c933562","/pt/core-concepts/programs.html",{title:"Programas"},["/pt/core-concepts/programs","/pt/core-concepts/programs.md"]],["v-4f78323c","/pt/core-concepts/transactions.html",{title:"Transa\xE7\xF5es"},["/pt/core-concepts/transactions","/pt/core-concepts/transactions.md"]],["v-c3a0e694","/pt/getting-started/installation.html",{title:"Instala\xE7\xE3o"},["/pt/getting-started/installation","/pt/getting-started/installation.md"]],["v-8121a608","/pt/guides/account-maps.html",{title:"Mapeamentos de Conta"},["/pt/guides/account-maps","/pt/guides/account-maps.md"]],["v-7c1e6fc8","/pt/guides/data-migration.html",{title:"Migrando Contas de Dados do Programa"},["/pt/guides/data-migration","/pt/guides/data-migration.md"]],["v-19571874","/pt/guides/debugging-solana-programs.html",{title:"Depurando Programas da Solana"},["/pt/guides/debugging-solana-programs","/pt/guides/debugging-solana-programs.md"]],["v-fc0a9768","/pt/guides/feature-parity-testing.html",{title:"Teste de Paridade de Recursos"},["/pt/guides/feature-parity-testing","/pt/guides/feature-parity-testing.md"]],["v-eca82026","/pt/guides/get-program-accounts.html",{title:"Obter Contas do Programa"},["/pt/guides/get-program-accounts","/pt/guides/get-program-accounts.md"]],["v-05ba93a2","/pt/guides/serialization.html",{title:"Serializando Dados"},["/pt/guides/serialization","/pt/guides/serialization.md"]],["v-241ceb48","/pt/guides/versioned-transactions.html",{title:"Transa\xE7\xF5es Versionadas"},["/pt/guides/versioned-transactions","/pt/guides/versioned-transactions.md"]],["v-95f87f04","/pt/references/accounts.html",{title:"Contas"},["/pt/references/accounts","/pt/references/accounts.md"]],["v-6d1e22d0","/pt/references/basic-transactions.html",{title:"Enviando Transa\xE7\xF5es"},["/pt/references/basic-transactions","/pt/references/basic-transactions.md"]],["v-0f01feda","/pt/references/keypairs-and-wallets.html",{title:"Pares de Chaves e Carteiras"},["/pt/references/keypairs-and-wallets","/pt/references/keypairs-and-wallets.md"]],["v-605f9335","/pt/references/local-development.html",{title:"Desenvolvimento Local"},["/pt/references/local-development","/pt/references/local-development.md"]],["v-045da591","/pt/references/name-service.html",{title:"Servi\xE7o de Nomes"},["/pt/references/name-service","/pt/references/name-service.md"]],["v-262d564d","/pt/references/nfts.html",{title:"NFTs"},["/pt/references/nfts","/pt/references/nfts.md"]],["v-2e71e285","/pt/references/offline-transactions.html",{title:"Enviando Transa\xE7\xF5es Offline"},["/pt/references/offline-transactions","/pt/references/offline-transactions.md"]],["v-04fe7795","/pt/references/programs.html",{title:"Escrevendo Programas"},["/pt/references/programs","/pt/references/programs.md"]],["v-51f4f057","/pt/references/staking.html",{title:"Staking"},["/pt/references/staking","/pt/references/staking.md"]],["v-6e1baa95","/pt/references/token.html",{title:"Interagindo com Tokens"},["/pt/references/token","/pt/references/token.md"]],["v-3f8c76bb","/th/core-concepts/accounts.html",{title:"Accounts"},["/th/core-concepts/accounts","/th/core-concepts/accounts.md"]],["v-310cd17b","/th/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/th/core-concepts/pdas","/th/core-concepts/pdas.md"]],["v-e0f1a45c","/th/core-concepts/programs.html",{title:"Programs"},["/th/core-concepts/programs","/th/core-concepts/programs.md"]],["v-5dda72ac","/th/core-concepts/transactions.html",{title:"Transactions"},["/th/core-concepts/transactions","/th/core-concepts/transactions.md"]],["v-c5f91db4","/th/getting-started/installation.html",{title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07"},["/th/getting-started/installation","/th/getting-started/installation.md"]],["v-e2f8eae8","/th/guides/account-maps.html",{title:"Account Maps"},["/th/guides/account-maps","/th/guides/account-maps.md"]],["v-50dcad50","/th/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/th/guides/data-migration","/th/guides/data-migration.md"]],["v-387ebf94","/th/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/th/guides/debugging-solana-programs","/th/guides/debugging-solana-programs.md"]],["v-5da35ddc","/th/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/th/guides/feature-parity-testing","/th/guides/feature-parity-testing.md"]],["v-4791bd7d","/th/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/th/guides/get-program-accounts","/th/guides/get-program-accounts.md"]],["v-109a0a9f","/th/guides/serialization.html",{title:"Serializing Data"},["/th/guides/serialization","/th/guides/serialization.md"]],["v-0074d650","/th/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/th/guides/versioned-transactions","/th/guides/versioned-transactions.md"]],["v-f7cfc3e4","/th/references/accounts.html",{title:"Accounts"},["/th/references/accounts","/th/references/accounts.md"]],["v-48c6cc60","/th/references/basic-transactions.html",{title:"Sending Transactions"},["/th/references/basic-transactions","/th/references/basic-transactions.md"]],["v-e6b8f3ba","/th/references/keypairs-and-wallets.html",{title:"Keypairs \u0E41\u0E25\u0E30 Wallets"},["/th/references/keypairs-and-wallets","/th/references/keypairs-and-wallets.md"]],["v-5f3377a5","/th/references/local-development.html",{title:"Local Development"},["/th/references/local-development","/th/references/local-development.md"]],["v-4fe8bb21","/th/references/name-service.html",{title:"Name Service"},["/th/references/name-service","/th/references/name-service.md"]],["v-00aefbdd","/th/references/nfts.html",{title:"NFTs"},["/th/references/nfts","/th/references/nfts.md"]],["v-7ad32fd6","/th/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/th/references/offline-transactions","/th/references/offline-transactions.md"]],["v-57da55b6","/th/references/programs.html",{title:"\u0E40\u0E02\u0E35\u0E22\u0E19 Programs"},["/th/references/programs","/th/references/programs.md"]],["v-2716a0c7","/th/references/staking.html",{title:"Staking"},["/th/references/staking","/th/references/staking.md"]],["v-386291f6","/th/references/token.html",{title:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 Tokens"},["/th/references/token","/th/references/token.md"]],["v-46a93876","/tr/core-concepts/accounts.html",{title:"Accounts (Account\u2019lar)"},["/tr/core-concepts/accounts","/tr/core-concepts/accounts.md"]],["v-5aefd385","/tr/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs) (Programdan T\xFCretilmi\u015F Adresler)"},["/tr/core-concepts/pdas","/tr/core-concepts/pdas.md"]],["v-2ca61adc","/tr/core-concepts/programs.html",{title:"Programs (Programlar)"},["/tr/core-concepts/programs","/tr/core-concepts/programs.md"]],["v-4847cab6","/tr/core-concepts/transactions.html",{title:"Transactions (\u0130\u015Flemler)"},["/tr/core-concepts/transactions","/tr/core-concepts/transactions.md"]],["v-bd0a22a0","/tr/getting-started/installation.html",{title:"Installation"},["/tr/getting-started/installation","/tr/getting-started/installation.md"]],["v-bdfe6c7c","/tr/guides/account-maps.html",{title:"Account Maps (Hesap Haritalar\u0131)"},["/tr/guides/account-maps","/tr/guides/account-maps.md"]],["v-3fbbf30e","/tr/guides/data-migration.html",{title:"Migrating a Programs Data Accounts (Programlar\u0131n Data Account\u2019lar\u0131n\u0131 Ta\u015F\u0131ma)"},["/tr/guides/data-migration","/tr/guides/data-migration.md"]],["v-846b6e80","/tr/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs (Solana Programlar\u0131nda Hata Ay\u0131klama)"},["/tr/guides/debugging-solana-programs","/tr/guides/debugging-solana-programs.md"]],["v-2fc8dcdc","/tr/guides/feature-parity-testing.html",{title:"Feature Parity Testing (\xD6zellik Parite Testi)"},["/tr/guides/feature-parity-testing","/tr/guides/feature-parity-testing.md"]],["v-aa61329a","/tr/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/tr/guides/get-program-accounts","/tr/guides/get-program-accounts.md"]],["v-4dc4b229","/tr/guides/serialization.html",{title:"Serializing Data (Serile\u015Ftirme)"},["/tr/guides/serialization","/tr/guides/serialization.md"]],["v-d2d54578","/tr/references/accounts.html",{title:"Accounts (Account\u2019lar)"},["/tr/references/accounts","/tr/references/accounts.md"]],["v-5981ffd4","/tr/references/basic-transactions.html",{title:"Sending Transactions(\u0130\u015Flem G\xF6nderimi)"},["/tr/references/basic-transactions","/tr/references/basic-transactions.md"]],["v-59dda459","/tr/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/tr/references/keypairs-and-wallets","/tr/references/keypairs-and-wallets.md"]],["v-63aaf52f","/tr/references/local-development.html",{title:"Local Development (Yerel Geli\u015Ftirme)"},["/tr/references/local-development","/tr/references/local-development.md"]],["v-56a76f57","/tr/references/name-service.html",{title:"Name Service (Name Servisi)"},["/tr/references/name-service","/tr/references/name-service.md"]],["v-41e84613","/tr/references/nfts.html",{title:"Non Fungible Tokens (NFTs)"},["/tr/references/nfts","/tr/references/nfts.md"]],["v-e05ef36a","/tr/references/offline-transactions.html",{title:"Offline Transaction (\xC7evrimd\u0131\u015F\u0131 i\u015Flem)"},["/tr/references/offline-transactions","/tr/references/offline-transactions.md"]],["v-32dfd74a","/tr/references/programs.html",{title:"Writing Programs (Programlar\u0131 Yazma)"},["/tr/references/programs","/tr/references/programs.md"]],["v-50f9a2d1","/tr/references/staking.html",{title:"Staking (Stake Etme)"},["/tr/references/staking","/tr/references/staking.md"]],["v-6c8298e2","/tr/references/token.html",{title:"Interacting with Tokens (Token\u2019lar ile Etkile\u015Fim)"},["/tr/references/token","/tr/references/token.md"]],["v-6a35b27a","/vi/core-concepts/accounts.html",{title:"Accounts"},["/vi/core-concepts/accounts","/vi/core-concepts/accounts.md"]],["v-8e20768c","/vi/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/vi/core-concepts/pdas","/vi/core-concepts/pdas.md"]],["v-8b9f2cde","/vi/core-concepts/programs.html",{title:"Programs"},["/vi/core-concepts/programs","/vi/core-concepts/programs.md"]],["v-55f1b6eb","/vi/core-concepts/transactions.html",{title:"Transactions"},["/vi/core-concepts/transactions","/vi/core-concepts/transactions.md"]],["v-274abcb6","/vi/getting-started/installation.html",{title:"C\xE0i \u0111\u1EB7t"},["/vi/getting-started/installation","/vi/getting-started/installation.md"]],["v-02feff2d","/vi/guides/account-maps.html",{title:"Account Maps"},["/vi/guides/account-maps","/vi/guides/account-maps.md"]],["v-1b0279b9","/vi/guides/data-migration.html",{title:"N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Program Account"},["/vi/guides/data-migration","/vi/guides/data-migration.md"]],["v-5afd7935","/vi/guides/debugging-solana-programs.html",{title:"So\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana"},["/vi/guides/debugging-solana-programs","/vi/guides/debugging-solana-programs.md"]],["v-0d9b8586","/vi/guides/feature-parity-testing.html",{title:"\u0110\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity"},["/vi/guides/feature-parity-testing","/vi/guides/feature-parity-testing.md"]],["v-5263011e","/vi/guides/get-program-accounts.html",{title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account"},["/vi/guides/get-program-accounts","/vi/guides/get-program-accounts.md"]],["v-2b8d2a1e","/vi/guides/serialization.html",{title:"Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u"},["/vi/guides/serialization","/vi/guides/serialization.md"]],["v-0ed8daa2","/vi/references/accounts.html",{title:"Accounts"},["/vi/references/accounts","/vi/references/accounts.md"]],["v-3754a87e","/vi/references/basic-transactions.html",{title:"G\u1EEDi Transaction"},["/vi/references/basic-transactions","/vi/references/basic-transactions.md"]],["v-7ff81144","/vi/references/keypairs-and-wallets.html",{title:"C\u1EB7p kho\xE1 v\xE0 V\xED"},["/vi/references/keypairs-and-wallets","/vi/references/keypairs-and-wallets.md"]],["v-a2eaafb8","/vi/references/local-development.html",{title:"L\u1EADp tr\xECnh \u1EDF Local"},["/vi/references/local-development","/vi/references/local-development.md"]],["v-7a66f742","/vi/references/name-service.html",{title:"D\u1ECBch v\u1EE5 t\xEAn mi\u1EC1n"},["/vi/references/name-service","/vi/references/name-service.md"]],["v-1b97e8fe","/vi/references/nfts.html",{title:"NFTs"},["/vi/references/nfts","/vi/references/nfts.md"]],["v-942a1994","/vi/references/offline-transactions.html",{title:"G\u1EEDi Transactions Ngo\u1EA1i tuy\u1EBFn"},["/vi/references/offline-transactions","/vi/references/offline-transactions.md"]],["v-488e49c6","/vi/references/programs.html",{title:"X\xE2y d\u1EF1ng Programs"},["/vi/references/programs","/vi/references/programs.md"]],["v-a20cd7f4","/vi/references/staking.html",{title:"Staking"},["/vi/references/staking","/vi/references/staking.md"]],["v-26036e04","/vi/references/token.html",{title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens"},["/vi/references/token","/vi/references/token.md"]],["v-43987c75","/zh/core-concepts/accounts.html",{title:"\u8D26\u6237"},["/zh/core-concepts/accounts","/zh/core-concepts/accounts.md"]],["v-3c24c435","/zh/core-concepts/pdas.html",{title:"\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237 (PDA)"},["/zh/core-concepts/pdas","/zh/core-concepts/pdas.md"]],["v-d8d998e8","/zh/core-concepts/programs.html",{title:"\u7A0B\u5E8F"},["/zh/core-concepts/programs","/zh/core-concepts/programs.md"]],["v-66cde934","/zh/core-concepts/transactions.html",{title:"\u4EA4\u6613"},["/zh/core-concepts/transactions","/zh/core-concepts/transactions.md"]],["v-567ec360","/zh/getting-started/installation.html",{title:"\u5B89\u88C5"},["/zh/getting-started/installation","/zh/getting-started/installation.md"]],["v-332c21dc","/zh/guides/account-maps.html",{title:"\u8D26\u6237\u6620\u5C04"},["/zh/guides/account-maps","/zh/guides/account-maps.md"]],["v-611df744","/zh/guides/data-migration.html",{title:"\u8FC1\u79FB\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237"},["/zh/guides/data-migration","/zh/guides/data-migration.md"]],["v-23177520","/zh/guides/debugging-solana-programs.html",{title:"\u8C03\u8BD5 Solana \u7A0B\u5E8F"},["/zh/guides/debugging-solana-programs","/zh/guides/debugging-solana-programs.md"]],["v-58db5a3c","/zh/guides/feature-parity-testing.html",{title:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5"},["/zh/guides/feature-parity-testing","/zh/guides/feature-parity-testing.md"]],["v-9eb387fa","/zh/guides/get-program-accounts.html",{title:"\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237"},["/zh/guides/get-program-accounts","/zh/guides/get-program-accounts.md"]],["v-94ff924e","/zh/guides/serialization.html",{title:"\u5E8F\u5217\u6570\u636E"},["/zh/guides/serialization","/zh/guides/serialization.md"]],["v-75b489de","/zh/guides/versioned-transactions.html",{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)"},["/zh/guides/versioned-transactions","/zh/guides/versioned-transactions.md"]],["v-4802fad8","/zh/references/accounts.html",{title:"\u8D26\u6237"},["/zh/references/accounts","/zh/references/accounts.md"]],["v-82947d34","/zh/references/basic-transactions.html",{title:"\u53D1\u9001\u4EA4\u6613"},["/zh/references/basic-transactions","/zh/references/basic-transactions.md"]],["v-42a951a9","/zh/references/keypairs-and-wallets.html",{title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305"},["/zh/references/keypairs-and-wallets","/zh/references/keypairs-and-wallets.md"]],["v-18aec9df","/zh/references/local-development.html",{title:"\u672C\u5730\u5F00\u53D1"},["/zh/references/local-development","/zh/references/local-development.md"]],["v-654526b2","/zh/references/name-service.html",{title:"\u547D\u540D\u670D\u52A1"},["/zh/references/name-service","/zh/references/name-service.md"]],["v-844ed93a","/zh/references/nfts.html",{title:"\u975E\u540C\u8D28\u5316\u4EE3\u5E01 (NFTs)"},["/zh/references/nfts","/zh/references/nfts.md"]],["v-789c339b","/zh/references/offline-transactions.html",{title:"\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613"},["/zh/references/offline-transactions","/zh/references/offline-transactions.md"]],["v-2bf939ab","/zh/references/programs.html",{title:"\u7F16\u5199\u7A0B\u5E8F"},["/zh/references/programs","/zh/references/programs.md"]],["v-322e9381","/zh/references/staking.html",{title:"\u8D28\u62BC"},["/zh/references/staking","/zh/references/staking.md"]],["v-684fdf82","/zh/references/token.html",{title:"\u4E0E\u4EE3\u5E01\u4E92\u52A8"},["/zh/references/token","/zh/references/token.md"]],["v-3707792a","/zh_t/core-concepts/accounts.html",{title:"\u8CEC\u6236"},["/zh_t/core-concepts/accounts","/zh_t/core-concepts/accounts.md"]],["v-1990636a","/zh_t/core-concepts/pdas.html",{title:"\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236 (PDA)"},["/zh_t/core-concepts/pdas","/zh_t/core-concepts/pdas.md"]],["v-f1fb9f7e","/zh_t/core-concepts/programs.html",{title:"\u7A0B\u5E8F"},["/zh_t/core-concepts/programs","/zh_t/core-concepts/programs.md"]],["v-4220a59b","/zh_t/core-concepts/transactions.html",{title:"\u4EA4\u6613"},["/zh_t/core-concepts/transactions","/zh_t/core-concepts/transactions.md"]],["v-eeeeb756","/zh_t/getting-started/installation.html",{title:"\u5B89\u88DD"},["/zh_t/getting-started/installation","/zh_t/getting-started/installation.md"]],["v-931b9306","/zh_t/guides/account-maps.html",{title:"\u8CEC\u6236\u6620\u5C04"},["/zh_t/guides/account-maps","/zh_t/guides/account-maps.md"]],["v-82f5c5ee","/zh_t/guides/data-migration.html",{title:"\u9077\u79FB\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236"},["/zh_t/guides/data-migration","/zh_t/guides/data-migration.md"]],["v-560aa3e5","/zh_t/guides/debugging-solana-programs.html",{title:"\u8ABF\u8A66 Solana \u7A0B\u5E8F"},["/zh_t/guides/debugging-solana-programs","/zh_t/guides/debugging-solana-programs.md"]],["v-3a76dee6","/zh_t/guides/feature-parity-testing.html",{title:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66"},["/zh_t/guides/feature-parity-testing","/zh_t/guides/feature-parity-testing.md"]],["v-27dc2f24","/zh_t/guides/get-program-accounts.html",{title:"\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236"},["/zh_t/guides/get-program-accounts","/zh_t/guides/get-program-accounts.md"]],["v-32fe4664","/zh_t/guides/serialization.html",{title:"\u5E8F\u5217\u6578\u64DA"},["/zh_t/guides/serialization","/zh_t/guides/serialization.md"]],["v-f63270ee","/zh_t/guides/versioned-transactions.html",{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)"},["/zh_t/guides/versioned-transactions","/zh_t/guides/versioned-transactions.md"]],["v-a7f26c02","/zh_t/references/accounts.html",{title:"\u8CEC\u6236"},["/zh_t/references/accounts","/zh_t/references/accounts.md"]],["v-643001de","/zh_t/references/basic-transactions.html",{title:"\u767C\u9001\u4EA4\u6613"},["/zh_t/references/basic-transactions","/zh_t/references/basic-transactions.md"]],["v-4e42d094","/zh_t/references/keypairs-and-wallets.html",{title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305"},["/zh_t/references/keypairs-and-wallets","/zh_t/references/keypairs-and-wallets.md"]],["v-4ab8aad4","/zh_t/references/local-development.html",{title:"\u672C\u5730\u958B\u767C"},["/zh_t/references/local-development","/zh_t/references/local-development.md"]],["v-47ce0692","/zh_t/references/name-service.html",{title:"\u547D\u540D\u670D\u52D9"},["/zh_t/references/name-service","/zh_t/references/name-service.md"]],["v-9d296f64","/zh_t/references/nfts.html",{title:"\u975E\u540C\u8CEA\u5316\u4EE3\u5E63 (NFTs)"},["/zh_t/references/nfts","/zh_t/references/nfts.md"]],["v-f7949af4","/zh_t/references/offline-transactions.html",{title:"\u767C\u9001\u96E2\u7DDA\u4EA4\u6613"},["/zh_t/references/offline-transactions","/zh_t/references/offline-transactions.md"]],["v-07fcfdd4","/zh_t/references/programs.html",{title:"\u7DE8\u5BEB\u7A0B\u5E8F"},["/zh_t/references/programs","/zh_t/references/programs.md"]],["v-0f9a32b6","/zh_t/references/staking.html",{title:"\u8CEA\u62BC"},["/zh_t/references/staking","/zh_t/references/staking.md"]],["v-4a9bf8b4","/zh_t/references/token.html",{title:"\u8207\u4EE3\u5E63\u4E92\u52D5"},["/zh_t/references/token","/zh_t/references/token.md"]],["v-3706649a","/404.html",{title:""},["/404"]]],D_=A_.reduce((e,[t,l,n,r])=>(e.push({name:t,path:l,component:Ba,meta:n},...r.map(i=>({path:i,redirect:l}))),e),[{name:"404",path:"/:catchAll(.*)",component:Ba}]),S_=Pg,I_=()=>{const e=am({history:S_(km(Et.value.base)),routes:D_,scrollBehavior:(t,l,n)=>n||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,l)=>{var n;(t.path!==l.path||l===st)&&([ut.value]=await Promise.all([Ft.resolvePageData(t.name),(n=bc[t.name])===null||n===void 0?void 0:n.__asyncLoader()]))}),e},R_=e=>{e.component("ClientOnly",sm),e.component("Content",zi)},C_=(e,t)=>{const l=_e(()=>Ft.resolveRouteLocale(Et.value.locales,t.currentRoute.value.path)),n=_e(()=>Ft.resolveSiteLocaleData(Et.value,l.value)),r=_e(()=>Ft.resolvePageFrontmatter(ut.value)),i=_e(()=>Ft.resolvePageHeadTitle(ut.value,n.value)),o=_e(()=>Ft.resolvePageHead(i.value,r.value,n.value)),s=_e(()=>Ft.resolvePageLang(ut.value));return e.provide(Fi,l),e.provide(Oc,n),e.provide(Ec,r),e.provide(mm,i),e.provide(Pc,o),e.provide(wc,s),Object.defineProperties(e.config.globalProperties,{$frontmatter:{get:()=>r.value},$head:{get:()=>o.value},$headTitle:{get:()=>i.value},$lang:{get:()=>s.value},$page:{get:()=>ut.value},$routeLocale:{get:()=>l.value},$site:{get:()=>Et.value},$siteLocale:{get:()=>n.value},$withBase:{get:()=>wm}}),{pageData:ut,pageFrontmatter:r,pageHead:o,pageHeadTitle:i,pageLang:s,routeLocale:l,siteData:Et,siteLocaleData:n}},x_=()=>{const e=Vi(),t=gm(),l=Tc(),n=Ee([]),r=()=>{t.value.forEach(o=>{const s=V_(o);s&&n.value.push(s)})},i=()=>{document.documentElement.lang=l.value,n.value.forEach(o=>{o.parentNode===document.head&&document.head.removeChild(o)}),n.value.splice(0,n.value.length),t.value.forEach(o=>{const s=F_(o);s!==null&&(document.head.appendChild(s),n.value.push(s))})};Kt(pm,i),tt(()=>{r(),i(),et(()=>e.path,()=>i())})},V_=([e,t,l=""])=>{const n=Object.entries(t).map(([s,c])=>be(c)?`[${s}="${c}"]`:c===!0?`[${s}]`:"").join(""),r=`head > ${e}${n}`;return Array.from(document.querySelectorAll(r)).find(s=>s.innerText===l)||null},F_=([e,t,l])=>{if(!be(e))return null;const n=document.createElement(e);return Ac(t)&&Object.entries(t).forEach(([r,i])=>{be(i)?n.setAttribute(r,i):i===!0&&n.setAttribute(r,"")}),be(l)&&n.appendChild(document.createTextNode(l)),n},j_=ng,z_=async()=>{const e=j_({name:"VuepressApp",setup(){x_();for(const l of O_)l();return()=>[ee(_c),...v_.map(l=>ee(l))]}}),t=I_();R_(e),C_(e,t);for(const l of h_)await l({app:e,router:t,siteData:Et});return e.use(t),{app:e,router:t}};z_().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{Lc as A,q_ as B,J_ as C,ee as D,wm as E,Ne as F,sm as G,Pt as H,Ee as I,et as J,M_ as K,W_ as L,Em as M,km as N,ln as O,be as P,yv as Q,tt as R,Qn as S,Ri as T,nn as U,Q_ as V,Ac as W,U_ as X,Li as Y,Ev as Z,a_ as _,Fn as a,Te as b,Ai as c,z_ as createVueApp,Di as d,H_ as e,Me as f,jc as g,Bt as h,hm as i,_e as j,te as k,K_ as l,B_ as m,Vi as n,tn as o,yd as p,ec as q,gh as r,bh as s,xu as t,ji as u,jn as v,Id as w,ym as x,$_ as y,G_ as z}; + * @license MIT */(function(e,t){(function(l,n){e.exports=n()})(P_,function(){var l={};l.version="0.2.0";var n=l.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};l.configure=function(m){var _,f;for(_ in m)f=m[_],f!==void 0&&m.hasOwnProperty(_)&&(n[_]=f);return this},l.status=null,l.set=function(m){var _=l.isStarted();m=r(m,n.minimum,1),l.status=m===1?null:m;var f=l.render(!_),y=f.querySelector(n.barSelector),P=n.speed,w=n.easing;return f.offsetWidth,s(function(L){n.positionUsing===""&&(n.positionUsing=l.getPositioningCSS()),c(y,o(m,P,w)),m===1?(c(f,{transition:"none",opacity:1}),f.offsetWidth,setTimeout(function(){c(f,{transition:"all "+P+"ms linear",opacity:0}),setTimeout(function(){l.remove(),L()},P)},P)):setTimeout(L,P)}),this},l.isStarted=function(){return typeof l.status=="number"},l.start=function(){l.status||l.set(0);var m=function(){setTimeout(function(){!l.status||(l.trickle(),m())},n.trickleSpeed)};return n.trickle&&m(),this},l.done=function(m){return!m&&!l.status?this:l.inc(.3+.5*Math.random()).set(1)},l.inc=function(m){var _=l.status;return _?(typeof m!="number"&&(m=(1-_)*r(Math.random()*_,.1,.95)),_=r(_+m,0,.994),l.set(_)):l.start()},l.trickle=function(){return l.inc(Math.random()*n.trickleRate)},function(){var m=0,_=0;l.promise=function(f){return!f||f.state()==="resolved"?this:(_===0&&l.start(),m++,_++,f.always(function(){_--,_===0?(m=0,l.done()):l.set((m-_)/m)}),this)}}(),l.render=function(m){if(l.isRendered())return document.getElementById("nprogress");d(document.documentElement,"nprogress-busy");var _=document.createElement("div");_.id="nprogress",_.innerHTML=n.template;var f=_.querySelector(n.barSelector),y=m?"-100":i(l.status||0),P=document.querySelector(n.parent),w;return c(f,{transition:"all 0 linear",transform:"translate3d("+y+"%,0,0)"}),n.showSpinner||(w=_.querySelector(n.spinnerSelector),w&&b(w)),P!=document.body&&d(P,"nprogress-custom-parent"),P.appendChild(_),_},l.remove=function(){v(document.documentElement,"nprogress-busy"),v(document.querySelector(n.parent),"nprogress-custom-parent");var m=document.getElementById("nprogress");m&&b(m)},l.isRendered=function(){return!!document.getElementById("nprogress")},l.getPositioningCSS=function(){var m=document.body.style,_="WebkitTransform"in m?"Webkit":"MozTransform"in m?"Moz":"msTransform"in m?"ms":"OTransform"in m?"O":"";return _+"Perspective"in m?"translate3d":_+"Transform"in m?"translate":"margin"};function r(m,_,f){return m<_?_:m>f?f:m}function i(m){return(-1+m)*100}function o(m,_,f){var y;return n.positionUsing==="translate3d"?y={transform:"translate3d("+i(m)+"%,0,0)"}:n.positionUsing==="translate"?y={transform:"translate("+i(m)+"%,0)"}:y={"margin-left":i(m)+"%"},y.transition="all "+_+"ms "+f,y}var s=function(){var m=[];function _(){var f=m.shift();f&&f(_)}return function(f){m.push(f),m.length==1&&_()}}(),c=function(){var m=["Webkit","O","Moz","ms"],_={};function f(L){return L.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(S,j){return j.toUpperCase()})}function y(L){var S=document.body.style;if(L in S)return L;for(var j=m.length,D=L.charAt(0).toUpperCase()+L.slice(1),O;j--;)if(O=m[j]+D,O in S)return O;return L}function P(L){return L=f(L),_[L]||(_[L]=y(L))}function w(L,S,j){S=P(S),L.style[S]=j}return function(L,S){var j=arguments,D,O;if(j.length==2)for(D in S)O=S[D],O!==void 0&&S.hasOwnProperty(D)&&w(L,D,O);else w(L,j[1],j[2])}}();function u(m,_){var f=typeof m=="string"?m:g(m);return f.indexOf(" "+_+" ")>=0}function d(m,_){var f=g(m),y=f+_;u(f,_)||(m.className=y.substring(1))}function v(m,_){var f=g(m),y;!u(m,_)||(y=f.replace(" "+_+" "," "),m.className=y.substring(1,y.length-1))}function g(m){return(" "+(m.className||"")+" ").replace(/\s+/gi," ")}function b(m){m&&m.parentNode&&m.parentNode.removeChild(m)}return l})})(Ln);const w_=()=>{tt(()=>{const e=ln(),t=new Set;t.add(e.currentRoute.value.path),Ln.exports.configure({showSpinner:!1}),e.beforeEach(l=>{t.has(l.path)||Ln.exports.start()}),e.afterEach(l=>{t.add(l.path),Ln.exports.done()})})};var T_=Ni(()=>{w_()}),L_=Ni(()=>{_v(),Pv()});const O_=[E_,T_,L_],A_=[["v-8daa1a0e","/",{title:"Cooking with Solana"},["/index.html","/README.md"]],["v-6bf54404","/core-concepts/accounts.html",{title:"Accounts"},["/core-concepts/accounts","/core-concepts/accounts.md"]],["v-5f0a12cc","/core-concepts/cpi.html",{title:"Cross Program Invocations (CPIs)"},["/core-concepts/cpi","/core-concepts/cpi.md"]],["v-130ca978","/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/core-concepts/pdas","/core-concepts/pdas.md"]],["v-882009ca","/core-concepts/programs.html",{title:"Programs"},["/core-concepts/programs","/core-concepts/programs.md"]],["v-63197375","/core-concepts/transactions.html",{title:"Transactions"},["/core-concepts/transactions","/core-concepts/transactions.md"]],["v-7446c3bf","/fil/",{title:"Cooking with Solana"},["/fil/index.html","/fil/README.md"]],["v-2d0a8235","/de/",{title:"Kochen mit Solana"},["/de/index.html","/de/README.md"]],["v-2d0a87a8","/es/",{title:"Libro de recetas de Solana"},["/es/index.html","/es/README.md"]],["v-2d0a8b4a","/fr/",{title:"Solana Cookbook"},["/fr/index.html","/fr/README.md"]],["v-345c0323","/gaming/auto-approve.html",{title:"How to auto approve transactions"},["/gaming/auto-approve","/gaming/auto-approve.md"]],["v-2119e6ee","/gaming/distribution.html",{title:"Distribution"},["/gaming/distribution","/gaming/distribution.md"]],["v-33bd6568","/gaming/energy-system.html",{title:"Energy System"},["/gaming/energy-system","/gaming/energy-system.md"]],["v-687f189c","/gaming/game-examples.html",{title:"Learn By Example"},["/gaming/game-examples","/gaming/game-examples.md"]],["v-00547d6c","/gaming/game-sdks.html",{title:"Solana Gaming SDKs"},["/gaming/game-sdks","/gaming/game-sdks.md"]],["v-3edbe329","/gaming/hello-world.html",{title:"Hello World example"},["/gaming/hello-world","/gaming/hello-world.md"]],["v-3d8530c8","/gaming/interact-with-tokens.html",{title:"How interact with tokens in programs"},["/gaming/interact-with-tokens","/gaming/interact-with-tokens.md"]],["v-c08c9418","/gaming/intro.html",{title:"Introduction to Gaming on Solana"},["/gaming/intro","/gaming/intro.md"]],["v-c4d04f5e","/gaming/nfts-in-games.html",{title:"Gaming with NFTs"},["/gaming/nfts-in-games","/gaming/nfts-in-games.md"]],["v-4ea6aa5e","/gaming/porting-anchor-to-unity.html",{title:"Port Anchor to Unity"},["/gaming/porting-anchor-to-unity","/gaming/porting-anchor-to-unity.md"]],["v-1e0c6857","/gaming/saving-game-state.html",{title:"Saving game state"},["/gaming/saving-game-state","/gaming/saving-game-state.md"]],["v-61d730b8","/gaming/store-sol-in-pda.html",{title:"Storing SOL in a PDA"},["/gaming/store-sol-in-pda","/gaming/store-sol-in-pda.md"]],["v-4e8563af","/getting-started/installation.html",{title:"Installation"},["/getting-started/installation","/getting-started/installation.md"]],["v-76b1e9e3","/guides/account-maps.html",{title:"Account Maps"},["/guides/account-maps","/guides/account-maps.md"]],["v-6da58eef","/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/guides/data-migration","/guides/data-migration.md"]],["v-4684263f","/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/guides/debugging-solana-programs","/guides/debugging-solana-programs.md"]],["v-4740871a","/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/guides/feature-parity-testing","/guides/feature-parity-testing.md"]],["v-2b9a5458","/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/guides/get-program-accounts","/guides/get-program-accounts.md"]],["v-2e379628","/guides/serialization.html",{title:"Serializing Data"},["/guides/serialization","/guides/serialization.md"]],["v-7e81f36f","/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/guides/versioned-transactions","/guides/versioned-transactions.md"]],["v-2d0a94db","/id/",{title:"Buku Panduan Solana"},["/id/index.html","/id/README.md"]],["v-2d0a983f","/ja/",{title:"Cooking with Solana"},["/ja/index.html","/ja/README.md"]],["v-2d0a9e0f","/kr/",{title:"Cooking with Solana"},["/kr/index.html","/kr/README.md"]],["v-2d0ab112","/pt/",{title:"Cozinhando com a Solana"},["/pt/index.html","/pt/README.md"]],["v-6c467d65","/references/accounts.html",{title:"Accounts"},["/references/accounts","/references/accounts.md"]],["v-70f9aa12","/references/basic-transactions.html",{title:"Sending Transactions"},["/references/basic-transactions","/references/basic-transactions.md"]],["v-4dc29afa","/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/references/keypairs-and-wallets","/references/keypairs-and-wallets.md"]],["v-10b56a2e","/references/local-development.html",{title:"Local Development"},["/references/local-development","/references/local-development.md"]],["v-9eccd210","/references/name-service.html",{title:"Name Service"},["/references/name-service","/references/name-service.md"]],["v-d2aec298","/references/nfts.html",{title:"NFTs"},["/references/nfts","/references/nfts.md"]],["v-f8950628","/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/references/offline-transactions","/references/offline-transactions.md"]],["v-877d9708","/references/programs.html",{title:"Writing Programs"},["/references/programs","/references/programs.md"]],["v-26f90ae0","/references/staking.html",{title:"Staking"},["/references/staking","/references/staking.md"]],["v-0d096f0e","/references/token.html",{title:"Interacting with Tokens"},["/references/token","/references/token.md"]],["v-2d0abea2","/th/",{title:"Cooking \u0E01\u0E31\u0E1A Solana"},["/th/index.html","/th/README.md"]],["v-2d0abfd8","/tr/",{title:"Solana Cookbook"},["/tr/index.html","/tr/README.md"]],["v-2d0ac643","/vi/",{title:"Nh\u1EADp m\xF4n Solana"},["/vi/index.html","/vi/README.md"]],["v-2d0ad528","/zh/",{title:"Solana\u79D8\u7C4D"},["/zh/index.html","/zh/README.md"]],["v-15aaed93","/zh_t/",{title:"Solana\u7955\u7C4D"},["/zh_t/index.html","/zh_t/README.md"]],["v-a0b9b104","/fil/core-concepts/accounts.html",{title:"Accounts"},["/fil/core-concepts/accounts","/fil/core-concepts/accounts.md"]],["v-9a7329dc","/fil/core-concepts/cpi.html",{title:"Cross Program Invocations (CPIs)"},["/fil/core-concepts/cpi","/fil/core-concepts/cpi.md"]],["v-1a485bbe","/fil/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/fil/core-concepts/pdas","/fil/core-concepts/pdas.md"]],["v-00c442d6","/fil/core-concepts/programs.html",{title:"Programs"},["/fil/core-concepts/programs","/fil/core-concepts/programs.md"]],["v-e455ec22","/fil/core-concepts/transactions.html",{title:"Transactions"},["/fil/core-concepts/transactions","/fil/core-concepts/transactions.md"]],["v-eb393c2e","/fil/gaming/auto-approve.html",{title:"How to auto approve transactions"},["/fil/gaming/auto-approve","/fil/gaming/auto-approve.md"]],["v-772145b4","/fil/gaming/distribution.html",{title:"Distribution"},["/fil/gaming/distribution","/fil/gaming/distribution.md"]],["v-5105c746","/fil/gaming/energy-system.html",{title:"Energy System"},["/fil/gaming/energy-system","/fil/gaming/energy-system.md"]],["v-5938dad4","/fil/gaming/game-examples.html",{title:"Learn By Example"},["/fil/gaming/game-examples","/fil/gaming/game-examples.md"]],["v-f1adf734","/fil/gaming/game-sdks.html",{title:"Solana Gaming SDKs"},["/fil/gaming/game-sdks","/fil/gaming/game-sdks.md"]],["v-62aa93a3","/fil/gaming/hello-world.html",{title:"Hello World example"},["/fil/gaming/hello-world","/fil/gaming/hello-world.md"]],["v-6a3c698e","/fil/gaming/interact-with-tokens.html",{title:"How interact with tokens in programs"},["/fil/gaming/interact-with-tokens","/fil/gaming/interact-with-tokens.md"]],["v-a2e66c24","/fil/gaming/intro.html",{title:"Introduction to Gaming on Solana"},["/fil/gaming/intro","/fil/gaming/intro.md"]],["v-087c524b","/fil/gaming/nfts-in-games.html",{title:"Gaming with NFTs"},["/fil/gaming/nfts-in-games","/fil/gaming/nfts-in-games.md"]],["v-7664744b","/fil/gaming/porting-anchor-to-unity.html",{title:"Port Anchor to Unity"},["/fil/gaming/porting-anchor-to-unity","/fil/gaming/porting-anchor-to-unity.md"]],["v-2dcf5551","/fil/gaming/saving-game-state.html",{title:"Saving game state"},["/fil/gaming/saving-game-state","/fil/gaming/saving-game-state.md"]],["v-0122f36a","/fil/gaming/store-sol-in-pda.html",{title:"Storing SOL in a PDA"},["/fil/gaming/store-sol-in-pda","/fil/gaming/store-sol-in-pda.md"]],["v-8e9578ae","/fil/getting-started/installation.html",{title:"Installation"},["/fil/getting-started/installation","/fil/getting-started/installation.md"]],["v-668d6eae","/fil/guides/account-maps.html",{title:"Account Maps"},["/fil/guides/account-maps","/fil/guides/account-maps.md"]],["v-5f505435","/fil/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/fil/guides/data-migration","/fil/guides/data-migration.md"]],["v-556f7939","/fil/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/fil/guides/debugging-solana-programs","/fil/guides/debugging-solana-programs.md"]],["v-8fa8488e","/fil/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/fil/guides/feature-parity-testing","/fil/guides/feature-parity-testing.md"]],["v-16ea0e9a","/fil/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/fil/guides/get-program-accounts","/fil/guides/get-program-accounts.md"]],["v-cdc7dfbc","/fil/guides/serialization.html",{title:"Serializing Data"},["/fil/guides/serialization","/fil/guides/serialization.md"]],["v-5a4e12b5","/fil/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/fil/guides/versioned-transactions","/fil/guides/versioned-transactions.md"]],["v-7b6447aa","/fil/references/accounts.html",{title:"Accounts"},["/fil/references/accounts","/fil/references/accounts.md"]],["v-b9616b86","/fil/references/basic-transactions.html",{title:"Sending Transactions"},["/fil/references/basic-transactions","/fil/references/basic-transactions.md"]],["v-670400c0","/fil/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/fil/references/keypairs-and-wallets","/fil/references/keypairs-and-wallets.md"]],["v-7ae54a28","/fil/references/local-development.html",{title:"Local Development"},["/fil/references/local-development","/fil/references/local-development.md"]],["v-3aafba84","/fil/references/name-service.html",{title:"Name Service"},["/fil/references/name-service","/fil/references/name-service.md"]],["v-87eb5f0c","/fil/references/nfts.html",{title:"NFTs"},["/fil/references/nfts","/fil/references/nfts.md"]],["v-c6123a9c","/fil/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/fil/references/offline-transactions","/fil/references/offline-transactions.md"]],["v-12489342","/fil/references/programs.html",{title:"Writing Programs"},["/fil/references/programs","/fil/references/programs.md"]],["v-10522b0a","/fil/references/staking.html",{title:"Staking"},["/fil/references/staking","/fil/references/staking.md"]],["v-d84413f0","/fil/references/token.html",{title:"Interacting with Tokens"},["/fil/references/token","/fil/references/token.md"]],["v-8e5be170","/de/core-concepts/accounts.html",{title:"Accounts"},["/de/core-concepts/accounts","/de/core-concepts/accounts.md"]],["v-f2328ef0","/de/core-concepts/pdas.html",{title:"Programmabgeleitete Adressen (PDAs)"},["/de/core-concepts/pdas","/de/core-concepts/pdas.md"]],["v-08ccc65f","/de/core-concepts/programs.html",{title:"Programme"},["/de/core-concepts/programs","/de/core-concepts/programs.md"]],["v-1256fcb9","/de/core-concepts/transactions.html",{title:"Transaktionen"},["/de/core-concepts/transactions","/de/core-concepts/transactions.md"]],["v-2485abf3","/de/getting-started/installation.html",{title:"Installation"},["/de/getting-started/installation","/de/getting-started/installation.md"]],["v-2d09cebe","/de/references/accounts.html",{title:"Accounts"},["/de/references/accounts","/de/references/accounts.md"]],["v-9ce8299a","/de/references/basic-transactions.html",{title:"Transaktionen versenden"},["/de/references/basic-transactions","/de/references/basic-transactions.md"]],["v-4ec78794","/de/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/de/references/keypairs-and-wallets","/de/references/keypairs-and-wallets.md"]],["v-32949b1c","/de/references/local-development.html",{title:"Local Development"},["/de/references/local-development","/de/references/local-development.md"]],["v-01539798","/de/references/name-service.html",{title:"Name Service"},["/de/references/name-service","/de/references/name-service.md"]],["v-6bf79020","/de/references/nfts.html",{title:"NFTs"},["/de/references/nfts","/de/references/nfts.md"]],["v-0e8f1e28","/de/references/offline-transactions.html",{title:"Senden von Offline-Transaktionen"},["/de/references/offline-transactions","/de/references/offline-transactions.md"]],["v-3975cfb8","/de/references/programs.html",{title:"Programme schreiben"},["/de/references/programs","/de/references/programs.md"]],["v-7cf087d4","/de/references/staking.html",{title:"Staking"},["/de/references/staking","/de/references/staking.md"]],["v-4520fd52","/de/references/token.html",{title:"Interaktion mit Tokens"},["/de/references/token","/de/references/token.md"]],["v-1832f5c2","/de/guides/account-maps.html",{title:"Kontozuordnungen"},["/de/guides/account-maps","/de/guides/account-maps.md"]],["v-70204b2b","/de/guides/data-migration.html",{title:"Migrieren von Programmdatenkonten"},["/de/guides/data-migration","/de/guides/data-migration.md"]],["v-16deac83","/de/guides/debugging-solana-programs.html",{title:"Debuggen von Solana-Programmen"},["/de/guides/debugging-solana-programs","/de/guides/debugging-solana-programs.md"]],["v-732f06a2","/de/guides/feature-parity-testing.html",{title:"Funktionsparit\xE4tstest"},["/de/guides/feature-parity-testing","/de/guides/feature-parity-testing.md"]],["v-22a67510","/de/guides/get-program-accounts.html",{title:"Programmkonten Abfragen"},["/de/guides/get-program-accounts","/de/guides/get-program-accounts.md"]],["v-309da254","/de/guides/retrying-transactions.html",{title:"Transaktionen Wiederholen"},["/de/guides/retrying-transactions","/de/guides/retrying-transactions.md"]],["v-5796626c","/de/guides/serialization.html",{title:"Serialisieren von Daten"},["/de/guides/serialization","/de/guides/serialization.md"]],["v-389f60e0","/es/getting-started/installation.html",{title:"Instalaci\xF3n"},["/es/getting-started/installation","/es/getting-started/installation.md"]],["v-08458c16","/es/core-concepts/accounts.html",{title:"Cuentas"},["/es/core-concepts/accounts","/es/core-concepts/accounts.md"]],["v-79377c96","/es/core-concepts/pdas.html",{title:"Direcciones derivadas de programa (PDAs)"},["/es/core-concepts/pdas","/es/core-concepts/pdas.md"]],["v-4bd7f10c","/es/core-concepts/programs.html",{title:"Programas"},["/es/core-concepts/programs","/es/core-concepts/programs.md"]],["v-314308e6","/es/core-concepts/transactions.html",{title:"Transacciones"},["/es/core-concepts/transactions","/es/core-concepts/transactions.md"]],["v-471a2192","/es/guides/account-maps.html",{title:"C\xF3mo usar Map en cuentas"},["/es/guides/account-maps","/es/guides/account-maps.md"]],["v-7642d244","/es/guides/data-migration.html",{title:"Migrando cuentas de datos de programas"},["/es/guides/data-migration","/es/guides/data-migration.md"]],["v-6c0a22f0","/es/guides/debugging-solana-programs.html",{title:"Depurando Programas en Solana"},["/es/guides/debugging-solana-programs","/es/guides/debugging-solana-programs.md"]],["v-35856562","/es/guides/feature-parity-testing.html",{title:"Prueba de paridad de caracter\xEDsticas"},["/es/guides/feature-parity-testing","/es/guides/feature-parity-testing.md"]],["v-3d8822fa","/es/guides/get-program-accounts.html",{title:"Obtener cuentas de programa"},["/es/guides/get-program-accounts","/es/guides/get-program-accounts.md"]],["v-6ad65459","/es/guides/serialization.html",{title:"Serializando datos"},["/es/guides/serialization","/es/guides/serialization.md"]],["v-3caeb514","/es/references/accounts.html",{title:"Cuentas"},["/es/references/accounts","/es/references/accounts.md"]],["v-20a8d3e6","/es/references/basic-transactions.html",{title:"Enviando transacciones"},["/es/references/basic-transactions","/es/references/basic-transactions.md"]],["v-17bc77ae","/es/references/keypairs-and-wallets.html",{title:"Pares de llaves y billeteras"},["/es/references/keypairs-and-wallets","/es/references/keypairs-and-wallets.md"]],["v-0a613142","/es/references/local-development.html",{title:"Desarrollo en entorno local"},["/es/references/local-development","/es/references/local-development.md"]],["v-1db05f27","/es/references/name-service.html",{title:"Servicio de nombres"},["/es/references/name-service","/es/references/name-service.md"]],["v-6f8605e3","/es/references/nfts.html",{title:"NFTs"},["/es/references/nfts","/es/references/nfts.md"]],["v-2a14a61b","/es/references/offline-transactions.html",{title:"Enviando transacciones offline"},["/es/references/offline-transactions","/es/references/offline-transactions.md"]],["v-e6ad27aa","/es/references/programs.html",{title:"Escribiendo Programas"},["/es/references/programs","/es/references/programs.md"]],["v-8d23ddfe","/es/references/staking.html",{title:"Staking"},["/es/references/staking","/es/references/staking.md"]],["v-4fd8edbf","/es/references/token.html",{title:"Interactuando con tokens"},["/es/references/token","/es/references/token.md"]],["v-598bfdda","/fr/core-concepts/accounts.html",{title:"Comptes"},["/fr/core-concepts/accounts","/fr/core-concepts/accounts.md"]],["v-034daf46","/fr/core-concepts/cpi.html",{title:"Invocations de Programme Crois\xE9 (CPIs)"},["/fr/core-concepts/cpi","/fr/core-concepts/cpi.md"]],["v-410d47d3","/fr/core-concepts/pdas.html",{title:"Adresses d\xE9riv\xE9es de programmes (PDAs)"},["/fr/core-concepts/pdas","/fr/core-concepts/pdas.md"]],["v-2334b82a","/fr/core-concepts/programs.html",{title:"Programmes"},["/fr/core-concepts/programs","/fr/core-concepts/programs.md"]],["v-1ee9ddf8","/fr/core-concepts/transactions.html",{title:"Transactions"},["/fr/core-concepts/transactions","/fr/core-concepts/transactions.md"]],["v-4605d97e","/fr/getting-started/installation.html",{title:"Installation"},["/fr/getting-started/installation","/fr/getting-started/installation.md"]],["v-3c3bf874","/fr/gaming/auto-approve.html",{title:"How to auto approve transactions"},["/fr/gaming/auto-approve","/fr/gaming/auto-approve.md"]],["v-28f9dc3f","/fr/gaming/distribution.html",{title:"Distribution"},["/fr/gaming/distribution","/fr/gaming/distribution.md"]],["v-4b7ffbca","/fr/gaming/energy-system.html",{title:"Syst\xE8me d'Energie"},["/fr/gaming/energy-system","/fr/gaming/energy-system.md"]],["v-5c9dcd6b","/fr/gaming/game-examples.html",{title:"Apprendre par l'exemple"},["/fr/gaming/game-examples","/fr/gaming/game-examples.md"]],["v-16181c8a","/fr/gaming/game-sdks.html",{title:"SDKs pour le gaming sur Solana"},["/fr/gaming/game-sdks","/fr/gaming/game-sdks.md"]],["v-ed210090","/fr/gaming/hello-world.html",{title:"Exemple Hello World"},["/fr/gaming/hello-world","/fr/gaming/hello-world.md"]],["v-5e474519","/fr/gaming/interact-with-tokens.html",{title:"Comment interagir avec des jetons dans des programmes"},["/fr/gaming/interact-with-tokens","/fr/gaming/interact-with-tokens.md"]],["v-5625a9c3","/fr/gaming/intro.html",{title:"Introduction au gaming sur Solana"},["/fr/gaming/intro","/fr/gaming/intro.md"]],["v-dc92e5c0","/fr/gaming/nfts-in-games.html",{title:"Gaming avec des NFTs"},["/fr/gaming/nfts-in-games","/fr/gaming/nfts-in-games.md"]],["v-1c322e40","/fr/gaming/porting-anchor-to-unity.html",{title:"Portage d'Anchor vers Unity"},["/fr/gaming/porting-anchor-to-unity","/fr/gaming/porting-anchor-to-unity.md"]],["v-71d3c4b4","/fr/gaming/saving-game-state.html",{title:"Sauvegarder l'\xE9tat d'un jeu"},["/fr/gaming/saving-game-state","/fr/gaming/saving-game-state.md"]],["v-50674c75","/fr/gaming/store-sol-in-pda.html",{title:"Stockage de SOL dans un PDA"},["/fr/gaming/store-sol-in-pda","/fr/gaming/store-sol-in-pda.md"]],["v-742672b6","/fr/references/accounts.html",{title:"Comptes"},["/fr/references/accounts","/fr/references/accounts.md"]],["v-7fdd21f0","/fr/references/basic-transactions.html",{title:"Envoyer des Transactions"},["/fr/references/basic-transactions","/fr/references/basic-transactions.md"]],["v-5bd01ecb","/fr/references/keypairs-and-wallets.html",{title:"Paires de Cl\xE9s et Portefeuilles"},["/fr/references/keypairs-and-wallets","/fr/references/keypairs-and-wallets.md"]],["v-0835dffd","/fr/references/local-development.html",{title:"D\xE9veloppement Local"},["/fr/references/local-development","/fr/references/local-development.md"]],["v-31ec7bc9","/fr/references/name-service.html",{title:"Service de Noms"},["/fr/references/name-service","/fr/references/name-service.md"]],["v-3331e485","/fr/references/nfts.html",{title:"NFTs"},["/fr/references/nfts","/fr/references/nfts.md"]],["v-dc79fe86","/fr/references/offline-transactions.html",{title:"Envoi de transactions hors connexion"},["/fr/references/offline-transactions","/fr/references/offline-transactions.md"]],["v-77bdac66","/fr/references/programs.html",{title:"\xC9crire des Programmes"},["/fr/references/programs","/fr/references/programs.md"]],["v-3717171f","/fr/references/staking.html",{title:"Staking"},["/fr/references/staking","/fr/references/staking.md"]],["v-01a8e35d","/fr/references/token.html",{title:"Interaction avec les Jetons"},["/fr/references/token","/fr/references/token.md"]],["v-7e91df34","/fr/guides/account-maps.html",{title:"Maps de Comptes"},["/fr/guides/account-maps","/fr/guides/account-maps.md"]],["v-05451800","/fr/guides/data-migration.html",{title:"Migration des Comptes de Donn\xE9es de Programmes"},["/fr/guides/data-migration","/fr/guides/data-migration.md"]],["v-0bb1c6e4","/fr/guides/debugging-solana-programs.html",{title:"D\xE9bogage des Programmes Solana"},["/fr/guides/debugging-solana-programs","/fr/guides/debugging-solana-programs.md"]],["v-5623fef8","/fr/guides/feature-parity-testing.html",{title:"Test de Conformit\xE9 des Fonctionnalit\xE9s"},["/fr/guides/feature-parity-testing","/fr/guides/feature-parity-testing.md"]],["v-0af4ea25","/fr/guides/get-program-accounts.html",{title:"Obtenir les comptes d'un programme"},["/fr/guides/get-program-accounts","/fr/guides/get-program-accounts.md"]],["v-22564af7","/fr/guides/serialization.html",{title:"S\xE9rialisation des donn\xE9es"},["/fr/guides/serialization","/fr/guides/serialization.md"]],["v-77103780","/fr/guides/versioned-transactions.html",{title:"Transactions Versionn\xE9es"},["/fr/guides/versioned-transactions","/fr/guides/versioned-transactions.md"]],["v-da3cf63c","/id/core-concepts/accounts.html",{title:"Akun"},["/id/core-concepts/accounts","/id/core-concepts/accounts.md"]],["v-0bf50b22","/id/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/id/core-concepts/pdas","/id/core-concepts/pdas.md"]],["v-3a47880e","/id/core-concepts/programs.html",{title:"Program"},["/id/core-concepts/programs","/id/core-concepts/programs.md"]],["v-73c3d55a","/id/core-concepts/transactions.html",{title:"Transaksi"},["/id/core-concepts/transactions","/id/core-concepts/transactions.md"]],["v-02e9060d","/id/getting-started/installation.html",{title:"Instalasi"},["/id/getting-started/installation","/id/getting-started/installation.md"]],["v-10a285c5","/id/guides/account-maps.html",{title:"Peta Akun"},["/id/guides/account-maps","/id/guides/account-maps.md"]],["v-4ddeba51","/id/guides/data-migration.html",{title:"Migrasi Akun Data Program"},["/id/guides/data-migration","/id/guides/data-migration.md"]],["v-0173699d","/id/guides/debugging-solana-programs.html",{title:"Debug Program Solana"},["/id/guides/debugging-solana-programs","/id/guides/debugging-solana-programs.md"]],["v-971f3456","/id/guides/feature-parity-testing.html",{title:"Pengujian Paritas Fitur"},["/id/guides/feature-parity-testing","/id/guides/feature-parity-testing.md"]],["v-307b2094","/id/guides/get-program-accounts.html",{title:"Mendapatkan Akun Program"},["/id/guides/get-program-accounts","/id/guides/get-program-accounts.md"]],["v-5b4b12f4","/id/guides/serialization.html",{title:"Serialisasi Data"},["/id/guides/serialization","/id/guides/serialization.md"]],["v-06371947","/id/references/accounts.html",{title:"Akun"},["/id/references/accounts","/id/references/accounts.md"]],["v-c0d8574e","/id/references/basic-transactions.html",{title:"Mengirim Transaksi"},["/id/references/basic-transactions","/id/references/basic-transactions.md"]],["v-644e73dc","/id/references/keypairs-and-wallets.html",{title:"Keypairs & Wallets"},["/id/references/keypairs-and-wallets","/id/references/keypairs-and-wallets.md"]],["v-75cde6e8","/id/references/local-development.html",{title:"Development Lokal"},["/id/references/local-development","/id/references/local-development.md"]],["v-673571da","/id/references/name-service.html",{title:"Name Service"},["/id/references/name-service","/id/references/name-service.md"]],["v-931308d4","/id/references/nfts.html",{title:"NFT"},["/id/references/nfts","/id/references/nfts.md"]],["v-cb7d5464","/id/references/offline-transactions.html",{title:"Mengirim Transaksi Offline"},["/id/references/offline-transactions","/id/references/offline-transactions.md"]],["v-5631d05e","/id/references/programs.html",{title:"Menulis Program"},["/id/references/programs","/id/references/programs.md"]],["v-01feda6e","/id/references/staking.html",{title:"Staking"},["/id/references/staking","/id/references/staking.md"]],["v-3211a328","/id/references/token.html",{title:"Interaksi dengan Token"},["/id/references/token","/id/references/token.md"]],["v-179e82fe","/ja/core-concepts/accounts.html",{title:"\u30A2\u30AB\u30A6\u30F3\u30C8"},["/ja/core-concepts/accounts","/ja/core-concepts/accounts.md"]],["v-52ffdf92","/ja/core-concepts/cpi.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI)"},["/ja/core-concepts/cpi","/ja/core-concepts/cpi.md"]],["v-fd851184","/ja/core-concepts/pdas.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(PDA)"},["/ja/core-concepts/pdas","/ja/core-concepts/pdas.md"]],["v-67993a15","/ja/core-concepts/programs.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0"},["/ja/core-concepts/programs","/ja/core-concepts/programs.md"]],["v-ec92b522","/ja/core-concepts/transactions.html",{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3"},["/ja/core-concepts/transactions","/ja/core-concepts/transactions.md"]],["v-429dff29","/ja/getting-started/installation.html",{title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB"},["/ja/getting-started/installation","/ja/getting-started/installation.md"]],["v-44679d29","/ja/guides/account-maps.html",{title:"\u30A2\u30AB\u30A6\u30F3\u30C8\u30DE\u30C3\u30D7"},["/ja/guides/account-maps","/ja/guides/account-maps.md"]],["v-b688ee96","/ja/guides/data-migration.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u79FB\u884C"},["/ja/guides/data-migration","/ja/guides/data-migration.md"]],["v-04e3168e","/ja/guides/debugging-solana-programs.html",{title:"Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30D0\u30C3\u30B0"},["/ja/guides/debugging-solana-programs","/ja/guides/debugging-solana-programs.md"]],["v-6b5a9039","/ja/guides/feature-parity-testing.html",{title:"\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8"},["/ja/guides/feature-parity-testing","/ja/guides/feature-parity-testing.md"]],["v-d18839cc","/ja/guides/get-program-accounts.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97"},["/ja/guides/get-program-accounts","/ja/guides/get-program-accounts.md"]],["v-17384ba2","/ja/guides/serialization.html",{title:"\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3"},["/ja/guides/serialization","/ja/guides/serialization.md"]],["v-0d7cc735","/ja/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/ja/guides/versioned-transactions","/ja/guides/versioned-transactions.md"]],["v-39fc30ab","/ja/references/accounts.html",{title:"\u30A2\u30AB\u30A6\u30F3\u30C8"},["/ja/references/accounts","/ja/references/accounts.md"]],["v-567dfebd","/ja/references/basic-transactions.html",{title:"\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1"},["/ja/references/basic-transactions","/ja/references/basic-transactions.md"]],["v-09579540","/ja/references/keypairs-and-wallets.html",{title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8"},["/ja/references/keypairs-and-wallets","/ja/references/keypairs-and-wallets.md"]],["v-04ce05a8","/ja/references/local-development.html",{title:"\u30ED\u30FC\u30AB\u30EB\u958B\u767A"},["/ja/references/local-development","/ja/references/local-development.md"]],["v-7a18373e","/ja/references/name-service.html",{title:"\u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9"},["/ja/references/name-service","/ja/references/name-service.md"]],["v-6d16e4fa","/ja/references/nfts.html",{title:"NFT"},["/ja/references/nfts","/ja/references/nfts.md"]],["v-3f4a7732","/ja/references/offline-transactions.html",{title:"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1"},["/ja/references/offline-transactions","/ja/references/offline-transactions.md"]],["v-ec12307c","/ja/references/programs.html",{title:"\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F5C\u6210"},["/ja/references/programs","/ja/references/programs.md"]],["v-7747468a","/ja/references/staking.html",{title:"\u30B9\u30C6\u30FC\u30AD\u30F3\u30B0"},["/ja/references/staking","/ja/references/staking.md"]],["v-0463f188","/ja/references/token.html",{title:"\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u306E\u5BFE\u8A71"},["/ja/references/token","/ja/references/token.md"]],["v-52cd49a4","/kr/core-concepts/accounts.html",{title:"Accounts"},["/kr/core-concepts/accounts","/kr/core-concepts/accounts.md"]],["v-4a4be76e","/kr/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/kr/core-concepts/pdas","/kr/core-concepts/pdas.md"]],["v-26941245","/kr/core-concepts/programs.html",{title:"Programs"},["/kr/core-concepts/programs","/kr/core-concepts/programs.md"]],["v-2229e59f","/kr/core-concepts/transactions.html",{title:"Transactions"},["/kr/core-concepts/transactions","/kr/core-concepts/transactions.md"]],["v-e97c194e","/kr/getting-started/installation.html",{title:"Installation"},["/kr/getting-started/installation","/kr/getting-started/installation.md"]],["v-c5b19a0e","/kr/guides/account-maps.html",{title:"Account Maps"},["/kr/guides/account-maps","/kr/guides/account-maps.md"]],["v-68262af6","/kr/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/kr/guides/data-migration","/kr/guides/data-migration.md"]],["v-a4865e2e","/kr/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/kr/guides/debugging-solana-programs","/kr/guides/debugging-solana-programs.md"]],["v-37352209","/kr/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/kr/guides/feature-parity-testing","/kr/guides/feature-parity-testing.md"]],["v-0d30a8ea","/kr/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/kr/guides/get-program-accounts","/kr/guides/get-program-accounts.md"]],["v-5329205c","/kr/guides/serialization.html",{title:"Serializing Data"},["/kr/guides/serialization","/kr/guides/serialization.md"]],["v-da88730a","/kr/references/accounts.html",{title:"Accounts"},["/kr/references/accounts","/kr/references/accounts.md"]],["v-2258908d","/kr/references/basic-transactions.html",{title:"Sending Transactions"},["/kr/references/basic-transactions","/kr/references/basic-transactions.md"]],["v-48d4f310","/kr/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/kr/references/keypairs-and-wallets","/kr/references/keypairs-and-wallets.md"]],["v-4d71f9d8","/kr/references/local-development.html",{title:"Local Development"},["/kr/references/local-development","/kr/references/local-development.md"]],["v-cb0f35e4","/kr/references/name-service.html",{title:"Name Service"},["/kr/references/name-service","/kr/references/name-service.md"]],["v-b3ac3a6c","/kr/references/nfts.html",{title:"NFTs"},["/kr/references/nfts","/kr/references/nfts.md"]],["v-7ec7d502","/kr/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/kr/references/offline-transactions","/kr/references/offline-transactions.md"]],["v-3a9304dc","/kr/references/programs.html",{title:"Writing Programs"},["/kr/references/programs","/kr/references/programs.md"]],["v-4055b6ba","/kr/references/staking.html",{title:"Staking"},["/kr/references/staking","/kr/references/staking.md"]],["v-249ea490","/kr/references/token.html",{title:"Interacting with Tokens"},["/kr/references/token","/kr/references/token.md"]],["v-2c987e4b","/pt/core-concepts/accounts.html",{title:"Contas"},["/pt/core-concepts/accounts","/pt/core-concepts/accounts.md"]],["v-203f4825","/pt/core-concepts/cpi.html",{title:"Invoca\xE7\xF5es de Programas Cruzados (CPIs)"},["/pt/core-concepts/cpi","/pt/core-concepts/cpi.md"]],["v-5beb210b","/pt/core-concepts/pdas.html",{title:"Endere\xE7os Derivados de Programa (PDAs)"},["/pt/core-concepts/pdas","/pt/core-concepts/pdas.md"]],["v-7c933562","/pt/core-concepts/programs.html",{title:"Programas"},["/pt/core-concepts/programs","/pt/core-concepts/programs.md"]],["v-4f78323c","/pt/core-concepts/transactions.html",{title:"Transa\xE7\xF5es"},["/pt/core-concepts/transactions","/pt/core-concepts/transactions.md"]],["v-c3a0e694","/pt/getting-started/installation.html",{title:"Instala\xE7\xE3o"},["/pt/getting-started/installation","/pt/getting-started/installation.md"]],["v-8121a608","/pt/guides/account-maps.html",{title:"Mapeamentos de Conta"},["/pt/guides/account-maps","/pt/guides/account-maps.md"]],["v-7c1e6fc8","/pt/guides/data-migration.html",{title:"Migrando Contas de Dados do Programa"},["/pt/guides/data-migration","/pt/guides/data-migration.md"]],["v-19571874","/pt/guides/debugging-solana-programs.html",{title:"Depurando Programas da Solana"},["/pt/guides/debugging-solana-programs","/pt/guides/debugging-solana-programs.md"]],["v-fc0a9768","/pt/guides/feature-parity-testing.html",{title:"Teste de Paridade de Recursos"},["/pt/guides/feature-parity-testing","/pt/guides/feature-parity-testing.md"]],["v-eca82026","/pt/guides/get-program-accounts.html",{title:"Obter Contas do Programa"},["/pt/guides/get-program-accounts","/pt/guides/get-program-accounts.md"]],["v-05ba93a2","/pt/guides/serialization.html",{title:"Serializando Dados"},["/pt/guides/serialization","/pt/guides/serialization.md"]],["v-241ceb48","/pt/guides/versioned-transactions.html",{title:"Transa\xE7\xF5es Versionadas"},["/pt/guides/versioned-transactions","/pt/guides/versioned-transactions.md"]],["v-95f87f04","/pt/references/accounts.html",{title:"Contas"},["/pt/references/accounts","/pt/references/accounts.md"]],["v-6d1e22d0","/pt/references/basic-transactions.html",{title:"Enviando Transa\xE7\xF5es"},["/pt/references/basic-transactions","/pt/references/basic-transactions.md"]],["v-0f01feda","/pt/references/keypairs-and-wallets.html",{title:"Pares de Chaves e Carteiras"},["/pt/references/keypairs-and-wallets","/pt/references/keypairs-and-wallets.md"]],["v-605f9335","/pt/references/local-development.html",{title:"Desenvolvimento Local"},["/pt/references/local-development","/pt/references/local-development.md"]],["v-045da591","/pt/references/name-service.html",{title:"Servi\xE7o de Nomes"},["/pt/references/name-service","/pt/references/name-service.md"]],["v-262d564d","/pt/references/nfts.html",{title:"NFTs"},["/pt/references/nfts","/pt/references/nfts.md"]],["v-2e71e285","/pt/references/offline-transactions.html",{title:"Enviando Transa\xE7\xF5es Offline"},["/pt/references/offline-transactions","/pt/references/offline-transactions.md"]],["v-04fe7795","/pt/references/programs.html",{title:"Escrevendo Programas"},["/pt/references/programs","/pt/references/programs.md"]],["v-51f4f057","/pt/references/staking.html",{title:"Staking"},["/pt/references/staking","/pt/references/staking.md"]],["v-6e1baa95","/pt/references/token.html",{title:"Interagindo com Tokens"},["/pt/references/token","/pt/references/token.md"]],["v-c5f91db4","/th/getting-started/installation.html",{title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07"},["/th/getting-started/installation","/th/getting-started/installation.md"]],["v-3f8c76bb","/th/core-concepts/accounts.html",{title:"Accounts"},["/th/core-concepts/accounts","/th/core-concepts/accounts.md"]],["v-310cd17b","/th/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/th/core-concepts/pdas","/th/core-concepts/pdas.md"]],["v-e0f1a45c","/th/core-concepts/programs.html",{title:"Programs"},["/th/core-concepts/programs","/th/core-concepts/programs.md"]],["v-5dda72ac","/th/core-concepts/transactions.html",{title:"Transactions"},["/th/core-concepts/transactions","/th/core-concepts/transactions.md"]],["v-f7cfc3e4","/th/references/accounts.html",{title:"Accounts"},["/th/references/accounts","/th/references/accounts.md"]],["v-48c6cc60","/th/references/basic-transactions.html",{title:"Sending Transactions"},["/th/references/basic-transactions","/th/references/basic-transactions.md"]],["v-e6b8f3ba","/th/references/keypairs-and-wallets.html",{title:"Keypairs \u0E41\u0E25\u0E30 Wallets"},["/th/references/keypairs-and-wallets","/th/references/keypairs-and-wallets.md"]],["v-5f3377a5","/th/references/local-development.html",{title:"Local Development"},["/th/references/local-development","/th/references/local-development.md"]],["v-4fe8bb21","/th/references/name-service.html",{title:"Name Service"},["/th/references/name-service","/th/references/name-service.md"]],["v-00aefbdd","/th/references/nfts.html",{title:"NFTs"},["/th/references/nfts","/th/references/nfts.md"]],["v-7ad32fd6","/th/references/offline-transactions.html",{title:"Sending Offline Transactions"},["/th/references/offline-transactions","/th/references/offline-transactions.md"]],["v-57da55b6","/th/references/programs.html",{title:"\u0E40\u0E02\u0E35\u0E22\u0E19 Programs"},["/th/references/programs","/th/references/programs.md"]],["v-2716a0c7","/th/references/staking.html",{title:"Staking"},["/th/references/staking","/th/references/staking.md"]],["v-386291f6","/th/references/token.html",{title:"\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 Tokens"},["/th/references/token","/th/references/token.md"]],["v-e2f8eae8","/th/guides/account-maps.html",{title:"Account Maps"},["/th/guides/account-maps","/th/guides/account-maps.md"]],["v-50dcad50","/th/guides/data-migration.html",{title:"Migrating Program Data Accounts"},["/th/guides/data-migration","/th/guides/data-migration.md"]],["v-387ebf94","/th/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs"},["/th/guides/debugging-solana-programs","/th/guides/debugging-solana-programs.md"]],["v-5da35ddc","/th/guides/feature-parity-testing.html",{title:"Feature Parity Testing"},["/th/guides/feature-parity-testing","/th/guides/feature-parity-testing.md"]],["v-4791bd7d","/th/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/th/guides/get-program-accounts","/th/guides/get-program-accounts.md"]],["v-109a0a9f","/th/guides/serialization.html",{title:"Serializing Data"},["/th/guides/serialization","/th/guides/serialization.md"]],["v-0074d650","/th/guides/versioned-transactions.html",{title:"Versioned Transactions"},["/th/guides/versioned-transactions","/th/guides/versioned-transactions.md"]],["v-46a93876","/tr/core-concepts/accounts.html",{title:"Accounts (Account\u2019lar)"},["/tr/core-concepts/accounts","/tr/core-concepts/accounts.md"]],["v-5aefd385","/tr/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs) (Programdan T\xFCretilmi\u015F Adresler)"},["/tr/core-concepts/pdas","/tr/core-concepts/pdas.md"]],["v-2ca61adc","/tr/core-concepts/programs.html",{title:"Programs (Programlar)"},["/tr/core-concepts/programs","/tr/core-concepts/programs.md"]],["v-4847cab6","/tr/core-concepts/transactions.html",{title:"Transactions (\u0130\u015Flemler)"},["/tr/core-concepts/transactions","/tr/core-concepts/transactions.md"]],["v-bd0a22a0","/tr/getting-started/installation.html",{title:"Installation"},["/tr/getting-started/installation","/tr/getting-started/installation.md"]],["v-bdfe6c7c","/tr/guides/account-maps.html",{title:"Account Maps (Hesap Haritalar\u0131)"},["/tr/guides/account-maps","/tr/guides/account-maps.md"]],["v-3fbbf30e","/tr/guides/data-migration.html",{title:"Migrating a Programs Data Accounts (Programlar\u0131n Data Account\u2019lar\u0131n\u0131 Ta\u015F\u0131ma)"},["/tr/guides/data-migration","/tr/guides/data-migration.md"]],["v-846b6e80","/tr/guides/debugging-solana-programs.html",{title:"Debugging Solana Programs (Solana Programlar\u0131nda Hata Ay\u0131klama)"},["/tr/guides/debugging-solana-programs","/tr/guides/debugging-solana-programs.md"]],["v-2fc8dcdc","/tr/guides/feature-parity-testing.html",{title:"Feature Parity Testing (\xD6zellik Parite Testi)"},["/tr/guides/feature-parity-testing","/tr/guides/feature-parity-testing.md"]],["v-aa61329a","/tr/guides/get-program-accounts.html",{title:"Get Program Accounts"},["/tr/guides/get-program-accounts","/tr/guides/get-program-accounts.md"]],["v-4dc4b229","/tr/guides/serialization.html",{title:"Serializing Data (Serile\u015Ftirme)"},["/tr/guides/serialization","/tr/guides/serialization.md"]],["v-d2d54578","/tr/references/accounts.html",{title:"Accounts (Account\u2019lar)"},["/tr/references/accounts","/tr/references/accounts.md"]],["v-5981ffd4","/tr/references/basic-transactions.html",{title:"Sending Transactions(\u0130\u015Flem G\xF6nderimi)"},["/tr/references/basic-transactions","/tr/references/basic-transactions.md"]],["v-59dda459","/tr/references/keypairs-and-wallets.html",{title:"Keypairs and Wallets"},["/tr/references/keypairs-and-wallets","/tr/references/keypairs-and-wallets.md"]],["v-63aaf52f","/tr/references/local-development.html",{title:"Local Development (Yerel Geli\u015Ftirme)"},["/tr/references/local-development","/tr/references/local-development.md"]],["v-56a76f57","/tr/references/name-service.html",{title:"Name Service (Name Servisi)"},["/tr/references/name-service","/tr/references/name-service.md"]],["v-41e84613","/tr/references/nfts.html",{title:"Non Fungible Tokens (NFTs)"},["/tr/references/nfts","/tr/references/nfts.md"]],["v-e05ef36a","/tr/references/offline-transactions.html",{title:"Offline Transaction (\xC7evrimd\u0131\u015F\u0131 i\u015Flem)"},["/tr/references/offline-transactions","/tr/references/offline-transactions.md"]],["v-32dfd74a","/tr/references/programs.html",{title:"Writing Programs (Programlar\u0131 Yazma)"},["/tr/references/programs","/tr/references/programs.md"]],["v-50f9a2d1","/tr/references/staking.html",{title:"Staking (Stake Etme)"},["/tr/references/staking","/tr/references/staking.md"]],["v-6c8298e2","/tr/references/token.html",{title:"Interacting with Tokens (Token\u2019lar ile Etkile\u015Fim)"},["/tr/references/token","/tr/references/token.md"]],["v-6a35b27a","/vi/core-concepts/accounts.html",{title:"Accounts"},["/vi/core-concepts/accounts","/vi/core-concepts/accounts.md"]],["v-8e20768c","/vi/core-concepts/pdas.html",{title:"Program Derived Addresses (PDAs)"},["/vi/core-concepts/pdas","/vi/core-concepts/pdas.md"]],["v-8b9f2cde","/vi/core-concepts/programs.html",{title:"Programs"},["/vi/core-concepts/programs","/vi/core-concepts/programs.md"]],["v-55f1b6eb","/vi/core-concepts/transactions.html",{title:"Transactions"},["/vi/core-concepts/transactions","/vi/core-concepts/transactions.md"]],["v-274abcb6","/vi/getting-started/installation.html",{title:"C\xE0i \u0111\u1EB7t"},["/vi/getting-started/installation","/vi/getting-started/installation.md"]],["v-02feff2d","/vi/guides/account-maps.html",{title:"Account Maps"},["/vi/guides/account-maps","/vi/guides/account-maps.md"]],["v-1b0279b9","/vi/guides/data-migration.html",{title:"N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u cho Program Account"},["/vi/guides/data-migration","/vi/guides/data-migration.md"]],["v-5afd7935","/vi/guides/debugging-solana-programs.html",{title:"So\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana"},["/vi/guides/debugging-solana-programs","/vi/guides/debugging-solana-programs.md"]],["v-0d9b8586","/vi/guides/feature-parity-testing.html",{title:"\u0110\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity"},["/vi/guides/feature-parity-testing","/vi/guides/feature-parity-testing.md"]],["v-5263011e","/vi/guides/get-program-accounts.html",{title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account"},["/vi/guides/get-program-accounts","/vi/guides/get-program-accounts.md"]],["v-2b8d2a1e","/vi/guides/serialization.html",{title:"Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u"},["/vi/guides/serialization","/vi/guides/serialization.md"]],["v-0ed8daa2","/vi/references/accounts.html",{title:"Accounts"},["/vi/references/accounts","/vi/references/accounts.md"]],["v-3754a87e","/vi/references/basic-transactions.html",{title:"G\u1EEDi Transaction"},["/vi/references/basic-transactions","/vi/references/basic-transactions.md"]],["v-7ff81144","/vi/references/keypairs-and-wallets.html",{title:"C\u1EB7p kho\xE1 v\xE0 V\xED"},["/vi/references/keypairs-and-wallets","/vi/references/keypairs-and-wallets.md"]],["v-a2eaafb8","/vi/references/local-development.html",{title:"L\u1EADp tr\xECnh \u1EDF Local"},["/vi/references/local-development","/vi/references/local-development.md"]],["v-7a66f742","/vi/references/name-service.html",{title:"D\u1ECBch v\u1EE5 t\xEAn mi\u1EC1n"},["/vi/references/name-service","/vi/references/name-service.md"]],["v-1b97e8fe","/vi/references/nfts.html",{title:"NFTs"},["/vi/references/nfts","/vi/references/nfts.md"]],["v-942a1994","/vi/references/offline-transactions.html",{title:"G\u1EEDi Transactions Ngo\u1EA1i tuy\u1EBFn"},["/vi/references/offline-transactions","/vi/references/offline-transactions.md"]],["v-488e49c6","/vi/references/programs.html",{title:"X\xE2y d\u1EF1ng Programs"},["/vi/references/programs","/vi/references/programs.md"]],["v-a20cd7f4","/vi/references/staking.html",{title:"Staking"},["/vi/references/staking","/vi/references/staking.md"]],["v-26036e04","/vi/references/token.html",{title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens"},["/vi/references/token","/vi/references/token.md"]],["v-43987c75","/zh/core-concepts/accounts.html",{title:"\u8D26\u6237"},["/zh/core-concepts/accounts","/zh/core-concepts/accounts.md"]],["v-3c24c435","/zh/core-concepts/pdas.html",{title:"\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237 (PDA)"},["/zh/core-concepts/pdas","/zh/core-concepts/pdas.md"]],["v-d8d998e8","/zh/core-concepts/programs.html",{title:"\u7A0B\u5E8F"},["/zh/core-concepts/programs","/zh/core-concepts/programs.md"]],["v-66cde934","/zh/core-concepts/transactions.html",{title:"\u4EA4\u6613"},["/zh/core-concepts/transactions","/zh/core-concepts/transactions.md"]],["v-567ec360","/zh/getting-started/installation.html",{title:"\u5B89\u88C5"},["/zh/getting-started/installation","/zh/getting-started/installation.md"]],["v-332c21dc","/zh/guides/account-maps.html",{title:"\u8D26\u6237\u6620\u5C04"},["/zh/guides/account-maps","/zh/guides/account-maps.md"]],["v-611df744","/zh/guides/data-migration.html",{title:"\u8FC1\u79FB\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237"},["/zh/guides/data-migration","/zh/guides/data-migration.md"]],["v-23177520","/zh/guides/debugging-solana-programs.html",{title:"\u8C03\u8BD5 Solana \u7A0B\u5E8F"},["/zh/guides/debugging-solana-programs","/zh/guides/debugging-solana-programs.md"]],["v-58db5a3c","/zh/guides/feature-parity-testing.html",{title:"\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5"},["/zh/guides/feature-parity-testing","/zh/guides/feature-parity-testing.md"]],["v-9eb387fa","/zh/guides/get-program-accounts.html",{title:"\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237"},["/zh/guides/get-program-accounts","/zh/guides/get-program-accounts.md"]],["v-94ff924e","/zh/guides/serialization.html",{title:"\u5E8F\u5217\u6570\u636E"},["/zh/guides/serialization","/zh/guides/serialization.md"]],["v-75b489de","/zh/guides/versioned-transactions.html",{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)"},["/zh/guides/versioned-transactions","/zh/guides/versioned-transactions.md"]],["v-4802fad8","/zh/references/accounts.html",{title:"\u8D26\u6237"},["/zh/references/accounts","/zh/references/accounts.md"]],["v-82947d34","/zh/references/basic-transactions.html",{title:"\u53D1\u9001\u4EA4\u6613"},["/zh/references/basic-transactions","/zh/references/basic-transactions.md"]],["v-42a951a9","/zh/references/keypairs-and-wallets.html",{title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305"},["/zh/references/keypairs-and-wallets","/zh/references/keypairs-and-wallets.md"]],["v-18aec9df","/zh/references/local-development.html",{title:"\u672C\u5730\u5F00\u53D1"},["/zh/references/local-development","/zh/references/local-development.md"]],["v-654526b2","/zh/references/name-service.html",{title:"\u547D\u540D\u670D\u52A1"},["/zh/references/name-service","/zh/references/name-service.md"]],["v-844ed93a","/zh/references/nfts.html",{title:"\u975E\u540C\u8D28\u5316\u4EE3\u5E01 (NFTs)"},["/zh/references/nfts","/zh/references/nfts.md"]],["v-789c339b","/zh/references/offline-transactions.html",{title:"\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613"},["/zh/references/offline-transactions","/zh/references/offline-transactions.md"]],["v-2bf939ab","/zh/references/programs.html",{title:"\u7F16\u5199\u7A0B\u5E8F"},["/zh/references/programs","/zh/references/programs.md"]],["v-322e9381","/zh/references/staking.html",{title:"\u8D28\u62BC"},["/zh/references/staking","/zh/references/staking.md"]],["v-684fdf82","/zh/references/token.html",{title:"\u4E0E\u4EE3\u5E01\u4E92\u52A8"},["/zh/references/token","/zh/references/token.md"]],["v-3707792a","/zh_t/core-concepts/accounts.html",{title:"\u8CEC\u6236"},["/zh_t/core-concepts/accounts","/zh_t/core-concepts/accounts.md"]],["v-1990636a","/zh_t/core-concepts/pdas.html",{title:"\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236 (PDA)"},["/zh_t/core-concepts/pdas","/zh_t/core-concepts/pdas.md"]],["v-f1fb9f7e","/zh_t/core-concepts/programs.html",{title:"\u7A0B\u5E8F"},["/zh_t/core-concepts/programs","/zh_t/core-concepts/programs.md"]],["v-4220a59b","/zh_t/core-concepts/transactions.html",{title:"\u4EA4\u6613"},["/zh_t/core-concepts/transactions","/zh_t/core-concepts/transactions.md"]],["v-eeeeb756","/zh_t/getting-started/installation.html",{title:"\u5B89\u88DD"},["/zh_t/getting-started/installation","/zh_t/getting-started/installation.md"]],["v-931b9306","/zh_t/guides/account-maps.html",{title:"\u8CEC\u6236\u6620\u5C04"},["/zh_t/guides/account-maps","/zh_t/guides/account-maps.md"]],["v-82f5c5ee","/zh_t/guides/data-migration.html",{title:"\u9077\u79FB\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236"},["/zh_t/guides/data-migration","/zh_t/guides/data-migration.md"]],["v-560aa3e5","/zh_t/guides/debugging-solana-programs.html",{title:"\u8ABF\u8A66 Solana \u7A0B\u5E8F"},["/zh_t/guides/debugging-solana-programs","/zh_t/guides/debugging-solana-programs.md"]],["v-3a76dee6","/zh_t/guides/feature-parity-testing.html",{title:"\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66"},["/zh_t/guides/feature-parity-testing","/zh_t/guides/feature-parity-testing.md"]],["v-27dc2f24","/zh_t/guides/get-program-accounts.html",{title:"\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236"},["/zh_t/guides/get-program-accounts","/zh_t/guides/get-program-accounts.md"]],["v-32fe4664","/zh_t/guides/serialization.html",{title:"\u5E8F\u5217\u6578\u64DA"},["/zh_t/guides/serialization","/zh_t/guides/serialization.md"]],["v-f63270ee","/zh_t/guides/versioned-transactions.html",{title:"\u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)"},["/zh_t/guides/versioned-transactions","/zh_t/guides/versioned-transactions.md"]],["v-a7f26c02","/zh_t/references/accounts.html",{title:"\u8CEC\u6236"},["/zh_t/references/accounts","/zh_t/references/accounts.md"]],["v-643001de","/zh_t/references/basic-transactions.html",{title:"\u767C\u9001\u4EA4\u6613"},["/zh_t/references/basic-transactions","/zh_t/references/basic-transactions.md"]],["v-4e42d094","/zh_t/references/keypairs-and-wallets.html",{title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305"},["/zh_t/references/keypairs-and-wallets","/zh_t/references/keypairs-and-wallets.md"]],["v-4ab8aad4","/zh_t/references/local-development.html",{title:"\u672C\u5730\u958B\u767C"},["/zh_t/references/local-development","/zh_t/references/local-development.md"]],["v-47ce0692","/zh_t/references/name-service.html",{title:"\u547D\u540D\u670D\u52D9"},["/zh_t/references/name-service","/zh_t/references/name-service.md"]],["v-9d296f64","/zh_t/references/nfts.html",{title:"\u975E\u540C\u8CEA\u5316\u4EE3\u5E63 (NFTs)"},["/zh_t/references/nfts","/zh_t/references/nfts.md"]],["v-f7949af4","/zh_t/references/offline-transactions.html",{title:"\u767C\u9001\u96E2\u7DDA\u4EA4\u6613"},["/zh_t/references/offline-transactions","/zh_t/references/offline-transactions.md"]],["v-07fcfdd4","/zh_t/references/programs.html",{title:"\u7DE8\u5BEB\u7A0B\u5E8F"},["/zh_t/references/programs","/zh_t/references/programs.md"]],["v-0f9a32b6","/zh_t/references/staking.html",{title:"\u8CEA\u62BC"},["/zh_t/references/staking","/zh_t/references/staking.md"]],["v-4a9bf8b4","/zh_t/references/token.html",{title:"\u8207\u4EE3\u5E63\u4E92\u52D5"},["/zh_t/references/token","/zh_t/references/token.md"]],["v-3706649a","/404.html",{title:""},["/404"]]],D_=A_.reduce((e,[t,l,n,r])=>(e.push({name:t,path:l,component:Ba,meta:n},...r.map(i=>({path:i,redirect:l}))),e),[{name:"404",path:"/:catchAll(.*)",component:Ba}]),S_=Pg,I_=()=>{const e=am({history:S_(km(Et.value.base)),routes:D_,scrollBehavior:(t,l,n)=>n||(t.hash?{el:t.hash}:{top:0})});return e.beforeResolve(async(t,l)=>{var n;(t.path!==l.path||l===st)&&([ut.value]=await Promise.all([Ft.resolvePageData(t.name),(n=bc[t.name])===null||n===void 0?void 0:n.__asyncLoader()]))}),e},R_=e=>{e.component("ClientOnly",sm),e.component("Content",zi)},C_=(e,t)=>{const l=_e(()=>Ft.resolveRouteLocale(Et.value.locales,t.currentRoute.value.path)),n=_e(()=>Ft.resolveSiteLocaleData(Et.value,l.value)),r=_e(()=>Ft.resolvePageFrontmatter(ut.value)),i=_e(()=>Ft.resolvePageHeadTitle(ut.value,n.value)),o=_e(()=>Ft.resolvePageHead(i.value,r.value,n.value)),s=_e(()=>Ft.resolvePageLang(ut.value));return e.provide(Fi,l),e.provide(Oc,n),e.provide(Ec,r),e.provide(mm,i),e.provide(Pc,o),e.provide(wc,s),Object.defineProperties(e.config.globalProperties,{$frontmatter:{get:()=>r.value},$head:{get:()=>o.value},$headTitle:{get:()=>i.value},$lang:{get:()=>s.value},$page:{get:()=>ut.value},$routeLocale:{get:()=>l.value},$site:{get:()=>Et.value},$siteLocale:{get:()=>n.value},$withBase:{get:()=>wm}}),{pageData:ut,pageFrontmatter:r,pageHead:o,pageHeadTitle:i,pageLang:s,routeLocale:l,siteData:Et,siteLocaleData:n}},x_=()=>{const e=Vi(),t=gm(),l=Tc(),n=Ee([]),r=()=>{t.value.forEach(o=>{const s=V_(o);s&&n.value.push(s)})},i=()=>{document.documentElement.lang=l.value,n.value.forEach(o=>{o.parentNode===document.head&&document.head.removeChild(o)}),n.value.splice(0,n.value.length),t.value.forEach(o=>{const s=F_(o);s!==null&&(document.head.appendChild(s),n.value.push(s))})};Kt(pm,i),tt(()=>{r(),i(),et(()=>e.path,()=>i())})},V_=([e,t,l=""])=>{const n=Object.entries(t).map(([s,c])=>be(c)?`[${s}="${c}"]`:c===!0?`[${s}]`:"").join(""),r=`head > ${e}${n}`;return Array.from(document.querySelectorAll(r)).find(s=>s.innerText===l)||null},F_=([e,t,l])=>{if(!be(e))return null;const n=document.createElement(e);return Ac(t)&&Object.entries(t).forEach(([r,i])=>{be(i)?n.setAttribute(r,i):i===!0&&n.setAttribute(r,"")}),be(l)&&n.appendChild(document.createTextNode(l)),n},j_=ng,z_=async()=>{const e=j_({name:"VuepressApp",setup(){x_();for(const l of O_)l();return()=>[ee(_c),...v_.map(l=>ee(l))]}}),t=I_();R_(e),C_(e,t);for(const l of h_)await l({app:e,router:t,siteData:Et});return e.use(t),{app:e,router:t}};z_().then(({app:e,router:t})=>{t.isReady().then(()=>{e.mount("#app")})});export{Lc as A,q_ as B,J_ as C,ee as D,wm as E,Ne as F,sm as G,Pt as H,Ee as I,et as J,M_ as K,W_ as L,Em as M,km as N,ln as O,be as P,yv as Q,tt as R,Qn as S,Ri as T,nn as U,Q_ as V,Ac as W,U_ as X,Li as Y,Ev as Z,a_ as _,Fn as a,Te as b,Ai as c,z_ as createVueApp,Di as d,H_ as e,Me as f,jc as g,Bt as h,hm as i,_e as j,te as k,K_ as l,B_ as m,Vi as n,tn as o,yd as p,ec as q,gh as r,bh as s,xu as t,ji as u,jn as v,Id as w,ym as x,$_ as y,G_ as z}; diff --git a/docs/.vuepress/dist/assets/auto-approve.html.4e3677ac.js b/docs/.vuepress/dist/assets/auto-approve.html.9a6c68ed.js similarity index 97% rename from docs/.vuepress/dist/assets/auto-approve.html.4e3677ac.js rename to docs/.vuepress/dist/assets/auto-approve.html.9a6c68ed.js index 6a45b0845..aba7e6bce 100644 --- a/docs/.vuepress/dist/assets/auto-approve.html.4e3677ac.js +++ b/docs/.vuepress/dist/assets/auto-approve.html.9a6c68ed.js @@ -1 +1 @@ -import{_ as s,r as e,o as l,c as r,a,b as t,F as i,d as n}from"./app.07ce7a66.js";const g={},p=a("p",null,"WIP - This is a work in progress",-1),m=a("h1",{id:"paano-awtomatikong-aprubahan-ang-transaksyon-para-sa-mabilis-na-paglalaro-at-mahusay-na-ux",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#paano-awtomatikong-aprubahan-ang-transaksyon-para-sa-mabilis-na-paglalaro-at-mahusay-na-ux","aria-hidden":"true"},"#"),n(" Paano awtomatikong aprubahan ang transaksyon para sa mabilis na paglalaro at mahusay na ux")],-1),u=a("p",null,"Upang magkaroon ng tuluy-tuloy na paglalaro para sa mga on-chain na laro, kapaki-pakinabang na magkaroon ng wallet na awtomatikong aprubahan.",-1),c=a("ol",null,[a("li",null,"Nag-aalok ang Solflare wallet ng auto-approve functionality na may burner wallet, ngunit nililimitahan nito ang iyong mga manlalaro sa isang wallet lang.")],-1),_={href:"https://twitter.com/solflare_wallet/status/1625950688709644324",target:"_blank",rel:"noopener noreferrer"},d=n("Burner Auto Approve Wallets"),h=a("br",null,null,-1),k=a("ol",{start:"2"},[a("li",null,"Ang isa pang paraan para gawin ito ay ang gumawa ng key pair sa iyong laro at hayaan ang manlalaro na maglipat ng ilang sol sa wallet na iyon at pagkatapos ay gamitin ito upang magbayad para sa mga bayarin sa transaksyon. Ang problema lang dito ay kailangan mong pangasiwaan ang seguridad para sa wallet na ito at ang mga manlalaro ay kailangang magkaroon ng access sa kanilang seed phrase.")],-1),y={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/blob/main/Assets/SolPlay/Scripts/Services/WalletHolderService.cs",target:"_blank",rel:"noopener noreferrer"},b=n("Halimbawa ng Source Code"),w=a("br",null,null,-1),f={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},x=n("Halimbawa ng Laro"),S=a("br",null,null,-1),A={start:"3"},v=a("li",null,[a("p",null,"Maaari mong bayaran ang mga bayarin sa iyong sarili, sa pamamagitan ng paggawa at pagpirma sa mga transaksyon sa backend at makipag-ugnayan dito sa pamamagitan ng isang API. Para doon magpadala ka ng mga parameter sa iyong backend at lagdaan ang transaksyon doon at magpadala ng kumpirmasyon sa kliyente sa sandaling tapos na ito.")],-1),P=n("May protocol na tinatawag na @gumisfunn at naglabas sila ng feature na tinatawag na session keys. Ang Session Keys ay mga ephemeral key na may pinong saklaw ng programa/pagtuturo para sa tiered na pag-access sa iyong mga programang @solana. Nagbibigay-daan ang mga ito sa mga user na makipag-ugnayan sa mga app sa ilalim ng mga partikular na parameter tulad ng tagal, max na mga token, dami ng mga post o anumang iba pang function na partikular sa isang app. "),N={href:"https://twitter.com/gumisfunn/status/1642898237395972097?s=20",target:"_blank",rel:"noopener noreferrer"},B=n("Link");function H(I,L){const o=e("ExternalLinkIcon");return l(),r(i,null,[p,m,u,c,a("p",null,[a("a",_,[d,t(o)]),h]),k,a("p",null,[a("a",y,[b,t(o)]),w,a("a",f,[x,t(o)]),S]),a("ol",A,[v,a("li",null,[a("p",null,[P,a("a",N,[B,t(o)])])])])],64)}var E=s(g,[["render",H]]);export{E as default}; +import{_ as s,r as e,o as l,c as r,a,b as t,F as i,d as n}from"./app.d411e3b3.js";const g={},p=a("p",null,"WIP - This is a work in progress",-1),m=a("h1",{id:"paano-awtomatikong-aprubahan-ang-transaksyon-para-sa-mabilis-na-paglalaro-at-mahusay-na-ux",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#paano-awtomatikong-aprubahan-ang-transaksyon-para-sa-mabilis-na-paglalaro-at-mahusay-na-ux","aria-hidden":"true"},"#"),n(" Paano awtomatikong aprubahan ang transaksyon para sa mabilis na paglalaro at mahusay na ux")],-1),u=a("p",null,"Upang magkaroon ng tuluy-tuloy na paglalaro para sa mga on-chain na laro, kapaki-pakinabang na magkaroon ng wallet na awtomatikong aprubahan.",-1),c=a("ol",null,[a("li",null,"Nag-aalok ang Solflare wallet ng auto-approve functionality na may burner wallet, ngunit nililimitahan nito ang iyong mga manlalaro sa isang wallet lang.")],-1),_={href:"https://twitter.com/solflare_wallet/status/1625950688709644324",target:"_blank",rel:"noopener noreferrer"},d=n("Burner Auto Approve Wallets"),h=a("br",null,null,-1),k=a("ol",{start:"2"},[a("li",null,"Ang isa pang paraan para gawin ito ay ang gumawa ng key pair sa iyong laro at hayaan ang manlalaro na maglipat ng ilang sol sa wallet na iyon at pagkatapos ay gamitin ito upang magbayad para sa mga bayarin sa transaksyon. Ang problema lang dito ay kailangan mong pangasiwaan ang seguridad para sa wallet na ito at ang mga manlalaro ay kailangang magkaroon ng access sa kanilang seed phrase.")],-1),y={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/blob/main/Assets/SolPlay/Scripts/Services/WalletHolderService.cs",target:"_blank",rel:"noopener noreferrer"},b=n("Halimbawa ng Source Code"),w=a("br",null,null,-1),f={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},x=n("Halimbawa ng Laro"),S=a("br",null,null,-1),A={start:"3"},v=a("li",null,[a("p",null,"Maaari mong bayaran ang mga bayarin sa iyong sarili, sa pamamagitan ng paggawa at pagpirma sa mga transaksyon sa backend at makipag-ugnayan dito sa pamamagitan ng isang API. Para doon magpadala ka ng mga parameter sa iyong backend at lagdaan ang transaksyon doon at magpadala ng kumpirmasyon sa kliyente sa sandaling tapos na ito.")],-1),P=n("May protocol na tinatawag na @gumisfunn at naglabas sila ng feature na tinatawag na session keys. Ang Session Keys ay mga ephemeral key na may pinong saklaw ng programa/pagtuturo para sa tiered na pag-access sa iyong mga programang @solana. Nagbibigay-daan ang mga ito sa mga user na makipag-ugnayan sa mga app sa ilalim ng mga partikular na parameter tulad ng tagal, max na mga token, dami ng mga post o anumang iba pang function na partikular sa isang app. "),N={href:"https://twitter.com/gumisfunn/status/1642898237395972097?s=20",target:"_blank",rel:"noopener noreferrer"},B=n("Link");function H(I,L){const o=e("ExternalLinkIcon");return l(),r(i,null,[p,m,u,c,a("p",null,[a("a",_,[d,t(o)]),h]),k,a("p",null,[a("a",y,[b,t(o)]),w,a("a",f,[x,t(o)]),S]),a("ol",A,[v,a("li",null,[a("p",null,[P,a("a",N,[B,t(o)])])])])],64)}var E=s(g,[["render",H]]);export{E as default}; diff --git a/docs/.vuepress/dist/assets/auto-approve.html.1e147577.js b/docs/.vuepress/dist/assets/auto-approve.html.e43815fe.js similarity index 97% rename from docs/.vuepress/dist/assets/auto-approve.html.1e147577.js rename to docs/.vuepress/dist/assets/auto-approve.html.e43815fe.js index 2d9e7cd90..0294f9599 100644 --- a/docs/.vuepress/dist/assets/auto-approve.html.1e147577.js +++ b/docs/.vuepress/dist/assets/auto-approve.html.e43815fe.js @@ -1 +1 @@ -import{_ as n,r,o as s,c as l,a as e,b as a,F as i,d as t}from"./app.07ce7a66.js";const c={},h=e("p",null,"WIP - This is a work in progress",-1),d=e("h1",{id:"how-to-auto-approve-transaction-for-fast-game-play-and-great-ux",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-auto-approve-transaction-for-fast-game-play-and-great-ux","aria-hidden":"true"},"#"),t(" How to auto approve transaction for fast game play and great ux")],-1),p=e("p",null,"To have a fluid game play for on-chain games it is beneficial to have an auto approve wallet.",-1),u=e("ol",null,[e("li",null,"Solflare wallet offers auto-approve functionality with burner wallets, but this limits your players to only one wallet.")],-1),_={href:"https://twitter.com/solflare_wallet/status/1625950688709644324",target:"_blank",rel:"noopener noreferrer"},f=t("Burner Auto Approve Wallets"),m=e("br",null,null,-1),y=e("ol",{start:"2"},[e("li",null,"Another way to do it is to create a key pair in your game and let the player transfer some sol to that wallet and then use it to pay for transaction fees. Only problem with this is that you need to handle the security for this wallet and the players would need to have access to their seed phrase.")],-1),g={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/blob/main/Assets/SolPlay/Scripts/Services/WalletHolderService.cs",target:"_blank",rel:"noopener noreferrer"},w=t("Example Source Code"),b=e("br",null,null,-1),k={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},v=t("Example Game"),x=e("br",null,null,-1),S={start:"3"},A=e("li",null,[e("p",null,"You can pay the fees yourself, by creating and signing the transactions in the backend and interact with it via an API. For that you send parameters to your backend and sign the transaction there and send a confirmation to the client as soon as it is done.")],-1),E=t("There is a protocol called @gumisfunn and they released a feature called session keys. Session Keys are ephemeral keys with fine-grained program/instruction scoping for tiered access in your @solana programs. They allow users to interact with apps under particular parameters like duration, max tokens, amount of posts or any other function specific to an app. "),T={href:"https://twitter.com/gumisfunn/status/1642898237395972097?s=20",target:"_blank",rel:"noopener noreferrer"},B=t("Link");function I(P,W){const o=r("ExternalLinkIcon");return s(),l(i,null,[h,d,p,u,e("p",null,[e("a",_,[f,a(o)]),m]),y,e("p",null,[e("a",g,[w,a(o)]),b,e("a",k,[v,a(o)]),x]),e("ol",S,[A,e("li",null,[e("p",null,[E,e("a",T,[B,a(o)])])])])],64)}var H=n(c,[["render",I]]);export{H as default}; +import{_ as n,r,o as s,c as l,a as e,b as a,F as i,d as t}from"./app.d411e3b3.js";const c={},h=e("p",null,"WIP - This is a work in progress",-1),d=e("h1",{id:"how-to-auto-approve-transaction-for-fast-game-play-and-great-ux",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-auto-approve-transaction-for-fast-game-play-and-great-ux","aria-hidden":"true"},"#"),t(" How to auto approve transaction for fast game play and great ux")],-1),p=e("p",null,"To have a fluid game play for on-chain games it is beneficial to have an auto approve wallet.",-1),u=e("ol",null,[e("li",null,"Solflare wallet offers auto-approve functionality with burner wallets, but this limits your players to only one wallet.")],-1),_={href:"https://twitter.com/solflare_wallet/status/1625950688709644324",target:"_blank",rel:"noopener noreferrer"},f=t("Burner Auto Approve Wallets"),m=e("br",null,null,-1),y=e("ol",{start:"2"},[e("li",null,"Another way to do it is to create a key pair in your game and let the player transfer some sol to that wallet and then use it to pay for transaction fees. Only problem with this is that you need to handle the security for this wallet and the players would need to have access to their seed phrase.")],-1),g={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/blob/main/Assets/SolPlay/Scripts/Services/WalletHolderService.cs",target:"_blank",rel:"noopener noreferrer"},w=t("Example Source Code"),b=e("br",null,null,-1),k={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},v=t("Example Game"),x=e("br",null,null,-1),S={start:"3"},A=e("li",null,[e("p",null,"You can pay the fees yourself, by creating and signing the transactions in the backend and interact with it via an API. For that you send parameters to your backend and sign the transaction there and send a confirmation to the client as soon as it is done.")],-1),E=t("There is a protocol called @gumisfunn and they released a feature called session keys. Session Keys are ephemeral keys with fine-grained program/instruction scoping for tiered access in your @solana programs. They allow users to interact with apps under particular parameters like duration, max tokens, amount of posts or any other function specific to an app. "),T={href:"https://twitter.com/gumisfunn/status/1642898237395972097?s=20",target:"_blank",rel:"noopener noreferrer"},B=t("Link");function I(P,W){const o=r("ExternalLinkIcon");return s(),l(i,null,[h,d,p,u,e("p",null,[e("a",_,[f,a(o)]),m]),y,e("p",null,[e("a",g,[w,a(o)]),b,e("a",k,[v,a(o)]),x]),e("ol",S,[A,e("li",null,[e("p",null,[E,e("a",T,[B,a(o)])])])])],64)}var H=n(c,[["render",I]]);export{H as default}; diff --git a/docs/.vuepress/dist/assets/auto-approve.html.e352de0c.js b/docs/.vuepress/dist/assets/auto-approve.html.ef828a0c.js similarity index 97% rename from docs/.vuepress/dist/assets/auto-approve.html.e352de0c.js rename to docs/.vuepress/dist/assets/auto-approve.html.ef828a0c.js index 2d9e7cd90..0294f9599 100644 --- a/docs/.vuepress/dist/assets/auto-approve.html.e352de0c.js +++ b/docs/.vuepress/dist/assets/auto-approve.html.ef828a0c.js @@ -1 +1 @@ -import{_ as n,r,o as s,c as l,a as e,b as a,F as i,d as t}from"./app.07ce7a66.js";const c={},h=e("p",null,"WIP - This is a work in progress",-1),d=e("h1",{id:"how-to-auto-approve-transaction-for-fast-game-play-and-great-ux",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-auto-approve-transaction-for-fast-game-play-and-great-ux","aria-hidden":"true"},"#"),t(" How to auto approve transaction for fast game play and great ux")],-1),p=e("p",null,"To have a fluid game play for on-chain games it is beneficial to have an auto approve wallet.",-1),u=e("ol",null,[e("li",null,"Solflare wallet offers auto-approve functionality with burner wallets, but this limits your players to only one wallet.")],-1),_={href:"https://twitter.com/solflare_wallet/status/1625950688709644324",target:"_blank",rel:"noopener noreferrer"},f=t("Burner Auto Approve Wallets"),m=e("br",null,null,-1),y=e("ol",{start:"2"},[e("li",null,"Another way to do it is to create a key pair in your game and let the player transfer some sol to that wallet and then use it to pay for transaction fees. Only problem with this is that you need to handle the security for this wallet and the players would need to have access to their seed phrase.")],-1),g={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/blob/main/Assets/SolPlay/Scripts/Services/WalletHolderService.cs",target:"_blank",rel:"noopener noreferrer"},w=t("Example Source Code"),b=e("br",null,null,-1),k={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},v=t("Example Game"),x=e("br",null,null,-1),S={start:"3"},A=e("li",null,[e("p",null,"You can pay the fees yourself, by creating and signing the transactions in the backend and interact with it via an API. For that you send parameters to your backend and sign the transaction there and send a confirmation to the client as soon as it is done.")],-1),E=t("There is a protocol called @gumisfunn and they released a feature called session keys. Session Keys are ephemeral keys with fine-grained program/instruction scoping for tiered access in your @solana programs. They allow users to interact with apps under particular parameters like duration, max tokens, amount of posts or any other function specific to an app. "),T={href:"https://twitter.com/gumisfunn/status/1642898237395972097?s=20",target:"_blank",rel:"noopener noreferrer"},B=t("Link");function I(P,W){const o=r("ExternalLinkIcon");return s(),l(i,null,[h,d,p,u,e("p",null,[e("a",_,[f,a(o)]),m]),y,e("p",null,[e("a",g,[w,a(o)]),b,e("a",k,[v,a(o)]),x]),e("ol",S,[A,e("li",null,[e("p",null,[E,e("a",T,[B,a(o)])])])])],64)}var H=n(c,[["render",I]]);export{H as default}; +import{_ as n,r,o as s,c as l,a as e,b as a,F as i,d as t}from"./app.d411e3b3.js";const c={},h=e("p",null,"WIP - This is a work in progress",-1),d=e("h1",{id:"how-to-auto-approve-transaction-for-fast-game-play-and-great-ux",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-auto-approve-transaction-for-fast-game-play-and-great-ux","aria-hidden":"true"},"#"),t(" How to auto approve transaction for fast game play and great ux")],-1),p=e("p",null,"To have a fluid game play for on-chain games it is beneficial to have an auto approve wallet.",-1),u=e("ol",null,[e("li",null,"Solflare wallet offers auto-approve functionality with burner wallets, but this limits your players to only one wallet.")],-1),_={href:"https://twitter.com/solflare_wallet/status/1625950688709644324",target:"_blank",rel:"noopener noreferrer"},f=t("Burner Auto Approve Wallets"),m=e("br",null,null,-1),y=e("ol",{start:"2"},[e("li",null,"Another way to do it is to create a key pair in your game and let the player transfer some sol to that wallet and then use it to pay for transaction fees. Only problem with this is that you need to handle the security for this wallet and the players would need to have access to their seed phrase.")],-1),g={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/blob/main/Assets/SolPlay/Scripts/Services/WalletHolderService.cs",target:"_blank",rel:"noopener noreferrer"},w=t("Example Source Code"),b=e("br",null,null,-1),k={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},v=t("Example Game"),x=e("br",null,null,-1),S={start:"3"},A=e("li",null,[e("p",null,"You can pay the fees yourself, by creating and signing the transactions in the backend and interact with it via an API. For that you send parameters to your backend and sign the transaction there and send a confirmation to the client as soon as it is done.")],-1),E=t("There is a protocol called @gumisfunn and they released a feature called session keys. Session Keys are ephemeral keys with fine-grained program/instruction scoping for tiered access in your @solana programs. They allow users to interact with apps under particular parameters like duration, max tokens, amount of posts or any other function specific to an app. "),T={href:"https://twitter.com/gumisfunn/status/1642898237395972097?s=20",target:"_blank",rel:"noopener noreferrer"},B=t("Link");function I(P,W){const o=r("ExternalLinkIcon");return s(),l(i,null,[h,d,p,u,e("p",null,[e("a",_,[f,a(o)]),m]),y,e("p",null,[e("a",g,[w,a(o)]),b,e("a",k,[v,a(o)]),x]),e("ol",S,[A,e("li",null,[e("p",null,[E,e("a",T,[B,a(o)])])])])],64)}var H=n(c,[["render",I]]);export{H as default}; diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.75aca1d6.js b/docs/.vuepress/dist/assets/basic-transactions.html.0aea27a9.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.75aca1d6.js rename to docs/.vuepress/dist/assets/basic-transactions.html.0aea27a9.js index 13d5c6e64..abeb8ea80 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.75aca1d6.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.0aea27a9.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},g=n("h1",{id:"mengirim-transaksi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mengirim-transaksi","aria-hidden":"true"},"#"),s(" Mengirim Transaksi")],-1),f=n("h2",{id:"bagaimana-cara-mengirim-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-mengirim-sol","aria-hidden":"true"},"#"),s(" Bagaimana cara mengirim SOL")],-1),w=s("Untuk mengirim SOL, anda perlu berinteraksi dengan "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},g=n("h1",{id:"mengirim-transaksi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mengirim-transaksi","aria-hidden":"true"},"#"),s(" Mengirim Transaksi")],-1),f=n("h2",{id:"bagaimana-cara-mengirim-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-mengirim-sol","aria-hidden":"true"},"#"),s(" Bagaimana cara mengirim SOL")],-1),w=s("Untuk mengirim SOL, anda perlu berinteraksi dengan "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),C=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),C=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.18d8290f.js b/docs/.vuepress/dist/assets/basic-transactions.html.12dc4b82.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.18d8290f.js rename to docs/.vuepress/dist/assets/basic-transactions.html.12dc4b82.js index 5447d2115..b8a8d65bb 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.18d8290f.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.12dc4b82.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"\u53D1\u9001\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u53D1\u9001\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u53D1\u9001\u4EA4\u6613")],-1),g=n("h2",{id:"\u5982\u4F55\u53D1\u9001sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u53D1\u9001sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u53D1\u9001SOL")],-1),w=s("\u8981\u53D1\u9001SOL\uFF0C\u4F60\u9700\u8981\u4E0E"),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s(" \u4EA4\u4E92\u3002"),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"\u53D1\u9001\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u53D1\u9001\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u53D1\u9001\u4EA4\u6613")],-1),g=n("h2",{id:"\u5982\u4F55\u53D1\u9001sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u53D1\u9001sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u53D1\u9001SOL")],-1),w=s("\u8981\u53D1\u9001SOL\uFF0C\u4F60\u9700\u8981\u4E0E"),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s(" \u4EA4\u4E92\u3002"),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.c93eecf9.js b/docs/.vuepress/dist/assets/basic-transactions.html.1bfd6fa8.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.c93eecf9.js rename to docs/.vuepress/dist/assets/basic-transactions.html.1bfd6fa8.js index a027339e2..5d55e042f 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.c93eecf9.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.1bfd6fa8.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s}from"./app.07ce7a66.js";const d={},y=n("h1",{id:"transaktionen-versenden",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaktionen-versenden","aria-hidden":"true"},"#"),s(" Transaktionen versenden")],-1),g=n("p",null,"##So senden Sie SOL",-1),f=s("Um SOL zu senden, m\xFCssen Sie mit dem "),w={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},_=s("SystemProgram"),h=s(" interagieren."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s}from"./app.d411e3b3.js";const d={},y=n("h1",{id:"transaktionen-versenden",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaktionen-versenden","aria-hidden":"true"},"#"),s(" Transaktionen versenden")],-1),g=n("p",null,"##So senden Sie SOL",-1),f=s("Um SOL zu senden, m\xFCssen Sie mit dem "),w={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},_=s("SystemProgram"),h=s(" interagieren."),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.ae0f79a3.js b/docs/.vuepress/dist/assets/basic-transactions.html.3f54c73c.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.ae0f79a3.js rename to docs/.vuepress/dist/assets/basic-transactions.html.3f54c73c.js index 90bb8887c..7bdf7b740 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.ae0f79a3.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.3f54c73c.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"envoyer-des-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#envoyer-des-transactions","aria-hidden":"true"},"#"),s(" Envoyer des Transactions")],-1),g=n("h2",{id:"comment-envoyer-des-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-envoyer-des-sol","aria-hidden":"true"},"#"),s(" Comment envoyer des SOL")],-1),w=s("Pour envoyer des SOL, vous devez interagir avec le "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"envoyer-des-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#envoyer-des-transactions","aria-hidden":"true"},"#"),s(" Envoyer des Transactions")],-1),g=n("h2",{id:"comment-envoyer-des-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-envoyer-des-sol","aria-hidden":"true"},"#"),s(" Comment envoyer des SOL")],-1),w=s("Pour envoyer des SOL, vous devez interagir avec le "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),S=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),S=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.85ad631b.js b/docs/.vuepress/dist/assets/basic-transactions.html.5d245536.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.85ad631b.js rename to docs/.vuepress/dist/assets/basic-transactions.html.5d245536.js index db46d1973..a45e2369f 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.85ad631b.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.5d245536.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"enviando-transacciones",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#enviando-transacciones","aria-hidden":"true"},"#"),s(" Enviando transacciones")],-1),g=n("h2",{id:"como-enviar-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-enviar-sol","aria-hidden":"true"},"#"),s(" C\xF3mo enviar SOL")],-1),w=s("Para enviar SOL, necesitar\xE1s interactuar con el programa "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"enviando-transacciones",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#enviando-transacciones","aria-hidden":"true"},"#"),s(" Enviando transacciones")],-1),g=n("h2",{id:"como-enviar-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-enviar-sol","aria-hidden":"true"},"#"),s(" C\xF3mo enviar SOL")],-1),w=s("Para enviar SOL, necesitar\xE1s interactuar con el programa "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.1abb92a6.js b/docs/.vuepress/dist/assets/basic-transactions.html.65ccec01.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.1abb92a6.js rename to docs/.vuepress/dist/assets/basic-transactions.html.65ccec01.js index fb6cbb756..25ca39a77 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.1abb92a6.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.65ccec01.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"\u767C\u9001\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u767C\u9001\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u767C\u9001\u4EA4\u6613")],-1),g=n("h2",{id:"\u5982\u4F55\u767C\u9001sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u767C\u9001sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u767C\u9001SOL")],-1),w=s("\u8981\u767C\u9001SOL\uFF0C\u4F60\u9700\u8981\u8207"),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s(" \u4EA4\u4E92\u3002"),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"\u767C\u9001\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u767C\u9001\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u767C\u9001\u4EA4\u6613")],-1),g=n("h2",{id:"\u5982\u4F55\u767C\u9001sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u767C\u9001sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u767C\u9001SOL")],-1),w=s("\u8981\u767C\u9001SOL\uFF0C\u4F60\u9700\u8981\u8207"),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s(" \u4EA4\u4E92\u3002"),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.a069dbca.js b/docs/.vuepress/dist/assets/basic-transactions.html.6decd1d3.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.a069dbca.js rename to docs/.vuepress/dist/assets/basic-transactions.html.6decd1d3.js index 37148b936..a93a20268 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.a069dbca.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.6decd1d3.js @@ -1,4 +1,4 @@ -import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"sending-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sending-transactions","aria-hidden":"true"},"#"),s(" Sending Transactions")],-1),g=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-send-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-send-sol","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 send SOL")],-1),w=s("\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E48\u0E07 SOL \u0E44\u0E14\u0E49\u0E19\u0E31\u0E49\u0E19\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"sending-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sending-transactions","aria-hidden":"true"},"#"),s(" Sending Transactions")],-1),g=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-send-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-send-sol","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 send SOL")],-1),w=s("\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E48\u0E07 SOL \u0E44\u0E14\u0E49\u0E19\u0E31\u0E49\u0E19\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` @@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span" lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` +result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(` from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(` diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.8104955c.js b/docs/.vuepress/dist/assets/basic-transactions.html.9fa99f53.js similarity index 99% rename from docs/.vuepress/dist/assets/basic-transactions.html.8104955c.js rename to docs/.vuepress/dist/assets/basic-transactions.html.9fa99f53.js index 9dba6ca45..cdf21b12e 100644 --- a/docs/.vuepress/dist/assets/basic-transactions.html.8104955c.js +++ b/docs/.vuepress/dist/assets/basic-transactions.html.9fa99f53.js @@ -1,4 +1,4 @@ -import{_ as c,r as p,o as i,c as l,a as s,b as a,w as r,F as u,d as n,e}from"./app.07ce7a66.js";const k={},m=s("h1",{id:"sending-transactions-islem-gonderimi",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#sending-transactions-islem-gonderimi","aria-hidden":"true"},"#"),n(" Sending Transactions(\u0130\u015Flem G\xF6nderimi)")],-1),d=s("h2",{id:"how-to-send-sol-sol-nas\u0131l-gonderilir",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#how-to-send-sol-sol-nas\u0131l-gonderilir","aria-hidden":"true"},"#"),n(" How to send SOL (SOL nas\u0131l g\xF6nderilir)")],-1),b=n("SOL g\xF6ndermek i\xE7in "),g={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=n("SystemProgram"),y=n(" ile etkile\u015Fime ge\xE7meniz gerekir."),f=e(`
const transferTransaction = new Transaction().add(
+import{_ as c,r as p,o as i,c as l,a as s,b as a,w as r,F as u,d as n,e}from"./app.d411e3b3.js";const k={},m=s("h1",{id:"sending-transactions-islem-gonderimi",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#sending-transactions-islem-gonderimi","aria-hidden":"true"},"#"),n(" Sending Transactions(\u0130\u015Flem G\xF6nderimi)")],-1),d=s("h2",{id:"how-to-send-sol-sol-nas\u0131l-gonderilir",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#how-to-send-sol-sol-nas\u0131l-gonderilir","aria-hidden":"true"},"#"),n(" How to send SOL (SOL nas\u0131l g\xF6nderilir)")],-1),b=n("SOL g\xF6ndermek i\xE7in "),g={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=n("SystemProgram"),y=n(" ile etkile\u015Fime ge\xE7meniz gerekir."),f=e(`
const transferTransaction = new Transaction().add(
   SystemProgram.transfer({
     fromPubkey: fromKeypair.publicKey,
     toPubkey: toKeypair.publicKey,
diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.f38dcb54.js b/docs/.vuepress/dist/assets/basic-transactions.html.b489c766.js
similarity index 99%
rename from docs/.vuepress/dist/assets/basic-transactions.html.f38dcb54.js
rename to docs/.vuepress/dist/assets/basic-transactions.html.b489c766.js
index 7e15557d4..5a4e4e8dd 100644
--- a/docs/.vuepress/dist/assets/basic-transactions.html.f38dcb54.js
+++ b/docs/.vuepress/dist/assets/basic-transactions.html.b489c766.js
@@ -1,4 +1,4 @@
-import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1","aria-hidden":"true"},"#"),s(" \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1")],-1),g=n("h2",{id:"sol\u306E\u9001\u91D1\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sol\u306E\u9001\u91D1\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" SOL\u306E\u9001\u91D1\u65B9\u6CD5")],-1),w=s("SOL \u3092\u9001\u4FE1\u3059\u308B\u306B\u306F\u3001"),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("\u3068\u5BFE\u8A71\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1","aria-hidden":"true"},"#"),s(" \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1")],-1),g=n("h2",{id:"sol\u306E\u9001\u91D1\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sol\u306E\u9001\u91D1\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" SOL\u306E\u9001\u91D1\u65B9\u6CD5")],-1),w=s("SOL \u3092\u9001\u4FE1\u3059\u308B\u306B\u306F\u3001"),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("\u3068\u5BFE\u8A71\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   Connection`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
@@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span"
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
 `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
 
-client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
-`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
+result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
+`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(`
+`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
     from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.e416b8f1.js b/docs/.vuepress/dist/assets/basic-transactions.html.b9b7efb5.js
similarity index 99%
rename from docs/.vuepress/dist/assets/basic-transactions.html.e416b8f1.js
rename to docs/.vuepress/dist/assets/basic-transactions.html.b9b7efb5.js
index 6a4befad3..a89858b02 100644
--- a/docs/.vuepress/dist/assets/basic-transactions.html.e416b8f1.js
+++ b/docs/.vuepress/dist/assets/basic-transactions.html.b9b7efb5.js
@@ -1,4 +1,4 @@
-import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},g=n("h1",{id:"gui-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#gui-transaction","aria-hidden":"true"},"#"),s(" G\u1EEDi Transaction")],-1),f=n("h2",{id:"lam-the-nao-\u0111e-gui-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-gui-sol","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1EEDi SOL")],-1),w=s("\u0110\u1EC3 g\u1EEDi SOL, b\u1EA1n s\u1EBD c\u1EA7n t\u01B0\u01A1ng t\xE1c v\u1EDBi "),h={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},_=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},g=n("h1",{id:"gui-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#gui-transaction","aria-hidden":"true"},"#"),s(" G\u1EEDi Transaction")],-1),f=n("h2",{id:"lam-the-nao-\u0111e-gui-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-gui-sol","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1EEDi SOL")],-1),w=s("\u0110\u1EC3 g\u1EEDi SOL, b\u1EA1n s\u1EBD c\u1EA7n t\u01B0\u01A1ng t\xE1c v\u1EDBi "),h={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},_=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   Connection`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
@@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span"
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
 `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
 
-client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
-`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),C=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
+result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
+`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(`
+`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),C=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
     from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.8d04a74c.js b/docs/.vuepress/dist/assets/basic-transactions.html.d3c2b6ec.js
similarity index 99%
rename from docs/.vuepress/dist/assets/basic-transactions.html.8d04a74c.js
rename to docs/.vuepress/dist/assets/basic-transactions.html.d3c2b6ec.js
index 016a37669..963a12391 100644
--- a/docs/.vuepress/dist/assets/basic-transactions.html.8d04a74c.js
+++ b/docs/.vuepress/dist/assets/basic-transactions.html.d3c2b6ec.js
@@ -1,4 +1,4 @@
-import{_ as k,r as c,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as l}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"enviando-transacoes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#enviando-transacoes","aria-hidden":"true"},"#"),s(" Enviando Transa\xE7\xF5es")],-1),g=n("h2",{id:"como-enviar-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-enviar-sol","aria-hidden":"true"},"#"),s(" Como enviar SOL")],-1),w=s("Para enviar SOL, voc\xEA precisar\xE1 interagir com o "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as k,r as c,o as b,c as m,a as n,b as t,w as a,F as d,d as s,e as l}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"enviando-transacoes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#enviando-transacoes","aria-hidden":"true"},"#"),s(" Enviando Transa\xE7\xF5es")],-1),g=n("h2",{id:"como-enviar-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-enviar-sol","aria-hidden":"true"},"#"),s(" Como enviar SOL")],-1),w=s("Para enviar SOL, voc\xEA precisar\xE1 interagir com o "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   Connection`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
@@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span"
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
 `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
 
-client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
-`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
+result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
+`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(`
+`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
     from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.9492ba81.js b/docs/.vuepress/dist/assets/basic-transactions.html.e80a4c69.js
similarity index 99%
rename from docs/.vuepress/dist/assets/basic-transactions.html.9492ba81.js
rename to docs/.vuepress/dist/assets/basic-transactions.html.e80a4c69.js
index ebe76154d..e7ca89a69 100644
--- a/docs/.vuepress/dist/assets/basic-transactions.html.9492ba81.js
+++ b/docs/.vuepress/dist/assets/basic-transactions.html.e80a4c69.js
@@ -1,4 +1,4 @@
-import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"sending-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sending-transactions","aria-hidden":"true"},"#"),s(" Sending Transactions")],-1),g=n("h2",{id:"how-to-send-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-send-sol","aria-hidden":"true"},"#"),s(" How to send SOL")],-1),w=s("To send SOL, you will need to interact with the "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"sending-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sending-transactions","aria-hidden":"true"},"#"),s(" Sending Transactions")],-1),g=n("h2",{id:"how-to-send-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-send-sol","aria-hidden":"true"},"#"),s(" How to send SOL")],-1),w=s("To send SOL, you will need to interact with the "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),S=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   Connection`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
@@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span"
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
 `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
 
-client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
-`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
+result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
+`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(`
+`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
     from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.ab11cb9f.js b/docs/.vuepress/dist/assets/basic-transactions.html.e97b7701.js
similarity index 99%
rename from docs/.vuepress/dist/assets/basic-transactions.html.ab11cb9f.js
rename to docs/.vuepress/dist/assets/basic-transactions.html.e97b7701.js
index 5870728a2..e43b8b5fc 100644
--- a/docs/.vuepress/dist/assets/basic-transactions.html.ab11cb9f.js
+++ b/docs/.vuepress/dist/assets/basic-transactions.html.e97b7701.js
@@ -1,4 +1,4 @@
-import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const g={},y=n("h1",{id:"nagpapadala-ng-mga-transaksyon",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#nagpapadala-ng-mga-transaksyon","aria-hidden":"true"},"#"),s(" Nagpapadala ng mga Transaksyon")],-1),f=n("h2",{id:"paano-magpadala-ng-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-magpadala-ng-sol","aria-hidden":"true"},"#"),s(" Paano magpadala ng SOL")],-1),w=s("Upang magpadala ng SOL, kakailanganin mong makipag-ugnayan sa "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),P=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const g={},y=n("h1",{id:"nagpapadala-ng-mga-transaksyon",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#nagpapadala-ng-mga-transaksyon","aria-hidden":"true"},"#"),s(" Nagpapadala ng mga Transaksyon")],-1),f=n("h2",{id:"paano-magpadala-ng-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-magpadala-ng-sol","aria-hidden":"true"},"#"),s(" Paano magpadala ng SOL")],-1),w=s("Upang magpadala ng SOL, kakailanganin mong makipag-ugnayan sa "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s("."),P=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   Connection`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
@@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span"
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
 `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
 
-client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
-`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
+result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
+`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(`
+`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),K=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
     from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
diff --git a/docs/.vuepress/dist/assets/basic-transactions.html.351c7904.js b/docs/.vuepress/dist/assets/basic-transactions.html.ed839122.js
similarity index 99%
rename from docs/.vuepress/dist/assets/basic-transactions.html.351c7904.js
rename to docs/.vuepress/dist/assets/basic-transactions.html.ed839122.js
index ada9dfef0..62f570953 100644
--- a/docs/.vuepress/dist/assets/basic-transactions.html.351c7904.js
+++ b/docs/.vuepress/dist/assets/basic-transactions.html.ed839122.js
@@ -1,4 +1,4 @@
-import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.07ce7a66.js";const y={},f=n("h1",{id:"sending-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sending-transactions","aria-hidden":"true"},"#"),s(" Sending Transactions")],-1),g=n("h2",{id:"how-to-send-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-send-sol","aria-hidden":"true"},"#"),s(" How to send SOL")],-1),w=s("SOL\uC744 \uBCF4\uB0B4\uAE30 \uC704\uD574\uC11C\uB294 "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s(" \uACFC \uC18C\uD1B5\uD560 \uD544\uC694\uAC00 \uC788\uC2B5\uB2C8\uB2E4."),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
+import{_ as i,r as c,o as k,c as b,a as n,b as t,w as a,F as m,d as s,e as d}from"./app.d411e3b3.js";const y={},f=n("h1",{id:"sending-transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sending-transactions","aria-hidden":"true"},"#"),s(" Sending Transactions")],-1),g=n("h2",{id:"how-to-send-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-send-sol","aria-hidden":"true"},"#"),s(" How to send SOL")],-1),w=s("SOL\uC744 \uBCF4\uB0B4\uAE30 \uC704\uD574\uC11C\uB294 "),_={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},h=s("SystemProgram"),T=s(" \uACFC \uC18C\uD1B5\uD560 \uD544\uC694\uAC00 \uC788\uC2B5\uB2C8\uB2E4."),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
   Connection`),n("span",{class:"token punctuation"},","),s(`
   Keypair`),n("span",{class:"token punctuation"},","),s(`
   SystemProgram`),n("span",{class:"token punctuation"},","),s(`
@@ -68,8 +68,9 @@ transaction `),n("span",{class:"token operator"},"="),s(" Transaction"),n("span"
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
 `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
 
-client`),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
-`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
+result `),n("span",{class:"token operator"},"="),s(" client"),n("span",{class:"token punctuation"},"."),s("send_transaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(" sender"),n("span",{class:"token punctuation"},")"),s(`
+`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("result"),n("span",{class:"token punctuation"},")"),s(`
+`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br")])],-1),P=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("transaction "),n("span",{class:"token operator"},"="),s(" Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("add"),n("span",{class:"token punctuation"},"("),s("transfer"),n("span",{class:"token punctuation"},"("),s("TransferParams"),n("span",{class:"token punctuation"},"("),s(`
     from_pubkey`),n("span",{class:"token operator"},"="),s("sender"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     to_pubkey`),n("span",{class:"token operator"},"="),s("receiver"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(`
     lamports`),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"1_000_000"),n("span",{class:"token punctuation"},")"),s(`
diff --git a/docs/.vuepress/dist/assets/cpi.html.a340693f.js b/docs/.vuepress/dist/assets/cpi.html.64ff535f.js
similarity index 99%
rename from docs/.vuepress/dist/assets/cpi.html.a340693f.js
rename to docs/.vuepress/dist/assets/cpi.html.64ff535f.js
index 25c6bfe41..b3d740986 100644
--- a/docs/.vuepress/dist/assets/cpi.html.a340693f.js
+++ b/docs/.vuepress/dist/assets/cpi.html.64ff535f.js
@@ -1,4 +1,4 @@
-import{_ as t,r as p,o as c,c as i,a,b as e,F as l,e as o,d as n}from"./app.07ce7a66.js";const r={},u=o('

Cross Program Invocations (CPIs)

Ang Cross-Program Invocation (CPI) ay isang direktang tawag mula sa isang programa patungo sa isa pa, na nagbibigay-daan para sa composability ng mga programang Solana. Tulad ng sinumang kliyente na maaaring tumawag sa anumang programa gamit ang JSON RPC, anumang programa ay maaaring tumawag sa anumang iba pang programa sa pamamagitan ng isang CPI. Talagang ginagawa ng mga CPI ang buong Solana ecosystem sa isang higanteng API na magagamit mo bilang isang developer.

Ang layunin ng seksyong ito ay magbigay ng mataas na antas ng pangkalahatang-ideya na mga CPI. Mangyaring sumangguni sa mga naka-link na mapagkukunan sa ibaba para sa mas detalyadong mga paliwanag, halimbawa, at walkthrough.

Facts

Fact Sheet

  • Ang\xA0Cross-Program Invocation (CPI)\xA0ay isang tawag mula sa isang programa patungo sa isa pa, na nagta-target ng isang partikular na instruction sa tinatawag na program
  • Binibigyang-daan ng mga CPI ang programa sa pagtawag na palawigin ang mga pribilehiyo ng pagpirma nito sa programang tumatawag
  • Maaaring magsagawa ng mga CPI ang mga programa gamit ang alinman sa invoke o invoke_signed sa loob ng kanilang mga instruction
  • Ang invoke ay ginagamit kapag ang lahat ng kinakailangang lagda ay naa-access bago ang invocation, nang hindi nangangailangan ng mga PDA na kumilos bilang mga pumirma
  • Ang invoke_signed ay ginagamit kapag ang mga PDA mula sa programa sa pagtawag ay kinakailangan bilang mga pumirma sa CPI
  • Pagkatapos maisagawa ang isang CPI sa isa pang programa, ang program na tumatawag ay maaaring gumawa ng karagdagang mga CPI sa iba pang mga programa, hanggang sa maximum na lalim na 4

Deep Dive

Pinapagana ng Cross Program Invocations (CPIs) ang composability ng mga programang Solana, na nagbibigay-daan sa mga developer na gamitin at bumuo sa pagtuturo ng mga kasalukuyang programa.

',7),g=n("Upang magsagawa ng mga CPI, gamitin ang "),k={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},m=n("invoke"),d=n(" o [invoke_signed](https://docs.rs/solana-program /latest/solana_program/program/fn.invoke_signed.html) function na makikita sa "),b=a("code",null,"solana_program",-1),h=n(" crate."),_=o(`
// Used when there are not signatures for PDAs needed
+import{_ as t,r as p,o as c,c as i,a,b as e,F as l,e as o,d as n}from"./app.d411e3b3.js";const r={},u=o('

Cross Program Invocations (CPIs)

Ang Cross-Program Invocation (CPI) ay isang direktang tawag mula sa isang programa patungo sa isa pa, na nagbibigay-daan para sa composability ng mga programang Solana. Tulad ng sinumang kliyente na maaaring tumawag sa anumang programa gamit ang JSON RPC, anumang programa ay maaaring tumawag sa anumang iba pang programa sa pamamagitan ng isang CPI. Talagang ginagawa ng mga CPI ang buong Solana ecosystem sa isang higanteng API na magagamit mo bilang isang developer.

Ang layunin ng seksyong ito ay magbigay ng mataas na antas ng pangkalahatang-ideya na mga CPI. Mangyaring sumangguni sa mga naka-link na mapagkukunan sa ibaba para sa mas detalyadong mga paliwanag, halimbawa, at walkthrough.

Facts

Fact Sheet

  • Ang\xA0Cross-Program Invocation (CPI)\xA0ay isang tawag mula sa isang programa patungo sa isa pa, na nagta-target ng isang partikular na instruction sa tinatawag na program
  • Binibigyang-daan ng mga CPI ang programa sa pagtawag na palawigin ang mga pribilehiyo ng pagpirma nito sa programang tumatawag
  • Maaaring magsagawa ng mga CPI ang mga programa gamit ang alinman sa invoke o invoke_signed sa loob ng kanilang mga instruction
  • Ang invoke ay ginagamit kapag ang lahat ng kinakailangang lagda ay naa-access bago ang invocation, nang hindi nangangailangan ng mga PDA na kumilos bilang mga pumirma
  • Ang invoke_signed ay ginagamit kapag ang mga PDA mula sa programa sa pagtawag ay kinakailangan bilang mga pumirma sa CPI
  • Pagkatapos maisagawa ang isang CPI sa isa pang programa, ang program na tumatawag ay maaaring gumawa ng karagdagang mga CPI sa iba pang mga programa, hanggang sa maximum na lalim na 4

Deep Dive

Pinapagana ng Cross Program Invocations (CPIs) ang composability ng mga programang Solana, na nagbibigay-daan sa mga developer na gamitin at bumuo sa pagtuturo ng mga kasalukuyang programa.

',7),g=n("Upang magsagawa ng mga CPI, gamitin ang "),k={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},m=n("invoke"),d=n(" o [invoke_signed](https://docs.rs/solana-program /latest/solana_program/program/fn.invoke_signed.html) function na makikita sa "),b=a("code",null,"solana_program",-1),h=n(" crate."),_=o(`
// Used when there are not signatures for PDAs needed
 pub fn invoke(
     instruction: &Instruction,
     account_infos: &[AccountInfo<'_>]
diff --git a/docs/.vuepress/dist/assets/cpi.html.9d257983.js b/docs/.vuepress/dist/assets/cpi.html.77c0f3ed.js
similarity index 99%
rename from docs/.vuepress/dist/assets/cpi.html.9d257983.js
rename to docs/.vuepress/dist/assets/cpi.html.77c0f3ed.js
index c8bde9c70..59c5fb804 100644
--- a/docs/.vuepress/dist/assets/cpi.html.9d257983.js
+++ b/docs/.vuepress/dist/assets/cpi.html.77c0f3ed.js
@@ -1,4 +1,4 @@
-import{_ as t,r as p,o as c,c as r,a,b as e,F as l,e as o,d as n}from"./app.07ce7a66.js";const i={},u=o('

Invoca\xE7\xF5es de Programas Cruzados (CPIs)

A Invoca\xE7\xE3o de Programas Cruzados (Cross-Program Invocation, ou CPI) \xE9 uma chamada direta de um programa em outro, permitindo a componibilidade de programas Solana. Assim como qualquer cliente pode chamar qualquer programa usando o protocolo JSON-RPC, qualquer programa pode chamar outro programa via uma CPI. As CPIs essencialmente transformam todo o ecossistema Solana em uma \xFAnica API gigante que est\xE1 \xE0 disposi\xE7\xE3o do desenvolvedor.

O objetivo desta se\xE7\xE3o \xE9 fornecer uma vis\xE3o geral de alto n\xEDvel das CPIs. Por favor, consulte os recursos vinculados abaixo para explica\xE7\xF5es mais detalhadas, exemplos e tutoriais passo a passo.

Fatos

Ficha Informativa

  • Uma Invoca\xE7\xE3o de Programas Cruzados (CPI) \xE9 uma chamada de um programa para outro, visando uma instru\xE7\xE3o espec\xEDfica no programa que est\xE1 sendo chamado
  • As CPIs permitem que o programa chamador estenda seus privil\xE9gios de assinatura para o programa chamado
  • Os programas podem executar CPIs usando invoke ou invoke_signed dentro de suas instru\xE7\xF5es
  • invoke \xE9 usado quando todas as assinaturas necess\xE1rias est\xE3o acess\xEDveis antes da invoca\xE7\xE3o, sem a necessidade de PDAs atuarem como signat\xE1rios.
  • invoke_signed \xE9 usado quando PDAs do programa chamador s\xE3o necess\xE1rios como signat\xE1rios na CPI
  • Depois que uma CPI \xE9 feita para outro programa, o programa chamado pode fazer novas CPIs para outros programas, at\xE9 uma profundidade m\xE1xima de 4

Mergulho Profundo

As Invoca\xE7\xF5es de Programas Cruzados (CPIs) permitem a componibilidade de programas Solana, o que permite que os desenvolvedores utilizem e construam sobre as instru\xE7\xF5es de programas existentes.

',7),d=n("Para executar CPIs, use a fun\xE7\xE3o "),m={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},k=n("invoke"),b=n(" or "),g={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},h=n("invoke_signed"),_=n(" encontrada no crate "),f=a("code",null,"solana_program",-1),v=n("."),P=o(`
// Usado quando n\xE3o s\xE3o necess\xE1rias assinaturas para PDAs
+import{_ as t,r as p,o as c,c as r,a,b as e,F as l,e as o,d as n}from"./app.d411e3b3.js";const i={},u=o('

Invoca\xE7\xF5es de Programas Cruzados (CPIs)

A Invoca\xE7\xE3o de Programas Cruzados (Cross-Program Invocation, ou CPI) \xE9 uma chamada direta de um programa em outro, permitindo a componibilidade de programas Solana. Assim como qualquer cliente pode chamar qualquer programa usando o protocolo JSON-RPC, qualquer programa pode chamar outro programa via uma CPI. As CPIs essencialmente transformam todo o ecossistema Solana em uma \xFAnica API gigante que est\xE1 \xE0 disposi\xE7\xE3o do desenvolvedor.

O objetivo desta se\xE7\xE3o \xE9 fornecer uma vis\xE3o geral de alto n\xEDvel das CPIs. Por favor, consulte os recursos vinculados abaixo para explica\xE7\xF5es mais detalhadas, exemplos e tutoriais passo a passo.

Fatos

Ficha Informativa

  • Uma Invoca\xE7\xE3o de Programas Cruzados (CPI) \xE9 uma chamada de um programa para outro, visando uma instru\xE7\xE3o espec\xEDfica no programa que est\xE1 sendo chamado
  • As CPIs permitem que o programa chamador estenda seus privil\xE9gios de assinatura para o programa chamado
  • Os programas podem executar CPIs usando invoke ou invoke_signed dentro de suas instru\xE7\xF5es
  • invoke \xE9 usado quando todas as assinaturas necess\xE1rias est\xE3o acess\xEDveis antes da invoca\xE7\xE3o, sem a necessidade de PDAs atuarem como signat\xE1rios.
  • invoke_signed \xE9 usado quando PDAs do programa chamador s\xE3o necess\xE1rios como signat\xE1rios na CPI
  • Depois que uma CPI \xE9 feita para outro programa, o programa chamado pode fazer novas CPIs para outros programas, at\xE9 uma profundidade m\xE1xima de 4

Mergulho Profundo

As Invoca\xE7\xF5es de Programas Cruzados (CPIs) permitem a componibilidade de programas Solana, o que permite que os desenvolvedores utilizem e construam sobre as instru\xE7\xF5es de programas existentes.

',7),d=n("Para executar CPIs, use a fun\xE7\xE3o "),m={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},k=n("invoke"),b=n(" or "),g={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},h=n("invoke_signed"),_=n(" encontrada no crate "),f=a("code",null,"solana_program",-1),v=n("."),P=o(`
// Usado quando n\xE3o s\xE3o necess\xE1rias assinaturas para PDAs
 pub fn invoke(
     instruction: &Instruction,
     account_infos: &[AccountInfo<'_>]
diff --git a/docs/.vuepress/dist/assets/cpi.html.1a2d6d74.js b/docs/.vuepress/dist/assets/cpi.html.9b2c1583.js
similarity index 99%
rename from docs/.vuepress/dist/assets/cpi.html.1a2d6d74.js
rename to docs/.vuepress/dist/assets/cpi.html.9b2c1583.js
index a8ba37ca9..ab349504e 100644
--- a/docs/.vuepress/dist/assets/cpi.html.1a2d6d74.js
+++ b/docs/.vuepress/dist/assets/cpi.html.9b2c1583.js
@@ -1,4 +1,4 @@
-import{_ as t,r as p,o as c,c as r,a as n,b as e,F as l,e as o,d as s}from"./app.07ce7a66.js";const i={},u=o('

Invocations de Programme Crois\xE9 (CPIs)

Une Invocation de Programme Crois\xE9 (CPI) est un appel direct d'un programme \xE0 un autre, ce qui permet la composabilit\xE9 des programmes Solana. Tout comme n'importe quel client peut appeler n'importe quel programme \xE0 l'aide d'une m\xE9thode JSON-RPC, n'importe quel programme peut appeler n'importe quel autre programme par l'interm\xE9diaire d'une CPI. Les CPIs transforment l'ensemble de l'\xE9cosyst\xE8me Solana en une API g\xE9ante \xE0 la disposition des d\xE9veloppeurs.

L'objectif de cette section est de fournir une vue d'ensemble des CPIs. Veuillez vous r\xE9f\xE9rer aux ressources ci-dessous pour obtenir des explications plus d\xE9taill\xE9es, des exemples et des guides.

Faits

Fiche d'Information

  • Une Invocation de Programme Crois\xE9 (CPI)\xA0est un appel d'un programme \xE0 un autre qui cible une instruction sp\xE9cifique du programme appel\xE9
  • Les CPIs permettent au programme appelant d'\xE9tendre ses privil\xE8ges de signature au programme appel\xE9
  • Les programmes peuvent ex\xE9cuter des CPI en utilisant soit invoke ou invoke_signed dans leurs instructions
  • invoke est utilis\xE9 lorsque toutes les signatures requises sont accessibles avant l'invocation. Il n'est pas n\xE9cessaire que des PDAs soient signataires
  • invoke_signed est utilis\xE9 lorsque des PDAs du programe appelant doivent \xEAtre signataires dans la CPI
  • Lorsqu'une CPI est effectu\xE9e aupr\xE8s d'un autre programme, le programme appel\xE9 peut effectuer d'autres CPI aupr\xE8s d'autres programmes, jusqu'\xE0 une profondeur maximale de 4

Examen plus approfondi

Les Invocations de Programmes Crois\xE9s (CPIs) permettent la composabilit\xE9 des programmes Solana, ce qui permet aux d\xE9veloppeurs d'utiliser les instructions des programmes existants et de construire \xE0 partir de celles-ci.

',7),d=s("Pour ex\xE9cuter des CPIs, utilisez la fonction "),k={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},m=s("invoke"),b=s(" ou "),g={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},h=s("invoke_signed"),_=s(" qui se trouve dans la crate "),f=n("code",null,"solana_program",-1),v=s("."),y=o(`
// Used when there are not signatures for PDAs needed
+import{_ as t,r as p,o as c,c as r,a as n,b as e,F as l,e as o,d as s}from"./app.d411e3b3.js";const i={},u=o('

Invocations de Programme Crois\xE9 (CPIs)

Une Invocation de Programme Crois\xE9 (CPI) est un appel direct d'un programme \xE0 un autre, ce qui permet la composabilit\xE9 des programmes Solana. Tout comme n'importe quel client peut appeler n'importe quel programme \xE0 l'aide d'une m\xE9thode JSON-RPC, n'importe quel programme peut appeler n'importe quel autre programme par l'interm\xE9diaire d'une CPI. Les CPIs transforment l'ensemble de l'\xE9cosyst\xE8me Solana en une API g\xE9ante \xE0 la disposition des d\xE9veloppeurs.

L'objectif de cette section est de fournir une vue d'ensemble des CPIs. Veuillez vous r\xE9f\xE9rer aux ressources ci-dessous pour obtenir des explications plus d\xE9taill\xE9es, des exemples et des guides.

Faits

Fiche d'Information

  • Une Invocation de Programme Crois\xE9 (CPI)\xA0est un appel d'un programme \xE0 un autre qui cible une instruction sp\xE9cifique du programme appel\xE9
  • Les CPIs permettent au programme appelant d'\xE9tendre ses privil\xE8ges de signature au programme appel\xE9
  • Les programmes peuvent ex\xE9cuter des CPI en utilisant soit invoke ou invoke_signed dans leurs instructions
  • invoke est utilis\xE9 lorsque toutes les signatures requises sont accessibles avant l'invocation. Il n'est pas n\xE9cessaire que des PDAs soient signataires
  • invoke_signed est utilis\xE9 lorsque des PDAs du programe appelant doivent \xEAtre signataires dans la CPI
  • Lorsqu'une CPI est effectu\xE9e aupr\xE8s d'un autre programme, le programme appel\xE9 peut effectuer d'autres CPI aupr\xE8s d'autres programmes, jusqu'\xE0 une profondeur maximale de 4

Examen plus approfondi

Les Invocations de Programmes Crois\xE9s (CPIs) permettent la composabilit\xE9 des programmes Solana, ce qui permet aux d\xE9veloppeurs d'utiliser les instructions des programmes existants et de construire \xE0 partir de celles-ci.

',7),d=s("Pour ex\xE9cuter des CPIs, utilisez la fonction "),k={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},m=s("invoke"),b=s(" ou "),g={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},h=s("invoke_signed"),_=s(" qui se trouve dans la crate "),f=n("code",null,"solana_program",-1),v=s("."),y=o(`
// Used when there are not signatures for PDAs needed
 pub fn invoke(
     instruction: &Instruction,
     account_infos: &[AccountInfo<'_>]
diff --git a/docs/.vuepress/dist/assets/cpi.html.68e45f97.js b/docs/.vuepress/dist/assets/cpi.html.cd0a0c70.js
similarity index 99%
rename from docs/.vuepress/dist/assets/cpi.html.68e45f97.js
rename to docs/.vuepress/dist/assets/cpi.html.cd0a0c70.js
index d7b2e18e3..5696fc504 100644
--- a/docs/.vuepress/dist/assets/cpi.html.68e45f97.js
+++ b/docs/.vuepress/dist/assets/cpi.html.cd0a0c70.js
@@ -1,4 +1,4 @@
-import{_ as t,r as p,o as c,c as l,a as n,b as e,F as r,e as o,d as s}from"./app.07ce7a66.js";const i={},u=o('

\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI)

\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(Cross-Program Invocation/CPI) \u3042\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3078\u306E\u76F4\u63A5\u547C\u3073\u51FA\u3057\u3067\u3001Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u69CB\u6210\u53EF\u80FD\u6027\u3092\u9AD8\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C JSON RPC \u3092\u4F7F\u7528\u3057\u3066\u4EFB\u610F\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u4EFB\u610F\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304C CPI \u3092\u4ECB\u3057\u3066\u4ED6\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002CPI \u306F\u57FA\u672C\u7684\u306B\u3001Solana \u30A8\u30B3\u30B7\u30B9\u30C6\u30E0\u5168\u4F53\u3092\u958B\u767A\u8005\u304C\u81EA\u7531\u306B\u4F7F\u3048\u308B1\u3064\u306E\u5DE8\u5927\u306AAPI\u306B\u5909\u3048\u307E\u3059\u3002

\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u76EE\u7684\u306F\u3001\u9AD8\u30EC\u30D9\u30EB\u306E\u6982\u8981CPI\u3092\u63D0\u4F9B\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u8A73\u7D30\u306A\u8AAC\u660E\u3001\u4F8B\u3001\u30C1\u30E5\u30FC\u30C8\u30EA\u30A2\u30EB\u306B\u3064\u3044\u3066\u306F\u3001\u4EE5\u4E0B\u306E\u30EA\u30F3\u30AF\u5148\u306E\u30EA\u30BD\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002

\u6982\u8981

Fact Sheet

  • \u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057\uFF08CPI\uFF09\u306F\u3001\u547C\u3073\u51FA\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u7279\u5B9A\u306E\u547D\u4EE4\u3092\u5BFE\u8C61\u3068\u3057\u305F\u3001\u3042\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3078\u306E\u547C\u3073\u51FA\u3057\u3067\u3059\u3002
  • CPI \u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u547C\u3073\u51FA\u3057\u5143\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u7F72\u540D\u8005\u7279\u6A29\u3092\u547C\u3073\u51FA\u3057\u5148\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u62E1\u5F35\u3067\u304D\u307E\u3059\u3002
  • \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u547D\u4EE4\u5185\u3067invoke\u307E\u305F\u306Finvoke_signed\u3092\u4F7F\u7528\u3057\u3066CPI\u3092\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002
  • invoke\u306F\u3001PDA\u304C\u7F72\u540D\u8005\u3068\u3057\u3066\u6A5F\u80FD\u3059\u308B\u5FC5\u8981\u306A\u304F\u3001\u547C\u3073\u51FA\u3057\u306E\u524D\u306B\u5FC5\u8981\u306A\u3059\u3079\u3066\u306E\u7F72\u540D\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u308B\u5834\u5408\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002
  • invoke_signed\u306F\u3001\u547C\u3073\u51FA\u3057\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u306EPDA\u304CCPI\u306E\u7F72\u540D\u8005\u3068\u3057\u3066\u5FC5\u8981\u306A\u5834\u5408\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002
  • \u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u5BFE\u3057\u3066CPI\u304C\u4F5C\u6210\u3055\u308C\u305F\u5F8C\u3001\u547C\u3073\u51FA\u3057\u5148\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u6700\u5927\u6DF1\u30554\u307E\u3067\u4ED6\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u5BFE\u3057\u3066\u3055\u3089\u306BCPI\u3092\u4F5C\u6210\u3067\u304D\u307E\u3059\u3002

\u8A73\u7D30

\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI) \u306F\u3001Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u69CB\u6210\u53EF\u80FD\u6027\u3092\u9AD8\u3081\u3001\u958B\u767A\u8005\u304C\u65E2\u5B58\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u3092\u5229\u7528\u3057\u3066\u69CB\u7BC9\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002

',7),k=s("CPI \u3092\u5B9F\u884C\u3059\u308B\u306B\u306F\u3001"),d=n("code",null,"solana_program",-1),m=s("\u30AF\u30EC\u30FC\u30C8\u306B\u3042\u308B"),b={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},h=s("invoke"),_=s("\u30E1\u30BD\u30C3\u30C9\u3001\u307E\u305F\u306F"),g={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},f=s("invoke_signed"),v=s("\u30E1\u30BD\u30C3\u30C9\u3092\u5229\u7528\u3057\u307E\u3059\u3002"),y=o(`
// Used when there are not signatures for PDAs needed
+import{_ as t,r as p,o as c,c as l,a as n,b as e,F as r,e as o,d as s}from"./app.d411e3b3.js";const i={},u=o('

\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI)

\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(Cross-Program Invocation/CPI) \u3042\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3078\u306E\u76F4\u63A5\u547C\u3073\u51FA\u3057\u3067\u3001Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u69CB\u6210\u53EF\u80FD\u6027\u3092\u9AD8\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C JSON RPC \u3092\u4F7F\u7528\u3057\u3066\u4EFB\u610F\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u3001\u4EFB\u610F\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304C CPI \u3092\u4ECB\u3057\u3066\u4ED6\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002CPI \u306F\u57FA\u672C\u7684\u306B\u3001Solana \u30A8\u30B3\u30B7\u30B9\u30C6\u30E0\u5168\u4F53\u3092\u958B\u767A\u8005\u304C\u81EA\u7531\u306B\u4F7F\u3048\u308B1\u3064\u306E\u5DE8\u5927\u306AAPI\u306B\u5909\u3048\u307E\u3059\u3002

\u3053\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u76EE\u7684\u306F\u3001\u9AD8\u30EC\u30D9\u30EB\u306E\u6982\u8981CPI\u3092\u63D0\u4F9B\u3059\u308B\u3053\u3068\u3067\u3059\u3002\u8A73\u7D30\u306A\u8AAC\u660E\u3001\u4F8B\u3001\u30C1\u30E5\u30FC\u30C8\u30EA\u30A2\u30EB\u306B\u3064\u3044\u3066\u306F\u3001\u4EE5\u4E0B\u306E\u30EA\u30F3\u30AF\u5148\u306E\u30EA\u30BD\u30FC\u30B9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002

\u6982\u8981

Fact Sheet

  • \u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057\uFF08CPI\uFF09\u306F\u3001\u547C\u3073\u51FA\u3055\u308C\u3066\u3044\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u7279\u5B9A\u306E\u547D\u4EE4\u3092\u5BFE\u8C61\u3068\u3057\u305F\u3001\u3042\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3078\u306E\u547C\u3073\u51FA\u3057\u3067\u3059\u3002
  • CPI \u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u547C\u3073\u51FA\u3057\u5143\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u7F72\u540D\u8005\u7279\u6A29\u3092\u547C\u3073\u51FA\u3057\u5148\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u62E1\u5F35\u3067\u304D\u307E\u3059\u3002
  • \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u547D\u4EE4\u5185\u3067invoke\u307E\u305F\u306Finvoke_signed\u3092\u4F7F\u7528\u3057\u3066CPI\u3092\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002
  • invoke\u306F\u3001PDA\u304C\u7F72\u540D\u8005\u3068\u3057\u3066\u6A5F\u80FD\u3059\u308B\u5FC5\u8981\u306A\u304F\u3001\u547C\u3073\u51FA\u3057\u306E\u524D\u306B\u5FC5\u8981\u306A\u3059\u3079\u3066\u306E\u7F72\u540D\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u308B\u5834\u5408\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002
  • invoke_signed\u306F\u3001\u547C\u3073\u51FA\u3057\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u306EPDA\u304CCPI\u306E\u7F72\u540D\u8005\u3068\u3057\u3066\u5FC5\u8981\u306A\u5834\u5408\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002
  • \u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u5BFE\u3057\u3066CPI\u304C\u4F5C\u6210\u3055\u308C\u305F\u5F8C\u3001\u547C\u3073\u51FA\u3057\u5148\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u6700\u5927\u6DF1\u30554\u307E\u3067\u4ED6\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u5BFE\u3057\u3066\u3055\u3089\u306BCPI\u3092\u4F5C\u6210\u3067\u304D\u307E\u3059\u3002

\u8A73\u7D30

\u30D7\u30ED\u30B0\u30E9\u30E0\u9593\u547C\u3073\u51FA\u3057(CPI) \u306F\u3001Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u69CB\u6210\u53EF\u80FD\u6027\u3092\u9AD8\u3081\u3001\u958B\u767A\u8005\u304C\u65E2\u5B58\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u3092\u5229\u7528\u3057\u3066\u69CB\u7BC9\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002

',7),k=s("CPI \u3092\u5B9F\u884C\u3059\u308B\u306B\u306F\u3001"),d=n("code",null,"solana_program",-1),m=s("\u30AF\u30EC\u30FC\u30C8\u306B\u3042\u308B"),b={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},h=s("invoke"),_=s("\u30E1\u30BD\u30C3\u30C9\u3001\u307E\u305F\u306F"),g={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},f=s("invoke_signed"),v=s("\u30E1\u30BD\u30C3\u30C9\u3092\u5229\u7528\u3057\u307E\u3059\u3002"),y=o(`
// Used when there are not signatures for PDAs needed
 pub fn invoke(
     instruction: &Instruction,
     account_infos: &[AccountInfo<'_>]
diff --git a/docs/.vuepress/dist/assets/cpi.html.fc0ddd7a.js b/docs/.vuepress/dist/assets/cpi.html.ce5147fe.js
similarity index 99%
rename from docs/.vuepress/dist/assets/cpi.html.fc0ddd7a.js
rename to docs/.vuepress/dist/assets/cpi.html.ce5147fe.js
index a19f56318..3aa464cca 100644
--- a/docs/.vuepress/dist/assets/cpi.html.fc0ddd7a.js
+++ b/docs/.vuepress/dist/assets/cpi.html.ce5147fe.js
@@ -1,4 +1,4 @@
-import{_ as t,r as p,o as c,c as r,a as n,b as e,F as l,e as o,d as s}from"./app.07ce7a66.js";const i={},u=o('

Cross Program Invocations (CPIs)

A Cross-Program Invocation (CPI) is a direct call from one program into another, allowing for the composability of Solana programs. Just as any client can call any program using the JSON RPC, any program can call any other program via a CPI. CPIs essentially turn the entire Solana ecosystem into one giant API that is at your disposal as a developer.

The purpose of this section is to provide a high-level overview CPIs. Please refer to the linked resources below for more detailed explanations, examples, and walkthroughs.

Facts

Fact Sheet

  • A\xA0Cross-Program Invocation (CPI)\xA0is a call from one program to another, targeting a specific instruction on the program being called
  • CPIs allow the calling program to extend its signer privileges to the callee program
  • Programs can execute CPIs using either invoke or invoke_signed within their instructions
  • invoke is used when all required signatures are accessible prior to invocation, without the need for PDAs to act as signers
  • invoke_signed is used when PDAs from the calling program are required as signers in the CPI
  • After a CPI is made to another program, the callee program can make further CPIs to other programs, up to a maximum depth of 4

Deep Dive

Cross Program Invocations (CPIs) enable the composability of Solana programs, which allow developers to utilize and build on the instruction of existing programs.

',7),d=s("To execute CPIs, use the "),k={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},m=s("invoke"),h=s(" or "),b={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},g=s("invoke_signed"),f=s(" function found in the "),_=n("code",null,"solana_program",-1),v=s(" crate."),y=o(`
// Used when there are not signatures for PDAs needed
+import{_ as t,r as p,o as c,c as r,a as n,b as e,F as l,e as o,d as s}from"./app.d411e3b3.js";const i={},u=o('

Cross Program Invocations (CPIs)

A Cross-Program Invocation (CPI) is a direct call from one program into another, allowing for the composability of Solana programs. Just as any client can call any program using the JSON RPC, any program can call any other program via a CPI. CPIs essentially turn the entire Solana ecosystem into one giant API that is at your disposal as a developer.

The purpose of this section is to provide a high-level overview CPIs. Please refer to the linked resources below for more detailed explanations, examples, and walkthroughs.

Facts

Fact Sheet

  • A\xA0Cross-Program Invocation (CPI)\xA0is a call from one program to another, targeting a specific instruction on the program being called
  • CPIs allow the calling program to extend its signer privileges to the callee program
  • Programs can execute CPIs using either invoke or invoke_signed within their instructions
  • invoke is used when all required signatures are accessible prior to invocation, without the need for PDAs to act as signers
  • invoke_signed is used when PDAs from the calling program are required as signers in the CPI
  • After a CPI is made to another program, the callee program can make further CPIs to other programs, up to a maximum depth of 4

Deep Dive

Cross Program Invocations (CPIs) enable the composability of Solana programs, which allow developers to utilize and build on the instruction of existing programs.

',7),d=s("To execute CPIs, use the "),k={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke.html",target:"_blank",rel:"noopener noreferrer"},m=s("invoke"),h=s(" or "),b={href:"https://docs.rs/solana-program/latest/solana_program/program/fn.invoke_signed.html",target:"_blank",rel:"noopener noreferrer"},g=s("invoke_signed"),f=s(" function found in the "),_=n("code",null,"solana_program",-1),v=s(" crate."),y=o(`
// Used when there are not signatures for PDAs needed
 pub fn invoke(
     instruction: &Instruction,
     account_infos: &[AccountInfo<'_>]
diff --git a/docs/.vuepress/dist/assets/data-migration.html.f3e868ea.js b/docs/.vuepress/dist/assets/data-migration.html.08e0b038.js
similarity index 99%
rename from docs/.vuepress/dist/assets/data-migration.html.f3e868ea.js
rename to docs/.vuepress/dist/assets/data-migration.html.08e0b038.js
index 48b4cb47d..6d46a221f 100644
--- a/docs/.vuepress/dist/assets/data-migration.html.f3e868ea.js
+++ b/docs/.vuepress/dist/assets/data-migration.html.08e0b038.js
@@ -1,4 +1,4 @@
-import{_ as t,r as p,o,c as r,a as n,b as s,F as c,e as l,d as e}from"./app.07ce7a66.js";var i="/assets/pav1.1b0417ca.png",u="/assets/pav2.1ef612b4.png";const k={},m=l('

Migrating a Programs Data Accounts (Programlar\u0131n Data Account\u2019lar\u0131n\u0131 Ta\u015F\u0131ma)

How can you migrate a program's data accounts? (Programlar\u0131n veri account\u2019lar\u0131 nas\u0131l ta\u015F\u0131n\u0131r)

Bir program olu\u015Fturdu\u011Funuzda, o programla ili\u015Fkili her bir veri account'\u0131n\u0131n belirli bir veri yap\u0131s\u0131 olacakt\u0131r. Programdan t\xFCretilen bir account'\u0131 y\xFCkseltmeniz gerekirse, eski yap\u0131ya sahip bir s\xFCr\xFC programdan t\xFCretilmi\u015F account kal\u0131r.

Hesap versiyonlama ile eski account'lar\u0131n\u0131z\u0131 yeni yap\u0131ya y\xFCkseltebilirsiniz.

:::Not Bu, Programa Ait Hesaplarda (POA) verileri ta\u015F\u0131man\u0131n bir\xE7ok yolundan yaln\u0131zca biridir. :::

Scenario (Senaryo)

Hesap verilerimizi s\xFCr\xFCmlendirmek ve ta\u015F\u0131mak i\xE7in her account i\xE7in bir kimlik sa\u011Flayaca\u011F\u0131z. Bu kimlik, programa aktard\u0131\u011F\u0131m\u0131zda account s\xFCr\xFCm\xFCn\xFC tan\u0131mlamam\u0131z\u0131 ve b\xF6ylece account'\u0131 do\u011Fru \u015Fekilde i\u015Flememizi sa\u011Flayacakt\u0131r.

A\u015Fa\u011F\u0131daki account durumunu ve program\u0131n\u0131 alal\u0131m:

Program Account v1
#[derive(BorshDeserialize, BorshSerialize, Debug, Default, PartialEq)]
+import{_ as t,r as p,o,c as r,a as n,b as s,F as c,e as l,d as e}from"./app.d411e3b3.js";var i="/assets/pav1.1b0417ca.png",u="/assets/pav2.1ef612b4.png";const k={},m=l('

Migrating a Programs Data Accounts (Programlar\u0131n Data Account\u2019lar\u0131n\u0131 Ta\u015F\u0131ma)

How can you migrate a program's data accounts? (Programlar\u0131n veri account\u2019lar\u0131 nas\u0131l ta\u015F\u0131n\u0131r)

Bir program olu\u015Fturdu\u011Funuzda, o programla ili\u015Fkili her bir veri account'\u0131n\u0131n belirli bir veri yap\u0131s\u0131 olacakt\u0131r. Programdan t\xFCretilen bir account'\u0131 y\xFCkseltmeniz gerekirse, eski yap\u0131ya sahip bir s\xFCr\xFC programdan t\xFCretilmi\u015F account kal\u0131r.

Hesap versiyonlama ile eski account'lar\u0131n\u0131z\u0131 yeni yap\u0131ya y\xFCkseltebilirsiniz.

:::Not Bu, Programa Ait Hesaplarda (POA) verileri ta\u015F\u0131man\u0131n bir\xE7ok yolundan yaln\u0131zca biridir. :::

Scenario (Senaryo)

Hesap verilerimizi s\xFCr\xFCmlendirmek ve ta\u015F\u0131mak i\xE7in her account i\xE7in bir kimlik sa\u011Flayaca\u011F\u0131z. Bu kimlik, programa aktard\u0131\u011F\u0131m\u0131zda account s\xFCr\xFCm\xFCn\xFC tan\u0131mlamam\u0131z\u0131 ve b\xF6ylece account'\u0131 do\u011Fru \u015Fekilde i\u015Flememizi sa\u011Flayacakt\u0131r.

A\u015Fa\u011F\u0131daki account durumunu ve program\u0131n\u0131 alal\u0131m:

Program Account v1
#[derive(BorshDeserialize, BorshSerialize, Debug, Default, PartialEq)]
 pub struct AccountContentCurrent {
     pub somevalue: u64,
 }
diff --git a/docs/.vuepress/dist/assets/data-migration.html.d5010d02.js b/docs/.vuepress/dist/assets/data-migration.html.1425ff59.js
similarity index 99%
rename from docs/.vuepress/dist/assets/data-migration.html.d5010d02.js
rename to docs/.vuepress/dist/assets/data-migration.html.1425ff59.js
index f0d104cc3..9f08b4c21 100644
--- a/docs/.vuepress/dist/assets/data-migration.html.d5010d02.js
+++ b/docs/.vuepress/dist/assets/data-migration.html.1425ff59.js
@@ -1,4 +1,4 @@
-import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",f="/assets/pav2.1ef612b4.png";const _={},y=p('

Migrating a Programs Data Accounts

How can you migrate a program's data accounts?

When you create a program, each data account associated with that program will have a specific data structure. If you ever need to upgrade a program derived account, you end up having a bunch of leftover program derived accounts with the old structure.

With account versioning, you can upgrade your old accounts to the new structure.

Note

This is only one of many ways to migrate data in Program Owned Accounts (POA).

Scenario

To version and migrate our account data, we will be providing an id for each account. This id will allow us to identify the account version when we pass it to the program, and thus handle the account correctly.

Take the following account state and program:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",f="/assets/pav2.1ef612b4.png";const _={},y=p('

Migrating a Programs Data Accounts

How can you migrate a program's data accounts?

When you create a program, each data account associated with that program will have a specific data structure. If you ever need to upgrade a program derived account, you end up having a bunch of leftover program derived accounts with the old structure.

With account versioning, you can upgrade your old accounts to the new structure.

Note

This is only one of many ways to migrate data in Program Owned Accounts (POA).

Scenario

To version and migrate our account data, we will be providing an id for each account. This id will allow us to identify the account version when we pass it to the program, and thus handle the account correctly.

Take the following account state and program:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.07b84548.js b/docs/.vuepress/dist/assets/data-migration.html.4a37b76d.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.07b84548.js rename to docs/.vuepress/dist/assets/data-migration.html.4a37b76d.js index b053280f5..726709729 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.07b84548.js +++ b/docs/.vuepress/dist/assets/data-migration.html.4a37b76d.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",f="/assets/pav2.1ef612b4.png";const _={},y=p('

Migration des Comptes de Donn\xE9es d'un Programme

Comment migrer les comptes de donn\xE9es d'un programme ?

Lorsque vous cr\xE9ez un programme, chaque compte de donn\xE9es associ\xE9 \xE0 celui-ci aura une structure de donn\xE9es sp\xE9cifique. Si vous devez un jour mettre \xE0 jour un compte d\xE9riv\xE9 de programme, vous vous retrouverez avec plusieurs comptes d\xE9riv\xE9s de programme restants avec l'ancienne structure.

Gr\xE2ce \xE0 la gestion des versions de comptes, vous pouvez mettre vos anciens comptes \xE0 jour vers la nouvelle structure.

Remarque

Ce n'est qu'une des nombreuses fa\xE7ons de migrer des donn\xE9es de comptes.

Sc\xE9nario

Pour versionner et migrer les donn\xE9es de nos comptes, nous allons fournir un id pour chaque compte. Cet id nous permettra d'identifier la version du compte lorsque nous le transmettrons au programme, et ainsi de le traiter correctement.

Prenez l'\xE9tat du compte et le programme suivants :

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",f="/assets/pav2.1ef612b4.png";const _={},y=p('

Migration des Comptes de Donn\xE9es d'un Programme

Comment migrer les comptes de donn\xE9es d'un programme ?

Lorsque vous cr\xE9ez un programme, chaque compte de donn\xE9es associ\xE9 \xE0 celui-ci aura une structure de donn\xE9es sp\xE9cifique. Si vous devez un jour mettre \xE0 jour un compte d\xE9riv\xE9 de programme, vous vous retrouverez avec plusieurs comptes d\xE9riv\xE9s de programme restants avec l'ancienne structure.

Gr\xE2ce \xE0 la gestion des versions de comptes, vous pouvez mettre vos anciens comptes \xE0 jour vers la nouvelle structure.

Remarque

Ce n'est qu'une des nombreuses fa\xE7ons de migrer des donn\xE9es de comptes.

Sc\xE9nario

Pour versionner et migrer les donn\xE9es de nos comptes, nous allons fournir un id pour chaque compte. Cet id nous permettra d'identifier la version du compte lorsque nous le transmettrons au programme, et ainsi de le traiter correctement.

Prenez l'\xE9tat du compte et le programme suivants :

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.aa7491d7.js b/docs/.vuepress/dist/assets/data-migration.html.558f508c.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.aa7491d7.js rename to docs/.vuepress/dist/assets/data-migration.html.558f508c.js index 6605e02e8..eeb9115d8 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.aa7491d7.js +++ b/docs/.vuepress/dist/assets/data-migration.html.558f508c.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migrating a Programs Data Accounts

\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 migrate program's data accounts \u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07?

\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E23\u0E49\u0E32\u0E07 program \u0E02\u0E36\u0E49\u0E19\u0E21\u0E32 \u0E41\u0E15\u0E48\u0E25\u0E30 data account \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07 (associated) \u0E01\u0E31\u0E1A program \u0E08\u0E30\u0E21\u0E35 data structure \u0E17\u0E35\u0E48\u0E15\u0E32\u0E22\u0E15\u0E31\u0E27. \u0E41\u0E25\u0E49\u0E27\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E08\u0E30 upgrade program derived account \u0E2A\u0E38\u0E14\u0E17\u0E49\u0E32\u0E22\u0E40\u0E23\u0E32\u0E08\u0E30\u0E21\u0E35 program derived accounts \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 structure \u0E40\u0E01\u0E48\u0E32\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E17\u0E34\u0E49\u0E07\u0E44\u0E27\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E08\u0E33\u0E19\u0E27\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07

\u0E41\u0E15\u0E48\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E43\u0E0A\u0E49\u0E27\u0E34\u0E18\u0E35 account versioning, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 upgrade accounts \u0E40\u0E01\u0E48\u0E32\u0E44\u0E1B\u0E40\u0E1B\u0E47\u0E19 structure \u0E43\u0E2B\u0E21\u0E48\u0E44\u0E14\u0E49

Note

\u0E19\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19\u0E2B\u0E25\u0E32\u0E22\u0E27\u0E34\u0E18\u0E35\u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E33 migration \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Program Owned Accounts (POA).

\u0E2A\u0E16\u0E32\u0E19\u0E01\u0E32\u0E23\u0E13\u0E4C (Scenario)

\u0E01\u0E32\u0E23\u0E08\u0E30\u0E17\u0E33 version \u0E41\u0E25\u0E30 migrate account data \u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 id \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E25\u0E30 account. \u0E0B\u0E36\u0E48\u0E07 id \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E08\u0E30\u0E0A\u0E48\u0E27\u0E22\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1A\u0E48\u0E07\u0E1A\u0E2D\u0E01 account version \u0E44\u0E14\u0E49\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E48\u0E07\u0E21\u0E31\u0E19\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19 program, \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23 account \u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07

\u0E25\u0E2D\u0E07\u0E14\u0E39 account state \u0E41\u0E25\u0E30 program \u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migrating a Programs Data Accounts

\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 migrate program's data accounts \u0E44\u0E14\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07?

\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E23\u0E49\u0E32\u0E07 program \u0E02\u0E36\u0E49\u0E19\u0E21\u0E32 \u0E41\u0E15\u0E48\u0E25\u0E30 data account \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07 (associated) \u0E01\u0E31\u0E1A program \u0E08\u0E30\u0E21\u0E35 data structure \u0E17\u0E35\u0E48\u0E15\u0E32\u0E22\u0E15\u0E31\u0E27. \u0E41\u0E25\u0E49\u0E27\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E08\u0E30 upgrade program derived account \u0E2A\u0E38\u0E14\u0E17\u0E49\u0E32\u0E22\u0E40\u0E23\u0E32\u0E08\u0E30\u0E21\u0E35 program derived accounts \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19 structure \u0E40\u0E01\u0E48\u0E32\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E17\u0E34\u0E49\u0E07\u0E44\u0E27\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E08\u0E33\u0E19\u0E27\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07

\u0E41\u0E15\u0E48\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E43\u0E0A\u0E49\u0E27\u0E34\u0E18\u0E35 account versioning, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 upgrade accounts \u0E40\u0E01\u0E48\u0E32\u0E44\u0E1B\u0E40\u0E1B\u0E47\u0E19 structure \u0E43\u0E2B\u0E21\u0E48\u0E44\u0E14\u0E49

Note

\u0E19\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19\u0E2B\u0E25\u0E32\u0E22\u0E27\u0E34\u0E18\u0E35\u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E33 migration \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Program Owned Accounts (POA).

\u0E2A\u0E16\u0E32\u0E19\u0E01\u0E32\u0E23\u0E13\u0E4C (Scenario)

\u0E01\u0E32\u0E23\u0E08\u0E30\u0E17\u0E33 version \u0E41\u0E25\u0E30 migrate account data \u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 id \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E25\u0E30 account. \u0E0B\u0E36\u0E48\u0E07 id \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E08\u0E30\u0E0A\u0E48\u0E27\u0E22\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E1A\u0E48\u0E07\u0E1A\u0E2D\u0E01 account version \u0E44\u0E14\u0E49\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E48\u0E07\u0E21\u0E31\u0E19\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19 program, \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23 account \u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07

\u0E25\u0E2D\u0E07\u0E14\u0E39 account state \u0E41\u0E25\u0E30 program \u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.d0acee8e.js b/docs/.vuepress/dist/assets/data-migration.html.6d313435.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.d0acee8e.js rename to docs/.vuepress/dist/assets/data-migration.html.6d313435.js index 64c10b429..743c9adde 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.d0acee8e.js +++ b/docs/.vuepress/dist/assets/data-migration.html.6d313435.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u79FB\u884C

\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u79FB\u884C\u3059\u308B\u306B\u306F\u3069\u3046\u3059\u308C\u3070\u3088\u3044\u3067\u3059\u304B\uFF1F

\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F5C\u6210\u3059\u308B\u3068\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u5404\u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u7279\u5B9A\u306E\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u6301\u3061\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u6D3E\u751F\u3057\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u5834\u5408\u306F\u3001\u53E4\u3044\u69CB\u9020\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u6D3E\u751F\u3057\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u305F\u304F\u3055\u3093\u6B8B\u3063\u3066\u3044\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002

\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u7BA1\u7406\u306B\u3088\u308A\u3001\u53E4\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u65B0\u3057\u3044\u69CB\u9020\u306B\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3067\u304D\u307E\u3059\u3002

Note

\u3053\u308C\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u6240\u6709\u30A2\u30AB\u30A6\u30F3\u30C8 (POA) \u3067\u30C7\u30FC\u30BF\u3092\u79FB\u884C\u3059\u308B\u591A\u304F\u306E\u65B9\u6CD5\u306E 1 \u3064\u306B\u3059\u304E\u307E\u305B\u3093\u3002

Scenario

\u30A2\u30AB\u30A6\u30F3\u30C8 \u30C7\u30FC\u30BF\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u7BA1\u7406\u3068\u79FB\u884C\u3092\u884C\u3046\u305F\u3081\u306B\u3001\u5404\u30A2\u30AB\u30A6\u30F3\u30C8\u306B ID \u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u3053\u306E ID \u306B\u3088\u308A\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u6E21\u3059\u3068\u304D\u306B\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8B58\u5225\u3067\u304D\u308B\u305F\u3081\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u6B63\u3057\u304F\u51E6\u7406\u3067\u304D\u307E\u3059\u3002

\u6B21\u306E\u3088\u3046\u306A\u72B6\u614B\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

\u30D7\u30ED\u30B0\u30E9\u30E0 \u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u79FB\u884C

\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u79FB\u884C\u3059\u308B\u306B\u306F\u3069\u3046\u3059\u308C\u3070\u3088\u3044\u3067\u3059\u304B\uFF1F

\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F5C\u6210\u3059\u308B\u3068\u3001\u305D\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u5404\u30C7\u30FC\u30BF \u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u7279\u5B9A\u306E\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u6301\u3061\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u6D3E\u751F\u3057\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u5834\u5408\u306F\u3001\u53E4\u3044\u69CB\u9020\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u6D3E\u751F\u3057\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u305F\u304F\u3055\u3093\u6B8B\u3063\u3066\u3044\u308B\u3053\u3068\u306B\u306A\u308A\u307E\u3059\u3002

\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u7BA1\u7406\u306B\u3088\u308A\u3001\u53E4\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u65B0\u3057\u3044\u69CB\u9020\u306B\u30A2\u30C3\u30D7\u30B0\u30EC\u30FC\u30C9\u3067\u304D\u307E\u3059\u3002

Note

\u3053\u308C\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u6240\u6709\u30A2\u30AB\u30A6\u30F3\u30C8 (POA) \u3067\u30C7\u30FC\u30BF\u3092\u79FB\u884C\u3059\u308B\u591A\u304F\u306E\u65B9\u6CD5\u306E 1 \u3064\u306B\u3059\u304E\u307E\u305B\u3093\u3002

Scenario

\u30A2\u30AB\u30A6\u30F3\u30C8 \u30C7\u30FC\u30BF\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u7BA1\u7406\u3068\u79FB\u884C\u3092\u884C\u3046\u305F\u3081\u306B\u3001\u5404\u30A2\u30AB\u30A6\u30F3\u30C8\u306B ID \u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002\u3053\u306E ID \u306B\u3088\u308A\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u6E21\u3059\u3068\u304D\u306B\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u8B58\u5225\u3067\u304D\u308B\u305F\u3081\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u6B63\u3057\u304F\u51E6\u7406\u3067\u304D\u307E\u3059\u3002

\u6B21\u306E\u3088\u3046\u306A\u72B6\u614B\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3068\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.8520d86d.js b/docs/.vuepress/dist/assets/data-migration.html.7eec80fc.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.8520d86d.js rename to docs/.vuepress/dist/assets/data-migration.html.7eec80fc.js index 7471943d6..7cd0d98ca 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.8520d86d.js +++ b/docs/.vuepress/dist/assets/data-migration.html.7eec80fc.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const y={},f=p('

Melakukan migrasi Akun Data dari sebuah Program

Bagaimana cara melakukan migrasi akun data sebuah program?

Saat Anda membuat program, setiap akun data yang berkaitan dengan program tersebut akan memiliki sebuah struktur data tertentu. Jika Anda perlu melakukan upgrade terhadap akun yang dihasilkan oleh program, Anda kemudian akan memiliki banyak sisa akun hasil program dengan struktur yang lama.

Dengan account versioning, Anda dapat memperbarui akun lama Anda ke struktur baru.

Catatan

Ini hanyalah salah satu dari banyak cara untuk melakukan migrasi data di Program Owned Accounts (POA).

Skenario

Untuk mencatat versi dan melakukan migrasi data akun kita, kita akan memberikan id untuk masing-masing akun. Id ini akan memungkinkan kita untuk mengidentifikasi versi akun ketika kita meneruskannya ke program, dan dengan demikian menangani akun tersebut dengan benar.

Mari kita ambil contoh status akun dan program berikut:

Program Account v1',9),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const y={},f=p('

Melakukan migrasi Akun Data dari sebuah Program

Bagaimana cara melakukan migrasi akun data sebuah program?

Saat Anda membuat program, setiap akun data yang berkaitan dengan program tersebut akan memiliki sebuah struktur data tertentu. Jika Anda perlu melakukan upgrade terhadap akun yang dihasilkan oleh program, Anda kemudian akan memiliki banyak sisa akun hasil program dengan struktur yang lama.

Dengan account versioning, Anda dapat memperbarui akun lama Anda ke struktur baru.

Catatan

Ini hanyalah salah satu dari banyak cara untuk melakukan migrasi data di Program Owned Accounts (POA).

Skenario

Untuk mencatat versi dan melakukan migrasi data akun kita, kita akan memberikan id untuk masing-masing akun. Id ini akan memungkinkan kita untuk mengidentifikasi versi akun ketika kita meneruskannya ke program, dan dengan demikian menangani akun tersebut dengan benar.

Mari kita ambil contoh status akun dan program berikut:

Program Account v1',9),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.e0a081db.js b/docs/.vuepress/dist/assets/data-migration.html.85d3c82e.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.e0a081db.js rename to docs/.vuepress/dist/assets/data-migration.html.85d3c82e.js index 7633a9d88..90122566f 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.e0a081db.js +++ b/docs/.vuepress/dist/assets/data-migration.html.85d3c82e.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migraci\xF3n de cuentas de datos de programas

\xBFC\xF3mo se pueden migrar las cuentas de datos de un programa?

Cuando crea un programa, cada cuenta de datos asociada con ese programa tendr\xE1 una estructura de datos espec\xEDfica. Si alguna vez necesitas actualizar una cuenta derivada del programa, puedes terminar teniendo un mont\xF3n de inconsistencias de cuentas derivadas del programa con la estructura anterior.

Con el control de versiones de la cuenta, puede actualizar sus cuentas antiguas a la nueva estructura.

Nota

Esta es solo una de las muchas formas de migrar datos en Cuentas de propiedad del programa (POA).

Escenario

Para versionar y migrar los datos de nuestra cuenta, proporcionaremos un id para cada cuenta. Este identificador nos permitir\xE1 identificar la versi\xF3n de la cuenta cuando se lo pasamos al programa, y \u200B\u200Bas\xED manejar correctamente la cuenta.

Tomemos como ejemplo el siguiente estado de cuenta y programa:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migraci\xF3n de cuentas de datos de programas

\xBFC\xF3mo se pueden migrar las cuentas de datos de un programa?

Cuando crea un programa, cada cuenta de datos asociada con ese programa tendr\xE1 una estructura de datos espec\xEDfica. Si alguna vez necesitas actualizar una cuenta derivada del programa, puedes terminar teniendo un mont\xF3n de inconsistencias de cuentas derivadas del programa con la estructura anterior.

Con el control de versiones de la cuenta, puede actualizar sus cuentas antiguas a la nueva estructura.

Nota

Esta es solo una de las muchas formas de migrar datos en Cuentas de propiedad del programa (POA).

Escenario

Para versionar y migrar los datos de nuestra cuenta, proporcionaremos un id para cada cuenta. Este identificador nos permitir\xE1 identificar la versi\xF3n de la cuenta cuando se lo pasamos al programa, y \u200B\u200Bas\xED manejar correctamente la cuenta.

Tomemos como ejemplo el siguiente estado de cuenta y programa:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.ac61c119.js b/docs/.vuepress/dist/assets/data-migration.html.a1c8731c.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.ac61c119.js rename to docs/.vuepress/dist/assets/data-migration.html.a1c8731c.js index f94e048f8..74193600f 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.ac61c119.js +++ b/docs/.vuepress/dist/assets/data-migration.html.a1c8731c.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",f="/assets/pav2.1ef612b4.png";const _={},y=p('

Migrieren eines Programmdatenkontos

Wie k\xF6nnen Sie die Datenkonten eines Programms migrieren?

Wenn Sie ein Programm erstellen, wird jedes damit vrkn\xFCpfte Datenkonto eine spezifische Struktur haben. Wenn Sie jemals ein Programm abgeleitetes Konto aktualisieren m\xF6chten, haben Sie am Ende eine Menge von \xFCbrig gebliebenen programmabgeleiteten Konten mit der alten Struktur.

Mit der Kontoversionierung k\xF6nnen Sie Ihre alten Konten auf upgraden die neue Struktur.

Note

Dies ist nur eine von vielen M\xF6glichkeiten, Daten in Program Owned Accounts (POA) zu migrieren.

Szenario

Um unsere Kontodaten zu versionieren und zu migrieren, stellen wir f\xFCr jedes Konto (Account) jeweils eine ID bereit. Diese ID erm\xF6glicht es uns, die Kontoversion dann zu identifizieren wenn wir es an das Programm \xFCbergeben und behandeln das Konto somit als korrekt.

Nehmen Sie den folgenden Kontostand und das folgende Programm:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",f="/assets/pav2.1ef612b4.png";const _={},y=p('

Migrieren eines Programmdatenkontos

Wie k\xF6nnen Sie die Datenkonten eines Programms migrieren?

Wenn Sie ein Programm erstellen, wird jedes damit vrkn\xFCpfte Datenkonto eine spezifische Struktur haben. Wenn Sie jemals ein Programm abgeleitetes Konto aktualisieren m\xF6chten, haben Sie am Ende eine Menge von \xFCbrig gebliebenen programmabgeleiteten Konten mit der alten Struktur.

Mit der Kontoversionierung k\xF6nnen Sie Ihre alten Konten auf upgraden die neue Struktur.

Note

Dies ist nur eine von vielen M\xF6glichkeiten, Daten in Program Owned Accounts (POA) zu migrieren.

Szenario

Um unsere Kontodaten zu versionieren und zu migrieren, stellen wir f\xFCr jedes Konto (Account) jeweils eine ID bereit. Diese ID erm\xF6glicht es uns, die Kontoversion dann zu identifizieren wenn wir es an das Programm \xFCbergeben und behandeln das Konto somit als korrekt.

Nehmen Sie den folgenden Kontostand und das folgende Programm:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.51e5d8f8.js b/docs/.vuepress/dist/assets/data-migration.html.cff77833.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.51e5d8f8.js rename to docs/.vuepress/dist/assets/data-migration.html.cff77833.js index 340da815a..449e7a9b3 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.51e5d8f8.js +++ b/docs/.vuepress/dist/assets/data-migration.html.cff77833.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",g="/assets/pav2.1ef612b4.png";const y={},_=p('

Paglilipat ng Mga Account ng Data ng Programa

Paano mo maililipat ang mga data account ng isang programa?

Kapag gumawa ka ng program, ang bawat data account ay nauugnay doon Ang programa ay magkakaroon ng isang tiyak na istraktura ng data. Kung kailangan mo para mag-upgrade ng program derived account, magkakaroon ka ng isang grupo ng mga natitirang account na nagmula sa programa na may lumang istraktura.

Sa account versioning, maaari mong i-upgrade ang iyong mga lumang account ang bagong istraktura.

Tandaan

Isa lang ito sa maraming paraan para mag-migrate ng data sa Program Owned Accounts (POA).

Sitwasyon

Upang i-version at i-migrate ang aming data ng account, magbibigay kami ng id para sa bawat isa account. Ang id na ito ay magbibigay-daan sa amin na matukoy ang bersyon ng account kung kailan ipinapasa namin ito sa programa, at sa gayon ay pinangangasiwaan nang tama ang account.

Kunin ang sumusunod na estado at programa ng account:

Program Account v1',9),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",g="/assets/pav2.1ef612b4.png";const y={},_=p('

Paglilipat ng Mga Account ng Data ng Programa

Paano mo maililipat ang mga data account ng isang programa?

Kapag gumawa ka ng program, ang bawat data account ay nauugnay doon Ang programa ay magkakaroon ng isang tiyak na istraktura ng data. Kung kailangan mo para mag-upgrade ng program derived account, magkakaroon ka ng isang grupo ng mga natitirang account na nagmula sa programa na may lumang istraktura.

Sa account versioning, maaari mong i-upgrade ang iyong mga lumang account ang bagong istraktura.

Tandaan

Isa lang ito sa maraming paraan para mag-migrate ng data sa Program Owned Accounts (POA).

Sitwasyon

Upang i-version at i-migrate ang aming data ng account, magbibigay kami ng id para sa bawat isa account. Ang id na ito ay magbibigay-daan sa amin na matukoy ang bersyon ng account kung kailan ipinapasa namin ito sa programa, at sa gayon ay pinangangasiwaan nang tama ang account.

Kunin ang sumusunod na estado at programa ng account:

Program Account v1',9),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.ec2afdd1.js b/docs/.vuepress/dist/assets/data-migration.html.df00c4c4.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.ec2afdd1.js rename to docs/.vuepress/dist/assets/data-migration.html.df00c4c4.js index b4b00c7fd..382cada02 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.ec2afdd1.js +++ b/docs/.vuepress/dist/assets/data-migration.html.df00c4c4.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

\u9077\u79FB\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236

\u4F60\u5982\u4F55\u9077\u79FB\u4E00\u500B\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236\uFF1F

\u7576\u4F60\u5275\u5EFA\u4E00\u500B\u7A0B\u5E8F\u6642\uFF0C\u8207\u8A72\u7A0B\u5E8F\u95DC\u806F\u7684\u6BCF\u500B\u6578\u64DA\u8CEC\u6236\u90FD\u5C07\u5177\u6709\u7279\u5B9A\u7684\u6578\u64DA\u7D50\u69CB\u3002\u5982\u679C\u4F60\u9700\u8981\u5347\u7D1A\u4E00\u500B\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF0C\u90A3\u9EBC\u4F60\u5C07\u5F97\u5230\u4E00\u5806\u5177\u6709\u820A\u7D50\u69CB\u7684\u5269\u9918\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\u3002

\u901A\u904E\u8CEC\u6236\u7248\u672C\u63A7\u5236\uFF0C\u60A8\u53EF\u4EE5\u5C07\u820A\u8CEC\u6236\u5347\u7D1A\u5230\u65B0\u7684\u7D50\u69CB\u3002

\u6CE8\u610F

\u9019\u53EA\u662F\u5728\u7A0B\u5E8F\u64C1\u6709\u7684\u8CEC\u6236\uFF08POA\uFF09\u4E2D\u9077\u79FB\u6578\u64DA\u7684\u8846\u591A\u65B9\u6CD5\u4E4B\u4E00\u3002

\u5834\u666F

\u7232\u4E86\u5C0D\u8CEC\u6236\u6578\u64DA\u9032\u884C\u7248\u672C\u63A7\u5236\u548C\u9077\u79FB\uFF0C\u6211\u5011\u5C07\u7232\u6BCF\u500B\u8CEC\u6236\u63D0\u4F9B\u4E00\u500BID\u3002\u8A72ID\u5141\u8A31\u6211\u5011\u5728\u5C07\u5176\u50B3\u905E\u7D66\u7A0B\u5E8F\u6642\u8B58\u5225\u8CEC\u6236\u7684\u7248\u672C\uFF0C\u5F9E\u800C\u6B63\u78BA\u8655\u7406\u8CEC\u6236\u3002

\u5047\u8A2D\u6709\u4EE5\u4E0B\u8CEC\u6236\u72C0\u614B\u548C\u7A0B\u5E8F\uFF1A

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

\u9077\u79FB\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236

\u4F60\u5982\u4F55\u9077\u79FB\u4E00\u500B\u7A0B\u5E8F\u7684\u6578\u64DA\u8CEC\u6236\uFF1F

\u7576\u4F60\u5275\u5EFA\u4E00\u500B\u7A0B\u5E8F\u6642\uFF0C\u8207\u8A72\u7A0B\u5E8F\u95DC\u806F\u7684\u6BCF\u500B\u6578\u64DA\u8CEC\u6236\u90FD\u5C07\u5177\u6709\u7279\u5B9A\u7684\u6578\u64DA\u7D50\u69CB\u3002\u5982\u679C\u4F60\u9700\u8981\u5347\u7D1A\u4E00\u500B\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF0C\u90A3\u9EBC\u4F60\u5C07\u5F97\u5230\u4E00\u5806\u5177\u6709\u820A\u7D50\u69CB\u7684\u5269\u9918\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\u3002

\u901A\u904E\u8CEC\u6236\u7248\u672C\u63A7\u5236\uFF0C\u60A8\u53EF\u4EE5\u5C07\u820A\u8CEC\u6236\u5347\u7D1A\u5230\u65B0\u7684\u7D50\u69CB\u3002

\u6CE8\u610F

\u9019\u53EA\u662F\u5728\u7A0B\u5E8F\u64C1\u6709\u7684\u8CEC\u6236\uFF08POA\uFF09\u4E2D\u9077\u79FB\u6578\u64DA\u7684\u8846\u591A\u65B9\u6CD5\u4E4B\u4E00\u3002

\u5834\u666F

\u7232\u4E86\u5C0D\u8CEC\u6236\u6578\u64DA\u9032\u884C\u7248\u672C\u63A7\u5236\u548C\u9077\u79FB\uFF0C\u6211\u5011\u5C07\u7232\u6BCF\u500B\u8CEC\u6236\u63D0\u4F9B\u4E00\u500BID\u3002\u8A72ID\u5141\u8A31\u6211\u5011\u5728\u5C07\u5176\u50B3\u905E\u7D66\u7A0B\u5E8F\u6642\u8B58\u5225\u8CEC\u6236\u7684\u7248\u672C\uFF0C\u5F9E\u800C\u6B63\u78BA\u8655\u7406\u8CEC\u6236\u3002

\u5047\u8A2D\u6709\u4EE5\u4E0B\u8CEC\u6236\u72C0\u614B\u548C\u7A0B\u5E8F\uFF1A

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.42889ad1.js b/docs/.vuepress/dist/assets/data-migration.html.e0732e8c.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.42889ad1.js rename to docs/.vuepress/dist/assets/data-migration.html.e0732e8c.js index 8b5b70270..a9edcd19c 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.42889ad1.js +++ b/docs/.vuepress/dist/assets/data-migration.html.e0732e8c.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migrando Contas de Dados do Programa

Como voc\xEA pode migrar as contas de dados de um programa?

Quando voc\xEA cria um programa, cada conta de dados associada a esse programa ter\xE1 uma estrutura de dados espec\xEDfica. Se voc\xEA precisar atualizar uma conta derivada de programa, acabar\xE1 tendo v\xE1rias contas derivadas de programa remanescentes com a estrutura antiga.

Com o versionamento de contas, voc\xEA pode atualizar suas contas antigas para a nova estrutura.

Observa\xE7\xE3o

Essa \xE9 apenas uma das muitas maneiras de migrar dados em Contas de Propriedade do Programa (Program Owned Accounts, ou POA).

Cen\xE1rio

Para versionar e migrar nossos dados de conta, forneceremos um ID para cada conta. Esse ID nos permitir\xE1 identificar a vers\xE3o da conta quando a passarmos para o programa e, assim, lidar com a conta corretamente.

Considere o seguinte estado de conta e programa:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migrando Contas de Dados do Programa

Como voc\xEA pode migrar as contas de dados de um programa?

Quando voc\xEA cria um programa, cada conta de dados associada a esse programa ter\xE1 uma estrutura de dados espec\xEDfica. Se voc\xEA precisar atualizar uma conta derivada de programa, acabar\xE1 tendo v\xE1rias contas derivadas de programa remanescentes com a estrutura antiga.

Com o versionamento de contas, voc\xEA pode atualizar suas contas antigas para a nova estrutura.

Observa\xE7\xE3o

Essa \xE9 apenas uma das muitas maneiras de migrar dados em Contas de Propriedade do Programa (Program Owned Accounts, ou POA).

Cen\xE1rio

Para versionar e migrar nossos dados de conta, forneceremos um ID para cada conta. Esse ID nos permitir\xE1 identificar a vers\xE3o da conta quando a passarmos para o programa e, assim, lidar com a conta corretamente.

Considere o seguinte estado de conta e programa:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.95cc310f.js b/docs/.vuepress/dist/assets/data-migration.html.f0501f2c.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.95cc310f.js rename to docs/.vuepress/dist/assets/data-migration.html.f0501f2c.js index 3d226a98e..695b56dcd 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.95cc310f.js +++ b/docs/.vuepress/dist/assets/data-migration.html.f0501f2c.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

\u8FC1\u79FB\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237

\u4F60\u5982\u4F55\u8FC1\u79FB\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237\uFF1F

\u5F53\u4F60\u521B\u5EFA\u4E00\u4E2A\u7A0B\u5E8F\u65F6\uFF0C\u4E0E\u8BE5\u7A0B\u5E8F\u5173\u8054\u7684\u6BCF\u4E2A\u6570\u636E\u8D26\u6237\u90FD\u5C06\u5177\u6709\u7279\u5B9A\u7684\u6570\u636E\u7ED3\u6784\u3002\u5982\u679C\u4F60\u9700\u8981\u5347\u7EA7\u4E00\u4E2A\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF0C\u90A3\u4E48\u4F60\u5C06\u5F97\u5230\u4E00\u5806\u5177\u6709\u65E7\u7ED3\u6784\u7684\u5269\u4F59\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\u3002

\u901A\u8FC7\u8D26\u6237\u7248\u672C\u63A7\u5236\uFF0C\u60A8\u53EF\u4EE5\u5C06\u65E7\u8D26\u6237\u5347\u7EA7\u5230\u65B0\u7684\u7ED3\u6784\u3002

\u6CE8\u610F

\u8FD9\u53EA\u662F\u5728\u7A0B\u5E8F\u62E5\u6709\u7684\u8D26\u6237\uFF08POA\uFF09\u4E2D\u8FC1\u79FB\u6570\u636E\u7684\u4F17\u591A\u65B9\u6CD5\u4E4B\u4E00\u3002

\u573A\u666F

\u4E3A\u4E86\u5BF9\u8D26\u6237\u6570\u636E\u8FDB\u884C\u7248\u672C\u63A7\u5236\u548C\u8FC1\u79FB\uFF0C\u6211\u4EEC\u5C06\u4E3A\u6BCF\u4E2A\u8D26\u6237\u63D0\u4F9B\u4E00\u4E2AID\u3002\u8BE5ID\u5141\u8BB8\u6211\u4EEC\u5728\u5C06\u5176\u4F20\u9012\u7ED9\u7A0B\u5E8F\u65F6\u8BC6\u522B\u8D26\u6237\u7684\u7248\u672C\uFF0C\u4ECE\u800C\u6B63\u786E\u5904\u7406\u8D26\u6237\u3002

\u5047\u8BBE\u6709\u4EE5\u4E0B\u8D26\u6237\u72B6\u6001\u548C\u7A0B\u5E8F\uFF1A

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

\u8FC1\u79FB\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237

\u4F60\u5982\u4F55\u8FC1\u79FB\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6570\u636E\u8D26\u6237\uFF1F

\u5F53\u4F60\u521B\u5EFA\u4E00\u4E2A\u7A0B\u5E8F\u65F6\uFF0C\u4E0E\u8BE5\u7A0B\u5E8F\u5173\u8054\u7684\u6BCF\u4E2A\u6570\u636E\u8D26\u6237\u90FD\u5C06\u5177\u6709\u7279\u5B9A\u7684\u6570\u636E\u7ED3\u6784\u3002\u5982\u679C\u4F60\u9700\u8981\u5347\u7EA7\u4E00\u4E2A\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF0C\u90A3\u4E48\u4F60\u5C06\u5F97\u5230\u4E00\u5806\u5177\u6709\u65E7\u7ED3\u6784\u7684\u5269\u4F59\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\u3002

\u901A\u8FC7\u8D26\u6237\u7248\u672C\u63A7\u5236\uFF0C\u60A8\u53EF\u4EE5\u5C06\u65E7\u8D26\u6237\u5347\u7EA7\u5230\u65B0\u7684\u7ED3\u6784\u3002

\u6CE8\u610F

\u8FD9\u53EA\u662F\u5728\u7A0B\u5E8F\u62E5\u6709\u7684\u8D26\u6237\uFF08POA\uFF09\u4E2D\u8FC1\u79FB\u6570\u636E\u7684\u4F17\u591A\u65B9\u6CD5\u4E4B\u4E00\u3002

\u573A\u666F

\u4E3A\u4E86\u5BF9\u8D26\u6237\u6570\u636E\u8FDB\u884C\u7248\u672C\u63A7\u5236\u548C\u8FC1\u79FB\uFF0C\u6211\u4EEC\u5C06\u4E3A\u6BCF\u4E2A\u8D26\u6237\u63D0\u4F9B\u4E00\u4E2AID\u3002\u8BE5ID\u5141\u8BB8\u6211\u4EEC\u5728\u5C06\u5176\u4F20\u9012\u7ED9\u7A0B\u5E8F\u65F6\u8BC6\u522B\u8D26\u6237\u7684\u7248\u672C\uFF0C\u4ECE\u800C\u6B63\u786E\u5904\u7406\u8D26\u6237\u3002

\u5047\u8BBE\u6709\u4EE5\u4E0B\u8D26\u6237\u72B6\u6001\u548C\u7A0B\u5E8F\uFF1A

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.a0b30eb8.js b/docs/.vuepress/dist/assets/data-migration.html.f1535631.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.a0b30eb8.js rename to docs/.vuepress/dist/assets/data-migration.html.f1535631.js index 34c98bbd1..24cdc368e 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.a0b30eb8.js +++ b/docs/.vuepress/dist/assets/data-migration.html.f1535631.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const y={},f=p('

N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u m\u1ED9t Program Account

L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\xF3 th\u1EC3 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Program Account?

Khi b\u1EA1n t\u1EA1o m\u1ED9t Program, m\u1ED7i Account d\u1EEF li\u1EC7u s\u1EBD \u0111\u01B0\u1EE3c g\xE1n cho Program \u0111\xF3 v\u1EDBi c\u1EA5u tr\u1EE5c d\u1EEF li\u1EC7u c\u1EE5 th\u1EC3. N\u1EBFu b\u1EA1n t\u1EEBng n\xE2ng c\u1EA5p Program v\xE0 Program n\xE0y d\xF9ng \u0111\u1EC3 suy ra c\xE1c PDA, b\u1EA1n ch\u1EAFc h\u1EB3n \u0111\xE3 ph\u1EA3i \u0111au \u0111\u1EA7u v\u1EDBi h\xE0ng t\xE1 nh\u1EEFng Account v\u1EDBi c\u1EA5u tr\xFAc g\u1EAFn v\u1EDBi Program c\u0169.

V\u1EDBi vi\u1EC7c \u0111\xE1nh phi\xEAn b\u1EA3n cho Account, b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng n\xE2ng c\u1EA5p c\u1EA5u tr\xFAc m\u1EDBi cho c\xE1c Account c\u0169 .

L\u01B0u \xFD

\u0110\xE2y ch\u1EC9 l\xE0 m\u1ED9t trong r\u1EA5t nhi\u1EC1u c\xE1ch kh\xE1c nhau \u0111\u1EC3 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Program Owned Accounts (POA).

Ng\u1EEF c\u1EA3nh

\u0110\u1EC3 \u0111\xE1nh phi\xEAn b\u1EA3n v\xE0 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Account, ch\xFAng ta s\u1EBD ph\u1EA3i cung c\u1EA5p m\u1ED9t id cho t\u1EEBng Account. Id n\xE0y s\u1EBD cho ph\xE9p ch\xFAng ta \u0111\u1ECBnh r\xF5 phi\xEAn b\u1EA3n c\u1EE7a Account khi truy\u1EC1n n\xF3 cho Program, v\xE0 nh\u01B0 v\u1EADy c\xF3 th\u1EC3 x\u1EED l\xFD Account m\u1ED9t c\xE1ch ch\xEDnh x\xE1c.

Quan s\xE1t tr\u1EA1ng th\xE1i b\xEAn d\u01B0\u1EDBi c\u1EE7a Account v\xE0 Program:

Program Account v1',9),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const y={},f=p('

N\xE2ng c\u1EA5p d\u1EEF li\u1EC7u m\u1ED9t Program Account

L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 c\xF3 th\u1EC3 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Program Account?

Khi b\u1EA1n t\u1EA1o m\u1ED9t Program, m\u1ED7i Account d\u1EEF li\u1EC7u s\u1EBD \u0111\u01B0\u1EE3c g\xE1n cho Program \u0111\xF3 v\u1EDBi c\u1EA5u tr\u1EE5c d\u1EEF li\u1EC7u c\u1EE5 th\u1EC3. N\u1EBFu b\u1EA1n t\u1EEBng n\xE2ng c\u1EA5p Program v\xE0 Program n\xE0y d\xF9ng \u0111\u1EC3 suy ra c\xE1c PDA, b\u1EA1n ch\u1EAFc h\u1EB3n \u0111\xE3 ph\u1EA3i \u0111au \u0111\u1EA7u v\u1EDBi h\xE0ng t\xE1 nh\u1EEFng Account v\u1EDBi c\u1EA5u tr\xFAc g\u1EAFn v\u1EDBi Program c\u0169.

V\u1EDBi vi\u1EC7c \u0111\xE1nh phi\xEAn b\u1EA3n cho Account, b\u1EA1n c\xF3 th\u1EC3 d\u1EC5 d\xE0ng n\xE2ng c\u1EA5p c\u1EA5u tr\xFAc m\u1EDBi cho c\xE1c Account c\u0169 .

L\u01B0u \xFD

\u0110\xE2y ch\u1EC9 l\xE0 m\u1ED9t trong r\u1EA5t nhi\u1EC1u c\xE1ch kh\xE1c nhau \u0111\u1EC3 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Program Owned Accounts (POA).

Ng\u1EEF c\u1EA3nh

\u0110\u1EC3 \u0111\xE1nh phi\xEAn b\u1EA3n v\xE0 n\xE2ng c\u1EA5p d\u1EEF li\u1EC7u trong Account, ch\xFAng ta s\u1EBD ph\u1EA3i cung c\u1EA5p m\u1ED9t id cho t\u1EEBng Account. Id n\xE0y s\u1EBD cho ph\xE9p ch\xFAng ta \u0111\u1ECBnh r\xF5 phi\xEAn b\u1EA3n c\u1EE7a Account khi truy\u1EC1n n\xF3 cho Program, v\xE0 nh\u01B0 v\u1EADy c\xF3 th\u1EC3 x\u1EED l\xFD Account m\u1ED9t c\xE1ch ch\xEDnh x\xE1c.

Quan s\xE1t tr\u1EA1ng th\xE1i b\xEAn d\u01B0\u1EDBi c\u1EE7a Account v\xE0 Program:

Program Account v1',9),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/data-migration.html.611a3316.js b/docs/.vuepress/dist/assets/data-migration.html.ff6c2789.js similarity index 99% rename from docs/.vuepress/dist/assets/data-migration.html.611a3316.js rename to docs/.vuepress/dist/assets/data-migration.html.ff6c2789.js index 01e116942..eda948d77 100644 --- a/docs/.vuepress/dist/assets/data-migration.html.611a3316.js +++ b/docs/.vuepress/dist/assets/data-migration.html.ff6c2789.js @@ -1,4 +1,4 @@ -import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.07ce7a66.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migrating a Programs Data Accounts

How can you migrate a program's data accounts?

\uB2F9\uC2E0\uC774 Program\uC744 \uC0DD\uC131\uD560 \uB54C, \uADF8 Program\uACFC \uC5F0\uAD00\uB41C \uAC01\uAC01\uC758 Data Account\uB294 \uD2B9\uC218\uD55C Data \uAD6C\uC870\uB97C \uAC00\uC9C8 \uAC83\uC785\uB2C8\uB2E4. \uB9CC\uC57D \uB2F9\uC2E0\uC774 Program Derived Account\uB97C \uC5C5\uADF8\uB808\uC774\uB4DC \uD560 \uD544\uC694\uAC00 \uC788\uB2E4\uBA74, \uB2F9\uC2E0\uC740 \uACB0\uAD6D \uC774\uC804 \uAD6C\uC8FC\uB97C \uAC16\uACE0 \uB0A8\uC544 \uC788\uB294 \uB2E4\uC218\uC758 Program Derived Account\uB97C \uAC16\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4.

Account versioning\uC744 \uD1B5\uD574 \uB2F9\uC2E0\uC740 \uC774\uC804 Account\uB4E4\uC744 \uC0C8\uB85C\uC6B4 \uAD6C\uC870\uB85C \uC5C5\uADF8\uB808\uC774\uB4DC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

Note

\uC774\uAC83\uC740 \uB2E8\uC9C0 Program Owned Account(POA)\uB4E4\uC5D0 \uC788\uB294 \uB370\uC774\uD130\uB97C \uC774\uAD00\uD558\uB294 \uB9CE\uC740 \uBC29\uBC95\uB4E4 \uC911 \uD558\uB098\uC77C \uBFD0\uC785\uB2C8\uB2E4.

Scenario

\uC6B0\uB9AC\uC758 Account Data\uC5D0 version\uC744 \uBA85\uC2DC\uD558\uACE0 \uC774\uAD00\uD558\uAE30 \uC704\uD574\uC11C, \uC6B0\uB9AC\uB294 \uAC01 Account\uC5D0 \uB300\uD55C \uD558\uB098\uC758 id\uB97C \uBC1B\uC744 \uAC83\uC785\uB2C8\uB2E4. \uC774 id\uB294 Account\uC758 version\uC744 \uC2DD\uBCC4\uD560 \uC218 \uC788\uAC8C \uD574\uC90D\uB2C8\uB2E4. \uC6B0\uB9AC\uAC00 id\uB97C Program\uC5D0 \uBCF4\uB0C4\uC73C\uB85C\uC368 Account\uB97C \uC815\uD655\uD788 \uB2E4\uB8F0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

\uC544\uB798\uB294 Account \uC0C1\uD0DC\uC640 Program\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +import{_ as i,r as e,o as k,c as m,b as t,w as a,a as n,F as b,e as p,d as s}from"./app.d411e3b3.js";var d="/assets/pav1.1b0417ca.png",_="/assets/pav2.1ef612b4.png";const f={},y=p('

Migrating a Programs Data Accounts

How can you migrate a program's data accounts?

\uB2F9\uC2E0\uC774 Program\uC744 \uC0DD\uC131\uD560 \uB54C, \uADF8 Program\uACFC \uC5F0\uAD00\uB41C \uAC01\uAC01\uC758 Data Account\uB294 \uD2B9\uC218\uD55C Data \uAD6C\uC870\uB97C \uAC00\uC9C8 \uAC83\uC785\uB2C8\uB2E4. \uB9CC\uC57D \uB2F9\uC2E0\uC774 Program Derived Account\uB97C \uC5C5\uADF8\uB808\uC774\uB4DC \uD560 \uD544\uC694\uAC00 \uC788\uB2E4\uBA74, \uB2F9\uC2E0\uC740 \uACB0\uAD6D \uC774\uC804 \uAD6C\uC8FC\uB97C \uAC16\uACE0 \uB0A8\uC544 \uC788\uB294 \uB2E4\uC218\uC758 Program Derived Account\uB97C \uAC16\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4.

Account versioning\uC744 \uD1B5\uD574 \uB2F9\uC2E0\uC740 \uC774\uC804 Account\uB4E4\uC744 \uC0C8\uB85C\uC6B4 \uAD6C\uC870\uB85C \uC5C5\uADF8\uB808\uC774\uB4DC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

Note

\uC774\uAC83\uC740 \uB2E8\uC9C0 Program Owned Account(POA)\uB4E4\uC5D0 \uC788\uB294 \uB370\uC774\uD130\uB97C \uC774\uAD00\uD558\uB294 \uB9CE\uC740 \uBC29\uBC95\uB4E4 \uC911 \uD558\uB098\uC77C \uBFD0\uC785\uB2C8\uB2E4.

Scenario

\uC6B0\uB9AC\uC758 Account Data\uC5D0 version\uC744 \uBA85\uC2DC\uD558\uACE0 \uC774\uAD00\uD558\uAE30 \uC704\uD574\uC11C, \uC6B0\uB9AC\uB294 \uAC01 Account\uC5D0 \uB300\uD55C \uD558\uB098\uC758 id\uB97C \uBC1B\uC744 \uAC83\uC785\uB2C8\uB2E4. \uC774 id\uB294 Account\uC758 version\uC744 \uC2DD\uBCC4\uD560 \uC218 \uC788\uAC8C \uD574\uC90D\uB2C8\uB2E4. \uC6B0\uB9AC\uAC00 id\uB97C Program\uC5D0 \uBCF4\uB0C4\uC73C\uB85C\uC368 Account\uB97C \uC815\uD655\uD788 \uB2E4\uB8F0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

\uC544\uB798\uB294 Account \uC0C1\uD0DC\uC640 Program\uC744 \uB098\uD0C0\uB0C5\uB2C8\uB2E4:

Program Account v1',9),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("arrayref"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("array_ref"),n("span",{class:"token punctuation"},","),s(" array_refs"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.d82f151d.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.072a7ef4.js similarity index 99% rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.d82f151d.js rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.072a7ef4.js index 1ba7c7d33..d7766ce64 100644 --- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.d82f151d.js +++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.072a7ef4.js @@ -1,4 +1,4 @@ -import{_ as o,r,o as t,c as l,a as e,b as n,F as i,e as c,d as s}from"./app.07ce7a66.js";const p={},d=c(`

Depurando Programas en Solana

Hay una serie de opciones y herramientas de apoyo para probar y depurar un programa Solana.

Hechos

Hoja de hechos

  • El crate solana-program-test permite el uso de bare bones local runtime donde puede probar y depurar su programa de forma interactiva (por ejemplo, en vscode).
  • El crate solana-validator permite el uso de la implementaci\xF3n solana-test-validator para una mayor robustez de pruebas en un nodo validador local. Puede ejecutarlo desde el editor pero los puntos de interrupci\xF3n en el programa son ignorados.
  • La herramienta CLI solana-test-validator ejecuta y carga su programa y procesa la ejecuci\xF3n de transacciones desde l\xEDnea de comando, Aplicaciones Rust o aplicaciones Javascript/Typescript usando web3.
  • Por todo lo anterior, se recomienda el uso liberal de la macro msg! en su programa al principio y luego elimin\xE1ndolos mientras prueba y asegura un comportamiento estable. Recuerde que msg! consume Unidades de C\xF3mputo que eventualmente podr\xEDan hacer fallar su programa al alcanzar los l\xEDmites de presupuesto de la Unidad de C\xF3mputo.

Los pasos de las siguientes secciones utilizan solana-program-bpf-template. Clona eso a tu m\xE1quina:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as o,r,o as t,c as l,a as e,b as n,F as i,e as c,d as s}from"./app.d411e3b3.js";const p={},d=c(`

Depurando Programas en Solana

Hay una serie de opciones y herramientas de apoyo para probar y depurar un programa Solana.

Hechos

Hoja de hechos

  • El crate solana-program-test permite el uso de bare bones local runtime donde puede probar y depurar su programa de forma interactiva (por ejemplo, en vscode).
  • El crate solana-validator permite el uso de la implementaci\xF3n solana-test-validator para una mayor robustez de pruebas en un nodo validador local. Puede ejecutarlo desde el editor pero los puntos de interrupci\xF3n en el programa son ignorados.
  • La herramienta CLI solana-test-validator ejecuta y carga su programa y procesa la ejecuci\xF3n de transacciones desde l\xEDnea de comando, Aplicaciones Rust o aplicaciones Javascript/Typescript usando web3.
  • Por todo lo anterior, se recomienda el uso liberal de la macro msg! en su programa al principio y luego elimin\xE1ndolos mientras prueba y asegura un comportamiento estable. Recuerde que msg! consume Unidades de C\xF3mputo que eventualmente podr\xEDan hacer fallar su programa al alcanzar los l\xEDmites de presupuesto de la Unidad de C\xF3mputo.

Los pasos de las siguientes secciones utilizan solana-program-bpf-template. Clona eso a tu m\xE1quina:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Pruebas de tiempo de ejecuci\xF3n y depuraci\xF3n en el editor

Abre el archivo src/lib.rs

Ver\xE1 que el programa es bastante simple y b\xE1sicamente solo registra el contenido recibido por la funci\xF3n de entrada del programa: process_instruction

  1. Vaya a la secci\xF3n #[cfg(test)] y haga clic en Ejecutar pruebas. Esto construir\xE1 el programa, luego ejecute la prueba async fn test_transaction(). Ver\xE1 los mensajes de registro (simplificados) en el terminal vscode.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.c5eb5f04.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.10f57b5c.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.c5eb5f04.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.10f57b5c.js
index e65aed946..1a540cac6 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.c5eb5f04.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.10f57b5c.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as p,c as l,a,b as n,F as c,e as r,d as e}from"./app.07ce7a66.js";const i={},d=r(`

Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30D0\u30C3\u30B0

Solana \u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30C6\u30B9\u30C8\u304A\u3088\u3073\u30C7\u30D0\u30C3\u30B0\u3059\u308B\u305F\u3081\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u30B5\u30DD\u30FC\u30C8 \u30C4\u30FC\u30EB\u304C\u591A\u6570\u3042\u308A\u307E\u3059\u3002

Facts

Fact Sheet

  • \u30AF\u30EC\u30FC\u30C8 solana-program-test\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u5FC5\u8981\u6700\u5C0F\u9650\u306E local runtime \u30ED\u30FC\u30AB\u30EB \u30E9\u30F3\u30BF\u30A4\u30E0\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u5BFE\u8A71\u7684\u306B(vscode\u306A\u3069\u3067)\u30C6\u30B9\u30C8\u304A\u3088\u3073\u30C7\u30D0\u30C3\u30B0\u3067\u304D\u307E\u3059\u3002
  • \u30AF\u30EC\u30FC\u30C8solana-validator \u3092\u4F7F\u7528\u3059\u308B\u3068\u3001solana-test-validator \u5B9F\u88C5\u3092\u4F7F\u7528\u3057\u3066\u3001**\u30ED\u30FC\u30AB\u30EB\u30D0\u30EA\u30C7\u30FC\u30BF\u30CE\u30FC\u30C9**\u3067\u884C\u308F\u308C\u308B\u3088\u308A\u5805\u7262\u306A\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002\u30A8\u30C7\u30A3\u30BF\u30FC\u304B\u3089\u5B9F\u884C\u3067\u304D\u307E\u3059\u304C\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u5185\u306E\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002
  • solana-test-validatorCLI \u30C4\u30FC\u30EB\u306F\u3001\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u5B9F\u884C\u304A\u3088\u3073\u30ED\u30FC\u30C9\u3057\u3001\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3 Rust \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u307E\u305F\u306F web3 \u3092\u4F7F\u7528\u3059\u308B Javascript/Typescript \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u304B\u3089\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5B9F\u884C\u3092\u51E6\u7406\u3057\u307E\u3059\u3002
  • \u4E0A\u8A18\u306E\u3059\u3079\u3066\u306B\u3064\u3044\u3066\u3001msg! \u3092\u81EA\u7531\u306B\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u30D7\u30ED\u30B0\u30E9\u30E0\u5185\u306E\u30DE\u30AF\u30ED\u306F\u3001\u6700\u521D\u306F\u524A\u9664\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002\u305D\u306E\u5F8C\u3001\u30C6\u30B9\u30C8\u3092\u884C\u3063\u3066\u5805\u5B9F\u306A\u52D5\u4F5C\u3092\u78BA\u8A8D\u3059\u308B\u3068\u304D\u306B\u524A\u9664\u3057\u307E\u3059\u3002msg!\u3092\u899A\u3048\u3066\u304A\u3044\u3066\u304F\u3060\u3055\u3044\u3002\u8A08\u7B97\u30E6\u30CB\u30C3\u30C8\u3092\u6D88\u8CBB\u3057\u3001\u6700\u7D42\u7684\u306B\u8A08\u7B97\u30E6\u30CB\u30C3\u30C8\u306E\u4E88\u7B97\u4E0A\u9650\u306B\u9054\u3057\u3066\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002

\u4EE5\u4E0B\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u624B\u9806\u3067\u306Fsolana-program-bpf-template\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u305D\u308C\u3092\u81EA\u5206\u306E\u30DE\u30B7\u30F3\u306B\u30AF\u30ED\u30FC\u30F3\u3057\u307E\u3059:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as p,c as l,a,b as n,F as c,e as r,d as e}from"./app.d411e3b3.js";const i={},d=r(`

Solana\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30C7\u30D0\u30C3\u30B0

Solana \u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30C6\u30B9\u30C8\u304A\u3088\u3073\u30C7\u30D0\u30C3\u30B0\u3059\u308B\u305F\u3081\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u30B5\u30DD\u30FC\u30C8 \u30C4\u30FC\u30EB\u304C\u591A\u6570\u3042\u308A\u307E\u3059\u3002

Facts

Fact Sheet

  • \u30AF\u30EC\u30FC\u30C8 solana-program-test\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u5FC5\u8981\u6700\u5C0F\u9650\u306E local runtime \u30ED\u30FC\u30AB\u30EB \u30E9\u30F3\u30BF\u30A4\u30E0\u3092\u4F7F\u7528\u3057\u3066\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u5BFE\u8A71\u7684\u306B(vscode\u306A\u3069\u3067)\u30C6\u30B9\u30C8\u304A\u3088\u3073\u30C7\u30D0\u30C3\u30B0\u3067\u304D\u307E\u3059\u3002
  • \u30AF\u30EC\u30FC\u30C8solana-validator \u3092\u4F7F\u7528\u3059\u308B\u3068\u3001solana-test-validator \u5B9F\u88C5\u3092\u4F7F\u7528\u3057\u3066\u3001**\u30ED\u30FC\u30AB\u30EB\u30D0\u30EA\u30C7\u30FC\u30BF\u30CE\u30FC\u30C9**\u3067\u884C\u308F\u308C\u308B\u3088\u308A\u5805\u7262\u306A\u30C6\u30B9\u30C8\u3092\u5B9F\u884C\u3067\u304D\u307E\u3059\u3002\u30A8\u30C7\u30A3\u30BF\u30FC\u304B\u3089\u5B9F\u884C\u3067\u304D\u307E\u3059\u304C\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u5185\u306E\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002
  • solana-test-validatorCLI \u30C4\u30FC\u30EB\u306F\u3001\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u5B9F\u884C\u304A\u3088\u3073\u30ED\u30FC\u30C9\u3057\u3001\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3 Rust \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u307E\u305F\u306F web3 \u3092\u4F7F\u7528\u3059\u308B Javascript/Typescript \u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u304B\u3089\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5B9F\u884C\u3092\u51E6\u7406\u3057\u307E\u3059\u3002
  • \u4E0A\u8A18\u306E\u3059\u3079\u3066\u306B\u3064\u3044\u3066\u3001msg! \u3092\u81EA\u7531\u306B\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u30D7\u30ED\u30B0\u30E9\u30E0\u5185\u306E\u30DE\u30AF\u30ED\u306F\u3001\u6700\u521D\u306F\u524A\u9664\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002\u305D\u306E\u5F8C\u3001\u30C6\u30B9\u30C8\u3092\u884C\u3063\u3066\u5805\u5B9F\u306A\u52D5\u4F5C\u3092\u78BA\u8A8D\u3059\u308B\u3068\u304D\u306B\u524A\u9664\u3057\u307E\u3059\u3002msg!\u3092\u899A\u3048\u3066\u304A\u3044\u3066\u304F\u3060\u3055\u3044\u3002\u8A08\u7B97\u30E6\u30CB\u30C3\u30C8\u3092\u6D88\u8CBB\u3057\u3001\u6700\u7D42\u7684\u306B\u8A08\u7B97\u30E6\u30CB\u30C3\u30C8\u306E\u4E88\u7B97\u4E0A\u9650\u306B\u9054\u3057\u3066\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u5931\u6557\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002

\u4EE5\u4E0B\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u306E\u624B\u9806\u3067\u306Fsolana-program-bpf-template\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u305D\u308C\u3092\u81EA\u5206\u306E\u30DE\u30B7\u30F3\u306B\u30AF\u30ED\u30FC\u30F3\u3057\u307E\u3059:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Runtime Testing and Debugging in editor

src/lib.rs\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F

\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u975E\u5E38\u306B\u5358\u7D14\u3067\u3001\u57FA\u672C\u7684\u306B\u306F\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30A8\u30F3\u30C8\u30EA\u30DD\u30A4\u30F3\u30C8\u95A2\u6570\u306B\u3088\u3063\u3066\u53D7\u4FE1\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u30ED\u30B0\u306B\u8A18\u9332\u3059\u308B\u3060\u3051\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059: process_instruction

  1. #[cfg(test)] \u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u79FB\u52D5\u3057\u3001Run Test\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u307E\u3059\u3002 \u3053\u308C\u306B\u3088\u308A\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u30D3\u30EB\u30C9\u3055\u308C\u3001async fn test_transaction() \u30C6\u30B9\u30C8\u304C\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002\u30BD\u30FC\u30B9\u306E\u4E0B\u306E vscode \u30BF\u30FC\u30DF\u30CA\u30EB\u306B\u30ED\u30B0 \u30E1\u30C3\u30BB\u30FC\u30B8 (simplified)\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.29a6acd8.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.1b41db2c.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.29a6acd8.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.1b41db2c.js
index df4230a19..b65106fbf 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.29a6acd8.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.1b41db2c.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as p,c,a as s,b as n,F as l,e as r,d as e}from"./app.07ce7a66.js";const i={},u=r(`

\u8ABF\u8A66 Solana \u7A0B\u5E8F

\u6709\u8A31\u591A\u9078\u9805\u548C\u652F\u6301\u5DE5\u5177\u53EF\u7528\u65BC\u6E2C\u8A66\u548C\u8ABF\u8A66Solana\u7A0B\u5E8F\u3002

\u7D9C\u8FF0

\u4E8B\u5BE6\u8868

  • solana-program-test \u5305\u53EF\u4EE5\u4F7F\u7528\u57FA\u672C\u7684\u672C\u5730\u904B\u884C\u6642\uFF0C\u5728\u5176\u4E2D\u53EF\u4EE5\u4EA4\u4E92\u5F0F\u5730\u6E2C\u8A66\u548C\u8ABF\u8A66\u7A0B\u5E8F\uFF08\u4F8B\u5982\u5728 vscode \u4E2D\uFF09\u3002
  • solana-validator \u5305\u53EF\u4EE5\u4F7F\u7528solana-test-validator\u5BE6\u73FE\u9032\u884C\u66F4\u53EF\u9760\u7684\u6E2C\u8A66\uFF0C\u8A72\u6E2C\u8A66\u767C\u751F\u5728\u672C\u5730\u9A57\u8B49\u5668\u7BC0\u9EDE\u4E0A\u3002\u4F60\u53EF\u4EE5\u5F9E\u7DE8\u8F2F\u5668\u4E2D\u904B\u884C\uFF0C\u4F46\u662F\u7A0B\u5E8F\u4E2D\u7684\u65B7\u9EDE\u5C07\u88AB\u5FFD\u7565\u3002
  • CLI\u5DE5\u5177solana-test-validator \u53EF\u4EE5\u5F9E\u547D\u4EE4\u884C\u904B\u884C\u548C\u52A0\u8F09\u4F60\u7684\u7A0B\u5E8F\uFF0C\u4E26\u8655\u7406\u4F86\u81EA\u547D\u4EE4\u884C Rust \u61C9\u7528\u7A0B\u5E8F\u6216\u4F7F\u7528 web3 \u7684 JavaScript/TypeScript \u61C9\u7528\u7A0B\u5E8F\u7684\u4E8B\u52D9\u57F7\u884C\u3002
  • \u5C0D\u65BC\u4E0A\u8FF0\u6240\u6709\u60C5\u6CC1\uFF0C\u5EFA\u8B70\u5728\u958B\u59CB\u6642\u5927\u91CF\u4F7F\u7528msg!\u5B8F\u9032\u884C\u8F38\u51FA\uFF0C\u7136\u5F8C\u5728\u6E2C\u8A66\u548C\u78BA\u4FDD\u884C\u7232\u7A69\u5B9A\u5F8C\u5C07\u5176\u79FB\u9664\u3002\u8ACB\u8A18\u4F4F\uFF0Cmsg! \u6703\u6D88\u8017\u8A08\u7B97\u55AE\u4F4D\uFF0C\u5982\u679C\u9054\u5230\u8A08\u7B97\u55AE\u4F4D\u7684\u9810\u7B97\u9650\u5236\uFF0C\u6700\u7D42\u53EF\u80FD\u5C0E\u81F4\u7A0B\u5E8F\u5931\u6557\u3002

\u6309\u7167\u4EE5\u4E0B\u6B65\u9A5F\u4F7F\u7528 solana-program-bpf-template\u3002\u5C07\u5176\u514B\u9686\u5230\u4F60\u7684\u8A08\u7B97\u6A5F\u4E0A\uFF1A

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as p,c,a as s,b as n,F as l,e as r,d as e}from"./app.d411e3b3.js";const i={},u=r(`

\u8ABF\u8A66 Solana \u7A0B\u5E8F

\u6709\u8A31\u591A\u9078\u9805\u548C\u652F\u6301\u5DE5\u5177\u53EF\u7528\u65BC\u6E2C\u8A66\u548C\u8ABF\u8A66Solana\u7A0B\u5E8F\u3002

\u7D9C\u8FF0

\u4E8B\u5BE6\u8868

  • solana-program-test \u5305\u53EF\u4EE5\u4F7F\u7528\u57FA\u672C\u7684\u672C\u5730\u904B\u884C\u6642\uFF0C\u5728\u5176\u4E2D\u53EF\u4EE5\u4EA4\u4E92\u5F0F\u5730\u6E2C\u8A66\u548C\u8ABF\u8A66\u7A0B\u5E8F\uFF08\u4F8B\u5982\u5728 vscode \u4E2D\uFF09\u3002
  • solana-validator \u5305\u53EF\u4EE5\u4F7F\u7528solana-test-validator\u5BE6\u73FE\u9032\u884C\u66F4\u53EF\u9760\u7684\u6E2C\u8A66\uFF0C\u8A72\u6E2C\u8A66\u767C\u751F\u5728\u672C\u5730\u9A57\u8B49\u5668\u7BC0\u9EDE\u4E0A\u3002\u4F60\u53EF\u4EE5\u5F9E\u7DE8\u8F2F\u5668\u4E2D\u904B\u884C\uFF0C\u4F46\u662F\u7A0B\u5E8F\u4E2D\u7684\u65B7\u9EDE\u5C07\u88AB\u5FFD\u7565\u3002
  • CLI\u5DE5\u5177solana-test-validator \u53EF\u4EE5\u5F9E\u547D\u4EE4\u884C\u904B\u884C\u548C\u52A0\u8F09\u4F60\u7684\u7A0B\u5E8F\uFF0C\u4E26\u8655\u7406\u4F86\u81EA\u547D\u4EE4\u884C Rust \u61C9\u7528\u7A0B\u5E8F\u6216\u4F7F\u7528 web3 \u7684 JavaScript/TypeScript \u61C9\u7528\u7A0B\u5E8F\u7684\u4E8B\u52D9\u57F7\u884C\u3002
  • \u5C0D\u65BC\u4E0A\u8FF0\u6240\u6709\u60C5\u6CC1\uFF0C\u5EFA\u8B70\u5728\u958B\u59CB\u6642\u5927\u91CF\u4F7F\u7528msg!\u5B8F\u9032\u884C\u8F38\u51FA\uFF0C\u7136\u5F8C\u5728\u6E2C\u8A66\u548C\u78BA\u4FDD\u884C\u7232\u7A69\u5B9A\u5F8C\u5C07\u5176\u79FB\u9664\u3002\u8ACB\u8A18\u4F4F\uFF0Cmsg! \u6703\u6D88\u8017\u8A08\u7B97\u55AE\u4F4D\uFF0C\u5982\u679C\u9054\u5230\u8A08\u7B97\u55AE\u4F4D\u7684\u9810\u7B97\u9650\u5236\uFF0C\u6700\u7D42\u53EF\u80FD\u5C0E\u81F4\u7A0B\u5E8F\u5931\u6557\u3002

\u6309\u7167\u4EE5\u4E0B\u6B65\u9A5F\u4F7F\u7528 solana-program-bpf-template\u3002\u5C07\u5176\u514B\u9686\u5230\u4F60\u7684\u8A08\u7B97\u6A5F\u4E0A\uFF1A

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

\u5728\u7DE8\u8F2F\u5668\u4E2D\u9032\u884C\u904B\u884C\u6642\u6E2C\u8A66\u548C\u8ABF\u8A66

\u6253\u958B\u6587\u4EF6 src/lib.rs

\u4F60\u6703\u770B\u5230\u8A72\u7A0B\u5E8F\u975E\u5E38\u7C21\u55AE\uFF0C\u57FA\u672C\u4E0A\u53EA\u662F\u8A18\u9304\u7A0B\u5E8F\u5165\u53E3\u51FD\u6578process_instruction\u63A5\u6536\u5230\u7684\u5167\u5BB9\u3002

1.\u8F49\u5230 #[cfg(test)] \u90E8\u5206\uFF0C\u4E26\u9EDE\u64CARun Tests\u3002\u9019\u5C07\u69CB\u5EFA\u7A0B\u5E8F\uFF0C\u7136\u5F8C\u57F7\u884C async fn test_transaction() \u6E2C\u8A66\u3002\u4F60\u5C07\u5728 vscode \u7D42\u7AEF\u4E2D\u770B\u5230\u7C21\u5316\u7684\u65E5\u8A8C\u6D88\u606F\u3002

running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.a0e3b858.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.2cb6ae77.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.a0e3b858.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.2cb6ae77.js
index 443f1ba92..2e24e68f2 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.a0e3b858.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.2cb6ae77.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as i,c as p,a,b as s,F as l,e as r,d as e}from"./app.07ce7a66.js";const g={},c=r(`

Pagde-debug ng Mga Programang Solana

Mayroong ilang mga opsyon at pansuportang tool para sa pagsubok at pag-debug ng isang Solana program.

Mga Katotohanan

Fact Sheet

  • Ang crate solana-program-test ay nagbibigay-daan sa paggamit ng mga walang laman na buto local runtime kung saan maaari mong subukan at i-debug interactive ang iyong programa (hal. sa vscode).
  • Ang crate solana-validator ay nagbibigay-daan sa paggamit ng solana-test-validator na pagpapatupad para sa mas matatag pagsubok na nangyayari sa isang local validator node. Maaari kang tumakbo mula sa editor ngunit breakpoints sa hindi pinapansin ang programa.
  • Ang CLI tool na solana-test-validator ay nagpapatakbo at naglo-load ng iyong programa at nagpoproseso ng pagpapatupad ng transaksyon mula sa command line Rust application o Javascript/Typescript application gamit ang web3.
  • Para sa lahat ng nasa itaas, ang liberal na paggamit ng msg! na macro sa iyong programa ay inirerekomenda sa simula at pagkatapos inaalis ang mga ito habang sinusubok mo at tinitiyak ang solidong gawi. Tandaan na ang msg! ay gumagamit ng Compute Units na maaaring tuluyang mabigo ang iyong programa sa pamamagitan ng pagpindot sa mga limitasyon ng badyet ng Compute Unit.

Ang mga hakbang sa mga sumusunod na seksyon ay gumagamit ng solana-program-bpf-template. I-clone iyon sa iyo makina:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as i,c as p,a,b as s,F as l,e as r,d as e}from"./app.d411e3b3.js";const g={},c=r(`

Pagde-debug ng Mga Programang Solana

Mayroong ilang mga opsyon at pansuportang tool para sa pagsubok at pag-debug ng isang Solana program.

Mga Katotohanan

Fact Sheet

  • Ang crate solana-program-test ay nagbibigay-daan sa paggamit ng mga walang laman na buto local runtime kung saan maaari mong subukan at i-debug interactive ang iyong programa (hal. sa vscode).
  • Ang crate solana-validator ay nagbibigay-daan sa paggamit ng solana-test-validator na pagpapatupad para sa mas matatag pagsubok na nangyayari sa isang local validator node. Maaari kang tumakbo mula sa editor ngunit breakpoints sa hindi pinapansin ang programa.
  • Ang CLI tool na solana-test-validator ay nagpapatakbo at naglo-load ng iyong programa at nagpoproseso ng pagpapatupad ng transaksyon mula sa command line Rust application o Javascript/Typescript application gamit ang web3.
  • Para sa lahat ng nasa itaas, ang liberal na paggamit ng msg! na macro sa iyong programa ay inirerekomenda sa simula at pagkatapos inaalis ang mga ito habang sinusubok mo at tinitiyak ang solidong gawi. Tandaan na ang msg! ay gumagamit ng Compute Units na maaaring tuluyang mabigo ang iyong programa sa pamamagitan ng pagpindot sa mga limitasyon ng badyet ng Compute Unit.

Ang mga hakbang sa mga sumusunod na seksyon ay gumagamit ng solana-program-bpf-template. I-clone iyon sa iyo makina:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Runtime Testing at Debugging sa editor

Buksan ang file na src/lib.rs

Makikita mo na ang programa ay medyo simple at karaniwang nag-log lamang ng nilalaman na natanggap ni ang function ng entrypoint ng programa: process_instruction

  1. Pumunta sa seksyong #[cfg(test)] at i-click ang Run Tests. Ito ang bubuo ng programa at pagkatapos isagawa ang async fn test_transaction() na pagsubok. Makikita mo ang mga log message (pinasimple) sa vscode terminal sa ibaba ang pinagmulan.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.2f9160d7.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.3b218539.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.2f9160d7.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.3b218539.js
index 35e34bf47..8eb900715 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.2f9160d7.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.3b218539.js
@@ -1,4 +1,4 @@
-import{_ as t,r as i,o,c as r,a,b as e,F as l,e as p,d as s}from"./app.07ce7a66.js";const d={},u=p(`

Debug Program Solana

Ada sejumlah opsi dan alat pendukung untuk menguji dan men-debug program Solana.

Fakta

Lembar Fakta

  • Crate solana-program-test memungkinkan penggunaan secara langsung terhadap runtime lokal tempat Anda dapat menguji dan men-debug program Anda secara interaktif (misalnya dalam vscode).
  • Crate solana-validator memungkinkan implementasi solana-test-validator untuk robust testing yang lebih baik yang terjadi pada local validator node. Anda dapat menjalankan dari editor tetapi breakpoints di program diabaikan.
  • CLI solana-test-validator menjalankan dan memuat program Anda dan memproses eksekusi transaksi dari aplikasi Rust berbasis command line atau aplikasi Javascript/TypeScript menggunakan web3.
  • Untuk semua hal di atas, penggunaan makro msg! secara bebas dalam program Anda disarankan dilakukan dari awal dan kemudian menghapusnya seiring Anda menguji dan memastikan behaviour yang kokoh. Ingat bahwa msg! menggunakan Compute Unit yang akhirnya dapat menggagalkan program Anda dengan menyentuh budget cap dari Compute Unit.

Langkah-langkah di bagian berikut menggunakan solana-program-bpf-template. Clone itu ke mesin:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as i,o,c as r,a,b as e,F as l,e as p,d as s}from"./app.d411e3b3.js";const d={},u=p(`

Debug Program Solana

Ada sejumlah opsi dan alat pendukung untuk menguji dan men-debug program Solana.

Fakta

Lembar Fakta

  • Crate solana-program-test memungkinkan penggunaan secara langsung terhadap runtime lokal tempat Anda dapat menguji dan men-debug program Anda secara interaktif (misalnya dalam vscode).
  • Crate solana-validator memungkinkan implementasi solana-test-validator untuk robust testing yang lebih baik yang terjadi pada local validator node. Anda dapat menjalankan dari editor tetapi breakpoints di program diabaikan.
  • CLI solana-test-validator menjalankan dan memuat program Anda dan memproses eksekusi transaksi dari aplikasi Rust berbasis command line atau aplikasi Javascript/TypeScript menggunakan web3.
  • Untuk semua hal di atas, penggunaan makro msg! secara bebas dalam program Anda disarankan dilakukan dari awal dan kemudian menghapusnya seiring Anda menguji dan memastikan behaviour yang kokoh. Ingat bahwa msg! menggunakan Compute Unit yang akhirnya dapat menggagalkan program Anda dengan menyentuh budget cap dari Compute Unit.

Langkah-langkah di bagian berikut menggunakan solana-program-bpf-template. Clone itu ke mesin:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Uji Runtime dan Debugging di editor

Buka file src/lib.rs

Anda akan melihat bahwa programnya cukup sederhana dan pada dasarnya hanya mencatat konten yang diterima oleh function dari entrypoint program: process_instruction

  1. Buka bagian #[cfg(test)] dan klik Run Tests. Ini akan melakukan build program dan kemudian jalankan tes async fn test_transaction(). Anda akan melihat pesan log (disederhanakan) di terminal vscode di bawah code.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.3aacc1a8.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.812629be.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.3aacc1a8.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.812629be.js
index 0caa765b0..896cdd33b 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.3aacc1a8.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.812629be.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as p,c,a as s,b as n,F as l,e as r,d as e}from"./app.07ce7a66.js";const i={},u=r(`

\u8C03\u8BD5 Solana \u7A0B\u5E8F

\u6709\u8BB8\u591A\u9009\u9879\u548C\u652F\u6301\u5DE5\u5177\u53EF\u7528\u4E8E\u6D4B\u8BD5\u548C\u8C03\u8BD5Solana\u7A0B\u5E8F\u3002

\u7EFC\u8FF0

\u4E8B\u5B9E\u8868

  • solana-program-test \u5305\u53EF\u4EE5\u4F7F\u7528\u57FA\u672C\u7684\u672C\u5730\u8FD0\u884C\u65F6\uFF0C\u5728\u5176\u4E2D\u53EF\u4EE5\u4EA4\u4E92\u5F0F\u5730\u6D4B\u8BD5\u548C\u8C03\u8BD5\u7A0B\u5E8F\uFF08\u4F8B\u5982\u5728 vscode \u4E2D\uFF09\u3002
  • solana-validator \u5305\u53EF\u4EE5\u4F7F\u7528solana-test-validator\u5B9E\u73B0\u8FDB\u884C\u66F4\u53EF\u9760\u7684\u6D4B\u8BD5\uFF0C\u8BE5\u6D4B\u8BD5\u53D1\u751F\u5728\u672C\u5730\u9A8C\u8BC1\u5668\u8282\u70B9\u4E0A\u3002\u4F60\u53EF\u4EE5\u4ECE\u7F16\u8F91\u5668\u4E2D\u8FD0\u884C\uFF0C\u4F46\u662F\u7A0B\u5E8F\u4E2D\u7684\u65AD\u70B9\u5C06\u88AB\u5FFD\u7565\u3002
  • CLI\u5DE5\u5177solana-test-validator \u53EF\u4EE5\u4ECE\u547D\u4EE4\u884C\u8FD0\u884C\u548C\u52A0\u8F7D\u4F60\u7684\u7A0B\u5E8F\uFF0C\u5E76\u5904\u7406\u6765\u81EA\u547D\u4EE4\u884C Rust \u5E94\u7528\u7A0B\u5E8F\u6216\u4F7F\u7528 web3 \u7684 JavaScript/TypeScript \u5E94\u7528\u7A0B\u5E8F\u7684\u4E8B\u52A1\u6267\u884C\u3002
  • \u5BF9\u4E8E\u4E0A\u8FF0\u6240\u6709\u60C5\u51B5\uFF0C\u5EFA\u8BAE\u5728\u5F00\u59CB\u65F6\u5927\u91CF\u4F7F\u7528msg!\u5B8F\u8FDB\u884C\u8F93\u51FA\uFF0C\u7136\u540E\u5728\u6D4B\u8BD5\u548C\u786E\u4FDD\u884C\u4E3A\u7A33\u5B9A\u540E\u5C06\u5176\u79FB\u9664\u3002\u8BF7\u8BB0\u4F4F\uFF0Cmsg! \u4F1A\u6D88\u8017\u8BA1\u7B97\u5355\u4F4D\uFF0C\u5982\u679C\u8FBE\u5230\u8BA1\u7B97\u5355\u4F4D\u7684\u9884\u7B97\u9650\u5236\uFF0C\u6700\u7EC8\u53EF\u80FD\u5BFC\u81F4\u7A0B\u5E8F\u5931\u8D25\u3002

\u6309\u7167\u4EE5\u4E0B\u6B65\u9AA4\u4F7F\u7528 solana-program-bpf-template\u3002\u5C06\u5176\u514B\u9686\u5230\u4F60\u7684\u8BA1\u7B97\u673A\u4E0A\uFF1A

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as p,c,a as s,b as n,F as l,e as r,d as e}from"./app.d411e3b3.js";const i={},u=r(`

\u8C03\u8BD5 Solana \u7A0B\u5E8F

\u6709\u8BB8\u591A\u9009\u9879\u548C\u652F\u6301\u5DE5\u5177\u53EF\u7528\u4E8E\u6D4B\u8BD5\u548C\u8C03\u8BD5Solana\u7A0B\u5E8F\u3002

\u7EFC\u8FF0

\u4E8B\u5B9E\u8868

  • solana-program-test \u5305\u53EF\u4EE5\u4F7F\u7528\u57FA\u672C\u7684\u672C\u5730\u8FD0\u884C\u65F6\uFF0C\u5728\u5176\u4E2D\u53EF\u4EE5\u4EA4\u4E92\u5F0F\u5730\u6D4B\u8BD5\u548C\u8C03\u8BD5\u7A0B\u5E8F\uFF08\u4F8B\u5982\u5728 vscode \u4E2D\uFF09\u3002
  • solana-validator \u5305\u53EF\u4EE5\u4F7F\u7528solana-test-validator\u5B9E\u73B0\u8FDB\u884C\u66F4\u53EF\u9760\u7684\u6D4B\u8BD5\uFF0C\u8BE5\u6D4B\u8BD5\u53D1\u751F\u5728\u672C\u5730\u9A8C\u8BC1\u5668\u8282\u70B9\u4E0A\u3002\u4F60\u53EF\u4EE5\u4ECE\u7F16\u8F91\u5668\u4E2D\u8FD0\u884C\uFF0C\u4F46\u662F\u7A0B\u5E8F\u4E2D\u7684\u65AD\u70B9\u5C06\u88AB\u5FFD\u7565\u3002
  • CLI\u5DE5\u5177solana-test-validator \u53EF\u4EE5\u4ECE\u547D\u4EE4\u884C\u8FD0\u884C\u548C\u52A0\u8F7D\u4F60\u7684\u7A0B\u5E8F\uFF0C\u5E76\u5904\u7406\u6765\u81EA\u547D\u4EE4\u884C Rust \u5E94\u7528\u7A0B\u5E8F\u6216\u4F7F\u7528 web3 \u7684 JavaScript/TypeScript \u5E94\u7528\u7A0B\u5E8F\u7684\u4E8B\u52A1\u6267\u884C\u3002
  • \u5BF9\u4E8E\u4E0A\u8FF0\u6240\u6709\u60C5\u51B5\uFF0C\u5EFA\u8BAE\u5728\u5F00\u59CB\u65F6\u5927\u91CF\u4F7F\u7528msg!\u5B8F\u8FDB\u884C\u8F93\u51FA\uFF0C\u7136\u540E\u5728\u6D4B\u8BD5\u548C\u786E\u4FDD\u884C\u4E3A\u7A33\u5B9A\u540E\u5C06\u5176\u79FB\u9664\u3002\u8BF7\u8BB0\u4F4F\uFF0Cmsg! \u4F1A\u6D88\u8017\u8BA1\u7B97\u5355\u4F4D\uFF0C\u5982\u679C\u8FBE\u5230\u8BA1\u7B97\u5355\u4F4D\u7684\u9884\u7B97\u9650\u5236\uFF0C\u6700\u7EC8\u53EF\u80FD\u5BFC\u81F4\u7A0B\u5E8F\u5931\u8D25\u3002

\u6309\u7167\u4EE5\u4E0B\u6B65\u9AA4\u4F7F\u7528 solana-program-bpf-template\u3002\u5C06\u5176\u514B\u9686\u5230\u4F60\u7684\u8BA1\u7B97\u673A\u4E0A\uFF1A

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

\u5728\u7F16\u8F91\u5668\u4E2D\u8FDB\u884C\u8FD0\u884C\u65F6\u6D4B\u8BD5\u548C\u8C03\u8BD5

\u6253\u5F00\u6587\u4EF6 src/lib.rs

\u4F60\u4F1A\u770B\u5230\u8BE5\u7A0B\u5E8F\u975E\u5E38\u7B80\u5355\uFF0C\u57FA\u672C\u4E0A\u53EA\u662F\u8BB0\u5F55\u7A0B\u5E8F\u5165\u53E3\u51FD\u6570process_instruction\u63A5\u6536\u5230\u7684\u5185\u5BB9\u3002

1.\u8F6C\u5230 #[cfg(test)] \u90E8\u5206\uFF0C\u5E76\u70B9\u51FBRun Tests\u3002\u8FD9\u5C06\u6784\u5EFA\u7A0B\u5E8F\uFF0C\u7136\u540E\u6267\u884C async fn test_transaction() \u6D4B\u8BD5\u3002\u4F60\u5C06\u5728 vscode \u7EC8\u7AEF\u4E2D\u770B\u5230\u7B80\u5316\u7684\u65E5\u5FD7\u6D88\u606F\u3002

running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.56d02641.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.92d478f0.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.56d02641.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.92d478f0.js
index 3a001112e..3da7c398f 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.56d02641.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.92d478f0.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as r,c as l,a,b as s,F as p,e as i,d as e}from"./app.07ce7a66.js";const c={},d=i(`

Debugging Solana Programs

\u0E21\u0E35\u0E17\u0E32\u0E07\u0E40\u0E25\u0E37\u0E2D\u0E01 \u0E41\u0E25\u0E30\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19\u0E21\u0E32\u0E01\u0E21\u0E32\u0E22\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E17\u0E14\u0E2A\u0E2D\u0E1A \u0E41\u0E25\u0E30 debugging Solana BPF program.

\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49

Fact Sheet

  • crate solana-program-test \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 local runtime \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 test \u0E41\u0E25\u0E30 debug program \u0E44\u0E14\u0E49 (\u0E14\u0E49\u0E27\u0E22 vscode).
  • crate solana-validator \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 solana-test-validator \u0E01\u0E32\u0E23 test \u0E1A\u0E19 local validator node \u0E17\u0E33\u0E44\u0E14\u0E49\u0E14\u0E35\u0E02\u0E36\u0E49\u0E19 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 run \u0E08\u0E32\u0E01 editor \u0E44\u0E14\u0E49 \u0E41\u0E15\u0E48 breakpoints \u0E43\u0E19 program \u0E08\u0E30\u0E16\u0E39\u0E01\u0E21\u0E2D\u0E07\u0E02\u0E49\u0E32\u0E21\u0E44\u0E1B.
  • \u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D CLI solana-test-validator runs, loads program \u0E41\u0E25\u0E30\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transaction \u0E42\u0E14\u0E22\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1C\u0E48\u0E32\u0E19 command line \u0E01\u0E31\u0E1A Rust applications \u0E2B\u0E23\u0E37\u0E2D Javascript/Typescript app \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 web3.
  • \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E27\u0E48\u0E32\u0E21\u0E32 \u0E40\u0E23\u0E32\u0E41\u0E19\u0E30\u0E19\u0E33\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49 macro msg! \u0E43\u0E19 program \u0E43\u0E19\u0E15\u0E2D\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21 \u0E41\u0E25\u0E30\u0E40\u0E2D\u0E32\u0E2D\u0E2D\u0E2D\u0E01\u0E40\u0E21\u0E37\u0E48\u0E2D test \u0E41\u0E25\u0E30\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E27\u0E48\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19\u0E16\u0E39\u0E01\u0E41\u0E25\u0E49\u0E27\u0E41\u0E25\u0E49\u0E27 \u0E08\u0E33\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 msg! \u0E43\u0E0A\u0E49 Compute Units \u0E17\u0E35\u0E48\u0E17\u0E33\u0E43\u0E2B\u0E49 program \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27\u0E44\u0E14\u0E49\u0E16\u0E49\u0E32\u0E43\u0E0A\u0E49 Compute Unit \u0E40\u0E01\u0E34\u0E19\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49.

\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49 solana-program-bpf-template. Clone \u0E44\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as r,c as l,a,b as s,F as p,e as i,d as e}from"./app.d411e3b3.js";const c={},d=i(`

Debugging Solana Programs

\u0E21\u0E35\u0E17\u0E32\u0E07\u0E40\u0E25\u0E37\u0E2D\u0E01 \u0E41\u0E25\u0E30\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19\u0E21\u0E32\u0E01\u0E21\u0E32\u0E22\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E17\u0E14\u0E2A\u0E2D\u0E1A \u0E41\u0E25\u0E30 debugging Solana BPF program.

\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49

Fact Sheet

  • crate solana-program-test \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 local runtime \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 test \u0E41\u0E25\u0E30 debug program \u0E44\u0E14\u0E49 (\u0E14\u0E49\u0E27\u0E22 vscode).
  • crate solana-validator \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 solana-test-validator \u0E01\u0E32\u0E23 test \u0E1A\u0E19 local validator node \u0E17\u0E33\u0E44\u0E14\u0E49\u0E14\u0E35\u0E02\u0E36\u0E49\u0E19 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 run \u0E08\u0E32\u0E01 editor \u0E44\u0E14\u0E49 \u0E41\u0E15\u0E48 breakpoints \u0E43\u0E19 program \u0E08\u0E30\u0E16\u0E39\u0E01\u0E21\u0E2D\u0E07\u0E02\u0E49\u0E32\u0E21\u0E44\u0E1B.
  • \u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D CLI solana-test-validator runs, loads program \u0E41\u0E25\u0E30\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transaction \u0E42\u0E14\u0E22\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1C\u0E48\u0E32\u0E19 command line \u0E01\u0E31\u0E1A Rust applications \u0E2B\u0E23\u0E37\u0E2D Javascript/Typescript app \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 web3.
  • \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E27\u0E48\u0E32\u0E21\u0E32 \u0E40\u0E23\u0E32\u0E41\u0E19\u0E30\u0E19\u0E33\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49 macro msg! \u0E43\u0E19 program \u0E43\u0E19\u0E15\u0E2D\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21 \u0E41\u0E25\u0E30\u0E40\u0E2D\u0E32\u0E2D\u0E2D\u0E2D\u0E01\u0E40\u0E21\u0E37\u0E48\u0E2D test \u0E41\u0E25\u0E30\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E27\u0E48\u0E32\u0E17\u0E33\u0E07\u0E32\u0E19\u0E16\u0E39\u0E01\u0E41\u0E25\u0E49\u0E27\u0E41\u0E25\u0E49\u0E27 \u0E08\u0E33\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 msg! \u0E43\u0E0A\u0E49 Compute Units \u0E17\u0E35\u0E48\u0E17\u0E33\u0E43\u0E2B\u0E49 program \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27\u0E44\u0E14\u0E49\u0E16\u0E49\u0E32\u0E43\u0E0A\u0E49 Compute Unit \u0E40\u0E01\u0E34\u0E19\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49.

\u0E02\u0E31\u0E49\u0E19\u0E15\u0E2D\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49 solana-program-bpf-template. Clone \u0E44\u0E1B\u0E17\u0E35\u0E48\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Runtime Testing \u0E41\u0E25\u0E30 Debugging \u0E43\u0E19 editor

\u0E40\u0E1B\u0E34\u0E14 file src/lib.rs

\u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32 program \u0E19\u0E31\u0E49\u0E19\u0E07\u0E48\u0E32\u0E22\u0E41\u0E25\u0E30 \u0E41\u0E04\u0E48 logs \u0E15\u0E31\u0E27 content \u0E17\u0E35\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E21\u0E32\u0E08\u0E32\u0E01 program entrypoint function: process_instruction

  1. \u0E44\u0E1B\u0E15\u0E23\u0E07\u0E17\u0E35\u0E48 #[cfg(test)] \u0E41\u0E25\u0E30\u0E01\u0E14 Run Tests \u0E21\u0E31\u0E19\u0E01\u0E47\u0E08\u0E30 build program \u0E41\u0E25\u0E30\u0E17\u0E33\u0E01\u0E32\u0E23 test async fn test_transaction() \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19 log messages (\u0E41\u0E1A\u0E1A\u0E22\u0E48\u0E2D)\u0E43\u0E19 vscode terminal \u0E15\u0E32\u0E21\u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49:
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.696e8511.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.a32bb038.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.696e8511.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.a32bb038.js
index 6e4d12f2f..f52aab233 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.696e8511.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.a32bb038.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as r,c as i,a as e,b as n,F as l,e as p,d as s}from"./app.07ce7a66.js";const c={},u=p(`

Debugging Solana Programs

There are a number of options and supporting tools for testing and debugging a Solana program.

Facts

Fact Sheet

  • The crate solana-program-test enables use of bare bones local runtime where you can test and debug your program interactively (e.g. in vscode).
  • The crate solana-validator enables use of the solana-test-validator implementation for more robust testing that occurs on a local validator node. You can run from the editor but breakpoints in the program are ignored.
  • The CLI tool solana-test-validator runs and loads your program and processes transaction execution from command line Rust applications or Javascript/Typescript applications using web3.
  • For all the above, liberal use of msg! macro in your program is recommended at the start and then removing them as you test and ensure rock solid behavior. Remember that msg! consumes Compute Units which can eventually fail your program by hitting the Compute Unit budget caps.

The steps in the following sections use the solana-program-bpf-template. Clone that to your machine:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as r,c as i,a as e,b as n,F as l,e as p,d as s}from"./app.d411e3b3.js";const c={},u=p(`

Debugging Solana Programs

There are a number of options and supporting tools for testing and debugging a Solana program.

Facts

Fact Sheet

  • The crate solana-program-test enables use of bare bones local runtime where you can test and debug your program interactively (e.g. in vscode).
  • The crate solana-validator enables use of the solana-test-validator implementation for more robust testing that occurs on a local validator node. You can run from the editor but breakpoints in the program are ignored.
  • The CLI tool solana-test-validator runs and loads your program and processes transaction execution from command line Rust applications or Javascript/Typescript applications using web3.
  • For all the above, liberal use of msg! macro in your program is recommended at the start and then removing them as you test and ensure rock solid behavior. Remember that msg! consumes Compute Units which can eventually fail your program by hitting the Compute Unit budget caps.

The steps in the following sections use the solana-program-bpf-template. Clone that to your machine:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Runtime Testing and Debugging in editor

Open the file src/lib.rs

You'll see that the program is a pretty simple and basically just logs the content received by the program entrypoint function: process_instruction

  1. Go to the #[cfg(test)] section and click Run Tests. This will build the program and then execute the async fn test_transaction() test. You will see the log messages (simplified) in the vscode terminal below the source.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.3408b860.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.aa6fcacf.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.3408b860.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.aa6fcacf.js
index 1645fce22..a3dc05496 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.3408b860.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.aa6fcacf.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as l,c as r,a,b as s,F as i,e as c,d as e}from"./app.07ce7a66.js";const p={},d=c(`

Debugging Solana Programs

Solana Program\uC744 \uD14C\uC2A4\uD2B8\uD558\uACE0 \uB514\uBC84\uAE45\uD558\uAE30 \uC704\uD55C \uBA87 \uAC00\uC9C0 \uC120\uD0DD\uC9C0\uC640 \uB3C4\uAD6C\uB4E4\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.

Facts

Fact Sheet

  • crate solana-program-test\uB294 \uB2F9\uC2E0\uC758 \uD504\uB85C\uADF8\uB7A8\uC744 interatively \uD14C\uC2A4\uD2B8\uD558\uACE0 \uB514\uBC84\uAE45 \uD560 \uC218 \uC788\uAC8C \uD558\uB294 local runtime \uC0AC\uC6A9\uC744 \uAC00\uB2A5\uD558\uAC8C \uD574\uC90D\uB2C8\uB2E4. (e.g. in vscode).
  • crate solana-validator\uB294 **local validator node**\uC5D0\uC11C \uC77C\uC5B4\uB098\uB294 \uB354 \uC644\uC131\uB41C \uD14C\uC2A4\uD2B8\uB97C \uC704\uD55C solana-test-validator \uAD6C\uD604\uC758 \uC0AC\uC6A9\uC744 \uAC00\uB2A5\uD558\uAC8C \uD574\uC90D\uB2C8\uB2E4.
  • CLI tool solana-test-validator\uB294 \uB2F9\uC2E0\uC758 \uD504\uB85C\uADF8\uB7A8\uC744 \uC2E4\uD589\uC2DC\uD0A4\uACE0 command line Rust Application \uB610\uB294 web3\uB97C \uC0AC\uC6A9\uD558\uB294 Javascript/Typescript Application \uC73C\uB85C\uBD80\uC758 Transaction\uC744 \uCC98\uB9AC\uD569\uB2C8\uB2E4. \uC704 \uBCF4\uB4E0 \uAC83\uB4E4\uC744 \uC704\uD574, \uBA3C\uC800 \uB2F9\uC2E0\uC758 Program\uC5D0\uC11Cmsg! \uB9E4\uD06C\uB85C \uC0AC\uC6A9\uD558\uC2DC\uACE0 \uD14C\uC2A4\uD2B8 \uD568\uC5D0 \uB530\uB77C \uADF8\uAC83\uB4E4\uC744 \uC9C0\uC6B0\uAE38 \uCD94\uCC9C\uD569\uB2C8\uB2E4. msg!\uAC00 \uCEF4\uD4E8\uD130 \uC790\uC6D0\uC744 \uC18C\uBE44\uD55C\uB2E4\uB294 \uAC83\uC744 \uAE30\uC5B5\uD558\uC138\uC694. \uAC11\uC790\uAE30 \uB2F9\uC2E0\uC758 \uD504\uB85C\uADF8\uB7A8\uC744 \uC2E4\uD328\uD558\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

\uC544\uB798 \uC139\uC158\uC758 \uB2E8\uACC4\uB4E4\uC740 solana-program-bpf-template\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uB2F9\uC2E0\uC758 \uCEF4\uD4E8\uD130\uC5D0 Clone \uD558\uC138\uC694:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as l,c as r,a,b as s,F as i,e as c,d as e}from"./app.d411e3b3.js";const p={},d=c(`

Debugging Solana Programs

Solana Program\uC744 \uD14C\uC2A4\uD2B8\uD558\uACE0 \uB514\uBC84\uAE45\uD558\uAE30 \uC704\uD55C \uBA87 \uAC00\uC9C0 \uC120\uD0DD\uC9C0\uC640 \uB3C4\uAD6C\uB4E4\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4.

Facts

Fact Sheet

  • crate solana-program-test\uB294 \uB2F9\uC2E0\uC758 \uD504\uB85C\uADF8\uB7A8\uC744 interatively \uD14C\uC2A4\uD2B8\uD558\uACE0 \uB514\uBC84\uAE45 \uD560 \uC218 \uC788\uAC8C \uD558\uB294 local runtime \uC0AC\uC6A9\uC744 \uAC00\uB2A5\uD558\uAC8C \uD574\uC90D\uB2C8\uB2E4. (e.g. in vscode).
  • crate solana-validator\uB294 **local validator node**\uC5D0\uC11C \uC77C\uC5B4\uB098\uB294 \uB354 \uC644\uC131\uB41C \uD14C\uC2A4\uD2B8\uB97C \uC704\uD55C solana-test-validator \uAD6C\uD604\uC758 \uC0AC\uC6A9\uC744 \uAC00\uB2A5\uD558\uAC8C \uD574\uC90D\uB2C8\uB2E4.
  • CLI tool solana-test-validator\uB294 \uB2F9\uC2E0\uC758 \uD504\uB85C\uADF8\uB7A8\uC744 \uC2E4\uD589\uC2DC\uD0A4\uACE0 command line Rust Application \uB610\uB294 web3\uB97C \uC0AC\uC6A9\uD558\uB294 Javascript/Typescript Application \uC73C\uB85C\uBD80\uC758 Transaction\uC744 \uCC98\uB9AC\uD569\uB2C8\uB2E4. \uC704 \uBCF4\uB4E0 \uAC83\uB4E4\uC744 \uC704\uD574, \uBA3C\uC800 \uB2F9\uC2E0\uC758 Program\uC5D0\uC11Cmsg! \uB9E4\uD06C\uB85C \uC0AC\uC6A9\uD558\uC2DC\uACE0 \uD14C\uC2A4\uD2B8 \uD568\uC5D0 \uB530\uB77C \uADF8\uAC83\uB4E4\uC744 \uC9C0\uC6B0\uAE38 \uCD94\uCC9C\uD569\uB2C8\uB2E4. msg!\uAC00 \uCEF4\uD4E8\uD130 \uC790\uC6D0\uC744 \uC18C\uBE44\uD55C\uB2E4\uB294 \uAC83\uC744 \uAE30\uC5B5\uD558\uC138\uC694. \uAC11\uC790\uAE30 \uB2F9\uC2E0\uC758 \uD504\uB85C\uADF8\uB7A8\uC744 \uC2E4\uD328\uD558\uAC8C \uB9CC\uB4E4 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

\uC544\uB798 \uC139\uC158\uC758 \uB2E8\uACC4\uB4E4\uC740 solana-program-bpf-template\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uB2F9\uC2E0\uC758 \uCEF4\uD4E8\uD130\uC5D0 Clone \uD558\uC138\uC694:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Runtime Testing and Debugging in editor

Open the file src/lib.rs

\uB2F9\uC2E0\uC740 \uC774 \uD504\uB85C\uADF8\uB7A8\uC774 \uB418\uAC8C \uB2E8\uC21C\uD558\uACE0 \uB2E8\uC9C0 Program entrypoint function\uC778 process_instruction\uC5D0 \uC758\uD574 \uC218\uC2E0\uB41C \uB0B4\uC6A9\uC744 \uAE30\uB85D\uD558\uB294 \uAC83\uC784\uC744 \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4.

  1. #[cfg(test)] \uC139\uC158\uC73C\uB85C \uAC00\uC11C Run Tests\uB97C \uD074\uB9AD\uD558\uC138\uC694. \uC774\uAC83\uC740 Program\uC744 \uBE4C\uB4DC\uD560 \uAC83\uC774\uACE0 async fn test_transaction() \uD14C\uC2A4\uD2B8\uB97C \uC2E4\uD589\uD560 \uAC83\uC785\uB2C8\uB2E4. \uB2F9\uC2E0\uC740 \uC544\uB798\uC5D0 vscode \uD130\uBBF8\uB110\uC5D0\uC11C \uB85C\uADF8 \uBA54\uC2DC\uC9C0\uB4E4\uC744 \uBCFC \uAC83\uC785\uB2C8\uB2E4.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.b7fb9288.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.b7310cda.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.b7fb9288.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.b7310cda.js
index f5481db0d..54d20a732 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.b7fb9288.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.b7310cda.js
@@ -1,4 +1,4 @@
-import{_ as t,r as i,o as r,c as o,a as e,b as a,F as l,e as p,d as s}from"./app.07ce7a66.js";const d={},u=p(`

Debuggen von Solana-Programmen

Es gibt eine Reihe von Optionen und unterst\xFCtzenden Tools zum Testen und Debuggen eines Solana-Programms.

Fakten

Fact Sheet

  • Die Kiste solana-program-test erm\xF6glicht die Verwendung von Bare Bones local runtime, wo Sie testen und debuggen k\xF6nnen Ihr Programm interaktiv (z. B. in vscode).
  • Die Kiste \u201Esolana-validator\u201C erm\xF6glicht die Verwendung der \u201Esolana-test-validator\u201C-Implementierung f\xFCr mehr robustere Tests, die auf einem local validator node stattfinden. Sie k\xF6nnen den Editor ausf\xFChren aber Haltepunkte in der Programm werden ignoriert.
  • Das CLI-Tool solana-test-validator f\xFChrt und l\xE4dt Ihr Programm und verarbeitet die Transaktionsausf\xFChrung Befehlszeilen-Rust-Anwendungen oder Javascript-/Typescript-Anwendungen, die web3 verwenden.
  • F\xFCr alle oben genannten Punkte wird die gro\xDFz\xFCgige Verwendung des msg!-Makros in Ihrem Programm zu Beginn und danach empfohlen. Entfernen Sie sie beim Testen und stellen Sie ein felsenfestes Verhalten sicher. Denken Sie daran, dass "msg!" Recheneinheiten verbraucht, die Ihr Programm schlie\xDFlich scheitern lassen kann, indem Sie die Budgetobergrenzen f\xFCr Compute Units erreichen.

Die Schritte in den folgenden Abschnitten verwenden die solana-program-bpf-template. Klonen Sie das auf Ihre Maschine:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as i,o as r,c as o,a as e,b as a,F as l,e as p,d as s}from"./app.d411e3b3.js";const d={},u=p(`

Debuggen von Solana-Programmen

Es gibt eine Reihe von Optionen und unterst\xFCtzenden Tools zum Testen und Debuggen eines Solana-Programms.

Fakten

Fact Sheet

  • Die Kiste solana-program-test erm\xF6glicht die Verwendung von Bare Bones local runtime, wo Sie testen und debuggen k\xF6nnen Ihr Programm interaktiv (z. B. in vscode).
  • Die Kiste \u201Esolana-validator\u201C erm\xF6glicht die Verwendung der \u201Esolana-test-validator\u201C-Implementierung f\xFCr mehr robustere Tests, die auf einem local validator node stattfinden. Sie k\xF6nnen den Editor ausf\xFChren aber Haltepunkte in der Programm werden ignoriert.
  • Das CLI-Tool solana-test-validator f\xFChrt und l\xE4dt Ihr Programm und verarbeitet die Transaktionsausf\xFChrung Befehlszeilen-Rust-Anwendungen oder Javascript-/Typescript-Anwendungen, die web3 verwenden.
  • F\xFCr alle oben genannten Punkte wird die gro\xDFz\xFCgige Verwendung des msg!-Makros in Ihrem Programm zu Beginn und danach empfohlen. Entfernen Sie sie beim Testen und stellen Sie ein felsenfestes Verhalten sicher. Denken Sie daran, dass "msg!" Recheneinheiten verbraucht, die Ihr Programm schlie\xDFlich scheitern lassen kann, indem Sie die Budgetobergrenzen f\xFCr Compute Units erreichen.

Die Schritte in den folgenden Abschnitten verwenden die solana-program-bpf-template. Klonen Sie das auf Ihre Maschine:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Laufzeittests und Debugging im Editor

\xD6ffnen Sie die Datei src/lib.rs

Sie werden sehen, dass das Programm ziemlich einfach ist und im Grunde nur die empfangenen Inhalte protokolliert die Programmeintrittspunktfunktion: process_instruction

  1. Gehen Sie zum Abschnitt \u201E#[cfg(test)]\u201C und klicken Sie auf \u201ETests ausf\xFChren\u201C. Dadurch wird das Programm erstellt und dann F\xFChren Sie den Test \u201Easync fn test_transaction()\u201C aus. Sie sehen die Protokollmeldungen (vereinfacht) im vscode-Terminal unten der Quelle.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.2a0d6ae2.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.be5d826a.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.2a0d6ae2.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.be5d826a.js
index 8d2e26337..92cbec8f1 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.2a0d6ae2.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.be5d826a.js
@@ -1,4 +1,4 @@
-import{_ as t,r as l,o as r,c as i,a,b as e,F as o,e as p,d as s}from"./app.07ce7a66.js";const c={},d=p(`

Debugging Solana Programs (Solana Programlar\u0131nda Hata Ay\u0131klama)

Bir Solana program\u0131n\u0131 test etmek ve hata ay\u0131klamak i\xE7in bir dizi se\xE7enek ve destekleyici ara\xE7 vard\u0131r.

Facts (\xD6zet Bilgiler)

:::Bilgi Tablosu

  • Crate solana-program-test, program\u0131n\u0131z\u0131 etkile\u015Fimli olarak test edebilece\u011Finiz ve hatalar\u0131n\u0131 ay\u0131klayabilece\u011Finiz (\xF6rn. vscode\u2019da) temel yerel \xE7al\u0131\u015Fma zaman\u0131n\u0131n kullan\u0131lmas\u0131n\u0131 sa\u011Flar.
  • Crate solana-validator, yerel bir validator node\u2019da ger\xE7ekle\u015Fen daha sa\u011Flam testler i\xE7in solana-test-validator uygulamas\u0131n\u0131n kullan\u0131lmas\u0131n\u0131 sa\u011Flar. D\xFCzenleyiciden \xE7al\u0131\u015Ft\u0131rabilirsiniz ancak programdaki kesme noktalar\u0131 yok say\u0131l\u0131r.
  • CLI arac\u0131 solana-test-validator program\u0131n\u0131z\u0131 \xE7al\u0131\u015Ft\u0131r\u0131r & y\xFCkler ve komut sat\u0131r\u0131 Rust uygulamalar\u0131ndan veya web3 kullanan Javascript/Typescript uygulamalar\u0131ndan i\u015Flem y\xFCr\xFCtmeyi sa\u011Flar.
  • Yukar\u0131daki t\xFCm durumlar i\xE7in, program\u0131n\u0131zda msg! makrosunun liberal bir \u015Fekilde kullan\u0131m\u0131 \xF6nerilir ve daha sonra test etme ve solid davran\u0131\u015F\u0131 sa\u011Flama gerekti\u011Finde bunlar\u0131 kald\u0131r\u0131n. Unutmay\u0131n ki msg! Compute Units t\xFCketir, bu nedenle Compute Unit b\xFCt\xE7esi s\u0131n\u0131rlar\u0131n\u0131 zorlayarak program\u0131n\u0131z\u0131 ba\u015Far\u0131s\u0131zl\u0131\u011Fa u\u011Fratabilir. :::

A\u015Fa\u011F\u0131daki b\xF6l\xFCmlerdeki ad\u0131mlar solana-program-bpf-template kullan\u0131r. Bunu makinenize klonlay\u0131n:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as l,o as r,c as i,a,b as e,F as o,e as p,d as s}from"./app.d411e3b3.js";const c={},d=p(`

Debugging Solana Programs (Solana Programlar\u0131nda Hata Ay\u0131klama)

Bir Solana program\u0131n\u0131 test etmek ve hata ay\u0131klamak i\xE7in bir dizi se\xE7enek ve destekleyici ara\xE7 vard\u0131r.

Facts (\xD6zet Bilgiler)

:::Bilgi Tablosu

  • Crate solana-program-test, program\u0131n\u0131z\u0131 etkile\u015Fimli olarak test edebilece\u011Finiz ve hatalar\u0131n\u0131 ay\u0131klayabilece\u011Finiz (\xF6rn. vscode\u2019da) temel yerel \xE7al\u0131\u015Fma zaman\u0131n\u0131n kullan\u0131lmas\u0131n\u0131 sa\u011Flar.
  • Crate solana-validator, yerel bir validator node\u2019da ger\xE7ekle\u015Fen daha sa\u011Flam testler i\xE7in solana-test-validator uygulamas\u0131n\u0131n kullan\u0131lmas\u0131n\u0131 sa\u011Flar. D\xFCzenleyiciden \xE7al\u0131\u015Ft\u0131rabilirsiniz ancak programdaki kesme noktalar\u0131 yok say\u0131l\u0131r.
  • CLI arac\u0131 solana-test-validator program\u0131n\u0131z\u0131 \xE7al\u0131\u015Ft\u0131r\u0131r & y\xFCkler ve komut sat\u0131r\u0131 Rust uygulamalar\u0131ndan veya web3 kullanan Javascript/Typescript uygulamalar\u0131ndan i\u015Flem y\xFCr\xFCtmeyi sa\u011Flar.
  • Yukar\u0131daki t\xFCm durumlar i\xE7in, program\u0131n\u0131zda msg! makrosunun liberal bir \u015Fekilde kullan\u0131m\u0131 \xF6nerilir ve daha sonra test etme ve solid davran\u0131\u015F\u0131 sa\u011Flama gerekti\u011Finde bunlar\u0131 kald\u0131r\u0131n. Unutmay\u0131n ki msg! Compute Units t\xFCketir, bu nedenle Compute Unit b\xFCt\xE7esi s\u0131n\u0131rlar\u0131n\u0131 zorlayarak program\u0131n\u0131z\u0131 ba\u015Far\u0131s\u0131zl\u0131\u011Fa u\u011Fratabilir. :::

A\u015Fa\u011F\u0131daki b\xF6l\xFCmlerdeki ad\u0131mlar solana-program-bpf-template kullan\u0131r. Bunu makinenize klonlay\u0131n:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Runtime Testing and Debugging in editor (Edit\xF6rde Runtime Test ve Hata Ay\u0131klama)

src/lib.rs dosyas\u0131n\u0131 a\xE7\u0131n

  1. #[cfg(test)] b\xF6l\xFCm\xFCne gidin ve Run Tests'e t\u0131klay\u0131n. Bu, program\u0131 olu\u015Fturacak ve ard\u0131ndan async fn test_transaction() testini y\xFCr\xFCtecektir. Kayna\u011F\u0131n alt\u0131ndaki vscode terminalinde g\xFCnl\xFCk mesajlar\u0131n\u0131 (basitle\u015Ftirilmi\u015F) g\xF6receksiniz.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.ff3a8325.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.c55c47bf.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.ff3a8325.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.c55c47bf.js
index ccb7b9e05..c6caf1898 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.ff3a8325.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.c55c47bf.js
@@ -1,4 +1,4 @@
-import{_ as n,r as t,o as r,c as p,a,b as s,F as i,e as c,d as o}from"./app.07ce7a66.js";const l={},d=c(`

Depurando Programas da Solana

H\xE1 v\xE1rias op\xE7\xF5es e ferramentas de suporte para testar e depurar um programa da Solana.

Fatos

Ficha Informativa

  • O crate solana-program-test permite o uso de um ambiente de execu\xE7\xE3o local b\xE1sico onde \xE9 poss\xEDvel testar e depurar seu programa de forma interativa (por exemplo, no vscode).
  • O crate solana-validator permite o uso da implementa\xE7\xE3o solana-test-validator para testes mais robustos que ocorrem em um n\xF3 validador local. Voc\xEA pode executar a partir do editor, mas os pontos de interrup\xE7\xE3o no programa s\xE3o ignorados.
  • A ferramenta de CLI solana-test-validator executa e carrega seu programa e processa a execu\xE7\xE3o de transa\xE7\xF5es a partir de aplicativos de linha de comando em Rust ou aplicativos Javascript/Typescript usando web3.
  • Para todos os casos acima, \xE9 recomendado o uso liberal da macro msg! em seu programa no in\xEDcio e, em seguida, remov\xEA-las \xE0 medida que voc\xEA testa e garante um comportamento s\xF3lido. Lembre-se de que msg! consome Unidades de Computa\xE7\xE3o que podem eventualmente fazer com que seu programa falhe atingindo os limites do or\xE7amento de Unidades de Computa\xE7\xE3o.

Os passos nas se\xE7\xF5es seguintes usam o solana-program-bpf-template. Clone-o em sua m\xE1quina:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as n,r as t,o as r,c as p,a,b as s,F as i,e as c,d as o}from"./app.d411e3b3.js";const l={},d=c(`

Depurando Programas da Solana

H\xE1 v\xE1rias op\xE7\xF5es e ferramentas de suporte para testar e depurar um programa da Solana.

Fatos

Ficha Informativa

  • O crate solana-program-test permite o uso de um ambiente de execu\xE7\xE3o local b\xE1sico onde \xE9 poss\xEDvel testar e depurar seu programa de forma interativa (por exemplo, no vscode).
  • O crate solana-validator permite o uso da implementa\xE7\xE3o solana-test-validator para testes mais robustos que ocorrem em um n\xF3 validador local. Voc\xEA pode executar a partir do editor, mas os pontos de interrup\xE7\xE3o no programa s\xE3o ignorados.
  • A ferramenta de CLI solana-test-validator executa e carrega seu programa e processa a execu\xE7\xE3o de transa\xE7\xF5es a partir de aplicativos de linha de comando em Rust ou aplicativos Javascript/Typescript usando web3.
  • Para todos os casos acima, \xE9 recomendado o uso liberal da macro msg! em seu programa no in\xEDcio e, em seguida, remov\xEA-las \xE0 medida que voc\xEA testa e garante um comportamento s\xF3lido. Lembre-se de que msg! consome Unidades de Computa\xE7\xE3o que podem eventualmente fazer com que seu programa falhe atingindo os limites do or\xE7amento de Unidades de Computa\xE7\xE3o.

Os passos nas se\xE7\xF5es seguintes usam o solana-program-bpf-template. Clone-o em sua m\xE1quina:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Testes de Tempo de Execu\xE7\xE3o e Depura\xE7\xE3o no Editor

Abra o arquivo src/lib.rs.

Voc\xEA ver\xE1 que o programa \xE9 bem simples e basicamente apenas registra o conte\xFAdo recebido pela fun\xE7\xE3o de ponto de entrada do programa: process_instruction.

  1. V\xE1 para a se\xE7\xE3o #[cfg(test)] e clique em Run Tests. Isso ir\xE1 compilar o programa e, em seguida, executar o teste async fn test_transaction(). Voc\xEA ver\xE1 as mensagens de log (simplificadas) no terminal do vscode abaixo da fonte.
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.f0229576.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.d0d47d71.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.f0229576.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.d0d47d71.js
index 5011485bd..b0f515e0b 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.f0229576.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.d0d47d71.js
@@ -1,4 +1,4 @@
-import{_ as e,r as c,o,c as i,a as n,b as s,F as r,e as l,d as t}from"./app.07ce7a66.js";const p={},h=l(`

So\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana

C\xF3 m\u1ED9t v\xE0i l\u1EF1a ch\u1ECDn v\xE0 c\xF4ng c\u1EE5 h\u1ED7 tr\u1EE3 cho vi\u1EC7c ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i m\u1ED9t ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana.

C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

  • Crate solana-program-test cho ph\xE9p t\u1EA1o n\xEAn m\u1ED9t m\xF4i tr\u01B0\u1EDDng ti\xEAu chu\u1EA9n local runtime \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh m\u1ED9t c\xE1ch tr\u1EF1c quan (v\xED d\u1EE5 nh\u01B0 trong vscode).
  • Crate solana-validator cho ph\xE9p s\u1EED d\u1EE5ng solana-test-validator \u0111\u1EC3 ch\u1EA1y c\xE1c b\u01B0\u1EDBc ki\u1EC3m th\u1EED m\u1ED9t c\xE1ch tin c\u1EADy tr\xEAn local validator node. B\u1EA1n c\xF3 th\u1EC3 ch\u1EA1y t\u1EEB tr\xECnh bi\xEAn t\u1EADp tuy nhi\xEAn c\xE1c \u0111i\u1EC3m d\u1EEBng trong ch\u01B0\u01A1ng tr\xECnh s\u1EBD b\u1ECB b\u1ECF qua.
  • C\xF4ng c\u1EE5 CLI solana-test-validator gi\xFAp kh\u1EDFi ch\u1EA1y v\xE0 t\u1EA3i Program c\u0169ng nh\u01B0 th\u1EF1c thi c\xE1c Transaction t\u1EEB Rust CLI ho\u1EB7c t\u1EEB web3js.
  • Trong t\u1EA5t c\u1EA3 c\xE1c tr\u01B0\u1EDDng h\u1EE3p tr\xEAn, vi\u1EC7c s\u1EED d\u1EE5ng macro msg! \u0111\u01B0\u1EE3c khuy\u1EBFn kh\xEDch t\u1EA1i th\u1EDDi \u0111i\u1EC3m ph\xE1t tri\u1EC3n ban \u0111\u1EA7u, tuy nhi\xEAn c\u1EA7n xo\xE1 ch\xFAng m\u1ED9t khi \u0111\xE3 ho\xE0n t\u1EA5t ki\u1EC3m th\u1EED. N\xEAn nh\u1EDB r\u1EB1ng msg! c\u0169ng ti\xEAu t\u1ED1n t\xE0i nguy\xEAn t\xEDnh to\xE1n hay c\xF2n g\u1ECDi l\xE0 Compute Units. Program c\u1EE7a b\u1EA1n c\xF3 th\u1EC3 b\u1ECB l\u1ED7i m\u1ED9t khi \u0111\u1EA1t \u0111\u1EBFn gi\u1EDBi h\u1EA1n tr\u1EA7n c\u1EE7a Compute Unit.

Nh\u1EEFng v\xED d\u1EE5 \u1EDF c\xE1c ph\u1EA7n ti\u1EBFp theo s\u1EBD s\u1EED d\u1EE5ng solana-program-bpf-template. Vui l\xF2ng t\u1EA3i v\u1EC1 m\xE1y b\u1EB1ng c\xE2u l\u1EC7nh:

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as e,r as c,o,c as i,a as n,b as s,F as r,e as l,d as t}from"./app.d411e3b3.js";const p={},h=l(`

So\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana

C\xF3 m\u1ED9t v\xE0i l\u1EF1a ch\u1ECDn v\xE0 c\xF4ng c\u1EE5 h\u1ED7 tr\u1EE3 cho vi\u1EC7c ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i m\u1ED9t ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana.

C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

  • Crate solana-program-test cho ph\xE9p t\u1EA1o n\xEAn m\u1ED9t m\xF4i tr\u01B0\u1EDDng ti\xEAu chu\u1EA9n local runtime \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i ch\u01B0\u01A1ng tr\xECnh m\u1ED9t c\xE1ch tr\u1EF1c quan (v\xED d\u1EE5 nh\u01B0 trong vscode).
  • Crate solana-validator cho ph\xE9p s\u1EED d\u1EE5ng solana-test-validator \u0111\u1EC3 ch\u1EA1y c\xE1c b\u01B0\u1EDBc ki\u1EC3m th\u1EED m\u1ED9t c\xE1ch tin c\u1EADy tr\xEAn local validator node. B\u1EA1n c\xF3 th\u1EC3 ch\u1EA1y t\u1EEB tr\xECnh bi\xEAn t\u1EADp tuy nhi\xEAn c\xE1c \u0111i\u1EC3m d\u1EEBng trong ch\u01B0\u01A1ng tr\xECnh s\u1EBD b\u1ECB b\u1ECF qua.
  • C\xF4ng c\u1EE5 CLI solana-test-validator gi\xFAp kh\u1EDFi ch\u1EA1y v\xE0 t\u1EA3i Program c\u0169ng nh\u01B0 th\u1EF1c thi c\xE1c Transaction t\u1EEB Rust CLI ho\u1EB7c t\u1EEB web3js.
  • Trong t\u1EA5t c\u1EA3 c\xE1c tr\u01B0\u1EDDng h\u1EE3p tr\xEAn, vi\u1EC7c s\u1EED d\u1EE5ng macro msg! \u0111\u01B0\u1EE3c khuy\u1EBFn kh\xEDch t\u1EA1i th\u1EDDi \u0111i\u1EC3m ph\xE1t tri\u1EC3n ban \u0111\u1EA7u, tuy nhi\xEAn c\u1EA7n xo\xE1 ch\xFAng m\u1ED9t khi \u0111\xE3 ho\xE0n t\u1EA5t ki\u1EC3m th\u1EED. N\xEAn nh\u1EDB r\u1EB1ng msg! c\u0169ng ti\xEAu t\u1ED1n t\xE0i nguy\xEAn t\xEDnh to\xE1n hay c\xF2n g\u1ECDi l\xE0 Compute Units. Program c\u1EE7a b\u1EA1n c\xF3 th\u1EC3 b\u1ECB l\u1ED7i m\u1ED9t khi \u0111\u1EA1t \u0111\u1EBFn gi\u1EDBi h\u1EA1n tr\u1EA7n c\u1EE7a Compute Unit.

Nh\u1EEFng v\xED d\u1EE5 \u1EDF c\xE1c ph\u1EA7n ti\u1EBFp theo s\u1EBD s\u1EED d\u1EE5ng solana-program-bpf-template. Vui l\xF2ng t\u1EA3i v\u1EC1 m\xE1y b\u1EB1ng c\xE2u l\u1EC7nh:

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

M\xF4i tr\u01B0\u1EDDng ki\u1EC3m th\u1EED v\xE0 so\xE1t l\u1ED7i trong tr\xECnh bi\xEAn t\u1EADp

M\u1EDF t\u1EC7p src/lib.rs

B\u1EA1n s\u1EBD th\u1EA5y ngay m\u1ED9t Program kh\xE1 \u0111\u01A1n gi\u1EA3n v\xE0 ch\u1EC9 in ra n\u1ED9i d\u1EE5ng nh\u1EADn \u0111\u01B0\u1EE3c t\u1EEB \u0111i\u1EC3m ti\u1EBFp nh\u1EADn ch\u1EC9 th\u1ECB: process_instruction

  1. V\xE0o m\u1EE5c #[cfg(test)] v\xE0 ch\u1ECDn Run Tests. N\xF3 s\u1EBD ch\u1EA1y tr\xECnh bi\xEAn d\u1ECBch sau d\xF3 th\u1EF1c thi b\xE0i ki\u1EC3m th\u1EED async fn test_transaction() ngay sau \u0111\xF3. B\u1EA1n s\u1EBD th\u1EA5y m\u1ED9t th\xF4ng b\xE1o \u0111\u01A1n gian in ra \u1EDF c\u1EEDa s\u1ED5 l\u1EC7nh (Terminal) c\u1EE7a vscode nh\u01B0 d\u01B0\u1EDBi:
running 1 test
diff --git a/docs/.vuepress/dist/assets/debugging-solana-programs.html.a9ad9801.js b/docs/.vuepress/dist/assets/debugging-solana-programs.html.f391ad32.js
similarity index 99%
rename from docs/.vuepress/dist/assets/debugging-solana-programs.html.a9ad9801.js
rename to docs/.vuepress/dist/assets/debugging-solana-programs.html.f391ad32.js
index 0da48ee10..68d1c5b00 100644
--- a/docs/.vuepress/dist/assets/debugging-solana-programs.html.a9ad9801.js
+++ b/docs/.vuepress/dist/assets/debugging-solana-programs.html.f391ad32.js
@@ -1,4 +1,4 @@
-import{_ as t,r as o,o as r,c as l,a as e,b as a,F as i,e as p,d as n}from"./app.07ce7a66.js";const c={},u=p(`

D\xE9bogage des Programmes Solana

Il existe un certain nombre d'options et d'outils de support pour tester et d\xE9boguer un programme Solana.

Faits

Fiche d'Informations

  • La crate solana-program-test permet l'utilisation d'\xE9l\xE9ments de base de local runtime o\xF9 vous pouvez tester et d\xE9boguer votre programme de mani\xE8re interactive (par exemple dans vscode).
  • La crate solana-validator permet d'utiliser l'impl\xE9mentation solana-test-validator pour des tests plus robustes qui se font sur un noeud validateur local. Vous pouvez ex\xE9cuter depuis l'\xE9diteur mais les points d'arr\xEAt dans le programme sont ignor\xE9s.
  • L'outil CLI solana-test-validator ex\xE9cute et charge votre programme et traite l'ex\xE9cution des transactions \xE0 partir d'applications Rust en ligne de commande ou d'applications Javascript/Typescript utilisant web3.
  • Pour tout ce qui pr\xE9c\xE8de, il est recommand\xE9 d'utiliser la macro msg! dans votre programme au d\xE9but, puis de la supprimer au fur et \xE0 mesure que vous testez et vous assurez d'un comportement s\xFBr. Rappelez-vous que msg! consomme des Unit\xE9s de Calcul qui peuvent \xE9ventuellement faire \xE9chouer votre programme en atteignant les plafonds du budget des Unit\xE9s de Calcul.

Les \xE9tapes des sections suivantes utilisent solana-program-bpf-template. Clonez-le sur votre machine :

git clone git@github.com:mvines/solana-bpf-program-template.git
+import{_ as t,r as o,o as r,c as l,a as e,b as a,F as i,e as p,d as n}from"./app.d411e3b3.js";const c={},u=p(`

D\xE9bogage des Programmes Solana

Il existe un certain nombre d'options et d'outils de support pour tester et d\xE9boguer un programme Solana.

Faits

Fiche d'Informations

  • La crate solana-program-test permet l'utilisation d'\xE9l\xE9ments de base de local runtime o\xF9 vous pouvez tester et d\xE9boguer votre programme de mani\xE8re interactive (par exemple dans vscode).
  • La crate solana-validator permet d'utiliser l'impl\xE9mentation solana-test-validator pour des tests plus robustes qui se font sur un noeud validateur local. Vous pouvez ex\xE9cuter depuis l'\xE9diteur mais les points d'arr\xEAt dans le programme sont ignor\xE9s.
  • L'outil CLI solana-test-validator ex\xE9cute et charge votre programme et traite l'ex\xE9cution des transactions \xE0 partir d'applications Rust en ligne de commande ou d'applications Javascript/Typescript utilisant web3.
  • Pour tout ce qui pr\xE9c\xE8de, il est recommand\xE9 d'utiliser la macro msg! dans votre programme au d\xE9but, puis de la supprimer au fur et \xE0 mesure que vous testez et vous assurez d'un comportement s\xFBr. Rappelez-vous que msg! consomme des Unit\xE9s de Calcul qui peuvent \xE9ventuellement faire \xE9chouer votre programme en atteignant les plafonds du budget des Unit\xE9s de Calcul.

Les \xE9tapes des sections suivantes utilisent solana-program-bpf-template. Clonez-le sur votre machine :

git clone git@github.com:mvines/solana-bpf-program-template.git
 cd solana-bpf-program-template
 code .
 

Tests d'Ex\xE9cution et D\xE9bogage dans l'\xE9diteur

Ouvrez le fichier src/lib.rs

Vous constaterez que le programme est assez simple et se contente d'enregistrer le contenu re\xE7u par la fonction d'entr\xE9e du programme : process_instruction

1.Allez dans la section #[cfg(test)] et cliquez sur Run Tests. Cela va compiler le programme et ensuite ex\xE9cuter le test async fn test_transaction(). Vous verrez les messages de log (simplifi\xE9s) dans le terminal vscode sous la source.

running 1 test
diff --git a/docs/.vuepress/dist/assets/distribution.html.e6e2641f.js b/docs/.vuepress/dist/assets/distribution.html.992824c3.js
similarity index 98%
rename from docs/.vuepress/dist/assets/distribution.html.e6e2641f.js
rename to docs/.vuepress/dist/assets/distribution.html.992824c3.js
index 278171993..415019d14 100644
--- a/docs/.vuepress/dist/assets/distribution.html.e6e2641f.js
+++ b/docs/.vuepress/dist/assets/distribution.html.992824c3.js
@@ -1 +1 @@
-import{_ as r,r as s,o as n,c as l,a as e,b as a,F as i,d as t}from"./app.07ce7a66.js";const h={},p=e("h1",{id:"distribution",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#distribution","aria-hidden":"true"},"#"),t(" Distribution")],-1),c=e("p",null,"Distribution of your game depends highly on the platform you are using. With Solana, there are game SDKs you can build for IOS, Android, Web and Native Windows or Mac. Using the Unity SDK you could even connect Nintendo Switch or XBox to Solana theoretically. Many game companies are pivoting to a mobile first approach because there are so many people with mobile phones in the world. Mobile comes with its own complications though, so you should pick what fits best to your game.",-1),d=e("p",null,"Solana has a distinct edge over other blockchain platforms due to its offering of a crypto-native mobile phone, named Saga, that comes equipped with an innovative dApps store. This store enables the distribution of crypto games without the limitations imposed by conventional app stores such as Google or Apple.",-1),u=e("h2",{id:"publishing-platforms",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#publishing-platforms","aria-hidden":"true"},"#"),t(" Publishing Platforms")],-1),_=e("p",null,"Platforms where you can host your games",-1),f=e("thead",null,[e("tr",null,[e("th",null,"Platform"),e("th",null,"Description")])],-1),m={href:"https://www.fractal.is/",target:"_blank",rel:"noopener noreferrer"},g=t("Fractal"),b=e("td",null,"A game publishing platform that supports Solana and Ethereum. They also have their own wallet and account handling and there is an SDK for high scores and tournaments.",-1),y={href:"https://elixir.app/",target:"_blank",rel:"noopener noreferrer"},w=t("Elixir"),k=e("td",null,"Platform for web3 games that also offers a PC launcher",-1),v=e("td",null,"Self Hosting",-1),x=t("Just host your game yourself. For example using "),S={href:"https://vercel.com/",target:"_blank",rel:"noopener noreferrer"},A=t("Vercel"),T=t(" which can be easily setup so that a new version get deployed as soon as you push to your repository. Other options are "),F={href:"https://pages.github.com/",target:"_blank",rel:"noopener noreferrer"},N=t("github pages"),D=t(" or "),P={href:"https://firebase.google.com/docs/hosting",target:"_blank",rel:"noopener noreferrer"},E=t("Google Firebase"),B={href:"https://github.com/solana-mobile/dapp-publishing/blob/main/README.md",target:"_blank",rel:"noopener noreferrer"},G=t("Solana mobile DApp Store"),K=e("td",null,"The Solana alternative to Google Play and the Apple App Store. A crypto first variant of a dApp store, which is open source free for everyone to use.",-1),M={href:"https://www.apple.com/de/app-store/",target:"_blank",rel:"noopener noreferrer"},V=t("Apple App Store"),I=e("td",null,"The Apple app store has a high reach and is trusted by its customers. The entrance barrier for crypto games is high though. The rules are very strict for everything that tries to circumvent the fees that Apple takes for in app purchases. A soon as an NFT provides benefits for the player for example Apple requires you for example to have them purchased via their in app purchase system.",-1),U={href:"https://play.google.com/store/games",target:"_blank",rel:"noopener noreferrer"},W=t("Google Play Store"),q=e("td",null,"Google is much more crypto friendly and games with NFTs and wallet deep links for example have had a track record of being approved for the official play store.",-1),C={href:"https://www.backpack.app/",target:"_blank",rel:"noopener noreferrer"},L=t("xNFT Backpack"),O=e("td",null,"Backpack is a Solana wallet which allows you to release apps as xNFTs. They appear in the users wallet as soon as they purchase them as applications. The Unity SDK has a xNFT export and any other web app can be published as xNFT as well.",-1),H=e("tr",null,[e("td"),e("td")],-1);function J(R,X){const o=s("ExternalLinkIcon");return n(),l(i,null,[p,c,d,u,_,e("table",null,[f,e("tbody",null,[e("tr",null,[e("td",null,[e("a",m,[g,a(o)])]),b]),e("tr",null,[e("td",null,[e("a",y,[w,a(o)])]),k]),e("tr",null,[v,e("td",null,[x,e("a",S,[A,a(o)]),T,e("a",F,[N,a(o)]),D,e("a",P,[E,a(o)])])]),e("tr",null,[e("td",null,[e("a",B,[G,a(o)])]),K]),e("tr",null,[e("td",null,[e("a",M,[V,a(o)])]),I]),e("tr",null,[e("td",null,[e("a",U,[W,a(o)])]),q]),e("tr",null,[e("td",null,[e("a",C,[L,a(o)])]),O]),H])])],64)}var z=r(h,[["render",J]]);export{z as default};
+import{_ as r,r as s,o as n,c as l,a as e,b as a,F as i,d as t}from"./app.d411e3b3.js";const h={},p=e("h1",{id:"distribution",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#distribution","aria-hidden":"true"},"#"),t(" Distribution")],-1),c=e("p",null,"Distribution of your game depends highly on the platform you are using. With Solana, there are game SDKs you can build for IOS, Android, Web and Native Windows or Mac. Using the Unity SDK you could even connect Nintendo Switch or XBox to Solana theoretically. Many game companies are pivoting to a mobile first approach because there are so many people with mobile phones in the world. Mobile comes with its own complications though, so you should pick what fits best to your game.",-1),d=e("p",null,"Solana has a distinct edge over other blockchain platforms due to its offering of a crypto-native mobile phone, named Saga, that comes equipped with an innovative dApps store. This store enables the distribution of crypto games without the limitations imposed by conventional app stores such as Google or Apple.",-1),u=e("h2",{id:"publishing-platforms",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#publishing-platforms","aria-hidden":"true"},"#"),t(" Publishing Platforms")],-1),_=e("p",null,"Platforms where you can host your games",-1),f=e("thead",null,[e("tr",null,[e("th",null,"Platform"),e("th",null,"Description")])],-1),m={href:"https://www.fractal.is/",target:"_blank",rel:"noopener noreferrer"},g=t("Fractal"),b=e("td",null,"A game publishing platform that supports Solana and Ethereum. They also have their own wallet and account handling and there is an SDK for high scores and tournaments.",-1),y={href:"https://elixir.app/",target:"_blank",rel:"noopener noreferrer"},w=t("Elixir"),k=e("td",null,"Platform for web3 games that also offers a PC launcher",-1),v=e("td",null,"Self Hosting",-1),x=t("Just host your game yourself. For example using "),S={href:"https://vercel.com/",target:"_blank",rel:"noopener noreferrer"},A=t("Vercel"),T=t(" which can be easily setup so that a new version get deployed as soon as you push to your repository. Other options are "),F={href:"https://pages.github.com/",target:"_blank",rel:"noopener noreferrer"},N=t("github pages"),D=t(" or "),P={href:"https://firebase.google.com/docs/hosting",target:"_blank",rel:"noopener noreferrer"},E=t("Google Firebase"),B={href:"https://github.com/solana-mobile/dapp-publishing/blob/main/README.md",target:"_blank",rel:"noopener noreferrer"},G=t("Solana mobile DApp Store"),K=e("td",null,"The Solana alternative to Google Play and the Apple App Store. A crypto first variant of a dApp store, which is open source free for everyone to use.",-1),M={href:"https://www.apple.com/de/app-store/",target:"_blank",rel:"noopener noreferrer"},V=t("Apple App Store"),I=e("td",null,"The Apple app store has a high reach and is trusted by its customers. The entrance barrier for crypto games is high though. The rules are very strict for everything that tries to circumvent the fees that Apple takes for in app purchases. A soon as an NFT provides benefits for the player for example Apple requires you for example to have them purchased via their in app purchase system.",-1),U={href:"https://play.google.com/store/games",target:"_blank",rel:"noopener noreferrer"},W=t("Google Play Store"),q=e("td",null,"Google is much more crypto friendly and games with NFTs and wallet deep links for example have had a track record of being approved for the official play store.",-1),C={href:"https://www.backpack.app/",target:"_blank",rel:"noopener noreferrer"},L=t("xNFT Backpack"),O=e("td",null,"Backpack is a Solana wallet which allows you to release apps as xNFTs. They appear in the users wallet as soon as they purchase them as applications. The Unity SDK has a xNFT export and any other web app can be published as xNFT as well.",-1),H=e("tr",null,[e("td"),e("td")],-1);function J(R,X){const o=s("ExternalLinkIcon");return n(),l(i,null,[p,c,d,u,_,e("table",null,[f,e("tbody",null,[e("tr",null,[e("td",null,[e("a",m,[g,a(o)])]),b]),e("tr",null,[e("td",null,[e("a",y,[w,a(o)])]),k]),e("tr",null,[v,e("td",null,[x,e("a",S,[A,a(o)]),T,e("a",F,[N,a(o)]),D,e("a",P,[E,a(o)])])]),e("tr",null,[e("td",null,[e("a",B,[G,a(o)])]),K]),e("tr",null,[e("td",null,[e("a",M,[V,a(o)])]),I]),e("tr",null,[e("td",null,[e("a",U,[W,a(o)])]),q]),e("tr",null,[e("td",null,[e("a",C,[L,a(o)])]),O]),H])])],64)}var z=r(h,[["render",J]]);export{z as default};
diff --git a/docs/.vuepress/dist/assets/distribution.html.ebcec652.js b/docs/.vuepress/dist/assets/distribution.html.c5b39f53.js
similarity index 98%
rename from docs/.vuepress/dist/assets/distribution.html.ebcec652.js
rename to docs/.vuepress/dist/assets/distribution.html.c5b39f53.js
index 536113350..b71b82239 100644
--- a/docs/.vuepress/dist/assets/distribution.html.ebcec652.js
+++ b/docs/.vuepress/dist/assets/distribution.html.c5b39f53.js
@@ -1 +1 @@
-import{_ as r,r as s,o as l,c as a,a as e,b as n,F as i,d as t}from"./app.07ce7a66.js";const u={},p=e("h1",{id:"distribution",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#distribution","aria-hidden":"true"},"#"),t(" Distribution")],-1),d=e("p",null,"La distribution de votre jeu d\xE9pend fortement de la plateforme que vous utilisez. Avec Solana, il existe des SDK de jeux que vous pouvez cr\xE9er pour IOS, Android, Web, Windows ou Mac. En utilisant le SDK Unity, vous pourriez m\xEAme, en th\xE9orie, connecter une Nintendo Switch ou une Xbox \xE0 Solana. De nombreuses soci\xE9t\xE9s de jeux adoptent une strat\xE9gie ax\xE9e sur le mobile puisque de nombreuses personnes poss\xE8dent un t\xE9l\xE9phone portable dans le monde. D\xE9velopper sur mobile s'accompagne toutefois de ses propres complications, c'est pourquoi vous devez choisir ce qui convient le mieux pour votre jeu.",-1),c=e("p",null,"Solana a une longueur d'avance sur les autres blockchains gr\xE2ce \xE0 son t\xE9l\xE9phone portable crypto-natif, appel\xE9 Saga, qui est \xE9quip\xE9 d'un dApps Store innovant. Celui-ci permet la distribution de jeux crypto sans les limitations impos\xE9es par les app stores traditionnels tels que Google ou Apple.",-1),_=e("h2",{id:"plateformes-de-publication",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#plateformes-de-publication","aria-hidden":"true"},"#"),t(" Plateformes de publication")],-1),h=e("p",null,"Plateformes o\xF9 vous pouvez h\xE9berger vos jeux",-1),m=e("thead",null,[e("tr",null,[e("th",null,"Plateforme"),e("th",null,"Description")])],-1),b={href:"https://www.fractal.is/",target:"_blank",rel:"noopener noreferrer"},f=t("Fractal"),g=e("td",null,"Une plateforme de publication de jeux qui prend en charge Solana et Ethereum. Ils disposent \xE9galement de leur propre portefeuille et de leur propre gestion de compte, ainsi que d'un SDK qui permet de g\xE9rer les meilleurs scores et les tournois.",-1),v={href:"https://elixir.app/",target:"_blank",rel:"noopener noreferrer"},x=t("Elixir"),k=e("td",null,"Plateforme de jeux web3 offrant \xE9galement un launcher pour PC",-1),S=e("td",null,"Auto-h\xE9bergement",-1),q=t("H\xE9bergez vous-m\xEAme votre jeu. Par exemple en utilisant "),A={href:"https://vercel.com/",target:"_blank",rel:"noopener noreferrer"},j=t("Vercel"),y=t(" qui peut \xEAtre facilement configur\xE9 pour qu'une nouvelle version soit d\xE9ploy\xE9e d\xE8s que vous l'envoyez \xE0 votre r\xE9pertoire GitHub. D'autres options sont les "),w={href:"https://pages.github.com/",target:"_blank",rel:"noopener noreferrer"},D=t("pages GitHub"),F=t(" ou "),N={href:"https://firebase.google.com/docs/hosting",target:"_blank",rel:"noopener noreferrer"},P=t("Google Firebase"),L={href:"https://github.com/solana-mobile/dapp-publishing/blob/main/README.md",target:"_blank",rel:"noopener noreferrer"},z=t("DApp Store de Solana mobile"),E=e("td",null,"L'alternative Solana \xE0 Google Play et \xE0 l'App Store d'Apple. Une premi\xE8re version crypto d'un dApp store, open source et libre d'utilisation par tous.",-1),G={href:"https://www.apple.com/de/app-store/",target:"_blank",rel:"noopener noreferrer"},T=t("App Store d'Apple"),B=e("td",null,"L'App Store d'Apple a une grande port\xE9e et jouit de la confiance de ses clients. La barri\xE8re d'entr\xE9e pour les jeux crypto est toutefois \xE9lev\xE9e. Les r\xE8gles sont tr\xE8s strictes pour tout ce qui tente de contourner les frais pr\xE9lev\xE9s par Apple pour les achats d'applications. Par exemple, d\xE8s qu'un NFT offre des avantages au joueur, Apple exige que vous l'achetiez via son syst\xE8me d'achat d'applications.",-1),I={href:"https://play.google.com/store/games",target:"_blank",rel:"noopener noreferrer"},K=t("Google Play Store"),U=e("td",null,[t("Google est beaucoup plus favorable aux cryptomonnaies et aux jeux int\xE9grant, par exemple, des NFT et des "),e("em",null,"Deep Links"),t(" vers des portefeuilles. Ainsi des jeux ont d\xE9j\xE0 \xE9t\xE9 approuv\xE9s par le Play Store.")],-1),V={href:"https://www.backpack.app/",target:"_blank",rel:"noopener noreferrer"},C=t("xNFT Backpack"),H=e("td",null,"Backpack est un portefeuille Solana qui vous permet de publier des applications sous forme de xNFTs. Ils apparaissent dans le portefeuille des utilisateurs d\xE8s qu'ils les ach\xE8tent en tant qu'applications. Le SDK Unity poss\xE8de un export vers xNFT et toute autre application web peut \xEAtre \xE9galement publi\xE9e en xNFT.",-1),M=e("tr",null,[e("td"),e("td")],-1);function W(O,R){const o=s("ExternalLinkIcon");return l(),a(i,null,[p,d,c,_,h,e("table",null,[m,e("tbody",null,[e("tr",null,[e("td",null,[e("a",b,[f,n(o)])]),g]),e("tr",null,[e("td",null,[e("a",v,[x,n(o)])]),k]),e("tr",null,[S,e("td",null,[q,e("a",A,[j,n(o)]),y,e("a",w,[D,n(o)]),F,e("a",N,[P,n(o)])])]),e("tr",null,[e("td",null,[e("a",L,[z,n(o)])]),E]),e("tr",null,[e("td",null,[e("a",G,[T,n(o)])]),B]),e("tr",null,[e("td",null,[e("a",I,[K,n(o)])]),U]),e("tr",null,[e("td",null,[e("a",V,[C,n(o)])]),H]),M])])],64)}var J=r(u,[["render",W]]);export{J as default};
+import{_ as r,r as s,o as l,c as a,a as e,b as n,F as i,d as t}from"./app.d411e3b3.js";const u={},p=e("h1",{id:"distribution",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#distribution","aria-hidden":"true"},"#"),t(" Distribution")],-1),d=e("p",null,"La distribution de votre jeu d\xE9pend fortement de la plateforme que vous utilisez. Avec Solana, il existe des SDK de jeux que vous pouvez cr\xE9er pour IOS, Android, Web, Windows ou Mac. En utilisant le SDK Unity, vous pourriez m\xEAme, en th\xE9orie, connecter une Nintendo Switch ou une Xbox \xE0 Solana. De nombreuses soci\xE9t\xE9s de jeux adoptent une strat\xE9gie ax\xE9e sur le mobile puisque de nombreuses personnes poss\xE8dent un t\xE9l\xE9phone portable dans le monde. D\xE9velopper sur mobile s'accompagne toutefois de ses propres complications, c'est pourquoi vous devez choisir ce qui convient le mieux pour votre jeu.",-1),c=e("p",null,"Solana a une longueur d'avance sur les autres blockchains gr\xE2ce \xE0 son t\xE9l\xE9phone portable crypto-natif, appel\xE9 Saga, qui est \xE9quip\xE9 d'un dApps Store innovant. Celui-ci permet la distribution de jeux crypto sans les limitations impos\xE9es par les app stores traditionnels tels que Google ou Apple.",-1),_=e("h2",{id:"plateformes-de-publication",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#plateformes-de-publication","aria-hidden":"true"},"#"),t(" Plateformes de publication")],-1),h=e("p",null,"Plateformes o\xF9 vous pouvez h\xE9berger vos jeux",-1),m=e("thead",null,[e("tr",null,[e("th",null,"Plateforme"),e("th",null,"Description")])],-1),b={href:"https://www.fractal.is/",target:"_blank",rel:"noopener noreferrer"},f=t("Fractal"),g=e("td",null,"Une plateforme de publication de jeux qui prend en charge Solana et Ethereum. Ils disposent \xE9galement de leur propre portefeuille et de leur propre gestion de compte, ainsi que d'un SDK qui permet de g\xE9rer les meilleurs scores et les tournois.",-1),v={href:"https://elixir.app/",target:"_blank",rel:"noopener noreferrer"},x=t("Elixir"),k=e("td",null,"Plateforme de jeux web3 offrant \xE9galement un launcher pour PC",-1),S=e("td",null,"Auto-h\xE9bergement",-1),q=t("H\xE9bergez vous-m\xEAme votre jeu. Par exemple en utilisant "),A={href:"https://vercel.com/",target:"_blank",rel:"noopener noreferrer"},j=t("Vercel"),y=t(" qui peut \xEAtre facilement configur\xE9 pour qu'une nouvelle version soit d\xE9ploy\xE9e d\xE8s que vous l'envoyez \xE0 votre r\xE9pertoire GitHub. D'autres options sont les "),w={href:"https://pages.github.com/",target:"_blank",rel:"noopener noreferrer"},D=t("pages GitHub"),F=t(" ou "),N={href:"https://firebase.google.com/docs/hosting",target:"_blank",rel:"noopener noreferrer"},P=t("Google Firebase"),L={href:"https://github.com/solana-mobile/dapp-publishing/blob/main/README.md",target:"_blank",rel:"noopener noreferrer"},z=t("DApp Store de Solana mobile"),E=e("td",null,"L'alternative Solana \xE0 Google Play et \xE0 l'App Store d'Apple. Une premi\xE8re version crypto d'un dApp store, open source et libre d'utilisation par tous.",-1),G={href:"https://www.apple.com/de/app-store/",target:"_blank",rel:"noopener noreferrer"},T=t("App Store d'Apple"),B=e("td",null,"L'App Store d'Apple a une grande port\xE9e et jouit de la confiance de ses clients. La barri\xE8re d'entr\xE9e pour les jeux crypto est toutefois \xE9lev\xE9e. Les r\xE8gles sont tr\xE8s strictes pour tout ce qui tente de contourner les frais pr\xE9lev\xE9s par Apple pour les achats d'applications. Par exemple, d\xE8s qu'un NFT offre des avantages au joueur, Apple exige que vous l'achetiez via son syst\xE8me d'achat d'applications.",-1),I={href:"https://play.google.com/store/games",target:"_blank",rel:"noopener noreferrer"},K=t("Google Play Store"),U=e("td",null,[t("Google est beaucoup plus favorable aux cryptomonnaies et aux jeux int\xE9grant, par exemple, des NFT et des "),e("em",null,"Deep Links"),t(" vers des portefeuilles. Ainsi des jeux ont d\xE9j\xE0 \xE9t\xE9 approuv\xE9s par le Play Store.")],-1),V={href:"https://www.backpack.app/",target:"_blank",rel:"noopener noreferrer"},C=t("xNFT Backpack"),H=e("td",null,"Backpack est un portefeuille Solana qui vous permet de publier des applications sous forme de xNFTs. Ils apparaissent dans le portefeuille des utilisateurs d\xE8s qu'ils les ach\xE8tent en tant qu'applications. Le SDK Unity poss\xE8de un export vers xNFT et toute autre application web peut \xEAtre \xE9galement publi\xE9e en xNFT.",-1),M=e("tr",null,[e("td"),e("td")],-1);function W(O,R){const o=s("ExternalLinkIcon");return l(),a(i,null,[p,d,c,_,h,e("table",null,[m,e("tbody",null,[e("tr",null,[e("td",null,[e("a",b,[f,n(o)])]),g]),e("tr",null,[e("td",null,[e("a",v,[x,n(o)])]),k]),e("tr",null,[S,e("td",null,[q,e("a",A,[j,n(o)]),y,e("a",w,[D,n(o)]),F,e("a",N,[P,n(o)])])]),e("tr",null,[e("td",null,[e("a",L,[z,n(o)])]),E]),e("tr",null,[e("td",null,[e("a",G,[T,n(o)])]),B]),e("tr",null,[e("td",null,[e("a",I,[K,n(o)])]),U]),e("tr",null,[e("td",null,[e("a",V,[C,n(o)])]),H]),M])])],64)}var J=r(u,[["render",W]]);export{J as default};
diff --git a/docs/.vuepress/dist/assets/distribution.html.1a2e0c57.js b/docs/.vuepress/dist/assets/distribution.html.fd97f27d.js
similarity index 98%
rename from docs/.vuepress/dist/assets/distribution.html.1a2e0c57.js
rename to docs/.vuepress/dist/assets/distribution.html.fd97f27d.js
index 497a4df20..269b115ac 100644
--- a/docs/.vuepress/dist/assets/distribution.html.1a2e0c57.js
+++ b/docs/.vuepress/dist/assets/distribution.html.fd97f27d.js
@@ -1 +1 @@
-import{_ as n,r,o as s,c as l,a,b as t,F as i,d as e}from"./app.07ce7a66.js";const h={},p=a("h1",{id:"pamamahagi",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#pamamahagi","aria-hidden":"true"},"#"),e(" Pamamahagi")],-1),g=a("p",null,"Ang pamamahagi ng iyong laro ay lubos na nakadepende sa platform na iyong ginagamit. Sa Solana, may mga game SDK na maaari mong buuin para sa IOS, Android, Web at Native Windows o Mac. Gamit ang Unity SDK maaari mo ring ikonekta ang Nintendo Switch o XBox sa Solana ayon sa teorya. Maraming mga kumpanya ng laro ang umiikot sa isang mobile first approach dahil napakaraming tao ang may mga mobile phone sa mundo. Ang mobile ay may sarili nitong mga komplikasyon, kaya dapat mong piliin kung ano ang pinakaangkop sa iyong laro.",-1),c=a("p",null,"Ang Solana ay may natatanging kalamangan sa iba pang mga blockchain platform dahil sa pag-aalok nito ng isang crypto-native na mobile phone, na pinangalanang Saga, na nilagyan ng isang makabagong dApps store. Ang tindahang ito ay nagbibigay-daan sa pamamahagi ng mga larong crypto nang walang mga limitasyong ipinataw ng mga kumbensyonal na tindahan ng app gaya ng Google o Apple.",-1),d=a("h2",{id:"mga-platform-sa-pag-publish",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#mga-platform-sa-pag-publish","aria-hidden":"true"},"#"),e(" Mga Platform sa Pag-publish")],-1),m=a("p",null,"Mga platform kung saan maaari mong i-host ang iyong mga laro",-1),_=a("thead",null,[a("tr",null,[a("th",null,"Platform"),a("th",null,"Description")])],-1),u={href:"https://www.fractal.is/",target:"_blank",rel:"noopener noreferrer"},f=e("Fractal"),y=a("td",null,"A game publishing platform that supports Solana and Ethereum. They also have their own wallet and account handling and there is an SDK for high scores and tournaments.",-1),b={href:"https://elixir.app/",target:"_blank",rel:"noopener noreferrer"},k=e("Elixir"),w=a("td",null,"Platform for web3 games that also offers a PC launcher",-1),x=a("td",null,"Self Hosting",-1),A=e("Just host your game yourself. For example using "),S={href:"https://vercel.com/",target:"_blank",rel:"noopener noreferrer"},v=e("Vercel"),T=e(" which can be easily setup so that a new version get deployed as soon as you push to your repository. Other options are "),F={href:"https://pages.github.com/",target:"_blank",rel:"noopener noreferrer"},N=e("github pages"),P=e(" or "),D={href:"https://firebase.google.com/docs/hosting",target:"_blank",rel:"noopener noreferrer"},E=e("Google Firebase"),B={href:"https://github.com/solana-mobile/dapp-publishing/blob/main/README.md",target:"_blank",rel:"noopener noreferrer"},G=e("Solana mobile DApp Store"),M=a("td",null,"The Solana alternative to Google Play and the Apple App Store. A crypto first variant of a dApp store, which is open source free for everyone to use.",-1),K={href:"https://www.apple.com/de/app-store/",target:"_blank",rel:"noopener noreferrer"},V=e("Apple App Store"),I=a("td",null,"The Apple app store has a high reach and is trusted by its customers. The entrance barrier for crypto games is high though. The rules are very strict for everything that tries to circumvent the fees that Apple takes for in app purchases. A soon as an NFT provides benefits for the player for example Apple requires you for example to have them purchased via their in app purchase system.",-1),C={href:"https://play.google.com/store/games",target:"_blank",rel:"noopener noreferrer"},L=e("Google Play Store"),O=a("td",null,"Google is much more crypto friendly and games with NFTs and wallet deep links for example have had a track record of being approved for the official play store.",-1),U={href:"https://www.backpack.app/",target:"_blank",rel:"noopener noreferrer"},W=e("xNFT Backpack"),q=a("td",null,"Backpack is a Solana wallet which allows you to release apps as xNFTs. They appear in the users wallet as soon as they purchase them as applications. The Unity SDK has a xNFT export and any other web app can be published as xNFT as well.",-1),H=a("tr",null,[a("td"),a("td")],-1);function J(R,X){const o=r("ExternalLinkIcon");return s(),l(i,null,[p,g,c,d,m,a("table",null,[_,a("tbody",null,[a("tr",null,[a("td",null,[a("a",u,[f,t(o)])]),y]),a("tr",null,[a("td",null,[a("a",b,[k,t(o)])]),w]),a("tr",null,[x,a("td",null,[A,a("a",S,[v,t(o)]),T,a("a",F,[N,t(o)]),P,a("a",D,[E,t(o)])])]),a("tr",null,[a("td",null,[a("a",B,[G,t(o)])]),M]),a("tr",null,[a("td",null,[a("a",K,[V,t(o)])]),I]),a("tr",null,[a("td",null,[a("a",C,[L,t(o)])]),O]),a("tr",null,[a("td",null,[a("a",U,[W,t(o)])]),q]),H])])],64)}var z=n(h,[["render",J]]);export{z as default};
+import{_ as n,r,o as s,c as l,a,b as t,F as i,d as e}from"./app.d411e3b3.js";const h={},p=a("h1",{id:"pamamahagi",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#pamamahagi","aria-hidden":"true"},"#"),e(" Pamamahagi")],-1),g=a("p",null,"Ang pamamahagi ng iyong laro ay lubos na nakadepende sa platform na iyong ginagamit. Sa Solana, may mga game SDK na maaari mong buuin para sa IOS, Android, Web at Native Windows o Mac. Gamit ang Unity SDK maaari mo ring ikonekta ang Nintendo Switch o XBox sa Solana ayon sa teorya. Maraming mga kumpanya ng laro ang umiikot sa isang mobile first approach dahil napakaraming tao ang may mga mobile phone sa mundo. Ang mobile ay may sarili nitong mga komplikasyon, kaya dapat mong piliin kung ano ang pinakaangkop sa iyong laro.",-1),c=a("p",null,"Ang Solana ay may natatanging kalamangan sa iba pang mga blockchain platform dahil sa pag-aalok nito ng isang crypto-native na mobile phone, na pinangalanang Saga, na nilagyan ng isang makabagong dApps store. Ang tindahang ito ay nagbibigay-daan sa pamamahagi ng mga larong crypto nang walang mga limitasyong ipinataw ng mga kumbensyonal na tindahan ng app gaya ng Google o Apple.",-1),d=a("h2",{id:"mga-platform-sa-pag-publish",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#mga-platform-sa-pag-publish","aria-hidden":"true"},"#"),e(" Mga Platform sa Pag-publish")],-1),m=a("p",null,"Mga platform kung saan maaari mong i-host ang iyong mga laro",-1),_=a("thead",null,[a("tr",null,[a("th",null,"Platform"),a("th",null,"Description")])],-1),u={href:"https://www.fractal.is/",target:"_blank",rel:"noopener noreferrer"},f=e("Fractal"),y=a("td",null,"A game publishing platform that supports Solana and Ethereum. They also have their own wallet and account handling and there is an SDK for high scores and tournaments.",-1),b={href:"https://elixir.app/",target:"_blank",rel:"noopener noreferrer"},k=e("Elixir"),w=a("td",null,"Platform for web3 games that also offers a PC launcher",-1),x=a("td",null,"Self Hosting",-1),A=e("Just host your game yourself. For example using "),S={href:"https://vercel.com/",target:"_blank",rel:"noopener noreferrer"},v=e("Vercel"),T=e(" which can be easily setup so that a new version get deployed as soon as you push to your repository. Other options are "),F={href:"https://pages.github.com/",target:"_blank",rel:"noopener noreferrer"},N=e("github pages"),P=e(" or "),D={href:"https://firebase.google.com/docs/hosting",target:"_blank",rel:"noopener noreferrer"},E=e("Google Firebase"),B={href:"https://github.com/solana-mobile/dapp-publishing/blob/main/README.md",target:"_blank",rel:"noopener noreferrer"},G=e("Solana mobile DApp Store"),M=a("td",null,"The Solana alternative to Google Play and the Apple App Store. A crypto first variant of a dApp store, which is open source free for everyone to use.",-1),K={href:"https://www.apple.com/de/app-store/",target:"_blank",rel:"noopener noreferrer"},V=e("Apple App Store"),I=a("td",null,"The Apple app store has a high reach and is trusted by its customers. The entrance barrier for crypto games is high though. The rules are very strict for everything that tries to circumvent the fees that Apple takes for in app purchases. A soon as an NFT provides benefits for the player for example Apple requires you for example to have them purchased via their in app purchase system.",-1),C={href:"https://play.google.com/store/games",target:"_blank",rel:"noopener noreferrer"},L=e("Google Play Store"),O=a("td",null,"Google is much more crypto friendly and games with NFTs and wallet deep links for example have had a track record of being approved for the official play store.",-1),U={href:"https://www.backpack.app/",target:"_blank",rel:"noopener noreferrer"},W=e("xNFT Backpack"),q=a("td",null,"Backpack is a Solana wallet which allows you to release apps as xNFTs. They appear in the users wallet as soon as they purchase them as applications. The Unity SDK has a xNFT export and any other web app can be published as xNFT as well.",-1),H=a("tr",null,[a("td"),a("td")],-1);function J(R,X){const o=r("ExternalLinkIcon");return s(),l(i,null,[p,g,c,d,m,a("table",null,[_,a("tbody",null,[a("tr",null,[a("td",null,[a("a",u,[f,t(o)])]),y]),a("tr",null,[a("td",null,[a("a",b,[k,t(o)])]),w]),a("tr",null,[x,a("td",null,[A,a("a",S,[v,t(o)]),T,a("a",F,[N,t(o)]),P,a("a",D,[E,t(o)])])]),a("tr",null,[a("td",null,[a("a",B,[G,t(o)])]),M]),a("tr",null,[a("td",null,[a("a",K,[V,t(o)])]),I]),a("tr",null,[a("td",null,[a("a",C,[L,t(o)])]),O]),a("tr",null,[a("td",null,[a("a",U,[W,t(o)])]),q]),H])])],64)}var z=n(h,[["render",J]]);export{z as default};
diff --git a/docs/.vuepress/dist/assets/energy-system.html.446d0efc.js b/docs/.vuepress/dist/assets/energy-system.html.311556bd.js
similarity index 99%
rename from docs/.vuepress/dist/assets/energy-system.html.446d0efc.js
rename to docs/.vuepress/dist/assets/energy-system.html.311556bd.js
index 9575da060..23490993c 100644
--- a/docs/.vuepress/dist/assets/energy-system.html.446d0efc.js
+++ b/docs/.vuepress/dist/assets/energy-system.html.311556bd.js
@@ -1,4 +1,4 @@
-import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as a,e as t}from"./app.07ce7a66.js";const i={},r=n("h1",{id:"sistema-ng-enerhiya",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sistema-ng-enerhiya","aria-hidden":"true"},"#"),a(" Sistema ng Enerhiya")],-1),k=n("p",null,[a("Ang mga kaswal na laro ay karaniwang gumagamit ng mga sistema ng enerhiya, ibig sabihin, ang mga pagkilos sa laro ay nagkakahalaga ng enerhiya na muling pinupuno sa paglipas ng panahon. Sa gabay na ito tatalakayin natin kung paano bumuo ng isa sa Solana. Inirerekomenda na magsimula sa "),n("a",{href:"../gaming/hello-world"},"Hello World Example"),a(" kung wala kang anumang dating kaalaman sa Solana.")],-1),g=n("p",null,"Narito ang isang kumpletong halimbawa ng source code batay sa Solana dapp scaffold na may react client:",-1),m={href:"https://github.com/solana-developers/solana-game-starter-kits/tree/main/lumberjack",target:"_blank",rel:"noopener noreferrer"},b=a("Source"),d=t(`

Anchor program

Sa tutorial na ito, gagabayan ka namin sa proseso ng paglikha ng isang program na unti-unting nagre-replenishes sa mga reserbang enerhiya ng player sa paglipas ng panahon. Ito, sa turn, ay magbibigay-daan sa kanila na magsagawa ng iba't ibang mga aksyon sa loob ng laro. Sa aming halimbawa, ang isang lumber jack ay magpuputol ng mga puno sa bawat puno ay nagbibigay ng isang kahoy at nagkakahalaga ng isang enerhiya.

Paggawa ng player account

Una kailangan ng player na gumawa ng account na nagse-save sa estado ng aming player. Pansinin na ang last_login time ay nagse-save sa kasalukuyang unix time stamp ng player na nakikipag-ugnayan siya sa program. Sa ganitong estado, magagawa nating kalkulahin kung gaano karaming enerhiya ang mayroon ang manlalaro sa isang tiyak na punto ng oras. Mayroon din kaming halaga para sa kung gaano karaming kahoy ang ibinabato ng lumber jack sa laro.


+import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as a,e as t}from"./app.d411e3b3.js";const i={},r=n("h1",{id:"sistema-ng-enerhiya",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sistema-ng-enerhiya","aria-hidden":"true"},"#"),a(" Sistema ng Enerhiya")],-1),k=n("p",null,[a("Ang mga kaswal na laro ay karaniwang gumagamit ng mga sistema ng enerhiya, ibig sabihin, ang mga pagkilos sa laro ay nagkakahalaga ng enerhiya na muling pinupuno sa paglipas ng panahon. Sa gabay na ito tatalakayin natin kung paano bumuo ng isa sa Solana. Inirerekomenda na magsimula sa "),n("a",{href:"../gaming/hello-world"},"Hello World Example"),a(" kung wala kang anumang dating kaalaman sa Solana.")],-1),g=n("p",null,"Narito ang isang kumpletong halimbawa ng source code batay sa Solana dapp scaffold na may react client:",-1),m={href:"https://github.com/solana-developers/solana-game-starter-kits/tree/main/lumberjack",target:"_blank",rel:"noopener noreferrer"},b=a("Source"),d=t(`

Anchor program

Sa tutorial na ito, gagabayan ka namin sa proseso ng paglikha ng isang program na unti-unting nagre-replenishes sa mga reserbang enerhiya ng player sa paglipas ng panahon. Ito, sa turn, ay magbibigay-daan sa kanila na magsagawa ng iba't ibang mga aksyon sa loob ng laro. Sa aming halimbawa, ang isang lumber jack ay magpuputol ng mga puno sa bawat puno ay nagbibigay ng isang kahoy at nagkakahalaga ng isang enerhiya.

Paggawa ng player account

Una kailangan ng player na gumawa ng account na nagse-save sa estado ng aming player. Pansinin na ang last_login time ay nagse-save sa kasalukuyang unix time stamp ng player na nakikipag-ugnayan siya sa program. Sa ganitong estado, magagawa nating kalkulahin kung gaano karaming enerhiya ang mayroon ang manlalaro sa isang tiyak na punto ng oras. Mayroon din kaming halaga para sa kung gaano karaming kahoy ang ibinabato ng lumber jack sa laro.


 pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
     ctx.accounts.player.energy = MAX_ENERGY;
     ctx.accounts.player.last_login = Clock::get()?.unix_timestamp;
diff --git a/docs/.vuepress/dist/assets/energy-system.html.36ae62eb.js b/docs/.vuepress/dist/assets/energy-system.html.3fd21eea.js
similarity index 99%
rename from docs/.vuepress/dist/assets/energy-system.html.36ae62eb.js
rename to docs/.vuepress/dist/assets/energy-system.html.3fd21eea.js
index 388b0b3c7..a2ffbe7ea 100644
--- a/docs/.vuepress/dist/assets/energy-system.html.36ae62eb.js
+++ b/docs/.vuepress/dist/assets/energy-system.html.3fd21eea.js
@@ -1,4 +1,4 @@
-import{_ as e,r as o,o as c,c as u,a as n,b as p,F as l,d as s,e as t}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"systeme-d-energie",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#systeme-d-energie","aria-hidden":"true"},"#"),s(" Syst\xE8me d'Energie")],-1),k=n("p",null,[s("Les Casual Games utilisent g\xE9n\xE9ralement des syst\xE8mes d'\xE9nergie, ce qui signifie que les actions effectu\xE9es dans le jeu co\xFBtent de l'\xE9nergie qui se recharge au fil du temps. Dans ce guide, nous allons voir comment en construire un sur Solana. Il est recommand\xE9 de commencer par "),n("a",{href:"../gaming/hello-world"},"Exemple Hello World"),s(" si vous n'avez pas de connaissances pr\xE9alables de Solana.")],-1),m=n("p",null,[s("Voici un exemple de code source complet bas\xE9 sur le "),n("em",null,"Solana dapp scaffold"),s(" avec un client react :")],-1),d={href:"https://github.com/solana-developers/solana-game-starter-kits/tree/main/lumberjack",target:"_blank",rel:"noopener noreferrer"},b=s("Source"),g=t(`

Program Anchor

Dans ce tutoriel, nous vous guiderons \xE0 travers le processus de cr\xE9ation d'un programme qui recharge progressivement les r\xE9serves d'\xE9nergie du joueur au fil du temps. Cela leur permettra ensuite d'ex\xE9cuter diverses actions dans le jeu. Dans notre exemple, un b\xFBcheron coupera des arbres, chaque arbre rapportant un bois et co\xFBtant une \xE9nergie.

Cr\xE9ation du compte du joueur

Tout d'abord, le joueur doit cr\xE9er un compte qui enregistre l'\xE9tat de notre joueur. Remarquez que last_login enregistre l'horodatage Unix du joueur qui interagit avec le programme. Gr\xE2ce \xE0 cet \xE9tat, nous pourrons calculer la quantit\xE9 d'\xE9nergie dont dispose le joueur \xE0 un moment donn\xE9. Nous disposons \xE9galement d'une valeur pour la quantit\xE9 de bois que le b\xFBcheron peut transporter dans le jeu.


+import{_ as e,r as o,o as c,c as u,a as n,b as p,F as l,d as s,e as t}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"systeme-d-energie",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#systeme-d-energie","aria-hidden":"true"},"#"),s(" Syst\xE8me d'Energie")],-1),k=n("p",null,[s("Les Casual Games utilisent g\xE9n\xE9ralement des syst\xE8mes d'\xE9nergie, ce qui signifie que les actions effectu\xE9es dans le jeu co\xFBtent de l'\xE9nergie qui se recharge au fil du temps. Dans ce guide, nous allons voir comment en construire un sur Solana. Il est recommand\xE9 de commencer par "),n("a",{href:"../gaming/hello-world"},"Exemple Hello World"),s(" si vous n'avez pas de connaissances pr\xE9alables de Solana.")],-1),m=n("p",null,[s("Voici un exemple de code source complet bas\xE9 sur le "),n("em",null,"Solana dapp scaffold"),s(" avec un client react :")],-1),d={href:"https://github.com/solana-developers/solana-game-starter-kits/tree/main/lumberjack",target:"_blank",rel:"noopener noreferrer"},b=s("Source"),g=t(`

Program Anchor

Dans ce tutoriel, nous vous guiderons \xE0 travers le processus de cr\xE9ation d'un programme qui recharge progressivement les r\xE9serves d'\xE9nergie du joueur au fil du temps. Cela leur permettra ensuite d'ex\xE9cuter diverses actions dans le jeu. Dans notre exemple, un b\xFBcheron coupera des arbres, chaque arbre rapportant un bois et co\xFBtant une \xE9nergie.

Cr\xE9ation du compte du joueur

Tout d'abord, le joueur doit cr\xE9er un compte qui enregistre l'\xE9tat de notre joueur. Remarquez que last_login enregistre l'horodatage Unix du joueur qui interagit avec le programme. Gr\xE2ce \xE0 cet \xE9tat, nous pourrons calculer la quantit\xE9 d'\xE9nergie dont dispose le joueur \xE0 un moment donn\xE9. Nous disposons \xE9galement d'une valeur pour la quantit\xE9 de bois que le b\xFBcheron peut transporter dans le jeu.


 pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
     ctx.accounts.player.energy = MAX_ENERGY;
     ctx.accounts.player.last_login = Clock::get()?.unix_timestamp;
diff --git a/docs/.vuepress/dist/assets/energy-system.html.c939c46f.js b/docs/.vuepress/dist/assets/energy-system.html.a79e6d47.js
similarity index 99%
rename from docs/.vuepress/dist/assets/energy-system.html.c939c46f.js
rename to docs/.vuepress/dist/assets/energy-system.html.a79e6d47.js
index 71f47c80f..b2f56746c 100644
--- a/docs/.vuepress/dist/assets/energy-system.html.c939c46f.js
+++ b/docs/.vuepress/dist/assets/energy-system.html.a79e6d47.js
@@ -1,4 +1,4 @@
-import{_ as e,r as o,o as c,c as l,a as n,b as t,F as u,d as s,e as p}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"energy-system",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#energy-system","aria-hidden":"true"},"#"),s(" Energy System")],-1),k=n("p",null,[s("Casual games commonly use energy systems, meaning that actions in the game cost energy which refills over time. In this guide we will walk through how to build one on Solana. It is recommended to start with the "),n("a",{href:"../gaming/hello-world"},"Hello World Example"),s(" if you do not have any prior Solana knowledge.")],-1),b=n("p",null,"Here is a complete example source code based on the Solana dapp scaffold with a react client:",-1),m={href:"https://github.com/solana-developers/solana-game-starter-kits/tree/main/lumberjack",target:"_blank",rel:"noopener noreferrer"},d=s("Source"),h=p(`

Anchor program

In this tutorial, we will guide you through the process of creating a program that gradually replenishes the player's energy reserves over time. This, in turn, will enable them to execute various actions within the game. In our example, a lumber jack will chops trees with every tree rewarding one wood and cost one energy.

Creating the player account

First the player needs to create an account which saves the state of our player. Notice the last_login time saves the current unix time stamp of the player he interacts with the program. With this state, we will be able to calculate how much energy the player has at a certain point in time. We also have a value for how much wood the lumber jack chucks in the game.


+import{_ as e,r as o,o as c,c as l,a as n,b as t,F as u,d as s,e as p}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"energy-system",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#energy-system","aria-hidden":"true"},"#"),s(" Energy System")],-1),k=n("p",null,[s("Casual games commonly use energy systems, meaning that actions in the game cost energy which refills over time. In this guide we will walk through how to build one on Solana. It is recommended to start with the "),n("a",{href:"../gaming/hello-world"},"Hello World Example"),s(" if you do not have any prior Solana knowledge.")],-1),b=n("p",null,"Here is a complete example source code based on the Solana dapp scaffold with a react client:",-1),m={href:"https://github.com/solana-developers/solana-game-starter-kits/tree/main/lumberjack",target:"_blank",rel:"noopener noreferrer"},d=s("Source"),h=p(`

Anchor program

In this tutorial, we will guide you through the process of creating a program that gradually replenishes the player's energy reserves over time. This, in turn, will enable them to execute various actions within the game. In our example, a lumber jack will chops trees with every tree rewarding one wood and cost one energy.

Creating the player account

First the player needs to create an account which saves the state of our player. Notice the last_login time saves the current unix time stamp of the player he interacts with the program. With this state, we will be able to calculate how much energy the player has at a certain point in time. We also have a value for how much wood the lumber jack chucks in the game.


 pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
     ctx.accounts.player.energy = MAX_ENERGY;
     ctx.accounts.player.last_login = Clock::get()?.unix_timestamp;
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.2d03e4b5.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.21f8b814.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.2d03e4b5.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.21f8b814.js
index 079d2789f..4029570e5 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.2d03e4b5.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.21f8b814.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.07ce7a66.js";var b="/assets/scfsd.cc67ec33.png";const f={},g=d(`

Feature Parity Testing

When testing your program, assurances that it will run the same in various clusters is essential to both quality and producing expected outcomes.

Facts

Fact Sheet

  • Features are capabilities that are introduced to Solana validators and require activation to be used.
  • Features may be activated in one cluster (e.g. testnet) but not so in another (e.g. mainnet-beta).
  • However; when running default solana-test-validator locally, all available features in your Solana version are automagically activated. The result is that when testing locally, the capabilities and results of your testing may not be the same when deploying and running in a different cluster!

Scenario

Assume you have a Transaction that contained three (3) instructions and each instruction consumes approximately 100_000 Compute Units (CU). When running in a Solana 1.8.x version, you would observe your instruction CU consumption similar to:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

In Solana 1.9.2 a feature called 'transaction wide compute cap' was introduced where a Transaction, by default, has a 200_000 CU budget and the encapsulated instructions draw down from that Transaction budget. Running the same transaction as noted above would have very different behavior:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Yikes! If you were unaware of this you'd likely be frustrated as there was no change to your instruction behavior that would cause this. In devnet it worked fine, but locally it was failing?!?

There is the ability to increase the overall Transaction budget, to lets say 300_000 CU, and salvage your sanity but this demonstrates why testing with Feature Parity provides a proactive way to avoid any confusion.

Feature Status

It is fairly easy to check what features are enabled for a particular cluster with the solana feature status command.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.d411e3b3.js";var b="/assets/scfsd.cc67ec33.png";const f={},g=d(`

Feature Parity Testing

When testing your program, assurances that it will run the same in various clusters is essential to both quality and producing expected outcomes.

Facts

Fact Sheet

  • Features are capabilities that are introduced to Solana validators and require activation to be used.
  • Features may be activated in one cluster (e.g. testnet) but not so in another (e.g. mainnet-beta).
  • However; when running default solana-test-validator locally, all available features in your Solana version are automagically activated. The result is that when testing locally, the capabilities and results of your testing may not be the same when deploying and running in a different cluster!

Scenario

Assume you have a Transaction that contained three (3) instructions and each instruction consumes approximately 100_000 Compute Units (CU). When running in a Solana 1.8.x version, you would observe your instruction CU consumption similar to:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

In Solana 1.9.2 a feature called 'transaction wide compute cap' was introduced where a Transaction, by default, has a 200_000 CU budget and the encapsulated instructions draw down from that Transaction budget. Running the same transaction as noted above would have very different behavior:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Yikes! If you were unaware of this you'd likely be frustrated as there was no change to your instruction behavior that would cause this. In devnet it worked fine, but locally it was failing?!?

There is the ability to increase the overall Transaction budget, to lets say 300_000 CU, and salvage your sanity but this demonstrates why testing with Feature Parity provides a proactive way to avoid any confusion.

Feature Status

It is fairly easy to check what features are enabled for a particular cluster with the solana feature status command.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.9895d411.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.4ad59f22.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.9895d411.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.4ad59f22.js
index 0ceb5c584..0e83ae64f 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.9895d411.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.4ad59f22.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const f={},g=b(`

\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E19 (Parity Testing)

\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A program \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E44\u0E14\u0E49\u0E43\u0E19\u0E17\u0E31\u0E49\u0E07\u0E04\u0E38\u0E13\u0E20\u0E32\u0E1E \u0E41\u0E25\u0E30\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49

\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49

Fact Sheet

  • \u0E04\u0E38\u0E13\u0E2A\u0E21\u0E1A\u0E31\u0E15\u0E34\u0E40\u0E09\u0E1E\u0E32\u0E30 (Features) \u0E04\u0E37\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 (capabilities) \u0E17\u0E35\u0E48\u0E21\u0E35\u0E21\u0E32\u0E01\u0E31\u0E1A Solana validators \u0E41\u0E25\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E34\u0E14\u0E16\u0E36\u0E07\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49
  • Features \u0E2D\u0E32\u0E08\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E1B\u0E34\u0E14\u0E40\u0E1E\u0E35\u0E22\u0E07 cluster \u0E40\u0E14\u0E35\u0E22\u0E27 (\u0E40\u0E0A\u0E48\u0E19\u0E1A\u0E19 testnet) \u0E41\u0E15\u0E48\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E2D\u0E37\u0E48\u0E19 (\u0E40\u0E0A\u0E48\u0E19 mainnet-beta).
  • \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 solana-test-validator \u0E14\u0E49\u0E27\u0E22\u0E04\u0E48\u0E32\u0E15\u0E31\u0E49\u0E07\u0E15\u0E49\u0E19\u0E1B\u0E01\u0E15\u0E34\u0E17\u0E35\u0E48 local, \u0E17\u0E38\u0E01\u0E46 features \u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E15\u0E32\u0E21 Solana version \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E1C\u0E25\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49\u0E40\u0E27\u0E25\u0E32 testing \u0E17\u0E35\u0E48 local \u0E01\u0E31\u0E1A capabilities \u0E41\u0E25\u0E30\u0E1C\u0E25\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E19\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48 deploying \u0E41\u0E25\u0E30 running \u0E43\u0E19 cluster \u0E2D\u0E37\u0E48\u0E19\u0E46!

Scenario

\u0E2A\u0E21\u0E21\u0E15\u0E34\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E21\u0E35 transaction \u0E17\u0E35\u0E48\u0E21\u0E35 (3) instructions \u0E41\u0E25\u0E30\u0E41\u0E15\u0E48\u0E25\u0E30 instruction \u0E43\u0E0A\u0E49\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 100_000 Compute Units (CU) \u0E1A\u0E19 Solana 1.8.x, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19 instruction CU consumption \u0E04\u0E25\u0E49\u0E32\u0E22\u0E46 \u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\u0E1A\u0E19 Solana 1.9.2 \u0E08\u0E30\u0E21\u0E35 feature 'transaction wide compute cap' \u0E17\u0E35\u0E48\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E43\u0E19\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07 transaction \u0E42\u0E14\u0E22\u0E04\u0E48\u0E32\u0E1B\u0E01\u0E15\u0E34\u0E08\u0E30\u0E21\u0E35 budget \u0E43\u0E2B\u0E49 200_000 CU \u0E41\u0E25\u0E30 instructions \u0E17\u0E35\u0E48\u0E15\u0E34\u0E14\u0E44\u0E1B \u0E08\u0E30\u0E2B\u0E31\u0E01 budget \u0E21\u0E32\u0E08\u0E32\u0E01 transaction \u0E19\u0E31\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22. \u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49 transaction \u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E43\u0E0A\u0E49\u0E44\u0E1B\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E30\u0E44\u0E14\u0E49\u0E1C\u0E25\u0E17\u0E35\u0E48\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E21\u0E32\u0E01:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\u0E21\u0E38\u0E41\u0E07! \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E21\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E04\u0E07\u0E15\u0E01\u0E43\u0E08\u0E41\u0E22\u0E48 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E40\u0E23\u0E32\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 instruction \u0E2D\u0E30\u0E44\u0E23\u0E40\u0E25\u0E22\u0E41\u0E25\u0E49\u0E27\u0E43\u0E19 devnet \u0E01\u0E47\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E41\u0E15\u0E48\u0E17\u0E35\u0E48 local \u0E17\u0E33\u0E44\u0E21\u0E1E\u0E31\u0E07?!?

\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21 Transaction budget \u0E42\u0E14\u0E22\u0E23\u0E27\u0E21\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 300_000 CU \u0E40\u0E1C\u0E37\u0E48\u0E2D\u0E40\u0E23\u0E32\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E39\u0E49\u0E2A\u0E36\u0E01\u0E14\u0E35\u0E02\u0E36\u0E49\u0E19 \u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E14\u0E49\u0E32\u0E19\u0E1A\u0E19\u0E1E\u0E22\u0E32\u0E22\u0E32\u0E21\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32\u0E17\u0E33\u0E44\u0E21\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22 Feature Parity \u0E16\u0E36\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E14\u0E35\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E15\u0E31\u0E27\u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2B\u0E25\u0E35\u0E01\u0E40\u0E25\u0E35\u0E48\u0E22\u0E07\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E31\u0E1A\u0E2A\u0E19\u0E43\u0E19\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07

Feature Status

\u0E21\u0E31\u0E19\u0E07\u0E48\u0E32\u0E22\u0E21\u0E32\u0E01\u0E17\u0E35\u0E48\u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E27\u0E48\u0E32 features \u0E44\u0E2B\u0E19\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E25\u0E30 cluster \u0E14\u0E49\u0E27\u0E22\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 solana feature status

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const f={},g=b(`

\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E19 (Parity Testing)

\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A program \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E44\u0E14\u0E49\u0E43\u0E19\u0E17\u0E31\u0E49\u0E07\u0E04\u0E38\u0E13\u0E20\u0E32\u0E1E \u0E41\u0E25\u0E30\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E18\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49

\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49

Fact Sheet

  • \u0E04\u0E38\u0E13\u0E2A\u0E21\u0E1A\u0E31\u0E15\u0E34\u0E40\u0E09\u0E1E\u0E32\u0E30 (Features) \u0E04\u0E37\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 (capabilities) \u0E17\u0E35\u0E48\u0E21\u0E35\u0E21\u0E32\u0E01\u0E31\u0E1A Solana validators \u0E41\u0E25\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E34\u0E14\u0E16\u0E36\u0E07\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49
  • Features \u0E2D\u0E32\u0E08\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E1B\u0E34\u0E14\u0E40\u0E1E\u0E35\u0E22\u0E07 cluster \u0E40\u0E14\u0E35\u0E22\u0E27 (\u0E40\u0E0A\u0E48\u0E19\u0E1A\u0E19 testnet) \u0E41\u0E15\u0E48\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49\u0E17\u0E35\u0E48\u0E2D\u0E37\u0E48\u0E19 (\u0E40\u0E0A\u0E48\u0E19 mainnet-beta).
  • \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 solana-test-validator \u0E14\u0E49\u0E27\u0E22\u0E04\u0E48\u0E32\u0E15\u0E31\u0E49\u0E07\u0E15\u0E49\u0E19\u0E1B\u0E01\u0E15\u0E34\u0E17\u0E35\u0E48 local, \u0E17\u0E38\u0E01\u0E46 features \u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E15\u0E32\u0E21 Solana version \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E1C\u0E25\u0E17\u0E35\u0E48\u0E44\u0E14\u0E49\u0E40\u0E27\u0E25\u0E32 testing \u0E17\u0E35\u0E48 local \u0E01\u0E31\u0E1A capabilities \u0E41\u0E25\u0E30\u0E1C\u0E25\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E19\u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48 deploying \u0E41\u0E25\u0E30 running \u0E43\u0E19 cluster \u0E2D\u0E37\u0E48\u0E19\u0E46!

Scenario

\u0E2A\u0E21\u0E21\u0E15\u0E34\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E21\u0E35 transaction \u0E17\u0E35\u0E48\u0E21\u0E35 (3) instructions \u0E41\u0E25\u0E30\u0E41\u0E15\u0E48\u0E25\u0E30 instruction \u0E43\u0E0A\u0E49\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 100_000 Compute Units (CU) \u0E1A\u0E19 Solana 1.8.x, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19 instruction CU consumption \u0E04\u0E25\u0E49\u0E32\u0E22\u0E46 \u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\u0E1A\u0E19 Solana 1.9.2 \u0E08\u0E30\u0E21\u0E35 feature 'transaction wide compute cap' \u0E17\u0E35\u0E48\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E43\u0E19\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07 transaction \u0E42\u0E14\u0E22\u0E04\u0E48\u0E32\u0E1B\u0E01\u0E15\u0E34\u0E08\u0E30\u0E21\u0E35 budget \u0E43\u0E2B\u0E49 200_000 CU \u0E41\u0E25\u0E30 instructions \u0E17\u0E35\u0E48\u0E15\u0E34\u0E14\u0E44\u0E1B \u0E08\u0E30\u0E2B\u0E31\u0E01 budget \u0E21\u0E32\u0E08\u0E32\u0E01 transaction \u0E19\u0E31\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22. \u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49 transaction \u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E43\u0E0A\u0E49\u0E44\u0E1B\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E08\u0E30\u0E44\u0E14\u0E49\u0E1C\u0E25\u0E17\u0E35\u0E48\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E21\u0E32\u0E01:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\u0E21\u0E38\u0E41\u0E07! \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E21\u0E32\u0E01\u0E48\u0E2D\u0E19\u0E04\u0E07\u0E15\u0E01\u0E43\u0E08\u0E41\u0E22\u0E48 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E40\u0E23\u0E32\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19 instruction \u0E2D\u0E30\u0E44\u0E23\u0E40\u0E25\u0E22\u0E41\u0E25\u0E49\u0E27\u0E43\u0E19 devnet \u0E01\u0E47\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E41\u0E15\u0E48\u0E17\u0E35\u0E48 local \u0E17\u0E33\u0E44\u0E21\u0E1E\u0E31\u0E07?!?

\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21 Transaction budget \u0E42\u0E14\u0E22\u0E23\u0E27\u0E21\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 300_000 CU \u0E40\u0E1C\u0E37\u0E48\u0E2D\u0E40\u0E23\u0E32\u0E08\u0E30\u0E44\u0E14\u0E49\u0E23\u0E39\u0E49\u0E2A\u0E36\u0E01\u0E14\u0E35\u0E02\u0E36\u0E49\u0E19 \u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E14\u0E49\u0E32\u0E19\u0E1A\u0E19\u0E1E\u0E22\u0E32\u0E22\u0E32\u0E21\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32\u0E17\u0E33\u0E44\u0E21\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22 Feature Parity \u0E16\u0E36\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E14\u0E35\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E15\u0E31\u0E27\u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2B\u0E25\u0E35\u0E01\u0E40\u0E25\u0E35\u0E48\u0E22\u0E07\u0E04\u0E27\u0E32\u0E21\u0E2A\u0E31\u0E1A\u0E2A\u0E19\u0E43\u0E19\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07

Feature Status

\u0E21\u0E31\u0E19\u0E07\u0E48\u0E32\u0E22\u0E21\u0E32\u0E01\u0E17\u0E35\u0E48\u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E27\u0E48\u0E32 features \u0E44\u0E2B\u0E19\u0E40\u0E1B\u0E34\u0E14\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E25\u0E30 cluster \u0E14\u0E49\u0E27\u0E22\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 solana feature status

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.5be01a44.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.6403e730.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.5be01a44.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.6403e730.js
index 835da806a..73e723192 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.5be01a44.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.6403e730.js
@@ -1,4 +1,4 @@
-import{_ as i,r as e,o as r,c as k,b as s,w as t,a as n,F as m,e as b,d as a}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const g={},f=b(`

Pagsubok sa Pagkakapareho ng Tampok

Kapag sinusubukan ang iyong programa, ang mga katiyakan na pareho itong tatakbo sa iba't ibang mga kumpol ay mahalaga sa parehong kalidad at paggawa ng inaasahang resulta.

Mga Katotohanan

Fact Sheet

  • Ang mga tampok ay mga kakayahan na ipinakilala sa mga validator ng Solana at nangangailangan ng pag-activate upang magamit.
  • Maaaring i-activate ang mga feature sa isang cluster (hal. testnet) ngunit hindi sa isa pa (hal. mainnet-beta).
  • Gayunpaman; kapag lokal na pinapatakbo ang default na solana-test-validator, lahat ng available na feature sa iyong Ang bersyon ng Solana ay awtomatikong naisaaktibo. Ang resulta ay kapag lokal na pagsubok, ang mga kakayahan at resulta ng maaaring hindi pareho ang iyong pagsubok kapag nagde-deploy at tumatakbo sa ibang cluster!

Sitwasyon

Ipagpalagay na mayroon kang Transaksyon na naglalaman ng tatlong (3) mga instruction at ang bawat instruction ay kumukonsumo ng humigit-kumulang 100_000 Compute Units (CU). Kapag tumatakbo sa bersyon ng Solana 1.8.x, mapapansin mo ang iyong pagtuturo sa pagkonsumo ng CU katulad ng:

InstructionSimula sa CUPagpapatupadNatitirang CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Sa Solana 1.9.2 isang tampok na tinatawag na 'transaction wide compute cap' ay ipinakilala kung saan ang isang Transaksyon, bilang default, ay may 200_000 CU na badyet at ang mga naka-encapsulate na instruction na ay kumukuha mula sa badyet ng Transaksyon na iyon. Parehong tumatakbo ang transaksyon tulad ng nabanggit sa itaas ay magkakaroon ng ibang pag-uugali:

InstructionSimula sa CUPagpapatupadNatitirang CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Hays! Kung hindi mo alam ito, malamang na mabigo ka dahil walang pagbabago sa iyong pag-uugali sa pagtuturo magiging sanhi nito. Sa devnet ito ay gumana nang maayos, ngunit sa lokal na ito ay nabigo?!?

May kakayahang taasan ang kabuuang badyet sa Transaksyon, para sabihing 300_000 CU, at iligtas ang iyong katinuan ngunit ito ay nagpapakita kung bakit ang pagsubok sa Feature Parity ay nagbibigay ng isang maagap na paraan upang maiwasan ang anumang pagkalito.

Katayuan ng Tampok

Medyo madaling suriin kung anong mga feature ang pinagana para sa isang partikular na cluster gamit ang command na solana feature status.

solana feature status -ud // Ipinapakita ayon sa feature status para sa devnet
+import{_ as i,r as e,o as r,c as k,b as s,w as t,a as n,F as m,e as b,d as a}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const g={},f=b(`

Pagsubok sa Pagkakapareho ng Tampok

Kapag sinusubukan ang iyong programa, ang mga katiyakan na pareho itong tatakbo sa iba't ibang mga kumpol ay mahalaga sa parehong kalidad at paggawa ng inaasahang resulta.

Mga Katotohanan

Fact Sheet

  • Ang mga tampok ay mga kakayahan na ipinakilala sa mga validator ng Solana at nangangailangan ng pag-activate upang magamit.
  • Maaaring i-activate ang mga feature sa isang cluster (hal. testnet) ngunit hindi sa isa pa (hal. mainnet-beta).
  • Gayunpaman; kapag lokal na pinapatakbo ang default na solana-test-validator, lahat ng available na feature sa iyong Ang bersyon ng Solana ay awtomatikong naisaaktibo. Ang resulta ay kapag lokal na pagsubok, ang mga kakayahan at resulta ng maaaring hindi pareho ang iyong pagsubok kapag nagde-deploy at tumatakbo sa ibang cluster!

Sitwasyon

Ipagpalagay na mayroon kang Transaksyon na naglalaman ng tatlong (3) mga instruction at ang bawat instruction ay kumukonsumo ng humigit-kumulang 100_000 Compute Units (CU). Kapag tumatakbo sa bersyon ng Solana 1.8.x, mapapansin mo ang iyong pagtuturo sa pagkonsumo ng CU katulad ng:

InstructionSimula sa CUPagpapatupadNatitirang CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Sa Solana 1.9.2 isang tampok na tinatawag na 'transaction wide compute cap' ay ipinakilala kung saan ang isang Transaksyon, bilang default, ay may 200_000 CU na badyet at ang mga naka-encapsulate na instruction na ay kumukuha mula sa badyet ng Transaksyon na iyon. Parehong tumatakbo ang transaksyon tulad ng nabanggit sa itaas ay magkakaroon ng ibang pag-uugali:

InstructionSimula sa CUPagpapatupadNatitirang CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Hays! Kung hindi mo alam ito, malamang na mabigo ka dahil walang pagbabago sa iyong pag-uugali sa pagtuturo magiging sanhi nito. Sa devnet ito ay gumana nang maayos, ngunit sa lokal na ito ay nabigo?!?

May kakayahang taasan ang kabuuang badyet sa Transaksyon, para sabihing 300_000 CU, at iligtas ang iyong katinuan ngunit ito ay nagpapakita kung bakit ang pagsubok sa Feature Parity ay nagbibigay ng isang maagap na paraan upang maiwasan ang anumang pagkalito.

Katayuan ng Tampok

Medyo madaling suriin kung anong mga feature ang pinagana para sa isang partikular na cluster gamit ang command na solana feature status.

solana feature status -ud // Ipinapakita ayon sa feature status para sa devnet
 solana feature status -ut // Ipinapakita para sa testnet
 solana feature status -um // Ipinapakita para sa mainnet-beta
 status ng tampok na solana -ul // Ipinapakita para sa lokal, nangangailangan ng pagpapatakbo ng solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.93063fd3.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.67fc474d.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.93063fd3.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.67fc474d.js
index 14a10219a..cb349332d 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.93063fd3.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.67fc474d.js
@@ -1,4 +1,4 @@
-import{_ as i,r as e,o as r,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.07ce7a66.js";var b="/assets/scfsd.cc67ec33.png";const g={},f=d(`

Funktionsparit\xE4tstest

Beim Testen Ihres Programms ist die Zusicherung erwartete Ergebnisse zu produzieren als auch in verschiedenen Clustern gleich ausgef\xFChrt wird, sowohl f\xFCr die Qualit\xE4t als auch f\xFCr die Sicherheit von entscheidender Bedeutung.

Fakten

Fact Sheet

  • Funktionen sind Funktionen, die in Solana-Validatoren eingef\xFChrt werden und f\xFCr deren Verwendung eine Aktivierung erforderlich ist.
  • Funktionen k\xF6nnen in einem Cluster (z. B. Testnet) aktiviert werden, in einem anderen (z. B. Mainnet-Beta) jedoch nicht.
  • Jedoch; Wenn Sie standardm\xE4\xDFig solana-test-validator lokal ausf\xFChren, werden alle verf\xFCgbaren Funktionen in Ihrer Die Solana-Version wird automatisch aktiviert. Das Ergebnis ist, dass beim Testen vor Ort die F\xE4higkeiten und Ergebnisse von Ihre Tests sind m\xF6glicherweise nicht die gleichen, wenn Sie sie in einem anderen Cluster bereitstellen und ausf\xFChren!

Szenario

Angenommen, Sie haben eine Transaktion, die drei (3) Anweisungen enth\xE4lt, und jede Anweisung verbraucht ungef\xE4hr 100_000 Recheneinheiten (CU). Wenn Sie eine Solana 1.8.x-Version ausf\xFChren, w\xFCrden Sie Ihren Befehls-CU-Verbrauch \xE4hnlich wie folgt beobachten:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

In Solana 1.9.2 wurde eine Funktion namens \u201Etransaktionsweite Rechenobergrenze\u201C eingef\xFChrt, bei der eine Transaktion standardm\xE4\xDFig ein Budget von 200_000 CU hat und die Anweisungen draw down aus diesem Transaktionsbudget gekapselten sind. Die selbe Transaktion, wie oben erw\xE4hnt laufen zu lassen, w\xFCrde ein ganz anderes Verhalten haben:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Huch! Wenn Sie sich dessen nicht bewusst w\xE4ren, w\xE4ren Sie wahrscheinlich frustriert, da sich Ihr Unterrichtsverhalten dadurch nicht ge\xE4ndert hat. Auf devnet hat es gut funktioniert, aber lokal hat es nicht funktioniert?!?

Es besteht die M\xF6glichkeit, das gesamte Transaktionsbudget zu erh\xF6hen, sagen wir auf 300_000 CU, und Ihre geistige Gesundheit zu retten. Dies zeigt jedoch, warum das Testen mit Feature Parity eine proaktive M\xF6glichkeit bietet, Verwirrung zu vermeiden.

Feature Status

Mit dem Befehl \u201Esolana feature status\u201C l\xE4sst sich recht einfach \xFCberpr\xFCfen, welche Funktionen f\xFCr einen bestimmten Cluster aktiviert sind.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as i,r as e,o as r,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.d411e3b3.js";var b="/assets/scfsd.cc67ec33.png";const g={},f=d(`

Funktionsparit\xE4tstest

Beim Testen Ihres Programms ist die Zusicherung erwartete Ergebnisse zu produzieren als auch in verschiedenen Clustern gleich ausgef\xFChrt wird, sowohl f\xFCr die Qualit\xE4t als auch f\xFCr die Sicherheit von entscheidender Bedeutung.

Fakten

Fact Sheet

  • Funktionen sind Funktionen, die in Solana-Validatoren eingef\xFChrt werden und f\xFCr deren Verwendung eine Aktivierung erforderlich ist.
  • Funktionen k\xF6nnen in einem Cluster (z. B. Testnet) aktiviert werden, in einem anderen (z. B. Mainnet-Beta) jedoch nicht.
  • Jedoch; Wenn Sie standardm\xE4\xDFig solana-test-validator lokal ausf\xFChren, werden alle verf\xFCgbaren Funktionen in Ihrer Die Solana-Version wird automatisch aktiviert. Das Ergebnis ist, dass beim Testen vor Ort die F\xE4higkeiten und Ergebnisse von Ihre Tests sind m\xF6glicherweise nicht die gleichen, wenn Sie sie in einem anderen Cluster bereitstellen und ausf\xFChren!

Szenario

Angenommen, Sie haben eine Transaktion, die drei (3) Anweisungen enth\xE4lt, und jede Anweisung verbraucht ungef\xE4hr 100_000 Recheneinheiten (CU). Wenn Sie eine Solana 1.8.x-Version ausf\xFChren, w\xFCrden Sie Ihren Befehls-CU-Verbrauch \xE4hnlich wie folgt beobachten:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

In Solana 1.9.2 wurde eine Funktion namens \u201Etransaktionsweite Rechenobergrenze\u201C eingef\xFChrt, bei der eine Transaktion standardm\xE4\xDFig ein Budget von 200_000 CU hat und die Anweisungen draw down aus diesem Transaktionsbudget gekapselten sind. Die selbe Transaktion, wie oben erw\xE4hnt laufen zu lassen, w\xFCrde ein ganz anderes Verhalten haben:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Huch! Wenn Sie sich dessen nicht bewusst w\xE4ren, w\xE4ren Sie wahrscheinlich frustriert, da sich Ihr Unterrichtsverhalten dadurch nicht ge\xE4ndert hat. Auf devnet hat es gut funktioniert, aber lokal hat es nicht funktioniert?!?

Es besteht die M\xF6glichkeit, das gesamte Transaktionsbudget zu erh\xF6hen, sagen wir auf 300_000 CU, und Ihre geistige Gesundheit zu retten. Dies zeigt jedoch, warum das Testen mit Feature Parity eine proaktive M\xF6glichkeit bietet, Verwirrung zu vermeiden.

Feature Status

Mit dem Befehl \u201Esolana feature status\u201C l\xE4sst sich recht einfach \xFCberpr\xFCfen, welche Funktionen f\xFCr einen bestimmten Cluster aktiviert sind.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.9edac1d3.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.76d20bfd.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.9edac1d3.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.76d20bfd.js
index 95c8b3cf2..ef5ef22ad 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.9edac1d3.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.76d20bfd.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const _={},f=b(`

\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66

\u7576\u6E2C\u8A66\u7A0B\u5E8F\u6642\uFF0C\u78BA\u4FDD\u5B83\u5728\u5404\u500B\u96C6\u7FA3\u4E2D\u4EE5\u76F8\u540C\u7684\u65B9\u5F0F\u904B\u884C\u5C0D\u65BC\u78BA\u4FDD\u8CEA\u91CF\u548C\u7522\u751F\u9810\u671F\u7D50\u679C\u975E\u5E38\u91CD\u8981\u3002

\u7D9C\u8FF0

\u4E8B\u5BE6\u8868

  • \u529F\u80FD\u662F\u7232 Solana \u9A57\u8B49\u7BC0\u9EDE\u5F15\u5165\u7684\u80FD\u529B\uFF0C\u9700\u8981\u6FC0\u6D3B\u624D\u80FD\u4F7F\u7528\u3002
  • \u67D0\u500B\u96C6\u7FA3\uFF08\u4F8B\u5982\u6E2C\u8A66\u7DB2\uFF09\u4E2D\u53EF\u80FD\u6FC0\u6D3B\u4E86\u67D0\u4E9B\u7279\u6027\uFF0C\u800C\u53E6\u4E00\u500B\u96C6\u7FA3\uFF08\u4F8B\u5982\u4E3B\u7DB2\u6E2C\u8A66\u7DB2\uFF09\u5247\u672A\u6FC0\u6D3B\u3002
  • \u7136\u800C\uFF0C\u5728\u672C\u5730\u904B\u884C\u9ED8\u8A8D\u7684solana-test-validator\u6642\uFF0C\u4F60\u7684 Solana \u7248\u672C\u4E2D\u7684\u6240\u6709\u53EF\u7528\u529F\u80FD\u90FD\u6703\u81EA\u52D5\u6FC0\u6D3B\u3002\u7D50\u679C\u662F\uFF0C\u5728\u672C\u5730\u6E2C\u8A66\u6642\uFF0C\u7279\u6027\u548C\u6E2C\u8A66\u7D50\u679C\u53EF\u80FD\u8207\u5728\u4E0D\u540C\u96C6\u7FA3\u4E2D\u90E8\u7F72\u548C\u904B\u884C\u6642\u4E0D\u540C\uFF01

\u5834\u666F

\u5047\u8A2D\u4F60\u6709\u4E00\u500B\u5305\u542B\u4E09\uFF083\uFF09\u689D\u6307\u4EE4\u7684\u4EA4\u6613\uFF0C\u6BCF\u500B\u6307\u4EE4\u5927\u7D04\u6D88\u8017 100,000 \u8A08\u7B97\u55AE\u5143\uFF08Compute Units\uFF0CCU\uFF09\u3002\u5728\u904B\u884C Solana 1.8.x \u7248\u672C\u6642\uFF0C\u4F60\u6703\u89C0\u5BDF\u5230\u6307\u4EE4\u7684\u8A08\u7B97\u55AE\u5143\u6D88\u8017\u985E\u4F3C\u65BC\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\u5728 Solana 1.9.2 \u4E2D\u5F15\u5165\u4E86\u4E00\u500B\u540D\u7232\u201Ctransaction wide compute cap\u201D\u7684\u529F\u80FD\uFF0C\u5176\u4E2D\u9ED8\u8A8D\u60C5\u6CC1\u4E0B\uFF0C\u4E00\u500B\u4EA4\u6613\u5177\u6709 200,000 \u8A08\u7B97\u55AE\u5143\uFF08CU\uFF09\u7684\u9810\u7B97\uFF0C\u5C01\u88DD\u7684\u6307\u4EE4\u5F9E\u8A72\u4EA4\u6613\u9810\u7B97\u4E2D\u6D88\u8017\u3002\u904B\u884C\u4E0A\u8FF0\u76F8\u540C\u7684\u4EA4\u6613\u5C07\u6703\u6709\u975E\u5E38\u4E0D\u540C\u7684\u884C\u7232\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\u5929\u54EA\uFF01\u5982\u679C\u4F60\u4E0D\u77E5\u9053\u9019\u4E00\u9EDE\uFF0C\u4F60\u53EF\u80FD\u6703\u611F\u5230\u6CAE\u55AA\uFF0C\u56E0\u7232\u4F60\u7684\u6307\u4EE4\u884C\u7232\u6C92\u6709\u4EFB\u4F55\u8B8A\u5316\u6703\u5C0E\u81F4\u9019\u7A2E\u60C5\u6CC1\u3002\u5728\u958B\u767C\u7DB2\u7D61\u4E0A\u5B83\u6B63\u5E38\u5DE5\u4F5C\uFF0C\u4F46\u5728\u672C\u5730\u537B\u5931\u6557\u4E86\uFF1F\uFF01\uFF1F

\u4F60\u53EF\u4EE5\u589E\u52A0\u6574\u9AD4\u4EA4\u6613\u9810\u7B97\uFF0C\u6BD4\u5982\u5C07\u5176\u589E\u52A0\u5230 300,000 \u8A08\u7B97\u55AE\u5143\uFF08CU\uFF09\uFF0C\u4F86\u4FDD\u6301\u4F60\u7684\u7406\u667A\uFF0C\u4F46\u9019\u4E5F\u5C55\u793A\u4E86\u7232\u4EC0\u9EBC\u4EE5\u529F\u80FD\u76F8\u7B49\u7684\u65B9\u5F0F\u9032\u884C\u6E2C\u8A66\u662F\u907F\u514D\u4EFB\u4F55\u6DF7\u6DC6\u7684\u7A4D\u6975\u65B9\u5F0F\u3002

\u529F\u80FD\u72C0\u614B

\u4F7F\u7528solana feature status\u547D\u4EE4\u53EF\u4EE5\u5F88\u5BB9\u6613\u5730\u6AA2\u67E5\u7279\u5B9A\u96C6\u7FA3\u5553\u7528\u4E86\u54EA\u4E9B\u529F\u80FD\u3002

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const _={},f=b(`

\u529F\u80FD\u76F8\u7B49\u6E2C\u8A66

\u7576\u6E2C\u8A66\u7A0B\u5E8F\u6642\uFF0C\u78BA\u4FDD\u5B83\u5728\u5404\u500B\u96C6\u7FA3\u4E2D\u4EE5\u76F8\u540C\u7684\u65B9\u5F0F\u904B\u884C\u5C0D\u65BC\u78BA\u4FDD\u8CEA\u91CF\u548C\u7522\u751F\u9810\u671F\u7D50\u679C\u975E\u5E38\u91CD\u8981\u3002

\u7D9C\u8FF0

\u4E8B\u5BE6\u8868

  • \u529F\u80FD\u662F\u7232 Solana \u9A57\u8B49\u7BC0\u9EDE\u5F15\u5165\u7684\u80FD\u529B\uFF0C\u9700\u8981\u6FC0\u6D3B\u624D\u80FD\u4F7F\u7528\u3002
  • \u67D0\u500B\u96C6\u7FA3\uFF08\u4F8B\u5982\u6E2C\u8A66\u7DB2\uFF09\u4E2D\u53EF\u80FD\u6FC0\u6D3B\u4E86\u67D0\u4E9B\u7279\u6027\uFF0C\u800C\u53E6\u4E00\u500B\u96C6\u7FA3\uFF08\u4F8B\u5982\u4E3B\u7DB2\u6E2C\u8A66\u7DB2\uFF09\u5247\u672A\u6FC0\u6D3B\u3002
  • \u7136\u800C\uFF0C\u5728\u672C\u5730\u904B\u884C\u9ED8\u8A8D\u7684solana-test-validator\u6642\uFF0C\u4F60\u7684 Solana \u7248\u672C\u4E2D\u7684\u6240\u6709\u53EF\u7528\u529F\u80FD\u90FD\u6703\u81EA\u52D5\u6FC0\u6D3B\u3002\u7D50\u679C\u662F\uFF0C\u5728\u672C\u5730\u6E2C\u8A66\u6642\uFF0C\u7279\u6027\u548C\u6E2C\u8A66\u7D50\u679C\u53EF\u80FD\u8207\u5728\u4E0D\u540C\u96C6\u7FA3\u4E2D\u90E8\u7F72\u548C\u904B\u884C\u6642\u4E0D\u540C\uFF01

\u5834\u666F

\u5047\u8A2D\u4F60\u6709\u4E00\u500B\u5305\u542B\u4E09\uFF083\uFF09\u689D\u6307\u4EE4\u7684\u4EA4\u6613\uFF0C\u6BCF\u500B\u6307\u4EE4\u5927\u7D04\u6D88\u8017 100,000 \u8A08\u7B97\u55AE\u5143\uFF08Compute Units\uFF0CCU\uFF09\u3002\u5728\u904B\u884C Solana 1.8.x \u7248\u672C\u6642\uFF0C\u4F60\u6703\u89C0\u5BDF\u5230\u6307\u4EE4\u7684\u8A08\u7B97\u55AE\u5143\u6D88\u8017\u985E\u4F3C\u65BC\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\u5728 Solana 1.9.2 \u4E2D\u5F15\u5165\u4E86\u4E00\u500B\u540D\u7232\u201Ctransaction wide compute cap\u201D\u7684\u529F\u80FD\uFF0C\u5176\u4E2D\u9ED8\u8A8D\u60C5\u6CC1\u4E0B\uFF0C\u4E00\u500B\u4EA4\u6613\u5177\u6709 200,000 \u8A08\u7B97\u55AE\u5143\uFF08CU\uFF09\u7684\u9810\u7B97\uFF0C\u5C01\u88DD\u7684\u6307\u4EE4\u5F9E\u8A72\u4EA4\u6613\u9810\u7B97\u4E2D\u6D88\u8017\u3002\u904B\u884C\u4E0A\u8FF0\u76F8\u540C\u7684\u4EA4\u6613\u5C07\u6703\u6709\u975E\u5E38\u4E0D\u540C\u7684\u884C\u7232\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\u5929\u54EA\uFF01\u5982\u679C\u4F60\u4E0D\u77E5\u9053\u9019\u4E00\u9EDE\uFF0C\u4F60\u53EF\u80FD\u6703\u611F\u5230\u6CAE\u55AA\uFF0C\u56E0\u7232\u4F60\u7684\u6307\u4EE4\u884C\u7232\u6C92\u6709\u4EFB\u4F55\u8B8A\u5316\u6703\u5C0E\u81F4\u9019\u7A2E\u60C5\u6CC1\u3002\u5728\u958B\u767C\u7DB2\u7D61\u4E0A\u5B83\u6B63\u5E38\u5DE5\u4F5C\uFF0C\u4F46\u5728\u672C\u5730\u537B\u5931\u6557\u4E86\uFF1F\uFF01\uFF1F

\u4F60\u53EF\u4EE5\u589E\u52A0\u6574\u9AD4\u4EA4\u6613\u9810\u7B97\uFF0C\u6BD4\u5982\u5C07\u5176\u589E\u52A0\u5230 300,000 \u8A08\u7B97\u55AE\u5143\uFF08CU\uFF09\uFF0C\u4F86\u4FDD\u6301\u4F60\u7684\u7406\u667A\uFF0C\u4F46\u9019\u4E5F\u5C55\u793A\u4E86\u7232\u4EC0\u9EBC\u4EE5\u529F\u80FD\u76F8\u7B49\u7684\u65B9\u5F0F\u9032\u884C\u6E2C\u8A66\u662F\u907F\u514D\u4EFB\u4F55\u6DF7\u6DC6\u7684\u7A4D\u6975\u65B9\u5F0F\u3002

\u529F\u80FD\u72C0\u614B

\u4F7F\u7528solana feature status\u547D\u4EE4\u53EF\u4EE5\u5F88\u5BB9\u6613\u5730\u6AA2\u67E5\u7279\u5B9A\u96C6\u7FA3\u5553\u7528\u4E86\u54EA\u4E9B\u529F\u80FD\u3002

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.7eebcb7c.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.77612586.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.7eebcb7c.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.77612586.js
index 50132c6aa..d10458dc0 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.7eebcb7c.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.77612586.js
@@ -1,4 +1,4 @@
-import{_ as k,r as e,o as m,c as d,b as s,w as t,a as n,F as b,e as u,d as a}from"./app.07ce7a66.js";var l="/assets/scfsd.cc67ec33.png";const g={},f=u(`

Pengujian Paritas Fitur

Saat menguji program Anda, jaminan bahwa program akan berjalan sama di berbagai cluster sangatlah penting untuk kualitas dan menghasilkan hasil yang diharapkan.

Fakta

Lembar Fakta

  • Fitur adalah kemampuan yang diperkenalkan ke validator Solana dan memerlukan aktivasi untuk digunakan.
  • Fitur dapat diaktifkan di satu cluster (misalnya testnet) tetapi tidak di cluster lain (misalnya mainnet-beta).
  • Namun; saat menjalankan solana-test-validator default secara lokal, semua fitur yang tersedia di Solana versi Anda diaktifkan secara otomatis. Hasilnya adalah ketika menguji secara lokal, kemampuan dan hasil dari pengujian Anda mungkin tidak sama saat menerapkan dan menjalankan di cluster yang berbeda!

Skenario

Asumsikan Anda memiliki Transaksi yang berisi tiga (3) instruksi dan setiap instruksi mengkonsumsi kira-kira 100_000 Compute Unit (CU). Saat menjalankan dalam versi Solana 1.8.x, Anda akan mengamati konsumsi CU instruksi Anda mirip dengan:

InstruksiMulai CUEksekusiSisa CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Di Solana 1.9.2 fitur yang disebut 'transaction wide compute cap' diperkenalkan di mana Transaksi, secara default, memiliki anggaran 200_000 CU dan instruksi yang dienkapsulasi draw down dari anggaran Transaksi tersebut. Menjalankan transaksi yang sama seperti yang sebelumnya akan menunjukkan hasil yang sangat berbeda:

InstruksiMulai CUEksekusiSisa CU
1200_000-100_000100_000
2100_000-100_0000
30GAGAL!!!GAGAL!!!

Astaga! Jika Anda tidak menyadari hal ini, Anda mungkin akan frustrasi karena tidak ada perubahan pada behavior instruksi Anda yang akan menyebabkan ini. Di devnet itu berfungsi dengan baik, tetapi secara lokal gagal?!?

Ada kemampuan untuk meningkatkan keseluruhan anggaran Transaksi, katakanlah 300_000 CU, dan selamatkan kewarasan Anda, namun ini menunjukkan mengapa pengujian dengan Feature Parity memberikan cara proaktif untuk menghindari kebingungan.

Status Fitur

Cukup mudah untuk memeriksa fitur apa yang diaktifkan untuk cluster tertentu dengan perintah solana feature status.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as k,r as e,o as m,c as d,b as s,w as t,a as n,F as b,e as u,d as a}from"./app.d411e3b3.js";var l="/assets/scfsd.cc67ec33.png";const g={},f=u(`

Pengujian Paritas Fitur

Saat menguji program Anda, jaminan bahwa program akan berjalan sama di berbagai cluster sangatlah penting untuk kualitas dan menghasilkan hasil yang diharapkan.

Fakta

Lembar Fakta

  • Fitur adalah kemampuan yang diperkenalkan ke validator Solana dan memerlukan aktivasi untuk digunakan.
  • Fitur dapat diaktifkan di satu cluster (misalnya testnet) tetapi tidak di cluster lain (misalnya mainnet-beta).
  • Namun; saat menjalankan solana-test-validator default secara lokal, semua fitur yang tersedia di Solana versi Anda diaktifkan secara otomatis. Hasilnya adalah ketika menguji secara lokal, kemampuan dan hasil dari pengujian Anda mungkin tidak sama saat menerapkan dan menjalankan di cluster yang berbeda!

Skenario

Asumsikan Anda memiliki Transaksi yang berisi tiga (3) instruksi dan setiap instruksi mengkonsumsi kira-kira 100_000 Compute Unit (CU). Saat menjalankan dalam versi Solana 1.8.x, Anda akan mengamati konsumsi CU instruksi Anda mirip dengan:

InstruksiMulai CUEksekusiSisa CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Di Solana 1.9.2 fitur yang disebut 'transaction wide compute cap' diperkenalkan di mana Transaksi, secara default, memiliki anggaran 200_000 CU dan instruksi yang dienkapsulasi draw down dari anggaran Transaksi tersebut. Menjalankan transaksi yang sama seperti yang sebelumnya akan menunjukkan hasil yang sangat berbeda:

InstruksiMulai CUEksekusiSisa CU
1200_000-100_000100_000
2100_000-100_0000
30GAGAL!!!GAGAL!!!

Astaga! Jika Anda tidak menyadari hal ini, Anda mungkin akan frustrasi karena tidak ada perubahan pada behavior instruksi Anda yang akan menyebabkan ini. Di devnet itu berfungsi dengan baik, tetapi secara lokal gagal?!?

Ada kemampuan untuk meningkatkan keseluruhan anggaran Transaksi, katakanlah 300_000 CU, dan selamatkan kewarasan Anda, namun ini menunjukkan mengapa pengujian dengan Feature Parity memberikan cara proaktif untuk menghindari kebingungan.

Status Fitur

Cukup mudah untuk memeriksa fitur apa yang diaktifkan untuk cluster tertentu dengan perintah solana feature status.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.64de3bfa.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.779577da.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.64de3bfa.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.779577da.js
index e35a02fca..53cc1f3b5 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.64de3bfa.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.779577da.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.07ce7a66.js";var b="/assets/scfsd.cc67ec33.png";const f={},_=d(`

Teste de Paridade de Recursos

Ao testar seu programa, garantir que ele funcionar\xE1 da mesma maneira em v\xE1rios clusters \xE9 essencial tanto para a qualidade quanto para a obten\xE7\xE3o de resultados esperados.

Fatos

Ficha Informativa

  • Os recursos s\xE3o capacidades que s\xE3o introduzidas aos validadores da Solana e exigem ativa\xE7\xE3o para serem usadas.
  • Os recursos podem ser ativados em um cluster (por exemplo, testnet) mas n\xE3o em outro (por exemplo, mainnet-beta).
  • No entanto, ao executar o solana-test-validator padr\xE3o localmente, todos os recursos dispon\xEDveis em sua vers\xE3o da Solana s\xE3o ativados automaticamente. O resultado \xE9 que, ao testar localmente, as capacidades e resultados dos seus testes podem n\xE3o ser os mesmos ao implantar e executar em um cluster diferente!

Cen\xE1rio

Suponha que voc\xEA tenha uma Transa\xE7\xE3o que cont\xE9m tr\xEAs (3) instru\xE7\xF5es e cada instru\xE7\xE3o consome aproximadamente 100.000 Unidades de Computa\xE7\xE3o (CU). Ao executar na vers\xE3o Solana 1.8.x, voc\xEA observaria que o consumo de CU de suas instru\xE7\xF5es \xE9 semelhante ao seguinte:

Instru\xE7\xE3oCU InicialExecu\xE7\xE3oCU Restante
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Na vers\xE3o da Solana 1.9.2, foi introduzido um recurso chamado 'transaction wide compute cap' (recurso de computa\xE7\xE3o ampla de transa\xE7\xE3o), em que uma Transa\xE7\xE3o, por padr\xE3o, tem um or\xE7amento de 200.000 CU e as instru\xE7\xF5es encapsuladas s\xE3o deduzidas desse or\xE7amento de Transa\xE7\xE3o. Executar a mesma transa\xE7\xE3o como observado acima teria um comportamento muito diferente:

Instru\xE7\xE3oCU InicialExecu\xE7\xE3oCU Restante
1200_000-100_000100_000
2100_000-100_0000
30FALHA!!!FALHA!!!

Uau! Se voc\xEA n\xE3o estivesse ciente disso, provavelmente ficaria frustrado, j\xE1 que n\xE3o houve mudan\xE7a no comportamento da sua instru\xE7\xE3o que pudesse causar isso. Na devnet funcionou bem, mas localmente falhou?!?

Existe a possibilidade de aumentar o or\xE7amento total da Transa\xE7\xE3o, para digamos 300.000 CU, e recuperar sua sanidade, mas isso demonstra por que testar com a Paridade de Recursos fornece uma maneira proativa de evitar qualquer confus\xE3o.

Status do Recurso

\xC9 bem f\xE1cil verificar quais recursos est\xE3o habilitados para um cluster espec\xEDfico com o comando solana feature status.

solana feature status -ud   // Exibe por status de recurso para a devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.d411e3b3.js";var b="/assets/scfsd.cc67ec33.png";const f={},_=d(`

Teste de Paridade de Recursos

Ao testar seu programa, garantir que ele funcionar\xE1 da mesma maneira em v\xE1rios clusters \xE9 essencial tanto para a qualidade quanto para a obten\xE7\xE3o de resultados esperados.

Fatos

Ficha Informativa

  • Os recursos s\xE3o capacidades que s\xE3o introduzidas aos validadores da Solana e exigem ativa\xE7\xE3o para serem usadas.
  • Os recursos podem ser ativados em um cluster (por exemplo, testnet) mas n\xE3o em outro (por exemplo, mainnet-beta).
  • No entanto, ao executar o solana-test-validator padr\xE3o localmente, todos os recursos dispon\xEDveis em sua vers\xE3o da Solana s\xE3o ativados automaticamente. O resultado \xE9 que, ao testar localmente, as capacidades e resultados dos seus testes podem n\xE3o ser os mesmos ao implantar e executar em um cluster diferente!

Cen\xE1rio

Suponha que voc\xEA tenha uma Transa\xE7\xE3o que cont\xE9m tr\xEAs (3) instru\xE7\xF5es e cada instru\xE7\xE3o consome aproximadamente 100.000 Unidades de Computa\xE7\xE3o (CU). Ao executar na vers\xE3o Solana 1.8.x, voc\xEA observaria que o consumo de CU de suas instru\xE7\xF5es \xE9 semelhante ao seguinte:

Instru\xE7\xE3oCU InicialExecu\xE7\xE3oCU Restante
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Na vers\xE3o da Solana 1.9.2, foi introduzido um recurso chamado 'transaction wide compute cap' (recurso de computa\xE7\xE3o ampla de transa\xE7\xE3o), em que uma Transa\xE7\xE3o, por padr\xE3o, tem um or\xE7amento de 200.000 CU e as instru\xE7\xF5es encapsuladas s\xE3o deduzidas desse or\xE7amento de Transa\xE7\xE3o. Executar a mesma transa\xE7\xE3o como observado acima teria um comportamento muito diferente:

Instru\xE7\xE3oCU InicialExecu\xE7\xE3oCU Restante
1200_000-100_000100_000
2100_000-100_0000
30FALHA!!!FALHA!!!

Uau! Se voc\xEA n\xE3o estivesse ciente disso, provavelmente ficaria frustrado, j\xE1 que n\xE3o houve mudan\xE7a no comportamento da sua instru\xE7\xE3o que pudesse causar isso. Na devnet funcionou bem, mas localmente falhou?!?

Existe a possibilidade de aumentar o or\xE7amento total da Transa\xE7\xE3o, para digamos 300.000 CU, e recuperar sua sanidade, mas isso demonstra por que testar com a Paridade de Recursos fornece uma maneira proativa de evitar qualquer confus\xE3o.

Status do Recurso

\xC9 bem f\xE1cil verificar quais recursos est\xE3o habilitados para um cluster espec\xEDfico com o comando solana feature status.

solana feature status -ud   // Exibe por status de recurso para a devnet
 solana feature status -ut   // Exibe para a testnet
 solana feature status -um   // Exibe para a mainnet-beta
 solana feature status -ul   // Exibe para a rede local, requer a execu\xE7\xE3o do solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.8332b8fc.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.944582ed.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.8332b8fc.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.944582ed.js
index 470e3f1bf..631be8ba2 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.8332b8fc.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.944582ed.js
@@ -1,4 +1,4 @@
-import{_ as i,r as e,o as r,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const h={},g=b(`

\u0110\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity

Khi ki\u1EC3m th\u1EED ch\u01B0\u01A1ng tr\xECnh, ch\xFAng ta mu\u1ED1n ch\u1EAFc r\u1EB1ng ch\u01B0\u01A1ng tr\xECnh s\u1EBD ch\u1EA1y nh\u01B0 nhau tr\xEAn m\u1ECDi m\xF4i tr\u01B0\u1EDDng nh\u1EB1m \u0111\u1EA3m b\u1EA3o v\u1EC1 c\u1EA3 ch\u1EA5t l\u01B0\u1EE3ng s\u1EA3n ph\u1EA9m c\u0169ng nh\u01B0 ta t\u1EA1o gi\xE1 tr\u1ECB k\u1EF3 v\u1ECDng.

C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

  • \u0110\u1EC1 xu\u1EA5t l\xE0 kh\xF4ng b\u1EAFt bu\u1ED9c cho c\xE1c validator tr\xEAn Solana v\xE0 c\u1EA7n \u0111\u01B0\u1EE3c validator k\xEDch ho\u1EA1t \u0111\u1EC3 c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng.
  • \u0110\u1EC1 xu\u1EA5t c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t b\u1EDFi m\u1ED9t m\u1EA1ng (v\xED d\u1EE5 nh\u01B0 testnet) trong khi v\u1EABn v\xF4 hi\u1EC7u tr\xEAn m\u1EA1ng kh\xE1c (v\xED d\u1EE5 nh\u01B0 mainnet-beta).
  • Tuy nhi\xEAn, khi ch\u1EA1y ch\u1EBF \u0111\u1ED9 m\u1EB7c \u0111\u1ECBnh solana-test-validator d\u01B0\u1EDBi m\xE1y, t\u1EA5t c\u1EA3 c\xE1c \u0111\u1EC1 xu\u1EA5t s\u1EBD \u0111\u01B0\u1EE3c t\u1EF1 \u0111\u1ED9ng k\xEDch ho\u1EB7t v\xE0 s\u1EB5n s\xE0ng th\u1EF1c thi. K\u1EBFt qu\u1EA3 l\xE0 khi ki\u1EC3m th\u1EED tr\xEAn m\xE1y c\xF3 th\u1EC3 s\u1EBD sai kh\xE1c v\u1EDBi khi tri\u1EC3n khai ch\u01B0\u01A1ng tr\xECnh v\xE0 ki\u1EC3m th\u1EED tr\xEAn c\xE1c m\u1EA1ng Solana kh\xE1c!

T\xECnh hu\u1ED1ng gi\u1EA3 \u0111\u1ECBnh

Gi\u1EA3 s\u1EED b\u1EA1n c\xF3 m\u1ED9t Transaction ch\u01B0a 3 ch\u1EC9 th\u1ECB v\xE0 m\u1ED7i ch\u1EC9 th\u1ECB s\u1EBD ti\xEAu t\u1ED1n x\u1EA5p x\u1EC9 kho\u1EA3ng 100,000 \u0111\u01A1n v\u1ECB t\xEDnh to\xE1n (CU). Khi ch\u1EA1y tr\xEAn phi\xEAn b\u1EA3n Solana 1.8.x, b\u1EA1n s\u1EBD th\u1EA5y m\u1EE9c ti\xEAu th\u1EE5 CU c\u1EE7a c\xE1c ch\u1EC9 th\u1ECB nh\u01B0 sau:

Ch\u1EC9 th\u1ECBCU l\xFAc b\u1EAFt \u0111\u1EA7uTh\u1EF1c thiCU c\xF2n l\u1EA1i
1200,000-100,000100,000
2200,000-100,000100,000
3200,000-100,000100,000

Trong phi\xEAn b\u1EA3n Solana 1.9.2, c\xF3 m\u1ED9t \u0111\u1EC1 xu\u1EA5t \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 'transaction wide compute cap'. \u0110\u1EC3 xu\u1EA5t n\xE0y n\xF3i r\u1EB1ng m\u1ED9t Transaction b\u1EAFt \u0111\u1EA7u v\u1EDBi 200,000 CU m\u1EB7c \u0111\u1ECBnh v\xE0 t\u1EA5t c\u1EA3 c\xE1c ch\u1EC9 th\u1ECB trong Transaction s\u1EBD ti\xEAu thu c\u1ED9ng d\u1ED3n ng\xE2n s\xE1ch CU \u0111\xF3. Th\u1EED ch\u1EA1y l\u1EA1i c\xF9ng Transaction nh\u01B0ng v\u1EDBi phi\xEAn b\u1EA3n m\u1EDBi s\u1EBD cho ra k\u1EBFt qu\u1EA3 r\u1EA5t kh\xE1c:

Ch\u1EC9 th\u1ECBCU l\xFAc b\u1EAFt \u0111\u1EA7uTh\u1EF1c thiCU c\xF2n l\u1EA1i
1200,000-100,000100,000
2100,000-100,0000
30FAIL!!!FAIL!!!

V\xE3i! N\u1EBFu b\u1EA1n kh\xF4ng bi\u1EBFt c\xE1i n\xE0y th\xEC c\xF3 kh\u1EA3 n\u0103ng cao l\xE0 b\u1EA1n s\u1EBD c\u1EA3m th\u1EA5y c\u1EF1c d\u1ECB khi m\xE0 b\u1EA1n ch\u1EA3 thay \u0111\u1ED5i g\xEC trong Transction nh\u01B0ng devnet th\xEC ho\u1EA1t \u0111\u1ED9ng ngon l\xE0nh c\xF2n tr\xEAn m\xE1y th\xEC to\xE0n l\xE0 l\u1ED7i?!?

Th\u1EF1c ra v\u1EABn c\xF3 c\xE1c \u0111\u1EC3 t\u0103ng ng\xE2n s\xE1ch CU cho m\u1ED9t Transaction, gi\u1EA3 d\u1EE5 nh\u01B0 l\xE0 300,000 CU, \u0111\u1EC3 l\xE0m gi\u1EA3i ph\xE1p t\xECnh th\u1EBF. Nh\u01B0ng \u0111i\u1EC1u \u0111\xF3 cho th\u1EA5y \u0111\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity s\u1EBD cho ph\xE9p b\u1EA1n ch\u1EE7 \u0111\u1ED9ng tr\xE1nh nh\u1EEFng phi\u1EC1n h\xE0 tr\xEAn.

There is the ability to increase the overall Transaction budget, to lets say 300_000 CU, and salvage your sanity but this demonstrates why testing with Feature Parity provides a proactive way to avoid any confusion.

\u0110\u1EC1 xu\u1EA5t Tr\u1EA1ng th\xE1i

R\u1EA5t d\u1EC5 \u0111\u1EC3 ki\u1EC3m tra nh\u1EEFng \u0111\u1EC1 xu\u1EA5t n\xE0o \u0111ang \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t cho t\u1EEBng m\xF4i tr\u01B0\u1EDDng v\u1EDBi c\xE2u l\u1EC7nh solana feature status.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as i,r as e,o as r,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const h={},g=b(`

\u0110\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity

Khi ki\u1EC3m th\u1EED ch\u01B0\u01A1ng tr\xECnh, ch\xFAng ta mu\u1ED1n ch\u1EAFc r\u1EB1ng ch\u01B0\u01A1ng tr\xECnh s\u1EBD ch\u1EA1y nh\u01B0 nhau tr\xEAn m\u1ECDi m\xF4i tr\u01B0\u1EDDng nh\u1EB1m \u0111\u1EA3m b\u1EA3o v\u1EC1 c\u1EA3 ch\u1EA5t l\u01B0\u1EE3ng s\u1EA3n ph\u1EA9m c\u0169ng nh\u01B0 ta t\u1EA1o gi\xE1 tr\u1ECB k\u1EF3 v\u1ECDng.

C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

  • \u0110\u1EC1 xu\u1EA5t l\xE0 kh\xF4ng b\u1EAFt bu\u1ED9c cho c\xE1c validator tr\xEAn Solana v\xE0 c\u1EA7n \u0111\u01B0\u1EE3c validator k\xEDch ho\u1EA1t \u0111\u1EC3 c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng.
  • \u0110\u1EC1 xu\u1EA5t c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t b\u1EDFi m\u1ED9t m\u1EA1ng (v\xED d\u1EE5 nh\u01B0 testnet) trong khi v\u1EABn v\xF4 hi\u1EC7u tr\xEAn m\u1EA1ng kh\xE1c (v\xED d\u1EE5 nh\u01B0 mainnet-beta).
  • Tuy nhi\xEAn, khi ch\u1EA1y ch\u1EBF \u0111\u1ED9 m\u1EB7c \u0111\u1ECBnh solana-test-validator d\u01B0\u1EDBi m\xE1y, t\u1EA5t c\u1EA3 c\xE1c \u0111\u1EC1 xu\u1EA5t s\u1EBD \u0111\u01B0\u1EE3c t\u1EF1 \u0111\u1ED9ng k\xEDch ho\u1EB7t v\xE0 s\u1EB5n s\xE0ng th\u1EF1c thi. K\u1EBFt qu\u1EA3 l\xE0 khi ki\u1EC3m th\u1EED tr\xEAn m\xE1y c\xF3 th\u1EC3 s\u1EBD sai kh\xE1c v\u1EDBi khi tri\u1EC3n khai ch\u01B0\u01A1ng tr\xECnh v\xE0 ki\u1EC3m th\u1EED tr\xEAn c\xE1c m\u1EA1ng Solana kh\xE1c!

T\xECnh hu\u1ED1ng gi\u1EA3 \u0111\u1ECBnh

Gi\u1EA3 s\u1EED b\u1EA1n c\xF3 m\u1ED9t Transaction ch\u01B0a 3 ch\u1EC9 th\u1ECB v\xE0 m\u1ED7i ch\u1EC9 th\u1ECB s\u1EBD ti\xEAu t\u1ED1n x\u1EA5p x\u1EC9 kho\u1EA3ng 100,000 \u0111\u01A1n v\u1ECB t\xEDnh to\xE1n (CU). Khi ch\u1EA1y tr\xEAn phi\xEAn b\u1EA3n Solana 1.8.x, b\u1EA1n s\u1EBD th\u1EA5y m\u1EE9c ti\xEAu th\u1EE5 CU c\u1EE7a c\xE1c ch\u1EC9 th\u1ECB nh\u01B0 sau:

Ch\u1EC9 th\u1ECBCU l\xFAc b\u1EAFt \u0111\u1EA7uTh\u1EF1c thiCU c\xF2n l\u1EA1i
1200,000-100,000100,000
2200,000-100,000100,000
3200,000-100,000100,000

Trong phi\xEAn b\u1EA3n Solana 1.9.2, c\xF3 m\u1ED9t \u0111\u1EC1 xu\u1EA5t \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 'transaction wide compute cap'. \u0110\u1EC3 xu\u1EA5t n\xE0y n\xF3i r\u1EB1ng m\u1ED9t Transaction b\u1EAFt \u0111\u1EA7u v\u1EDBi 200,000 CU m\u1EB7c \u0111\u1ECBnh v\xE0 t\u1EA5t c\u1EA3 c\xE1c ch\u1EC9 th\u1ECB trong Transaction s\u1EBD ti\xEAu thu c\u1ED9ng d\u1ED3n ng\xE2n s\xE1ch CU \u0111\xF3. Th\u1EED ch\u1EA1y l\u1EA1i c\xF9ng Transaction nh\u01B0ng v\u1EDBi phi\xEAn b\u1EA3n m\u1EDBi s\u1EBD cho ra k\u1EBFt qu\u1EA3 r\u1EA5t kh\xE1c:

Ch\u1EC9 th\u1ECBCU l\xFAc b\u1EAFt \u0111\u1EA7uTh\u1EF1c thiCU c\xF2n l\u1EA1i
1200,000-100,000100,000
2100,000-100,0000
30FAIL!!!FAIL!!!

V\xE3i! N\u1EBFu b\u1EA1n kh\xF4ng bi\u1EBFt c\xE1i n\xE0y th\xEC c\xF3 kh\u1EA3 n\u0103ng cao l\xE0 b\u1EA1n s\u1EBD c\u1EA3m th\u1EA5y c\u1EF1c d\u1ECB khi m\xE0 b\u1EA1n ch\u1EA3 thay \u0111\u1ED5i g\xEC trong Transction nh\u01B0ng devnet th\xEC ho\u1EA1t \u0111\u1ED9ng ngon l\xE0nh c\xF2n tr\xEAn m\xE1y th\xEC to\xE0n l\xE0 l\u1ED7i?!?

Th\u1EF1c ra v\u1EABn c\xF3 c\xE1c \u0111\u1EC3 t\u0103ng ng\xE2n s\xE1ch CU cho m\u1ED9t Transaction, gi\u1EA3 d\u1EE5 nh\u01B0 l\xE0 300,000 CU, \u0111\u1EC3 l\xE0m gi\u1EA3i ph\xE1p t\xECnh th\u1EBF. Nh\u01B0ng \u0111i\u1EC1u \u0111\xF3 cho th\u1EA5y \u0111\u1EC1 xu\u1EA5t Ki\u1EC3m th\u1EED Parity s\u1EBD cho ph\xE9p b\u1EA1n ch\u1EE7 \u0111\u1ED9ng tr\xE1nh nh\u1EEFng phi\u1EC1n h\xE0 tr\xEAn.

There is the ability to increase the overall Transaction budget, to lets say 300_000 CU, and salvage your sanity but this demonstrates why testing with Feature Parity provides a proactive way to avoid any confusion.

\u0110\u1EC1 xu\u1EA5t Tr\u1EA1ng th\xE1i

R\u1EA5t d\u1EC5 \u0111\u1EC3 ki\u1EC3m tra nh\u1EEFng \u0111\u1EC1 xu\u1EA5t n\xE0o \u0111ang \u0111\u01B0\u1EE3c k\xEDch ho\u1EA1t cho t\u1EEBng m\xF4i tr\u01B0\u1EDDng v\u1EDBi c\xE2u l\u1EC7nh solana feature status.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.60d0cda5.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.9d3ad8df.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.60d0cda5.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.9d3ad8df.js
index 5d4b7e95a..8a7216444 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.60d0cda5.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.9d3ad8df.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.07ce7a66.js";var b="/assets/scfsd.cc67ec33.png";const f={},g=d(`

Prueba de paridad de caracter\xEDsticas

Al probar su programa, la garant\xEDa de que se ejecutar\xE1 de la misma manera en varios clusters es esencial tanto para la calidad como para producir los resultados esperados.

Hechos

Hoja de hechos

  • Las caracter\xEDsticas son capacidades que se introducen en los validadores de Solana y requieren activaci\xF3n para ser utilizadas.
  • Las caracter\xEDsticas pueden activarse en un cl\xFAster (p. ej., testnet) pero no en otro (p. ej., mainnet-beta).
  • Sin embargo; al ejecutar solana-test-validator localmente, todas las caracter\xEDsticas disponibles se activan autom\xE1ticamente. El resultado es que cuando se prueba localmente, las capacidades y los resultados puede que no sean las mismas que al ejecutar en un cl\xFAster diferente!

Escenario

Suponga que tiene una Transacci\xF3n que conten\xEDa tres (3) instrucciones y cada instrucci\xF3n consume aproximadamente 100_000 Unidades de c\xF3mputo (CU). Cuando se ejecuta en una versi\xF3n de Solana 1.8.x, observar\xEDa un consumo de CU de instrucci\xF3n similar a:

InstructionInicio de CUEjecuci\xF3nCU Restante
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

En Solana 1.9.2, se introdujo una funci\xF3n llamada 'l\xEDmite de c\xF3mputo amplio de transacci\xF3n' donde una transacci\xF3n, de forma predeterminada, tiene un presupuesto de 200_000 CU y las instrucciones encapsuladas draw down de ese presupuesto de transacci\xF3n. Corriendo la misma transacci\xF3n como se se\xF1al\xF3 anteriormente tendr\xEDa un comportamiento muy diferente:

InstructionInicio de CUEjecuci\xF3nCU Restante
1200_000-100_000100_000
2100_000-100_0000
30FALLA!!!FALLA!!!

\xA1Ay! Si no estuviera al tanto de esto, probablemente se sentir\xEDa frustrado ya que no hubo cambios en su comportamiento de instrucci\xF3n que causar\xEDa esto. En devnet funcion\xF3 bien, pero localmente estaba fallando?!?

Existe la posibilidad de aumentar el presupuesto general de transacciones, digamos 300_000 CU, y que no falle pero esto demuestra por qu\xE9 probar con Feature Parity proporciona una forma proactiva de evitar confusiones.

Estado de la funci\xF3n

Es bastante f\xE1cil verificar qu\xE9 funciones est\xE1n habilitadas para un cl\xFAster en particular con el comando solana feature status.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.d411e3b3.js";var b="/assets/scfsd.cc67ec33.png";const f={},g=d(`

Prueba de paridad de caracter\xEDsticas

Al probar su programa, la garant\xEDa de que se ejecutar\xE1 de la misma manera en varios clusters es esencial tanto para la calidad como para producir los resultados esperados.

Hechos

Hoja de hechos

  • Las caracter\xEDsticas son capacidades que se introducen en los validadores de Solana y requieren activaci\xF3n para ser utilizadas.
  • Las caracter\xEDsticas pueden activarse en un cl\xFAster (p. ej., testnet) pero no en otro (p. ej., mainnet-beta).
  • Sin embargo; al ejecutar solana-test-validator localmente, todas las caracter\xEDsticas disponibles se activan autom\xE1ticamente. El resultado es que cuando se prueba localmente, las capacidades y los resultados puede que no sean las mismas que al ejecutar en un cl\xFAster diferente!

Escenario

Suponga que tiene una Transacci\xF3n que conten\xEDa tres (3) instrucciones y cada instrucci\xF3n consume aproximadamente 100_000 Unidades de c\xF3mputo (CU). Cuando se ejecuta en una versi\xF3n de Solana 1.8.x, observar\xEDa un consumo de CU de instrucci\xF3n similar a:

InstructionInicio de CUEjecuci\xF3nCU Restante
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

En Solana 1.9.2, se introdujo una funci\xF3n llamada 'l\xEDmite de c\xF3mputo amplio de transacci\xF3n' donde una transacci\xF3n, de forma predeterminada, tiene un presupuesto de 200_000 CU y las instrucciones encapsuladas draw down de ese presupuesto de transacci\xF3n. Corriendo la misma transacci\xF3n como se se\xF1al\xF3 anteriormente tendr\xEDa un comportamiento muy diferente:

InstructionInicio de CUEjecuci\xF3nCU Restante
1200_000-100_000100_000
2100_000-100_0000
30FALLA!!!FALLA!!!

\xA1Ay! Si no estuviera al tanto de esto, probablemente se sentir\xEDa frustrado ya que no hubo cambios en su comportamiento de instrucci\xF3n que causar\xEDa esto. En devnet funcion\xF3 bien, pero localmente estaba fallando?!?

Existe la posibilidad de aumentar el presupuesto general de transacciones, digamos 300_000 CU, y que no falle pero esto demuestra por qu\xE9 probar con Feature Parity proporciona una forma proactiva de evitar confusiones.

Estado de la funci\xF3n

Es bastante f\xE1cil verificar qu\xE9 funciones est\xE1n habilitadas para un cl\xFAster en particular con el comando solana feature status.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.441250fa.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.a141aa71.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.441250fa.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.a141aa71.js
index 37702060a..e79d55430 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.441250fa.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.a141aa71.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const _={},f=b(`

\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5

\u5F53\u6D4B\u8BD5\u7A0B\u5E8F\u65F6\uFF0C\u786E\u4FDD\u5B83\u5728\u5404\u4E2A\u96C6\u7FA4\u4E2D\u4EE5\u76F8\u540C\u7684\u65B9\u5F0F\u8FD0\u884C\u5BF9\u4E8E\u786E\u4FDD\u8D28\u91CF\u548C\u4EA7\u751F\u9884\u671F\u7ED3\u679C\u975E\u5E38\u91CD\u8981\u3002

\u7EFC\u8FF0

\u4E8B\u5B9E\u8868

  • \u529F\u80FD\u662F\u4E3A Solana \u9A8C\u8BC1\u8282\u70B9\u5F15\u5165\u7684\u80FD\u529B\uFF0C\u9700\u8981\u6FC0\u6D3B\u624D\u80FD\u4F7F\u7528\u3002
  • \u67D0\u4E2A\u96C6\u7FA4\uFF08\u4F8B\u5982\u6D4B\u8BD5\u7F51\uFF09\u4E2D\u53EF\u80FD\u6FC0\u6D3B\u4E86\u67D0\u4E9B\u7279\u6027\uFF0C\u800C\u53E6\u4E00\u4E2A\u96C6\u7FA4\uFF08\u4F8B\u5982\u4E3B\u7F51\u6D4B\u8BD5\u7F51\uFF09\u5219\u672A\u6FC0\u6D3B\u3002
  • \u7136\u800C\uFF0C\u5728\u672C\u5730\u8FD0\u884C\u9ED8\u8BA4\u7684solana-test-validator\u65F6\uFF0C\u4F60\u7684 Solana \u7248\u672C\u4E2D\u7684\u6240\u6709\u53EF\u7528\u529F\u80FD\u90FD\u4F1A\u81EA\u52A8\u6FC0\u6D3B\u3002\u7ED3\u679C\u662F\uFF0C\u5728\u672C\u5730\u6D4B\u8BD5\u65F6\uFF0C\u7279\u6027\u548C\u6D4B\u8BD5\u7ED3\u679C\u53EF\u80FD\u4E0E\u5728\u4E0D\u540C\u96C6\u7FA4\u4E2D\u90E8\u7F72\u548C\u8FD0\u884C\u65F6\u4E0D\u540C\uFF01

\u573A\u666F

\u5047\u8BBE\u4F60\u6709\u4E00\u4E2A\u5305\u542B\u4E09\uFF083\uFF09\u6761\u6307\u4EE4\u7684\u4EA4\u6613\uFF0C\u6BCF\u4E2A\u6307\u4EE4\u5927\u7EA6\u6D88\u8017 100,000 \u8BA1\u7B97\u5355\u5143\uFF08Compute Units\uFF0CCU\uFF09\u3002\u5728\u8FD0\u884C Solana 1.8.x \u7248\u672C\u65F6\uFF0C\u4F60\u4F1A\u89C2\u5BDF\u5230\u6307\u4EE4\u7684\u8BA1\u7B97\u5355\u5143\u6D88\u8017\u7C7B\u4F3C\u4E8E\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\u5728 Solana 1.9.2 \u4E2D\u5F15\u5165\u4E86\u4E00\u4E2A\u540D\u4E3A\u201Ctransaction wide compute cap\u201D\u7684\u529F\u80FD\uFF0C\u5176\u4E2D\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u4E00\u4E2A\u4EA4\u6613\u5177\u6709 200,000 \u8BA1\u7B97\u5355\u5143\uFF08CU\uFF09\u7684\u9884\u7B97\uFF0C\u5C01\u88C5\u7684\u6307\u4EE4\u4ECE\u8BE5\u4EA4\u6613\u9884\u7B97\u4E2D\u6D88\u8017\u3002\u8FD0\u884C\u4E0A\u8FF0\u76F8\u540C\u7684\u4EA4\u6613\u5C06\u4F1A\u6709\u975E\u5E38\u4E0D\u540C\u7684\u884C\u4E3A\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\u5929\u54EA\uFF01\u5982\u679C\u4F60\u4E0D\u77E5\u9053\u8FD9\u4E00\u70B9\uFF0C\u4F60\u53EF\u80FD\u4F1A\u611F\u5230\u6CAE\u4E27\uFF0C\u56E0\u4E3A\u4F60\u7684\u6307\u4EE4\u884C\u4E3A\u6CA1\u6709\u4EFB\u4F55\u53D8\u5316\u4F1A\u5BFC\u81F4\u8FD9\u79CD\u60C5\u51B5\u3002\u5728\u5F00\u53D1\u7F51\u7EDC\u4E0A\u5B83\u6B63\u5E38\u5DE5\u4F5C\uFF0C\u4F46\u5728\u672C\u5730\u5374\u5931\u8D25\u4E86\uFF1F\uFF01\uFF1F

\u4F60\u53EF\u4EE5\u589E\u52A0\u6574\u4F53\u4EA4\u6613\u9884\u7B97\uFF0C\u6BD4\u5982\u5C06\u5176\u589E\u52A0\u5230 300,000 \u8BA1\u7B97\u5355\u5143\uFF08CU\uFF09\uFF0C\u6765\u4FDD\u6301\u4F60\u7684\u7406\u667A\uFF0C\u4F46\u8FD9\u4E5F\u5C55\u793A\u4E86\u4E3A\u4EC0\u4E48\u4EE5\u529F\u80FD\u76F8\u7B49\u7684\u65B9\u5F0F\u8FDB\u884C\u6D4B\u8BD5\u662F\u907F\u514D\u4EFB\u4F55\u6DF7\u6DC6\u7684\u79EF\u6781\u65B9\u5F0F\u3002

\u529F\u80FD\u72B6\u6001

\u4F7F\u7528solana feature status\u547D\u4EE4\u53EF\u4EE5\u5F88\u5BB9\u6613\u5730\u68C0\u67E5\u7279\u5B9A\u96C6\u7FA4\u542F\u7528\u4E86\u54EA\u4E9B\u529F\u80FD\u3002

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const _={},f=b(`

\u529F\u80FD\u76F8\u7B49\u6D4B\u8BD5

\u5F53\u6D4B\u8BD5\u7A0B\u5E8F\u65F6\uFF0C\u786E\u4FDD\u5B83\u5728\u5404\u4E2A\u96C6\u7FA4\u4E2D\u4EE5\u76F8\u540C\u7684\u65B9\u5F0F\u8FD0\u884C\u5BF9\u4E8E\u786E\u4FDD\u8D28\u91CF\u548C\u4EA7\u751F\u9884\u671F\u7ED3\u679C\u975E\u5E38\u91CD\u8981\u3002

\u7EFC\u8FF0

\u4E8B\u5B9E\u8868

  • \u529F\u80FD\u662F\u4E3A Solana \u9A8C\u8BC1\u8282\u70B9\u5F15\u5165\u7684\u80FD\u529B\uFF0C\u9700\u8981\u6FC0\u6D3B\u624D\u80FD\u4F7F\u7528\u3002
  • \u67D0\u4E2A\u96C6\u7FA4\uFF08\u4F8B\u5982\u6D4B\u8BD5\u7F51\uFF09\u4E2D\u53EF\u80FD\u6FC0\u6D3B\u4E86\u67D0\u4E9B\u7279\u6027\uFF0C\u800C\u53E6\u4E00\u4E2A\u96C6\u7FA4\uFF08\u4F8B\u5982\u4E3B\u7F51\u6D4B\u8BD5\u7F51\uFF09\u5219\u672A\u6FC0\u6D3B\u3002
  • \u7136\u800C\uFF0C\u5728\u672C\u5730\u8FD0\u884C\u9ED8\u8BA4\u7684solana-test-validator\u65F6\uFF0C\u4F60\u7684 Solana \u7248\u672C\u4E2D\u7684\u6240\u6709\u53EF\u7528\u529F\u80FD\u90FD\u4F1A\u81EA\u52A8\u6FC0\u6D3B\u3002\u7ED3\u679C\u662F\uFF0C\u5728\u672C\u5730\u6D4B\u8BD5\u65F6\uFF0C\u7279\u6027\u548C\u6D4B\u8BD5\u7ED3\u679C\u53EF\u80FD\u4E0E\u5728\u4E0D\u540C\u96C6\u7FA4\u4E2D\u90E8\u7F72\u548C\u8FD0\u884C\u65F6\u4E0D\u540C\uFF01

\u573A\u666F

\u5047\u8BBE\u4F60\u6709\u4E00\u4E2A\u5305\u542B\u4E09\uFF083\uFF09\u6761\u6307\u4EE4\u7684\u4EA4\u6613\uFF0C\u6BCF\u4E2A\u6307\u4EE4\u5927\u7EA6\u6D88\u8017 100,000 \u8BA1\u7B97\u5355\u5143\uFF08Compute Units\uFF0CCU\uFF09\u3002\u5728\u8FD0\u884C Solana 1.8.x \u7248\u672C\u65F6\uFF0C\u4F60\u4F1A\u89C2\u5BDF\u5230\u6307\u4EE4\u7684\u8BA1\u7B97\u5355\u5143\u6D88\u8017\u7C7B\u4F3C\u4E8E\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\u5728 Solana 1.9.2 \u4E2D\u5F15\u5165\u4E86\u4E00\u4E2A\u540D\u4E3A\u201Ctransaction wide compute cap\u201D\u7684\u529F\u80FD\uFF0C\u5176\u4E2D\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u4E00\u4E2A\u4EA4\u6613\u5177\u6709 200,000 \u8BA1\u7B97\u5355\u5143\uFF08CU\uFF09\u7684\u9884\u7B97\uFF0C\u5C01\u88C5\u7684\u6307\u4EE4\u4ECE\u8BE5\u4EA4\u6613\u9884\u7B97\u4E2D\u6D88\u8017\u3002\u8FD0\u884C\u4E0A\u8FF0\u76F8\u540C\u7684\u4EA4\u6613\u5C06\u4F1A\u6709\u975E\u5E38\u4E0D\u540C\u7684\u884C\u4E3A\uFF1A

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\u5929\u54EA\uFF01\u5982\u679C\u4F60\u4E0D\u77E5\u9053\u8FD9\u4E00\u70B9\uFF0C\u4F60\u53EF\u80FD\u4F1A\u611F\u5230\u6CAE\u4E27\uFF0C\u56E0\u4E3A\u4F60\u7684\u6307\u4EE4\u884C\u4E3A\u6CA1\u6709\u4EFB\u4F55\u53D8\u5316\u4F1A\u5BFC\u81F4\u8FD9\u79CD\u60C5\u51B5\u3002\u5728\u5F00\u53D1\u7F51\u7EDC\u4E0A\u5B83\u6B63\u5E38\u5DE5\u4F5C\uFF0C\u4F46\u5728\u672C\u5730\u5374\u5931\u8D25\u4E86\uFF1F\uFF01\uFF1F

\u4F60\u53EF\u4EE5\u589E\u52A0\u6574\u4F53\u4EA4\u6613\u9884\u7B97\uFF0C\u6BD4\u5982\u5C06\u5176\u589E\u52A0\u5230 300,000 \u8BA1\u7B97\u5355\u5143\uFF08CU\uFF09\uFF0C\u6765\u4FDD\u6301\u4F60\u7684\u7406\u667A\uFF0C\u4F46\u8FD9\u4E5F\u5C55\u793A\u4E86\u4E3A\u4EC0\u4E48\u4EE5\u529F\u80FD\u76F8\u7B49\u7684\u65B9\u5F0F\u8FDB\u884C\u6D4B\u8BD5\u662F\u907F\u514D\u4EFB\u4F55\u6DF7\u6DC6\u7684\u79EF\u6781\u65B9\u5F0F\u3002

\u529F\u80FD\u72B6\u6001

\u4F7F\u7528solana feature status\u547D\u4EE4\u53EF\u4EE5\u5F88\u5BB9\u6613\u5730\u68C0\u67E5\u7279\u5B9A\u96C6\u7FA4\u542F\u7528\u4E86\u54EA\u4E9B\u529F\u80FD\u3002

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.110a0e04.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.a6057c8b.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.110a0e04.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.a6057c8b.js
index ca0a08ea4..fcacb47d3 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.110a0e04.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.a6057c8b.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.07ce7a66.js";var b="/assets/scfsd.cc67ec33.png";const f={},_=d(`

Test de Conformit\xE9 des Fonctionnalit\xE9s

Lorsque vous testez votre programme, il est essentiel de s'assurer qu'il fonctionnera de la m\xEAme mani\xE8re dans diff\xE9rents clusters, tant pour la qualit\xE9 que pour l'obtention des r\xE9sultats attendus.

Faits

Fiche d'Information

  • Les fonctionnalit\xE9s sont des changements qui sont introduits dans le code des validateurs Solana et qui n\xE9cessitent une activation pour \xEAtre utilis\xE9s.
  • Les fonctionnalit\xE9s peuvent \xEAtre activ\xE9es dans un cluster (par exemple testnet) mais pas dans un autre (par exemple mainnet-beta).
  • Cependant, lorsque vous ex\xE9cutez localement la version par d\xE9faut de solana-test-validator, toutes les fonctionnalit\xE9s disponibles dans votre version de Solana sont automatiquement activ\xE9es. Le r\xE9sultat est que lorsque vous testez localement, les fonctionnalit\xE9s et les r\xE9sultats de vos tests peuvent ne pas \xEAtre les m\xEAmes lorsque vous d\xE9ployez et ex\xE9cutez dans un cluster diff\xE9rent !

Sc\xE9nario

Supposons que vous ayez une Transaction qui contient trois (3) instructions et que chaque instruction consomme environ 100_000 Unit\xE9s de Calcul (UC). Lors de l'ex\xE9cution sur une version Solana 1.8.x, vous observeriez une consommation de CU d'instruction ressemblant \xE0 :

InstructionCU de d\xE9partEx\xE9cutionCU Restants
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Dans Solana 1.9.2, une fonctionnalit\xE9 appel\xE9e "plafond de calcul pour l'ensemble des transactions (transaction wide compute cap)" a \xE9t\xE9 introduite. Par d\xE9faut, une Transaction a un budget de 200_000 CU et les instructions qui la composent vont d\xE9biter ce budget de Transaction. L'ex\xE9cution de la m\xEAme transaction indiqu\xE9e ci-dessus aurait un comportement tr\xE8s diff\xE9rent :

InstructionCU de d\xE9partEx\xE9cutionCU Restants
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

A\xEFe ! Si vous n'en \xE9tiez pas conscient, vous seriez probablement frustr\xE9 car aucun changement dans vos instructions n'aurait pu provoquer ce ph\xE9nom\xE8ne. Sur le devnet il fonctionne bien, mais localement il \xE9choue ?!?

Il est possible d'augmenter le budget global de la Transaction, par exemple \xE0 300_000 UC, et de sauver votre sant\xE9 mentale, mais cela montre pourquoi les tests avec _Conformit\xE9 des Fonctionnalit\xE9s constituent un bon moyen d'\xE9viter toute confusion.

Statut de la Fonctionnalit\xE9

Il est assez facile de v\xE9rifier quelles fonctionnalit\xE9s sont disponibles pour un cluster donn\xE9 avec la commande solana feature status.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as d,d as s}from"./app.d411e3b3.js";var b="/assets/scfsd.cc67ec33.png";const f={},_=d(`

Test de Conformit\xE9 des Fonctionnalit\xE9s

Lorsque vous testez votre programme, il est essentiel de s'assurer qu'il fonctionnera de la m\xEAme mani\xE8re dans diff\xE9rents clusters, tant pour la qualit\xE9 que pour l'obtention des r\xE9sultats attendus.

Faits

Fiche d'Information

  • Les fonctionnalit\xE9s sont des changements qui sont introduits dans le code des validateurs Solana et qui n\xE9cessitent une activation pour \xEAtre utilis\xE9s.
  • Les fonctionnalit\xE9s peuvent \xEAtre activ\xE9es dans un cluster (par exemple testnet) mais pas dans un autre (par exemple mainnet-beta).
  • Cependant, lorsque vous ex\xE9cutez localement la version par d\xE9faut de solana-test-validator, toutes les fonctionnalit\xE9s disponibles dans votre version de Solana sont automatiquement activ\xE9es. Le r\xE9sultat est que lorsque vous testez localement, les fonctionnalit\xE9s et les r\xE9sultats de vos tests peuvent ne pas \xEAtre les m\xEAmes lorsque vous d\xE9ployez et ex\xE9cutez dans un cluster diff\xE9rent !

Sc\xE9nario

Supposons que vous ayez une Transaction qui contient trois (3) instructions et que chaque instruction consomme environ 100_000 Unit\xE9s de Calcul (UC). Lors de l'ex\xE9cution sur une version Solana 1.8.x, vous observeriez une consommation de CU d'instruction ressemblant \xE0 :

InstructionCU de d\xE9partEx\xE9cutionCU Restants
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Dans Solana 1.9.2, une fonctionnalit\xE9 appel\xE9e "plafond de calcul pour l'ensemble des transactions (transaction wide compute cap)" a \xE9t\xE9 introduite. Par d\xE9faut, une Transaction a un budget de 200_000 CU et les instructions qui la composent vont d\xE9biter ce budget de Transaction. L'ex\xE9cution de la m\xEAme transaction indiqu\xE9e ci-dessus aurait un comportement tr\xE8s diff\xE9rent :

InstructionCU de d\xE9partEx\xE9cutionCU Restants
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

A\xEFe ! Si vous n'en \xE9tiez pas conscient, vous seriez probablement frustr\xE9 car aucun changement dans vos instructions n'aurait pu provoquer ce ph\xE9nom\xE8ne. Sur le devnet il fonctionne bien, mais localement il \xE9choue ?!?

Il est possible d'augmenter le budget global de la Transaction, par exemple \xE0 300_000 UC, et de sauver votre sant\xE9 mentale, mais cela montre pourquoi les tests avec _Conformit\xE9 des Fonctionnalit\xE9s constituent un bon moyen d'\xE9viter toute confusion.

Statut de la Fonctionnalit\xE9

Il est assez facile de v\xE9rifier quelles fonctionnalit\xE9s sont disponibles pour un cluster donn\xE9 avec la commande solana feature status.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.6b5afb2f.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.e9479f13.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.6b5afb2f.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.e9479f13.js
index 802c83eb6..63f03c7cf 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.6b5afb2f.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.e9479f13.js
@@ -1,4 +1,4 @@
-import{_ as e,r as p,o,c,a as n,b as s,F as l,e as i,d as t}from"./app.07ce7a66.js";var r="/assets/scfsd.cc67ec33.png";const u={},k=i(`

Feature Parity Testing (\xD6zellik Parite Testi)

Program\u0131n\u0131z\u0131 test ederken, \xE7e\u015Fitli k\xFCmelerde ayn\u0131 \u015Fekilde \xE7al\u0131\u015Faca\u011F\u0131n\u0131n g\xFCvencesi, hem kalite hem de beklenen sonu\xE7lar\u0131n \xFCretilmesi i\xE7in esast\u0131r.

Facts (\xD6zet Bilgiler)

:::Bilgi Tablosu

Features, Solana do\u011Frulay\u0131c\u0131lar\u0131na sunulan ve kullan\u0131lmas\u0131 i\xE7in etkinle\u015Ftirme gerektiren yeteneklerdir. Features bir k\xFCmede (\xF6r. testnet) etkinle\u015Ftirilebilir, ancak ba\u015Fka bir k\xFCmede (\xF6r. ana a\u011F-beta) etkinle\u015Ftirilemez. Yine de; varsay\u0131lan solana-test-validator'\u0131 yerel olarak \xE7al\u0131\u015Ft\u0131r\u0131rken, Solana s\xFCr\xFCm\xFCn\xFCzdeki mevcut t\xFCm \xF6zellikler otomatik olarak etkinle\u015Ftirilir. Sonu\xE7 olarak, yerel olarak test ederken, farkl\u0131 bir k\xFCmede da\u011F\u0131t\u0131rken ve \xE7al\u0131\u015Ft\u0131r\u0131rken testinizin yetenekleri ve sonu\xE7lar\u0131 ayn\u0131 olmayabilir! :::

Scenario (Senaryo)

\xDC\xE7 (3) talimat i\xE7eren bir i\u015Fleminiz oldu\u011Funu ve her talimat\u0131n yakla\u015F\u0131k 100_000 \u0130\u015Flem Birimi (Compute Unit - CU) t\xFCketti\u011Fini varsayal\u0131m. Bir Solana 1.8.x s\xFCr\xFCm\xFCnde \xE7al\u0131\u015F\u0131rken, talimat CU t\xFCketiminizi a\u015Fa\u011F\u0131dakine benzer \u015Fekilde g\xF6zlemlersiniz:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Solana 1.9.2'de, bir i\u015Flemin varsay\u0131lan olarak 200_000 CU b\xFCt\xE7esine sahip oldu\u011Fu ve kaps\xFCllenmi\u015F talimatlar\u0131n bu i\u015Flem b\xFCt\xE7esinden \xE7ekildi\u011Fi 'transaction i\u015Flem s\u0131n\u0131r\u0131' ad\u0131 verilen bir \xF6zellik vard\u0131r. Yukar\u0131da belirtildi\u011Fi gibi ayn\u0131 i\u015Flemi \xE7al\u0131\u015Ft\u0131rmak \xE7ok farkl\u0131 davran\u0131\u015Flara sahip olacakt\u0131r:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30HATA!!!HATA!!!

Evet! Bundan habersiz olsayd\u0131n\u0131z, talimat davran\u0131\u015F\u0131n\u0131zda buna neden olacak bir de\u011Fi\u015Fiklik olmad\u0131\u011F\u0131 i\xE7in muhtemelen hayal k\u0131r\u0131kl\u0131\u011F\u0131na u\u011Frars\u0131n\u0131z. Devnet'te iyi \xE7al\u0131\u015Ft\u0131, ancak yerel olarak ba\u015Far\u0131s\u0131z m\u0131 oldu?!?

\xD6rne\u011Fin 300_000 CU gibi genel \u0130\u015Flem b\xFCt\xE7esini art\u0131rma ve ak\u0131l sa\u011Fl\u0131\u011F\u0131n\u0131z\u0131 koruma olana\u011F\u0131 vard\u0131r, ancak bu, Feature Parity (\xD6zellik E\u015Fli\u011Fi) ile testin neden herhangi bir kar\u0131\u015F\u0131kl\u0131\u011F\u0131 \xF6nlemek i\xE7in proaktif bir yol sa\u011Flad\u0131\u011F\u0131n\u0131 g\xF6sterir.

Feature Status (\xD6zellik Durumu)

Solana feature status komutuyla belirli bir k\xFCme i\xE7in hangi \xF6zelliklerin etkinle\u015Ftirildi\u011Fini kontrol etmek olduk\xE7a kolayd\u0131r.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as e,r as p,o,c,a as n,b as s,F as l,e as i,d as t}from"./app.d411e3b3.js";var r="/assets/scfsd.cc67ec33.png";const u={},k=i(`

Feature Parity Testing (\xD6zellik Parite Testi)

Program\u0131n\u0131z\u0131 test ederken, \xE7e\u015Fitli k\xFCmelerde ayn\u0131 \u015Fekilde \xE7al\u0131\u015Faca\u011F\u0131n\u0131n g\xFCvencesi, hem kalite hem de beklenen sonu\xE7lar\u0131n \xFCretilmesi i\xE7in esast\u0131r.

Facts (\xD6zet Bilgiler)

:::Bilgi Tablosu

Features, Solana do\u011Frulay\u0131c\u0131lar\u0131na sunulan ve kullan\u0131lmas\u0131 i\xE7in etkinle\u015Ftirme gerektiren yeteneklerdir. Features bir k\xFCmede (\xF6r. testnet) etkinle\u015Ftirilebilir, ancak ba\u015Fka bir k\xFCmede (\xF6r. ana a\u011F-beta) etkinle\u015Ftirilemez. Yine de; varsay\u0131lan solana-test-validator'\u0131 yerel olarak \xE7al\u0131\u015Ft\u0131r\u0131rken, Solana s\xFCr\xFCm\xFCn\xFCzdeki mevcut t\xFCm \xF6zellikler otomatik olarak etkinle\u015Ftirilir. Sonu\xE7 olarak, yerel olarak test ederken, farkl\u0131 bir k\xFCmede da\u011F\u0131t\u0131rken ve \xE7al\u0131\u015Ft\u0131r\u0131rken testinizin yetenekleri ve sonu\xE7lar\u0131 ayn\u0131 olmayabilir! :::

Scenario (Senaryo)

\xDC\xE7 (3) talimat i\xE7eren bir i\u015Fleminiz oldu\u011Funu ve her talimat\u0131n yakla\u015F\u0131k 100_000 \u0130\u015Flem Birimi (Compute Unit - CU) t\xFCketti\u011Fini varsayal\u0131m. Bir Solana 1.8.x s\xFCr\xFCm\xFCnde \xE7al\u0131\u015F\u0131rken, talimat CU t\xFCketiminizi a\u015Fa\u011F\u0131dakine benzer \u015Fekilde g\xF6zlemlersiniz:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Solana 1.9.2'de, bir i\u015Flemin varsay\u0131lan olarak 200_000 CU b\xFCt\xE7esine sahip oldu\u011Fu ve kaps\xFCllenmi\u015F talimatlar\u0131n bu i\u015Flem b\xFCt\xE7esinden \xE7ekildi\u011Fi 'transaction i\u015Flem s\u0131n\u0131r\u0131' ad\u0131 verilen bir \xF6zellik vard\u0131r. Yukar\u0131da belirtildi\u011Fi gibi ayn\u0131 i\u015Flemi \xE7al\u0131\u015Ft\u0131rmak \xE7ok farkl\u0131 davran\u0131\u015Flara sahip olacakt\u0131r:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30HATA!!!HATA!!!

Evet! Bundan habersiz olsayd\u0131n\u0131z, talimat davran\u0131\u015F\u0131n\u0131zda buna neden olacak bir de\u011Fi\u015Fiklik olmad\u0131\u011F\u0131 i\xE7in muhtemelen hayal k\u0131r\u0131kl\u0131\u011F\u0131na u\u011Frars\u0131n\u0131z. Devnet'te iyi \xE7al\u0131\u015Ft\u0131, ancak yerel olarak ba\u015Far\u0131s\u0131z m\u0131 oldu?!?

\xD6rne\u011Fin 300_000 CU gibi genel \u0130\u015Flem b\xFCt\xE7esini art\u0131rma ve ak\u0131l sa\u011Fl\u0131\u011F\u0131n\u0131z\u0131 koruma olana\u011F\u0131 vard\u0131r, ancak bu, Feature Parity (\xD6zellik E\u015Fli\u011Fi) ile testin neden herhangi bir kar\u0131\u015F\u0131kl\u0131\u011F\u0131 \xF6nlemek i\xE7in proaktif bir yol sa\u011Flad\u0131\u011F\u0131n\u0131 g\xF6sterir.

Feature Status (\xD6zellik Durumu)

Solana feature status komutuyla belirli bir k\xFCme i\xE7in hangi \xF6zelliklerin etkinle\u015Ftirildi\u011Fini kontrol etmek olduk\xE7a kolayd\u0131r.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.e87e0e6e.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.ec36c4c1.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.e87e0e6e.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.ec36c4c1.js
index 711114fa8..4bfaf4515 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.e87e0e6e.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.ec36c4c1.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const _={},f=b(`

\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8

\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30C6\u30B9\u30C8\u3059\u308B\u3068\u304D\u3001\u3055\u307E\u3056\u307E\u306A\u30AF\u30E9\u30B9\u30BF\u30FC\u3067\u540C\u3058\u3088\u3046\u306B\u5B9F\u884C\u3055\u308C\u308B\u3053\u3068\u3092\u4FDD\u8A3C\u3059\u308B\u3053\u3068\u306F\u3001\u54C1\u8CEA\u3068\u671F\u5F85\u3055\u308C\u308B\u7D50\u679C\u306E\u751F\u6210\u306E\u4E21\u65B9\u306B\u3068\u3063\u3066\u4E0D\u53EF\u6B20\u3067\u3059\u3002

\u6982\u8981

Fact Sheet

  • Features\u3068\u306F\u3001Solana \u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u5C0E\u5165\u3055\u308C\u3001\u4F7F\u7528\u3059\u308B\u306B\u306F\u30A2\u30AF\u30C6\u30A3\u30D9\u30FC\u30B7\u30E7\u30F3\u304C\u5FC5\u8981\u306A\u6A5F\u80FD\u3067\u3059\u3002
  • Features\u306F\u3042\u308B\u30AF\u30E9\u30B9\u30BF\u30FC (\u4F8B: testnet) \u3067\u30A2\u30AF\u30C6\u30A3\u30D6\u5316\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u5225\u306E\u30AF\u30E9\u30B9\u30BF\u30FC (\u4F8B: mainnet-beta) \u3067\u306F\u30A2\u30AF\u30C6\u30A3\u30D6\u5316\u3055\u308C\u307E\u305B\u3093\u3002
  • \u3057\u304B\u3057\u3001 solana-test-validator \u3092\u30ED\u30FC\u30AB\u30EB\u3067\u5B9F\u884C\u3059\u308B\u3068\u3001Solana \u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u5229\u7528\u53EF\u80FD\u306A\u3059\u3079\u3066\u306E\u6A5F\u80FD\u304C\u81EA\u52D5\u7684\u306B\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\u3002Solana\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u81EA\u52D5\u7684\u306B\u30A2\u30AF\u30C6\u30A3\u30D9\u30FC\u30C8\u3055\u308C\u307E\u3059\u3002\u305D\u306E\u7D50\u679C\u3001\u30ED\u30FC\u30AB\u30EB\u3067\u30C6\u30B9\u30C8\u3059\u308B\u5834\u5408\u3001\u30C6\u30B9\u30C8\u306E\u6A5F\u80FD\u3068\u7D50\u679C\u306F\u3001\u5225\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3067\u5C55\u958B\u3057\u3066\u5B9F\u884C\u3059\u308B\u5834\u5408\u3068\u540C\u3058\u3067\u306F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002

\u30B7\u30CA\u30EA\u30AA

3 \u3064\u306E\u547D\u4EE4\u3092\u542B\u3080\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u3001\u5404\u547D\u4EE4\u304C\u7D04 100_000 \u8A08\u7B97\u30E6\u30CB\u30C3\u30C8 (CU) \u3092\u6D88\u8CBB\u3059\u308B\u3068\u3057\u307E\u3059\u3002Solana 1.8.x \u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u5B9F\u884C\u3059\u308B\u3068\u3001\u6B21\u306E\u3088\u3046\u306A\u547D\u4EE4 CU \u6D88\u8CBB\u304C\u89B3\u5BDF\u3055\u308C\u307E\u3059\u3002:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Solana 1.9.2 \u3067\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u30C7\u30D5\u30A9\u30EB\u30C8\u3067 200_000 CU \u4E88\u7B97\u3092\u6301\u3061\u3001\u30AB\u30D7\u30BB\u30EB\u5316\u3055\u308C\u305F\u547D\u4EE4\u304C\u305D\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u4E88\u7B97\u304B\u3089 \u5F15\u304D\u51FA\u3055\u308C\u308B 'transaction wide compute cap(\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u306E\u8A08\u7B97\u4E0A\u9650)' \u3068\u547C\u3070\u308C\u308B\u6A5F\u80FD\u304C\u5C0E\u5165\u3055\u308C\u307E\u3057\u305F\u3002\u4E0A\u8A18\u3068\u540C\u3058\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u5B9F\u884C\u3059\u308B\u3068\u3001\u52D5\u4F5C\u304C\u5927\u304D\u304F\u7570\u306A\u308A\u307E\u3059:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Yikes!\u3053\u308C\u3092\u77E5\u3089\u306A\u304B\u3063\u305F\u5834\u5408\u306F\u3001\u3053\u308C\u3092\u5F15\u304D\u8D77\u3053\u3059\u3088\u3046\u306A\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u306E\u6319\u52D5\u5909\u66F4\u304C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30A4\u30E9\u30A4\u30E9\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30ED\u30FC\u30AB\u30EB\u3067\u306F\u5931\u6557\u3057\u3066\u3057\u307E\u3063\u305F!?

\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u4E88\u7B97\u3092300_000CU\u306B\u5897\u3084\u3059\u3053\u3068\u3067\u3001\u6B63\u6C17\u3092\u4FDD\u3064\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002and salvage your sanity \u3057\u304B\u3057\u3001\u3053\u308C\u306F**\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3** \u3092\u4F7F\u3063\u305F\u30C6\u30B9\u30C8\u304C\u3001\u6DF7\u4E71\u3092\u907F\u3051\u308B\u305F\u3081\u306E\u7A4D\u6975\u7684\u306A\u65B9\u6CD5\u3067\u3042\u308B\u3053\u3068\u3092\u793A\u3057\u3066\u3044\u307E\u3059\u3002

\u6A5F\u80FD\u30B9\u30C6\u30FC\u30BF\u30B9

solana feature status\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3001\u7279\u5B9A\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3067\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u6A5F\u80FD\u3092\u7C21\u5358\u306B\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const _={},f=b(`

\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3\u30C6\u30B9\u30C8

\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30C6\u30B9\u30C8\u3059\u308B\u3068\u304D\u3001\u3055\u307E\u3056\u307E\u306A\u30AF\u30E9\u30B9\u30BF\u30FC\u3067\u540C\u3058\u3088\u3046\u306B\u5B9F\u884C\u3055\u308C\u308B\u3053\u3068\u3092\u4FDD\u8A3C\u3059\u308B\u3053\u3068\u306F\u3001\u54C1\u8CEA\u3068\u671F\u5F85\u3055\u308C\u308B\u7D50\u679C\u306E\u751F\u6210\u306E\u4E21\u65B9\u306B\u3068\u3063\u3066\u4E0D\u53EF\u6B20\u3067\u3059\u3002

\u6982\u8981

Fact Sheet

  • Features\u3068\u306F\u3001Solana \u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u5C0E\u5165\u3055\u308C\u3001\u4F7F\u7528\u3059\u308B\u306B\u306F\u30A2\u30AF\u30C6\u30A3\u30D9\u30FC\u30B7\u30E7\u30F3\u304C\u5FC5\u8981\u306A\u6A5F\u80FD\u3067\u3059\u3002
  • Features\u306F\u3042\u308B\u30AF\u30E9\u30B9\u30BF\u30FC (\u4F8B: testnet) \u3067\u30A2\u30AF\u30C6\u30A3\u30D6\u5316\u3055\u308C\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u304C\u3001\u5225\u306E\u30AF\u30E9\u30B9\u30BF\u30FC (\u4F8B: mainnet-beta) \u3067\u306F\u30A2\u30AF\u30C6\u30A3\u30D6\u5316\u3055\u308C\u307E\u305B\u3093\u3002
  • \u3057\u304B\u3057\u3001 solana-test-validator \u3092\u30ED\u30FC\u30AB\u30EB\u3067\u5B9F\u884C\u3059\u308B\u3068\u3001Solana \u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u5229\u7528\u53EF\u80FD\u306A\u3059\u3079\u3066\u306E\u6A5F\u80FD\u304C\u81EA\u52D5\u7684\u306B\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\u3002Solana\u30D0\u30FC\u30B8\u30E7\u30F3\u306F\u81EA\u52D5\u7684\u306B\u30A2\u30AF\u30C6\u30A3\u30D9\u30FC\u30C8\u3055\u308C\u307E\u3059\u3002\u305D\u306E\u7D50\u679C\u3001\u30ED\u30FC\u30AB\u30EB\u3067\u30C6\u30B9\u30C8\u3059\u308B\u5834\u5408\u3001\u30C6\u30B9\u30C8\u306E\u6A5F\u80FD\u3068\u7D50\u679C\u306F\u3001\u5225\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3067\u5C55\u958B\u3057\u3066\u5B9F\u884C\u3059\u308B\u5834\u5408\u3068\u540C\u3058\u3067\u306F\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002

\u30B7\u30CA\u30EA\u30AA

3 \u3064\u306E\u547D\u4EE4\u3092\u542B\u3080\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u3001\u5404\u547D\u4EE4\u304C\u7D04 100_000 \u8A08\u7B97\u30E6\u30CB\u30C3\u30C8 (CU) \u3092\u6D88\u8CBB\u3059\u308B\u3068\u3057\u307E\u3059\u3002Solana 1.8.x \u30D0\u30FC\u30B8\u30E7\u30F3\u3067\u5B9F\u884C\u3059\u308B\u3068\u3001\u6B21\u306E\u3088\u3046\u306A\u547D\u4EE4 CU \u6D88\u8CBB\u304C\u89B3\u5BDF\u3055\u308C\u307E\u3059\u3002:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

Solana 1.9.2 \u3067\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u30C7\u30D5\u30A9\u30EB\u30C8\u3067 200_000 CU \u4E88\u7B97\u3092\u6301\u3061\u3001\u30AB\u30D7\u30BB\u30EB\u5316\u3055\u308C\u305F\u547D\u4EE4\u304C\u305D\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u4E88\u7B97\u304B\u3089 \u5F15\u304D\u51FA\u3055\u308C\u308B 'transaction wide compute cap(\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u306E\u8A08\u7B97\u4E0A\u9650)' \u3068\u547C\u3070\u308C\u308B\u6A5F\u80FD\u304C\u5C0E\u5165\u3055\u308C\u307E\u3057\u305F\u3002\u4E0A\u8A18\u3068\u540C\u3058\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u5B9F\u884C\u3059\u308B\u3068\u3001\u52D5\u4F5C\u304C\u5927\u304D\u304F\u7570\u306A\u308A\u307E\u3059:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

Yikes!\u3053\u308C\u3092\u77E5\u3089\u306A\u304B\u3063\u305F\u5834\u5408\u306F\u3001\u3053\u308C\u3092\u5F15\u304D\u8D77\u3053\u3059\u3088\u3046\u306A\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u306E\u6319\u52D5\u5909\u66F4\u304C\u306A\u304B\u3063\u305F\u305F\u3081\u3001\u30A4\u30E9\u30A4\u30E9\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30ED\u30FC\u30AB\u30EB\u3067\u306F\u5931\u6557\u3057\u3066\u3057\u307E\u3063\u305F!?

\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u4E88\u7B97\u3092300_000CU\u306B\u5897\u3084\u3059\u3053\u3068\u3067\u3001\u6B63\u6C17\u3092\u4FDD\u3064\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002and salvage your sanity \u3057\u304B\u3057\u3001\u3053\u308C\u306F**\u6A5F\u80FD\u30D1\u30EA\u30C6\u30A3** \u3092\u4F7F\u3063\u305F\u30C6\u30B9\u30C8\u304C\u3001\u6DF7\u4E71\u3092\u907F\u3051\u308B\u305F\u3081\u306E\u7A4D\u6975\u7684\u306A\u65B9\u6CD5\u3067\u3042\u308B\u3053\u3068\u3092\u793A\u3057\u3066\u3044\u307E\u3059\u3002

\u6A5F\u80FD\u30B9\u30C6\u30FC\u30BF\u30B9

solana feature status\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3001\u7279\u5B9A\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3067\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u6A5F\u80FD\u3092\u7C21\u5358\u306B\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/feature-parity-testing.html.90d3050b.js b/docs/.vuepress/dist/assets/feature-parity-testing.html.f4efd784.js
similarity index 99%
rename from docs/.vuepress/dist/assets/feature-parity-testing.html.90d3050b.js
rename to docs/.vuepress/dist/assets/feature-parity-testing.html.f4efd784.js
index 9ac566df9..71bbf3c95 100644
--- a/docs/.vuepress/dist/assets/feature-parity-testing.html.90d3050b.js
+++ b/docs/.vuepress/dist/assets/feature-parity-testing.html.f4efd784.js
@@ -1,4 +1,4 @@
-import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.07ce7a66.js";var d="/assets/scfsd.cc67ec33.png";const f={},_=b(`

Feature Parity Testing

\uB2F9\uC2E0\uC774 \uD504\uB85C\uADF8\uB7A8\uC744 \uD14C\uC2A4\uD2B8\uD560 \uB54C, \uB2E4\uC591\uD55C cluster\uB4E4\uC5D0\uC11C \uB3D9\uC77C\uD55C \uAC83\uC744 \uC2E4\uD589\uD560 \uAC83\uC774\uB77C\uB294 \uD655\uC2E0\uC740 \uD504\uB85C\uADF8\uB7A8\uC758 \uC9C8\uACFC \uC608\uCE21\uB41C \uACB0\uACFC\uB97C \uB9CC\uB4E4\uAE30 \uC704\uD574 \uB9E4\uC6B0 \uD544\uC218\uC801\uC785\uB2C8\uB2E4.

Facts

Fact Sheet

  • \uAE30\uB2A5\uB4E4\uC740 Solana validator\uB4E4\uC5D0\uAC8C \uC18C\uAC1C\uB418\uB294 \uAE30\uB2A5\uB4E4\uB85C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574 \uD65C\uC131\uD654\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
  • \uAE30\uB2A5\uB4E4\uC740 \uD558\uB098\uC758 cluster(e.g. testnet) \uC5D0\uC11C \uD65C\uC131\uD654\uB420\uC9C0 \uBAA8\uB974\uC9C0\uB9CC \uB2E4\uB978 cluster(e.g. mainnet-beta) \uC5D0\uC11C\uB294 \uC544\uB2D0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
  • \uADF8\uB7EC\uB098 \uB85C\uCEEC\uC5D0\uC11C \uAE30\uBCF8 solana-test-validator\uB97C \uC2E4\uD589\uD560 \uB54C, \uB2F9\uC2E0\uC758 solana version\uC5D0\uC11C \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uAE30\uB2A5\uB4E4\uC774 \uC790\uB3D9\uC73C\uB85C \uD65C\uC131\uD654\uB420 \uAC83\uC785\uB2C8\uB2E4. \uB85C\uCEEC\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD560\uB54C \uD14C\uC2A4\uD2B8 \uACB0\uACFC\uB4E4\uC740 \uB2E4\uB978 cluster\uC5D0 \uBC30\uD3EC\uD558\uACE0 \uC2E4\uD589\uD55C \uACB0\uACFC\uC640 \uB2E4\uB97C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.

Scenario

\uB2F9\uC2E0\uC774 3\uAC1C\uC758 Instuction\uB4E4\uC744 \uD3EC\uD568\uD558\uB294 \uD558\uB098\uC758 Transaction\uC744 \uAC16\uACE0 \uAC01 Instruction\uC740 \uB300\uB7B5 100_000 \uCEF4\uD4E8\uD130 \uC720\uB2DB\uC744 \uC18C\uBE44\uD55C\uB2E4\uACE0 \uAC00\uC815\uD569\uC2DC\uB2E4. Solana 1.8.x \uBC84\uC804\uC5D0\uC11C \uB3CC\uB9B4 \uB54C, \uB2F9\uC2E0\uC740 \uC544\uB798\uC640 \uC720\uC0AC\uD55C Instruction CU \uC18C\uBE44\uB97C \uBCF4\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4.

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\uC194\uB77C\uB098 1.9.2 \uBC84\uC804\uC5D0\uC11C 'transaction wide comput cap'\uC774\uB77C \uBD88\uB9AC\uB294 \uAE30\uB2A5\uC774 \uC18C\uAC1C\uB418\uC5C8\uB294\uB370, \uC5EC\uAE30\uC11C Transaction\uC740 \uAE30\uBCF8\uC801\uC73C\uB85C 200_000 CU \uC5D0\uC0B0\uC744 \uAC16\uACE0 \uCEA1\uC290\uD654\uB41C Instruction\uB4E4\uC740 \uC774 Transaction \uC608\uC0B0\uC5D0\uC11C \uB04C\uC5B4\uC640 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uC704\uC5D0\uC11C \uC5B8\uAE09\uB41C \uAC19\uC740 Transaction\uC744 \uC2E4\uD589\uD558\uBA74 \uB2E4\uB978 \uACB0\uACFC\uB97C \uC5BB\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\uB2F9\uC2E0\uC774 \uC774\uAC83\uC744 \uC54C\uC9C0 \uBABB\uD588\uB2E4\uBA74, \uB2F9\uC2E0\uC758 Instruction\uC740 \uBCC0\uD654\uAC00 \uC5C6\uC74C\uC5D0\uB3C4 \uC774\uAC83\uC744 \uBC1C\uC0DD\uC2DC\uD0A4\uB294 \uAC83\uC744 \uBCF4\uACE0 \uC88C\uC808\uD560\uC9C0\uB3C4 \uBAA8\uB985\uB2C8\uB2E4. devnet\uC5D0\uC11C\uB294 \uAD18\uCC2E\uC9C0\uB9CC local\uC5D0\uC11C\uB294 \uC2E4\uD328?!?

\uB2F9\uC2E0\uC758 \uC815\uC2E0\uC744 \uC9C0\uD0A4\uAE30 \uC704\uD574 300_000 CU\uB97C \uD5C8\uB77D\uD558\uB3C4\uB85D \uC804\uCCB4\uC801\uC778 Transaction budget\uC744 \uC99D\uAC00\uC2DC\uD0A4\uB294 \uB2A5\uB825\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774 \uAE00\uC740 **Feature Parity**\uB97C \uAC00\uC9C0\uACE0 \uD14C\uC2A4\uD2B8\uD558\uB294 \uAC83\uC774 \uD63C\uB780\uC744 \uD53C\uD558\uAE30 \uC704\uD55C \uB300\uCC45\uC744 \uC81C\uACF5\uD558\uB294 \uC774\uC720\uC784\uC744 \uC785\uC99D\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4.

Feature Status

solana feature status command\uB864 \uD2B9\uC815 cluster\uC5D0\uC11C \uAC00\uB2A5\uD55C \uAE30\uB2A5\uB4E4\uC774 \uBB34\uC5C7\uC774 \uC788\uB294 \uC9C0 \uC27D\uAC8C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

solana feature status -ud   // Displays by feature status for devnet
+import{_ as r,r as e,o as i,c as k,b as a,w as t,a as n,F as m,e as b,d as s}from"./app.d411e3b3.js";var d="/assets/scfsd.cc67ec33.png";const f={},_=b(`

Feature Parity Testing

\uB2F9\uC2E0\uC774 \uD504\uB85C\uADF8\uB7A8\uC744 \uD14C\uC2A4\uD2B8\uD560 \uB54C, \uB2E4\uC591\uD55C cluster\uB4E4\uC5D0\uC11C \uB3D9\uC77C\uD55C \uAC83\uC744 \uC2E4\uD589\uD560 \uAC83\uC774\uB77C\uB294 \uD655\uC2E0\uC740 \uD504\uB85C\uADF8\uB7A8\uC758 \uC9C8\uACFC \uC608\uCE21\uB41C \uACB0\uACFC\uB97C \uB9CC\uB4E4\uAE30 \uC704\uD574 \uB9E4\uC6B0 \uD544\uC218\uC801\uC785\uB2C8\uB2E4.

Facts

Fact Sheet

  • \uAE30\uB2A5\uB4E4\uC740 Solana validator\uB4E4\uC5D0\uAC8C \uC18C\uAC1C\uB418\uB294 \uAE30\uB2A5\uB4E4\uB85C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574 \uD65C\uC131\uD654\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4.
  • \uAE30\uB2A5\uB4E4\uC740 \uD558\uB098\uC758 cluster(e.g. testnet) \uC5D0\uC11C \uD65C\uC131\uD654\uB420\uC9C0 \uBAA8\uB974\uC9C0\uB9CC \uB2E4\uB978 cluster(e.g. mainnet-beta) \uC5D0\uC11C\uB294 \uC544\uB2D0 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
  • \uADF8\uB7EC\uB098 \uB85C\uCEEC\uC5D0\uC11C \uAE30\uBCF8 solana-test-validator\uB97C \uC2E4\uD589\uD560 \uB54C, \uB2F9\uC2E0\uC758 solana version\uC5D0\uC11C \uAC00\uB2A5\uD55C \uBAA8\uB4E0 \uAE30\uB2A5\uB4E4\uC774 \uC790\uB3D9\uC73C\uB85C \uD65C\uC131\uD654\uB420 \uAC83\uC785\uB2C8\uB2E4. \uB85C\uCEEC\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD560\uB54C \uD14C\uC2A4\uD2B8 \uACB0\uACFC\uB4E4\uC740 \uB2E4\uB978 cluster\uC5D0 \uBC30\uD3EC\uD558\uACE0 \uC2E4\uD589\uD55C \uACB0\uACFC\uC640 \uB2E4\uB97C \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.

Scenario

\uB2F9\uC2E0\uC774 3\uAC1C\uC758 Instuction\uB4E4\uC744 \uD3EC\uD568\uD558\uB294 \uD558\uB098\uC758 Transaction\uC744 \uAC16\uACE0 \uAC01 Instruction\uC740 \uB300\uB7B5 100_000 \uCEF4\uD4E8\uD130 \uC720\uB2DB\uC744 \uC18C\uBE44\uD55C\uB2E4\uACE0 \uAC00\uC815\uD569\uC2DC\uB2E4. Solana 1.8.x \uBC84\uC804\uC5D0\uC11C \uB3CC\uB9B4 \uB54C, \uB2F9\uC2E0\uC740 \uC544\uB798\uC640 \uC720\uC0AC\uD55C Instruction CU \uC18C\uBE44\uB97C \uBCF4\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4.

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2200_000-100_000100_000
3200_000-100_000100_000

\uC194\uB77C\uB098 1.9.2 \uBC84\uC804\uC5D0\uC11C 'transaction wide comput cap'\uC774\uB77C \uBD88\uB9AC\uB294 \uAE30\uB2A5\uC774 \uC18C\uAC1C\uB418\uC5C8\uB294\uB370, \uC5EC\uAE30\uC11C Transaction\uC740 \uAE30\uBCF8\uC801\uC73C\uB85C 200_000 CU \uC5D0\uC0B0\uC744 \uAC16\uACE0 \uCEA1\uC290\uD654\uB41C Instruction\uB4E4\uC740 \uC774 Transaction \uC608\uC0B0\uC5D0\uC11C \uB04C\uC5B4\uC640 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uC704\uC5D0\uC11C \uC5B8\uAE09\uB41C \uAC19\uC740 Transaction\uC744 \uC2E4\uD589\uD558\uBA74 \uB2E4\uB978 \uACB0\uACFC\uB97C \uC5BB\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4:

InstructionStarting CUExecutionRemaining CU
1200_000-100_000100_000
2100_000-100_0000
30FAIL!!!FAIL!!!

\uB2F9\uC2E0\uC774 \uC774\uAC83\uC744 \uC54C\uC9C0 \uBABB\uD588\uB2E4\uBA74, \uB2F9\uC2E0\uC758 Instruction\uC740 \uBCC0\uD654\uAC00 \uC5C6\uC74C\uC5D0\uB3C4 \uC774\uAC83\uC744 \uBC1C\uC0DD\uC2DC\uD0A4\uB294 \uAC83\uC744 \uBCF4\uACE0 \uC88C\uC808\uD560\uC9C0\uB3C4 \uBAA8\uB985\uB2C8\uB2E4. devnet\uC5D0\uC11C\uB294 \uAD18\uCC2E\uC9C0\uB9CC local\uC5D0\uC11C\uB294 \uC2E4\uD328?!?

\uB2F9\uC2E0\uC758 \uC815\uC2E0\uC744 \uC9C0\uD0A4\uAE30 \uC704\uD574 300_000 CU\uB97C \uD5C8\uB77D\uD558\uB3C4\uB85D \uC804\uCCB4\uC801\uC778 Transaction budget\uC744 \uC99D\uAC00\uC2DC\uD0A4\uB294 \uB2A5\uB825\uC774 \uC874\uC7AC\uD569\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774 \uAE00\uC740 **Feature Parity**\uB97C \uAC00\uC9C0\uACE0 \uD14C\uC2A4\uD2B8\uD558\uB294 \uAC83\uC774 \uD63C\uB780\uC744 \uD53C\uD558\uAE30 \uC704\uD55C \uB300\uCC45\uC744 \uC81C\uACF5\uD558\uB294 \uC774\uC720\uC784\uC744 \uC785\uC99D\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4.

Feature Status

solana feature status command\uB864 \uD2B9\uC815 cluster\uC5D0\uC11C \uAC00\uB2A5\uD55C \uAE30\uB2A5\uB4E4\uC774 \uBB34\uC5C7\uC774 \uC788\uB294 \uC9C0 \uC27D\uAC8C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

solana feature status -ud   // Displays by feature status for devnet
 solana feature status -ut   // Displays for testnet
 solana feature status -um   // Displays for mainnet-beta
 solana feature status -ul   // Displays for local, requires running solana-test-validator
diff --git a/docs/.vuepress/dist/assets/game-examples.html.e048eba1.js b/docs/.vuepress/dist/assets/game-examples.html.633629bc.js
similarity index 99%
rename from docs/.vuepress/dist/assets/game-examples.html.e048eba1.js
rename to docs/.vuepress/dist/assets/game-examples.html.633629bc.js
index c62b2fee1..d567ad2c0 100644
--- a/docs/.vuepress/dist/assets/game-examples.html.e048eba1.js
+++ b/docs/.vuepress/dist/assets/game-examples.html.633629bc.js
@@ -1 +1 @@
-import{_ as r,r as s,o as a,c as u,a as e,b as o,F as i,d as t}from"./app.07ce7a66.js";const l={},c=e("h1",{id:"jeux-solana-open-source-a-consulter-pour-l-apprentissage",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeux-solana-open-source-a-consulter-pour-l-apprentissage","aria-hidden":"true"},"#"),t(" Jeux Solana open source \xE0 consulter pour l'apprentissage")],-1),h=e("h2",{id:"interagir-avec-un-programme-anchor-depuis-unity",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#interagir-avec-un-programme-anchor-depuis-unity","aria-hidden":"true"},"#"),t(" Interagir avec un programme Anchor depuis Unity")],-1),d=e("p",null,"Un exemple simple de d\xE9placement d'un joueur de gauche \xE0 droite en utilisant le framework Anchor et le SDK Unity",-1),p={href:"https://www.youtube.com/watch?v=_vQ3bSs3svs",target:"_blank",rel:"noopener noreferrer"},_=t("Vid\xE9o"),m={href:"https://solplay.de/TinyAdventure/index.html",target:"_blank",rel:"noopener noreferrer"},f=t("Version Live"),g={href:"https://beta.solpg.io/Tutoriels/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},b=t("Playground"),y={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},v=t("Client Unity"),j=e("h2",{id:"stocker-des-sol-dans-un-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#stocker-des-sol-dans-un-pda","aria-hidden":"true"},"#"),t(" Stocker des SOL dans un PDA")],-1),k=e("p",null,"Apprenez \xE0 stocker des SOL dans un PDA qui sert de coffre-fort et \xE0 les renvoyer \xE0 un joueur. Le backend est \xE9crit en Anchor et le frontend utilise le SDK Unity.",-1),x={href:"https://www.youtube.com/watch?v=gILXyWvXu7M",target:"_blank",rel:"noopener noreferrer"},S=t("Vid\xE9o"),w={href:"https://solplay.de/TinyAdventureTwo/index.html",target:"_blank",rel:"noopener noreferrer"},q=t("Version Live"),A={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventureTwo",target:"_blank",rel:"noopener noreferrer"},T=t("Source"),P=e("h2",{id:"matchmaking-on-chain",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#matchmaking-on-chain","aria-hidden":"true"},"#"),t(" Matchmaking on-chain")],-1),L=e("p",null,"Un jeu de puzzle multijoueur qui utilise les stats d'un NFT pour les stats du personnage dans le jeu et dispose d'un syst\xE8me de matchmaking on-chain int\xE9ressant.",-1),U={href:"https://deezquest.vercel.app/",target:"_blank",rel:"noopener noreferrer"},V=t("Version Live"),E={href:"https://github.com/val-samonte/deezquest",target:"_blank",rel:"noopener noreferrer"},z=t("Source"),D=e("h2",{id:"utiliser-les-qr-codes-de-solana-pay-pour-controler-un-jeu",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#utiliser-les-qr-codes-de-solana-pay-pour-controler-un-jeu","aria-hidden":"true"},"#"),t(" Utiliser les QR codes de Solana Pay pour contr\xF4ler un jeu")],-1),N=e("p",null,"Tug of war, jeu multijoueur o\xF9 un compte est modifi\xE9 via des QR codes de Solana Pay et qui peut \xEAtre jou\xE9 \xE0 plusieurs sur un grand \xE9cran. Le backend est \xE9crit en Anchor et le frontend est en React JS et Next13.",-1),J={href:"https://www.youtube.com/watch?v=_XBvEHwSqJc&ab_channel=SolPlay",target:"_blank",rel:"noopener noreferrer"},F=t("Tutoriel"),B={href:"https://tug-of-war.vercel.app/",target:"_blank",rel:"noopener noreferrer"},C=t("Exemple"),K={href:"https://github.com/solana-developers/workshops/tree/main/workshops/tug-of-war",target:"_blank",rel:"noopener noreferrer"},I=t("Source"),W=e("h2",{id:"cacher-l-etat-du-jeu-aux-autres-joueurs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cacher-l-etat-du-jeu-aux-autres-joueurs","aria-hidden":"true"},"#"),t(" Cacher l'\xE9tat du jeu aux autres joueurs")],-1),X=e("p",null,"Pierre feuille ciseaux, jeu o\xF9 les donn\xE9es stock\xE9es sur la cha\xEEne sont cach\xE9es en enregistrant un hash dans le client jusqu'\xE0 ce qu'elles soient r\xE9v\xE9l\xE9es. Des jetons SPL en guise de r\xE9compense pour le gagnant.",-1),H={href:"https://github.com/kevinrodriguez-io/bonk-paper-scissors",target:"_blank",rel:"noopener noreferrer"},M=t("Source"),O=e("p",null,"Un autre exemple soumis \xE0 grizzlython qui chiffre les entr\xE9es et les envoie au joueur suivant avec un chiffrement suppl\xE9mentaire :",-1),Q={href:"https://github.com/solanaGames",target:"_blank",rel:"noopener noreferrer"},R=t("Source"),G=e("h2",{id:"comment-construire-un-jeu-multijoueur-au-tour-par-tour",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#comment-construire-un-jeu-multijoueur-au-tour-par-tour","aria-hidden":"true"},"#"),t(" Comment construire un jeu multijoueur au tour par tour")],-1),Y=e("p",null,"Tic Tac toe, jeu multijoueur simple \xE9crit en Anchor",-1),Z={href:"https://book.anchor-lang.com/anchor_in_depth/milestone_project_tic-tac-toe.html",target:"_blank",rel:"noopener noreferrer"},$=t("Tutoriel"),ee={href:"https://github.com/coral-xyz/anchor-book/tree/master/programs/tic-tac-toe",target:"_blank",rel:"noopener noreferrer"},te=t("Source"),ne=e("h2",{id:"jeu-d-echecs-on-chain",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-d-echecs-on-chain","aria-hidden":"true"},"#"),t(" Jeu d'\xE9checs on-chain")],-1),oe=e("p",null,"Jeu d'\xE9checs, jeu d'\xE9checs complet jouable on-chain \xE9crit en Anchor. Envoyer \xE0 quelqu'un un lien pour commencer une partie. A la recherche de contributeurs.",-1),re={href:"https://chess.vicyyn.com/",target:"_blank",rel:"noopener noreferrer"},se=t("Version Live"),ae={href:"https://github.com/vicyyn/sol-chess/",target:"_blank",rel:"noopener noreferrer"},ue=t("Source"),ie=e("h2",{id:"jeu-multijoueurs-utilisant-un-systeme-de-vote",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-multijoueurs-utilisant-un-systeme-de-vote","aria-hidden":"true"},"#"),t(" Jeu multijoueurs utilisant un syst\xE8me de vote")],-1),le=e("p",null,"Pok\xE9mon avec un syst\xE8me de vote, jeu o\xF9 les gens votent collectivement sur les mouvements \xE0 r\xE9aliser dans un jeu de Game Boy. Chaque mouvement est stock\xE9 et peut \xEAtre mint en tant que NFT.",-1),ce={href:"https://solana.playspokemon.xyz/",target:"_blank",rel:"noopener noreferrer"},he=t("Version Live"),de={href:"https://github.com/nelsontky/web3-plays-pokemon",target:"_blank",rel:"noopener noreferrer"},pe=t("Source"),_e=e("h2",{id:"exemple-de-systeme-de-composants-d-entite",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#exemple-de-systeme-de-composants-d-entite","aria-hidden":"true"},"#"),t(" Exemple de syst\xE8me de composants d'entit\xE9")],-1),me=t("Kyoudai Clash est un jeu en temps r\xE9el on-chain qui utilise le "),fe={href:"https://github.com/JumpCrypto/sol-arc",target:"_blank",rel:"noopener noreferrer"},ge=t("framework Arc"),be=t(" de jump crypto qui est un syst\xE8me de composants d'entit\xE9s on-chain pour Solana."),ye={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},ve=t("Version xNFT"),je={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},ke=t("Source"),xe=e("h2",{id:"jeu-d-aventure-avec-la-mort-de-monstres-et-l-obtention-de-points-d-experience",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-d-aventure-avec-la-mort-de-monstres-et-l-obtention-de-points-d-experience","aria-hidden":"true"},"#"),t(" Jeu d'aventure avec la mort de monstres et l'obtention de points d'exp\xE9rience")],-1),Se=e("p",null,"Lumia online a \xE9t\xE9 soumis dans le cadre d'un hackthon et constitue une belle r\xE9f\xE9rence pour un petit jeu d'aventure.",-1),we={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},qe=t("Version xNFT"),Ae={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},Te=t("Source"),Pe=e("h2",{id:"jeu-pvp-en-temps-reel-on-chain",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-pvp-en-temps-reel-on-chain","aria-hidden":"true"},"#"),t(" Jeu PvP en temps r\xE9el on-chain")],-1),Le=e("p",null,"SolHunter, jeu de bataille royale sur Solana en temps r\xE9el. Il utilise un programme Anchor, le SDK Unity et une souscription WebSocket \xE0 un compte. Dans ce jeu, les joueurs peuvent faire appara\xEEtre leurs personnages repr\xE9sent\xE9s par l'un de leurs NFT sur une grille et se d\xE9placer. Si un joueur touche un autre joueur ou un coffre, il r\xE9cup\xE8re ses SOL. La grille est repr\xE9sent\xE9e par un tableau \xE0 deux dimensions dans lequel chaque case stocke la cl\xE9 publique du portefeuille du joueur et la cl\xE9 publique du NFT.",-1),Ue={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},Ve=t("Exemple"),Ee={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/SolHunter",target:"_blank",rel:"noopener noreferrer"},ze=t("Source");function De(Ne,Je){const n=s("ExternalLinkIcon");return a(),u(i,null,[c,h,d,e("p",null,[e("a",p,[_,o(n)])]),e("p",null,[e("a",m,[f,o(n)])]),e("p",null,[e("a",g,[b,o(n)])]),e("p",null,[e("a",y,[v,o(n)])]),j,k,e("p",null,[e("a",x,[S,o(n)])]),e("p",null,[e("a",w,[q,o(n)])]),e("p",null,[e("a",A,[T,o(n)])]),P,L,e("p",null,[e("a",U,[V,o(n)])]),e("p",null,[e("a",E,[z,o(n)])]),D,N,e("p",null,[e("a",J,[F,o(n)])]),e("p",null,[e("a",B,[C,o(n)])]),e("p",null,[e("a",K,[I,o(n)])]),W,X,e("p",null,[e("a",H,[M,o(n)])]),O,e("p",null,[e("a",Q,[R,o(n)])]),G,Y,e("p",null,[e("a",Z,[$,o(n)])]),e("p",null,[e("a",ee,[te,o(n)])]),ne,oe,e("p",null,[e("a",re,[se,o(n)])]),e("p",null,[e("a",ae,[ue,o(n)])]),ie,le,e("p",null,[e("a",ce,[he,o(n)])]),e("p",null,[e("a",de,[pe,o(n)])]),_e,e("p",null,[me,e("a",fe,[ge,o(n)]),be]),e("p",null,[e("a",ye,[ve,o(n)])]),e("p",null,[e("a",je,[ke,o(n)])]),xe,Se,e("p",null,[e("a",we,[qe,o(n)])]),e("p",null,[e("a",Ae,[Te,o(n)])]),Pe,Le,e("p",null,[e("a",Ue,[Ve,o(n)])]),e("p",null,[e("a",Ee,[ze,o(n)])])],64)}var Be=r(l,[["render",De]]);export{Be as default};
+import{_ as r,r as s,o as a,c as u,a as e,b as o,F as i,d as t}from"./app.d411e3b3.js";const l={},c=e("h1",{id:"jeux-solana-open-source-a-consulter-pour-l-apprentissage",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeux-solana-open-source-a-consulter-pour-l-apprentissage","aria-hidden":"true"},"#"),t(" Jeux Solana open source \xE0 consulter pour l'apprentissage")],-1),h=e("h2",{id:"interagir-avec-un-programme-anchor-depuis-unity",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#interagir-avec-un-programme-anchor-depuis-unity","aria-hidden":"true"},"#"),t(" Interagir avec un programme Anchor depuis Unity")],-1),d=e("p",null,"Un exemple simple de d\xE9placement d'un joueur de gauche \xE0 droite en utilisant le framework Anchor et le SDK Unity",-1),p={href:"https://www.youtube.com/watch?v=_vQ3bSs3svs",target:"_blank",rel:"noopener noreferrer"},_=t("Vid\xE9o"),m={href:"https://solplay.de/TinyAdventure/index.html",target:"_blank",rel:"noopener noreferrer"},f=t("Version Live"),g={href:"https://beta.solpg.io/Tutoriels/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},b=t("Playground"),y={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},v=t("Client Unity"),j=e("h2",{id:"stocker-des-sol-dans-un-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#stocker-des-sol-dans-un-pda","aria-hidden":"true"},"#"),t(" Stocker des SOL dans un PDA")],-1),k=e("p",null,"Apprenez \xE0 stocker des SOL dans un PDA qui sert de coffre-fort et \xE0 les renvoyer \xE0 un joueur. Le backend est \xE9crit en Anchor et le frontend utilise le SDK Unity.",-1),x={href:"https://www.youtube.com/watch?v=gILXyWvXu7M",target:"_blank",rel:"noopener noreferrer"},S=t("Vid\xE9o"),w={href:"https://solplay.de/TinyAdventureTwo/index.html",target:"_blank",rel:"noopener noreferrer"},q=t("Version Live"),A={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventureTwo",target:"_blank",rel:"noopener noreferrer"},T=t("Source"),P=e("h2",{id:"matchmaking-on-chain",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#matchmaking-on-chain","aria-hidden":"true"},"#"),t(" Matchmaking on-chain")],-1),L=e("p",null,"Un jeu de puzzle multijoueur qui utilise les stats d'un NFT pour les stats du personnage dans le jeu et dispose d'un syst\xE8me de matchmaking on-chain int\xE9ressant.",-1),U={href:"https://deezquest.vercel.app/",target:"_blank",rel:"noopener noreferrer"},V=t("Version Live"),E={href:"https://github.com/val-samonte/deezquest",target:"_blank",rel:"noopener noreferrer"},z=t("Source"),D=e("h2",{id:"utiliser-les-qr-codes-de-solana-pay-pour-controler-un-jeu",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#utiliser-les-qr-codes-de-solana-pay-pour-controler-un-jeu","aria-hidden":"true"},"#"),t(" Utiliser les QR codes de Solana Pay pour contr\xF4ler un jeu")],-1),N=e("p",null,"Tug of war, jeu multijoueur o\xF9 un compte est modifi\xE9 via des QR codes de Solana Pay et qui peut \xEAtre jou\xE9 \xE0 plusieurs sur un grand \xE9cran. Le backend est \xE9crit en Anchor et le frontend est en React JS et Next13.",-1),J={href:"https://www.youtube.com/watch?v=_XBvEHwSqJc&ab_channel=SolPlay",target:"_blank",rel:"noopener noreferrer"},F=t("Tutoriel"),B={href:"https://tug-of-war.vercel.app/",target:"_blank",rel:"noopener noreferrer"},C=t("Exemple"),K={href:"https://github.com/solana-developers/workshops/tree/main/workshops/tug-of-war",target:"_blank",rel:"noopener noreferrer"},I=t("Source"),W=e("h2",{id:"cacher-l-etat-du-jeu-aux-autres-joueurs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cacher-l-etat-du-jeu-aux-autres-joueurs","aria-hidden":"true"},"#"),t(" Cacher l'\xE9tat du jeu aux autres joueurs")],-1),X=e("p",null,"Pierre feuille ciseaux, jeu o\xF9 les donn\xE9es stock\xE9es sur la cha\xEEne sont cach\xE9es en enregistrant un hash dans le client jusqu'\xE0 ce qu'elles soient r\xE9v\xE9l\xE9es. Des jetons SPL en guise de r\xE9compense pour le gagnant.",-1),H={href:"https://github.com/kevinrodriguez-io/bonk-paper-scissors",target:"_blank",rel:"noopener noreferrer"},M=t("Source"),O=e("p",null,"Un autre exemple soumis \xE0 grizzlython qui chiffre les entr\xE9es et les envoie au joueur suivant avec un chiffrement suppl\xE9mentaire :",-1),Q={href:"https://github.com/solanaGames",target:"_blank",rel:"noopener noreferrer"},R=t("Source"),G=e("h2",{id:"comment-construire-un-jeu-multijoueur-au-tour-par-tour",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#comment-construire-un-jeu-multijoueur-au-tour-par-tour","aria-hidden":"true"},"#"),t(" Comment construire un jeu multijoueur au tour par tour")],-1),Y=e("p",null,"Tic Tac toe, jeu multijoueur simple \xE9crit en Anchor",-1),Z={href:"https://book.anchor-lang.com/anchor_in_depth/milestone_project_tic-tac-toe.html",target:"_blank",rel:"noopener noreferrer"},$=t("Tutoriel"),ee={href:"https://github.com/coral-xyz/anchor-book/tree/master/programs/tic-tac-toe",target:"_blank",rel:"noopener noreferrer"},te=t("Source"),ne=e("h2",{id:"jeu-d-echecs-on-chain",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-d-echecs-on-chain","aria-hidden":"true"},"#"),t(" Jeu d'\xE9checs on-chain")],-1),oe=e("p",null,"Jeu d'\xE9checs, jeu d'\xE9checs complet jouable on-chain \xE9crit en Anchor. Envoyer \xE0 quelqu'un un lien pour commencer une partie. A la recherche de contributeurs.",-1),re={href:"https://chess.vicyyn.com/",target:"_blank",rel:"noopener noreferrer"},se=t("Version Live"),ae={href:"https://github.com/vicyyn/sol-chess/",target:"_blank",rel:"noopener noreferrer"},ue=t("Source"),ie=e("h2",{id:"jeu-multijoueurs-utilisant-un-systeme-de-vote",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-multijoueurs-utilisant-un-systeme-de-vote","aria-hidden":"true"},"#"),t(" Jeu multijoueurs utilisant un syst\xE8me de vote")],-1),le=e("p",null,"Pok\xE9mon avec un syst\xE8me de vote, jeu o\xF9 les gens votent collectivement sur les mouvements \xE0 r\xE9aliser dans un jeu de Game Boy. Chaque mouvement est stock\xE9 et peut \xEAtre mint en tant que NFT.",-1),ce={href:"https://solana.playspokemon.xyz/",target:"_blank",rel:"noopener noreferrer"},he=t("Version Live"),de={href:"https://github.com/nelsontky/web3-plays-pokemon",target:"_blank",rel:"noopener noreferrer"},pe=t("Source"),_e=e("h2",{id:"exemple-de-systeme-de-composants-d-entite",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#exemple-de-systeme-de-composants-d-entite","aria-hidden":"true"},"#"),t(" Exemple de syst\xE8me de composants d'entit\xE9")],-1),me=t("Kyoudai Clash est un jeu en temps r\xE9el on-chain qui utilise le "),fe={href:"https://github.com/JumpCrypto/sol-arc",target:"_blank",rel:"noopener noreferrer"},ge=t("framework Arc"),be=t(" de jump crypto qui est un syst\xE8me de composants d'entit\xE9s on-chain pour Solana."),ye={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},ve=t("Version xNFT"),je={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},ke=t("Source"),xe=e("h2",{id:"jeu-d-aventure-avec-la-mort-de-monstres-et-l-obtention-de-points-d-experience",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-d-aventure-avec-la-mort-de-monstres-et-l-obtention-de-points-d-experience","aria-hidden":"true"},"#"),t(" Jeu d'aventure avec la mort de monstres et l'obtention de points d'exp\xE9rience")],-1),Se=e("p",null,"Lumia online a \xE9t\xE9 soumis dans le cadre d'un hackthon et constitue une belle r\xE9f\xE9rence pour un petit jeu d'aventure.",-1),we={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},qe=t("Version xNFT"),Ae={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},Te=t("Source"),Pe=e("h2",{id:"jeu-pvp-en-temps-reel-on-chain",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#jeu-pvp-en-temps-reel-on-chain","aria-hidden":"true"},"#"),t(" Jeu PvP en temps r\xE9el on-chain")],-1),Le=e("p",null,"SolHunter, jeu de bataille royale sur Solana en temps r\xE9el. Il utilise un programme Anchor, le SDK Unity et une souscription WebSocket \xE0 un compte. Dans ce jeu, les joueurs peuvent faire appara\xEEtre leurs personnages repr\xE9sent\xE9s par l'un de leurs NFT sur une grille et se d\xE9placer. Si un joueur touche un autre joueur ou un coffre, il r\xE9cup\xE8re ses SOL. La grille est repr\xE9sent\xE9e par un tableau \xE0 deux dimensions dans lequel chaque case stocke la cl\xE9 publique du portefeuille du joueur et la cl\xE9 publique du NFT.",-1),Ue={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},Ve=t("Exemple"),Ee={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/SolHunter",target:"_blank",rel:"noopener noreferrer"},ze=t("Source");function De(Ne,Je){const n=s("ExternalLinkIcon");return a(),u(i,null,[c,h,d,e("p",null,[e("a",p,[_,o(n)])]),e("p",null,[e("a",m,[f,o(n)])]),e("p",null,[e("a",g,[b,o(n)])]),e("p",null,[e("a",y,[v,o(n)])]),j,k,e("p",null,[e("a",x,[S,o(n)])]),e("p",null,[e("a",w,[q,o(n)])]),e("p",null,[e("a",A,[T,o(n)])]),P,L,e("p",null,[e("a",U,[V,o(n)])]),e("p",null,[e("a",E,[z,o(n)])]),D,N,e("p",null,[e("a",J,[F,o(n)])]),e("p",null,[e("a",B,[C,o(n)])]),e("p",null,[e("a",K,[I,o(n)])]),W,X,e("p",null,[e("a",H,[M,o(n)])]),O,e("p",null,[e("a",Q,[R,o(n)])]),G,Y,e("p",null,[e("a",Z,[$,o(n)])]),e("p",null,[e("a",ee,[te,o(n)])]),ne,oe,e("p",null,[e("a",re,[se,o(n)])]),e("p",null,[e("a",ae,[ue,o(n)])]),ie,le,e("p",null,[e("a",ce,[he,o(n)])]),e("p",null,[e("a",de,[pe,o(n)])]),_e,e("p",null,[me,e("a",fe,[ge,o(n)]),be]),e("p",null,[e("a",ye,[ve,o(n)])]),e("p",null,[e("a",je,[ke,o(n)])]),xe,Se,e("p",null,[e("a",we,[qe,o(n)])]),e("p",null,[e("a",Ae,[Te,o(n)])]),Pe,Le,e("p",null,[e("a",Ue,[Ve,o(n)])]),e("p",null,[e("a",Ee,[ze,o(n)])])],64)}var Be=r(l,[["render",De]]);export{Be as default};
diff --git a/docs/.vuepress/dist/assets/game-examples.html.8ba930cd.js b/docs/.vuepress/dist/assets/game-examples.html.806db4fe.js
similarity index 99%
rename from docs/.vuepress/dist/assets/game-examples.html.8ba930cd.js
rename to docs/.vuepress/dist/assets/game-examples.html.806db4fe.js
index 9ce667e11..2c931cd44 100644
--- a/docs/.vuepress/dist/assets/game-examples.html.8ba930cd.js
+++ b/docs/.vuepress/dist/assets/game-examples.html.806db4fe.js
@@ -1 +1 @@
-import{_ as r,r as a,o as s,c as i,a as e,b as o,F as h,d as n}from"./app.07ce7a66.js";const l={},c=e("h1",{id:"open-source-solana-games-to-reference-for-learning",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#open-source-solana-games-to-reference-for-learning","aria-hidden":"true"},"#"),n(" Open source Solana games to reference for learning")],-1),d=e("h2",{id:"interact-with-anchor-program-from-unity",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#interact-with-anchor-program-from-unity","aria-hidden":"true"},"#"),n(" Interact with Anchor Program from Unity")],-1),_=e("p",null,"A simple example moving a player left and right using Anchor framework and Unity SD",-1),p={href:"https://www.youtube.com/watch?v=_vQ3bSs3svs",target:"_blank",rel:"noopener noreferrer"},m=n("Video"),u={href:"https://solplay.de/TinyAdventure/index.html",target:"_blank",rel:"noopener noreferrer"},g=n("Live Version"),f={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},y=n("Playground"),b={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},k=n("Unity Client"),v=e("h2",{id:"saving-sol-in-a-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#saving-sol-in-a-pda","aria-hidden":"true"},"#"),n(" Saving Sol in a PDA")],-1),w=e("p",null,"Learn how to save sol in a PDA seed vault and send it back to a player. Backend is written in Anchor and the frontend is using the Unity SDK",-1),x={href:"https://www.youtube.com/watch?v=gILXyWvXu7M",target:"_blank",rel:"noopener noreferrer"},S=n("Video"),A={href:"https://solplay.de/TinyAdventureTwo/index.html",target:"_blank",rel:"noopener noreferrer"},T=n("Live Version"),P={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventureTwo",target:"_blank",rel:"noopener noreferrer"},V=n("Source"),U=e("h2",{id:"on-chain-matchmaking",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#on-chain-matchmaking","aria-hidden":"true"},"#"),n(" On chain matchmaking")],-1),E=e("p",null,"A multiplayer match three game which uses NFT stats for the character stats in the game and has an interesting onchain matchmaking system.",-1),L={href:"https://deezquest.vercel.app/",target:"_blank",rel:"noopener noreferrer"},D=n("Live Version"),N={href:"https://github.com/val-samonte/deezquest",target:"_blank",rel:"noopener noreferrer"},z=n("Source"),B=e("h2",{id:"use-solana-pay-qr-codes-to-control-a-game",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#use-solana-pay-qr-codes-to-control-a-game","aria-hidden":"true"},"#"),n(" Use Solana Pay Qr codes to control a game")],-1),C=e("p",null,"Tug of war A multiplayer game where an account is changed via Solana Pay qr codes which can be player with many people on a big screen. Backend Anchor and the frontend is Js React and Next13.",-1),F={href:"https://www.youtube.com/watch?v=_XBvEHwSqJc&ab_channel=SolPlay",target:"_blank",rel:"noopener noreferrer"},q=n("Tutorial"),H={href:"https://tug-of-war.vercel.app/",target:"_blank",rel:"noopener noreferrer"},K=n("Example"),I={href:"https://github.com/solana-developers/workshops/tree/main/workshops/tug-of-war",target:"_blank",rel:"noopener noreferrer"},W=n("Source"),X=e("h2",{id:"hide-game-state-from-other-players",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hide-game-state-from-other-players","aria-hidden":"true"},"#"),n(" Hide game state from other players")],-1),j=e("p",null,"Stone paper scissors",-1),M=e("p",null,"A game where on chain data is hidden by saving a hash in the client until reveal. SPL Tokens as price for the winner.",-1),R={href:"https://github.com/kevinrodriguez-io/bonk-paper-scissors",target:"_blank",rel:"noopener noreferrer"},G=n("Source"),J=e("p",null,"Another example submitted for grizzlython which encrypts entries and send it to the next player with an additional encryption:",-1),O={href:"https://github.com/solanaGames",target:"_blank",rel:"noopener noreferrer"},Q=n("Source"),Y=e("h2",{id:"how-to-build-a-round-based-multiplayer-game",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-build-a-round-based-multiplayer-game","aria-hidden":"true"},"#"),n(" How to build a round based multiplayer game")],-1),Z=e("p",null,"Tic Tac toe A simple multiplayer game written in Anchor",-1),$={href:"https://book.anchor-lang.com/anchor_in_depth/milestone_project_tic-tac-toe.html",target:"_blank",rel:"noopener noreferrer"},ee=n("Tutorial"),ne={href:"https://github.com/coral-xyz/anchor-book/tree/master/programs/tic-tac-toe",target:"_blank",rel:"noopener noreferrer"},te=n("Source"),oe=e("h2",{id:"on-chain-chess",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#on-chain-chess","aria-hidden":"true"},"#"),n(" On Chain Chess")],-1),re=e("p",null,"Chess Complete on chain playable chess game written in Anchor. Send someone a link to start a game. Looking for contributors.",-1),ae={href:"https://chess.vicyyn.com/",target:"_blank",rel:"noopener noreferrer"},se=n("Live Version"),ie={href:"https://github.com/vicyyn/sol-chess/",target:"_blank",rel:"noopener noreferrer"},he=n("Source"),le=e("h2",{id:"multiplayer-game-using-voting-system",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#multiplayer-game-using-voting-system","aria-hidden":"true"},"#"),n(" Multiplayer Game using voting system")],-1),ce=e("p",null,"Pokemon voting system A game where collectively people vote on moves in a game boy game. Every move is recorded and each move can be minted as an NFTs.",-1),de={href:"https://solana.playspokemon.xyz/",target:"_blank",rel:"noopener noreferrer"},_e=n("Live Version"),pe={href:"https://github.com/nelsontky/web3-plays-pokemon",target:"_blank",rel:"noopener noreferrer"},me=n("Source"),ue=e("h2",{id:"entity-component-system-example",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#entity-component-system-example","aria-hidden":"true"},"#"),n(" Entity component system example")],-1),ge=n("Kyoudai Clash is an on chain realtime Using the jump crypto "),fe={href:"https://github.com/JumpCrypto/sol-arc",target:"_blank",rel:"noopener noreferrer"},ye=n("Arc framework"),be=n(" which is an on chain entity component system for Solana."),ke={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},ve=n("xNFT Version"),we={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},xe=n("Source"),Se=e("h2",{id:"adventure-killing-monsters-and-gaining-xp",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#adventure-killing-monsters-and-gaining-xp","aria-hidden":"true"},"#"),n(" Adventure killing monsters and gaining xp")],-1),Ae=e("p",null,"Lumia online was a hackthon submission and is a nice reference for a little adventure game.",-1),Te={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},Pe=n("xNFT Version"),Ve={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},Ue=n("Source"),Ee=e("h2",{id:"real-time-pvp-on-chain-game",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#real-time-pvp-on-chain-game","aria-hidden":"true"},"#"),n(" Real-time pvp on chain game")],-1),Le=e("p",null,"SolHunter",-1),De=e("p",null,"Real-time Solana Battle Royal Game. Using Anchor program, UnitySDK, WebSocket account subscription. Players can spawn their characters represented as one of their NFTs on a grid and move around. If a player hits another player or chest he collect its Sol. The grid is implemented as a two dimensional array where every tile saves the players wallet key and the NFT public key.",-1),Ne={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},ze=n("Example"),Be={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/SolHunter",target:"_blank",rel:"noopener noreferrer"},Ce=n("Source");function Fe(qe,He){const t=a("ExternalLinkIcon");return s(),i(h,null,[c,d,_,e("p",null,[e("a",p,[m,o(t)])]),e("p",null,[e("a",u,[g,o(t)])]),e("p",null,[e("a",f,[y,o(t)])]),e("p",null,[e("a",b,[k,o(t)])]),v,w,e("p",null,[e("a",x,[S,o(t)])]),e("p",null,[e("a",A,[T,o(t)])]),e("p",null,[e("a",P,[V,o(t)])]),U,E,e("p",null,[e("a",L,[D,o(t)])]),e("p",null,[e("a",N,[z,o(t)])]),B,C,e("p",null,[e("a",F,[q,o(t)])]),e("p",null,[e("a",H,[K,o(t)])]),e("p",null,[e("a",I,[W,o(t)])]),X,j,M,e("p",null,[e("a",R,[G,o(t)])]),J,e("p",null,[e("a",O,[Q,o(t)])]),Y,Z,e("p",null,[e("a",$,[ee,o(t)])]),e("p",null,[e("a",ne,[te,o(t)])]),oe,re,e("p",null,[e("a",ae,[se,o(t)])]),e("p",null,[e("a",ie,[he,o(t)])]),le,ce,e("p",null,[e("a",de,[_e,o(t)])]),e("p",null,[e("a",pe,[me,o(t)])]),ue,e("p",null,[ge,e("a",fe,[ye,o(t)]),be]),e("p",null,[e("a",ke,[ve,o(t)])]),e("p",null,[e("a",we,[xe,o(t)])]),Se,Ae,e("p",null,[e("a",Te,[Pe,o(t)])]),e("p",null,[e("a",Ve,[Ue,o(t)])]),Ee,Le,De,e("p",null,[e("a",Ne,[ze,o(t)])]),e("p",null,[e("a",Be,[Ce,o(t)])])],64)}var Ie=r(l,[["render",Fe]]);export{Ie as default};
+import{_ as r,r as a,o as s,c as i,a as e,b as o,F as h,d as n}from"./app.d411e3b3.js";const l={},c=e("h1",{id:"open-source-solana-games-to-reference-for-learning",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#open-source-solana-games-to-reference-for-learning","aria-hidden":"true"},"#"),n(" Open source Solana games to reference for learning")],-1),d=e("h2",{id:"interact-with-anchor-program-from-unity",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#interact-with-anchor-program-from-unity","aria-hidden":"true"},"#"),n(" Interact with Anchor Program from Unity")],-1),_=e("p",null,"A simple example moving a player left and right using Anchor framework and Unity SD",-1),p={href:"https://www.youtube.com/watch?v=_vQ3bSs3svs",target:"_blank",rel:"noopener noreferrer"},m=n("Video"),u={href:"https://solplay.de/TinyAdventure/index.html",target:"_blank",rel:"noopener noreferrer"},g=n("Live Version"),f={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},y=n("Playground"),b={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},k=n("Unity Client"),v=e("h2",{id:"saving-sol-in-a-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#saving-sol-in-a-pda","aria-hidden":"true"},"#"),n(" Saving Sol in a PDA")],-1),w=e("p",null,"Learn how to save sol in a PDA seed vault and send it back to a player. Backend is written in Anchor and the frontend is using the Unity SDK",-1),x={href:"https://www.youtube.com/watch?v=gILXyWvXu7M",target:"_blank",rel:"noopener noreferrer"},S=n("Video"),A={href:"https://solplay.de/TinyAdventureTwo/index.html",target:"_blank",rel:"noopener noreferrer"},T=n("Live Version"),P={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventureTwo",target:"_blank",rel:"noopener noreferrer"},V=n("Source"),U=e("h2",{id:"on-chain-matchmaking",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#on-chain-matchmaking","aria-hidden":"true"},"#"),n(" On chain matchmaking")],-1),E=e("p",null,"A multiplayer match three game which uses NFT stats for the character stats in the game and has an interesting onchain matchmaking system.",-1),L={href:"https://deezquest.vercel.app/",target:"_blank",rel:"noopener noreferrer"},D=n("Live Version"),N={href:"https://github.com/val-samonte/deezquest",target:"_blank",rel:"noopener noreferrer"},z=n("Source"),B=e("h2",{id:"use-solana-pay-qr-codes-to-control-a-game",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#use-solana-pay-qr-codes-to-control-a-game","aria-hidden":"true"},"#"),n(" Use Solana Pay Qr codes to control a game")],-1),C=e("p",null,"Tug of war A multiplayer game where an account is changed via Solana Pay qr codes which can be player with many people on a big screen. Backend Anchor and the frontend is Js React and Next13.",-1),F={href:"https://www.youtube.com/watch?v=_XBvEHwSqJc&ab_channel=SolPlay",target:"_blank",rel:"noopener noreferrer"},q=n("Tutorial"),H={href:"https://tug-of-war.vercel.app/",target:"_blank",rel:"noopener noreferrer"},K=n("Example"),I={href:"https://github.com/solana-developers/workshops/tree/main/workshops/tug-of-war",target:"_blank",rel:"noopener noreferrer"},W=n("Source"),X=e("h2",{id:"hide-game-state-from-other-players",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hide-game-state-from-other-players","aria-hidden":"true"},"#"),n(" Hide game state from other players")],-1),j=e("p",null,"Stone paper scissors",-1),M=e("p",null,"A game where on chain data is hidden by saving a hash in the client until reveal. SPL Tokens as price for the winner.",-1),R={href:"https://github.com/kevinrodriguez-io/bonk-paper-scissors",target:"_blank",rel:"noopener noreferrer"},G=n("Source"),J=e("p",null,"Another example submitted for grizzlython which encrypts entries and send it to the next player with an additional encryption:",-1),O={href:"https://github.com/solanaGames",target:"_blank",rel:"noopener noreferrer"},Q=n("Source"),Y=e("h2",{id:"how-to-build-a-round-based-multiplayer-game",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#how-to-build-a-round-based-multiplayer-game","aria-hidden":"true"},"#"),n(" How to build a round based multiplayer game")],-1),Z=e("p",null,"Tic Tac toe A simple multiplayer game written in Anchor",-1),$={href:"https://book.anchor-lang.com/anchor_in_depth/milestone_project_tic-tac-toe.html",target:"_blank",rel:"noopener noreferrer"},ee=n("Tutorial"),ne={href:"https://github.com/coral-xyz/anchor-book/tree/master/programs/tic-tac-toe",target:"_blank",rel:"noopener noreferrer"},te=n("Source"),oe=e("h2",{id:"on-chain-chess",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#on-chain-chess","aria-hidden":"true"},"#"),n(" On Chain Chess")],-1),re=e("p",null,"Chess Complete on chain playable chess game written in Anchor. Send someone a link to start a game. Looking for contributors.",-1),ae={href:"https://chess.vicyyn.com/",target:"_blank",rel:"noopener noreferrer"},se=n("Live Version"),ie={href:"https://github.com/vicyyn/sol-chess/",target:"_blank",rel:"noopener noreferrer"},he=n("Source"),le=e("h2",{id:"multiplayer-game-using-voting-system",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#multiplayer-game-using-voting-system","aria-hidden":"true"},"#"),n(" Multiplayer Game using voting system")],-1),ce=e("p",null,"Pokemon voting system A game where collectively people vote on moves in a game boy game. Every move is recorded and each move can be minted as an NFTs.",-1),de={href:"https://solana.playspokemon.xyz/",target:"_blank",rel:"noopener noreferrer"},_e=n("Live Version"),pe={href:"https://github.com/nelsontky/web3-plays-pokemon",target:"_blank",rel:"noopener noreferrer"},me=n("Source"),ue=e("h2",{id:"entity-component-system-example",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#entity-component-system-example","aria-hidden":"true"},"#"),n(" Entity component system example")],-1),ge=n("Kyoudai Clash is an on chain realtime Using the jump crypto "),fe={href:"https://github.com/JumpCrypto/sol-arc",target:"_blank",rel:"noopener noreferrer"},ye=n("Arc framework"),be=n(" which is an on chain entity component system for Solana."),ke={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},ve=n("xNFT Version"),we={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},xe=n("Source"),Se=e("h2",{id:"adventure-killing-monsters-and-gaining-xp",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#adventure-killing-monsters-and-gaining-xp","aria-hidden":"true"},"#"),n(" Adventure killing monsters and gaining xp")],-1),Ae=e("p",null,"Lumia online was a hackthon submission and is a nice reference for a little adventure game.",-1),Te={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},Pe=n("xNFT Version"),Ve={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},Ue=n("Source"),Ee=e("h2",{id:"real-time-pvp-on-chain-game",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#real-time-pvp-on-chain-game","aria-hidden":"true"},"#"),n(" Real-time pvp on chain game")],-1),Le=e("p",null,"SolHunter",-1),De=e("p",null,"Real-time Solana Battle Royal Game. Using Anchor program, UnitySDK, WebSocket account subscription. Players can spawn their characters represented as one of their NFTs on a grid and move around. If a player hits another player or chest he collect its Sol. The grid is implemented as a two dimensional array where every tile saves the players wallet key and the NFT public key.",-1),Ne={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},ze=n("Example"),Be={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/SolHunter",target:"_blank",rel:"noopener noreferrer"},Ce=n("Source");function Fe(qe,He){const t=a("ExternalLinkIcon");return s(),i(h,null,[c,d,_,e("p",null,[e("a",p,[m,o(t)])]),e("p",null,[e("a",u,[g,o(t)])]),e("p",null,[e("a",f,[y,o(t)])]),e("p",null,[e("a",b,[k,o(t)])]),v,w,e("p",null,[e("a",x,[S,o(t)])]),e("p",null,[e("a",A,[T,o(t)])]),e("p",null,[e("a",P,[V,o(t)])]),U,E,e("p",null,[e("a",L,[D,o(t)])]),e("p",null,[e("a",N,[z,o(t)])]),B,C,e("p",null,[e("a",F,[q,o(t)])]),e("p",null,[e("a",H,[K,o(t)])]),e("p",null,[e("a",I,[W,o(t)])]),X,j,M,e("p",null,[e("a",R,[G,o(t)])]),J,e("p",null,[e("a",O,[Q,o(t)])]),Y,Z,e("p",null,[e("a",$,[ee,o(t)])]),e("p",null,[e("a",ne,[te,o(t)])]),oe,re,e("p",null,[e("a",ae,[se,o(t)])]),e("p",null,[e("a",ie,[he,o(t)])]),le,ce,e("p",null,[e("a",de,[_e,o(t)])]),e("p",null,[e("a",pe,[me,o(t)])]),ue,e("p",null,[ge,e("a",fe,[ye,o(t)]),be]),e("p",null,[e("a",ke,[ve,o(t)])]),e("p",null,[e("a",we,[xe,o(t)])]),Se,Ae,e("p",null,[e("a",Te,[Pe,o(t)])]),e("p",null,[e("a",Ve,[Ue,o(t)])]),Ee,Le,De,e("p",null,[e("a",Ne,[ze,o(t)])]),e("p",null,[e("a",Be,[Ce,o(t)])])],64)}var Ie=r(l,[["render",Fe]]);export{Ie as default};
diff --git a/docs/.vuepress/dist/assets/game-examples.html.4e1c4e80.js b/docs/.vuepress/dist/assets/game-examples.html.f01c9761.js
similarity index 99%
rename from docs/.vuepress/dist/assets/game-examples.html.4e1c4e80.js
rename to docs/.vuepress/dist/assets/game-examples.html.f01c9761.js
index 669b51b88..55d289c6c 100644
--- a/docs/.vuepress/dist/assets/game-examples.html.4e1c4e80.js
+++ b/docs/.vuepress/dist/assets/game-examples.html.f01c9761.js
@@ -1 +1 @@
-import{_ as o,r,o as s,c as i,a,b as t,F as l,d as n}from"./app.07ce7a66.js";const g={},h=a("h1",{id:"open-source-solana-laro-upang-sanggunian-para-sa-pag-aaral",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#open-source-solana-laro-upang-sanggunian-para-sa-pag-aaral","aria-hidden":"true"},"#"),n(" Open source Solana laro upang sanggunian para sa pag-aaral")],-1),p=a("h2",{id:"makipag-ugnayan-sa-anchor-program-mula-sa-unity",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#makipag-ugnayan-sa-anchor-program-mula-sa-unity","aria-hidden":"true"},"#"),n(" Makipag-ugnayan sa Anchor Program mula sa Unity")],-1),c=a("p",null,"Isang simpleng halimbawa ng paglipat ng player pakaliwa at kanan gamit ang Anchor framework at Unity SD",-1),_={href:"https://www.youtube.com/watch?v=_vQ3bSs3svs",target:"_blank",rel:"noopener noreferrer"},d=n("Video"),m={href:"https://solplay.de/TinyAdventure/index.html",target:"_blank",rel:"noopener noreferrer"},u=n("Live Version"),b={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},k=n("Playground"),y={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},f=n("Unity Client"),w=a("h2",{id:"pag-save-ng-sol-sa-isang-pda",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#pag-save-ng-sol-sa-isang-pda","aria-hidden":"true"},"#"),n(" Pag-save ng Sol sa isang PDA")],-1),S=a("p",null,"Alamin kung paano i-save ang sol sa isang PDA seed vault at ipadala ito pabalik sa isang player. Ang backend ay nakasulat sa Anchor at ang frontend ay gumagamit ng Unity SDK",-1),v={href:"https://www.youtube.com/watch?v=gILXyWvXu7M",target:"_blank",rel:"noopener noreferrer"},x=n("Video"),A={href:"https://solplay.de/TinyAdventureTwo/index.html",target:"_blank",rel:"noopener noreferrer"},P=n("Live Version"),T={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventureTwo",target:"_blank",rel:"noopener noreferrer"},V=n("Source"),L=a("h2",{id:"sa-chain-matchmaking",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sa-chain-matchmaking","aria-hidden":"true"},"#"),n(" Sa chain matchmaking")],-1),E=a("p",null,"Isang multiplayer match three game na gumagamit ng NFT stats para sa character stats sa laro at may kawili-wiling onchain matchmaking system.",-1),U={href:"https://deezquest.vercel.app/",target:"_blank",rel:"noopener noreferrer"},I=n("Live Version"),N={href:"https://github.com/val-samonte/deezquest",target:"_blank",rel:"noopener noreferrer"},D=n("Source"),z=a("h2",{id:"gumamit-ng-mga-solana-pay-qr-code-para-makontrol-ang-isang-laro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#gumamit-ng-mga-solana-pay-qr-code-para-makontrol-ang-isang-laro","aria-hidden":"true"},"#"),n(" Gumamit ng mga Solana Pay Qr code para makontrol ang isang laro")],-1),B=a("p",null,"Hilahang lubid Isang multiplayer na laro kung saan pinapalitan ang isang account sa pamamagitan ng Solana Pay qr code na maaaring maging player na may maraming tao sa isang malaking screen. Backend Anchor at ang frontend ay Js React at Next13.",-1),F={href:"https://www.youtube.com/watch?v=_XBvEHwSqJc&ab_channel=SolPlay",target:"_blank",rel:"noopener noreferrer"},K=n("Tutorial"),C={href:"https://tug-of-war.vercel.app/",target:"_blank",rel:"noopener noreferrer"},M=n("Example"),q={href:"https://github.com/solana-developers/workshops/tree/main/workshops/tug-of-war",target:"_blank",rel:"noopener noreferrer"},H=n("Source"),G=a("h2",{id:"itago-ang-estado-ng-laro-mula-sa-iba-pang-mga-manlalaro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#itago-ang-estado-ng-laro-mula-sa-iba-pang-mga-manlalaro","aria-hidden":"true"},"#"),n(" Itago ang estado ng laro mula sa iba pang mga manlalaro")],-1),W=a("p",null,"Bato papel gunting",-1),X=a("p",null,"Isang laro kung saan nakatago ang data sa chain sa pamamagitan ng pag-save ng hash sa client hanggang sa maihayag. SPL Token bilang presyo para sa nanalo.",-1),j={href:"https://github.com/kevinrodriguez-io/bonk-paper-scissors",target:"_blank",rel:"noopener noreferrer"},R=n("Source"),J=a("p",null,"Isa pang halimbawang isinumite para sa grizzlython na nag-e-encrypt ng mga entry at ipinapadala ito sa susunod na manlalaro na may karagdagang pag-encrypt:",-1),Q={href:"https://github.com/solanaGames",target:"_blank",rel:"noopener noreferrer"},Y=n("Source"),O=a("h2",{id:"paano-bumuo-ng-isang-round-based-na-multiplayer-na-laro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#paano-bumuo-ng-isang-round-based-na-multiplayer-na-laro","aria-hidden":"true"},"#"),n(" Paano bumuo ng isang round based na multiplayer na laro")],-1),Z=a("p",null,"Tic Tac toe Isang simpleng larong multiplayer na nakasulat sa Anchor",-1),$={href:"https://book.anchor-lang.com/anchor_in_depth/milestone_project_tic-tac-toe.html",target:"_blank",rel:"noopener noreferrer"},aa=n("Tutorial"),na={href:"https://github.com/coral-xyz/anchor-book/tree/master/programs/tic-tac-toe",target:"_blank",rel:"noopener noreferrer"},ea=n("Source"),ta=a("h2",{id:"sa-chain-chess",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sa-chain-chess","aria-hidden":"true"},"#"),n(" Sa Chain Chess")],-1),oa=a("p",null,"Chess Kumpleto sa chain playable chess game na nakasulat sa Anchor. Magpadala sa isang tao ng link para magsimula ng laro. Naghahanap ng mga kontribyutor.",-1),ra={href:"https://chess.vicyyn.com/",target:"_blank",rel:"noopener noreferrer"},sa=n("Live Version"),ia={href:"https://github.com/vicyyn/sol-chess/",target:"_blank",rel:"noopener noreferrer"},la=n("Source"),ga=a("h2",{id:"larong-multiplayer-gamit-ang-sistema-ng-pagboto",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#larong-multiplayer-gamit-ang-sistema-ng-pagboto","aria-hidden":"true"},"#"),n(" Larong Multiplayer gamit ang sistema ng pagboto")],-1),ha=a("p",null,"Sistema ng pagboto ng Pokemon Isang laro kung saan sama-samang bumoto ang mga tao sa mga galaw sa isang game boy game. Ang bawat galaw ay naitala at ang bawat galaw ay maaaring i-minted bilang isang NFT.",-1),pa={href:"https://solana.playspokemon.xyz/",target:"_blank",rel:"noopener noreferrer"},ca=n("Live Version"),_a={href:"https://github.com/nelsontky/web3-plays-pokemon",target:"_blank",rel:"noopener noreferrer"},da=n("Source"),ma=a("h2",{id:"halimbawa-ng-sistema-ng-sangkap-ng-entity",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#halimbawa-ng-sistema-ng-sangkap-ng-entity","aria-hidden":"true"},"#"),n(" Halimbawa ng sistema ng sangkap ng entity")],-1),ua=n("Ang Kyoudai Clash ay isang on chain realtime Gamit ang jump crypto "),ba={href:"https://github.com/JumpCrypto/sol-arc",target:"_blank",rel:"noopener noreferrer"},ka=n("Arc framework"),ya=n(" na isang on chain entity component system para sa Solana."),fa={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},wa=n("xNFT Version"),Sa={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},va=n("Source"),xa=a("h2",{id:"pakikipagsapalaran-sa-pagpatay-ng-mga-halimaw-at-pagkakaroon-ng-xp",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#pakikipagsapalaran-sa-pagpatay-ng-mga-halimaw-at-pagkakaroon-ng-xp","aria-hidden":"true"},"#"),n(" Pakikipagsapalaran sa pagpatay ng mga halimaw at pagkakaroon ng xp")],-1),Aa=a("p",null,"Ang Lumia online ay isang pagsusumite ng hackathon at isang magandang sanggunian para sa isang maliit na laro ng pakikipagsapalaran.",-1),Pa={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},Ta=n("xNFT Version"),Va={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},La=n("Source"),Ea=a("h2",{id:"real-time-na-pvp-sa-chain-game",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#real-time-na-pvp-sa-chain-game","aria-hidden":"true"},"#"),n(" Real-time na pvp sa chain game")],-1),Ua=a("p",null,"SolHunter",-1),Ia=n("Real-time na Solana Battle Royal Game. Gamit ang Anchor program, UnitySDK, subscription sa WebSocket account. Maaaring i-spawn ng mga manlalaro ang kanilang mga character na kinakatawan bilang isa sa kanilang mga NFT sa isang grid at lumipat sa paligid. Kung ang isang manlalaro ay tumama sa isa pang manlalaro o dibdib ay kinokolekta niya ang Sol nito. Ang grid ay ipinatupad bilang isang dalawang dimensional na array kung saan ang bawat tile ay nagse-save ng wallet key ng mga manlalaro at ang NFT public key. "),Na={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},Da=n("Example"),za={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/SolHunter",target:"_blank",rel:"noopener noreferrer"},Ba=n("Source");function Fa(Ka,Ca){const e=r("ExternalLinkIcon");return s(),i(l,null,[h,p,c,a("p",null,[a("a",_,[d,t(e)])]),a("p",null,[a("a",m,[u,t(e)])]),a("p",null,[a("a",b,[k,t(e)])]),a("p",null,[a("a",y,[f,t(e)])]),w,S,a("p",null,[a("a",v,[x,t(e)])]),a("p",null,[a("a",A,[P,t(e)])]),a("p",null,[a("a",T,[V,t(e)])]),L,E,a("p",null,[a("a",U,[I,t(e)])]),a("p",null,[a("a",N,[D,t(e)])]),z,B,a("p",null,[a("a",F,[K,t(e)])]),a("p",null,[a("a",C,[M,t(e)])]),a("p",null,[a("a",q,[H,t(e)])]),G,W,X,a("p",null,[a("a",j,[R,t(e)])]),J,a("p",null,[a("a",Q,[Y,t(e)])]),O,Z,a("p",null,[a("a",$,[aa,t(e)])]),a("p",null,[a("a",na,[ea,t(e)])]),ta,oa,a("p",null,[a("a",ra,[sa,t(e)])]),a("p",null,[a("a",ia,[la,t(e)])]),ga,ha,a("p",null,[a("a",pa,[ca,t(e)])]),a("p",null,[a("a",_a,[da,t(e)])]),ma,a("p",null,[ua,a("a",ba,[ka,t(e)]),ya]),a("p",null,[a("a",fa,[wa,t(e)])]),a("p",null,[a("a",Sa,[va,t(e)])]),xa,Aa,a("p",null,[a("a",Pa,[Ta,t(e)])]),a("p",null,[a("a",Va,[La,t(e)])]),Ea,Ua,a("p",null,[Ia,a("a",Na,[Da,t(e)])]),a("p",null,[a("a",za,[Ba,t(e)])])],64)}var qa=o(g,[["render",Fa]]);export{qa as default};
+import{_ as o,r,o as s,c as i,a,b as t,F as l,d as n}from"./app.d411e3b3.js";const g={},h=a("h1",{id:"open-source-solana-laro-upang-sanggunian-para-sa-pag-aaral",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#open-source-solana-laro-upang-sanggunian-para-sa-pag-aaral","aria-hidden":"true"},"#"),n(" Open source Solana laro upang sanggunian para sa pag-aaral")],-1),p=a("h2",{id:"makipag-ugnayan-sa-anchor-program-mula-sa-unity",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#makipag-ugnayan-sa-anchor-program-mula-sa-unity","aria-hidden":"true"},"#"),n(" Makipag-ugnayan sa Anchor Program mula sa Unity")],-1),c=a("p",null,"Isang simpleng halimbawa ng paglipat ng player pakaliwa at kanan gamit ang Anchor framework at Unity SD",-1),_={href:"https://www.youtube.com/watch?v=_vQ3bSs3svs",target:"_blank",rel:"noopener noreferrer"},d=n("Video"),m={href:"https://solplay.de/TinyAdventure/index.html",target:"_blank",rel:"noopener noreferrer"},u=n("Live Version"),b={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},k=n("Playground"),y={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},f=n("Unity Client"),w=a("h2",{id:"pag-save-ng-sol-sa-isang-pda",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#pag-save-ng-sol-sa-isang-pda","aria-hidden":"true"},"#"),n(" Pag-save ng Sol sa isang PDA")],-1),S=a("p",null,"Alamin kung paano i-save ang sol sa isang PDA seed vault at ipadala ito pabalik sa isang player. Ang backend ay nakasulat sa Anchor at ang frontend ay gumagamit ng Unity SDK",-1),v={href:"https://www.youtube.com/watch?v=gILXyWvXu7M",target:"_blank",rel:"noopener noreferrer"},x=n("Video"),A={href:"https://solplay.de/TinyAdventureTwo/index.html",target:"_blank",rel:"noopener noreferrer"},P=n("Live Version"),T={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventureTwo",target:"_blank",rel:"noopener noreferrer"},V=n("Source"),L=a("h2",{id:"sa-chain-matchmaking",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sa-chain-matchmaking","aria-hidden":"true"},"#"),n(" Sa chain matchmaking")],-1),E=a("p",null,"Isang multiplayer match three game na gumagamit ng NFT stats para sa character stats sa laro at may kawili-wiling onchain matchmaking system.",-1),U={href:"https://deezquest.vercel.app/",target:"_blank",rel:"noopener noreferrer"},I=n("Live Version"),N={href:"https://github.com/val-samonte/deezquest",target:"_blank",rel:"noopener noreferrer"},D=n("Source"),z=a("h2",{id:"gumamit-ng-mga-solana-pay-qr-code-para-makontrol-ang-isang-laro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#gumamit-ng-mga-solana-pay-qr-code-para-makontrol-ang-isang-laro","aria-hidden":"true"},"#"),n(" Gumamit ng mga Solana Pay Qr code para makontrol ang isang laro")],-1),B=a("p",null,"Hilahang lubid Isang multiplayer na laro kung saan pinapalitan ang isang account sa pamamagitan ng Solana Pay qr code na maaaring maging player na may maraming tao sa isang malaking screen. Backend Anchor at ang frontend ay Js React at Next13.",-1),F={href:"https://www.youtube.com/watch?v=_XBvEHwSqJc&ab_channel=SolPlay",target:"_blank",rel:"noopener noreferrer"},K=n("Tutorial"),C={href:"https://tug-of-war.vercel.app/",target:"_blank",rel:"noopener noreferrer"},M=n("Example"),q={href:"https://github.com/solana-developers/workshops/tree/main/workshops/tug-of-war",target:"_blank",rel:"noopener noreferrer"},H=n("Source"),G=a("h2",{id:"itago-ang-estado-ng-laro-mula-sa-iba-pang-mga-manlalaro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#itago-ang-estado-ng-laro-mula-sa-iba-pang-mga-manlalaro","aria-hidden":"true"},"#"),n(" Itago ang estado ng laro mula sa iba pang mga manlalaro")],-1),W=a("p",null,"Bato papel gunting",-1),X=a("p",null,"Isang laro kung saan nakatago ang data sa chain sa pamamagitan ng pag-save ng hash sa client hanggang sa maihayag. SPL Token bilang presyo para sa nanalo.",-1),j={href:"https://github.com/kevinrodriguez-io/bonk-paper-scissors",target:"_blank",rel:"noopener noreferrer"},R=n("Source"),J=a("p",null,"Isa pang halimbawang isinumite para sa grizzlython na nag-e-encrypt ng mga entry at ipinapadala ito sa susunod na manlalaro na may karagdagang pag-encrypt:",-1),Q={href:"https://github.com/solanaGames",target:"_blank",rel:"noopener noreferrer"},Y=n("Source"),O=a("h2",{id:"paano-bumuo-ng-isang-round-based-na-multiplayer-na-laro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#paano-bumuo-ng-isang-round-based-na-multiplayer-na-laro","aria-hidden":"true"},"#"),n(" Paano bumuo ng isang round based na multiplayer na laro")],-1),Z=a("p",null,"Tic Tac toe Isang simpleng larong multiplayer na nakasulat sa Anchor",-1),$={href:"https://book.anchor-lang.com/anchor_in_depth/milestone_project_tic-tac-toe.html",target:"_blank",rel:"noopener noreferrer"},aa=n("Tutorial"),na={href:"https://github.com/coral-xyz/anchor-book/tree/master/programs/tic-tac-toe",target:"_blank",rel:"noopener noreferrer"},ea=n("Source"),ta=a("h2",{id:"sa-chain-chess",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sa-chain-chess","aria-hidden":"true"},"#"),n(" Sa Chain Chess")],-1),oa=a("p",null,"Chess Kumpleto sa chain playable chess game na nakasulat sa Anchor. Magpadala sa isang tao ng link para magsimula ng laro. Naghahanap ng mga kontribyutor.",-1),ra={href:"https://chess.vicyyn.com/",target:"_blank",rel:"noopener noreferrer"},sa=n("Live Version"),ia={href:"https://github.com/vicyyn/sol-chess/",target:"_blank",rel:"noopener noreferrer"},la=n("Source"),ga=a("h2",{id:"larong-multiplayer-gamit-ang-sistema-ng-pagboto",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#larong-multiplayer-gamit-ang-sistema-ng-pagboto","aria-hidden":"true"},"#"),n(" Larong Multiplayer gamit ang sistema ng pagboto")],-1),ha=a("p",null,"Sistema ng pagboto ng Pokemon Isang laro kung saan sama-samang bumoto ang mga tao sa mga galaw sa isang game boy game. Ang bawat galaw ay naitala at ang bawat galaw ay maaaring i-minted bilang isang NFT.",-1),pa={href:"https://solana.playspokemon.xyz/",target:"_blank",rel:"noopener noreferrer"},ca=n("Live Version"),_a={href:"https://github.com/nelsontky/web3-plays-pokemon",target:"_blank",rel:"noopener noreferrer"},da=n("Source"),ma=a("h2",{id:"halimbawa-ng-sistema-ng-sangkap-ng-entity",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#halimbawa-ng-sistema-ng-sangkap-ng-entity","aria-hidden":"true"},"#"),n(" Halimbawa ng sistema ng sangkap ng entity")],-1),ua=n("Ang Kyoudai Clash ay isang on chain realtime Gamit ang jump crypto "),ba={href:"https://github.com/JumpCrypto/sol-arc",target:"_blank",rel:"noopener noreferrer"},ka=n("Arc framework"),ya=n(" na isang on chain entity component system para sa Solana."),fa={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},wa=n("xNFT Version"),Sa={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},va=n("Source"),xa=a("h2",{id:"pakikipagsapalaran-sa-pagpatay-ng-mga-halimaw-at-pagkakaroon-ng-xp",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#pakikipagsapalaran-sa-pagpatay-ng-mga-halimaw-at-pagkakaroon-ng-xp","aria-hidden":"true"},"#"),n(" Pakikipagsapalaran sa pagpatay ng mga halimaw at pagkakaroon ng xp")],-1),Aa=a("p",null,"Ang Lumia online ay isang pagsusumite ng hackathon at isang magandang sanggunian para sa isang maliit na laro ng pakikipagsapalaran.",-1),Pa={href:"https://www.xnft.gg/app/D2i3cz9juUPLwbpi8rV2XvAnB5nEe3f8fM5YUpgVprbT",target:"_blank",rel:"noopener noreferrer"},Ta=n("xNFT Version"),Va={href:"https://github.com/spacemandev-git/dominari-arc",target:"_blank",rel:"noopener noreferrer"},La=n("Source"),Ea=a("h2",{id:"real-time-na-pvp-sa-chain-game",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#real-time-na-pvp-sa-chain-game","aria-hidden":"true"},"#"),n(" Real-time na pvp sa chain game")],-1),Ua=a("p",null,"SolHunter",-1),Ia=n("Real-time na Solana Battle Royal Game. Gamit ang Anchor program, UnitySDK, subscription sa WebSocket account. Maaaring i-spawn ng mga manlalaro ang kanilang mga character na kinakatawan bilang isa sa kanilang mga NFT sa isang grid at lumipat sa paligid. Kung ang isang manlalaro ay tumama sa isa pang manlalaro o dibdib ay kinokolekta niya ang Sol nito. Ang grid ay ipinatupad bilang isang dalawang dimensional na array kung saan ang bawat tile ay nagse-save ng wallet key ng mga manlalaro at ang NFT public key. "),Na={href:"https://solplay.de/SolHunter/index.html",target:"_blank",rel:"noopener noreferrer"},Da=n("Example"),za={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/SolHunter",target:"_blank",rel:"noopener noreferrer"},Ba=n("Source");function Fa(Ka,Ca){const e=r("ExternalLinkIcon");return s(),i(l,null,[h,p,c,a("p",null,[a("a",_,[d,t(e)])]),a("p",null,[a("a",m,[u,t(e)])]),a("p",null,[a("a",b,[k,t(e)])]),a("p",null,[a("a",y,[f,t(e)])]),w,S,a("p",null,[a("a",v,[x,t(e)])]),a("p",null,[a("a",A,[P,t(e)])]),a("p",null,[a("a",T,[V,t(e)])]),L,E,a("p",null,[a("a",U,[I,t(e)])]),a("p",null,[a("a",N,[D,t(e)])]),z,B,a("p",null,[a("a",F,[K,t(e)])]),a("p",null,[a("a",C,[M,t(e)])]),a("p",null,[a("a",q,[H,t(e)])]),G,W,X,a("p",null,[a("a",j,[R,t(e)])]),J,a("p",null,[a("a",Q,[Y,t(e)])]),O,Z,a("p",null,[a("a",$,[aa,t(e)])]),a("p",null,[a("a",na,[ea,t(e)])]),ta,oa,a("p",null,[a("a",ra,[sa,t(e)])]),a("p",null,[a("a",ia,[la,t(e)])]),ga,ha,a("p",null,[a("a",pa,[ca,t(e)])]),a("p",null,[a("a",_a,[da,t(e)])]),ma,a("p",null,[ua,a("a",ba,[ka,t(e)]),ya]),a("p",null,[a("a",fa,[wa,t(e)])]),a("p",null,[a("a",Sa,[va,t(e)])]),xa,Aa,a("p",null,[a("a",Pa,[Ta,t(e)])]),a("p",null,[a("a",Va,[La,t(e)])]),Ea,Ua,a("p",null,[Ia,a("a",Na,[Da,t(e)])]),a("p",null,[a("a",za,[Ba,t(e)])])],64)}var qa=o(g,[["render",Fa]]);export{qa as default};
diff --git a/docs/.vuepress/dist/assets/game-sdks.html.c0176ba6.js b/docs/.vuepress/dist/assets/game-sdks.html.1abe292d.js
similarity index 98%
rename from docs/.vuepress/dist/assets/game-sdks.html.c0176ba6.js
rename to docs/.vuepress/dist/assets/game-sdks.html.1abe292d.js
index 2670a33d7..7dff3e06b 100644
--- a/docs/.vuepress/dist/assets/game-sdks.html.c0176ba6.js
+++ b/docs/.vuepress/dist/assets/game-sdks.html.1abe292d.js
@@ -1,2 +1,2 @@
-import{_ as a,r as s,o as r,c as i,a as e,b as o,F as l,d as t,e as c}from"./app.07ce7a66.js";const h={},d=e("h3",{id:"unity-sdk",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#unity-sdk","aria-hidden":"true"},"#"),t(" Unity SDK")],-1),_=e("p",null,"The unity game engine is known for its beginner friendly approach and cross platform support including WebGL, ios and android. Build once export everywhere. The Solana Unity SDK comes with NFT support, transactions, RPC functions, Phantom Deep lLinks, WebGL connector, WebSocket connection support, mobile wallet-adapter and anchor client code generation.",-1),u={href:"https://solana.unity-sdk.gg/",target:"_blank",rel:"noopener noreferrer"},p=t("Docs"),b=e("br",null,null,-1),f={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},m=t("Verified Unity Asset Store Listing"),g=e("br",null,null,-1),k={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples",target:"_blank",rel:"noopener noreferrer"},y=t("Example Games"),w=e("br",null,null,-1),S=e("h3",{id:"unreal-sdk",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#unreal-sdk","aria-hidden":"true"},"#"),t(" Unreal SDK")],-1),x=e("p",null,"Unreal engine is known for its great visuals and node based scripting framework. The Solana sdk was originally build by the team of Star Atlas.",-1),v={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},A=t("Star Atlas Unreal SDK"),P=e("br",null,null,-1),T={href:"https://www.youtube.com/watch?v=S8fm8mFeUkk",target:"_blank",rel:"noopener noreferrer"},U=t("Tutorial"),j=e("br",null,null,-1),D=e("h3",{id:"flutter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#flutter","aria-hidden":"true"},"#"),t(" Flutter")],-1),F=e("p",null,"Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.",-1),N={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},C=t("Source Code"),E=e("br",null,null,-1),W=c(`

Next.js/React + Anchor

One of the easiest way to build on Solana is using the Web3js Javascript framework in combination with the Solana Anchor frameworks. For more complex games I would recommend using a GameEngine like Unity or Unreal though. The fastest way to set it up is:

npx create-solana-dapp your-app
+import{_ as a,r as s,o as r,c as i,a as e,b as o,F as l,d as t,e as c}from"./app.d411e3b3.js";const h={},d=e("h3",{id:"unity-sdk",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#unity-sdk","aria-hidden":"true"},"#"),t(" Unity SDK")],-1),_=e("p",null,"The unity game engine is known for its beginner friendly approach and cross platform support including WebGL, ios and android. Build once export everywhere. The Solana Unity SDK comes with NFT support, transactions, RPC functions, Phantom Deep lLinks, WebGL connector, WebSocket connection support, mobile wallet-adapter and anchor client code generation.",-1),u={href:"https://solana.unity-sdk.gg/",target:"_blank",rel:"noopener noreferrer"},p=t("Docs"),b=e("br",null,null,-1),f={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},m=t("Verified Unity Asset Store Listing"),g=e("br",null,null,-1),k={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples",target:"_blank",rel:"noopener noreferrer"},y=t("Example Games"),w=e("br",null,null,-1),S=e("h3",{id:"unreal-sdk",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#unreal-sdk","aria-hidden":"true"},"#"),t(" Unreal SDK")],-1),x=e("p",null,"Unreal engine is known for its great visuals and node based scripting framework. The Solana sdk was originally build by the team of Star Atlas.",-1),v={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},A=t("Star Atlas Unreal SDK"),P=e("br",null,null,-1),T={href:"https://www.youtube.com/watch?v=S8fm8mFeUkk",target:"_blank",rel:"noopener noreferrer"},U=t("Tutorial"),j=e("br",null,null,-1),D=e("h3",{id:"flutter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#flutter","aria-hidden":"true"},"#"),t(" Flutter")],-1),F=e("p",null,"Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.",-1),N={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},C=t("Source Code"),E=e("br",null,null,-1),W=c(`

Next.js/React + Anchor

One of the easiest way to build on Solana is using the Web3js Javascript framework in combination with the Solana Anchor frameworks. For more complex games I would recommend using a GameEngine like Unity or Unreal though. The fastest way to set it up is:

npx create-solana-dapp your-app
 

This will generate a great starting application with wallet-adapter support. A benefit of using Next.js is that you can use the same code in the backend and in the frontend, speeding up development.

`,4),G={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},I=t("Web3Js"),K=e("br",null,null,-1),L={href:"https://solanacookbook.com/references/basic-transactions.html#how-to-send-sol",target:"_blank",rel:"noopener noreferrer"},R=t("Solana Cookbook"),V=e("br",null,null,-1),B=e("h3",{id:"python",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#python","aria-hidden":"true"},"#"),t(" Python")],-1),J=e("p",null,"Python is an easy to learn programming language which is often used in AI programming. There is a framework called Seahorse which lets you build smart contracts in Python. Seahorse is built on top of the Solana Anchor framework. It converts Python code into Rust which Anchor can then use. Seahorse is currently in beta.",-1),z={href:"https://beta.solpg.io/tutorials/hello-seahorse",target:"_blank",rel:"noopener noreferrer"},O=t("Anchor Playground Example"),q=e("br",null,null,-1),H={href:"https://github.com/solana-developers/seahorse",target:"_blank",rel:"noopener noreferrer"},M=t("Github Repo"),Q=e("br",null,null,-1),X={href:"https://www.seahorse.dev/",target:"_blank",rel:"noopener noreferrer"},Y=t("Documentation"),Z=e("h3",{id:"native-c",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-c","aria-hidden":"true"},"#"),t(" Native C#")],-1),$=e("p",null,"The original port of Web3js to C#. It comes with a bunch of functionality like transactions, RPC functions and anchor client code generation.",-1),ee={href:"https://github.com/bmresearch/Solnet/blob/master/docs/articles/getting_started.md",target:"_blank",rel:"noopener noreferrer"},te=t("Source and Docs"),ne=e("br",null,null,-1);function oe(ae,se){const n=s("ExternalLinkIcon");return r(),i(l,null,[d,_,e("p",null,[e("a",u,[p,o(n)]),b,e("a",f,[m,o(n)]),g,e("a",k,[y,o(n)]),w]),S,x,e("p",null,[e("a",v,[A,o(n)]),P,e("a",T,[U,o(n)]),j]),D,F,e("p",null,[e("a",N,[C,o(n)]),E]),W,e("p",null,[e("a",G,[I,o(n)]),K,e("a",L,[R,o(n)]),V]),B,J,e("p",null,[e("a",z,[O,o(n)]),q,e("a",H,[M,o(n)]),Q,e("a",X,[Y,o(n)])]),Z,$,e("p",null,[e("a",ee,[te,o(n)]),ne])],64)}var ie=a(h,[["render",oe]]);export{ie as default}; diff --git a/docs/.vuepress/dist/assets/game-sdks.html.92d7e729.js b/docs/.vuepress/dist/assets/game-sdks.html.3bfddaba.js similarity index 98% rename from docs/.vuepress/dist/assets/game-sdks.html.92d7e729.js rename to docs/.vuepress/dist/assets/game-sdks.html.3bfddaba.js index 2183731c2..517e523d3 100644 --- a/docs/.vuepress/dist/assets/game-sdks.html.92d7e729.js +++ b/docs/.vuepress/dist/assets/game-sdks.html.3bfddaba.js @@ -1,2 +1,2 @@ -import{_ as s,r,o as a,c as l,a as e,b as o,F as i,d as t,e as c}from"./app.07ce7a66.js";const d={},u=e("h3",{id:"sdk-unity",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sdk-unity","aria-hidden":"true"},"#"),t(" SDK Unity")],-1),h=e("p",null,[t("Le moteur de jeu Unity est connu pour son utilisation adapt\xE9e aux d\xE9butants et sa prise en charge de plusieurs plateformes, notamment WebGL, IOS et Android. Il vous permet ainsi de cr\xE9ez une seule fois et d'exportez partout. Le SDK Unity pour Solana inclut le support des NFTs, les transactions, les fonctions RPC, les "),e("em",null,"Deep Links"),t(" de Phantom, le connecteur WebGL, le support de connexion WebSocket, l'adaptateur de portemonnaie mobile et la g\xE9n\xE9ration de code Anchor.")],-1),p={href:"https://solana.unity-sdk.gg/",target:"_blank",rel:"noopener noreferrer"},_=t("Documentations"),m=e("br",null,null,-1),b={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},f=t("Liste v\xE9rifi\xE9e de l'Asset Store de Unity"),g=e("br",null,null,-1),k={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples",target:"_blank",rel:"noopener noreferrer"},x=t("Exemples de jeux"),S=e("br",null,null,-1),v=e("h3",{id:"sdk-unreal",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sdk-unreal","aria-hidden":"true"},"#"),t(" SDK Unreal")],-1),y=e("p",null,"Unreal engine est connu pour ses superbes visuels et son framework de script bas\xE9 sur les n\u0153uds. Le SDK Solana a \xE9t\xE9 construit \xE0 l'origine par l'\xE9quipe de Star Atlas.",-1),j={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},L=t("SDK Unreal de Star Atlas"),U=e("br",null,null,-1),w={href:"https://www.youtube.com/watch?v=S8fm8mFeUkk",target:"_blank",rel:"noopener noreferrer"},A=t("Tutoriel"),D=e("br",null,null,-1),P=e("h3",{id:"flutter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#flutter","aria-hidden":"true"},"#"),t(" Flutter")],-1),C=e("p",null,"Flutter est un framework open source de Google qui permet de cr\xE9er des applications multiplateformes compil\xE9es nativement \xE0 partir d'une seule base de code.",-1),q={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},F=t("Code Source"),K=e("br",null,null,-1),N=c(`

Next.js/React + Anchor

L'une des fa\xE7ons les plus simples de construire sur Solana est d'utiliser le framework Javascript Web3js en combinaison avec le framework Anchor. Pour des jeux plus complexes, il serait cependant pr\xE9f\xE9rable d'utiliser un moteur de jeu comme Unity ou Unreal. La fa\xE7on la plus rapide de le configurer est la suivante :

npx create-solana-dapp your-app
+import{_ as s,r,o as a,c as l,a as e,b as o,F as i,d as t,e as c}from"./app.d411e3b3.js";const d={},u=e("h3",{id:"sdk-unity",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sdk-unity","aria-hidden":"true"},"#"),t(" SDK Unity")],-1),h=e("p",null,[t("Le moteur de jeu Unity est connu pour son utilisation adapt\xE9e aux d\xE9butants et sa prise en charge de plusieurs plateformes, notamment WebGL, IOS et Android. Il vous permet ainsi de cr\xE9ez une seule fois et d'exportez partout. Le SDK Unity pour Solana inclut le support des NFTs, les transactions, les fonctions RPC, les "),e("em",null,"Deep Links"),t(" de Phantom, le connecteur WebGL, le support de connexion WebSocket, l'adaptateur de portemonnaie mobile et la g\xE9n\xE9ration de code Anchor.")],-1),p={href:"https://solana.unity-sdk.gg/",target:"_blank",rel:"noopener noreferrer"},_=t("Documentations"),m=e("br",null,null,-1),b={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},f=t("Liste v\xE9rifi\xE9e de l'Asset Store de Unity"),g=e("br",null,null,-1),k={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples",target:"_blank",rel:"noopener noreferrer"},x=t("Exemples de jeux"),S=e("br",null,null,-1),v=e("h3",{id:"sdk-unreal",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#sdk-unreal","aria-hidden":"true"},"#"),t(" SDK Unreal")],-1),y=e("p",null,"Unreal engine est connu pour ses superbes visuels et son framework de script bas\xE9 sur les n\u0153uds. Le SDK Solana a \xE9t\xE9 construit \xE0 l'origine par l'\xE9quipe de Star Atlas.",-1),j={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},L=t("SDK Unreal de Star Atlas"),U=e("br",null,null,-1),w={href:"https://www.youtube.com/watch?v=S8fm8mFeUkk",target:"_blank",rel:"noopener noreferrer"},A=t("Tutoriel"),D=e("br",null,null,-1),P=e("h3",{id:"flutter",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#flutter","aria-hidden":"true"},"#"),t(" Flutter")],-1),C=e("p",null,"Flutter est un framework open source de Google qui permet de cr\xE9er des applications multiplateformes compil\xE9es nativement \xE0 partir d'une seule base de code.",-1),q={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},F=t("Code Source"),K=e("br",null,null,-1),N=c(`

Next.js/React + Anchor

L'une des fa\xE7ons les plus simples de construire sur Solana est d'utiliser le framework Javascript Web3js en combinaison avec le framework Anchor. Pour des jeux plus complexes, il serait cependant pr\xE9f\xE9rable d'utiliser un moteur de jeu comme Unity ou Unreal. La fa\xE7on la plus rapide de le configurer est la suivante :

npx create-solana-dapp your-app
 

Cela permettra de cr\xE9er une excellente application de d\xE9part avec le support de portefeuille. L'un des avantages de l'utilisation de Next.js est que vous pouvez utiliser le m\xEAme code dans le backend et dans le frontend, ce qui acc\xE9l\xE8re le d\xE9veloppement.

`,4),W={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},E=t("Web3Js"),I=e("br",null,null,-1),z={href:"https://solanacookbook.com/references/basic-transactions.html#how-to-send-sol",target:"_blank",rel:"noopener noreferrer"},V=t("Solana Cookbook"),B=e("br",null,null,-1),G=e("h3",{id:"python",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#python","aria-hidden":"true"},"#"),t(" Python")],-1),R=e("p",null,"Python est un langage de programmation facile \xE0 apprendre qui est souvent utilis\xE9 dans la programmation de l'intelligence artificielle. Il existe un framework appel\xE9 Seahorse qui vous permet de construire des contrats intelligents en Python.",-1),T={href:"https://beta.solpg.io/tutorials/hello-seahorse",target:"_blank",rel:"noopener noreferrer"},J=t("Exemple Anchor Playground"),O=e("br",null,null,-1),H={href:"https://github.com/ameliatastic/seahorse-lang",target:"_blank",rel:"noopener noreferrer"},M=t("Source et Documentations"),Q=e("br",null,null,-1),X=e("h3",{id:"c-natif",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#c-natif","aria-hidden":"true"},"#"),t(" C# natif")],-1),Y=e("p",null,"Le premier portage de Web3js en C#. Il inclut un grand nombre de fonctionnalit\xE9s telles que les transactions, les fonctions RPC et la g\xE9n\xE9ration de code Anchor.",-1),Z={href:"https://github.com/bmresearch/Solnet/blob/master/docs/articles/getting_started.md",target:"_blank",rel:"noopener noreferrer"},$=t("Source et Documentations"),ee=e("br",null,null,-1);function te(ne,oe){const n=r("ExternalLinkIcon");return a(),l(i,null,[u,h,e("p",null,[e("a",p,[_,o(n)]),m,e("a",b,[f,o(n)]),g,e("a",k,[x,o(n)]),S]),v,y,e("p",null,[e("a",j,[L,o(n)]),U,e("a",w,[A,o(n)]),D]),P,C,e("p",null,[e("a",q,[F,o(n)]),K]),N,e("p",null,[e("a",W,[E,o(n)]),I,e("a",z,[V,o(n)]),B]),G,R,e("p",null,[e("a",T,[J,o(n)]),O,e("a",H,[M,o(n)]),Q]),X,Y,e("p",null,[e("a",Z,[$,o(n)]),ee])],64)}var re=s(d,[["render",te]]);export{re as default}; diff --git a/docs/.vuepress/dist/assets/game-sdks.html.d18bd9d2.js b/docs/.vuepress/dist/assets/game-sdks.html.f364ca6f.js similarity index 98% rename from docs/.vuepress/dist/assets/game-sdks.html.d18bd9d2.js rename to docs/.vuepress/dist/assets/game-sdks.html.f364ca6f.js index 029d892d8..c8206f6a3 100644 --- a/docs/.vuepress/dist/assets/game-sdks.html.d18bd9d2.js +++ b/docs/.vuepress/dist/assets/game-sdks.html.f364ca6f.js @@ -1,2 +1,2 @@ -import{_ as o,r as s,o as r,c as l,a,b as t,F as i,d as n,e as c}from"./app.07ce7a66.js";const h={},d=a("h3",{id:"unity-sdk",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#unity-sdk","aria-hidden":"true"},"#"),n(" Unity SDK")],-1),g=a("p",null,"Ang unity game engine ay kilala sa beginner friendly approach at cross platform support kabilang ang WebGL, ios at android. Bumuo nang isang beses i-export sa lahat ng dako. Ang Solana Unity SDK ay may kasamang NFT support, mga transaksyon, RPC function, Phantom Deep lLinks, WebGL connector, WebSocket connection support, mobile wallet-adapter at anchor client code generation.",-1),p={href:"https://solana.unity-sdk.gg/",target:"_blank",rel:"noopener noreferrer"},u=n("Docs"),_=a("br",null,null,-1),m={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},b=n("Verified Unity Asset Store Listing"),k=a("br",null,null,-1),f={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples",target:"_blank",rel:"noopener noreferrer"},y=n("Example Games"),S=a("br",null,null,-1),x=a("h3",{id:"unreal-sdk",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#unreal-sdk","aria-hidden":"true"},"#"),n(" Unreal SDK")],-1),A=a("p",null,"Ang Unreal engine ay kilala sa magagandang visual at node based scripting framework. Ang Solana sdk ay orihinal na binuo ng koponan ng Star Atlas.",-1),v={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},w=n("Star Atlas Unreal SDK"),P=a("br",null,null,-1),U={href:"https://www.youtube.com/watch?v=S8fm8mFeUkk",target:"_blank",rel:"noopener noreferrer"},j=n("Tutorial"),D=a("br",null,null,-1),N=a("h3",{id:"flutter",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#flutter","aria-hidden":"true"},"#"),n(" Flutter")],-1),C=a("p",null,"Ang Flutter ay isang open source na framework ng Google para sa pagbuo ng maganda, natively compiled, multi-platform na mga application mula sa isang codebase.",-1),E={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},F=n("Source Code"),W=a("br",null,null,-1),I=c(`

Next.js/React + Anchor

Isa sa pinakamadaling paraan upang bumuo sa Solana ay ang paggamit ng Web3js Javascript framework kasama ng Solana Anchor frameworks. Para sa mas kumplikadong mga laro, inirerekumenda ko ang paggamit ng GameEngine tulad ng Unity o Unreal. Ang pinakamabilis na paraan upang i-set up ito ay:

npx create-solana-dapp your-app
+import{_ as o,r as s,o as r,c as l,a,b as t,F as i,d as n,e as c}from"./app.d411e3b3.js";const h={},d=a("h3",{id:"unity-sdk",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#unity-sdk","aria-hidden":"true"},"#"),n(" Unity SDK")],-1),g=a("p",null,"Ang unity game engine ay kilala sa beginner friendly approach at cross platform support kabilang ang WebGL, ios at android. Bumuo nang isang beses i-export sa lahat ng dako. Ang Solana Unity SDK ay may kasamang NFT support, mga transaksyon, RPC function, Phantom Deep lLinks, WebGL connector, WebSocket connection support, mobile wallet-adapter at anchor client code generation.",-1),p={href:"https://solana.unity-sdk.gg/",target:"_blank",rel:"noopener noreferrer"},u=n("Docs"),_=a("br",null,null,-1),m={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},b=n("Verified Unity Asset Store Listing"),k=a("br",null,null,-1),f={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples",target:"_blank",rel:"noopener noreferrer"},y=n("Example Games"),S=a("br",null,null,-1),x=a("h3",{id:"unreal-sdk",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#unreal-sdk","aria-hidden":"true"},"#"),n(" Unreal SDK")],-1),A=a("p",null,"Ang Unreal engine ay kilala sa magagandang visual at node based scripting framework. Ang Solana sdk ay orihinal na binuo ng koponan ng Star Atlas.",-1),v={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},w=n("Star Atlas Unreal SDK"),P=a("br",null,null,-1),U={href:"https://www.youtube.com/watch?v=S8fm8mFeUkk",target:"_blank",rel:"noopener noreferrer"},j=n("Tutorial"),D=a("br",null,null,-1),N=a("h3",{id:"flutter",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#flutter","aria-hidden":"true"},"#"),n(" Flutter")],-1),C=a("p",null,"Ang Flutter ay isang open source na framework ng Google para sa pagbuo ng maganda, natively compiled, multi-platform na mga application mula sa isang codebase.",-1),E={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},F=n("Source Code"),W=a("br",null,null,-1),I=c(`

Next.js/React + Anchor

Isa sa pinakamadaling paraan upang bumuo sa Solana ay ang paggamit ng Web3js Javascript framework kasama ng Solana Anchor frameworks. Para sa mas kumplikadong mga laro, inirerekumenda ko ang paggamit ng GameEngine tulad ng Unity o Unreal. Ang pinakamabilis na paraan upang i-set up ito ay:

npx create-solana-dapp your-app
 

Ito ay bubuo ng isang mahusay na panimulang application na may suporta sa wallet-adapter. Ang isang benepisyo ng paggamit ng Next.js ay maaari mong gamitin ang parehong code sa backend at sa frontend, na nagpapabilis sa pag-develop.

`,4),K={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},L=n("Web3Js"),G=a("br",null,null,-1),V={href:"https://solanacookbook.com/references/basic-transactions.html#how-to-send-sol",target:"_blank",rel:"noopener noreferrer"},B=n("Solana Cookbook"),R=a("br",null,null,-1),T=a("h3",{id:"python",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#python","aria-hidden":"true"},"#"),n(" Python")],-1),J=a("p",null,"Ang Python ay isang madaling matutunang programming language na kadalasang ginagamit sa AI programming. Mayroong isang balangkas na tinatawag na Seahorse na hinahayaan kang bumuo ng mga matalinong kontrata sa Python.",-1),z={href:"https://beta.solpg.io/tutorials/hello-seahorse",target:"_blank",rel:"noopener noreferrer"},M=n("Anchor Playground Example"),q=a("br",null,null,-1),H={href:"https://github.com/ameliatastic/seahorse-lang",target:"_blank",rel:"noopener noreferrer"},O=n("Source and Docs"),Q=a("br",null,null,-1),X=a("h3",{id:"native-c",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#native-c","aria-hidden":"true"},"#"),n(" Native C#")],-1),Y=a("p",null,"Ang orihinal na port ng Web3js sa C#. Ito ay may kasamang grupo ng mga functionality tulad ng mga transaksyon, RPC function at anchor client code generation.",-1),Z={href:"https://github.com/bmresearch/Solnet/blob/master/docs/articles/getting_started.md",target:"_blank",rel:"noopener noreferrer"},$=n("Source and Docs"),aa=a("br",null,null,-1);function na(ea,ta){const e=s("ExternalLinkIcon");return r(),l(i,null,[d,g,a("p",null,[a("a",p,[u,t(e)]),_,a("a",m,[b,t(e)]),k,a("a",f,[y,t(e)]),S]),x,A,a("p",null,[a("a",v,[w,t(e)]),P,a("a",U,[j,t(e)]),D]),N,C,a("p",null,[a("a",E,[F,t(e)]),W]),I,a("p",null,[a("a",K,[L,t(e)]),G,a("a",V,[B,t(e)]),R]),T,J,a("p",null,[a("a",z,[M,t(e)]),q,a("a",H,[O,t(e)]),Q]),X,Y,a("p",null,[a("a",Z,[$,t(e)]),aa])],64)}var sa=o(h,[["render",na]]);export{sa as default}; diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.19ef2dee.js b/docs/.vuepress/dist/assets/get-program-accounts.html.04314539.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.19ef2dee.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.04314539.js index 07640d901..a9c903acf 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.19ef2dee.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.04314539.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as m,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},_=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("\u0E19\u0E35\u0E48\u0E15\u0E37\u0E2D RPC method \u0E17\u0E35\u0E48\u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32 accounts \u0E17\u0E35\u0E48 program \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07. \u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 pagination. \u0E01\u0E32\u0E23 requests \u0E44\u0E1B\u0E17\u0E35\u0E48 "),n("code",null,"getProgramAccounts"),s(" \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 parameters "),n("code",null,"dataSlice"),s(" \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D "),n("code",null,"filters"),s(" \u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E25\u0E14 response time \u0E41\u0E25\u0E30\u0E08\u0E30\u0E44\u0E14\u0E49\u0E2A\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23.")],-1),h=n("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Parameters",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Pubkey \u0E02\u0E2D\u0E07 program \u0E17\u0E35\u0E48\u0E08\u0E30 query, \u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A base58 encoded string")],-1),C=s("(optional) "),P=n("code",null,"configOrCommitment",-1),S=s(": "),T=n("code",null,"object",-1),D=s(" - Configuration parameters \u0E17\u0E35\u0E48\u0E21\u0E35 optional fields \u0E15\u0E32\u0E21\u0E19\u0E35\u0E49: "),E=s("(optional) "),N=n("code",null,"commitment",-1),v=s(": "),M=n("code",null,"string",-1),R=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),L=s("(optional) "),z=n("code",null,"encoding",-1),B=s(": "),x=n("code",null,"string",-1),F=s(" - Encoding \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A account data, \u0E17\u0E31\u0E49\u0E07: "),H=n("code",null,"base58",-1),Z=s(", "),Q=n("code",null,"base64",-1),U=s(", \u0E2B\u0E23\u0E37\u0E2D "),W=n("code",null,"jsonParsed",-1),j=s(". Note, web3js \u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Y=s("getParsedProgramAccounts"),J=s(" \u0E41\u0E17\u0E19"),X=o("
  • (optional) dataSlice: object - \u0E08\u0E33\u0E01\u0E31\u0E14\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C account data \u0E42\u0E14\u0E22\u0E02\u0E36\u0E49\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E01\u0E31\u0E1A:
    • offset: number - \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 bytes \u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E02\u0E2D\u0E07 account data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32
    • length: number - \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 bytes \u0E02\u0E2D\u0E07 account data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E2A\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32
  • (optional) filters: array - \u0E04\u0E31\u0E14\u0E01\u0E23\u0E2D\u0E07 results \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 filter objects \u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07:
    • memcmp: object - \u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A series \u0E02\u0E2D\u0E07 bytes \u0E02\u0E2D\u0E07 account data:
      • offset: number - \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 bytes \u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E02\u0E2D\u0E07 account data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E17\u0E35\u0E22\u0E1A
      • bytes: string - Data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E17\u0E35\u0E22\u0E1A\u0E14\u0E49\u0E27\u0E22, \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A base58 encoded string \u0E08\u0E33\u0E01\u0E31\u0E14\u0E17\u0E35\u0E48 129 bytes
    • dataSize: number - \u0E40\u0E17\u0E35\u0E22\u0E1A account data length \u0E14\u0E49\u0E27\u0E22 data size \u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49
  • ",2),O=s("(optional) "),I=n("code",null,"withContext",-1),q=s(": "),$=n("code",null,"boolean",-1),nn=s(" - \u0E04\u0E23\u0E2D\u0E1A (wrap)\u200B \u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A "),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=s("RpcResponse JSON object"),en=o('
    Response

    \u0E15\u0E32\u0E21\u0E1B\u0E01\u0E15\u0E34\u0E41\u0E25\u0E49\u0E27 getProgramAccounts \u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32 array \u0E02\u0E2D\u0E07 JSON objects \u0E17\u0E35\u0E48\u0E21\u0E35\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E15\u0E32\u0E21\u0E19\u0E35\u0E49:

    • pubkey: string - account pubkey \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E02\u0E2D\u0E07 base58 encoded string
    • account: object - JSON object \u0E17\u0E35\u0E48\u0E21\u0E35 fields:
      • lamports: number, \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E02\u0E2D\u0E07 lamports \u0E17\u0E35\u0E48\u0E21\u0E35\u0E43\u0E19 account
      • owner: string, base58 encoded pubkey \u0E02\u0E2D\u0E07 program \u0E17\u0E35\u0E48 account \u0E44\u0E14\u0E49 assigned \u0E44\u0E27\u0E49
      • data: string | object - data \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A account \u0E2D\u0E32\u0E08\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07 encoded binary data \u0E2B\u0E23\u0E37\u0E2D JSON format \u0E02\u0E36\u0E49\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E01\u0E31\u0E1A encoding parameter
      • executable: boolean, \u0E15\u0E31\u0E27\u0E1A\u0E48\u0E07\u0E0A\u0E35\u0E49\u0E27\u0E48\u0E32 account \u0E19\u0E35\u0E49\u0E21\u0E35 program
      • rentEpoch: number, epoch \u0E17\u0E35\u0E48 account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22 rent
    ',3),tn=n("h2",{id:"\u0E25\u0E07\u0E25\u0E36\u0E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E25\u0E07\u0E25\u0E36\u0E01","aria-hidden":"true"},"#"),s(" \u0E25\u0E07\u0E25\u0E36\u0E01")],-1),cn=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u0E04\u0E37\u0E2D RPC method \u0E17\u0E35\u0E48\u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E17\u0E38\u0E01 accounts \u0E17\u0E35\u0E48 program \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07. \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49 "),n("code",null,"getProgramAccounts"),s(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E14\u0E49\u0E2B\u0E25\u0E32\u0E22\u0E41\u0E1A\u0E1A \u0E40\u0E0A\u0E48\u0E19:")],-1),on=n("li",null,"\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 token accounts \u0E02\u0E2D\u0E07 wallet",-1),ln=s("\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 token accounts \u0E17\u0E35\u0E48\u0E21\u0E35 mint \u0E40\u0E14\u0E35\u0E22\u0E27\u0E01\u0E31\u0E19(\u0E40\u0E0A\u0E48\u0E19 \u0E17\u0E38\u0E01\u0E46 \u0E04\u0E19\u0E17\u0E35\u0E48\u0E16\u0E37\u0E2D token "),pn={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},un=s("SRM"),rn=s(" \u0E44\u0E27\u0E49)"),mn=s("\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 custom accounts \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 program \u0E19\u0E35\u0E49(\u0E40\u0E0A\u0E48\u0E19 \u0E17\u0E38\u0E01\u0E46 \u0E04\u0E19\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 "),kn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),dn=s(")"),fn=o("

    \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E08\u0E30\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E42\u0E22\u0E0A\u0E19\u0E4C\u0E41\u0E25\u0E49\u0E27, getProgramAccounts \u0E22\u0E31\u0E07\u0E16\u0E39\u0E01\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E1C\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E49\u0E32\u0E07 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E14\u0E49\u0E27\u0E22\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07\u0E21\u0E31\u0E19 \u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 getProgramAccounts \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 RPC nodes \u0E04\u0E49\u0E19\u0E2B\u0E32 data \u0E02\u0E19\u0E32\u0E14\u0E43\u0E2B\u0E0D\u0E48. \u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E19\u0E31\u0E49\u0E19\u0E01\u0E34\u0E19\u0E17\u0E31\u0E49\u0E07 memory \u0E41\u0E25\u0E30 resource \u0E21\u0E32\u0E01\u0E46. \u0E1C\u0E25\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u0E04\u0E37\u0E2D\u0E16\u0E49\u0E32\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49\u0E1A\u0E48\u0E2D\u0E22\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E01\u0E34\u0E14 connection timeouts \u0E44\u0E14\u0E49. \u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49 getProgramAccounts endpoint \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 pagination. \u0E16\u0E49\u0E32\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E08\u0E30\u0E16\u0E39\u0E01\u0E15\u0E31\u0E14\u0E17\u0E34\u0E49\u0E07.

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2B\u0E25\u0E35\u0E01\u0E2B\u0E19\u0E35\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E19\u0E35\u0E49, getProgramAccounts \u0E40\u0E25\u0E22\u0E21\u0E35 parameters \u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49: \u0E0A\u0E37\u0E48\u0E2D, dataSlice \u0E41\u0E25\u0E30 filters options memcmp \u0E41\u0E25\u0E30 dataSize. \u0E16\u0E49\u0E32\u0E43\u0E0A\u0E49 parameters \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E25\u0E14\u0E02\u0E2D\u0E1A\u0E40\u0E02\u0E15\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E49\u0E41\u0E04\u0E1A\u0E25\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E04\u0E27\u0E1A\u0E04\u0E38\u0E21 \u0E41\u0E25\u0E30\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13\u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E44\u0E14\u0E49.

    ",2),_n=s("\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B\u0E02\u0E2D\u0E07 "),gn=n("code",null,"getProgramAccounts",-1),hn=s(" \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A "),yn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},wn=s("SPL-Token Program"),An=s(" \u0E40\u0E0A\u0E48\u0E19 \u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 accounts \u0E17\u0E35\u0E48 Token Program \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 "),Cn=s("\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E41\u0E1A\u0E1A\u0E1B\u0E01\u0E15\u0E34"),Pn=s(" \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E1B\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E21\u0E32\u0E01\u0E21\u0E32\u0E22 \u0E41\u0E15\u0E48\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E43\u0E2A\u0E48 parameters \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22\u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 request \u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E20\u0E32\u0E1E \u0E41\u0E25\u0E30\u0E44\u0E14\u0E49 data \u0E40\u0E09\u0E1E\u0E32\u0E30\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49."),Sn=o('

    filters

    parameter \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E1A\u0E48\u0E2D\u0E22\u0E46 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A getProgramAccounts \u0E04\u0E37\u0E2D filters array. \u0E0B\u0E36\u0E48\u0E07 array \u0E19\u0E35\u0E49\u0E08\u0E30\u0E23\u0E31\u0E1A filters 2 \u0E41\u0E1A\u0E1A\u0E04\u0E37\u0E2D dataSize \u0E41\u0E25\u0E30 memcmp \u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49 filters \u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E27\u0E48\u0E32 data \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E23\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E21\u0E35\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E31\u0E07\u0E44\u0E07 \u0E41\u0E25\u0E30\u0E08\u0E31\u0E14\u0E40\u0E23\u0E35\u0E22\u0E07\u0E44\u0E27\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07.

    dataSize

    ',3),Tn=s("\u0E43\u0E19\u0E01\u0E23\u0E13\u0E35\u0E02\u0E2D\u0E07 Token Program, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32 "),Dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},En=s("token accounts \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 165 bytes"),Nn=s(". \u0E41\u0E25\u0E30 token account \u0E08\u0E30\u0E21\u0E35 8 fields \u0E17\u0E35\u0E48\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30 field \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 bytes \u0E17\u0E35\u0E48\u0E41\u0E19\u0E48\u0E19\u0E2D\u0E19 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E2A\u0E14\u0E07 visualize \u0E27\u0E48\u0E32 data \u0E21\u0E35\u0E01\u0E32\u0E23\u0E27\u0E32\u0E07\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E31\u0E07\u0E44\u0E07\u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49\u0E23\u0E39\u0E1B\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07."),vn=o('

    Account Size

    \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 token accounts \u0E42\u0E14\u0E22\u0E21\u0E35 wallet address \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07, \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E2A\u0E48 { dataSize: 165 } \u0E43\u0E19 filters \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E25\u0E14\u0E02\u0E2D\u0E1A\u0E40\u0E02\u0E15\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E40\u0E09\u0E1E\u0E32\u0E30 accounts \u0E17\u0E35\u0E48\u0E02\u0E19\u0E32\u0E14 165 bytes \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E41\u0E15\u0E48\u0E40\u0E17\u0E48\u0E32\u0E19\u0E35\u0E49\u0E01\u0E47\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E14\u0E35\u0E1E\u0E2D \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E2A\u0E48 filter \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 (owner) \u0E21\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21 memcmp filter \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B.

    memcmp

    memcmp filter \u0E2B\u0E23\u0E37\u0E2D "memory comparison" filter, \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E23\u0E35\u0E22\u0E1A\u0E40\u0E17\u0E35\u0E22\u0E1A data \u0E43\u0E19 field \u0E44\u0E2B\u0E19\u0E01\u0E47\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u200B account \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32. \u0E42\u0E14\u0E22\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E09\u0E1E\u0E32\u0E30 accounts \u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A bytes \u0E17\u0E35\u0E48\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E43\u0E14\u0E46. memcmp \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 2 arguments:

    • offset: \u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E17\u0E35\u0E22\u0E1A data \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E1B\u0E47\u0E19 bytes \u0E41\u0E25\u0E30\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21.
    • bytes: \u0E04\u0E37\u0E2D data \u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A account's data. \u0E08\u0E30\u0E43\u0E0A\u0E49 base-58 encoded string \u0E02\u0E19\u0E32\u0E14\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 129 bytes.

    \u0E41\u0E15\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E27\u0E31\u0E07\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 memcmp \u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32\u0E01\u0E47\u0E15\u0E48\u0E2D\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E08\u0E2D bytes \u0E15\u0E23\u0E07\u0E01\u0E31\u0E19\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E0B\u0E36\u0E48\u0E07\u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E17\u0E35\u0E22\u0E1A\u0E2B\u0E32\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 bytes \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E43\u0E2A\u0E48\u0E44\u0E1B\u0E44\u0E14\u0E49

    \u0E43\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 Token Program \u0E2D\u0E31\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B, \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E49\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E09\u0E1E\u0E32\u0E30 token account \u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A wallet address \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32 \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E25\u0E2D\u0E07\u0E14\u0E39\u0E17\u0E35\u0E48 token account \u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32 2 fields \u0E41\u0E23\u0E01\u0E1A\u0E19 token account \u0E04\u0E37\u0E2D pubkeys, \u0E41\u0E25\u0E30\u0E41\u0E15\u0E48\u0E25\u0E30 pubkey \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 32 bytes \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 owner \u0E08\u0E30\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 field \u0E17\u0E35\u0E48 2 \u0E40\u0E23\u0E32\u0E08\u0E36\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E23\u0E34\u0E48\u0E21 memcmp \u0E17\u0E35\u0E48 offset \u0E17\u0E35\u0E48 32 bytes \u0E08\u0E32\u0E01\u0E15\u0E23\u0E07\u0E19\u0E31\u0E49\u0E19\u0E40\u0E23\u0E32\u0E01\u0E47\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E21\u0E2D\u0E07\u0E2B\u0E32 account \u0E17\u0E35\u0E48 ower \u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A wallet address \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32

    Account Size

    \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E25\u0E2D\u0E07 query \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07:

    ',9),Mn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as m,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},_=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("\u0E19\u0E35\u0E48\u0E15\u0E37\u0E2D RPC method \u0E17\u0E35\u0E48\u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32 accounts \u0E17\u0E35\u0E48 program \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07. \u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 pagination. \u0E01\u0E32\u0E23 requests \u0E44\u0E1B\u0E17\u0E35\u0E48 "),n("code",null,"getProgramAccounts"),s(" \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 parameters "),n("code",null,"dataSlice"),s(" \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D "),n("code",null,"filters"),s(" \u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E25\u0E14 response time \u0E41\u0E25\u0E30\u0E08\u0E30\u0E44\u0E14\u0E49\u0E2A\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23.")],-1),h=n("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Parameters",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Pubkey \u0E02\u0E2D\u0E07 program \u0E17\u0E35\u0E48\u0E08\u0E30 query, \u0E40\u0E15\u0E23\u0E35\u0E22\u0E21\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A base58 encoded string")],-1),C=s("(optional) "),P=n("code",null,"configOrCommitment",-1),S=s(": "),T=n("code",null,"object",-1),D=s(" - Configuration parameters \u0E17\u0E35\u0E48\u0E21\u0E35 optional fields \u0E15\u0E32\u0E21\u0E19\u0E35\u0E49: "),E=s("(optional) "),N=n("code",null,"commitment",-1),v=s(": "),M=n("code",null,"string",-1),R=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),L=s("(optional) "),z=n("code",null,"encoding",-1),B=s(": "),x=n("code",null,"string",-1),F=s(" - Encoding \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A account data, \u0E17\u0E31\u0E49\u0E07: "),H=n("code",null,"base58",-1),Z=s(", "),Q=n("code",null,"base64",-1),U=s(", \u0E2B\u0E23\u0E37\u0E2D "),W=n("code",null,"jsonParsed",-1),j=s(". Note, web3js \u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Y=s("getParsedProgramAccounts"),J=s(" \u0E41\u0E17\u0E19"),X=o("
  • (optional) dataSlice: object - \u0E08\u0E33\u0E01\u0E31\u0E14\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C account data \u0E42\u0E14\u0E22\u0E02\u0E36\u0E49\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E01\u0E31\u0E1A:
    • offset: number - \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 bytes \u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E02\u0E2D\u0E07 account data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32
    • length: number - \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 bytes \u0E02\u0E2D\u0E07 account data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E2A\u0E48\u0E07\u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32
  • (optional) filters: array - \u0E04\u0E31\u0E14\u0E01\u0E23\u0E2D\u0E07 results \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 filter objects \u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07:
    • memcmp: object - \u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A series \u0E02\u0E2D\u0E07 bytes \u0E02\u0E2D\u0E07 account data:
      • offset: number - \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 bytes \u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E02\u0E2D\u0E07 account data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E17\u0E35\u0E22\u0E1A
      • bytes: string - Data \u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E17\u0E35\u0E22\u0E1A\u0E14\u0E49\u0E27\u0E22, \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A base58 encoded string \u0E08\u0E33\u0E01\u0E31\u0E14\u0E17\u0E35\u0E48 129 bytes
    • dataSize: number - \u0E40\u0E17\u0E35\u0E22\u0E1A account data length \u0E14\u0E49\u0E27\u0E22 data size \u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49
  • ",2),O=s("(optional) "),I=n("code",null,"withContext",-1),q=s(": "),$=n("code",null,"boolean",-1),nn=s(" - \u0E04\u0E23\u0E2D\u0E1A (wrap)\u200B \u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A "),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=s("RpcResponse JSON object"),en=o('
    Response

    \u0E15\u0E32\u0E21\u0E1B\u0E01\u0E15\u0E34\u0E41\u0E25\u0E49\u0E27 getProgramAccounts \u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32 array \u0E02\u0E2D\u0E07 JSON objects \u0E17\u0E35\u0E48\u0E21\u0E35\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E15\u0E32\u0E21\u0E19\u0E35\u0E49:

    • pubkey: string - account pubkey \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E02\u0E2D\u0E07 base58 encoded string
    • account: object - JSON object \u0E17\u0E35\u0E48\u0E21\u0E35 fields:
      • lamports: number, \u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E02\u0E2D\u0E07 lamports \u0E17\u0E35\u0E48\u0E21\u0E35\u0E43\u0E19 account
      • owner: string, base58 encoded pubkey \u0E02\u0E2D\u0E07 program \u0E17\u0E35\u0E48 account \u0E44\u0E14\u0E49 assigned \u0E44\u0E27\u0E49
      • data: string | object - data \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A account \u0E2D\u0E32\u0E08\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07 encoded binary data \u0E2B\u0E23\u0E37\u0E2D JSON format \u0E02\u0E36\u0E49\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E01\u0E31\u0E1A encoding parameter
      • executable: boolean, \u0E15\u0E31\u0E27\u0E1A\u0E48\u0E07\u0E0A\u0E35\u0E49\u0E27\u0E48\u0E32 account \u0E19\u0E35\u0E49\u0E21\u0E35 program
      • rentEpoch: number, epoch \u0E17\u0E35\u0E48 account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E08\u0E48\u0E32\u0E22 rent
    ',3),tn=n("h2",{id:"\u0E25\u0E07\u0E25\u0E36\u0E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E25\u0E07\u0E25\u0E36\u0E01","aria-hidden":"true"},"#"),s(" \u0E25\u0E07\u0E25\u0E36\u0E01")],-1),cn=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u0E04\u0E37\u0E2D RPC method \u0E17\u0E35\u0E48\u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E17\u0E38\u0E01 accounts \u0E17\u0E35\u0E48 program \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07. \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49 "),n("code",null,"getProgramAccounts"),s(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E14\u0E49\u0E2B\u0E25\u0E32\u0E22\u0E41\u0E1A\u0E1A \u0E40\u0E0A\u0E48\u0E19:")],-1),on=n("li",null,"\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 token accounts \u0E02\u0E2D\u0E07 wallet",-1),ln=s("\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 token accounts \u0E17\u0E35\u0E48\u0E21\u0E35 mint \u0E40\u0E14\u0E35\u0E22\u0E27\u0E01\u0E31\u0E19(\u0E40\u0E0A\u0E48\u0E19 \u0E17\u0E38\u0E01\u0E46 \u0E04\u0E19\u0E17\u0E35\u0E48\u0E16\u0E37\u0E2D token "),pn={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},un=s("SRM"),rn=s(" \u0E44\u0E27\u0E49)"),mn=s("\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 custom accounts \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 program \u0E19\u0E35\u0E49(\u0E40\u0E0A\u0E48\u0E19 \u0E17\u0E38\u0E01\u0E46 \u0E04\u0E19\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 "),kn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),dn=s(")"),fn=o("

    \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E08\u0E30\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E42\u0E22\u0E0A\u0E19\u0E4C\u0E41\u0E25\u0E49\u0E27, getProgramAccounts \u0E22\u0E31\u0E07\u0E16\u0E39\u0E01\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E1C\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E49\u0E32\u0E07 \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E14\u0E49\u0E27\u0E22\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07\u0E21\u0E31\u0E19 \u0E01\u0E32\u0E23\u0E14\u0E36\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 getProgramAccounts \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 RPC nodes \u0E04\u0E49\u0E19\u0E2B\u0E32 data \u0E02\u0E19\u0E32\u0E14\u0E43\u0E2B\u0E0D\u0E48. \u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E19\u0E31\u0E49\u0E19\u0E01\u0E34\u0E19\u0E17\u0E31\u0E49\u0E07 memory \u0E41\u0E25\u0E30 resource \u0E21\u0E32\u0E01\u0E46. \u0E1C\u0E25\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19\u0E04\u0E37\u0E2D\u0E16\u0E49\u0E32\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49\u0E1A\u0E48\u0E2D\u0E22\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B \u0E2B\u0E23\u0E37\u0E2D\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E01\u0E34\u0E14 connection timeouts \u0E44\u0E14\u0E49. \u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49 getProgramAccounts endpoint \u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 pagination. \u0E16\u0E49\u0E32\u0E1C\u0E25\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E0D\u0E48\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E08\u0E30\u0E16\u0E39\u0E01\u0E15\u0E31\u0E14\u0E17\u0E34\u0E49\u0E07.

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2B\u0E25\u0E35\u0E01\u0E2B\u0E19\u0E35\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E19\u0E35\u0E49, getProgramAccounts \u0E40\u0E25\u0E22\u0E21\u0E35 parameters \u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49: \u0E0A\u0E37\u0E48\u0E2D, dataSlice \u0E41\u0E25\u0E30 filters options memcmp \u0E41\u0E25\u0E30 dataSize. \u0E16\u0E49\u0E32\u0E43\u0E0A\u0E49 parameters \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E25\u0E14\u0E02\u0E2D\u0E1A\u0E40\u0E02\u0E15\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E49\u0E41\u0E04\u0E1A\u0E25\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E04\u0E27\u0E1A\u0E04\u0E38\u0E21 \u0E41\u0E25\u0E30\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13\u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07\u0E1C\u0E25\u0E25\u0E31\u0E1E\u0E17\u0E4C\u0E44\u0E14\u0E49.

    ",2),_n=s("\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B\u0E02\u0E2D\u0E07 "),gn=n("code",null,"getProgramAccounts",-1),hn=s(" \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E1A "),yn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},wn=s("SPL-Token Program"),An=s(" \u0E40\u0E0A\u0E48\u0E19 \u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 accounts \u0E17\u0E35\u0E48 Token Program \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 "),Cn=s("\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E41\u0E1A\u0E1A\u0E1B\u0E01\u0E15\u0E34"),Pn=s(" \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E1B\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E21\u0E32\u0E01\u0E21\u0E32\u0E22 \u0E41\u0E15\u0E48\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E43\u0E2A\u0E48 parameters \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22\u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 request \u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E20\u0E32\u0E1E \u0E41\u0E25\u0E30\u0E44\u0E14\u0E49 data \u0E40\u0E09\u0E1E\u0E32\u0E30\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E0A\u0E49."),Sn=o('

    filters

    parameter \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E1A\u0E48\u0E2D\u0E22\u0E46 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A getProgramAccounts \u0E04\u0E37\u0E2D filters array. \u0E0B\u0E36\u0E48\u0E07 array \u0E19\u0E35\u0E49\u0E08\u0E30\u0E23\u0E31\u0E1A filters 2 \u0E41\u0E1A\u0E1A\u0E04\u0E37\u0E2D dataSize \u0E41\u0E25\u0E30 memcmp \u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49 filters \u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E27\u0E48\u0E32 data \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E23\u0E49\u0E2D\u0E07\u0E02\u0E2D\u0E21\u0E35\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E31\u0E07\u0E44\u0E07 \u0E41\u0E25\u0E30\u0E08\u0E31\u0E14\u0E40\u0E23\u0E35\u0E22\u0E07\u0E44\u0E27\u0E49\u0E22\u0E31\u0E07\u0E44\u0E07.

    dataSize

    ',3),Tn=s("\u0E43\u0E19\u0E01\u0E23\u0E13\u0E35\u0E02\u0E2D\u0E07 Token Program, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32 "),Dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},En=s("token accounts \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 165 bytes"),Nn=s(". \u0E41\u0E25\u0E30 token account \u0E08\u0E30\u0E21\u0E35 8 fields \u0E17\u0E35\u0E48\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30 field \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 bytes \u0E17\u0E35\u0E48\u0E41\u0E19\u0E48\u0E19\u0E2D\u0E19 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E2A\u0E14\u0E07 visualize \u0E27\u0E48\u0E32 data \u0E21\u0E35\u0E01\u0E32\u0E23\u0E27\u0E32\u0E07\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E31\u0E07\u0E44\u0E07\u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49\u0E23\u0E39\u0E1B\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07."),vn=o('

    Account Size

    \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2B\u0E32\u0E17\u0E38\u0E01\u0E46 token accounts \u0E42\u0E14\u0E22\u0E21\u0E35 wallet address \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07, \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E2A\u0E48 { dataSize: 165 } \u0E43\u0E19 filters \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E25\u0E14\u0E02\u0E2D\u0E1A\u0E40\u0E02\u0E15\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E40\u0E09\u0E1E\u0E32\u0E30 accounts \u0E17\u0E35\u0E48\u0E02\u0E19\u0E32\u0E14 165 bytes \u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E41\u0E15\u0E48\u0E40\u0E17\u0E48\u0E32\u0E19\u0E35\u0E49\u0E01\u0E47\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E14\u0E35\u0E1E\u0E2D \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E2A\u0E48 filter \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22\u0E27\u0E48\u0E32\u0E40\u0E23\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 (owner) \u0E21\u0E31\u0E19\u0E14\u0E49\u0E27\u0E22 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E34\u0E48\u0E21 memcmp filter \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B.

    memcmp

    memcmp filter \u0E2B\u0E23\u0E37\u0E2D "memory comparison" filter, \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E23\u0E35\u0E22\u0E1A\u0E40\u0E17\u0E35\u0E22\u0E1A data \u0E43\u0E19 field \u0E44\u0E2B\u0E19\u0E01\u0E47\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u200B account \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32. \u0E42\u0E14\u0E22\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E40\u0E09\u0E1E\u0E32\u0E30 accounts \u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A bytes \u0E17\u0E35\u0E48\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E43\u0E14\u0E46. memcmp \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 2 arguments:

    • offset: \u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E17\u0E35\u0E22\u0E1A data \u0E21\u0E35\u0E02\u0E19\u0E32\u0E14\u0E40\u0E1B\u0E47\u0E19 bytes \u0E41\u0E25\u0E30\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E40\u0E15\u0E47\u0E21.
    • bytes: \u0E04\u0E37\u0E2D data \u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A account's data. \u0E08\u0E30\u0E43\u0E0A\u0E49 base-58 encoded string \u0E02\u0E19\u0E32\u0E14\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 129 bytes.

    \u0E41\u0E15\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E27\u0E31\u0E07\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 memcmp \u0E08\u0E30\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32\u0E01\u0E47\u0E15\u0E48\u0E2D\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E08\u0E2D bytes \u0E15\u0E23\u0E07\u0E01\u0E31\u0E19\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E0B\u0E36\u0E48\u0E07\u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E17\u0E35\u0E22\u0E1A\u0E2B\u0E32\u0E04\u0E48\u0E32\u0E17\u0E35\u0E48\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32 \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32 bytes \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E43\u0E2A\u0E48\u0E44\u0E1B\u0E44\u0E14\u0E49

    \u0E43\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 Token Program \u0E2D\u0E31\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B, \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E49\u0E04\u0E37\u0E19\u0E04\u0E48\u0E32\u0E21\u0E32\u0E40\u0E09\u0E1E\u0E32\u0E30 token account \u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A wallet address \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32 \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E25\u0E2D\u0E07\u0E14\u0E39\u0E17\u0E35\u0E48 token account \u0E08\u0E30\u0E40\u0E2B\u0E47\u0E19\u0E27\u0E48\u0E32 2 fields \u0E41\u0E23\u0E01\u0E1A\u0E19 token account \u0E04\u0E37\u0E2D pubkeys, \u0E41\u0E25\u0E30\u0E41\u0E15\u0E48\u0E25\u0E30 pubkey \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 32 bytes \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 owner \u0E08\u0E30\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 field \u0E17\u0E35\u0E48 2 \u0E40\u0E23\u0E32\u0E08\u0E36\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E23\u0E34\u0E48\u0E21 memcmp \u0E17\u0E35\u0E48 offset \u0E17\u0E35\u0E48 32 bytes \u0E08\u0E32\u0E01\u0E15\u0E23\u0E07\u0E19\u0E31\u0E49\u0E19\u0E40\u0E23\u0E32\u0E01\u0E47\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E21\u0E2D\u0E07\u0E2B\u0E32 account \u0E17\u0E35\u0E48 ower \u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A wallet address \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32

    Account Size

    \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E25\u0E2D\u0E07 query \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07:

    ',9),Mn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.bcc96381.js b/docs/.vuepress/dist/assets/get-program-accounts.html.0cf79cec.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.bcc96381.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.0cf79cec.js index 49f9a3099..ae95cf952 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.bcc96381.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.0cf79cec.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as m,a as n,b as a,w as e,F as k,e as c,d as s}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const h={},g=c('

    \u0110\u1ECDc Program Account

    getProgramAccounts l\xE0 m\u1ED9t ph\u01B0\u01A1ng th\u1EE9c RPC gi\xFAp l\u1EA5y d\u1EEF li\u1EC7u c\u1EE7a t\u1EA5t c\u1EA3 c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi Program. L\u01B0u \xFD, ph\xE2n trang v\u1EABn ch\u01B0a \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 t\u1EA1i th\u1EDDi \u0111i\u1EC3m hi\u1EC7n t\u1EA1i. Vi\u1EC7c g\u1ECDi getProgramAccounts n\xEAn c\xF3 th\xEAm c\xE1c tham s\u1ED1 dataSlice v\xE0/ho\u1EB7c filters \u0111\u1EC3 c\u1EA3i thi\u1EC7n th\u1EDDi gian tr\u1EA3 v\u1EC1 v\u1EDBi k\u1EBFt qu\u1EA3 mong mu\u1ED1n.

    C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

    ',3),f={class:"custom-container tip"},_=n("p",{class:"custom-container-title"},"Tham s\u1ED1",-1),y=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Kho\xE1 c\xF4ng khai c\u1EE7a Program c\u1EA7n truy v\u1EA5n v\xE0 bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng base58")],-1),v=s("(Tu\u1EF3 ch\u1ECDn) "),A=n("code",null,"configOrCommitment",-1),w=s(": "),T=n("code",null,"object",-1),C=s(" - Tham s\u1ED1 c\xE0i \u0111\u1EB7t c\xF3 ch\u1EE9a c\xE1c tr\u01B0\u1EDDng tu\u1EF3 ch\u1ECDn sau: "),P=s("(Tu\u1EF3 ch\u1ECDn) "),S=n("code",null,"commitment",-1),D=s(": "),E=n("code",null,"string",-1),N=s(" - "),M={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},K=s("State commitment"),L=s("(Tu\u1EF3 ch\u1ECDn) "),R=n("code",null,"encoding",-1),G=s(": "),B=n("code",null,"string",-1),x=s(" - Ki\u1EC3u m\xE3 ho\xE1 d\u1EEF li\u1EC7u, m\u1ED9t trong c\xE1c ki\u1EC3u sau: "),z=n("code",null,"base58",-1),F=s(", "),H=n("code",null,"base64",-1),Z=s(", "),Q=n("code",null,"jsonParsed",-1),V=s(". L\u01B0u \xFD, ng\u01B0\u1EDDi d\xF9ng web3js n\xEAn s\u1EED d\u1EE5ng "),U={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},W=s("getParsedProgramAccounts"),j=c("
  • (Tu\u1EF3 ch\u1ECDn) dataSlice: object - Gi\u1EDBi h\u1EA1n c\xE1c Account tr\u1EA3 v\u1EC1 d\u1EF1a tr\xEAn:
    • offset: number - V\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u cho d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c tr\u1EA3 v\u1EC1 c\u1EE7a Account
    • length: number - \u0110\u1ED9 d\xE0i d\u1EEF li\u1EC7u c\u1EE7a Account c\u1EA7n tr\u1EA3 v\u1EC1 v\xE0 \u0111\u01B0\u1EE3c t\xEDnh t\u1EEB v\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u
  • (Tu\u1EF3 ch\u1ECDn) filters: array - L\u1ECDc c\xE1c k\u1EBFt qu\u1EA3 b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng c\xE1c b\u1ED9 l\u1ECDc sau:
    • memcmp: object - L\u1ECDc b\u1EB1ng c\xE1ch so s\xE1nh m\u1ED9t chu\u1ED7i d\u1EEF li\u1EC7u d\u01B0\u1EDBi d\u1EA1ng c\xE1c bytes v\u1EDBi d\u1EEF li\u1EC7u Account
      • offset: number - V\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u trong d\u1EEF li\u1EC7u Account d\xF9ng \u0111\u1EC3 so s\xE1nh
      • bytes: string - D\u1EEF li\u1EC7u c\u1EA7n so s\xE1nh, \u0111\u01B0\u1EE3c truy\u1EC1n v\xE0o d\u01B0\u1EDBi d\u1EA1ng base58 v\xE0 kh\xF4ng qu\xE1 129 bytes
    • dataSize: number - L\u1ECDc theo \u0111\u1ED9 l\u1EDBn c\u1EE7a d\u1EEF li\u1EC7u Account
  • ",2),Y=s("(Tu\u1EF3 ch\u1ECDn) "),J=n("code",null,"withContext",-1),X=s(": "),O=n("code",null,"boolean",-1),I=s(" - \u0110\xF3ng g\xF3i k\u1EBFt qu\u1EA3 v\xE0o m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},$=s("RpcResponse JSON"),nn=c('
    Tr\u1EA3 v\u1EC1

    M\u1EB7c \u0111\u1ECBnh getProgramAccounts s\u1EBD tr\u1EA3 v\u1EC1 m\u1ED9t m\u1EA3ng c\xE1c \u0111\u1ED1i t\u01B0\u1EE3ng JSON v\u1EDBi c\u1EA5u tr\xFAc nh\u01B0 sau:

    • pubkey: string - \u0110\u1ECBa ch\u1EC9 c\u1EE7a Account v\xE0 \u0111\u01B0\u1EE3c m\xE3 ho\xE1 base58
    • account: object - L\xE0 m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng JSON v\u1EDBi c\xE1c tr\u01B0\u1EDDng con nh\u01B0 sau:
      • lamports: number, s\u1ED1 d\u01B0 lamports c\u1EE7a Account
      • owner: string, \u0110\u1ECBa ch\u1EC9 c\u1EE7a Program s\u1EDF h\u1EEFu Account v\xE0 \u0111\u01B0\u1EE3c m\xE3 ho\xE1 base58
      • data: string | object - D\u1EEF li\u1EC7u c\u1EE7a Account v\xE0 \u0111\u01B0\u1EE3c bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng, ho\u1EB7c l\xE0 binary, ho\u1EB7c l\xE0 JSON, tu\u1EF3 v\xE0o tham s\u1ED1 encoding l\xFAc truy\u1EC1n v\xE0o
      • executable: boolean, Nh\xE3n \u0111\xE1nh d\u1EA5u n\u1EBFu Account n\xE0y ch\u1EE9a m\u1ED9t Program v\xE0 c\xF3 th\u1EC3 th\u1EF1c thi
      • rentEpoch: number, K\u1EF3 h\u1EA1n thu\xEA ti\u1EBFp theo c\u1EE7a Account
    ',3),sn=n("h2",{id:"chi-tiet",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#chi-tiet","aria-hidden":"true"},"#"),s(" Chi ti\u1EBFt")],-1),an=n("p",null,[n("code",null,"getProgramAccounts"),s(" l\xE0 m\u1ED9t ph\u01B0\u01A1ng th\u1EE9c RPC r\u1EA5t linh ho\u1EA1t v\xE0 c\xF3 kh\u1EA3 n\u0103ng tr\u1EA3 v\u1EC1 t\u1EA5t c\u1EA3 c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi m\u1ED9t Program. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng "),n("code",null,"getProgramAccounts"),s(" cho nhi\u1EC1u lo\u1EA1i truy v\u1EA5n kh\xE1c nhau, v\xED d\u1EE5 nh\u01B0:")],-1),tn=n("li",null,"T\u1EA5t c\u1EA3 c\xE1c Account c\u1EE7a m\u1ED9t v\xED c\u1EE5 th\u1EC3",-1),en=s("T\u1EA5t c\u1EA3 c\xE1c Account cho m\u1ED9t mint (ho\u1EB7c th\u01B0\u1EDDng \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 token \u0111\u1ED1i v\u1EDBi c\xE1c blockchain kh\xE1c) (i.e. T\u1EA5t c\u1EA3 ng\u01B0\u1EDDi gi\u1EEF token "),cn={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},on=s("SRM"),ln=s(")"),pn=s("T\u1EA5t c\u1EA3 c\xE1c Account theo \xFD mu\u1ED1n c\u1EE7a m\u1ED9t Program c\u1EE5 th\u1EC3 (i.e. T\u1EA5t c\u1EA3 Account ng\u01B0\u1EDDi d\xF9ng c\u1EE7a \u1EE9ng d\u1EE5ng "),un={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},rn=s("Mango"),mn=s(")"),kn=c("

    M\u1EB7c d\xF9 h\u1EEFu d\u1EE5ng l\xE0 v\u1EADy, getProgramAccounts th\u01B0\u1EDDng b\u1ECB d\xF9ng sai v\xEC c\xE1c h\u1EA1n ch\u1EBF hi\u1EC7n t\u1EA1i. Nhi\u1EC1u c\xE2u truy v\u1EA5n \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 b\u1EDFi getProgramAccounts y\xEAu c\u1EA7u c\xE1c n\u1ED1t RPC ph\u1EA3i qu\xE9t m\u1ED9t kh\u1ED1i l\u01B0\u1EE3ng r\u1EA5t l\u1EDBn c\xE1c d\u1EEF li\u1EC7u. Nh\u1EEFng c\xE2u truy v\u1EA5n nh\u01B0 v\u1EADy kh\xF4ng ch\u1EC9 l\u1EDBn v\u1EC1 dung l\u01B0\u1EE3ng d\u1EEF li\u1EC7u v\xE0 c\xF2n l\u1EDBn v\u1EC1 kh\u1ED1i l\u01B0\u1EE3ng t\xEDnh to\xE1n. T\u1EA5t y\u1EBFu, vi\u1EC7c g\u1ECDi qu\xE1 nhi\u1EC1u v\u1EC1 c\u1EA3 t\u1EA7n su\u1EA5t v\xE0 kh\u1ED1i l\u01B0\u1EE3ng d\u1EABn \u0111\u1EBFn k\u1EBFt n\u1ED1i s\u1EBD b\u1ECB ng\u1EAFt. Ngo\xE0i ra, t\u1EA1i th\u1EDDi \u0111i\u1EC3m cu\u1ED1n s\xE1ch \u0111\u01B0\u1EE3c vi\u1EBFt, getProgramAccounts v\u1EABn ch\u01B0a h\u1ED7 tr\u1EE3 ph\xE2n trang. N\u1EBFu k\u1EBFt qu\u1EA3 truy v\u1EA5n qu\xE1 l\u1EDBn, n\xF3 s\u1EBD \u0111\u01B0\u1EE3c c\u1EAFt b\u1ECF \u0111i.

    \u0110\u1EC3 tr\xE1nh c\xE1c h\u1EA1n ch\u1EBF n\xE0y, getProgramAccounts gi\u1EDBi thi\u1EC7u c\xE1c tham s\u1ED1 d\xF9ng cho vi\u1EC7c l\u1ECDc v\xE0 s\u01A1 ch\u1EBF k\u1EBFt qu\u1EA3, v\xED d\u1EE5 nh\u01B0: dataSlice, filters v\u1EDBi tu\u1EF3 ch\u1ECDn memcmp v\xE0 dataSize. B\u1EB1ng c\xE1ch k\u1EBFt h\u1EE3p c\xE1c tham s\u1ED1 tr\xEAn, ch\xFAng ta c\xF3 th\u1EC3 gi\u1EA3m thi\u1EC3u ph\u1EA1m vi truy v\u1EA5n v\u1EDBi k\xEDch th\u01B0\u1EDBc d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c ki\u1EC3m so\xE1t v\xE0 d\u1EC5 \u0111o\xE1n h\u01A1n.

    ",2),bn=s("M\u1ED9t v\xED d\u1EE5 th\u01B0\u1EDDng th\u1EA5y c\u1EE7a "),dn=n("code",null,"getProgramAccounts",-1),hn=s(" l\xE0 t\u01B0\u01A1ng t\xE1c v\u1EDBi "),gn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},fn=s("SPL-Token Program"),_n=s(". Truy v\u1EA5n t\u1EA5t c\u1EA3 c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi Token Program v\u1EDBi m\u1ED9t c\xE2u "),yn=s("truy v\u1EA5n thu\u1EA7n tu\xFD"),vn=s(" kh\xF4ng c\xF3 l\u1ECDc s\u1EBD d\u1EABn \u0111\u1EBFn m\u1ED9t s\u1ED1 l\u01B0\u1EE3ng d\u1EEF li\u1EC7u tr\u1EA3 v\u1EC1 kh\u1ED5ng l\u1ED3. Thay v\xE0o \u0111\xF3, b\u1EB1ng c\xE1ch b\u1ED5 sung c\xE1c tham s\u1ED1, ch\xFAng ta c\xF3 th\u1EC3 truy v\u1EA5n m\u1ED9t c\xE1ch hi\u1EC7u qu\u1EA3 ch\u1EC9 nh\u1EEFng d\u1EEF li\u1EC7u m\xECnh c\u1EA7n."),An=c('

    filters

    Tham s\u1ED1 ph\u1ED5 bi\u1EBFn nh\u1EA5t \u0111\u01B0\u1EE3c d\xF9ng k\xE8m v\u1EDBi getProgramAccounts ch\xEDnh l\xE0 m\u1EA3ng c\xE1c filters. M\u1EA3ng n\xE0y ch\u1EA5p nh\u1EADn 2 ki\u1EC3u l\u1ECDc l\xE0 dataSize v\xE0 memcmp. Tr\u01B0\u1EDBc khi s\u1EED d\u1EE5ng m\u1ED9t trong hai, ch\xFAng ta n\xEAn hi\u1EC3u \u0111\u01B0\u1EE3c d\u1EEF li\u1EC7u c\u1EA7n truy v\u1EA5n s\u1EBD c\xF3 ch\u1EE9a d\u1EEF li\u1EC7u g\xEC? h\xECnh th\xE1i ra sao? tu\u1EA7n t\u1EF1 ho\xE1 nh\u01B0 th\u1EBF n\xE0o?

    dataSize

    ',3),wn=s("Trong tr\u01B0\u1EDDng h\u1EE3p Token Program, ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y r\u1EB1ng "),Tn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Cn=s("\u0111\u1ED9 d\xE0i c\u1EE7a Token Account l\xE0 165 bytes"),Pn=s(". \u0110\u1EB7c bi\u1EC7t, m\u1ED9t Token Account c\xF3 8 tr\u01B0\u1EDDng con, v\u1EDBi m\u1ED7i tr\u01B0\u1EDDng c\xF3 \u0111\u1ED9 d\xE0i v\xF9ng nh\u1EDB bi\u1EBFt tr\u01B0\u1EDBc. Ch\xFAng ta c\xF3 th\u1EC3 m\u01B0\u1EDDng t\u01B0\u1EE3ng c\xE1ch d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c s\u1EAFp x\u1EBFp b\u1EB1ng minh ho\u1EA1 sau."),Sn=c('

    Account Size

    N\u1EBFu ch\xFAng ta mu\u1ED1n t\xECm t\u1EA5t c\u1EA3 Token Account s\u1EDF h\u1EEFu b\u1EDFi ch\u1EC9 ri\xEAng v\xED c\u1EE7a m\xECnh, ch\xFAng ta c\xF3 th\u1EC3 th\xEAm { dataSize: 165 } v\xE0 filters \u0111\u1EC3 thu h\u1EB9p pham vi c\xE2u truy v\u1EA5n v\xE0 ch\u1EC9 l\u1EA5y nh\u1EEFng Account c\xF3 \u0111\u1ED9 d\xE0i ch\xEDnh x\xE1c 165 bytes. Tuy v\u1EADy, n\xF3 v\u1EABn l\xE0 ch\u01B0a \u0111\u1EE7. Ch\xFAng ta c\u1EA7n th\xEAm m\u1ED9t \u0111i\u1EC1u ki\u1EC7n \u0111\u1EC3 ch\u1EC9 l\u1ECDc c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi v\xED c\u1EE7a m\xECnh. \u0110\u1EC3 l\xE0 \u0111\u01B0\u1EE3c \u0111i\u1EC1u \u0111\xF3, ch\xFAng ta ph\u1EA3i s\u1EED d\u1EE5ng memcmp.

    memcmp

    \u0110i\u1EC1u ki\u1EC7n l\u1ECDc memcmp, ho\u1EB7c "memory comparison" (ph\xE9p so s\xE1nh v\xF9ng nh\u1EDB), cho ph\xE9p ch\xFAng ta so s\xE1nh d\u1EEF li\u1EC7u truy\u1EC1n v\xE0o v\u1EDBi b\u1EA5t k\u1EF3 v\xF9ng nh\u1EDB n\xE0o \u0111\u01B0\u1EE3c l\u01B0u trong Account. \u0110\u1EB7c bi\u1EC7t, ch\xFAng ta c\xF3 th\u1EC3 truy v\u1EA5n ch\u1EC9 nh\u1EEFng Account m\xE0 kh\u1EDBp v\u1EDBi m\u1ED9t \u0111o\u1EA1n d\u1EEF li\u1EC7u t\u1EA1i m\u1ED9t v\u1ECB tr\xED c\u1EE5 th\u1EC3. memcmp y\xEAu c\u1EA7u 2 tham s\u1ED1:

    • offset: V\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u \u0111\u1EC3 so s\xE1nh d\u1EEF li\u1EC7u. V\u1ECB tr\xED n\xE0y th\u01B0\u1EDDng \u0111\u01B0\u1EE3c t\xEDnh theo bytes v\xE0 bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng s\u1ED1 nguy\xEAn.
    • bytes: D\u1EEF li\u1EC7u d\xF9ng \u0111\u1EC3 \u0111\u1ED1i chi\u1EBFu v\u1EDBi d\u1EEF li\u1EC7u trong Account. D\u1EEF li\u1EC7u n\xE0y n\xEAn \u0111\u01B0\u1EE3c bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng base58 v\xE0 kh\xF4ng qu\xE1 129 bytes.

    M\u1ED9t \u0111i\u1EC1u quan tr\u1ECDng c\u1EA7n l\u01B0u \xFD l\xE0 memcmp ch\u1EC9 tr\u1EA3 v\u1EC1 c\xE1c k\u1EBFt qu\u1EA3 kh\u1EDBp ch\xEDnh x\xE1c tr\xEAn t\u1EEBng bytes. V\xE0 hi\u1EC7n t\u1EA1i kh\xF4ng h\u1ED7 tr\u1EE3 c\xE1c ph\xE9p so s\xE1nh l\u1EDBn h\u01A1n ho\u1EB7c nh\u1ECF h\u01A1n cho bytes.

    S\u1EED d\u1EE5ng l\u1EA1i v\xED d\u1EE5 Token Program b\xEAn tr\xEAn, ch\xFAng ta \u0111i\u1EC1u ch\u1EC9nh c\xE2u truy v\u1EA5n ch\u1EC9 tr\u1EA3 v\u1EC1 nh\u1EEFng Token Account m\xE0 \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi ch\xEDnh m\xECnh. Khi nh\xECn v\xE0o m\u1ED9t Token Account, ch\xFAng ta bi\u1EBFt \u0111\u01B0\u1EE3c 2 tr\u01B0\u1EDDng \u0111\u1EA7u ti\xEAn l\u01B0u trong Token Account l\xE0 2 kho\xE1 c\xF4ng khai v\u1EDBi \u0111\u1ED9 d\xE0i l\xE0 32 bytes. Bi\u1EBFt r\u1EB1ng owner l\xE0 tr\u01B0\u1EDDng th\u1EE9 2, ch\xFAng ta n\xEAn kh\u1EDFi t\u1EA1o memcmp v\u1EDBi offset l\xE0 32. T\u1EEB \u0111\xF3, ch\xFAng ta s\u1EBD l\u1ECDc \u0111\u01B0\u1EE3c nh\u1EEFng Account c\u1EE7a m\xECnh b\u1EB1ng c\xE1ch truy\u1EC1n \u0111\u1ECBa ch\u1EC9 v\xED v\xE0o bytes.

    Account Size

    Ch\xFAng ta c\xF3 th\u1EC3 g\u1ECDi c\xE2u truy v\u1EA5n n\xE0y th\xF4ng qua v\xED d\u1EE5 sau:

    ',9),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as m,a as n,b as a,w as e,F as k,e as c,d as s}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const h={},g=c('

    \u0110\u1ECDc Program Account

    getProgramAccounts l\xE0 m\u1ED9t ph\u01B0\u01A1ng th\u1EE9c RPC gi\xFAp l\u1EA5y d\u1EEF li\u1EC7u c\u1EE7a t\u1EA5t c\u1EA3 c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi Program. L\u01B0u \xFD, ph\xE2n trang v\u1EABn ch\u01B0a \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 t\u1EA1i th\u1EDDi \u0111i\u1EC3m hi\u1EC7n t\u1EA1i. Vi\u1EC7c g\u1ECDi getProgramAccounts n\xEAn c\xF3 th\xEAm c\xE1c tham s\u1ED1 dataSlice v\xE0/ho\u1EB7c filters \u0111\u1EC3 c\u1EA3i thi\u1EC7n th\u1EDDi gian tr\u1EA3 v\u1EC1 v\u1EDBi k\u1EBFt qu\u1EA3 mong mu\u1ED1n.

    C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

    ',3),f={class:"custom-container tip"},_=n("p",{class:"custom-container-title"},"Tham s\u1ED1",-1),y=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Kho\xE1 c\xF4ng khai c\u1EE7a Program c\u1EA7n truy v\u1EA5n v\xE0 bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng base58")],-1),v=s("(Tu\u1EF3 ch\u1ECDn) "),A=n("code",null,"configOrCommitment",-1),w=s(": "),T=n("code",null,"object",-1),C=s(" - Tham s\u1ED1 c\xE0i \u0111\u1EB7t c\xF3 ch\u1EE9a c\xE1c tr\u01B0\u1EDDng tu\u1EF3 ch\u1ECDn sau: "),P=s("(Tu\u1EF3 ch\u1ECDn) "),S=n("code",null,"commitment",-1),D=s(": "),E=n("code",null,"string",-1),N=s(" - "),M={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},K=s("State commitment"),L=s("(Tu\u1EF3 ch\u1ECDn) "),R=n("code",null,"encoding",-1),G=s(": "),B=n("code",null,"string",-1),x=s(" - Ki\u1EC3u m\xE3 ho\xE1 d\u1EEF li\u1EC7u, m\u1ED9t trong c\xE1c ki\u1EC3u sau: "),z=n("code",null,"base58",-1),F=s(", "),H=n("code",null,"base64",-1),Z=s(", "),Q=n("code",null,"jsonParsed",-1),V=s(". L\u01B0u \xFD, ng\u01B0\u1EDDi d\xF9ng web3js n\xEAn s\u1EED d\u1EE5ng "),U={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},W=s("getParsedProgramAccounts"),j=c("
  • (Tu\u1EF3 ch\u1ECDn) dataSlice: object - Gi\u1EDBi h\u1EA1n c\xE1c Account tr\u1EA3 v\u1EC1 d\u1EF1a tr\xEAn:
    • offset: number - V\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u cho d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c tr\u1EA3 v\u1EC1 c\u1EE7a Account
    • length: number - \u0110\u1ED9 d\xE0i d\u1EEF li\u1EC7u c\u1EE7a Account c\u1EA7n tr\u1EA3 v\u1EC1 v\xE0 \u0111\u01B0\u1EE3c t\xEDnh t\u1EEB v\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u
  • (Tu\u1EF3 ch\u1ECDn) filters: array - L\u1ECDc c\xE1c k\u1EBFt qu\u1EA3 b\u1EB1ng c\xE1ch s\u1EED d\u1EE5ng c\xE1c b\u1ED9 l\u1ECDc sau:
    • memcmp: object - L\u1ECDc b\u1EB1ng c\xE1ch so s\xE1nh m\u1ED9t chu\u1ED7i d\u1EEF li\u1EC7u d\u01B0\u1EDBi d\u1EA1ng c\xE1c bytes v\u1EDBi d\u1EEF li\u1EC7u Account
      • offset: number - V\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u trong d\u1EEF li\u1EC7u Account d\xF9ng \u0111\u1EC3 so s\xE1nh
      • bytes: string - D\u1EEF li\u1EC7u c\u1EA7n so s\xE1nh, \u0111\u01B0\u1EE3c truy\u1EC1n v\xE0o d\u01B0\u1EDBi d\u1EA1ng base58 v\xE0 kh\xF4ng qu\xE1 129 bytes
    • dataSize: number - L\u1ECDc theo \u0111\u1ED9 l\u1EDBn c\u1EE7a d\u1EEF li\u1EC7u Account
  • ",2),Y=s("(Tu\u1EF3 ch\u1ECDn) "),J=n("code",null,"withContext",-1),X=s(": "),O=n("code",null,"boolean",-1),I=s(" - \u0110\xF3ng g\xF3i k\u1EBFt qu\u1EA3 v\xE0o m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},$=s("RpcResponse JSON"),nn=c('
    Tr\u1EA3 v\u1EC1

    M\u1EB7c \u0111\u1ECBnh getProgramAccounts s\u1EBD tr\u1EA3 v\u1EC1 m\u1ED9t m\u1EA3ng c\xE1c \u0111\u1ED1i t\u01B0\u1EE3ng JSON v\u1EDBi c\u1EA5u tr\xFAc nh\u01B0 sau:

    • pubkey: string - \u0110\u1ECBa ch\u1EC9 c\u1EE7a Account v\xE0 \u0111\u01B0\u1EE3c m\xE3 ho\xE1 base58
    • account: object - L\xE0 m\u1ED9t \u0111\u1ED1i t\u01B0\u1EE3ng JSON v\u1EDBi c\xE1c tr\u01B0\u1EDDng con nh\u01B0 sau:
      • lamports: number, s\u1ED1 d\u01B0 lamports c\u1EE7a Account
      • owner: string, \u0110\u1ECBa ch\u1EC9 c\u1EE7a Program s\u1EDF h\u1EEFu Account v\xE0 \u0111\u01B0\u1EE3c m\xE3 ho\xE1 base58
      • data: string | object - D\u1EEF li\u1EC7u c\u1EE7a Account v\xE0 \u0111\u01B0\u1EE3c bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng, ho\u1EB7c l\xE0 binary, ho\u1EB7c l\xE0 JSON, tu\u1EF3 v\xE0o tham s\u1ED1 encoding l\xFAc truy\u1EC1n v\xE0o
      • executable: boolean, Nh\xE3n \u0111\xE1nh d\u1EA5u n\u1EBFu Account n\xE0y ch\u1EE9a m\u1ED9t Program v\xE0 c\xF3 th\u1EC3 th\u1EF1c thi
      • rentEpoch: number, K\u1EF3 h\u1EA1n thu\xEA ti\u1EBFp theo c\u1EE7a Account
    ',3),sn=n("h2",{id:"chi-tiet",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#chi-tiet","aria-hidden":"true"},"#"),s(" Chi ti\u1EBFt")],-1),an=n("p",null,[n("code",null,"getProgramAccounts"),s(" l\xE0 m\u1ED9t ph\u01B0\u01A1ng th\u1EE9c RPC r\u1EA5t linh ho\u1EA1t v\xE0 c\xF3 kh\u1EA3 n\u0103ng tr\u1EA3 v\u1EC1 t\u1EA5t c\u1EA3 c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi m\u1ED9t Program. Ch\xFAng ta c\xF3 th\u1EC3 s\u1EED d\u1EE5ng "),n("code",null,"getProgramAccounts"),s(" cho nhi\u1EC1u lo\u1EA1i truy v\u1EA5n kh\xE1c nhau, v\xED d\u1EE5 nh\u01B0:")],-1),tn=n("li",null,"T\u1EA5t c\u1EA3 c\xE1c Account c\u1EE7a m\u1ED9t v\xED c\u1EE5 th\u1EC3",-1),en=s("T\u1EA5t c\u1EA3 c\xE1c Account cho m\u1ED9t mint (ho\u1EB7c th\u01B0\u1EDDng \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 token \u0111\u1ED1i v\u1EDBi c\xE1c blockchain kh\xE1c) (i.e. T\u1EA5t c\u1EA3 ng\u01B0\u1EDDi gi\u1EEF token "),cn={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},on=s("SRM"),ln=s(")"),pn=s("T\u1EA5t c\u1EA3 c\xE1c Account theo \xFD mu\u1ED1n c\u1EE7a m\u1ED9t Program c\u1EE5 th\u1EC3 (i.e. T\u1EA5t c\u1EA3 Account ng\u01B0\u1EDDi d\xF9ng c\u1EE7a \u1EE9ng d\u1EE5ng "),un={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},rn=s("Mango"),mn=s(")"),kn=c("

    M\u1EB7c d\xF9 h\u1EEFu d\u1EE5ng l\xE0 v\u1EADy, getProgramAccounts th\u01B0\u1EDDng b\u1ECB d\xF9ng sai v\xEC c\xE1c h\u1EA1n ch\u1EBF hi\u1EC7n t\u1EA1i. Nhi\u1EC1u c\xE2u truy v\u1EA5n \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 b\u1EDFi getProgramAccounts y\xEAu c\u1EA7u c\xE1c n\u1ED1t RPC ph\u1EA3i qu\xE9t m\u1ED9t kh\u1ED1i l\u01B0\u1EE3ng r\u1EA5t l\u1EDBn c\xE1c d\u1EEF li\u1EC7u. Nh\u1EEFng c\xE2u truy v\u1EA5n nh\u01B0 v\u1EADy kh\xF4ng ch\u1EC9 l\u1EDBn v\u1EC1 dung l\u01B0\u1EE3ng d\u1EEF li\u1EC7u v\xE0 c\xF2n l\u1EDBn v\u1EC1 kh\u1ED1i l\u01B0\u1EE3ng t\xEDnh to\xE1n. T\u1EA5t y\u1EBFu, vi\u1EC7c g\u1ECDi qu\xE1 nhi\u1EC1u v\u1EC1 c\u1EA3 t\u1EA7n su\u1EA5t v\xE0 kh\u1ED1i l\u01B0\u1EE3ng d\u1EABn \u0111\u1EBFn k\u1EBFt n\u1ED1i s\u1EBD b\u1ECB ng\u1EAFt. Ngo\xE0i ra, t\u1EA1i th\u1EDDi \u0111i\u1EC3m cu\u1ED1n s\xE1ch \u0111\u01B0\u1EE3c vi\u1EBFt, getProgramAccounts v\u1EABn ch\u01B0a h\u1ED7 tr\u1EE3 ph\xE2n trang. N\u1EBFu k\u1EBFt qu\u1EA3 truy v\u1EA5n qu\xE1 l\u1EDBn, n\xF3 s\u1EBD \u0111\u01B0\u1EE3c c\u1EAFt b\u1ECF \u0111i.

    \u0110\u1EC3 tr\xE1nh c\xE1c h\u1EA1n ch\u1EBF n\xE0y, getProgramAccounts gi\u1EDBi thi\u1EC7u c\xE1c tham s\u1ED1 d\xF9ng cho vi\u1EC7c l\u1ECDc v\xE0 s\u01A1 ch\u1EBF k\u1EBFt qu\u1EA3, v\xED d\u1EE5 nh\u01B0: dataSlice, filters v\u1EDBi tu\u1EF3 ch\u1ECDn memcmp v\xE0 dataSize. B\u1EB1ng c\xE1ch k\u1EBFt h\u1EE3p c\xE1c tham s\u1ED1 tr\xEAn, ch\xFAng ta c\xF3 th\u1EC3 gi\u1EA3m thi\u1EC3u ph\u1EA1m vi truy v\u1EA5n v\u1EDBi k\xEDch th\u01B0\u1EDBc d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c ki\u1EC3m so\xE1t v\xE0 d\u1EC5 \u0111o\xE1n h\u01A1n.

    ",2),bn=s("M\u1ED9t v\xED d\u1EE5 th\u01B0\u1EDDng th\u1EA5y c\u1EE7a "),dn=n("code",null,"getProgramAccounts",-1),hn=s(" l\xE0 t\u01B0\u01A1ng t\xE1c v\u1EDBi "),gn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},fn=s("SPL-Token Program"),_n=s(". Truy v\u1EA5n t\u1EA5t c\u1EA3 c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi Token Program v\u1EDBi m\u1ED9t c\xE2u "),yn=s("truy v\u1EA5n thu\u1EA7n tu\xFD"),vn=s(" kh\xF4ng c\xF3 l\u1ECDc s\u1EBD d\u1EABn \u0111\u1EBFn m\u1ED9t s\u1ED1 l\u01B0\u1EE3ng d\u1EEF li\u1EC7u tr\u1EA3 v\u1EC1 kh\u1ED5ng l\u1ED3. Thay v\xE0o \u0111\xF3, b\u1EB1ng c\xE1ch b\u1ED5 sung c\xE1c tham s\u1ED1, ch\xFAng ta c\xF3 th\u1EC3 truy v\u1EA5n m\u1ED9t c\xE1ch hi\u1EC7u qu\u1EA3 ch\u1EC9 nh\u1EEFng d\u1EEF li\u1EC7u m\xECnh c\u1EA7n."),An=c('

    filters

    Tham s\u1ED1 ph\u1ED5 bi\u1EBFn nh\u1EA5t \u0111\u01B0\u1EE3c d\xF9ng k\xE8m v\u1EDBi getProgramAccounts ch\xEDnh l\xE0 m\u1EA3ng c\xE1c filters. M\u1EA3ng n\xE0y ch\u1EA5p nh\u1EADn 2 ki\u1EC3u l\u1ECDc l\xE0 dataSize v\xE0 memcmp. Tr\u01B0\u1EDBc khi s\u1EED d\u1EE5ng m\u1ED9t trong hai, ch\xFAng ta n\xEAn hi\u1EC3u \u0111\u01B0\u1EE3c d\u1EEF li\u1EC7u c\u1EA7n truy v\u1EA5n s\u1EBD c\xF3 ch\u1EE9a d\u1EEF li\u1EC7u g\xEC? h\xECnh th\xE1i ra sao? tu\u1EA7n t\u1EF1 ho\xE1 nh\u01B0 th\u1EBF n\xE0o?

    dataSize

    ',3),wn=s("Trong tr\u01B0\u1EDDng h\u1EE3p Token Program, ch\xFAng ta c\xF3 th\u1EC3 th\u1EA5y r\u1EB1ng "),Tn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Cn=s("\u0111\u1ED9 d\xE0i c\u1EE7a Token Account l\xE0 165 bytes"),Pn=s(". \u0110\u1EB7c bi\u1EC7t, m\u1ED9t Token Account c\xF3 8 tr\u01B0\u1EDDng con, v\u1EDBi m\u1ED7i tr\u01B0\u1EDDng c\xF3 \u0111\u1ED9 d\xE0i v\xF9ng nh\u1EDB bi\u1EBFt tr\u01B0\u1EDBc. Ch\xFAng ta c\xF3 th\u1EC3 m\u01B0\u1EDDng t\u01B0\u1EE3ng c\xE1ch d\u1EEF li\u1EC7u \u0111\u01B0\u1EE3c s\u1EAFp x\u1EBFp b\u1EB1ng minh ho\u1EA1 sau."),Sn=c('

    Account Size

    N\u1EBFu ch\xFAng ta mu\u1ED1n t\xECm t\u1EA5t c\u1EA3 Token Account s\u1EDF h\u1EEFu b\u1EDFi ch\u1EC9 ri\xEAng v\xED c\u1EE7a m\xECnh, ch\xFAng ta c\xF3 th\u1EC3 th\xEAm { dataSize: 165 } v\xE0 filters \u0111\u1EC3 thu h\u1EB9p pham vi c\xE2u truy v\u1EA5n v\xE0 ch\u1EC9 l\u1EA5y nh\u1EEFng Account c\xF3 \u0111\u1ED9 d\xE0i ch\xEDnh x\xE1c 165 bytes. Tuy v\u1EADy, n\xF3 v\u1EABn l\xE0 ch\u01B0a \u0111\u1EE7. Ch\xFAng ta c\u1EA7n th\xEAm m\u1ED9t \u0111i\u1EC1u ki\u1EC7n \u0111\u1EC3 ch\u1EC9 l\u1ECDc c\xE1c Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi v\xED c\u1EE7a m\xECnh. \u0110\u1EC3 l\xE0 \u0111\u01B0\u1EE3c \u0111i\u1EC1u \u0111\xF3, ch\xFAng ta ph\u1EA3i s\u1EED d\u1EE5ng memcmp.

    memcmp

    \u0110i\u1EC1u ki\u1EC7n l\u1ECDc memcmp, ho\u1EB7c "memory comparison" (ph\xE9p so s\xE1nh v\xF9ng nh\u1EDB), cho ph\xE9p ch\xFAng ta so s\xE1nh d\u1EEF li\u1EC7u truy\u1EC1n v\xE0o v\u1EDBi b\u1EA5t k\u1EF3 v\xF9ng nh\u1EDB n\xE0o \u0111\u01B0\u1EE3c l\u01B0u trong Account. \u0110\u1EB7c bi\u1EC7t, ch\xFAng ta c\xF3 th\u1EC3 truy v\u1EA5n ch\u1EC9 nh\u1EEFng Account m\xE0 kh\u1EDBp v\u1EDBi m\u1ED9t \u0111o\u1EA1n d\u1EEF li\u1EC7u t\u1EA1i m\u1ED9t v\u1ECB tr\xED c\u1EE5 th\u1EC3. memcmp y\xEAu c\u1EA7u 2 tham s\u1ED1:

    • offset: V\u1ECB tr\xED b\u1EAFt \u0111\u1EA7u \u0111\u1EC3 so s\xE1nh d\u1EEF li\u1EC7u. V\u1ECB tr\xED n\xE0y th\u01B0\u1EDDng \u0111\u01B0\u1EE3c t\xEDnh theo bytes v\xE0 bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng s\u1ED1 nguy\xEAn.
    • bytes: D\u1EEF li\u1EC7u d\xF9ng \u0111\u1EC3 \u0111\u1ED1i chi\u1EBFu v\u1EDBi d\u1EEF li\u1EC7u trong Account. D\u1EEF li\u1EC7u n\xE0y n\xEAn \u0111\u01B0\u1EE3c bi\u1EC3u di\u1EC5n d\u01B0\u1EDBi d\u1EA1ng base58 v\xE0 kh\xF4ng qu\xE1 129 bytes.

    M\u1ED9t \u0111i\u1EC1u quan tr\u1ECDng c\u1EA7n l\u01B0u \xFD l\xE0 memcmp ch\u1EC9 tr\u1EA3 v\u1EC1 c\xE1c k\u1EBFt qu\u1EA3 kh\u1EDBp ch\xEDnh x\xE1c tr\xEAn t\u1EEBng bytes. V\xE0 hi\u1EC7n t\u1EA1i kh\xF4ng h\u1ED7 tr\u1EE3 c\xE1c ph\xE9p so s\xE1nh l\u1EDBn h\u01A1n ho\u1EB7c nh\u1ECF h\u01A1n cho bytes.

    S\u1EED d\u1EE5ng l\u1EA1i v\xED d\u1EE5 Token Program b\xEAn tr\xEAn, ch\xFAng ta \u0111i\u1EC1u ch\u1EC9nh c\xE2u truy v\u1EA5n ch\u1EC9 tr\u1EA3 v\u1EC1 nh\u1EEFng Token Account m\xE0 \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi ch\xEDnh m\xECnh. Khi nh\xECn v\xE0o m\u1ED9t Token Account, ch\xFAng ta bi\u1EBFt \u0111\u01B0\u1EE3c 2 tr\u01B0\u1EDDng \u0111\u1EA7u ti\xEAn l\u01B0u trong Token Account l\xE0 2 kho\xE1 c\xF4ng khai v\u1EDBi \u0111\u1ED9 d\xE0i l\xE0 32 bytes. Bi\u1EBFt r\u1EB1ng owner l\xE0 tr\u01B0\u1EDDng th\u1EE9 2, ch\xFAng ta n\xEAn kh\u1EDFi t\u1EA1o memcmp v\u1EDBi offset l\xE0 32. T\u1EEB \u0111\xF3, ch\xFAng ta s\u1EBD l\u1ECDc \u0111\u01B0\u1EE3c nh\u1EEFng Account c\u1EE7a m\xECnh b\u1EB1ng c\xE1ch truy\u1EC1n \u0111\u1ECBa ch\u1EC9 v\xED v\xE0o bytes.

    Account Size

    Ch\xFAng ta c\xF3 th\u1EC3 g\u1ECDi c\xE2u truy v\u1EA5n n\xE0y th\xF4ng qua v\xED d\u1EE5 sau:

    ',9),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -412,4 +412,4 @@ Found 3 token account(s) for mint BUGuuhPsHpk8YZrL2GctsCtXGneL1gmT5zYb7eMHZDWf: `),n("span",{class:"token comment"},"# ],"),s(` `),n("span",{class:"token comment"},'# "id": 1'),s(` `),n("span",{class:"token comment"},"# }"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),Gn=n("p",null,[s("V\u1EDDi vi\u1EC7c k\u1EBFt h\u1EE3p gi\u1EEF 3 tham s\u1ED1 ("),n("code",null,"dataSlice"),s(", "),n("code",null,"dataSize"),s(", v\xE0 "),n("code",null,"memcmp"),s("), ch\xFAng ta c\xF3 th\u1EC3 gi\u1EDBi h\u1EA1n ph\u1EA1m vi truy v\u1EA5n m\u1ED9t c\xE1ch hi\u1EC7u qu\u1EA3 v\u1EDBi ch\u1EC9 c\xE1c k\u1EBFt qu\u1EA3 tr\u1EA3 v\u1EC1 m\xE0 ch\xFAng ta quan t\xE2m.")],-1),Bn=n("h2",{id:"cac-nguon-tai-lieu-khac",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cac-nguon-tai-lieu-khac","aria-hidden":"true"},"#"),s(),n("a",{name:"resources"}),s(" C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c")],-1),xn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getprogramaccounts",target:"_blank",rel:"noopener noreferrer"},zn=s("RPC API Documentation"),Fn={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Hn=s("Web3js Documentation"),Zn={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Qn=s("JSON-parsed Web3js Documentation");function Vn(Un,Wn){const t=l("ExternalLinkIcon"),u=l("RouterLink"),o=l("CodeGroupItem"),p=l("CodeGroup");return r(),m(k,null,[g,n("div",f,[_,n("ul",null,[y,n("li",null,[v,A,w,T,C,n("ul",null,[n("li",null,[P,S,D,E,N,n("a",M,[K,a(t)])]),n("li",null,[L,R,G,B,x,z,F,H,Z,Q,V,n("a",U,[W,a(t)])]),j,n("li",null,[Y,J,X,O,I,n("a",q,[$,a(t)])])])])]),nn]),sn,an,n("ul",null,[tn,n("li",null,[en,n("a",cn,[on,a(t)]),ln]),n("li",null,[pn,n("a",un,[rn,a(t)]),mn])]),kn,n("p",null,[bn,dn,hn,n("a",gn,[fn,a(t)]),_n,a(u,{to:"/vi/references/accounts.html#get-program-accounts"},{default:e(()=>[yn]),_:1}),vn]),An,n("p",null,[wn,n("a",Tn,[Cn,a(t)]),Pn]),Sn,a(p,null,{default:e(()=>[a(o,{title:"TS",active:""},{default:e(()=>[Dn]),_:1}),a(o,{title:"Rust Client",active:""},{default:e(()=>[En]),_:1}),a(o,{title:"cURL",active:""},{default:e(()=>[Nn]),_:1})]),_:1}),Mn,a(p,null,{default:e(()=>[a(o,{title:"TS",active:""},{default:e(()=>[Kn]),_:1}),a(o,{title:"Rust Client",active:""},{default:e(()=>[Ln]),_:1}),a(o,{title:"cURL",active:""},{default:e(()=>[Rn]),_:1})]),_:1}),Gn,Bn,n("ul",null,[n("li",null,[n("a",xn,[zn,a(t)])]),n("li",null,[n("a",Fn,[Hn,a(t)])]),n("li",null,[n("a",Zn,[Qn,a(t)])])])],64)}var Yn=i(h,[["render",Vn]]);export{Yn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),Gn=n("p",null,[s("V\u1EDBi vi\u1EC7c k\u1EBFt h\u1EE3p gi\u1EEF 3 tham s\u1ED1 ("),n("code",null,"dataSlice"),s(", "),n("code",null,"dataSize"),s(", v\xE0 "),n("code",null,"memcmp"),s("), ch\xFAng ta c\xF3 th\u1EC3 gi\u1EDBi h\u1EA1n ph\u1EA1m vi truy v\u1EA5n m\u1ED9t c\xE1ch hi\u1EC7u qu\u1EA3 v\u1EDBi ch\u1EC9 c\xE1c k\u1EBFt qu\u1EA3 tr\u1EA3 v\u1EC1 m\xE0 ch\xFAng ta quan t\xE2m.")],-1),Bn=n("h2",{id:"cac-nguon-tai-lieu-khac",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cac-nguon-tai-lieu-khac","aria-hidden":"true"},"#"),s(),n("a",{name:"resources"}),s(" C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c")],-1),xn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getprogramaccounts",target:"_blank",rel:"noopener noreferrer"},zn=s("RPC API Documentation"),Fn={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Hn=s("Web3js Documentation"),Zn={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Qn=s("JSON-parsed Web3js Documentation");function Vn(Un,Wn){const t=l("ExternalLinkIcon"),u=l("RouterLink"),o=l("CodeGroupItem"),p=l("CodeGroup");return r(),m(k,null,[g,n("div",f,[_,n("ul",null,[y,n("li",null,[v,A,w,T,C,n("ul",null,[n("li",null,[P,S,D,E,N,n("a",M,[K,a(t)])]),n("li",null,[L,R,G,B,x,z,F,H,Z,Q,V,n("a",U,[W,a(t)])]),j,n("li",null,[Y,J,X,O,I,n("a",q,[$,a(t)])])])])]),nn]),sn,an,n("ul",null,[tn,n("li",null,[en,n("a",cn,[on,a(t)]),ln]),n("li",null,[pn,n("a",un,[rn,a(t)]),mn])]),kn,n("p",null,[bn,dn,hn,n("a",gn,[fn,a(t)]),_n,a(u,{to:"/vi/references/accounts.html#get-program-accounts"},{default:e(()=>[yn]),_:1}),vn]),An,n("p",null,[wn,n("a",Tn,[Cn,a(t)]),Pn]),Sn,a(p,null,{default:e(()=>[a(o,{title:"TS",active:""},{default:e(()=>[Dn]),_:1}),a(o,{title:"Rust Client",active:""},{default:e(()=>[En]),_:1}),a(o,{title:"cURL",active:""},{default:e(()=>[Nn]),_:1})]),_:1}),Mn,a(p,null,{default:e(()=>[a(o,{title:"TS",active:""},{default:e(()=>[Kn]),_:1}),a(o,{title:"Rust Client",active:""},{default:e(()=>[Ln]),_:1}),a(o,{title:"cURL",active:""},{default:e(()=>[Rn]),_:1})]),_:1}),Gn,Bn,n("ul",null,[n("li",null,[n("a",xn,[zn,a(t)])]),n("li",null,[n("a",Fn,[Hn,a(t)])]),n("li",null,[n("a",Zn,[Qn,a(t)])])])],64)}var Yn=i(h,[["render",Vn]]);export{Yn as default}; diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.01717eeb.js b/docs/.vuepress/dist/assets/get-program-accounts.html.1a158c6f.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.01717eeb.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.1a158c6f.js index a803e93cf..f73f61f37 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.01717eeb.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.1a158c6f.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as m,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},_=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u6240\u6709\u3055\u308C\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3059\u3079\u3066\u3092\u8FD4\u3059RPC\u30E1\u30BD\u30C3\u30C9\u3002\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u306F\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002 \u30EC\u30B9\u30DD\u30F3\u30B9\u5411\u4E0A\u3092\u3057\u3064\u3064\u610F\u56F3\u3057\u305F\u7D50\u679C\u306E\u307F\u3092\u8FD4\u3059\u305F\u3081\u306B\u306F\u3001 "),n("code",null,"getProgramAccounts"),s(" \u306B\u306F"),n("code",null,"dataSlice"),s(" \u304B "),n("code",null,"filters"),s("\u3001\u3042\u308B\u3044\u306F\u305D\u306E\u4E21\u65B9\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")],-1),h=n("h2",{id:"\u6982\u8981",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6982\u8981","aria-hidden":"true"},"#"),s(" \u6982\u8981")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Parameters",-1),w=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - base58 \u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u6587\u5B57\u5217\u3068\u3057\u3066\u63D0\u4F9B\u3055\u308C\u308B\u3001\u30AF\u30A8\u30EA\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u516C\u958B\u9375")],-1),C=s("(optional) "),S=n("code",null,"configOrCommitment",-1),P=s(": "),T=n("code",null,"object",-1),D=s(" - \u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u542B\u3080\u8A2D\u5B9A\u30D1\u30E9\u30E1\u30FC\u30BF: "),E=s("(optional) "),N=n("code",null,"commitment",-1),v=s(": "),M=n("code",null,"string",-1),R=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),L=s("(optional) "),B=n("code",null,"encoding",-1),z=s(": "),x=n("code",null,"string",-1),F=s(" - \u30A2\u30AB\u30A6\u30F3\u30C8 \u30C7\u30FC\u30BF\u306E\u30A8\u30F3\u30B3\u30FC\u30C9: "),H=n("code",null,"base58",-1),Z=s("\u3001 "),Q=n("code",null,"base64",-1),U=s("\u3001 "),W=n("code",null,"jsonParsed",-1),j=s(" \u306E\u3044\u305A\u308C\u304B\u3002 \u203B web3js \u30E6\u30FC\u30B6\u30FC\u306F\u4EE3\u308F\u308A\u306B"),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Y=s("getParsedProgramAccounts"),J=s("\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),X=o("
  • (optional) dataSlice: object - \u4E0B\u8A18\u306B\u57FA\u3065\u304D\u3001\u8FD4\u5374\u3055\u308C\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u3092\u5236\u9650\u3057\u307E\u3059\u3002:
    • offset: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u8FD4\u5374\u958B\u59CB\u4F4D\u7F6E\u30D0\u30A4\u30C8\u6570
    • length: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u8FD4\u5374\u30D0\u30A4\u30C8\u6570
  • (optional) filters: array - \u6B21\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F7F\u7528\u3057\u3066\u7D50\u679C\u3092\u30D5\u30A3\u30EB\u30BF\u3057\u307E\u3059\u3002:
    • memcmp: object - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u3068\u7167\u5408\u3059\u308B\u9023\u7D9A\u30D0\u30A4\u30C8:
      • offset: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u6BD4\u8F03\u958B\u59CB\u4F4D\u7F6E\u30D0\u30A4\u30C8\u6570
      • bytes: string - \u7167\u5408\u306B\u4F7F\u7528\u3059\u308B129\u30D0\u30A4\u30C8\u5236\u9650\u306Ebase58\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217
    • dataSize: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u9577\u3055\u3068\u6BD4\u8F03\u3059\u308B\u6307\u5B9A\u6570
  • ",2),O=s("(optional) "),I=n("code",null,"withContext",-1),$=s(": "),q=n("code",null,"boolean",-1),nn=s(" - \u7D50\u679C\u3092"),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=s("RpcResponse JSON object"),en=s("\u306B\u30E9\u30C3\u30D7\u3059\u308B\u304B\u3069\u3046\u304B\u3002"),tn=o('
    Response

    \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001 getProgramAccounts \u306F\u6B21\u306E\u69CB\u9020\u3092\u6301\u3064 JSON \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u914D\u5217\u3092\u8FD4\u3057\u307E\u3059\u3002:

    • pubkey: string - base58\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u516C\u958B\u9375
    • account: object - \u6B21\u306E\u30B5\u30D6\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6301\u3064 JSON \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8:
      • lamports: number, \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u305Flamports \u306E\u6570
      • owner: string, \u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u306Ebase58\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u516C\u958B\u9375
      • data: string | object - \u6307\u5B9A\u3055\u308C\u305F\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0 \u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u5FDC\u3058\u3066\u30D0\u30A4\u30CA\u30EA \u30C7\u30FC\u30BF\u307E\u305F\u306F JSON \u5F62\u5F0F\u306B\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30C7\u30FC\u30BF
      • executable: boolean, \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B
      • rentEpoch: number, \u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6B21\u306Brent\u3092\u652F\u6255\u3046\u3079\u304Depoch
    ',3),cn=n("h2",{id:"\u8A73\u7D30",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8A73\u7D30","aria-hidden":"true"},"#"),s(" \u8A73\u7D30")],-1),on=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u306F\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u8FD4\u3059\u591A\u7528\u9014\u306E RPC \u30E1\u30BD\u30C3\u30C9\u3067\u3059\u3002\u4E0B\u8A18\u306E\u3088\u3046\u306A\u691C\u7D22\u306A\u3069\u3001\u591A\u304F\u306E\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3067\u304D\u307E\u3059:")],-1),ln=n("li",null,"\u7279\u5B9A\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306E\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97",-1),pn=s("\u7279\u5B9A\u306Emint\u306E\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8 ( \u3064\u307E\u308A\u3001"),un={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},rn=s("SRM"),mn=s(" \u306E\u6240\u6709\u8005\u3059\u3079\u3066)"),kn=s("\u7279\u5B9A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u3059\u3079\u3066\u306E\u30AB\u30B9\u30BF\u30E0 \u30A2\u30AB\u30A6\u30F3\u30C8 (\u3064\u307E\u308A\u3001"),bn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},dn=s("Mango"),fn=s(" \u30E6\u30FC\u30B6\u30FC\u5168\u54E1)"),_n=o("

    getProgramAccounts\u306F\u975E\u5E38\u306B\u4FBF\u5229\u3067\u3059\u304C\u3001\u73FE\u5728\u306E\u5236\u7D04\u306E\u305F\u3081\u306B\u3088\u304F\u8AA4\u89E3\u3055\u308C\u307E\u3059\u3002 \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30AF\u30A8\u30EA\u306E\u591A\u304F\u306F\u3001\u5927\u91CF\u306E\u30C7\u30FC\u30BF \u30BB\u30C3\u30C8\u3092\u30B9\u30AD\u30E3\u30F3\u3059\u308B\u305F\u3081\u306BRPC \u30CE\u30FC\u30C9\u3092\u5FC5\u8981\u3068\u3057\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30B9\u30AD\u30E3\u30F3\u306F\u3001\u30E1\u30E2\u30EA\u3068\u30EA\u30BD\u30FC\u30B9\u306E\u4E21\u65B9\u3092\u96C6\u4E2D\u7684\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u305D\u306E\u7D50\u679C\u3001\u547C\u3073\u51FA\u3057\u306E\u983B\u5EA6\u304C\u9AD8\u3059\u304E\u305F\u308A\u53D6\u5F97\u7BC4\u56F2\u304C\u5927\u304D\u3059\u304E\u305F\u308A\u3059\u308B\u3068\u3001 \u63A5\u7D9A\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u304C\u767A\u751F\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 \u3055\u3089\u306B\u3001\u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u306F\u3001getProgramAccounts\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306F\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002 \u30AF\u30A8\u30EA\u306E\u7D50\u679C\u304C\u5927\u304D\u3059\u304E\u308B\u5834\u5408\u3001\u30EC\u30B9\u30DD\u30F3\u30B9\u306F\u7834\u68C4\u3055\u308C\u307E\u3059\u3002

    \u3053\u308C\u3089\u306E\u73FE\u5728\u306E\u5236\u7D04\u3092\u56DE\u907F\u3059\u308B\u305F\u3081\u306B\u3001dataSlice\u3001filters \u3001memcmp\u3001 dataSize\u306A\u3069\u306E\u6709\u7528\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u7D44\u307F\u5408\u308F\u305B\u306B\u3088\u308A\u3001\u30AF\u30A8\u30EA\u306E\u7BC4\u56F2\u3092\u4E88\u6E2C\u53EF\u80FD\u306A\u30B5\u30A4\u30BA\u306B\u7E2E\u5C0F\u3067\u304D\u307E\u3059\u3002

    ",2),gn=n("code",null,"getProgramAccounts",-1),hn=s("\u306E\u4E00\u822C\u7684\u306A\u4F8B\u3068\u3057\u3066\u3001"),yn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},An=s("SPL-Token Program"),wn=s("\u3068\u306E\u5BFE\u8A71\u304C\u3042\u308A\u307E\u3059\u3002 "),Cn=s("basic call"),Sn=s("\u3067\u30C8\u30FC\u30AF\u30F3 \u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u8981\u6C42\u3059\u308B\u3068\u3001\u81A8\u5927\u306A\u91CF\u306E\u30C7\u30FC\u30BF\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002 \u305F\u3060\u3057\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u3067\u3001\u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u306E\u307F\u3092\u52B9\u7387\u7684\u306B\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002"),Pn=o('

    filters

    getProgramAccounts \u4F7F\u7528\u3059\u308B\u6700\u3082\u4E00\u822C\u7684\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306F\u3001 filters \u914D\u5217\u3067\u3059\u3002 dataSize \u3068 memcmp\u306E 2 \u7A2E\u985E\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3001\u8981\u6C42\u3057\u3066\u3044\u308B\u30C7\u30FC\u30BF\u304C\u3069\u306E\u3088\u3046\u306B\u914D\u7F6E\u3055\u308C\u3001\u30B7\u30EA\u30A2\u30EB\u5316\u3055\u308C\u308B\u304B\u3092\u7406\u89E3\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

    dataSize

    ',3),Tn=s("\u30C8\u30FC\u30AF\u30F3 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u5834\u5408\u3001"),Dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},En=s("\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u9577\u3055\u306F 165 \u30D0\u30A4\u30C8"),Nn=s("\u3067\u3059\u3002 \u5177\u4F53\u7684\u306B\u306F\u3001\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306F8\u3064\u306E\u7570\u306A\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3042\u308A\u3001\u5404\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u306F\u4E88\u6E2C\u53EF\u80FD\u306A\u30D0\u30A4\u30C8\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002 \u4EE5\u4E0B\u306E\u56F3\u3092\u4F7F\u7528\u3057\u3066\u3001\u3053\u306E\u30C7\u30FC\u30BF\u304C\u3069\u306E\u3088\u3046\u306B\u914D\u7F6E\u3055\u308C\u3066\u3044\u308B\u304B\u3092\u8996\u899A\u5316\u3067\u304D\u307E\u3059\u3002"),vn=o('

    Account Size

    \u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u7D22\u3059\u308B\u5834\u5408\u306F\u3001filters\u306B { dataSize: 165 } \u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068\u3067\u3001\u30AF\u30A8\u30EA\u306E\u7BC4\u56F2\u3092\u6B63\u78BA\u306B165 \u30D0\u30A4\u30C8\u306E\u9577\u3055\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3060\u3051\u306B\u7D5E\u308A\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305F\u3060\u3057\u3001\u3053\u308C\u3060\u3051\u3067\u306F\u4E0D\u5341\u5206\u3067\u3059\u3002 \u30A2\u30C9\u30EC\u30B9\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u7D22\u3059\u308B\u30D5\u30A3\u30EB\u30BF\u30FC\u3082\u8FFD\u52A0\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306F memcmp \u30D5\u30A3\u30EB\u30BF\u30FC\u3067\u5B9F\u73FE\u3067\u304D\u307E\u3059\u3002

    memcmp

    memcmp\u3001\u307E\u305F\u306F "memory comparison"\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u308B\u4EFB\u610F\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30C7\u30FC\u30BF\u3092\u6BD4\u8F03\u3067\u304D\u307E\u3059\u3002 \u5177\u4F53\u7684\u306B\u306F\u3001\u7279\u5B9A\u306E\u4F4D\u7F6E\u306B\u3042\u308B\u7279\u5B9A\u306E\u30D0\u30A4\u30C8 \u30BB\u30C3\u30C8\u306B\u4E00\u81F4\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u307F\u3092\u7167\u4F1A\u3067\u304D\u307E\u3059\u3002 memcmp\u306B\u306F 2 \u3064\u306E\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059:

    • offset: \u30C7\u30FC\u30BF\u306E\u6BD4\u8F03\u3092\u958B\u59CB\u3059\u308B\u4F4D\u7F6E\u3002\u3053\u306E\u4F4D\u7F6E\u306F\u30D0\u30A4\u30C8\u5358\u4F4D\u3067\u6E2C\u5B9A\u3055\u308C\u3001\u6574\u6570\u3068\u3057\u3066\u8868\u3055\u308C\u307E\u3059\u3002
    • bytes: \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C7\u30FC\u30BF\u3068\u4E00\u81F4\u3055\u305B\u308B\u30C7\u30FC\u30BF\u3002\u3053\u308C\u306F\u3001base-58\u30A8\u30F3\u30B3\u30FC\u30C9\u306E\u6587\u5B57\u5217\u3067\u3001129 \u30D0\u30A4\u30C8\u672A\u6E80\u306B\u5236\u9650\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

    memcmp \u306F bytes\u304C\u5B8C\u5168\u306B\u4E00\u81F4\u3059\u308B\u7D50\u679C\u306E\u307F\u3092\u8FD4\u3059\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002 \u73FE\u5728\u306F\u3001\u6307\u5B9A\u3057\u305Fbytes\u3088\u308A\u5927\u304D\u3044\u3001\u307E\u305F\u306F\u5C0F\u3055\u3044\u5024\u306E\u6BD4\u8F03\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002

    \u30C8\u30FC\u30AF\u30F3 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F8B\u306B\u6CBF\u3063\u3066\u3001\u30AF\u30A8\u30EA\u3092\u4FEE\u6B63\u3057\u3066\u3001\u30A6\u30A9\u30EC\u30C3\u30C8 \u30A2\u30C9\u30EC\u30B9\u304C\u6240\u6709\u3059\u308B\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u307F\u3092\u8FD4\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u898B\u308B\u3068\u3001\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u308B\u6700\u521D\u306E 2 \u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u4E21\u65B9\u3068\u3082\u516C\u958B\u9375\u3067\u3042\u308A\u3001\u5404\u516C\u958B\u9375\u306E\u9577\u3055\u304C 32 \u30D0\u30A4\u30C8\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002owner\u304C 2 \u756A\u76EE\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u3042\u308B\u3053\u3068\u3092\u8003\u3048\u308B\u3068\u3001 memcmp \u306F 32\u30D0\u30A4\u30C8\u306Eoffset\u3067\u958B\u59CB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u3053\u304B\u3089\u3001\u6240\u6709\u8005\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u30A6\u30A9\u30EC\u30C3\u30C8 \u30A2\u30C9\u30EC\u30B9\u3068\u4E00\u81F4\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u63A2\u3057\u307E\u3059\u3002

    Account Size

    \u6B21\u306E\u4F8B\u3092\u4F7F\u7528\u3057\u3066\u3001\u3053\u306E\u30AF\u30A8\u30EA\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059:

    ',9),Mn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as m,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},_=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u6240\u6709\u3055\u308C\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3059\u3079\u3066\u3092\u8FD4\u3059RPC\u30E1\u30BD\u30C3\u30C9\u3002\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u306F\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002 \u30EC\u30B9\u30DD\u30F3\u30B9\u5411\u4E0A\u3092\u3057\u3064\u3064\u610F\u56F3\u3057\u305F\u7D50\u679C\u306E\u307F\u3092\u8FD4\u3059\u305F\u3081\u306B\u306F\u3001 "),n("code",null,"getProgramAccounts"),s(" \u306B\u306F"),n("code",null,"dataSlice"),s(" \u304B "),n("code",null,"filters"),s("\u3001\u3042\u308B\u3044\u306F\u305D\u306E\u4E21\u65B9\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002")],-1),h=n("h2",{id:"\u6982\u8981",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6982\u8981","aria-hidden":"true"},"#"),s(" \u6982\u8981")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Parameters",-1),w=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - base58 \u3067\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u6587\u5B57\u5217\u3068\u3057\u3066\u63D0\u4F9B\u3055\u308C\u308B\u3001\u30AF\u30A8\u30EA\u3059\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u516C\u958B\u9375")],-1),C=s("(optional) "),S=n("code",null,"configOrCommitment",-1),P=s(": "),T=n("code",null,"object",-1),D=s(" - \u6B21\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u542B\u3080\u8A2D\u5B9A\u30D1\u30E9\u30E1\u30FC\u30BF: "),E=s("(optional) "),N=n("code",null,"commitment",-1),v=s(": "),M=n("code",null,"string",-1),R=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),L=s("(optional) "),B=n("code",null,"encoding",-1),z=s(": "),x=n("code",null,"string",-1),F=s(" - \u30A2\u30AB\u30A6\u30F3\u30C8 \u30C7\u30FC\u30BF\u306E\u30A8\u30F3\u30B3\u30FC\u30C9: "),H=n("code",null,"base58",-1),Z=s("\u3001 "),Q=n("code",null,"base64",-1),U=s("\u3001 "),W=n("code",null,"jsonParsed",-1),j=s(" \u306E\u3044\u305A\u308C\u304B\u3002 \u203B web3js \u30E6\u30FC\u30B6\u30FC\u306F\u4EE3\u308F\u308A\u306B"),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Y=s("getParsedProgramAccounts"),J=s("\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),X=o("
  • (optional) dataSlice: object - \u4E0B\u8A18\u306B\u57FA\u3065\u304D\u3001\u8FD4\u5374\u3055\u308C\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u3092\u5236\u9650\u3057\u307E\u3059\u3002:
    • offset: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u8FD4\u5374\u958B\u59CB\u4F4D\u7F6E\u30D0\u30A4\u30C8\u6570
    • length: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u8FD4\u5374\u30D0\u30A4\u30C8\u6570
  • (optional) filters: array - \u6B21\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3092\u4F7F\u7528\u3057\u3066\u7D50\u679C\u3092\u30D5\u30A3\u30EB\u30BF\u3057\u307E\u3059\u3002:
    • memcmp: object - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u3068\u7167\u5408\u3059\u308B\u9023\u7D9A\u30D0\u30A4\u30C8:
      • offset: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u6BD4\u8F03\u958B\u59CB\u4F4D\u7F6E\u30D0\u30A4\u30C8\u6570
      • bytes: string - \u7167\u5408\u306B\u4F7F\u7528\u3059\u308B129\u30D0\u30A4\u30C8\u5236\u9650\u306Ebase58\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217
    • dataSize: number - \u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u9577\u3055\u3068\u6BD4\u8F03\u3059\u308B\u6307\u5B9A\u6570
  • ",2),O=s("(optional) "),I=n("code",null,"withContext",-1),$=s(": "),q=n("code",null,"boolean",-1),nn=s(" - \u7D50\u679C\u3092"),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=s("RpcResponse JSON object"),en=s("\u306B\u30E9\u30C3\u30D7\u3059\u308B\u304B\u3069\u3046\u304B\u3002"),tn=o('
    Response

    \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001 getProgramAccounts \u306F\u6B21\u306E\u69CB\u9020\u3092\u6301\u3064 JSON \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u306E\u914D\u5217\u3092\u8FD4\u3057\u307E\u3059\u3002:

    • pubkey: string - base58\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u516C\u958B\u9375
    • account: object - \u6B21\u306E\u30B5\u30D6\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u6301\u3064 JSON \u30AA\u30D6\u30B8\u30A7\u30AF\u30C8:
      • lamports: number, \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u305Flamports \u306E\u6570
      • owner: string, \u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5272\u308A\u5F53\u3066\u3089\u308C\u3066\u3044\u308B\u30D7\u30ED\u30B0\u30E9\u30E0\u306Ebase58\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u516C\u958B\u9375
      • data: string | object - \u6307\u5B9A\u3055\u308C\u305F\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0 \u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u5FDC\u3058\u3066\u30D0\u30A4\u30CA\u30EA \u30C7\u30FC\u30BF\u307E\u305F\u306F JSON \u5F62\u5F0F\u306B\u30A8\u30F3\u30B3\u30FC\u30C9\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30C7\u30FC\u30BF
      • executable: boolean, \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B
      • rentEpoch: number, \u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6B21\u306Brent\u3092\u652F\u6255\u3046\u3079\u304Depoch
    ',3),cn=n("h2",{id:"\u8A73\u7D30",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8A73\u7D30","aria-hidden":"true"},"#"),s(" \u8A73\u7D30")],-1),on=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u306F\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u8FD4\u3059\u591A\u7528\u9014\u306E RPC \u30E1\u30BD\u30C3\u30C9\u3067\u3059\u3002\u4E0B\u8A18\u306E\u3088\u3046\u306A\u691C\u7D22\u306A\u3069\u3001\u591A\u304F\u306E\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3067\u304D\u307E\u3059:")],-1),ln=n("li",null,"\u7279\u5B9A\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306E\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u53D6\u5F97",-1),pn=s("\u7279\u5B9A\u306Emint\u306E\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8 ( \u3064\u307E\u308A\u3001"),un={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},rn=s("SRM"),mn=s(" \u306E\u6240\u6709\u8005\u3059\u3079\u3066)"),kn=s("\u7279\u5B9A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u3059\u3079\u3066\u306E\u30AB\u30B9\u30BF\u30E0 \u30A2\u30AB\u30A6\u30F3\u30C8 (\u3064\u307E\u308A\u3001"),bn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},dn=s("Mango"),fn=s(" \u30E6\u30FC\u30B6\u30FC\u5168\u54E1)"),_n=o("

    getProgramAccounts\u306F\u975E\u5E38\u306B\u4FBF\u5229\u3067\u3059\u304C\u3001\u73FE\u5728\u306E\u5236\u7D04\u306E\u305F\u3081\u306B\u3088\u304F\u8AA4\u89E3\u3055\u308C\u307E\u3059\u3002 \u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u30AF\u30A8\u30EA\u306E\u591A\u304F\u306F\u3001\u5927\u91CF\u306E\u30C7\u30FC\u30BF \u30BB\u30C3\u30C8\u3092\u30B9\u30AD\u30E3\u30F3\u3059\u308B\u305F\u3081\u306BRPC \u30CE\u30FC\u30C9\u3092\u5FC5\u8981\u3068\u3057\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30B9\u30AD\u30E3\u30F3\u306F\u3001\u30E1\u30E2\u30EA\u3068\u30EA\u30BD\u30FC\u30B9\u306E\u4E21\u65B9\u3092\u96C6\u4E2D\u7684\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u305D\u306E\u7D50\u679C\u3001\u547C\u3073\u51FA\u3057\u306E\u983B\u5EA6\u304C\u9AD8\u3059\u304E\u305F\u308A\u53D6\u5F97\u7BC4\u56F2\u304C\u5927\u304D\u3059\u304E\u305F\u308A\u3059\u308B\u3068\u3001 \u63A5\u7D9A\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u304C\u767A\u751F\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002 \u3055\u3089\u306B\u3001\u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u306F\u3001getProgramAccounts\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306F\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u305B\u3093\u3002 \u30AF\u30A8\u30EA\u306E\u7D50\u679C\u304C\u5927\u304D\u3059\u304E\u308B\u5834\u5408\u3001\u30EC\u30B9\u30DD\u30F3\u30B9\u306F\u7834\u68C4\u3055\u308C\u307E\u3059\u3002

    \u3053\u308C\u3089\u306E\u73FE\u5728\u306E\u5236\u7D04\u3092\u56DE\u907F\u3059\u308B\u305F\u3081\u306B\u3001dataSlice\u3001filters \u3001memcmp\u3001 dataSize\u306A\u3069\u306E\u6709\u7528\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u7D44\u307F\u5408\u308F\u305B\u306B\u3088\u308A\u3001\u30AF\u30A8\u30EA\u306E\u7BC4\u56F2\u3092\u4E88\u6E2C\u53EF\u80FD\u306A\u30B5\u30A4\u30BA\u306B\u7E2E\u5C0F\u3067\u304D\u307E\u3059\u3002

    ",2),gn=n("code",null,"getProgramAccounts",-1),hn=s("\u306E\u4E00\u822C\u7684\u306A\u4F8B\u3068\u3057\u3066\u3001"),yn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},An=s("SPL-Token Program"),wn=s("\u3068\u306E\u5BFE\u8A71\u304C\u3042\u308A\u307E\u3059\u3002 "),Cn=s("basic call"),Sn=s("\u3067\u30C8\u30FC\u30AF\u30F3 \u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u8981\u6C42\u3059\u308B\u3068\u3001\u81A8\u5927\u306A\u91CF\u306E\u30C7\u30FC\u30BF\u304C\u5FC5\u8981\u306B\u306A\u308A\u307E\u3059\u3002 \u305F\u3060\u3057\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3092\u6307\u5B9A\u3059\u308B\u3053\u3068\u3067\u3001\u4F7F\u7528\u3059\u308B\u30C7\u30FC\u30BF\u306E\u307F\u3092\u52B9\u7387\u7684\u306B\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002"),Pn=o('

    filters

    getProgramAccounts \u4F7F\u7528\u3059\u308B\u6700\u3082\u4E00\u822C\u7684\u306A\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306F\u3001 filters \u914D\u5217\u3067\u3059\u3002 dataSize \u3068 memcmp\u306E 2 \u7A2E\u985E\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u306E\u3044\u305A\u308C\u304B\u3092\u4F7F\u7528\u3059\u308B\u524D\u306B\u3001\u8981\u6C42\u3057\u3066\u3044\u308B\u30C7\u30FC\u30BF\u304C\u3069\u306E\u3088\u3046\u306B\u914D\u7F6E\u3055\u308C\u3001\u30B7\u30EA\u30A2\u30EB\u5316\u3055\u308C\u308B\u304B\u3092\u7406\u89E3\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

    dataSize

    ',3),Tn=s("\u30C8\u30FC\u30AF\u30F3 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u5834\u5408\u3001"),Dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},En=s("\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u9577\u3055\u306F 165 \u30D0\u30A4\u30C8"),Nn=s("\u3067\u3059\u3002 \u5177\u4F53\u7684\u306B\u306F\u3001\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u306F8\u3064\u306E\u7570\u306A\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3042\u308A\u3001\u5404\u30D5\u30A3\u30FC\u30EB\u30C9\u306B\u306F\u4E88\u6E2C\u53EF\u80FD\u306A\u30D0\u30A4\u30C8\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002 \u4EE5\u4E0B\u306E\u56F3\u3092\u4F7F\u7528\u3057\u3066\u3001\u3053\u306E\u30C7\u30FC\u30BF\u304C\u3069\u306E\u3088\u3046\u306B\u914D\u7F6E\u3055\u308C\u3066\u3044\u308B\u304B\u3092\u8996\u899A\u5316\u3067\u304D\u307E\u3059\u3002"),vn=o('

    Account Size

    \u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9\u304C\u6240\u6709\u3059\u308B\u3059\u3079\u3066\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u7D22\u3059\u308B\u5834\u5408\u306F\u3001filters\u306B { dataSize: 165 } \u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068\u3067\u3001\u30AF\u30A8\u30EA\u306E\u7BC4\u56F2\u3092\u6B63\u78BA\u306B165 \u30D0\u30A4\u30C8\u306E\u9577\u3055\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3060\u3051\u306B\u7D5E\u308A\u8FBC\u3080\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u305F\u3060\u3057\u3001\u3053\u308C\u3060\u3051\u3067\u306F\u4E0D\u5341\u5206\u3067\u3059\u3002 \u30A2\u30C9\u30EC\u30B9\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u691C\u7D22\u3059\u308B\u30D5\u30A3\u30EB\u30BF\u30FC\u3082\u8FFD\u52A0\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u306F memcmp \u30D5\u30A3\u30EB\u30BF\u30FC\u3067\u5B9F\u73FE\u3067\u304D\u307E\u3059\u3002

    memcmp

    memcmp\u3001\u307E\u305F\u306F "memory comparison"\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u308B\u4EFB\u610F\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30C7\u30FC\u30BF\u3092\u6BD4\u8F03\u3067\u304D\u307E\u3059\u3002 \u5177\u4F53\u7684\u306B\u306F\u3001\u7279\u5B9A\u306E\u4F4D\u7F6E\u306B\u3042\u308B\u7279\u5B9A\u306E\u30D0\u30A4\u30C8 \u30BB\u30C3\u30C8\u306B\u4E00\u81F4\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u307F\u3092\u7167\u4F1A\u3067\u304D\u307E\u3059\u3002 memcmp\u306B\u306F 2 \u3064\u306E\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059:

    • offset: \u30C7\u30FC\u30BF\u306E\u6BD4\u8F03\u3092\u958B\u59CB\u3059\u308B\u4F4D\u7F6E\u3002\u3053\u306E\u4F4D\u7F6E\u306F\u30D0\u30A4\u30C8\u5358\u4F4D\u3067\u6E2C\u5B9A\u3055\u308C\u3001\u6574\u6570\u3068\u3057\u3066\u8868\u3055\u308C\u307E\u3059\u3002
    • bytes: \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30C7\u30FC\u30BF\u3068\u4E00\u81F4\u3055\u305B\u308B\u30C7\u30FC\u30BF\u3002\u3053\u308C\u306F\u3001base-58\u30A8\u30F3\u30B3\u30FC\u30C9\u306E\u6587\u5B57\u5217\u3067\u3001129 \u30D0\u30A4\u30C8\u672A\u6E80\u306B\u5236\u9650\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

    memcmp \u306F bytes\u304C\u5B8C\u5168\u306B\u4E00\u81F4\u3059\u308B\u7D50\u679C\u306E\u307F\u3092\u8FD4\u3059\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002 \u73FE\u5728\u306F\u3001\u6307\u5B9A\u3057\u305Fbytes\u3088\u308A\u5927\u304D\u3044\u3001\u307E\u305F\u306F\u5C0F\u3055\u3044\u5024\u306E\u6BD4\u8F03\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002

    \u30C8\u30FC\u30AF\u30F3 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F8B\u306B\u6CBF\u3063\u3066\u3001\u30AF\u30A8\u30EA\u3092\u4FEE\u6B63\u3057\u3066\u3001\u30A6\u30A9\u30EC\u30C3\u30C8 \u30A2\u30C9\u30EC\u30B9\u304C\u6240\u6709\u3059\u308B\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u307F\u3092\u8FD4\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u898B\u308B\u3068\u3001\u30C8\u30FC\u30AF\u30F3 \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u308B\u6700\u521D\u306E 2 \u3064\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u4E21\u65B9\u3068\u3082\u516C\u958B\u9375\u3067\u3042\u308A\u3001\u5404\u516C\u958B\u9375\u306E\u9577\u3055\u304C 32 \u30D0\u30A4\u30C8\u3067\u3042\u308B\u3053\u3068\u304C\u308F\u304B\u308A\u307E\u3059\u3002owner\u304C 2 \u756A\u76EE\u306E\u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u3042\u308B\u3053\u3068\u3092\u8003\u3048\u308B\u3068\u3001 memcmp \u306F 32\u30D0\u30A4\u30C8\u306Eoffset\u3067\u958B\u59CB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u3053\u304B\u3089\u3001\u6240\u6709\u8005\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u30A6\u30A9\u30EC\u30C3\u30C8 \u30A2\u30C9\u30EC\u30B9\u3068\u4E00\u81F4\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u63A2\u3057\u307E\u3059\u3002

    Account Size

    \u6B21\u306E\u4F8B\u3092\u4F7F\u7528\u3057\u3066\u3001\u3053\u306E\u30AF\u30A8\u30EA\u3092\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059:

    ',9),Mn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.05c9c5aa.js b/docs/.vuepress/dist/assets/get-program-accounts.html.1a4d6f7c.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.05c9c5aa.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.1a4d6f7c.js index e25fa907e..8e06019aa 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.05c9c5aa.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.1a4d6f7c.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as k,a as n,b as a,w as t,F as m,d as s,e as o}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},_=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("RPC method\uB294 \uD504\uB85C\uADF8\uB7A8\uC5D0 \uC758\uD574 \uC18C\uC720\uB41C \uBAA8\uB4E0 Account\uB4E4\uC744 \uBC18\uD658\uD55C\uB2E4. \uD604\uC7AC pagination\uC740 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "),n("code",null,"getProgramAccounts"),s(" \uC694\uCCAD\uC740 \uC751\uB2F5 \uC2DC\uAC04\uC744 \uD5A5\uC0C1\uC2DC\uD0A4\uACE0 \uC758\uB3C4\uB41C \uACB0\uACFC\uB9CC\uC744 \uBC18\uD658\uD558\uAE30 \uC704\uD574 "),n("code",null,"dataSlice"),s(" \uADF8\uB9AC\uACE0/\uB610\uB294 "),n("code",null,"filters"),s(" \uD30C\uB77C\uBBF8\uD130\uB97C \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4.")],-1),h=n("h2",{id:"facts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),s(" Facts")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Parameters",-1),w=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - \uC9C8\uC758\uD560 Program\uC758 Pubkey, base58 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4")],-1),P=s("(optional) "),T=n("code",null,"configOrCommitment",-1),C=s(": "),D=n("code",null,"object",-1),S=s(" - \uC544\uB798\uC758 optional field\uB4E4\uC744 \uD3EC\uD568\uD558\uB294 Configuration \uD30C\uB77C\uBBF8\uD130\uB4E4 "),E=s("(optional) "),N=n("code",null,"commitment",-1),v=s(": "),R=n("code",null,"string",-1),M=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),L=s("(optional) "),B=n("code",null,"encoding",-1),z=s(": "),x=n("code",null,"string",-1),F=s(" - Account Data\uC5D0 \uB300\uD55C \uC778\uCF54\uB529, either: "),H=n("code",null,"base58",-1),Z=s(", "),Q=n("code",null,"base64",-1),U=s(", or "),W=n("code",null,"jsonParsed",-1),V=s(". \uC8FC\uC758, web3js \uC0AC\uC6A9\uC790\uB294 "),j={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Y=s("getParsedProgramAccounts"),J=s("\uB97C \uC0AC\uC6A9\uD574\uC57C \uD55C\uB2E4."),O=o("
  • (optional) dataSlice: object - \uBC18\uD658\uB418\uB294 Account Data\uC5D0 \uB300\uD55C \uC81C\uD55C \uC124\uC815
    • offset: number - \uBC18\uD658\uC744 \uC2DC\uC791\uD560 Account Data \uBC14\uC774\uD2B8 \uC22B\uC790
    • length: number - \uBC18\uD658\uD560 Account Data\uC758 \uBC14\uC774\uD2B8 \uC218
  • (optional) filters: array - \uC544\uB798\uC758 filter \uAC1D\uCCB4\uB4E4\uC744 \uC0AC\uC6A9\uD558\uB294 Filter \uACB0\uACFC\uB4E4
    • memcmp: object - \uC77C\uB828\uC758 \uBC14\uC774\uD2B8\uC640 Account Data\uC758 \uBE44\uAD50:
      • offset: number - \uBE44\uAD50\uB97C \uC2DC\uC791\uD560 Account Data \uBC14\uC774\uD2B8 \uC22B\uC790
      • bytes: string - \uBE44\uAD50\uD560 Data, 129 bytes \uC81C\uD55C\uB418\uBA70 base58 \uC778\uCF54\uB529 \uB41C \uBB38\uC790\uC5F4
    • dataSize: number - Account Data\uC758 \uAE38\uC774\uC640 \uB370\uC774\uD130 \uC0AC\uC774\uC988\uC758 \uBE44\uAD50
  • ",2),X=s("(optional) "),I=n("code",null,"withContext",-1),$=s(": "),q=n("code",null,"boolean",-1),nn=s(" - \uACB0\uACFC\uB97C \uD3EC\uC7A5\uD560 "),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=s("RpcResponse JSON object"),en=o('
    Response

    getProgramAccounts\uB294 \uAE30\uBCF8\uC801\uC73C\uB85C \uC544\uB798\uC758 \uAD6C\uC870\uB97C \uAC16\uB294 JSON \uAC1D\uCCB4\uB4E4\uC744 \uB2F4\uACE0 \uC788\uB294 \uBC30\uC5F4\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4.

    • pubkey: string - Account pubkey, base58 \uC778\uCF54\uB529 \uB41C \uBB38\uC790\uC5F4
    • account: object - \uC544\uB798\uC758 \uC11C\uBE0C \uC18D\uC131\uB4E4\uC744 \uAC16\uACE0 \uC788\uB294 JSON \uAC1D\uCCB4
      • lamports: number, Account\uC5D0 \uD560\uB2F9\uB41C lamports\uC758 \uC218
      • owner: string, base58 \uC778\uCF54\uB529 \uB418\uC5B4 Account\uC5D0 \uD560\uB2F9\uB41C Program\uC758 pubkey
      • data: string | object - Account\uC640 \uC5F0\uAD00\uB41C \uB370\uC774\uD130, \uC778\uCF54\uB529 \uD30C\uB77C\uBBF8\uD130\uB85C \uB118\uC5B4\uC628 \uAC12\uC5D0 \uB530\uB77C \uC778\uCF54\uB529 \uB41C binary data \uB610\uB294 JSON \uD615\uC2DD
      • executable: boolean, Account\uAC00 Program\uC744 \uD3EC\uD568\uD558\uB294\uC9C0\uC5D0 \uB300\uD55C \uD45C\uC2DC
      • rentEpoch: number, Account\uAC00 rent \uC9C0\uBD88\uD560 \uB2E4\uC74C epoch
    ',3),tn=n("h2",{id:"deep-dive",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),s(" Deep Dive")],-1),cn=n("p",null,[n("code",null,"getProgramAccounts"),s("\uB294 Program\uC774 \uC18C\uC720\uD55C \uBAA8\uB4E0 Account\uB4E4\uC744 \uB9AC\uD134\uD558\uB294 \uB2E4\uC7AC\uB2E4\uB2A5\uD55C RPC method \uC785\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uC544\uB798\uC640 \uAC19\uC774 \uBA87 \uAC00\uC9C0 \uC720\uC6A9\uD55C \uCFFC\uB9AC\uB97C \uC704\uD574 "),n("code",null,"getProgramAccounts"),s("\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.")],-1),on=n("li",null,"\uD2B9\uC815 \uC9C0\uAC11\uC5D0 \uB300\uD55C \uBAA8\uB4E0 Token Account\uB4E4 \uC870\uD68C",-1),ln=s("\uD2B9\uC815 mint\uC5D0 \uB300\uD55C \uBAA8\uB4E0 Token Account\uB4E4 \uC870\uD68C (i.e. All "),pn={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},un=s("SRM"),rn=s(" holders)"),kn=s("\uD2B9\uC815 Program\uC5D0 \uB300\uD55C \uBAA8\uB4E0 custom Account\uB4E4 \uC870\uD68C (i.e. All "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),dn=s(" users)"),fn=o("

    \uC774\uB807\uAC8C \uC720\uC6A9\uD568\uC5D0\uB3C4 \uBD88\uAD6C\uD558\uACE0, getProgramAccounts\uB294 \uD604\uC7AC \uC81C\uC57D\uC0AC\uD56D\uB4E4 \uB54C\uBB38\uC5D0 \uC790\uC8FC \uC624\uD574\uBC1B\uC2B5\uB2C8\uB2E4. getProgramAccounts\uC5D0 \uC758\uD574 \uC9C0\uC6D0\uB418\uB294 \uB9CE\uC740 \uCFFC\uB9AC\uB4E4\uC740 \uB300\uB7C9\uC758 \uB370\uC774\uD130 \uC14B\uC744 \uC2A4\uCE94\uD558\uAE30 \uC704\uD574 RPC \uB178\uB4DC\uB4E4\uC744 \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC774\uB7F0 \uC2A4\uCE94 \uC791\uC5C5\uB4E4\uC740 \uBA54\uBAA8\uB9AC\uC640 \uC790\uC6D0 \uC9D1\uC911\uC801\uC774\uB2E4. \uACB0\uACFC\uC801\uC73C\uB85C, \uB108\uBB34 \uC790\uC8FC \uD639\uC740 \uB108\uBB34 \uD06C\uAC8C \uD638\uCD9C\uD558\uB294 \uAC83\uC740 connection timeout\uC744 \uC57C\uAE30\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBFD0\uB9CC \uC544\uB2C8\uB77C, \uC774 \uAE00\uC744 \uC4F0\uB294 \uC2DC\uC810\uC5D0\uB294, getProgramAccounts\uC758 endpoint\uB294 pagination\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uCFFC\uB9AC\uC758 \uACB0\uACFC\uAC00 \uB108\uBB34 \uD06C\uB2E4\uBA74, \uC751\uB2F5 \uAC12\uC740 \uC798\uB9B4 \uAC83\uC785\uB2C8\uB2E4.

    \uD604\uC7AC\uC758 \uC774\uB7F0 \uC81C\uC57D\uC0AC\uD56D\uB4E4\uC744 \uD53C\uD558\uAE30 \uC704\uD574\uC11C, getProgramAccounts\uB294 \uBA87 \uAC00\uC9C0 \uC720\uC6A9\uD55C \uD30C\uB77C\uBBF8\uD130\uB4E4\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4: dataSlice, filters, memcpm \uADF8\uB9AC\uACE0 dataSize. \uC774 \uD30C\uB77C\uBBF8\uD130\uB4E4\uC744 \uC870\uD569\uD574 \uC778\uC790\uB85C \uB118\uAE40\uC73C\uB85C\uC368, \uC6B0\uB9AC\uAC00 \uCFFC\uB9AC \uD560 \uC601\uC5ED\uC744 \uAD00\uB9AC \uAC00\uB2A5\uD558\uACE0 \uC608\uCE21 \uAC00\uB2A5\uD55C \uD06C\uAE30\uB85C \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    ",2),_n=n("code",null,"getProgramAccounts",-1),gn=s("\uC758 \uD754\uD55C \uC608\uC81C\uB294 "),hn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("SPL-Token Program"),An=s("\uACFC \uD1B5\uC2E0\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. "),wn=s("basic call"),Pn=s("\uC744 \uAC00\uC9C0\uACE0 Token Program\uC774 \uC18C\uC720\uD55C \uBAA8\uB4E0 Account\uB97C \uC694\uCCAD\uD558\uB294 \uAC83\uC740 \uB9C9\uB300\uD55C \uC591\uC758 \uB370\uC774\uD130\uB97C \uD638\uCD9C\uD558\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098, \uD30C\uB77C\uBBF8\uD130\uB4E4\uC744 \uC774\uC6A9\uD568\uC73C\uB85C\uC368 \uC6B0\uB9AC\uB294 \uD6A8\uACFC\uC801\uC73C\uB85C \uC6B0\uB9AC\uAC00 \uC0AC\uC6A9\uD558\uACE0\uC790 \uD558\uB294 \uB370\uC774\uD130\uB9CC \uC694\uCCAD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Tn=o('

    filters

    getProgramAccounts\uB97C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD55C \uAC00\uC7A5 \uD754\uD55C \uD30C\uB77C\uBBF8\uD130\uB294 filters array\uB2E4. \uC774 array\uC5D0\uB294 dataSize\uC640 memcmp \uB450 \uAC00\uC9C0 \uD0C0\uC785\uC758 \uD544\uD130\uAC00 \uB4E4\uC5B4\uAC08 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uD544\uD130\uB4E4\uC744 \uC774\uC6A9\uD558\uAE30 \uC804\uC5D0, \uC6B0\uB9AC\uAC00 \uC694\uCCAD\uD558\uACE0 \uC788\uB294 \uB370\uC774\uD130\uB4E4\uC774 \uC5B4\uB5BB\uAC8C \uB193\uC5EC\uC788\uACE0 \uC9C1\uB82C\uD654\uB418\uB294\uC9C0\uC5D0 \uB300\uD574 \uC775\uC219\uD574\uC838\uC57C \uD569\uB2C8\uB2E4.

    dataSize

    ',3),Cn=s("Token Program\uC758 \uACBD\uC6B0, \uC6B0\uB9AC\uB294 "),Dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Sn=s("Token Account\uAC00 165 bytes\uC758 \uAE38\uC774"),En=s("\uB97C \uAC00\uC9C4\uB2E4\uB294 \uAC83\uC744 \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAD6C\uCCB4\uC801\uC73C\uB85C, Token Account\uB294 \uAC01\uAC01 \uC608\uCE21 \uAC00\uB2A5\uD55C bytes \uC218\uB97C \uC694\uAD6C\uD558\uB294 8\uAC1C\uC758 \uB2E4\uB978 \uD544\uB4DC\uB4E4\uC744 \uAC00\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uC544\uB798\uC758 \uADF8\uB9BC\uC744 \uD1B5\uD574 \uC774 \uB370\uC774\uD130\uAC00 \uC5B4\uB5BB\uAC8C \uB193\uC5EC\uC788\uB294\uC9C0 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Nn=o('

    Account Size

    \uB9CC\uC57D \uC6B0\uB9AC\uAC00 \uC6B0\uB9AC\uC758 \uC9C0\uAC11 Address\uAC00 \uC18C\uC720\uD55C \uBAA8\uB4E0 Token Account\uB4E4\uC744 \uC54C\uACE0 \uC2F6\uB2E4\uBA74, \uC6B0\uB9AC\uB294 \uC815\uD655\uD788 165 bytes \uAE38\uC774\uC778 Account\uB4E4\uC5D0 \uB300\uD574 \uCFFC\uB9AC \uC601\uC5ED\uC744 \uC881\uAC8C \uB9CC\uB4DC\uB294 { dataSize: 165 }\uB97C filters array\uC5D0 \uCD94\uAC00\uD560 \uC218 \uC788\uC744 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774\uAC83\uB9CC\uC73C\uB85C\uB294 \uCDA9\uBD84\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uB610\uD55C \uC6B0\uB9AC\uC758 Addres\uAC00 \uC18C\uC720\uD55C Account\uB4E4\uC744 \uCC3E\uB294 \uD544\uD130\uB97C \uCD94\uAC00\uD560 \uD544\uC694\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uC774\uAC83\uC744 memcmp \uD544\uD130\uB97C \uD1B5\uD574 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    memcmp

    memcmp \uD544\uD130 \uD639\uC740 "\uBA54\uBAA8\uB9AC \uBE44\uAD50" \uD544\uD130\uB294 \uC6B0\uB9AC\uC758 Account\uC5D0 \uC800\uC7A5\uB41C \uC5B4\uB5A4 \uC18D\uC131\uC5D0 \uC788\uB294 \uB370\uC774\uD130\uB97C \uBE44\uAD50\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4. \uAD6C\uCCB4\uC801\uC73C\uB85C, \uC6B0\uB9AC\uB294 \uD2B9\uC815 \uD3EC\uC9C0\uC158\uC5D0 \uC788\uB294 \uD2B9\uC815 bytes \uC9D1\uD569\uC5D0 \uB9DE\uCDB0 Account\uB4E4\uC744 \uC9C8\uC758\uD560 \uC218 \uC788\uB2E4. memcmp\uB294 \uB450 \uAC00\uC9C0 \uC778\uC790\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4:

    • offset: \uB370\uC774\uD130 \uBE44\uAD50\uB97C \uC2DC\uC791\uD560 \uC704\uCE58. \uC774 \uC704\uCE58\uB294 bytes\uB85C \uCE21\uC815\uB418\uBA70 integer\uB85C \uD45C\uD604\uB429\uB2C8\uB2E4.
    • bytes: Account\uC758 \uB370\uC774\uD130\uC640 \uB9E4\uCE6D \uB418\uC5B4\uC57C \uD558\uB294 \uB370\uC774\uD130. \uC774\uAC83\uC740 base-58\uB85C \uC778\uCF54\uB529 \uB41C \uBB38\uC790\uC5F4\uB85C \uD45C\uD604\uB418\uBA70 129 bytes \uC774\uD558\uB85C \uC81C\uD55C\uB429\uB2C8\uB2E4.

    memcmp\uB294 bytes\uAC00 \uC815\uD655\uD788 \uB9E4\uCE6D \uB41C \uACBD\uC6B0\uC5D0\uB9CC \uACB0\uACFC\uB97C \uBC18\uD658\uD55C\uB2E4\uB294 \uC0AC\uC2E4\uC744 \uC544\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4. \uD604\uC7AC, \uC6B0\uB9AC\uAC00 \uC81C\uACF5\uD560 bytes\uBCF4\uB2E4 \uD06C\uAC70\uB098 \uC791\uC740 \uAC12\uC5D0 \uB300\uD55C \uBE44\uAD50\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.

    Token Program \uC608\uC81C\uC640 \uD568\uAED8 \uACC4\uC18D\uD574\uC11C, \uC6B0\uB9AC\uB294 \uC6B0\uB9AC\uC758 \uC9C0\uAC11 Address\uAC00 \uC18C\uC720\uD55C Token Account\uB4E4\uB9CC \uBC18\uD658\uD558\uB3C4\uB85D \uCFFC\uB9AC\uB97C \uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4. Token Account\uB97C \uBD24\uC744 \uB54C, \uC6B0\uB9AC\uB294 Token Account\uC5D0 \uC800\uC7A5\uB41C \uCC98\uC74C \uB450 \uD544\uB4DC\uAC00 \uBAA8\uB450 pubkey\uB77C\uB294 \uAC83\uACFC, \uAC01 pubkey\uB294 32 bytes \uAE38\uC774\uC778 \uAC83\uC744 \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4. owner\uAC00 \uB450 \uBC88\uC9F8 \uD544\uB4DC\uC778 \uAC83\uC744 \uACE0\uB824\uD558\uBA74, \uC6B0\uB9AC\uB294 memcmp\uB97C offset 32 bytes\uC5D0\uC11C \uC2DC\uC791\uD574\uC57C\uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C\uBD80\uD130, \uC6B0\uB9AC\uB294 owner \uD544\uB4DC\uAC00 \uC6B0\uB9AC\uC758 \uC9C0\uAC11 Address\uC640 \uB9E4\uCE6D\uB418\uB294 Account\uB4E4\uC744 \uCC3E\uC744 \uAC83\uC785\uB2C8\uB2E4.

    Account Size

    \uC6B0\uB9AC\uB294 \uC544\uB798\uC758 \uC608\uC81C\uB97C \uD1B5\uD574 \uC774 \uCFFC\uB9AC\uB97C \uD638\uCD9C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    ',9),vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as k,a as n,b as a,w as t,F as m,d as s,e as o}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},_=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("RPC method\uB294 \uD504\uB85C\uADF8\uB7A8\uC5D0 \uC758\uD574 \uC18C\uC720\uB41C \uBAA8\uB4E0 Account\uB4E4\uC744 \uBC18\uD658\uD55C\uB2E4. \uD604\uC7AC pagination\uC740 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "),n("code",null,"getProgramAccounts"),s(" \uC694\uCCAD\uC740 \uC751\uB2F5 \uC2DC\uAC04\uC744 \uD5A5\uC0C1\uC2DC\uD0A4\uACE0 \uC758\uB3C4\uB41C \uACB0\uACFC\uB9CC\uC744 \uBC18\uD658\uD558\uAE30 \uC704\uD574 "),n("code",null,"dataSlice"),s(" \uADF8\uB9AC\uACE0/\uB610\uB294 "),n("code",null,"filters"),s(" \uD30C\uB77C\uBBF8\uD130\uB97C \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4.")],-1),h=n("h2",{id:"facts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),s(" Facts")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Parameters",-1),w=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - \uC9C8\uC758\uD560 Program\uC758 Pubkey, base58 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4")],-1),P=s("(optional) "),T=n("code",null,"configOrCommitment",-1),C=s(": "),D=n("code",null,"object",-1),S=s(" - \uC544\uB798\uC758 optional field\uB4E4\uC744 \uD3EC\uD568\uD558\uB294 Configuration \uD30C\uB77C\uBBF8\uD130\uB4E4 "),E=s("(optional) "),N=n("code",null,"commitment",-1),v=s(": "),R=n("code",null,"string",-1),M=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),L=s("(optional) "),B=n("code",null,"encoding",-1),z=s(": "),x=n("code",null,"string",-1),F=s(" - Account Data\uC5D0 \uB300\uD55C \uC778\uCF54\uB529, either: "),H=n("code",null,"base58",-1),Z=s(", "),Q=n("code",null,"base64",-1),U=s(", or "),W=n("code",null,"jsonParsed",-1),V=s(". \uC8FC\uC758, web3js \uC0AC\uC6A9\uC790\uB294 "),j={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},Y=s("getParsedProgramAccounts"),J=s("\uB97C \uC0AC\uC6A9\uD574\uC57C \uD55C\uB2E4."),O=o("
  • (optional) dataSlice: object - \uBC18\uD658\uB418\uB294 Account Data\uC5D0 \uB300\uD55C \uC81C\uD55C \uC124\uC815
    • offset: number - \uBC18\uD658\uC744 \uC2DC\uC791\uD560 Account Data \uBC14\uC774\uD2B8 \uC22B\uC790
    • length: number - \uBC18\uD658\uD560 Account Data\uC758 \uBC14\uC774\uD2B8 \uC218
  • (optional) filters: array - \uC544\uB798\uC758 filter \uAC1D\uCCB4\uB4E4\uC744 \uC0AC\uC6A9\uD558\uB294 Filter \uACB0\uACFC\uB4E4
    • memcmp: object - \uC77C\uB828\uC758 \uBC14\uC774\uD2B8\uC640 Account Data\uC758 \uBE44\uAD50:
      • offset: number - \uBE44\uAD50\uB97C \uC2DC\uC791\uD560 Account Data \uBC14\uC774\uD2B8 \uC22B\uC790
      • bytes: string - \uBE44\uAD50\uD560 Data, 129 bytes \uC81C\uD55C\uB418\uBA70 base58 \uC778\uCF54\uB529 \uB41C \uBB38\uC790\uC5F4
    • dataSize: number - Account Data\uC758 \uAE38\uC774\uC640 \uB370\uC774\uD130 \uC0AC\uC774\uC988\uC758 \uBE44\uAD50
  • ",2),X=s("(optional) "),I=n("code",null,"withContext",-1),$=s(": "),q=n("code",null,"boolean",-1),nn=s(" - \uACB0\uACFC\uB97C \uD3EC\uC7A5\uD560 "),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=s("RpcResponse JSON object"),en=o('
    Response

    getProgramAccounts\uB294 \uAE30\uBCF8\uC801\uC73C\uB85C \uC544\uB798\uC758 \uAD6C\uC870\uB97C \uAC16\uB294 JSON \uAC1D\uCCB4\uB4E4\uC744 \uB2F4\uACE0 \uC788\uB294 \uBC30\uC5F4\uC744 \uBC18\uD658\uD569\uB2C8\uB2E4.

    • pubkey: string - Account pubkey, base58 \uC778\uCF54\uB529 \uB41C \uBB38\uC790\uC5F4
    • account: object - \uC544\uB798\uC758 \uC11C\uBE0C \uC18D\uC131\uB4E4\uC744 \uAC16\uACE0 \uC788\uB294 JSON \uAC1D\uCCB4
      • lamports: number, Account\uC5D0 \uD560\uB2F9\uB41C lamports\uC758 \uC218
      • owner: string, base58 \uC778\uCF54\uB529 \uB418\uC5B4 Account\uC5D0 \uD560\uB2F9\uB41C Program\uC758 pubkey
      • data: string | object - Account\uC640 \uC5F0\uAD00\uB41C \uB370\uC774\uD130, \uC778\uCF54\uB529 \uD30C\uB77C\uBBF8\uD130\uB85C \uB118\uC5B4\uC628 \uAC12\uC5D0 \uB530\uB77C \uC778\uCF54\uB529 \uB41C binary data \uB610\uB294 JSON \uD615\uC2DD
      • executable: boolean, Account\uAC00 Program\uC744 \uD3EC\uD568\uD558\uB294\uC9C0\uC5D0 \uB300\uD55C \uD45C\uC2DC
      • rentEpoch: number, Account\uAC00 rent \uC9C0\uBD88\uD560 \uB2E4\uC74C epoch
    ',3),tn=n("h2",{id:"deep-dive",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),s(" Deep Dive")],-1),cn=n("p",null,[n("code",null,"getProgramAccounts"),s("\uB294 Program\uC774 \uC18C\uC720\uD55C \uBAA8\uB4E0 Account\uB4E4\uC744 \uB9AC\uD134\uD558\uB294 \uB2E4\uC7AC\uB2E4\uB2A5\uD55C RPC method \uC785\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uC544\uB798\uC640 \uAC19\uC774 \uBA87 \uAC00\uC9C0 \uC720\uC6A9\uD55C \uCFFC\uB9AC\uB97C \uC704\uD574 "),n("code",null,"getProgramAccounts"),s("\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.")],-1),on=n("li",null,"\uD2B9\uC815 \uC9C0\uAC11\uC5D0 \uB300\uD55C \uBAA8\uB4E0 Token Account\uB4E4 \uC870\uD68C",-1),ln=s("\uD2B9\uC815 mint\uC5D0 \uB300\uD55C \uBAA8\uB4E0 Token Account\uB4E4 \uC870\uD68C (i.e. All "),pn={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},un=s("SRM"),rn=s(" holders)"),kn=s("\uD2B9\uC815 Program\uC5D0 \uB300\uD55C \uBAA8\uB4E0 custom Account\uB4E4 \uC870\uD68C (i.e. All "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),dn=s(" users)"),fn=o("

    \uC774\uB807\uAC8C \uC720\uC6A9\uD568\uC5D0\uB3C4 \uBD88\uAD6C\uD558\uACE0, getProgramAccounts\uB294 \uD604\uC7AC \uC81C\uC57D\uC0AC\uD56D\uB4E4 \uB54C\uBB38\uC5D0 \uC790\uC8FC \uC624\uD574\uBC1B\uC2B5\uB2C8\uB2E4. getProgramAccounts\uC5D0 \uC758\uD574 \uC9C0\uC6D0\uB418\uB294 \uB9CE\uC740 \uCFFC\uB9AC\uB4E4\uC740 \uB300\uB7C9\uC758 \uB370\uC774\uD130 \uC14B\uC744 \uC2A4\uCE94\uD558\uAE30 \uC704\uD574 RPC \uB178\uB4DC\uB4E4\uC744 \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC774\uB7F0 \uC2A4\uCE94 \uC791\uC5C5\uB4E4\uC740 \uBA54\uBAA8\uB9AC\uC640 \uC790\uC6D0 \uC9D1\uC911\uC801\uC774\uB2E4. \uACB0\uACFC\uC801\uC73C\uB85C, \uB108\uBB34 \uC790\uC8FC \uD639\uC740 \uB108\uBB34 \uD06C\uAC8C \uD638\uCD9C\uD558\uB294 \uAC83\uC740 connection timeout\uC744 \uC57C\uAE30\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBFD0\uB9CC \uC544\uB2C8\uB77C, \uC774 \uAE00\uC744 \uC4F0\uB294 \uC2DC\uC810\uC5D0\uB294, getProgramAccounts\uC758 endpoint\uB294 pagination\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uCFFC\uB9AC\uC758 \uACB0\uACFC\uAC00 \uB108\uBB34 \uD06C\uB2E4\uBA74, \uC751\uB2F5 \uAC12\uC740 \uC798\uB9B4 \uAC83\uC785\uB2C8\uB2E4.

    \uD604\uC7AC\uC758 \uC774\uB7F0 \uC81C\uC57D\uC0AC\uD56D\uB4E4\uC744 \uD53C\uD558\uAE30 \uC704\uD574\uC11C, getProgramAccounts\uB294 \uBA87 \uAC00\uC9C0 \uC720\uC6A9\uD55C \uD30C\uB77C\uBBF8\uD130\uB4E4\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4: dataSlice, filters, memcpm \uADF8\uB9AC\uACE0 dataSize. \uC774 \uD30C\uB77C\uBBF8\uD130\uB4E4\uC744 \uC870\uD569\uD574 \uC778\uC790\uB85C \uB118\uAE40\uC73C\uB85C\uC368, \uC6B0\uB9AC\uAC00 \uCFFC\uB9AC \uD560 \uC601\uC5ED\uC744 \uAD00\uB9AC \uAC00\uB2A5\uD558\uACE0 \uC608\uCE21 \uAC00\uB2A5\uD55C \uD06C\uAE30\uB85C \uC904\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    ",2),_n=n("code",null,"getProgramAccounts",-1),gn=s("\uC758 \uD754\uD55C \uC608\uC81C\uB294 "),hn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("SPL-Token Program"),An=s("\uACFC \uD1B5\uC2E0\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. "),wn=s("basic call"),Pn=s("\uC744 \uAC00\uC9C0\uACE0 Token Program\uC774 \uC18C\uC720\uD55C \uBAA8\uB4E0 Account\uB97C \uC694\uCCAD\uD558\uB294 \uAC83\uC740 \uB9C9\uB300\uD55C \uC591\uC758 \uB370\uC774\uD130\uB97C \uD638\uCD9C\uD558\uAC8C \uB420 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098, \uD30C\uB77C\uBBF8\uD130\uB4E4\uC744 \uC774\uC6A9\uD568\uC73C\uB85C\uC368 \uC6B0\uB9AC\uB294 \uD6A8\uACFC\uC801\uC73C\uB85C \uC6B0\uB9AC\uAC00 \uC0AC\uC6A9\uD558\uACE0\uC790 \uD558\uB294 \uB370\uC774\uD130\uB9CC \uC694\uCCAD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Tn=o('

    filters

    getProgramAccounts\uB97C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD55C \uAC00\uC7A5 \uD754\uD55C \uD30C\uB77C\uBBF8\uD130\uB294 filters array\uB2E4. \uC774 array\uC5D0\uB294 dataSize\uC640 memcmp \uB450 \uAC00\uC9C0 \uD0C0\uC785\uC758 \uD544\uD130\uAC00 \uB4E4\uC5B4\uAC08 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uD544\uD130\uB4E4\uC744 \uC774\uC6A9\uD558\uAE30 \uC804\uC5D0, \uC6B0\uB9AC\uAC00 \uC694\uCCAD\uD558\uACE0 \uC788\uB294 \uB370\uC774\uD130\uB4E4\uC774 \uC5B4\uB5BB\uAC8C \uB193\uC5EC\uC788\uACE0 \uC9C1\uB82C\uD654\uB418\uB294\uC9C0\uC5D0 \uB300\uD574 \uC775\uC219\uD574\uC838\uC57C \uD569\uB2C8\uB2E4.

    dataSize

    ',3),Cn=s("Token Program\uC758 \uACBD\uC6B0, \uC6B0\uB9AC\uB294 "),Dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Sn=s("Token Account\uAC00 165 bytes\uC758 \uAE38\uC774"),En=s("\uB97C \uAC00\uC9C4\uB2E4\uB294 \uAC83\uC744 \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAD6C\uCCB4\uC801\uC73C\uB85C, Token Account\uB294 \uAC01\uAC01 \uC608\uCE21 \uAC00\uB2A5\uD55C bytes \uC218\uB97C \uC694\uAD6C\uD558\uB294 8\uAC1C\uC758 \uB2E4\uB978 \uD544\uB4DC\uB4E4\uC744 \uAC00\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uC544\uB798\uC758 \uADF8\uB9BC\uC744 \uD1B5\uD574 \uC774 \uB370\uC774\uD130\uAC00 \uC5B4\uB5BB\uAC8C \uB193\uC5EC\uC788\uB294\uC9C0 \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Nn=o('

    Account Size

    \uB9CC\uC57D \uC6B0\uB9AC\uAC00 \uC6B0\uB9AC\uC758 \uC9C0\uAC11 Address\uAC00 \uC18C\uC720\uD55C \uBAA8\uB4E0 Token Account\uB4E4\uC744 \uC54C\uACE0 \uC2F6\uB2E4\uBA74, \uC6B0\uB9AC\uB294 \uC815\uD655\uD788 165 bytes \uAE38\uC774\uC778 Account\uB4E4\uC5D0 \uB300\uD574 \uCFFC\uB9AC \uC601\uC5ED\uC744 \uC881\uAC8C \uB9CC\uB4DC\uB294 { dataSize: 165 }\uB97C filters array\uC5D0 \uCD94\uAC00\uD560 \uC218 \uC788\uC744 \uAC83\uC785\uB2C8\uB2E4. \uADF8\uB7EC\uB098 \uC774\uAC83\uB9CC\uC73C\uB85C\uB294 \uCDA9\uBD84\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uB610\uD55C \uC6B0\uB9AC\uC758 Addres\uAC00 \uC18C\uC720\uD55C Account\uB4E4\uC744 \uCC3E\uB294 \uD544\uD130\uB97C \uCD94\uAC00\uD560 \uD544\uC694\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 \uC774\uAC83\uC744 memcmp \uD544\uD130\uB97C \uD1B5\uD574 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    memcmp

    memcmp \uD544\uD130 \uD639\uC740 "\uBA54\uBAA8\uB9AC \uBE44\uAD50" \uD544\uD130\uB294 \uC6B0\uB9AC\uC758 Account\uC5D0 \uC800\uC7A5\uB41C \uC5B4\uB5A4 \uC18D\uC131\uC5D0 \uC788\uB294 \uB370\uC774\uD130\uB97C \uBE44\uAD50\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4. \uAD6C\uCCB4\uC801\uC73C\uB85C, \uC6B0\uB9AC\uB294 \uD2B9\uC815 \uD3EC\uC9C0\uC158\uC5D0 \uC788\uB294 \uD2B9\uC815 bytes \uC9D1\uD569\uC5D0 \uB9DE\uCDB0 Account\uB4E4\uC744 \uC9C8\uC758\uD560 \uC218 \uC788\uB2E4. memcmp\uB294 \uB450 \uAC00\uC9C0 \uC778\uC790\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4:

    • offset: \uB370\uC774\uD130 \uBE44\uAD50\uB97C \uC2DC\uC791\uD560 \uC704\uCE58. \uC774 \uC704\uCE58\uB294 bytes\uB85C \uCE21\uC815\uB418\uBA70 integer\uB85C \uD45C\uD604\uB429\uB2C8\uB2E4.
    • bytes: Account\uC758 \uB370\uC774\uD130\uC640 \uB9E4\uCE6D \uB418\uC5B4\uC57C \uD558\uB294 \uB370\uC774\uD130. \uC774\uAC83\uC740 base-58\uB85C \uC778\uCF54\uB529 \uB41C \uBB38\uC790\uC5F4\uB85C \uD45C\uD604\uB418\uBA70 129 bytes \uC774\uD558\uB85C \uC81C\uD55C\uB429\uB2C8\uB2E4.

    memcmp\uB294 bytes\uAC00 \uC815\uD655\uD788 \uB9E4\uCE6D \uB41C \uACBD\uC6B0\uC5D0\uB9CC \uACB0\uACFC\uB97C \uBC18\uD658\uD55C\uB2E4\uB294 \uC0AC\uC2E4\uC744 \uC544\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4. \uD604\uC7AC, \uC6B0\uB9AC\uAC00 \uC81C\uACF5\uD560 bytes\uBCF4\uB2E4 \uD06C\uAC70\uB098 \uC791\uC740 \uAC12\uC5D0 \uB300\uD55C \uBE44\uAD50\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.

    Token Program \uC608\uC81C\uC640 \uD568\uAED8 \uACC4\uC18D\uD574\uC11C, \uC6B0\uB9AC\uB294 \uC6B0\uB9AC\uC758 \uC9C0\uAC11 Address\uAC00 \uC18C\uC720\uD55C Token Account\uB4E4\uB9CC \uBC18\uD658\uD558\uB3C4\uB85D \uCFFC\uB9AC\uB97C \uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4. Token Account\uB97C \uBD24\uC744 \uB54C, \uC6B0\uB9AC\uB294 Token Account\uC5D0 \uC800\uC7A5\uB41C \uCC98\uC74C \uB450 \uD544\uB4DC\uAC00 \uBAA8\uB450 pubkey\uB77C\uB294 \uAC83\uACFC, \uAC01 pubkey\uB294 32 bytes \uAE38\uC774\uC778 \uAC83\uC744 \uC54C \uC218 \uC788\uC2B5\uB2C8\uB2E4. owner\uAC00 \uB450 \uBC88\uC9F8 \uD544\uB4DC\uC778 \uAC83\uC744 \uACE0\uB824\uD558\uBA74, \uC6B0\uB9AC\uB294 memcmp\uB97C offset 32 bytes\uC5D0\uC11C \uC2DC\uC791\uD574\uC57C\uD569\uB2C8\uB2E4. \uC5EC\uAE30\uC11C\uBD80\uD130, \uC6B0\uB9AC\uB294 owner \uD544\uB4DC\uAC00 \uC6B0\uB9AC\uC758 \uC9C0\uAC11 Address\uC640 \uB9E4\uCE6D\uB418\uB294 Account\uB4E4\uC744 \uCC3E\uC744 \uAC83\uC785\uB2C8\uB2E4.

    Account Size

    \uC6B0\uB9AC\uB294 \uC544\uB798\uC758 \uC608\uC81C\uB97C \uD1B5\uD574 \uC774 \uCFFC\uB9AC\uB97C \uD638\uCD9C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    ',9),vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.beec38ff.js b/docs/.vuepress/dist/assets/get-program-accounts.html.39cc5e4a.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.beec38ff.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.39cc5e4a.js index 43d39dbff..15b2a12dc 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.beec38ff.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.39cc5e4a.js @@ -1,4 +1,4 @@ -import{_ as c,r as o,o as l,c as i,a as n,b as s,w as r,F as u,d as a,e as t}from"./app.07ce7a66.js";var d="/assets/account-size.398f17bf.png",k="/assets/memcmp.c5e1f050.png";const b={},m=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),a(" Get Program Accounts")],-1),g=n("p",null,"Bir program\u0131n sahip oldu\u011Fu t\xFCm account'lar\u0131 d\xF6nd\xFCren bir RPC y\xF6ntemidir. \u015Eu anda pagination desteklenmemektedir. getProgramAccounts requests, yan\u0131t s\xFCresini iyile\u015Ftirmek ve yaln\u0131zca ama\xE7lanan sonu\xE7lar\u0131 d\xF6nd\xFCrmek i\xE7in dataSlice ve/veya filters parametrelerini i\xE7ermelidir.",-1),h=n("h2",{id:"facts-ozet-bilgiler",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts-ozet-bilgiler","aria-hidden":"true"},"#"),a(" Facts (\xD6zet Bilgiler)")],-1),_=n("p",null,":::Parametreler",-1),y=n("li",null,[n("code",null,"programId"),a(": "),n("code",null,"string"),a(" - Sorgulanacak program\u0131n public key\u2019i, base58 kodlu bir string olarak sa\u011Flan\u0131r")],-1),f=a("(iste\u011Fe ba\u011Fl\u0131) "),z=n("code",null,"configOrCommitment",-1),v=a(": "),A=n("code",null,"object",-1),P=a(" - A\u015Fa\u011F\u0131daki iste\u011Fe ba\u011Fl\u0131 alanlar\u0131 i\xE7eren yap\u0131land\u0131rma parametreleri: "),w=a("(iste\u011Fe ba\u011Fl\u0131) "),S=n("code",null,"commitment",-1),q=a(": "),B=n("code",null,"string",-1),D=a(" - "),T={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},E=a("Durum Taahh\xFCd\xFC"),K=a("(iste\u011Fe ba\u011Fl\u0131) "),N=n("code",null,"encoding",-1),C=a(": "),x=n("code",null,"string",-1),R=a(" - Account verileri i\xE7in encode: base58, base64 veya jsonParsed\u2019d\u0131r. Web3js kullan\u0131c\u0131lar\u0131n\u0131n bunun yerine "),M={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},L=a("getParsedProgramAccounts"),G=a(" kullanmas\u0131 gerekti\u011Fini unutmay\u0131n."),O=t("
  • (iste\u011Fe ba\u011Fl\u0131) dataSlice: object - Geri d\xF6nd\xFCr\xFClen account verilerini a\u015Fa\u011F\u0131dakilere g\xF6re s\u0131n\u0131rlay\u0131n:
    • offset: number - Geri d\xF6nd\xFCrmeye ba\u015Flamak i\xE7in account verisindeki bayt say\u0131s\u0131
    • length: number - Geri d\xF6nd\xFCr\xFClecek account verilerinin bayt say\u0131s\u0131
  • (iste\u011Fe ba\u011Fl\u0131) filters: array - A\u015Fa\u011F\u0131daki filters nesnelerini kullanarak sonu\xE7lar\u0131 filtreleyin:
    • memcmp: object - Bir dizi bayt\u0131 account verileriyle e\u015Fle\u015Ftirin:
      • offset: number - Kar\u015F\u0131la\u015Ft\u0131rmaya ba\u015Flamak i\xE7in account verilerinin bayt say\u0131s\u0131
      • bytes: string - 129 bayt ile s\u0131n\u0131rl\u0131 base58 kodlu string olarak e\u015Fle\u015Fecek veriler
    • dataSize: number - Account data uzunlu\u011Funu sa\u011Flanan veri boyutuyla kar\u015F\u0131la\u015Ft\u0131r\u0131r
  • ",2),j=a("(iste\u011Fe ba\u011Fl\u0131) "),H=n("code",null,"withContext",-1),V=a(": "),Y=n("code",null,"boolean",-1),F=a(" - Sonucu bir "),U={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},I=a("RpcResponse JSON nesnesine sarmalay\u0131n"),W=t('
    Response

    Varsay\u0131lan olarak getProgramAccounts, a\u015Fa\u011F\u0131daki yap\u0131ya sahip bir dizi JSON nesnesi d\xF6nd\xFCr\xFCr:

    • pubkey: string - Base58 kodlu bir string olarak account'\u0131n pubkeyi
    • account: object - a\u015Fa\u011F\u0131daki alt alanlara sahip bir JSON nesnesi:
    • lamports: number, account'a atanan lamport say\u0131s\u0131
    • owner: string, Hesab\u0131n atand\u0131\u011F\u0131 program\u0131n base58 kodlu yay\u0131n anahtar\u0131
    • data: string | object - account'la ili\u015Fkili veriler, sa\u011Flanan kodlama parametresine ba\u011Fl\u0131 olarak kodlanm\u0131\u015F binary data veya JSON format\u0131d\u0131r
    • executable: boolean, Hesap bir program i\xE7erp i\xE7ermedi\u011Finin g\xF6stergesi
    • rentEpoch: number, Bu account'\u0131n bir sonraki rent borcunun olaca\u011F\u0131 epoch :::

    Deep Dive (Derinlemesine Bak\u0131\u015F)

    getProgramAccounts, bir program\u0131n sahip oldu\u011Fu t\xFCm account'lar\u0131 d\xF6nd\xFCren \xE7ok y\xF6nl\xFC bir RPC methodudur. getProgramAccounts'u a\u015Fa\u011F\u0131dakileri bulmak gibi bir dizi yararl\u0131 sorgu i\xE7in kullanabiliriz:

    ',5),Z=n("li",null,"Belirli bir c\xFCzdan i\xE7in t\xFCm token account'lar\u0131",-1),J=a("Belirli bir mint i\xE7in t\xFCm token account'lar\u0131 (t\xFCm "),$={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},Q=a("SRM"),X=a(" sahipleri)"),nn=a("Belirli bir program i\xE7in t\xFCm private account'lar (t\xFCm "),an={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},sn=a("Mango"),en=a(" kullan\u0131c\u0131lar\u0131)"),tn=t("

    Kullan\u0131\u015Fl\u0131l\u0131\u011F\u0131na ra\u011Fmen, getProgramAccounts, mevcut k\u0131s\u0131tlamalar\u0131 nedeniyle genellikle yanl\u0131\u015F anla\u015F\u0131l\u0131r. getProgramAccounts taraf\u0131ndan desteklenen sorgular\u0131n \xE7o\u011Fu, b\xFCy\xFCk veri k\xFCmelerini taramak i\xE7in RPC node\u2019lar\u0131n\u0131 gerektirir. Bu taramalar hem bellek hem de kaynak yo\u011Fundur. Sonu\xE7 olarak, \xE7ok s\u0131k veya \xE7ok geni\u015F kapsaml\u0131 \xE7a\u011Fr\u0131lar ba\u011Flant\u0131 zaman a\u015F\u0131mlar\u0131na neden olabilir. Ayr\u0131ca, bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 s\u0131rada getProgramAccounts u\xE7 noktas\u0131 sayfaland\u0131rmay\u0131 desteklemez. Bir sorgunun sonu\xE7lar\u0131 \xE7ok b\xFCy\xFCkse, yan\u0131t kesilecektir.

    Bu mevcut k\u0131s\u0131tlamalar\u0131 a\u015Fmak i\xE7in getProgramAccounts bir dizi faydal\u0131 parametre sunar: dataSlice, memcmp ve dataSize, filters se\xE7enekleri. Bu parametrelerin kombinasyonlar\u0131n\u0131 sa\u011Flayarak sorgular\u0131m\u0131z\u0131n kapsam\u0131n\u0131 y\xF6netilebilir ve \xF6ng\xF6r\xFClebilir boyutlara indirebiliriz.

    ",2),on=a("Yayg\u0131n bir "),pn=n("code",null,"getProgramAccounts",-1),cn=a(" \xF6rne\u011Fi, "),ln={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},rn=a("SPL-Token Program\u0131"),un=a(" ile etkile\u015Fimi i\xE7erir. Token Program\u0131n\u0131n sahip oldu\u011Fu t\xFCm account'lar\u0131 bir "),dn=a("basic call"),kn=a(" ile request etmek, \xE7ok b\xFCy\xFCk miktarda veri gerektirecektir. Ancak parametreleri sa\u011Flayarak, yaln\u0131zca kullanmay\u0131 d\xFC\u015F\xFCnd\xFC\u011F\xFCm\xFCz verileri verimli bir \u015Fekilde request edebiliriz."),bn=t('

    filters

    getProgramAccounts ile kullan\u0131lacak en yayg\u0131n parametre filters array\u2019idir. Bu array, dataSize ve memcmp olmak \xFCzere iki t\xFCr filtre kabul eder. Bu filtrelerden herhangi birini kullanmadan \xF6nce, request etti\u011Fimiz verilerin nas\u0131l d\xFCzenlendi\u011Fini ve serile\u015Ftirildi\u011Fini bilmeliyiz.

    dataSize

    ',3),mn=a("Token Program\u0131 i\xE7in, "),gn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},hn=a("token account'lar\u0131n\u0131n 165 bayt uzunlu\u011Funda"),_n=a(" oldu\u011Funu g\xF6rebiliriz. Spesifik olarak, bir belirte\xE7 account'\u0131n\u0131n her biri tahmin edilebilir say\u0131da bayt gerektiren sekiz farkl\u0131 alan\u0131 vard\u0131r. A\u015Fa\u011F\u0131daki \xE7izimi kullanarak bu verilerin nas\u0131l d\xFCzenlendi\u011Fini g\xF6rselle\u015Ftirebiliriz."),yn=t('

    Account Size

    C\xFCzdan adresimize ait t\xFCm token account'lar\u0131n\u0131 bulmak istiyorsak, sorgumuzun kapsam\u0131n\u0131 tam olarak 165 bayt uzunlu\u011Fundaki account'lara daraltmak i\xE7in filters dizimize { dataSize: 165 } ekleyebiliriz. Ancak bu tek ba\u015F\u0131na yetersiz olacakt\u0131r. Ayr\u0131ca adresimize ait account'lar\u0131 arayan bir filtre eklememiz gerekir. Bunu memcmp filtresiyle ba\u015Farabiliriz

    memcmp

    memcmp filtresi veya "bellek kar\u015F\u0131la\u015Ft\u0131rma" filtresi, account'\u0131m\u0131zda depolanan herhangi bir alandaki verileri kar\u015F\u0131la\u015Ft\u0131rmam\u0131za olanak tan\u0131r. Spesifik olarak, yaln\u0131zca belirli bir konumda belirli bir bayt k\xFCmesiyle e\u015Fle\u015Fen account'lar\u0131 sorgulayabiliriz. memcmp iki arg\xFCman gerektirir:

    • offset: Verileri kar\u015F\u0131la\u015Ft\u0131rmaya ba\u015Flayaca\u011F\u0131n\u0131z konum. Bu konum bayt cinsinden \xF6l\xE7\xFCl\xFCr ve bir tamsay\u0131 olarak ifade edilir.
    • bytes: Hesab\u0131n verileriyle e\u015Fle\u015Fmesi gereken veriler. Bu, base-58 kodlu bir string olarak temsil edilir, 129 bayttan daha az ile s\u0131n\u0131rland\u0131r\u0131lmal\u0131d\u0131r.

    Memcmp'nin yaln\u0131zca bytes ile tam olarak e\u015Fle\u015Fen sonu\xE7lar\u0131 d\xF6nd\xFCrece\u011Fini unutmamak \xF6nemlidir. \u015Eu anda, sa\u011Flad\u0131\u011F\u0131m\u0131z bytes\u2019dan daha k\xFC\xE7\xFCk veya daha b\xFCy\xFCk de\u011Ferler i\xE7in kar\u015F\u0131la\u015Ft\u0131rmalar\u0131 desteklememektedir.

    Token Program\u0131 \xF6rne\u011Fimize uygun olarak, sorgumuzu yaln\u0131zca c\xFCzdan adresimize ait olan token account'lar\u0131n\u0131 d\xF6nd\xFCrecek \u015Fekilde de\u011Fi\u015Ftirebiliriz. Bir belirte\xE7 account'\u0131na bakt\u0131\u011F\u0131m\u0131zda, bir belirte\xE7 account'\u0131nda depolanan ilk iki alan\u0131n her ikisinin de pubkey oldu\u011Funu ve her bir pubkey'nin 32 bayt uzunlu\u011Funda oldu\u011Funu g\xF6rebiliriz. Owner\u2019\u0131n ikinci alan oldu\u011Fu g\xF6z \xF6n\xFCne al\u0131nd\u0131\u011F\u0131nda, memcmp'mize 32 baytl\u0131k bir offset ile ba\u015Flamal\u0131y\u0131z. Buradan, owner alan\u0131 c\xFCzdan adresimizle e\u015Fle\u015Fen account'lar\u0131 arayaca\u011F\u0131z.

    Account Size

    Bu sorguyu a\u015Fa\u011F\u0131daki \xF6rnek \xFCzerinden \xE7a\u011F\u0131rabiliriz:

    import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
    +import{_ as c,r as o,o as l,c as i,a as n,b as s,w as r,F as u,d as a,e as t}from"./app.d411e3b3.js";var d="/assets/account-size.398f17bf.png",k="/assets/memcmp.c5e1f050.png";const b={},m=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),a(" Get Program Accounts")],-1),g=n("p",null,"Bir program\u0131n sahip oldu\u011Fu t\xFCm account'lar\u0131 d\xF6nd\xFCren bir RPC y\xF6ntemidir. \u015Eu anda pagination desteklenmemektedir. getProgramAccounts requests, yan\u0131t s\xFCresini iyile\u015Ftirmek ve yaln\u0131zca ama\xE7lanan sonu\xE7lar\u0131 d\xF6nd\xFCrmek i\xE7in dataSlice ve/veya filters parametrelerini i\xE7ermelidir.",-1),h=n("h2",{id:"facts-ozet-bilgiler",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts-ozet-bilgiler","aria-hidden":"true"},"#"),a(" Facts (\xD6zet Bilgiler)")],-1),_=n("p",null,":::Parametreler",-1),y=n("li",null,[n("code",null,"programId"),a(": "),n("code",null,"string"),a(" - Sorgulanacak program\u0131n public key\u2019i, base58 kodlu bir string olarak sa\u011Flan\u0131r")],-1),f=a("(iste\u011Fe ba\u011Fl\u0131) "),z=n("code",null,"configOrCommitment",-1),v=a(": "),A=n("code",null,"object",-1),P=a(" - A\u015Fa\u011F\u0131daki iste\u011Fe ba\u011Fl\u0131 alanlar\u0131 i\xE7eren yap\u0131land\u0131rma parametreleri: "),w=a("(iste\u011Fe ba\u011Fl\u0131) "),S=n("code",null,"commitment",-1),q=a(": "),B=n("code",null,"string",-1),D=a(" - "),T={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},E=a("Durum Taahh\xFCd\xFC"),K=a("(iste\u011Fe ba\u011Fl\u0131) "),N=n("code",null,"encoding",-1),C=a(": "),x=n("code",null,"string",-1),R=a(" - Account verileri i\xE7in encode: base58, base64 veya jsonParsed\u2019d\u0131r. Web3js kullan\u0131c\u0131lar\u0131n\u0131n bunun yerine "),M={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},L=a("getParsedProgramAccounts"),G=a(" kullanmas\u0131 gerekti\u011Fini unutmay\u0131n."),O=t("
  • (iste\u011Fe ba\u011Fl\u0131) dataSlice: object - Geri d\xF6nd\xFCr\xFClen account verilerini a\u015Fa\u011F\u0131dakilere g\xF6re s\u0131n\u0131rlay\u0131n:
    • offset: number - Geri d\xF6nd\xFCrmeye ba\u015Flamak i\xE7in account verisindeki bayt say\u0131s\u0131
    • length: number - Geri d\xF6nd\xFCr\xFClecek account verilerinin bayt say\u0131s\u0131
  • (iste\u011Fe ba\u011Fl\u0131) filters: array - A\u015Fa\u011F\u0131daki filters nesnelerini kullanarak sonu\xE7lar\u0131 filtreleyin:
    • memcmp: object - Bir dizi bayt\u0131 account verileriyle e\u015Fle\u015Ftirin:
      • offset: number - Kar\u015F\u0131la\u015Ft\u0131rmaya ba\u015Flamak i\xE7in account verilerinin bayt say\u0131s\u0131
      • bytes: string - 129 bayt ile s\u0131n\u0131rl\u0131 base58 kodlu string olarak e\u015Fle\u015Fecek veriler
    • dataSize: number - Account data uzunlu\u011Funu sa\u011Flanan veri boyutuyla kar\u015F\u0131la\u015Ft\u0131r\u0131r
  • ",2),j=a("(iste\u011Fe ba\u011Fl\u0131) "),H=n("code",null,"withContext",-1),V=a(": "),Y=n("code",null,"boolean",-1),F=a(" - Sonucu bir "),U={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},I=a("RpcResponse JSON nesnesine sarmalay\u0131n"),W=t('
    Response

    Varsay\u0131lan olarak getProgramAccounts, a\u015Fa\u011F\u0131daki yap\u0131ya sahip bir dizi JSON nesnesi d\xF6nd\xFCr\xFCr:

    • pubkey: string - Base58 kodlu bir string olarak account'\u0131n pubkeyi
    • account: object - a\u015Fa\u011F\u0131daki alt alanlara sahip bir JSON nesnesi:
    • lamports: number, account'a atanan lamport say\u0131s\u0131
    • owner: string, Hesab\u0131n atand\u0131\u011F\u0131 program\u0131n base58 kodlu yay\u0131n anahtar\u0131
    • data: string | object - account'la ili\u015Fkili veriler, sa\u011Flanan kodlama parametresine ba\u011Fl\u0131 olarak kodlanm\u0131\u015F binary data veya JSON format\u0131d\u0131r
    • executable: boolean, Hesap bir program i\xE7erp i\xE7ermedi\u011Finin g\xF6stergesi
    • rentEpoch: number, Bu account'\u0131n bir sonraki rent borcunun olaca\u011F\u0131 epoch :::

    Deep Dive (Derinlemesine Bak\u0131\u015F)

    getProgramAccounts, bir program\u0131n sahip oldu\u011Fu t\xFCm account'lar\u0131 d\xF6nd\xFCren \xE7ok y\xF6nl\xFC bir RPC methodudur. getProgramAccounts'u a\u015Fa\u011F\u0131dakileri bulmak gibi bir dizi yararl\u0131 sorgu i\xE7in kullanabiliriz:

    ',5),Z=n("li",null,"Belirli bir c\xFCzdan i\xE7in t\xFCm token account'lar\u0131",-1),J=a("Belirli bir mint i\xE7in t\xFCm token account'lar\u0131 (t\xFCm "),$={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},Q=a("SRM"),X=a(" sahipleri)"),nn=a("Belirli bir program i\xE7in t\xFCm private account'lar (t\xFCm "),an={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},sn=a("Mango"),en=a(" kullan\u0131c\u0131lar\u0131)"),tn=t("

    Kullan\u0131\u015Fl\u0131l\u0131\u011F\u0131na ra\u011Fmen, getProgramAccounts, mevcut k\u0131s\u0131tlamalar\u0131 nedeniyle genellikle yanl\u0131\u015F anla\u015F\u0131l\u0131r. getProgramAccounts taraf\u0131ndan desteklenen sorgular\u0131n \xE7o\u011Fu, b\xFCy\xFCk veri k\xFCmelerini taramak i\xE7in RPC node\u2019lar\u0131n\u0131 gerektirir. Bu taramalar hem bellek hem de kaynak yo\u011Fundur. Sonu\xE7 olarak, \xE7ok s\u0131k veya \xE7ok geni\u015F kapsaml\u0131 \xE7a\u011Fr\u0131lar ba\u011Flant\u0131 zaman a\u015F\u0131mlar\u0131na neden olabilir. Ayr\u0131ca, bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 s\u0131rada getProgramAccounts u\xE7 noktas\u0131 sayfaland\u0131rmay\u0131 desteklemez. Bir sorgunun sonu\xE7lar\u0131 \xE7ok b\xFCy\xFCkse, yan\u0131t kesilecektir.

    Bu mevcut k\u0131s\u0131tlamalar\u0131 a\u015Fmak i\xE7in getProgramAccounts bir dizi faydal\u0131 parametre sunar: dataSlice, memcmp ve dataSize, filters se\xE7enekleri. Bu parametrelerin kombinasyonlar\u0131n\u0131 sa\u011Flayarak sorgular\u0131m\u0131z\u0131n kapsam\u0131n\u0131 y\xF6netilebilir ve \xF6ng\xF6r\xFClebilir boyutlara indirebiliriz.

    ",2),on=a("Yayg\u0131n bir "),pn=n("code",null,"getProgramAccounts",-1),cn=a(" \xF6rne\u011Fi, "),ln={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},rn=a("SPL-Token Program\u0131"),un=a(" ile etkile\u015Fimi i\xE7erir. Token Program\u0131n\u0131n sahip oldu\u011Fu t\xFCm account'lar\u0131 bir "),dn=a("basic call"),kn=a(" ile request etmek, \xE7ok b\xFCy\xFCk miktarda veri gerektirecektir. Ancak parametreleri sa\u011Flayarak, yaln\u0131zca kullanmay\u0131 d\xFC\u015F\xFCnd\xFC\u011F\xFCm\xFCz verileri verimli bir \u015Fekilde request edebiliriz."),bn=t('

    filters

    getProgramAccounts ile kullan\u0131lacak en yayg\u0131n parametre filters array\u2019idir. Bu array, dataSize ve memcmp olmak \xFCzere iki t\xFCr filtre kabul eder. Bu filtrelerden herhangi birini kullanmadan \xF6nce, request etti\u011Fimiz verilerin nas\u0131l d\xFCzenlendi\u011Fini ve serile\u015Ftirildi\u011Fini bilmeliyiz.

    dataSize

    ',3),mn=a("Token Program\u0131 i\xE7in, "),gn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},hn=a("token account'lar\u0131n\u0131n 165 bayt uzunlu\u011Funda"),_n=a(" oldu\u011Funu g\xF6rebiliriz. Spesifik olarak, bir belirte\xE7 account'\u0131n\u0131n her biri tahmin edilebilir say\u0131da bayt gerektiren sekiz farkl\u0131 alan\u0131 vard\u0131r. A\u015Fa\u011F\u0131daki \xE7izimi kullanarak bu verilerin nas\u0131l d\xFCzenlendi\u011Fini g\xF6rselle\u015Ftirebiliriz."),yn=t('

    Account Size

    C\xFCzdan adresimize ait t\xFCm token account'lar\u0131n\u0131 bulmak istiyorsak, sorgumuzun kapsam\u0131n\u0131 tam olarak 165 bayt uzunlu\u011Fundaki account'lara daraltmak i\xE7in filters dizimize { dataSize: 165 } ekleyebiliriz. Ancak bu tek ba\u015F\u0131na yetersiz olacakt\u0131r. Ayr\u0131ca adresimize ait account'lar\u0131 arayan bir filtre eklememiz gerekir. Bunu memcmp filtresiyle ba\u015Farabiliriz

    memcmp

    memcmp filtresi veya "bellek kar\u015F\u0131la\u015Ft\u0131rma" filtresi, account'\u0131m\u0131zda depolanan herhangi bir alandaki verileri kar\u015F\u0131la\u015Ft\u0131rmam\u0131za olanak tan\u0131r. Spesifik olarak, yaln\u0131zca belirli bir konumda belirli bir bayt k\xFCmesiyle e\u015Fle\u015Fen account'lar\u0131 sorgulayabiliriz. memcmp iki arg\xFCman gerektirir:

    • offset: Verileri kar\u015F\u0131la\u015Ft\u0131rmaya ba\u015Flayaca\u011F\u0131n\u0131z konum. Bu konum bayt cinsinden \xF6l\xE7\xFCl\xFCr ve bir tamsay\u0131 olarak ifade edilir.
    • bytes: Hesab\u0131n verileriyle e\u015Fle\u015Fmesi gereken veriler. Bu, base-58 kodlu bir string olarak temsil edilir, 129 bayttan daha az ile s\u0131n\u0131rland\u0131r\u0131lmal\u0131d\u0131r.

    Memcmp'nin yaln\u0131zca bytes ile tam olarak e\u015Fle\u015Fen sonu\xE7lar\u0131 d\xF6nd\xFCrece\u011Fini unutmamak \xF6nemlidir. \u015Eu anda, sa\u011Flad\u0131\u011F\u0131m\u0131z bytes\u2019dan daha k\xFC\xE7\xFCk veya daha b\xFCy\xFCk de\u011Ferler i\xE7in kar\u015F\u0131la\u015Ft\u0131rmalar\u0131 desteklememektedir.

    Token Program\u0131 \xF6rne\u011Fimize uygun olarak, sorgumuzu yaln\u0131zca c\xFCzdan adresimize ait olan token account'lar\u0131n\u0131 d\xF6nd\xFCrecek \u015Fekilde de\u011Fi\u015Ftirebiliriz. Bir belirte\xE7 account'\u0131na bakt\u0131\u011F\u0131m\u0131zda, bir belirte\xE7 account'\u0131nda depolanan ilk iki alan\u0131n her ikisinin de pubkey oldu\u011Funu ve her bir pubkey'nin 32 bayt uzunlu\u011Funda oldu\u011Funu g\xF6rebiliriz. Owner\u2019\u0131n ikinci alan oldu\u011Fu g\xF6z \xF6n\xFCne al\u0131nd\u0131\u011F\u0131nda, memcmp'mize 32 baytl\u0131k bir offset ile ba\u015Flamal\u0131y\u0131z. Buradan, owner alan\u0131 c\xFCzdan adresimizle e\u015Fle\u015Fen account'lar\u0131 arayaca\u011F\u0131z.

    Account Size

    Bu sorguyu a\u015Fa\u011F\u0131daki \xF6rnek \xFCzerinden \xE7a\u011F\u0131rabiliriz:

    import { TOKEN_PROGRAM_ID } from "@solana/spl-token";
     import { clusterApiUrl, Connection } from "@solana/web3.js";
     
     (async () => {
    diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.43b20beb.js b/docs/.vuepress/dist/assets/get-program-accounts.html.416a5c35.js
    similarity index 93%
    rename from docs/.vuepress/dist/assets/get-program-accounts.html.43b20beb.js
    rename to docs/.vuepress/dist/assets/get-program-accounts.html.416a5c35.js
    index 4c5dbdd5f..3effd97de 100644
    --- a/docs/.vuepress/dist/assets/get-program-accounts.html.43b20beb.js
    +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.416a5c35.js
    @@ -1 +1 @@
    -const t={key:"v-5263011e",path:"/vi/guides/get-program-accounts.html",title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account",lang:"vi-VN",frontmatter:{title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | \u0110\u1ECDc d\u1EEF li\u1EC7u Program Account"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | \u0110\u1ECDc d\u1EEF li\u1EC7u Program Account"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u c\xE1c truy v\u1EA5n d\u1EEF li\u1EC7u tr\xEAn Solana b\u1EB1ng getProgramAccounts v\xE0 accountsDB."}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u c\xE1c truy v\u1EA5n d\u1EEF li\u1EC7u tr\xEAn Solana b\u1EB1ng getProgramAccounts v\xE0 accountsDB."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]]},excerpt:"",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],git:{updatedTime:1677551527e3,contributors:[{name:"Tr\u1EA7n Minh Quang",email:"quangtmps12135@fpt.edu.vn",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/guides/get-program-accounts.md"};export{t as data};
    +const t={key:"v-5263011e",path:"/vi/guides/get-program-accounts.html",title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account",lang:"vi-VN",frontmatter:{title:"\u0110\u1ECDc d\u1EEF li\u1EC7u Program Account",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | \u0110\u1ECDc d\u1EEF li\u1EC7u Program Account"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | \u0110\u1ECDc d\u1EEF li\u1EC7u Program Account"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u c\xE1c truy v\u1EA5n d\u1EEF li\u1EC7u tr\xEAn Solana b\u1EB1ng getProgramAccounts v\xE0 accountsDB."}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u c\xE1c truy v\u1EA5n d\u1EEF li\u1EC7u tr\xEAn Solana b\u1EB1ng getProgramAccounts v\xE0 accountsDB."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]]},excerpt:"",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"filters",slug:"filters",children:[]},{level:3,title:"dataSlice",slug:"dataslice",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],git:{updatedTime:1714582408e3,contributors:[{name:"Tr\u1EA7n Minh Quang",email:"quangtmps12135@fpt.edu.vn",commits:1},{name:"lainhathoang",email:"nhathoang8c01@gmail.com",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/guides/get-program-accounts.md"};export{t as data};
    diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.2b6451b4.js b/docs/.vuepress/dist/assets/get-program-accounts.html.47597b1d.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/get-program-accounts.html.2b6451b4.js
    rename to docs/.vuepress/dist/assets/get-program-accounts.html.47597b1d.js
    index 7218647d5..1c0bb1dbc 100644
    --- a/docs/.vuepress/dist/assets/get-program-accounts.html.2b6451b4.js
    +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.47597b1d.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as l,o as i,c as m,a as n,b as a,w as t,F as b,d as s,e as c}from"./app.07ce7a66.js";var k="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},g=n("h1",{id:"obtenir-les-comptes-d-un-programme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtenir-les-comptes-d-un-programme","aria-hidden":"true"},"#"),s(" Obtenir les comptes d'un programme")],-1),_=n("p",null,[s("Il existe une m\xE9thode RPC qui renvoie tous les comptes appartenant \xE0 un programme. Actuellement, la pagination n'est pas prise en charge. Les requ\xEAtes \xE0 "),n("code",null,"getProgramAccounts"),s(" devraient inclure les param\xE8tres "),n("code",null,"dataSlice"),s(" et/ou "),n("code",null,"filters"),s(" afin d'am\xE9liorer le temps de r\xE9ponse et retourner uniquement les r\xE9sultats voulus.")],-1),h=n("h2",{id:"faits",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),s(" Faits")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Param\xE8tres",-1),v=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Cl\xE9 publique du programme \xE0 interroger, fournie sous forme de cha\xEEne de caract\xE8res cod\xE9e en base58")],-1),w=s("(optionnel) "),C=n("code",null,"configOrCommitment",-1),P=s(": "),S=n("code",null,"object",-1),T=s(" - Param\xE8tres de configuration contenant les champs facultatifs suivants : "),D=s("(optionnel) "),E=n("code",null,"commitment",-1),N=s(": "),x=n("code",null,"string",-1),L=s(" - "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("Engagement de l'\xC9tat (State commitment)"),M=s("(optionnel) "),K=n("code",null,"encoding",-1),G=s(": "),B=n("code",null,"string",-1),z=s(" - L'encodage des donn\xE9es du compte, peut \xEAtre: "),j=n("code",null,"base58",-1),F=s(", "),H=n("code",null,"base64",-1),Z=s(", ou "),Q=n("code",null,"jsonParsed",-1),U=s(". Remarque : les utilisateurs de web3js doivent plut\xF4t utiliser "),W={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},J=s("getParsedProgramAccounts"),V=c("
  • (optionnel) dataSlice: object - Param\xE8tres permettant de limiter les donn\xE9es \xE0 renvoyer :
    • offset: number - Nombre de bytes dans les donn\xE9es du compte \xE0 partir desquels il faut commencer \xE0 retourner
    • length: number - Nombre de bytes de donn\xE9es du compte \xE0 retourner
  • (optionnel) filters: array - Param\xE8tres pour filtrer les r\xE9sultats :
    • memcmp: object - Correspondance d'une s\xE9rie de bytes avec les donn\xE9es du compte :
      • offset: number - Nombre de bytes dans les donn\xE9es du compte \xE0 partir desquels il faut commencer \xE0 comparer
      • bytes: string - Donn\xE9es \xE0 comparer, sous la forme d'une cha\xEEne de caract\xE8res cod\xE9e en base58 limit\xE9e \xE0 129 bytes
    • dataSize: number - Compare la longueur des donn\xE9es du compte avec la taille des donn\xE9es fournies
  • ",2),Y=s("(optionnel) "),O=n("code",null,"withContext",-1),X=s(": "),I=n("code",null,"boolean",-1),$=s(" - Enveloppe le r\xE9sultat dans un "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},sn=s("objet JSON RpcResponse"),an=c('
    R\xE9ponse

    Par d\xE9faut, getProgramAccounts retournera un tableau d'objets JSON avec la structure suivante :

    • pubkey: string - La cl\xE9 publique du compte sous la forme d'une cha\xEEne de caract\xE8res encod\xE9e en base58
    • account: object - un objet JSON, avec les sous-champs suivants :
      • lamports: number, nombre de lamports allou\xE9s au compte
      • owner: string, La cl\xE9 publique du programme auquel le compte a \xE9t\xE9 attribu\xE9, encod\xE9e en base58
      • data: string | object - les donn\xE9es associ\xE9es au compte, soit sous forme de donn\xE9es binaires, soit au format JSON, conform\xE9ment au param\xE8tre d'encodage fourni
      • executable: boolean, Indique si le compte contient un programme
      • rentEpoch: number, L'\xE9poque \xE0 laquelle ce compte devra payer sa prochaine rente
    ',3),en=n("h2",{id:"examen-plus-approfondi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#examen-plus-approfondi","aria-hidden":"true"},"#"),s(" Examen plus approfondi")],-1),tn=n("p",null,[n("code",null,"getProgramAccounts"),s(" est une m\xE9thode RPC polyvalente qui renvoie tous les comptes appartenant \xE0 un programme. Nous pouvons utiliser "),n("code",null,"getProgramAccounts"),s(" pour un certain nombre de requ\xEAtes utiles, telles que la recherche de :")],-1),on=n("li",null,"Tous les comptes de jetons pour un portefeuille en particulier",-1),cn=s("Tous les comptes de jetons pour un mint en particulier (par exemple, tous les propri\xE9taires (holders) de "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=s("SRM"),un=s(")"),rn=s("Tous les comptes pour un programme en particulier (par exemple, tous les utilisateurs de "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),kn=s(")"),dn=c("

    Malgr\xE9 son utilit\xE9, getProgramAccounts est souvent mal compris en raison de ses limites actuelles. La plupart des requ\xEAtes support\xE9es par getProgramAccounts n\xE9cessitent des n\u0153uds RPC pour analyser de grands ensembles de donn\xE9es. Ces analyses sont \xE0 la fois gourmandes en m\xE9moire et en ressources. Par cons\xE9quent, les appels trop fr\xE9quents ou de trop grande envergure peuvent entra\xEEner des interruptions de connexion. De plus, au moment o\xF9 nous \xE9crivons ces lignes, le point de terminaison getProgramAccounts ne prend pas en charge la pagination. Si les r\xE9sultats d'une requ\xEAte sont trop volumineux, la r\xE9ponse sera tronqu\xE9e.

    Pour contourner ces contraintes actuelles, getProgramAccounts offre un certain nombre de param\xE8tres utiles : \xE0 savoir, dataSlice et les options de filters memcmp et dataSize. En fournissant des combinaisons de ces param\xE8tres, nous pouvons r\xE9duire la port\xE9e de nos requ\xEAtes \xE0 des tailles g\xE9rables et pr\xE9visibles.

    ",2),fn=s("Un exemple courant de "),gn=n("code",null,"getProgramAccounts",-1),_n=s(" consiste \xE0 interagir avec le "),hn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("Programme de Jetons SPL"),An=s(". Demander tous les comptes d\xE9tenus par le programme de Jetons avec un "),vn=s("appel de base"),wn=s(" impliquerait une \xE9norme quantit\xE9 de donn\xE9es. Cependant, en fournissant des param\xE8tres, nous pouvons efficacement demander uniquement les donn\xE9es que nous avons l'intention d'utiliser."),Cn=c('

    filters

    Le param\xE8tre le plus commun \xE0 utiliser avec getProgramAccounts est le tableau filters. Ce tableau accepte deux types de filtres, dataSize et memcmp. Avant d'utiliser l'un de ces filtres, nous devons nous familiariser avec la mani\xE8re dont les donn\xE9es que nous demandons sont organis\xE9es et s\xE9rialis\xE9es.

    dataSize

    ',3),Pn=s("Dans le cas du Programme de Jetons, nous pouvons constater que "),Sn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Tn=s("les comptes de jetons ont une taille de 165 bytes"),Dn=s(". Plus pr\xE9cis\xE9ment, un compte de jeton comporte huit champs diff\xE9rents, chaque champ ayant un nombre pr\xE9d\xE9fini de bytes. Nous pouvons visualiser comment ces donn\xE9es sont organis\xE9es \xE0 l'aide de l'illustration ci-dessous."),En=c('

    Taille des comptes

    Si nous voulions trouver tous les comptes de jetons appartenant \xE0 notre adresse de portefeuille, nous pourrions ajouter { dataSize: 165 } \xE0 notre tableau filters pour limiter notre requ\xEAte aux seuls comptes qui font exactement 165 bytes de long. Toutefois, cela ne suffirait pas. Nous devrions \xE9galement ajouter un filtre qui recherche les comptes appartenant \xE0 notre adresse. Nous pouvons r\xE9aliser cela avec le filtre memcmp.

    memcmp

    Le filtre memcmp, ou filtre "comparaison de m\xE9moire", nous permet de comparer des donn\xE9es \xE0 n'importe quel champ stock\xE9 sur notre compte. Plus pr\xE9cis\xE9ment, nous pouvons rechercher uniquement les comptes qui poss\xE8dent un certain ensemble de bytes \xE0 une position pr\xE9cise. memcmp n\xE9cessite deux arguments :

    • offset: La position \xE0 partir de laquelle il faut commencer \xE0 comparer les donn\xE9es. Cette position est mesur\xE9e en bytes et est exprim\xE9e sous la forme d'un nombre entier.
    • bytes: Les donn\xE9es qui doivent correspondre aux donn\xE9es du compte. Elles sont repr\xE9sent\xE9es sous la forme d'une cha\xEEne de caract\xE8res cod\xE9es en base 58 qui doit \xEAtre limit\xE9e \xE0 moins de 129 bytes.

    Il est important de noter que memcmp ne retournera que les r\xE9sultats qui correspondent exactement aux bytes. Actuellement, il ne supporte pas les comparaisons pour les valeurs inf\xE9rieures ou sup\xE9rieures aux bytes que nous fournissons.

    Pour rester dans notre exemple du Programme de Jetons, nous pouvons modifier notre requ\xEAte pour ne renvoyer que les comptes de jetons qui appartiennent \xE0 notre adresse de portefeuille. En examinant un compte de jetons, on constate que les deux premiers champs stock\xE9s sur un compte de jetons sont tous deux des cl\xE9s publiques, et que chaque cl\xE9 publique a une longueur de 32 octets. \xC9tant donn\xE9 que owner est le deuxi\xE8me champ, nous devrions commencer notre memcmp \xE0 un offset de 32 bytes. A partir de l\xE0, nous allons rechercher les comptes dont le champ propri\xE9taire (owner) correspond \xE0 l'adresse de notre portefeuille.

    Taille des comptes

    Nous pouvons faire appel \xE0 cette requ\xEAte via l'exemple suivant :

    ',9),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as r,r as l,o as i,c as m,a as n,b as a,w as t,F as b,d as s,e as c}from"./app.d411e3b3.js";var k="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},g=n("h1",{id:"obtenir-les-comptes-d-un-programme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtenir-les-comptes-d-un-programme","aria-hidden":"true"},"#"),s(" Obtenir les comptes d'un programme")],-1),_=n("p",null,[s("Il existe une m\xE9thode RPC qui renvoie tous les comptes appartenant \xE0 un programme. Actuellement, la pagination n'est pas prise en charge. Les requ\xEAtes \xE0 "),n("code",null,"getProgramAccounts"),s(" devraient inclure les param\xE8tres "),n("code",null,"dataSlice"),s(" et/ou "),n("code",null,"filters"),s(" afin d'am\xE9liorer le temps de r\xE9ponse et retourner uniquement les r\xE9sultats voulus.")],-1),h=n("h2",{id:"faits",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),s(" Faits")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Param\xE8tres",-1),v=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Cl\xE9 publique du programme \xE0 interroger, fournie sous forme de cha\xEEne de caract\xE8res cod\xE9e en base58")],-1),w=s("(optionnel) "),C=n("code",null,"configOrCommitment",-1),P=s(": "),S=n("code",null,"object",-1),T=s(" - Param\xE8tres de configuration contenant les champs facultatifs suivants : "),D=s("(optionnel) "),E=n("code",null,"commitment",-1),N=s(": "),x=n("code",null,"string",-1),L=s(" - "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("Engagement de l'\xC9tat (State commitment)"),M=s("(optionnel) "),K=n("code",null,"encoding",-1),G=s(": "),B=n("code",null,"string",-1),z=s(" - L'encodage des donn\xE9es du compte, peut \xEAtre: "),j=n("code",null,"base58",-1),F=s(", "),H=n("code",null,"base64",-1),Z=s(", ou "),Q=n("code",null,"jsonParsed",-1),U=s(". Remarque : les utilisateurs de web3js doivent plut\xF4t utiliser "),W={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},J=s("getParsedProgramAccounts"),V=c("
  • (optionnel) dataSlice: object - Param\xE8tres permettant de limiter les donn\xE9es \xE0 renvoyer :
    • offset: number - Nombre de bytes dans les donn\xE9es du compte \xE0 partir desquels il faut commencer \xE0 retourner
    • length: number - Nombre de bytes de donn\xE9es du compte \xE0 retourner
  • (optionnel) filters: array - Param\xE8tres pour filtrer les r\xE9sultats :
    • memcmp: object - Correspondance d'une s\xE9rie de bytes avec les donn\xE9es du compte :
      • offset: number - Nombre de bytes dans les donn\xE9es du compte \xE0 partir desquels il faut commencer \xE0 comparer
      • bytes: string - Donn\xE9es \xE0 comparer, sous la forme d'une cha\xEEne de caract\xE8res cod\xE9e en base58 limit\xE9e \xE0 129 bytes
    • dataSize: number - Compare la longueur des donn\xE9es du compte avec la taille des donn\xE9es fournies
  • ",2),Y=s("(optionnel) "),O=n("code",null,"withContext",-1),X=s(": "),I=n("code",null,"boolean",-1),$=s(" - Enveloppe le r\xE9sultat dans un "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},sn=s("objet JSON RpcResponse"),an=c('
    R\xE9ponse

    Par d\xE9faut, getProgramAccounts retournera un tableau d'objets JSON avec la structure suivante :

    • pubkey: string - La cl\xE9 publique du compte sous la forme d'une cha\xEEne de caract\xE8res encod\xE9e en base58
    • account: object - un objet JSON, avec les sous-champs suivants :
      • lamports: number, nombre de lamports allou\xE9s au compte
      • owner: string, La cl\xE9 publique du programme auquel le compte a \xE9t\xE9 attribu\xE9, encod\xE9e en base58
      • data: string | object - les donn\xE9es associ\xE9es au compte, soit sous forme de donn\xE9es binaires, soit au format JSON, conform\xE9ment au param\xE8tre d'encodage fourni
      • executable: boolean, Indique si le compte contient un programme
      • rentEpoch: number, L'\xE9poque \xE0 laquelle ce compte devra payer sa prochaine rente
    ',3),en=n("h2",{id:"examen-plus-approfondi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#examen-plus-approfondi","aria-hidden":"true"},"#"),s(" Examen plus approfondi")],-1),tn=n("p",null,[n("code",null,"getProgramAccounts"),s(" est une m\xE9thode RPC polyvalente qui renvoie tous les comptes appartenant \xE0 un programme. Nous pouvons utiliser "),n("code",null,"getProgramAccounts"),s(" pour un certain nombre de requ\xEAtes utiles, telles que la recherche de :")],-1),on=n("li",null,"Tous les comptes de jetons pour un portefeuille en particulier",-1),cn=s("Tous les comptes de jetons pour un mint en particulier (par exemple, tous les propri\xE9taires (holders) de "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=s("SRM"),un=s(")"),rn=s("Tous les comptes pour un programme en particulier (par exemple, tous les utilisateurs de "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),kn=s(")"),dn=c("

    Malgr\xE9 son utilit\xE9, getProgramAccounts est souvent mal compris en raison de ses limites actuelles. La plupart des requ\xEAtes support\xE9es par getProgramAccounts n\xE9cessitent des n\u0153uds RPC pour analyser de grands ensembles de donn\xE9es. Ces analyses sont \xE0 la fois gourmandes en m\xE9moire et en ressources. Par cons\xE9quent, les appels trop fr\xE9quents ou de trop grande envergure peuvent entra\xEEner des interruptions de connexion. De plus, au moment o\xF9 nous \xE9crivons ces lignes, le point de terminaison getProgramAccounts ne prend pas en charge la pagination. Si les r\xE9sultats d'une requ\xEAte sont trop volumineux, la r\xE9ponse sera tronqu\xE9e.

    Pour contourner ces contraintes actuelles, getProgramAccounts offre un certain nombre de param\xE8tres utiles : \xE0 savoir, dataSlice et les options de filters memcmp et dataSize. En fournissant des combinaisons de ces param\xE8tres, nous pouvons r\xE9duire la port\xE9e de nos requ\xEAtes \xE0 des tailles g\xE9rables et pr\xE9visibles.

    ",2),fn=s("Un exemple courant de "),gn=n("code",null,"getProgramAccounts",-1),_n=s(" consiste \xE0 interagir avec le "),hn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("Programme de Jetons SPL"),An=s(". Demander tous les comptes d\xE9tenus par le programme de Jetons avec un "),vn=s("appel de base"),wn=s(" impliquerait une \xE9norme quantit\xE9 de donn\xE9es. Cependant, en fournissant des param\xE8tres, nous pouvons efficacement demander uniquement les donn\xE9es que nous avons l'intention d'utiliser."),Cn=c('

    filters

    Le param\xE8tre le plus commun \xE0 utiliser avec getProgramAccounts est le tableau filters. Ce tableau accepte deux types de filtres, dataSize et memcmp. Avant d'utiliser l'un de ces filtres, nous devons nous familiariser avec la mani\xE8re dont les donn\xE9es que nous demandons sont organis\xE9es et s\xE9rialis\xE9es.

    dataSize

    ',3),Pn=s("Dans le cas du Programme de Jetons, nous pouvons constater que "),Sn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Tn=s("les comptes de jetons ont une taille de 165 bytes"),Dn=s(". Plus pr\xE9cis\xE9ment, un compte de jeton comporte huit champs diff\xE9rents, chaque champ ayant un nombre pr\xE9d\xE9fini de bytes. Nous pouvons visualiser comment ces donn\xE9es sont organis\xE9es \xE0 l'aide de l'illustration ci-dessous."),En=c('

    Taille des comptes

    Si nous voulions trouver tous les comptes de jetons appartenant \xE0 notre adresse de portefeuille, nous pourrions ajouter { dataSize: 165 } \xE0 notre tableau filters pour limiter notre requ\xEAte aux seuls comptes qui font exactement 165 bytes de long. Toutefois, cela ne suffirait pas. Nous devrions \xE9galement ajouter un filtre qui recherche les comptes appartenant \xE0 notre adresse. Nous pouvons r\xE9aliser cela avec le filtre memcmp.

    memcmp

    Le filtre memcmp, ou filtre "comparaison de m\xE9moire", nous permet de comparer des donn\xE9es \xE0 n'importe quel champ stock\xE9 sur notre compte. Plus pr\xE9cis\xE9ment, nous pouvons rechercher uniquement les comptes qui poss\xE8dent un certain ensemble de bytes \xE0 une position pr\xE9cise. memcmp n\xE9cessite deux arguments :

    • offset: La position \xE0 partir de laquelle il faut commencer \xE0 comparer les donn\xE9es. Cette position est mesur\xE9e en bytes et est exprim\xE9e sous la forme d'un nombre entier.
    • bytes: Les donn\xE9es qui doivent correspondre aux donn\xE9es du compte. Elles sont repr\xE9sent\xE9es sous la forme d'une cha\xEEne de caract\xE8res cod\xE9es en base 58 qui doit \xEAtre limit\xE9e \xE0 moins de 129 bytes.

    Il est important de noter que memcmp ne retournera que les r\xE9sultats qui correspondent exactement aux bytes. Actuellement, il ne supporte pas les comparaisons pour les valeurs inf\xE9rieures ou sup\xE9rieures aux bytes que nous fournissons.

    Pour rester dans notre exemple du Programme de Jetons, nous pouvons modifier notre requ\xEAte pour ne renvoyer que les comptes de jetons qui appartiennent \xE0 notre adresse de portefeuille. En examinant un compte de jetons, on constate que les deux premiers champs stock\xE9s sur un compte de jetons sont tous deux des cl\xE9s publiques, et que chaque cl\xE9 publique a une longueur de 32 octets. \xC9tant donn\xE9 que owner est le deuxi\xE8me champ, nous devrions commencer notre memcmp \xE0 un offset de 32 bytes. A partir de l\xE0, nous allons rechercher les comptes dont le champ propri\xE9taire (owner) correspond \xE0 l'adresse de notre portefeuille.

    Taille des comptes

    Nous pouvons faire appel \xE0 cette requ\xEAte via l'exemple suivant :

    ',9),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.2d157240.js b/docs/.vuepress/dist/assets/get-program-accounts.html.6e96a155.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.2d157240.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.6e96a155.js index 3d750bf0f..710ca2038 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.2d157240.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.6e96a155.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as m,a as n,b as a,w as e,F as k,d as s,e as o}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const g={},f=n("h1",{id:"programmkonten-abfragen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#programmkonten-abfragen","aria-hidden":"true"},"#"),s(" Programmkonten Abfragen")],-1),h=n("p",null,"Eine RPC-Methode, die alle Konten zur\xFCckgibt, die einem Programm geh\xF6ren. Paginierung wird derzeit nicht unterst\xFCtzt. Anfragen an \u201EgetProgramAccounts\u201C sollten die Parameter \u201EdataSlice\u201C und/oder \u201Efilters\u201C enthalten, um die Antwortzeit zu verbessern und nur beabsichtigte Ergebnisse zur\xFCckzugeben.",-1),_=n("h2",{id:"fakten",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fakten","aria-hidden":"true"},"#"),s(" Fakten")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Parameters",-1),A=n("li",null,"\u201EprogramId\u201C: \u201Estring\u201C \u2013 Pubkey des abzufragenden Programms, bereitgestellt als base58-codierter String",-1),z=s("(optional) "),D=n("code",null,"configOrCommitment",-1),P=s(": "),S=n("code",null,"object",-1),v=s(" - Konfigurationsparameter, die die folgenden optionalen Felder enthalten: "),K=s("(optional) "),T=n("code",null,"commitment",-1),C=s(": "),E=n("code",null,"string",-1),B=s(" - "),N={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},M=s("Staatliche Verpflichtung"),R=s("(optional) "),F=n("code",null,"encoding",-1),G=s(": "),L=n("code",null,"string",-1),x=s(" - Encoding f\xFCr Kontodaten, entweder: "),Z=n("code",null,"base58",-1),W=s(", "),H=n("code",null,"base64",-1),U=s(" oder "),Q=n("code",null,"jsonParsed",-1),j=s(". Beachten Sie, dass Benutzer von web3js stattdessen "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},O=s("getParsedProgramAccounts"),I=s(" verwenden sollten."),Y=o("
  • (optional) dataSlice: object - Beschr\xE4nken Sie die zur\xFCckgegebenen Kontodaten basierend auf:
    • offset: number - Anzahl der Bytes in Kontodaten, um mit der R\xFCckgabe zu beginnen
    • length: number - Anzahl der zur\xFCckzugebenden Kontodaten-Bytes
  • (optional) filters: array - Filtern Sie die Ergebnisse mit den folgenden Filterobjekten:
    • memcmp: object - Passen Sie eine Reihe von Bytes an Kontodaten an:
      • offset: number - Anzahl der Bytes in den Kontodaten, um mit dem Vergleich zu beginnen
      • bytes: string - Zu vergleichende Daten, als Base58-codierter String, begrenzt auf 129 Bytes
    • dataSize: number - Vergleicht die Kontodatenl\xE4nge mit der bereitgestellten Datengr\xF6\xDFe
  • (optional) withContext: boolean - Das Ergebnis in ein [RpcResponse JSON-Objekt] einschlie\xDFen (https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure)
  • ",3),J=o('
    Antwort

    Standardm\xE4\xDFig gibt getProgramAccounts ein Array von JSON-Objekten mit der folgenden Struktur zur\xFCck:

    • pubkey: string - Der Konto-Pubkey als base58-codierter String
    • \u201Eaccount\u201C: \u201Eobject\u201C \u2013 ein JSON-Objekt mit den folgenden Unterfeldern:
      • lamports: number, Anzahl der dem Konto zugeordneten Lamports
      • owner: string, Der base58-kodierte Pubkey des Programms, dem das Konto zugewiesen wurde
      • \u201EDaten\u201C: \u201EZeichenfolge\u201C | \u201EObjekt\u201C \u2013 Daten, die dem Konto zugeordnet sind, entweder als codierte Bin\xE4rdaten oder im JSON-Format, abh\xE4ngig vom bereitgestellten Codierungsparameter
      • executable: boolean, Angabe ob das Konto ein Programm enth\xE4lt
      • rentEpoch: number, Die Epoche, in der dieses Konto das n\xE4chste mal Miete schuldet :::

    Deep Dive

    \u201EgetProgramAccounts\u201C ist eine vielseitige RPC-Methode, die alle Konten zur\xFCckgibt, die einem Programm geh\xF6ren. Wir k\xF6nnen "getProgramAccounts" f\xFCr eine Reihe n\xFCtzlicher Abfragen verwenden, z. B. um Folgendes zu finden:

    ',5),X=n("li",null,"Alle Token-Konten f\xFCr eine bestimmte Brieftasche",-1),q=s("Alle Token-Konten f\xFCr eine bestimmte Minze (d. h. alle "),$={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},nn=s("SRM"),sn=s("-Inhaber)"),an=s("Alle benutzerdefinierten Konten f\xFCr ein bestimmtes Programm (d. h. alle Benutzer von "),en={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},tn=s("Mango"),cn=s(")"),on=o("

    Trotz seiner N\xFCtzlichkeit wird getProgramAccounts aufgrund seiner derzeitigen Beschr\xE4nkungen oft missverstanden. Viele der von \u201EgetProgramAccounts\u201C unterst\xFCtzten Abfragen erfordern RPC-Knoten, um gro\xDFe Datens\xE4tze zu scannen. Diese Scans sind sowohl speicher- als auch ressourcenintensiv. Daher k\xF6nnen zu h\xE4ufige oder zu umfangreiche Aufrufe zu Verbindungszeit\xFCberschreitungen f\xFChren. Dar\xFCber hinaus unterst\xFCtzt der Endpunkt \u201EgetProgramAccounts\u201C zum Zeitpunkt der Erstellung dieses Dokuments keine Paginierung. Wenn die Ergebnisse einer Abfrage zu gro\xDF sind, wird die Antwort abgeschnitten.

    Um diese derzeitigen Beschr\xE4nkungen zu umgehen, bietet getProgramAccounts eine Reihe n\xFCtzlicher Parameter: n\xE4mlich dataSlice und die filters-Optionen memcmp und dataSize. Durch die Bereitstellung von Kombinationen dieser Parameter k\xF6nnen wir den Umfang unserer Abfragen auf \xFCberschaubare und vorhersehbare Gr\xF6\xDFen reduzieren.

    ",2),ln=s("Ein g\xE4ngiges Beispiel f\xFCr \u201EgetProgramAccounts\u201C ist die Interaktion mit dem [SPL-Token-Programm] (https://spl.solana.com/token). Das Anfordern aller Konten des Token-Programms mit einem "),pn=s("einfachen Aufruf"),un=s(" w\xFCrde eine enorme Datenmenge erfordern. Durch die Bereitstellung von Parametern k\xF6nnen wir jedoch effizient nur die Daten anfordern, die wir verwenden m\xF6chten."),rn=n("h3",{id:"filters",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#filters","aria-hidden":"true"},"#"),s(),n("code",null,"filters")],-1),mn=n("p",null,"Der h\xE4ufigste Parameter, der mit \u201EgetProgramAccounts\u201C verwendet wird, ist das \u201Efilters\u201C-Array. Dieses Array akzeptiert zwei Arten von Filtern, \u201EdataSize\u201C und \u201Ememcmp\u201C. Bevor Sie einen dieser Filter verwenden, sollten wir uns damit vertraut machen, wie die angeforderten Daten angeordnet und serialisiert sind.",-1),kn=n("h4",{id:"datasize",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#datasize","aria-hidden":"true"},"#"),s(),n("code",null,"dataSize")],-1),bn=s("Im Fall des Token-Programms k\xF6nnen wir sehen, dass "),dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},gn=s("Token-Konten 165 Byte lang sind"),fn=s(". Insbesondere hat ein Token-Konto acht verschiedene Felder, wobei jedes Feld eine vorhersagbare Anzahl von Bytes erfordert. Wir k\xF6nnen anhand der folgenden Abbildung visualisieren, wie diese Daten angeordnet sind."),hn=o('

    Account Gr\xF6\xDFe

    Wenn wir alle Token-Konten finden m\xF6chten, die unserer Wallet-Adresse geh\xF6ren, k\xF6nnten wir \u201E{ dataSize: 165 }\u201C zu unserem \u201Efilters\u201C-Array hinzuf\xFCgen, um den Umfang unserer Abfrage auf nur Konten einzugrenzen, die genau 165 Byte lang sind. Dies allein w\xFCrde jedoch nicht ausreichen. Wir m\xFCssten auch einen Filter hinzuf\xFCgen, der nach Konten sucht, die unserer Adresse geh\xF6ren. Dies k\xF6nnen wir mit dem memcmp-Filter erreichen.

    memcmp

    Der memcmp-Filter oder "Speichervergleichsfilter" erm\xF6glicht es uns, Daten in jedem Feld zu vergleichen, das in unserem Konto gespeichert ist. Insbesondere k\xF6nnen wir nur nach Konten abfragen, die mit einem bestimmten Satz von Bytes an einer bestimmten Position \xFCbereinstimmen. memcmp erfordert zwei Argumente:

    • offset: Die Position, an der mit dem Datenvergleich begonnen werden soll. Diese Position wird in Bytes gemessen und als ganze Zahl ausgedr\xFCckt.
    • bytes: Die Daten, die mit den Daten des Kontos \xFCbereinstimmen sollen. Dies wird als Base-58-codierte Zeichenfolge dargestellt und sollte auf weniger als 129 Bytes begrenzt sein.

    Es ist wichtig zu beachten, dass "memcmp" nur Ergebnisse zur\xFCckgibt, die eine genaue \xDCbereinstimmung mit "Bytes" sind. Derzeit werden keine Vergleiche f\xFCr Werte unterst\xFCtzt, die kleiner oder gr\xF6\xDFer als die von uns bereitgestellten \u201EBytes\u201C sind.

    In \xDCbereinstimmung mit unserem Beispiel f\xFCr das Token-Programm k\xF6nnen wir unsere Abfrage so \xE4ndern, dass nur Token-Konten zur\xFCckgegeben werden, die unserer Wallet-Adresse geh\xF6ren. Wenn wir uns ein Token-Konto ansehen, k\xF6nnen wir sehen, dass die ersten beiden Felder, die auf einem Token-Konto gespeichert sind, beide Pubkeys sind und dass jeder Pubkey 32 Bytes lang ist. Da \u201EEigent\xFCmer\u201C das zweite Feld ist, sollten wir unser \u201Ememcmp\u201C bei einem \u201EOffset\u201C von 32 Bytes beginnen. Von hier aus suchen wir nach Konten, deren Eigent\xFCmerfeld mit unserer Brieftaschenadresse \xFCbereinstimmt.

    Account Gr\xF6\xDFe

    Wir k\xF6nnen diese Abfrage \xFCber das folgende Beispiel aufrufen:

    ',9),_n=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as m,a as n,b as a,w as e,F as k,d as s,e as o}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const g={},f=n("h1",{id:"programmkonten-abfragen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#programmkonten-abfragen","aria-hidden":"true"},"#"),s(" Programmkonten Abfragen")],-1),h=n("p",null,"Eine RPC-Methode, die alle Konten zur\xFCckgibt, die einem Programm geh\xF6ren. Paginierung wird derzeit nicht unterst\xFCtzt. Anfragen an \u201EgetProgramAccounts\u201C sollten die Parameter \u201EdataSlice\u201C und/oder \u201Efilters\u201C enthalten, um die Antwortzeit zu verbessern und nur beabsichtigte Ergebnisse zur\xFCckzugeben.",-1),_=n("h2",{id:"fakten",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fakten","aria-hidden":"true"},"#"),s(" Fakten")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Parameters",-1),A=n("li",null,"\u201EprogramId\u201C: \u201Estring\u201C \u2013 Pubkey des abzufragenden Programms, bereitgestellt als base58-codierter String",-1),z=s("(optional) "),D=n("code",null,"configOrCommitment",-1),P=s(": "),S=n("code",null,"object",-1),v=s(" - Konfigurationsparameter, die die folgenden optionalen Felder enthalten: "),K=s("(optional) "),T=n("code",null,"commitment",-1),C=s(": "),E=n("code",null,"string",-1),B=s(" - "),N={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},M=s("Staatliche Verpflichtung"),R=s("(optional) "),F=n("code",null,"encoding",-1),G=s(": "),L=n("code",null,"string",-1),x=s(" - Encoding f\xFCr Kontodaten, entweder: "),Z=n("code",null,"base58",-1),W=s(", "),H=n("code",null,"base64",-1),U=s(" oder "),Q=n("code",null,"jsonParsed",-1),j=s(". Beachten Sie, dass Benutzer von web3js stattdessen "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},O=s("getParsedProgramAccounts"),I=s(" verwenden sollten."),Y=o("
  • (optional) dataSlice: object - Beschr\xE4nken Sie die zur\xFCckgegebenen Kontodaten basierend auf:
    • offset: number - Anzahl der Bytes in Kontodaten, um mit der R\xFCckgabe zu beginnen
    • length: number - Anzahl der zur\xFCckzugebenden Kontodaten-Bytes
  • (optional) filters: array - Filtern Sie die Ergebnisse mit den folgenden Filterobjekten:
    • memcmp: object - Passen Sie eine Reihe von Bytes an Kontodaten an:
      • offset: number - Anzahl der Bytes in den Kontodaten, um mit dem Vergleich zu beginnen
      • bytes: string - Zu vergleichende Daten, als Base58-codierter String, begrenzt auf 129 Bytes
    • dataSize: number - Vergleicht die Kontodatenl\xE4nge mit der bereitgestellten Datengr\xF6\xDFe
  • (optional) withContext: boolean - Das Ergebnis in ein [RpcResponse JSON-Objekt] einschlie\xDFen (https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure)
  • ",3),J=o('
    Antwort

    Standardm\xE4\xDFig gibt getProgramAccounts ein Array von JSON-Objekten mit der folgenden Struktur zur\xFCck:

    • pubkey: string - Der Konto-Pubkey als base58-codierter String
    • \u201Eaccount\u201C: \u201Eobject\u201C \u2013 ein JSON-Objekt mit den folgenden Unterfeldern:
      • lamports: number, Anzahl der dem Konto zugeordneten Lamports
      • owner: string, Der base58-kodierte Pubkey des Programms, dem das Konto zugewiesen wurde
      • \u201EDaten\u201C: \u201EZeichenfolge\u201C | \u201EObjekt\u201C \u2013 Daten, die dem Konto zugeordnet sind, entweder als codierte Bin\xE4rdaten oder im JSON-Format, abh\xE4ngig vom bereitgestellten Codierungsparameter
      • executable: boolean, Angabe ob das Konto ein Programm enth\xE4lt
      • rentEpoch: number, Die Epoche, in der dieses Konto das n\xE4chste mal Miete schuldet :::

    Deep Dive

    \u201EgetProgramAccounts\u201C ist eine vielseitige RPC-Methode, die alle Konten zur\xFCckgibt, die einem Programm geh\xF6ren. Wir k\xF6nnen "getProgramAccounts" f\xFCr eine Reihe n\xFCtzlicher Abfragen verwenden, z. B. um Folgendes zu finden:

    ',5),X=n("li",null,"Alle Token-Konten f\xFCr eine bestimmte Brieftasche",-1),q=s("Alle Token-Konten f\xFCr eine bestimmte Minze (d. h. alle "),$={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},nn=s("SRM"),sn=s("-Inhaber)"),an=s("Alle benutzerdefinierten Konten f\xFCr ein bestimmtes Programm (d. h. alle Benutzer von "),en={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},tn=s("Mango"),cn=s(")"),on=o("

    Trotz seiner N\xFCtzlichkeit wird getProgramAccounts aufgrund seiner derzeitigen Beschr\xE4nkungen oft missverstanden. Viele der von \u201EgetProgramAccounts\u201C unterst\xFCtzten Abfragen erfordern RPC-Knoten, um gro\xDFe Datens\xE4tze zu scannen. Diese Scans sind sowohl speicher- als auch ressourcenintensiv. Daher k\xF6nnen zu h\xE4ufige oder zu umfangreiche Aufrufe zu Verbindungszeit\xFCberschreitungen f\xFChren. Dar\xFCber hinaus unterst\xFCtzt der Endpunkt \u201EgetProgramAccounts\u201C zum Zeitpunkt der Erstellung dieses Dokuments keine Paginierung. Wenn die Ergebnisse einer Abfrage zu gro\xDF sind, wird die Antwort abgeschnitten.

    Um diese derzeitigen Beschr\xE4nkungen zu umgehen, bietet getProgramAccounts eine Reihe n\xFCtzlicher Parameter: n\xE4mlich dataSlice und die filters-Optionen memcmp und dataSize. Durch die Bereitstellung von Kombinationen dieser Parameter k\xF6nnen wir den Umfang unserer Abfragen auf \xFCberschaubare und vorhersehbare Gr\xF6\xDFen reduzieren.

    ",2),ln=s("Ein g\xE4ngiges Beispiel f\xFCr \u201EgetProgramAccounts\u201C ist die Interaktion mit dem [SPL-Token-Programm] (https://spl.solana.com/token). Das Anfordern aller Konten des Token-Programms mit einem "),pn=s("einfachen Aufruf"),un=s(" w\xFCrde eine enorme Datenmenge erfordern. Durch die Bereitstellung von Parametern k\xF6nnen wir jedoch effizient nur die Daten anfordern, die wir verwenden m\xF6chten."),rn=n("h3",{id:"filters",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#filters","aria-hidden":"true"},"#"),s(),n("code",null,"filters")],-1),mn=n("p",null,"Der h\xE4ufigste Parameter, der mit \u201EgetProgramAccounts\u201C verwendet wird, ist das \u201Efilters\u201C-Array. Dieses Array akzeptiert zwei Arten von Filtern, \u201EdataSize\u201C und \u201Ememcmp\u201C. Bevor Sie einen dieser Filter verwenden, sollten wir uns damit vertraut machen, wie die angeforderten Daten angeordnet und serialisiert sind.",-1),kn=n("h4",{id:"datasize",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#datasize","aria-hidden":"true"},"#"),s(),n("code",null,"dataSize")],-1),bn=s("Im Fall des Token-Programms k\xF6nnen wir sehen, dass "),dn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},gn=s("Token-Konten 165 Byte lang sind"),fn=s(". Insbesondere hat ein Token-Konto acht verschiedene Felder, wobei jedes Feld eine vorhersagbare Anzahl von Bytes erfordert. Wir k\xF6nnen anhand der folgenden Abbildung visualisieren, wie diese Daten angeordnet sind."),hn=o('

    Account Gr\xF6\xDFe

    Wenn wir alle Token-Konten finden m\xF6chten, die unserer Wallet-Adresse geh\xF6ren, k\xF6nnten wir \u201E{ dataSize: 165 }\u201C zu unserem \u201Efilters\u201C-Array hinzuf\xFCgen, um den Umfang unserer Abfrage auf nur Konten einzugrenzen, die genau 165 Byte lang sind. Dies allein w\xFCrde jedoch nicht ausreichen. Wir m\xFCssten auch einen Filter hinzuf\xFCgen, der nach Konten sucht, die unserer Adresse geh\xF6ren. Dies k\xF6nnen wir mit dem memcmp-Filter erreichen.

    memcmp

    Der memcmp-Filter oder "Speichervergleichsfilter" erm\xF6glicht es uns, Daten in jedem Feld zu vergleichen, das in unserem Konto gespeichert ist. Insbesondere k\xF6nnen wir nur nach Konten abfragen, die mit einem bestimmten Satz von Bytes an einer bestimmten Position \xFCbereinstimmen. memcmp erfordert zwei Argumente:

    • offset: Die Position, an der mit dem Datenvergleich begonnen werden soll. Diese Position wird in Bytes gemessen und als ganze Zahl ausgedr\xFCckt.
    • bytes: Die Daten, die mit den Daten des Kontos \xFCbereinstimmen sollen. Dies wird als Base-58-codierte Zeichenfolge dargestellt und sollte auf weniger als 129 Bytes begrenzt sein.

    Es ist wichtig zu beachten, dass "memcmp" nur Ergebnisse zur\xFCckgibt, die eine genaue \xDCbereinstimmung mit "Bytes" sind. Derzeit werden keine Vergleiche f\xFCr Werte unterst\xFCtzt, die kleiner oder gr\xF6\xDFer als die von uns bereitgestellten \u201EBytes\u201C sind.

    In \xDCbereinstimmung mit unserem Beispiel f\xFCr das Token-Programm k\xF6nnen wir unsere Abfrage so \xE4ndern, dass nur Token-Konten zur\xFCckgegeben werden, die unserer Wallet-Adresse geh\xF6ren. Wenn wir uns ein Token-Konto ansehen, k\xF6nnen wir sehen, dass die ersten beiden Felder, die auf einem Token-Konto gespeichert sind, beide Pubkeys sind und dass jeder Pubkey 32 Bytes lang ist. Da \u201EEigent\xFCmer\u201C das zweite Feld ist, sollten wir unser \u201Ememcmp\u201C bei einem \u201EOffset\u201C von 32 Bytes beginnen. Von hier aus suchen wir nach Konten, deren Eigent\xFCmerfeld mit unserer Brieftaschenadresse \xFCbereinstimmt.

    Account Gr\xF6\xDFe

    Wir k\xF6nnen diese Abfrage \xFCber das folgende Beispiel aufrufen:

    ',9),_n=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.703fb6bd.js b/docs/.vuepress/dist/assets/get-program-accounts.html.713a03ab.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.703fb6bd.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.713a03ab.js index 3cd62e231..3ea354f09 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.703fb6bd.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.713a03ab.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as k,a as n,b as a,w as t,F as m,e as c,d as s}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const g={},f=c('

    Mendapatkan Akun Program (getProgramAccounts)

    adalah sebuah metode RPC untuk mendapatkan semua akun yang dimiliki oleh suatu program. Saat ini pagination tidak didukung. Request ke getProgramAccounts harus menyertakan parameter dataSlice dan/atau filters untuk mempercepat waktu respon dan hanya mengembalikan hasil yang diinginkan.

    Fakta

    ',3),h={class:"custom-container tip"},_=n("p",{class:"custom-container-title"},"Parameter",-1),y=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Pubkey dari program yang akan diambil, disediakan sebagai string yang di encode menggunakan base58")],-1),w=s("(opsional) "),A=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),C=s(" - Parameter konfigurasi yang berisi field opsional berikut: "),D=s("(opsional) "),T=n("code",null,"commitment",-1),E=s(": "),N=n("code",null,"string",-1),M=s(" - "),v={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("State commitment"),K=s("(opsional) "),j=n("code",null,"encoding",-1),G=s(": "),L=n("code",null,"string",-1),B=s(" - Encoding yang digunakan untuk data akun, baik: "),z=n("code",null,"base58",-1),x=s(", "),F=n("code",null,"base64",-1),H=s(", atau "),Z=n("code",null,"jsonParsed",-1),Q=s(". Catatan, pengguna web3js sebaiknya menggunakan "),U={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},W=s("getParsedProgramAccounts"),J=c("
  • (opsional) dataSlice: object - Membatasi jumlah data akun yang dikembalikan berdasarkan:
    • offset: number - Jumlah byte ke dalam data akun untuk mulai kembali
    • length: number - Jumlah byte data akun yang akan dikembalikan
  • (opsional) filters: array - Filter hasil menggunakan objek filter berikut:
    • memcmp: object - Untuk mencocokkan serangkaian byte dengan data akun:
      • offset: number - Posisi byte dalam data akun tempat dimulai perbandingannya
      • bytes: string - Data yang sedang dicocokkan berupa string yang di encode base58, dibatasi hingga 129 byte
    • dataSize: number - Membandingkan panjang data akun dengan ukuran data yang disediakan
  • ",2),V=s("(opsional) "),Y=n("code",null,"withContext",-1),X=s(": "),O=n("code",null,"boolean",-1),I=s(" - Untuk membungkus hasilnya dalam "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},$=s("object RpcResponse JSON"),nn=c('
    Response

    Secara default getProgramAccounts akan mengembalikan array dari objek JSON dengan struktur berikut:

    • pubkey: string - Pubkey akun berupa string yang diencode base58
    • account: object - sebuah objek JSON, dengan sub-field berikut:
      • lamports: number, jumlah lamport yang dimiliki sebuah akun
      • owner: string, Pubkey dengan encode base58 dari program tempat akun tersebut dipasangkan
      • data: string | object - data yang terkait dengan akun, baik berupa data biner yang telah diencode atau format JSON tergantung pada parameter jenis encoding yang diberikan
      • executable: boolean, untuk mengindikasi jika akun tersebut berisi sebuah program
      • rentEpoch: number, Epoch di mana akun ini selanjutnya akan berutang sewa

    Memahami lebih dalam

    getProgramAccounts adalah metode RPC serbaguna yang mendapatkan semua akun yang dimiliki oleh suatu program. Kita dapat menggunakan getProgramAccounts untuk sejumlah query yang berguna, seperti menemukan:

    ',5),sn=n("li",null,"Semua akun token untuk wallet tertentu",-1),an=s("Semua akun token untuk mint tertentu (yaitu Semua pemegang "),en={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},tn=s("SRM"),cn=s(")"),on=s("Semua akun khusus untuk program tertentu (yaitu Semua pengguna "),ln={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},pn=s("Mango"),un=s(")"),rn=c("

    Terlepas dari kegunaannya, getProgramAccounts sering disalahpahami karena batasannya saat ini. Banyak query yang didukung oleh getProgramAccounts memerlukan node RPC untuk melakukan scan dari kumpulan data yang besar. Proses scan ini membutuhkan memori dan sumber daya yang intensif. Akibatnya, pemanggilan yang terlalu sering atau terlalu besar cakupannya dapat mengakibatkan connection timeout. Selanjutnya, pada saat penulisan ini, endpoint dari getProgramAccounts tidak mendukung pagination. Jika hasil query terlalu besar, respons akan dipecah (truncate).

    Untuk mengatasi kendala saat ini, getProgramAccounts menawarkan sejumlah parameter yang berguna: yaitu, dataSlice dan opsi dari filters yaitu memcmp dan dataSize. Dengan memberikan kombinasi parameter ini, kita dapat mengurangi cakupan query kita menjadi ukuran yang dapat dikelola dan diprediksi.

    ",2),kn=s("Contoh umum dari "),mn=n("code",null,"getProgramAccounts",-1),bn=s(" melibatkan interaksi dengan "),dn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},gn=s("Program Token SPL"),fn=s(". Meminta semua akun yang dimiliki oleh Program Token dengan sebuah "),hn=s("basic call"),_n=s(" akan melibatkan sejumlah data yang besar. Namun, dengan memberikan parameter, kita dapat meminta hanya data yang ingin kita gunakan secara efisien."),yn=c('

    filters

    Parameter yang paling umum digunakan dengan getProgramAccounts adalah array dari filters. Array ini menerima dua jenis filter, yaitu dataSize dan memcmp. Sebelum menggunakan salah satu dari filter ini, kita harus terbiasa dengan bagaimana data yang kita minta ditata dan diserialisasi.

    dataSize

    ',3),wn=s("Dalam kasus Program Token, kita dapat melihat bahwa "),An={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Sn=s("akun token memiliki panjang 165 byte"),Pn=s(". Secara khusus, akun token memiliki delapan field yang berbeda, dengan masing-masing field membutuhkan jumlah byte yang dapat diprediksi. Kita dapat memvisualisasikan bagaimana data ini ditata menggunakan ilustrasi di bawah ini."),Cn=c('

    Account Size

    Jika kita ingin menemukan semua akun token yang dimiliki oleh address wallet kita, kita dapat menambahkan { dataSize: 165 } ke dalam array filters kita untuk memperkecil cakupan query kita menjadi hanya akun yang panjangnya tepat 165 byte. Namun, ini saja tidak akan cukup. kita juga perlu menambahkan filter untuk yang mencari akun yang dimiliki oleh address kita. Kita bisa mendapatkan ini dengan filter memcmp.

    memcmp

    Filter memcmp, atau filter "memory comparison", memungkinkan kita untuk membandingkan data di field mana pun yang tersimpan di akun kita. Secara khusus, kita hanya dapat melakukan query untuk akun yang cocok dengan sekumpulan byte tertentu pada posisi tertentu. memcmp membutuhkan dua argumen:

    • offset: Posisi untuk mulai membandingkan data. Posisi ini diukur dalam byte dan dinyatakan sebagai bilangan bulat.
    • bytes: Data yang harus cocok dengan data akun. Ini direpresentasikan dengan string yang diencode menggunakan base-58 dan harus berukuran kurang dari 129 byte.

    Penting untuk diperhatikan bahwa memcmp hanya akan mengembalikan hasil yang bagian dari datanya sama persis dengan bytes. Saat ini, memcmp tidak mendukung perbandingan untuk data yang kurang dari atau lebih besar dari bytes yang kita berikan.

    Sesuai dengan contoh Program Token kita, kita dapat mengubah query kita untuk hanya mengembalikan akun token yang dimiliki oleh address wallet kita. Saat melihat akun token, kita dapat melihat dua field pertama yang disimpan di akun token adalah pubkey, dan masing-masing pubkey memiliki panjang 32 byte. Mengingat bahwa owner adalah field kedua, kita harus memulai memcmp kita pada offset 32 byte. Dari sini, kita akan mencari akun yang field ownernya cocok dengan address wallet kita.

    Account Size

    kita dapat memanggil query ini melalui contoh berikut:

    ',9),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as k,a as n,b as a,w as t,F as m,e as c,d as s}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const g={},f=c('

    Mendapatkan Akun Program (getProgramAccounts)

    adalah sebuah metode RPC untuk mendapatkan semua akun yang dimiliki oleh suatu program. Saat ini pagination tidak didukung. Request ke getProgramAccounts harus menyertakan parameter dataSlice dan/atau filters untuk mempercepat waktu respon dan hanya mengembalikan hasil yang diinginkan.

    Fakta

    ',3),h={class:"custom-container tip"},_=n("p",{class:"custom-container-title"},"Parameter",-1),y=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Pubkey dari program yang akan diambil, disediakan sebagai string yang di encode menggunakan base58")],-1),w=s("(opsional) "),A=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),C=s(" - Parameter konfigurasi yang berisi field opsional berikut: "),D=s("(opsional) "),T=n("code",null,"commitment",-1),E=s(": "),N=n("code",null,"string",-1),M=s(" - "),v={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("State commitment"),K=s("(opsional) "),j=n("code",null,"encoding",-1),G=s(": "),L=n("code",null,"string",-1),B=s(" - Encoding yang digunakan untuk data akun, baik: "),z=n("code",null,"base58",-1),x=s(", "),F=n("code",null,"base64",-1),H=s(", atau "),Z=n("code",null,"jsonParsed",-1),Q=s(". Catatan, pengguna web3js sebaiknya menggunakan "),U={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},W=s("getParsedProgramAccounts"),J=c("
  • (opsional) dataSlice: object - Membatasi jumlah data akun yang dikembalikan berdasarkan:
    • offset: number - Jumlah byte ke dalam data akun untuk mulai kembali
    • length: number - Jumlah byte data akun yang akan dikembalikan
  • (opsional) filters: array - Filter hasil menggunakan objek filter berikut:
    • memcmp: object - Untuk mencocokkan serangkaian byte dengan data akun:
      • offset: number - Posisi byte dalam data akun tempat dimulai perbandingannya
      • bytes: string - Data yang sedang dicocokkan berupa string yang di encode base58, dibatasi hingga 129 byte
    • dataSize: number - Membandingkan panjang data akun dengan ukuran data yang disediakan
  • ",2),V=s("(opsional) "),Y=n("code",null,"withContext",-1),X=s(": "),O=n("code",null,"boolean",-1),I=s(" - Untuk membungkus hasilnya dalam "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},$=s("object RpcResponse JSON"),nn=c('
    Response

    Secara default getProgramAccounts akan mengembalikan array dari objek JSON dengan struktur berikut:

    • pubkey: string - Pubkey akun berupa string yang diencode base58
    • account: object - sebuah objek JSON, dengan sub-field berikut:
      • lamports: number, jumlah lamport yang dimiliki sebuah akun
      • owner: string, Pubkey dengan encode base58 dari program tempat akun tersebut dipasangkan
      • data: string | object - data yang terkait dengan akun, baik berupa data biner yang telah diencode atau format JSON tergantung pada parameter jenis encoding yang diberikan
      • executable: boolean, untuk mengindikasi jika akun tersebut berisi sebuah program
      • rentEpoch: number, Epoch di mana akun ini selanjutnya akan berutang sewa

    Memahami lebih dalam

    getProgramAccounts adalah metode RPC serbaguna yang mendapatkan semua akun yang dimiliki oleh suatu program. Kita dapat menggunakan getProgramAccounts untuk sejumlah query yang berguna, seperti menemukan:

    ',5),sn=n("li",null,"Semua akun token untuk wallet tertentu",-1),an=s("Semua akun token untuk mint tertentu (yaitu Semua pemegang "),en={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},tn=s("SRM"),cn=s(")"),on=s("Semua akun khusus untuk program tertentu (yaitu Semua pengguna "),ln={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},pn=s("Mango"),un=s(")"),rn=c("

    Terlepas dari kegunaannya, getProgramAccounts sering disalahpahami karena batasannya saat ini. Banyak query yang didukung oleh getProgramAccounts memerlukan node RPC untuk melakukan scan dari kumpulan data yang besar. Proses scan ini membutuhkan memori dan sumber daya yang intensif. Akibatnya, pemanggilan yang terlalu sering atau terlalu besar cakupannya dapat mengakibatkan connection timeout. Selanjutnya, pada saat penulisan ini, endpoint dari getProgramAccounts tidak mendukung pagination. Jika hasil query terlalu besar, respons akan dipecah (truncate).

    Untuk mengatasi kendala saat ini, getProgramAccounts menawarkan sejumlah parameter yang berguna: yaitu, dataSlice dan opsi dari filters yaitu memcmp dan dataSize. Dengan memberikan kombinasi parameter ini, kita dapat mengurangi cakupan query kita menjadi ukuran yang dapat dikelola dan diprediksi.

    ",2),kn=s("Contoh umum dari "),mn=n("code",null,"getProgramAccounts",-1),bn=s(" melibatkan interaksi dengan "),dn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},gn=s("Program Token SPL"),fn=s(". Meminta semua akun yang dimiliki oleh Program Token dengan sebuah "),hn=s("basic call"),_n=s(" akan melibatkan sejumlah data yang besar. Namun, dengan memberikan parameter, kita dapat meminta hanya data yang ingin kita gunakan secara efisien."),yn=c('

    filters

    Parameter yang paling umum digunakan dengan getProgramAccounts adalah array dari filters. Array ini menerima dua jenis filter, yaitu dataSize dan memcmp. Sebelum menggunakan salah satu dari filter ini, kita harus terbiasa dengan bagaimana data yang kita minta ditata dan diserialisasi.

    dataSize

    ',3),wn=s("Dalam kasus Program Token, kita dapat melihat bahwa "),An={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Sn=s("akun token memiliki panjang 165 byte"),Pn=s(". Secara khusus, akun token memiliki delapan field yang berbeda, dengan masing-masing field membutuhkan jumlah byte yang dapat diprediksi. Kita dapat memvisualisasikan bagaimana data ini ditata menggunakan ilustrasi di bawah ini."),Cn=c('

    Account Size

    Jika kita ingin menemukan semua akun token yang dimiliki oleh address wallet kita, kita dapat menambahkan { dataSize: 165 } ke dalam array filters kita untuk memperkecil cakupan query kita menjadi hanya akun yang panjangnya tepat 165 byte. Namun, ini saja tidak akan cukup. kita juga perlu menambahkan filter untuk yang mencari akun yang dimiliki oleh address kita. Kita bisa mendapatkan ini dengan filter memcmp.

    memcmp

    Filter memcmp, atau filter "memory comparison", memungkinkan kita untuk membandingkan data di field mana pun yang tersimpan di akun kita. Secara khusus, kita hanya dapat melakukan query untuk akun yang cocok dengan sekumpulan byte tertentu pada posisi tertentu. memcmp membutuhkan dua argumen:

    • offset: Posisi untuk mulai membandingkan data. Posisi ini diukur dalam byte dan dinyatakan sebagai bilangan bulat.
    • bytes: Data yang harus cocok dengan data akun. Ini direpresentasikan dengan string yang diencode menggunakan base-58 dan harus berukuran kurang dari 129 byte.

    Penting untuk diperhatikan bahwa memcmp hanya akan mengembalikan hasil yang bagian dari datanya sama persis dengan bytes. Saat ini, memcmp tidak mendukung perbandingan untuk data yang kurang dari atau lebih besar dari bytes yang kita berikan.

    Sesuai dengan contoh Program Token kita, kita dapat mengubah query kita untuk hanya mengembalikan akun token yang dimiliki oleh address wallet kita. Saat melihat akun token, kita dapat melihat dua field pertama yang disimpan di akun token adalah pubkey, dan masing-masing pubkey memiliki panjang 32 byte. Mengingat bahwa owner adalah field kedua, kita harus memulai memcmp kita pada offset 32 byte. Dari sini, kita akan mencari akun yang field ownernya cocok dengan address wallet kita.

    Account Size

    kita dapat memanggil query ini melalui contoh berikut:

    ',9),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.a9d0e53c.js b/docs/.vuepress/dist/assets/get-program-accounts.html.7d92e55d.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.a9d0e53c.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.7d92e55d.js index 1ee4b8fe3..791e82767 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.a9d0e53c.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.7d92e55d.js @@ -1,4 +1,4 @@ -import{_ as r,r as l,o as i,c as m,a as n,b as a,w as t,F as b,d as s,e as c}from"./app.07ce7a66.js";var k="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},g=n("h1",{id:"obtener-cuentas-de-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtener-cuentas-de-programa","aria-hidden":"true"},"#"),s(" Obtener cuentas de programa")],-1),_=n("p",null,[s("Existe un m\xE9todo RPC que devuelve todas las cuentas que son propiedad de un programa. Actualmente no se admite la paginaci\xF3n. Las solicitudes a "),n("code",null,"getProgramAccounts"),s(" deben incluir los par\xE1metros "),n("code",null,"dataSlice"),s(" y/o "),n("code",null,"filters"),s(" para mejorar el tiempo de respuesta y devolver solo los resultados que se necesitan.")],-1),h=n("h2",{id:"hechos",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),s(" Hechos")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Par\xE1metros",-1),w=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Llave p\xFAblica del programa a consultar, codificada en base58")],-1),v=s("(optional) "),C=n("code",null,"configOrCommitment",-1),P=s(": "),S=n("code",null,"object",-1),T=s(" - Par\xE1metros de configuraci\xF3n que contienen los siguientes campos opcionales: "),E=s("(optional) "),D=n("code",null,"commitment",-1),N=s(": "),L=n("code",null,"string",-1),z=s(" - "),M={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("Compromiso del estado (state commitment)"),K=s("(optional) "),G=n("code",null,"encoding",-1),x=s(": "),B=n("code",null,"string",-1),q=s(" - La codificaci\xF3n para los datos de la cuenta, puede ser: "),j=n("code",null,"base58",-1),H=s(", "),F=n("code",null,"base64",-1),Z=s(", or "),Q=n("code",null,"jsonParsed",-1),U=s(". Los usuarios de web3js deben usar "),W={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},V=s("getParsedProgramAccounts"),O=c("
  • (optional) dataSlice: object - Configuraci\xF3n para limitar los datos que se retornan:
    • offset: number - N\xFAmero de bytes en los datos de la cuenta donde iniciar
    • length: number - N\xFAmero de bytes de datos de la cuenta a devolver
  • (optional) filters: array - Configuraci\xF3n para filtrar los resultados:
    • memcmp: object - Coincidencia de bytes con los datos de la cuenta:
      • offset: number - N\xFAmero de bytes en los datos de la cuenta donde empezar a comparar
      • bytes: string - Datos a comparar, como cadena codificada en base58 limitada a 129 bytes
    • dataSize: number - Compara la longitud de los datos de la cuenta con el tama\xF1o de datos proporcionado
  • ",2),Y=s("(optional) "),J=n("code",null,"withContext",-1),X=s(": "),I=n("code",null,"boolean",-1),$=s(" - Envuelve el resultado en un "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},sn=s("Objeto JSON RpcResponse"),an=c('
    Respuesta

    Por defecto getProgramAccounts devolver\xE1 una matriz de objetos JSON con la siguiente estructura:

    • pubkey: string - La clave p\xFAblica de la cuenta codificada en base58
    • account: object - un objeto JSON, con los siguientes subcampos:
      • lamports: number - n\xFAmero de lamports asignado a la cuenta
      • owner: string - La clave p\xFAblica del programa al que se ha asignado la cuenta codificada en base58
      • data: string | object - datos asociados con la cuenta, ya sea como datos binarios o en formato JSON seg\xFAn el par\xE1metro de codificaci\xF3n proporcionado
      • executable: boolean - Indicaci\xF3n si la cuenta contiene un programa
      • rentEpoch: number - La \xE9poca en la que esta cuenta adeudar\xE1 alquiler
    ',3),en=n("h2",{id:"un-vistazo-mas-profundo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#un-vistazo-mas-profundo","aria-hidden":"true"},"#"),s(" Un vistazo m\xE1s profundo")],-1),tn=n("p",null,[n("code",null,"getProgramAccounts"),s(" es un m\xE9todo RPC vers\xE1til que devuelve todas las cuentas propiedad de un programa. Podemos usar "),n("code",null,"getProgramAccounts"),s(" para una serie de consultas \xFAtiles, como encontrar:")],-1),on=n("li",null,"Todas las cuentas de token para una billetera en particular",-1),cn=s("Todas las cuentas para un mint en particular (ej. Todos los titulares (holders) de "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=s("SRM"),un=s(")"),rn=s("Todas las cuentas para un programa en particular (ej. Todos los usuarios de "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),kn=s(")"),dn=c("

    A pesar de su utilidad, getProgramAccounts a menudo se malinterpreta debido a sus limitaciones actuales. Muchas de las consultas admitidas por getProgramAccounts requieren nodos RPC para escanear grandes conjuntos de datos. Estos escaneos consumen muchos recursos y memoria. Como resultado, las llamadas que son demasiado frecuentes o de un alcance demasiado grande pueden provocar tiempos de espera mayores al permitido (timeouts). Adem\xE1s, en el momento de escribir este art\xEDculo, el extremo getProgramAccounts no admite la paginaci\xF3n. Si los resultados de una consulta son demasiado grandes, la respuesta se truncar\xE1.

    Para resolver temporalmente estas restricciones, getProgramAccounts ofrece una serie de par\xE1metros \xFAtiles: por ejemplo, dataSlice y las opciones de filtros memcmp y dataSize. Al proporcionar combinaciones de estos par\xE1metros, podemos reducir el alcance de nuestras consultas a tama\xF1os manejables y predecibles.

    ",2),fn=s("Un ejemplo com\xFAn de "),gn=n("code",null,"getProgramAccounts",-1),_n=s(" consiste en interactuar con el "),hn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("Programa de tokens SPL"),An=s(". Solicitar todas las cuentas propiedad del Programa Token con una "),wn=s("llamada b\xE1sica"),vn=s(" implicar\xEDa una enorme cantidad de datos. Sin embargo, al proporcionar par\xE1metros, podemos solicitar de manera eficiente solo los datos que pretendemos utilizar."),Cn=c('

    filters

    El par\xE1metro m\xE1s com\xFAn para usar con getProgramAccounts es la matriz filters. Esta matriz acepta dos tipos de filtros, dataSize y memcmp. Antes de usar cualquiera de estos filtros, debemos estar familiarizados con la forma en que se distribuyen y serializan los datos que solicitamos.

    dataSize

    ',3),Pn=s("En el caso del Programa Token (Token Program), podemos ver que "),Sn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Tn=s("las cuentas de token tienen una longitud de 165 bytes"),En=s(". Espec\xEDficamente, una cuenta de token tiene ocho campos diferentes, y cada campo requiere una cantidad predecible de bytes. Podemos visualizar c\xF3mo se distribuyen estos datos usando la siguiente ilustraci\xF3n."),Dn=c('

    Tama\xF1o de la cuenta

    Si quisi\xE9ramos encontrar todas las cuentas de token que pertenecen a nuestra direcci\xF3n de billetera, podr\xEDamos agregar { dataSize: 165 } a nuestra matriz de filtros para limitar el alcance de nuestra consulta a solo cuentas que tengan exactamente 165 bytes de longitud. Esto solo, sin embargo, ser\xEDa insuficiente. Tambi\xE9n necesitar\xEDamos agregar un filtro que busque cuentas propiedad de nuestra direcci\xF3n. Podemos lograr esto con el filtro memcmp.

    memcmp

    El filtro memcmp, o filtro de "comparaci\xF3n de memoria", nos permite comparar datos en cualquier campo almacenado en nuestra cuenta. Espec\xEDficamente, solo podemos consultar cuentas que coincidan con un conjunto de bytes en una posici\xF3n espec\xEDfica. memcmp requiere dos argumentos:

    • offset: La posici\xF3n para comenzar a comparar datos. Esta posici\xF3n se mide en bytes y se expresa como un n\xFAmero entero.
    • bytes: Los datos que deben coincidir con los datos de la cuenta. Esto se representa como una cadena codificada en base 58 que debe limitarse a menos de 129 bytes.

    Es importante tener en cuenta que memcmp solo devolver\xE1 resultados que coincidan exactamente en bytes. Actualmente, no admite comparaciones de valores menores o mayores que los "bytes" que proporcionamos.

    De acuerdo con nuestro ejemplo del Programa de tokens, podemos modificar nuestra consulta para que solo devuelva las cuentas de tokens que pertenecen a nuestra direcci\xF3n de billetera. Al observar una cuenta de token, podemos ver que los dos primeros campos almacenados en una cuenta de token son claves p\xFAblicas y que cada clave p\xFAblica tiene una longitud de 32 bytes. Dado que owner es el segundo campo, deber\xEDamos comenzar nuestro memcmp en un offset de 32 bytes. A partir de aqu\xED, buscaremos cuentas cuyo campo de propietario coincida con la direcci\xF3n de nuestra billetera.

    Tama\xF1o de la cuenta

    Podemos hacer esta b\xFAsqueda utilizando el siguiente ejemplo:

    ',9),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as r,r as l,o as i,c as m,a as n,b as a,w as t,F as b,d as s,e as c}from"./app.d411e3b3.js";var k="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},g=n("h1",{id:"obtener-cuentas-de-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtener-cuentas-de-programa","aria-hidden":"true"},"#"),s(" Obtener cuentas de programa")],-1),_=n("p",null,[s("Existe un m\xE9todo RPC que devuelve todas las cuentas que son propiedad de un programa. Actualmente no se admite la paginaci\xF3n. Las solicitudes a "),n("code",null,"getProgramAccounts"),s(" deben incluir los par\xE1metros "),n("code",null,"dataSlice"),s(" y/o "),n("code",null,"filters"),s(" para mejorar el tiempo de respuesta y devolver solo los resultados que se necesitan.")],-1),h=n("h2",{id:"hechos",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),s(" Hechos")],-1),y={class:"custom-container tip"},A=n("p",{class:"custom-container-title"},"Par\xE1metros",-1),w=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Llave p\xFAblica del programa a consultar, codificada en base58")],-1),v=s("(optional) "),C=n("code",null,"configOrCommitment",-1),P=s(": "),S=n("code",null,"object",-1),T=s(" - Par\xE1metros de configuraci\xF3n que contienen los siguientes campos opcionales: "),E=s("(optional) "),D=n("code",null,"commitment",-1),N=s(": "),L=n("code",null,"string",-1),z=s(" - "),M={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("Compromiso del estado (state commitment)"),K=s("(optional) "),G=n("code",null,"encoding",-1),x=s(": "),B=n("code",null,"string",-1),q=s(" - La codificaci\xF3n para los datos de la cuenta, puede ser: "),j=n("code",null,"base58",-1),H=s(", "),F=n("code",null,"base64",-1),Z=s(", or "),Q=n("code",null,"jsonParsed",-1),U=s(". Los usuarios de web3js deben usar "),W={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},V=s("getParsedProgramAccounts"),O=c("
  • (optional) dataSlice: object - Configuraci\xF3n para limitar los datos que se retornan:
    • offset: number - N\xFAmero de bytes en los datos de la cuenta donde iniciar
    • length: number - N\xFAmero de bytes de datos de la cuenta a devolver
  • (optional) filters: array - Configuraci\xF3n para filtrar los resultados:
    • memcmp: object - Coincidencia de bytes con los datos de la cuenta:
      • offset: number - N\xFAmero de bytes en los datos de la cuenta donde empezar a comparar
      • bytes: string - Datos a comparar, como cadena codificada en base58 limitada a 129 bytes
    • dataSize: number - Compara la longitud de los datos de la cuenta con el tama\xF1o de datos proporcionado
  • ",2),Y=s("(optional) "),J=n("code",null,"withContext",-1),X=s(": "),I=n("code",null,"boolean",-1),$=s(" - Envuelve el resultado en un "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},sn=s("Objeto JSON RpcResponse"),an=c('
    Respuesta

    Por defecto getProgramAccounts devolver\xE1 una matriz de objetos JSON con la siguiente estructura:

    • pubkey: string - La clave p\xFAblica de la cuenta codificada en base58
    • account: object - un objeto JSON, con los siguientes subcampos:
      • lamports: number - n\xFAmero de lamports asignado a la cuenta
      • owner: string - La clave p\xFAblica del programa al que se ha asignado la cuenta codificada en base58
      • data: string | object - datos asociados con la cuenta, ya sea como datos binarios o en formato JSON seg\xFAn el par\xE1metro de codificaci\xF3n proporcionado
      • executable: boolean - Indicaci\xF3n si la cuenta contiene un programa
      • rentEpoch: number - La \xE9poca en la que esta cuenta adeudar\xE1 alquiler
    ',3),en=n("h2",{id:"un-vistazo-mas-profundo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#un-vistazo-mas-profundo","aria-hidden":"true"},"#"),s(" Un vistazo m\xE1s profundo")],-1),tn=n("p",null,[n("code",null,"getProgramAccounts"),s(" es un m\xE9todo RPC vers\xE1til que devuelve todas las cuentas propiedad de un programa. Podemos usar "),n("code",null,"getProgramAccounts"),s(" para una serie de consultas \xFAtiles, como encontrar:")],-1),on=n("li",null,"Todas las cuentas de token para una billetera en particular",-1),cn=s("Todas las cuentas para un mint en particular (ej. Todos los titulares (holders) de "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=s("SRM"),un=s(")"),rn=s("Todas las cuentas para un programa en particular (ej. Todos los usuarios de "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),kn=s(")"),dn=c("

    A pesar de su utilidad, getProgramAccounts a menudo se malinterpreta debido a sus limitaciones actuales. Muchas de las consultas admitidas por getProgramAccounts requieren nodos RPC para escanear grandes conjuntos de datos. Estos escaneos consumen muchos recursos y memoria. Como resultado, las llamadas que son demasiado frecuentes o de un alcance demasiado grande pueden provocar tiempos de espera mayores al permitido (timeouts). Adem\xE1s, en el momento de escribir este art\xEDculo, el extremo getProgramAccounts no admite la paginaci\xF3n. Si los resultados de una consulta son demasiado grandes, la respuesta se truncar\xE1.

    Para resolver temporalmente estas restricciones, getProgramAccounts ofrece una serie de par\xE1metros \xFAtiles: por ejemplo, dataSlice y las opciones de filtros memcmp y dataSize. Al proporcionar combinaciones de estos par\xE1metros, podemos reducir el alcance de nuestras consultas a tama\xF1os manejables y predecibles.

    ",2),fn=s("Un ejemplo com\xFAn de "),gn=n("code",null,"getProgramAccounts",-1),_n=s(" consiste en interactuar con el "),hn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("Programa de tokens SPL"),An=s(". Solicitar todas las cuentas propiedad del Programa Token con una "),wn=s("llamada b\xE1sica"),vn=s(" implicar\xEDa una enorme cantidad de datos. Sin embargo, al proporcionar par\xE1metros, podemos solicitar de manera eficiente solo los datos que pretendemos utilizar."),Cn=c('

    filters

    El par\xE1metro m\xE1s com\xFAn para usar con getProgramAccounts es la matriz filters. Esta matriz acepta dos tipos de filtros, dataSize y memcmp. Antes de usar cualquiera de estos filtros, debemos estar familiarizados con la forma en que se distribuyen y serializan los datos que solicitamos.

    dataSize

    ',3),Pn=s("En el caso del Programa Token (Token Program), podemos ver que "),Sn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Tn=s("las cuentas de token tienen una longitud de 165 bytes"),En=s(". Espec\xEDficamente, una cuenta de token tiene ocho campos diferentes, y cada campo requiere una cantidad predecible de bytes. Podemos visualizar c\xF3mo se distribuyen estos datos usando la siguiente ilustraci\xF3n."),Dn=c('

    Tama\xF1o de la cuenta

    Si quisi\xE9ramos encontrar todas las cuentas de token que pertenecen a nuestra direcci\xF3n de billetera, podr\xEDamos agregar { dataSize: 165 } a nuestra matriz de filtros para limitar el alcance de nuestra consulta a solo cuentas que tengan exactamente 165 bytes de longitud. Esto solo, sin embargo, ser\xEDa insuficiente. Tambi\xE9n necesitar\xEDamos agregar un filtro que busque cuentas propiedad de nuestra direcci\xF3n. Podemos lograr esto con el filtro memcmp.

    memcmp

    El filtro memcmp, o filtro de "comparaci\xF3n de memoria", nos permite comparar datos en cualquier campo almacenado en nuestra cuenta. Espec\xEDficamente, solo podemos consultar cuentas que coincidan con un conjunto de bytes en una posici\xF3n espec\xEDfica. memcmp requiere dos argumentos:

    • offset: La posici\xF3n para comenzar a comparar datos. Esta posici\xF3n se mide en bytes y se expresa como un n\xFAmero entero.
    • bytes: Los datos que deben coincidir con los datos de la cuenta. Esto se representa como una cadena codificada en base 58 que debe limitarse a menos de 129 bytes.

    Es importante tener en cuenta que memcmp solo devolver\xE1 resultados que coincidan exactamente en bytes. Actualmente, no admite comparaciones de valores menores o mayores que los "bytes" que proporcionamos.

    De acuerdo con nuestro ejemplo del Programa de tokens, podemos modificar nuestra consulta para que solo devuelva las cuentas de tokens que pertenecen a nuestra direcci\xF3n de billetera. Al observar una cuenta de token, podemos ver que los dos primeros campos almacenados en una cuenta de token son claves p\xFAblicas y que cada clave p\xFAblica tiene una longitud de 32 bytes. Dado que owner es el segundo campo, deber\xEDamos comenzar nuestro memcmp en un offset de 32 bytes. A partir de aqu\xED, buscaremos cuentas cuyo campo de propietario coincida con la direcci\xF3n de nuestra billetera.

    Tama\xF1o de la cuenta

    Podemos hacer esta b\xFAsqueda utilizando el siguiente ejemplo:

    ',9),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.b068cc8a.js b/docs/.vuepress/dist/assets/get-program-accounts.html.99c15661.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.b068cc8a.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.99c15661.js index 748bf3b57..d0e7a81d3 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.b068cc8a.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.99c15661.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as m,a as n,b as a,w as t,F as b,d as s,e as o}from"./app.07ce7a66.js";var k="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},h=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("An RPC method that returns all accounts owned by a program. Currently pagination is not supported. Requests to "),n("code",null,"getProgramAccounts"),s(" should include the "),n("code",null,"dataSlice"),s(" and/or "),n("code",null,"filters"),s(" parameters to improve response time and return only intended results.")],-1),_=n("h2",{id:"facts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),s(" Facts")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Parameters",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Pubkey of the program to query, provided as a base58 encoded string")],-1),T=s("(optional) "),C=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),v=s(" - Configuration parameters containing the following optional fields: "),D=s("(optional) "),E=n("code",null,"commitment",-1),N=s(": "),M=n("code",null,"string",-1),R=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),B=s("(optional) "),L=n("code",null,"encoding",-1),x=s(": "),z=n("code",null,"string",-1),F=s(" - Encoding for account data, either: "),H=n("code",null,"base58",-1),W=s(", "),Z=n("code",null,"base64",-1),Q=s(", or "),U=n("code",null,"jsonParsed",-1),j=s(". Note, web3js users should instead use "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},I=s("getParsedProgramAccounts"),O=o("
  • (optional) dataSlice: object - Limit the returned account data based on:
    • offset: number - Number of bytes into account data to begin returning
    • length: number - Number of bytes of account data to return
  • (optional) filters: array - Filter results using the following filter objects:
    • memcmp: object - Match a series of bytes to account data:
      • offset: number - Number of bytes into account data to begin comparing
      • bytes: string - Data to match, as base58 encoded string limited to 129 bytes
    • dataSize: number - Compares the account data length with the provided data size
  • ",2),Y=s("(optional) "),J=n("code",null,"withContext",-1),X=s(": "),q=n("code",null,"boolean",-1),$=s(" - Wrap the result in an "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},sn=s("RpcResponse JSON object"),an=o('
    Response

    By default getProgramAccounts will return an array of JSON objects with the following structure:

    • pubkey: string - The account pubkey as a base58 encoded string
    • account: object - a JSON object, with the following sub fields:
      • lamports: number, number of lamports assigned to the account
      • owner: string, The base58 encoded pubkey of the program the account has been assigned to
      • data: string | object - data associated with the account, either as encoded binary data or JSON format depending on the provided encoding parameter
      • executable: boolean, Indication if the account contains a program
      • rentEpoch: number, The epoch at which this account will next owe rent
    ',3),en=n("h2",{id:"deep-dive",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),s(" Deep Dive")],-1),tn=n("p",null,[n("code",null,"getProgramAccounts"),s(" is a versatile RPC method that returns all accounts owned by a program. We can use "),n("code",null,"getProgramAccounts"),s(" for a number of useful queries, such as finding:")],-1),cn=n("li",null,"All token accounts for a particular wallet",-1),on=s("All token accounts for a particular mint (i.e. All "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=s("SRM"),un=s(" holders)"),rn=s("All custom accounts for a particular program (i.e. All "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),kn=s(" users)"),dn=o("

    Despite its usefulness, getProgramAccounts is often misunderstood due to its current constraints. Many of the queries supported by getProgramAccounts require RPC nodes to scan large sets of data. These scans are both memory and resource intensive. As a result, calls that are too frequent or too large in scope can result in connection timeouts. Furthermore, at the time of this writing, the getProgramAccounts endpoint does not support pagination. If the results of a query are too large, the response will be truncated.

    To get around these current constraints, getProgramAccounts offers a number of useful parameters: namely, dataSlice and the filters options memcmp and dataSize. By providing combinations of these parameters, we can reduce the scope of our queries down to manageable and predictable sizes.

    ",2),fn=s("A common example of "),hn=n("code",null,"getProgramAccounts",-1),gn=s(" involves interacting with the "),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("SPL-Token Program"),wn=s(". Requesting all accounts owned by the Token Program with a "),An=s("basic call"),Tn=s(" would involve an enormous amount of data. By providing parameters, however, we can efficiently request just the data we intend to use."),Cn=o('

    filters

    The most common parameter to use with getProgramAccounts is the filters array. This array accepts two types of filters,dataSize and memcmp. Before using either of these filters, we should be familiar with how the data we are requesting is laid out and serialized.

    dataSize

    ',3),Sn=s("In the case of the Token Program, we can see that "),Pn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},vn=s("token accounts are 165 bytes in length"),Dn=s(". Specifically, a token account has eight different fields, with each field requiring a predictable number of bytes. We can visualize how this data is laid out using the below illustration."),En=o('

    Account Size

    If we wanted to find all token accounts owned by our wallet address, we could add { dataSize: 165 } to our filters array to narrow the scope of our query to just accounts that are exactly 165 bytes in length. This alone, however, would be insufficient. We would also need to add a filter that looks for accounts owned by our address. We can achieve this with the memcmp filter.

    memcmp

    The memcmp filter, or "memory comparison" filter, allows us to compare data at any field stored on our account. Specifically, we can query only for accounts that match a particular set of bytes at a particular position. memcmp requires two arguments:

    • offset: The position at which to begin comparing data. This position is measured in bytes and is expressed as an integer.
    • bytes: The data that should match the account's data. This is represented as a base-58 encoded string should be limited to less than 129 bytes.

    It's important to note that memcmp will only return results that are an exact match on bytes. Currently, it does not support comparisons for values that are less than or greater than the bytes we provide.

    In keeping with our Token Program example, we can amend our query to only return token accounts that are owned by our wallet address. When looking at a token account, we can see the first two fields stored on a token account are both pubkeys, and that each pubkey is 32 bytes in length. Given that owner is the second field, we should begin our memcmp at an offset of 32 bytes. From here, we\u2019ll be looking for accounts whose owner field matches our wallet address.

    Account Size

    We can invoke this query via the following example:

    ',9),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as i,r as l,o as r,c as m,a as n,b as a,w as t,F as b,d as s,e as o}from"./app.d411e3b3.js";var k="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},h=n("h1",{id:"get-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-program-accounts","aria-hidden":"true"},"#"),s(" Get Program Accounts")],-1),g=n("p",null,[s("An RPC method that returns all accounts owned by a program. Currently pagination is not supported. Requests to "),n("code",null,"getProgramAccounts"),s(" should include the "),n("code",null,"dataSlice"),s(" and/or "),n("code",null,"filters"),s(" parameters to improve response time and return only intended results.")],-1),_=n("h2",{id:"facts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),s(" Facts")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Parameters",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - Pubkey of the program to query, provided as a base58 encoded string")],-1),T=s("(optional) "),C=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),v=s(" - Configuration parameters containing the following optional fields: "),D=s("(optional) "),E=n("code",null,"commitment",-1),N=s(": "),M=n("code",null,"string",-1),R=s(" - "),K={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},G=s("State commitment"),B=s("(optional) "),L=n("code",null,"encoding",-1),x=s(": "),z=n("code",null,"string",-1),F=s(" - Encoding for account data, either: "),H=n("code",null,"base58",-1),W=s(", "),Z=n("code",null,"base64",-1),Q=s(", or "),U=n("code",null,"jsonParsed",-1),j=s(". Note, web3js users should instead use "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},I=s("getParsedProgramAccounts"),O=o("
  • (optional) dataSlice: object - Limit the returned account data based on:
    • offset: number - Number of bytes into account data to begin returning
    • length: number - Number of bytes of account data to return
  • (optional) filters: array - Filter results using the following filter objects:
    • memcmp: object - Match a series of bytes to account data:
      • offset: number - Number of bytes into account data to begin comparing
      • bytes: string - Data to match, as base58 encoded string limited to 129 bytes
    • dataSize: number - Compares the account data length with the provided data size
  • ",2),Y=s("(optional) "),J=n("code",null,"withContext",-1),X=s(": "),q=n("code",null,"boolean",-1),$=s(" - Wrap the result in an "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},sn=s("RpcResponse JSON object"),an=o('
    Response

    By default getProgramAccounts will return an array of JSON objects with the following structure:

    • pubkey: string - The account pubkey as a base58 encoded string
    • account: object - a JSON object, with the following sub fields:
      • lamports: number, number of lamports assigned to the account
      • owner: string, The base58 encoded pubkey of the program the account has been assigned to
      • data: string | object - data associated with the account, either as encoded binary data or JSON format depending on the provided encoding parameter
      • executable: boolean, Indication if the account contains a program
      • rentEpoch: number, The epoch at which this account will next owe rent
    ',3),en=n("h2",{id:"deep-dive",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),s(" Deep Dive")],-1),tn=n("p",null,[n("code",null,"getProgramAccounts"),s(" is a versatile RPC method that returns all accounts owned by a program. We can use "),n("code",null,"getProgramAccounts"),s(" for a number of useful queries, such as finding:")],-1),cn=n("li",null,"All token accounts for a particular wallet",-1),on=s("All token accounts for a particular mint (i.e. All "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=s("SRM"),un=s(" holders)"),rn=s("All custom accounts for a particular program (i.e. All "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},bn=s("Mango"),kn=s(" users)"),dn=o("

    Despite its usefulness, getProgramAccounts is often misunderstood due to its current constraints. Many of the queries supported by getProgramAccounts require RPC nodes to scan large sets of data. These scans are both memory and resource intensive. As a result, calls that are too frequent or too large in scope can result in connection timeouts. Furthermore, at the time of this writing, the getProgramAccounts endpoint does not support pagination. If the results of a query are too large, the response will be truncated.

    To get around these current constraints, getProgramAccounts offers a number of useful parameters: namely, dataSlice and the filters options memcmp and dataSize. By providing combinations of these parameters, we can reduce the scope of our queries down to manageable and predictable sizes.

    ",2),fn=s("A common example of "),hn=n("code",null,"getProgramAccounts",-1),gn=s(" involves interacting with the "),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=s("SPL-Token Program"),wn=s(". Requesting all accounts owned by the Token Program with a "),An=s("basic call"),Tn=s(" would involve an enormous amount of data. By providing parameters, however, we can efficiently request just the data we intend to use."),Cn=o('

    filters

    The most common parameter to use with getProgramAccounts is the filters array. This array accepts two types of filters,dataSize and memcmp. Before using either of these filters, we should be familiar with how the data we are requesting is laid out and serialized.

    dataSize

    ',3),Sn=s("In the case of the Token Program, we can see that "),Pn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},vn=s("token accounts are 165 bytes in length"),Dn=s(". Specifically, a token account has eight different fields, with each field requiring a predictable number of bytes. We can visualize how this data is laid out using the below illustration."),En=o('

    Account Size

    If we wanted to find all token accounts owned by our wallet address, we could add { dataSize: 165 } to our filters array to narrow the scope of our query to just accounts that are exactly 165 bytes in length. This alone, however, would be insufficient. We would also need to add a filter that looks for accounts owned by our address. We can achieve this with the memcmp filter.

    memcmp

    The memcmp filter, or "memory comparison" filter, allows us to compare data at any field stored on our account. Specifically, we can query only for accounts that match a particular set of bytes at a particular position. memcmp requires two arguments:

    • offset: The position at which to begin comparing data. This position is measured in bytes and is expressed as an integer.
    • bytes: The data that should match the account's data. This is represented as a base-58 encoded string should be limited to less than 129 bytes.

    It's important to note that memcmp will only return results that are an exact match on bytes. Currently, it does not support comparisons for values that are less than or greater than the bytes we provide.

    In keeping with our Token Program example, we can amend our query to only return token accounts that are owned by our wallet address. When looking at a token account, we can see the first two fields stored on a token account are both pubkeys, and that each pubkey is 32 bytes in length. Given that owner is the second field, we should begin our memcmp at an offset of 32 bytes. From here, we\u2019ll be looking for accounts whose owner field matches our wallet address.

    Account Size

    We can invoke this query via the following example:

    ',9),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.5f716fa3.js b/docs/.vuepress/dist/assets/get-program-accounts.html.b6c20980.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.5f716fa3.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.b6c20980.js index f6dad9730..ae71fcfc8 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.5f716fa3.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.b6c20980.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.07ce7a66.js";var m="/assets/account-size.398f17bf.png",b="/assets/memcmp.c5e1f050.png";const d={},f=n("h1",{id:"\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236","aria-hidden":"true"},"#"),s(" \u7372\u53D6\u7A0B\u5E8F\u5E33\u6236")],-1),_=n("p",null,[s("\u4E00\u500B\u8FD4\u56DE\u7A0B\u5E8F\u6240\u64C1\u6709\u7684\u8CEC\u6236\u7684RPC\u65B9\u6CD5\u3002\u76EE\u524D\u4E0D\u652F\u6301\u5206\u9801\u3002\u8ACB\u6C42"),n("code",null,"getProgramAccounts"),s("\u61C9\u8A72\u5305\u62EC"),n("code",null,"dataSlice"),s("\u548C/\u6216"),n("code",null,"filters"),s("\u53C3\u6578\uFF0C\u4EE5\u63D0\u9AD8\u97FF\u61C9\u6642\u9593\u4E26\u8FD4\u56DE\u53EA\u6709\u9810\u671F\u7D50\u679C\u7684\u5167\u5BB9\u3002")],-1),g=n("h2",{id:"\u7D9C\u8FF0",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7D9C\u8FF0","aria-hidden":"true"},"#"),s(" \u7D9C\u8FF0")],-1),h={class:"custom-container tip"},y=n("p",{class:"custom-container-title"},"\u53C3\u6578",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - \u8981\u67E5\u8A62\u7684\u7A0B\u5E8F\u7684\u516C\u9470\uFF0C\u4EE5base58\u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\u63D0\u4F9B\u3002")],-1),w=s("(\u53EF\u9078) "),C=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),T=s(" - \u5305\u542B\u4EE5\u4E0B\u53EF\u9078\u5B57\u6BB5\u7684\u914D\u7F6E\u53C3\u6578\uFF1A "),D=s("(\u53EF\u9078) "),E=n("code",null,"commitment",-1),N=s(": "),v=n("code",null,"string",-1),M=s(" - "),R={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},K=s("\u72C0\u614B\u627F\u8AFE/State commitment"),G=s("(\u53EF\u9078) "),L=n("code",null,"encoding",-1),B=s(": "),z=n("code",null,"string",-1),x=s(" - \u8CEC\u6236\u6578\u64DA\u7684\u7DE8\u78BC\u65B9\u5F0F\uFF0C\u53EF\u4EE5\u662F\uFF1A "),F=n("code",null,"base58",-1),H=s(", "),Z=n("code",null,"base64",-1),Q=s(", \u6216 "),U=n("code",null,"jsonParsed",-1),W=s(". \u8ACB\u6CE8\u610F web3js \u7528\u6236\u61C9\u6539\u7528 "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},j=s("getParsedProgramAccounts"),Y=o("
  • (\u53EF\u9078) dataSlice: object - \u6839\u64DA\u4EE5\u4E0B\u5167\u5BB9\u9650\u5236\u8FD4\u56DE\u7684\u8CEC\u6236\u6578\u64DA\uFF1A
    • offset: number - \u958B\u59CB\u8FD4\u56DE\u8CEC\u6236\u6578\u64DA\u7684\u5B57\u7BC0\u6578
    • length: number - \u8981\u8FD4\u56DE\u7684\u8CEC\u6236\u6578\u64DA\u7684\u5B57\u7BC0\u6578
  • (\u53EF\u9078) filters: array - \u4F7F\u7528\u4EE5\u4E0B\u904E\u6FFE\u5668\u5C0D\u8C61\u5C0D\u7D50\u679C\u9032\u884C\u904E\u6FFE\uFF1A
    • memcmp: object - \u5C07\u4E00\u7CFB\u5217\u5B57\u7BC0\u8207\u8CEC\u6236\u6578\u64DA\u5339\u914D\uFF1A
      • offset: number - \u958B\u59CB\u6BD4\u8F03\u7684\u8CEC\u6236\u6578\u64DA\u5B57\u7BC0\u504F\u79FB\u91CF
      • bytes: string - \u8981\u5339\u914D\u7684\u6578\u64DA\uFF0C\u4EE5base58\u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\uFF0C\u9650\u5236\u7232129\u500B\u5B57\u7BC0
    • dataSize: number - \u5C07\u8CEC\u6236\u6578\u64DA\u7684\u9577\u5EA6\u8207\u63D0\u4F9B\u7684\u6578\u64DA\u5927\u5C0F\u9032\u884C\u6BD4\u8F03
  • ",2),J=s("(\u53EF\u9078) "),X=n("code",null,"withContext",-1),O=s(": "),I=n("code",null,"boolean",-1),$=s(" - \u5C07\u7D50\u679C\u5305\u88DD\u5728\u4E00\u500B "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},nn=s("RpcResponse JSON object"),sn=o('
    \u97FF\u61C9

    \u9ED8\u8A8D\u60C5\u6CC1\u4E0B\uFF0CgetProgramAccounts\u5C07\u8FD4\u56DE\u4E00\u500B\u5177\u6709\u4EE5\u4E0B\u7D50\u69CB\u7684 JSON \u5C0D\u8C61\u6578\u7D44\uFF1A

    • pubkey: string - \u8CEC\u6236\u516C\u9470\uFF0C\u4EE5 base58 \u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F
    • account: object - \u4E00\u500B\u5305\u542B\u4EE5\u4E0B\u5B50\u5B57\u6BB5\u7684 JSON \u5C0D\u8C61\uFF1A
      • lamports: number, \u5206\u914D\u7D66\u8CEC\u6236\u7684 lamports \u6578\u91CF
      • owner: string, \u8CEC\u6236\u6240\u5206\u914D\u7684\u7A0B\u5E8F\u7684 base58 \u7DE8\u78BC\u7684\u516C\u9470
      • data: string | object - \u8207\u8CEC\u6236\u95DC\u806F\u7684\u6578\u64DA\uFF0C\u6839\u64DA\u63D0\u4F9B\u7684\u7DE8\u78BC\u53C3\u6578\uFF0C\u53EF\u4EE5\u662F\u7DE8\u78BC\u7684\u4E8C\u9032\u5236\u6578\u64DA\u6216 JSON \u683C\u5F0F parameter
      • executable: boolean, \u6307\u793A\u8CEC\u6236\u662F\u5426\u5305\u542B\u7740\u7A0B\u5E8F
      • rentEpoch: number, \u8A72\u8CEC\u6236\u4E0B\u6B21\u9700\u8981\u652F\u4ED8\u79DF\u91D1\u7684\u7D00\u5143\uFF08epoch\uFF09
    ',3),an=n("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),s(" \u6DF1\u5165")],-1),en=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u662F\u4E00\u500B\u591A\u529F\u80FD\u7684RPC\u65B9\u6CD5\uFF0C\u7528\u65BC\u8FD4\u56DE\u7531\u7A0B\u5E8F\u64C1\u6709\u7684\u6240\u6709\u8CEC\u6236\u3002\u6211\u5011\u53EF\u4EE5\u5229\u7528"),n("code",null,"getProgramAccounts"),s("\u9032\u884C\u8A31\u591A\u6709\u7528\u7684\u67E5\u8A62\uFF0C\u4F8B\u5982\u67E5\u627E\uFF1A")],-1),tn=n("li",null,"\u7279\u5B9A\u9322\u5305\u7684\u6240\u6709\u4EE3\u5E63\u8CEC\u6236",-1),cn=s("\u7279\u5B9A\u4EE3\u5E63\u767C\u884C\u7684\u6240\u6709\u4EE3\u5E63\u8CEC\u6236\uFF08\u5373\u6240\u6709"),on={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},ln=s("SRM"),pn=s("\u6301\u6709\u4EBA)"),un=s("\u7279\u5B9A\u7A0B\u5E8F\u7684\u6240\u6709\u81EA\u5B9A\u7FA9\u8CEC\u6236\uFF08\u5373\u6240\u6709"),rn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},kn=s("Mango"),mn=s("\u7528\u6236)"),bn=o("

    \u5118\u7BA1getProgramAccounts\u975E\u5E38\u6709\u7528\uFF0C\u4F46\u7531\u65BC\u76EE\u524D\u7684\u9650\u5236\uFF0C\u5B83\u7D93\u5E38\u88AB\u8AA4\u89E3\u3002\u8A31\u591A\u7531getProgramAccounts\u652F\u6301\u7684\u67E5\u8A62\u9700\u8981RPC\u7BC0\u9EDE\u6383\u63CF\u5927\u91CF\u6578\u64DA\u3002\u9019\u4E9B\u6383\u63CF\u9700\u8981\u5927\u91CF\u7684\u5167\u5B58\u548C\u8CC7\u6E90\u3002\u56E0\u6B64\uFF0C\u8ABF\u7528\u904E\u65BC\u983B\u7E41\u6216\u7BC4\u570D\u904E\u5927\u53EF\u80FD\u5C0E\u81F4\u9023\u63A5\u8D85\u6642\u3002\u6B64\u5916\uFF0C\u5728\u64B0\u5BEB\u672C\u6587\u6642\uFF0CgetProgramAccounts\u7AEF\u9EDE\u4E0D\u652F\u6301\u5206\u9801\u3002\u5982\u679C\u67E5\u8A62\u7D50\u679C\u592A\u5927\uFF0C\u97FF\u61C9\u5C07\u88AB\u622A\u65B7\u3002

    \u7232\u4E86\u89E3\u6C7A\u7576\u524D\u7684\u9650\u5236\uFF0CgetProgramAccounts\u63D0\u4F9B\u4E86\u4E00\u4E9B\u6709\u7528\u7684\u53C3\u6578\uFF0C\u5305\u62ECdataSlice\u548Cfilters\u9078\u9805\u7684memcmp\u548CdataSize\u3002\u901A\u904E\u63D0\u4F9B\u9019\u4E9B\u53C3\u6578\u7684\u7D44\u5408\uFF0C\u6211\u5011\u53EF\u4EE5\u5C07\u67E5\u8A62\u7BC4\u570D\u7E2E\u5C0F\u5230\u53EF\u7BA1\u7406\u548C\u53EF\u9810\u6E2C\u7684\u5927\u5C0F\u3002

    ",2),dn=n("code",null,"getProgramAccounts",-1),fn=s("\u7684\u4E00\u500B\u5E38\u898B\u793A\u4F8B\u6D89\u53CA\u8207"),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},gn=s("SPL-Token Program"),hn=s(" \u7A0B\u5E8F\u4EA4\u4E92\u3002\u50C5\u4F7F\u7528\u57FA\u672C\u8ABF\u7528\u8ACB\u6C42\u7531Token\u7A0B\u5E8F\u64C1\u6709\u7684\u6240\u6709\u8CEC\u6236\u5C07\u6D89\u53CA\u5927\u91CF\u7684\u6578\u64DA\u3002\u7136\u800C\uFF0C\u901A\u904E\u63D0\u4F9B\u53C3\u6578\uFF0C\u6211\u5011\u53EF\u4EE5\u9AD8\u6548\u5730\u8ACB\u6C42\u6211\u5011\u8981\u4F7F\u7528\u7684\u6578\u64DA\u3002"),yn=o('

    filters

    \u8207getProgramAccounts\u4E00\u8D77\u4F7F\u7528\u7684\u6700\u5E38\u898B\u53C3\u6578\u662Ffilters\u6578\u7D44\u3002\u8A72\u6578\u7D44\u63A5\u53D7\u5169\u7A2E\u985E\u578B\u7684\u904E\u6FFE\u5668\uFF0C\u5373dataSize\u548Cmemcmp\u3002\u5728\u4F7F\u7528\u9019\u4E9B\u904E\u6FFE\u5668\u4E4B\u524D\uFF0C\u6211\u5011\u61C9\u8A72\u719F\u6089\u6211\u5011\u8ACB\u6C42\u7684\u6578\u64DA\u7684\u4F48\u5C40\u548C\u5E8F\u5217\u5316\u65B9\u5F0F\u3002

    dataSize

    ',3),An=s("\u5728Token\u7A0B\u5E8F\u7684\u60C5\u6CC1\u4E0B\uFF0C\u6211\u5011\u53EF\u4EE5\u770B\u5230"),wn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Cn=s("\u4EE3\u5E63\u8CEC\u6236\u7684\u9577\u5EA6\u7232165\u500B\u5B57\u7BC0"),Sn=s("\u3002 \u5177\u9AD4\u800C\u8A00\uFF0C\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236\u6709\u516B\u500B\u4E0D\u540C\u7684\u5B57\u6BB5\uFF0C\u6BCF\u500B\u5B57\u6BB5\u9700\u8981\u4E00\u5B9A\u6578\u91CF\u7684\u5B57\u7BC0\u3002\u6211\u5011\u53EF\u4EE5\u4F7F\u7528\u4E0B\u9762\u7684\u793A\u4F8B\u5716\u4F86\u53EF\u8996\u5316\u9019\u4E9B\u6578\u64DA\u7684\u4F48\u5C40\u3002"),Pn=o('

    Account Size

    \u5982\u679C\u6211\u5011\u60F3\u627E\u5230\u7531\u6211\u5011\u7684\u9322\u5305\u5730\u5740\u64C1\u6709\u7684\u6240\u6709\u4EE3\u5E63\u8CEC\u6236\uFF0C\u6211\u5011\u53EF\u4EE5\u5728filters\u6578\u7D44\u4E2D\u6DFB\u52A0{ dataSize: 165 }\u4F86\u5C07\u67E5\u8A62\u7BC4\u570D\u7E2E\u5C0F\u7232\u50C5\u9650\u9577\u5EA6\u7232165\u500B\u5B57\u7BC0\u7684\u8CEC\u6236\u3002\u7136\u800C\uFF0C\u50C5\u6B64\u9084\u4E0D\u5920\u3002\u6211\u5011\u9084\u9700\u8981\u6DFB\u52A0\u4E00\u500B\u904E\u6FFE\u5668\u4F86\u67E5\u627E\u7531\u6211\u5011\u7684\u5730\u5740\u64C1\u6709\u7684\u8CEC\u6236\u3002\u6211\u5011\u53EF\u4EE5\u4F7F\u7528memcmp\u904E\u6FFE\u5668\u5BE6\u73FE\u9019\u4E00\u9EDE\u3002

    memcmp

    memcmp\u904E\u6FFE\u5668\uFF0C\u4E5F\u53EB"\u5167\u5B58\u6BD4\u8F03"\u904E\u6FFE\u5668\uFF0C\u5141\u8A31\u6211\u5011\u6BD4\u8F03\u5B58\u5132\u5728\u8CEC\u6236\u4E0A\u7684\u4EFB\u4F55\u5B57\u6BB5\u7684\u6578\u64DA\u3002\u5177\u9AD4\u800C\u8A00\uFF0C\u6211\u5011\u53EF\u4EE5\u67E5\u8A62\u50C5\u8207\u7279\u5B9A\u4F4D\u7F6E\u4E0A\u7684\u7279\u5B9A\u4E00\u7D44\u5B57\u7BC0\u5339\u914D\u7684\u8CEC\u6236\u3002memcmp\u9700\u8981\u5169\u500B\u53C3\u6578\uFF1A

    • offset: \u958B\u59CB\u6BD4\u8F03\u6578\u64DA\u7684\u4F4D\u7F6E\u3002\u9019\u500B\u4F4D\u7F6E\u4EE5\u5B57\u7BC0\u7232\u55AE\u4F4D\uFF0C\u8868\u793A\u7232\u4E00\u500B\u6574\u6578\u3002
    • bytes: \u6578\u64DA\u61C9\u8A72\u8207\u8CEC\u6236\u7684\u6578\u64DA\u5339\u914D\u3002\u9019\u8868\u793A\u7232\u4E00\u500Bbase58\u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\uFF0C\u61C9\u8A72\u9650\u5236\u5728129\u500B\u5B57\u7BC0\u4EE5\u4E0B\u3002

    \u9700\u8981\u6CE8\u610F\u7684\u662F\uFF0Cmemcmp\u53EA\u6703\u8FD4\u56DE\u8207\u63D0\u4F9B\u7684bytes\u5B8C\u5168\u5339\u914D\u7684\u7D50\u679C\u3002\u76EE\u524D\uFF0C\u5B83\u4E0D\u652F\u6301\u8207\u63D0\u4F9B\u7684bytes\u76F8\u6BD4\u5C0F\u65BC\u6216\u5927\u65BC\u7684\u6BD4\u8F03\u3002

    \u7E7C\u7E8C\u4F7F\u7528\u6211\u5011\u7684Token\u7A0B\u5E8F\u793A\u4F8B\uFF0C\u6211\u5011\u53EF\u4EE5\u4FEE\u6539\u67E5\u8A62\uFF0C\u53EA\u8FD4\u56DE\u7531\u6211\u5011\u7684\u9322\u5305\u5730\u5740\u64C1\u6709\u7684\u4EE3\u5E63\u8CEC\u6236\u3002\u89C0\u5BDF\u4EE3\u5E63\u8CEC\u6236\u6642\uFF0C\u6211\u5011\u53EF\u4EE5\u770B\u5230\u5B58\u5132\u5728\u4EE3\u5E63\u8CEC\u6236\u4E0A\u7684\u524D\u5169\u500B\u5B57\u6BB5\u90FD\u662F\u516C\u9470\uFF0C\u800C\u4E14\u6BCF\u500B\u516C\u9470\u7684\u9577\u5EA6\u723232\u500B\u5B57\u7BC0\u3002\u9451\u65BCowner\u662F\u7B2C\u4E8C\u500B\u5B57\u6BB5\uFF0C\u6211\u5011\u61C9\u8A72\u5F9Eoffset\u723232\u5B57\u7BC0\u7684\u4F4D\u7F6E\u958B\u59CB\u9032\u884Cmemcmp\u3002\u5F9E\u9019\u88CF\u958B\u59CB\uFF0C\u6211\u5011\u5C07\u5C0B\u627Eowner\u5B57\u6BB5\u8207\u6211\u5011\u7684\u9322\u5305\u5730\u5740\u5339\u914D\u7684\u8CEC\u6236\u3002

    Account Size

    \u6211\u5011\u53EF\u4EE5\u901A\u904E\u4EE5\u4E0B\u5BE6\u4F8B\u4F86\u8ABF\u7528\u6B64\u67E5\u8A62\uFF1A

    ',9),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as l,o as i,c as r,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.d411e3b3.js";var m="/assets/account-size.398f17bf.png",b="/assets/memcmp.c5e1f050.png";const d={},f=n("h1",{id:"\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7372\u53D6\u7A0B\u5E8F\u5E33\u6236","aria-hidden":"true"},"#"),s(" \u7372\u53D6\u7A0B\u5E8F\u5E33\u6236")],-1),_=n("p",null,[s("\u4E00\u500B\u8FD4\u56DE\u7A0B\u5E8F\u6240\u64C1\u6709\u7684\u8CEC\u6236\u7684RPC\u65B9\u6CD5\u3002\u76EE\u524D\u4E0D\u652F\u6301\u5206\u9801\u3002\u8ACB\u6C42"),n("code",null,"getProgramAccounts"),s("\u61C9\u8A72\u5305\u62EC"),n("code",null,"dataSlice"),s("\u548C/\u6216"),n("code",null,"filters"),s("\u53C3\u6578\uFF0C\u4EE5\u63D0\u9AD8\u97FF\u61C9\u6642\u9593\u4E26\u8FD4\u56DE\u53EA\u6709\u9810\u671F\u7D50\u679C\u7684\u5167\u5BB9\u3002")],-1),g=n("h2",{id:"\u7D9C\u8FF0",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7D9C\u8FF0","aria-hidden":"true"},"#"),s(" \u7D9C\u8FF0")],-1),h={class:"custom-container tip"},y=n("p",{class:"custom-container-title"},"\u53C3\u6578",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - \u8981\u67E5\u8A62\u7684\u7A0B\u5E8F\u7684\u516C\u9470\uFF0C\u4EE5base58\u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\u63D0\u4F9B\u3002")],-1),w=s("(\u53EF\u9078) "),C=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),T=s(" - \u5305\u542B\u4EE5\u4E0B\u53EF\u9078\u5B57\u6BB5\u7684\u914D\u7F6E\u53C3\u6578\uFF1A "),D=s("(\u53EF\u9078) "),E=n("code",null,"commitment",-1),N=s(": "),v=n("code",null,"string",-1),M=s(" - "),R={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},K=s("\u72C0\u614B\u627F\u8AFE/State commitment"),G=s("(\u53EF\u9078) "),L=n("code",null,"encoding",-1),B=s(": "),z=n("code",null,"string",-1),x=s(" - \u8CEC\u6236\u6578\u64DA\u7684\u7DE8\u78BC\u65B9\u5F0F\uFF0C\u53EF\u4EE5\u662F\uFF1A "),F=n("code",null,"base58",-1),H=s(", "),Z=n("code",null,"base64",-1),Q=s(", \u6216 "),U=n("code",null,"jsonParsed",-1),W=s(". \u8ACB\u6CE8\u610F web3js \u7528\u6236\u61C9\u6539\u7528 "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},j=s("getParsedProgramAccounts"),Y=o("
  • (\u53EF\u9078) dataSlice: object - \u6839\u64DA\u4EE5\u4E0B\u5167\u5BB9\u9650\u5236\u8FD4\u56DE\u7684\u8CEC\u6236\u6578\u64DA\uFF1A
    • offset: number - \u958B\u59CB\u8FD4\u56DE\u8CEC\u6236\u6578\u64DA\u7684\u5B57\u7BC0\u6578
    • length: number - \u8981\u8FD4\u56DE\u7684\u8CEC\u6236\u6578\u64DA\u7684\u5B57\u7BC0\u6578
  • (\u53EF\u9078) filters: array - \u4F7F\u7528\u4EE5\u4E0B\u904E\u6FFE\u5668\u5C0D\u8C61\u5C0D\u7D50\u679C\u9032\u884C\u904E\u6FFE\uFF1A
    • memcmp: object - \u5C07\u4E00\u7CFB\u5217\u5B57\u7BC0\u8207\u8CEC\u6236\u6578\u64DA\u5339\u914D\uFF1A
      • offset: number - \u958B\u59CB\u6BD4\u8F03\u7684\u8CEC\u6236\u6578\u64DA\u5B57\u7BC0\u504F\u79FB\u91CF
      • bytes: string - \u8981\u5339\u914D\u7684\u6578\u64DA\uFF0C\u4EE5base58\u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\uFF0C\u9650\u5236\u7232129\u500B\u5B57\u7BC0
    • dataSize: number - \u5C07\u8CEC\u6236\u6578\u64DA\u7684\u9577\u5EA6\u8207\u63D0\u4F9B\u7684\u6578\u64DA\u5927\u5C0F\u9032\u884C\u6BD4\u8F03
  • ",2),J=s("(\u53EF\u9078) "),X=n("code",null,"withContext",-1),O=s(": "),I=n("code",null,"boolean",-1),$=s(" - \u5C07\u7D50\u679C\u5305\u88DD\u5728\u4E00\u500B "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},nn=s("RpcResponse JSON object"),sn=o('
    \u97FF\u61C9

    \u9ED8\u8A8D\u60C5\u6CC1\u4E0B\uFF0CgetProgramAccounts\u5C07\u8FD4\u56DE\u4E00\u500B\u5177\u6709\u4EE5\u4E0B\u7D50\u69CB\u7684 JSON \u5C0D\u8C61\u6578\u7D44\uFF1A

    • pubkey: string - \u8CEC\u6236\u516C\u9470\uFF0C\u4EE5 base58 \u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F
    • account: object - \u4E00\u500B\u5305\u542B\u4EE5\u4E0B\u5B50\u5B57\u6BB5\u7684 JSON \u5C0D\u8C61\uFF1A
      • lamports: number, \u5206\u914D\u7D66\u8CEC\u6236\u7684 lamports \u6578\u91CF
      • owner: string, \u8CEC\u6236\u6240\u5206\u914D\u7684\u7A0B\u5E8F\u7684 base58 \u7DE8\u78BC\u7684\u516C\u9470
      • data: string | object - \u8207\u8CEC\u6236\u95DC\u806F\u7684\u6578\u64DA\uFF0C\u6839\u64DA\u63D0\u4F9B\u7684\u7DE8\u78BC\u53C3\u6578\uFF0C\u53EF\u4EE5\u662F\u7DE8\u78BC\u7684\u4E8C\u9032\u5236\u6578\u64DA\u6216 JSON \u683C\u5F0F parameter
      • executable: boolean, \u6307\u793A\u8CEC\u6236\u662F\u5426\u5305\u542B\u7740\u7A0B\u5E8F
      • rentEpoch: number, \u8A72\u8CEC\u6236\u4E0B\u6B21\u9700\u8981\u652F\u4ED8\u79DF\u91D1\u7684\u7D00\u5143\uFF08epoch\uFF09
    ',3),an=n("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),s(" \u6DF1\u5165")],-1),en=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u662F\u4E00\u500B\u591A\u529F\u80FD\u7684RPC\u65B9\u6CD5\uFF0C\u7528\u65BC\u8FD4\u56DE\u7531\u7A0B\u5E8F\u64C1\u6709\u7684\u6240\u6709\u8CEC\u6236\u3002\u6211\u5011\u53EF\u4EE5\u5229\u7528"),n("code",null,"getProgramAccounts"),s("\u9032\u884C\u8A31\u591A\u6709\u7528\u7684\u67E5\u8A62\uFF0C\u4F8B\u5982\u67E5\u627E\uFF1A")],-1),tn=n("li",null,"\u7279\u5B9A\u9322\u5305\u7684\u6240\u6709\u4EE3\u5E63\u8CEC\u6236",-1),cn=s("\u7279\u5B9A\u4EE3\u5E63\u767C\u884C\u7684\u6240\u6709\u4EE3\u5E63\u8CEC\u6236\uFF08\u5373\u6240\u6709"),on={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},ln=s("SRM"),pn=s("\u6301\u6709\u4EBA)"),un=s("\u7279\u5B9A\u7A0B\u5E8F\u7684\u6240\u6709\u81EA\u5B9A\u7FA9\u8CEC\u6236\uFF08\u5373\u6240\u6709"),rn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},kn=s("Mango"),mn=s("\u7528\u6236)"),bn=o("

    \u5118\u7BA1getProgramAccounts\u975E\u5E38\u6709\u7528\uFF0C\u4F46\u7531\u65BC\u76EE\u524D\u7684\u9650\u5236\uFF0C\u5B83\u7D93\u5E38\u88AB\u8AA4\u89E3\u3002\u8A31\u591A\u7531getProgramAccounts\u652F\u6301\u7684\u67E5\u8A62\u9700\u8981RPC\u7BC0\u9EDE\u6383\u63CF\u5927\u91CF\u6578\u64DA\u3002\u9019\u4E9B\u6383\u63CF\u9700\u8981\u5927\u91CF\u7684\u5167\u5B58\u548C\u8CC7\u6E90\u3002\u56E0\u6B64\uFF0C\u8ABF\u7528\u904E\u65BC\u983B\u7E41\u6216\u7BC4\u570D\u904E\u5927\u53EF\u80FD\u5C0E\u81F4\u9023\u63A5\u8D85\u6642\u3002\u6B64\u5916\uFF0C\u5728\u64B0\u5BEB\u672C\u6587\u6642\uFF0CgetProgramAccounts\u7AEF\u9EDE\u4E0D\u652F\u6301\u5206\u9801\u3002\u5982\u679C\u67E5\u8A62\u7D50\u679C\u592A\u5927\uFF0C\u97FF\u61C9\u5C07\u88AB\u622A\u65B7\u3002

    \u7232\u4E86\u89E3\u6C7A\u7576\u524D\u7684\u9650\u5236\uFF0CgetProgramAccounts\u63D0\u4F9B\u4E86\u4E00\u4E9B\u6709\u7528\u7684\u53C3\u6578\uFF0C\u5305\u62ECdataSlice\u548Cfilters\u9078\u9805\u7684memcmp\u548CdataSize\u3002\u901A\u904E\u63D0\u4F9B\u9019\u4E9B\u53C3\u6578\u7684\u7D44\u5408\uFF0C\u6211\u5011\u53EF\u4EE5\u5C07\u67E5\u8A62\u7BC4\u570D\u7E2E\u5C0F\u5230\u53EF\u7BA1\u7406\u548C\u53EF\u9810\u6E2C\u7684\u5927\u5C0F\u3002

    ",2),dn=n("code",null,"getProgramAccounts",-1),fn=s("\u7684\u4E00\u500B\u5E38\u898B\u793A\u4F8B\u6D89\u53CA\u8207"),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},gn=s("SPL-Token Program"),hn=s(" \u7A0B\u5E8F\u4EA4\u4E92\u3002\u50C5\u4F7F\u7528\u57FA\u672C\u8ABF\u7528\u8ACB\u6C42\u7531Token\u7A0B\u5E8F\u64C1\u6709\u7684\u6240\u6709\u8CEC\u6236\u5C07\u6D89\u53CA\u5927\u91CF\u7684\u6578\u64DA\u3002\u7136\u800C\uFF0C\u901A\u904E\u63D0\u4F9B\u53C3\u6578\uFF0C\u6211\u5011\u53EF\u4EE5\u9AD8\u6548\u5730\u8ACB\u6C42\u6211\u5011\u8981\u4F7F\u7528\u7684\u6578\u64DA\u3002"),yn=o('

    filters

    \u8207getProgramAccounts\u4E00\u8D77\u4F7F\u7528\u7684\u6700\u5E38\u898B\u53C3\u6578\u662Ffilters\u6578\u7D44\u3002\u8A72\u6578\u7D44\u63A5\u53D7\u5169\u7A2E\u985E\u578B\u7684\u904E\u6FFE\u5668\uFF0C\u5373dataSize\u548Cmemcmp\u3002\u5728\u4F7F\u7528\u9019\u4E9B\u904E\u6FFE\u5668\u4E4B\u524D\uFF0C\u6211\u5011\u61C9\u8A72\u719F\u6089\u6211\u5011\u8ACB\u6C42\u7684\u6578\u64DA\u7684\u4F48\u5C40\u548C\u5E8F\u5217\u5316\u65B9\u5F0F\u3002

    dataSize

    ',3),An=s("\u5728Token\u7A0B\u5E8F\u7684\u60C5\u6CC1\u4E0B\uFF0C\u6211\u5011\u53EF\u4EE5\u770B\u5230"),wn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Cn=s("\u4EE3\u5E63\u8CEC\u6236\u7684\u9577\u5EA6\u7232165\u500B\u5B57\u7BC0"),Sn=s("\u3002 \u5177\u9AD4\u800C\u8A00\uFF0C\u4E00\u500B\u4EE3\u5E63\u8CEC\u6236\u6709\u516B\u500B\u4E0D\u540C\u7684\u5B57\u6BB5\uFF0C\u6BCF\u500B\u5B57\u6BB5\u9700\u8981\u4E00\u5B9A\u6578\u91CF\u7684\u5B57\u7BC0\u3002\u6211\u5011\u53EF\u4EE5\u4F7F\u7528\u4E0B\u9762\u7684\u793A\u4F8B\u5716\u4F86\u53EF\u8996\u5316\u9019\u4E9B\u6578\u64DA\u7684\u4F48\u5C40\u3002"),Pn=o('

    Account Size

    \u5982\u679C\u6211\u5011\u60F3\u627E\u5230\u7531\u6211\u5011\u7684\u9322\u5305\u5730\u5740\u64C1\u6709\u7684\u6240\u6709\u4EE3\u5E63\u8CEC\u6236\uFF0C\u6211\u5011\u53EF\u4EE5\u5728filters\u6578\u7D44\u4E2D\u6DFB\u52A0{ dataSize: 165 }\u4F86\u5C07\u67E5\u8A62\u7BC4\u570D\u7E2E\u5C0F\u7232\u50C5\u9650\u9577\u5EA6\u7232165\u500B\u5B57\u7BC0\u7684\u8CEC\u6236\u3002\u7136\u800C\uFF0C\u50C5\u6B64\u9084\u4E0D\u5920\u3002\u6211\u5011\u9084\u9700\u8981\u6DFB\u52A0\u4E00\u500B\u904E\u6FFE\u5668\u4F86\u67E5\u627E\u7531\u6211\u5011\u7684\u5730\u5740\u64C1\u6709\u7684\u8CEC\u6236\u3002\u6211\u5011\u53EF\u4EE5\u4F7F\u7528memcmp\u904E\u6FFE\u5668\u5BE6\u73FE\u9019\u4E00\u9EDE\u3002

    memcmp

    memcmp\u904E\u6FFE\u5668\uFF0C\u4E5F\u53EB"\u5167\u5B58\u6BD4\u8F03"\u904E\u6FFE\u5668\uFF0C\u5141\u8A31\u6211\u5011\u6BD4\u8F03\u5B58\u5132\u5728\u8CEC\u6236\u4E0A\u7684\u4EFB\u4F55\u5B57\u6BB5\u7684\u6578\u64DA\u3002\u5177\u9AD4\u800C\u8A00\uFF0C\u6211\u5011\u53EF\u4EE5\u67E5\u8A62\u50C5\u8207\u7279\u5B9A\u4F4D\u7F6E\u4E0A\u7684\u7279\u5B9A\u4E00\u7D44\u5B57\u7BC0\u5339\u914D\u7684\u8CEC\u6236\u3002memcmp\u9700\u8981\u5169\u500B\u53C3\u6578\uFF1A

    • offset: \u958B\u59CB\u6BD4\u8F03\u6578\u64DA\u7684\u4F4D\u7F6E\u3002\u9019\u500B\u4F4D\u7F6E\u4EE5\u5B57\u7BC0\u7232\u55AE\u4F4D\uFF0C\u8868\u793A\u7232\u4E00\u500B\u6574\u6578\u3002
    • bytes: \u6578\u64DA\u61C9\u8A72\u8207\u8CEC\u6236\u7684\u6578\u64DA\u5339\u914D\u3002\u9019\u8868\u793A\u7232\u4E00\u500Bbase58\u7DE8\u78BC\u7684\u5B57\u7B26\u4E32\uFF0C\u61C9\u8A72\u9650\u5236\u5728129\u500B\u5B57\u7BC0\u4EE5\u4E0B\u3002

    \u9700\u8981\u6CE8\u610F\u7684\u662F\uFF0Cmemcmp\u53EA\u6703\u8FD4\u56DE\u8207\u63D0\u4F9B\u7684bytes\u5B8C\u5168\u5339\u914D\u7684\u7D50\u679C\u3002\u76EE\u524D\uFF0C\u5B83\u4E0D\u652F\u6301\u8207\u63D0\u4F9B\u7684bytes\u76F8\u6BD4\u5C0F\u65BC\u6216\u5927\u65BC\u7684\u6BD4\u8F03\u3002

    \u7E7C\u7E8C\u4F7F\u7528\u6211\u5011\u7684Token\u7A0B\u5E8F\u793A\u4F8B\uFF0C\u6211\u5011\u53EF\u4EE5\u4FEE\u6539\u67E5\u8A62\uFF0C\u53EA\u8FD4\u56DE\u7531\u6211\u5011\u7684\u9322\u5305\u5730\u5740\u64C1\u6709\u7684\u4EE3\u5E63\u8CEC\u6236\u3002\u89C0\u5BDF\u4EE3\u5E63\u8CEC\u6236\u6642\uFF0C\u6211\u5011\u53EF\u4EE5\u770B\u5230\u5B58\u5132\u5728\u4EE3\u5E63\u8CEC\u6236\u4E0A\u7684\u524D\u5169\u500B\u5B57\u6BB5\u90FD\u662F\u516C\u9470\uFF0C\u800C\u4E14\u6BCF\u500B\u516C\u9470\u7684\u9577\u5EA6\u723232\u500B\u5B57\u7BC0\u3002\u9451\u65BCowner\u662F\u7B2C\u4E8C\u500B\u5B57\u6BB5\uFF0C\u6211\u5011\u61C9\u8A72\u5F9Eoffset\u723232\u5B57\u7BC0\u7684\u4F4D\u7F6E\u958B\u59CB\u9032\u884Cmemcmp\u3002\u5F9E\u9019\u88CF\u958B\u59CB\uFF0C\u6211\u5011\u5C07\u5C0B\u627Eowner\u5B57\u6BB5\u8207\u6211\u5011\u7684\u9322\u5305\u5730\u5740\u5339\u914D\u7684\u8CEC\u6236\u3002

    Account Size

    \u6211\u5011\u53EF\u4EE5\u901A\u904E\u4EE5\u4E0B\u5BE6\u4F8B\u4F86\u8ABF\u7528\u6B64\u67E5\u8A62\uFF1A

    ',9),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.58aa1eba.js b/docs/.vuepress/dist/assets/get-program-accounts.html.c489ff46.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.58aa1eba.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.c489ff46.js index b5dcc0d16..1a742759b 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.58aa1eba.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.c489ff46.js @@ -1,4 +1,4 @@ -import{_ as r,r as l,o as i,c as m,a as n,b as a,w as t,F as k,e as o,d as s}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},g=o('

    Obter Contas do Programa

    getProgramAccounts \xE9 um m\xE9todo RPC que retorna todas as contas pertencentes a um programa. Atualmente, a pagina\xE7\xE3o n\xE3o \xE9 suportada. As solicita\xE7\xF5es para getProgramAccounts devem incluir os par\xE2metros dataSlice e/ou filters para melhorar o tempo de resposta e retornar apenas os resultados pretendidos.

    Fatos

    ',3),_={class:"custom-container tip"},h=n("p",{class:"custom-container-title"},"Par\xE2metros",-1),y=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - A chave p\xFAblica (pubkey) do programa a ser consultado, fornecida como uma string codificada em base58")],-1),A=s("(opcional) "),w=n("code",null,"configOrCommitment",-1),v=s(": "),C=n("code",null,"object",-1),P=s(" - Par\xE2metros de configura\xE7\xE3o contendo os seguintes campos opcionais: "),S=s("(opcional) "),T=n("code",null,"commitment",-1),D=s(": "),E=n("code",null,"string",-1),N=s(" - "),M={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("Compromisso de estado"),x=s("(opcional) "),z=n("code",null,"encoding",-1),K=s(": "),L=n("code",null,"string",-1),G=s(" - Codifica\xE7\xE3o para dados da conta: "),B=n("code",null,"base58",-1),F=s(", "),q=n("code",null,"base64",-1),H=s(", ou "),Z=n("code",null,"jsonParsed",-1),j=s(". Observe que os usu\xE1rios do web3js devem usar "),Q={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},U=s("getParsedProgramAccounts"),O=o("
  • (opcional) dataSlice: object - Limite os dados da conta retornados com base em:
    • offset: number - N\xFAmero de bytes para come\xE7ar a retornar os dados da conta
    • length: number - N\xFAmero de bytes dos dados da conta a serem retornados
  • (opcional) filters: array - Filtra os resultados usando os seguintes objetos de filtro:
    • memcmp: object - Combina uma s\xE9rie de bytes aos dados da conta:
      • offset: number - N\xFAmero de bytes nos dados da conta para iniciar a compara\xE7\xE3o
      • bytes: string - Dados para combinar, como uma string codificada em base58 limitada a 129 bytes
    • dataSize: number - Compara o tamanho dos dados da conta com o tamanho de dados fornecido
  • ",2),W=s("(opcional) "),V=n("code",null,"withContext",-1),Y=s(": "),J=n("code",null,"boolean",-1),X=s(" - Envolva o resultado em um "),I={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},$=s("objeto JSON RpcResponse"),nn=o('
    Resposta

    Por padr\xE3o, getProgramAccounts retornar\xE1 um array de objetos JSON com a seguinte estrutura:

    • pubkey: string - A chave p\xFAblica da conta como uma string codificada em base58
    • account: object - Um objeto JSON, com os seguintes subcampos:
      • lamports: number, n\xFAmero de lamports atribu\xEDdos \xE0 conta
      • owner: string, a chave p\xFAblica codificada em base58 do programa ao qual a conta foi atribu\xEDda
      • data: string | object - dados associados \xE0 conta, seja como dados bin\xE1rios codificados ou formato JSON, dependendo do par\xE2metro de codifica\xE7\xE3o fornecido
      • executable: boolean, indica\xE7\xE3o se a conta cont\xE9m um programa
      • rentEpoch: number, \xE9poca na qual esta conta dever\xE1 pagar aluguel novamente
    ',3),sn=n("h2",{id:"mergulho-profundo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mergulho-profundo","aria-hidden":"true"},"#"),s(" Mergulho Profundo")],-1),an=n("p",null,[n("code",null,"getProgramAccounts"),s(" \xE9 um m\xE9todo RPC vers\xE1til que retorna todas as contas de propriedade de um programa. Podemos usar "),n("code",null,"getProgramAccounts"),s(" para v\xE1rias consultas \xFAteis, como encontrar:")],-1),en=n("li",null,"Todas as contas de token para uma carteira espec\xEDfica",-1),tn=s("Todas as contas de token para uma cunhagem de tokens espec\xEDfica (ou seja, todos os detentores de "),on={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},cn=s("SRM"),ln=s(")"),pn=s("Todas as contas personalizadas para um programa espec\xEDfico (ou seja, todos os usu\xE1rios do "),un={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},rn=s("Mango"),mn=s(")"),kn=o("

    Apesar de sua utilidade, getProgramAccounts \xE9 frequentemente mal compreendido devido \xE0s suas limita\xE7\xF5es atuais. Muitas das consultas suportadas pelo getProgramAccounts exigem que os n\xF3s RPC verifiquem grandes conjuntos de dados. Essas verifica\xE7\xF5es s\xE3o intensivas em recursos e em mem\xF3ria. Como resultado, chamadas muito frequentes ou muito grandes em escopo podem resultar em tempo limite de conex\xE3o. Al\xE9m disso, no momento em que este texto foi escrito, o ponto de extremidade getProgramAccounts n\xE3o suporta pagina\xE7\xE3o. Se os resultados de uma consulta forem muito grandes, a resposta ser\xE1 truncada.

    Para contornar essas limita\xE7\xF5es atuais, getProgramAccounts oferece v\xE1rios par\xE2metros \xFAteis, como dataSlice e as op\xE7\xF5es de filtros (filters) memcmp e dataSize. Ao fornecer combina\xE7\xF5es desses par\xE2metros, podemos reduzir o escopo de nossas consultas a tamanhos gerenci\xE1veis e previs\xEDveis.

    ",2),bn=s("Um exemplo comum de "),dn=n("code",null,"getProgramAccounts",-1),fn=s(" envolve a intera\xE7\xE3o com o "),gn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},_n=s("Programa de Tokens SPL"),hn=s(". Solicitar todas as contas de propriedade do Programa de Tokens com uma "),yn=s("chamada b\xE1sica"),An=s(" envolveria uma enorme quantidade de dados. No entanto, fornecendo par\xE2metros, podemos solicitar eficientemente apenas os dados que pretendemos usar."),wn=o('

    filters

    O par\xE2metro mais comum a ser usado com getProgramAccounts \xE9 o array filters. Este array aceita dois tipos de filtros, dataSize e memcmp. Antes de usar qualquer um desses filtros, devemos estar familiarizados com a forma como os dados que estamos solicitando s\xE3o organizados e serializados.

    dataSize

    ',3),vn=s("No caso do Programa de Tokens, podemos ver que "),Cn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Pn=s("as contas de token t\xEAm 165 bytes de comprimento"),Sn=s(". Especificamente, uma conta de token tem oito campos diferentes, e cada campo requer um n\xFAmero previs\xEDvel de bytes. Podemos visualizar como esses dados est\xE3o organizados usando a ilustra\xE7\xE3o abaixo."),Tn=o('

    Tamanho da Conta

    Se quisermos encontrar todas as contas de token de propriedade do nosso endere\xE7o de carteira, podemos adicionar {dataSize: 165} ao nosso array filters para reduzir o escopo da nossa consulta apenas para as contas que t\xEAm exatamente 165 bytes de comprimento. No entanto, isso por si s\xF3 seria insuficiente. Tamb\xE9m precisar\xEDamos adicionar um filtro que procurasse contas de propriedade do nosso endere\xE7o. Podemos alcan\xE7ar isso com o filtro memcmp.

    memcmp

    O filtro memcmp, ou filtro de "compara\xE7\xE3o de mem\xF3ria", nos permite comparar dados em qualquer campo armazenado em nossa conta. Especificamente, podemos consultar apenas as contas que correspondem a um determinado conjunto de bytes em uma posi\xE7\xE3o espec\xEDfica. memcmp requer dois argumentos:

    • offset: A posi\xE7\xE3o onde iniciar a compara\xE7\xE3o dos dados. Essa posi\xE7\xE3o \xE9 medida em bytes e \xE9 expressa como um n\xFAmero inteiro.
    • bytes: Os dados que devem corresponder aos dados da conta. Isso \xE9 representado como uma string codificada em base58 e deve ser limitado a menos de 129 bytes.

    \xC9 importante observar que memcmp somente retornar\xE1 resultados que correspondem exatamente aos bytes. Atualmente, ele n\xE3o oferece suporte a compara\xE7\xF5es para valores menores ou maiores que os bytes que fornecemos.

    Seguindo com nosso exemplo do Programa de Tokens, podemos modificar nossa consulta para retornar somente contas de token que s\xE3o de propriedade do nosso endere\xE7o de carteira. Ao olhar para uma conta de token, podemos ver que os dois primeiros campos armazenados em uma conta de token s\xE3o chaves p\xFAblicas e cada chave p\xFAblica tem 32 bytes de comprimento. Dado que owner \xE9 o segundo campo, devemos iniciar nosso memcmp em um offset de 32 bytes. A partir daqui, estaremos procurando por contas cujo campo de propriet\xE1rio corresponda ao nosso endere\xE7o de carteira.

    Tamanho da Conta

    Podemos invocar essa consulta por meio do exemplo a seguir:

    ',9),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as r,r as l,o as i,c as m,a as n,b as a,w as t,F as k,e as o,d as s}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",d="/assets/memcmp.c5e1f050.png";const f={},g=o('

    Obter Contas do Programa

    getProgramAccounts \xE9 um m\xE9todo RPC que retorna todas as contas pertencentes a um programa. Atualmente, a pagina\xE7\xE3o n\xE3o \xE9 suportada. As solicita\xE7\xF5es para getProgramAccounts devem incluir os par\xE2metros dataSlice e/ou filters para melhorar o tempo de resposta e retornar apenas os resultados pretendidos.

    Fatos

    ',3),_={class:"custom-container tip"},h=n("p",{class:"custom-container-title"},"Par\xE2metros",-1),y=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - A chave p\xFAblica (pubkey) do programa a ser consultado, fornecida como uma string codificada em base58")],-1),A=s("(opcional) "),w=n("code",null,"configOrCommitment",-1),v=s(": "),C=n("code",null,"object",-1),P=s(" - Par\xE2metros de configura\xE7\xE3o contendo os seguintes campos opcionais: "),S=s("(opcional) "),T=n("code",null,"commitment",-1),D=s(": "),E=n("code",null,"string",-1),N=s(" - "),M={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=s("Compromisso de estado"),x=s("(opcional) "),z=n("code",null,"encoding",-1),K=s(": "),L=n("code",null,"string",-1),G=s(" - Codifica\xE7\xE3o para dados da conta: "),B=n("code",null,"base58",-1),F=s(", "),q=n("code",null,"base64",-1),H=s(", ou "),Z=n("code",null,"jsonParsed",-1),j=s(". Observe que os usu\xE1rios do web3js devem usar "),Q={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},U=s("getParsedProgramAccounts"),O=o("
  • (opcional) dataSlice: object - Limite os dados da conta retornados com base em:
    • offset: number - N\xFAmero de bytes para come\xE7ar a retornar os dados da conta
    • length: number - N\xFAmero de bytes dos dados da conta a serem retornados
  • (opcional) filters: array - Filtra os resultados usando os seguintes objetos de filtro:
    • memcmp: object - Combina uma s\xE9rie de bytes aos dados da conta:
      • offset: number - N\xFAmero de bytes nos dados da conta para iniciar a compara\xE7\xE3o
      • bytes: string - Dados para combinar, como uma string codificada em base58 limitada a 129 bytes
    • dataSize: number - Compara o tamanho dos dados da conta com o tamanho de dados fornecido
  • ",2),W=s("(opcional) "),V=n("code",null,"withContext",-1),Y=s(": "),J=n("code",null,"boolean",-1),X=s(" - Envolva o resultado em um "),I={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},$=s("objeto JSON RpcResponse"),nn=o('
    Resposta

    Por padr\xE3o, getProgramAccounts retornar\xE1 um array de objetos JSON com a seguinte estrutura:

    • pubkey: string - A chave p\xFAblica da conta como uma string codificada em base58
    • account: object - Um objeto JSON, com os seguintes subcampos:
      • lamports: number, n\xFAmero de lamports atribu\xEDdos \xE0 conta
      • owner: string, a chave p\xFAblica codificada em base58 do programa ao qual a conta foi atribu\xEDda
      • data: string | object - dados associados \xE0 conta, seja como dados bin\xE1rios codificados ou formato JSON, dependendo do par\xE2metro de codifica\xE7\xE3o fornecido
      • executable: boolean, indica\xE7\xE3o se a conta cont\xE9m um programa
      • rentEpoch: number, \xE9poca na qual esta conta dever\xE1 pagar aluguel novamente
    ',3),sn=n("h2",{id:"mergulho-profundo",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mergulho-profundo","aria-hidden":"true"},"#"),s(" Mergulho Profundo")],-1),an=n("p",null,[n("code",null,"getProgramAccounts"),s(" \xE9 um m\xE9todo RPC vers\xE1til que retorna todas as contas de propriedade de um programa. Podemos usar "),n("code",null,"getProgramAccounts"),s(" para v\xE1rias consultas \xFAteis, como encontrar:")],-1),en=n("li",null,"Todas as contas de token para uma carteira espec\xEDfica",-1),tn=s("Todas as contas de token para uma cunhagem de tokens espec\xEDfica (ou seja, todos os detentores de "),on={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},cn=s("SRM"),ln=s(")"),pn=s("Todas as contas personalizadas para um programa espec\xEDfico (ou seja, todos os usu\xE1rios do "),un={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},rn=s("Mango"),mn=s(")"),kn=o("

    Apesar de sua utilidade, getProgramAccounts \xE9 frequentemente mal compreendido devido \xE0s suas limita\xE7\xF5es atuais. Muitas das consultas suportadas pelo getProgramAccounts exigem que os n\xF3s RPC verifiquem grandes conjuntos de dados. Essas verifica\xE7\xF5es s\xE3o intensivas em recursos e em mem\xF3ria. Como resultado, chamadas muito frequentes ou muito grandes em escopo podem resultar em tempo limite de conex\xE3o. Al\xE9m disso, no momento em que este texto foi escrito, o ponto de extremidade getProgramAccounts n\xE3o suporta pagina\xE7\xE3o. Se os resultados de uma consulta forem muito grandes, a resposta ser\xE1 truncada.

    Para contornar essas limita\xE7\xF5es atuais, getProgramAccounts oferece v\xE1rios par\xE2metros \xFAteis, como dataSlice e as op\xE7\xF5es de filtros (filters) memcmp e dataSize. Ao fornecer combina\xE7\xF5es desses par\xE2metros, podemos reduzir o escopo de nossas consultas a tamanhos gerenci\xE1veis e previs\xEDveis.

    ",2),bn=s("Um exemplo comum de "),dn=n("code",null,"getProgramAccounts",-1),fn=s(" envolve a intera\xE7\xE3o com o "),gn={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},_n=s("Programa de Tokens SPL"),hn=s(". Solicitar todas as contas de propriedade do Programa de Tokens com uma "),yn=s("chamada b\xE1sica"),An=s(" envolveria uma enorme quantidade de dados. No entanto, fornecendo par\xE2metros, podemos solicitar eficientemente apenas os dados que pretendemos usar."),wn=o('

    filters

    O par\xE2metro mais comum a ser usado com getProgramAccounts \xE9 o array filters. Este array aceita dois tipos de filtros, dataSize e memcmp. Antes de usar qualquer um desses filtros, devemos estar familiarizados com a forma como os dados que estamos solicitando s\xE3o organizados e serializados.

    dataSize

    ',3),vn=s("No caso do Programa de Tokens, podemos ver que "),Cn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Pn=s("as contas de token t\xEAm 165 bytes de comprimento"),Sn=s(". Especificamente, uma conta de token tem oito campos diferentes, e cada campo requer um n\xFAmero previs\xEDvel de bytes. Podemos visualizar como esses dados est\xE3o organizados usando a ilustra\xE7\xE3o abaixo."),Tn=o('

    Tamanho da Conta

    Se quisermos encontrar todas as contas de token de propriedade do nosso endere\xE7o de carteira, podemos adicionar {dataSize: 165} ao nosso array filters para reduzir o escopo da nossa consulta apenas para as contas que t\xEAm exatamente 165 bytes de comprimento. No entanto, isso por si s\xF3 seria insuficiente. Tamb\xE9m precisar\xEDamos adicionar um filtro que procurasse contas de propriedade do nosso endere\xE7o. Podemos alcan\xE7ar isso com o filtro memcmp.

    memcmp

    O filtro memcmp, ou filtro de "compara\xE7\xE3o de mem\xF3ria", nos permite comparar dados em qualquer campo armazenado em nossa conta. Especificamente, podemos consultar apenas as contas que correspondem a um determinado conjunto de bytes em uma posi\xE7\xE3o espec\xEDfica. memcmp requer dois argumentos:

    • offset: A posi\xE7\xE3o onde iniciar a compara\xE7\xE3o dos dados. Essa posi\xE7\xE3o \xE9 medida em bytes e \xE9 expressa como um n\xFAmero inteiro.
    • bytes: Os dados que devem corresponder aos dados da conta. Isso \xE9 representado como uma string codificada em base58 e deve ser limitado a menos de 129 bytes.

    \xC9 importante observar que memcmp somente retornar\xE1 resultados que correspondem exatamente aos bytes. Atualmente, ele n\xE3o oferece suporte a compara\xE7\xF5es para valores menores ou maiores que os bytes que fornecemos.

    Seguindo com nosso exemplo do Programa de Tokens, podemos modificar nossa consulta para retornar somente contas de token que s\xE3o de propriedade do nosso endere\xE7o de carteira. Ao olhar para uma conta de token, podemos ver que os dois primeiros campos armazenados em uma conta de token s\xE3o chaves p\xFAblicas e cada chave p\xFAblica tem 32 bytes de comprimento. Dado que owner \xE9 o segundo campo, devemos iniciar nosso memcmp em um offset de 32 bytes. A partir daqui, estaremos procurando por contas cujo campo de propriet\xE1rio corresponda ao nosso endere\xE7o de carteira.

    Tamanho da Conta

    Podemos invocar essa consulta por meio do exemplo a seguir:

    ',9),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.382d13c1.js b/docs/.vuepress/dist/assets/get-program-accounts.html.ca55546d.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.382d13c1.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.ca55546d.js index 9384e5404..0119c57a6 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.382d13c1.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.ca55546d.js @@ -1,4 +1,4 @@ -import{_ as i,r as l,o as r,c as m,a as n,b as s,w as e,F as k,d as a,e as o}from"./app.07ce7a66.js";var b="/assets/account-size.398f17bf.png",g="/assets/memcmp.c5e1f050.png";const d={},f=n("h1",{id:"kumuha-ng-mga-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#kumuha-ng-mga-program-accounts","aria-hidden":"true"},"#"),a(" Kumuha ng Mga Program Accounts")],-1),h=n("p",null,[a("Isang paraan ng RPC na nagbabalik ng lahat ng account na pagmamay-ari ng isang programa. Kasalukuyang hindi sinusuportahan ang pagination. Ang mga kahilingan sa "),n("code",null,"getProgramAccounts"),a(" ay dapat isama ang mga parameter ng "),n("code",null,"dataSlice"),a(" at/o "),n("code",null,"filters"),a(" upang mapahusay ang oras ng pagtugon at magbalik lamang ng mga nilalayong resulta.")],-1),_=n("h2",{id:"facts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),a(" Facts")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Mga Parameter",-1),A=n("li",null,[n("code",null,"programId"),a(": "),n("code",null,"string"),a(" - Pubkey ng program na itatanong, na ibinigay bilang base58 na naka-encode na string")],-1),S=a("(opsyonal) "),C=n("code",null,"configOrCommitment",-1),P=a(": "),T=n("code",null,"object",-1),D=a(" - Mga parameter ng configuration na naglalaman ng mga sumusunod na opsyonal na field: "),E=a("(opsyonal) "),M=n("code",null,"commitment",-1),v=a(": "),N=n("code",null,"string",-1),K=a(" - "),L={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=a("State commitment"),B=a("(opsyonal) "),G=n("code",null,"encoding",-1),z=a(": "),x=n("code",null,"string",-1),H=a(" - Encoding para sa data ng account, alinman sa: "),F=n("code",null,"base58",-1),Z=a(", "),Q=n("code",null,"base64",-1),U=a(", o "),W=n("code",null,"jsonParsed",-1),j=a(". Tandaan, dapat gamitin ng mga user ng web3js ang "),I={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},V=a("getParsedProgramAccounts"),Y=o("
  • (opsyonal) dataSlice: object - Limitahan ang ibinalik na data ng account batay sa:
    • offset: number - Bilang ng mga byte sa data ng account upang simulan ang pagbabalik
    • length: number - Bilang ng mga byte ng data ng account na ibabalik
  • (opsyonal) mga filter: array - I-filter ang mga resulta gamit ang mga sumusunod na filter object:
    • memcmp: object - Itugma ang isang serye ng mga byte sa data ng account:
      • offset: number - Bilang ng mga byte sa data ng account upang simulan ang paghahambing
      • bytes: string - Data upang tumugma, bilang base58 na naka-encode na string ay limitado sa 129 bytes
    • dataSize: number - Inihahambing ang haba ng data ng account sa ibinigay na laki ng data
  • ",2),J=a("(opsyonal) "),O=n("code",null,"withContext",-1),X=a(": "),q=n("code",null,"boolean",-1),$=a(" - I-wrap ang resulta sa isang "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=a("RpcResponse JSON object"),sn=o('

    Response

    Bilang default, magbabalik ang getProgramAccounts ng hanay ng mga JSON object na may sumusunod na istraktura:

    • pubkey: string - Ang account pubkey bilang base58 na naka-encode na string
    • account: object - isang JSON object, na may mga sumusunod na sub field:
      • lamports: number, bilang ng lamports na itinalaga sa account
      • may-ari: string, Ang base58 na naka-encode na pubkey ng program kung saan nakatalaga ang account
      • data: string | object - data na nauugnay sa account, alinman bilang naka-encode na binary data o JSON na format depende sa ibinigay na parameter ng pag-encode
      • executable: boolean, Indikasyon kung ang account ay naglalaman ng program
      • rentEpoch: number, Ang panahon kung saan susunod na uutang ang account na ito
    ',3),tn=n("h2",{id:"deep-dive",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),a(" Deep Dive")],-1),en=n("p",null,[a("Ang "),n("code",null,"getProgramAccounts"),a(" ay isang versatile na paraan ng RPC na ibinabalik ang lahat ng account na pagmamay-ari ng isang program. Maaari nating gamitin ang "),n("code",null,"getProgramAccounts"),a(" para sa ilang kapaki-pakinabang na query, gaya ng paghahanap ng:")],-1),cn=n("li",null,"Lahat ng token account para sa isang partikular na wallet",-1),on=a("Lahat ng token account para sa isang partikular na mint (i.e. Lahat ng "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=a("SRM"),un=a(" may hawak)"),rn=a("Lahat ng custom na account para sa isang partikular na programa (ibig sabihin, Lahat ng "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},kn=a("Mango"),bn=a(" user)"),gn=o("

    Sa kabila ng pagiging kapaki-pakinabang nito, ang getProgramAccounts ay madalas na hindi maintindihan dahil sa mga kasalukuyang hadlang nito. Marami sa mga query na sinusuportahan ng getProgramAccounts ay nangangailangan ng mga RPC node na mag-scan ng malalaking set ng data. Ang mga pag-scan na ito ay parehong memory at resource intensive. Bilang resulta, ang mga tawag na masyadong madalas o masyadong malaki ang saklaw ay maaaring magresulta sa mga timeout ng koneksyon. Higit pa rito, sa oras ng pagsulat na ito, ang endpoint ng getProgramAccounts ay hindi sumusuporta sa pagination. Kung ang mga resulta ng isang query ay masyadong malaki, ang tugon ay puputulin.

    Upang malampasan ang mga kasalukuyang hadlang na ito, nag-aalok ang getProgramAccounts ng ilang kapaki-pakinabang na parameter: ibig sabihin, dataSlice at ang mga opsyon sa filters na memcmp at dataSize. Sa pamamagitan ng pagbibigay ng mga kumbinasyon ng mga parameter na ito, maaari nating bawasan ang saklaw ng aming mga query hanggang sa mga mapapamahalaan at mahuhulaan na laki.

    ",2),dn=a("Ang isang karaniwang halimbawa ng "),fn=n("code",null,"getProgramAccounts",-1),hn=a(" ay kinabibilangan ng pakikipag-ugnayan sa "),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=a("SPL-Token Program"),wn=a(". Ang paghiling sa lahat ng account na pagmamay-ari ng Token Program na may "),An=a("pangunahing tawag"),Sn=a(" ay magsasangkot ng napakalaking dami ng data. Sa pamamagitan ng pagbibigay ng mga parameter, gayunpaman, maaari nating mahusay na humiling ng data na nilalayon nating gamitin."),Cn=o('

    mga filter

    Ang pinakakaraniwang parameter na gagamitin sa getProgramAccounts ay ang hanay ng filters. Tumatanggap ang array na ito ng dalawang uri ng mga filter, dataSize at memcmp. Bago gamitin ang alinman sa mga filter na ito, dapat na pamilyar tayo sa kung paano inilatag at na-serialize ang data na hinihiling namin.

    dataSize

    ',3),Pn=a("Sa kaso ng Token Program, makikita natin na "),Tn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Dn=a("ang mga token account ay 165 bytes ang haba"),En=a(". Sa partikular, ang isang token account ay may walong magkakaibang field, na ang bawat field ay nangangailangan ng predictable na bilang ng mga byte. Maaari nating mailarawan kung paano inilatag ang data na ito gamit ang paglalarawan sa ibaba."),Mn=o('

    Laki ng Account

    Kung gusto nating mahanap ang lahat ng token account na pagmamay-ari ng aming wallet address, maaari nating idagdag ang { dataSize: 165 } sa aming hanay ng filters upang paliitin ang saklaw ng aming query sa mga account na eksaktong 165 bytes ang haba. Ito lamang, gayunpaman, ay hindi sapat. Kakailanganin din nating magdagdag ng filter na naghahanap ng mga account na pagmamay-ari ng aming address. Maaabot natin ito gamit ang filter na memcmp.

    memcmp

    Ang filter na memcmp, o filter na "paghahambing ng memorya," ay nagbibigay-daan sa amin na paghambingin ang data sa anumang field na nakaimbak sa aming account. Sa partikular, maaari lang kaming mag-query para sa mga account na tumutugma sa isang partikular na hanay ng mga byte sa isang partikular na posisyon. Ang memcmp ay nangangailangan ng dalawang argumento:

    • offset: Ang posisyon kung saan magsisimulang maghambing ng data. Ang posisyon na ito ay sinusukat sa bytes at ipinahayag bilang isang integer.
    • bytes: Ang data na dapat tumugma sa data ng account. Ito ay kinakatawan bilang isang base-58 na naka-encode na string ay dapat na limitado sa mas mababa sa 129 byte.

    Mahalagang tandaan na ang memcmp ay magbabalik lamang ng mga resultang eksaktong tugma sa bytes. Sa kasalukuyan, hindi nito sinusuportahan ang mga paghahambing para sa mga value na mas mababa o mas malaki kaysa sa bytes na ibinibigay namin.

    Alinsunod sa aming halimbawa ng Token Program, maaari nating baguhin ang aming query upang ibalik lamang ang mga token account na pagmamay-ari ng aming wallet address. Kapag tumitingin sa isang token account, makikita natin ang unang dalawang field na nakaimbak sa isang token account ay parehong mga pubkey, at ang bawat pubkey ay 32 byte ang haba. Dahil ang may-ari ay ang pangalawang field, dapat nating simulan ang ating memcmp sa isang offset na 32 bytes. Mula rito, maghahanap kami ng mga account na ang field ng may-ari ay tumutugma sa aming address ng wallet.

    Laki ng Account

    Maaari nating tawagan ang query na ito sa pamamagitan ng sumusunod na halimbawa:

    ',9),vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),a(),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),a(` +import{_ as i,r as l,o as r,c as m,a as n,b as s,w as e,F as k,d as a,e as o}from"./app.d411e3b3.js";var b="/assets/account-size.398f17bf.png",g="/assets/memcmp.c5e1f050.png";const d={},f=n("h1",{id:"kumuha-ng-mga-program-accounts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#kumuha-ng-mga-program-accounts","aria-hidden":"true"},"#"),a(" Kumuha ng Mga Program Accounts")],-1),h=n("p",null,[a("Isang paraan ng RPC na nagbabalik ng lahat ng account na pagmamay-ari ng isang programa. Kasalukuyang hindi sinusuportahan ang pagination. Ang mga kahilingan sa "),n("code",null,"getProgramAccounts"),a(" ay dapat isama ang mga parameter ng "),n("code",null,"dataSlice"),a(" at/o "),n("code",null,"filters"),a(" upang mapahusay ang oras ng pagtugon at magbalik lamang ng mga nilalayong resulta.")],-1),_=n("h2",{id:"facts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),a(" Facts")],-1),y={class:"custom-container tip"},w=n("p",{class:"custom-container-title"},"Mga Parameter",-1),A=n("li",null,[n("code",null,"programId"),a(": "),n("code",null,"string"),a(" - Pubkey ng program na itatanong, na ibinigay bilang base58 na naka-encode na string")],-1),S=a("(opsyonal) "),C=n("code",null,"configOrCommitment",-1),P=a(": "),T=n("code",null,"object",-1),D=a(" - Mga parameter ng configuration na naglalaman ng mga sumusunod na opsyonal na field: "),E=a("(opsyonal) "),M=n("code",null,"commitment",-1),v=a(": "),N=n("code",null,"string",-1),K=a(" - "),L={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},R=a("State commitment"),B=a("(opsyonal) "),G=n("code",null,"encoding",-1),z=a(": "),x=n("code",null,"string",-1),H=a(" - Encoding para sa data ng account, alinman sa: "),F=n("code",null,"base58",-1),Z=a(", "),Q=n("code",null,"base64",-1),U=a(", o "),W=n("code",null,"jsonParsed",-1),j=a(". Tandaan, dapat gamitin ng mga user ng web3js ang "),I={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},V=a("getParsedProgramAccounts"),Y=o("
  • (opsyonal) dataSlice: object - Limitahan ang ibinalik na data ng account batay sa:
    • offset: number - Bilang ng mga byte sa data ng account upang simulan ang pagbabalik
    • length: number - Bilang ng mga byte ng data ng account na ibabalik
  • (opsyonal) mga filter: array - I-filter ang mga resulta gamit ang mga sumusunod na filter object:
    • memcmp: object - Itugma ang isang serye ng mga byte sa data ng account:
      • offset: number - Bilang ng mga byte sa data ng account upang simulan ang paghahambing
      • bytes: string - Data upang tumugma, bilang base58 na naka-encode na string ay limitado sa 129 bytes
    • dataSize: number - Inihahambing ang haba ng data ng account sa ibinigay na laki ng data
  • ",2),J=a("(opsyonal) "),O=n("code",null,"withContext",-1),X=a(": "),q=n("code",null,"boolean",-1),$=a(" - I-wrap ang resulta sa isang "),nn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},an=a("RpcResponse JSON object"),sn=o('

    Response

    Bilang default, magbabalik ang getProgramAccounts ng hanay ng mga JSON object na may sumusunod na istraktura:

    • pubkey: string - Ang account pubkey bilang base58 na naka-encode na string
    • account: object - isang JSON object, na may mga sumusunod na sub field:
      • lamports: number, bilang ng lamports na itinalaga sa account
      • may-ari: string, Ang base58 na naka-encode na pubkey ng program kung saan nakatalaga ang account
      • data: string | object - data na nauugnay sa account, alinman bilang naka-encode na binary data o JSON na format depende sa ibinigay na parameter ng pag-encode
      • executable: boolean, Indikasyon kung ang account ay naglalaman ng program
      • rentEpoch: number, Ang panahon kung saan susunod na uutang ang account na ito
    ',3),tn=n("h2",{id:"deep-dive",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),a(" Deep Dive")],-1),en=n("p",null,[a("Ang "),n("code",null,"getProgramAccounts"),a(" ay isang versatile na paraan ng RPC na ibinabalik ang lahat ng account na pagmamay-ari ng isang program. Maaari nating gamitin ang "),n("code",null,"getProgramAccounts"),a(" para sa ilang kapaki-pakinabang na query, gaya ng paghahanap ng:")],-1),cn=n("li",null,"Lahat ng token account para sa isang partikular na wallet",-1),on=a("Lahat ng token account para sa isang partikular na mint (i.e. Lahat ng "),ln={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},pn=a("SRM"),un=a(" may hawak)"),rn=a("Lahat ng custom na account para sa isang partikular na programa (ibig sabihin, Lahat ng "),mn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},kn=a("Mango"),bn=a(" user)"),gn=o("

    Sa kabila ng pagiging kapaki-pakinabang nito, ang getProgramAccounts ay madalas na hindi maintindihan dahil sa mga kasalukuyang hadlang nito. Marami sa mga query na sinusuportahan ng getProgramAccounts ay nangangailangan ng mga RPC node na mag-scan ng malalaking set ng data. Ang mga pag-scan na ito ay parehong memory at resource intensive. Bilang resulta, ang mga tawag na masyadong madalas o masyadong malaki ang saklaw ay maaaring magresulta sa mga timeout ng koneksyon. Higit pa rito, sa oras ng pagsulat na ito, ang endpoint ng getProgramAccounts ay hindi sumusuporta sa pagination. Kung ang mga resulta ng isang query ay masyadong malaki, ang tugon ay puputulin.

    Upang malampasan ang mga kasalukuyang hadlang na ito, nag-aalok ang getProgramAccounts ng ilang kapaki-pakinabang na parameter: ibig sabihin, dataSlice at ang mga opsyon sa filters na memcmp at dataSize. Sa pamamagitan ng pagbibigay ng mga kumbinasyon ng mga parameter na ito, maaari nating bawasan ang saklaw ng aming mga query hanggang sa mga mapapamahalaan at mahuhulaan na laki.

    ",2),dn=a("Ang isang karaniwang halimbawa ng "),fn=n("code",null,"getProgramAccounts",-1),hn=a(" ay kinabibilangan ng pakikipag-ugnayan sa "),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},yn=a("SPL-Token Program"),wn=a(". Ang paghiling sa lahat ng account na pagmamay-ari ng Token Program na may "),An=a("pangunahing tawag"),Sn=a(" ay magsasangkot ng napakalaking dami ng data. Sa pamamagitan ng pagbibigay ng mga parameter, gayunpaman, maaari nating mahusay na humiling ng data na nilalayon nating gamitin."),Cn=o('

    mga filter

    Ang pinakakaraniwang parameter na gagamitin sa getProgramAccounts ay ang hanay ng filters. Tumatanggap ang array na ito ng dalawang uri ng mga filter, dataSize at memcmp. Bago gamitin ang alinman sa mga filter na ito, dapat na pamilyar tayo sa kung paano inilatag at na-serialize ang data na hinihiling namin.

    dataSize

    ',3),Pn=a("Sa kaso ng Token Program, makikita natin na "),Tn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Dn=a("ang mga token account ay 165 bytes ang haba"),En=a(". Sa partikular, ang isang token account ay may walong magkakaibang field, na ang bawat field ay nangangailangan ng predictable na bilang ng mga byte. Maaari nating mailarawan kung paano inilatag ang data na ito gamit ang paglalarawan sa ibaba."),Mn=o('

    Laki ng Account

    Kung gusto nating mahanap ang lahat ng token account na pagmamay-ari ng aming wallet address, maaari nating idagdag ang { dataSize: 165 } sa aming hanay ng filters upang paliitin ang saklaw ng aming query sa mga account na eksaktong 165 bytes ang haba. Ito lamang, gayunpaman, ay hindi sapat. Kakailanganin din nating magdagdag ng filter na naghahanap ng mga account na pagmamay-ari ng aming address. Maaabot natin ito gamit ang filter na memcmp.

    memcmp

    Ang filter na memcmp, o filter na "paghahambing ng memorya," ay nagbibigay-daan sa amin na paghambingin ang data sa anumang field na nakaimbak sa aming account. Sa partikular, maaari lang kaming mag-query para sa mga account na tumutugma sa isang partikular na hanay ng mga byte sa isang partikular na posisyon. Ang memcmp ay nangangailangan ng dalawang argumento:

    • offset: Ang posisyon kung saan magsisimulang maghambing ng data. Ang posisyon na ito ay sinusukat sa bytes at ipinahayag bilang isang integer.
    • bytes: Ang data na dapat tumugma sa data ng account. Ito ay kinakatawan bilang isang base-58 na naka-encode na string ay dapat na limitado sa mas mababa sa 129 byte.

    Mahalagang tandaan na ang memcmp ay magbabalik lamang ng mga resultang eksaktong tugma sa bytes. Sa kasalukuyan, hindi nito sinusuportahan ang mga paghahambing para sa mga value na mas mababa o mas malaki kaysa sa bytes na ibinibigay namin.

    Alinsunod sa aming halimbawa ng Token Program, maaari nating baguhin ang aming query upang ibalik lamang ang mga token account na pagmamay-ari ng aming wallet address. Kapag tumitingin sa isang token account, makikita natin ang unang dalawang field na nakaimbak sa isang token account ay parehong mga pubkey, at ang bawat pubkey ay 32 byte ang haba. Dahil ang may-ari ay ang pangalawang field, dapat nating simulan ang ating memcmp sa isang offset na 32 bytes. Mula rito, maghahanap kami ng mga account na ang field ng may-ari ay tumutugma sa aming address ng wallet.

    Laki ng Account

    Maaari nating tawagan ang query na ito sa pamamagitan ng sumusunod na halimbawa:

    ',9),vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),a(),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),a(` `),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" clusterApiUrl"),n("span",{class:"token punctuation"},","),a(" Connection "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),a(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),a(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token operator"},"=>"),a(),n("span",{class:"token punctuation"},"{"),a(` diff --git a/docs/.vuepress/dist/assets/get-program-accounts.html.f563091d.js b/docs/.vuepress/dist/assets/get-program-accounts.html.dd8577dd.js similarity index 99% rename from docs/.vuepress/dist/assets/get-program-accounts.html.f563091d.js rename to docs/.vuepress/dist/assets/get-program-accounts.html.dd8577dd.js index 0a00599b8..21a1b4012 100644 --- a/docs/.vuepress/dist/assets/get-program-accounts.html.f563091d.js +++ b/docs/.vuepress/dist/assets/get-program-accounts.html.dd8577dd.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.07ce7a66.js";var m="/assets/account-size.398f17bf.png",b="/assets/memcmp.c5e1f050.png";const d={},f=n("h1",{id:"\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237","aria-hidden":"true"},"#"),s(" \u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237")],-1),_=n("p",null,[s("\u4E00\u4E2A\u8FD4\u56DE\u7A0B\u5E8F\u6240\u62E5\u6709\u7684\u8D26\u6237\u7684RPC\u65B9\u6CD5\u3002\u76EE\u524D\u4E0D\u652F\u6301\u5206\u9875\u3002\u8BF7\u6C42"),n("code",null,"getProgramAccounts"),s("\u5E94\u8BE5\u5305\u62EC"),n("code",null,"dataSlice"),s("\u548C/\u6216"),n("code",null,"filters"),s("\u53C2\u6570\uFF0C\u4EE5\u63D0\u9AD8\u54CD\u5E94\u65F6\u95F4\u5E76\u8FD4\u56DE\u53EA\u6709\u9884\u671F\u7ED3\u679C\u7684\u5185\u5BB9\u3002")],-1),g=n("h2",{id:"\u7EFC\u8FF0",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7EFC\u8FF0","aria-hidden":"true"},"#"),s(" \u7EFC\u8FF0")],-1),h={class:"custom-container tip"},y=n("p",{class:"custom-container-title"},"\u53C2\u6570",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - \u8981\u67E5\u8BE2\u7684\u7A0B\u5E8F\u7684\u516C\u94A5\uFF0C\u4EE5base58\u7F16\u7801\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\u63D0\u4F9B\u3002")],-1),w=s("(\u53EF\u9009) "),C=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),T=s(" - \u5305\u542B\u4EE5\u4E0B\u53EF\u9009\u5B57\u6BB5\u7684\u914D\u7F6E\u53C2\u6570\uFF1A "),D=s("(\u53EF\u9009) "),E=n("code",null,"commitment",-1),N=s(": "),v=n("code",null,"string",-1),M=s(" - "),R={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},K=s("\u72B6\u6001\u627F\u8BFA/State commitment"),G=s("(\u53EF\u9009) "),L=n("code",null,"encoding",-1),B=s(": "),z=n("code",null,"string",-1),x=s(" - \u8D26\u6237\u6570\u636E\u7684\u7F16\u7801\u65B9\u5F0F\uFF0C\u53EF\u4EE5\u662F\uFF1A "),F=n("code",null,"base58",-1),H=s(", "),Z=n("code",null,"base64",-1),Q=s(", \u6216 "),U=n("code",null,"jsonParsed",-1),W=s(". \u8BF7\u6CE8\u610F web3js \u7528\u6237\u5E94\u6539\u7528 "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},j=s("getParsedProgramAccounts"),Y=o("
  • (\u53EF\u9009) dataSlice: object - \u6839\u636E\u4EE5\u4E0B\u5185\u5BB9\u9650\u5236\u8FD4\u56DE\u7684\u8D26\u6237\u6570\u636E\uFF1A
    • offset: number - \u5F00\u59CB\u8FD4\u56DE\u8D26\u6237\u6570\u636E\u7684\u5B57\u8282\u6570
    • length: number - \u8981\u8FD4\u56DE\u7684\u8D26\u6237\u6570\u636E\u7684\u5B57\u8282\u6570
  • (\u53EF\u9009) filters: array - \u4F7F\u7528\u4EE5\u4E0B\u8FC7\u6EE4\u5668\u5BF9\u8C61\u5BF9\u7ED3\u679C\u8FDB\u884C\u8FC7\u6EE4\uFF1A
    • memcmp: object - \u5C06\u4E00\u7CFB\u5217\u5B57\u8282\u4E0E\u8D26\u6237\u6570\u636E\u5339\u914D\uFF1A
      • offset: number - \u5F00\u59CB\u6BD4\u8F83\u7684\u8D26\u6237\u6570\u636E\u5B57\u8282\u504F\u79FB\u91CF
      • bytes: string - \u8981\u5339\u914D\u7684\u6570\u636E\uFF0C\u4EE5base58\u7F16\u7801\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\uFF0C\u9650\u5236\u4E3A129\u4E2A\u5B57\u8282
    • dataSize: number - \u5C06\u8D26\u6237\u6570\u636E\u7684\u957F\u5EA6\u4E0E\u63D0\u4F9B\u7684\u6570\u636E\u5927\u5C0F\u8FDB\u884C\u6BD4\u8F83
  • ",2),J=s("(\u53EF\u9009) "),X=n("code",null,"withContext",-1),O=s(": "),I=n("code",null,"boolean",-1),$=s(" - \u5C06\u7ED3\u679C\u5305\u88C5\u5728\u4E00\u4E2A "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},nn=s("RpcResponse JSON object"),sn=o('
    \u54CD\u5E94

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CgetProgramAccounts\u5C06\u8FD4\u56DE\u4E00\u4E2A\u5177\u6709\u4EE5\u4E0B\u7ED3\u6784\u7684 JSON \u5BF9\u8C61\u6570\u7EC4\uFF1A

    • pubkey: string - \u8D26\u6237\u516C\u94A5\uFF0C\u4EE5 base58 \u7F16\u7801\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F
    • account: object - \u4E00\u4E2A\u5305\u542B\u4EE5\u4E0B\u5B50\u5B57\u6BB5\u7684 JSON \u5BF9\u8C61\uFF1A
      • lamports: number, \u5206\u914D\u7ED9\u8D26\u6237\u7684 lamports \u6570\u91CF
      • owner: string, \u8D26\u6237\u6240\u5206\u914D\u7684\u7A0B\u5E8F\u7684 base58 \u7F16\u7801\u7684\u516C\u94A5
      • data: string | object - \u4E0E\u8D26\u6237\u5173\u8054\u7684\u6570\u636E\uFF0C\u6839\u636E\u63D0\u4F9B\u7684\u7F16\u7801\u53C2\u6570\uFF0C\u53EF\u4EE5\u662F\u7F16\u7801\u7684\u4E8C\u8FDB\u5236\u6570\u636E\u6216 JSON \u683C\u5F0F parameter
      • executable: boolean, \u6307\u793A\u8D26\u6237\u662F\u5426\u5305\u542B\u7740\u7A0B\u5E8F
      • rentEpoch: number, \u8BE5\u8D26\u6237\u4E0B\u6B21\u9700\u8981\u652F\u4ED8\u79DF\u91D1\u7684\u7EAA\u5143\uFF08epoch\uFF09
    ',3),an=n("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),s(" \u6DF1\u5165")],-1),en=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u662F\u4E00\u4E2A\u591A\u529F\u80FD\u7684RPC\u65B9\u6CD5\uFF0C\u7528\u4E8E\u8FD4\u56DE\u7531\u7A0B\u5E8F\u62E5\u6709\u7684\u6240\u6709\u8D26\u6237\u3002\u6211\u4EEC\u53EF\u4EE5\u5229\u7528"),n("code",null,"getProgramAccounts"),s("\u8FDB\u884C\u8BB8\u591A\u6709\u7528\u7684\u67E5\u8BE2\uFF0C\u4F8B\u5982\u67E5\u627E\uFF1A")],-1),tn=n("li",null,"\u7279\u5B9A\u94B1\u5305\u7684\u6240\u6709\u4EE3\u5E01\u8D26\u6237",-1),cn=s("\u7279\u5B9A\u4EE3\u5E01\u53D1\u884C\u7684\u6240\u6709\u4EE3\u5E01\u8D26\u6237\uFF08\u5373\u6240\u6709"),on={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},ln=s("SRM"),pn=s("\u6301\u6709\u4EBA)"),un=s("\u7279\u5B9A\u7A0B\u5E8F\u7684\u6240\u6709\u81EA\u5B9A\u4E49\u8D26\u6237\uFF08\u5373\u6240\u6709"),rn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},kn=s("Mango"),mn=s("\u7528\u6237)"),bn=o("

    \u5C3D\u7BA1getProgramAccounts\u975E\u5E38\u6709\u7528\uFF0C\u4F46\u7531\u4E8E\u76EE\u524D\u7684\u9650\u5236\uFF0C\u5B83\u7ECF\u5E38\u88AB\u8BEF\u89E3\u3002\u8BB8\u591A\u7531getProgramAccounts\u652F\u6301\u7684\u67E5\u8BE2\u9700\u8981RPC\u8282\u70B9\u626B\u63CF\u5927\u91CF\u6570\u636E\u3002\u8FD9\u4E9B\u626B\u63CF\u9700\u8981\u5927\u91CF\u7684\u5185\u5B58\u548C\u8D44\u6E90\u3002\u56E0\u6B64\uFF0C\u8C03\u7528\u8FC7\u4E8E\u9891\u7E41\u6216\u8303\u56F4\u8FC7\u5927\u53EF\u80FD\u5BFC\u81F4\u8FDE\u63A5\u8D85\u65F6\u3002\u6B64\u5916\uFF0C\u5728\u64B0\u5199\u672C\u6587\u65F6\uFF0CgetProgramAccounts\u7AEF\u70B9\u4E0D\u652F\u6301\u5206\u9875\u3002\u5982\u679C\u67E5\u8BE2\u7ED3\u679C\u592A\u5927\uFF0C\u54CD\u5E94\u5C06\u88AB\u622A\u65AD\u3002

    \u4E3A\u4E86\u89E3\u51B3\u5F53\u524D\u7684\u9650\u5236\uFF0CgetProgramAccounts\u63D0\u4F9B\u4E86\u4E00\u4E9B\u6709\u7528\u7684\u53C2\u6570\uFF0C\u5305\u62ECdataSlice\u548Cfilters\u9009\u9879\u7684memcmp\u548CdataSize\u3002\u901A\u8FC7\u63D0\u4F9B\u8FD9\u4E9B\u53C2\u6570\u7684\u7EC4\u5408\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5C06\u67E5\u8BE2\u8303\u56F4\u7F29\u5C0F\u5230\u53EF\u7BA1\u7406\u548C\u53EF\u9884\u6D4B\u7684\u5927\u5C0F\u3002

    ",2),dn=n("code",null,"getProgramAccounts",-1),fn=s("\u7684\u4E00\u4E2A\u5E38\u89C1\u793A\u4F8B\u6D89\u53CA\u4E0E"),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},gn=s("SPL-Token Program"),hn=s(" \u7A0B\u5E8F\u4EA4\u4E92\u3002\u4EC5\u4F7F\u7528\u57FA\u672C\u8C03\u7528\u8BF7\u6C42\u7531Token\u7A0B\u5E8F\u62E5\u6709\u7684\u6240\u6709\u8D26\u6237\u5C06\u6D89\u53CA\u5927\u91CF\u7684\u6570\u636E\u3002\u7136\u800C\uFF0C\u901A\u8FC7\u63D0\u4F9B\u53C2\u6570\uFF0C\u6211\u4EEC\u53EF\u4EE5\u9AD8\u6548\u5730\u8BF7\u6C42\u6211\u4EEC\u8981\u4F7F\u7528\u7684\u6570\u636E\u3002"),yn=o('

    filters

    \u4E0EgetProgramAccounts\u4E00\u8D77\u4F7F\u7528\u7684\u6700\u5E38\u89C1\u53C2\u6570\u662Ffilters\u6570\u7EC4\u3002\u8BE5\u6570\u7EC4\u63A5\u53D7\u4E24\u79CD\u7C7B\u578B\u7684\u8FC7\u6EE4\u5668\uFF0C\u5373dataSize\u548Cmemcmp\u3002\u5728\u4F7F\u7528\u8FD9\u4E9B\u8FC7\u6EE4\u5668\u4E4B\u524D\uFF0C\u6211\u4EEC\u5E94\u8BE5\u719F\u6089\u6211\u4EEC\u8BF7\u6C42\u7684\u6570\u636E\u7684\u5E03\u5C40\u548C\u5E8F\u5217\u5316\u65B9\u5F0F\u3002

    dataSize

    ',3),An=s("\u5728Token\u7A0B\u5E8F\u7684\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230"),wn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Cn=s("\u4EE3\u5E01\u8D26\u6237\u7684\u957F\u5EA6\u4E3A165\u4E2A\u5B57\u8282"),Sn=s("\u3002 \u5177\u4F53\u800C\u8A00\uFF0C\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237\u6709\u516B\u4E2A\u4E0D\u540C\u7684\u5B57\u6BB5\uFF0C\u6BCF\u4E2A\u5B57\u6BB5\u9700\u8981\u4E00\u5B9A\u6570\u91CF\u7684\u5B57\u8282\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u4E0B\u9762\u7684\u793A\u4F8B\u56FE\u6765\u53EF\u89C6\u5316\u8FD9\u4E9B\u6570\u636E\u7684\u5E03\u5C40\u3002"),Pn=o('

    Account Size

    \u5982\u679C\u6211\u4EEC\u60F3\u627E\u5230\u7531\u6211\u4EEC\u7684\u94B1\u5305\u5730\u5740\u62E5\u6709\u7684\u6240\u6709\u4EE3\u5E01\u8D26\u6237\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5728filters\u6570\u7EC4\u4E2D\u6DFB\u52A0{ dataSize: 165 }\u6765\u5C06\u67E5\u8BE2\u8303\u56F4\u7F29\u5C0F\u4E3A\u4EC5\u9650\u957F\u5EA6\u4E3A165\u4E2A\u5B57\u8282\u7684\u8D26\u6237\u3002\u7136\u800C\uFF0C\u4EC5\u6B64\u8FD8\u4E0D\u591F\u3002\u6211\u4EEC\u8FD8\u9700\u8981\u6DFB\u52A0\u4E00\u4E2A\u8FC7\u6EE4\u5668\u6765\u67E5\u627E\u7531\u6211\u4EEC\u7684\u5730\u5740\u62E5\u6709\u7684\u8D26\u6237\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528memcmp\u8FC7\u6EE4\u5668\u5B9E\u73B0\u8FD9\u4E00\u70B9\u3002

    memcmp

    memcmp\u8FC7\u6EE4\u5668\uFF0C\u4E5F\u53EB"\u5185\u5B58\u6BD4\u8F83"\u8FC7\u6EE4\u5668\uFF0C\u5141\u8BB8\u6211\u4EEC\u6BD4\u8F83\u5B58\u50A8\u5728\u8D26\u6237\u4E0A\u7684\u4EFB\u4F55\u5B57\u6BB5\u7684\u6570\u636E\u3002\u5177\u4F53\u800C\u8A00\uFF0C\u6211\u4EEC\u53EF\u4EE5\u67E5\u8BE2\u4EC5\u4E0E\u7279\u5B9A\u4F4D\u7F6E\u4E0A\u7684\u7279\u5B9A\u4E00\u7EC4\u5B57\u8282\u5339\u914D\u7684\u8D26\u6237\u3002memcmp\u9700\u8981\u4E24\u4E2A\u53C2\u6570\uFF1A

    • offset: \u5F00\u59CB\u6BD4\u8F83\u6570\u636E\u7684\u4F4D\u7F6E\u3002\u8FD9\u4E2A\u4F4D\u7F6E\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D\uFF0C\u8868\u793A\u4E3A\u4E00\u4E2A\u6574\u6570\u3002
    • bytes: \u6570\u636E\u5E94\u8BE5\u4E0E\u8D26\u6237\u7684\u6570\u636E\u5339\u914D\u3002\u8FD9\u8868\u793A\u4E3A\u4E00\u4E2Abase58\u7F16\u7801\u7684\u5B57\u7B26\u4E32\uFF0C\u5E94\u8BE5\u9650\u5236\u5728129\u4E2A\u5B57\u8282\u4EE5\u4E0B\u3002

    \u9700\u8981\u6CE8\u610F\u7684\u662F\uFF0Cmemcmp\u53EA\u4F1A\u8FD4\u56DE\u4E0E\u63D0\u4F9B\u7684bytes\u5B8C\u5168\u5339\u914D\u7684\u7ED3\u679C\u3002\u76EE\u524D\uFF0C\u5B83\u4E0D\u652F\u6301\u4E0E\u63D0\u4F9B\u7684bytes\u76F8\u6BD4\u5C0F\u4E8E\u6216\u5927\u4E8E\u7684\u6BD4\u8F83\u3002

    \u7EE7\u7EED\u4F7F\u7528\u6211\u4EEC\u7684Token\u7A0B\u5E8F\u793A\u4F8B\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4FEE\u6539\u67E5\u8BE2\uFF0C\u53EA\u8FD4\u56DE\u7531\u6211\u4EEC\u7684\u94B1\u5305\u5730\u5740\u62E5\u6709\u7684\u4EE3\u5E01\u8D26\u6237\u3002\u89C2\u5BDF\u4EE3\u5E01\u8D26\u6237\u65F6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u5B58\u50A8\u5728\u4EE3\u5E01\u8D26\u6237\u4E0A\u7684\u524D\u4E24\u4E2A\u5B57\u6BB5\u90FD\u662F\u516C\u94A5\uFF0C\u800C\u4E14\u6BCF\u4E2A\u516C\u94A5\u7684\u957F\u5EA6\u4E3A32\u4E2A\u5B57\u8282\u3002\u9274\u4E8Eowner\u662F\u7B2C\u4E8C\u4E2A\u5B57\u6BB5\uFF0C\u6211\u4EEC\u5E94\u8BE5\u4ECEoffset\u4E3A32\u5B57\u8282\u7684\u4F4D\u7F6E\u5F00\u59CB\u8FDB\u884Cmemcmp\u3002\u4ECE\u8FD9\u91CC\u5F00\u59CB\uFF0C\u6211\u4EEC\u5C06\u5BFB\u627Eowner\u5B57\u6BB5\u4E0E\u6211\u4EEC\u7684\u94B1\u5305\u5730\u5740\u5339\u914D\u7684\u8D26\u6237\u3002

    Account Size

    \u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u5B9E\u4F8B\u6765\u8C03\u7528\u6B64\u67E5\u8BE2\uFF1A

    ',9),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as l,o as i,c as r,a as n,b as a,w as t,F as k,d as s,e as o}from"./app.d411e3b3.js";var m="/assets/account-size.398f17bf.png",b="/assets/memcmp.c5e1f050.png";const d={},f=n("h1",{id:"\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237","aria-hidden":"true"},"#"),s(" \u83B7\u53D6\u7A0B\u5E8F\u5E10\u6237")],-1),_=n("p",null,[s("\u4E00\u4E2A\u8FD4\u56DE\u7A0B\u5E8F\u6240\u62E5\u6709\u7684\u8D26\u6237\u7684RPC\u65B9\u6CD5\u3002\u76EE\u524D\u4E0D\u652F\u6301\u5206\u9875\u3002\u8BF7\u6C42"),n("code",null,"getProgramAccounts"),s("\u5E94\u8BE5\u5305\u62EC"),n("code",null,"dataSlice"),s("\u548C/\u6216"),n("code",null,"filters"),s("\u53C2\u6570\uFF0C\u4EE5\u63D0\u9AD8\u54CD\u5E94\u65F6\u95F4\u5E76\u8FD4\u56DE\u53EA\u6709\u9884\u671F\u7ED3\u679C\u7684\u5185\u5BB9\u3002")],-1),g=n("h2",{id:"\u7EFC\u8FF0",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7EFC\u8FF0","aria-hidden":"true"},"#"),s(" \u7EFC\u8FF0")],-1),h={class:"custom-container tip"},y=n("p",{class:"custom-container-title"},"\u53C2\u6570",-1),A=n("li",null,[n("code",null,"programId"),s(": "),n("code",null,"string"),s(" - \u8981\u67E5\u8BE2\u7684\u7A0B\u5E8F\u7684\u516C\u94A5\uFF0C\u4EE5base58\u7F16\u7801\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\u63D0\u4F9B\u3002")],-1),w=s("(\u53EF\u9009) "),C=n("code",null,"configOrCommitment",-1),S=s(": "),P=n("code",null,"object",-1),T=s(" - \u5305\u542B\u4EE5\u4E0B\u53EF\u9009\u5B57\u6BB5\u7684\u914D\u7F6E\u53C2\u6570\uFF1A "),D=s("(\u53EF\u9009) "),E=n("code",null,"commitment",-1),N=s(": "),v=n("code",null,"string",-1),M=s(" - "),R={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},K=s("\u72B6\u6001\u627F\u8BFA/State commitment"),G=s("(\u53EF\u9009) "),L=n("code",null,"encoding",-1),B=s(": "),z=n("code",null,"string",-1),x=s(" - \u8D26\u6237\u6570\u636E\u7684\u7F16\u7801\u65B9\u5F0F\uFF0C\u53EF\u4EE5\u662F\uFF1A "),F=n("code",null,"base58",-1),H=s(", "),Z=n("code",null,"base64",-1),Q=s(", \u6216 "),U=n("code",null,"jsonParsed",-1),W=s(". \u8BF7\u6CE8\u610F web3js \u7528\u6237\u5E94\u6539\u7528 "),V={href:"https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getParsedProgramAccounts",target:"_blank",rel:"noopener noreferrer"},j=s("getParsedProgramAccounts"),Y=o("
  • (\u53EF\u9009) dataSlice: object - \u6839\u636E\u4EE5\u4E0B\u5185\u5BB9\u9650\u5236\u8FD4\u56DE\u7684\u8D26\u6237\u6570\u636E\uFF1A
    • offset: number - \u5F00\u59CB\u8FD4\u56DE\u8D26\u6237\u6570\u636E\u7684\u5B57\u8282\u6570
    • length: number - \u8981\u8FD4\u56DE\u7684\u8D26\u6237\u6570\u636E\u7684\u5B57\u8282\u6570
  • (\u53EF\u9009) filters: array - \u4F7F\u7528\u4EE5\u4E0B\u8FC7\u6EE4\u5668\u5BF9\u8C61\u5BF9\u7ED3\u679C\u8FDB\u884C\u8FC7\u6EE4\uFF1A
    • memcmp: object - \u5C06\u4E00\u7CFB\u5217\u5B57\u8282\u4E0E\u8D26\u6237\u6570\u636E\u5339\u914D\uFF1A
      • offset: number - \u5F00\u59CB\u6BD4\u8F83\u7684\u8D26\u6237\u6570\u636E\u5B57\u8282\u504F\u79FB\u91CF
      • bytes: string - \u8981\u5339\u914D\u7684\u6570\u636E\uFF0C\u4EE5base58\u7F16\u7801\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F\uFF0C\u9650\u5236\u4E3A129\u4E2A\u5B57\u8282
    • dataSize: number - \u5C06\u8D26\u6237\u6570\u636E\u7684\u957F\u5EA6\u4E0E\u63D0\u4F9B\u7684\u6570\u636E\u5927\u5C0F\u8FDB\u884C\u6BD4\u8F83
  • ",2),J=s("(\u53EF\u9009) "),X=n("code",null,"withContext",-1),O=s(": "),I=n("code",null,"boolean",-1),$=s(" - \u5C06\u7ED3\u679C\u5305\u88C5\u5728\u4E00\u4E2A "),q={href:"https://docs.solana.com/developing/clients/jsonrpc-api#rpcresponse-structure",target:"_blank",rel:"noopener noreferrer"},nn=s("RpcResponse JSON object"),sn=o('
    \u54CD\u5E94

    \u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CgetProgramAccounts\u5C06\u8FD4\u56DE\u4E00\u4E2A\u5177\u6709\u4EE5\u4E0B\u7ED3\u6784\u7684 JSON \u5BF9\u8C61\u6570\u7EC4\uFF1A

    • pubkey: string - \u8D26\u6237\u516C\u94A5\uFF0C\u4EE5 base58 \u7F16\u7801\u7684\u5B57\u7B26\u4E32\u5F62\u5F0F
    • account: object - \u4E00\u4E2A\u5305\u542B\u4EE5\u4E0B\u5B50\u5B57\u6BB5\u7684 JSON \u5BF9\u8C61\uFF1A
      • lamports: number, \u5206\u914D\u7ED9\u8D26\u6237\u7684 lamports \u6570\u91CF
      • owner: string, \u8D26\u6237\u6240\u5206\u914D\u7684\u7A0B\u5E8F\u7684 base58 \u7F16\u7801\u7684\u516C\u94A5
      • data: string | object - \u4E0E\u8D26\u6237\u5173\u8054\u7684\u6570\u636E\uFF0C\u6839\u636E\u63D0\u4F9B\u7684\u7F16\u7801\u53C2\u6570\uFF0C\u53EF\u4EE5\u662F\u7F16\u7801\u7684\u4E8C\u8FDB\u5236\u6570\u636E\u6216 JSON \u683C\u5F0F parameter
      • executable: boolean, \u6307\u793A\u8D26\u6237\u662F\u5426\u5305\u542B\u7740\u7A0B\u5E8F
      • rentEpoch: number, \u8BE5\u8D26\u6237\u4E0B\u6B21\u9700\u8981\u652F\u4ED8\u79DF\u91D1\u7684\u7EAA\u5143\uFF08epoch\uFF09
    ',3),an=n("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),s(" \u6DF1\u5165")],-1),en=n("p",null,[n("code",null,"getProgramAccounts"),s(" \u662F\u4E00\u4E2A\u591A\u529F\u80FD\u7684RPC\u65B9\u6CD5\uFF0C\u7528\u4E8E\u8FD4\u56DE\u7531\u7A0B\u5E8F\u62E5\u6709\u7684\u6240\u6709\u8D26\u6237\u3002\u6211\u4EEC\u53EF\u4EE5\u5229\u7528"),n("code",null,"getProgramAccounts"),s("\u8FDB\u884C\u8BB8\u591A\u6709\u7528\u7684\u67E5\u8BE2\uFF0C\u4F8B\u5982\u67E5\u627E\uFF1A")],-1),tn=n("li",null,"\u7279\u5B9A\u94B1\u5305\u7684\u6240\u6709\u4EE3\u5E01\u8D26\u6237",-1),cn=s("\u7279\u5B9A\u4EE3\u5E01\u53D1\u884C\u7684\u6240\u6709\u4EE3\u5E01\u8D26\u6237\uFF08\u5373\u6240\u6709"),on={href:"https://www.projectserum.com/",target:"_blank",rel:"noopener noreferrer"},ln=s("SRM"),pn=s("\u6301\u6709\u4EBA)"),un=s("\u7279\u5B9A\u7A0B\u5E8F\u7684\u6240\u6709\u81EA\u5B9A\u4E49\u8D26\u6237\uFF08\u5373\u6240\u6709"),rn={href:"https://mango.markets/",target:"_blank",rel:"noopener noreferrer"},kn=s("Mango"),mn=s("\u7528\u6237)"),bn=o("

    \u5C3D\u7BA1getProgramAccounts\u975E\u5E38\u6709\u7528\uFF0C\u4F46\u7531\u4E8E\u76EE\u524D\u7684\u9650\u5236\uFF0C\u5B83\u7ECF\u5E38\u88AB\u8BEF\u89E3\u3002\u8BB8\u591A\u7531getProgramAccounts\u652F\u6301\u7684\u67E5\u8BE2\u9700\u8981RPC\u8282\u70B9\u626B\u63CF\u5927\u91CF\u6570\u636E\u3002\u8FD9\u4E9B\u626B\u63CF\u9700\u8981\u5927\u91CF\u7684\u5185\u5B58\u548C\u8D44\u6E90\u3002\u56E0\u6B64\uFF0C\u8C03\u7528\u8FC7\u4E8E\u9891\u7E41\u6216\u8303\u56F4\u8FC7\u5927\u53EF\u80FD\u5BFC\u81F4\u8FDE\u63A5\u8D85\u65F6\u3002\u6B64\u5916\uFF0C\u5728\u64B0\u5199\u672C\u6587\u65F6\uFF0CgetProgramAccounts\u7AEF\u70B9\u4E0D\u652F\u6301\u5206\u9875\u3002\u5982\u679C\u67E5\u8BE2\u7ED3\u679C\u592A\u5927\uFF0C\u54CD\u5E94\u5C06\u88AB\u622A\u65AD\u3002

    \u4E3A\u4E86\u89E3\u51B3\u5F53\u524D\u7684\u9650\u5236\uFF0CgetProgramAccounts\u63D0\u4F9B\u4E86\u4E00\u4E9B\u6709\u7528\u7684\u53C2\u6570\uFF0C\u5305\u62ECdataSlice\u548Cfilters\u9009\u9879\u7684memcmp\u548CdataSize\u3002\u901A\u8FC7\u63D0\u4F9B\u8FD9\u4E9B\u53C2\u6570\u7684\u7EC4\u5408\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5C06\u67E5\u8BE2\u8303\u56F4\u7F29\u5C0F\u5230\u53EF\u7BA1\u7406\u548C\u53EF\u9884\u6D4B\u7684\u5927\u5C0F\u3002

    ",2),dn=n("code",null,"getProgramAccounts",-1),fn=s("\u7684\u4E00\u4E2A\u5E38\u89C1\u793A\u4F8B\u6D89\u53CA\u4E0E"),_n={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},gn=s("SPL-Token Program"),hn=s(" \u7A0B\u5E8F\u4EA4\u4E92\u3002\u4EC5\u4F7F\u7528\u57FA\u672C\u8C03\u7528\u8BF7\u6C42\u7531Token\u7A0B\u5E8F\u62E5\u6709\u7684\u6240\u6709\u8D26\u6237\u5C06\u6D89\u53CA\u5927\u91CF\u7684\u6570\u636E\u3002\u7136\u800C\uFF0C\u901A\u8FC7\u63D0\u4F9B\u53C2\u6570\uFF0C\u6211\u4EEC\u53EF\u4EE5\u9AD8\u6548\u5730\u8BF7\u6C42\u6211\u4EEC\u8981\u4F7F\u7528\u7684\u6570\u636E\u3002"),yn=o('

    filters

    \u4E0EgetProgramAccounts\u4E00\u8D77\u4F7F\u7528\u7684\u6700\u5E38\u89C1\u53C2\u6570\u662Ffilters\u6570\u7EC4\u3002\u8BE5\u6570\u7EC4\u63A5\u53D7\u4E24\u79CD\u7C7B\u578B\u7684\u8FC7\u6EE4\u5668\uFF0C\u5373dataSize\u548Cmemcmp\u3002\u5728\u4F7F\u7528\u8FD9\u4E9B\u8FC7\u6EE4\u5668\u4E4B\u524D\uFF0C\u6211\u4EEC\u5E94\u8BE5\u719F\u6089\u6211\u4EEC\u8BF7\u6C42\u7684\u6570\u636E\u7684\u5E03\u5C40\u548C\u5E8F\u5217\u5316\u65B9\u5F0F\u3002

    dataSize

    ',3),An=s("\u5728Token\u7A0B\u5E8F\u7684\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230"),wn={href:"https://github.com/solana-labs/solana-program-library/blob/08d9999f997a8bf38719679be9d572f119d0d960/token/program/src/state.rs#L86-L106",target:"_blank",rel:"noopener noreferrer"},Cn=s("\u4EE3\u5E01\u8D26\u6237\u7684\u957F\u5EA6\u4E3A165\u4E2A\u5B57\u8282"),Sn=s("\u3002 \u5177\u4F53\u800C\u8A00\uFF0C\u4E00\u4E2A\u4EE3\u5E01\u8D26\u6237\u6709\u516B\u4E2A\u4E0D\u540C\u7684\u5B57\u6BB5\uFF0C\u6BCF\u4E2A\u5B57\u6BB5\u9700\u8981\u4E00\u5B9A\u6570\u91CF\u7684\u5B57\u8282\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u4E0B\u9762\u7684\u793A\u4F8B\u56FE\u6765\u53EF\u89C6\u5316\u8FD9\u4E9B\u6570\u636E\u7684\u5E03\u5C40\u3002"),Pn=o('

    Account Size

    \u5982\u679C\u6211\u4EEC\u60F3\u627E\u5230\u7531\u6211\u4EEC\u7684\u94B1\u5305\u5730\u5740\u62E5\u6709\u7684\u6240\u6709\u4EE3\u5E01\u8D26\u6237\uFF0C\u6211\u4EEC\u53EF\u4EE5\u5728filters\u6570\u7EC4\u4E2D\u6DFB\u52A0{ dataSize: 165 }\u6765\u5C06\u67E5\u8BE2\u8303\u56F4\u7F29\u5C0F\u4E3A\u4EC5\u9650\u957F\u5EA6\u4E3A165\u4E2A\u5B57\u8282\u7684\u8D26\u6237\u3002\u7136\u800C\uFF0C\u4EC5\u6B64\u8FD8\u4E0D\u591F\u3002\u6211\u4EEC\u8FD8\u9700\u8981\u6DFB\u52A0\u4E00\u4E2A\u8FC7\u6EE4\u5668\u6765\u67E5\u627E\u7531\u6211\u4EEC\u7684\u5730\u5740\u62E5\u6709\u7684\u8D26\u6237\u3002\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528memcmp\u8FC7\u6EE4\u5668\u5B9E\u73B0\u8FD9\u4E00\u70B9\u3002

    memcmp

    memcmp\u8FC7\u6EE4\u5668\uFF0C\u4E5F\u53EB"\u5185\u5B58\u6BD4\u8F83"\u8FC7\u6EE4\u5668\uFF0C\u5141\u8BB8\u6211\u4EEC\u6BD4\u8F83\u5B58\u50A8\u5728\u8D26\u6237\u4E0A\u7684\u4EFB\u4F55\u5B57\u6BB5\u7684\u6570\u636E\u3002\u5177\u4F53\u800C\u8A00\uFF0C\u6211\u4EEC\u53EF\u4EE5\u67E5\u8BE2\u4EC5\u4E0E\u7279\u5B9A\u4F4D\u7F6E\u4E0A\u7684\u7279\u5B9A\u4E00\u7EC4\u5B57\u8282\u5339\u914D\u7684\u8D26\u6237\u3002memcmp\u9700\u8981\u4E24\u4E2A\u53C2\u6570\uFF1A

    • offset: \u5F00\u59CB\u6BD4\u8F83\u6570\u636E\u7684\u4F4D\u7F6E\u3002\u8FD9\u4E2A\u4F4D\u7F6E\u4EE5\u5B57\u8282\u4E3A\u5355\u4F4D\uFF0C\u8868\u793A\u4E3A\u4E00\u4E2A\u6574\u6570\u3002
    • bytes: \u6570\u636E\u5E94\u8BE5\u4E0E\u8D26\u6237\u7684\u6570\u636E\u5339\u914D\u3002\u8FD9\u8868\u793A\u4E3A\u4E00\u4E2Abase58\u7F16\u7801\u7684\u5B57\u7B26\u4E32\uFF0C\u5E94\u8BE5\u9650\u5236\u5728129\u4E2A\u5B57\u8282\u4EE5\u4E0B\u3002

    \u9700\u8981\u6CE8\u610F\u7684\u662F\uFF0Cmemcmp\u53EA\u4F1A\u8FD4\u56DE\u4E0E\u63D0\u4F9B\u7684bytes\u5B8C\u5168\u5339\u914D\u7684\u7ED3\u679C\u3002\u76EE\u524D\uFF0C\u5B83\u4E0D\u652F\u6301\u4E0E\u63D0\u4F9B\u7684bytes\u76F8\u6BD4\u5C0F\u4E8E\u6216\u5927\u4E8E\u7684\u6BD4\u8F83\u3002

    \u7EE7\u7EED\u4F7F\u7528\u6211\u4EEC\u7684Token\u7A0B\u5E8F\u793A\u4F8B\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4FEE\u6539\u67E5\u8BE2\uFF0C\u53EA\u8FD4\u56DE\u7531\u6211\u4EEC\u7684\u94B1\u5305\u5730\u5740\u62E5\u6709\u7684\u4EE3\u5E01\u8D26\u6237\u3002\u89C2\u5BDF\u4EE3\u5E01\u8D26\u6237\u65F6\uFF0C\u6211\u4EEC\u53EF\u4EE5\u770B\u5230\u5B58\u50A8\u5728\u4EE3\u5E01\u8D26\u6237\u4E0A\u7684\u524D\u4E24\u4E2A\u5B57\u6BB5\u90FD\u662F\u516C\u94A5\uFF0C\u800C\u4E14\u6BCF\u4E2A\u516C\u94A5\u7684\u957F\u5EA6\u4E3A32\u4E2A\u5B57\u8282\u3002\u9274\u4E8Eowner\u662F\u7B2C\u4E8C\u4E2A\u5B57\u6BB5\uFF0C\u6211\u4EEC\u5E94\u8BE5\u4ECEoffset\u4E3A32\u5B57\u8282\u7684\u4F4D\u7F6E\u5F00\u59CB\u8FDB\u884Cmemcmp\u3002\u4ECE\u8FD9\u91CC\u5F00\u59CB\uFF0C\u6211\u4EEC\u5C06\u5BFB\u627Eowner\u5B57\u6BB5\u4E0E\u6211\u4EEC\u7684\u94B1\u5305\u5730\u5740\u5339\u914D\u7684\u8D26\u6237\u3002

    Account Size

    \u6211\u4EEC\u53EF\u4EE5\u901A\u8FC7\u4EE5\u4E0B\u5B9E\u4F8B\u6765\u8C03\u7528\u6B64\u67E5\u8BE2\uFF1A

    ',9),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"TOKEN_PROGRAM_ID"),s(),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/spl-token"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/hello-world.html.7962bd1c.js b/docs/.vuepress/dist/assets/hello-world.html.888726f2.js similarity index 99% rename from docs/.vuepress/dist/assets/hello-world.html.7962bd1c.js rename to docs/.vuepress/dist/assets/hello-world.html.888726f2.js index 8a2f71555..2c303b968 100644 --- a/docs/.vuepress/dist/assets/hello-world.html.7962bd1c.js +++ b/docs/.vuepress/dist/assets/hello-world.html.888726f2.js @@ -1,4 +1,4 @@ -import{_ as t,r as o,o as c,c as l,a as n,b as e,F as u,d as s,e as p}from"./app.07ce7a66.js";var r="/assets/solpg.486fd175.gif";const i={},k=n("h1",{id:"creer-un-jeu-on-chain-sur-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#creer-un-jeu-on-chain-sur-solana","aria-hidden":"true"},"#"),s(" Cr\xE9er un jeu on-chain sur Solana")],-1),m=n("h2",{id:"commencez-votre-premier-jeu-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#commencez-votre-premier-jeu-solana","aria-hidden":"true"},"#"),s(" Commencez votre premier jeu Solana")],-1),d=n("p",null,"Guide vid\xE9o:",-1),b=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/_vQ3bSs3svs",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),g=n("p",null,"Version live. (utilisez le devnet dans la version int\xE9gr\xE9e)",-1),y=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventure/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},` +import{_ as t,r as o,o as c,c as l,a as n,b as e,F as u,d as s,e as p}from"./app.d411e3b3.js";var r="/assets/solpg.486fd175.gif";const i={},k=n("h1",{id:"creer-un-jeu-on-chain-sur-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#creer-un-jeu-on-chain-sur-solana","aria-hidden":"true"},"#"),s(" Cr\xE9er un jeu on-chain sur Solana")],-1),m=n("h2",{id:"commencez-votre-premier-jeu-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#commencez-votre-premier-jeu-solana","aria-hidden":"true"},"#"),s(" Commencez votre premier jeu Solana")],-1),d=n("p",null,"Guide vid\xE9o:",-1),b=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/_vQ3bSs3svs",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),g=n("p",null,"Version live. (utilisez le devnet dans la version int\xE9gr\xE9e)",-1),y=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventure/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},` `,-1),f=p('

    Tiny Adventure

    Tiny Adventure est un programme Solana dont l'utilisation est adapt\xE9e aux d\xE9butants et cr\xE9\xE9 \xE0 l'aide du framework Anchor. L'objectif de ce programme est de vous montrer comment cr\xE9er un jeu simple qui permet aux joueurs de conna\xEEtre leur position et de se d\xE9placer vers la gauche ou vers la droite.

    Le programme Tiny Adventure comprend seulement 3 instructions :

    • initialize - Cette instruction cr\xE9e un compte sur la cha\xEEne pour stocker la position du joueur
    • move_left - Cette instruction permet au joueur de se d\xE9placer vers la gauche
    • move_right - Cette instruction permet au joueur de se d\xE9placer vers la droite
    ',4),h=s("Dans les sections suivantes, nous allons suivre le processus de construction de ce jeu \xE9tape par \xE9tape. Vous pouvez trouver le code source complet, pr\xEAt \xE0 \xEAtre d\xE9ploy\xE9 \xE0 partir de votre navigateur, dans cet "),v={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},_=s("exemple Solana Playground"),w=s("."),q=s("Si vous avez besoin de vous familiariser avec le framework Anchor, n'h\xE9sitez pas \xE0 consulter le module Anchor de "),x={href:"https://www.soldev.app/course",target:"_blank",rel:"noopener noreferrer"},A=s("Solana Course"),j=s(" pour commencer."),D=n("h3",{id:"pour-commencer",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pour-commencer","aria-hidden":"true"},"#"),s(" Pour commencer")],-1),z=n("p",null,"Pour commencer \xE0 cr\xE9er le jeu Tiny Adventure, suivez les \xE9tapes suivantes :",-1),S=s("Visiter le "),P={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},G=s("Solana Playground"),L=s(" et cr\xE9er un nouveau projet Anchor. Si vous \xEAtes nouveau sur Solana Playground, vous devrez \xE9galement cr\xE9er un portefeuille Playground. Voici un exemple d'utilisation de Solana Playground :"),C=p('

    solpg.gif

    Apr\xE8s avoir cr\xE9\xE9 un nouveau projet, remplacez le code par d\xE9faut par le code ci-dessous :

    use anchor_lang::prelude::*;
     
     declare_id!("11111111111111111111111111111111");
    diff --git a/docs/.vuepress/dist/assets/hello-world.html.46100458.js b/docs/.vuepress/dist/assets/hello-world.html.96baeba5.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/hello-world.html.46100458.js
    rename to docs/.vuepress/dist/assets/hello-world.html.96baeba5.js
    index 28b698316..9e9364fc2 100644
    --- a/docs/.vuepress/dist/assets/hello-world.html.46100458.js
    +++ b/docs/.vuepress/dist/assets/hello-world.html.96baeba5.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a as n,b as t,F as u,d as s,e as p}from"./app.07ce7a66.js";var i="/assets/solpg.486fd175.gif";const r={},k=n("h1",{id:"building-an-on-chain-game-on-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#building-an-on-chain-game-on-solana","aria-hidden":"true"},"#"),s(" Building an on-chain game on Solana")],-1),m=n("h2",{id:"getting-started-with-your-first-solana-game",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#getting-started-with-your-first-solana-game","aria-hidden":"true"},"#"),s(" Getting started with your first Solana game")],-1),b=n("p",null,"Video Walkthrough:",-1),d=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/_vQ3bSs3svs",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),h=n("p",null,"Live Version. (use devnet in the embedded version)",-1),g=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventure/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
    +import{_ as e,r as o,o as c,c as l,a as n,b as t,F as u,d as s,e as p}from"./app.d411e3b3.js";var i="/assets/solpg.486fd175.gif";const r={},k=n("h1",{id:"building-an-on-chain-game-on-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#building-an-on-chain-game-on-solana","aria-hidden":"true"},"#"),s(" Building an on-chain game on Solana")],-1),m=n("h2",{id:"getting-started-with-your-first-solana-game",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#getting-started-with-your-first-solana-game","aria-hidden":"true"},"#"),s(" Getting started with your first Solana game")],-1),b=n("p",null,"Video Walkthrough:",-1),d=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/_vQ3bSs3svs",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),h=n("p",null,"Live Version. (use devnet in the embedded version)",-1),g=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventure/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
     `,-1),y=p('

    Tiny Adventure

    Tiny Adventure is a beginner-friendly Solana program created using the Anchor framework. The goal of this program is to show you how to create a simple game that allows players to track their position and move left or right.

    The Tiny Adventure Program consists of only 3 instructions:

    • initialize - This instruction sets up an on-chain account to store the player's position
    • move_left - This instruction lets the player move their position to the left
    • move_right - This instruction lets the player move their position to the right
    ',4),f=s("In the upcoming sections, we'll walk through the process of building this game step by step. You can find the complete source code, available to deploy from your browser, in this "),w={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},_=s("Solana Playground example"),v=s("."),A=s("If need to familiarize yourself with the Anchor framework, feel free to check out the Anchor module of the "),q={href:"https://www.soldev.app/course",target:"_blank",rel:"noopener noreferrer"},x=s("Solana Course"),D=s(" to get started."),T=n("h3",{id:"getting-started",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#getting-started","aria-hidden":"true"},"#"),s(" Getting Started")],-1),S=n("p",null,"To start building the Tiny Adventure game, follow these steps:",-1),G=s("Visit "),P={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},z=s("Solana Playground"),I=s(" and create a new Anchor project. If you're new to Solana Playground, you'll also need to create a Playground Wallet. Here is an example of how to use Solana Playground:"),L=p('

    solpg.gif

    After creating a new project, replace the default starter code with the code below:

    use anchor_lang::prelude::*;
     
     declare_id!("11111111111111111111111111111111");
    diff --git a/docs/.vuepress/dist/assets/hello-world.html.97d1eb37.js b/docs/.vuepress/dist/assets/hello-world.html.acc4db6a.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/hello-world.html.97d1eb37.js
    rename to docs/.vuepress/dist/assets/hello-world.html.acc4db6a.js
    index 5a31f6b8e..cef678fde 100644
    --- a/docs/.vuepress/dist/assets/hello-world.html.97d1eb37.js
    +++ b/docs/.vuepress/dist/assets/hello-world.html.acc4db6a.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as a,e as t}from"./app.07ce7a66.js";var i="/assets/solpg.486fd175.gif";const r={},k=n("h1",{id:"pagbuo-ng-on-chain-na-laro-sa-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagbuo-ng-on-chain-na-laro-sa-solana","aria-hidden":"true"},"#"),a(" Pagbuo ng on-chain na laro sa Solana")],-1),m=n("h2",{id:"pagsisimula-sa-iyong-unang-laro-ng-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagsisimula-sa-iyong-unang-laro-ng-solana","aria-hidden":"true"},"#"),a(" Pagsisimula sa iyong unang laro ng Solana")],-1),g=n("p",null,"Walkthrough ng Video:",-1),b=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/_vQ3bSs3svs",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),d=n("p",null,"Live na Bersyon. (gamitin ang devnet sa naka-embed na bersyon)",-1),y=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventure/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
    +import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as a,e as t}from"./app.d411e3b3.js";var i="/assets/solpg.486fd175.gif";const r={},k=n("h1",{id:"pagbuo-ng-on-chain-na-laro-sa-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagbuo-ng-on-chain-na-laro-sa-solana","aria-hidden":"true"},"#"),a(" Pagbuo ng on-chain na laro sa Solana")],-1),m=n("h2",{id:"pagsisimula-sa-iyong-unang-laro-ng-solana",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagsisimula-sa-iyong-unang-laro-ng-solana","aria-hidden":"true"},"#"),a(" Pagsisimula sa iyong unang laro ng Solana")],-1),g=n("p",null,"Walkthrough ng Video:",-1),b=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/_vQ3bSs3svs",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),d=n("p",null,"Live na Bersyon. (gamitin ang devnet sa naka-embed na bersyon)",-1),y=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventure/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
     `,-1),h=t('

    Tiny Adventure

    Ang Tiny Adventure ay isang beginner-friendly na programang Solana na nilikha gamit ang Anchor framework. Ang layunin ng program na ito ay ipakita sa iyo kung paano lumikha ng isang simpleng laro na nagbibigay-daan sa mga manlalaro na subaybayan ang kanilang posisyon at lumipat pakaliwa o kanan.

    Ang Tiny Adventure Program ay binubuo lamang ng 3 mga instruction:

    • initialize - Ang instruction na ito ay nagse-set up ng on-chain na account upang iimbak ang posisyon ng manlalaro
    • move_left - Hinahayaan ng pagtuturo na ito ang player na ilipat ang kanilang posisyon sa kaliwa
    • move_right - Hinahayaan ng pagtuturo na ito ang player na ilipat ang kanilang posisyon sa kanan
    ',4),_=a("Sa mga paparating na seksyon, tatalakayin natin ang proseso ng pagbuo ng larong ito nang sunud-sunod. Mahahanap mo ang kumpletong source code, na magagamit upang i-deploy mula sa iyong browser, sa "),w={href:"https://beta.solpg.io/tutorials/tiny-adventure",target:"_blank",rel:"noopener noreferrer"},f=a("halimbawa ng Solana Playground"),v=a("."),A=a("Kung kailangan mong maging pamilyar sa Anchor framework, huwag mag-atubiling tingnan ang Anchor module ng "),q={href:"https://www.soldev.app/course",target:"_blank",rel:"noopener noreferrer"},x=a("Solana Course"),D=a(" para makapagsimula."),S=n("h3",{id:"pagsisimula",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagsisimula","aria-hidden":"true"},"#"),a(" Pagsisimula")],-1),P=n("p",null,"Upang simulan ang pagbuo ng larong Tiny Adventure, sundin ang mga hakbang na ito:",-1),G=a("Bisitahin ang "),M={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},z=a("Solana Playground"),L=a(" at gumawa ng bagong Anchor project. Kung bago ka sa Solana Playground, kakailanganin mo ring gumawa ng Playground Wallet. Narito ang isang halimbawa kung paano gamitin ang Solana Playground:"),j=t('

    solpg.gif

    Pagkatapos gumawa ng bagong proyekto, palitan ang default na starter code ng code sa ibaba:

    use anchor_lang::prelude::*;
     
     declare_id!("11111111111111111111111111111111");
    diff --git a/docs/.vuepress/dist/assets/index.html.92035043.js b/docs/.vuepress/dist/assets/index.html.1823d81d.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/index.html.92035043.js
    rename to docs/.vuepress/dist/assets/index.html.1823d81d.js
    index d3f0a2a85..60bc55a97 100644
    --- a/docs/.vuepress/dist/assets/index.html.92035043.js
    +++ b/docs/.vuepress/dist/assets/index.html.1823d81d.js
    @@ -1 +1 @@
    -import{_ as n,r as s,o as r,c as d,a as e,b as a,F as c,d as t,e as i}from"./app.07ce7a66.js";const l={},h=e("h1",{id:"cooking-\u0E01\u0E31\u0E1A-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cooking-\u0E01\u0E31\u0E1A-solana","aria-hidden":"true"},"#"),t(" Cooking \u0E01\u0E31\u0E1A Solana")],-1),_=e("p",null,[e("em",null,"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana"),t(" \u0E04\u0E37\u0E2D\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E2B\u0E49\u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E2B\u0E25\u0E31\u0E01\u0E46 \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E2A\u0E23\u0E49\u0E32\u0E07 applications \u0E1A\u0E19 Solana \u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14 \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E08\u0E30\u0E40\u0E19\u0E49\u0E19\u0E43\u0E19\u0E41\u0E15\u0E48\u0E25\u0E30\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32 Solana \u0E42\u0E14\u0E22\u0E08\u0E30\u0E43\u0E2B\u0E49\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21 \u0E23\u0E27\u0E21\u0E44\u0E1B\u0E16\u0E36\u0E07\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22")],-1),p=e("h2",{id:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19","aria-hidden":"true"},"#"),t(" \u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19")],-1),u=e("p",null,"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D\u0E19\u0E35\u0E49\u0E2D\u0E2D\u0E01\u0E41\u0E1A\u0E1A\u0E21\u0E32\u0E43\u0E2B\u0E49\u0E07\u0E48\u0E32\u0E22\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 Solana \u0E17\u0E35\u0E48\u0E08\u0E30\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19 \u0E16\u0E36\u0E07\u0E41\u0E21\u0E49\u0E27\u0E48\u0E32\u0E04\u0E38\u0E13\u0E08\u0E30\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E27\u0E48\u0E32\u0E08\u0E30\u0E17\u0E33\u0E2D\u0E30\u0E44\u0E23\u0E22\u0E31\u0E07\u0E44\u0E07 \u0E01\u0E32\u0E23\u0E40\u0E23\u0E34\u0E48\u0E21\u0E08\u0E32\u0E01\u0E0A\u0E48\u0E27\u0E22\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19\u0E01\u0E47\u0E40\u0E1B\u0E47\u0E19\u0E01\u0E32\u0E23\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E17\u0E35\u0E48\u0E14\u0E35\u0E19\u0E30!",-1),b=t("\u0E25\u0E2D\u0E07\u0E14\u0E39 issues \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48 "),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=t("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),m=t(". \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E01\u0E32\u0E23\u0E0A\u0E48\u0E27\u0E22\u0E01\u0E31\u0E19 "),x={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},g=t("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),S=t(". \u0E16\u0E49\u0E32\u0E04\u0E38\u0E13\u0E40\u0E08\u0E2D\u0E27\u0E48\u0E32\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D\u0E40\u0E23\u0E32\u0E02\u0E32\u0E14\u0E2D\u0E30\u0E44\u0E23\u0E44\u0E1B \u0E01\u0E47\u0E40\u0E1B\u0E34\u0E14 issue \u0E44\u0E14\u0E49\u0E40\u0E25\u0E22"),v=i('

    \u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D

    \u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana \u0E41\u0E1A\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E25\u0E32\u0E22\u0E2A\u0E48\u0E27\u0E19 \u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E2A\u0E48\u0E27\u0E19\u0E08\u0E30\u0E40\u0E19\u0E49\u0E19\u0E04\u0E19\u0E25\u0E30\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22\u0E01\u0E31\u0E19

    \u0E2A\u0E48\u0E27\u0E19\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22
    \u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E2B\u0E25\u0E31\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E04\u0E27\u0E32\u0E21\u0E23\u0E39\u0E49\u0E17\u0E35\u0E48\u0E04\u0E27\u0E23\u0E08\u0E30\u0E23\u0E39\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana
    \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E02\u0E2D\u0E07\u0E41\u0E15\u0E48\u0E25\u0E30\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32
    \u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2A\u0E48\u0E27\u0E19\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E17\u0E35\u0E48\u0E21\u0E31\u0E01\u0E08\u0E30\u0E21\u0E35 code \u0E2A\u0E31\u0E49\u0E19\u0E46 \u0E2D\u0E22\u0E39\u0E48\u0E14\u0E49\u0E27\u0E22
    ',3);function N(V,B){const o=s("ExternalLinkIcon");return r(),d(c,null,[h,_,p,u,e("p",null,[b,e("a",f,[k,a(o)]),m,e("a",x,[g,a(o)]),S]),v],64)}var y=n(l,[["render",N]]);export{y as default}; +import{_ as n,r as s,o as r,c as d,a as e,b as a,F as c,d as t,e as i}from"./app.d411e3b3.js";const l={},h=e("h1",{id:"cooking-\u0E01\u0E31\u0E1A-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cooking-\u0E01\u0E31\u0E1A-solana","aria-hidden":"true"},"#"),t(" Cooking \u0E01\u0E31\u0E1A Solana")],-1),_=e("p",null,[e("em",null,"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana"),t(" \u0E04\u0E37\u0E2D\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 \u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E2B\u0E49\u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E2B\u0E25\u0E31\u0E01\u0E46 \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E2A\u0E23\u0E49\u0E32\u0E07 applications \u0E1A\u0E19 Solana \u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14 \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E08\u0E30\u0E40\u0E19\u0E49\u0E19\u0E43\u0E19\u0E41\u0E15\u0E48\u0E25\u0E30\u0E21\u0E38\u0E21\u0E21\u0E2D\u0E07\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32 Solana \u0E42\u0E14\u0E22\u0E08\u0E30\u0E43\u0E2B\u0E49\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21 \u0E23\u0E27\u0E21\u0E44\u0E1B\u0E16\u0E36\u0E07\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22")],-1),p=e("h2",{id:"\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19","aria-hidden":"true"},"#"),t(" \u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19")],-1),u=e("p",null,"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D\u0E19\u0E35\u0E49\u0E2D\u0E2D\u0E01\u0E41\u0E1A\u0E1A\u0E21\u0E32\u0E43\u0E2B\u0E49\u0E07\u0E48\u0E32\u0E22\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 Solana \u0E17\u0E35\u0E48\u0E08\u0E30\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19 \u0E16\u0E36\u0E07\u0E41\u0E21\u0E49\u0E27\u0E48\u0E32\u0E04\u0E38\u0E13\u0E08\u0E30\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E27\u0E48\u0E32\u0E08\u0E30\u0E17\u0E33\u0E2D\u0E30\u0E44\u0E23\u0E22\u0E31\u0E07\u0E44\u0E07 \u0E01\u0E32\u0E23\u0E40\u0E23\u0E34\u0E48\u0E21\u0E08\u0E32\u0E01\u0E0A\u0E48\u0E27\u0E22\u0E01\u0E31\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19\u0E01\u0E47\u0E40\u0E1B\u0E47\u0E19\u0E01\u0E32\u0E23\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E17\u0E35\u0E48\u0E14\u0E35\u0E19\u0E30!",-1),b=t("\u0E25\u0E2D\u0E07\u0E14\u0E39 issues \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48 "),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=t("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),m=t(". \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E01\u0E32\u0E23\u0E0A\u0E48\u0E27\u0E22\u0E01\u0E31\u0E19 "),x={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},g=t("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),S=t(". \u0E16\u0E49\u0E32\u0E04\u0E38\u0E13\u0E40\u0E08\u0E2D\u0E27\u0E48\u0E32\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D\u0E40\u0E23\u0E32\u0E02\u0E32\u0E14\u0E2D\u0E30\u0E44\u0E23\u0E44\u0E1B \u0E01\u0E47\u0E40\u0E1B\u0E34\u0E14 issue \u0E44\u0E14\u0E49\u0E40\u0E25\u0E22"),v=i('

    \u0E27\u0E34\u0E18\u0E35\u0E2D\u0E48\u0E32\u0E19\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D

    \u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana \u0E41\u0E1A\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E25\u0E32\u0E22\u0E2A\u0E48\u0E27\u0E19 \u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E2A\u0E48\u0E27\u0E19\u0E08\u0E30\u0E40\u0E19\u0E49\u0E19\u0E04\u0E19\u0E25\u0E30\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22\u0E01\u0E31\u0E19

    \u0E2A\u0E48\u0E27\u0E19\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22
    \u0E41\u0E19\u0E27\u0E04\u0E27\u0E32\u0E21\u0E04\u0E34\u0E14\u0E2B\u0E25\u0E31\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E04\u0E27\u0E32\u0E21\u0E23\u0E39\u0E49\u0E17\u0E35\u0E48\u0E04\u0E27\u0E23\u0E08\u0E30\u0E23\u0E39\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana
    \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E02\u0E2D\u0E07\u0E41\u0E15\u0E48\u0E25\u0E30\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32
    \u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2A\u0E48\u0E27\u0E19\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E17\u0E35\u0E48\u0E21\u0E31\u0E01\u0E08\u0E30\u0E21\u0E35 code \u0E2A\u0E31\u0E49\u0E19\u0E46 \u0E2D\u0E22\u0E39\u0E48\u0E14\u0E49\u0E27\u0E22
    ',3);function N(V,B){const o=s("ExternalLinkIcon");return r(),d(c,null,[h,_,p,u,e("p",null,[b,e("a",f,[k,a(o)]),m,e("a",x,[g,a(o)]),S]),v],64)}var y=n(l,[["render",N]]);export{y as default}; diff --git a/docs/.vuepress/dist/assets/index.html.2017fef1.js b/docs/.vuepress/dist/assets/index.html.28db958b.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.2017fef1.js rename to docs/.vuepress/dist/assets/index.html.28db958b.js index c95d64464..6c7926a8c 100644 --- a/docs/.vuepress/dist/assets/index.html.2017fef1.js +++ b/docs/.vuepress/dist/assets/index.html.28db958b.js @@ -1 +1 @@ -import{_ as o,r as n,o as s,c as r,a,b as d,F as l,d as e,e as c}from"./app.07ce7a66.js";const h={},i=a("h1",{id:"solana\u79D8\u7C4D",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#solana\u79D8\u7C4D","aria-hidden":"true"},"#"),e(" Solana\u79D8\u7C4D")],-1),_=a("p",null,"\u300ASolana\u79D8\u7C4D\u300B\u529B\u56FE\u4E3A\u4F60\u63D0\u4F9B\u5728Solana\u516C\u94FE\u4E0A\u7F16\u5199\u53BB\u4E2D\u5FC3\u5316\u5E94\u7528\u6240\u9700\u7684\u6838\u5FC3\u6982\u5FF5\u3001 \u53C2\u8003\u3002 \u6BCF\u4E2A\u6982\u5FF5\u548C\u53C2\u8003\u90FD\u4F1A\u805A\u7126\u4E8ESolana\u5F00\u53D1\u4E2D\u7684\u67D0\u4E2A\u5177\u4F53\u65B9\u9762\uFF0C\u540C\u65F6\u63D0\u4F9B\u989D\u5916\u7684\u6280\u672F\u7EC6\u8282\u4EE5\u53CA\u7528\u4F8B\u3002",-1),p=a("h2",{id:"\u8D21\u732E\u4EE3\u7801",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u8D21\u732E\u4EE3\u7801","aria-hidden":"true"},"#"),e(" \u8D21\u732E\u4EE3\u7801")],-1),u=a("p",null,"Solana\u79D8\u7C4D\u7684\u8BBE\u8BA1\u529B\u56FE\u8BA9\u65B0\u7684Solana\u5F00\u53D1\u8005\u4E5F\u80FD\u5BB9\u6613\u7684\u8D21\u732E\u4EE3\u7801\u3002 \u5373\u4F7F\u4F60\u8FD8\u4E0D\u592A\u4E86\u89E3\u5982\u4F55\u505A\u9879\u76EE\uFF0C\u8D21\u732E\u4EE3\u7801\u4E5F\u662F\u4E00\u4E2A\u5F88\u597D\u7684\u5B66\u4E60\u8FC7\u7A0B\uFF01",-1),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=e("\u8FD9\u91CC"),x=e(" \u53EF\u4EE5\u67E5\u770B\u6240\u6709\u5F85\u89E3\u51B3\u7684issue\u3002"),S=c('

    \u5982\u679C\u4F60\u89C9\u5F97\u8FD8\u6709\u5176\u4ED6\u54EA\u4E9B\u5EFA\u8BAE\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u4E00\u4E2Aissue.

    \u5982\u4F55\u9605\u8BFBSolana\u79D8\u7C4D

    Solana\u79D8\u7C4D\u5206\u4E3A\u4E0D\u540C\u7684\u7AE0\u8282\u3002\u6BCF\u4E2A\u7AE0\u8282\u90FD\u6709\u4E0D\u540C\u7684\u76EE\u6807\u3002

    \u7AE0\u8282\u63CF\u8FF0
    \u6838\u5FC3\u6982\u5FF5Solana\u7684\u57FA\u7840\u5143\u7D20\u3002\u5F00\u53D1\u8005\u6700\u597D\u80FD\u4E86\u89E3\u8FD9\u4E9B\u5185\u5BB9\u3002
    \u6307\u5357\u5173\u4E8E\u5F00\u53D1\u4E2D\u6240\u80FD\u7528\u5230\u7684\u5DE5\u5177\u7684\u7B80\u8981\u4ECB\u7ECD\u3002
    \u53C2\u8003\u5E38\u7528\u7684\u4EE3\u7801\u7247\u6BB5\u53C2\u8003
    ',4);function m(k,N){const t=n("ExternalLinkIcon");return s(),r(l,null,[i,_,p,u,a("p",null,[a("a",b,[f,d(t)]),x]),S],64)}var g=o(h,[["render",m]]);export{g as default}; +import{_ as o,r as n,o as s,c as r,a,b as d,F as l,d as e,e as c}from"./app.d411e3b3.js";const h={},i=a("h1",{id:"solana\u79D8\u7C4D",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#solana\u79D8\u7C4D","aria-hidden":"true"},"#"),e(" Solana\u79D8\u7C4D")],-1),_=a("p",null,"\u300ASolana\u79D8\u7C4D\u300B\u529B\u56FE\u4E3A\u4F60\u63D0\u4F9B\u5728Solana\u516C\u94FE\u4E0A\u7F16\u5199\u53BB\u4E2D\u5FC3\u5316\u5E94\u7528\u6240\u9700\u7684\u6838\u5FC3\u6982\u5FF5\u3001 \u53C2\u8003\u3002 \u6BCF\u4E2A\u6982\u5FF5\u548C\u53C2\u8003\u90FD\u4F1A\u805A\u7126\u4E8ESolana\u5F00\u53D1\u4E2D\u7684\u67D0\u4E2A\u5177\u4F53\u65B9\u9762\uFF0C\u540C\u65F6\u63D0\u4F9B\u989D\u5916\u7684\u6280\u672F\u7EC6\u8282\u4EE5\u53CA\u7528\u4F8B\u3002",-1),p=a("h2",{id:"\u8D21\u732E\u4EE3\u7801",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u8D21\u732E\u4EE3\u7801","aria-hidden":"true"},"#"),e(" \u8D21\u732E\u4EE3\u7801")],-1),u=a("p",null,"Solana\u79D8\u7C4D\u7684\u8BBE\u8BA1\u529B\u56FE\u8BA9\u65B0\u7684Solana\u5F00\u53D1\u8005\u4E5F\u80FD\u5BB9\u6613\u7684\u8D21\u732E\u4EE3\u7801\u3002 \u5373\u4F7F\u4F60\u8FD8\u4E0D\u592A\u4E86\u89E3\u5982\u4F55\u505A\u9879\u76EE\uFF0C\u8D21\u732E\u4EE3\u7801\u4E5F\u662F\u4E00\u4E2A\u5F88\u597D\u7684\u5B66\u4E60\u8FC7\u7A0B\uFF01",-1),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=e("\u8FD9\u91CC"),x=e(" \u53EF\u4EE5\u67E5\u770B\u6240\u6709\u5F85\u89E3\u51B3\u7684issue\u3002"),S=c('

    \u5982\u679C\u4F60\u89C9\u5F97\u8FD8\u6709\u5176\u4ED6\u54EA\u4E9B\u5EFA\u8BAE\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u4E00\u4E2Aissue.

    \u5982\u4F55\u9605\u8BFBSolana\u79D8\u7C4D

    Solana\u79D8\u7C4D\u5206\u4E3A\u4E0D\u540C\u7684\u7AE0\u8282\u3002\u6BCF\u4E2A\u7AE0\u8282\u90FD\u6709\u4E0D\u540C\u7684\u76EE\u6807\u3002

    \u7AE0\u8282\u63CF\u8FF0
    \u6838\u5FC3\u6982\u5FF5Solana\u7684\u57FA\u7840\u5143\u7D20\u3002\u5F00\u53D1\u8005\u6700\u597D\u80FD\u4E86\u89E3\u8FD9\u4E9B\u5185\u5BB9\u3002
    \u6307\u5357\u5173\u4E8E\u5F00\u53D1\u4E2D\u6240\u80FD\u7528\u5230\u7684\u5DE5\u5177\u7684\u7B80\u8981\u4ECB\u7ECD\u3002
    \u53C2\u8003\u5E38\u7528\u7684\u4EE3\u7801\u7247\u6BB5\u53C2\u8003
    ',4);function m(k,N){const t=n("ExternalLinkIcon");return s(),r(l,null,[i,_,p,u,a("p",null,[a("a",b,[f,d(t)]),x]),S],64)}var g=o(h,[["render",m]]);export{g as default}; diff --git a/docs/.vuepress/dist/assets/index.html.b594f3cc.js b/docs/.vuepress/dist/assets/index.html.37aeede1.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.b594f3cc.js rename to docs/.vuepress/dist/assets/index.html.37aeede1.js index 9ebd8f659..40894d278 100644 --- a/docs/.vuepress/dist/assets/index.html.b594f3cc.js +++ b/docs/.vuepress/dist/assets/index.html.37aeede1.js @@ -1 +1 @@ -import{_ as n,r,o as s,c as i,a as e,b as t,F as c,d as o,e as d}from"./app.07ce7a66.js";const l={},h=e("h1",{id:"cozinhando-com-a-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cozinhando-com-a-solana","aria-hidden":"true"},"#"),o(" Cozinhando com a Solana")],-1),m=e("p",null,[o("O "),e("em",null,"Livro de Receitas da Solana (Solana Cookbook)"),o(" \xE9 um recurso para desenvolvedores que fornece os conceitos e refer\xEAncias essenciais para construir aplicativos na Solana. Cada conceito e refer\xEAncia se concentra em aspectos espec\xEDficos do desenvolvimento na Solana, fornecendo detalhes adicionais e exemplos de uso.")],-1),u=e("h2",{id:"contribuindo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contribuindo","aria-hidden":"true"},"#"),o(" Contribuindo")],-1),_=e("p",null,"O Livro de Receitas da Solana foi desenvolvido para facilitar a contribui\xE7\xE3o de novos desenvolvedores para o ecossistema Solana. Mesmo que voc\xEA n\xE3o saiba fazer algo, contribuir com o livro de receitas \xE9 uma \xF3tima maneira de aprender!",-1),p=o("Confira todos os problemas em aberto "),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},v=o("aqui"),f=o(". Orienta\xE7\xF5es de contribui\xE7\xE3o "),k={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},S=o("aqui"),x=o(". Se voc\xEA perceber que falta alguma coisa no livro de receitas, adicione um problema."),g=d('

    Como Ler o Livro de Receitas

    O Livro de Receitas da Solana \xE9 dividido em diferentes se\xE7\xF5es, cada uma com um objetivo diferente.

    Se\xE7\xE3oDescri\xE7\xE3o
    Conceitos PrincipaisBlocos de constru\xE7\xE3o da Solana que s\xE3o bons de conhecer para o desenvolvimento
    GuiasGuias concisos sobre diferentes ferramentas para desenvolvimento
    Refer\xEAnciasRefer\xEAncias a trechos de c\xF3digo comumente necess\xE1rios
    ',3);function C(L,q){const a=r("ExternalLinkIcon");return s(),i(c,null,[h,m,u,_,e("p",null,[p,e("a",b,[v,t(a)]),f,e("a",k,[S,t(a)]),x]),g],64)}var z=n(l,[["render",C]]);export{z as default}; +import{_ as n,r,o as s,c as i,a as e,b as t,F as c,d as o,e as d}from"./app.d411e3b3.js";const l={},h=e("h1",{id:"cozinhando-com-a-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cozinhando-com-a-solana","aria-hidden":"true"},"#"),o(" Cozinhando com a Solana")],-1),m=e("p",null,[o("O "),e("em",null,"Livro de Receitas da Solana (Solana Cookbook)"),o(" \xE9 um recurso para desenvolvedores que fornece os conceitos e refer\xEAncias essenciais para construir aplicativos na Solana. Cada conceito e refer\xEAncia se concentra em aspectos espec\xEDficos do desenvolvimento na Solana, fornecendo detalhes adicionais e exemplos de uso.")],-1),u=e("h2",{id:"contribuindo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contribuindo","aria-hidden":"true"},"#"),o(" Contribuindo")],-1),_=e("p",null,"O Livro de Receitas da Solana foi desenvolvido para facilitar a contribui\xE7\xE3o de novos desenvolvedores para o ecossistema Solana. Mesmo que voc\xEA n\xE3o saiba fazer algo, contribuir com o livro de receitas \xE9 uma \xF3tima maneira de aprender!",-1),p=o("Confira todos os problemas em aberto "),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},v=o("aqui"),f=o(". Orienta\xE7\xF5es de contribui\xE7\xE3o "),k={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},S=o("aqui"),x=o(". Se voc\xEA perceber que falta alguma coisa no livro de receitas, adicione um problema."),g=d('

    Como Ler o Livro de Receitas

    O Livro de Receitas da Solana \xE9 dividido em diferentes se\xE7\xF5es, cada uma com um objetivo diferente.

    Se\xE7\xE3oDescri\xE7\xE3o
    Conceitos PrincipaisBlocos de constru\xE7\xE3o da Solana que s\xE3o bons de conhecer para o desenvolvimento
    GuiasGuias concisos sobre diferentes ferramentas para desenvolvimento
    Refer\xEAnciasRefer\xEAncias a trechos de c\xF3digo comumente necess\xE1rios
    ',3);function C(L,q){const a=r("ExternalLinkIcon");return s(),i(c,null,[h,m,u,_,e("p",null,[p,e("a",b,[v,t(a)]),f,e("a",k,[S,t(a)]),x]),g],64)}var z=n(l,[["render",C]]);export{z as default}; diff --git a/docs/.vuepress/dist/assets/index.html.9bb2504f.js b/docs/.vuepress/dist/assets/index.html.45f0fd63.js similarity index 98% rename from docs/.vuepress/dist/assets/index.html.9bb2504f.js rename to docs/.vuepress/dist/assets/index.html.45f0fd63.js index cee86158e..ececa9593 100644 --- a/docs/.vuepress/dist/assets/index.html.9bb2504f.js +++ b/docs/.vuepress/dist/assets/index.html.45f0fd63.js @@ -1 +1 @@ -import{_ as o,r as a,o as e,c as i,a as t,b as c,F as r,d as n,e as s}from"./app.07ce7a66.js";const d={},g=t("h1",{id:"nhap-mon-solana",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#nhap-mon-solana","aria-hidden":"true"},"#"),n(" Nh\u1EADp m\xF4n Solana")],-1),l=t("p",null,[n("Cu\u1ED1n s\xE1ch "),t("em",null,"To\xE0n t\u1EADp Solana"),n(" l\xE0 m\u1ED9t t\xE0i li\u1EC7u l\u1EADp tr\xECnh h\u01B0\u1EDBng \u0111\u1EBFn vi\u1EC7c cung c\u1EA5p nh\u01B0ng kh\xE1i ni\u1EC7m c\u0103n b\u1EA3n v\xE0 t\xE0i li\u1EC7u tham kh\u1EA3o cho qu\xE1 tr\xECnh x\xE2y d\u1EF1ng \u1EE9ng d\u1EE5ng tr\xEAn Solana. M\u1ED7i kh\xE1i ni\u1EC7m ho\u1EB7c t\xE0i li\u1EC7u tham kh\u1EA3o kh\xF4ng nh\u1EEFng t\u1EADp trung v\xE0o nh\u1EEFng kh\xEDa c\u1EA1nh c\u1EE5 th\u1EC3 tr\xEAn Solana, m\xE0 c\xF2n cung c\u1EA5p c\xE1c chi ti\u1EBFt gi\u1EA3ng gi\u1EA3i c\u0169ng nh\u01B0 v\xED d\u1EE5 m\u1EABu cho l\u1EADp tr\xECnh vi\xEAn.")],-1),p=t("h2",{id:"\u0111ong-gop",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0111ong-gop","aria-hidden":"true"},"#"),n(" \u0110\xF3ng g\xF3p")],-1),u=t("p",null,"To\xE0n t\u1EADp Solana \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF sao cho c\xE1c l\u1EADp tr\xECnh vi\xEAn m\u1EDBi tr\xEAn Solana c\u0169ng c\xF3 th\u1EC3 d\u1EC5 d\xE0ng tham gia \u0111\xF3ng g\xF3p v\xE0 x\xE2y d\u1EF1ng. Ngay c\u1EA3 khi b\u1EA1n ch\u01B0a c\xF3 \xFD t\u01B0\u1EDFng n\xE0o cho c\xE1c s\u1EA3n ph\u1EA9m c\xE1 nh\xE2n ho\u1EB7c t\u1ED5 ch\u1EE9c c\u1EE7a b\u1EA1n, tham gia g\xF3p \xFD c\u0169ng l\xE0 m\u1ED9t c\xE1ch r\u1EA5t hay \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 trau d\u1ED3i.",-1),_=n("Xem qua t\u1EA5t c\u1EA3 c\xE1c \u0111\xF3ng g\xF3p "),m={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},b=n("t\u1EA1i \u0111\xE2y"),k=n(". C\xE1ch th\u1EE9c g\xF3p \xFD \u0111\u01B0\u1EE3c tr\xECnh b\xE0y "),v={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},f=n("t\u1EA1i \u0111\xE2y"),y=n(". N\u1EBFu b\u1EA1n c\u1EA3m th\u1EA5y To\xE0n t\u1EADp Solana \u0111ang thi\u1EBFu s\xF3t \u1EDF b\u1EA5t k\u1EF3 \u0111i\u1EC3m n\xE0o, vui l\xF2ng t\u1EA1o m\u1EDBi m\u1ED9t g\xF3p \xFD th\xF4ng qua c\xE1c \u0111\u01B0\u1EDDng d\u1EABn b\xEAn tr\xEAn."),S=s('

    C\u1EA5u tr\xFAc c\u1EE7a To\xE0n t\u1EADp Solana

    To\xE0n t\u1EADp Solana \u0111\u01B0\u1EE3c chia th\xE0nh c\xE1c m\u1EE5c c\u1EE5 th\u1EC3, v\xE0 \u1EDF m\u1ED7i m\u1EE5c s\u1EBD tr\xECnh b\xE0y, gi\u1EA3i th\xEDch c\xE1c m\u1EE5c ti\xEAu kh\xE1c nhau.

    M\u1EE5cM\u1EE5c ti\xEAu
    Kh\xE1i ni\u1EC7m c\u0103n b\u1EA3nX\xE2y d\u1EF1ng c\xE1c kh\u1ED1i c\u01A1 s\u1EDF c\u1EE7a Solana c\u1EA7n thi\u1EBFt cho qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng
    H\u01B0\u1EDBng d\u1EABnC\xE1c h\u01B0\u1EDBng d\u1EABn nhanh v\u1EC1 b\u1ED9 c\xF4ng c\u1EE5 h\u1EEFu \xEDch cho qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng
    Tham kh\u1EA3oC\xE1c m\u1EABu code th\u01B0\u1EDDng g\u1EB7p trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng

    L\u1EDDi c\u1EE7a d\u1ECBch gi\u1EA3

    ',4),x=n("Phi\xEAn b\u1EA3n Ti\u1EBFng Vi\u1EC7t c\u1EE7a To\xE0n t\u1EADp Solana \u0111\u01B0\u1EE3c d\u1ECBch l\u1EA1i t\u1EEB phi\xEAn b\u1EA3n Ti\u1EBFng Anh - "),T={href:"https://solanacookbook.com/",target:"_blank",rel:"noopener noreferrer"},N=n("Solana Cookbook"),C=n(" b\u1EDFi "),V={href:"https://sentre.io/",target:"_blank",rel:"noopener noreferrer"},q=n("Sentre Protocol"),B=n(". V\xEC \u0111\xE2y l\xE0 m\u1ED9t t\xE0i li\u1EC7u k\u1EF9 thu\u1EADt n\xEAn \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o t\xEDnh nh\u1EA5t qu\xE1n, m\u1ED9t s\u1ED1 thu\u1EADt ng\u1EEF chuy\xEAn ng\xE0nh s\u1EBD \u0111\u01B0\u1EE3c gi\u1EEF nguy\xEAn v\xE0 kh\xF4ng \u0111\u01B0\u1EE3c d\u1ECBch sang c\xE1c t\u1EEB thay th\u1EBF \u1EDF Ti\u1EBFng Vi\u1EC7t. Ngo\xE0i ra, m\u1ED9t s\u1ED1 h\xECnh minh ho\u1EA1 c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c c\u1EADp nh\u1EADt ch\u1EADm v\xE0 v\u1EABn ph\u1EA3i d\xF9ng h\xECnh \u1EA3nh g\u1ED1c \u1EDF b\u1EA3n Ti\u1EBFng Anh. Hi v\u1ECDng b\u1EA1n \u0111\u1ECDc th\xF4ng c\u1EA3m v\xE0 c\xF3 th\u1EDDi gian h\u1ECDc t\u1EADp vui v\u1EBB. Ch\xFAc c\u1ED9ng \u0111\u1ED3ng Solana Vi\u1EC7t Nam ng\xE0y c\xE0ng ph\xE1t tri\u1EC3n v\u1EC1 ch\u1EA5t v\xE0 l\u01B0\u1EE3ng.");function E(L,M){const h=a("ExternalLinkIcon");return e(),i(r,null,[g,l,p,u,t("p",null,[_,t("a",m,[b,c(h)]),k,t("a",v,[f,c(h)]),y]),S,t("p",null,[x,t("a",T,[N,c(h)]),C,t("a",V,[q,c(h)]),B])],64)}var F=o(d,[["render",E]]);export{F as default}; +import{_ as o,r as a,o as e,c as i,a as t,b as c,F as r,d as n,e as s}from"./app.d411e3b3.js";const d={},g=t("h1",{id:"nhap-mon-solana",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#nhap-mon-solana","aria-hidden":"true"},"#"),n(" Nh\u1EADp m\xF4n Solana")],-1),l=t("p",null,[n("Cu\u1ED1n s\xE1ch "),t("em",null,"To\xE0n t\u1EADp Solana"),n(" l\xE0 m\u1ED9t t\xE0i li\u1EC7u l\u1EADp tr\xECnh h\u01B0\u1EDBng \u0111\u1EBFn vi\u1EC7c cung c\u1EA5p nh\u01B0ng kh\xE1i ni\u1EC7m c\u0103n b\u1EA3n v\xE0 t\xE0i li\u1EC7u tham kh\u1EA3o cho qu\xE1 tr\xECnh x\xE2y d\u1EF1ng \u1EE9ng d\u1EE5ng tr\xEAn Solana. M\u1ED7i kh\xE1i ni\u1EC7m ho\u1EB7c t\xE0i li\u1EC7u tham kh\u1EA3o kh\xF4ng nh\u1EEFng t\u1EADp trung v\xE0o nh\u1EEFng kh\xEDa c\u1EA1nh c\u1EE5 th\u1EC3 tr\xEAn Solana, m\xE0 c\xF2n cung c\u1EA5p c\xE1c chi ti\u1EBFt gi\u1EA3ng gi\u1EA3i c\u0169ng nh\u01B0 v\xED d\u1EE5 m\u1EABu cho l\u1EADp tr\xECnh vi\xEAn.")],-1),p=t("h2",{id:"\u0111ong-gop",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0111ong-gop","aria-hidden":"true"},"#"),n(" \u0110\xF3ng g\xF3p")],-1),u=t("p",null,"To\xE0n t\u1EADp Solana \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF sao cho c\xE1c l\u1EADp tr\xECnh vi\xEAn m\u1EDBi tr\xEAn Solana c\u0169ng c\xF3 th\u1EC3 d\u1EC5 d\xE0ng tham gia \u0111\xF3ng g\xF3p v\xE0 x\xE2y d\u1EF1ng. Ngay c\u1EA3 khi b\u1EA1n ch\u01B0a c\xF3 \xFD t\u01B0\u1EDFng n\xE0o cho c\xE1c s\u1EA3n ph\u1EA9m c\xE1 nh\xE2n ho\u1EB7c t\u1ED5 ch\u1EE9c c\u1EE7a b\u1EA1n, tham gia g\xF3p \xFD c\u0169ng l\xE0 m\u1ED9t c\xE1ch r\u1EA5t hay \u0111\u1EC3 b\u1EA1n c\xF3 th\u1EC3 trau d\u1ED3i.",-1),_=n("Xem qua t\u1EA5t c\u1EA3 c\xE1c \u0111\xF3ng g\xF3p "),m={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},b=n("t\u1EA1i \u0111\xE2y"),k=n(". C\xE1ch th\u1EE9c g\xF3p \xFD \u0111\u01B0\u1EE3c tr\xECnh b\xE0y "),v={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},f=n("t\u1EA1i \u0111\xE2y"),y=n(". N\u1EBFu b\u1EA1n c\u1EA3m th\u1EA5y To\xE0n t\u1EADp Solana \u0111ang thi\u1EBFu s\xF3t \u1EDF b\u1EA5t k\u1EF3 \u0111i\u1EC3m n\xE0o, vui l\xF2ng t\u1EA1o m\u1EDBi m\u1ED9t g\xF3p \xFD th\xF4ng qua c\xE1c \u0111\u01B0\u1EDDng d\u1EABn b\xEAn tr\xEAn."),S=s('

    C\u1EA5u tr\xFAc c\u1EE7a To\xE0n t\u1EADp Solana

    To\xE0n t\u1EADp Solana \u0111\u01B0\u1EE3c chia th\xE0nh c\xE1c m\u1EE5c c\u1EE5 th\u1EC3, v\xE0 \u1EDF m\u1ED7i m\u1EE5c s\u1EBD tr\xECnh b\xE0y, gi\u1EA3i th\xEDch c\xE1c m\u1EE5c ti\xEAu kh\xE1c nhau.

    M\u1EE5cM\u1EE5c ti\xEAu
    Kh\xE1i ni\u1EC7m c\u0103n b\u1EA3nX\xE2y d\u1EF1ng c\xE1c kh\u1ED1i c\u01A1 s\u1EDF c\u1EE7a Solana c\u1EA7n thi\u1EBFt cho qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng
    H\u01B0\u1EDBng d\u1EABnC\xE1c h\u01B0\u1EDBng d\u1EABn nhanh v\u1EC1 b\u1ED9 c\xF4ng c\u1EE5 h\u1EEFu \xEDch cho qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng
    Tham kh\u1EA3oC\xE1c m\u1EABu code th\u01B0\u1EDDng g\u1EB7p trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng

    L\u1EDDi c\u1EE7a d\u1ECBch gi\u1EA3

    ',4),x=n("Phi\xEAn b\u1EA3n Ti\u1EBFng Vi\u1EC7t c\u1EE7a To\xE0n t\u1EADp Solana \u0111\u01B0\u1EE3c d\u1ECBch l\u1EA1i t\u1EEB phi\xEAn b\u1EA3n Ti\u1EBFng Anh - "),T={href:"https://solanacookbook.com/",target:"_blank",rel:"noopener noreferrer"},N=n("Solana Cookbook"),C=n(" b\u1EDFi "),V={href:"https://sentre.io/",target:"_blank",rel:"noopener noreferrer"},q=n("Sentre Protocol"),B=n(". V\xEC \u0111\xE2y l\xE0 m\u1ED9t t\xE0i li\u1EC7u k\u1EF9 thu\u1EADt n\xEAn \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o t\xEDnh nh\u1EA5t qu\xE1n, m\u1ED9t s\u1ED1 thu\u1EADt ng\u1EEF chuy\xEAn ng\xE0nh s\u1EBD \u0111\u01B0\u1EE3c gi\u1EEF nguy\xEAn v\xE0 kh\xF4ng \u0111\u01B0\u1EE3c d\u1ECBch sang c\xE1c t\u1EEB thay th\u1EBF \u1EDF Ti\u1EBFng Vi\u1EC7t. Ngo\xE0i ra, m\u1ED9t s\u1ED1 h\xECnh minh ho\u1EA1 c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c c\u1EADp nh\u1EADt ch\u1EADm v\xE0 v\u1EABn ph\u1EA3i d\xF9ng h\xECnh \u1EA3nh g\u1ED1c \u1EDF b\u1EA3n Ti\u1EBFng Anh. Hi v\u1ECDng b\u1EA1n \u0111\u1ECDc th\xF4ng c\u1EA3m v\xE0 c\xF3 th\u1EDDi gian h\u1ECDc t\u1EADp vui v\u1EBB. Ch\xFAc c\u1ED9ng \u0111\u1ED3ng Solana Vi\u1EC7t Nam ng\xE0y c\xE0ng ph\xE1t tri\u1EC3n v\u1EC1 ch\u1EA5t v\xE0 l\u01B0\u1EE3ng.");function E(L,M){const h=a("ExternalLinkIcon");return e(),i(r,null,[g,l,p,u,t("p",null,[_,t("a",m,[b,c(h)]),k,t("a",v,[f,c(h)]),y]),S,t("p",null,[x,t("a",T,[N,c(h)]),C,t("a",V,[q,c(h)]),B])],64)}var F=o(d,[["render",E]]);export{F as default}; diff --git a/docs/.vuepress/dist/assets/index.html.550d93c2.js b/docs/.vuepress/dist/assets/index.html.5559972c.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.550d93c2.js rename to docs/.vuepress/dist/assets/index.html.5559972c.js index 6cd397dd4..773173203 100644 --- a/docs/.vuepress/dist/assets/index.html.550d93c2.js +++ b/docs/.vuepress/dist/assets/index.html.5559972c.js @@ -1 +1 @@ -import{_ as n,r as t,o as i,c as l,a,b as r,F as s,d as e,e as k}from"./app.07ce7a66.js";const d={},c=a("h1",{id:"solana-cookbook",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#solana-cookbook","aria-hidden":"true"},"#"),e(" Solana Cookbook")],-1),b=a("p",null,[a("em",null,"Solana Cookbook"),e(", Solana'da uygulamalar olu\u015Fturmak i\xE7in temel kavramlar\u0131 ve referanslar\u0131 sa\u011Flayan bir geli\u015Ftirici kayna\u011F\u0131d\u0131r. Her kavram ve referans, ek ayr\u0131nt\u0131lar ve kullan\u0131m \xF6rnekleri sa\u011Flarken Solana kullanarak geli\u015Ftirme yapman\u0131n belirli y\xF6nlerine odaklanacakt\u0131r.")],-1),h=a("h2",{id:"contributing-nas\u0131l-katk\u0131-verebilirsiniz",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#contributing-nas\u0131l-katk\u0131-verebilirsiniz","aria-hidden":"true"},"#"),e(" Contributing (Nas\u0131l Katk\u0131 Verebilirsiniz?)")],-1),u=a("p",null,[a("em",null,"Solana Cookbook"),e(", yeni Solana geli\u015Ftiricilerinin katk\u0131da bulunmas\u0131n\u0131 kolayla\u015Ft\u0131racak \u015Fekilde tasarlanm\u0131\u015Ft\u0131r. Bir \u015Feyi nas\u0131l yapaca\u011F\u0131n\u0131z\u0131 bilmiyor olsan\u0131z bile, Solana Cookbook\u2019a katk\u0131da bulunmak \xF6\u011Frenmenin harika bir yoludur!")],-1),m=e("T\xFCm a\xE7\u0131k konulara "),_={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},y=e("buradan"),p=e(" g\xF6z atabilir, katk\u0131 y\xF6nergelerine "),f={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},g=e("buradan"),v=e(" ula\u015Fabilirsiniz. Solana Cookbook\u2019da bir \xF6nerinin eksik oldu\u011Funu fark ederseniz, l\xFCtfen yeni bir issue olu\u015Fturun."),S=k('

    How to Read the Cookbook (Cookbook Nas\u0131l Okunur?)

    Solana Cookbook, her biri farkl\u0131 bir amaca y\xF6nelik farkl\u0131 b\xF6l\xFCmlere ayr\u0131lm\u0131\u015Ft\u0131r.

    B\xF6l\xFCmA\xE7\u0131klama
    Temel KavramlarSolana\u2019da geli\u015Ftirme yapmak i\xE7in bilinmesi tavsiye edilen Solana yap\u0131 ta\u015Flar\u0131
    RehberGeli\u015Ftirme yapmak i\xE7in \xE7e\u015Fitli ara\xE7lar hakk\u0131nda hap bilgileri i\xE7eren k\u0131lavuzlar
    ReferanslarYayg\u0131n olarak ihtiya\xE7 duyulan kod par\xE7alar\u0131 i\xE7in referanslar
    ',3);function x(C,z){const o=t("ExternalLinkIcon");return i(),l(s,null,[c,b,h,u,a("p",null,[m,a("a",_,[y,r(o)]),p,a("a",f,[g,r(o)]),v]),S],64)}var B=n(d,[["render",x]]);export{B as default}; +import{_ as n,r as t,o as i,c as l,a,b as r,F as s,d as e,e as k}from"./app.d411e3b3.js";const d={},c=a("h1",{id:"solana-cookbook",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#solana-cookbook","aria-hidden":"true"},"#"),e(" Solana Cookbook")],-1),b=a("p",null,[a("em",null,"Solana Cookbook"),e(", Solana'da uygulamalar olu\u015Fturmak i\xE7in temel kavramlar\u0131 ve referanslar\u0131 sa\u011Flayan bir geli\u015Ftirici kayna\u011F\u0131d\u0131r. Her kavram ve referans, ek ayr\u0131nt\u0131lar ve kullan\u0131m \xF6rnekleri sa\u011Flarken Solana kullanarak geli\u015Ftirme yapman\u0131n belirli y\xF6nlerine odaklanacakt\u0131r.")],-1),h=a("h2",{id:"contributing-nas\u0131l-katk\u0131-verebilirsiniz",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#contributing-nas\u0131l-katk\u0131-verebilirsiniz","aria-hidden":"true"},"#"),e(" Contributing (Nas\u0131l Katk\u0131 Verebilirsiniz?)")],-1),u=a("p",null,[a("em",null,"Solana Cookbook"),e(", yeni Solana geli\u015Ftiricilerinin katk\u0131da bulunmas\u0131n\u0131 kolayla\u015Ft\u0131racak \u015Fekilde tasarlanm\u0131\u015Ft\u0131r. Bir \u015Feyi nas\u0131l yapaca\u011F\u0131n\u0131z\u0131 bilmiyor olsan\u0131z bile, Solana Cookbook\u2019a katk\u0131da bulunmak \xF6\u011Frenmenin harika bir yoludur!")],-1),m=e("T\xFCm a\xE7\u0131k konulara "),_={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},y=e("buradan"),p=e(" g\xF6z atabilir, katk\u0131 y\xF6nergelerine "),f={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},g=e("buradan"),v=e(" ula\u015Fabilirsiniz. Solana Cookbook\u2019da bir \xF6nerinin eksik oldu\u011Funu fark ederseniz, l\xFCtfen yeni bir issue olu\u015Fturun."),S=k('

    How to Read the Cookbook (Cookbook Nas\u0131l Okunur?)

    Solana Cookbook, her biri farkl\u0131 bir amaca y\xF6nelik farkl\u0131 b\xF6l\xFCmlere ayr\u0131lm\u0131\u015Ft\u0131r.

    B\xF6l\xFCmA\xE7\u0131klama
    Temel KavramlarSolana\u2019da geli\u015Ftirme yapmak i\xE7in bilinmesi tavsiye edilen Solana yap\u0131 ta\u015Flar\u0131
    RehberGeli\u015Ftirme yapmak i\xE7in \xE7e\u015Fitli ara\xE7lar hakk\u0131nda hap bilgileri i\xE7eren k\u0131lavuzlar
    ReferanslarYayg\u0131n olarak ihtiya\xE7 duyulan kod par\xE7alar\u0131 i\xE7in referanslar
    ',3);function x(C,z){const o=t("ExternalLinkIcon");return i(),l(s,null,[c,b,h,u,a("p",null,[m,a("a",_,[y,r(o)]),p,a("a",f,[g,r(o)]),v]),S],64)}var B=n(d,[["render",x]]);export{B as default}; diff --git a/docs/.vuepress/dist/assets/index.html.caa2e1b4.js b/docs/.vuepress/dist/assets/index.html.611d98f3.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.caa2e1b4.js rename to docs/.vuepress/dist/assets/index.html.611d98f3.js index 6b6f1eee8..59f036a4d 100644 --- a/docs/.vuepress/dist/assets/index.html.caa2e1b4.js +++ b/docs/.vuepress/dist/assets/index.html.611d98f3.js @@ -1 +1 @@ -import{_ as s,r,o as a,c as i,a as e,b as n,F as c,d as o,e as d}from"./app.07ce7a66.js";const l={},u=e("h1",{id:"solana-cookbook",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#solana-cookbook","aria-hidden":"true"},"#"),o(" Solana Cookbook")],-1),p=e("p",null,[e("em",null,"Solana Cookbook"),o(" une ressource pour les d\xE9veloppeurs qui fournit les concepts et r\xE9f\xE9rences essentiels pour cr\xE9er des applications sur Solana. Chaque concept et r\xE9f\xE9rence vont se concentrer sur des aspects sp\xE9cifiques du d\xE9veloppement de Solana tout en fournissant des d\xE9tails suppl\xE9mentaires et des exemples d'utilisation.")],-1),h=e("h2",{id:"contribution",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contribution","aria-hidden":"true"},"#"),o(" Contribution")],-1),_=e("p",null,[e("em",null,"Solana Cookbook"),o(" est con\xE7u de mani\xE8re \xE0 permettre aux nouveaux d\xE9veloppeurs de Solana de contribuer facilement. M\xEAme si vous ne savez pas comment faire quelque chose, contribuer au Cookbook est un excellent moyen d'apprendre !")],-1),m=o("Consultez toutes les questions ouvertes "),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=o("ici"),f=o(". Lignes directrices pour les contributions "),v={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},x=o("ici"),C=o(". Si vous trouvez qu'il manque une suggestion dans le Cookbook, veuillez ajouter une question."),S=d('

    Comment lire le Cookbook

    Le Solana Cookbook est divis\xE9 en diff\xE9rentes sections, chacune visant un objectif diff\xE9rent.

    SectionDescription
    Concepts FondamentauxLes \xE9l\xE9ments de base de Solana qu'il est bon de conna\xEEtre pour le d\xE9veloppement
    GuidesPetits guides sur les diff\xE9rents outils de d\xE9veloppement
    R\xE9f\xE9rencesR\xE9f\xE9rences aux extraits de code les plus couramment utilis\xE9s
    ',3);function g(q,L){const t=r("ExternalLinkIcon");return a(),i(c,null,[u,p,h,_,e("p",null,[m,e("a",b,[k,n(t)]),f,e("a",v,[x,n(t)]),C]),S],64)}var N=s(l,[["render",g]]);export{N as default}; +import{_ as s,r,o as a,c as i,a as e,b as n,F as c,d as o,e as d}from"./app.d411e3b3.js";const l={},u=e("h1",{id:"solana-cookbook",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#solana-cookbook","aria-hidden":"true"},"#"),o(" Solana Cookbook")],-1),p=e("p",null,[e("em",null,"Solana Cookbook"),o(" une ressource pour les d\xE9veloppeurs qui fournit les concepts et r\xE9f\xE9rences essentiels pour cr\xE9er des applications sur Solana. Chaque concept et r\xE9f\xE9rence vont se concentrer sur des aspects sp\xE9cifiques du d\xE9veloppement de Solana tout en fournissant des d\xE9tails suppl\xE9mentaires et des exemples d'utilisation.")],-1),h=e("h2",{id:"contribution",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contribution","aria-hidden":"true"},"#"),o(" Contribution")],-1),_=e("p",null,[e("em",null,"Solana Cookbook"),o(" est con\xE7u de mani\xE8re \xE0 permettre aux nouveaux d\xE9veloppeurs de Solana de contribuer facilement. M\xEAme si vous ne savez pas comment faire quelque chose, contribuer au Cookbook est un excellent moyen d'apprendre !")],-1),m=o("Consultez toutes les questions ouvertes "),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=o("ici"),f=o(". Lignes directrices pour les contributions "),v={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},x=o("ici"),C=o(". Si vous trouvez qu'il manque une suggestion dans le Cookbook, veuillez ajouter une question."),S=d('

    Comment lire le Cookbook

    Le Solana Cookbook est divis\xE9 en diff\xE9rentes sections, chacune visant un objectif diff\xE9rent.

    SectionDescription
    Concepts FondamentauxLes \xE9l\xE9ments de base de Solana qu'il est bon de conna\xEEtre pour le d\xE9veloppement
    GuidesPetits guides sur les diff\xE9rents outils de d\xE9veloppement
    R\xE9f\xE9rencesR\xE9f\xE9rences aux extraits de code les plus couramment utilis\xE9s
    ',3);function g(q,L){const t=r("ExternalLinkIcon");return a(),i(c,null,[u,p,h,_,e("p",null,[m,e("a",b,[k,n(t)]),f,e("a",v,[x,n(t)]),C]),S],64)}var N=s(l,[["render",g]]);export{N as default}; diff --git a/docs/.vuepress/dist/assets/index.html.c5a39464.js b/docs/.vuepress/dist/assets/index.html.6698bb6d.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.c5a39464.js rename to docs/.vuepress/dist/assets/index.html.6698bb6d.js index ee45261de..c18cbeec7 100644 --- a/docs/.vuepress/dist/assets/index.html.c5a39464.js +++ b/docs/.vuepress/dist/assets/index.html.6698bb6d.js @@ -1 +1 @@ -import{_ as n,r as s,o as t,c as d,a as e,b as r,F as c,d as o,e as i}from"./app.07ce7a66.js";const l={},u=e("h1",{id:"libro-de-recetas-de-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#libro-de-recetas-de-solana","aria-hidden":"true"},"#"),o(" Libro de recetas de Solana")],-1),h=e("p",null,"Solana Cookbook es un recurso para desarrolladores. Brinda conceptos esenciales y referencias para desarrollar aplicaciones en Solana. Cada concepto y referencia se enfocar\xE1 en aspectos espec\xEDficos del desarrollo en Solana brindando detalles adicionales y ejemplos de uso.",-1),b=e("h2",{id:"contribuyendo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contribuyendo","aria-hidden":"true"},"#"),o(" Contribuyendo")],-1),_=e("p",null,"Solana Cookbook esta dise\xF1ado de tal forma que hace f\xE1cil que nuevos desarrolladores de Solana puedan contribuir. Incluso si no sabes c\xF3mo hacer algo \xA1contribuir al Cookbook es una gran manera de aprender!",-1),p=o("Revisa todos los issues abiertos "),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=o("ac\xE1"),m=o(". Las gu\xEDas de contribuci\xF3n "),g={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},C=o("ac\xE1"),x=o(". Si encuentras que el Cookbook le falta una sugerencia, por favor agrega un issue."),S=i('

    Como Leer el Cookbook

    El Cookbok de Solana esta dividido en diferentes secciones, cada una con un objetivo diferente.

    secci\xF3ndescripci\xF3n
    Conceptos BaseLos fundamentos de Solana que son buenos conocer para desarrollar
    Gu\xEDasPeque\xF1as gu\xEDas sobre diferentes herramientas para desarrollar
    ReferenciasReferencias a snippets de c\xF3digo comunmente necesarios
    ',3);function v(y,L){const a=s("ExternalLinkIcon");return t(),d(c,null,[u,h,b,_,e("p",null,[p,e("a",f,[k,r(a)]),m,e("a",g,[C,r(a)]),x]),S],64)}var B=n(l,[["render",v]]);export{B as default}; +import{_ as n,r as s,o as t,c as d,a as e,b as r,F as c,d as o,e as i}from"./app.d411e3b3.js";const l={},u=e("h1",{id:"libro-de-recetas-de-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#libro-de-recetas-de-solana","aria-hidden":"true"},"#"),o(" Libro de recetas de Solana")],-1),h=e("p",null,"Solana Cookbook es un recurso para desarrolladores. Brinda conceptos esenciales y referencias para desarrollar aplicaciones en Solana. Cada concepto y referencia se enfocar\xE1 en aspectos espec\xEDficos del desarrollo en Solana brindando detalles adicionales y ejemplos de uso.",-1),b=e("h2",{id:"contribuyendo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contribuyendo","aria-hidden":"true"},"#"),o(" Contribuyendo")],-1),_=e("p",null,"Solana Cookbook esta dise\xF1ado de tal forma que hace f\xE1cil que nuevos desarrolladores de Solana puedan contribuir. Incluso si no sabes c\xF3mo hacer algo \xA1contribuir al Cookbook es una gran manera de aprender!",-1),p=o("Revisa todos los issues abiertos "),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=o("ac\xE1"),m=o(". Las gu\xEDas de contribuci\xF3n "),g={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},C=o("ac\xE1"),x=o(". Si encuentras que el Cookbook le falta una sugerencia, por favor agrega un issue."),S=i('

    Como Leer el Cookbook

    El Cookbok de Solana esta dividido en diferentes secciones, cada una con un objetivo diferente.

    secci\xF3ndescripci\xF3n
    Conceptos BaseLos fundamentos de Solana que son buenos conocer para desarrollar
    Gu\xEDasPeque\xF1as gu\xEDas sobre diferentes herramientas para desarrollar
    ReferenciasReferencias a snippets de c\xF3digo comunmente necesarios
    ',3);function v(y,L){const a=s("ExternalLinkIcon");return t(),d(c,null,[u,h,b,_,e("p",null,[p,e("a",f,[k,r(a)]),m,e("a",g,[C,r(a)]),x]),S],64)}var B=n(l,[["render",v]]);export{B as default}; diff --git a/docs/.vuepress/dist/assets/index.html.25f20e37.js b/docs/.vuepress/dist/assets/index.html.671bbc93.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.25f20e37.js rename to docs/.vuepress/dist/assets/index.html.671bbc93.js index 81fd0fb73..3ee7ffaa0 100644 --- a/docs/.vuepress/dist/assets/index.html.25f20e37.js +++ b/docs/.vuepress/dist/assets/index.html.671bbc93.js @@ -1 +1 @@ -import{_ as u,r,o,c as d,a,b as t,F as i,d as n,e as s}from"./app.07ce7a66.js";const k={},b=a("h1",{id:"menggunakan-buku-panduan-solana",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#menggunakan-buku-panduan-solana","aria-hidden":"true"},"#"),n(" Menggunakan buku panduan Solana")],-1),c=a("p",null,"Buku panduan Solana adalah sumber daya pengembang yang memberikan konsep penting dan referensi untuk membangun aplikasi di Solana. Setiap konsep dan referensi akan fokus kepada aspek spesifik pada bidang pengembangan Solana sekaligus memberikan detail-detail dan contoh cara penggunaannya.",-1),l=a("h2",{id:"cara-untuk-berkontribusi",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#cara-untuk-berkontribusi","aria-hidden":"true"},"#"),n(" Cara untuk berkontribusi")],-1),h=a("p",null,"Buku panduan Solana dirancang dengan cara yang bertujuan untuk memudahkan pengembang solana yang baru untuk berkontribusi. Bahkan jika anda ingin tahu cara untuk melakukan sesuatu, berkontribusi pada buku panduan Solana adalah cara yang baik untuk belajar.",-1),g=n("Cek link berikut untuk lihat semua issue yang masih aktif"),m={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},p=n("here"),_=n(". Pedoman untuk berkontribusi "),f={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},y=n("here"),S=n(". Jika kamu menemukan saran yang tidak ada di buku panduan, tolong untuk menambahkan laporan isu terkait."),x=s('

    Cara untuk membaca Buku Panduan

    Buku Panduan Solana dibagi menjadi beberapa bagian yang berbeda, masing-masing ditujukan untuk tujuan yang berbeda.

    SectionDescription
    Konsep UtamaMembangun blocks Solana yang bagus untuk diketahui untuk pengembangan
    PanduanPanduan detail tentang beragam tools yang berbeda untuk pengembangan
    ReferensiReferensi untuk cuplikan kode yang umum dibutuhkan untuk pengembangan
    ',3);function B(j,P){const e=r("ExternalLinkIcon");return o(),d(i,null,[b,c,l,h,a("p",null,[g,a("a",m,[p,t(e)]),_,a("a",f,[y,t(e)]),S]),x],64)}var C=u(k,[["render",B]]);export{C as default}; +import{_ as u,r,o,c as d,a,b as t,F as i,d as n,e as s}from"./app.d411e3b3.js";const k={},b=a("h1",{id:"menggunakan-buku-panduan-solana",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#menggunakan-buku-panduan-solana","aria-hidden":"true"},"#"),n(" Menggunakan buku panduan Solana")],-1),c=a("p",null,"Buku panduan Solana adalah sumber daya pengembang yang memberikan konsep penting dan referensi untuk membangun aplikasi di Solana. Setiap konsep dan referensi akan fokus kepada aspek spesifik pada bidang pengembangan Solana sekaligus memberikan detail-detail dan contoh cara penggunaannya.",-1),l=a("h2",{id:"cara-untuk-berkontribusi",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#cara-untuk-berkontribusi","aria-hidden":"true"},"#"),n(" Cara untuk berkontribusi")],-1),h=a("p",null,"Buku panduan Solana dirancang dengan cara yang bertujuan untuk memudahkan pengembang solana yang baru untuk berkontribusi. Bahkan jika anda ingin tahu cara untuk melakukan sesuatu, berkontribusi pada buku panduan Solana adalah cara yang baik untuk belajar.",-1),g=n("Cek link berikut untuk lihat semua issue yang masih aktif"),m={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},p=n("here"),_=n(". Pedoman untuk berkontribusi "),f={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},y=n("here"),S=n(". Jika kamu menemukan saran yang tidak ada di buku panduan, tolong untuk menambahkan laporan isu terkait."),x=s('

    Cara untuk membaca Buku Panduan

    Buku Panduan Solana dibagi menjadi beberapa bagian yang berbeda, masing-masing ditujukan untuk tujuan yang berbeda.

    SectionDescription
    Konsep UtamaMembangun blocks Solana yang bagus untuk diketahui untuk pengembangan
    PanduanPanduan detail tentang beragam tools yang berbeda untuk pengembangan
    ReferensiReferensi untuk cuplikan kode yang umum dibutuhkan untuk pengembangan
    ',3);function B(j,P){const e=r("ExternalLinkIcon");return o(),d(i,null,[b,c,l,h,a("p",null,[g,a("a",m,[p,t(e)]),_,a("a",f,[y,t(e)]),S]),x],64)}var C=u(k,[["render",B]]);export{C as default}; diff --git a/docs/.vuepress/dist/assets/index.html.b6c39787.js b/docs/.vuepress/dist/assets/index.html.73db6b25.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.b6c39787.js rename to docs/.vuepress/dist/assets/index.html.73db6b25.js index f2e5916d9..ffd91e52d 100644 --- a/docs/.vuepress/dist/assets/index.html.b6c39787.js +++ b/docs/.vuepress/dist/assets/index.html.73db6b25.js @@ -1 +1 @@ -import{_ as o,r as n,o as s,c as r,a,b as d,F as l,d as e,e as c}from"./app.07ce7a66.js";const h={},i=a("h1",{id:"solana\u7955\u7C4D",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#solana\u7955\u7C4D","aria-hidden":"true"},"#"),e(" Solana\u7955\u7C4D")],-1),_=a("p",null,"\u300ASolana\u7955\u7C4D\u300B\u529B\u5716\u7232\u4F60\u63D0\u4F9B\u5728Solana\u516C\u93C8\u4E0A\u7DE8\u5BEB\u53BB\u4E2D\u5FC3\u5316\u61C9\u7528\u6240\u9700\u7684\u6838\u5FC3\u6982\u5FF5\u3001 \u53C3\u8003\u3002 \u6BCF\u500B\u6982\u5FF5\u548C\u53C3\u8003\u90FD\u6703\u805A\u7126\u65BCSolana\u958B\u767C\u4E2D\u7684\u67D0\u500B\u5177\u9AD4\u65B9\u9762\uFF0C\u540C\u6642\u63D0\u4F9B\u984D\u5916\u7684\u6280\u8853\u7D30\u7BC0\u4EE5\u53CA\u7528\u4F8B\u3002",-1),p=a("h2",{id:"\u8CA2\u737B\u4EE3\u78BC",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u8CA2\u737B\u4EE3\u78BC","aria-hidden":"true"},"#"),e(" \u8CA2\u737B\u4EE3\u78BC")],-1),u=a("p",null,"Solana\u7955\u7C4D\u7684\u8A2D\u8A08\u529B\u5716\u8B93\u65B0\u7684Solana\u958B\u767C\u8005\u4E5F\u80FD\u5BB9\u6613\u7684\u8CA2\u737B\u4EE3\u78BC\u3002 \u5373\u4F7F\u4F60\u9084\u4E0D\u592A\u77AD\u89E3\u5982\u4F55\u505A\u9805\u76EE\uFF0C\u8CA2\u737B\u4EE3\u78BC\u4E5F\u662F\u4E00\u500B\u5F88\u597D\u7684\u5B78\u7FD2\u904E\u7A0B\uFF01",-1),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=e("\u9019\u88CF"),x=e(" \u53EF\u4EE5\u67E5\u770B\u6240\u6709\u5F85\u89E3\u6C7A\u7684issue\u3002"),S=c('

    \u5982\u679C\u4F60\u89BA\u5F97\u9084\u6709\u5176\u4ED6\u54EA\u4E9B\u5EFA\u8B70\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u4E00\u500Bissue.

    \u5982\u4F55\u95B1\u8B80Solana\u7955\u7C4D

    Solana\u7955\u7C4D\u5206\u7232\u4E0D\u540C\u7684\u7AE0\u7BC0\u3002\u6BCF\u500B\u7AE0\u7BC0\u90FD\u6709\u4E0D\u540C\u7684\u76EE\u6A19\u3002

    \u7AE0\u7BC0\u63CF\u8FF0
    \u6838\u5FC3\u6982\u5FF5Solana\u7684\u57FA\u790E\u5143\u7D20\u3002\u958B\u767C\u8005\u6700\u597D\u80FD\u77AD\u89E3\u9019\u4E9B\u5167\u5BB9\u3002
    \u6307\u5357\u95DC\u65BC\u958B\u767C\u4E2D\u6240\u80FD\u7528\u5230\u7684\u5DE5\u5177\u7684\u7C21\u8981\u4ECB\u7D39\u3002
    \u53C3\u8003\u5E38\u7528\u7684\u4EE3\u78BC\u7247\u6BB5\u53C3\u8003
    ',4);function m(k,N){const t=n("ExternalLinkIcon");return s(),r(l,null,[i,_,p,u,a("p",null,[a("a",b,[f,d(t)]),x]),S],64)}var g=o(h,[["render",m]]);export{g as default}; +import{_ as o,r as n,o as s,c as r,a,b as d,F as l,d as e,e as c}from"./app.d411e3b3.js";const h={},i=a("h1",{id:"solana\u7955\u7C4D",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#solana\u7955\u7C4D","aria-hidden":"true"},"#"),e(" Solana\u7955\u7C4D")],-1),_=a("p",null,"\u300ASolana\u7955\u7C4D\u300B\u529B\u5716\u7232\u4F60\u63D0\u4F9B\u5728Solana\u516C\u93C8\u4E0A\u7DE8\u5BEB\u53BB\u4E2D\u5FC3\u5316\u61C9\u7528\u6240\u9700\u7684\u6838\u5FC3\u6982\u5FF5\u3001 \u53C3\u8003\u3002 \u6BCF\u500B\u6982\u5FF5\u548C\u53C3\u8003\u90FD\u6703\u805A\u7126\u65BCSolana\u958B\u767C\u4E2D\u7684\u67D0\u500B\u5177\u9AD4\u65B9\u9762\uFF0C\u540C\u6642\u63D0\u4F9B\u984D\u5916\u7684\u6280\u8853\u7D30\u7BC0\u4EE5\u53CA\u7528\u4F8B\u3002",-1),p=a("h2",{id:"\u8CA2\u737B\u4EE3\u78BC",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#\u8CA2\u737B\u4EE3\u78BC","aria-hidden":"true"},"#"),e(" \u8CA2\u737B\u4EE3\u78BC")],-1),u=a("p",null,"Solana\u7955\u7C4D\u7684\u8A2D\u8A08\u529B\u5716\u8B93\u65B0\u7684Solana\u958B\u767C\u8005\u4E5F\u80FD\u5BB9\u6613\u7684\u8CA2\u737B\u4EE3\u78BC\u3002 \u5373\u4F7F\u4F60\u9084\u4E0D\u592A\u77AD\u89E3\u5982\u4F55\u505A\u9805\u76EE\uFF0C\u8CA2\u737B\u4EE3\u78BC\u4E5F\u662F\u4E00\u500B\u5F88\u597D\u7684\u5B78\u7FD2\u904E\u7A0B\uFF01",-1),b={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=e("\u9019\u88CF"),x=e(" \u53EF\u4EE5\u67E5\u770B\u6240\u6709\u5F85\u89E3\u6C7A\u7684issue\u3002"),S=c('

    \u5982\u679C\u4F60\u89BA\u5F97\u9084\u6709\u5176\u4ED6\u54EA\u4E9B\u5EFA\u8B70\uFF0C\u53EF\u4EE5\u65B0\u5EFA\u4E00\u500Bissue.

    \u5982\u4F55\u95B1\u8B80Solana\u7955\u7C4D

    Solana\u7955\u7C4D\u5206\u7232\u4E0D\u540C\u7684\u7AE0\u7BC0\u3002\u6BCF\u500B\u7AE0\u7BC0\u90FD\u6709\u4E0D\u540C\u7684\u76EE\u6A19\u3002

    \u7AE0\u7BC0\u63CF\u8FF0
    \u6838\u5FC3\u6982\u5FF5Solana\u7684\u57FA\u790E\u5143\u7D20\u3002\u958B\u767C\u8005\u6700\u597D\u80FD\u77AD\u89E3\u9019\u4E9B\u5167\u5BB9\u3002
    \u6307\u5357\u95DC\u65BC\u958B\u767C\u4E2D\u6240\u80FD\u7528\u5230\u7684\u5DE5\u5177\u7684\u7C21\u8981\u4ECB\u7D39\u3002
    \u53C3\u8003\u5E38\u7528\u7684\u4EE3\u78BC\u7247\u6BB5\u53C3\u8003
    ',4);function m(k,N){const t=n("ExternalLinkIcon");return s(),r(l,null,[i,_,p,u,a("p",null,[a("a",b,[f,d(t)]),x]),S],64)}var g=o(h,[["render",m]]);export{g as default}; diff --git a/docs/.vuepress/dist/assets/index.html.dd541d3c.js b/docs/.vuepress/dist/assets/index.html.859f0785.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.dd541d3c.js rename to docs/.vuepress/dist/assets/index.html.859f0785.js index a7ed4fda9..c55e51cdc 100644 --- a/docs/.vuepress/dist/assets/index.html.dd541d3c.js +++ b/docs/.vuepress/dist/assets/index.html.859f0785.js @@ -1 +1 @@ -import{_ as e,r as g,o as s,c as i,a,b as t,F as r,d as n,e as d}from"./app.07ce7a66.js";const l={},h=a("h1",{id:"cooking-with-solana",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),n(" Cooking with Solana")],-1),c=a("p",null,[n("Ang "),a("em",null,"Solana Cookbook"),n(" ay isang mapagkukunan ng developer na nagbibigay ng mahahalagang konsepto at sanggunian para sa pagbuo ng mga aplikasyon sa Solana. Ang bawat konsepto at pagtutuunan ng sanggunian ang mga tiyak na aspeto ng Solana pag-unlad habang nagbibigay ng karagdagang mga detalye at paggamit mga halimbawa.")],-1),k=a("h2",{id:"paano-mag-ambag",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#paano-mag-ambag","aria-hidden":"true"},"#"),n(" Paano mag-ambag")],-1),b=a("p",null,"Ang Cookbook ay idinisenyo sa paraang nagpapadali para sa bagong mga developer ng Solana na mag-aambag. Kahit ikaw hindi alam kung paano gumawa ng isang bagay, nag-aambag sa Ang cookbook ay isang mahusay na paraan upang matuto!",-1),p=n("Tingnan ang lahat ng bukas na isyu "),m={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},u=n("dito"),_=n(". Mga alituntunin sa kontribusyon "),y={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},w=n("dito"),f=n(". Kung nalaman mong walang mungkahi ang cookbook, mangyaring magdagdag ng isyu."),x=d('

    How to Read the Cookbook

    Ang Solana Cookbook ay nahahati sa iba't ibang mga seksyon, ang bawat isa ay naglalayong sa ibang layunin.

    SectionDescription
    Mga pangunahing konseptoBuilding blocks ng Solana na magandang malaman para sa pag-gawa
    Mga gabaySnack-sized na mga gabay tungkol sa iba't ibang kasangkapan para sa pag-gawa
    Mga sanggunianMga sanggunian sa mga karaniwang kinakailangang snippet ng code
    ',3);function S(v,C){const o=g("ExternalLinkIcon");return s(),i(r,null,[h,c,k,b,a("p",null,[p,a("a",m,[u,t(o)]),_,a("a",y,[w,t(o)]),f]),x],64)}var M=e(l,[["render",S]]);export{M as default}; +import{_ as e,r as g,o as s,c as i,a,b as t,F as r,d as n,e as d}from"./app.d411e3b3.js";const l={},h=a("h1",{id:"cooking-with-solana",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),n(" Cooking with Solana")],-1),c=a("p",null,[n("Ang "),a("em",null,"Solana Cookbook"),n(" ay isang mapagkukunan ng developer na nagbibigay ng mahahalagang konsepto at sanggunian para sa pagbuo ng mga aplikasyon sa Solana. Ang bawat konsepto at pagtutuunan ng sanggunian ang mga tiyak na aspeto ng Solana pag-unlad habang nagbibigay ng karagdagang mga detalye at paggamit mga halimbawa.")],-1),k=a("h2",{id:"paano-mag-ambag",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#paano-mag-ambag","aria-hidden":"true"},"#"),n(" Paano mag-ambag")],-1),b=a("p",null,"Ang Cookbook ay idinisenyo sa paraang nagpapadali para sa bagong mga developer ng Solana na mag-aambag. Kahit ikaw hindi alam kung paano gumawa ng isang bagay, nag-aambag sa Ang cookbook ay isang mahusay na paraan upang matuto!",-1),p=n("Tingnan ang lahat ng bukas na isyu "),m={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},u=n("dito"),_=n(". Mga alituntunin sa kontribusyon "),y={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},w=n("dito"),f=n(". Kung nalaman mong walang mungkahi ang cookbook, mangyaring magdagdag ng isyu."),x=d('

    How to Read the Cookbook

    Ang Solana Cookbook ay nahahati sa iba't ibang mga seksyon, ang bawat isa ay naglalayong sa ibang layunin.

    SectionDescription
    Mga pangunahing konseptoBuilding blocks ng Solana na magandang malaman para sa pag-gawa
    Mga gabaySnack-sized na mga gabay tungkol sa iba't ibang kasangkapan para sa pag-gawa
    Mga sanggunianMga sanggunian sa mga karaniwang kinakailangang snippet ng code
    ',3);function S(v,C){const o=g("ExternalLinkIcon");return s(),i(r,null,[h,c,k,b,a("p",null,[p,a("a",m,[u,t(o)]),_,a("a",y,[w,t(o)]),f]),x],64)}var M=e(l,[["render",S]]);export{M as default}; diff --git a/docs/.vuepress/dist/assets/index.html.d04c9063.js b/docs/.vuepress/dist/assets/index.html.8ba67a18.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.d04c9063.js rename to docs/.vuepress/dist/assets/index.html.8ba67a18.js index 7d618c732..bf5ce126d 100644 --- a/docs/.vuepress/dist/assets/index.html.d04c9063.js +++ b/docs/.vuepress/dist/assets/index.html.8ba67a18.js @@ -1 +1 @@ -import{_ as n,r,o as s,c as d,a as o,b as a,F as c,d as t,e as i}from"./app.07ce7a66.js";const h={},l=o("h1",{id:"cooking-with-solana",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),t(" Cooking with Solana")],-1),_=o("p",null,[o("em",null,"Solana Cookbook"),t("\uC740 Solana \uC571\uC744 \uB9CC\uB4E4\uAE30 \uC704\uD55C \uD544\uC218\uC801\uC778 \uAC1C\uB150\uB4E4\uACFC \uC790\uB8CC\uB4E4\uC744 \uC81C\uACF5\uD558\uB294 \uAC1C\uBC1C\uC790 \uBB38\uC11C\uC785\uB2C8\uB2E4. \uAC01 \uAC1C\uB150\uACFC \uCC38\uACE0 \uC790\uB8CC\uB294 \uCD94\uAC00 \uC0C1\uC138\uD55C \uB0B4\uC6A9\uB4E4\uACFC \uC0AC\uC6A9 \uC608\uB97C \uC81C\uACF5\uD558\uBA70 Solana \uAC1C\uBC1C \uCE21\uBA74\uC5D0 \uCD08\uC810\uC744 \uB461\uB2C8\uB2E4.")],-1),k=o("h2",{id:"contributing",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#contributing","aria-hidden":"true"},"#"),t(" Contributing")],-1),b=o("p",null,"Cookbook\uC740 \uC0C8\uB85C\uC6B4 Solana \uAC1C\uBC1C\uC790\uB4E4\uC774 \uAE30\uC5EC\uD558\uAE30 \uC26C\uC6B4 \uBC29\uD5A5\uC73C\uB85C \uC124\uACC4\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uBB34\uC5C7\uC744 \uC5B4\uB5BB\uAC8C \uD574\uC57C \uD560\uC9C0 \uBAA8\uB974\uACA0\uB2E4\uBA74 \uC194\uB77C\uB098\uB97C \uBC30\uC6B0\uAE30 \uC704\uD574 \uC774 Cookbook\uC5D0 \uAE30\uC5EC\uD574\uBCF4\uC138\uC694!.",-1),u=t("\uBAA8\uB4E0 \uC5F4\uB9B0 \uC774\uC288\uB294 "),p={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=t("\uC5EC\uAE30"),g=t(", Contribution \uAC00\uC774\uB4DC\uB294 "),C={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},m=t("\uC5EC\uAE30"),x=t("\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D, Cookbook\uC774 \uC81C\uC548\uC744 \uB193\uCE58\uACE0 \uC788\uB2E4\uBA74, \uBD80\uB514 \uC774\uC288\uB97C \uCD94\uAC00\uD574\uC8FC\uC138\uC694."),S=i('

    How to Read the Cookbook

    Solana Cookbook\uC740 \uAC01\uAC01 \uB2E4\uB978 \uBAA9\uC801\uC758 \uC139\uC158\uB4E4\uB85C \uB098\uB258\uC5B4\uC788\uC2B5\uB2C8\uB2E4.

    \uC139\uC158\uC124\uBA85
    Core Concepts\uAC1C\uBC1C\uC744 \uC704\uD574 \uC54C\uAE30 \uC88B\uC740 Solana\uC758 \uAE30\uBCF8 \uAD6C\uC131 \uC694\uC18C\uB4E4
    Guides\uAC1C\uBC1C \uBC29\uBC95\uB4E4\uC5D0 \uB300\uD55C \uAC04\uB2E8\uD55C \uAC00\uC774\uB4DC\uB4E4
    References\uD754\uD788 \uC0AC\uC6A9\uB418\uB294 \uCF54\uB4DC\uB4E4\uC5D0 \uB300\uD55C \uC790\uB8CC
    ',3);function w(v,N){const e=r("ExternalLinkIcon");return s(),d(c,null,[l,_,k,b,o("p",null,[u,o("a",p,[f,a(e)]),g,o("a",C,[m,a(e)]),x]),S],64)}var B=n(h,[["render",w]]);export{B as default}; +import{_ as n,r,o as s,c as d,a as o,b as a,F as c,d as t,e as i}from"./app.d411e3b3.js";const h={},l=o("h1",{id:"cooking-with-solana",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),t(" Cooking with Solana")],-1),_=o("p",null,[o("em",null,"Solana Cookbook"),t("\uC740 Solana \uC571\uC744 \uB9CC\uB4E4\uAE30 \uC704\uD55C \uD544\uC218\uC801\uC778 \uAC1C\uB150\uB4E4\uACFC \uC790\uB8CC\uB4E4\uC744 \uC81C\uACF5\uD558\uB294 \uAC1C\uBC1C\uC790 \uBB38\uC11C\uC785\uB2C8\uB2E4. \uAC01 \uAC1C\uB150\uACFC \uCC38\uACE0 \uC790\uB8CC\uB294 \uCD94\uAC00 \uC0C1\uC138\uD55C \uB0B4\uC6A9\uB4E4\uACFC \uC0AC\uC6A9 \uC608\uB97C \uC81C\uACF5\uD558\uBA70 Solana \uAC1C\uBC1C \uCE21\uBA74\uC5D0 \uCD08\uC810\uC744 \uB461\uB2C8\uB2E4.")],-1),k=o("h2",{id:"contributing",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#contributing","aria-hidden":"true"},"#"),t(" Contributing")],-1),b=o("p",null,"Cookbook\uC740 \uC0C8\uB85C\uC6B4 Solana \uAC1C\uBC1C\uC790\uB4E4\uC774 \uAE30\uC5EC\uD558\uAE30 \uC26C\uC6B4 \uBC29\uD5A5\uC73C\uB85C \uC124\uACC4\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uBB34\uC5C7\uC744 \uC5B4\uB5BB\uAC8C \uD574\uC57C \uD560\uC9C0 \uBAA8\uB974\uACA0\uB2E4\uBA74 \uC194\uB77C\uB098\uB97C \uBC30\uC6B0\uAE30 \uC704\uD574 \uC774 Cookbook\uC5D0 \uAE30\uC5EC\uD574\uBCF4\uC138\uC694!.",-1),u=t("\uBAA8\uB4E0 \uC5F4\uB9B0 \uC774\uC288\uB294 "),p={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=t("\uC5EC\uAE30"),g=t(", Contribution \uAC00\uC774\uB4DC\uB294 "),C={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},m=t("\uC5EC\uAE30"),x=t("\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D, Cookbook\uC774 \uC81C\uC548\uC744 \uB193\uCE58\uACE0 \uC788\uB2E4\uBA74, \uBD80\uB514 \uC774\uC288\uB97C \uCD94\uAC00\uD574\uC8FC\uC138\uC694."),S=i('

    How to Read the Cookbook

    Solana Cookbook\uC740 \uAC01\uAC01 \uB2E4\uB978 \uBAA9\uC801\uC758 \uC139\uC158\uB4E4\uB85C \uB098\uB258\uC5B4\uC788\uC2B5\uB2C8\uB2E4.

    \uC139\uC158\uC124\uBA85
    Core Concepts\uAC1C\uBC1C\uC744 \uC704\uD574 \uC54C\uAE30 \uC88B\uC740 Solana\uC758 \uAE30\uBCF8 \uAD6C\uC131 \uC694\uC18C\uB4E4
    Guides\uAC1C\uBC1C \uBC29\uBC95\uB4E4\uC5D0 \uB300\uD55C \uAC04\uB2E8\uD55C \uAC00\uC774\uB4DC\uB4E4
    References\uD754\uD788 \uC0AC\uC6A9\uB418\uB294 \uCF54\uB4DC\uB4E4\uC5D0 \uB300\uD55C \uC790\uB8CC
    ',3);function w(v,N){const e=r("ExternalLinkIcon");return s(),d(c,null,[l,_,k,b,o("p",null,[u,o("a",p,[f,a(e)]),g,o("a",C,[m,a(e)]),x]),S],64)}var B=n(h,[["render",w]]);export{B as default}; diff --git a/docs/.vuepress/dist/assets/index.html.8977d14d.js b/docs/.vuepress/dist/assets/index.html.92447802.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.8977d14d.js rename to docs/.vuepress/dist/assets/index.html.92447802.js index 6d5642fa9..516cdd103 100644 --- a/docs/.vuepress/dist/assets/index.html.8977d14d.js +++ b/docs/.vuepress/dist/assets/index.html.92447802.js @@ -1 +1 @@ -import{_ as a,r as o,o as i,c as r,a as e,b as s,F as c,d as t,e as d}from"./app.07ce7a66.js";const h={},l=e("h1",{id:"kochen-mit-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#kochen-mit-solana","aria-hidden":"true"},"#"),t(" Kochen mit Solana")],-1),u=e("p",null,[t("Das "),e("em",null,"Solana Cookbook"),t(" ist eine Ressource f\xFCr Entwickler, die die wesentlichen Konzepte und Referenzen zum Entwickeln von Anwendungen auf Solana bietet. Jedes Konzept und Referenz wird sich auf bestimmte Aspekte von Solana Development konzentrieren, und zeitgleich zus\xE4tzliche Details und Beispiele zur Verwendung bereitstellt.")],-1),_=e("h2",{id:"beitragen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#beitragen","aria-hidden":"true"},"#"),t(" Beitragen")],-1),b=e("p",null,"Das Kochbuch ist so gestaltet, dass es f\xFCr neue Solana-Entwickler einfach ist zum \xD6kosystem beizutragen. Selbst wenn du nichts wei\xDFt, ist etwas dem Solana Kochbuch beizutragen, eine gute Lernquelle!",-1),m=t('Entdecke alle offenen Probleme "Issues" '),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=t("hier"),g=t(". Beitragsrichtlinien "),p={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},w=t("hier"),z=t('. Wenn dir etwas im Kochbuch fehlt, erstelle bitte ein neues Problem "Issue".'),S=d('

    Wie man das Kochbuch liest

    Das Solana Kochbuch ist in verschiedene Sektionen aufgeteilt - alle abgestimmt auf ein anderes Ziel.

    SektionBeschreibung
    Kern-PrinzipienBausteine \u200B\u200Bvon Solana, die f\xFCr die Entwicklung gut zu wissen sind
    F\xFChrerLeitf\xE4den in H\xE4\xE4pchengr\xF6\xDFe zu verschiedenen Tools zum Entwickeln
    VerweiseVerweise auf h\xE4ufig ben\xF6tigte Codeausschnitte
    ',3);function v(x,E){const n=o("ExternalLinkIcon");return i(),r(c,null,[l,u,_,b,e("p",null,[m,e("a",f,[k,s(n)]),g,e("a",p,[w,s(n)]),z]),S],64)}var B=a(h,[["render",v]]);export{B as default}; +import{_ as a,r as o,o as i,c as r,a as e,b as s,F as c,d as t,e as d}from"./app.d411e3b3.js";const h={},l=e("h1",{id:"kochen-mit-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#kochen-mit-solana","aria-hidden":"true"},"#"),t(" Kochen mit Solana")],-1),u=e("p",null,[t("Das "),e("em",null,"Solana Cookbook"),t(" ist eine Ressource f\xFCr Entwickler, die die wesentlichen Konzepte und Referenzen zum Entwickeln von Anwendungen auf Solana bietet. Jedes Konzept und Referenz wird sich auf bestimmte Aspekte von Solana Development konzentrieren, und zeitgleich zus\xE4tzliche Details und Beispiele zur Verwendung bereitstellt.")],-1),_=e("h2",{id:"beitragen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#beitragen","aria-hidden":"true"},"#"),t(" Beitragen")],-1),b=e("p",null,"Das Kochbuch ist so gestaltet, dass es f\xFCr neue Solana-Entwickler einfach ist zum \xD6kosystem beizutragen. Selbst wenn du nichts wei\xDFt, ist etwas dem Solana Kochbuch beizutragen, eine gute Lernquelle!",-1),m=t('Entdecke alle offenen Probleme "Issues" '),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},k=t("hier"),g=t(". Beitragsrichtlinien "),p={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},w=t("hier"),z=t('. Wenn dir etwas im Kochbuch fehlt, erstelle bitte ein neues Problem "Issue".'),S=d('

    Wie man das Kochbuch liest

    Das Solana Kochbuch ist in verschiedene Sektionen aufgeteilt - alle abgestimmt auf ein anderes Ziel.

    SektionBeschreibung
    Kern-PrinzipienBausteine \u200B\u200Bvon Solana, die f\xFCr die Entwicklung gut zu wissen sind
    F\xFChrerLeitf\xE4den in H\xE4\xE4pchengr\xF6\xDFe zu verschiedenen Tools zum Entwickeln
    VerweiseVerweise auf h\xE4ufig ben\xF6tigte Codeausschnitte
    ',3);function v(x,E){const n=o("ExternalLinkIcon");return i(),r(c,null,[l,u,_,b,e("p",null,[m,e("a",f,[k,s(n)]),g,e("a",p,[w,s(n)]),z]),S],64)}var B=a(h,[["render",v]]);export{B as default}; diff --git a/docs/.vuepress/dist/assets/index.html.e7deec39.js b/docs/.vuepress/dist/assets/index.html.bc5a69e1.js similarity index 98% rename from docs/.vuepress/dist/assets/index.html.e7deec39.js rename to docs/.vuepress/dist/assets/index.html.bc5a69e1.js index 14988f30b..473b7d127 100644 --- a/docs/.vuepress/dist/assets/index.html.e7deec39.js +++ b/docs/.vuepress/dist/assets/index.html.bc5a69e1.js @@ -1 +1 @@ -import{_ as n,r as s,o as r,c as d,a as o,b as a,F as c,d as t,e as h}from"./app.07ce7a66.js";const i={},l=o("h1",{id:"cooking-with-solana",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),t(" Cooking with Solana")],-1),_=o("p",null,"\u300CSolana Cookbook\u300D\u306Fsolana\u3067\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u69CB\u7BC9\u3059\u308B\u3046\u3048\u3067\u6B20\u304B\u305B\u306A\u3044\u57FA\u672C\u7684\u306A\u30B3\u30F3\u30BB\u30D7\u30C8\u3092\u89E3\u8AAC\u3059\u308B \u958B\u767A\u8005\u5411\u3051\u306E\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u30AC\u30A4\u30C9\u3067\u3059\u3002 \u5404\u30B3\u30F3\u30BB\u30D7\u30C8\u3068\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u306F\u3001\u8A73\u7D30\u306A\u89E3\u8AAC\u3068\u4F8B\u3092\u7528\u3044\u3066solana\u306E\u958B\u767A\u306B\u304A\u3051\u308B\u7279\u6709\u306E\u5074\u9762\u306B\u7126\u70B9\u3092\u5F53\u3066\u3066\u3044\u307E\u3059\u3002",-1),k=o("h2",{id:"\u30B3\u30F3\u30C8\u30EA\u30D2\u3099\u30E5\u30FC\u30B7\u30E7\u30F3",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u30B3\u30F3\u30C8\u30EA\u30D2\u3099\u30E5\u30FC\u30B7\u30E7\u30F3","aria-hidden":"true"},"#"),t(" \u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3")],-1),b=o("p",null,[t("Cookbook\u306F\u3001Solana\u958B\u767A\u306E\u521D\u5FC3\u8005\u3067\u3082\u6C17\u8EFD\u306B\u30B3\u30F3\u30EA\u30D3\u30E5\u30FC\u30C8\u3067\u304D\u308B\u3088\u3046\u8A2D\u8A08\u3055\u308C\u3066\u3044\u307E\u3059\u3002"),o("br"),t(" \u4F55\u304B\u308F\u304B\u3089\u306A\u3044\u3053\u3068\u304C\u3042\u3063\u305F\u3068\u3057\u3066\u3082\u3001Cookbook\u3078\u306E\u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306F\u5B66\u7FD2\u306E\u5927\u304D\u306A\u624B\u52A9\u3051\u3068\u306A\u308B\u306F\u305A\u3067\u3059\uFF01")],-1),p=t("Solana Cookbook\u306B\u304A\u3044\u3066\u672A\u89E3\u6C7A\u3001\u672A\u5831\u544A\u306E\u554F\u984C\u304C\u3042\u308B\u5834\u5408\u306F\u3001\u307E\u305Aissue\u306E\u8FFD\u52A0\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002 issue\u306F"),u={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=t("\u3053\u3061\u3089"),m=t("\u3002 \u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u30AC\u30A4\u30C9\u30E9\u30A4\u30F3\u306F"),x={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},g=t("\u3053\u3061\u3089"),C=t("\u3002"),S=h('

    Cookbook\u306E\u8AAD\u307F\u65B9

    Solana Cookbook \u3067\u306F\u305D\u308C\u305E\u308C\u306E\u76EE\u7684\u306B\u5FDC\u3058\u4E0B\u8A18\u306E\u7AE0\u306B\u5206\u3051\u3066\u89E3\u8AAC\u3057\u3066\u3044\u307E\u3059\u3002

    \u7AE0\u6982\u8981
    \u30B3\u30A2\u30B3\u30F3\u30BB\u30D7\u30C8\u958B\u767A\u306B\u304A\u3044\u3066\u5F79\u7ACB\u3064Solana\u306E\u69CB\u6210\u8981\u7D20
    \u30AC\u30A4\u30C9\u5404\u958B\u767A\u30C4\u30FC\u30EB\u306E\u7C21\u5358\u306A\u7D39\u4ECB
    \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u666E\u904D\u7684\u306A\u30B3\u30FC\u30C9\u30B9\u30CB\u30DA\u30C3\u30C8
    ',3);function v(N,V){const e=s("ExternalLinkIcon");return r(),d(c,null,[l,_,k,b,o("p",null,[p,o("a",u,[f,a(e)]),m,o("a",x,[g,a(e)]),C]),S],64)}var B=n(i,[["render",v]]);export{B as default}; +import{_ as n,r as s,o as r,c as d,a as o,b as a,F as c,d as t,e as h}from"./app.d411e3b3.js";const i={},l=o("h1",{id:"cooking-with-solana",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),t(" Cooking with Solana")],-1),_=o("p",null,"\u300CSolana Cookbook\u300D\u306Fsolana\u3067\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u3092\u69CB\u7BC9\u3059\u308B\u3046\u3048\u3067\u6B20\u304B\u305B\u306A\u3044\u57FA\u672C\u7684\u306A\u30B3\u30F3\u30BB\u30D7\u30C8\u3092\u89E3\u8AAC\u3059\u308B \u958B\u767A\u8005\u5411\u3051\u306E\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u30AC\u30A4\u30C9\u3067\u3059\u3002 \u5404\u30B3\u30F3\u30BB\u30D7\u30C8\u3068\u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u306F\u3001\u8A73\u7D30\u306A\u89E3\u8AAC\u3068\u4F8B\u3092\u7528\u3044\u3066solana\u306E\u958B\u767A\u306B\u304A\u3051\u308B\u7279\u6709\u306E\u5074\u9762\u306B\u7126\u70B9\u3092\u5F53\u3066\u3066\u3044\u307E\u3059\u3002",-1),k=o("h2",{id:"\u30B3\u30F3\u30C8\u30EA\u30D2\u3099\u30E5\u30FC\u30B7\u30E7\u30F3",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u30B3\u30F3\u30C8\u30EA\u30D2\u3099\u30E5\u30FC\u30B7\u30E7\u30F3","aria-hidden":"true"},"#"),t(" \u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3")],-1),b=o("p",null,[t("Cookbook\u306F\u3001Solana\u958B\u767A\u306E\u521D\u5FC3\u8005\u3067\u3082\u6C17\u8EFD\u306B\u30B3\u30F3\u30EA\u30D3\u30E5\u30FC\u30C8\u3067\u304D\u308B\u3088\u3046\u8A2D\u8A08\u3055\u308C\u3066\u3044\u307E\u3059\u3002"),o("br"),t(" \u4F55\u304B\u308F\u304B\u3089\u306A\u3044\u3053\u3068\u304C\u3042\u3063\u305F\u3068\u3057\u3066\u3082\u3001Cookbook\u3078\u306E\u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u306F\u5B66\u7FD2\u306E\u5927\u304D\u306A\u624B\u52A9\u3051\u3068\u306A\u308B\u306F\u305A\u3067\u3059\uFF01")],-1),p=t("Solana Cookbook\u306B\u304A\u3044\u3066\u672A\u89E3\u6C7A\u3001\u672A\u5831\u544A\u306E\u554F\u984C\u304C\u3042\u308B\u5834\u5408\u306F\u3001\u307E\u305Aissue\u306E\u8FFD\u52A0\u3092\u304A\u9858\u3044\u3044\u305F\u3057\u307E\u3059\u3002 issue\u306F"),u={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},f=t("\u3053\u3061\u3089"),m=t("\u3002 \u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u30AC\u30A4\u30C9\u30E9\u30A4\u30F3\u306F"),x={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},g=t("\u3053\u3061\u3089"),C=t("\u3002"),S=h('

    Cookbook\u306E\u8AAD\u307F\u65B9

    Solana Cookbook \u3067\u306F\u305D\u308C\u305E\u308C\u306E\u76EE\u7684\u306B\u5FDC\u3058\u4E0B\u8A18\u306E\u7AE0\u306B\u5206\u3051\u3066\u89E3\u8AAC\u3057\u3066\u3044\u307E\u3059\u3002

    \u7AE0\u6982\u8981
    \u30B3\u30A2\u30B3\u30F3\u30BB\u30D7\u30C8\u958B\u767A\u306B\u304A\u3044\u3066\u5F79\u7ACB\u3064Solana\u306E\u69CB\u6210\u8981\u7D20
    \u30AC\u30A4\u30C9\u5404\u958B\u767A\u30C4\u30FC\u30EB\u306E\u7C21\u5358\u306A\u7D39\u4ECB
    \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u666E\u904D\u7684\u306A\u30B3\u30FC\u30C9\u30B9\u30CB\u30DA\u30C3\u30C8
    ',3);function v(N,V){const e=s("ExternalLinkIcon");return r(),d(c,null,[l,_,k,b,o("p",null,[p,o("a",u,[f,a(e)]),m,o("a",x,[g,a(e)]),C]),S],64)}var B=n(i,[["render",v]]);export{B as default}; diff --git a/docs/.vuepress/dist/assets/index.html.f4a1e63e.js b/docs/.vuepress/dist/assets/index.html.f1c2ef80.js similarity index 97% rename from docs/.vuepress/dist/assets/index.html.f4a1e63e.js rename to docs/.vuepress/dist/assets/index.html.f1c2ef80.js index 76554727b..99e8441e3 100644 --- a/docs/.vuepress/dist/assets/index.html.f4a1e63e.js +++ b/docs/.vuepress/dist/assets/index.html.f1c2ef80.js @@ -1 +1 @@ -import{_ as a,r as s,o as i,c as r,a as e,b as n,F as d,d as o,e as c}from"./app.07ce7a66.js";const h={},l=e("h1",{id:"cooking-with-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),o(" Cooking with Solana")],-1),p=e("p",null,[o("The "),e("em",null,"Solana Cookbook"),o(" is a developer resource that provides the essential concepts and references for building applications on Solana. Each concept and reference will focus on specific aspects of Solana development while providing additional details and usage examples.")],-1),_=e("h2",{id:"contributing",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contributing","aria-hidden":"true"},"#"),o(" Contributing")],-1),u=e("p",null,"The Cookbook is designed in a way that makes it easy for new Solana developers to contribute. Even if you don't know how to do something, contributing to the cookbook is a great way to learn!",-1),k=o("Check out all open issues "),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},b=o("here"),g=o(". Contribution guidelines "),m={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},w=o("here"),v=o(". If you find the cookbook is missing a suggestion, please add an issue."),x=c('

    How to Read the Cookbook

    The Solana Cookbook is split into different sections, each aimed at a different goal.

    SectionDescription
    Core ConceptsBuilding blocks of Solana that are good to know for development
    GuidesSnack-sized guides about different tools for development
    ReferencesReferences to commonly needed code snippets
    ',3);function C(S,y){const t=s("ExternalLinkIcon");return i(),r(d,null,[l,p,_,u,e("p",null,[k,e("a",f,[b,n(t)]),g,e("a",m,[w,n(t)]),v]),x],64)}var B=a(h,[["render",C]]);export{B as default}; +import{_ as a,r as s,o as i,c as r,a as e,b as n,F as d,d as o,e as c}from"./app.d411e3b3.js";const h={},l=e("h1",{id:"cooking-with-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cooking-with-solana","aria-hidden":"true"},"#"),o(" Cooking with Solana")],-1),p=e("p",null,[o("The "),e("em",null,"Solana Cookbook"),o(" is a developer resource that provides the essential concepts and references for building applications on Solana. Each concept and reference will focus on specific aspects of Solana development while providing additional details and usage examples.")],-1),_=e("h2",{id:"contributing",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#contributing","aria-hidden":"true"},"#"),o(" Contributing")],-1),u=e("p",null,"The Cookbook is designed in a way that makes it easy for new Solana developers to contribute. Even if you don't know how to do something, contributing to the cookbook is a great way to learn!",-1),k=o("Check out all open issues "),f={href:"https://github.com/solana-developers/solana-cookbook/issues",target:"_blank",rel:"noopener noreferrer"},b=o("here"),g=o(". Contribution guidelines "),m={href:"https://github.com/solana-developers/solana-cookbook#contributing",target:"_blank",rel:"noopener noreferrer"},w=o("here"),v=o(". If you find the cookbook is missing a suggestion, please add an issue."),x=c('

    How to Read the Cookbook

    The Solana Cookbook is split into different sections, each aimed at a different goal.

    SectionDescription
    Core ConceptsBuilding blocks of Solana that are good to know for development
    GuidesSnack-sized guides about different tools for development
    ReferencesReferences to commonly needed code snippets
    ',3);function C(S,y){const t=s("ExternalLinkIcon");return i(),r(d,null,[l,p,_,u,e("p",null,[k,e("a",f,[b,n(t)]),g,e("a",m,[w,n(t)]),v]),x],64)}var B=a(h,[["render",C]]);export{B as default}; diff --git a/docs/.vuepress/dist/assets/installation.html.1f30223e.js b/docs/.vuepress/dist/assets/installation.html.1baa10e4.js similarity index 85% rename from docs/.vuepress/dist/assets/installation.html.1f30223e.js rename to docs/.vuepress/dist/assets/installation.html.1baa10e4.js index 92c45b998..0ebd1dd58 100644 --- a/docs/.vuepress/dist/assets/installation.html.1f30223e.js +++ b/docs/.vuepress/dist/assets/installation.html.1baa10e4.js @@ -1 +1 @@ -const e={key:"v-eeeeb756",path:"/zh_t/getting-started/installation.html",title:"\u5B89\u88DD",lang:"en-US",frontmatter:{title:"\u5B89\u88DD",head:[["meta",{name:"title",content:"Solana\u7955\u7C4D | \u5B89\u88DD"}],["meta",{name:"og:title",content:"Solana\u7955\u7C4D | \u5B89\u88DD"}],["meta",{name:"description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B78\u7FD2\u5982\u4F55\u958B\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B78\u7FD2\u5982\u4F55\u958B\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5B89\u88DDWeb3.js",slug:"\u5B89\u88DDweb3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E63\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E63-spl-token",children:[]},{level:3,title:"\u9322\u5305\u9069\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u9322\u5305\u9069\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88DDRust",slug:"\u5B89\u88DDrust",children:[]},{level:2,title:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",slug:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",children:[]}]}],git:{updatedTime:1688705294e3,contributors:[{name:"lillianrf",email:"138085102+lillianrf@users.noreply.github.com",commits:1}]},filePathRelative:"zh_t/getting-started/installation.md"};export{e as data}; +const e={key:"v-eeeeb756",path:"/zh_t/getting-started/installation.html",title:"\u5B89\u88DD",lang:"en-US",frontmatter:{title:"\u5B89\u88DD",head:[["meta",{name:"title",content:"Solana\u7955\u7C4D | \u5B89\u88DD"}],["meta",{name:"og:title",content:"Solana\u7955\u7C4D | \u5B89\u88DD"}],["meta",{name:"description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B78\u7FD2\u5982\u4F55\u958B\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B78\u7FD2\u5982\u4F55\u958B\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5B89\u88DDWeb3.js",slug:"\u5B89\u88DDweb3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E63\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E63-spl-token",children:[]},{level:3,title:"\u9322\u5305\u9069\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u9322\u5305\u9069\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88DDRust",slug:"\u5B89\u88DDrust",children:[]},{level:2,title:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88DD\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",slug:"\u5F9E\u6E90\u78BC\u7DE8\u8B6F",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"lillianrf",email:"138085102+lillianrf@users.noreply.github.com",commits:1}]},filePathRelative:"zh_t/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.f389c1e2.js b/docs/.vuepress/dist/assets/installation.html.1bd39712.js similarity index 83% rename from docs/.vuepress/dist/assets/installation.html.f389c1e2.js rename to docs/.vuepress/dist/assets/installation.html.1bd39712.js index 87c2dbd84..69da043c9 100644 --- a/docs/.vuepress/dist/assets/installation.html.f389c1e2.js +++ b/docs/.vuepress/dist/assets/installation.html.1bd39712.js @@ -1 +1 @@ -const t={key:"v-bd0a22a0",path:"/tr/getting-started/installation.html",title:"Installation",lang:"tr-TR",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js (Web3.js Kurulumu)",slug:"install-web3-js-web3-js-kurulumu",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet Adapter (C\xFCzdan Adapt\xF6r\xFC)",slug:"wallet-adapter-cuzdan-adaptoru",children:[]}]},{level:2,title:"Install Rust (Rust Kurulumu)",slug:"install-rust-rust-kurulumu",children:[]},{level:2,title:"Install CLI (CLI Kurulumu)",slug:"install-cli-cli-kurulumu",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source (Kaynaktan Derleme)",slug:"build-from-source-kaynaktan-derleme",children:[]}]}],git:{updatedTime:1673626508e3,contributors:[{name:"Jacob Creech",email:"82475023+jacobcreech@users.noreply.github.com",commits:1},{name:"rbeyzas",email:"rukiyebeyzasarikaya@hotmail.com",commits:1}]},filePathRelative:"tr/getting-started/installation.md"};export{t as data}; +const e={key:"v-bd0a22a0",path:"/tr/getting-started/installation.html",title:"Installation",lang:"tr-TR",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js (Web3.js Kurulumu)",slug:"install-web3-js-web3-js-kurulumu",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet Adapter (C\xFCzdan Adapt\xF6r\xFC)",slug:"wallet-adapter-cuzdan-adaptoru",children:[]}]},{level:2,title:"Install Rust (Rust Kurulumu)",slug:"install-rust-rust-kurulumu",children:[]},{level:2,title:"Install CLI (CLI Kurulumu)",slug:"install-cli-cli-kurulumu",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source (Kaynaktan Derleme)",slug:"build-from-source-kaynaktan-derleme",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Jacob Creech",email:"82475023+jacobcreech@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"rbeyzas",email:"rukiyebeyzasarikaya@hotmail.com",commits:1}]},filePathRelative:"tr/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.3b279ba8.js b/docs/.vuepress/dist/assets/installation.html.1d183c4d.js similarity index 86% rename from docs/.vuepress/dist/assets/installation.html.3b279ba8.js rename to docs/.vuepress/dist/assets/installation.html.1d183c4d.js index 5d56be079..fbbf55f20 100644 --- a/docs/.vuepress/dist/assets/installation.html.3b279ba8.js +++ b/docs/.vuepress/dist/assets/installation.html.1d183c4d.js @@ -1 +1 @@ -const e={key:"v-4605d97e",path:"/fr/getting-started/installation.html",title:"Installation",lang:"fr-FR",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Apprenez comment d\xE9marrer avec Solana \xE0 l'aide de tutoriels, de guides et d'exemples."}],["meta",{name:"og:description",content:"Apprenez comment d\xE9marrer avec Solana \xE0 l'aide de tutoriels, de guides et d'exemples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Installer Web3.js",slug:"installer-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Installer Rust",slug:"installer-rust",children:[]},{level:2,title:"Installer CLI",slug:"installer-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compiler \xE0 partir du code source",slug:"compiler-a-partir-du-code-source",children:[]}]}],git:{updatedTime:1674873344e3,contributors:[{name:"cryptoloutre",email:"35653371+cryptoloutre@users.noreply.github.com",commits:2}]},filePathRelative:"fr/getting-started/installation.md"};export{e as data}; +const e={key:"v-4605d97e",path:"/fr/getting-started/installation.html",title:"Installation",lang:"fr-FR",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Apprenez comment d\xE9marrer avec Solana \xE0 l'aide de tutoriels, de guides et d'exemples."}],["meta",{name:"og:description",content:"Apprenez comment d\xE9marrer avec Solana \xE0 l'aide de tutoriels, de guides et d'exemples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Installer Web3.js",slug:"installer-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Installer Rust",slug:"installer-rust",children:[]},{level:2,title:"Installer CLI",slug:"installer-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compiler \xE0 partir du code source",slug:"compiler-a-partir-du-code-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"cryptoloutre",email:"35653371+cryptoloutre@users.noreply.github.com",commits:2},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"fr/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.eeb039ec.js b/docs/.vuepress/dist/assets/installation.html.20ee85ab.js similarity index 86% rename from docs/.vuepress/dist/assets/installation.html.eeb039ec.js rename to docs/.vuepress/dist/assets/installation.html.20ee85ab.js index f30e2bc5c..21bf7c143 100644 --- a/docs/.vuepress/dist/assets/installation.html.eeb039ec.js +++ b/docs/.vuepress/dist/assets/installation.html.20ee85ab.js @@ -1 +1 @@ -const e={key:"v-c3a0e694",path:"/pt/getting-started/installation.html",title:"Instala\xE7\xE3o",lang:"pt-BR",frontmatter:{title:"Instala\xE7\xE3o",head:[["meta",{name:"title",content:"Livro de Receitas da Solana - Solana Cookbook | Instala\xE7\xE3o"}],["meta",{name:"og:title",content:"Livro de Receitas da Solana - Solana Cookbook | Instala\xE7\xE3o"}],["meta",{name:"description",content:"Aprenda como come\xE7ar na Solana com tutoriais, guias e exemplos."}],["meta",{name:"og:description",content:"Aprenda como come\xE7ar na Solana com tutoriais, guias e exemplos."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Instale o Web3.js",slug:"instale-o-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instale o Rust",slug:"instale-o-rust",children:[]},{level:2,title:"Instale a CLI",slug:"instale-a-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compila\xE7\xE3o a Partir do C\xF3digo-Fonte",slug:"compilacao-a-partir-do-codigo-fonte",children:[]}]}],git:{updatedTime:1690516363e3,contributors:[{name:"Daniel Cukier",email:"danicuki@gmail.com",commits:1}]},filePathRelative:"pt/getting-started/installation.md"};export{e as data}; +const e={key:"v-c3a0e694",path:"/pt/getting-started/installation.html",title:"Instala\xE7\xE3o",lang:"pt-BR",frontmatter:{title:"Instala\xE7\xE3o",head:[["meta",{name:"title",content:"Livro de Receitas da Solana - Solana Cookbook | Instala\xE7\xE3o"}],["meta",{name:"og:title",content:"Livro de Receitas da Solana - Solana Cookbook | Instala\xE7\xE3o"}],["meta",{name:"description",content:"Aprenda como come\xE7ar na Solana com tutoriais, guias e exemplos."}],["meta",{name:"og:description",content:"Aprenda como come\xE7ar na Solana com tutoriais, guias e exemplos."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Instale o Web3.js",slug:"instale-o-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instale o Rust",slug:"instale-o-rust",children:[]},{level:2,title:"Instale a CLI",slug:"instale-a-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compila\xE7\xE3o a Partir do C\xF3digo-Fonte",slug:"compilacao-a-partir-do-codigo-fonte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Daniel Cukier",email:"danicuki@gmail.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"pt/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.fd583852.js b/docs/.vuepress/dist/assets/installation.html.266da2d0.js similarity index 90% rename from docs/.vuepress/dist/assets/installation.html.fd583852.js rename to docs/.vuepress/dist/assets/installation.html.266da2d0.js index 2f23823b1..949e607df 100644 --- a/docs/.vuepress/dist/assets/installation.html.fd583852.js +++ b/docs/.vuepress/dist/assets/installation.html.266da2d0.js @@ -1 +1 @@ -const t={key:"v-274abcb6",path:"/vi/getting-started/installation.html",title:"C\xE0i \u0111\u1EB7t",lang:"vi-VN",frontmatter:{title:"C\xE0i \u0111\u1EB7t",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | C\xE0i \u0111\u1EB7t"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | C\xE0i \u0111\u1EB7t"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi Solana th\xF4ng qua c\xE1c h\u01B0\u1EDBng d\u1EABn, b\xE0i gi\u1EA3ng, v\xE0 v\xED d\u1EE5 m\u1EABu."}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi Solana th\xF4ng qua c\xE1c h\u01B0\u1EDBng d\u1EABn, b\xE0i gi\u1EA3ng, v\xE0 v\xED d\u1EE5 m\u1EABu."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"C\xE0i \u0111\u1EB7t Web3.js",slug:"cai-\u0111at-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"C\xE0i \u0111\u1EB7t Rust",slug:"cai-\u0111at-rust",children:[]},{level:2,title:"C\xE0i \u0111\u1EB7t CLI",slug:"cai-\u0111at-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bi\xEAn d\u1ECBch t\u1EEB m\xE3 ngu\u1ED3n",slug:"bien-dich-tu-ma-nguon",children:[]}]}],git:{updatedTime:1658932681e3,contributors:[{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:2}]},filePathRelative:"vi/getting-started/installation.md"};export{t as data}; +const t={key:"v-274abcb6",path:"/vi/getting-started/installation.html",title:"C\xE0i \u0111\u1EB7t",lang:"vi-VN",frontmatter:{title:"C\xE0i \u0111\u1EB7t",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | C\xE0i \u0111\u1EB7t"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | C\xE0i \u0111\u1EB7t"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi Solana th\xF4ng qua c\xE1c h\u01B0\u1EDBng d\u1EABn, b\xE0i gi\u1EA3ng, v\xE0 v\xED d\u1EE5 m\u1EABu."}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u l\xE0m th\u1EBF n\xE0o \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi Solana th\xF4ng qua c\xE1c h\u01B0\u1EDBng d\u1EABn, b\xE0i gi\u1EA3ng, v\xE0 v\xED d\u1EE5 m\u1EABu."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"C\xE0i \u0111\u1EB7t Web3.js",slug:"cai-\u0111at-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"C\xE0i \u0111\u1EB7t Rust",slug:"cai-\u0111at-rust",children:[]},{level:2,title:"C\xE0i \u0111\u1EB7t CLI",slug:"cai-\u0111at-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bi\xEAn d\u1ECBch t\u1EEB m\xE3 ngu\u1ED3n",slug:"bien-dich-tu-ma-nguon",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:2},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"vi/getting-started/installation.md"};export{t as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.3ee204bb.js b/docs/.vuepress/dist/assets/installation.html.2ee5c8ec.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.3ee204bb.js rename to docs/.vuepress/dist/assets/installation.html.2ee5c8ec.js index 858c8001a..8b6aa54d9 100644 --- a/docs/.vuepress/dist/assets/installation.html.3ee204bb.js +++ b/docs/.vuepress/dist/assets/installation.html.2ee5c8ec.js @@ -1,5 +1,5 @@ -import{_ as r,r as c,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.07ce7a66.js";const h={},b=s("h2",{id:"install-web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#install-web3-js","aria-hidden":"true"},"#"),n(" Install Web3.js")],-1),_=s("p",null,[n("\u4E0B\u8A18\u306Ejavascript \u3084 typescript \u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u7528\u3044\u3066Solana\u3068\u5BFE\u8A71\u304C\u53EF\u80FD\u3067\u3059\u3002"),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n("\u3000\u306F\u3001 \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1\u3001\u5BFE\u8A71\u3001\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u306E\u8AAD\u307F\u53D6\u308A\u3068\u3044\u3063\u305FSolana\u306E\u57FA\u672C\u7684\u306A\u30C4\u30FC\u30EB\u3092\u591A\u6570\u5099\u3048\u305F\u30E9\u30A4\u30D6\u30E9\u30EA\u3067\u3059\u3002"),f=s("p",null,"\u4E0B\u8A18\u306B\u5F93\u3044\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u304C\u53EF\u80FD\u3067\u3059\u3002:",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as r,r as c,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.d411e3b3.js";const h={},b=s("h2",{id:"install-web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#install-web3-js","aria-hidden":"true"},"#"),n(" Install Web3.js")],-1),_=s("p",null,[n("\u4E0B\u8A18\u306Ejavascript \u3084 typescript \u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u7528\u3044\u3066Solana\u3068\u5BFE\u8A71\u304C\u53EF\u80FD\u3067\u3059\u3002"),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n("\u3000\u306F\u3001 \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u9001\u4FE1\u3001\u5BFE\u8A71\u3001\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u306E\u8AAD\u307F\u53D6\u308A\u3068\u3044\u3063\u305FSolana\u306E\u57FA\u672C\u7684\u306A\u30C4\u30FC\u30EB\u3092\u591A\u6570\u5099\u3048\u305F\u30E9\u30A4\u30D6\u30E9\u30EA\u3067\u3059\u3002"),f=s("p",null,"\u4E0B\u8A18\u306B\u5F93\u3044\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u304C\u53EF\u80FD\u3067\u3059\u3002:",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),S=s("div",{class:"language-html ext-html line-numbers-mode"},[s("pre",{class:"language-html"},[s("code",null,[s("span",{class:"token comment"},""),n(` `),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"<"),n("script")]),n(),s("span",{class:"token attr-name"},"src"),s("span",{class:"token attr-value"},[s("span",{class:"token punctuation attr-equals"},"="),s("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),s("span",{class:"token punctuation"},'"')]),s("span",{class:"token punctuation"},">")]),s("span",{class:"token script"}),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.5e200cbd.js b/docs/.vuepress/dist/assets/installation.html.36acf74c.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.5e200cbd.js rename to docs/.vuepress/dist/assets/installation.html.36acf74c.js index e75cf0124..59965d674 100644 --- a/docs/.vuepress/dist/assets/installation.html.5e200cbd.js +++ b/docs/.vuepress/dist/assets/installation.html.36acf74c.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as u,c as p,a as e,b as n,w as a,F as d,d as s,e as o}from"./app.07ce7a66.js";const h={},m=e("h2",{id:"installer-web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installer-web3-js","aria-hidden":"true"},"#"),s(" Installer Web3.js")],-1),b=e("p",null,[s("Il existe quelques biblioth\xE8ques que vous pouvez utiliser pour d\xE9marrer avec javascript ou typescript sur Solana."),e("br")],-1),_=e("h3",{id:"web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),v={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},g=e("code",null,"@solana/web3.js",-1),k=s(" est une biblioth\xE8que qui contient une grande partie des outils de base de Solana pour interagir, envoyer des transactions et lire la blockchain."),f=e("p",null,"Vous pouvez l'installer avec l'une des commandes suivantes :",-1),x=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"yarn"),s(),e("span",{class:"token function"},"add"),s(` @solana/web3.js -`)])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("span",{class:"line-number"},"1"),e("br")])],-1),z=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"npm"),s(),e("span",{class:"token function"},"install"),s(` --save @solana/web3.js +import{_ as c,r,o as u,c as p,a as e,b as n,w as a,F as d,d as s,e as o}from"./app.d411e3b3.js";const h={},m=e("h2",{id:"installer-web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installer-web3-js","aria-hidden":"true"},"#"),s(" Installer Web3.js")],-1),b=e("p",null,[s("Il existe quelques biblioth\xE8ques que vous pouvez utiliser pour d\xE9marrer avec javascript ou typescript sur Solana."),e("br")],-1),_=e("h3",{id:"web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),v={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},g=e("code",null,"@solana/web3.js",-1),k=s(" est une biblioth\xE8que qui contient une grande partie des outils de base de Solana pour interagir, envoyer des transactions et lire la blockchain."),f=e("p",null,"Vous pouvez l'installer avec l'une des commandes suivantes :",-1),x=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"yarn"),s(),e("span",{class:"token function"},"add"),s(` @solana/web3.js@1 +`)])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("span",{class:"line-number"},"1"),e("br")])],-1),z=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"npm"),s(),e("span",{class:"token function"},"install"),s(` --save @solana/web3.js@1 `)])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("span",{class:"line-number"},"1"),e("br")])],-1),S=e("div",{class:"language-html ext-html line-numbers-mode"},[e("pre",{class:"language-html"},[e("code",null,[e("span",{class:"token comment"},""),s(` `),e("span",{class:"token tag"},[e("span",{class:"token tag"},[e("span",{class:"token punctuation"},"<"),s("script")]),s(),e("span",{class:"token attr-name"},"src"),e("span",{class:"token attr-value"},[e("span",{class:"token punctuation attr-equals"},"="),e("span",{class:"token punctuation"},'"'),s("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),e("span",{class:"token punctuation"},'"')]),e("span",{class:"token punctuation"},">")]),e("span",{class:"token script"}),e("span",{class:"token tag"},[e("span",{class:"token tag"},[e("span",{class:"token punctuation"},"")]),s(` diff --git a/docs/.vuepress/dist/assets/installation.html.81cc1ff4.js b/docs/.vuepress/dist/assets/installation.html.4c7b0806.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.81cc1ff4.js rename to docs/.vuepress/dist/assets/installation.html.4c7b0806.js index a31f540aa..d0416aa0f 100644 --- a/docs/.vuepress/dist/assets/installation.html.81cc1ff4.js +++ b/docs/.vuepress/dist/assets/installation.html.4c7b0806.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as d,c as p,a as n,b as a,w as e,F as u,d as s,e as l}from"./app.07ce7a66.js";const h={},b=n("h2",{id:"install-web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#install-web3-js","aria-hidden":"true"},"#"),s(" Install Web3.js")],-1),m=n("p",null,"There are a few libraries that you can use to get started with javascript or typescript on Solana.",-1),_=n("h3",{id:"web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=n("code",null,"@solana/web3.js",-1),f=s(" is a library that has a lot of the basic Solana tools to interact, send transactions, and read from the blockchain."),v=n("p",null,"You can install with the following:",-1),w=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"yarn"),s(),n("span",{class:"token function"},"add"),s(` @solana/web3.js -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),x=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"npm"),s(),n("span",{class:"token function"},"install"),s(` --save @solana/web3.js +import{_ as c,r,o as d,c as p,a as n,b as a,w as e,F as u,d as s,e as l}from"./app.d411e3b3.js";const h={},b=n("h2",{id:"install-web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#install-web3-js","aria-hidden":"true"},"#"),s(" Install Web3.js")],-1),m=n("p",null,"There are a few libraries that you can use to get started with javascript or typescript on Solana.",-1),_=n("h3",{id:"web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=n("code",null,"@solana/web3.js",-1),f=s(" is a library that has a lot of the basic Solana tools to interact, send transactions, and read from the blockchain."),v=n("p",null,"You can install with the following:",-1),w=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"yarn"),s(),n("span",{class:"token function"},"add"),s(` @solana/web3.js@1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),x=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"npm"),s(),n("span",{class:"token function"},"install"),s(` --save @solana/web3.js@1 `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),y=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token comment"},""),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),s(),n("span",{class:"token attr-name"},"src"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),s("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"}),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` diff --git a/docs/.vuepress/dist/assets/installation.html.ef551b6c.js b/docs/.vuepress/dist/assets/installation.html.55799980.js similarity index 86% rename from docs/.vuepress/dist/assets/installation.html.ef551b6c.js rename to docs/.vuepress/dist/assets/installation.html.55799980.js index 934d5dad5..08e18d995 100644 --- a/docs/.vuepress/dist/assets/installation.html.ef551b6c.js +++ b/docs/.vuepress/dist/assets/installation.html.55799980.js @@ -1 +1 @@ -const t={key:"v-8e9578ae",path:"/fil/getting-started/installation.html",title:"Installation",lang:"fil-PH",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"I-install ang Web3.js",slug:"i-install-ang-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"I-install ang CLI",slug:"i-install-ang-cli",children:[{level:3,title:"macOS at Linux",slug:"macos-at-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bumuo Mula sa Source",slug:"bumuo-mula-sa-source",children:[]}]}],git:{updatedTime:1687314835e3,contributors:[{name:"mh",email:"kimerran@users.noreply.github.com",commits:1}]},filePathRelative:"fil/getting-started/installation.md"};export{t as data}; +const t={key:"v-8e9578ae",path:"/fil/getting-started/installation.html",title:"Installation",lang:"fil-PH",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"I-install ang Web3.js",slug:"i-install-ang-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"I-install ang CLI",slug:"i-install-ang-cli",children:[{level:3,title:"macOS at Linux",slug:"macos-at-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Bumuo Mula sa Source",slug:"bumuo-mula-sa-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"mh",email:"kimerran@users.noreply.github.com",commits:1}]},filePathRelative:"fil/getting-started/installation.md"};export{t as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.91886c17.js b/docs/.vuepress/dist/assets/installation.html.5e3228c9.js similarity index 86% rename from docs/.vuepress/dist/assets/installation.html.91886c17.js rename to docs/.vuepress/dist/assets/installation.html.5e3228c9.js index a7eaa45f4..0251cdd11 100644 --- a/docs/.vuepress/dist/assets/installation.html.91886c17.js +++ b/docs/.vuepress/dist/assets/installation.html.5e3228c9.js @@ -1 +1 @@ -const e={key:"v-567ec360",path:"/zh/getting-started/installation.html",title:"\u5B89\u88C5",lang:"zh-CN",frontmatter:{title:"\u5B89\u88C5",head:[["meta",{name:"title",content:"Solana\u79D8\u7C4D | \u5B89\u88C5"}],["meta",{name:"og:title",content:"Solana\u79D8\u7C4D | \u5B89\u88C5"}],["meta",{name:"description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B66\u4E60\u5982\u4F55\u5F00\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B66\u4E60\u5982\u4F55\u5F00\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5B89\u88C5Web3.js",slug:"\u5B89\u88C5web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E01\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E01-spl-token",children:[]},{level:3,title:"\u94B1\u5305\u9002\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u94B1\u5305\u9002\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88C5Rust",slug:"\u5B89\u88C5rust",children:[]},{level:2,title:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u4ECE\u6E90\u7801\u7F16\u8BD1",slug:"\u4ECE\u6E90\u7801\u7F16\u8BD1",children:[]}]}],git:{updatedTime:1646668759e3,contributors:[{name:"Hipo",email:"0xhipo@gmail.com",commits:1}]},filePathRelative:"zh/getting-started/installation.md"};export{e as data}; +const e={key:"v-567ec360",path:"/zh/getting-started/installation.html",title:"\u5B89\u88C5",lang:"zh-CN",frontmatter:{title:"\u5B89\u88C5",head:[["meta",{name:"title",content:"Solana\u79D8\u7C4D | \u5B89\u88C5"}],["meta",{name:"og:title",content:"Solana\u79D8\u7C4D | \u5B89\u88C5"}],["meta",{name:"description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B66\u4E60\u5982\u4F55\u5F00\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:description",content:"\u5229\u7528\u6559\u7A0B\u3001\u6307\u5357\u548C\u4F8B\u5B50\uFF0C\u5B66\u4E60\u5982\u4F55\u5F00\u59CB\u4F7F\u7528Solana\u3002"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5B89\u88C5Web3.js",slug:"\u5B89\u88C5web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL\u4EE3\u5E01\uFF08SPL-Token\uFF09",slug:"spl\u4EE3\u5E01-spl-token",children:[]},{level:3,title:"\u94B1\u5305\u9002\u914D\u5668\uFF08Wallet-Adapter\uFF09",slug:"\u94B1\u5305\u9002\u914D\u5668-wallet-adapter",children:[]}]},{level:2,title:"\u5B89\u88C5Rust",slug:"\u5B89\u88C5rust",children:[]},{level:2,title:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",slug:"\u5B89\u88C5\u547D\u4EE4\u884C\u5DE5\u5177",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"\u4ECE\u6E90\u7801\u7F16\u8BD1",slug:"\u4ECE\u6E90\u7801\u7F16\u8BD1",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Hipo",email:"0xhipo@gmail.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"zh/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.aa25ac0f.js b/docs/.vuepress/dist/assets/installation.html.614be1d7.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.aa25ac0f.js rename to docs/.vuepress/dist/assets/installation.html.614be1d7.js index 6e6067da7..ad3c6c692 100644 --- a/docs/.vuepress/dist/assets/installation.html.aa25ac0f.js +++ b/docs/.vuepress/dist/assets/installation.html.614be1d7.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as d,c as u,a as e,b as s,w as a,F as p,d as n,e as i}from"./app.07ce7a66.js";const h={},b=e("h2",{id:"installieren-von-web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installieren-von-web3-js","aria-hidden":"true"},"#"),n(" Installieren von Web3.js")],-1),m=e("p",null,"Es gibt einige Bibliotheken, die Sie verwenden k\xF6nnen, um mit Javascript oder Typoskript auf Solana zu beginnen.",-1),g=e("h3",{id:"web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),_={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=e("code",null,"@solana/web3.js",-1),f=n(" ist eine Bibliothek mit vielen grundlegenden Solana-Tools zum Interagieren, Senden von Transaktionen und Lesen aus der Blockchain."),v=e("p",null,"Sie k\xF6nnen Folgendes installieren:",-1),S=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"yarn"),n(),e("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("span",{class:"line-number"},"1"),e("br")])],-1),w=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"npm"),n(),e("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as c,r,o as d,c as u,a as e,b as s,w as a,F as p,d as n,e as i}from"./app.d411e3b3.js";const h={},b=e("h2",{id:"installieren-von-web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#installieren-von-web3-js","aria-hidden":"true"},"#"),n(" Installieren von Web3.js")],-1),m=e("p",null,"Es gibt einige Bibliotheken, die Sie verwenden k\xF6nnen, um mit Javascript oder Typoskript auf Solana zu beginnen.",-1),g=e("h3",{id:"web3-js",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),_={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=e("code",null,"@solana/web3.js",-1),f=n(" ist eine Bibliothek mit vielen grundlegenden Solana-Tools zum Interagieren, Senden von Transaktionen und Lesen aus der Blockchain."),v=e("p",null,"Sie k\xF6nnen Folgendes installieren:",-1),S=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"yarn"),n(),e("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("span",{class:"line-number"},"1"),e("br")])],-1),w=e("div",{class:"language-bash ext-sh line-numbers-mode"},[e("pre",{class:"language-bash"},[e("code",null,[e("span",{class:"token function"},"npm"),n(),e("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),e("div",{class:"line-numbers","aria-hidden":"true"},[e("span",{class:"line-number"},"1"),e("br")])],-1),x=e("div",{class:"language-html ext-html line-numbers-mode"},[e("pre",{class:"language-html"},[e("code",null,[e("span",{class:"token comment"},""),n(` `),e("span",{class:"token tag"},[e("span",{class:"token tag"},[e("span",{class:"token punctuation"},"<"),n("script")]),n(),e("span",{class:"token attr-name"},"src"),e("span",{class:"token attr-value"},[e("span",{class:"token punctuation attr-equals"},"="),e("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),e("span",{class:"token punctuation"},'"')]),e("span",{class:"token punctuation"},">")]),e("span",{class:"token script"}),e("span",{class:"token tag"},[e("span",{class:"token tag"},[e("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.4e98836a.js b/docs/.vuepress/dist/assets/installation.html.6ebc9da6.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.4e98836a.js rename to docs/.vuepress/dist/assets/installation.html.6ebc9da6.js index 5dd5d150b..a75e3c37a 100644 --- a/docs/.vuepress/dist/assets/installation.html.4e98836a.js +++ b/docs/.vuepress/dist/assets/installation.html.6ebc9da6.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as d,c as p,a,b as e,w as n,F as u,d as s,e as l}from"./app.07ce7a66.js";const h={},b=a("h2",{id:"instalacion-de-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#instalacion-de-web3-js","aria-hidden":"true"},"#"),s(" Instalaci\xF3n de Web3.js")],-1),m=a("p",null,[s("Hay pocas librer\xEDas que necesitas para empezar con JavaScript o TypeScript en Solana."),a("br")],-1),_=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://github.com/solana-labs/solana-web3.js",target:"_blank",rel:"noopener noreferrer"},k=s("@solana/web3.js"),v=s(" es una librer\xEDa que tiene todas las herramientas b\xE1sicas para interactuar con Solana, enviar transacciones, y leer desde la blockchain."),f=a("p",null,"Lo puedes instalar con algunos de los siguientes comandos:",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),s(),a("span",{class:"token function"},"add"),s(` @solana/web3.js -`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),S=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),s(),a("span",{class:"token function"},"install"),s(` --save @solana/web3.js +import{_ as c,r,o as d,c as p,a,b as e,w as n,F as u,d as s,e as l}from"./app.d411e3b3.js";const h={},b=a("h2",{id:"instalacion-de-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#instalacion-de-web3-js","aria-hidden":"true"},"#"),s(" Instalaci\xF3n de Web3.js")],-1),m=a("p",null,[s("Hay pocas librer\xEDas que necesitas para empezar con JavaScript o TypeScript en Solana."),a("br")],-1),_=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://github.com/solana-labs/solana-web3.js",target:"_blank",rel:"noopener noreferrer"},k=s("@solana/web3.js"),v=s(" es una librer\xEDa que tiene todas las herramientas b\xE1sicas para interactuar con Solana, enviar transacciones, y leer desde la blockchain."),f=a("p",null,"Lo puedes instalar con algunos de los siguientes comandos:",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),s(),a("span",{class:"token function"},"add"),s(` @solana/web3.js@1 +`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),S=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),s(),a("span",{class:"token function"},"install"),s(` --save @solana/web3.js@1 `)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-html ext-html line-numbers-mode"},[a("pre",{class:"language-html"},[a("code",null,[a("span",{class:"token comment"},""),s(` `),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"<"),s("script")]),s(),a("span",{class:"token attr-name"},"src"),a("span",{class:"token attr-value"},[a("span",{class:"token punctuation attr-equals"},"="),a("span",{class:"token punctuation"},'"'),s("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),a("span",{class:"token punctuation"},'"')]),a("span",{class:"token punctuation"},">")]),a("span",{class:"token script"}),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"")]),s(` diff --git a/docs/.vuepress/dist/assets/installation.html.98badae7.js b/docs/.vuepress/dist/assets/installation.html.715b3b99.js similarity index 84% rename from docs/.vuepress/dist/assets/installation.html.98badae7.js rename to docs/.vuepress/dist/assets/installation.html.715b3b99.js index c662b4435..53d3b63f8 100644 --- a/docs/.vuepress/dist/assets/installation.html.98badae7.js +++ b/docs/.vuepress/dist/assets/installation.html.715b3b99.js @@ -1 +1 @@ -const e={key:"v-2485abf3",path:"/de/getting-started/installation.html",title:"Installation",lang:"de-DE",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Kochbuch | Installation"}],["meta",{name:"og:title",content:"Solana Kochbuch | Installation"}],["meta",{name:"description",content:"Erfahren Sie anhand von Tutorials, Leitf\xE4den und Beispielen, wie Sie mit Solana beginnen."}],["meta",{name:"og:description",content:"Erfahren Sie anhand von Tutorials, Leitf\xE4den und Beispielen, wie Sie mit Solana beginnen."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Installieren von Web3.js",slug:"installieren-von-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Aus Quelle erstellen",slug:"aus-quelle-erstellen",children:[]}]}],git:{updatedTime:1672345621e3,contributors:[{name:"nyk",email:"93952610+0xNyk@users.noreply.github.com",commits:1}]},filePathRelative:"de/getting-started/installation.md"};export{e as data}; +const e={key:"v-2485abf3",path:"/de/getting-started/installation.html",title:"Installation",lang:"de-DE",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Kochbuch | Installation"}],["meta",{name:"og:title",content:"Solana Kochbuch | Installation"}],["meta",{name:"description",content:"Erfahren Sie anhand von Tutorials, Leitf\xE4den und Beispielen, wie Sie mit Solana beginnen."}],["meta",{name:"og:description",content:"Erfahren Sie anhand von Tutorials, Leitf\xE4den und Beispielen, wie Sie mit Solana beginnen."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Installieren von Web3.js",slug:"installieren-von-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Aus Quelle erstellen",slug:"aus-quelle-erstellen",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"nyk",email:"93952610+0xNyk@users.noreply.github.com",commits:1}]},filePathRelative:"de/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.3865f03a.js b/docs/.vuepress/dist/assets/installation.html.7f31ac87.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.3865f03a.js rename to docs/.vuepress/dist/assets/installation.html.7f31ac87.js index 30146427e..485bbec75 100644 --- a/docs/.vuepress/dist/assets/installation.html.3865f03a.js +++ b/docs/.vuepress/dist/assets/installation.html.7f31ac87.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as d,c as p,a,b as e,w as n,F as u,d as s,e as l}from"./app.07ce7a66.js";const m={},b=a("h2",{id:"instale-o-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#instale-o-web3-js","aria-hidden":"true"},"#"),s(" Instale o Web3.js")],-1),h=a("p",null,[s("Existem algumas bibliotecas que voc\xEA pode usar para come\xE7ar com JavaScript ou TypeScript na Solana."),a("br")],-1),_=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},v=a("code",null,"@solana/web3.js",-1),k=s(" \xE9 uma biblioteca que cont\xE9m muitas das ferramentas b\xE1sicas da Solana para interagir, enviar transa\xE7\xF5es e ler dados da blockchain."),f=a("p",null,"Voc\xEA pode instalar esta biblioteca com o seguinte comando:",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),s(),a("span",{class:"token function"},"add"),s(` @solana/web3.js -`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),s(),a("span",{class:"token function"},"install"),s(` --save @solana/web3.js +import{_ as c,r,o as d,c as p,a,b as e,w as n,F as u,d as s,e as l}from"./app.d411e3b3.js";const m={},b=a("h2",{id:"instale-o-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#instale-o-web3-js","aria-hidden":"true"},"#"),s(" Instale o Web3.js")],-1),h=a("p",null,[s("Existem algumas bibliotecas que voc\xEA pode usar para come\xE7ar com JavaScript ou TypeScript na Solana."),a("br")],-1),_=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},v=a("code",null,"@solana/web3.js",-1),k=s(" \xE9 uma biblioteca que cont\xE9m muitas das ferramentas b\xE1sicas da Solana para interagir, enviar transa\xE7\xF5es e ler dados da blockchain."),f=a("p",null,"Voc\xEA pode instalar esta biblioteca com o seguinte comando:",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),s(),a("span",{class:"token function"},"add"),s(` @solana/web3.js@1 +`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),s(),a("span",{class:"token function"},"install"),s(` --save @solana/web3.js@1 `)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),S=a("div",{class:"language-html ext-html line-numbers-mode"},[a("pre",{class:"language-html"},[a("code",null,[a("span",{class:"token comment"},""),s(` `),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"<"),s("script")]),s(),a("span",{class:"token attr-name"},"src"),a("span",{class:"token attr-value"},[a("span",{class:"token punctuation attr-equals"},"="),a("span",{class:"token punctuation"},'"'),s("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),a("span",{class:"token punctuation"},'"')]),a("span",{class:"token punctuation"},">")]),a("span",{class:"token script"}),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"")]),s(` diff --git a/docs/.vuepress/dist/assets/installation.html.447c9172.js b/docs/.vuepress/dist/assets/installation.html.9592faa3.js similarity index 81% rename from docs/.vuepress/dist/assets/installation.html.447c9172.js rename to docs/.vuepress/dist/assets/installation.html.9592faa3.js index 82ac6766f..77858c632 100644 --- a/docs/.vuepress/dist/assets/installation.html.447c9172.js +++ b/docs/.vuepress/dist/assets/installation.html.9592faa3.js @@ -1 +1 @@ -const a={key:"v-02e9060d",path:"/id/getting-started/installation.html",title:"Instalasi",lang:"id-ID",frontmatter:{title:"Instalasi",head:[["meta",{name:"title",content:"Buku Panduan Solana | Instalasi"}],["meta",{name:"og:title",content:"Buku Panduan Solana | Instalasi"}],["meta",{name:"description",content:"Belajar bagaimana memulai mengembangkan aplikasi di Solana dengan beragam tutorial, panduan dan contoh-contoh."}],["meta",{name:"og:description",content:"Belajar bagaimana memulai mengembangkan aplikasi di Solana dengan beragam tutorial, panduan dan contoh-contoh."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Unduh Web3.js",slug:"unduh-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Membangun dari Source",slug:"membangun-dari-source",children:[]}]}],git:{updatedTime:1663636948e3,contributors:[{name:"akangaziz",email:"aziz@okadoc.com",commits:1}]},filePathRelative:"id/getting-started/installation.md"};export{a as data}; +const e={key:"v-02e9060d",path:"/id/getting-started/installation.html",title:"Instalasi",lang:"id-ID",frontmatter:{title:"Instalasi",head:[["meta",{name:"title",content:"Buku Panduan Solana | Instalasi"}],["meta",{name:"og:title",content:"Buku Panduan Solana | Instalasi"}],["meta",{name:"description",content:"Belajar bagaimana memulai mengembangkan aplikasi di Solana dengan beragam tutorial, panduan dan contoh-contoh."}],["meta",{name:"og:description",content:"Belajar bagaimana memulai mengembangkan aplikasi di Solana dengan beragam tutorial, panduan dan contoh-contoh."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Unduh Web3.js",slug:"unduh-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Membangun dari Source",slug:"membangun-dari-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"akangaziz",email:"aziz@okadoc.com",commits:1}]},filePathRelative:"id/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.9dc89678.js b/docs/.vuepress/dist/assets/installation.html.9991e5f0.js similarity index 85% rename from docs/.vuepress/dist/assets/installation.html.9dc89678.js rename to docs/.vuepress/dist/assets/installation.html.9991e5f0.js index c4ffa73a8..b2cf18261 100644 --- a/docs/.vuepress/dist/assets/installation.html.9dc89678.js +++ b/docs/.vuepress/dist/assets/installation.html.9991e5f0.js @@ -1 +1 @@ -const t={key:"v-e97c194e",path:"/kr/getting-started/installation.html",title:"Installation",lang:"kr-KR",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1672765954e3,contributors:[{name:"TaeGit",email:"tgsong827@gmail.com",commits:1}]},filePathRelative:"kr/getting-started/installation.md"};export{t as data}; +const t={key:"v-e97c194e",path:"/kr/getting-started/installation.html",title:"Installation",lang:"kr-KR",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"TaeGit",email:"tgsong827@gmail.com",commits:1}]},filePathRelative:"kr/getting-started/installation.md"};export{t as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.7b74d3ce.js b/docs/.vuepress/dist/assets/installation.html.9b358507.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.7b74d3ce.js rename to docs/.vuepress/dist/assets/installation.html.9b358507.js index 72eff8d49..8e1c4ccc5 100644 --- a/docs/.vuepress/dist/assets/installation.html.7b74d3ce.js +++ b/docs/.vuepress/dist/assets/installation.html.9b358507.js @@ -1,5 +1,5 @@ -import{_ as r,r as c,o as p,c as h,a as n,b as a,w as e,F as u,d as s,e as o}from"./app.07ce7a66.js";const d={},b=n("h2",{id:"cai-\u0111at-web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cai-\u0111at-web3-js","aria-hidden":"true"},"#"),s(" C\xE0i \u0111\u1EB7t Web3.js")],-1),m=n("p",null,[s("C\xF3 r\u1EA5t nhi\u1EC1u th\u01B0 vi\u1EC7n Javascript ho\u1EB7c Typescript b\u1EA1n c\xF3 th\u1EC3 d\xF9ng \u0111\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi Solana."),n("br")],-1),_=n("h3",{id:"web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=n("code",null,"@solana/web3.js",-1),v=s(" l\xE0 m\u1ED9t th\u01B0 vi\u1EC7n ph\u1ED5 bi\u1EBFn v\xE0 h\u1ED7 tr\u1EE3 nhi\u1EC1u c\xF4ng c\u1EE5 thi\u1EBFt y\u1EBFu cho vi\u1EC7c l\u1EADp tr\xECnh tr\xEAn Solana. V\xED d\u1EE5 nh\u01B0 \u0111\u1ECDc d\u1EEF li\u1EC7u t\u1EEB blockchain, k\xED giao d\u1ECBch, g\u1EEDi giao d\u1ECBch."),f=n("p",null,"B\u1EA1n c\xF3 th\u1EC3 c\xE0i \u0111\u1EB7t th\xF4ng qua c\xE1c b\u01B0\u1EDBc sau:",-1),x=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"yarn"),s(),n("span",{class:"token function"},"add"),s(` @solana/web3.js -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"npm"),s(),n("span",{class:"token function"},"install"),s(` --save @solana/web3.js +import{_ as r,r as c,o as p,c as h,a as n,b as a,w as e,F as u,d as s,e as o}from"./app.d411e3b3.js";const d={},b=n("h2",{id:"cai-\u0111at-web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cai-\u0111at-web3-js","aria-hidden":"true"},"#"),s(" C\xE0i \u0111\u1EB7t Web3.js")],-1),m=n("p",null,[s("C\xF3 r\u1EA5t nhi\u1EC1u th\u01B0 vi\u1EC7n Javascript ho\u1EB7c Typescript b\u1EA1n c\xF3 th\u1EC3 d\xF9ng \u0111\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi Solana."),n("br")],-1),_=n("h3",{id:"web3-js",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),s(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=n("code",null,"@solana/web3.js",-1),v=s(" l\xE0 m\u1ED9t th\u01B0 vi\u1EC7n ph\u1ED5 bi\u1EBFn v\xE0 h\u1ED7 tr\u1EE3 nhi\u1EC1u c\xF4ng c\u1EE5 thi\u1EBFt y\u1EBFu cho vi\u1EC7c l\u1EADp tr\xECnh tr\xEAn Solana. V\xED d\u1EE5 nh\u01B0 \u0111\u1ECDc d\u1EEF li\u1EC7u t\u1EEB blockchain, k\xED giao d\u1ECBch, g\u1EEDi giao d\u1ECBch."),f=n("p",null,"B\u1EA1n c\xF3 th\u1EC3 c\xE0i \u0111\u1EB7t th\xF4ng qua c\xE1c b\u01B0\u1EDBc sau:",-1),x=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"yarn"),s(),n("span",{class:"token function"},"add"),s(` @solana/web3.js@1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token function"},"npm"),s(),n("span",{class:"token function"},"install"),s(` --save @solana/web3.js@1 `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),T=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token comment"},""),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),s(),n("span",{class:"token attr-name"},"src"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),s("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"}),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` diff --git a/docs/.vuepress/dist/assets/installation.html.a516e599.js b/docs/.vuepress/dist/assets/installation.html.a11f9bd6.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.a516e599.js rename to docs/.vuepress/dist/assets/installation.html.a11f9bd6.js index fd9373d35..483be9d3b 100644 --- a/docs/.vuepress/dist/assets/installation.html.a516e599.js +++ b/docs/.vuepress/dist/assets/installation.html.a11f9bd6.js @@ -1,5 +1,5 @@ -import{_ as r,r as i,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.07ce7a66.js";const h={},b=s("h2",{id:"\u5B89\u88DDweb3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u5B89\u88DDweb3-js","aria-hidden":"true"},"#"),n(" \u5B89\u88DDWeb3.js")],-1),_=s("p",null,"\u7528JavaScript\u6216\u8005TypeScript\u9032\u884CSolana\u7DE8\u7A0B\u6642\uFF0C\u4F60\u6703\u7528\u5230\u4E0B\u9762\u7684\u5E7E\u500B\u5EAB\u3002",-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n(" \u9019\u500B\u5EAB\u63D0\u4F9B\u4E86\u5F88\u591A\u7528\u65BC\u8207Solana\u4EA4\u4E92\uFF0C\u767C\u9001\u4EA4\u6613\uFF0C\u5F9E\u5340\u584A\u93C8\u4E0A\u8B80\u53D6\u6578\u64DA\u7B49\u64CD\u4F5C\u7684\u57FA\u790E\u529F\u80FD\u3002"),f=s("p",null,"\u53EF\u4EE5\u7528\u4EE5\u4E0B\u547D\u4EE4\u5B89\u88DD\uFF1A",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as r,r as i,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.d411e3b3.js";const h={},b=s("h2",{id:"\u5B89\u88DDweb3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u5B89\u88DDweb3-js","aria-hidden":"true"},"#"),n(" \u5B89\u88DDWeb3.js")],-1),_=s("p",null,"\u7528JavaScript\u6216\u8005TypeScript\u9032\u884CSolana\u7DE8\u7A0B\u6642\uFF0C\u4F60\u6703\u7528\u5230\u4E0B\u9762\u7684\u5E7E\u500B\u5EAB\u3002",-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n(" \u9019\u500B\u5EAB\u63D0\u4F9B\u4E86\u5F88\u591A\u7528\u65BC\u8207Solana\u4EA4\u4E92\uFF0C\u767C\u9001\u4EA4\u6613\uFF0C\u5F9E\u5340\u584A\u93C8\u4E0A\u8B80\u53D6\u6578\u64DA\u7B49\u64CD\u4F5C\u7684\u57FA\u790E\u529F\u80FD\u3002"),f=s("p",null,"\u53EF\u4EE5\u7528\u4EE5\u4E0B\u547D\u4EE4\u5B89\u88DD\uFF1A",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),S=s("div",{class:"language-html ext-html line-numbers-mode"},[s("pre",{class:"language-html"},[s("code",null,[s("span",{class:"token comment"},""),n(` `),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"<"),n("script")]),n(),s("span",{class:"token attr-name"},"src"),s("span",{class:"token attr-value"},[s("span",{class:"token punctuation attr-equals"},"="),s("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),s("span",{class:"token punctuation"},'"')]),s("span",{class:"token punctuation"},">")]),s("span",{class:"token script"}),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.dad10efa.js b/docs/.vuepress/dist/assets/installation.html.a97a7fb2.js similarity index 65% rename from docs/.vuepress/dist/assets/installation.html.dad10efa.js rename to docs/.vuepress/dist/assets/installation.html.a97a7fb2.js index 854d9e6ff..9629cec03 100644 --- a/docs/.vuepress/dist/assets/installation.html.dad10efa.js +++ b/docs/.vuepress/dist/assets/installation.html.a97a7fb2.js @@ -1 +1 @@ -const e={key:"v-4e8563af",path:"/getting-started/installation.html",title:"Installation",lang:"en-US",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1687272247e3,contributors:[{name:"mayben",email:"amedlisen67+1@gmail.com",commits:2},{name:"Brian Friel",email:"briandfriel@gmail.com",commits:1},{name:"Hipo",email:"0xhipo@gmail.com",commits:1},{name:"Jacob CG",email:"82475023+Jacob-CG@users.noreply.github.com",commits:1},{name:"Jacob Creech",email:"jacob.creech@solana.com",commits:1},{name:"Ayush",email:"Ayush-15@live.com",commits:1},{name:"Lukmon Abdulsalam",email:"40471908+litmus-zhang@users.noreply.github.com",commits:1},{name:"Silvestre Vivo",email:"silvestrevivomillan@gmail.com",commits:1},{name:"Thomas H",email:"t.hanna3332@gmail.com",commits:1},{name:"dtlehrer",email:"dtlehrer@csbsju.edu",commits:1},{name:"Jonas Hahn",email:"Herzock@web.de",commits:1}]},filePathRelative:"getting-started/installation.md"};export{e as data}; +const e={key:"v-4e8563af",path:"/getting-started/installation.html",title:"Installation",lang:"en-US",frontmatter:{title:"Installation",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"mayben",email:"amedlisen67+1@gmail.com",commits:2},{name:"Ayush",email:"Ayush-15@live.com",commits:1},{name:"Brian Friel",email:"briandfriel@gmail.com",commits:1},{name:"Hipo",email:"0xhipo@gmail.com",commits:1},{name:"Jacob CG",email:"82475023+Jacob-CG@users.noreply.github.com",commits:1},{name:"Jacob Creech",email:"jacob.creech@solana.com",commits:1},{name:"Jonas Hahn",email:"Herzock@web.de",commits:1},{name:"Lukmon Abdulsalam",email:"40471908+litmus-zhang@users.noreply.github.com",commits:1},{name:"Silvestre Vivo",email:"silvestrevivomillan@gmail.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"Thomas H",email:"t.hanna3332@gmail.com",commits:1},{name:"dtlehrer",email:"dtlehrer@csbsju.edu",commits:1}]},filePathRelative:"getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.75866756.js b/docs/.vuepress/dist/assets/installation.html.aa2d111c.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.75866756.js rename to docs/.vuepress/dist/assets/installation.html.aa2d111c.js index 2dd9504ce..3787cc99c 100644 --- a/docs/.vuepress/dist/assets/installation.html.75866756.js +++ b/docs/.vuepress/dist/assets/installation.html.aa2d111c.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as p,c as u,a,b as s,w as e,F as g,d as n,e as o}from"./app.07ce7a66.js";const d={},m=a("h2",{id:"i-install-ang-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#i-install-ang-web3-js","aria-hidden":"true"},"#"),n(" I-install ang Web3.js")],-1),h=a("p",null,"Mayroong ilang mga library na magagamit mo upang makapagsimula sa javascript o typescript sa Solana.",-1),b=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),_=n("Ang "),k={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},v=a("code",null,"@solana/web3.js",-1),f=n(" ay isang library na mayroong maraming pangunahing tool sa Solana para makipag-ugnayan, magpadala ng mga transaksyon, at magbasa mula sa blockchain."),y=a("p",null,"Maaari mong i-install gamit ang sumusunod:",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),n(),a("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),n(),a("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as c,r,o as p,c as u,a,b as s,w as e,F as g,d as n,e as o}from"./app.d411e3b3.js";const d={},m=a("h2",{id:"i-install-ang-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#i-install-ang-web3-js","aria-hidden":"true"},"#"),n(" I-install ang Web3.js")],-1),h=a("p",null,"Mayroong ilang mga library na magagamit mo upang makapagsimula sa javascript o typescript sa Solana.",-1),b=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),_=n("Ang "),k={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},v=a("code",null,"@solana/web3.js",-1),f=n(" ay isang library na mayroong maraming pangunahing tool sa Solana para makipag-ugnayan, magpadala ng mga transaksyon, at magbasa mula sa blockchain."),y=a("p",null,"Maaari mong i-install gamit ang sumusunod:",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),n(),a("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),n(),a("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),S=a("div",{class:"language-html ext-html line-numbers-mode"},[a("pre",{class:"language-html"},[a("code",null,[a("span",{class:"token comment"},""),n(` `),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"<"),n("script")]),n(),a("span",{class:"token attr-name"},"src"),a("span",{class:"token attr-value"},[a("span",{class:"token punctuation attr-equals"},"="),a("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),a("span",{class:"token punctuation"},'"')]),a("span",{class:"token punctuation"},">")]),a("span",{class:"token script"}),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.cff7de51.js b/docs/.vuepress/dist/assets/installation.html.b29e3de7.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.cff7de51.js rename to docs/.vuepress/dist/assets/installation.html.b29e3de7.js index 78049db05..d0527403f 100644 --- a/docs/.vuepress/dist/assets/installation.html.cff7de51.js +++ b/docs/.vuepress/dist/assets/installation.html.b29e3de7.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as u,c as d,a,b as s,w as e,F as p,d as n,e as i}from"./app.07ce7a66.js";const b={},m=a("h2",{id:"install-web3-js-web3-js-kurulumu",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#install-web3-js-web3-js-kurulumu","aria-hidden":"true"},"#"),n(" Install Web3.js (Web3.js Kurulumu)")],-1),h=a("p",null,[n("Solana'da Javascript veya TypeScript kullanmaya ba\u015Flamak i\xE7in birka\xE7 k\xFCt\xFCphane bulunur."),a("br")],-1),k=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),_={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},g=a("code",null,"@solana/web3.js",-1),v=n(" etkile\u015Fim kurmak, i\u015Flem g\xF6ndermek ve blok zincirinden bilgi okumak i\xE7in bir\xE7ok temel Solana arac\u0131na sahip bir k\xFCt\xFCphanedir."),y=a("p",null,"A\u015Fa\u011F\u0131daki kod sat\u0131r\u0131 ile bu k\xFCt\xFCphaneyi kurabilirsiniz:",-1),f=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),n(),a("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),n(),a("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as c,r,o as u,c as d,a,b as s,w as e,F as p,d as n,e as i}from"./app.d411e3b3.js";const b={},m=a("h2",{id:"install-web3-js-web3-js-kurulumu",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#install-web3-js-web3-js-kurulumu","aria-hidden":"true"},"#"),n(" Install Web3.js (Web3.js Kurulumu)")],-1),h=a("p",null,[n("Solana'da Javascript veya TypeScript kullanmaya ba\u015Flamak i\xE7in birka\xE7 k\xFCt\xFCphane bulunur."),a("br")],-1),k=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),_={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},g=a("code",null,"@solana/web3.js",-1),v=n(" etkile\u015Fim kurmak, i\u015Flem g\xF6ndermek ve blok zincirinden bilgi okumak i\xE7in bir\xE7ok temel Solana arac\u0131na sahip bir k\xFCt\xFCphanedir."),y=a("p",null,"A\u015Fa\u011F\u0131daki kod sat\u0131r\u0131 ile bu k\xFCt\xFCphaneyi kurabilirsiniz:",-1),f=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),n(),a("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),n(),a("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),z=a("div",{class:"language-html ext-html line-numbers-mode"},[a("pre",{class:"language-html"},[a("code",null,[a("span",{class:"token comment"},""),n(` `),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"<"),n("script")]),n(),a("span",{class:"token attr-name"},"src"),a("span",{class:"token attr-value"},[a("span",{class:"token punctuation attr-equals"},"="),a("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),a("span",{class:"token punctuation"},'"')]),a("span",{class:"token punctuation"},">")]),a("span",{class:"token script"}),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.0539cd42.js b/docs/.vuepress/dist/assets/installation.html.b85f5579.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.0539cd42.js rename to docs/.vuepress/dist/assets/installation.html.b85f5579.js index 9d2b67e9f..ee2f82f5b 100644 --- a/docs/.vuepress/dist/assets/installation.html.0539cd42.js +++ b/docs/.vuepress/dist/assets/installation.html.b85f5579.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.07ce7a66.js";const h={},b=s("h2",{id:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js","aria-hidden":"true"},"#"),n(" \u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Web3.js")],-1),_=s("p",null,[n("\u0E08\u0E30\u0E21\u0E35 libraries \u0E1A\u0E32\u0E07\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E21\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E02\u0E35\u0E22\u0E19 javascript \u0E2B\u0E23\u0E37\u0E2D typescript \u0E1A\u0E19 Solana."),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n(" \u0E04\u0E37\u0E2D library \u0E17\u0E35\u0E48\u0E21\u0E35\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E1E\u0E37\u0E49\u0E19\u0E10\u0E32\u0E19\u0E21\u0E32\u0E01\u0E21\u0E32\u0E22\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19\u0E40\u0E1A\u0E37\u0E49\u0E2D\u0E07\u0E15\u0E49\u0E19, \u0E2A\u0E48\u0E07 transactions, \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E2D\u0E48\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E32\u0E01 blockchain."),f=s("p",null,"\u0E04\u0E38\u0E13\u0E2A\u0E32\u0E21\u0E32\u0E16\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E44\u0E14\u0E49\u0E15\u0E32\u0E21\u0E19\u0E35\u0E49:",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as c,r,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.d411e3b3.js";const h={},b=s("h2",{id:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js","aria-hidden":"true"},"#"),n(" \u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Web3.js")],-1),_=s("p",null,[n("\u0E08\u0E30\u0E21\u0E35 libraries \u0E1A\u0E32\u0E07\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E04\u0E38\u0E13\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E21\u0E31\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E40\u0E02\u0E35\u0E22\u0E19 javascript \u0E2B\u0E23\u0E37\u0E2D typescript \u0E1A\u0E19 Solana."),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n(" \u0E04\u0E37\u0E2D library \u0E17\u0E35\u0E48\u0E21\u0E35\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E21\u0E37\u0E2D\u0E1E\u0E37\u0E49\u0E19\u0E10\u0E32\u0E19\u0E21\u0E32\u0E01\u0E21\u0E32\u0E22\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19\u0E40\u0E1A\u0E37\u0E49\u0E2D\u0E07\u0E15\u0E49\u0E19, \u0E2A\u0E48\u0E07 transactions, \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E2D\u0E48\u0E32\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E08\u0E32\u0E01 blockchain."),f=s("p",null,"\u0E04\u0E38\u0E13\u0E2A\u0E32\u0E21\u0E32\u0E16\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E44\u0E14\u0E49\u0E15\u0E32\u0E21\u0E19\u0E35\u0E49:",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),S=s("div",{class:"language-html ext-html line-numbers-mode"},[s("pre",{class:"language-html"},[s("code",null,[s("span",{class:"token comment"},""),n(` `),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"<"),n("script")]),n(),s("span",{class:"token attr-name"},"src"),s("span",{class:"token attr-value"},[s("span",{class:"token punctuation attr-equals"},"="),s("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),s("span",{class:"token punctuation"},'"')]),s("span",{class:"token punctuation"},">")]),s("span",{class:"token script"}),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.33a0283b.js b/docs/.vuepress/dist/assets/installation.html.d67ac4ef.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.33a0283b.js rename to docs/.vuepress/dist/assets/installation.html.d67ac4ef.js index 68f5a0e65..40d1b6dcf 100644 --- a/docs/.vuepress/dist/assets/installation.html.33a0283b.js +++ b/docs/.vuepress/dist/assets/installation.html.d67ac4ef.js @@ -1,5 +1,5 @@ -import{_ as r,r as c,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.07ce7a66.js";const h={},b=s("h2",{id:"install-web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#install-web3-js","aria-hidden":"true"},"#"),n(" Install Web3.js")],-1),_=s("p",null,[n("Solana\uC5D0\uB294 javascript\uC640 typescript\uB85C \uC2DC\uC791\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uBA87 \uAC00\uC9C0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4."),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n("\uB294 \uD1B5\uC2E0\uD558\uACE0, Transaction\uB4E4\uC744 \uBCF4\uB0B4\uACE0, Blockchain\uC73C\uB85C\uBD80\uD130 \uC77D\uAE30 \uC704\uD55C \uAE30\uBCF8\uC801\uC778 Solana \uB3C4\uAD6C\uB4E4\uC774 \uB9CE\uC774 \uC788\uB294 \uB77C\uC774\uBE0C\uB7EC\uB9AC \uC785\uB2C8\uB2E4."),f=s("p",null,"\uC544\uB798\uC640 \uAC19\uC774 \uC124\uCE58\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as r,r as c,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.d411e3b3.js";const h={},b=s("h2",{id:"install-web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#install-web3-js","aria-hidden":"true"},"#"),n(" Install Web3.js")],-1),_=s("p",null,[n("Solana\uC5D0\uB294 javascript\uC640 typescript\uB85C \uC2DC\uC791\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uBA87 \uAC00\uC9C0 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4."),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n("\uB294 \uD1B5\uC2E0\uD558\uACE0, Transaction\uB4E4\uC744 \uBCF4\uB0B4\uACE0, Blockchain\uC73C\uB85C\uBD80\uD130 \uC77D\uAE30 \uC704\uD55C \uAE30\uBCF8\uC801\uC778 Solana \uB3C4\uAD6C\uB4E4\uC774 \uB9CE\uC774 \uC788\uB294 \uB77C\uC774\uBE0C\uB7EC\uB9AC \uC785\uB2C8\uB2E4."),f=s("p",null,"\uC544\uB798\uC640 \uAC19\uC774 \uC124\uCE58\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),S=s("div",{class:"language-html ext-html line-numbers-mode"},[s("pre",{class:"language-html"},[s("code",null,[s("span",{class:"token comment"},""),n(` `),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"<"),n("script")]),n(),s("span",{class:"token attr-name"},"src"),s("span",{class:"token attr-value"},[s("span",{class:"token punctuation attr-equals"},"="),s("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),s("span",{class:"token punctuation"},'"')]),s("span",{class:"token punctuation"},">")]),s("span",{class:"token script"}),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.2e4550cf.js b/docs/.vuepress/dist/assets/installation.html.de1947ca.js similarity index 88% rename from docs/.vuepress/dist/assets/installation.html.2e4550cf.js rename to docs/.vuepress/dist/assets/installation.html.de1947ca.js index 440fc8971..baebabca1 100644 --- a/docs/.vuepress/dist/assets/installation.html.2e4550cf.js +++ b/docs/.vuepress/dist/assets/installation.html.de1947ca.js @@ -1 +1 @@ -const t={key:"v-429dff29",path:"/ja/getting-started/installation.html",title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",lang:"ja-JP",frontmatter:{title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1682188031e3,contributors:[{name:"PokoPoko2ry",email:"40916036+PokoPoko2ry@users.noreply.github.com",commits:1}]},filePathRelative:"ja/getting-started/installation.md"};export{t as data}; +const t={key:"v-429dff29",path:"/ja/getting-started/installation.html",title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",lang:"ja-JP",frontmatter:{title:"\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB",head:[["meta",{name:"title",content:"Solana Cookbook | Installation"}],["meta",{name:"og:title",content:"Solana Cookbook | Installation"}],["meta",{name:"description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:description",content:"Learn how to get started on Solana with tutorials, guides, and examples."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Install Web3.js",slug:"install-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Install Rust",slug:"install-rust",children:[]},{level:2,title:"Install CLI",slug:"install-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"PokoPoko2ry",email:"40916036+PokoPoko2ry@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"ja/getting-started/installation.md"};export{t as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.04bddf91.js b/docs/.vuepress/dist/assets/installation.html.e9fcf7ff.js similarity index 89% rename from docs/.vuepress/dist/assets/installation.html.04bddf91.js rename to docs/.vuepress/dist/assets/installation.html.e9fcf7ff.js index e3711b726..12d810aa0 100644 --- a/docs/.vuepress/dist/assets/installation.html.04bddf91.js +++ b/docs/.vuepress/dist/assets/installation.html.e9fcf7ff.js @@ -1 +1 @@ -const e={key:"v-c5f91db4",path:"/th/getting-started/installation.html",title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07",lang:"th-TH",frontmatter:{title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07",head:[["meta",{name:"title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | \u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07"}],["meta",{name:"og:title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | \u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07"}],["meta",{name:"description",content:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49 Solana \u0E14\u0E49\u0E27\u0E22\u0E41\u0E1A\u0E1A\u0E1D\u0E36\u0E01\u0E2B\u0E31\u0E14, \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07 \u0E41\u0E25\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07."}],["meta",{name:"og:description",content:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49 Solana \u0E14\u0E49\u0E27\u0E22\u0E41\u0E1A\u0E1A\u0E1D\u0E36\u0E01\u0E2B\u0E31\u0E14, \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07 \u0E41\u0E25\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Web3.js",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Rust",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-rust",children:[]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1660787553e3,contributors:[{name:"Todsaporn Banjerdkit",email:"katopz@gmail.com",commits:1}]},filePathRelative:"th/getting-started/installation.md"};export{e as data}; +const e={key:"v-c5f91db4",path:"/th/getting-started/installation.html",title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07",lang:"th-TH",frontmatter:{title:"\u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07",head:[["meta",{name:"title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | \u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07"}],["meta",{name:"og:title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | \u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07"}],["meta",{name:"description",content:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49 Solana \u0E14\u0E49\u0E27\u0E22\u0E41\u0E1A\u0E1A\u0E1D\u0E36\u0E01\u0E2B\u0E31\u0E14, \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07 \u0E41\u0E25\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07."}],["meta",{name:"og:description",content:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49 Solana \u0E14\u0E49\u0E27\u0E22\u0E41\u0E1A\u0E1A\u0E1D\u0E36\u0E01\u0E2B\u0E31\u0E14, \u0E41\u0E19\u0E27\u0E17\u0E32\u0E07 \u0E41\u0E25\u0E30\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Web3.js",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 Rust",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-rust",children:[]},{level:2,title:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 CLI",slug:"\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Build From Source",slug:"build-from-source",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"Todsaporn Banjerdkit",email:"katopz@gmail.com",commits:1}]},filePathRelative:"th/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/installation.html.0fd43b03.js b/docs/.vuepress/dist/assets/installation.html.ee5d0d6b.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.0fd43b03.js rename to docs/.vuepress/dist/assets/installation.html.ee5d0d6b.js index 927db0a5c..e3aab274e 100644 --- a/docs/.vuepress/dist/assets/installation.html.0fd43b03.js +++ b/docs/.vuepress/dist/assets/installation.html.ee5d0d6b.js @@ -1,5 +1,5 @@ -import{_ as r,r as i,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.07ce7a66.js";const h={},b=s("h2",{id:"\u5B89\u88C5web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u5B89\u88C5web3-js","aria-hidden":"true"},"#"),n(" \u5B89\u88C5Web3.js")],-1),_=s("p",null,[n("\u7528JavaScript\u6216\u8005TypeScript\u8FDB\u884CSolana\u7F16\u7A0B\u65F6\uFF0C\u4F60\u4F1A\u7528\u5230\u4E0B\u9762\u7684\u51E0\u4E2A\u5E93\u3002"),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n(" \u8FD9\u4E2A\u5E93\u63D0\u4F9B\u4E86\u5F88\u591A\u7528\u4E8E\u4E0ESolana\u4EA4\u4E92\uFF0C\u53D1\u9001\u4EA4\u6613\uFF0C\u4ECE\u533A\u5757\u94FE\u4E0A\u8BFB\u53D6\u6570\u636E\u7B49\u64CD\u4F5C\u7684\u57FA\u7840\u529F\u80FD\u3002"),f=s("p",null,"\u53EF\u4EE5\u7528\u4EE5\u4E0B\u547D\u4EE4\u5B89\u88C5\uFF1A",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as r,r as i,o as p,c as d,a as s,b as a,w as e,F as u,d as n,e as o}from"./app.d411e3b3.js";const h={},b=s("h2",{id:"\u5B89\u88C5web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#\u5B89\u88C5web3-js","aria-hidden":"true"},"#"),n(" \u5B89\u88C5Web3.js")],-1),_=s("p",null,[n("\u7528JavaScript\u6216\u8005TypeScript\u8FDB\u884CSolana\u7F16\u7A0B\u65F6\uFF0C\u4F60\u4F1A\u7528\u5230\u4E0B\u9762\u7684\u51E0\u4E2A\u5E93\u3002"),s("br")],-1),m=s("h3",{id:"web3-js",tabindex:"-1"},[s("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},k=s("code",null,"@solana/web3.js",-1),v=n(" \u8FD9\u4E2A\u5E93\u63D0\u4F9B\u4E86\u5F88\u591A\u7528\u4E8E\u4E0ESolana\u4EA4\u4E92\uFF0C\u53D1\u9001\u4EA4\u6613\uFF0C\u4ECE\u533A\u5757\u94FE\u4E0A\u8BFB\u53D6\u6570\u636E\u7B49\u64CD\u4F5C\u7684\u57FA\u7840\u529F\u80FD\u3002"),f=s("p",null,"\u53EF\u4EE5\u7528\u4EE5\u4E0B\u547D\u4EE4\u5B89\u88C5\uFF1A",-1),x=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"yarn"),n(),s("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),w=s("div",{class:"language-bash ext-sh line-numbers-mode"},[s("pre",{class:"language-bash"},[s("code",null,[s("span",{class:"token function"},"npm"),n(),s("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),s("div",{class:"line-numbers","aria-hidden":"true"},[s("span",{class:"line-number"},"1"),s("br")])],-1),S=s("div",{class:"language-html ext-html line-numbers-mode"},[s("pre",{class:"language-html"},[s("code",null,[s("span",{class:"token comment"},""),n(` `),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"<"),n("script")]),n(),s("span",{class:"token attr-name"},"src"),s("span",{class:"token attr-value"},[s("span",{class:"token punctuation attr-equals"},"="),s("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),s("span",{class:"token punctuation"},'"')]),s("span",{class:"token punctuation"},">")]),s("span",{class:"token script"}),s("span",{class:"token tag"},[s("span",{class:"token tag"},[s("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.aa3edf44.js b/docs/.vuepress/dist/assets/installation.html.f915e5db.js similarity index 99% rename from docs/.vuepress/dist/assets/installation.html.aa3edf44.js rename to docs/.vuepress/dist/assets/installation.html.f915e5db.js index bcf4cd0d7..8f7460e53 100644 --- a/docs/.vuepress/dist/assets/installation.html.aa3edf44.js +++ b/docs/.vuepress/dist/assets/installation.html.f915e5db.js @@ -1,5 +1,5 @@ -import{_ as c,r,o as u,c as d,a,b as s,w as e,F as p,d as n,e as i}from"./app.07ce7a66.js";const h={},b=a("h2",{id:"unduh-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#unduh-web3-js","aria-hidden":"true"},"#"),n(" Unduh Web3.js")],-1),m=a("p",null,[n("Ada beberapa libraries yang bisa anda gunakan, dimulai dengan javascript atau typescript di Solana. "),a("br")],-1),k=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},_=a("code",null,"@solana/web3.js",-1),v=n(" adalah library yang mempunyai banyak fungsi dasar di Solana untuk interaksi, mengirim transaksi, dan membaca dari blockchain."),f=a("p",null,"Anda bisa melakukan instalasi library ini dengan cara berikut :",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),n(),a("span",{class:"token function"},"add"),n(` @solana/web3.js -`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),n(),a("span",{class:"token function"},"install"),n(` --save @solana/web3.js +import{_ as c,r,o as u,c as d,a,b as s,w as e,F as p,d as n,e as i}from"./app.d411e3b3.js";const h={},b=a("h2",{id:"unduh-web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#unduh-web3-js","aria-hidden":"true"},"#"),n(" Unduh Web3.js")],-1),m=a("p",null,[n("Ada beberapa libraries yang bisa anda gunakan, dimulai dengan javascript atau typescript di Solana. "),a("br")],-1),k=a("h3",{id:"web3-js",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#web3-js","aria-hidden":"true"},"#"),n(" Web3.js")],-1),g={href:"https://solana-labs.github.io/solana-web3.js/",target:"_blank",rel:"noopener noreferrer"},_=a("code",null,"@solana/web3.js",-1),v=n(" adalah library yang mempunyai banyak fungsi dasar di Solana untuk interaksi, mengirim transaksi, dan membaca dari blockchain."),f=a("p",null,"Anda bisa melakukan instalasi library ini dengan cara berikut :",-1),x=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"yarn"),n(),a("span",{class:"token function"},"add"),n(` @solana/web3.js@1 +`)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),w=a("div",{class:"language-bash ext-sh line-numbers-mode"},[a("pre",{class:"language-bash"},[a("code",null,[a("span",{class:"token function"},"npm"),n(),a("span",{class:"token function"},"install"),n(` --save @solana/web3.js@1 `)])]),a("div",{class:"line-numbers","aria-hidden":"true"},[a("span",{class:"line-number"},"1"),a("br")])],-1),y=a("div",{class:"language-html ext-html line-numbers-mode"},[a("pre",{class:"language-html"},[a("code",null,[a("span",{class:"token comment"},""),n(` `),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"<"),n("script")]),n(),a("span",{class:"token attr-name"},"src"),a("span",{class:"token attr-value"},[a("span",{class:"token punctuation attr-equals"},"="),a("span",{class:"token punctuation"},'"'),n("https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"),a("span",{class:"token punctuation"},'"')]),a("span",{class:"token punctuation"},">")]),a("span",{class:"token script"}),a("span",{class:"token tag"},[a("span",{class:"token tag"},[a("span",{class:"token punctuation"},"")]),n(` diff --git a/docs/.vuepress/dist/assets/installation.html.5338573c.js b/docs/.vuepress/dist/assets/installation.html.fe3ab544.js similarity index 86% rename from docs/.vuepress/dist/assets/installation.html.5338573c.js rename to docs/.vuepress/dist/assets/installation.html.fe3ab544.js index 40721b1f8..14b31ad69 100644 --- a/docs/.vuepress/dist/assets/installation.html.5338573c.js +++ b/docs/.vuepress/dist/assets/installation.html.fe3ab544.js @@ -1 +1 @@ -const e={key:"v-389f60e0",path:"/es/getting-started/installation.html",title:"Instalaci\xF3n",lang:"es",frontmatter:{title:"Instalaci\xF3n",head:[["meta",{name:"title",content:"Libro de recetas de Solana | Instalaci\xF3n"}],["meta",{name:"og:title",content:"Libro de recetas de Solana | Instalaci\xF3n"}],["meta",{name:"description",content:"Aprend\xE9 como empezar en Solana con tutoriales, gu\xEDas, y ejemplos."}],["meta",{name:"og:description",content:"Aprend\xE9 como empezar en Solana con tutoriales, gu\xEDas, y ejemplos."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Instalaci\xF3n de Web3.js",slug:"instalacion-de-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instalaci\xF3n de Rust",slug:"instalacion-de-rust",children:[]},{level:2,title:"Instalaci\xF3n de CLI",slug:"instalacion-de-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compilaci\xF3n desde el C\xF3digo Fuente",slug:"compilacion-desde-el-codigo-fuente",children:[]}]}],git:{updatedTime:1658783542e3,contributors:[{name:"Marco Ordonez",email:"marco@evolbit.net",commits:2},{name:"Leonardo Galante",email:"lndgalante@gmail.com",commits:1}]},filePathRelative:"es/getting-started/installation.md"};export{e as data}; +const e={key:"v-389f60e0",path:"/es/getting-started/installation.html",title:"Instalaci\xF3n",lang:"es",frontmatter:{title:"Instalaci\xF3n",head:[["meta",{name:"title",content:"Libro de recetas de Solana | Instalaci\xF3n"}],["meta",{name:"og:title",content:"Libro de recetas de Solana | Instalaci\xF3n"}],["meta",{name:"description",content:"Aprend\xE9 como empezar en Solana con tutoriales, gu\xEDas, y ejemplos."}],["meta",{name:"og:description",content:"Aprend\xE9 como empezar en Solana con tutoriales, gu\xEDas, y ejemplos."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Instalaci\xF3n de Web3.js",slug:"instalacion-de-web3-js",children:[{level:3,title:"Web3.js",slug:"web3-js",children:[]},{level:3,title:"SPL-Token",slug:"spl-token",children:[]},{level:3,title:"Wallet-Adapter",slug:"wallet-adapter",children:[]}]},{level:2,title:"Instalaci\xF3n de Rust",slug:"instalacion-de-rust",children:[]},{level:2,title:"Instalaci\xF3n de CLI",slug:"instalacion-de-cli",children:[{level:3,title:"macOS & Linux",slug:"macos-linux",children:[]},{level:3,title:"Windows",slug:"windows",children:[]},{level:3,title:"Compilaci\xF3n desde el C\xF3digo Fuente",slug:"compilacion-desde-el-codigo-fuente",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Marco Ordonez",email:"marco@evolbit.net",commits:2},{name:"Leonardo Galante",email:"lndgalante@gmail.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"es/getting-started/installation.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/interact-with-tokens.html.98196941.js b/docs/.vuepress/dist/assets/interact-with-tokens.html.5ced5824.js similarity index 99% rename from docs/.vuepress/dist/assets/interact-with-tokens.html.98196941.js rename to docs/.vuepress/dist/assets/interact-with-tokens.html.5ced5824.js index 70fd93302..5e223ec86 100644 --- a/docs/.vuepress/dist/assets/interact-with-tokens.html.98196941.js +++ b/docs/.vuepress/dist/assets/interact-with-tokens.html.5ced5824.js @@ -1,4 +1,4 @@ -import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,e as t,d as s}from"./app.07ce7a66.js";const i={},r=t('

    Utilisation de jetons dans des jeux sur Solana

    Les tokens sur Solana peuvent servir \xE0 diverses fins, comme des r\xE9compenses dans les jeux, des incitations ou d'autres applications. Par exemple, vous pouvez cr\xE9er des jetons et les distribuer aux joueurs lorsqu'ils accomplissent des actions sp\xE9cifiques dans le jeu.

    Cr\xE9er, Mint et Br\xFBler des jetons avec Anchor

    Dans ce tutoriel, nous allons cr\xE9er un jeu en utilisant Anchor pour introduire les bases de l'interaction avec le Programme de Jeton (Token Program) de Solana. Le jeu s'articulera autour de quatre actions principales : cr\xE9er une nouvelle adresse de mint pour le jeton, initialiser les comptes des joueurs, r\xE9compenser les joueurs pour avoir vaincu des ennemis et permettre aux joueurs de se soigner en br\xFBlant des jetons.

    Le programme est compos\xE9 de 4 instructions :

    • create_mint - Cette instruction cr\xE9e une nouvelle adresse de mint pour le jeton avec une Adresse D\xE9riv\xE9e de Programme (PDA) en tant qu'autorit\xE9 de mint (mint authority) et cr\xE9e le compte de m\xE9tadonn\xE9es de jeton. Nous ajouterons une contrainte pour que seul un "admin" puisse invoquer cette instruction
    • init_player - Cette instruction initialise un nouveau compte de joueur avec une sant\xE9 de d\xE9part de 100
    • kill_enemy - Cette instruction d\xE9duit 10 points de vie du compte du joueur lorsqu'il "vainc un ennemi" et mint 1 jeton en guise de r\xE9compense pour le joueur
    • heal - Cette instruction permet \xE0 un joueur de br\xFBler un jeton pour r\xE9tablir sa sant\xE9 \xE0 100 %.
    ',6),k=s("Pour une vue d'ensemble de la relation entre les portefeuilles utilisateurs, les adresses de mint de jeton, les comptes de jetons et les comptes de m\xE9tadonn\xE9es de jetons, il est possible d'explorer cette partie de la "),m={href:"https://docs.metaplex.com/programs/token-metadata/overview",target:"_blank",rel:"noopener noreferrer"},b=s("documentation de Metaplex"),d=s("."),y=n("h3",{id:"pour-commencer",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pour-commencer","aria-hidden":"true"},"#"),s(" Pour commencer")],-1),f=n("p",null,"Pour commencer \xE0 cr\xE9er le programme, suivez les \xE9tapes suivantes :",-1),_=s("Visitez le "),g={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},w=s("Solana Playground"),h=s(" et cr\xE9ez un nouveau projet Anchor. Si vous \xEAtes nouveau sur Solana Playground, vous devrez \xE9galement cr\xE9er un portefeuille Playground."),v=t(`

    Apr\xE8s avoir cr\xE9\xE9 un nouveau projet, remplacez le code par d\xE9faut par le code ci-dessous :

    use anchor_lang::prelude::*;
    +import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,e as t,d as s}from"./app.d411e3b3.js";const i={},r=t('

    Utilisation de jetons dans des jeux sur Solana

    Les tokens sur Solana peuvent servir \xE0 diverses fins, comme des r\xE9compenses dans les jeux, des incitations ou d'autres applications. Par exemple, vous pouvez cr\xE9er des jetons et les distribuer aux joueurs lorsqu'ils accomplissent des actions sp\xE9cifiques dans le jeu.

    Cr\xE9er, Mint et Br\xFBler des jetons avec Anchor

    Dans ce tutoriel, nous allons cr\xE9er un jeu en utilisant Anchor pour introduire les bases de l'interaction avec le Programme de Jeton (Token Program) de Solana. Le jeu s'articulera autour de quatre actions principales : cr\xE9er une nouvelle adresse de mint pour le jeton, initialiser les comptes des joueurs, r\xE9compenser les joueurs pour avoir vaincu des ennemis et permettre aux joueurs de se soigner en br\xFBlant des jetons.

    Le programme est compos\xE9 de 4 instructions :

    • create_mint - Cette instruction cr\xE9e une nouvelle adresse de mint pour le jeton avec une Adresse D\xE9riv\xE9e de Programme (PDA) en tant qu'autorit\xE9 de mint (mint authority) et cr\xE9e le compte de m\xE9tadonn\xE9es de jeton. Nous ajouterons une contrainte pour que seul un "admin" puisse invoquer cette instruction
    • init_player - Cette instruction initialise un nouveau compte de joueur avec une sant\xE9 de d\xE9part de 100
    • kill_enemy - Cette instruction d\xE9duit 10 points de vie du compte du joueur lorsqu'il "vainc un ennemi" et mint 1 jeton en guise de r\xE9compense pour le joueur
    • heal - Cette instruction permet \xE0 un joueur de br\xFBler un jeton pour r\xE9tablir sa sant\xE9 \xE0 100 %.
    ',6),k=s("Pour une vue d'ensemble de la relation entre les portefeuilles utilisateurs, les adresses de mint de jeton, les comptes de jetons et les comptes de m\xE9tadonn\xE9es de jetons, il est possible d'explorer cette partie de la "),m={href:"https://docs.metaplex.com/programs/token-metadata/overview",target:"_blank",rel:"noopener noreferrer"},b=s("documentation de Metaplex"),d=s("."),y=n("h3",{id:"pour-commencer",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pour-commencer","aria-hidden":"true"},"#"),s(" Pour commencer")],-1),f=n("p",null,"Pour commencer \xE0 cr\xE9er le programme, suivez les \xE9tapes suivantes :",-1),_=s("Visitez le "),g={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},w=s("Solana Playground"),h=s(" et cr\xE9ez un nouveau projet Anchor. Si vous \xEAtes nouveau sur Solana Playground, vous devrez \xE9galement cr\xE9er un portefeuille Playground."),v=t(`

    Apr\xE8s avoir cr\xE9\xE9 un nouveau projet, remplacez le code par d\xE9faut par le code ci-dessous :

    use anchor_lang::prelude::*;
     use anchor_spl::{
         associated_token::AssociatedToken,
         metadata::{create_metadata_accounts_v3, CreateMetadataAccountsV3, Metadata},
    diff --git a/docs/.vuepress/dist/assets/interact-with-tokens.html.64318398.js b/docs/.vuepress/dist/assets/interact-with-tokens.html.9a3c30e2.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/interact-with-tokens.html.64318398.js
    rename to docs/.vuepress/dist/assets/interact-with-tokens.html.9a3c30e2.js
    index f77979ff8..2a90839aa 100644
    --- a/docs/.vuepress/dist/assets/interact-with-tokens.html.64318398.js
    +++ b/docs/.vuepress/dist/assets/interact-with-tokens.html.9a3c30e2.js
    @@ -1,4 +1,4 @@
    -import{_ as t,r as o,o as e,c,a,b as l,F as u,e as s,d as n}from"./app.07ce7a66.js";const i={},r=s('

    Paggamit ng mga token sa mga laro sa Solana

    Ang mga token sa Solana ay maaaring maghatid ng iba't ibang layunin, gaya ng mga in-game na reward, insentibo, o iba pang application. Halimbawa, maaari kang lumikha ng mga token at ipamahagi ang mga ito sa mga manlalaro kapag nakumpleto nila ang mga partikular na in-game na aksyon.

    Lumikha, Mint, at Mag-burn ng mga Token gamit ang Anchor

    Sa tutorial na ito, bubuo kami ng laro gamit ang Anchor para ipakilala ang mga pangunahing kaalaman sa pakikipag-ugnayan sa Token Program sa Solana. Ang laro ay bubuoin sa paligid ng apat na pangunahing aksyon: paggawa ng bagong token mint, pagsisimula ng mga account ng manlalaro, pagbibigay ng reward sa mga manlalaro sa pagkatalo sa mga kaaway, at pagpapahintulot sa mga manlalaro na gumaling sa pamamagitan ng pagsunog ng mga token.

    Ang programa ay binubuo ng 4 na mga instruction:

    • create_mint - Lumilikha ang instruction na ito ng bagong token mint na may Program Derived Address (PDA) bilang awtoridad ng mint at gumagawa ng metadata account para sa mint. Magdaragdag kami ng isang hadlang na nagbibigay-daan lamang sa isang "admin" na gamitin ang instruction na ito
    • init_player - Ang instruction na ito ay nagpapasimula ng bagong player account na may panimulang kalusugan na 100
    • kill_enemy - Ibinabawas ng instruction na ito ang 10 health point mula sa player account kapag "natalo ang isang kaaway" at nagbibigay ng 1 token bilang reward para sa player
    • heal - Ang pagtuturo na ito ay nagbibigay-daan sa isang manlalaro na magsunog ng 1 token upang maibalik ang kanilang kalusugan sa 100

    Para sa isang mataas na antas na pangkalahatang-ideya ng ugnayan ng mga wallet ng user, token mints, token account, at token metadata account, isaalang-alang ang pag-explore sa bahaging ito ng [dokumentasyon ng Metaplex](https://docs.metaplex.com/programs/token-metadata /pangkalahatang-ideya).

    Pagsisimula

    Upang simulan ang pagbuo ng programa, sundin ang mga hakbang na ito:

    ',9),k=n("Bisitahin ang "),m={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},b=n("Solana Playground"),g=n(" at gumawa ng bagong Anchor project. Kung bago ka sa Solana Playground, kakailanganin mo ring gumawa ng Playground Wallet."),d=s(`

    Pagkatapos gumawa ng bagong proyekto, palitan ang default na starter code ng code sa ibaba:

    use anchor_lang::prelude::*;
    +import{_ as t,r as o,o as e,c,a,b as l,F as u,e as s,d as n}from"./app.d411e3b3.js";const i={},r=s('

    Paggamit ng mga token sa mga laro sa Solana

    Ang mga token sa Solana ay maaaring maghatid ng iba't ibang layunin, gaya ng mga in-game na reward, insentibo, o iba pang application. Halimbawa, maaari kang lumikha ng mga token at ipamahagi ang mga ito sa mga manlalaro kapag nakumpleto nila ang mga partikular na in-game na aksyon.

    Lumikha, Mint, at Mag-burn ng mga Token gamit ang Anchor

    Sa tutorial na ito, bubuo kami ng laro gamit ang Anchor para ipakilala ang mga pangunahing kaalaman sa pakikipag-ugnayan sa Token Program sa Solana. Ang laro ay bubuoin sa paligid ng apat na pangunahing aksyon: paggawa ng bagong token mint, pagsisimula ng mga account ng manlalaro, pagbibigay ng reward sa mga manlalaro sa pagkatalo sa mga kaaway, at pagpapahintulot sa mga manlalaro na gumaling sa pamamagitan ng pagsunog ng mga token.

    Ang programa ay binubuo ng 4 na mga instruction:

    • create_mint - Lumilikha ang instruction na ito ng bagong token mint na may Program Derived Address (PDA) bilang awtoridad ng mint at gumagawa ng metadata account para sa mint. Magdaragdag kami ng isang hadlang na nagbibigay-daan lamang sa isang "admin" na gamitin ang instruction na ito
    • init_player - Ang instruction na ito ay nagpapasimula ng bagong player account na may panimulang kalusugan na 100
    • kill_enemy - Ibinabawas ng instruction na ito ang 10 health point mula sa player account kapag "natalo ang isang kaaway" at nagbibigay ng 1 token bilang reward para sa player
    • heal - Ang pagtuturo na ito ay nagbibigay-daan sa isang manlalaro na magsunog ng 1 token upang maibalik ang kanilang kalusugan sa 100

    Para sa isang mataas na antas na pangkalahatang-ideya ng ugnayan ng mga wallet ng user, token mints, token account, at token metadata account, isaalang-alang ang pag-explore sa bahaging ito ng [dokumentasyon ng Metaplex](https://docs.metaplex.com/programs/token-metadata /pangkalahatang-ideya).

    Pagsisimula

    Upang simulan ang pagbuo ng programa, sundin ang mga hakbang na ito:

    ',9),k=n("Bisitahin ang "),m={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},b=n("Solana Playground"),g=n(" at gumawa ng bagong Anchor project. Kung bago ka sa Solana Playground, kakailanganin mo ring gumawa ng Playground Wallet."),d=s(`

    Pagkatapos gumawa ng bagong proyekto, palitan ang default na starter code ng code sa ibaba:

    use anchor_lang::prelude::*;
     use anchor_spl::{
         associated_token::AssociatedToken,
         metadata::{create_metadata_accounts_v3, CreateMetadataAccountsV3, Metadata},
    diff --git a/docs/.vuepress/dist/assets/interact-with-tokens.html.2bce6086.js b/docs/.vuepress/dist/assets/interact-with-tokens.html.b490da89.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/interact-with-tokens.html.2bce6086.js
    rename to docs/.vuepress/dist/assets/interact-with-tokens.html.b490da89.js
    index 369293a09..9d7a19bc8 100644
    --- a/docs/.vuepress/dist/assets/interact-with-tokens.html.2bce6086.js
    +++ b/docs/.vuepress/dist/assets/interact-with-tokens.html.b490da89.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,e as t,d as s}from"./app.07ce7a66.js";const i={},r=t('

    Using tokens in games on Solana

    Tokens on Solana can serve various purposes, such as in-game rewards, incentives, or other applications. For example, you can create tokens and distribute them to players when they complete specific in-game actions.

    Create, Mint, and Burn Tokens with Anchor

    In this tutorial, we will build a game using Anchor to introduce the basics of interacting with the Token Program on Solana. The game will be structured around four main actions: creating a new token mint, initializing player accounts, rewarding players for defeating enemies, and allowing players to heal by burning tokens.

    The program consists of 4 instructions:

    • create_mint - This instruction creates a new token mint with a Program Derived Address (PDA) as the mint authority and creates the metadata account for the mint. We will add a constraint that allows only an "admin" to invoke this instruction
    • init_player - This instruction initializes a new player account with a starting health of 100
    • kill_enemy - This instruction deducts 10 health points from the player account upon \u201Cdefeating an enemy\u201D and mints 1 token as a reward for the player
    • heal - This instruction allows a player to burn 1 token to restore their health back to 100
    ',6),k=s("For a high-level overview of the relationship among user wallets, token mints, token accounts, and token metadata accounts, consider exploring this portion of the "),m={href:"https://docs.metaplex.com/programs/token-metadata/overview",target:"_blank",rel:"noopener noreferrer"},b=s("Metaplex documentation"),d=s("."),y=n("h3",{id:"getting-started",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#getting-started","aria-hidden":"true"},"#"),s(" Getting Started")],-1),h=n("p",null,"To start building the program, follow these steps:",-1),f=s("Visit the "),g={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},w=s("Solana Playground"),_=s(" and create a new Anchor project. If you're new to Solana Playground, you'll also need to create a Playground Wallet."),x=t(`

    After creating a new project, replace the default starter code with the code below:

    use anchor_lang::prelude::*;
    +import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,e as t,d as s}from"./app.d411e3b3.js";const i={},r=t('

    Using tokens in games on Solana

    Tokens on Solana can serve various purposes, such as in-game rewards, incentives, or other applications. For example, you can create tokens and distribute them to players when they complete specific in-game actions.

    Create, Mint, and Burn Tokens with Anchor

    In this tutorial, we will build a game using Anchor to introduce the basics of interacting with the Token Program on Solana. The game will be structured around four main actions: creating a new token mint, initializing player accounts, rewarding players for defeating enemies, and allowing players to heal by burning tokens.

    The program consists of 4 instructions:

    • create_mint - This instruction creates a new token mint with a Program Derived Address (PDA) as the mint authority and creates the metadata account for the mint. We will add a constraint that allows only an "admin" to invoke this instruction
    • init_player - This instruction initializes a new player account with a starting health of 100
    • kill_enemy - This instruction deducts 10 health points from the player account upon \u201Cdefeating an enemy\u201D and mints 1 token as a reward for the player
    • heal - This instruction allows a player to burn 1 token to restore their health back to 100
    ',6),k=s("For a high-level overview of the relationship among user wallets, token mints, token accounts, and token metadata accounts, consider exploring this portion of the "),m={href:"https://docs.metaplex.com/programs/token-metadata/overview",target:"_blank",rel:"noopener noreferrer"},b=s("Metaplex documentation"),d=s("."),y=n("h3",{id:"getting-started",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#getting-started","aria-hidden":"true"},"#"),s(" Getting Started")],-1),h=n("p",null,"To start building the program, follow these steps:",-1),f=s("Visit the "),g={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},w=s("Solana Playground"),_=s(" and create a new Anchor project. If you're new to Solana Playground, you'll also need to create a Playground Wallet."),x=t(`

    After creating a new project, replace the default starter code with the code below:

    use anchor_lang::prelude::*;
     use anchor_spl::{
         associated_token::AssociatedToken,
         metadata::{create_metadata_accounts_v3, CreateMetadataAccountsV3, Metadata},
    diff --git a/docs/.vuepress/dist/assets/intro.html.cccca287.js b/docs/.vuepress/dist/assets/intro.html.4a5cf141.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/intro.html.cccca287.js
    rename to docs/.vuepress/dist/assets/intro.html.4a5cf141.js
    index 40a80e732..72d67508e 100644
    --- a/docs/.vuepress/dist/assets/intro.html.cccca287.js
    +++ b/docs/.vuepress/dist/assets/intro.html.4a5cf141.js
    @@ -1 +1 @@
    -import{_ as a,r as n,o as i,c as u,a as e,b as t,w as l,F as d,d as s}from"./app.07ce7a66.js";const c={},p=e("h1",{id:"introduction-au-gaming-sur-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#introduction-au-gaming-sur-solana","aria-hidden":"true"},"#"),s(" Introduction au gaming sur Solana")],-1),_=e("p",null,"Le secteur du gaming dans l'\xE9cosyst\xE8me Solana se d\xE9veloppe rapidement. L'utilisation de Solana peut apporter de nombreux avantages aux jeux, tels que la possibilit\xE9 pour les joueurs de poss\xE9der et d'\xE9changer leurs actifs via des NFT dans les jeux, de construire une v\xE9ritable \xE9conomie in-game, de cr\xE9er des programmes de jeu composables et de permettre aux joueurs de se disputer des actifs de grande valeur.",-1),m=e("p",null,"Solana est con\xE7u pour les jeux. En effet, avec un temps de bloc de 400 ms et des confirmations rapides comme l'\xE9clair, Solana est une base de donn\xE9es en temps r\xE9el gratuite pour tous. Elle est ainsi parfaite pour les jeux de strat\xE9gie, les jeux de construction de villes, les jeux en tour par tour et bien d'autres encore.",-1),h=s("Cependant, il n'est pas n\xE9cessaire de tout mettre sur la blockchain. Des int\xE9grations plus petites utilisant des NFT qui repr\xE9sentent des \xE9l\xE9ments de jeu, par exemple, peuvent \xEAtre facilement r\xE9alis\xE9es. Les frais de transaction sont extr\xEAmement bas et de nombreux outils et SDK sont disponibles pour commencer \xE0 d\xE9velopper d\xE8s aujourd'hui. Vous pouvez cr\xE9er votre jeu en "),f={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},g=s("Javascript"),j=s(" et Canvas, "),v={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},x=s("Flutter"),b=s(", ou utiliser l'un des SDK pour jeu sur Solana disponible pour les deux plus grands moteurs de jeu - "),k=e("a",{href:"./game-sdks"},"UnitySDK",-1),S=s(", "),w={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},C=s("UnrealSDK"),D=s(" et plus encore "),L=e("a",{href:"./game-sdks"},"Game SDKs",-1),q=s("."),z=e("p",null,"Il existe plusieurs fa\xE7ons d'int\xE9grer Solana dans votre jeu :",-1),F=e("li",null,[s("Offrir aux joueurs des objets num\xE9riques \xE0 collectionner en guise d'items de jeu ou les utiliser en tant que personnages. Consultez "),e("a",{href:"./nfts-in-games"},"Nfts dans les jeux")],-1),K=e("li",null,[s("Utiliser des jetons pour des achats in-app ou des micro-paiements dans le jeu. Consultez "),e("a",{href:"./interact-with-tokens"},"utiliser des jetons")],-1),N=s("Utiliser le portefeuille du joueur pour l'authentifier dans le jeu. Consultez "),y=s("Signer un message"),E=e("li",null,"Organiser des tournois et distribuer des r\xE9compenses en crypto \xE0 vos joueurs.",-1),I=e("li",null,[s("D\xE9velopper le jeu enti\xE8rement sur la cha\xEEne pour r\xE9compenser vos joueurs \xE0 chaque \xE9tape qu'ils accomplissent. Commencez par "),e("a",{href:"./hello-world"},"Hello world")],-1),U=e("p",null,"Gr\xE2ce \xE0 tous ces avantages, Solana devient rapidement la plateforme de r\xE9f\xE9rence pour les d\xE9veloppeurs de jeux. Commencez d\xE8s aujourd'hui !",-1);function V(B,T){const o=n("ExternalLinkIcon"),r=n("RouterLink");return i(),u(d,null,[p,_,m,e("p",null,[h,e("a",f,[g,t(o)]),j,e("a",v,[x,t(o)]),b,k,S,e("a",w,[C,t(o)]),D,L,q]),z,e("ol",null,[F,K,e("li",null,[N,t(r,{to:"/fr/references/keypairs-and-wallets.html#how-to-sign-and-verify-messages-with-wallets"},{default:l(()=>[y]),_:1})]),E,I]),U],64)}var O=a(c,[["render",V]]);export{O as default};
    +import{_ as a,r as n,o as i,c as u,a as e,b as t,w as l,F as d,d as s}from"./app.d411e3b3.js";const c={},p=e("h1",{id:"introduction-au-gaming-sur-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#introduction-au-gaming-sur-solana","aria-hidden":"true"},"#"),s(" Introduction au gaming sur Solana")],-1),_=e("p",null,"Le secteur du gaming dans l'\xE9cosyst\xE8me Solana se d\xE9veloppe rapidement. L'utilisation de Solana peut apporter de nombreux avantages aux jeux, tels que la possibilit\xE9 pour les joueurs de poss\xE9der et d'\xE9changer leurs actifs via des NFT dans les jeux, de construire une v\xE9ritable \xE9conomie in-game, de cr\xE9er des programmes de jeu composables et de permettre aux joueurs de se disputer des actifs de grande valeur.",-1),m=e("p",null,"Solana est con\xE7u pour les jeux. En effet, avec un temps de bloc de 400 ms et des confirmations rapides comme l'\xE9clair, Solana est une base de donn\xE9es en temps r\xE9el gratuite pour tous. Elle est ainsi parfaite pour les jeux de strat\xE9gie, les jeux de construction de villes, les jeux en tour par tour et bien d'autres encore.",-1),h=s("Cependant, il n'est pas n\xE9cessaire de tout mettre sur la blockchain. Des int\xE9grations plus petites utilisant des NFT qui repr\xE9sentent des \xE9l\xE9ments de jeu, par exemple, peuvent \xEAtre facilement r\xE9alis\xE9es. Les frais de transaction sont extr\xEAmement bas et de nombreux outils et SDK sont disponibles pour commencer \xE0 d\xE9velopper d\xE8s aujourd'hui. Vous pouvez cr\xE9er votre jeu en "),f={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},g=s("Javascript"),j=s(" et Canvas, "),v={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},x=s("Flutter"),b=s(", ou utiliser l'un des SDK pour jeu sur Solana disponible pour les deux plus grands moteurs de jeu - "),k=e("a",{href:"./game-sdks"},"UnitySDK",-1),S=s(", "),w={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},C=s("UnrealSDK"),D=s(" et plus encore "),L=e("a",{href:"./game-sdks"},"Game SDKs",-1),q=s("."),z=e("p",null,"Il existe plusieurs fa\xE7ons d'int\xE9grer Solana dans votre jeu :",-1),F=e("li",null,[s("Offrir aux joueurs des objets num\xE9riques \xE0 collectionner en guise d'items de jeu ou les utiliser en tant que personnages. Consultez "),e("a",{href:"./nfts-in-games"},"Nfts dans les jeux")],-1),K=e("li",null,[s("Utiliser des jetons pour des achats in-app ou des micro-paiements dans le jeu. Consultez "),e("a",{href:"./interact-with-tokens"},"utiliser des jetons")],-1),N=s("Utiliser le portefeuille du joueur pour l'authentifier dans le jeu. Consultez "),y=s("Signer un message"),E=e("li",null,"Organiser des tournois et distribuer des r\xE9compenses en crypto \xE0 vos joueurs.",-1),I=e("li",null,[s("D\xE9velopper le jeu enti\xE8rement sur la cha\xEEne pour r\xE9compenser vos joueurs \xE0 chaque \xE9tape qu'ils accomplissent. Commencez par "),e("a",{href:"./hello-world"},"Hello world")],-1),U=e("p",null,"Gr\xE2ce \xE0 tous ces avantages, Solana devient rapidement la plateforme de r\xE9f\xE9rence pour les d\xE9veloppeurs de jeux. Commencez d\xE8s aujourd'hui !",-1);function V(B,T){const o=n("ExternalLinkIcon"),r=n("RouterLink");return i(),u(d,null,[p,_,m,e("p",null,[h,e("a",f,[g,t(o)]),j,e("a",v,[x,t(o)]),b,k,S,e("a",w,[C,t(o)]),D,L,q]),z,e("ol",null,[F,K,e("li",null,[N,t(r,{to:"/fr/references/keypairs-and-wallets.html#how-to-sign-and-verify-messages-with-wallets"},{default:l(()=>[y]),_:1})]),E,I]),U],64)}var O=a(c,[["render",V]]);export{O as default};
    diff --git a/docs/.vuepress/dist/assets/intro.html.5c2ad8c4.js b/docs/.vuepress/dist/assets/intro.html.50d9f3dd.js
    similarity index 97%
    rename from docs/.vuepress/dist/assets/intro.html.5c2ad8c4.js
    rename to docs/.vuepress/dist/assets/intro.html.50d9f3dd.js
    index cbde0eedc..a542f3021 100644
    --- a/docs/.vuepress/dist/assets/intro.html.5c2ad8c4.js
    +++ b/docs/.vuepress/dist/assets/intro.html.50d9f3dd.js
    @@ -1 +1 @@
    -import{_ as r,r as n,o as i,c as l,a as e,b as a,w as c,F as h,d as t}from"./app.07ce7a66.js";const d={},m=e("h1",{id:"intro-into-gaming-on-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#intro-into-gaming-on-solana","aria-hidden":"true"},"#"),t(" Intro into gaming on Solana")],-1),_=e("p",null,"The gaming space in the Solana ecosystem is expanding rapidly. Integrating with Solana can provide numerous benefits for games, such as enabling players to own and trade their assets via NFTs in games, building a real in-game economy, creating composable game programs, and allowing players to compete for valuable assets.",-1),g=e("p",null,"Solana is purpose-built for games, with its 400ms block time and lightning-fast confirmations making it a real-time database that's free for all. It's perfect for genres like strategy games, city builders, turn-based games, and more.",-1),p=t("However, not everything needs to be put on the blockchain. Smaller integrations using NFTs that represent game items, for example, can be easily done. Transaction fees are extremely cheap, and there are many tools and SDKs available to start building today. You can build your game in "),u={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},f=t("Javascript"),y=t(" and Canvas, "),b={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},k=t("Flutter"),w=t(", or use one of the Solana Game SDKs for the two biggest game engines - "),v=e("a",{href:"./game-sdks"},"UnitySDK",-1),S=t(", "),x={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},D=t("UnrealSDK"),F=t(", and more "),K=e("a",{href:"./game-sdks"},"Game SDKs",-1),N=t("."),T=e("p",null,"There are several ways to integrate Solana into your game:",-1),I=e("li",null,[t("Give players digital collectibles for in-game items or use them as characters. Check out "),e("a",{href:"./nfts-in-games"},"Nfts in games")],-1),C=e("li",null,[t("Use tokens for in-app purchases or micro-payments in the game. See "),e("a",{href:"./interact-with-tokens"},"use tokens")],-1),G=t("Use the player's wallet to authenticate them in the game. "),L=t("Sign message"),U=e("li",null,"Run tournaments and pay out crypto rewards to your players.",-1),B=e("li",null,[t("Develop the game entirely on-chain to reward your players in every step they take. Start with "),e("a",{href:"./hello-world"},"Hello world")],-1),E=e("p",null,"With all these benefits, Solana is quickly becoming the go-to platform for game developers. Get started today!",-1);function R(V,H){const o=n("ExternalLinkIcon"),s=n("RouterLink");return i(),l(h,null,[m,_,g,e("p",null,[p,e("a",u,[f,a(o)]),y,e("a",b,[k,a(o)]),w,v,S,e("a",x,[D,a(o)]),F,K,N]),T,e("ol",null,[I,C,e("li",null,[G,a(s,{to:"/references/keypairs-and-wallets.html#how-to-sign-and-verify-messages-with-wallets"},{default:c(()=>[L]),_:1})]),U,B]),E],64)}var q=r(d,[["render",R]]);export{q as default};
    +import{_ as r,r as n,o as i,c as l,a as e,b as a,w as c,F as h,d as t}from"./app.d411e3b3.js";const d={},m=e("h1",{id:"intro-into-gaming-on-solana",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#intro-into-gaming-on-solana","aria-hidden":"true"},"#"),t(" Intro into gaming on Solana")],-1),_=e("p",null,"The gaming space in the Solana ecosystem is expanding rapidly. Integrating with Solana can provide numerous benefits for games, such as enabling players to own and trade their assets via NFTs in games, building a real in-game economy, creating composable game programs, and allowing players to compete for valuable assets.",-1),g=e("p",null,"Solana is purpose-built for games, with its 400ms block time and lightning-fast confirmations making it a real-time database that's free for all. It's perfect for genres like strategy games, city builders, turn-based games, and more.",-1),p=t("However, not everything needs to be put on the blockchain. Smaller integrations using NFTs that represent game items, for example, can be easily done. Transaction fees are extremely cheap, and there are many tools and SDKs available to start building today. You can build your game in "),u={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},f=t("Javascript"),y=t(" and Canvas, "),b={href:"https://github.com/espresso-cash/espresso-cash-public",target:"_blank",rel:"noopener noreferrer"},k=t("Flutter"),w=t(", or use one of the Solana Game SDKs for the two biggest game engines - "),v=e("a",{href:"./game-sdks"},"UnitySDK",-1),S=t(", "),x={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},D=t("UnrealSDK"),F=t(", and more "),K=e("a",{href:"./game-sdks"},"Game SDKs",-1),N=t("."),T=e("p",null,"There are several ways to integrate Solana into your game:",-1),I=e("li",null,[t("Give players digital collectibles for in-game items or use them as characters. Check out "),e("a",{href:"./nfts-in-games"},"Nfts in games")],-1),C=e("li",null,[t("Use tokens for in-app purchases or micro-payments in the game. See "),e("a",{href:"./interact-with-tokens"},"use tokens")],-1),G=t("Use the player's wallet to authenticate them in the game. "),L=t("Sign message"),U=e("li",null,"Run tournaments and pay out crypto rewards to your players.",-1),B=e("li",null,[t("Develop the game entirely on-chain to reward your players in every step they take. Start with "),e("a",{href:"./hello-world"},"Hello world")],-1),E=e("p",null,"With all these benefits, Solana is quickly becoming the go-to platform for game developers. Get started today!",-1);function R(V,H){const o=n("ExternalLinkIcon"),s=n("RouterLink");return i(),l(h,null,[m,_,g,e("p",null,[p,e("a",u,[f,a(o)]),y,e("a",b,[k,a(o)]),w,v,S,e("a",x,[D,a(o)]),F,K,N]),T,e("ol",null,[I,C,e("li",null,[G,a(s,{to:"/references/keypairs-and-wallets.html#how-to-sign-and-verify-messages-with-wallets"},{default:c(()=>[L]),_:1})]),U,B]),E],64)}var q=r(d,[["render",R]]);export{q as default};
    diff --git a/docs/.vuepress/dist/assets/intro.html.afd41fab.js b/docs/.vuepress/dist/assets/intro.html.850ff3cd.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/intro.html.afd41fab.js
    rename to docs/.vuepress/dist/assets/intro.html.850ff3cd.js
    index 89dfbef9e..514b7e2a1 100644
    --- a/docs/.vuepress/dist/assets/intro.html.afd41fab.js
    +++ b/docs/.vuepress/dist/assets/intro.html.850ff3cd.js
    @@ -1 +1 @@
    -import{_ as i,r as g,o as e,c as l,a,b as o,w as r,F as m,d as n}from"./app.07ce7a66.js";const p={},c=a("h1",{id:"panimula-sa-paglalaro-sa-solana",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#panimula-sa-paglalaro-sa-solana","aria-hidden":"true"},"#"),n(" Panimula sa paglalaro sa Solana")],-1),h=a("p",null,"Mabilis na lumalawak ang gaming space sa Solana ecosystem. Ang pagsasama sa Solana ay maaaring magbigay ng maraming benepisyo para sa mga laro, tulad ng pagbibigay-daan sa mga manlalaro na pagmamay-ari at ipagpalit ang kanilang mga asset sa pamamagitan ng mga NFT sa mga laro, pagbuo ng isang tunay na in-game na ekonomiya, paglikha ng mga composable na program ng laro, at pagpayag sa mga manlalaro na makipagkumpitensya para sa mahahalagang asset.",-1),_=a("p",null,"Ang Solana ay sadyang binuo para sa mga laro, kasama ang 400ms block time nito at napakabilis ng kidlat na mga kumpirmasyon na ginagawa itong isang real-time na database na libre para sa lahat. Ito ay perpekto para sa mga genre tulad ng mga laro ng diskarte, mga tagabuo ng lungsod, mga larong nakabatay sa turn, at higit pa.",-1),d=n("Gayunpaman, hindi lahat ay kailangang ilagay sa blockchain. Ang mas maliliit na pagsasama gamit ang mga NFT na kumakatawan sa mga item ng laro, halimbawa, ay madaling magawa. Napakamura ng mga bayarin sa transaksyon, at maraming tool at SDK ang available para simulan ang pagbuo ngayon. Maaari mong buuin ang iyong laro sa "),u={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},k=n("Javascript"),y=n(" at Canvas, [Flutter](https://github.com/espresso-cash/espresso -cash-public), o gumamit ng isa sa mga Solana Game SDK para sa dalawang pinakamalaking engine ng laro - "),b=a("a",{href:"./game-sdks"},"UnitySDK",-1),f=n(", "),w={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},S=n("UnrealSDK"),v=n(", at higit pa "),x=a("a",{href:"./game-sdks"},"Mga SDK ng Laro",-1),M=n("."),N=a("p",null,"Mayroong ilang mga paraan upang isama ang Solana sa iyong laro:",-1),F=a("li",null,[n("Bigyan ang mga manlalaro ng digital collectible para sa mga in-game na item o gamitin ang mga ito bilang mga character. Tingnan ang "),a("a",{href:"./nfts-in-games"},"Nfts sa mga laro")],-1),K=a("li",null,[n("Gumamit ng mga token para sa mga in-app na pagbili o micro-payment sa laro. Tingnan ang "),a("a",{href:"./interact-with-tokens"},"gumamit ng mga token")],-1),B=n("Gamitin ang wallet ng player para patotohanan sila sa laro. "),D=n("Sign message"),L=a("li",null,"Magpatakbo ng mga tournament at magbayad ng mga crypto reward sa iyong mga manlalaro.",-1),T=a("li",null,[n("Buuin ang laro na ganap na on-chain upang gantimpalaan ang iyong mga manlalaro sa bawat hakbang na kanilang gagawin. Magsimula sa "),a("a",{href:"./hello-world"},"Hello world")],-1),G=a("p",null,"Sa lahat ng mga benepisyong ito, ang Solana ay mabilis na nagiging go-to platform para sa mga developer ng laro. Magsimula ngayon!",-1);function A(C,E){const t=g("ExternalLinkIcon"),s=g("RouterLink");return e(),l(m,null,[c,h,_,a("p",null,[d,a("a",u,[k,o(t)]),y,b,f,a("a",w,[S,o(t)]),v,x,M]),N,a("ol",null,[F,K,a("li",null,[B,o(s,{to:"/fil/references/keypairs-and-wallets.html#how-to-sign-and-verify-messages-with-wallets"},{default:r(()=>[D]),_:1})]),L,T]),G],64)}var V=i(p,[["render",A]]);export{V as default};
    +import{_ as i,r as g,o as e,c as l,a,b as o,w as r,F as m,d as n}from"./app.d411e3b3.js";const p={},c=a("h1",{id:"panimula-sa-paglalaro-sa-solana",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#panimula-sa-paglalaro-sa-solana","aria-hidden":"true"},"#"),n(" Panimula sa paglalaro sa Solana")],-1),h=a("p",null,"Mabilis na lumalawak ang gaming space sa Solana ecosystem. Ang pagsasama sa Solana ay maaaring magbigay ng maraming benepisyo para sa mga laro, tulad ng pagbibigay-daan sa mga manlalaro na pagmamay-ari at ipagpalit ang kanilang mga asset sa pamamagitan ng mga NFT sa mga laro, pagbuo ng isang tunay na in-game na ekonomiya, paglikha ng mga composable na program ng laro, at pagpayag sa mga manlalaro na makipagkumpitensya para sa mahahalagang asset.",-1),_=a("p",null,"Ang Solana ay sadyang binuo para sa mga laro, kasama ang 400ms block time nito at napakabilis ng kidlat na mga kumpirmasyon na ginagawa itong isang real-time na database na libre para sa lahat. Ito ay perpekto para sa mga genre tulad ng mga laro ng diskarte, mga tagabuo ng lungsod, mga larong nakabatay sa turn, at higit pa.",-1),d=n("Gayunpaman, hindi lahat ay kailangang ilagay sa blockchain. Ang mas maliliit na pagsasama gamit ang mga NFT na kumakatawan sa mga item ng laro, halimbawa, ay madaling magawa. Napakamura ng mga bayarin sa transaksyon, at maraming tool at SDK ang available para simulan ang pagbuo ngayon. Maaari mong buuin ang iyong laro sa "),u={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},k=n("Javascript"),y=n(" at Canvas, [Flutter](https://github.com/espresso-cash/espresso -cash-public), o gumamit ng isa sa mga Solana Game SDK para sa dalawang pinakamalaking engine ng laro - "),b=a("a",{href:"./game-sdks"},"UnitySDK",-1),f=n(", "),w={href:"https://github.com/staratlasmeta/FoundationKit",target:"_blank",rel:"noopener noreferrer"},S=n("UnrealSDK"),v=n(", at higit pa "),x=a("a",{href:"./game-sdks"},"Mga SDK ng Laro",-1),M=n("."),N=a("p",null,"Mayroong ilang mga paraan upang isama ang Solana sa iyong laro:",-1),F=a("li",null,[n("Bigyan ang mga manlalaro ng digital collectible para sa mga in-game na item o gamitin ang mga ito bilang mga character. Tingnan ang "),a("a",{href:"./nfts-in-games"},"Nfts sa mga laro")],-1),K=a("li",null,[n("Gumamit ng mga token para sa mga in-app na pagbili o micro-payment sa laro. Tingnan ang "),a("a",{href:"./interact-with-tokens"},"gumamit ng mga token")],-1),B=n("Gamitin ang wallet ng player para patotohanan sila sa laro. "),D=n("Sign message"),L=a("li",null,"Magpatakbo ng mga tournament at magbayad ng mga crypto reward sa iyong mga manlalaro.",-1),T=a("li",null,[n("Buuin ang laro na ganap na on-chain upang gantimpalaan ang iyong mga manlalaro sa bawat hakbang na kanilang gagawin. Magsimula sa "),a("a",{href:"./hello-world"},"Hello world")],-1),G=a("p",null,"Sa lahat ng mga benepisyong ito, ang Solana ay mabilis na nagiging go-to platform para sa mga developer ng laro. Magsimula ngayon!",-1);function A(C,E){const t=g("ExternalLinkIcon"),s=g("RouterLink");return e(),l(m,null,[c,h,_,a("p",null,[d,a("a",u,[k,o(t)]),y,b,f,a("a",w,[S,o(t)]),v,x,M]),N,a("ol",null,[F,K,a("li",null,[B,o(s,{to:"/fil/references/keypairs-and-wallets.html#how-to-sign-and-verify-messages-with-wallets"},{default:r(()=>[D]),_:1})]),L,T]),G],64)}var V=i(p,[["render",A]]);export{V as default};
    diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.67ed01d6.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.12cb5c76.js
    similarity index 97%
    rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.67ed01d6.js
    rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.12cb5c76.js
    index aafc4fa29..1724067b5 100644
    --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.67ed01d6.js
    +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.12cb5c76.js
    @@ -1,13 +1,19 @@
    -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"cap-khoa-va-vi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cap-khoa-va-vi","aria-hidden":"true"},"#"),s(" C\u1EB7p kho\xE1 v\xE0 V\xED")],-1),d=n("h2",{id:"lam-the-nao-\u0111e-sinh-cap-khoa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-sinh-cap-khoa","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh C\u1EB7p kho\xE1")],-1),h=n("p",null,"C\xF3 r\u1EA5t nhi\u1EC1u ch\u1EE9c n\u0103ng trong c\xE1c th\u01B0 vi\u1EC7n Solana \u0111\u1EC3 t\u01B0\u01A1ng t\xE1c \u0111\u01B0\u1EE3c b\u1EA1n s\u1EBD ph\u1EA3i c\u1EA7n c\xF3 C\u1EB7p kho\xE1 ho\u1EB7c V\xED. N\u1EBFu b\u1EA1n \u0111ang k\u1EBFt n\u1ED1i v\u1EDBi m\u1ED9t v\xED, b\u1EA1n s\u1EBD kh\xF4ng ph\u1EA3i lo l\u1EAFng chuy\u1EC7n \u0111\xF3 n\u1EEFa. Tuy nhi\xEAn, n\u1EBFu b\u1EA1n \u0111ang c\u1EA7n m\u1ED9t C\u1EB7p kho\xE1, b\u1EA1n s\u1EBD ph\u1EA3i sinh ra ch\xFAng.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"cap-khoa-va-vi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#cap-khoa-va-vi","aria-hidden":"true"},"#"),s(" C\u1EB7p kho\xE1 v\xE0 V\xED")],-1),d=n("h2",{id:"lam-the-nao-\u0111e-sinh-cap-khoa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-sinh-cap-khoa","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh C\u1EB7p kho\xE1")],-1),h=n("p",null,"C\xF3 r\u1EA5t nhi\u1EC1u ch\u1EE9c n\u0103ng trong c\xE1c th\u01B0 vi\u1EC7n Solana \u0111\u1EC3 t\u01B0\u01A1ng t\xE1c \u0111\u01B0\u1EE3c b\u1EA1n s\u1EBD ph\u1EA3i c\u1EA7n c\xF3 C\u1EB7p kho\xE1 ho\u1EB7c V\xED. N\u1EBFu b\u1EA1n \u0111ang k\u1EBFt n\u1ED1i v\u1EDBi m\u1ED9t v\xED, b\u1EA1n s\u1EBD kh\xF4ng ph\u1EA3i lo l\u1EAFng chuy\u1EC7n \u0111\xF3 n\u1EEFa. Tuy nhi\xEAn, n\u1EBFu b\u1EA1n \u0111ang c\u1EA7n m\u1ED9t C\u1EB7p kho\xE1, b\u1EA1n s\u1EBD ph\u1EA3i sinh ra ch\xFAng.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`),n("span",{class:"token keyword"},"import"),s(` based58
     
     keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    +
    +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` 
    +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
    @@ -57,7 +63,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
         `),n("span",{class:"token punctuation"},"]"),s(`
         
     keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),N=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(`
     
     `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(`
     
    @@ -73,7 +79,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
       Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),N=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(`
     `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(`
    @@ -115,18 +121,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"
         `),n("span",{class:"token punctuation"},")"),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),U=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),H=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(`
       bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(`
         `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
       `),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),U=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
     
     b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),H=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),J=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
    @@ -252,8 +258,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke
     off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(`
     
    -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(`
    +  error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(`
    +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(`
    +  `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),pn=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("pubkey"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Pubkey"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("std"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token keyword"},"str"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token class-name"},"FromStr"),n("span",{class:"token punctuation"},";"),s(`
    @@ -278,7 +287,8 @@ error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{cl
     
     mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
     words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),dn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),dn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
     words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),hn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),gn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new
    @@ -300,13 +310,16 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok
     `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic
     
     mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(`
    +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` 
    +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Kn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Pn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),Kn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` 
    +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Pn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Wn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Cn=n("ol",{start:"2"},[n("li",null,"BIP44 - nhi\u1EC1u v\xED, th\u01B0\u1EDDng \u0111\u01B0\u1EE3c bi\u1EBFt \u0111\u1EBFn v\u1EDBi t\xEAn g\u1ECDi v\xED HD (Hierarchical Deterministic - Ph\xE2n quy\u1EC1n T\u1EA5t \u0111\u1ECBnh)")],-1),Sn=n("p",null,"B\u1EA1n c\xF3 th\u1EC3 t\u1EA1o nhi\u1EC1u v\xED t\u1EEB m\u1ED9t seed \u0111\u01A1n v\xE0 \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 v\xED HD:",-1),An=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(`
    @@ -332,8 +345,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("h2",{id:"lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh m\u1ED9t \u0111\u1ECBa ch\u1EC9 danh ngh\u0129a")],-1),Rn=n("p",null,'\u0110\u1ECBa ch\u1EC9 danh ngh\u0129a, hay \u0111\u1ECBa ch\u1EC9 tu\u1EF3 ch\u1EC9nh l\xE0 nh\u1EEFng \u0111\u1ECBa ch\u1EC9 v\u1EDBi c\xE1c ti\u1EC1n t\u1ED1 l\xE0 nh\u1EEFng k\xFD t\u1EF1 c\u1EE5 th\u1EC3. V\xED d\u1EE5, m\u1ED9t ng\u01B0\u1EDDi mu\u1ED1n m\u1ED9t kho\xE1 c\xF4ng khai sao cho n\xF3 b\u1EAFt \u0111\u1EA7u v\u1EDBi c\u1EE5m t\u1EEB "elv1s", ho\u1EB7c "cook". Nh\u1EEFng \u0111\u1EA1i ch\u1EC9 n\xE0o gi\xFAp ng\u01B0\u1EDDi kh\xE1c c\xF3 th\u1EC3 bi\u1EBFt \u0111\u01B0\u1EE3c ch\u1EE7 s\u1EDF h\u1EEFu c\u1EE7a kho\xE1 v\xE0 thu\u1EADn ti\u1EC7n cho vi\u1EC7c nh\u1EADn d\u1EA1ng h\u01A1n.',-1),Mn=n("p",null,"L\u01B0u \xFD: C\xE0ng nhi\u1EC1u k\xFD t\u1EF1 ti\u1EC1n t\u1ED1 trong \u0111\u1EA1i ch\u1EC9 danh ngh\u0129a, s\u1EBD c\xE0ng y\xEAu c\u1EA7u nhi\u1EC1u th\u1EDDi gian t\xEDnh to\xE1n h\u01A1n.",-1),Dn=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"B\u1EA1n n\xEAn s\u1EED d\u1EE5ng CLI cho nhi\u1EC7m v\u1EE5 n\xE0y. V\xED d\u1EE5 tr\xEAn Python v\xE0 TypeScript ch\u1EC9 nh\u1EB1m m\u1EE5c \u0111\xEDch minh ho\u1EA1 v\xE0 c\xF3 hi\u1EC7u su\u1EA5t ch\u1EADm h\u01A1n r\u1EA5t nhi\u1EC1u so v\u1EDBi CLI.")],-1),zn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh m\u1ED9t \u0111\u1ECBa ch\u1EC9 danh ngh\u0129a")],-1),Rn=n("p",null,'\u0110\u1ECBa ch\u1EC9 danh ngh\u0129a, hay \u0111\u1ECBa ch\u1EC9 tu\u1EF3 ch\u1EC9nh l\xE0 nh\u1EEFng \u0111\u1ECBa ch\u1EC9 v\u1EDBi c\xE1c ti\u1EC1n t\u1ED1 l\xE0 nh\u1EEFng k\xFD t\u1EF1 c\u1EE5 th\u1EC3. V\xED d\u1EE5, m\u1ED9t ng\u01B0\u1EDDi mu\u1ED1n m\u1ED9t kho\xE1 c\xF4ng khai sao cho n\xF3 b\u1EAFt \u0111\u1EA7u v\u1EDBi c\u1EE5m t\u1EEB "elv1s", ho\u1EB7c "cook". Nh\u1EEFng \u0111\u1EA1i ch\u1EC9 n\xE0o gi\xFAp ng\u01B0\u1EDDi kh\xE1c c\xF3 th\u1EC3 bi\u1EBFt \u0111\u01B0\u1EE3c ch\u1EE7 s\u1EDF h\u1EEFu c\u1EE7a kho\xE1 v\xE0 thu\u1EADn ti\u1EC7n cho vi\u1EC7c nh\u1EADn d\u1EA1ng h\u01A1n.',-1),Mn=n("p",null,"L\u01B0u \xFD: C\xE0ng nhi\u1EC1u k\xFD t\u1EF1 ti\u1EC1n t\u1ED1 trong \u0111\u1EA1i ch\u1EC9 danh ngh\u0129a, s\u1EBD c\xE0ng y\xEAu c\u1EA7u nhi\u1EC1u th\u1EDDi gian t\xEDnh to\xE1n h\u01A1n.",-1),Dn=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"B\u1EA1n n\xEAn s\u1EED d\u1EE5ng CLI cho nhi\u1EC7m v\u1EE5 n\xE0y. V\xED d\u1EE5 tr\xEAn Python v\xE0 TypeScript ch\u1EC9 nh\u1EB1m m\u1EE5c \u0111\xEDch minh ho\u1EA1 v\xE0 c\xF3 hi\u1EC7u su\u1EA5t ch\u1EADm h\u01A1n r\u1EA5t nhi\u1EC1u so v\u1EDBi CLI.")],-1),zn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    @@ -352,10 +365,10 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
         keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
         
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Hn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(`
         keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Vn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ vanity_keypair.cpp -o vanity_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Un=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ vanity_keypair.cpp -o vanity_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(`
     
     `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(`
     
    @@ -370,7 +383,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
     
       std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Hn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"auto"),s(" key_pair "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Vn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"auto"),s(" key_pair "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
         key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    @@ -425,7 +438,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str
     signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(`
     verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(`
     
    -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),ns=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(`
     signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(`
     verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(`
    @@ -574,8 +587,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{
     `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(`
       `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(`
     `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ps=u(`

    Svelte

    Ch\u1EA1y \u0111o\u1EA1n m\xE3 sau \u0111\xE2y \u0111\u1EC3 c\xE0i c\xE1c th\u01B0 vi\u1EC7n c\u1EA7n thi\u1EBFt:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ws=s("G\xF3i "),Cs={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Ss=s("Svelte Wallet Adapter"),As=s(" cho ph\xE9p th\xEAm m\u1ED9t Svelte Store ("),Ts=n("code",null,"$walletStore",-1),js=s(") c\xF3 kh\u1EA3 n\u0103ng truy xu\u1EA5t t\u1EEB c\xE1c t\u1EADp tin JS, TS or/and Svelte b\xEAn trong d\u1EF1 \xE1n \u0111\u01B0\u1EE3c t\u1EA1o t\u1EEB Svelte Template ho\u1EB7c SvelteKit. S\u1EED d\u1EE5ng m\xE3 ngu\u1ED3n tham kh\u1EA3o "),Ns={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Bs=s("t\u1EA1i \u0111\xE2y"),Rs=s(" b\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng b\u1ED9 ti\u1EBFp h\u1EE3p cho SSR v\xE0 c\u1EA3 SPA. G\xF3i giao di\u1EC7n ng\u01B0\u1EDDi d\xF9ng c\xF3 ch\u1EE9a m\u1ED9t th\xE0nh ph\u1EA7n l\xE0 "),Ms=n("code",null,"",-1),Ds=s(", n\xF3 cho ph\xE9p ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 ch\u1ECDn v\xE0 t\u1EA1o k\u1EBFt n\u1ED1i \u0111\u1EBFn v\xED."),zs=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ps=u(`

    Svelte

    Ch\u1EA1y \u0111o\u1EA1n m\xE3 sau \u0111\xE2y \u0111\u1EC3 c\xE0i c\xE1c th\u01B0 vi\u1EC7n c\u1EA7n thi\u1EBFt:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ws=s("G\xF3i "),Cs={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Ss=s("Svelte Wallet Adapter"),As=s(" cho ph\xE9p th\xEAm m\u1ED9t Svelte Store ("),Ts=n("code",null,"$walletStore",-1),js=s(") c\xF3 kh\u1EA3 n\u0103ng truy xu\u1EA5t t\u1EEB c\xE1c t\u1EADp tin JS, TS or/and Svelte b\xEAn trong d\u1EF1 \xE1n \u0111\u01B0\u1EE3c t\u1EA1o t\u1EEB Svelte Template ho\u1EB7c SvelteKit. S\u1EED d\u1EE5ng m\xE3 ngu\u1ED3n tham kh\u1EA3o "),Bs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ns=s("t\u1EA1i \u0111\xE2y"),Rs=s(" b\u1EA1n c\xF3 th\u1EC3 s\u1EED d\u1EE5ng b\u1ED9 ti\u1EBFp h\u1EE3p cho SSR v\xE0 c\u1EA3 SPA. G\xF3i giao di\u1EC7n ng\u01B0\u1EDDi d\xF9ng c\xF3 ch\u1EE9a m\u1ED9t th\xE0nh ph\u1EA7n l\xE0 "),Ms=n("code",null,"",-1),Ds=s(", n\xF3 cho ph\xE9p ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 ch\u1ECDn v\xE0 t\u1EA1o k\u1EBFt n\u1ED1i \u0111\u1EBFn v\xED."),zs=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -617,4 +630,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Ls(Us,Vs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,h,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[y]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"CLI"},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),P,W,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[S]),preview:a(()=>[A]),_:1}),t(e,{title:"Python"},{default:a(()=>[T]),preview:a(()=>[j]),_:1}),t(e,{title:"C++"},{default:a(()=>[N]),preview:a(()=>[B]),_:1}),t(e,{title:"Rust"},{default:a(()=>[R]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),E,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[L]),preview:a(()=>[U]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[H]),_:1}),t(e,{title:"Rust"},{default:a(()=>[J]),preview:a(()=>[q]),_:1})]),_:1}),Y,F,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[X]),_:1}),t(e,{title:"Python"},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"C++"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"CLI"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1})]),_:1}),sn,an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1})]),_:1}),ln,kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1}),t(e,{title:"Python"},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[hn]),preview:a(()=>[gn]),_:1})]),_:1}),yn,wn,vn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1}),t(e,{title:"Python"},{default:a(()=>[xn]),preview:a(()=>[Kn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1})]),_:1}),Cn,Sn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[An]),preview:a(()=>[Tn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[jn]),preview:a(()=>[Nn]),_:1})]),_:1}),Bn,Rn,Mn,Dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[zn]),preview:a(()=>[En]),_:1}),t(e,{title:"Python"},{default:a(()=>[Ln]),preview:a(()=>[Un]),_:1}),t(e,{title:"C++"},{default:a(()=>[Vn]),preview:a(()=>[Hn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Jn]),preview:a(()=>[qn]),_:1})]),_:1}),Yn,Fn,n("p",null,[In,n("a",Xn,[Zn,t(c)]),Gn]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[$n]),preview:a(()=>[Qn]),_:1}),t(e,{title:"Python"},{default:a(()=>[On]),preview:a(()=>[ns]),_:1})]),_:1}),ss,n("p",null,[as,n("a",ts,[es,t(c)]),os]),cs,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ps]),preview:a(()=>[us]),_:1})]),_:1}),ls,n("p",null,[is,n("a",ks,[rs,t(c)]),bs,ms,ds,hs,gs,n("a",ys,[ws,t(c)]),vs,_s,fs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[xs]),preview:a(()=>[Ks]),_:1})]),_:1}),Ps,n("p",null,[Ws,n("a",Cs,[Ss,t(c)]),As,Ts,js,n("a",Ns,[Bs,t(c)]),Rs,Ms,Ds]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[zs]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Js=l(b,[["render",Ls]]);export{Js as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Ls(Hs,Us){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,h,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[y]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"CLI"},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),P,W,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[S]),preview:a(()=>[A]),_:1}),t(e,{title:"Python"},{default:a(()=>[T]),preview:a(()=>[j]),_:1}),t(e,{title:"C++"},{default:a(()=>[B]),preview:a(()=>[N]),_:1}),t(e,{title:"Rust"},{default:a(()=>[R]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),E,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[L]),preview:a(()=>[H]),_:1}),t(e,{title:"Python"},{default:a(()=>[U]),preview:a(()=>[V]),_:1}),t(e,{title:"Rust"},{default:a(()=>[J]),preview:a(()=>[q]),_:1})]),_:1}),Y,F,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[X]),_:1}),t(e,{title:"Python"},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"C++"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"CLI"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1})]),_:1}),sn,an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1})]),_:1}),ln,kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1}),t(e,{title:"Python"},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[hn]),preview:a(()=>[gn]),_:1})]),_:1}),yn,wn,vn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1}),t(e,{title:"Python"},{default:a(()=>[xn]),preview:a(()=>[Kn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1})]),_:1}),Cn,Sn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[An]),preview:a(()=>[Tn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[jn]),preview:a(()=>[Bn]),_:1})]),_:1}),Nn,Rn,Mn,Dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[zn]),preview:a(()=>[En]),_:1}),t(e,{title:"Python"},{default:a(()=>[Ln]),preview:a(()=>[Hn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Un]),preview:a(()=>[Vn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Jn]),preview:a(()=>[qn]),_:1})]),_:1}),Yn,Fn,n("p",null,[In,n("a",Xn,[Zn,t(c)]),Gn]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[$n]),preview:a(()=>[Qn]),_:1}),t(e,{title:"Python"},{default:a(()=>[On]),preview:a(()=>[ns]),_:1})]),_:1}),ss,n("p",null,[as,n("a",ts,[es,t(c)]),os]),cs,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ps]),preview:a(()=>[us]),_:1})]),_:1}),ls,n("p",null,[is,n("a",ks,[rs,t(c)]),bs,ms,ds,hs,gs,n("a",ys,[ws,t(c)]),vs,_s,fs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[xs]),preview:a(()=>[Ks]),_:1})]),_:1}),Ps,n("p",null,[Ws,n("a",Cs,[Ss,t(c)]),As,Ts,js,n("a",Bs,[Ns,t(c)]),Rs,Ms,Ds]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[zs]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Js=l(b,[["render",Ls]]);export{Js as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.52178133.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.1759bcbe.js similarity index 97% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.52178133.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.1759bcbe.js index fe5aef775..db62e86cb 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.52178133.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.1759bcbe.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"schlusselpaare-und-brieftaschen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#schlusselpaare-und-brieftaschen","aria-hidden":"true"},"#"),s(" Schl\xFCsselpaare und Brieftaschen")],-1),d=n("h2",{id:"so-generieren-sie-ein-neues-schlusselpaar",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-generieren-sie-ein-neues-schlusselpaar","aria-hidden":"true"},"#"),s(" So generieren Sie ein neues Schl\xFCsselpaar")],-1),y=n("p",null,"Viele der verschiedenen Aktionen k\xF6nnen Sie mit den verschiedenen Solana durchf\xFChren Bibliotheken erfordern ein Schl\xFCsselpaar oder eine Brieftasche. Wenn Sie eine Verbindung zu einer Brieftasche (Wallet), m\xFCssen Sie sich keine Sorgen machen. Wenn Sie jedoch ein Schl\xFCsselpaar ben\xF6tigen, m\xFCssen Sie eines generieren.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"schlusselpaare-und-brieftaschen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#schlusselpaare-und-brieftaschen","aria-hidden":"true"},"#"),s(" Schl\xFCsselpaare und Brieftaschen")],-1),d=n("h2",{id:"so-generieren-sie-ein-neues-schlusselpaar",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-generieren-sie-ein-neues-schlusselpaar","aria-hidden":"true"},"#"),s(" So generieren Sie ein neues Schl\xFCsselpaar")],-1),y=n("p",null,"Viele der verschiedenen Aktionen k\xF6nnen Sie mit den verschiedenen Solana durchf\xFChren Bibliotheken erfordern ein Schl\xFCsselpaar oder eine Brieftasche. Wenn Sie eine Verbindung zu einer Brieftasche (Wallet), m\xFCssen Sie sich keine Sorgen machen. Wenn Sie jedoch ein Schl\xFCsselpaar ben\xF6tigen, m\xFCssen Sie eines generieren.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),f=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),f=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -64,7 +70,7 @@ secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token p keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),T=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),T=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),D=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -95,7 +101,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token number"},"63"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"176"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"109"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"168"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"238"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"135"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),E=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` @@ -110,7 +116,7 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created keypair: {}"'),n("span",{class:"token punctuation"},","),s(" pubkey"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),E=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -138,11 +144,11 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` @@ -151,7 +157,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"let"),s(" pubkey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("wallet"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created keypair: {}"'),n("span",{class:"token punctuation"},","),s(" pubkey"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"so-verifizieren-sie-ein-schlusselpaar",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-verifizieren-sie-ein-schlusselpaar","aria-hidden":"true"},"#"),s(" So verifizieren Sie ein Schl\xFCsselpaar")],-1),X=n("p",null,"Wenn Sie ein Schl\xFCsselpaar erhalten, k\xF6nnen Sie \xFCberpr\xFCfen, ob es das Geheimnis ist oder nicht mit dem angegebenen \xF6ffentlichen Schl\xFCssel \xFCberein stimmt.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),fn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,15 +338,18 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),zn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),zn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Cn=n("p",null,"2.BIP44 (mehrere Wallets, auch HD-Wallets genannt)",-1),jn=n("p",null,"Sie k\xF6nnen mehrere Wallets aus einem einzigen Seed erstellen \u2013 auch bekannt als \u201Ehierarchische deterministische Wallets\u201C oder HD-Wallets:",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Cn=n("p",null,"2.BIP44 (mehrere Wallets, auch HD-Wallets genannt)",-1),jn=n("p",null,"Sie k\xF6nnen mehrere Wallets aus einem einzigen Seed erstellen \u2013 auch bekannt als \u201Ehierarchische deterministische Wallets\u201C oder HD-Wallets:",-1),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -360,8 +373,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),En=n("h2",{id:"so-generieren-sie-eine-vanity-adresse",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-generieren-sie-eine-vanity-adresse","aria-hidden":"true"},"#"),s(" So generieren Sie eine Vanity-Adresse")],-1),Mn=n("p",null,'Vanity-Publickeys oder benutzerdefinierte Adressen sind Schl\xFCssel, die mit bestimmten Charakteren beginnen. Beispielsweise kann eine Person einen \xF6ffentlichen Schl\xFCssel w\xFCnschen. Beginnen Sie mit "elv1s" oder vielleicht sogar mit "cook". Dies kann anderen Menschen helfen, sich zu merken, wem der Schl\xFCssel geh\xF6rt, und wodurch der Schl\xFCssel leichter zu identifizieren ist.',-1),Vn=n("p",null,"Hinweis: Je mehr Zeichen Ihre Vanity-Adresse enth\xE4lt, desto l\xE4nger wird sie nehmen.",-1),Jn=n("p",null,"::: Warnung Sie sollten f\xFCr diese Aufgabe einfach die CLI verwenden. Die Python- und TypeScript-Beispiele dienen der Veranschaulichung und sind viel langsamer als die CLI. :::",-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),En=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"so-generieren-sie-eine-vanity-adresse",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-generieren-sie-eine-vanity-adresse","aria-hidden":"true"},"#"),s(" So generieren Sie eine Vanity-Adresse")],-1),Mn=n("p",null,'Vanity-Publickeys oder benutzerdefinierte Adressen sind Schl\xFCssel, die mit bestimmten Charakteren beginnen. Beispielsweise kann eine Person einen \xF6ffentlichen Schl\xFCssel w\xFCnschen. Beginnen Sie mit "elv1s" oder vielleicht sogar mit "cook". Dies kann anderen Menschen helfen, sich zu merken, wem der Schl\xFCssel geh\xF6rt, und wodurch der Schl\xFCssel leichter zu identifizieren ist.',-1),Vn=n("p",null,"Hinweis: Je mehr Zeichen Ihre Vanity-Adresse enth\xE4lt, desto l\xE4nger wird sie nehmen.",-1),Jn=n("p",null,"::: Warnung Sie sollten f\xFCr diese Aufgabe einfach die CLI verwenden. Die Python- und TypeScript-Beispiele dienen der Veranschaulichung und sind viel langsamer als die CLI. :::",-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -383,7 +396,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ln=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Fn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ vanity_keypair.cpp -o vanity_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),qn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ vanity_keypair.cpp -o vanity_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -398,7 +411,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),qn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"auto"),s(" key_pair "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Fn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"auto"),s(" key_pair "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    F\xFChren Sie den folgenden Befehl aus, um die erforderlichen Abh\xE4ngigkeiten zu installieren:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ws=s("Das Paket "),Ps={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},zs=s("Svelte Wallet Adapter"),As=s(" erm\xF6glicht es, einen Svelte Store ("),Bs=n("code",null,"$walletStore",-1),Cs=s(") hinzuzuf\xFCgen, auf den unter allen JS-, TS- oder/und Svelte-Dateien zugegriffen werden kann innerhalb eines Projekts, das mit Svelte Template oder SvelteKit erstellt wurde. Unter Verwendung der Repo-Referenz "),js={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ds=s("hier"),Ts=s(" k\xF6nnen Sie den Adapter f\xFCr SSR oder verwenden SPA. Das UI-Paket enth\xE4lt eine "),Rs=n("code",null,"",-1),Ns=s("-Komponente, mit der Benutzer eine Brieftasche ausw\xE4hlen k\xF6nnen, um sich damit zu verbinden."),Es=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    F\xFChren Sie den folgenden Befehl aus, um die erforderlichen Abh\xE4ngigkeiten zu installieren:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ws=s("Das Paket "),Ps={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},zs=s("Svelte Wallet Adapter"),As=s(" erm\xF6glicht es, einen Svelte Store ("),Bs=n("code",null,"$walletStore",-1),Cs=s(") hinzuzuf\xFCgen, auf den unter allen JS-, TS- oder/und Svelte-Dateien zugegriffen werden kann innerhalb eines Projekts, das mit Svelte Template oder SvelteKit erstellt wurde. Unter Verwendung der Repo-Referenz "),js={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ts=s("hier"),Ds=s(" k\xF6nnen Sie den Adapter f\xFCr SSR oder verwenden SPA. Das UI-Paket enth\xE4lt eine "),Rs=n("code",null,"",-1),Es=s("-Komponente, mit der Benutzer eine Brieftasche ausw\xE4hlen k\xF6nnen, um sich damit zu verbinden."),Ns=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Vs(Js,Us){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[f]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[S]),preview:a(()=>[W]),_:1})]),_:1}),P,z,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[C]),_:1}),t(e,{title:"Python"},{default:a(()=>[j]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[T]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[N]),preview:a(()=>[E]),_:1}),t(e,{title:"CLI"},{default:a(()=>[M]),preview:a(()=>[V]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[H]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[F]),preview:a(()=>[q]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[fn]),preview:a(()=>[_n]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Sn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Pn]),preview:a(()=>[zn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[Bn]),_:1})]),_:1}),Cn,jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Tn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Nn]),_:1})]),_:1}),En,Mn,Vn,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Hn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[Fn]),preview:a(()=>[qn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,n("a",fs,[_s,t(c)]),vs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[xs]),preview:a(()=>[Ks]),_:1})]),_:1}),Ss,n("p",null,[Ws,n("a",Ps,[zs,t(c)]),As,Bs,Cs,n("a",js,[Ds,t(c)]),Ts,Rs,Ns]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Es]),preview:a(()=>[Ms]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Vs]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Vs(Js,Us){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[f]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[S]),preview:a(()=>[W]),_:1})]),_:1}),P,z,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[C]),_:1}),t(e,{title:"Python"},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[E]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[M]),preview:a(()=>[V]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[H]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[fn]),preview:a(()=>[_n]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Sn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Pn]),preview:a(()=>[zn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[Bn]),_:1})]),_:1}),Cn,jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Tn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[En]),_:1})]),_:1}),Nn,Mn,Vn,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Hn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,n("a",fs,[_s,t(c)]),vs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[xs]),preview:a(()=>[Ks]),_:1})]),_:1}),Ss,n("p",null,[Ws,n("a",Ps,[zs,t(c)]),As,Bs,Cs,n("a",js,[Ts,t(c)]),Ds,Rs,Es]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Ms]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Vs]]);export{Ys as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.caac507d.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.2d9f22b4.js similarity index 87% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.caac507d.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.2d9f22b4.js index eb9478c78..aed8a36d5 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.caac507d.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.2d9f22b4.js @@ -1 +1 @@ -const a={key:"v-644e73dc",path:"/id/references/keypairs-and-wallets.html",title:"Keypairs & Wallets",lang:"id-ID",frontmatter:{title:"Keypairs & Wallets",head:[["meta",{name:"title",content:"Buku Panduan Solana | Keypairs & Wallets"}],["meta",{name:"og:title",content:"Buku Panduan Solana | Keypairs & Wallets"}],["meta",{name:"description",content:"Belajar tentang Keypairs and Wallets, Signing dan Verifikasi Messages dan referensi lainnya di Buku Panduan Solana."}],["meta",{name:"og:description",content:"Belajar tentang Keypairs and Wallets, Signing dan Verifikasi Messages dan referensi lainnya di Buku Panduan Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Bagaimana cara membuat sebuah Keypair baru",slug:"bagaimana-cara-membuat-sebuah-keypair-baru",children:[]},{level:2,title:"Bagaimana cara me-restore sebuah Keypair dari sebuah secret",slug:"bagaimana-cara-me-restore-sebuah-keypair-dari-sebuah-secret",children:[]},{level:2,title:"Bagaimana cara menverifikasi sebuah Keypair",slug:"bagaimana-cara-menverifikasi-sebuah-keypair",children:[]},{level:2,title:"Bagaimana cara untuk check jika sebuah public key telah terhubung dengan sebuah private key",slug:"bagaimana-cara-untuk-check-jika-sebuah-public-key-telah-terhubung-dengan-sebuah-private-key",children:[]},{level:2,title:"Bagaimana cara membuat mnemonic phrase",slug:"bagaimana-cara-membuat-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara restore sebuah Keypair dari sebuah mnemonic phrase",slug:"bagaimana-cara-restore-sebuah-keypair-dari-sebuah-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara membuat sebuah vanity address",slug:"bagaimana-cara-membuat-sebuah-vanity-address",children:[]},{level:2,title:"Bagaimana cara untuk sign dan menverifikasi messages dalam wallet",slug:"bagaimana-cara-untuk-sign-dan-menverifikasi-messages-dalam-wallet",children:[]},{level:2,title:"Bagaimana cara mengkoneksi ke sebuah wallet",slug:"bagaimana-cara-mengkoneksi-ke-sebuah-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"akangaziz",email:"aziz@okadoc.com",commits:1}]},filePathRelative:"id/references/keypairs-and-wallets.md"};export{a as data}; +const a={key:"v-644e73dc",path:"/id/references/keypairs-and-wallets.html",title:"Keypairs & Wallets",lang:"id-ID",frontmatter:{title:"Keypairs & Wallets",head:[["meta",{name:"title",content:"Buku Panduan Solana | Keypairs & Wallets"}],["meta",{name:"og:title",content:"Buku Panduan Solana | Keypairs & Wallets"}],["meta",{name:"description",content:"Belajar tentang Keypairs and Wallets, Signing dan Verifikasi Messages dan referensi lainnya di Buku Panduan Solana."}],["meta",{name:"og:description",content:"Belajar tentang Keypairs and Wallets, Signing dan Verifikasi Messages dan referensi lainnya di Buku Panduan Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Bagaimana cara membuat sebuah Keypair baru",slug:"bagaimana-cara-membuat-sebuah-keypair-baru",children:[]},{level:2,title:"Bagaimana cara me-restore sebuah Keypair dari sebuah secret",slug:"bagaimana-cara-me-restore-sebuah-keypair-dari-sebuah-secret",children:[]},{level:2,title:"Bagaimana cara menverifikasi sebuah Keypair",slug:"bagaimana-cara-menverifikasi-sebuah-keypair",children:[]},{level:2,title:"Bagaimana cara untuk check jika sebuah public key telah terhubung dengan sebuah private key",slug:"bagaimana-cara-untuk-check-jika-sebuah-public-key-telah-terhubung-dengan-sebuah-private-key",children:[]},{level:2,title:"Bagaimana cara membuat mnemonic phrase",slug:"bagaimana-cara-membuat-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara restore sebuah Keypair dari sebuah mnemonic phrase",slug:"bagaimana-cara-restore-sebuah-keypair-dari-sebuah-mnemonic-phrase",children:[]},{level:2,title:"Bagaimana cara membuat sebuah vanity address",slug:"bagaimana-cara-membuat-sebuah-vanity-address",children:[]},{level:2,title:"Bagaimana cara untuk sign dan menverifikasi messages dalam wallet",slug:"bagaimana-cara-untuk-sign-dan-menverifikasi-messages-dalam-wallet",children:[]},{level:2,title:"Bagaimana cara mengkoneksi ke sebuah wallet",slug:"bagaimana-cara-mengkoneksi-ke-sebuah-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"akangaziz",email:"aziz@okadoc.com",commits:1}]},filePathRelative:"id/references/keypairs-and-wallets.md"};export{a as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.06b48140.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.38d07f14.js similarity index 92% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.06b48140.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.38d07f14.js index 6cb6675ad..e2c6827c8 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.06b48140.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.38d07f14.js @@ -1 +1 @@ -const e={key:"v-e6b8f3ba",path:"/th/references/keypairs-and-wallets.html",title:"Keypairs \u0E41\u0E25\u0E30 Wallets",lang:"th-TH",frontmatter:{title:"Keypairs \u0E41\u0E25\u0E30 Wallets",head:[["meta",{name:"title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | Keypairs \u0E41\u0E25\u0E30 Wallets"}],["meta",{name:"og:title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | Keypairs \u0E41\u0E25\u0E30 Wallets"}],["meta",{name:"description",content:"\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A Keypairs \u0E41\u0E25\u0E30 Wallets, Signing \u0E41\u0E25\u0E30 Verifying Messages \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana \u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana."}],["meta",{name:"og:description",content:"\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A Keypairs \u0E41\u0E25\u0E30 Wallets, Signing \u0E41\u0E25\u0E30 Verifying Messages \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana \u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E43\u0E2B\u0E21\u0E48",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 restore a Keypair from a secret",slug:"\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 verify a Keypair",slug:"\u0E27\u0E34\u0E18\u0E35-verify-a-keypair",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 check if a public key has an associated private key",slug:"\u0E27\u0E34\u0E18\u0E35-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49 Keypair \u0E08\u0E32\u0E01 mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49-keypair-\u0E08\u0E32\u0E01-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a vanity address",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-vanity-address",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 sign \u0E41\u0E25\u0E30 verify messages with wallets",slug:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A wallet",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Todsaporn Banjerdkit",email:"katopz@gmail.com",commits:1}]},filePathRelative:"th/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-e6b8f3ba",path:"/th/references/keypairs-and-wallets.html",title:"Keypairs \u0E41\u0E25\u0E30 Wallets",lang:"th-TH",frontmatter:{title:"Keypairs \u0E41\u0E25\u0E30 Wallets",head:[["meta",{name:"title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | Keypairs \u0E41\u0E25\u0E30 Wallets"}],["meta",{name:"og:title",content:"\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana | Keypairs \u0E41\u0E25\u0E30 Wallets"}],["meta",{name:"description",content:"\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A Keypairs \u0E41\u0E25\u0E30 Wallets, Signing \u0E41\u0E25\u0E30 Verifying Messages \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana \u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana."}],["meta",{name:"og:description",content:"\u0E40\u0E23\u0E35\u0E22\u0E19\u0E23\u0E39\u0E49\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A Keypairs \u0E41\u0E25\u0E30 Wallets, Signing \u0E41\u0E25\u0E30 Verifying Messages \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E1A\u0E19 Solana \u0E44\u0E14\u0E49\u0E17\u0E35\u0E48\u0E04\u0E39\u0E48\u0E21\u0E37\u0E2D Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E43\u0E2B\u0E21\u0E48",slug:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 restore a Keypair from a secret",slug:"\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 verify a Keypair",slug:"\u0E27\u0E34\u0E18\u0E35-verify-a-keypair",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 check if a public key has an associated private key",slug:"\u0E27\u0E34\u0E18\u0E35-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49 Keypair \u0E08\u0E32\u0E01 mnemonic phrase",slug:"\u0E27\u0E34\u0E18\u0E35\u0E01\u0E39\u0E49-keypair-\u0E08\u0E32\u0E01-mnemonic-phrase",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 generate a vanity address",slug:"\u0E27\u0E34\u0E18\u0E35-generate-a-vanity-address",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35 sign \u0E41\u0E25\u0E30 verify messages with wallets",slug:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets",children:[]},{level:2,title:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A wallet",slug:"\u0E27\u0E34\u0E18\u0E35\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D\u0E01\u0E31\u0E1A-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"Todsaporn Banjerdkit",email:"katopz@gmail.com",commits:1}]},filePathRelative:"th/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.06ba1dde.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.3a19760d.js similarity index 89% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.06ba1dde.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.3a19760d.js index 722b4f2d3..f9e1e981d 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.06ba1dde.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.3a19760d.js @@ -1 +1 @@ -const e={key:"v-0f01feda",path:"/pt/references/keypairs-and-wallets.html",title:"Pares de Chaves e Carteiras",lang:"pt-BR",frontmatter:{title:"Pares de Chaves e Carteiras",head:[["meta",{name:"title",content:"Livro de Receitas da Solana - Solana Cookbook | Pares de Chaves e Carteiras"}],["meta",{name:"og:title",content:"Livro de Receitas da Solana - Solana Cookbook | Pares de Chaves e Carteiras"}],["meta",{name:"description",content:"Aprenda sobre Pares de Chaves e Carteiras, Assinando e Verificando Mensagens e mais refer\xEAncias para Construir na Solana no Livro de Receitas da Solana."}],["meta",{name:"og:description",content:"Aprenda sobre Pares de Chaves e Carteiras, Assinando e Verificando Mensagens e mais refer\xEAncias para Construir na Solana no Livro de Receitas da Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Como gerar um novo Par de Chaves (Keypair)",slug:"como-gerar-um-novo-par-de-chaves-keypair",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma senha",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-senha",children:[]},{level:2,title:"Como verificar um Par de Chaves",slug:"como-verificar-um-par-de-chaves",children:[]},{level:2,title:"Como verificar se uma chave p\xFAblica tem uma chave privada associada",slug:"como-verificar-se-uma-chave-publica-tem-uma-chave-privada-associada",children:[]},{level:2,title:"Como gerar uma frase mnem\xF4nica",slug:"como-gerar-uma-frase-mnemonica",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma frase mnem\xF4nica",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-frase-mnemonica",children:[]},{level:2,title:"Como gerar um endere\xE7o personalizado",slug:"como-gerar-um-endereco-personalizado",children:[]},{level:2,title:"Como assinar e verificar mensagens com carteiras",slug:"como-assinar-e-verificar-mensagens-com-carteiras",children:[]},{level:2,title:"Como se conectar a uma carteira",slug:"como-se-conectar-a-uma-carteira",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1690516363e3,contributors:[{name:"Daniel Cukier",email:"danicuki@gmail.com",commits:1}]},filePathRelative:"pt/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-0f01feda",path:"/pt/references/keypairs-and-wallets.html",title:"Pares de Chaves e Carteiras",lang:"pt-BR",frontmatter:{title:"Pares de Chaves e Carteiras",head:[["meta",{name:"title",content:"Livro de Receitas da Solana - Solana Cookbook | Pares de Chaves e Carteiras"}],["meta",{name:"og:title",content:"Livro de Receitas da Solana - Solana Cookbook | Pares de Chaves e Carteiras"}],["meta",{name:"description",content:"Aprenda sobre Pares de Chaves e Carteiras, Assinando e Verificando Mensagens e mais refer\xEAncias para Construir na Solana no Livro de Receitas da Solana."}],["meta",{name:"og:description",content:"Aprenda sobre Pares de Chaves e Carteiras, Assinando e Verificando Mensagens e mais refer\xEAncias para Construir na Solana no Livro de Receitas da Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Como gerar um novo Par de Chaves (Keypair)",slug:"como-gerar-um-novo-par-de-chaves-keypair",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma senha",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-senha",children:[]},{level:2,title:"Como verificar um Par de Chaves",slug:"como-verificar-um-par-de-chaves",children:[]},{level:2,title:"Como verificar se uma chave p\xFAblica tem uma chave privada associada",slug:"como-verificar-se-uma-chave-publica-tem-uma-chave-privada-associada",children:[]},{level:2,title:"Como gerar uma frase mnem\xF4nica",slug:"como-gerar-uma-frase-mnemonica",children:[]},{level:2,title:"Como restaurar um Par de Chaves a partir de uma frase mnem\xF4nica",slug:"como-restaurar-um-par-de-chaves-a-partir-de-uma-frase-mnemonica",children:[]},{level:2,title:"Como gerar um endere\xE7o personalizado",slug:"como-gerar-um-endereco-personalizado",children:[]},{level:2,title:"Como assinar e verificar mensagens com carteiras",slug:"como-assinar-e-verificar-mensagens-com-carteiras",children:[]},{level:2,title:"Como se conectar a uma carteira",slug:"como-se-conectar-a-uma-carteira",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Daniel Cukier",email:"danicuki@gmail.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"pt/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c422ff4.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.3f5752cd.js similarity index 90% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c422ff4.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.3f5752cd.js index bd2946c25..e5e34f56d 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c422ff4.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.3f5752cd.js @@ -1 +1 @@ -const e={key:"v-4ec78794",path:"/de/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"de-DE",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Kochbuch | Schl\xFCsselpaare und Geldb\xF6rsen"}],["meta",{name:"og:title",content:"Solana Kochbuch | Schl\xFCsselpaare und Geldb\xF6rsen"}],["meta",{name:"description",content:"Erfahren Sie mehr \xFCber Schl\xFCsselpaare und Wallets, das Signieren und Verifizieren von Nachrichten und weitere Referenzen f\xFCr Building on Solana im Solana-Kochbuch."}],["meta",{name:"og:description",content:"Erfahren Sie mehr \xFCber Schl\xFCsselpaare und Wallets, das Signieren und Verifizieren von Nachrichten und weitere Referenzen f\xFCr Building on Solana im Solana-Kochbuch."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"So generieren Sie ein neues Schl\xFCsselpaar",slug:"so-generieren-sie-ein-neues-schlusselpaar",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einem Geheimnis wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einem-geheimnis-wieder-her",children:[]},{level:2,title:"So verifizieren Sie ein Schl\xFCsselpaar",slug:"so-verifizieren-sie-ein-schlusselpaar",children:[]},{level:2,title:"So \xFCberpr\xFCfen Sie, ob ein \xF6ffentlicher Schl\xFCssel einen zugeh\xF6rigen privaten Schl\xFCssel hat",slug:"so-uberprufen-sie-ob-ein-offentlicher-schlussel-einen-zugehorigen-privaten-schlussel-hat",children:[]},{level:2,title:"Wie man eine mnemonische Phrase generiert",slug:"wie-man-eine-mnemonische-phrase-generiert",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einer mnemonischen Phrase wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einer-mnemonischen-phrase-wieder-her",children:[]},{level:2,title:"So generieren Sie eine Vanity-Adresse",slug:"so-generieren-sie-eine-vanity-adresse",children:[]},{level:2,title:"So signieren und verifizieren Sie Nachrichten mit Wallets",slug:"so-signieren-und-verifizieren-sie-nachrichten-mit-wallets",children:[]},{level:2,title:"So verbinden Sie sich mit einer Brieftasche",slug:"so-verbinden-sie-sich-mit-einer-brieftasche",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"nyk",email:"93952610+0xNyk@users.noreply.github.com",commits:1}]},filePathRelative:"de/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-4ec78794",path:"/de/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"de-DE",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Kochbuch | Schl\xFCsselpaare und Geldb\xF6rsen"}],["meta",{name:"og:title",content:"Solana Kochbuch | Schl\xFCsselpaare und Geldb\xF6rsen"}],["meta",{name:"description",content:"Erfahren Sie mehr \xFCber Schl\xFCsselpaare und Wallets, das Signieren und Verifizieren von Nachrichten und weitere Referenzen f\xFCr Building on Solana im Solana-Kochbuch."}],["meta",{name:"og:description",content:"Erfahren Sie mehr \xFCber Schl\xFCsselpaare und Wallets, das Signieren und Verifizieren von Nachrichten und weitere Referenzen f\xFCr Building on Solana im Solana-Kochbuch."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"So generieren Sie ein neues Schl\xFCsselpaar",slug:"so-generieren-sie-ein-neues-schlusselpaar",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einem Geheimnis wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einem-geheimnis-wieder-her",children:[]},{level:2,title:"So verifizieren Sie ein Schl\xFCsselpaar",slug:"so-verifizieren-sie-ein-schlusselpaar",children:[]},{level:2,title:"So \xFCberpr\xFCfen Sie, ob ein \xF6ffentlicher Schl\xFCssel einen zugeh\xF6rigen privaten Schl\xFCssel hat",slug:"so-uberprufen-sie-ob-ein-offentlicher-schlussel-einen-zugehorigen-privaten-schlussel-hat",children:[]},{level:2,title:"Wie man eine mnemonische Phrase generiert",slug:"wie-man-eine-mnemonische-phrase-generiert",children:[]},{level:2,title:"So stellen Sie ein Schl\xFCsselpaar aus einer mnemonischen Phrase wieder her",slug:"so-stellen-sie-ein-schlusselpaar-aus-einer-mnemonischen-phrase-wieder-her",children:[]},{level:2,title:"So generieren Sie eine Vanity-Adresse",slug:"so-generieren-sie-eine-vanity-adresse",children:[]},{level:2,title:"So signieren und verifizieren Sie Nachrichten mit Wallets",slug:"so-signieren-und-verifizieren-sie-nachrichten-mit-wallets",children:[]},{level:2,title:"So verbinden Sie sich mit einer Brieftasche",slug:"so-verbinden-sie-sich-mit-einer-brieftasche",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"nyk",email:"93952610+0xNyk@users.noreply.github.com",commits:1}]},filePathRelative:"de/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.cc8fbf04.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.45fae5f1.js similarity index 97% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.cc8fbf04.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.45fae5f1.js index c3862323f..8a5341628 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.cc8fbf04.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.45fae5f1.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"paires-de-cles-keypair-et-portefeuilles",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paires-de-cles-keypair-et-portefeuilles","aria-hidden":"true"},"#"),s(" Paires de Cl\xE9s (Keypair) et Portefeuilles")],-1),d=n("h2",{id:"comment-generer-une-nouvelle-paire-de-cles",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-generer-une-nouvelle-paire-de-cles","aria-hidden":"true"},"#"),s(" Comment g\xE9n\xE9rer une nouvelle Paire de Cl\xE9s")],-1),y=n("p",null,"La plupart des actions que vous pouvez effectuer avec les diverses biblioth\xE8ques de Solana n\xE9cessitent une Paire de Cl\xE9s ou un Portefeuille. Si vous vous connectez \xE0 un portefeuille, vous n'avez pas \xE0 vous inqui\xE9ter. Cependant, si vous avez besoin d'une paire de cl\xE9s, vous devrez en g\xE9n\xE9rer une.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"paires-de-cles-keypair-et-portefeuilles",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paires-de-cles-keypair-et-portefeuilles","aria-hidden":"true"},"#"),s(" Paires de Cl\xE9s (Keypair) et Portefeuilles")],-1),d=n("h2",{id:"comment-generer-une-nouvelle-paire-de-cles",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-generer-une-nouvelle-paire-de-cles","aria-hidden":"true"},"#"),s(" Comment g\xE9n\xE9rer une nouvelle Paire de Cl\xE9s")],-1),y=n("p",null,"La plupart des actions que vous pouvez effectuer avec les diverses biblioth\xE8ques de Solana n\xE9cessitent une Paire de Cl\xE9s ou un Portefeuille. Si vous vous connectez \xE0 un portefeuille, vous n'avez pas \xE0 vous inqui\xE9ter. Cependant, si vous avez besoin d'une paire de cl\xE9s, vous devrez en g\xE9n\xE9rer une.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -32,8 +38,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),P=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s(`$ solana-keygen new `),n("span",{class:"token comment"},"# pubkey: 9ZNTfG4NyQgxy2SWjSiQoUyBPEvXT2xo7fKc5hPYYJ7b"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),C=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),W=n("h2",{id:"comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee","aria-hidden":"true"},"#"),s(" Comment restaurer une Paire de cl\xE9s \xE0 partir d'une cl\xE9 priv\xE9e")],-1),S=n("p",null,"Si vous disposez d\xE9j\xE0 de votre cl\xE9 priv\xE9e, vous pouvez g\xE9n\xE9rer une Paire de Cl\xE9s \xE0 partir de celle-ci pour tester votre dApp.",-1),A=n("ol",null,[n("li",null,"\xC0 partir des Bytes")],-1),q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),W=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),C=n("h2",{id:"comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee","aria-hidden":"true"},"#"),s(" Comment restaurer une Paire de cl\xE9s \xE0 partir d'une cl\xE9 priv\xE9e")],-1),S=n("p",null,"Si vous disposez d\xE9j\xE0 de votre cl\xE9 priv\xE9e, vous pouvez g\xE9n\xE9rer une Paire de Cl\xE9s \xE0 partir de celle-ci pour tester votre dApp.",-1),A=n("ol",null,[n("li",null,"\xC0 partir des Bytes")],-1),q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` @@ -138,10 +144,10 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),H=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -171,7 +177,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(` @@ -182,7 +188,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),G=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("pubkey "),n("span",{class:"token keyword"},"import"),s(` Pubkey public_key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),vn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -320,21 +330,24 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"slice"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Cn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Wn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"slice"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),Sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),qn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),zn=n("ol",{start:"2"},[n("li",null,"BIP44 (portefeuilles multiples, \xE9galement appel\xE9s HD wallets)")],-1),jn=n("p",null,`Vous pouvez cr\xE9er plusieurs portefeuilles \xE0 partir d'une seule seed, \xE9galement appel\xE9s "Portefeuilles D\xE9terministes Hi\xE9rarchiques" ou portefeuilles HD :`,-1),Tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` @@ -404,7 +417,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"comment-signer-et-verifier-des-messages-avec-les-portefeuilles",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-signer-et-verifier-des-messages-avec-les-portefeuilles","aria-hidden":"true"},"#"),s(" Comment signer et v\xE9rifier des messages avec les portefeuilles")],-1),$n=n("p",null,"La fonction premi\xE8re d'une paire de cl\xE9s est de signer des messages et de permettre la v\xE9rification de la signature. La v\xE9rification d'une signature permet au destinataire d'\xEAtre s\xFBr que les donn\xE9es ont \xE9t\xE9 sign\xE9es par le propri\xE9taire d'une cl\xE9 priv\xE9e sp\xE9cifique.",-1),Gn=s("Pour ce faire, nous allons importer la biblioth\xE8que cryptographique "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s("."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"comment-signer-et-verifier-des-messages-avec-les-portefeuilles",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-signer-et-verifier-des-messages-avec-les-portefeuilles","aria-hidden":"true"},"#"),s(" Comment signer et v\xE9rifier des messages avec les portefeuilles")],-1),Gn=n("p",null,"La fonction premi\xE8re d'une paire de cl\xE9s est de signer des messages et de permettre la v\xE9rification de la signature. La v\xE9rification d'une signature permet au destinataire d'\xEAtre s\xFBr que les donn\xE9es ont \xE9t\xE9 sign\xE9es par le propri\xE9taire d'une cl\xE9 priv\xE9e sp\xE9cifique.",-1),$n=s("Pour ce faire, nous allons importer la biblioth\xE8que cryptographique "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s("."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -595,14 +608,14 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br")])],-1),Cs=n("div",{class:"language-vue ext-vue line-numbers-mode"},[n("pre",{class:"language-vue"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),s(),n("span",{class:"token attr-name"},"setup"),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br")])],-1),Ws=n("div",{class:"language-vue ext-vue line-numbers-mode"},[n("pre",{class:"language-vue"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),s(),n("span",{class:"token attr-name"},"setup"),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" WalletMultiButton "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"solana-wallets-vue"'),n("span",{class:"token punctuation"},";"),s(` `)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    Ex\xE9cutez la commande suivante pour installer les d\xE9pendances requises :

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cs=u(`

    Svelte

    Ex\xE9cutez la commande suivante pour installer les d\xE9pendances requises :

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     
    `,3),Ss=s("Le package "),As={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},qs=s("Svelte Wallet Adapter"),zs=s(" package permet d'ajouter un Store Svelte ("),js=n("code",null,"$walletStore",-1),Ts=s(") accessible parmi tous les fichiers JS, TS et/ou Svelte \xE0 l'int\xE9rieur d'un projet r\xE9alis\xE9 avec Svelte Template ou SvelteKit. En utilisant le r\xE9pertoire de r\xE9f\xE9rence "),Ds={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Rs=s("ici"),Ns=s(" vous pouvez utiliser l'adaptateur pour SSR ou SPA. Le package UI contient un composant "),Bs=n("code",null,"",-1),Es=s(" pour permettre aux utilisateurs de s\xE9lectionner un portefeuille et de s'y connecter."),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Vs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[C]),_:1})]),_:1}),W,S,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[q]),preview:a(()=>[z]),_:1}),t(e,{title:"Python"},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[N]),preview:a(()=>[B]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[M]),_:1})]),_:1}),L,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[J]),preview:a(()=>[U]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[H]),_:1}),t(e,{title:"Rust"},{default:a(()=>[Y]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[vn]),preview:a(()=>[_n]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Wn]),preview:a(()=>[Sn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[qn]),_:1})]),_:1}),zn,jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Tn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Nn]),_:1})]),_:1}),Bn,En,Mn,Ln,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Jn]),preview:a(()=>[Un]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Hn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Yn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,vs,_s,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Cs]),_:1})]),_:1}),Ws,n("p",null,[Ss,n("a",As,[qs,t(c)]),zs,js,Ts,n("a",Ds,[Rs,t(c)]),Ns,Bs,Es]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Ls]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Js]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Vs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),C,S,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[q]),preview:a(()=>[z]),_:1}),t(e,{title:"Python"},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[N]),preview:a(()=>[B]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[M]),_:1})]),_:1}),L,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[J]),preview:a(()=>[U]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[H]),_:1}),t(e,{title:"Rust"},{default:a(()=>[Y]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[vn]),preview:a(()=>[_n]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Cn]),preview:a(()=>[Sn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[qn]),_:1})]),_:1}),zn,jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Tn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Nn]),_:1})]),_:1}),Bn,En,Mn,Ln,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Jn]),preview:a(()=>[Un]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Hn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Yn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,vs,_s,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ws]),_:1})]),_:1}),Cs,n("p",null,[Ss,n("a",As,[qs,t(c)]),zs,js,Ts,n("a",Ds,[Rs,t(c)]),Ns,Bs,Es]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Ls]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Js]]);export{Ys as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.5d3230ee.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.5b84c000.js similarity index 70% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.5d3230ee.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.5b84c000.js index 442b9864d..054730471 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.5d3230ee.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.5b84c000.js @@ -1 +1 @@ -const e={key:"v-4dc29afa",path:"/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"en-US",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1707300921e3,contributors:[{name:"Jacob Creech",email:"jacob.creech@solana.com",commits:2},{name:"Dhruv Varshney",email:"f20200865@pilani.bits-pilani.ac.in",commits:1},{name:"Jacob Creech",email:"82475023+jacobcreech@users.noreply.github.com",commits:1},{name:"Kevin Heavey",email:"24635973+kevinheavey@users.noreply.github.com",commits:1},{name:"Mike MacCana",email:"mike.maccana@gmail.com",commits:1},{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Silvestre Vivo",email:"silvestrevivomillan@gmail.com",commits:1},{name:"Stella Wang",email:"46392676+stellaw1@users.noreply.github.com",commits:1},{name:"AndyNft",email:"95853315+AndyNft@users.noreply.github.com",commits:1},{name:"dboures",email:"deanboures@gmail.com",commits:1}]},filePathRelative:"references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-4dc29afa",path:"/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"en-US",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Jacob Creech",email:"jacob.creech@solana.com",commits:2},{name:"AndyNft",email:"95853315+AndyNft@users.noreply.github.com",commits:1},{name:"Dhruv Varshney",email:"f20200865@pilani.bits-pilani.ac.in",commits:1},{name:"Jacob Creech",email:"82475023+jacobcreech@users.noreply.github.com",commits:1},{name:"Kevin Heavey",email:"24635973+kevinheavey@users.noreply.github.com",commits:1},{name:"Mike MacCana",email:"mike.maccana@gmail.com",commits:1},{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Silvestre Vivo",email:"silvestrevivomillan@gmail.com",commits:1},{name:"Stella Wang",email:"46392676+stellaw1@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"dboures",email:"deanboures@gmail.com",commits:1}]},filePathRelative:"references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.41fab86d.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.731d8b2d.js similarity index 96% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.41fab86d.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.731d8b2d.js index cda74e055..0ce6d43bd 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.41fab86d.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.731d8b2d.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"keypairs-\u0E41\u0E25\u0E30-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-\u0E41\u0E25\u0E30-wallets","aria-hidden":"true"},"#"),s(" Keypairs \u0E41\u0E25\u0E30 Wallets")],-1),d=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E43\u0E2B\u0E21\u0E48")],-1),y=n("p",null,"actions \u0E15\u0E48\u0E32\u0E07\u0E46 \u0E1A\u0E19 Solana libraries \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 Keypair \u0E2B\u0E23\u0E37\u0E2D Wallet \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E01\u0E31\u0E1A wallet \u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E23\u0E32\u0E01\u0E47\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2B\u0E48\u0E27\u0E07\u0E2D\u0E30\u0E44\u0E23 \u0E2B\u0E23\u0E37\u0E2D\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 keypair \u0E40\u0E23\u0E32\u0E01\u0E47\u0E41\u0E04\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E21\u0E31\u0E19\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"keypairs-\u0E41\u0E25\u0E30-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-\u0E41\u0E25\u0E30-wallets","aria-hidden":"true"},"#"),s(" Keypairs \u0E41\u0E25\u0E30 Wallets")],-1),d=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-keypair-\u0E43\u0E2B\u0E21\u0E48","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E43\u0E2B\u0E21\u0E48")],-1),y=n("p",null,"actions \u0E15\u0E48\u0E32\u0E07\u0E46 \u0E1A\u0E19 Solana libraries \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 Keypair \u0E2B\u0E23\u0E37\u0E2D Wallet \u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E01\u0E31\u0E1A wallet \u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E23\u0E32\u0E01\u0E47\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2B\u0E48\u0E27\u0E07\u0E2D\u0E30\u0E44\u0E23 \u0E2B\u0E23\u0E37\u0E2D\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 keypair \u0E40\u0E23\u0E32\u0E01\u0E47\u0E41\u0E04\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E21\u0E31\u0E19\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),v=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -33,7 +39,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token comment"},"# pubkey: 9ZNTfG4NyQgxy2SWjSiQoUyBPEvXT2xo7fKc5hPYYJ7b"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),W=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 restore a Keypair from a secret")],-1),C=n("p",null,"\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E21\u0E35 secret \u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E08\u0E32\u0E01 secret \u0E19\u0E31\u0E49\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E14\u0E2A\u0E2D\u0E1A dApp \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22",-1),A=n("ol",null,[n("li",null,"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E08\u0E32\u0E01 Bytes")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-restore-a-keypair-from-a-secret","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 restore a Keypair from a secret")],-1),A=n("p",null,"\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E21\u0E35 secret \u0E2D\u0E22\u0E39\u0E48\u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E23\u0E49\u0E32\u0E07 Keypair \u0E08\u0E32\u0E01 secret \u0E19\u0E31\u0E49\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E14\u0E2A\u0E2D\u0E1A dApp \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49\u0E40\u0E25\u0E22",-1),C=n("ol",null,[n("li",null,"\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E08\u0E32\u0E01 Bytes")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` @@ -64,7 +70,7 @@ secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token p keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),B=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),N=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),D=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -88,14 +94,14 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),z=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),N=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"63"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"176"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"109"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"168"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"238"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"135"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-verify-a-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-verify-a-keypair","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 verify a Keypair")],-1),X=n("p",null,"\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49 keypair \u0E21\u0E32 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E21\u0E31\u0E19\u0E44\u0E14\u0E49\u0E27\u0E48\u0E32 secret \u0E19\u0E31\u0E49\u0E19\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A public key \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E1B\u0E25\u0E48\u0E32",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-verify-a-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-verify-a-keypair","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 verify a Keypair")],-1),I=n("p",null,"\u0E16\u0E49\u0E32\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49 keypair \u0E21\u0E32 \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E21\u0E31\u0E19\u0E44\u0E14\u0E49\u0E27\u0E48\u0E32 secret \u0E19\u0E31\u0E49\u0E19\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A public key \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E1B\u0E25\u0E48\u0E32",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -171,7 +177,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(` @@ -182,7 +188,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),G=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("pubkey "),n("span",{class:"token keyword"},"import"),s(` Pubkey public_key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),vn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,15 +338,18 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E2B\u0E25\u0E32\u0E22 wallets \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 HD wallets)")],-1),Rn=n("p",null,"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E2B\u0E25\u0E32\u0E22 wallets \u0E08\u0E32\u0E01 seed \u0E40\u0E14\u0E35\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 'Hierarchical Deterministic wallets' \u0E2B\u0E23\u0E37\u0E2D HD wallets:",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E2B\u0E25\u0E32\u0E22 wallets \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 HD wallets)")],-1),Rn=n("p",null,"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E2B\u0E25\u0E32\u0E22 wallets \u0E08\u0E32\u0E01 seed \u0E40\u0E14\u0E35\u0E22\u0E27\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 'Hierarchical Deterministic wallets' \u0E2B\u0E23\u0E37\u0E2D HD wallets:",-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -359,8 +372,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Nn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-generate-a-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-generate-a-vanity-address","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 generate a vanity address")],-1),En=n("p",null,'Vanity public keys \u0E2B\u0E23\u0E37\u0E2D custom addresses \u0E04\u0E37\u0E2D keys \u0E17\u0E35\u0E48\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23\u0E17\u0E35\u0E48\u0E40\u0E09\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E32\u0E30\u0E08\u0E07 \u0E40\u0E0A\u0E48\u0E19 \u0E40\u0E23\u0E32\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 publickey \u0E17\u0E35\u0E48\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "elv1s" \u0E2B\u0E23\u0E37\u0E2D "cook" \u0E0B\u0E36\u0E48\u0E07\u0E21\u0E31\u0E19\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E08\u0E33\u0E44\u0E14\u0E07\u0E48\u0E32\u0E22\u0E02\u0E36\u0E49\u0E19\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E2D\u0E07\u0E43\u0E04\u0E23 \u0E17\u0E33\u0E43\u0E2B\u0E49 key \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E41\u0E22\u0E01\u0E41\u0E22\u0E30\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49\u0E07\u0E48\u0E32\u0E22\u0E02\u0E36\u0E49\u0E19',-1),Jn=n("p",null,"Note: \u0E22\u0E34\u0E48\u0E07\u0E23\u0E30\u0E1A\u0E38 characters \u0E43\u0E19 vanity address \u0E21\u0E32\u0E01\u0E40\u0E17\u0E48\u0E32\u0E44\u0E2B\u0E23\u0E48 \u0E01\u0E47\u0E08\u0E30\u0E22\u0E34\u0E48\u0E07\u0E43\u0E0A\u0E49\u0E40\u0E27\u0E25\u0E32\u0E43\u0E19\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32 address \u0E19\u0E32\u0E19\u0E02\u0E36\u0E49\u0E19",-1),Un=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"\u0E04\u0E38\u0E13\u0E04\u0E27\u0E23\u0E43\u0E0A\u0E49 CLI \u0E43\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 \u0E17\u0E31\u0E49\u0E07\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 Python \u0E41\u0E25\u0E30 TypeScript \u0E40\u0E1B\u0E47\u0E19\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E41\u0E04\u0E48\u0E01\u0E32\u0E23\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E47\u0E19\u0E20\u0E32\u0E1E\u0E21\u0E32\u0E01\u0E02\u0E36\u0E49\u0E19\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19 \u0E41\u0E25\u0E30\u0E21\u0E31\u0E19\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E0A\u0E49\u0E32\u0E01\u0E27\u0E48\u0E32\u0E1A\u0E19 CLI \u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22")],-1),Hn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -369,11 +382,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Yn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` @@ -402,9 +415,9 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 sign \u0E41\u0E25\u0E30 verify messages with wallets")],-1),$n=n("p",null,"function \u0E2B\u0E25\u0E31\u0E01\u0E02\u0E2D\u0E07 keypair \u0E04\u0E37\u0E2D sign message \u0E41\u0E25\u0E30\u0E22\u0E31\u0E07\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A signature \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 \u0E0B\u0E36\u0E48\u0E07\u0E01\u0E32\u0E23\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A signature \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E44\u0E14\u0E49\u0E27\u0E48\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E16\u0E39\u0E01 sign \u0E14\u0E49\u0E27\u0E22\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 private key \u0E19\u0E31\u0E49\u0E19\u0E08\u0E23\u0E34\u0E07\u0E46",-1),Gn=s("\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E17\u0E33\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E40\u0E23\u0E32\u0E08\u0E30 import "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" crypto library \u0E21\u0E32\u0E43\u0E0A\u0E49"),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-sign-\u0E41\u0E25\u0E30-verify-messages-with-wallets","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 sign \u0E41\u0E25\u0E30 verify messages with wallets")],-1),Gn=n("p",null,"function \u0E2B\u0E25\u0E31\u0E01\u0E02\u0E2D\u0E07 keypair \u0E04\u0E37\u0E2D sign message \u0E41\u0E25\u0E30\u0E22\u0E31\u0E07\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A signature \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 \u0E0B\u0E36\u0E48\u0E07\u0E01\u0E32\u0E23\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A signature \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E23\u0E31\u0E1A\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E44\u0E14\u0E49\u0E27\u0E48\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E16\u0E39\u0E01 sign \u0E14\u0E49\u0E27\u0E22\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 private key \u0E19\u0E31\u0E49\u0E19\u0E08\u0E23\u0E34\u0E07\u0E46",-1),$n=s("\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E17\u0E33\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E40\u0E23\u0E32\u0E08\u0E30 import "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" crypto library \u0E21\u0E32\u0E43\u0E0A\u0E49"),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    Run \u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 dependencies \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Cs=s("Svelte Wallet Adapter"),As=s(" package \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21 Svelte Store ("),js=n("code",null,"$walletStore",-1),Ts=s(") \u0E17\u0E35\u0E48\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07 JS, TS \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D Svelte files \u0E43\u0E19 project \u0E17\u0E35\u0E48\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E14\u0E49\u0E27\u0E22 Svelte Template \u0E2B\u0E23\u0E37\u0E2D SvelteKit. \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 repo "),Rs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ds=s("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),Ns=s(" \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49 adapter \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A SSR \u0E2B\u0E23\u0E37\u0E2D SPA. \u0E2A\u0E48\u0E27\u0E19 UI package \u0E08\u0E30\u0E21\u0E35 "),zs=n("code",null,"",-1),Bs=s(" component \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E30\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D wallet \u0E44\u0E14\u0E49"),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    Run \u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 dependencies \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},As=s("Svelte Wallet Adapter"),Cs=s(" package \u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21 Svelte Store ("),js=n("code",null,"$walletStore",-1),Ts=s(") \u0E17\u0E35\u0E48\u0E40\u0E02\u0E49\u0E32\u0E16\u0E36\u0E07\u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07 JS, TS \u0E41\u0E25\u0E30/\u0E2B\u0E23\u0E37\u0E2D Svelte files \u0E43\u0E19 project \u0E17\u0E35\u0E48\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E14\u0E49\u0E27\u0E22 Svelte Template \u0E2B\u0E23\u0E37\u0E2D SvelteKit. \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 repo "),Rs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Bs=s("\u0E17\u0E35\u0E48\u0E19\u0E35\u0E48"),Ds=s(" \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49 adapter \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A SSR \u0E2B\u0E23\u0E37\u0E2D SPA. \u0E2A\u0E48\u0E27\u0E19 UI package \u0E08\u0E30\u0E21\u0E35 "),Ns=n("code",null,"",-1),zs=s(" component \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E25\u0E30\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E15\u0E48\u0E2D wallet \u0E44\u0E14\u0E49"),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[v]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,C,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[R]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[N]),preview:a(()=>[z]),_:1}),t(e,{title:"Rust"},{default:a(()=>[B]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[vn]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Rn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[zn]),preview:a(()=>[Bn]),_:1})]),_:1}),Mn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,ws,_s,n("a",vs,[fs,t(c)]),xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[Cs,t(c)]),As,js,Ts,n("a",Rs,[Ds,t(c)]),Ns,zs,Bs]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Js]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[v]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[R]),preview:a(()=>[B]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[N]),_:1}),t(e,{title:"Rust"},{default:a(()=>[z]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[vn]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Rn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Bn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Nn]),preview:a(()=>[zn]),_:1})]),_:1}),Mn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,ws,_s,n("a",vs,[fs,t(c)]),xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[As,t(c)]),Cs,js,Ts,n("a",Rs,[Bs,t(c)]),Ds,Ns,zs]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Vs=l(b,[["render",Js]]);export{Vs as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c453b59.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.73be0d40.js similarity index 96% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c453b59.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.73be0d40.js index e84fba4e7..263160c7c 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c453b59.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.73be0d40.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5BC6\u9470\u5C0D\u548C\u9322\u5305","aria-hidden":"true"},"#"),s(" \u5BC6\u9470\u5C0D\u548C\u9322\u5305")],-1),d=n("h2",{id:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D")],-1),y=n("p",null,"\u5C0D\u65BC\u4F7F\u7528Solana\u5EAB\u57F7\u884C\u5404\u7A2E\u64CD\u4F5C\uFF0C\u8A31\u591A\u64CD\u4F5C\u90FD\u9700\u8981\u4E00\u500B\u5BC6\u9470\u5C0D\u6216\u9322\u5305\u3002\u5982\u679C\u4F60\u6B63\u5728\u9023\u63A5\u5230\u4E00\u500B\u9322\u5305\uFF0C\u90A3\u9EBC\u4F60\u4E0D\u5FC5\u64D4\u5FC3\u3002\u7136\u800C\uFF0C\u5982\u679C\u4F60\u9700\u8981\u4E00\u500B\u5BC6\u9470\u5C0D\uFF0C\u4F60\u6703\u9700\u8981\u751F\u6210\u4E00\u500B\u3002",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5BC6\u9470\u5C0D\u548C\u9322\u5305","aria-hidden":"true"},"#"),s(" \u5BC6\u9470\u5C0D\u548C\u9322\u5305")],-1),d=n("h2",{id:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D")],-1),y=n("p",null,"\u5C0D\u65BC\u4F7F\u7528Solana\u5EAB\u57F7\u884C\u5404\u7A2E\u64CD\u4F5C\uFF0C\u8A31\u591A\u64CD\u4F5C\u90FD\u9700\u8981\u4E00\u500B\u5BC6\u9470\u5C0D\u6216\u9322\u5305\u3002\u5982\u679C\u4F60\u6B63\u5728\u9023\u63A5\u5230\u4E00\u500B\u9322\u5305\uFF0C\u90A3\u9EBC\u4F60\u4E0D\u5FC5\u64D4\u5FC3\u3002\u7136\u800C\uFF0C\u5982\u679C\u4F60\u9700\u8981\u4E00\u500B\u5BC6\u9470\u5C0D\uFF0C\u4F60\u6703\u9700\u8981\u751F\u6210\u4E00\u500B\u3002",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),f=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -33,7 +39,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token comment"},"# pubkey: 9ZNTfG4NyQgxy2SWjSiQoUyBPEvXT2xo7fKc5hPYYJ7b"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),W=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D")],-1),C=n("p",null,"\u5982\u679C\u4F60\u5DF2\u7D93\u6709\u4E86\u5BC6\u9470\uFF0C\u4F60\u53EF\u4EE5\u901A\u904E\u9019\u500B\u5BC6\u9470\u7372\u53D6\u5BC6\u9470\u5C0D\uFF0C\u4EE5\u6E2C\u8A66\u4F60\u7684dApp\u3002",-1),A=n("ol",null,[n("li",null,"\u5F9E\u5B57\u7BC0\u4E2D\uFF1A")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D")],-1),A=n("p",null,"\u5982\u679C\u4F60\u5DF2\u7D93\u6709\u4E86\u5BC6\u9470\uFF0C\u4F60\u53EF\u4EE5\u901A\u904E\u9019\u500B\u5BC6\u9470\u7372\u53D6\u5BC6\u9470\u5C0D\uFF0C\u4EE5\u6E2C\u8A66\u4F60\u7684dApp\u3002",-1),C=n("ol",null,[n("li",null,"\u5F9E\u5B57\u7BC0\u4E2D\uFF1A")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` @@ -64,7 +70,7 @@ secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token p keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),B=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),D=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -88,7 +94,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D")],-1),X=n("p",null,"\u5982\u679C\u4F60\u6709\u4E86\u500B\u5BC6\u9470\u5C0D\uFF0C\u4F60\u53EF\u4EE5\u9A57\u8B49\u5BC6\u9470\u5C0D\u7684\u79C1\u9470\u662F\u5426\u8207\u7D66\u5B9A\u7684\u516C\u9470\u5339\u914D\u3002",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D")],-1),I=n("p",null,"\u5982\u679C\u4F60\u6709\u4E86\u500B\u5BC6\u9470\u5C0D\uFF0C\u4F60\u53EF\u4EE5\u9A57\u8B49\u5BC6\u9470\u5C0D\u7684\u79C1\u9470\u662F\u5426\u8207\u7D66\u5B9A\u7684\u516C\u9470\u5339\u914D\u3002",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),fn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,15 +338,18 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 \uFF08\u591A\u500B\u9322\u5305\uFF0C\u4E5F\u53EBHD\u9322\u5305\uFF09")],-1),zn=n("p",null,"\u4F60\u53EF\u4EE5\u5F9E\u4E00\u500B\u55AE\u4E00\u7A2E\u5B50\u751F\u6210\u591A\u500B\u9322\u5305\uFF0C\u4E5F\u88AB\u7A31\u7232\u201C\u5206\u5C64\u78BA\u5B9A\u6027\u9322\u5305\u201D\u6216HD\u9322\u5305\u3002",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 \uFF08\u591A\u500B\u9322\u5305\uFF0C\u4E5F\u53EBHD\u9322\u5305\uFF09")],-1),zn=n("p",null,"\u4F60\u53EF\u4EE5\u5F9E\u4E00\u500B\u55AE\u4E00\u7A2E\u5B50\u751F\u6210\u591A\u500B\u9322\u5305\uFF0C\u4E5F\u88AB\u7A31\u7232\u201C\u5206\u5C64\u78BA\u5B9A\u6027\u9322\u5305\u201D\u6216HD\u9322\u5305\u3002",-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Rn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -359,7 +372,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740-vanity-address","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740(vanity address)")],-1),En=n("p",null,'\u81EA\u5B9A\u7FA9\u516C\u9470\u6216\u5730\u5740\uFF08Vanity Address\uFF09\u662F\u4EE5\u7279\u5B9A\u5B57\u7B26\u958B\u982D\u7684\u5BC6\u9470\u3002\u4F8B\u5982\uFF0C\u4E00\u500B\u4EBA\u53EF\u80FD\u5E0C\u671B\u516C\u9470\u4EE5 "elv1s" \u6216 "cook" \u958B\u982D\uFF0C\u9019\u6A23\u53EF\u4EE5\u5E6B\u52A9\u4ED6\u4EBA\u8A18\u4F4F\u5BC6\u9470\u6240\u5C6C\u7684\u4EBA\uFF0C\u4F7F\u5BC6\u9470\u66F4\u5BB9\u6613\u8B58\u5225\u3002',-1),Jn=n("p",null,"\u6CE8\u610F: \u81EA\u5B9A\u7FA9\u5730\u5740\u4E2D\u5B57\u7B26\u7684\u6578\u91CF\u8D8A\u591A\uFF0C\u751F\u6210\u6642\u9593\u5C07\u6703\u66F4\u9577\u3002",-1),Un=n("p",null,"::: \u8B66\u544A \u5728\u6B64\u4EFB\u52D9\u4E2D\uFF0C\u60A8\u61C9\u8A72\u4F7F\u7528\u547D\u4EE4\u884C\u754C\u9762\uFF08CLI\uFF09\u3002Python\u548CTypeScript\u7684\u793A\u4F8B\u50C5\u7528\u65BC\u8AAA\u660E\uFF0C\u901F\u5EA6\u6BD4CLI\u6162\u5F97\u591A\u3002 :::",-1),Hn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` @@ -369,11 +382,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Yn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` @@ -402,8 +415,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F")],-1),$n=n("p",null,"\u5BC6\u9470\u5C0D\u7684\u4E3B\u8981\u529F\u80FD\u662F\u5C0D\u6D88\u606F\u9032\u884C\u7C3D\u540D\u4E26\u9A57\u8B49\u7C3D\u540D\u7684\u6709\u6548\u6027\u3002\u901A\u904E\u9A57\u8B49\u7C3D\u540D\uFF0C\u63A5\u6536\u65B9\u53EF\u4EE5\u78BA\u4FDD\u6578\u64DA\u662F\u7531\u7279\u5B9A\u79C1\u9470\u7684\u6240\u6709\u8005\u7C3D\u540D\u7684\u3002",-1),Gn=s("\u7232\u6B64\uFF0C\u6211\u5011\u5C07\u5C0E\u5165"),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" \u5BC6\u78BC\u5EAB\uFF0C\u4E26\u6309\u7167\u4EE5\u4E0B\u6B65\u9A5F\u9032\u884C\u64CD\u4F5C\uFF1A"),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \u904B\u884C\u4EE5\u4E0B\u547D\u4EE4\u4F86\u5B89\u88DD\u6240\u9700\u7684\u4F9D\u8CF4\u9805\uFF1A

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Cs=s("Svelte Wallet Adapter"),As=s(" \u5305\u5141\u8BB8\u6211\u4EEC\u5728\u4F7F\u7528Svelte\u6A21\u677F\u6216SvelteKit\u521B\u5EFA\u7684\u9879\u76EE\u4E2D\uFF0C\u5728\u6240\u6709JS\u3001TS\u6216/\u548CSvelte\u6587\u4EF6\u4E4B\u95F4\u6DFB\u52A0\u4E00\u4E2A\u53EF\u8BBF\u95EE\u7684Svelte Store\uFF08"),js=n("code",null,"$walletStore",-1),Ts=s("\uFF09\u3002\u4F7F\u7528 "),zs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ds=s("\u6B64\u5904"),Rs=s(" \u7684\u5B58\u50A8\u5E93\u5F15\u7528\uFF0C\u60A8\u53EF\u4EE5\u5728SSR\u6216SPA\u4E2D\u4F7F\u7528\u9002\u914D\u5668\u3002UI\u5305\u542B\u4E00\u4E2A"),Bs=n("code",null,"",-1),Ms=s("\u7EC4\u4EF6\uFF0C\u5141\u8BB8\u7528\u6237\u9009\u62E9\u4E00\u4E2A\u94B1\u5305\u5E76\u8FDE\u63A5\u5230\u5B83\u3002"),Ns=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \u904B\u884C\u4EE5\u4E0B\u547D\u4EE4\u4F86\u5B89\u88DD\u6240\u9700\u7684\u4F9D\u8CF4\u9805\uFF1A

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},As=s("Svelte Wallet Adapter"),Cs=s(" \u5305\u5141\u8BB8\u6211\u4EEC\u5728\u4F7F\u7528Svelte\u6A21\u677F\u6216SvelteKit\u521B\u5EFA\u7684\u9879\u76EE\u4E2D\uFF0C\u5728\u6240\u6709JS\u3001TS\u6216/\u548CSvelte\u6587\u4EF6\u4E4B\u95F4\u6DFB\u52A0\u4E00\u4E2A\u53EF\u8BBF\u95EE\u7684Svelte Store\uFF08"),js=n("code",null,"$walletStore",-1),Ts=s("\uFF09\u3002\u4F7F\u7528 "),zs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Bs=s("\u6B64\u5904"),Ds=s(" \u7684\u5B58\u50A8\u5E93\u5F15\u7528\uFF0C\u60A8\u53EF\u4EE5\u5728SSR\u6216SPA\u4E2D\u4F7F\u7528\u9002\u914D\u5668\u3002UI\u5305\u542B\u4E00\u4E2A"),Rs=n("code",null,"",-1),Ms=s("\u7EC4\u4EF6\uFF0C\u5141\u8BB8\u7528\u6237\u9009\u62E9\u4E00\u4E2A\u94B1\u5305\u5E76\u8FDE\u63A5\u5230\u5B83\u3002"),Ns=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,C,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[R]),preview:a(()=>[B]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Rn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Bn]),preview:a(()=>[Mn]),_:1})]),_:1}),Nn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,n("a",ws,[_s,t(c)]),fs,vs,xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[Cs,t(c)]),As,js,Ts,n("a",zs,[Ds,t(c)]),Rs,Bs,Ms]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Js]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[B]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Bn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Mn]),_:1})]),_:1}),Nn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,n("a",ws,[_s,t(c)]),fs,vs,xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[As,t(c)]),Cs,js,Ts,n("a",zs,[Bs,t(c)]),Ds,Rs,Ms]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Vs=l(b,[["render",Js]]);export{Vs as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.61911f3c.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7856d044.js similarity index 96% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.61911f3c.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.7856d044.js index 1810df2a8..a68f557c1 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.61911f3c.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7856d044.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"mga-keypair-at-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mga-keypair-at-wallets","aria-hidden":"true"},"#"),s(" Mga Keypair at Wallets")],-1),d=n("h2",{id:"paano-bumuo-ng-bagong-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-bumuo-ng-bagong-keypair","aria-hidden":"true"},"#"),s(" Paano bumuo ng bagong Keypair")],-1),g=n("p",null,"Marami sa iba't ibang aksyon na maaari mong gawin sa iba't ibang Solana ang mga library ay nangangailangan ng Keypair o Wallet. Kung kumokonekta ka sa a wallet, hindi mo kailangang mag-alala. Gayunpaman, kung ikaw ay nangangailangan ng isang keypair, kakailanganin mong bumuo ng isa.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"mga-keypair-at-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mga-keypair-at-wallets","aria-hidden":"true"},"#"),s(" Mga Keypair at Wallets")],-1),d=n("h2",{id:"paano-bumuo-ng-bagong-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-bumuo-ng-bagong-keypair","aria-hidden":"true"},"#"),s(" Paano bumuo ng bagong Keypair")],-1),g=n("p",null,"Marami sa iba't ibang aksyon na maaari mong gawin sa iba't ibang Solana ang mga library ay nangangailangan ng Keypair o Wallet. Kung kumokonekta ka sa a wallet, hindi mo kailangang mag-alala. Gayunpaman, kung ikaw ay nangangailangan ng isang keypair, kakailanganin mong bumuo ng isa.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),v=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -33,7 +39,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token comment"},"# pubkey: 9ZNTfG4NyQgxy2SWjSiQoUyBPEvXT2xo7fKc5hPYYJ7b"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),W=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),A=n("h2",{id:"paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim","aria-hidden":"true"},"#"),s(" Paano ibalik ang isang Keypair mula sa isang lihim")],-1),S=n("p",null,"Kung nasa iyo na ang iyong sikreto, maaari mong makuha ang iyong Keypair mula sa sikreto upang subukan ang iyong dApp.",-1),C=n("ol",null,[n("li",null,"Mula sa Bytes")],-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim","aria-hidden":"true"},"#"),s(" Paano ibalik ang isang Keypair mula sa isang lihim")],-1),A=n("p",null,"Kung nasa iyo na ang iyong sikreto, maaari mong makuha ang iyong Keypair mula sa sikreto upang subukan ang iyong dApp.",-1),C=n("ol",null,[n("li",null,"Mula sa Bytes")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` @@ -45,7 +51,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br")])],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br")])],-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(` @@ -120,7 +126,7 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_bytes"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),E=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),J=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),U=n("ol",{start:"2"},[n("li",null,"From Base58 String")],-1),H=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),H=n("ol",{start:"2"},[n("li",null,"From Base58 String")],-1),U=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bs58 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bs58"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"paano-i-verify-ang-isang-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-i-verify-ang-isang-keypair","aria-hidden":"true"},"#"),s(" Paano i-verify ang isang Keypair")],-1),X=n("p",null,"Kung bibigyan ka ng keypair, maaari mong i-verify kung ang sikreto o hindi tumutugma sa ibinigay na pampublikong susi",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"paano-i-verify-ang-isang-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-i-verify-ang-isang-keypair","aria-hidden":"true"},"#"),s(" Paano i-verify ang isang Keypair")],-1),I=n("p",null,"Kung bibigyan ka ng keypair, maaari mong i-verify kung ang sikreto o hindi tumutugma sa ibinigay na pampublikong susi",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),vn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -324,19 +334,22 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"slice"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("ol",{start:"2"},[n("li",null,"BIP44 (maraming wallet, kilala rin na HD wallet)")],-1),Mn=n("p",null,"Maaari kang gumawa ng maraming wallet mula sa iisang binhi - kilala rin bilang 'Hierarchical Deterministic wallet' o HD wallet:",-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (maraming wallet, kilala rin na HD wallet)")],-1),Mn=n("p",null,"Maaari kang gumawa ng maraming wallet mula sa iisang binhi - kilala rin bilang 'Hierarchical Deterministic wallet' o HD wallet:",-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -361,7 +374,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"paano-bumuo-ng-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-bumuo-ng-vanity-address","aria-hidden":"true"},"#"),s(" Paano bumuo ng vanity address")],-1),En=n("p",null,'Ang mga vanity publickey, o mga custom na address ay mga susi na nagsimula sa tiyak na mga karakter. Halimbawa, maaaring gusto ng isang tao ang isang publickey magsimula sa "elv1s", o maaaring "magluto". Makakatulong ang mga ito sa ibang tao tandaan kung kanino ang susi, na ginagawang mas madaling matukoy ang susi.',-1),Jn=n("p",null,"Tandaan: Kung mas maraming character sa iyong vanity address, mas tatagal ito kunin.",-1),Un=n("p",null,"::: babala Dapat mo lang gamitin ang CLI para sa gawaing ito. Ang mga halimbawa ng Python at TypeScript ay para sa mga layuning paglalarawan at mas mabagal kaysa sa CLI. :::",-1),Hn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"paano-bumuo-ng-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-bumuo-ng-vanity-address","aria-hidden":"true"},"#"),s(" Paano bumuo ng vanity address")],-1),En=n("p",null,'Ang mga vanity publickey, o mga custom na address ay mga susi na nagsimula sa tiyak na mga karakter. Halimbawa, maaaring gusto ng isang tao ang isang publickey magsimula sa "elv1s", o maaaring "magluto". Makakatulong ang mga ito sa ibang tao tandaan kung kanino ang susi, na ginagawang mas madaling matukoy ang susi.',-1),Jn=n("p",null,"Tandaan: Kung mas maraming character sa iyong vanity address, mas tatagal ito kunin.",-1),Hn=n("p",null,"::: babala Dapat mo lang gamitin ang CLI para sa gawaing ito. Ang mga halimbawa ng Python at TypeScript ay para sa mga layuning paglalarawan at mas mabagal kaysa sa CLI. :::",-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -369,11 +382,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Yn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` @@ -402,8 +415,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"paano-mag-sign-at-mag-verify-ng-mga-mensahe-gamit-ang-mga-wallet",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-mag-sign-at-mag-verify-ng-mga-mensahe-gamit-ang-mga-wallet","aria-hidden":"true"},"#"),s(" Paano mag-sign at mag-verify ng mga mensahe gamit ang mga wallet")],-1),Gn=n("p",null,"Ang pangunahing function ng keypair ay ang pag-sign ng mga mensahe at paganahin pagpapatunay ng pirma. Ang pagpapatunay ng isang pirma ay nagpapahintulot ang tatanggap upang matiyak na ang data ay nilagdaan ng may-ari ng a tiyak na pribadong key.",-1),$n=s("Para magawa ito, ii-import namin ang "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" crypto library."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),As=u(`

    Svelte

    Patakbuhin ang sumusunod na command upang i-install ang mga kinakailangang dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ss=s("Ang "),Cs={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Ts=s("Svelte Wallet Adapter"),js=s(" package ay nagbibigay-daan upang magdagdag ng Svelte Store ("),Ms=n("code",null,"$walletStore",-1),Bs=s(") na maa-access sa lahat ng JS, TS o/at Svelte file sa loob ng isang proyektong ginawa gamit ang Svelte Template o SvelteKit. Gamit ang repo reference "),Ds={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Rs=s("dito"),zs=s(" maaari mong gamitin ang adapter para sa SSR o SPA. Ang UI package ay naglalaman ng "),Ns=n("code",null,"",-1),Es=s(" component upang payagan ang mga user na pumili ng wallet para kumonekta dito."),Js=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    Patakbuhin ang sumusunod na command upang i-install ang mga kinakailangang dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),As=s("Ang "),Cs={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},js=s("Svelte Wallet Adapter"),Ts=s(" package ay nagbibigay-daan upang magdagdag ng Svelte Store ("),Ms=n("code",null,"$walletStore",-1),Bs=s(") na maa-access sa lahat ng JS, TS o/at Svelte file sa loob ng isang proyektong ginawa gamit ang Svelte Template o SvelteKit. Gamit ang repo reference "),Ds={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Rs=s("dito"),zs=s(" maaari mong gamitin ang adapter para sa SSR o SPA. Ang UI package ay naglalaman ng "),Ns=n("code",null,"",-1),Es=s(" component upang payagan ang mga user na pumili ng wallet para kumonekta dito."),Js=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -636,7 +649,7 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br")])],-1),Us=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br")])],-1),Hs=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" WalletMultiButton "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-ui"'),n("span",{class:"token punctuation"},";"),s(` `)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Hs(Vs,Ys){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,g,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[y]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[v]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),A,S,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[j]),_:1}),t(e,{title:"Python"},{default:a(()=>[M]),preview:a(()=>[B]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[z]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[gn]),preview:a(()=>[yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[vn]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[An]),preview:a(()=>[Sn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[Tn]),_:1})]),_:1}),jn,Mn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Bn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[zn]),_:1})]),_:1}),Nn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[gs,t(c)]),ys,hs,ws,_s,vs,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ws]),_:1})]),_:1}),As,n("p",null,[Ss,n("a",Cs,[Ts,t(c)]),js,Ms,Bs,n("a",Ds,[Rs,t(c)]),zs,Ns,Es]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Js]),preview:a(()=>[Us]),_:1})]),_:1})],64)}var qs=l(b,[["render",Hs]]);export{qs as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Us(Ys,Vs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,g,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[y]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[v]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[M]),preview:a(()=>[B]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[z]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),H,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[gn]),preview:a(()=>[yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[vn]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Mn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Bn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[zn]),_:1})]),_:1}),Nn,En,Jn,Hn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[gs,t(c)]),ys,hs,ws,_s,vs,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ws]),_:1})]),_:1}),Ss,n("p",null,[As,n("a",Cs,[js,t(c)]),Ts,Ms,Bs,n("a",Ds,[Rs,t(c)]),zs,Ns,Es]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Js]),preview:a(()=>[Hs]),_:1})]),_:1})],64)}var qs=l(b,[["render",Us]]);export{qs as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.4fa11b3e.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7b4b2fca.js similarity index 94% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.4fa11b3e.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.7b4b2fca.js index 9ef318bc7..831da308f 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.4fa11b3e.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7b4b2fca.js @@ -1 +1 @@ -const e={key:"v-09579540",path:"/ja/references/keypairs-and-wallets.html",title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8",lang:"ja-JP",frontmatter:{title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u65B0\u3057\u3044\u30AD\u30FC\u30DA\u30A2\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30AD\u30FC\u30DA\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304B\u3099\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3068\u3099\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D0\u30CB\u30C6\u30A3\u30A2\u30C9\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CF\u3099\u30CB\u30C6\u30A3\u30A2\u30C8\u3099\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1682188031e3,contributors:[{name:"PokoPoko2ry",email:"40916036+PokoPoko2ry@users.noreply.github.com",commits:1}]},filePathRelative:"ja/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-09579540",path:"/ja/references/keypairs-and-wallets.html",title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8",lang:"ja-JP",frontmatter:{title:"\u30AD\u30FC\u30DA\u30A2\u3068\u30A6\u30A9\u30EC\u30C3\u30C8",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u65B0\u3057\u3044\u30AD\u30FC\u30DA\u30A2\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30AD\u30FC\u30DA\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304C\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",slug:"\u516C\u958B\u9375\u306B\u79D8\u5BC6\u9375\u304B\u3099\u95A2\u9023\u4ED8\u3051\u3089\u308C\u3066\u3044\u308B\u304B\u3068\u3099\u3046\u304B\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30BA\u304B\u3089\u30AD\u30FC\u30DA\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",slug:"\u30CB\u30FC\u30E2\u30CB\u30C3\u30AF\u30D5\u30EC\u30FC\u30B9\u3099\u304B\u3089\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u5FA9\u5143\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30D0\u30CB\u30C6\u30A3\u30A2\u30C9\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",slug:"\u30CF\u3099\u30CB\u30C6\u30A3\u30A2\u30C8\u3099\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",children:[]},{level:2,title:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",slug:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3078\u306E\u63A5\u7D9A\u65B9\u6CD5",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"PokoPoko2ry",email:"40916036+PokoPoko2ry@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"ja/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.51f378e3.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7f32d8c6.js similarity index 95% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.51f378e3.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.7f32d8c6.js index a7e2ca5b8..84a07c0b9 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.51f378e3.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7f32d8c6.js @@ -1,13 +1,19 @@ -import{_ as u,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"keypairs-and-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-and-wallets","aria-hidden":"true"},"#"),s(" Keypairs and Wallets")],-1),d=n("h2",{id:"how-to-generate-a-new-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-new-keypair","aria-hidden":"true"},"#"),s(" How to generate a new Keypair")],-1),y=n("p",null,"Many of the different actions you can take with the various Solana libraries require a Keypair or Wallet. If you are connecting to a wallet, you do not have to worry. However, if you are in need of a keypair, you will need to generate one.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"keypairs-and-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-and-wallets","aria-hidden":"true"},"#"),s(" Keypairs and Wallets")],-1),d=n("h2",{id:"how-to-generate-a-new-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-new-keypair","aria-hidden":"true"},"#"),s(" How to generate a new Keypair")],-1),y=n("p",null,"Many of the different actions you can take with the various Solana libraries require a Keypair or Wallet. If you are connecting to a wallet, you do not have to worry. However, if you are in need of a keypair, you will need to generate one.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),f=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -64,7 +70,7 @@ secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token p keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),M=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),M=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -88,14 +94,14 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),N=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),D=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"63"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"176"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"109"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"168"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"238"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"135"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` @@ -110,7 +116,7 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created keypair: {}"'),n("span",{class:"token punctuation"},","),s(" pubkey"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -118,8 +124,8 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_bytes"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),H=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),E=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),E=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),H=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),J=n("ol",{start:"2"},[n("li",null,"From Base58 String")],-1),U=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bs58 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bs58"'),n("span",{class:"token punctuation"},";"),s(` @@ -138,10 +144,10 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),q=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),L=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -171,7 +177,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(` @@ -182,7 +188,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),G=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("pubkey "),n("span",{class:"token keyword"},"import"),s(` Pubkey public_key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),ln=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),ln=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),un=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),fn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,15 +338,18 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("ol",{start:"2"},[n("li",null,"BIP44 (multiple wallets, also known HD wallets)")],-1),Rn=n("p",null,"You can make multiple wallets from a single seed - also known as 'Hierarchical Deterministic wallets' or HD wallets:",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("ol",{start:"2"},[n("li",null,"BIP44 (multiple wallets, also known HD wallets)")],-1),Rn=n("p",null,"You can make multiple wallets from a single seed - also known as 'Hierarchical Deterministic wallets' or HD wallets:",-1),Mn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Mn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -359,29 +372,31 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solana"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Dn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic -`),n("span",{class:"token keyword"},"from"),s(" hdkey "),n("span",{class:"token keyword"},"import"),s(` HDKey mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},")"),s(` +mnemonic_phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("mnemonic_phrase"),n("span",{class:"token punctuation"},")"),s(` -hd `),n("span",{class:"token operator"},"="),s(" HDKey"),n("span",{class:"token punctuation"},"."),s("from_master_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +keypairs `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token keyword"},"for"),s(" i "),n("span",{class:"token keyword"},"in"),s(),n("span",{class:"token builtin"},"range"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},":"),s(` - path `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},`f"m/44'/501'/`),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("i"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},`'/0'"`)]),s(` - keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("hd"),n("span",{class:"token punctuation"},"."),s("derive"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("private_key"),n("span",{class:"token punctuation"},")"),s(` - `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},'f"'),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("path"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("keypair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},'"')]),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br")])],-1),zn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},")"),s(` + derivation_path `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},`f"m/44'/501'/`),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("i"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},`'/0'"`)]),s(` + keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed_and_derivation_path"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},","),s(" derivation_path"),n("span",{class:"token punctuation"},")"),s(` + keypairs`),n("span",{class:"token punctuation"},"."),s("append"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},'f"Keypair '),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("i "),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"}," with Public Key: "),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},'"')]),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),Nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -hd `),n("span",{class:"token operator"},"="),s(" HDKey"),n("span",{class:"token punctuation"},"."),s("from_master_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +keypairs `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token keyword"},"for"),s(" i "),n("span",{class:"token keyword"},"in"),s(),n("span",{class:"token builtin"},"range"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},":"),s(` - path `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},`f"m/44'/501'/`),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("i"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},`'/0'"`)]),s(` - keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("hd"),n("span",{class:"token punctuation"},"."),s("derive"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("private_key"),n("span",{class:"token punctuation"},")"),s(` - `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},'f"'),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("path"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("keypair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},'"')]),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Hn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),En=n("h2",{id:"how-to-generate-a-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-vanity-address","aria-hidden":"true"},"#"),s(" How to generate a vanity address")],-1),Jn=n("p",null,'Vanity publickeys, or custom addresses are keys that have start with specific characters. For example, a person may want a publickey to start with "elv1s", or maybe even "cook". These can help other people remember who the key belongs to, making the key more easily identifiable.',-1),Un=n("p",null,"Note: The more characters in your vanity address, the longer it will take.",-1),Yn=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"You should just use the CLI for this task. The Python and TypeScript examples are for illustrative purposes and are much slower than the CLI.")],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + derivation_path `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},`f"m/44'/501'/`),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("i"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},`'/0'"`)]),s(` + keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed_and_derivation_path"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},","),s(" derivation_path"),n("span",{class:"token punctuation"},")"),s(` + keypairs`),n("span",{class:"token punctuation"},"."),s("append"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string-interpolation"},[n("span",{class:"token string"},'f"Keypair '),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("i "),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"}," with Public Key: "),n("span",{class:"token interpolation"},[n("span",{class:"token punctuation"},"{"),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"}")]),n("span",{class:"token string"},'"')]),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),En=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Hn=n("h2",{id:"how-to-generate-a-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-vanity-address","aria-hidden":"true"},"#"),s(" How to generate a vanity address")],-1),Jn=n("p",null,'Vanity publickeys, or custom addresses are keys that have start with specific characters. For example, a person may want a publickey to start with "elv1s", or maybe even "cook". These can help other people remember who the key belongs to, making the key more easily identifiable.',-1),Un=n("p",null,"Note: The more characters in your vanity address, the longer it will take.",-1),Yn=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"You should just use the CLI for this task. The Python and TypeScript examples are for illustrative purposes and are much slower than the CLI.")],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -423,8 +438,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),$n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Gn=n("h2",{id:"how-to-sign-and-verify-messages-with-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-sign-and-verify-messages-with-wallets","aria-hidden":"true"},"#"),s(" How to sign and verify messages with wallets")],-1),Qn=n("p",null,"The primary function of a keypair is to sign messages and enable verification of the signature. Verification of a signature allows the recipient to be sure that the data was signed by the owner of a specific private key.",-1),On=s("To do so we will import the "),ns={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},ss=s("TweetNaCl"),as=s(" crypto library."),ts=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Gn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),$n=n("h2",{id:"how-to-sign-and-verify-messages-with-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-sign-and-verify-messages-with-wallets","aria-hidden":"true"},"#"),s(" How to sign and verify messages with wallets")],-1),Qn=n("p",null,"The primary function of a keypair is to sign messages and enable verification of the signature. Verification of a signature allows the recipient to be sure that the data was signed by the owner of a specific private key.",-1),On=s("To do so we will import the "),ns={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},ss=s("TweetNaCl"),as=s(" crypto library."),ts=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -473,7 +488,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),cs=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -622,8 +637,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cs=l(`

    Svelte

    Run the following command to install the required dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ts=s("The "),js={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Rs=s("Svelte Wallet Adapter"),Ds=s(" package allows to add a Svelte Store ("),Ms=n("code",null,"$walletStore",-1),Ns=s(") accessible among all the JS, TS or/and Svelte files inside a project done with Svelte Template or SvelteKit. Using the repo reference "),zs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Bs=s("here"),Hs=s(" you can be able to use the adapter for SSR or SPA. The UI package contains a "),Es=n("code",null,"",-1),Js=s(" component to allow users to select a wallet to connect to it."),Us=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cs=l(`

    Svelte

    Run the following command to install the required dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ts=s("The "),js={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Rs=s("Svelte Wallet Adapter"),Ms=s(" package allows to add a Svelte Store ("),Bs=n("code",null,"$walletStore",-1),Ds=s(") accessible among all the JS, TS or/and Svelte files inside a project done with Svelte Template or SvelteKit. Using the repo reference "),Ns={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},zs=s("here"),Es=s(" you can be able to use the adapter for SSR or SPA. The UI package contains a "),Hs=n("code",null,"",-1),Js=s(" component to allow users to select a wallet to connect to it."),Us=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -665,4 +680,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Vs(qs,Ls){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[j]),_:1}),t(e,{title:"Python"},{default:a(()=>[R]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"Rust"},{default:a(()=>[z]),preview:a(()=>[B]),_:1}),t(e,{title:"CLI"},{default:a(()=>[H]),preview:a(()=>[E]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[q]),_:1}),t(e,{title:"Rust"},{default:a(()=>[L]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[un]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[Tn]),_:1})]),_:1}),jn,Rn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Mn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Nn]),preview:a(()=>[zn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Bn]),preview:a(()=>[Hn]),_:1})]),_:1}),En,Jn,Un,Yn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Vn]),preview:a(()=>[qn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Ln]),preview:a(()=>[Fn]),_:1}),t(e,{title:"C++"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Zn]),preview:a(()=>[$n]),_:1})]),_:1}),Gn,Qn,n("p",null,[On,n("a",ns,[ss,t(c)]),as]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ts]),preview:a(()=>[es]),_:1}),t(e,{title:"Python"},{default:a(()=>[os]),preview:a(()=>[cs]),_:1})]),_:1}),ps,n("p",null,[ls,n("a",us,[is,t(c)]),ks]),rs,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[bs]),preview:a(()=>[ms]),_:1})]),_:1}),ds,n("p",null,[ys,n("a",gs,[hs,t(c)]),ws,_s,fs,vs,xs,n("a",Ks,[Ps,t(c)]),Ws]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ss]),preview:a(()=>[As]),_:1})]),_:1}),Cs,n("p",null,[Ts,n("a",js,[Rs,t(c)]),Ds,Ms,Ns,n("a",zs,[Bs,t(c)]),Hs,Es,Js]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Us]),preview:a(()=>[Ys]),_:1})]),_:1})],64)}var Is=u(b,[["render",Vs]]);export{Is as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Vs(qs,Ls){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[j]),_:1}),t(e,{title:"Python"},{default:a(()=>[R]),preview:a(()=>[M]),_:1}),t(e,{title:"C++"},{default:a(()=>[B]),preview:a(()=>[D]),_:1}),t(e,{title:"Rust"},{default:a(()=>[N]),preview:a(()=>[z]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[H]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[q]),_:1}),t(e,{title:"Rust"},{default:a(()=>[L]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[un]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[Tn]),_:1})]),_:1}),jn,Rn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Mn]),preview:a(()=>[Bn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Dn]),preview:a(()=>[Nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[zn]),preview:a(()=>[En]),_:1})]),_:1}),Hn,Jn,Un,Yn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Vn]),preview:a(()=>[qn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Ln]),preview:a(()=>[Fn]),_:1}),t(e,{title:"C++"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Zn]),preview:a(()=>[Gn]),_:1})]),_:1}),$n,Qn,n("p",null,[On,n("a",ns,[ss,t(c)]),as]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ts]),preview:a(()=>[es]),_:1}),t(e,{title:"Python"},{default:a(()=>[os]),preview:a(()=>[cs]),_:1})]),_:1}),ps,n("p",null,[ls,n("a",us,[is,t(c)]),ks]),rs,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[bs]),preview:a(()=>[ms]),_:1})]),_:1}),ds,n("p",null,[ys,n("a",gs,[hs,t(c)]),ws,_s,fs,vs,xs,n("a",Ks,[Ps,t(c)]),Ws]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ss]),preview:a(()=>[As]),_:1})]),_:1}),Cs,n("p",null,[Ts,n("a",js,[Rs,t(c)]),Ms,Bs,Ds,n("a",Ns,[zs,t(c)]),Es,Hs,Js]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Us]),preview:a(()=>[Ys]),_:1})]),_:1})],64)}var Is=u(b,[["render",Vs]]);export{Is as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.cc9959ad.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.830d46df.js similarity index 87% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.cc9959ad.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.830d46df.js index d245ade0e..1147ca196 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.cc9959ad.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.830d46df.js @@ -1 +1 @@ -const e={key:"v-59dda459",path:"/tr/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"tr-TR",frontmatter:{},excerpt:"",headers:[{level:2,title:"How to generate a new Keypair (Yeni Keypair nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-new-keypair-yeni-keypair-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to verify a Keypair (Keypair nas\u0131l do\u011Frulan\u0131r)",slug:"how-to-verify-a-keypair-keypair-nas\u0131l-dogrulan\u0131r",children:[]},{level:2,title:"How to check if a public key has an associated private key (Bir public key\u2019in ili\u015Fkili private key\u2019e sahip olup olmad\u0131\u011F\u0131 nas\u0131l kontrol edilir)",slug:"how-to-check-if-a-public-key-has-an-associated-private-key-bir-public-key-in-iliskili-private-key-e-sahip-olup-olmad\u0131g\u0131-nas\u0131l-kontrol-edilir",children:[]},{level:2,title:"How to generate a mnemonic phrase (Hat\u0131rlat\u0131c\u0131 bir ifade nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-mnemonic-phrase-hat\u0131rlat\u0131c\u0131-bir-ifade-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase (An\u0131msat\u0131c\u0131 bir c\xFCmleden Keypair nas\u0131l y\xFCklenir)",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase-an\u0131msat\u0131c\u0131-bir-cumleden-keypair-nas\u0131l-yuklenir",children:[]},{level:2,title:"How to generate a vanity address (\xD6zel bir adres nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-vanity-address-ozel-bir-adres-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to sign and verify messages with wallets (C\xFCzdanlarla mesajlar nas\u0131l imzalan\u0131r ve do\u011Frulan\u0131r)",slug:"how-to-sign-and-verify-messages-with-wallets-cuzdanlarla-mesajlar-nas\u0131l-imzalan\u0131r-ve-dogrulan\u0131r",children:[]},{level:2,title:"How to connect to a wallet (C\xFCzdana nas\u0131l ba\u011Flan\u0131l\u0131r)",slug:"how-to-connect-to-a-wallet-cuzdana-nas\u0131l-baglan\u0131l\u0131r",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1673624368e3,contributors:[{name:"rbeyzas",email:"rukiyebeyzasarikaya@hotmail.com",commits:1}]},filePathRelative:"tr/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-59dda459",path:"/tr/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"tr-TR",frontmatter:{},excerpt:"",headers:[{level:2,title:"How to generate a new Keypair (Yeni Keypair nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-new-keypair-yeni-keypair-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to verify a Keypair (Keypair nas\u0131l do\u011Frulan\u0131r)",slug:"how-to-verify-a-keypair-keypair-nas\u0131l-dogrulan\u0131r",children:[]},{level:2,title:"How to check if a public key has an associated private key (Bir public key\u2019in ili\u015Fkili private key\u2019e sahip olup olmad\u0131\u011F\u0131 nas\u0131l kontrol edilir)",slug:"how-to-check-if-a-public-key-has-an-associated-private-key-bir-public-key-in-iliskili-private-key-e-sahip-olup-olmad\u0131g\u0131-nas\u0131l-kontrol-edilir",children:[]},{level:2,title:"How to generate a mnemonic phrase (Hat\u0131rlat\u0131c\u0131 bir ifade nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-mnemonic-phrase-hat\u0131rlat\u0131c\u0131-bir-ifade-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase (An\u0131msat\u0131c\u0131 bir c\xFCmleden Keypair nas\u0131l y\xFCklenir)",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase-an\u0131msat\u0131c\u0131-bir-cumleden-keypair-nas\u0131l-yuklenir",children:[]},{level:2,title:"How to generate a vanity address (\xD6zel bir adres nas\u0131l olu\u015Fturulur)",slug:"how-to-generate-a-vanity-address-ozel-bir-adres-nas\u0131l-olusturulur",children:[]},{level:2,title:"How to sign and verify messages with wallets (C\xFCzdanlarla mesajlar nas\u0131l imzalan\u0131r ve do\u011Frulan\u0131r)",slug:"how-to-sign-and-verify-messages-with-wallets-cuzdanlarla-mesajlar-nas\u0131l-imzalan\u0131r-ve-dogrulan\u0131r",children:[]},{level:2,title:"How to connect to a wallet (C\xFCzdana nas\u0131l ba\u011Flan\u0131l\u0131r)",slug:"how-to-connect-to-a-wallet-cuzdana-nas\u0131l-baglan\u0131l\u0131r",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"rbeyzas",email:"rukiyebeyzasarikaya@hotmail.com",commits:1}]},filePathRelative:"tr/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.8d42bf89.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.8fca2ff6.js similarity index 89% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.8d42bf89.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.8fca2ff6.js index 172a60ed3..60396c141 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.8d42bf89.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.8fca2ff6.js @@ -1 +1 @@ -const e={key:"v-5bd01ecb",path:"/fr/references/keypairs-and-wallets.html",title:"Paires de Cl\xE9s et Portefeuilles",lang:"fr-FR",frontmatter:{title:"Paires de Cl\xE9s et Portefeuilles",head:[["meta",{name:"title",content:"Solana Cookbook | Paires de Cl\xE9s et Portefeuilles"}],["meta",{name:"og:title",content:"Solana Cookbook | Paires de Cl\xE9s et Portefeuilles"}],["meta",{name:"description",content:"D\xE9couvrez les Paires de Cl\xE9s et les Portefeuilles, la Signature et la V\xE9rification des Messages et d'autres r\xE9f\xE9rences pour construire sur Solana dans le Solana cookbook."}],["meta",{name:"og:description",content:"D\xE9couvrez les Paires de Cl\xE9s et les Portefeuilles, la Signature et la V\xE9rification des Messages et d'autres r\xE9f\xE9rences pour construire sur Solana dans le Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Comment g\xE9n\xE9rer une nouvelle Paire de Cl\xE9s",slug:"comment-generer-une-nouvelle-paire-de-cles",children:[]},{level:2,title:"Comment restaurer une Paire de cl\xE9s \xE0 partir d'une cl\xE9 priv\xE9e",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee",children:[]},{level:2,title:"Comment v\xE9rifier une Paire de Cl\xE9s",slug:"comment-verifier-une-paire-de-cles",children:[]},{level:2,title:"Comment v\xE9rifier si une cl\xE9 publique a une cl\xE9 priv\xE9e associ\xE9e",slug:"comment-verifier-si-une-cle-publique-a-une-cle-privee-associee",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une phrase mn\xE9monique",slug:"comment-generer-une-phrase-mnemonique",children:[]},{level:2,title:"Comment restaurer une paire de cl\xE9s \xE0 partir d'une phrase mn\xE9monique",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-phrase-mnemonique",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une adresse personnalis\xE9e",slug:"comment-generer-une-adresse-personnalisee",children:[]},{level:2,title:"Comment signer et v\xE9rifier des messages avec les portefeuilles",slug:"comment-signer-et-verifier-des-messages-avec-les-portefeuilles",children:[]},{level:2,title:"Comment se connecter \xE0 un portefeuille",slug:"comment-se-connecter-a-un-portefeuille",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"cryptoloutre",email:"35653371+cryptoloutre@users.noreply.github.com",commits:1}]},filePathRelative:"fr/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-5bd01ecb",path:"/fr/references/keypairs-and-wallets.html",title:"Paires de Cl\xE9s et Portefeuilles",lang:"fr-FR",frontmatter:{title:"Paires de Cl\xE9s et Portefeuilles",head:[["meta",{name:"title",content:"Solana Cookbook | Paires de Cl\xE9s et Portefeuilles"}],["meta",{name:"og:title",content:"Solana Cookbook | Paires de Cl\xE9s et Portefeuilles"}],["meta",{name:"description",content:"D\xE9couvrez les Paires de Cl\xE9s et les Portefeuilles, la Signature et la V\xE9rification des Messages et d'autres r\xE9f\xE9rences pour construire sur Solana dans le Solana cookbook."}],["meta",{name:"og:description",content:"D\xE9couvrez les Paires de Cl\xE9s et les Portefeuilles, la Signature et la V\xE9rification des Messages et d'autres r\xE9f\xE9rences pour construire sur Solana dans le Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Comment g\xE9n\xE9rer une nouvelle Paire de Cl\xE9s",slug:"comment-generer-une-nouvelle-paire-de-cles",children:[]},{level:2,title:"Comment restaurer une Paire de cl\xE9s \xE0 partir d'une cl\xE9 priv\xE9e",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-cle-privee",children:[]},{level:2,title:"Comment v\xE9rifier une Paire de Cl\xE9s",slug:"comment-verifier-une-paire-de-cles",children:[]},{level:2,title:"Comment v\xE9rifier si une cl\xE9 publique a une cl\xE9 priv\xE9e associ\xE9e",slug:"comment-verifier-si-une-cle-publique-a-une-cle-privee-associee",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une phrase mn\xE9monique",slug:"comment-generer-une-phrase-mnemonique",children:[]},{level:2,title:"Comment restaurer une paire de cl\xE9s \xE0 partir d'une phrase mn\xE9monique",slug:"comment-restaurer-une-paire-de-cles-a-partir-d-une-phrase-mnemonique",children:[]},{level:2,title:"Comment g\xE9n\xE9rer une adresse personnalis\xE9e",slug:"comment-generer-une-adresse-personnalisee",children:[]},{level:2,title:"Comment signer et v\xE9rifier des messages avec les portefeuilles",slug:"comment-signer-et-verifier-des-messages-avec-les-portefeuilles",children:[]},{level:2,title:"Comment se connecter \xE0 un portefeuille",slug:"comment-se-connecter-a-un-portefeuille",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"cryptoloutre",email:"35653371+cryptoloutre@users.noreply.github.com",commits:1}]},filePathRelative:"fr/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.f22c3901.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.9661ed1e.js similarity index 96% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.f22c3901.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.9661ed1e.js index a6ec92808..d0d59b3a2 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.f22c3901.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.9661ed1e.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305","aria-hidden":"true"},"#"),s(" \u5BC6\u94A5\u5BF9\u548C\u94B1\u5305")],-1),d=n("h2",{id:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9")],-1),y=n("p",null,"\u5BF9\u4E8E\u4F7F\u7528Solana\u5E93\u6267\u884C\u5404\u79CD\u64CD\u4F5C\uFF0C\u8BB8\u591A\u64CD\u4F5C\u90FD\u9700\u8981\u4E00\u4E2A\u5BC6\u94A5\u5BF9\u6216\u94B1\u5305\u3002\u5982\u679C\u4F60\u6B63\u5728\u8FDE\u63A5\u5230\u4E00\u4E2A\u94B1\u5305\uFF0C\u90A3\u4E48\u4F60\u4E0D\u5FC5\u62C5\u5FC3\u3002\u7136\u800C\uFF0C\u5982\u679C\u4F60\u9700\u8981\u4E00\u4E2A\u5BC6\u94A5\u5BF9\uFF0C\u4F60\u4F1A\u9700\u8981\u751F\u6210\u4E00\u4E2A\u3002",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305","aria-hidden":"true"},"#"),s(" \u5BC6\u94A5\u5BF9\u548C\u94B1\u5305")],-1),d=n("h2",{id:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9")],-1),y=n("p",null,"\u5BF9\u4E8E\u4F7F\u7528Solana\u5E93\u6267\u884C\u5404\u79CD\u64CD\u4F5C\uFF0C\u8BB8\u591A\u64CD\u4F5C\u90FD\u9700\u8981\u4E00\u4E2A\u5BC6\u94A5\u5BF9\u6216\u94B1\u5305\u3002\u5982\u679C\u4F60\u6B63\u5728\u8FDE\u63A5\u5230\u4E00\u4E2A\u94B1\u5305\uFF0C\u90A3\u4E48\u4F60\u4E0D\u5FC5\u62C5\u5FC3\u3002\u7136\u800C\uFF0C\u5982\u679C\u4F60\u9700\u8981\u4E00\u4E2A\u5BC6\u94A5\u5BF9\uFF0C\u4F60\u4F1A\u9700\u8981\u751F\u6210\u4E00\u4E2A\u3002",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),f=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -33,7 +39,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token comment"},"# pubkey: 9ZNTfG4NyQgxy2SWjSiQoUyBPEvXT2xo7fKc5hPYYJ7b"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),W=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9")],-1),C=n("p",null,"\u5982\u679C\u4F60\u5DF2\u7ECF\u6709\u4E86\u5BC6\u94A5\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u8FD9\u4E2A\u5BC6\u94A5\u83B7\u53D6\u5BC6\u94A5\u5BF9\uFF0C\u4EE5\u6D4B\u8BD5\u4F60\u7684dApp\u3002",-1),A=n("ol",null,[n("li",null,"\u4ECE\u5B57\u8282\u4E2D\uFF1A")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9")],-1),A=n("p",null,"\u5982\u679C\u4F60\u5DF2\u7ECF\u6709\u4E86\u5BC6\u94A5\uFF0C\u4F60\u53EF\u4EE5\u901A\u8FC7\u8FD9\u4E2A\u5BC6\u94A5\u83B7\u53D6\u5BC6\u94A5\u5BF9\uFF0C\u4EE5\u6D4B\u8BD5\u4F60\u7684dApp\u3002",-1),C=n("ol",null,[n("li",null,"\u4ECE\u5B57\u8282\u4E2D\uFF1A")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` @@ -64,7 +70,7 @@ secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token p keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),B=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),D=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -88,7 +94,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9")],-1),X=n("p",null,"\u5982\u679C\u4F60\u6709\u4E86\u4E2A\u5BC6\u94A5\u5BF9\uFF0C\u4F60\u53EF\u4EE5\u9A8C\u8BC1\u5BC6\u94A5\u5BF9\u7684\u79C1\u94A5\u662F\u5426\u4E0E\u7ED9\u5B9A\u7684\u516C\u94A5\u5339\u914D\u3002",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9")],-1),I=n("p",null,"\u5982\u679C\u4F60\u6709\u4E86\u4E2A\u5BC6\u94A5\u5BF9\uFF0C\u4F60\u53EF\u4EE5\u9A8C\u8BC1\u5BC6\u94A5\u5BF9\u7684\u79C1\u94A5\u662F\u5426\u4E0E\u7ED9\u5B9A\u7684\u516C\u94A5\u5339\u914D\u3002",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),fn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,15 +338,18 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 \uFF08\u591A\u4E2A\u94B1\u5305\uFF0C\u4E5F\u53EBHD\u94B1\u5305\uFF09")],-1),zn=n("p",null,"\u4F60\u53EF\u4EE5\u4ECE\u4E00\u4E2A\u5355\u4E00\u79CD\u5B50\u751F\u6210\u591A\u4E2A\u94B1\u5305\uFF0C\u4E5F\u88AB\u79F0\u4E3A\u201C\u5206\u5C42\u786E\u5B9A\u6027\u94B1\u5305\u201D\u6216HD\u94B1\u5305\u3002",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 \uFF08\u591A\u4E2A\u94B1\u5305\uFF0C\u4E5F\u53EBHD\u94B1\u5305\uFF09")],-1),zn=n("p",null,"\u4F60\u53EF\u4EE5\u4ECE\u4E00\u4E2A\u5355\u4E00\u79CD\u5B50\u751F\u6210\u591A\u4E2A\u94B1\u5305\uFF0C\u4E5F\u88AB\u79F0\u4E3A\u201C\u5206\u5C42\u786E\u5B9A\u6027\u94B1\u5305\u201D\u6216HD\u94B1\u5305\u3002",-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Rn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -359,7 +372,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740-vanity-address","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740(vanity address)")],-1),En=n("p",null,'\u81EA\u5B9A\u4E49\u516C\u94A5\u6216\u5730\u5740\uFF08Vanity Address\uFF09\u662F\u4EE5\u7279\u5B9A\u5B57\u7B26\u5F00\u5934\u7684\u5BC6\u94A5\u3002\u4F8B\u5982\uFF0C\u4E00\u4E2A\u4EBA\u53EF\u80FD\u5E0C\u671B\u516C\u94A5\u4EE5 "elv1s" \u6216 "cook" \u5F00\u5934\uFF0C\u8FD9\u6837\u53EF\u4EE5\u5E2E\u52A9\u4ED6\u4EBA\u8BB0\u4F4F\u5BC6\u94A5\u6240\u5C5E\u7684\u4EBA\uFF0C\u4F7F\u5BC6\u94A5\u66F4\u5BB9\u6613\u8BC6\u522B\u3002',-1),Jn=n("p",null,"\u6CE8\u610F: \u81EA\u5B9A\u4E49\u5730\u5740\u4E2D\u5B57\u7B26\u7684\u6570\u91CF\u8D8A\u591A\uFF0C\u751F\u6210\u65F6\u95F4\u5C06\u4F1A\u66F4\u957F\u3002",-1),Un=n("p",null,"::: \u8B66\u544A \u5728\u6B64\u4EFB\u52A1\u4E2D\uFF0C\u60A8\u5E94\u8BE5\u4F7F\u7528\u547D\u4EE4\u884C\u754C\u9762\uFF08CLI\uFF09\u3002Python\u548CTypeScript\u7684\u793A\u4F8B\u4EC5\u7528\u4E8E\u8BF4\u660E\uFF0C\u901F\u5EA6\u6BD4CLI\u6162\u5F97\u591A\u3002 :::",-1),Hn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` @@ -369,11 +382,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Yn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` @@ -402,8 +415,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F")],-1),$n=n("p",null,"\u5BC6\u94A5\u5BF9\u7684\u4E3B\u8981\u529F\u80FD\u662F\u5BF9\u6D88\u606F\u8FDB\u884C\u7B7E\u540D\u5E76\u9A8C\u8BC1\u7B7E\u540D\u7684\u6709\u6548\u6027\u3002\u901A\u8FC7\u9A8C\u8BC1\u7B7E\u540D\uFF0C\u63A5\u6536\u65B9\u53EF\u4EE5\u786E\u4FDD\u6570\u636E\u662F\u7531\u7279\u5B9A\u79C1\u94A5\u7684\u6240\u6709\u8005\u7B7E\u540D\u7684\u3002",-1),Gn=s("\u4E3A\u6B64\uFF0C\u6211\u4EEC\u5C06\u5BFC\u5165"),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" \u5BC6\u7801\u5E93\uFF0C\u5E76\u6309\u7167\u4EE5\u4E0B\u6B65\u9AA4\u8FDB\u884C\u64CD\u4F5C\uFF1A"),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u6765\u5B89\u88C5\u6240\u9700\u7684\u4F9D\u8D56\u9879\uFF1A

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Cs=s("Svelte Wallet Adapter"),As=s(" \u5305\u5141\u8BB8\u6211\u4EEC\u5728\u4F7F\u7528Svelte\u6A21\u677F\u6216SvelteKit\u521B\u5EFA\u7684\u9879\u76EE\u4E2D\uFF0C\u5728\u6240\u6709JS\u3001TS\u6216/\u548CSvelte\u6587\u4EF6\u4E4B\u95F4\u6DFB\u52A0\u4E00\u4E2A\u53EF\u8BBF\u95EE\u7684Svelte Store\uFF08"),js=n("code",null,"$walletStore",-1),Ts=s("\uFF09\u3002\u4F7F\u7528 "),zs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ds=s("\u6B64\u5904"),Rs=s(" \u7684\u5B58\u50A8\u5E93\u5F15\u7528\uFF0C\u60A8\u53EF\u4EE5\u5728SSR\u6216SPA\u4E2D\u4F7F\u7528\u9002\u914D\u5668\u3002UI\u5305\u542B\u4E00\u4E2A"),Bs=n("code",null,"",-1),Ms=s("\u7EC4\u4EF6\uFF0C\u5141\u8BB8\u7528\u6237\u9009\u62E9\u4E00\u4E2A\u94B1\u5305\u5E76\u8FDE\u63A5\u5230\u5B83\u3002"),Ns=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u6765\u5B89\u88C5\u6240\u9700\u7684\u4F9D\u8D56\u9879\uFF1A

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},As=s("Svelte Wallet Adapter"),Cs=s(" \u5305\u5141\u8BB8\u6211\u4EEC\u5728\u4F7F\u7528Svelte\u6A21\u677F\u6216SvelteKit\u521B\u5EFA\u7684\u9879\u76EE\u4E2D\uFF0C\u5728\u6240\u6709JS\u3001TS\u6216/\u548CSvelte\u6587\u4EF6\u4E4B\u95F4\u6DFB\u52A0\u4E00\u4E2A\u53EF\u8BBF\u95EE\u7684Svelte Store\uFF08"),js=n("code",null,"$walletStore",-1),Ts=s("\uFF09\u3002\u4F7F\u7528 "),zs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Bs=s("\u6B64\u5904"),Ds=s(" \u7684\u5B58\u50A8\u5E93\u5F15\u7528\uFF0C\u60A8\u53EF\u4EE5\u5728SSR\u6216SPA\u4E2D\u4F7F\u7528\u9002\u914D\u5668\u3002UI\u5305\u542B\u4E00\u4E2A"),Rs=n("code",null,"",-1),Ms=s("\u7EC4\u4EF6\uFF0C\u5141\u8BB8\u7528\u6237\u9009\u62E9\u4E00\u4E2A\u94B1\u5305\u5E76\u8FDE\u63A5\u5230\u5B83\u3002"),Ns=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,C,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[R]),preview:a(()=>[B]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Rn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Bn]),preview:a(()=>[Mn]),_:1})]),_:1}),Nn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,n("a",ws,[_s,t(c)]),fs,vs,xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[Cs,t(c)]),As,js,Ts,n("a",zs,[Ds,t(c)]),Rs,Bs,Ms]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Js]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[B]),_:1}),t(e,{title:"C++"},{default:a(()=>[D]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Bn]),preview:a(()=>[Dn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Mn]),_:1})]),_:1}),Nn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,n("a",ws,[_s,t(c)]),fs,vs,xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[As,t(c)]),Cs,js,Ts,n("a",zs,[Bs,t(c)]),Ds,Rs,Ms]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Vs=l(b,[["render",Js]]);export{Vs as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.9ba5746a.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a22f3617.js similarity index 99% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.9ba5746a.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.a22f3617.js index d1cd9c194..3901c924a 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.9ba5746a.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a22f3617.js @@ -1,4 +1,4 @@ -import{_ as p,r as o,o as l,c,a,b as e,F as u,e as t,d as n}from"./app.07ce7a66.js";const i={},r=t(`

    Keypairs and Wallets

    How to generate a new Keypair (Yeni Keypair nas\u0131l olu\u015Fturulur)

    \xC7e\u015Fitli Solana kitapl\u0131klar\u0131 ile ger\xE7ekle\u015Ftirebilece\u011Finiz farkl\u0131 i\u015Flemlerin \xE7o\u011Fu, bir Keypair veya C\xFCzdan gerektirir. Bir c\xFCzdana ba\u011Flan\u0131yorsan\u0131z endi\u015Felenmenize gerek yok. Ancak, bir Keypair\u2019e ihtiyac\u0131n\u0131z varsa, bir tane olu\u015Fturman\u0131z gerekecektir.

    How to restore a Keypair from a secret(Secret\u2019tan Keypair nas\u0131l geri y\xFCklenir) Secret\u2019\u0131n\u0131z varsa, dApp'inizi test etmek i\xE7in keypair\u2019i secret\u2019tan alabilirsiniz.

    1. Byte\u2019tan
    const keypair = Keypair.fromSecretKey(
    +import{_ as p,r as o,o as l,c,a,b as e,F as u,e as t,d as n}from"./app.d411e3b3.js";const i={},r=t(`

    Keypairs and Wallets

    How to generate a new Keypair (Yeni Keypair nas\u0131l olu\u015Fturulur)

    \xC7e\u015Fitli Solana kitapl\u0131klar\u0131 ile ger\xE7ekle\u015Ftirebilece\u011Finiz farkl\u0131 i\u015Flemlerin \xE7o\u011Fu, bir Keypair veya C\xFCzdan gerektirir. Bir c\xFCzdana ba\u011Flan\u0131yorsan\u0131z endi\u015Felenmenize gerek yok. Ancak, bir Keypair\u2019e ihtiyac\u0131n\u0131z varsa, bir tane olu\u015Fturman\u0131z gerekecektir.

    How to restore a Keypair from a secret(Secret\u2019tan Keypair nas\u0131l geri y\xFCklenir) Secret\u2019\u0131n\u0131z varsa, dApp'inizi test etmek i\xE7in keypair\u2019i secret\u2019tan alabilirsiniz.

    1. Byte\u2019tan
    const keypair = Keypair.fromSecretKey(
       Uint8Array.from([
         174, 47, 154, 16, 202, 193, 206, 113, 199, 190, 53, 133, 169, 175, 31, 56,
         222, 53, 138, 189, 224, 216, 117, 173, 10, 149, 53, 45, 73, 251, 237, 246,
    @@ -80,7 +80,7 @@ import{_ as p,r as o,o as l,c,a,b as e,F as u,e as t,d as n}from"./app.07ce7a66.
     <template>
       <wallet-multi-button></wallet-multi-button>
     </template>
    -

    Svelte

    Gerekli ba\u011F\u0131ml\u0131l\u0131klar\u0131 y\xFCklemek i\xE7in a\u015Fa\u011F\u0131daki komutu \xE7al\u0131\u015Ft\u0131r\u0131n:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Gerekli ba\u011F\u0131ml\u0131l\u0131klar\u0131 y\xFCklemek i\xE7in a\u015Fa\u011F\u0131daki komutu \xE7al\u0131\u015Ft\u0131r\u0131n:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     
    `,4),P={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},j=n("Svelte Wallet Adapter"),T=n(" paketi, Svelte Template veya SvelteKit ile yap\u0131lan bir proje i\xE7indeki t\xFCm JS, TS ve/veya Svelte dosyalar\u0131 aras\u0131nda eri\u015Filebilir bir Svelte Ma\u011Fazas\u0131 ("),M=a("code",null,"$walletStore",-1),R=n(") eklemeye olanak tan\u0131r. "),D={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},E=n("Burada"),N=n("ki repo referans\u0131n\u0131 kullanarak adapt\xF6r\xFC SSR veya SPA i\xE7in kullanabilirsiniz. Kullan\u0131c\u0131 arabirimi paketi, kullan\u0131c\u0131lar\u0131n kendisine ba\u011Flanacak bir c\xFCzdan se\xE7mesine olanak tan\u0131yan bir "),V=a("code",null,"",-1),U=n(" bile\u015Feni i\xE7erir."),$=t(`
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import { WalletMultiButton } from "@svelte-on-solana/wallet-adapter-ui";
    diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.f62ce6aa.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a79a299d.js
    similarity index 92%
    rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.f62ce6aa.js
    rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.a79a299d.js
    index f8addef28..996fb5fc5 100644
    --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.f62ce6aa.js
    +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a79a299d.js
    @@ -1 +1 @@
    -const t={key:"v-7ff81144",path:"/vi/references/keypairs-and-wallets.html",title:"C\u1EB7p kho\xE1 v\xE0 V\xED",lang:"vi-VN",frontmatter:{title:"C\u1EB7p kho\xE1 v\xE0 V\xED",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | C\u1EB7p kho\xE1 v\xE0 V\xED"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | C\u1EB7p kho\xE1 v\xE0 V\xED"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u v\u1EC1 C\u1EB7p kho\xE1 v\xE0 V\xED, k\xFD v\xE0 x\xE1c nh\u1EADn tin nh\u1EAFn, c\u0169ng nh\u01B0 c\xE1c t\xE0i li\u1EC7u tham kh\u1EA3o kh\xE1c cho l\u1EADp tr\xECnh tr\xEAn Solana trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u v\u1EC1 C\u1EB7p kho\xE1 v\xE0 V\xED, k\xFD v\xE0 x\xE1c nh\u1EADn tin nh\u1EAFn, c\u0169ng nh\u01B0 c\xE1c t\xE0i li\u1EC7u tham kh\u1EA3o kh\xE1c cho l\u1EADp tr\xECnh tr\xEAn Solana trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh C\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-sinh-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i m\u1ED9t C\u1EB7p kho\xE1 t\u1EEB kho\xE1 ri\xEAng t\u01B0",slug:"lam-the-nao-\u0111e-phuc-hoi-mot-cap-khoa-tu-khoa-rieng-tu",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra m\u1ED9t c\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-kiem-tra-mot-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra n\u1EBFu m\u1ED9t kho\xE1 c\xF4ng khai kh\xF4ng t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE8ng",slug:"lam-the-nao-\u0111e-kiem-tra-neu-mot-khoa-cong-khai-khong-ton-tai-khoa-rieng-tu-tuong-ung",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh ra c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-sinh-ra-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i l\u1EA1i c\u1EB7p kho\xE1 t\u1EEB c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-phuc-hoi-lai-cap-khoa-tu-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh m\u1ED9t \u0111\u1ECBa ch\u1EC9 danh ngh\u0129a",slug:"lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o k\xFD v\xE0 ki\u1EC3m tra tinh nh\u1EAFn b\u1EB1ng v\xED",slug:"lam-the-nao-ky-va-kiem-tra-tinh-nhan-bang-vi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 k\u1EBFt n\u1ED1i v\xED",slug:"lam-the-nao-\u0111e-ket-noi-vi",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:2},{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1}]},filePathRelative:"vi/references/keypairs-and-wallets.md"};export{t as data};
    +const t={key:"v-7ff81144",path:"/vi/references/keypairs-and-wallets.html",title:"C\u1EB7p kho\xE1 v\xE0 V\xED",lang:"vi-VN",frontmatter:{title:"C\u1EB7p kho\xE1 v\xE0 V\xED",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | C\u1EB7p kho\xE1 v\xE0 V\xED"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | C\u1EB7p kho\xE1 v\xE0 V\xED"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u v\u1EC1 C\u1EB7p kho\xE1 v\xE0 V\xED, k\xFD v\xE0 x\xE1c nh\u1EADn tin nh\u1EAFn, c\u0169ng nh\u01B0 c\xE1c t\xE0i li\u1EC7u tham kh\u1EA3o kh\xE1c cho l\u1EADp tr\xECnh tr\xEAn Solana trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u v\u1EC1 C\u1EB7p kho\xE1 v\xE0 V\xED, k\xFD v\xE0 x\xE1c nh\u1EADn tin nh\u1EAFn, c\u0169ng nh\u01B0 c\xE1c t\xE0i li\u1EC7u tham kh\u1EA3o kh\xE1c cho l\u1EADp tr\xECnh tr\xEAn Solana trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh C\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-sinh-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i m\u1ED9t C\u1EB7p kho\xE1 t\u1EEB kho\xE1 ri\xEAng t\u01B0",slug:"lam-the-nao-\u0111e-phuc-hoi-mot-cap-khoa-tu-khoa-rieng-tu",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra m\u1ED9t c\u1EB7p kho\xE1",slug:"lam-the-nao-\u0111e-kiem-tra-mot-cap-khoa",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ki\u1EC3m tra n\u1EBFu m\u1ED9t kho\xE1 c\xF4ng khai kh\xF4ng t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE8ng",slug:"lam-the-nao-\u0111e-kiem-tra-neu-mot-khoa-cong-khai-khong-ton-tai-khoa-rieng-tu-tuong-ung",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh ra c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-sinh-ra-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 ph\u1EE5c h\u1ED3i l\u1EA1i c\u1EB7p kho\xE1 t\u1EEB c\u1EE5m mnemonic",slug:"lam-the-nao-\u0111e-phuc-hoi-lai-cap-khoa-tu-cum-mnemonic",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 sinh m\u1ED9t \u0111\u1ECBa ch\u1EC9 danh ngh\u0129a",slug:"lam-the-nao-\u0111e-sinh-mot-\u0111ia-chi-danh-nghia",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o k\xFD v\xE0 ki\u1EC3m tra tinh nh\u1EAFn b\u1EB1ng v\xED",slug:"lam-the-nao-ky-va-kiem-tra-tinh-nhan-bang-vi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 k\u1EBFt n\u1ED1i v\xED",slug:"lam-the-nao-\u0111e-ket-noi-vi",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:2},{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"vi/references/keypairs-and-wallets.md"};export{t as data};
    diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.e67c0c51.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a83650c9.js
    similarity index 96%
    rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.e67c0c51.js
    rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.a83650c9.js
    index 5e217904e..8b145cccd 100644
    --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.e67c0c51.js
    +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a83650c9.js
    @@ -1,13 +1,19 @@
    -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"keypairs-and-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-and-wallets","aria-hidden":"true"},"#"),s(" Keypairs and Wallets")],-1),d=n("h2",{id:"how-to-generate-a-new-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-new-keypair","aria-hidden":"true"},"#"),s(" How to generate a new Keypair")],-1),y=n("p",null,"Keypair \uB610\uB294 Wallet\uC744 \uC694\uAD6C\uD558\uB294 \uB2E4\uC591\uD55C Solana \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB4E4\uC5D0 \uB300\uD574 \uB2F9\uC2E0\uC740 \uB9CE\uC740 \uB2E4\uB978 \uC561\uC158\uB4E4\uC744 \uCDE8\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uB2F9\uC2E0\uC774 wallet\uC5D0 \uC5F0\uACB0\uD558\uACE0 \uC788\uB2E4\uBA74 \uAC71\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uC9C0\uB9CC \uB2F9\uC2E0\uC774 keypair\uAC00 \uD544\uC694\uD558\uB2E4\uBA74, \uD558\uB098\uB97C \uC0DD\uC131\uD560 \uD544\uC694\uAC00 \uC788\uC2B5\uB2C8\uB2E4.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"keypairs-and-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-and-wallets","aria-hidden":"true"},"#"),s(" Keypairs and Wallets")],-1),d=n("h2",{id:"how-to-generate-a-new-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-new-keypair","aria-hidden":"true"},"#"),s(" How to generate a new Keypair")],-1),y=n("p",null,"Keypair \uB610\uB294 Wallet\uC744 \uC694\uAD6C\uD558\uB294 \uB2E4\uC591\uD55C Solana \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB4E4\uC5D0 \uB300\uD574 \uB2F9\uC2E0\uC740 \uB9CE\uC740 \uB2E4\uB978 \uC561\uC158\uB4E4\uC744 \uCDE8\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uB2F9\uC2E0\uC774 wallet\uC5D0 \uC5F0\uACB0\uD558\uACE0 \uC788\uB2E4\uBA74 \uAC71\uC815\uD560 \uD544\uC694\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD558\uC9C0\uB9CC \uB2F9\uC2E0\uC774 keypair\uAC00 \uD544\uC694\uD558\uB2E4\uBA74, \uD558\uB098\uB97C \uC0DD\uC131\uD560 \uD544\uC694\uAC00 \uC788\uC2B5\uB2C8\uB2E4.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`),n("span",{class:"token keyword"},"import"),s(` based58
     
     keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    +
    +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` 
    +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),f=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(`
     
     `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(`
    @@ -33,7 +39,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
     
     `),n("span",{class:"token comment"},"# pubkey: 9ZNTfG4NyQgxy2SWjSiQoUyBPEvXT2xo7fKc5hPYYJ7b"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),W=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new
    -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"how-to-restore-a-keypair-from-a-secret",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-restore-a-keypair-from-a-secret","aria-hidden":"true"},"#"),s(" How to restore a Keypair from a secret")],-1),C=n("p",null,"\uB9CC\uC57D \uB2F9\uC2E0\uC774 secret\uC744 \uC774\uBBF8 \uAC00\uC9C0\uACE0 \uC788\uB2E4\uBA74, \uB2F9\uC2E0\uC740 dApp\uC744 \uD14C\uC2A4\uD2B8\uD558\uAE30 \uC704\uD574 secret\uC73C\uB85C\uBD80\uD130 Keypair\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),A=n("ol",null,[n("li",null,"Bytes\uB85C\uBD80\uD130")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),S=n("h2",{id:"how-to-restore-a-keypair-from-a-secret",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-restore-a-keypair-from-a-secret","aria-hidden":"true"},"#"),s(" How to restore a Keypair from a secret")],-1),A=n("p",null,"\uB9CC\uC57D \uB2F9\uC2E0\uC774 secret\uC744 \uC774\uBBF8 \uAC00\uC9C0\uACE0 \uC788\uB2E4\uBA74, \uB2F9\uC2E0\uC740 dApp\uC744 \uD14C\uC2A4\uD2B8\uD558\uAE30 \uC704\uD574 secret\uC73C\uB85C\uBD80\uD130 Keypair\uB97C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),C=n("ol",null,[n("li",null,"Bytes\uB85C\uBD80\uD130")],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(`
    @@ -53,7 +59,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
         `),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"63"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"176"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"109"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"168"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"238"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"135"),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),B=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
     
     secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(`
             `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(`
    @@ -64,7 +70,7 @@ secret_key`),n("span",{class:"token operator"},"="),s(),n("span",{class:"token p
         
     keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),N=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),D=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("secret_key"),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(`
             `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(`
             `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(`
             `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(`
    @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
         `),n("span",{class:"token punctuation"},"]"),s(`
         
     keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),N=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(`
     
     `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(`
     
    @@ -88,14 +94,14 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
       Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),z=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(`
     `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token number"},"63"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"176"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"109"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"168"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"238"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"135"),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
     Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
         `),n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(`
    @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"
         `),n("span",{class:"token punctuation"},")"),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(`
       bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(`
         `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
       `),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
     
     b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
    @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(`
         `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(`
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"how-to-verify-a-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-verify-a-keypair","aria-hidden":"true"},"#"),s(" How to verify a Keypair")],-1),X=n("p",null,"keypair\uAC00 \uC8FC\uC5B4\uC84C\uB2E4\uBA74 \uB2F9\uC2E0\uC740 secret\uC774 \uC8FC\uC5B4\uC9C4 public key\uC640 \uC77C\uCE58\uD558\uB294\uC9C0 \uAC80\uC99D\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"how-to-verify-a-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-verify-a-keypair","aria-hidden":"true"},"#"),s(" How to verify a Keypair")],-1),I=n("p",null,"keypair\uAC00 \uC8FC\uC5B4\uC84C\uB2E4\uBA74 \uB2F9\uC2E0\uC740 secret\uC774 \uC8FC\uC5B4\uC9C4 public key\uC640 \uC77C\uCE58\uD558\uB294\uC9C0 \uAC80\uC99D\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(`
    @@ -171,7 +177,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token comment"},"// true"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(`
       Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),s(`
         `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(`
    @@ -182,7 +188,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token comment"},"// true"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),G=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
     `),n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("pubkey "),n("span",{class:"token keyword"},"import"),s(` Pubkey
     
     public_key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),s(`
    @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke
     off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(`
     
    -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(`
    +  error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(`
    +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(`
    +  `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(`
     `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(`
    @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span
     
     mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
     words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
     words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),fn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new
    @@ -328,15 +338,18 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok
     `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic
     
     mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(`
    +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` 
    +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(`
    +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(`
     `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(`
    -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),An=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(`
    +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` 
    +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(`
    +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover
    -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (HD \uC9C0\uAC11\uC73C\uB85C\uB3C4 \uC54C\uB824\uC9C4 \uB2E4\uC911 \uC9C0\uAC11)")],-1),Dn=n("p",null,"\uB2F9\uC2E0\uC740 \uD558\uB098\uC758 seed\uB85C\uBD80\uD130 \uB2E4\uC911 \uC9C0\uAC11\uC744 \uB9CC\uB4E4 \uC218 \uC788\uC2B5\uB2C8\uB2E4. - 'Hierarchical Deterministic wallets' or HD wallets\uC73C\uB85C\uB3C4 \uC54C\uB824\uC9C4:",-1),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (HD \uC9C0\uAC11\uC73C\uB85C\uB3C4 \uC54C\uB824\uC9C4 \uB2E4\uC911 \uC9C0\uAC11)")],-1),Bn=n("p",null,"\uB2F9\uC2E0\uC740 \uD558\uB098\uC758 seed\uB85C\uBD80\uD130 \uB2E4\uC911 \uC9C0\uAC11\uC744 \uB9CC\uB4E4 \uC218 \uC788\uC2B5\uB2C8\uB2E4. - 'Hierarchical Deterministic wallets' or HD wallets\uC73C\uB85C\uB3C4 \uC54C\uB824\uC9C4:",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(`
     
    @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
         `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token punctuation"},"}"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Rn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(`
       `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(`
     `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
    @@ -359,8 +372,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
       `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("h2",{id:"how-to-generate-a-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-generate-a-vanity-address","aria-hidden":"true"},"#"),s(" How to generate a vanity address")],-1),En=n("p",null,'Vanity publickeys \uB610\uB294 custom addresses\uB294 \uD2B9\uBCC4\uD55C \uBB38\uC790\uB4E4\uB85C \uC2DC\uC791\uD558\uB294 key\uB4E4\uC785\uB2C8\uB2E4. \uC608\uB97C\uB4E4\uC5B4, \uC5B4\uB5A4 \uC0AC\uB78C\uC740 publickey\uAC00 "elv1s" \uB610\uB294 "cook"\uC73C\uB85C \uC2DC\uC791\uD558\uAE38 \uC6D0\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uC774\uAC83\uB4E4\uC740 \uB2E4\uB978 \uC0AC\uB78C\uB4E4\uC774 \uC774 key\uAC00 \uB204\uAD6C\uC758 \uAC83\uC778\uC9C0 \uAE30\uC5B5\uD560 \uC218 \uC788\uAC8C \uB3C4\uC640\uC90D\uB2C8\uB2E4. \uC989 \uC774 key\uB97C \uB354 \uC27D\uAC8C \uC2DD\uBCC4 \uAC00\uB2A5\uD558\uAC8C \uB9CC\uB4E4\uC5B4 \uC90D\uB2C8\uB2E4.',-1),Hn=n("p",null,"Note: \uB2F9\uC2E0\uC758 vanity address\uC5D0 \uBB38\uC790\uB4E4\uC774 \uB9CE\uC744\uC218\uB85D \uB354 \uC624\uB798 \uAC78\uB9BD\uB2C8\uB2E4.",-1),Jn=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"\uC774 \uC791\uC5C5\uC744 \uC704\uD574\uC11C\uB294 CLI\uB97C \uC0AC\uC6A9\uD574\uC57C \uD569\uB2C8\uB2E4. Python \uACFC TypeScript \uC608\uC81C\uB4E4\uC740 \uBCF4\uC5EC\uC8FC\uAE30 \uC704\uD55C \uBAA9\uC801\uC73C\uB85C CLI\uBCF4\uB2E4 \uD6E8\uC52C \uB290\uB9BD\uB2C8\uB2E4.")],-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
    @@ -369,11 +382,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
         keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token punctuation"},"}"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
       keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Yn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair
     
     keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(`
     `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(`
    @@ -402,9 +415,9 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:
     `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(`
         key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1
    -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1
    -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"how-to-sign-and-verify-messages-with-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-sign-and-verify-messages-with-wallets","aria-hidden":"true"},"#"),s(" How to sign and verify messages with wallets")],-1),$n=n("p",null,"keypair\uC758 \uC8FC\uB41C \uAE30\uB2A5\uC740 message\uB4E4\uC5D0 \uC11C\uBA85\uD558\uACE0 \uC774 \uC11C\uBA85\uC744 \uAC80\uC99D \uAC00\uB2A5\uD558\uAC8C \uB9CC\uB4DC\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC11C\uBA85\uC5D0 \uB300\uD55C \uAC80\uC99D\uC740 \uC218\uC2E0\uC790\uAC00 \uC774 \uB370\uC774\uD130\uAC00 \uD2B9\uC815 private key\uC758 \uC18C\uC720\uC790\uC5D0 \uC758\uD574 \uC11C\uBA85\uB418\uC5C8\uB2E4\uB294 \uAC83\uC744 \uD655\uC2E0\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4.",-1),Gn=s("\uC774\uAC78 \uD558\uAE30 \uC704\uD574 \uC6B0\uB9AC\uB294 "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C import \uD560 \uAC83\uC785\uB2C8\uB2E4."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1
    +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1
    +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"how-to-sign-and-verify-messages-with-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-sign-and-verify-messages-with-wallets","aria-hidden":"true"},"#"),s(" How to sign and verify messages with wallets")],-1),Gn=n("p",null,"keypair\uC758 \uC8FC\uB41C \uAE30\uB2A5\uC740 message\uB4E4\uC5D0 \uC11C\uBA85\uD558\uACE0 \uC774 \uC11C\uBA85\uC744 \uAC80\uC99D \uAC00\uB2A5\uD558\uAC8C \uB9CC\uB4DC\uB294 \uAC83\uC785\uB2C8\uB2E4. \uC11C\uBA85\uC5D0 \uB300\uD55C \uAC80\uC99D\uC740 \uC218\uC2E0\uC790\uAC00 \uC774 \uB370\uC774\uD130\uAC00 \uD2B9\uC815 private key\uC758 \uC18C\uC720\uC790\uC5D0 \uC758\uD574 \uC11C\uBA85\uB418\uC5C8\uB2E4\uB294 \uAC83\uC744 \uD655\uC2E0\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4.",-1),$n=s("\uC774\uAC78 \uD558\uAE30 \uC704\uD574 \uC6B0\uB9AC\uB294 "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s(" \uB77C\uC774\uBE0C\uB7EC\uB9AC\uB97C import \uD560 \uAC83\uC785\uB2C8\uB2E4."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(`
     
    @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str
     signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(`
     verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(`
     
    -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(`
    +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(`
     signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(`
     verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(`
    @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{
     `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(`
       `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(`
     `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \uC694\uAD6C\uB418\uB294 \uC758\uC874\uC131\uB4E4\uC744 \uC124\uCE58\uD558\uAE30 \uC704\uD574 \uC544\uB798\uC758 \uBA85\uB839\uC5B4\uB97C \uC2E4\uD589\uD558\uC138\uC694:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Cs=s("Svelte Wallet Adapter"),As=s(" \uD328\uD0A4\uC9C0\uB294 \uD504\uB85C\uC81D\uD2B8 \uB0B4\uC758 \uBAA8\uB4E0 JS, TS \uB610\uB294/\uADF8\uB9AC\uACE0 Svelte \uD30C\uC77C\uB4E4\uC5D0\uC11C \uC811\uADFC\uD560 \uC218 \uC788\uB294 Svelte Store ("),js=n("code",null,"$walletStore",-1),Ts=s(")\uC744 \uCD94\uAC00\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4. "),Ds={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ns=s("\uC5EC\uAE30"),Rs=s(" \uC788\uB294 \uB808\uD37C\uB7F0\uC2A4\uB97C \uC0AC\uC6A9\uD574\uC11C \uB2F9\uC2E0\uC740 SSR \uB610\uB294 SPA\uB97C \uC704\uD55C \uC5B4\uB311\uD130\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. UI \uD328\uD0A4\uC9C0\uB294 "),zs=n("code",null,"",-1),Bs=s(" \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uD3EC\uD568\uD558\uACE0 \uC788\uACE0 \uC774\uAC83\uC740 \uC0AC\uC6A9\uC790\uB4E4\uC774 \uC5F0\uACB0\uD560 \uC9C0\uAC11\uC744 \uC120\uD0DD\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4."),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \uC694\uAD6C\uB418\uB294 \uC758\uC874\uC131\uB4E4\uC744 \uC124\uCE58\uD558\uAE30 \uC704\uD574 \uC544\uB798\uC758 \uBA85\uB839\uC5B4\uB97C \uC2E4\uD589\uD558\uC138\uC694:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},As=s("Svelte Wallet Adapter"),Cs=s(" \uD328\uD0A4\uC9C0\uB294 \uD504\uB85C\uC81D\uD2B8 \uB0B4\uC758 \uBAA8\uB4E0 JS, TS \uB610\uB294/\uADF8\uB9AC\uACE0 Svelte \uD30C\uC77C\uB4E4\uC5D0\uC11C \uC811\uADFC\uD560 \uC218 \uC788\uB294 Svelte Store ("),js=n("code",null,"$walletStore",-1),Ts=s(")\uC744 \uCD94\uAC00\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4. "),Bs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ds=s("\uC5EC\uAE30"),Ns=s(" \uC788\uB294 \uB808\uD37C\uB7F0\uC2A4\uB97C \uC0AC\uC6A9\uD574\uC11C \uB2F9\uC2E0\uC740 SSR \uB610\uB294 SPA\uB97C \uC704\uD55C \uC5B4\uB311\uD130\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. UI \uD328\uD0A4\uC9C0\uB294 "),Rs=n("code",null,"",-1),zs=s(" \uCEF4\uD3EC\uB10C\uD2B8\uB97C \uD3EC\uD568\uD558\uACE0 \uC788\uACE0 \uC774\uAC83\uC740 \uC0AC\uC6A9\uC790\uB4E4\uC774 \uC5F0\uACB0\uD560 \uC9C0\uAC11\uC744 \uC120\uD0DD\uD560 \uC218 \uC788\uAC8C \uD574 \uC90D\uB2C8\uB2E4."),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Hs(Js,Us){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,C,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[D]),preview:a(()=>[N]),_:1}),t(e,{title:"C++"},{default:a(()=>[R]),preview:a(()=>[z]),_:1}),t(e,{title:"Rust"},{default:a(()=>[B]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[H]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Nn]),preview:a(()=>[Rn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[zn]),preview:a(()=>[Bn]),_:1})]),_:1}),Mn,En,Hn,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,ws,_s,n("a",fs,[vs,t(c)]),xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[Cs,t(c)]),As,js,Ts,n("a",Ds,[Ns,t(c)]),Rs,zs,Bs]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Hs]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Hs(Js,Us){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,A,C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[B]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[N]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[z]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[H]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[An]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Cn]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Bn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[zn]),_:1})]),_:1}),Mn,En,Hn,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,ws,_s,n("a",fs,[vs,t(c)]),xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[As,t(c)]),Cs,js,Ts,n("a",Bs,[Ds,t(c)]),Ns,Rs,zs]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Vs=l(b,[["render",Hs]]);export{Vs as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.35579864.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a876964b.js similarity index 90% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.35579864.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.a876964b.js index 8b23715e3..2f3a30db6 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.35579864.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.a876964b.js @@ -1 +1 @@ -const a={key:"v-670400c0",path:"/fil/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"fil-PH",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Paano bumuo ng bagong Keypair",slug:"paano-bumuo-ng-bagong-keypair",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang lihim",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim",children:[]},{level:2,title:"Paano i-verify ang isang Keypair",slug:"paano-i-verify-ang-isang-keypair",children:[]},{level:2,title:"Paano tingnan kung ang isang pampublikong susi ay may nauugnay na pribadong susi",slug:"paano-tingnan-kung-ang-isang-pampublikong-susi-ay-may-nauugnay-na-pribadong-susi",children:[]},{level:2,title:"Paano bumuo ng isang mnemonic na parirala",slug:"paano-bumuo-ng-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang mnemonic na parirala",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano bumuo ng vanity address",slug:"paano-bumuo-ng-vanity-address",children:[]},{level:2,title:"Paano mag-sign at mag-verify ng mga mensahe gamit ang mga wallet",slug:"paano-mag-sign-at-mag-verify-ng-mga-mensahe-gamit-ang-mga-wallet",children:[]},{level:2,title:"Paano kumonekta sa isang wallet",slug:"paano-kumonekta-sa-isang-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1687314835e3,contributors:[{name:"mh",email:"kimerran@users.noreply.github.com",commits:1}]},filePathRelative:"fil/references/keypairs-and-wallets.md"};export{a as data}; +const a={key:"v-670400c0",path:"/fil/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"fil-PH",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"Paano bumuo ng bagong Keypair",slug:"paano-bumuo-ng-bagong-keypair",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang lihim",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-lihim",children:[]},{level:2,title:"Paano i-verify ang isang Keypair",slug:"paano-i-verify-ang-isang-keypair",children:[]},{level:2,title:"Paano tingnan kung ang isang pampublikong susi ay may nauugnay na pribadong susi",slug:"paano-tingnan-kung-ang-isang-pampublikong-susi-ay-may-nauugnay-na-pribadong-susi",children:[]},{level:2,title:"Paano bumuo ng isang mnemonic na parirala",slug:"paano-bumuo-ng-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano ibalik ang isang Keypair mula sa isang mnemonic na parirala",slug:"paano-ibalik-ang-isang-keypair-mula-sa-isang-mnemonic-na-parirala",children:[]},{level:2,title:"Paano bumuo ng vanity address",slug:"paano-bumuo-ng-vanity-address",children:[]},{level:2,title:"Paano mag-sign at mag-verify ng mga mensahe gamit ang mga wallet",slug:"paano-mag-sign-at-mag-verify-ng-mga-mensahe-gamit-ang-mga-wallet",children:[]},{level:2,title:"Paano kumonekta sa isang wallet",slug:"paano-kumonekta-sa-isang-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"mh",email:"kimerran@users.noreply.github.com",commits:1}]},filePathRelative:"fil/references/keypairs-and-wallets.md"};export{a as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.96505086.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.abc05e48.js similarity index 89% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.96505086.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.abc05e48.js index 6be36b76e..7a3af3846 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.96505086.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.abc05e48.js @@ -1 +1 @@ -const e={key:"v-48d4f310",path:"/kr/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"kr-KR",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"TaeGit",email:"tgsong827@gmail.com",commits:1}]},filePathRelative:"kr/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-48d4f310",path:"/kr/references/keypairs-and-wallets.html",title:"Keypairs and Wallets",lang:"kr-KR",frontmatter:{title:"Keypairs and Wallets",head:[["meta",{name:"title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"og:title",content:"Solana Cookbook | Keypairs and Wallets"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"How to generate a new Keypair",slug:"how-to-generate-a-new-keypair",children:[]},{level:2,title:"How to restore a Keypair from a secret",slug:"how-to-restore-a-keypair-from-a-secret",children:[]},{level:2,title:"How to verify a Keypair",slug:"how-to-verify-a-keypair",children:[]},{level:2,title:"How to check if a public key has an associated private key",slug:"how-to-check-if-a-public-key-has-an-associated-private-key",children:[]},{level:2,title:"How to generate a mnemonic phrase",slug:"how-to-generate-a-mnemonic-phrase",children:[]},{level:2,title:"How to restore a Keypair from a mnemonic phrase",slug:"how-to-restore-a-keypair-from-a-mnemonic-phrase",children:[]},{level:2,title:"How to generate a vanity address",slug:"how-to-generate-a-vanity-address",children:[]},{level:2,title:"How to sign and verify messages with wallets",slug:"how-to-sign-and-verify-messages-with-wallets",children:[]},{level:2,title:"How to connect to a wallet",slug:"how-to-connect-to-a-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"TaeGit",email:"tgsong827@gmail.com",commits:1}]},filePathRelative:"kr/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c98a65c6.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c4fc2c20.js similarity index 91% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.c98a65c6.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.c4fc2c20.js index 961dcbe97..16492bddc 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c98a65c6.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c4fc2c20.js @@ -1 +1 @@ -const e={key:"v-4e42d094",path:"/zh_t/references/keypairs-and-wallets.html",title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",lang:"en-US",frontmatter:{title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",head:[["meta",{name:"title",content:"Solana\u7955\u7C4D | \u5BC6\u9470\u5C0D\u548C\u9322\u5305"}],["meta",{name:"og:title",content:"Solana\u7955\u7C4D | \u5BC6\u9470\u5C0D\u548C\u9322\u5305"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",slug:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",children:[]},{level:2,title:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",slug:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",children:[{level:3,title:"\u53CD\u61C9",slug:"\u53CD\u61C9",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1688705294e3,contributors:[{name:"lillianrf",email:"138085102+lillianrf@users.noreply.github.com",commits:1}]},filePathRelative:"zh_t/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-4e42d094",path:"/zh_t/references/keypairs-and-wallets.html",title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",lang:"en-US",frontmatter:{title:"\u5BC6\u9470\u5C0D\u548C\u9322\u5305",head:[["meta",{name:"title",content:"Solana\u7955\u7C4D | \u5BC6\u9470\u5C0D\u548C\u9322\u5305"}],["meta",{name:"og:title",content:"Solana\u7955\u7C4D | \u5BC6\u9470\u5C0D\u548C\u9322\u5305"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u5F9E\u5BC6\u9470\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u9A57\u8B49\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",slug:"\u5982\u4F55\u6AA2\u67E5\u4E00\u500B\u516C\u9470\u662F\u5426\u6709\u95DC\u806F\u7684\u79C1\u9470",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8A18\u8A5E",children:[]},{level:2,title:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",slug:"\u5982\u4F55\u901A\u904E\u52A9\u8A18\u8A5E\u6062\u5FA9\u5BC6\u9470\u5C0D",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u7FA9\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u9322\u5305\u4F86\u7C3D\u540D\u548C\u9A57\u8B49\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",slug:"\u5982\u4F55\u9023\u63A5\u5230\u9322\u5305",children:[{level:3,title:"\u53CD\u61C9",slug:"\u53CD\u61C9",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"lillianrf",email:"138085102+lillianrf@users.noreply.github.com",commits:1}]},filePathRelative:"zh_t/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.af37857f.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c5823658.js similarity index 97% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.af37857f.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.c5823658.js index 3f207b4f0..590a7e282 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.af37857f.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c5823658.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"keypairs-and-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-and-wallets","aria-hidden":"true"},"#"),s(" Keypairs and Wallets")],-1),d=n("h2",{id:"\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u65B0\u3057\u3044\u30AD\u30FC\u30DA\u30A2\u306E\u751F\u6210\u65B9\u6CD5")],-1),y=n("p",null,"\u3055\u307E\u3056\u307E\u306A Solana \u30E9\u30A4\u30D6\u30E9\u30EA\u3067\u5B9F\u884C\u3067\u304D\u308B\u3055\u307E\u3056\u307E\u306A\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u591A\u304F\u306B\u306F\u3001\u30AD\u30FC\u30DA\u30A2\u307E\u305F\u306F\u30A6\u30A9\u30EC\u30C3\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002 \u30A6\u30A9\u30EC\u30C3\u30C8\u306B\u63A5\u7D9A\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u5FC3\u914D\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u305F\u3060\u3057\u3001\u9375\u30DA\u30A2\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"keypairs-and-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-and-wallets","aria-hidden":"true"},"#"),s(" Keypairs and Wallets")],-1),d=n("h2",{id:"\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u65B0\u3057\u3044\u30AD\u30FC\u30D8\u309A\u30A2\u306E\u751F\u6210\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u65B0\u3057\u3044\u30AD\u30FC\u30DA\u30A2\u306E\u751F\u6210\u65B9\u6CD5")],-1),y=n("p",null,"\u3055\u307E\u3056\u307E\u306A Solana \u30E9\u30A4\u30D6\u30E9\u30EA\u3067\u5B9F\u884C\u3067\u304D\u308B\u3055\u307E\u3056\u307E\u306A\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u591A\u304F\u306B\u306F\u3001\u30AD\u30FC\u30DA\u30A2\u307E\u305F\u306F\u30A6\u30A9\u30EC\u30C3\u30C8\u304C\u5FC5\u8981\u3067\u3059\u3002 \u30A6\u30A9\u30EC\u30C3\u30C8\u306B\u63A5\u7D9A\u3057\u3066\u3044\u308B\u5834\u5408\u306F\u3001\u5FC3\u914D\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002\u305F\u3060\u3057\u3001\u9375\u30DA\u30A2\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u751F\u6210\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),f=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -88,14 +94,14 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),D=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"63"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"176"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"109"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"168"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"238"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"135"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),D=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" secret_key"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"64"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"["),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30AD\u30FC\u30DA\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5")],-1),X=n("p",null,"\u30AD\u30FC\u30DA\u30A2\u304C\u4E0E\u3048\u3089\u308C\u305F\u5834\u5408\u3001\u79D8\u5BC6\u304C\u4E0E\u3048\u3089\u308C\u305F\u516C\u958B\u9375\u3068\u4E00\u81F4\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30AD\u30FC\u30D8\u309A\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30AD\u30FC\u30DA\u30A2\u3092\u78BA\u8A8D\u3059\u308B\u65B9\u6CD5")],-1),I=n("p",null,"\u30AD\u30FC\u30DA\u30A2\u304C\u4E0E\u3048\u3089\u308C\u305F\u5834\u5408\u3001\u79D8\u5BC6\u304C\u4E0E\u3048\u3089\u308C\u305F\u516C\u958B\u9375\u3068\u4E00\u81F4\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -171,7 +177,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(` @@ -182,7 +188,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"==="),s(" publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// true"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),G=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair `),n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("pubkey "),n("span",{class:"token keyword"},"import"),s(` Pubkey public_key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"24PNhTaNtomHhoy3fTRaMhAFCRj4uHqhZEEoWrKDbR5p"'),n("span",{class:"token punctuation"},")"),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),fn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,13 +338,16 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (\u8907\u6570\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u3001\u5225\u540D HD\u30A6\u30A9\u30EC\u30C3\u30C8)")],-1),Rn=n("p",null,"\u5358\u4E00\u306E\u30B7\u30FC\u30C9\u304B\u3089\u8907\u6570\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u3092\u4F5C\u6210\u3067\u304D\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u300C\u968E\u5C64\u7684\u6C7A\u5B9A\u8AD6\u7684\u30A6\u30A9\u30EC\u30C3\u30C8\u300D\u307E\u305F\u306F HD \u30A6\u30A9\u30EC\u30C3\u30C8\u3068\u3082\u547C\u3070\u308C\u307E\u3059\u3002:",-1),Nn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` @@ -359,8 +372,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Dn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Dn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("h2",{id:"\u30CF\u3099\u30CB\u30C6\u30A3\u30A2\u30C8\u3099\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30CF\u3099\u30CB\u30C6\u30A3\u30A2\u30C8\u3099\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30D0\u30CB\u30C6\u30A3\u30A2\u30C9\u30EC\u30B9\u306E\u751F\u6210\u65B9\u6CD5")],-1),En=n("p",null,"\u30D0\u30CB\u30C6\u30A3\u516C\u958B\u9375\u307E\u305F\u306F\u30AB\u30B9\u30BF\u30E0 \u30A2\u30C9\u30EC\u30B9\u306F\u3001\u7279\u5B9A\u306E\u6587\u5B57\u3067\u59CB\u307E\u308B\u30AD\u30FC\u3067\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u516C\u958B\u9375\u3092\u300Celv1s\u300D\u307E\u305F\u306F\u300Ccook\u300D\u3067\u958B\u59CB\u3057\u305F\u3044\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u308C\u3089\u306F\u3001\u4ED6\u306E\u4EBA\u304C\u30AD\u30FC\u306E\u6240\u6709\u8005\u3092\u601D\u3044\u51FA\u3059\u306E\u306B\u5F79\u7ACB\u3061\u3001\u30AD\u30FC\u3092\u3088\u308A\u7C21\u5358\u306B\u8B58\u5225\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002",-1),Jn=n("p",null,"Note: \u30D0\u30CB\u30C6\u30A3 \u30A2\u30C9\u30EC\u30B9\u306E\u6587\u5B57\u6570\u304C\u591A\u3044\u307B\u3069\u3001\u6642\u9593\u304C\u304B\u304B\u308A\u307E\u3059\u3002",-1),Un=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"WARNING"),n("p",null,"\u3053\u306E\u30BF\u30B9\u30AF\u306B\u306F CLI \u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 Python \u3068 TypeScript \u306E\u4F8B\u306F\u8AAC\u660E\u3092\u76EE\u7684\u3068\u3057\u3066\u304A\u308A\u3001CLI \u3088\u308A\u3082\u306F\u308B\u304B\u306B\u9045\u304F\u306A\u308A\u307E\u3059\u3002")],-1),Hn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -369,11 +382,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Yn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` @@ -402,9 +415,9 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5")],-1),$n=n("p",null,"\u9375\u30DA\u30A2\u306E\u4E3B\u306A\u6A5F\u80FD\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3001\u7F72\u540D\u306E\u691C\u8A3C\u3092\u53EF\u80FD\u306B\u3059\u308B\u3053\u3068\u3067\u3059\u3002 \u7F72\u540D\u306E\u691C\u8A3C\u306B\u3088\u308A\u3001\u53D7\u4FE1\u8005\u306F\u3001\u30C7\u30FC\u30BF\u304C\u7279\u5B9A\u306E\u79D8\u5BC6\u9375\u306E\u6240\u6709\u8005\u306B\u3088\u3063\u3066\u7F72\u540D\u3055\u308C\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002",-1),Gn=s("\u305D\u306E\u305F\u3081\u306B\u3001"),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s("\u6697\u53F7\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002"),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30A6\u30A9\u30EC\u30C3\u30C8\u3066\u3099\u30E1\u30C3\u30BB\u30FC\u30B7\u3099\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30A6\u30A9\u30EC\u30C3\u30C8\u3067\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3066\u691C\u8A3C\u3059\u308B\u65B9\u6CD5")],-1),Gn=n("p",null,"\u9375\u30DA\u30A2\u306E\u4E3B\u306A\u6A5F\u80FD\u306F\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u7F72\u540D\u3057\u3001\u7F72\u540D\u306E\u691C\u8A3C\u3092\u53EF\u80FD\u306B\u3059\u308B\u3053\u3068\u3067\u3059\u3002 \u7F72\u540D\u306E\u691C\u8A3C\u306B\u3088\u308A\u3001\u53D7\u4FE1\u8005\u306F\u3001\u30C7\u30FC\u30BF\u304C\u7279\u5B9A\u306E\u79D8\u5BC6\u9375\u306E\u6240\u6709\u8005\u306B\u3088\u3063\u3066\u7F72\u540D\u3055\u308C\u305F\u3053\u3068\u3092\u78BA\u8A8D\u3067\u304D\u307E\u3059\u3002",-1),$n=s("\u305D\u306E\u305F\u3081\u306B\u3001"),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s("\u6697\u53F7\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u30A4\u30F3\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002"),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \u6B21\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u3066\u3001\u5FC5\u8981\u306A\u4F9D\u5B58\u95A2\u4FC2\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Cs=s("Svelte Wallet Adapter"),As=s("\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u4F7F\u3046\u3053\u3068\u306B\u3088\u308A\u3001Svelte Template\u307E\u305F\u306FSvelteKit\u3067\u4F5C\u6210\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u3059\u3079\u3066\u306EJS\u3001TS\u3001Svelte \u30D5\u30A1\u30A4\u30EB\u9593\u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A Svelte\u30B9\u30C8\u30A2("),js=n("code",null,"$walletStore",-1),Ts=s(") \u3092\u8FFD\u52A0\u3067\u304D\u307E\u3059\u3002"),Rs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ns=s("\u3053\u3061\u3089"),zs=s("\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u53C2\u7167\u306E\u4E0A\u3001SSR \u307E\u305F\u306F SPA \u7528\u306E\u30A2\u30C0\u30D7\u30BF\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002UI \u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u30E6\u30FC\u30B6\u30FC\u304C\u30A6\u30A9\u30EC\u30C3\u30C8\u3092\u9078\u629E\u3057\u3066\u63A5\u7D9A\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B "),Ds=n("code",null,"",-1),Bs=s(" \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002"),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=u(`

    Svelte

    \u6B21\u306E\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u3066\u3001\u5FC5\u8981\u306A\u4F9D\u5B58\u95A2\u4FC2\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3057\u307E\u3059:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ss={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},Cs=s("Svelte Wallet Adapter"),As=s("\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u4F7F\u3046\u3053\u3068\u306B\u3088\u308A\u3001Svelte Template\u307E\u305F\u306FSvelteKit\u3067\u4F5C\u6210\u3055\u308C\u305F\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\u306E\u3059\u3079\u3066\u306EJS\u3001TS\u3001Svelte \u30D5\u30A1\u30A4\u30EB\u9593\u3067\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A Svelte\u30B9\u30C8\u30A2("),js=n("code",null,"$walletStore",-1),Ts=s(") \u3092\u8FFD\u52A0\u3067\u304D\u307E\u3059\u3002"),Rs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Ns=s("\u3053\u3061\u3089"),zs=s("\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u53C2\u7167\u306E\u4E0A\u3001SSR \u307E\u305F\u306F SPA \u7528\u306E\u30A2\u30C0\u30D7\u30BF\u30FC\u3092\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002UI \u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u30E6\u30FC\u30B6\u30FC\u304C\u30A6\u30A9\u30EC\u30C3\u30C8\u3092\u9078\u629E\u3057\u3066\u63A5\u7D9A\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B "),Bs=n("code",null,"",-1),Ds=s(" \u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002"),Ms=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,C,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[R]),preview:a(()=>[N]),_:1}),t(e,{title:"C++"},{default:a(()=>[z]),preview:a(()=>[D]),_:1}),t(e,{title:"Rust"},{default:a(()=>[B]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Rn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Nn]),preview:a(()=>[zn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Dn]),preview:a(()=>[Bn]),_:1})]),_:1}),Mn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Yn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,ws,_s,n("a",fs,[vs,t(c)]),xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[Cs,t(c)]),As,js,Ts,n("a",Rs,[Ns,t(c)]),zs,Ds,Bs]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Ys=l(b,[["render",Js]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Js(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[f]),preview:a(()=>[v]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,C,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[R]),preview:a(()=>[N]),_:1}),t(e,{title:"C++"},{default:a(()=>[z]),preview:a(()=>[B]),_:1}),t(e,{title:"Rust"},{default:a(()=>[D]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[G]),_:1}),t(e,{title:"Python"},{default:a(()=>[$]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[fn]),_:1})]),_:1}),vn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,Rn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Nn]),preview:a(()=>[zn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Bn]),preview:a(()=>[Dn]),_:1})]),_:1}),Mn,En,Jn,Un,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Hn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Ln]),_:1}),t(e,{title:"C++"},{default:a(()=>[qn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,Gn,n("p",null,[$n,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ks]),preview:a(()=>[rs]),_:1})]),_:1}),bs,n("p",null,[n("a",ms,[ds,t(c)]),ys,gs,hs,ws,_s,n("a",fs,[vs,t(c)]),xs]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ks]),preview:a(()=>[Ps]),_:1})]),_:1}),Ws,n("p",null,[n("a",Ss,[Cs,t(c)]),As,js,Ts,n("a",Rs,[Ns,t(c)]),zs,Bs,Ds]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ms]),preview:a(()=>[Es]),_:1})]),_:1})],64)}var Vs=l(b,[["render",Js]]);export{Vs as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.87a50ba3.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c8dbc763.js similarity index 90% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.87a50ba3.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.c8dbc763.js index df74bdbbd..a4ef40c5e 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.87a50ba3.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.c8dbc763.js @@ -1 +1 @@ -const e={key:"v-17bc77ae",path:"/es/references/keypairs-and-wallets.html",title:"Pares de llaves y billeteras",lang:"es",frontmatter:{title:"Pares de llaves y billeteras",head:[["meta",{name:"title",content:"Libro de recetas de Solana | Pares de llaves y billeteras"}],["meta",{name:"og:title",content:"Libro de recetas de Solana | Pares de llaves y billeteras"}],["meta",{name:"description",content:"Aprende sobre Pares de llaves y billeteras, firmas, verificaci\xF3n de mensajes y m\xE1s referencias para desarrollar en Solana en el Libro de recetas de Solana."}],["meta",{name:"og:description",content:"Aprende sobre Pares de llaves y billeteras, firmas, verificaci\xF3n de mensajes y m\xE1s referencias para desarrollar en Solana en el Libro de recetas de Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"C\xF3mo generar un nuevo Keypair (par de llaves)",slug:"como-generar-un-nuevo-keypair-par-de-llaves",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves a partir de una llave privada",slug:"como-restaurar-un-par-de-llaves-a-partir-de-una-llave-privada",children:[]},{level:2,title:"C\xF3mo verificar un par de llaves",slug:"como-verificar-un-par-de-llaves",children:[]},{level:2,title:"C\xF3mo comprobar si una llave p\xFAblica tiene una llave privada asociada",slug:"como-comprobar-si-una-llave-publica-tiene-una-llave-privada-asociada",children:[]},{level:2,title:"C\xF3mo generar una frase semilla (mnemonic)",slug:"como-generar-una-frase-semilla-mnemonic",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves desde una frase semilla",slug:"como-restaurar-un-par-de-llaves-desde-una-frase-semilla",children:[]},{level:2,title:"C\xF3mo generar una direcci\xF3n personalizada",slug:"como-generar-una-direccion-personalizada",children:[]},{level:2,title:"C\xF3mo firmar y verificar mensajes con wallets",slug:"como-firmar-y-verificar-mensajes-con-wallets",children:[]},{level:2,title:"C\xF3mo conectar una wallet",slug:"como-conectar-una-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1676666728e3,contributors:[{name:"Marco Ordonez",email:"marco@evolbit.net",commits:1},{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1}]},filePathRelative:"es/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-17bc77ae",path:"/es/references/keypairs-and-wallets.html",title:"Pares de llaves y billeteras",lang:"es",frontmatter:{title:"Pares de llaves y billeteras",head:[["meta",{name:"title",content:"Libro de recetas de Solana | Pares de llaves y billeteras"}],["meta",{name:"og:title",content:"Libro de recetas de Solana | Pares de llaves y billeteras"}],["meta",{name:"description",content:"Aprende sobre Pares de llaves y billeteras, firmas, verificaci\xF3n de mensajes y m\xE1s referencias para desarrollar en Solana en el Libro de recetas de Solana."}],["meta",{name:"og:description",content:"Aprende sobre Pares de llaves y billeteras, firmas, verificaci\xF3n de mensajes y m\xE1s referencias para desarrollar en Solana en el Libro de recetas de Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"C\xF3mo generar un nuevo Keypair (par de llaves)",slug:"como-generar-un-nuevo-keypair-par-de-llaves",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves a partir de una llave privada",slug:"como-restaurar-un-par-de-llaves-a-partir-de-una-llave-privada",children:[]},{level:2,title:"C\xF3mo verificar un par de llaves",slug:"como-verificar-un-par-de-llaves",children:[]},{level:2,title:"C\xF3mo comprobar si una llave p\xFAblica tiene una llave privada asociada",slug:"como-comprobar-si-una-llave-publica-tiene-una-llave-privada-asociada",children:[]},{level:2,title:"C\xF3mo generar una frase semilla (mnemonic)",slug:"como-generar-una-frase-semilla-mnemonic",children:[]},{level:2,title:"C\xF3mo restaurar un par de llaves desde una frase semilla",slug:"como-restaurar-un-par-de-llaves-desde-una-frase-semilla",children:[]},{level:2,title:"C\xF3mo generar una direcci\xF3n personalizada",slug:"como-generar-una-direccion-personalizada",children:[]},{level:2,title:"C\xF3mo firmar y verificar mensajes con wallets",slug:"como-firmar-y-verificar-mensajes-con-wallets",children:[]},{level:2,title:"C\xF3mo conectar una wallet",slug:"como-conectar-una-wallet",children:[{level:3,title:"React",slug:"react",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Marco Ordonez",email:"marco@evolbit.net",commits:1},{name:"Partially Sorted",email:"91437574+partiallysorted@users.noreply.github.com",commits:1},{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1}]},filePathRelative:"es/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.8a36f79a.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.df8bc1da.js similarity index 91% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.8a36f79a.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.df8bc1da.js index e0e632539..bda154f1c 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.8a36f79a.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.df8bc1da.js @@ -1 +1 @@ -const e={key:"v-42a951a9",path:"/zh/references/keypairs-and-wallets.html",title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",lang:"zh-CN",frontmatter:{title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",head:[["meta",{name:"title",content:"Solana\u79D8\u7C4D | \u5BC6\u94A5\u5BF9\u548C\u94B1\u5305"}],["meta",{name:"og:title",content:"Solana\u79D8\u7C4D | \u5BC6\u94A5\u5BF9\u548C\u94B1\u5305"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",slug:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",children:[]},{level:2,title:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",slug:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",children:[{level:3,title:"\u53CD\u5E94",slug:"\u53CD\u5E94",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1688705294e3,contributors:[{name:"lillianrf",email:"138085102+lillianrf@users.noreply.github.com",commits:1}]},filePathRelative:"zh/references/keypairs-and-wallets.md"};export{e as data}; +const e={key:"v-42a951a9",path:"/zh/references/keypairs-and-wallets.html",title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",lang:"zh-CN",frontmatter:{title:"\u5BC6\u94A5\u5BF9\u548C\u94B1\u5305",head:[["meta",{name:"title",content:"Solana\u79D8\u7C4D | \u5BC6\u94A5\u5BF9\u548C\u94B1\u5305"}],["meta",{name:"og:title",content:"Solana\u79D8\u7C4D | \u5BC6\u94A5\u5BF9\u548C\u94B1\u5305"}],["meta",{name:"description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:description",content:"Learn about Keypairs and Wallets, Signing and Verifying Messages and more references for Building on Solana at The Solana cookbook."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u751F\u6210\u65B0\u7684\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u4ECE\u5BC6\u94A5\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u9A8C\u8BC1\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",slug:"\u5982\u4F55\u68C0\u67E5\u4E00\u4E2A\u516C\u94A5\u662F\u5426\u6709\u5173\u8054\u7684\u79C1\u94A5",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",slug:"\u5982\u4F55\u751F\u6210\u52A9\u8BB0\u8BCD",children:[]},{level:2,title:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",slug:"\u5982\u4F55\u901A\u8FC7\u52A9\u8BB0\u8BCD\u6062\u590D\u5BC6\u94A5\u5BF9",children:[]},{level:2,title:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740(vanity address)",slug:"\u5982\u4F55\u751F\u6210\u81EA\u5B9A\u4E49\u5730\u5740-vanity-address",children:[]},{level:2,title:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",slug:"\u5982\u4F55\u4F7F\u7528\u94B1\u5305\u6765\u7B7E\u540D\u548C\u9A8C\u8BC1\u6D88\u606F",children:[]},{level:2,title:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",slug:"\u5982\u4F55\u8FDE\u63A5\u5230\u94B1\u5305",children:[{level:3,title:"\u53CD\u5E94",slug:"\u53CD\u5E94",children:[]},{level:3,title:"Vue",slug:"vue",children:[]},{level:3,title:"Svelte",slug:"svelte",children:[]}]}],git:{updatedTime:1730311132e3,contributors:[{name:"Steven Luscher",email:"steven.luscher@anza.xyz",commits:1},{name:"lillianrf",email:"138085102+lillianrf@users.noreply.github.com",commits:1}]},filePathRelative:"zh/references/keypairs-and-wallets.md"};export{e as data}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.de41b5c5.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.e2ea7de6.js similarity index 97% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.de41b5c5.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.e2ea7de6.js index 11660fe43..c72420efc 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.de41b5c5.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.e2ea7de6.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"pares-de-chaves-e-carteiras",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pares-de-chaves-e-carteiras","aria-hidden":"true"},"#"),s(" Pares de Chaves e Carteiras")],-1),d=n("h2",{id:"como-gerar-um-novo-par-de-chaves-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-gerar-um-novo-par-de-chaves-keypair","aria-hidden":"true"},"#"),s(" Como gerar um novo Par de Chaves (Keypair)")],-1),y=n("p",null,"Muitas das diferentes a\xE7\xF5es que voc\xEA pode executar com as diversas bibliotecas da Solana requerem um Par de Chaves ou Carteira. Se voc\xEA estiver conectando-se a uma carteira, n\xE3o precisa se preocupar. No entanto, se precisar de um par de chaves, precisar\xE1 gerar um.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"pares-de-chaves-e-carteiras",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pares-de-chaves-e-carteiras","aria-hidden":"true"},"#"),s(" Pares de Chaves e Carteiras")],-1),d=n("h2",{id:"como-gerar-um-novo-par-de-chaves-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-gerar-um-novo-par-de-chaves-keypair","aria-hidden":"true"},"#"),s(" Como gerar um novo Par de Chaves (Keypair)")],-1),y=n("p",null,"Muitas das diferentes a\xE7\xF5es que voc\xEA pode executar com as diversas bibliotecas da Solana requerem um Par de Chaves ou Carteira. Se voc\xEA estiver conectando-se a uma carteira, n\xE3o precisa se preocupar. No entanto, se precisar de um par de chaves, precisar\xE1 gerar um.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -72,7 +78,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"]"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("secret_key"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ keypair_from_seed.cpp -o keypair_from_seed -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -88,7 +94,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"from_seed"),n("span",{class:"token punctuation"},"("),s("bytes"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),B=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),R=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token keyword"},"uint8_t"),s(" secret_key"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token number"},"174"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"47"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"154"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"16"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"202"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"193"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"206"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"113"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"199"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"190"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"133"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"169"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"175"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"31"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"56"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"222"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"138"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"189"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"224"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"216"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"117"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"173"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"149"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"53"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"45"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"73"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"237"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"246"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"15"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"185"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"186"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"82"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"177"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token number"},"148"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"69"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"241"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"227"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"167"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"80"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"141"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"89"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"240"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"121"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"35"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"172"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"247"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"68"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"251"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"226"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"218"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"48"),n("span",{class:"token punctuation"},","),s(` @@ -138,10 +144,10 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),H=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),L=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"como-verificar-um-par-de-chaves",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-verificar-um-par-de-chaves","aria-hidden":"true"},"#"),s(" Como verificar um Par de Chaves")],-1),X=n("p",null,"Se voc\xEA receber um Par de Chaves, pode verificar se a senha corresponde \xE0 chave p\xFAblica fornecida.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"como-verificar-um-par-de-chaves",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-verificar-um-par-de-chaves","aria-hidden":"true"},"#"),s(" Como verificar um Par de Chaves")],-1),I=n("p",null,"Se voc\xEA receber um Par de Chaves, pode verificar se a senha corresponde \xE0 chave p\xFAblica fornecida.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,9 +315,10 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),wn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),vn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),fn=n("h2",{id:"como-restaurar-um-par-de-chaves-a-partir-de-uma-frase-mnemonica",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-restaurar-um-par-de-chaves-a-partir-de-uma-frase-mnemonica","aria-hidden":"true"},"#"),s(" Como restaurar um Par de Chaves a partir de uma frase mnem\xF4nica")],-1),xn=n("p",null,"Muitas extens\xF5es de carteira usam mnem\xF4nicos para representar suas chaves secretas. Voc\xEA pode converter o mnem\xF4nico em Pares de Chaves para testes locais.",-1),Kn=n("ol",null,[n("li",null,"BIP39 - criando uma \xFAnica carteira")],-1),Pn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bip39 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bip39"'),n("span",{class:"token punctuation"},";"),s(` @@ -328,13 +338,16 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),Wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (m\xFAltiplas carteiras, tamb\xE9m conhecidas como carteiras HD)")],-1),zn=n("p",null,'Voc\xEA pode criar v\xE1rias carteiras a partir de uma \xFAnica semente - tamb\xE9m conhecidas como "carteiras determin\xEDsticas hier\xE1rquicas" ou carteiras HD:',-1),qn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` @@ -351,7 +364,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Rn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Bn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" mnemonic "),n("span",{class:"token operator"},"="),s(` `),n("span",{class:"token string"},'"neither lonely flavor argue grass remind eye tag avocado spot unusual intact"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" seed "),n("span",{class:"token operator"},"="),s(" bip39"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"mnemonicToSeedSync"),n("span",{class:"token punctuation"},"("),s("mnemonic"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"// (mnemonic, password)"),s(` `),n("span",{class:"token keyword"},"for"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"let"),s(" i "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},";"),s(" i "),n("span",{class:"token operator"},"<"),s(),n("span",{class:"token number"},"10"),n("span",{class:"token punctuation"},";"),s(" i"),n("span",{class:"token operator"},"++"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -359,7 +372,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSeed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"derivePath"),n("span",{class:"token punctuation"},"("),s("path"),n("span",{class:"token punctuation"},","),s(" seed"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toString"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"hex"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("path"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token string"}," => "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Dn=n("h2",{id:"como-gerar-um-endereco-personalizado",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-gerar-um-endereco-personalizado","aria-hidden":"true"},"#"),s(" Como gerar um endere\xE7o personalizado")],-1),Nn=n("p",null,'As chaves p\xFAblicas personalizadas, ou endere\xE7os personalizados (vanity addresses), s\xE3o chaves que come\xE7am com caracteres espec\xEDficos. Por exemplo, uma pessoa pode querer uma chave p\xFAblica que comece com "elv1s", ou talvez at\xE9 "cook". Isso pode ajudar outras pessoas a lembrar a quem a chave pertence, tornando a chave mais facilmente identific\xE1vel.',-1),En=n("p",null,"Observa\xE7\xE3o: quanto mais caracteres tiver o endere\xE7o personalizado, mais tempo levar\xE1.",-1),Jn=n("div",{class:"custom-container warning"},[n("p",{class:"custom-container-title"},"Aviso"),n("p",null,"Voc\xEA deve usar apenas a CLI para essa tarefa. Os exemplos em Python e TypeScript s\xE3o apenas para fins ilustrativos e s\xE3o muito mais lentos do que a CLI.")],-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` @@ -402,8 +415,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"como-assinar-e-verificar-mensagens-com-carteiras",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-assinar-e-verificar-mensagens-com-carteiras","aria-hidden":"true"},"#"),s(" Como assinar e verificar mensagens com carteiras")],-1),$n=n("p",null,"A fun\xE7\xE3o principal de um par de chaves \xE9 assinar mensagens e permitir a verifica\xE7\xE3o da assinatura. A verifica\xE7\xE3o de uma assinatura permite que o destinat\xE1rio tenha certeza de que os dados foram assinados pelo propriet\xE1rio de uma chave privada espec\xEDfica.",-1),Gn=s("Para fazer isso, importaremos a biblioteca criptogr\xE1fica "),On={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},Qn=s("TweetNaCl"),ns=s("."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -562,7 +575,7 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br")])],-1),bs=u(`

    Vue

    Execute o seguinte comando para instalar as depend\xEAncias necess\xE1rias:

    npm install solana-wallets-vue @solana/wallet-adapter-wallets
    -
    `,3),ms=s("O plugin de integra\xE7\xE3o "),ds={href:"https://github.com/lorisleiva/solana-wallets-vue",target:"_blank",rel:"noopener noreferrer"},ys=s("Solana Wallets - Vue"),gs=s(" nos permite inicializar uma loja de carteiras e criar uma nova propriedade global "),hs=n("code",null,"$wallet",-1),vs=s(" que pode ser acessada dentro de qualquer componente. Todas as propriedades e m\xE9todos que podem ser obtidos a partir de "),ws=n("code",null,"useWallet()",-1),_s=s(" s\xE3o exibidos "),fs={href:"https://github.com/lorisleiva/solana-wallets-vue#usewallet-references",target:"_blank",rel:"noopener noreferrer"},xs=s("aqui"),Ks=s(". Tamb\xE9m importamos e renderizamos o componente WalletMultiButton para permitir que os usu\xE1rios selecionem uma carteira e se conectem a ela."),Ps=n("div",{class:"language-vue ext-vue line-numbers-mode"},[n("pre",{class:"language-vue"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),s(),n("span",{class:"token attr-name"},"setup"),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +
    `,3),ms=s("O plugin de integra\xE7\xE3o "),ds={href:"https://github.com/lorisleiva/solana-wallets-vue",target:"_blank",rel:"noopener noreferrer"},ys=s("Solana Wallets - Vue"),gs=s(" nos permite inicializar uma loja de carteiras e criar uma nova propriedade global "),hs=n("code",null,"$wallet",-1),ws=s(" que pode ser acessada dentro de qualquer componente. Todas as propriedades e m\xE9todos que podem ser obtidos a partir de "),vs=n("code",null,"useWallet()",-1),_s=s(" s\xE3o exibidos "),fs={href:"https://github.com/lorisleiva/solana-wallets-vue#usewallet-references",target:"_blank",rel:"noopener noreferrer"},xs=s("aqui"),Ks=s(". Tamb\xE9m importamos e renderizamos o componente WalletMultiButton para permitir que os usu\xE1rios selecionem uma carteira e se conectem a ela."),Ps=n("div",{class:"language-vue ext-vue line-numbers-mode"},[n("pre",{class:"language-vue"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),s(),n("span",{class:"token attr-name"},"setup"),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" WalletMultiButton "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"solana-wallets-vue"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` LedgerWalletAdapter`),n("span",{class:"token punctuation"},","),s(` @@ -602,8 +615,8 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    Execute o seguinte comando para instalar as depend\xEAncias necess\xE1rias:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    -
    `,3),Ws=s("O pacote "),As={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},js=s("Svelte Wallet Adapter"),Ts=s(" permite adicionar uma Loja Svelte ("),zs=n("code",null,"$walletStore",-1),qs=s(") acess\xEDvel em todos os arquivos JS, TS ou Svelte dentro de um projeto feito com Svelte Template ou SvelteKit. Usando a refer\xEAncia do reposit\xF3rio "),Rs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Bs=s("aqui"),Ms=s(", voc\xEA pode usar o adaptador para SSR ou SPA. O pacote da interface do usu\xE1rio cont\xE9m um componente "),Ds=n("code",null,"",-1),Ns=s(" para permitir que os usu\xE1rios selecionem uma carteira para se conectar a ela."),Es=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    Execute o seguinte comando para instalar as depend\xEAncias necess\xE1rias:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
    +
    `,3),Ws=s("O pacote "),As={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},js=s("Svelte Wallet Adapter"),Ts=s(" permite adicionar uma Loja Svelte ("),zs=n("code",null,"$walletStore",-1),qs=s(") acess\xEDvel em todos os arquivos JS, TS ou Svelte dentro de um projeto feito com Svelte Template ou SvelteKit. Usando a refer\xEAncia do reposit\xF3rio "),Bs={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Rs=s("aqui"),Ms=s(", voc\xEA pode usar o adaptador para SSR ou SPA. O pacote da interface do usu\xE1rio cont\xE9m um componente "),Ds=n("code",null,"",-1),Ns=s(" para permitir que os usu\xE1rios selecionem uma carteira para se conectar a ela."),Es=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` WalletProvider`),n("span",{class:"token punctuation"},","),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Us(Vs,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[v]),preview:a(()=>[w]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[C]),_:1})]),_:1}),S,W,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[q]),_:1}),t(e,{title:"C++"},{default:a(()=>[R]),preview:a(()=>[B]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[D]),_:1}),t(e,{title:"CLI"},{default:a(()=>[N]),preview:a(()=>[E]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Rust"},{default:a(()=>[L]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[O]),_:1}),t(e,{title:"C++"},{default:a(()=>[Q]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[vn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[wn]),preview:a(()=>[_n]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[qn]),preview:a(()=>[Rn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Bn]),preview:a(()=>[Mn]),_:1})]),_:1}),Dn,Nn,En,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Hn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Ln]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Xn]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",On,[Qn,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,vs,ws,_s,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Cs]),_:1})]),_:1}),Ss,n("p",null,[Ws,n("a",As,[js,t(c)]),Ts,zs,qs,n("a",Rs,[Bs,t(c)]),Ms,Ds,Ns]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Es]),preview:a(()=>[Js]),_:1})]),_:1})],64)}var Ls=l(b,[["render",Us]]);export{Ls as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Us(Vs,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[C]),_:1})]),_:1}),S,W,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[q]),_:1}),t(e,{title:"C++"},{default:a(()=>[B]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[D]),_:1}),t(e,{title:"CLI"},{default:a(()=>[N]),preview:a(()=>[E]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Rust"},{default:a(()=>[L]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[O]),_:1}),t(e,{title:"C++"},{default:a(()=>[Q]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[vn]),preview:a(()=>[_n]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[jn]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[qn]),preview:a(()=>[Bn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Mn]),_:1})]),_:1}),Dn,Nn,En,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Hn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Ln]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",On,[Qn,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[us,t(c)]),ls]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,vs,_s,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Cs]),_:1})]),_:1}),Ss,n("p",null,[Ws,n("a",As,[js,t(c)]),Ts,zs,qs,n("a",Bs,[Rs,t(c)]),Ms,Ds,Ns]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Es]),preview:a(()=>[Js]),_:1})]),_:1})],64)}var Ls=l(b,[["render",Us]]);export{Ls as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.68a4f8a1.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.e586f774.js similarity index 97% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.68a4f8a1.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.e586f774.js index a5a910bcf..5663cd281 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.68a4f8a1.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.e586f774.js @@ -1,13 +1,19 @@ -import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"keypairs-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-wallets","aria-hidden":"true"},"#"),s(" Keypairs & Wallets")],-1),d=n("h2",{id:"bagaimana-cara-membuat-sebuah-keypair-baru",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-membuat-sebuah-keypair-baru","aria-hidden":"true"},"#"),s(" Bagaimana cara membuat sebuah Keypair baru")],-1),y=n("p",null,"Banyak action-action yang dapat anda ambil dari beragam Solana libaries memerlukan sebuah Keypair atau Wallet. Jika anda terhubung dengan sebuah wallet, anda tidak perlu khawatir. Namun, jika anda memerlukan sebuah keypair, and perlu meng-generatenya.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as i,c as k,b as t,w as a,a as n,F as r,d as s,e as u}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"keypairs-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#keypairs-wallets","aria-hidden":"true"},"#"),s(" Keypairs & Wallets")],-1),d=n("h2",{id:"bagaimana-cara-membuat-sebuah-keypair-baru",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-membuat-sebuah-keypair-baru","aria-hidden":"true"},"#"),s(" Bagaimana cara membuat sebuah Keypair baru")],-1),y=n("p",null,"Banyak action-action yang dapat anda ambil dari beragam Solana libaries memerlukan sebuah Keypair atau Wallet. Jika anda terhubung dengan sebuah wallet, anda tidak perlu khawatir. Namun, jika anda memerlukan sebuah keypair, and perlu meng-generatenya.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),_=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),v=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),Y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),Y=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),L=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),I=n("h2",{id:"bagaimana-cara-menverifikasi-sebuah-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-menverifikasi-sebuah-keypair","aria-hidden":"true"},"#"),s(" Bagaimana cara menverifikasi sebuah Keypair")],-1),X=n("p",null,"Jika anda diberikan sebuah keypair, anda dapat menverifikasi apakah secret sesuai dengan public key yang diberikan.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"bagaimana-cara-menverifikasi-sebuah-keypair",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-menverifikasi-sebuah-keypair","aria-hidden":"true"},"#"),s(" Bagaimana cara menverifikasi sebuah Keypair")],-1),I=n("p",null,"Jika anda diberikan sebuah keypair, anda dapat menverifikasi apakah secret sesuai dengan public key yang diberikan.",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),un=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),ln=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),vn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,13 +338,16 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),jn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),jn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Cn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (multiple wallets, also known HD wallets)")],-1),Bn=n("p",null,"You can make multiple wallets from a single seed - also known as 'Hierarchical Deterministic wallets' or HD wallets:",-1),Dn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` @@ -361,7 +374,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"bagaimana-cara-membuat-sebuah-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-membuat-sebuah-vanity-address","aria-hidden":"true"},"#"),s(" Bagaimana cara membuat sebuah vanity address")],-1),En=n("p",null,'Vanity publickeys, atau custom address adalah keys yang dimulai dengan character spesifik. Sebagai contoh, jika seseorang ingin publickey dimulai dengan "elv1s", atau mungkin juga "cook". Ini dapat membantu orang lain untuk mengingat siapa yang mempunyai key itu, membuat key lebih mudah untuk diidentifikasi.',-1),Jn=n("p",null,"Catatan: Semakin banyak character di dalam vanity address anda, semakin lama prosesnya.",-1),Un=n("p",null,"::: peringatan Anda harus menggunakan CLI untuk task ini. Python dan TypeScript hanyalah contoh untuk ilustrasi saja dan lebih lambat dibandingkan dengan CLI.",-1),Hn=n("p",null,":::",-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Nn=n("h2",{id:"bagaimana-cara-membuat-sebuah-vanity-address",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-membuat-sebuah-vanity-address","aria-hidden":"true"},"#"),s(" Bagaimana cara membuat sebuah vanity address")],-1),En=n("p",null,'Vanity publickeys, atau custom address adalah keys yang dimulai dengan character spesifik. Sebagai contoh, jika seseorang ingin publickey dimulai dengan "elv1s", atau mungkin juga "cook". Ini dapat membantu orang lain untuk mengingat siapa yang mempunyai key itu, membuat key lebih mudah untuk diidentifikasi.',-1),Jn=n("p",null,"Catatan: Semakin banyak character di dalam vanity address anda, semakin lama prosesnya.",-1),Un=n("p",null,"::: peringatan Anda harus menggunakan CLI untuk task ini. Python dan TypeScript hanyalah contoh untuk ilustrasi saja dan lebih lambat dibandingkan dengan CLI.",-1),Hn=n("p",null,":::",-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -369,7 +382,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Yn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Vn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` @@ -398,11 +411,11 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span",{class:"token operator"},"<<"),s(),n("span",{class:"token string"},'"Created Keypair with Public Key: "'),s(),n("span",{class:"token operator"},"<<"),s(" key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"<<"),s(" std"),n("span",{class:"token double-colon punctuation"},"::"),s("endl"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),In=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"auto"),s(" key_pair "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1),Xn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token keyword"},"auto"),s(" key_pair "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),s("key_pair"),n("span",{class:"token punctuation"},"."),s("public_key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_base58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"substr"),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"0"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"!="),s(),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),$n=n("h2",{id:"bagaimana-cara-untuk-sign-dan-menverifikasi-messages-dalam-wallet",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-untuk-sign-dan-menverifikasi-messages-dalam-wallet","aria-hidden":"true"},"#"),s(" Bagaimana cara untuk sign dan menverifikasi messages dalam wallet")],-1),Gn=n("p",null,"Fungsi utama dari sebuah keypair adalah untuk sign messages dan mengaktifkan verifikasi dari signature. Verifikasi signature menyakinkan recipient bahwa data telah disign oleh pemilik dengan spesifik private key.",-1),Qn=s("Untuk melakukan itu, kita perlu import "),On={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},ns=s("TweetNaCl"),ss=s(" crypto library."),as=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),os=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,7 +615,7 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    Run command berikut ini untuk menginstall dependencies yang dibutuhkan:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ss=u(`

    Svelte

    Run command berikut ini untuk menginstall dependencies yang dibutuhkan:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     
    `,3),js={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},As=s("Svelte Wallet Adapter"),Cs=s(" package dapat menambahkan sebuah Svelte Store("),Ts=n("code",null,"$walletStore",-1),Bs=s(") yang dapat diakses oleh semua JS, TS dan/atau Svelte files di dalam sebuah project yang telah dikerjakan dengan Svelte Template atau SvelteKit. Menggunakan repo reference "),Ds={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Rs=s("ini"),zs=s(" anda dapat mengunakan adapter untuk SSR atau SPA. UI package mempunyai sebuah "),Ms=n("code",null,"",-1),Ns=s(" component untuk membantu user untuk memilih wallet yang terkoneksi dengannya."),Es=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Us(Hs,Vs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[v]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,j,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[B]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[R]),preview:a(()=>[z]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Python"},{default:a(()=>[Y]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),I,X,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[vn]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[jn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[Cn]),_:1})]),_:1}),Tn,Bn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Rn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[zn]),preview:a(()=>[Mn]),_:1})]),_:1}),Nn,En,Jn,Un,Hn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Vn]),preview:a(()=>[Yn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Ln]),preview:a(()=>[qn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Fn]),preview:a(()=>[In]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[Zn]),_:1})]),_:1}),$n,Gn,n("p",null,[Qn,n("a",On,[ns,t(c)]),ss]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[as]),preview:a(()=>[ts]),_:1}),t(e,{title:"Python"},{default:a(()=>[es]),preview:a(()=>[os]),_:1})]),_:1}),cs,n("p",null,[ps,n("a",us,[ls,t(c)]),is]),ks,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[bs]),_:1})]),_:1}),ms,n("p",null,[n("a",ds,[ys,t(c)]),gs,hs,ws,_s,vs,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ws]),_:1})]),_:1}),Ss,n("p",null,[n("a",js,[As,t(c)]),Cs,Ts,Bs,n("a",Ds,[Rs,t(c)]),zs,Ms,Ns]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Es]),preview:a(()=>[Js]),_:1})]),_:1})],64)}var Ls=l(b,[["render",Us]]);export{Ls as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Us(Hs,Ys){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),k(r,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[_]),_:1}),t(e,{title:"C++"},{default:a(()=>[v]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[W]),_:1})]),_:1}),S,j,A,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[B]),preview:a(()=>[D]),_:1}),t(e,{title:"C++"},{default:a(()=>[R]),preview:a(()=>[z]),_:1}),t(e,{title:"Rust"},{default:a(()=>[M]),preview:a(()=>[N]),_:1}),t(e,{title:"CLI"},{default:a(()=>[E]),preview:a(()=>[J]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[Y]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[L]),_:1}),t(e,{title:"Rust"},{default:a(()=>[q]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[un]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[ln]),preview:a(()=>[kn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[rn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[_n]),preview:a(()=>[vn]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Wn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Sn]),preview:a(()=>[jn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[An]),preview:a(()=>[Cn]),_:1})]),_:1}),Tn,Bn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Dn]),preview:a(()=>[Rn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[zn]),preview:a(()=>[Mn]),_:1})]),_:1}),Nn,En,Jn,Un,Hn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Yn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Ln]),preview:a(()=>[qn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Fn]),preview:a(()=>[Xn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[In]),preview:a(()=>[Zn]),_:1})]),_:1}),$n,Gn,n("p",null,[Qn,n("a",On,[ns,t(c)]),ss]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[as]),preview:a(()=>[ts]),_:1}),t(e,{title:"Python"},{default:a(()=>[es]),preview:a(()=>[os]),_:1})]),_:1}),cs,n("p",null,[ps,n("a",us,[ls,t(c)]),is]),ks,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[bs]),_:1})]),_:1}),ms,n("p",null,[n("a",ds,[ys,t(c)]),gs,hs,ws,_s,vs,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ws]),_:1})]),_:1}),Ss,n("p",null,[n("a",js,[As,t(c)]),Cs,Ts,Bs,n("a",Ds,[Rs,t(c)]),zs,Ms,Ns]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Es]),preview:a(()=>[Js]),_:1})]),_:1})],64)}var Ls=l(b,[["render",Us]]);export{Ls as default}; diff --git a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c474929.js b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.fe3970ec.js similarity index 97% rename from docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c474929.js rename to docs/.vuepress/dist/assets/keypairs-and-wallets.html.fe3970ec.js index 2c089926f..1962a7757 100644 --- a/docs/.vuepress/dist/assets/keypairs-and-wallets.html.7c474929.js +++ b/docs/.vuepress/dist/assets/keypairs-and-wallets.html.fe3970ec.js @@ -1,13 +1,19 @@ -import{_ as u,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as l}from"./app.07ce7a66.js";const b={},m=n("h1",{id:"pares-de-llaves-y-billeteras",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pares-de-llaves-y-billeteras","aria-hidden":"true"},"#"),s(" Pares de llaves y billeteras")],-1),d=n("h2",{id:"como-generar-un-nuevo-keypair-par-de-llaves",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-generar-un-nuevo-keypair-par-de-llaves","aria-hidden":"true"},"#"),s(" C\xF3mo generar un nuevo Keypair (par de llaves)")],-1),y=n("p",null,"Muchas de las acciones que vas a realizar con las librer\xEDas de Solana requieren un par de llaves o una billetera. Si te conectas con una billetera, no tienes que preocuparte, sin embargo, si necesitas un par de llaves, deber\xE1s de generarlas.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as p,o as i,c as r,b as t,w as a,a as n,F as k,d as s,e as l}from"./app.d411e3b3.js";const b={},m=n("h1",{id:"pares-de-llaves-y-billeteras",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pares-de-llaves-y-billeteras","aria-hidden":"true"},"#"),s(" Pares de llaves y billeteras")],-1),d=n("h2",{id:"como-generar-un-nuevo-keypair-par-de-llaves",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-generar-un-nuevo-keypair-par-de-llaves","aria-hidden":"true"},"#"),s(" C\xF3mo generar un nuevo Keypair (par de llaves)")],-1),y=n("p",null,"Muchas de las acciones que vas a realizar con las librer\xEDas de Solana requieren un par de llaves o una billetera. Si te conectas con una billetera, no tienes que preocuparte, sin embargo, si necesitas un par de llaves, deber\xE1s de generarlas.",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`),n("span",{class:"token keyword"},"import"),s(` based58 keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair PublicKey: "'),n("span",{class:"token punctuation"},","),s(" keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + +rawPK `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token builtin"},"bytes"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},")"),s(` +pk `),n("span",{class:"token operator"},"="),s(" based58"),n("span",{class:"token punctuation"},"."),s("b58encode"),n("span",{class:"token punctuation"},"("),s("rawPK"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),s("decode"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Keypair Secret: "'),n("span",{class:"token punctuation"},","),s(" pk"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),v=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},'"solana.hpp"')]),s(` @@ -120,7 +126,7 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_bytes"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("secret_key"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),D=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),N=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[n("span",{class:"token comment"},"# input your secret into the Keypath listed under solana config get"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),J=n("ol",{start:"2"},[n("li",null,"Con una cadena Base58")],-1),U=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),J=n("ol",{start:"2"},[n("li",null,"Con una cadena Base58")],-1),L=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(" bs58 "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bs58"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -130,18 +136,18 @@ Keypair key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:" `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),L=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),U=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromSecretKey"),n("span",{class:"token punctuation"},"("),s(` bs58`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"decode"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` `),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),H=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair b58_string `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),H=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),V=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("b58_string "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_base58_string"),n("span",{class:"token punctuation"},"("),s("b58_string"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_sdk"),n("span",{class:"token punctuation"},"::"),s("signature"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"Signer"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"main"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -154,7 +160,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" wallet "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_base58_string"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"'),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"como-verificar-un-par-de-llaves",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-verificar-un-par-de-llaves","aria-hidden":"true"},"#"),s(" C\xF3mo verificar un par de llaves")],-1),I=n("p",null,"Si cuentas con un par de llaves, puedes verificar si la llave privada coincide con la llave p\xFAblica",-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),X=n("h2",{id:"como-verificar-un-par-de-llaves",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-verificar-un-par-de-llaves","aria-hidden":"true"},"#"),s(" C\xF3mo verificar un par de llaves")],-1),Z=n("p",null,"Si cuentas con un par de llaves, puedes verificar si la llave privada coincide con la llave p\xFAblica",-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair"),n("span",{class:"token punctuation"},","),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" publicKey "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` @@ -267,8 +273,11 @@ key `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"toke off_curve_address `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e'"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Valid public key"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("off_curve_address"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# Not on the ed25519 curve, therefore not suitable for users"),s(` -error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br")])],-1),ln=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"try"),n("span",{class:"token punctuation"},":"),s(` + error_pubkey `),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"# Is not a valid public key"),s(` +`),n("span",{class:"token keyword"},"except"),n("span",{class:"token punctuation"},":"),s(` + `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"testPubkey is not a valid public key as expected!"'),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),ln=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("key "),n("span",{class:"token operator"},"="),s(" Pubkey"),n("span",{class:"token punctuation"},"."),s("from_string"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY'"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("key"),n("span",{class:"token punctuation"},"."),s("is_on_curve"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),un=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` `),n("span",{class:"token macro property"},[n("span",{class:"token directive-hash"},"#"),n("span",{class:"token directive keyword"},"include"),s(),n("span",{class:"token string"},"")]),s(` @@ -306,7 +315,8 @@ std`),n("span",{class:"token double-colon punctuation"},"::"),s("cout "),n("span mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("words"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br")])],-1),wn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("generate"),n("span",{class:"token punctuation"},"("),s("strength"),n("span",{class:"token operator"},"="),n("span",{class:"token number"},"256"),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),vn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),_n=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen new @@ -328,13 +338,16 @@ words `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"tok `),n("span",{class:"token keyword"},"from"),s(" mnemonic "),n("span",{class:"token keyword"},"import"),s(` Mnemonic mnemo `),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`),n("span",{class:"token comment"},"# Pubkey 5ZWj7a1f8tWkjBESHKgrLmXshuXxqeY9SYcfbshpAqPG"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` -seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),n("span",{class:"token punctuation"},")"),s(` -keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_bytes"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1),Cn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("mnemo "),n("span",{class:"token operator"},"="),s(" Mnemonic"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"english"'),n("span",{class:"token punctuation"},")"),s(` +phrase `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'"pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"'),s(` +seed `),n("span",{class:"token operator"},"="),s(" mnemo"),n("span",{class:"token punctuation"},"."),s("to_seed"),n("span",{class:"token punctuation"},"("),s("phrase"),n("span",{class:"token punctuation"},")"),s(` +keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),s("from_seed"),n("span",{class:"token punctuation"},"("),s("seed"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),jn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),An=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen recover `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Tn=n("ol",{start:"2"},[n("li",null,"BIP44 (varios wallets, tambi\xE9n conocido como HD wallets)")],-1),zn=n("p",null,'Puede crear varias carteras a partir de una sola semilla, tambi\xE9n conocidas como "carteras deterministas jer\xE1rquicas" o carteras HD:',-1),qn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" HDKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"micro-ed25519-hdkey"'),n("span",{class:"token punctuation"},";"),s(` @@ -361,7 +374,7 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Rn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Bn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,[s("solana-keygen recover "),n("span",{class:"token string"},"'prompt:?key=0/0'"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("h2",{id:"como-generar-una-direccion-personalizada",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-generar-una-direccion-personalizada","aria-hidden":"true"},"#"),s(" C\xF3mo generar una direcci\xF3n personalizada")],-1),Dn=n("p",null,'Vanity publickeys o direcciones personalizadas son llaves que comienzan con caracteres espec\xEDficos. Por ejemplo, una persona puede querer que una llave p\xFAblica comience con "elv1s", o tal vez incluso "cook". Estos pueden ayudar a otras personas. Recordar a qui\xE9n pertenece la llave, haciendo que la llave sea m\xE1s f\xE1cilmente identificable.',-1),Nn=n("p",null,"Nota: Cuantos m\xE1s caracteres haya en su direcci\xF3n personalizada, m\xE1s tiempo durar\xE1. tomar.",-1),Jn=n("p",null,"::: advertencia Solo debe usar la CLI para esta tarea. Los ejemplos de Python y TypeScript tienen fines ilustrativos y son mucho m\xE1s lentos que la CLI. :::",-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Mn=n("h2",{id:"como-generar-una-direccion-personalizada",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-generar-una-direccion-personalizada","aria-hidden":"true"},"#"),s(" C\xF3mo generar una direcci\xF3n personalizada")],-1),Dn=n("p",null,'Vanity publickeys o direcciones personalizadas son llaves que comienzan con caracteres espec\xEDficos. Por ejemplo, una persona puede querer que una llave p\xFAblica comience con "elv1s", o tal vez incluso "cook". Estos pueden ayudar a otras personas. Recordar a qui\xE9n pertenece la llave, haciendo que la llave sea m\xE1s f\xE1cilmente identificable.',-1),Nn=n("p",null,"Nota: Cuantos m\xE1s caracteres haya en su direcci\xF3n personalizada, m\xE1s tiempo durar\xE1. tomar.",-1),Jn=n("p",null,"::: advertencia Solo debe usar la CLI para esta tarea. Los ejemplos de Python y TypeScript tienen fines ilustrativos y son mucho m\xE1s lentos que la CLI. :::",-1),Ln=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -369,18 +382,18 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Ln=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br")])],-1),Un=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"while"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"!"),s("keypair"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"startsWith"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Hn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" solders"),n("span",{class:"token punctuation"},"."),s("keypair "),n("span",{class:"token keyword"},"import"),s(` Keypair keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Created Keypair with Public Key: {}"'),n("span",{class:"token punctuation"},"."),n("span",{class:"token builtin"},"format"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Hn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Vn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("keypair "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token keyword"},"while"),n("span",{class:"token punctuation"},"("),n("span",{class:"token builtin"},"str"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},":"),n("span",{class:"token number"},"5"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token operator"},"!="),n("span",{class:"token string"},'"elv1s"'),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},":"),s(` keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),Yn=n("div",{class:"language-cpp ext-cpp line-numbers-mode"},[n("pre",{class:"language-cpp"},[n("code",null,[n("span",{class:"token comment"},"// clang++ vanity_keypair.cpp -o vanity_keypair -std=c++17 -lssl -lcrypto -lsodium"),s(` @@ -403,8 +416,8 @@ keypair `),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class: key_pair `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Keypair"),n("span",{class:"token double-colon punctuation"},"::"),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br")])],-1),Xn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 -`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("h2",{id:"como-firmar-y-verificar-mensajes-con-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-firmar-y-verificar-mensajes-con-wallets","aria-hidden":"true"},"#"),s(" C\xF3mo firmar y verificar mensajes con wallets")],-1),$n=n("p",null,"La funci\xF3n principal de un par de llaves es firmar mensajes y habilitar la verificaci\xF3n de la firma. La verificaci\xF3n de una firma permite el destinatario asegurarse de que los datos fueron firmados por el propietario de un clave privada espec\xEDfica.",-1),Gn=s("Para hacerlo vamos a importar la librer\xEDa crypto "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s("."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),Zn=n("div",{class:"language-bash ext-sh line-numbers-mode"},[n("pre",{class:"language-bash"},[n("code",null,`solana-keygen grind --starts-with e1v1s:1 +`)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),In=n("h2",{id:"como-firmar-y-verificar-mensajes-con-wallets",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-firmar-y-verificar-mensajes-con-wallets","aria-hidden":"true"},"#"),s(" C\xF3mo firmar y verificar mensajes con wallets")],-1),$n=n("p",null,"La funci\xF3n principal de un par de llaves es firmar mensajes y habilitar la verificaci\xF3n de la firma. La verificaci\xF3n de una firma permite el destinatario asegurarse de que los datos fueron firmados por el propietario de un clave privada espec\xEDfica.",-1),Gn=s("Para hacerlo vamos a importar la librer\xEDa crypto "),Qn={href:"https://www.npmjs.com/package/tweetnacl",target:"_blank",rel:"noopener noreferrer"},On=s("TweetNaCl"),ns=s("."),ss=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" nacl "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" decodeUTF8 "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"tweetnacl-util"'),n("span",{class:"token punctuation"},";"),s(` @@ -453,7 +466,7 @@ message `),n("span",{class:"token operator"},"="),s(),n("span",{class:"token str signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# bool"),s(` +`),n("span",{class:"token keyword"},"print"),n("span",{class:"token punctuation"},"("),s("verify_sign"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token comment"},"# True"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br")])],-1),es=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[s("message "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token string"},'b"The quick brown fox jumps over the lazy dog"'),s(` signature `),n("span",{class:"token operator"},"="),s(" keypair"),n("span",{class:"token punctuation"},"."),s("sign_message"),n("span",{class:"token punctuation"},"("),s("message"),n("span",{class:"token punctuation"},")"),s(` verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{class:"token punctuation"},"."),s("verify"),n("span",{class:"token punctuation"},"("),s("keypair"),n("span",{class:"token punctuation"},"."),s("pubkey"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(" message"),n("span",{class:"token punctuation"},")"),s(` @@ -602,7 +615,7 @@ verify_sign `),n("span",{class:"token operator"},"="),s(" signature"),n("span",{ `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("template")]),n("span",{class:"token punctuation"},">")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("wallet-multi-button")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"")]),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=l(`

    Svelte

    Ejecute el siguiente comando para instalar las dependencias requeridas:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br")])],-1),Ws=l(`

    Svelte

    Ejecute el siguiente comando para instalar las dependencias requeridas:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     
    `,3),Cs=s("El paquete "),js={href:"https://github.com/svelte-on-solana/wallet-adapter",target:"_blank",rel:"noopener noreferrer"},As=s("Svelte Wallet Adapter"),Ts=s(" permite agregar una tienda Svelte ("),zs=n("code",null,"$walletStore",-1),qs=s(") accesible entre todos los archivos JS, TS y/o Svelte dentro de un proyecto realizado con Svelte Template o SvelteKit. Usando la referencia del repositorio "),Es={href:"https://github.com/svelte-on-solana/wallet-adapter/blob/master/packages/core/README.md/",target:"_blank",rel:"noopener noreferrer"},Rs=s("aqu\xED"),Bs=s(" puede usar el adaptador para SSR o SPA. El paquete de la interfaz de usuario contiene un componente "),Ms=n("code",null,"",-1),Ds=s(" que permite a los usuarios seleccionar una billetera para conectar a ella."),Ns=n("div",{class:"language-html ext-html line-numbers-mode"},[n("pre",{class:"language-html"},[n("code",null,[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" walletStore "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@svelte-on-solana/wallet-adapter-core"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` @@ -645,4 +658,4 @@ successfully connected! {:else} successfully connected! {:else} `),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),s("WalletMultiButton")]),s(),n("span",{class:"token punctuation"},"/>")]),s(` {/if} -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Us(Ls,Vs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[S]),_:1})]),_:1}),W,C,j,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[A]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[q]),_:1}),t(e,{title:"C++"},{default:a(()=>[E]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[B]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[D]),preview:a(()=>[N]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[U]),preview:a(()=>[L]),_:1}),t(e,{title:"Python"},{default:a(()=>[V]),preview:a(()=>[H]),_:1}),t(e,{title:"Rust"},{default:a(()=>[Y]),preview:a(()=>[F]),_:1})]),_:1}),X,I,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Z]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[un]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[vn]),preview:a(()=>[_n]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Sn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Wn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[jn]),preview:a(()=>[An]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[qn]),preview:a(()=>[En]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Bn]),_:1})]),_:1}),Mn,Dn,Nn,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Un]),preview:a(()=>[Ln]),_:1}),t(e,{title:"Python"},{default:a(()=>[Vn]),preview:a(()=>[Hn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Yn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[In]),_:1})]),_:1}),Zn,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[ls,t(c)]),us]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,vs,_s,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ss]),_:1})]),_:1}),Ws,n("p",null,[Cs,n("a",js,[As,t(c)]),Ts,zs,qs,n("a",Es,[Rs,t(c)]),Bs,Ms,Ds]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Js]),_:1})]),_:1})],64)}var Ys=u(b,[["render",Us]]);export{Ys as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br")])],-1);function Ls(Us,Hs){const e=p("SolanaCodeGroupItem"),o=p("SolanaCodeGroup"),c=p("ExternalLinkIcon");return i(),r(k,null,[m,d,y,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[g]),preview:a(()=>[h]),_:1}),t(e,{title:"Python"},{default:a(()=>[w]),preview:a(()=>[v]),_:1}),t(e,{title:"C++"},{default:a(()=>[_]),preview:a(()=>[f]),_:1}),t(e,{title:"Rust"},{default:a(()=>[x]),preview:a(()=>[K]),_:1}),t(e,{title:"CLI"},{default:a(()=>[P]),preview:a(()=>[S]),_:1})]),_:1}),W,C,j,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[A]),preview:a(()=>[T]),_:1}),t(e,{title:"Python"},{default:a(()=>[z]),preview:a(()=>[q]),_:1}),t(e,{title:"C++"},{default:a(()=>[E]),preview:a(()=>[R]),_:1}),t(e,{title:"Rust"},{default:a(()=>[B]),preview:a(()=>[M]),_:1}),t(e,{title:"CLI"},{default:a(()=>[D]),preview:a(()=>[N]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[L]),preview:a(()=>[U]),_:1}),t(e,{title:"Python"},{default:a(()=>[H]),preview:a(()=>[V]),_:1}),t(e,{title:"Rust"},{default:a(()=>[Y]),preview:a(()=>[F]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[$]),_:1}),t(e,{title:"Python"},{default:a(()=>[G]),preview:a(()=>[Q]),_:1}),t(e,{title:"C++"},{default:a(()=>[O]),preview:a(()=>[nn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1}),t(e,{title:"Python",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1}),t(e,{title:"C++",active:""},{default:a(()=>[un]),preview:a(()=>[rn]),_:1}),t(e,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1}),mn,dn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[yn]),preview:a(()=>[gn]),_:1}),t(e,{title:"Python"},{default:a(()=>[hn]),preview:a(()=>[wn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[vn]),preview:a(()=>[_n]),_:1})]),_:1}),fn,xn,Kn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Pn]),preview:a(()=>[Sn]),_:1}),t(e,{title:"Python"},{default:a(()=>[Wn]),preview:a(()=>[Cn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[jn]),preview:a(()=>[An]),_:1})]),_:1}),Tn,zn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[qn]),preview:a(()=>[En]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Rn]),preview:a(()=>[Bn]),_:1})]),_:1}),Mn,Dn,Nn,Jn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Ln]),preview:a(()=>[Un]),_:1}),t(e,{title:"Python"},{default:a(()=>[Hn]),preview:a(()=>[Vn]),_:1}),t(e,{title:"C++"},{default:a(()=>[Yn]),preview:a(()=>[Fn]),_:1}),t(e,{title:"CLI"},{default:a(()=>[Xn]),preview:a(()=>[Zn]),_:1})]),_:1}),In,$n,n("p",null,[Gn,n("a",Qn,[On,t(c)]),ns]),t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[ss]),preview:a(()=>[as]),_:1}),t(e,{title:"Python"},{default:a(()=>[ts]),preview:a(()=>[es]),_:1})]),_:1}),os,n("p",null,[cs,n("a",ps,[ls,t(c)]),us]),is,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[rs]),preview:a(()=>[ks]),_:1})]),_:1}),bs,n("p",null,[ms,n("a",ds,[ys,t(c)]),gs,hs,ws,vs,_s,n("a",fs,[xs,t(c)]),Ks]),t(o,null,{default:a(()=>[t(e,{title:"Vue",active:""},{default:a(()=>[Ps]),preview:a(()=>[Ss]),_:1})]),_:1}),Ws,n("p",null,[Cs,n("a",js,[As,t(c)]),Ts,zs,qs,n("a",Es,[Rs,t(c)]),Bs,Ms,Ds]),t(o,null,{default:a(()=>[t(e,{title:"Svelte",active:""},{default:a(()=>[Ns]),preview:a(()=>[Js]),_:1})]),_:1})],64)}var Ys=u(b,[["render",Ls]]);export{Ys as default}; diff --git a/docs/.vuepress/dist/assets/local-development.html.c30f3958.js b/docs/.vuepress/dist/assets/local-development.html.0c928074.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.c30f3958.js rename to docs/.vuepress/dist/assets/local-development.html.0c928074.js index 5e927a12d..ab7b28969 100644 --- a/docs/.vuepress/dist/assets/local-development.html.c30f3958.js +++ b/docs/.vuepress/dist/assets/local-development.html.0c928074.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const d={},m=n("h1",{id:"desarrollo-en-un-entorno-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#desarrollo-en-un-entorno-local","aria-hidden":"true"},"#"),s(" Desarrollo en un entorno local")],-1),g=n("h2",{id:"iniciando-un-validador",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#iniciando-un-validador","aria-hidden":"true"},"#"),s(" Iniciando un validador")],-1),h=n("p",null,"Probar el c\xF3digo de tu programa localmente puede ser mucho m\xE1s confiable que probarlo en devnet, y puede ayudarte con las pruebas previas a devnet.",-1),_=s("Puedes configurar un validador de prueba local instalando "),y=s("solana tool suite"),f=s(" y ejecutando"),w=b(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const d={},m=n("h1",{id:"desarrollo-en-un-entorno-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#desarrollo-en-un-entorno-local","aria-hidden":"true"},"#"),s(" Desarrollo en un entorno local")],-1),g=n("h2",{id:"iniciando-un-validador",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#iniciando-un-validador","aria-hidden":"true"},"#"),s(" Iniciando un validador")],-1),h=n("p",null,"Probar el c\xF3digo de tu programa localmente puede ser mucho m\xE1s confiable que probarlo en devnet, y puede ayudarte con las pruebas previas a devnet.",-1),_=s("Puedes configurar un validador de prueba local instalando "),y=s("solana tool suite"),f=s(" y ejecutando"),w=b(`
    solana-test-validator
     

    Beneficios de usar local-test-validator incluyen:

    • No tener limites en el n\xFAmero de llamadas RPC
    • No tener l\xEDmites de airdrop
    • Despliegue directo de un programa on-chain (--bpf-program ...)
    • Conar cuentas de un cluster p\xFAblico, incluyendo programas (--clone ...)
    • La posibilidad de configurar el historial de retenci\xF3n de transacciones (--limit-ledger-size ...)
    • Poder configurar los slots por epoch (--slots-per-epoch ...)
    • Saltar a un slot espec\xEDfico (--warp-slot ...)

    Conect\xE1ndote con los diferentes entornos

    Cuando desarrollas en Solana, debes conectarte a un API de RPC espec\xEDfico. Solana cuenta con 3 entornos distintos para desarrollo:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.83d30cd3.js b/docs/.vuepress/dist/assets/local-development.html.26e53f81.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.83d30cd3.js rename to docs/.vuepress/dist/assets/local-development.html.26e53f81.js index b31819063..7647462e2 100644 --- a/docs/.vuepress/dist/assets/local-development.html.83d30cd3.js +++ b/docs/.vuepress/dist/assets/local-development.html.26e53f81.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"lap-trinh-o-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lap-trinh-o-local","aria-hidden":"true"},"#"),s(" L\u1EADp tr\xECnh \u1EDF Local")],-1),h=n("h2",{id:"khoi-chay-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#khoi-chay-local-validator","aria-hidden":"true"},"#"),s(" Kh\u1EDFi ch\u1EA1y Local Validator")],-1),g=n("p",null,"Ki\u1EC3m th\u1EED program c\u1EE7a b\u1EA1n tr\xEAn m\xE1y c\xE1 nh\xE2n s\u1EBD nhanh v\xE0 \u0111\xE1ng tin c\u1EADy h\u01A1n nhi\u1EC1u so v\u1EDBi devnet. Qu\xE1 tr\xECnh n\xE0y gi\xFAp b\u1EA1n c\xF3 th\u1EC3 ki\u1EC3m tra ch\u01B0\u01A1ng tr\xECnh tr\u01B0\u1EDBc khi tri\u1EC3n khai v\xE0 ki\u1EC3m th\u1EE9 ch\xFAng tr\xEAn devnet.",-1),_=s("B\u1EA1n c\xF3 th\u1EC3 thi\u1EBFt l\u1EADp "),y=n("code",null,"local-test-validator",-1),w=s(" b\u1EB1ng c\xE1ch c\xE0i \u0111\u1EB7t "),f=s("b\u1ED9 c\xF4ng c\u1EE5 solana"),v=s(" v\xE0 ch\u1EA1y l\u1EC7nh sau:"),C=b(`
    solana-test-validator
    +import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"lap-trinh-o-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lap-trinh-o-local","aria-hidden":"true"},"#"),s(" L\u1EADp tr\xECnh \u1EDF Local")],-1),h=n("h2",{id:"khoi-chay-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#khoi-chay-local-validator","aria-hidden":"true"},"#"),s(" Kh\u1EDFi ch\u1EA1y Local Validator")],-1),g=n("p",null,"Ki\u1EC3m th\u1EED program c\u1EE7a b\u1EA1n tr\xEAn m\xE1y c\xE1 nh\xE2n s\u1EBD nhanh v\xE0 \u0111\xE1ng tin c\u1EADy h\u01A1n nhi\u1EC1u so v\u1EDBi devnet. Qu\xE1 tr\xECnh n\xE0y gi\xFAp b\u1EA1n c\xF3 th\u1EC3 ki\u1EC3m tra ch\u01B0\u01A1ng tr\xECnh tr\u01B0\u1EDBc khi tri\u1EC3n khai v\xE0 ki\u1EC3m th\u1EE9 ch\xFAng tr\xEAn devnet.",-1),_=s("B\u1EA1n c\xF3 th\u1EC3 thi\u1EBFt l\u1EADp "),y=n("code",null,"local-test-validator",-1),w=s(" b\u1EB1ng c\xE1ch c\xE0i \u0111\u1EB7t "),f=s("b\u1ED9 c\xF4ng c\u1EE5 solana"),v=s(" v\xE0 ch\u1EA1y l\u1EC7nh sau:"),C=b(`
    solana-test-validator
     

    L\u1EE3i \xEDch c\u1EE7a vi\u1EC7c ch\u1EA1y local-test-validator g\u1ED3m:

    • Kh\xF4ng gi\u1EDBi h\u1EA1n truy v\u1EA5n RPC
    • Kh\xF4ng gi\u1EDBi h\u1EA1n s\u1ED1 l\u01B0\u1EE3ng SOL nh\u1EADn \u0111\u01B0\u1EE3c \u0111\u1EC3 ki\u1EC3m th\u1EED
    • Tri\u1EC3n khai tr\u1EF1c ti\u1EBFp program l\xEAn on-chain (--bpf-program ...)
    • Sao ch\xE9p account t\u1EEB c\xE1c m\u1EA1ng c\xF4ng c\u1ED9ng, bao g\u1ED3m c\u1EA3 c\xE1c program (--clone ...)
    • C\xF3 th\u1EC3 \u0111i\u1EC1u ch\u1EC9nh s\u1ED1 l\u01B0\u1EE3ng l\u1ECBch s\u1EED transaction (--limit-ledger-size ...)
    • C\xF3 th\u1EC3 \u0111i\u1EC1u ch\u1EC9nh \u0111\u1ED9 d\xE0i epoch (--slots-per-epoch ...)
    • Nh\u1EA3y \u0111\u1EBFn b\u1EA5y k\u1EF3 ch\u1ED7 tr\u1ED1ng n\xE0o (--warp-slot ...)

    K\u1EBFt n\u1ED1i \u0111\u1EBFn m\xF4i tr\u01B0\u1EDDng

    M\u1ED9t khi b\u1EAFt \u0111\u1EA7u l\xE0m vi\u1EC7c v\u1EDBi m\xF4i tr\u01B0\u1EDDng ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng tr\xEAn Solana, b\u1EA1n s\u1EBD c\u1EA7n ph\u1EA3i k\u1EBFt n\u1ED1i \u1EE9ng d\u1EE5ng c\u1EE7a b\u1EA1n \u0111\u1EBFn m\u1ED9t \u0111i\u1EC3m RPC API c\u1EE5 th\u1EC3. Solana c\xF3 3 m\xF4i tr\u01B0\u1EDDng c\xF4ng c\u1ED9ng cho qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng:

    • mainnet-beta: https://api.mainnet-beta.solana.com
    • devnet: https://api.devnet.solana.com
    • testnet: https://api.testnet.solana.com
    `,6),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.987c051d.js b/docs/.vuepress/dist/assets/local-development.html.2f6f02fe.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.987c051d.js rename to docs/.vuepress/dist/assets/local-development.html.2f6f02fe.js index 531983d89..d6823e8b8 100644 --- a/docs/.vuepress/dist/assets/local-development.html.987c051d.js +++ b/docs/.vuepress/dist/assets/local-development.html.2f6f02fe.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u672C\u5730\u5F00\u53D1",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u672C\u5730\u5F00\u53D1","aria-hidden":"true"},"#"),s(" \u672C\u5730\u5F00\u53D1")],-1),g=n("h2",{id:"\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668","aria-hidden":"true"},"#"),s(" \u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668")],-1),_=n("p",null,"\u5728\u672C\u5730\u6D4B\u8BD5\u9A8C\u8BC1\u5668\u6BD4\u5728\u5F00\u53D1\u7F51\u7EDC(devnet)\u4E0A\u8FDB\u884C\u6D4B\u8BD5\u66F4\u53EF\u9760\uFF0C\u5E76\u4E14\u53EF\u4EE5\u5E2E\u52A9\u4F60\u5728\u5F00\u53D1\u7F51\u7EDC\u4E0A\u8FD0\u884C\u4E4B\u524D\u8FDB\u884C\u6D4B\u8BD5\u3002",-1),h=s("\u4F60\u53EF\u4EE5\u901A\u8FC7\u5B89\u88C5 "),w=s("solana\u5DE5\u5177\u5957\u4EF6"),y=s(" \u5E76\u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u6765\u8BBE\u7F6E\u672C\u5730\u6D4B\u8BD5\u9A8C\u8BC1\u5668\uFF1A"),f=b(`
    solana-test-validator
    +import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u672C\u5730\u5F00\u53D1",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u672C\u5730\u5F00\u53D1","aria-hidden":"true"},"#"),s(" \u672C\u5730\u5F00\u53D1")],-1),g=n("h2",{id:"\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668","aria-hidden":"true"},"#"),s(" \u5F00\u542F\u672C\u5730\u9A8C\u8BC1\u5668")],-1),_=n("p",null,"\u5728\u672C\u5730\u6D4B\u8BD5\u9A8C\u8BC1\u5668\u6BD4\u5728\u5F00\u53D1\u7F51\u7EDC(devnet)\u4E0A\u8FDB\u884C\u6D4B\u8BD5\u66F4\u53EF\u9760\uFF0C\u5E76\u4E14\u53EF\u4EE5\u5E2E\u52A9\u4F60\u5728\u5F00\u53D1\u7F51\u7EDC\u4E0A\u8FD0\u884C\u4E4B\u524D\u8FDB\u884C\u6D4B\u8BD5\u3002",-1),h=s("\u4F60\u53EF\u4EE5\u901A\u8FC7\u5B89\u88C5 "),w=s("solana\u5DE5\u5177\u5957\u4EF6"),y=s(" \u5E76\u8FD0\u884C\u4EE5\u4E0B\u547D\u4EE4\u6765\u8BBE\u7F6E\u672C\u5730\u6D4B\u8BD5\u9A8C\u8BC1\u5668\uFF1A"),f=b(`
    solana-test-validator
     

    \u4F7F\u7528\u672C\u5730\u6D4B\u8BD5\u9A8C\u8BC1\u5668\u7684\u597D\u5904\u5305\u62EC\uFF1A

    • \u65E0RPC\u901F\u7387\u9650\u5236
    • \u65E0\u7A7A\u6295\u9650\u5236
    • \u76F4\u63A5\u5728\u94FE\u4E0A\u90E8\u7F72\u7A0B\u5E8F\uFF08--bpf-program ...\uFF09
    • \u4ECE\u516C\u5171\u96C6\u7FA4\u514B\u9686\u8D26\u6237\uFF0C\u5305\u62EC\u7A0B\u5E8F\uFF08--clone ...\uFF09
    • \u53EF\u914D\u7F6E\u7684\u4E8B\u52A1\u5386\u53F2\u4FDD\u7559\uFF08--limit-ledger-size ...\uFF09
    • \u53EF\u914D\u7F6E\u7684\u7EAA\u5143\u957F\u5EA6\uFF08--slots-per-epoch ...\uFF09
    • \u8DF3\u8F6C\u5230\u4EFB\u610F\u69FD\u4F4D\uFF08--warp-slot ...\uFF09

    \u8FDE\u63A5\u5230\u4E0D\u540C\u73AF\u5883

    \u5F53\u4F60\u8FDB\u884CSolana\u5F00\u53D1\u65F6\uFF0C\u4F60\u9700\u8981\u8FDE\u63A5\u5230\u7279\u5B9A\u7684RPC API\u7AEF\u70B9\u3002Solana\u6709\u4E09\u4E2A\u516C\u5171\u7684\u5F00\u53D1\u73AF\u5883\uFF1A

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.04b39972.js b/docs/.vuepress/dist/assets/local-development.html.3c02c969.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.04b39972.js rename to docs/.vuepress/dist/assets/local-development.html.3c02c969.js index c75549c09..cfdd3d8a0 100644 --- a/docs/.vuepress/dist/assets/local-development.html.04b39972.js +++ b/docs/.vuepress/dist/assets/local-development.html.3c02c969.js @@ -1,4 +1,4 @@ -import{_ as r,r as t,o as i,c,a as n,b as e,w as p,F as u,d as a,e as o}from"./app.07ce7a66.js";const d={},m=n("h1",{id:"local-development-yerel-gelistirme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development-yerel-gelistirme","aria-hidden":"true"},"#"),a(" Local Development (Yerel Geli\u015Ftirme)")],-1),b=n("h2",{id:"starting-a-local-validator-yerel-validator-baslatma",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starting-a-local-validator-yerel-validator-baslatma","aria-hidden":"true"},"#"),a(" Starting a local validator (Yerel validator ba\u015Flatma)")],-1),k=n("p",null,"Program kodunuzu yerel olarak test etmek, devnet'te test etmekten \xE7ok daha g\xFCvenilir olabilir ve onu devnet'te denemeden \xF6nce test etmenize yard\u0131mc\u0131 olabilir.",-1),g=a("solana tool suite"),h=a(" y\xFCkleyerek ve \xE7al\u0131\u015Ft\u0131rarak yerel test do\u011Frulay\u0131c\u0131n\u0131z\u0131 kurabilirsiniz."),y=o(`
    solana-test-validator
    +import{_ as r,r as t,o as i,c,a as n,b as e,w as p,F as u,d as a,e as o}from"./app.d411e3b3.js";const d={},m=n("h1",{id:"local-development-yerel-gelistirme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development-yerel-gelistirme","aria-hidden":"true"},"#"),a(" Local Development (Yerel Geli\u015Ftirme)")],-1),b=n("h2",{id:"starting-a-local-validator-yerel-validator-baslatma",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starting-a-local-validator-yerel-validator-baslatma","aria-hidden":"true"},"#"),a(" Starting a local validator (Yerel validator ba\u015Flatma)")],-1),k=n("p",null,"Program kodunuzu yerel olarak test etmek, devnet'te test etmekten \xE7ok daha g\xFCvenilir olabilir ve onu devnet'te denemeden \xF6nce test etmenize yard\u0131mc\u0131 olabilir.",-1),g=a("solana tool suite"),h=a(" y\xFCkleyerek ve \xE7al\u0131\u015Ft\u0131rarak yerel test do\u011Frulay\u0131c\u0131n\u0131z\u0131 kurabilirsiniz."),y=o(`
    solana-test-validator
     

    Yerel test do\u011Frulay\u0131c\u0131 kullanman\u0131n faydalar\u0131 \u015Funlar\u0131 i\xE7erir:

    • RPC h\u0131z s\u0131n\u0131r\u0131 yoktur
    • Airdrop limiti yoktur
    • Do\u011Frudan zincir \xFCzerinde program da\u011F\u0131t\u0131m\u0131 yap\u0131l\u0131r (--bpf-program ...)
    • Programlar da dahil olmak \xFCzere genel bir k\xFCmeden account'lar\u0131 klonlayabilirsiniz (--clone ...)
    • Yap\u0131land\u0131r\u0131labilir i\u015Flem ge\xE7mi\u015Fi saklars\u0131n\u0131z (--limit-ledger-size ...)
    • Epoch uzunlu\u011Fu yap\u0131land\u0131r\u0131labilir (--slots-per-epoch ...)
    • \u0130ste\u011Fe ba\u011Fl\u0131 bir slota atlayabilirsiniz (--warp-slot ...)

    Connecting to Environments (Ortamlara Ba\u011Flanma)

    Solana geli\u015Ftirme \xFCzerinde \xE7al\u0131\u015F\u0131rken, belirli bir RPC API u\xE7 noktas\u0131na ba\u011Flanman\u0131z gerekecektir. Solana'n\u0131n 3 genel geli\u015Ftirme ortam\u0131 vard\u0131r:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    const connection = new Connection(clusterApiUrl("mainnet-beta"), "confirmed");
     
     

    Son olarak, a\u015Fa\u011F\u0131dakilerle yerel veya uzaktan \xE7al\u0131\u015Fan \xF6zel bir k\xFCmeye de ba\u011Flanabilirsiniz:

    const connection = new Connection("http://127.0.0.1:8899", "confirmed");
    diff --git a/docs/.vuepress/dist/assets/local-development.html.87708b9b.js b/docs/.vuepress/dist/assets/local-development.html.4297ed48.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/local-development.html.87708b9b.js
    rename to docs/.vuepress/dist/assets/local-development.html.4297ed48.js
    index f1f6ca2b1..88b7c00d8 100644
    --- a/docs/.vuepress/dist/assets/local-development.html.87708b9b.js
    +++ b/docs/.vuepress/dist/assets/local-development.html.4297ed48.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"local-development",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development","aria-hidden":"true"},"#"),s(" Local Development")],-1),g=n("h2",{id:"starting-a-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starting-a-local-validator","aria-hidden":"true"},"#"),s(" Starting a Local Validator")],-1),h=n("p",null,"\uB2F9\uC2E0\uC758 Program \uCF54\uB4DC\uB97C \uB85C\uCEEC\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD558\uB294 \uAC83\uC740 devnet\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD558\uB294 \uAC83\uBCF4\uB2E4 \uB354 \uC2E0\uB8B0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uADF8\uB9AC\uACE0 devnet\uC5D0 \uBCF4\uB0B4\uAE30 \uC804\uC5D0 \uD14C\uC2A4\uD2B8\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),_=s("solana tool suite"),w=s("\uB97C \uC124\uCE58\uD558\uACE0 \uC2E4\uD589\uD568\uC73C\uB85C\uC368 local-test-validator\uB97C \uAD6C\uCD95\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),f=b(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"local-development",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development","aria-hidden":"true"},"#"),s(" Local Development")],-1),g=n("h2",{id:"starting-a-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starting-a-local-validator","aria-hidden":"true"},"#"),s(" Starting a Local Validator")],-1),h=n("p",null,"\uB2F9\uC2E0\uC758 Program \uCF54\uB4DC\uB97C \uB85C\uCEEC\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD558\uB294 \uAC83\uC740 devnet\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD558\uB294 \uAC83\uBCF4\uB2E4 \uB354 \uC2E0\uB8B0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uADF8\uB9AC\uACE0 devnet\uC5D0 \uBCF4\uB0B4\uAE30 \uC804\uC5D0 \uD14C\uC2A4\uD2B8\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),_=s("solana tool suite"),w=s("\uB97C \uC124\uCE58\uD558\uACE0 \uC2E4\uD589\uD568\uC73C\uB85C\uC368 local-test-validator\uB97C \uAD6C\uCD95\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),f=b(`
    solana-test-validator
     

    local-test-validator\uB97C \uC0AC\uC6A9\uD558\uB294 \uAC83\uC740 \uC544\uB798\uC758 \uC774\uC810\uB4E4\uC744 \uAC00\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4:

    • RPC \uC81C\uD55C\uC774 \uC5C6\uC74C
    • airdrop \uC81C\uD55C\uC774 \uC5C6\uC74C
    • \uC9C1\uC811\uC801\uC778 on-chain \uD504\uB85C\uADF8\uB7A8 \uBC30\uD3EC (--bpf-program ...)
    • public cluster\uB85C\uBD80\uD130 Program\uB4E4\uC744 \uD3EC\uD568\uD55C Account\uB4E4\uC5D0 \uB300\uD55C \uBCF5\uC0AC (--clone ...)
    • Transaction \uD788\uC2A4\uD1A0\uB9AC \uC720\uC9C0\uC5D0 \uB300\uD55C \uC124\uC815 \uAC00\uB2A5 (--limit-ledger-size ...)
    • epoch \uAE38\uC774\uC5D0 \uB300\uD55C \uC124\uC815 \uAC00\uB2A5 (--slots-per-epoch ...)
    • \uC784\uC758\uC758 slot\uC73C\uB85C \uAC74\uB108\uB6F0\uAE30 (--warp-slot ...)

    Connecting to Environments

    Solana\uC5D0\uC11C \uAC1C\uBC1C\uD560 \uB54C \uC6B0\uB9AC\uB294 \uD2B9\uC800 RPC API endpoint\uC5D0 \uC5F0\uACB0\uD560 \uD544\uC694\uAC00 \uC788\uC744 \uAC83\uC785\uB2C8\uB2E4. Solana\uB294 3 \uAC1C\uC758 public \uAC1C\uBC1C \uD658\uACBD\uC744 \uAC00\uC9C0\uACE0 \uC788\uC2B5\uB2C8\uB2E4.

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.5b9c11f5.js b/docs/.vuepress/dist/assets/local-development.html.570a407e.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.5b9c11f5.js rename to docs/.vuepress/dist/assets/local-development.html.570a407e.js index 9f797cbb1..30f3dc5a1 100644 --- a/docs/.vuepress/dist/assets/local-development.html.5b9c11f5.js +++ b/docs/.vuepress/dist/assets/local-development.html.570a407e.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"local-development",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development","aria-hidden":"true"},"#"),s(" Local Development")],-1),g=n("h2",{id:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49-local-validator","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49 Local Validator")],-1),h=n("p",null,"\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A program \u0E17\u0E35\u0E48 local \u0E08\u0E30\u0E40\u0E2A\u0E16\u0E35\u0E22\u0E23\u0E01\u0E27\u0E48\u0E32\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E1A\u0E19 devnet \u0E41\u0E25\u0E30\u0E21\u0E31\u0E19\u0E22\u0E31\u0E07\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E23\u0E32\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E44\u0E1B\u0E25\u0E2D\u0E07\u0E1A\u0E19 devnet \u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22",-1),_=s("\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 local-test-validator \u0E42\u0E14\u0E22\u0E01\u0E32\u0E23\u0E25\u0E07 "),w=s("solana tool suite"),y=s(" \u0E41\u0E25\u0E30 run \u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E19\u0E35\u0E49"),f=b(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"local-development",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development","aria-hidden":"true"},"#"),s(" Local Development")],-1),g=n("h2",{id:"\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49-local-validator","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49 Local Validator")],-1),h=n("p",null,"\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A program \u0E17\u0E35\u0E48 local \u0E08\u0E30\u0E40\u0E2A\u0E16\u0E35\u0E22\u0E23\u0E01\u0E27\u0E48\u0E32\u0E01\u0E32\u0E23\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E1A\u0E19 devnet \u0E41\u0E25\u0E30\u0E21\u0E31\u0E19\u0E22\u0E31\u0E07\u0E0A\u0E48\u0E27\u0E22\u0E40\u0E23\u0E32\u0E17\u0E14\u0E2A\u0E2D\u0E1A\u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E44\u0E1B\u0E25\u0E2D\u0E07\u0E1A\u0E19 devnet \u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22",-1),_=s("\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07 local-test-validator \u0E42\u0E14\u0E22\u0E01\u0E32\u0E23\u0E25\u0E07 "),w=s("solana tool suite"),y=s(" \u0E41\u0E25\u0E30 run \u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07\u0E19\u0E35\u0E49"),f=b(`
    solana-test-validator
     

    \u0E1B\u0E23\u0E30\u0E42\u0E22\u0E0A\u0E19\u0E4C\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49 local-test-validator \u0E04\u0E37\u0E2D:

    • \u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14 (rate-limits) \u200B\u0E43\u0E19\u0E01\u0E32\u0E23\u0E40\u0E23\u0E35\u0E22\u0E01 RPC
    • \u0E44\u0E21\u0E48\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E43\u0E19\u0E01\u0E32\u0E23\u0E02\u0E2D airdrop
    • deploy program on-chain \u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07 (--bpf-program ...)
    • \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 clone accounts \u0E41\u0E25\u0E30 programs \u0E08\u0E32\u0E01 public cluster \u0E44\u0E14\u0E49 (--clone ...)
    • \u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32 transaction history retention \u0E44\u0E14\u0E49 (--limit-ledger-size ...)
    • \u0E15\u0E31\u0E49\u0E07\u0E04\u0E48\u0E32\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27 epoch \u0E44\u0E14\u0E49 (--slots-per-epoch ...)
    • \u0E02\u0E49\u0E32\u0E21\u0E44\u0E1B slot \u0E44\u0E2B\u0E19\u0E01\u0E47\u0E44\u0E14\u0E49\u0E15\u0E32\u0E21\u0E43\u0E08 (--warp-slot ...)

    Connecting to Environments

    \u0E40\u0E27\u0E25\u0E32 dev \u0E1A\u0E19 Solana development \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07 connect \u0E44\u0E1B\u0E17\u0E35\u0E48 RPC API endpoint \u0E0B\u0E36\u0E48\u0E07 Solana \u0E08\u0E30\u0E21\u0E35\u0E2D\u0E22\u0E39\u0E48 3 public development environments:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.56a49f49.js b/docs/.vuepress/dist/assets/local-development.html.74ef67b1.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.56a49f49.js rename to docs/.vuepress/dist/assets/local-development.html.74ef67b1.js index 9b88e9e29..9f3c98d86 100644 --- a/docs/.vuepress/dist/assets/local-development.html.56a49f49.js +++ b/docs/.vuepress/dist/assets/local-development.html.74ef67b1.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u30ED\u30FC\u30AB\u30EB\u958B\u767A",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30ED\u30FC\u30AB\u30EB\u958B\u767A","aria-hidden":"true"},"#"),s(" \u30ED\u30FC\u30AB\u30EB\u958B\u767A")],-1),g=n("h2",{id:"\u30ED\u30FC\u30AB\u30EB\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306E\u958B\u59CB",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30ED\u30FC\u30AB\u30EB\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306E\u958B\u59CB","aria-hidden":"true"},"#"),s(" \u30ED\u30FC\u30AB\u30EB\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306E\u958B\u59CB")],-1),_=n("p",null,"\u30D7\u30ED\u30B0\u30E9\u30E0 \u30B3\u30FC\u30C9\u3092\u30ED\u30FC\u30AB\u30EB\u3067\u30C6\u30B9\u30C8\u3059\u308B\u3053\u3068\u306F\u3001devnet\u3067\u30C6\u30B9\u30C8\u3059\u308B\u3088\u308A\u3082\u306F\u308B\u304B\u306B\u4FE1\u983C\u6027\u304C\u9AD8\u304F\u3001devnet\u3067\u8A66\u3059\u524D\u306B\u30C6\u30B9\u30C8\u3059\u308B\u306E\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002",-1),h=s("solana tool suite"),w=s("\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB&\u5B9F\u884C\u3059\u308B\u3053\u3068\u3067local-test-validator\u3092\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3067\u304D\u307E\u3059\u3002"),y=b(`
    solana-test-validator
    +import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u30ED\u30FC\u30AB\u30EB\u958B\u767A",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30ED\u30FC\u30AB\u30EB\u958B\u767A","aria-hidden":"true"},"#"),s(" \u30ED\u30FC\u30AB\u30EB\u958B\u767A")],-1),g=n("h2",{id:"\u30ED\u30FC\u30AB\u30EB\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306E\u958B\u59CB",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30ED\u30FC\u30AB\u30EB\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u30FC\u306E\u958B\u59CB","aria-hidden":"true"},"#"),s(" \u30ED\u30FC\u30AB\u30EB\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306E\u958B\u59CB")],-1),_=n("p",null,"\u30D7\u30ED\u30B0\u30E9\u30E0 \u30B3\u30FC\u30C9\u3092\u30ED\u30FC\u30AB\u30EB\u3067\u30C6\u30B9\u30C8\u3059\u308B\u3053\u3068\u306F\u3001devnet\u3067\u30C6\u30B9\u30C8\u3059\u308B\u3088\u308A\u3082\u306F\u308B\u304B\u306B\u4FE1\u983C\u6027\u304C\u9AD8\u304F\u3001devnet\u3067\u8A66\u3059\u524D\u306B\u30C6\u30B9\u30C8\u3059\u308B\u306E\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002",-1),h=s("solana tool suite"),w=s("\u3092\u30A4\u30F3\u30B9\u30C8\u30FC\u30EB&\u5B9F\u884C\u3059\u308B\u3053\u3068\u3067local-test-validator\u3092\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3067\u304D\u307E\u3059\u3002"),y=b(`
    solana-test-validator
     

    local-test-validator\u3092\u4F7F\u7528\u3059\u308B\u5229\u70B9\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059:

    • RPC \u30EC\u30FC\u30C8\u5236\u9650\u304C\u306A\u3044
    • airdrop \u5236\u9650\u304C\u306A\u3044
    • \u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u76F4\u63A5\u30C7\u30D7\u30ED\u30A4(--bpf-program ...)
    • \u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u542B\u3080\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30D1\u30D6\u30EA\u30C3\u30AF\u30AF\u30E9\u30B9\u30BF\u304B\u3089\u306E\u30AF\u30ED\u30FC\u30F3 (--clone ...)
    • \u69CB\u6210\u53EF\u80FD\u306A\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5C65\u6B74\u4FDD\u6301(--limit-ledger-size ...)
    • \u69CB\u6210\u53EF\u80FD\u306A\u30A8\u30DD\u30C3\u30AF\u9577 (--slots-per-epoch ...)
    • \u4EFB\u610F\u306E\u30B9\u30ED\u30C3\u30C8\u3078\u306E\u30B8\u30E3\u30F3\u30D7(--warp-slot ...)

    \u74B0\u5883\u3078\u306E\u63A5\u7D9A

    Solana\u306E\u958B\u767A\u306B\u53D6\u308A\u7D44\u3093\u3067\u3044\u308B\u3068\u304D\u306F\u3001\u7279\u5B9A\u306E RPC API\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306B\u63A5\u7D9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 Solana\u306B\u306F3\u3064\u306E\u516C\u958B\u958B\u767A\u74B0\u5883\u304C\u3042\u308A\u307E\u3059:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),f=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.d92b65d2.js b/docs/.vuepress/dist/assets/local-development.html.8ed37c1d.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.d92b65d2.js rename to docs/.vuepress/dist/assets/local-development.html.8ed37c1d.js index 0ed587d8b..9028de673 100644 --- a/docs/.vuepress/dist/assets/local-development.html.d92b65d2.js +++ b/docs/.vuepress/dist/assets/local-development.html.8ed37c1d.js @@ -1,4 +1,4 @@ -import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u672C\u5730\u958B\u767C",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u672C\u5730\u958B\u767C","aria-hidden":"true"},"#"),s(" \u672C\u5730\u958B\u767C")],-1),g=n("h2",{id:"\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668","aria-hidden":"true"},"#"),s(" \u958B\u5553\u672C\u5730\u9A57\u8B49\u5668")],-1),_=n("p",null,"\u5728\u672C\u5730\u6E2C\u8A66\u9A57\u8B49\u5668\u6BD4\u5728\u958B\u767C\u7DB2\u7D61(devnet)\u4E0A\u9032\u884C\u6E2C\u8A66\u66F4\u53EF\u9760\uFF0C\u4E26\u4E14\u53EF\u4EE5\u5E6B\u52A9\u4F60\u5728\u958B\u767C\u7DB2\u7D61\u4E0A\u904B\u884C\u4E4B\u524D\u9032\u884C\u6E2C\u8A66\u3002",-1),h=s("\u4F60\u53EF\u4EE5\u901A\u904E\u5B89\u88DD "),w=s("solana\u5DE5\u5177\u5957\u4EF6"),y=s(" \u4E26\u904B\u884C\u4EE5\u4E0B\u547D\u4EE4\u4F86\u8A2D\u7F6E\u672C\u5730\u6E2C\u8A66\u9A57\u8B49\u5668\uFF1A"),f=b(`
    solana-test-validator
    +import{_ as u,r as p,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u672C\u5730\u958B\u767C",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u672C\u5730\u958B\u767C","aria-hidden":"true"},"#"),s(" \u672C\u5730\u958B\u767C")],-1),g=n("h2",{id:"\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u958B\u5553\u672C\u5730\u9A57\u8B49\u5668","aria-hidden":"true"},"#"),s(" \u958B\u5553\u672C\u5730\u9A57\u8B49\u5668")],-1),_=n("p",null,"\u5728\u672C\u5730\u6E2C\u8A66\u9A57\u8B49\u5668\u6BD4\u5728\u958B\u767C\u7DB2\u7D61(devnet)\u4E0A\u9032\u884C\u6E2C\u8A66\u66F4\u53EF\u9760\uFF0C\u4E26\u4E14\u53EF\u4EE5\u5E6B\u52A9\u4F60\u5728\u958B\u767C\u7DB2\u7D61\u4E0A\u904B\u884C\u4E4B\u524D\u9032\u884C\u6E2C\u8A66\u3002",-1),h=s("\u4F60\u53EF\u4EE5\u901A\u904E\u5B89\u88DD "),w=s("solana\u5DE5\u5177\u5957\u4EF6"),y=s(" \u4E26\u904B\u884C\u4EE5\u4E0B\u547D\u4EE4\u4F86\u8A2D\u7F6E\u672C\u5730\u6E2C\u8A66\u9A57\u8B49\u5668\uFF1A"),f=b(`
    solana-test-validator
     

    \u4F7F\u7528\u672C\u5730\u6E2C\u8A66\u9A57\u8B49\u5668\u7684\u597D\u8655\u5305\u62EC\uFF1A

    • \u7121RPC\u901F\u7387\u9650\u5236
    • \u7121\u7A7A\u6295\u9650\u5236
    • \u76F4\u63A5\u5728\u93C8\u4E0A\u90E8\u7F72\u7A0B\u5E8F\uFF08--bpf-program ...\uFF09
    • \u5F9E\u516C\u5171\u96C6\u7FA3\u514B\u9686\u8CEC\u6236\uFF0C\u5305\u62EC\u7A0B\u5E8F\uFF08--clone ...\uFF09
    • \u53EF\u914D\u7F6E\u7684\u4E8B\u52D9\u6B77\u53F2\u4FDD\u7559\uFF08--limit-ledger-size ...\uFF09
    • \u53EF\u914D\u7F6E\u7684\u7D00\u5143\u9577\u5EA6\uFF08--slots-per-epoch ...\uFF09
    • \u8DF3\u8F49\u5230\u4EFB\u610F\u69FD\u4F4D\uFF08--warp-slot ...\uFF09

    \u9023\u63A5\u5230\u4E0D\u540C\u74B0\u5883

    \u7576\u4F60\u9032\u884CSolana\u958B\u767C\u6642\uFF0C\u4F60\u9700\u8981\u9023\u63A5\u5230\u7279\u5B9A\u7684RPC API\u7AEF\u9EDE\u3002Solana\u6709\u4E09\u500B\u516C\u5171\u7684\u958B\u767C\u74B0\u5883\uFF1A

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.94d5f03d.js b/docs/.vuepress/dist/assets/local-development.html.9a3616cd.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.94d5f03d.js rename to docs/.vuepress/dist/assets/local-development.html.9a3616cd.js index 616dc9da3..5c41d2f5f 100644 --- a/docs/.vuepress/dist/assets/local-development.html.94d5f03d.js +++ b/docs/.vuepress/dist/assets/local-development.html.9a3616cd.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as m}from"./app.07ce7a66.js";const b={},d=n("h1",{id:"lokal-na-pag-gawa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lokal-na-pag-gawa","aria-hidden":"true"},"#"),s(" Lokal na Pag-gawa")],-1),g=n("h2",{id:"pagsisimula-ng-lokal-na-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagsisimula-ng-lokal-na-validator","aria-hidden":"true"},"#"),s(" Pagsisimula ng Lokal na Validator")],-1),h=n("p",null,"Ang pagsubok sa iyong program code nang lokal ay maaaring maging mas maaasahan kaysa pagsubok sa devnet, at makakatulong sa iyong subukan bago ito subukan sa devnet.",-1),_=s("Maaari mong i-setup ang iyong local-test-validator sa pamamagitan ng pag-install ng "),y=s("solana tool suite"),w=s(" at tumatakbo"),f=m(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as m}from"./app.d411e3b3.js";const b={},d=n("h1",{id:"lokal-na-pag-gawa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lokal-na-pag-gawa","aria-hidden":"true"},"#"),s(" Lokal na Pag-gawa")],-1),g=n("h2",{id:"pagsisimula-ng-lokal-na-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagsisimula-ng-lokal-na-validator","aria-hidden":"true"},"#"),s(" Pagsisimula ng Lokal na Validator")],-1),h=n("p",null,"Ang pagsubok sa iyong program code nang lokal ay maaaring maging mas maaasahan kaysa pagsubok sa devnet, at makakatulong sa iyong subukan bago ito subukan sa devnet.",-1),_=s("Maaari mong i-setup ang iyong local-test-validator sa pamamagitan ng pag-install ng "),y=s("solana tool suite"),w=s(" at tumatakbo"),f=m(`
    solana-test-validator
     

    Ang mga pakinabang ng paggamit ng local-test-validator ay kinabibilangan ng:

    • Walang mga limitasyon sa rate ng RPC
    • Walang limitasyon sa airdrop
    • Direktang on-chain program deployment (--bpf-program ...)
    • I-clone ang mga account mula sa isang pampublikong cluster, kabilang ang mga programa (--clone ...)
    • Nako-configure ang pagpapanatili ng kasaysayan ng transaksyon (--limit-ledger-size ...)
    • Nako-configure na haba ng panahon (--slots-per-epoch ...)
    • Tumalon sa isang arbitrary slot (--warp-slot ...)

    Kumokonekta sa Mga Environment

    Kapag nagtatrabaho ka sa pagbuo ng Solana, kakailanganin mong kumonekta sa isang partikular na endpoint ng RPC API. May 3 pampublikong pag-gawa ang Solana environment:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.edd1e5da.js b/docs/.vuepress/dist/assets/local-development.html.b2f4a193.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.edd1e5da.js rename to docs/.vuepress/dist/assets/local-development.html.b2f4a193.js index e0a9ff580..580e0e7d6 100644 --- a/docs/.vuepress/dist/assets/local-development.html.edd1e5da.js +++ b/docs/.vuepress/dist/assets/local-development.html.b2f4a193.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as m}from"./app.07ce7a66.js";const b={},d=n("h1",{id:"developpement-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#developpement-local","aria-hidden":"true"},"#"),s(" D\xE9veloppement Local")],-1),g=n("h2",{id:"demarrer-un-validateur-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#demarrer-un-validateur-local","aria-hidden":"true"},"#"),s(" D\xE9marrer un Validateur Local")],-1),h=n("p",null,"Tester le code de votre programme localement peut \xEAtre beaucoup plus fiable que de le tester sur le devnet, et peut vous aider \xE0 faire des tests avant de l'essayer sur le devnet.",-1),_=s("Vous pouvez configurer votre validateur de test local (local-test-validator) en installant la "),f=s("suite d'outils de solana (solana tool suite)"),w=s(" et en ex\xE9cutant"),y=m(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as m}from"./app.d411e3b3.js";const b={},d=n("h1",{id:"developpement-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#developpement-local","aria-hidden":"true"},"#"),s(" D\xE9veloppement Local")],-1),g=n("h2",{id:"demarrer-un-validateur-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#demarrer-un-validateur-local","aria-hidden":"true"},"#"),s(" D\xE9marrer un Validateur Local")],-1),h=n("p",null,"Tester le code de votre programme localement peut \xEAtre beaucoup plus fiable que de le tester sur le devnet, et peut vous aider \xE0 faire des tests avant de l'essayer sur le devnet.",-1),_=s("Vous pouvez configurer votre validateur de test local (local-test-validator) en installant la "),f=s("suite d'outils de solana (solana tool suite)"),w=s(" et en ex\xE9cutant"),y=m(`
    solana-test-validator
     

    Les avantages de l'utilisation de local-test-validator sont les suivants :

    • Pas de limites de d\xE9bit RPC
    • Pas de limites d'airdrop
    • D\xE9ploiement direct de programme sur la blockchain (--bpf-program ...)
    • Clonage de comptes \xE0 partir d'un cluster public, y compris les programmes (--clone ...)
    • Possibilit\xE9 de configurer l'historique de conservation des transactions (--limit-ledger-size ...)
    • Possibilit\xE9 de configurer la dur\xE9e des \xE9poques (--slots-per-epoch ...)
    • Sauter \xE0 un slot pr\xE9cis (--warp-slot ...)

    Connexion aux Environnements

    Lorsque vous d\xE9veloppez sur Solana, vous devez vous connecter \xE0 un point de terminaison API de RPC en particulier. Solana dispose de 3 environnements de d\xE9veloppement publics :

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.57651167.js b/docs/.vuepress/dist/assets/local-development.html.c91442a0.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.57651167.js rename to docs/.vuepress/dist/assets/local-development.html.c91442a0.js index d0f68dcd7..0841ddde5 100644 --- a/docs/.vuepress/dist/assets/local-development.html.57651167.js +++ b/docs/.vuepress/dist/assets/local-development.html.c91442a0.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const d={},m=n("h1",{id:"desenvolvimento-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#desenvolvimento-local","aria-hidden":"true"},"#"),s(" Desenvolvimento Local")],-1),g=n("h2",{id:"inicializando-um-validador-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#inicializando-um-validador-local","aria-hidden":"true"},"#"),s(" Inicializando um Validador Local")],-1),h=n("p",null,"Testar o c\xF3digo do seu programa localmente pode ser muito mais confi\xE1vel do que testar na devnet e pode ajud\xE1-lo a testar antes de experimentar na devnet.",-1),_=s("Voc\xEA pode configurar seu validador de teste local instalando o "),f=s("conjunto de ferramentas da Solana"),w=s(" e executando:"),y=b(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const d={},m=n("h1",{id:"desenvolvimento-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#desenvolvimento-local","aria-hidden":"true"},"#"),s(" Desenvolvimento Local")],-1),g=n("h2",{id:"inicializando-um-validador-local",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#inicializando-um-validador-local","aria-hidden":"true"},"#"),s(" Inicializando um Validador Local")],-1),h=n("p",null,"Testar o c\xF3digo do seu programa localmente pode ser muito mais confi\xE1vel do que testar na devnet e pode ajud\xE1-lo a testar antes de experimentar na devnet.",-1),_=s("Voc\xEA pode configurar seu validador de teste local instalando o "),f=s("conjunto de ferramentas da Solana"),w=s(" e executando:"),y=b(`
    solana-test-validator
     

    Benef\xEDcios de usar local-test-validator incluem:

    • Sem limites de taxa de RPC
    • Sem limites de airdrop
    • Implanta\xE7\xE3o direta de programas na cadeia (--bpf-program ...)
    • Clonagem de contas de um cluster p\xFAblico, incluindo programas (--clone ...)
    • Reten\xE7\xE3o configur\xE1vel de hist\xF3rico de transa\xE7\xF5es (--limit-ledger-size ...)
    • Comprimento de \xE9poca configur\xE1vel (--slots-per-epoch ...)
    • Pular para um slot arbitr\xE1rio (--warp-slot ...)

    Conectando a Ambientes

    Ao trabalhar com desenvolvimento Solana, voc\xEA precisar\xE1 se conectar a um ponto de extremidade de API RPC espec\xEDfico. Solana tem 3 ambientes p\xFAblicos de desenvolvimento:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.a46df64b.js b/docs/.vuepress/dist/assets/local-development.html.d4374bd4.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.a46df64b.js rename to docs/.vuepress/dist/assets/local-development.html.d4374bd4.js index 59d0f4763..78faa1351 100644 --- a/docs/.vuepress/dist/assets/local-development.html.a46df64b.js +++ b/docs/.vuepress/dist/assets/local-development.html.d4374bd4.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"local-development",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development","aria-hidden":"true"},"#"),s(" Local Development")],-1),g=n("h2",{id:"starting-a-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starting-a-local-validator","aria-hidden":"true"},"#"),s(" Starting a Local Validator")],-1),h=n("p",null,"Testing your program code locally can be a lot more reliable than testing on devnet, and can help you test before trying it out on devnet.",-1),_=s("You can setup your local-test-validator by installing the "),y=s("solana tool suite"),w=s(" and running"),f=b(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"local-development",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#local-development","aria-hidden":"true"},"#"),s(" Local Development")],-1),g=n("h2",{id:"starting-a-local-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starting-a-local-validator","aria-hidden":"true"},"#"),s(" Starting a Local Validator")],-1),h=n("p",null,"Testing your program code locally can be a lot more reliable than testing on devnet, and can help you test before trying it out on devnet.",-1),_=s("You can setup your local-test-validator by installing the "),y=s("solana tool suite"),w=s(" and running"),f=b(`
    solana-test-validator
     

    Benefits of using local-test-validator include:

    • No RPC rate-limits
    • No airdrop limits
    • Direct on-chain program deployment (--bpf-program ...)
    • Clone accounts from a public cluster, including programs (--clone ...)
    • Configurable transaction history retention (--limit-ledger-size ...)
    • Configurable epoch length (--slots-per-epoch ...)
    • Jump to an arbitrary slot (--warp-slot ...)

    Connecting to Environments

    When you are working on Solana development, you will need to connect to a specific RPC API endpoint. Solana has 3 public development environments:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.46e27ce6.js b/docs/.vuepress/dist/assets/local-development.html.f52317b1.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.46e27ce6.js rename to docs/.vuepress/dist/assets/local-development.html.f52317b1.js index 23b33d6e2..c38d9b71f 100644 --- a/docs/.vuepress/dist/assets/local-development.html.46e27ce6.js +++ b/docs/.vuepress/dist/assets/local-development.html.f52317b1.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"lokale-entwicklung",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lokale-entwicklung","aria-hidden":"true"},"#"),s(" Lokale Entwicklung")],-1),g=n("h2",{id:"starten-eines-lokalen-validators",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starten-eines-lokalen-validators","aria-hidden":"true"},"#"),s(" Starten eines lokalen Validators")],-1),h=n("p",null,"Das lokale Testen Ihres Programmcodes kann viel zuverl\xE4ssiger sein als Testen auf devnet und kann Ihnen beim Testen helfen, bevor Sie es auf devnet ausprobieren.",-1),_=s("Sie k\xF6nnen Ihren Local-Test-Validator einrichten, indem Sie die "),f=s("Solana Tool Suite"),w=s(" installieren. und l\xE4uft"),y=b('

    \u201EKonsole solana-Test-Validator

    \nZu den Vorteilen der Verwendung von Local-Test-Validator geh\xF6ren:\n\n- Keine RPC-Ratenbegrenzungen\n- Keine Airdrop-Grenzen\n- Direkte On-Chain-Programmbereitstellung (`--bpf-program ...`)\n- Konten aus einem \xF6ffentlichen Cluster klonen, einschlie\xDFlich Programme (`--clone ...`)\n- Konfigurierbare Aufbewahrung des Transaktionsverlaufs (`--limit-ledger-size ...`)\n- Konfigurierbare Epochenl\xE4nge (`--slots-per-epoch ...`)\n- Zu einem beliebigen Slot springen (`--warp-slot ...`)\n

    Verbindung zu Umgebungen

    Wenn Sie an der Solana-Entwicklung arbeiten, m\xFCssen Sie eine Verbindung herstellen zu einem bestimmten RPC-API-Endpunkt. Solana hat 3 \xF6ffentliche Entwicklung Umgebungen:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    ',5),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"lokale-entwicklung",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lokale-entwicklung","aria-hidden":"true"},"#"),s(" Lokale Entwicklung")],-1),g=n("h2",{id:"starten-eines-lokalen-validators",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#starten-eines-lokalen-validators","aria-hidden":"true"},"#"),s(" Starten eines lokalen Validators")],-1),h=n("p",null,"Das lokale Testen Ihres Programmcodes kann viel zuverl\xE4ssiger sein als Testen auf devnet und kann Ihnen beim Testen helfen, bevor Sie es auf devnet ausprobieren.",-1),_=s("Sie k\xF6nnen Ihren Local-Test-Validator einrichten, indem Sie die "),f=s("Solana Tool Suite"),w=s(" installieren. und l\xE4uft"),y=b('

    \u201EKonsole solana-Test-Validator

    \nZu den Vorteilen der Verwendung von Local-Test-Validator geh\xF6ren:\n\n- Keine RPC-Ratenbegrenzungen\n- Keine Airdrop-Grenzen\n- Direkte On-Chain-Programmbereitstellung (`--bpf-program ...`)\n- Konten aus einem \xF6ffentlichen Cluster klonen, einschlie\xDFlich Programme (`--clone ...`)\n- Konfigurierbare Aufbewahrung des Transaktionsverlaufs (`--limit-ledger-size ...`)\n- Konfigurierbare Epochenl\xE4nge (`--slots-per-epoch ...`)\n- Zu einem beliebigen Slot springen (`--warp-slot ...`)\n

    Verbindung zu Umgebungen

    Wenn Sie an der Solana-Entwicklung arbeiten, m\xFCssen Sie eine Verbindung herstellen zu einem bestimmten RPC-API-Endpunkt. Solana hat 3 \xF6ffentliche Entwicklung Umgebungen:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    ',5),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"mainnet-beta"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/local-development.html.6fe99a83.js b/docs/.vuepress/dist/assets/local-development.html.f9975a55.js similarity index 99% rename from docs/.vuepress/dist/assets/local-development.html.6fe99a83.js rename to docs/.vuepress/dist/assets/local-development.html.f9975a55.js index 204818504..f4676c272 100644 --- a/docs/.vuepress/dist/assets/local-development.html.6fe99a83.js +++ b/docs/.vuepress/dist/assets/local-development.html.f9975a55.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"development-lokal",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#development-lokal","aria-hidden":"true"},"#"),s(" Development Lokal")],-1),g=n("h2",{id:"memulai-validator-lokal",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#memulai-validator-lokal","aria-hidden":"true"},"#"),s(" Memulai Validator Lokal")],-1),h=n("p",null,"Menguji kode program anda secara lokal bisa jauh lebih andal daripada pengujian di devnet, dan bisa membantu anda menguji sebelum mencobanya di devnet.",-1),_=s("Anda bisa mengatur validator pengujian lokal anda dengan menginstal "),y=s("solana tool suite"),w=s(" dan menjalankannya."),f=b(`
    solana-test-validator
    +import{_ as u,r as l,o as i,c as r,a as n,b as t,w as a,F as k,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"development-lokal",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#development-lokal","aria-hidden":"true"},"#"),s(" Development Lokal")],-1),g=n("h2",{id:"memulai-validator-lokal",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#memulai-validator-lokal","aria-hidden":"true"},"#"),s(" Memulai Validator Lokal")],-1),h=n("p",null,"Menguji kode program anda secara lokal bisa jauh lebih andal daripada pengujian di devnet, dan bisa membantu anda menguji sebelum mencobanya di devnet.",-1),_=s("Anda bisa mengatur validator pengujian lokal anda dengan menginstal "),y=s("solana tool suite"),w=s(" dan menjalankannya."),f=b(`
    solana-test-validator
     

    Keuntungan menggunakan validator uji lokal meliputi:

    • Tidak ada batas kecepatan RPC
    • Tidak ada batasan airdrop
    • Penyebaran program on-chain langsung (--bpf-program ...)
    • Mengkloning akun dari cluster publik, termasuk program (--clone ...)
    • Retensi riwayat transaksi yang dapat dikonfigurasi (--limit-ledger-size ...)
    • Panjang zaman yang dapat dikonfigurasi (--slots-per-epoch ...)
    • Lompat ke slot arbitrer (--warp-slot ...)

    Menghubungkan Ke Environment

    Saat anda mengerjakan pengembangan Solana, anda harus terhubung ke titik akhir API RPC tertentu. Solana memiliki 3 alamat environment:

    • mainnet-beta https://api.mainnet-beta.solana.com
    • devnet https://api.devnet.solana.com
    • testnet https://api.testnet.solana.com
    `,6),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.31d70b32.js b/docs/.vuepress/dist/assets/name-service.html.1abc0fa0.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.31d70b32.js rename to docs/.vuepress/dist/assets/name-service.html.1abc0fa0.js index 0ec508050..91c9b75ec 100644 --- a/docs/.vuepress/dist/assets/name-service.html.31d70b32.js +++ b/docs/.vuepress/dist/assets/name-service.html.1abc0fa0.js @@ -1,4 +1,4 @@ -import{_ as p,r as c,o as l,c as u,b as e,w as a,F as i,a as n,d as s}from"./app.07ce7a66.js";const r={},k=n("h1",{id:"namensdienst",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#namensdienst","aria-hidden":"true"},"#"),s(" Namensdienst")],-1),b=n("h2",{id:"namensregister",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#namensregister","aria-hidden":"true"},"#"),s(" Namensregister")],-1),m=n("p",null,"Die Namensregistrierung speichert Informationen \xFCber den Dom\xE4nennamen. Es besteht aus zwei Dingen:",-1),d=n("ul",null,[n("li",null,"Die Kopfzeile"),n("li",null,"Die Daten")],-1),y=n("p",null,"Den Daten f\xFCr einen Domainnamen wird immer der Header vorangestellt, unten ist die Struktur des Headers in JS:",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as p,r as c,o as l,c as u,b as e,w as a,F as i,a as n,d as s}from"./app.d411e3b3.js";const r={},k=n("h1",{id:"namensdienst",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#namensdienst","aria-hidden":"true"},"#"),s(" Namensdienst")],-1),b=n("h2",{id:"namensregister",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#namensregister","aria-hidden":"true"},"#"),s(" Namensregister")],-1),m=n("p",null,"Die Namensregistrierung speichert Informationen \xFCber den Dom\xE4nennamen. Es besteht aus zwei Dingen:",-1),d=n("ul",null,[n("li",null,"Die Kopfzeile"),n("li",null,"Die Daten")],-1),y=n("p",null,"Den Daten f\xFCr einen Domainnamen wird immer der Header vorangestellt, unten ist die Struktur des Headers in JS:",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.2a6127d5.js b/docs/.vuepress/dist/assets/name-service.html.3e027fa0.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.2a6127d5.js rename to docs/.vuepress/dist/assets/name-service.html.3e027fa0.js index 597f8ece6..59c197e8a 100644 --- a/docs/.vuepress/dist/assets/name-service.html.2a6127d5.js +++ b/docs/.vuepress/dist/assets/name-service.html.3e027fa0.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as e,w as a,a as n,F as i,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"service-de-noms",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#service-de-noms","aria-hidden":"true"},"#"),s(" Service de Noms")],-1),m=n("h2",{id:"registre-de-noms",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#registre-de-noms","aria-hidden":"true"},"#"),s(" Registre de noms")],-1),d=n("p",null,"Le registre de noms stocke les informations relatives au nom de domaine. Il est compos\xE9 de deux choses :",-1),y=n("ul",null,[n("li",null,"L'en-t\xEAte"),n("li",null,"Les donn\xE9es")],-1),w=n("p",null,"Les donn\xE9es d'un nom de domaine sont toujours pr\xE9c\xE9d\xE9es de l'en-t\xEAte, ci-dessous la structure de l'en-t\xEAte en JS :",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as e,w as a,a as n,F as i,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"service-de-noms",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#service-de-noms","aria-hidden":"true"},"#"),s(" Service de Noms")],-1),m=n("h2",{id:"registre-de-noms",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#registre-de-noms","aria-hidden":"true"},"#"),s(" Registre de noms")],-1),d=n("p",null,"Le registre de noms stocke les informations relatives au nom de domaine. Il est compos\xE9 de deux choses :",-1),y=n("ul",null,[n("li",null,"L'en-t\xEAte"),n("li",null,"Les donn\xE9es")],-1),w=n("p",null,"Les donn\xE9es d'un nom de domaine sont toujours pr\xE9c\xE9d\xE9es de l'en-t\xEAte, ci-dessous la structure de l'en-t\xEAte en JS :",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.92fe381f.js b/docs/.vuepress/dist/assets/name-service.html.4f71f7ad.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.92fe381f.js rename to docs/.vuepress/dist/assets/name-service.html.4f71f7ad.js index 70ababf36..04ab72268 100644 --- a/docs/.vuepress/dist/assets/name-service.html.92fe381f.js +++ b/docs/.vuepress/dist/assets/name-service.html.4f71f7ad.js @@ -1,4 +1,4 @@ -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s}from"./app.07ce7a66.js";const r={},k=n("h1",{id:"\u547D\u540D\u670D\u52D9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u547D\u540D\u670D\u52D9","aria-hidden":"true"},"#"),s(" \u547D\u540D\u670D\u52D9")],-1),b=n("h2",{id:"\u540D\u7A31\u8A3B\u518A\u8868",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u540D\u7A31\u8A3B\u518A\u8868","aria-hidden":"true"},"#"),s(" \u540D\u7A31\u8A3B\u518A\u8868")],-1),m=n("p",null,"\u540D\u7A31\u8A3B\u518A\u8868\u5B58\u5132\u8207\u57DF\u540D\u6709\u95DC\u7684\u4FE1\u606F\u3002\u5B83\u7531\u5169\u90E8\u5206\u7D44\u6210\uFF1A",-1),d=n("ul",null,[n("li",null,"\u982D\u90E8 (Header)"),n("li",null,"\u6578\u64DA (Data)")],-1),y=n("p",null,"\u57DF\u540D\u7684\u6578\u64DA\u59CB\u7D42\u4EE5\u982D\u90E8\u7232\u524D\u7DB4\u3002\u4EE5\u4E0B\u662F\u982D\u90E8\u5728 JavaScript \u4E2D\u7684\u7D50\u69CB\uFF1A",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s}from"./app.d411e3b3.js";const r={},k=n("h1",{id:"\u547D\u540D\u670D\u52D9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u547D\u540D\u670D\u52D9","aria-hidden":"true"},"#"),s(" \u547D\u540D\u670D\u52D9")],-1),b=n("h2",{id:"\u540D\u7A31\u8A3B\u518A\u8868",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u540D\u7A31\u8A3B\u518A\u8868","aria-hidden":"true"},"#"),s(" \u540D\u7A31\u8A3B\u518A\u8868")],-1),m=n("p",null,"\u540D\u7A31\u8A3B\u518A\u8868\u5B58\u5132\u8207\u57DF\u540D\u6709\u95DC\u7684\u4FE1\u606F\u3002\u5B83\u7531\u5169\u90E8\u5206\u7D44\u6210\uFF1A",-1),d=n("ul",null,[n("li",null,"\u982D\u90E8 (Header)"),n("li",null,"\u6578\u64DA (Data)")],-1),y=n("p",null,"\u57DF\u540D\u7684\u6578\u64DA\u59CB\u7D42\u4EE5\u982D\u90E8\u7232\u524D\u7DB4\u3002\u4EE5\u4E0B\u662F\u982D\u90E8\u5728 JavaScript \u4E2D\u7684\u7D50\u69CB\uFF1A",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.f9dd90b0.js b/docs/.vuepress/dist/assets/name-service.html.68928b86.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.f9dd90b0.js rename to docs/.vuepress/dist/assets/name-service.html.68928b86.js index 413694785..84d35c540 100644 --- a/docs/.vuepress/dist/assets/name-service.html.f9dd90b0.js +++ b/docs/.vuepress/dist/assets/name-service.html.68928b86.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as i,b as e,w as a,a as n,F as r,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"servicio-de-nombres",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#servicio-de-nombres","aria-hidden":"true"},"#"),s(" Servicio de nombres")],-1),m=n("h2",{id:"registro-de-nombres",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#registro-de-nombres","aria-hidden":"true"},"#"),s(" Registro de nombres")],-1),d=n("p",null,"El registro de nombres almacena informaci\xF3n sobre el nombre de dominio. esta compuesto de dos cosas:",-1),y=n("ul",null,[n("li",null,"La cabecera"),n("li",null,"Los datos")],-1),w=n("p",null,"Los datos para un nombre de dominio siempre tienen el prefijo del encabezado, a continuaci\xF3n se muestra la estructura del encabezado en JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as i,b as e,w as a,a as n,F as r,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"servicio-de-nombres",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#servicio-de-nombres","aria-hidden":"true"},"#"),s(" Servicio de nombres")],-1),m=n("h2",{id:"registro-de-nombres",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#registro-de-nombres","aria-hidden":"true"},"#"),s(" Registro de nombres")],-1),d=n("p",null,"El registro de nombres almacena informaci\xF3n sobre el nombre de dominio. esta compuesto de dos cosas:",-1),y=n("ul",null,[n("li",null,"La cabecera"),n("li",null,"Los datos")],-1),w=n("p",null,"Los datos para un nombre de dominio siempre tienen el prefijo del encabezado, a continuaci\xF3n se muestra la estructura del encabezado en JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.87ead710.js b/docs/.vuepress/dist/assets/name-service.html.72c3ec5b.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.87ead710.js rename to docs/.vuepress/dist/assets/name-service.html.72c3ec5b.js index 34877c8ed..294853039 100644 --- a/docs/.vuepress/dist/assets/name-service.html.87ead710.js +++ b/docs/.vuepress/dist/assets/name-service.html.72c3ec5b.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"\u30CD\u30FC\u30E0\u30B5\u30FC\u30D2\u3099\u30B9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30CD\u30FC\u30E0\u30B5\u30FC\u30D2\u3099\u30B9","aria-hidden":"true"},"#"),s(" \u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9")],-1),m=n("h2",{id:"\u30CD\u30FC\u30E0\u30EC\u30B7\u3099\u30B9\u30C8\u30EA",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30CD\u30FC\u30E0\u30EC\u30B7\u3099\u30B9\u30C8\u30EA","aria-hidden":"true"},"#"),s(" \u30CD\u30FC\u30E0\u30EC\u30B8\u30B9\u30C8\u30EA")],-1),d=n("p",null,"\u30CD\u30FC\u30E0 \u30EC\u30B8\u30B9\u30C8\u30EA\u306B\u306F\u3001\u30C9\u30E1\u30A4\u30F3\u540D\u306B\u95A2\u3059\u308B\u60C5\u5831\u304C\u683C\u7D0D\u3055\u308C\u3001\u4E0B\u8A18\u306E\u4E8C\u3064\u304B\u3089\u6210\u308A\u7ACB\u3061\u307E\u3059:",-1),y=n("ul",null,[n("li",null,"\u30D8\u30C3\u30C0\u30FC"),n("li",null,"\u30C7\u30FC\u30BF")],-1),w=n("p",null,"\u30C9\u30E1\u30A4\u30F3\u540D\u306E\u30C7\u30FC\u30BF\u306B\u306F\u3001\u5E38\u306B\u30D8\u30C3\u30C0\u30FC\u304C\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3068\u3057\u3066\u4ED8\u3051\u3089\u308C\u307E\u3059\u3002\u4EE5\u4E0B\u306F\u3001JS \u306E\u30D8\u30C3\u30C0\u30FC\u306E\u69CB\u9020\u3067\u3059\u3002:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"\u30CD\u30FC\u30E0\u30B5\u30FC\u30D2\u3099\u30B9",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30CD\u30FC\u30E0\u30B5\u30FC\u30D2\u3099\u30B9","aria-hidden":"true"},"#"),s(" \u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9")],-1),m=n("h2",{id:"\u30CD\u30FC\u30E0\u30EC\u30B7\u3099\u30B9\u30C8\u30EA",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30CD\u30FC\u30E0\u30EC\u30B7\u3099\u30B9\u30C8\u30EA","aria-hidden":"true"},"#"),s(" \u30CD\u30FC\u30E0\u30EC\u30B8\u30B9\u30C8\u30EA")],-1),d=n("p",null,"\u30CD\u30FC\u30E0 \u30EC\u30B8\u30B9\u30C8\u30EA\u306B\u306F\u3001\u30C9\u30E1\u30A4\u30F3\u540D\u306B\u95A2\u3059\u308B\u60C5\u5831\u304C\u683C\u7D0D\u3055\u308C\u3001\u4E0B\u8A18\u306E\u4E8C\u3064\u304B\u3089\u6210\u308A\u7ACB\u3061\u307E\u3059:",-1),y=n("ul",null,[n("li",null,"\u30D8\u30C3\u30C0\u30FC"),n("li",null,"\u30C7\u30FC\u30BF")],-1),w=n("p",null,"\u30C9\u30E1\u30A4\u30F3\u540D\u306E\u30C7\u30FC\u30BF\u306B\u306F\u3001\u5E38\u306B\u30D8\u30C3\u30C0\u30FC\u304C\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3068\u3057\u3066\u4ED8\u3051\u3089\u308C\u307E\u3059\u3002\u4EE5\u4E0B\u306F\u3001JS \u306E\u30D8\u30C3\u30C0\u30FC\u306E\u69CB\u9020\u3067\u3059\u3002:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.9126ccbb.js b/docs/.vuepress/dist/assets/name-service.html.813f0670.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.9126ccbb.js rename to docs/.vuepress/dist/assets/name-service.html.813f0670.js index 6f9a30607..b0b77ab37 100644 --- a/docs/.vuepress/dist/assets/name-service.html.9126ccbb.js +++ b/docs/.vuepress/dist/assets/name-service.html.813f0670.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"Name registry\uB294 \uB3C4\uBA54\uC778 \uC774\uB984\uC5D0 \uB300\uD55C \uC815\uBCF4\uB97C \uC800\uC7A5\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 \uB450 \uAC00\uC9C0\uB85C \uAD6C\uC131\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4:",-1),y=n("ul",null,[n("li",null,"The header"),n("li",null,"The data")],-1),w=n("p",null,"\uB3C4\uBA54\uC778 \uC774\uB984\uC744 \uC704\uD55C \uB370\uC774\uD130\uB294 \uD56D\uC0C1 header\uC758 \uC55E\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uC544\uB798\uB294 JS\uCF54\uB4DC\uB85C header \uAD6C\uC870\uCCB4\uB97C \uBCF4\uC5EC\uC90D\uB2C8\uB2E4:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"Name registry\uB294 \uB3C4\uBA54\uC778 \uC774\uB984\uC5D0 \uB300\uD55C \uC815\uBCF4\uB97C \uC800\uC7A5\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 \uB450 \uAC00\uC9C0\uB85C \uAD6C\uC131\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4:",-1),y=n("ul",null,[n("li",null,"The header"),n("li",null,"The data")],-1),w=n("p",null,"\uB3C4\uBA54\uC778 \uC774\uB984\uC744 \uC704\uD55C \uB370\uC774\uD130\uB294 \uD56D\uC0C1 header\uC758 \uC55E\uC5D0 \uBD99\uC2B5\uB2C8\uB2E4. \uC544\uB798\uB294 JS\uCF54\uB4DC\uB85C header \uAD6C\uC870\uCCB4\uB97C \uBCF4\uC5EC\uC90D\uB2C8\uB2E4:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.8945e238.js b/docs/.vuepress/dist/assets/name-service.html.8b66eeca.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.8945e238.js rename to docs/.vuepress/dist/assets/name-service.html.8b66eeca.js index 2c25a9f3f..ed5370d51 100644 --- a/docs/.vuepress/dist/assets/name-service.html.8945e238.js +++ b/docs/.vuepress/dist/assets/name-service.html.8b66eeca.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"dich-vu-ten-mien",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#dich-vu-ten-mien","aria-hidden":"true"},"#"),s(" D\u1ECBch v\u1EE5 t\xEAn mi\u1EC1n")],-1),m=n("h2",{id:"dich-vu-\u0111ang-ky-ten-mien",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#dich-vu-\u0111ang-ky-ten-mien","aria-hidden":"true"},"#"),s(" D\u1ECBch v\u1EE5 \u0111\u0103ng k\xFD t\xEAn mi\u1EC1n")],-1),d=n("p",null,"D\u1ECBch v\u1EE5 \u0111\u0103ng k\xFD t\xEAn mi\u1EC1n l\u01B0u tr\u1EEF th\xF4ng tin v\u1EC1 t\xEAn mi\u1EC1n. N\xF3 \u0111\u01B0\u1EE3c c\u1EA5u t\u1EA1o b\u1EDFi 2 ph\u1EA7n:",-1),y=n("ul",null,[n("li",null,"Ph\u1EA7n m\xE0o \u0111\u1EA7u"),n("li",null,"Ph\xE0n d\u1EEF li\u1EC7u")],-1),w=n("p",null,"D\u1EEF li\u1EC7u cho t\xEAn mi\u1EC1n l\u01B0u \u0111\u01B0\u1EE3c \u0111\u1EE9ng tr\u01B0\u1EDBc b\u1EDFi m\u1ED9t ph\u1EA7n m\xE0o \u0111\u1EA7u, b\xEAn d\u01B0\u1EDBi l\xE0 c\u1EA5u tr\xFAc c\u1EE7a ph\u1EA7n m\xE0o \u0111\u1EA7u trong JS:",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"dich-vu-ten-mien",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#dich-vu-ten-mien","aria-hidden":"true"},"#"),s(" D\u1ECBch v\u1EE5 t\xEAn mi\u1EC1n")],-1),m=n("h2",{id:"dich-vu-\u0111ang-ky-ten-mien",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#dich-vu-\u0111ang-ky-ten-mien","aria-hidden":"true"},"#"),s(" D\u1ECBch v\u1EE5 \u0111\u0103ng k\xFD t\xEAn mi\u1EC1n")],-1),d=n("p",null,"D\u1ECBch v\u1EE5 \u0111\u0103ng k\xFD t\xEAn mi\u1EC1n l\u01B0u tr\u1EEF th\xF4ng tin v\u1EC1 t\xEAn mi\u1EC1n. N\xF3 \u0111\u01B0\u1EE3c c\u1EA5u t\u1EA1o b\u1EDFi 2 ph\u1EA7n:",-1),y=n("ul",null,[n("li",null,"Ph\u1EA7n m\xE0o \u0111\u1EA7u"),n("li",null,"Ph\xE0n d\u1EEF li\u1EC7u")],-1),w=n("p",null,"D\u1EEF li\u1EC7u cho t\xEAn mi\u1EC1n l\u01B0u \u0111\u01B0\u1EE3c \u0111\u1EE9ng tr\u01B0\u1EDBc b\u1EDFi m\u1ED9t ph\u1EA7n m\xE0o \u0111\u1EA7u, b\xEAn d\u01B0\u1EDBi l\xE0 c\u1EA5u tr\xFAc c\u1EE7a ph\u1EA7n m\xE0o \u0111\u1EA7u trong JS:",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.569777a7.js b/docs/.vuepress/dist/assets/name-service.html.8e66e4bc.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.569777a7.js rename to docs/.vuepress/dist/assets/name-service.html.8e66e4bc.js index 9cc196a41..ae05c1164 100644 --- a/docs/.vuepress/dist/assets/name-service.html.569777a7.js +++ b/docs/.vuepress/dist/assets/name-service.html.8e66e4bc.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"name registry \u0E08\u0E30\u0E21\u0E35\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A domain name \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E41\u0E1A\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19 2 \u0E2A\u0E48\u0E27\u0E19\u0E04\u0E37\u0E2D:",-1),y=n("ul",null,[n("li",null,"The header"),n("li",null,"The data")],-1),w=n("p",null,"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07 domain name \u0E08\u0E30\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 header \u0E2A\u0E48\u0E27\u0E19\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D structure \u0E02\u0E2D\u0E07 header \u0E43\u0E19 JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"name registry \u0E08\u0E30\u0E21\u0E35\u0E44\u0E27\u0E49\u0E40\u0E01\u0E47\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A domain name \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E41\u0E1A\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19 2 \u0E2A\u0E48\u0E27\u0E19\u0E04\u0E37\u0E2D:",-1),y=n("ul",null,[n("li",null,"The header"),n("li",null,"The data")],-1),w=n("p",null,"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E02\u0E2D\u0E07 domain name \u0E08\u0E30\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 header \u0E2A\u0E48\u0E27\u0E19\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D structure \u0E02\u0E2D\u0E07 header \u0E43\u0E19 JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.7f713da1.js b/docs/.vuepress/dist/assets/name-service.html.91342459.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.7f713da1.js rename to docs/.vuepress/dist/assets/name-service.html.91342459.js index f530138be..213f3fad7 100644 --- a/docs/.vuepress/dist/assets/name-service.html.7f713da1.js +++ b/docs/.vuepress/dist/assets/name-service.html.91342459.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"Name registry menyimpan informasi tentang domain name. Itu terbuat dari dua hal:",-1),y=n("ul",null,[n("li",null,"Header"),n("li",null,"Data")],-1),w=n("p",null,"Data untuk suatu domain name selalu diawali oleh header, di bawah ini adalah struktur header dalam JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"Name registry menyimpan informasi tentang domain name. Itu terbuat dari dua hal:",-1),y=n("ul",null,[n("li",null,"Header"),n("li",null,"Data")],-1),w=n("p",null,"Data untuk suatu domain name selalu diawali oleh header, di bawah ini adalah struktur header dalam JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.84a68d08.js b/docs/.vuepress/dist/assets/name-service.html.9dec4983.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.84a68d08.js rename to docs/.vuepress/dist/assets/name-service.html.9dec4983.js index 9a98ef19f..079239d98 100644 --- a/docs/.vuepress/dist/assets/name-service.html.84a68d08.js +++ b/docs/.vuepress/dist/assets/name-service.html.9dec4983.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"serbisyo-ng-pangalan",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#serbisyo-ng-pangalan","aria-hidden":"true"},"#"),s(" Serbisyo ng Pangalan")],-1),m=n("h2",{id:"rehistro-ng-pangalan",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#rehistro-ng-pangalan","aria-hidden":"true"},"#"),s(" Rehistro ng pangalan")],-1),d=n("p",null,"Ang pagpapatala ng pangalan ay nag-iimbak ng impormasyon tungkol sa pangalan ng domain. Ito ay gawa sa dalawang bagay:",-1),g=n("ul",null,[n("li",null,"Ang header"),n("li",null,"Ang data")],-1),y=n("p",null,"Ang data para sa isang domain name ay palaging prefix ng header, sa ibaba ay ang istraktura ng header sa JS:",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"serbisyo-ng-pangalan",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#serbisyo-ng-pangalan","aria-hidden":"true"},"#"),s(" Serbisyo ng Pangalan")],-1),m=n("h2",{id:"rehistro-ng-pangalan",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#rehistro-ng-pangalan","aria-hidden":"true"},"#"),s(" Rehistro ng pangalan")],-1),d=n("p",null,"Ang pagpapatala ng pangalan ay nag-iimbak ng impormasyon tungkol sa pangalan ng domain. Ito ay gawa sa dalawang bagay:",-1),g=n("ul",null,[n("li",null,"Ang header"),n("li",null,"Ang data")],-1),y=n("p",null,"Ang data para sa isang domain name ay palaging prefix ng header, sa ibaba ay ang istraktura ng header sa JS:",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.ea9b0216.js b/docs/.vuepress/dist/assets/name-service.html.b0314bbe.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.ea9b0216.js rename to docs/.vuepress/dist/assets/name-service.html.b0314bbe.js index 89498ccb6..08bc2b918 100644 --- a/docs/.vuepress/dist/assets/name-service.html.ea9b0216.js +++ b/docs/.vuepress/dist/assets/name-service.html.b0314bbe.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"servico-de-nomes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#servico-de-nomes","aria-hidden":"true"},"#"),s(" Servi\xE7o de Nomes")],-1),m=n("h2",{id:"registro-de-nomes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#registro-de-nomes","aria-hidden":"true"},"#"),s(" Registro de Nomes")],-1),d=n("p",null,"O registro de nomes armazena informa\xE7\xF5es sobre o nome de dom\xEDnio. Ele \xE9 composto por duas partes:",-1),y=n("ul",null,[n("li",null,"O cabe\xE7alho (Header)"),n("li",null,"Os dados (Data)")],-1),w=n("p",null,"Os dados para um nome de dom\xEDnio sempre t\xEAm o cabe\xE7alho como prefixo. Abaixo est\xE1 a estrutura do cabe\xE7alho em JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"servico-de-nomes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#servico-de-nomes","aria-hidden":"true"},"#"),s(" Servi\xE7o de Nomes")],-1),m=n("h2",{id:"registro-de-nomes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#registro-de-nomes","aria-hidden":"true"},"#"),s(" Registro de Nomes")],-1),d=n("p",null,"O registro de nomes armazena informa\xE7\xF5es sobre o nome de dom\xEDnio. Ele \xE9 composto por duas partes:",-1),y=n("ul",null,[n("li",null,"O cabe\xE7alho (Header)"),n("li",null,"Os dados (Data)")],-1),w=n("p",null,"Os dados para um nome de dom\xEDnio sempre t\xEAm o cabe\xE7alho como prefixo. Abaixo est\xE1 a estrutura do cabe\xE7alho em JS:",-1),g=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.c487eb0f.js b/docs/.vuepress/dist/assets/name-service.html.c6a9339e.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.c487eb0f.js rename to docs/.vuepress/dist/assets/name-service.html.c6a9339e.js index e8f2965e4..4e8c1da3e 100644 --- a/docs/.vuepress/dist/assets/name-service.html.c487eb0f.js +++ b/docs/.vuepress/dist/assets/name-service.html.c6a9339e.js @@ -1,4 +1,4 @@ -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s}from"./app.07ce7a66.js";const r={},k=n("h1",{id:"\u547D\u540D\u670D\u52A1",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u547D\u540D\u670D\u52A1","aria-hidden":"true"},"#"),s(" \u547D\u540D\u670D\u52A1")],-1),b=n("h2",{id:"\u540D\u79F0\u6CE8\u518C\u8868",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u540D\u79F0\u6CE8\u518C\u8868","aria-hidden":"true"},"#"),s(" \u540D\u79F0\u6CE8\u518C\u8868")],-1),m=n("p",null,"\u540D\u79F0\u6CE8\u518C\u8868\u5B58\u50A8\u4E0E\u57DF\u540D\u6709\u5173\u7684\u4FE1\u606F\u3002\u5B83\u7531\u4E24\u90E8\u5206\u7EC4\u6210\uFF1A",-1),d=n("ul",null,[n("li",null,"\u5934\u90E8 (Header)"),n("li",null,"\u6570\u636E (Data)")],-1),y=n("p",null,"\u57DF\u540D\u7684\u6570\u636E\u59CB\u7EC8\u4EE5\u5934\u90E8\u4E3A\u524D\u7F00\u3002\u4EE5\u4E0B\u662F\u5934\u90E8\u5728 JavaScript \u4E2D\u7684\u7ED3\u6784\uFF1A",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s}from"./app.d411e3b3.js";const r={},k=n("h1",{id:"\u547D\u540D\u670D\u52A1",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u547D\u540D\u670D\u52A1","aria-hidden":"true"},"#"),s(" \u547D\u540D\u670D\u52A1")],-1),b=n("h2",{id:"\u540D\u79F0\u6CE8\u518C\u8868",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u540D\u79F0\u6CE8\u518C\u8868","aria-hidden":"true"},"#"),s(" \u540D\u79F0\u6CE8\u518C\u8868")],-1),m=n("p",null,"\u540D\u79F0\u6CE8\u518C\u8868\u5B58\u50A8\u4E0E\u57DF\u540D\u6709\u5173\u7684\u4FE1\u606F\u3002\u5B83\u7531\u4E24\u90E8\u5206\u7EC4\u6210\uFF1A",-1),d=n("ul",null,[n("li",null,"\u5934\u90E8 (Header)"),n("li",null,"\u6570\u636E (Data)")],-1),y=n("p",null,"\u57DF\u540D\u7684\u6570\u636E\u59CB\u7EC8\u4EE5\u5934\u90E8\u4E3A\u524D\u7F00\u3002\u4EE5\u4E0B\u662F\u5934\u90E8\u5728 JavaScript \u4E2D\u7684\u7ED3\u6784\uFF1A",-1),w=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.40d37cf7.js b/docs/.vuepress/dist/assets/name-service.html.f3d180f8.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.40d37cf7.js rename to docs/.vuepress/dist/assets/name-service.html.f3d180f8.js index d034e9715..b3f96bff5 100644 --- a/docs/.vuepress/dist/assets/name-service.html.40d37cf7.js +++ b/docs/.vuepress/dist/assets/name-service.html.f3d180f8.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"The name registry stores information about the domain name. It is made of two things:",-1),y=n("ul",null,[n("li",null,"The header"),n("li",null,"The data")],-1),w=n("p",null,"The data for a domain name is always prefixed by the header, below is the structure of the header in JS:",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as i,b as t,w as a,a as n,F as r,d as s}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"name-service",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-service","aria-hidden":"true"},"#"),s(" Name Service")],-1),m=n("h2",{id:"name-registry",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#name-registry","aria-hidden":"true"},"#"),s(" Name registry")],-1),d=n("p",null,"The name registry stores information about the domain name. It is made of two things:",-1),y=n("ul",null,[n("li",null,"The header"),n("li",null,"The data")],-1),w=n("p",null,"The data for a domain name is always prefixed by the header, below is the structure of the header in JS:",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" PublicKey "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Schema "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"borsh"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"export"),s(),n("span",{class:"token keyword"},"class"),s(),n("span",{class:"token class-name"},"NameRegistryState"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/name-service.html.73354d4f.js b/docs/.vuepress/dist/assets/name-service.html.f82624ec.js similarity index 99% rename from docs/.vuepress/dist/assets/name-service.html.73354d4f.js rename to docs/.vuepress/dist/assets/name-service.html.f82624ec.js index 73898cd02..cbc894df7 100644 --- a/docs/.vuepress/dist/assets/name-service.html.73354d4f.js +++ b/docs/.vuepress/dist/assets/name-service.html.f82624ec.js @@ -1,4 +1,4 @@ -import{_ as p,r as t,o,c,a as n,b as l,F as i,e as s,d as a}from"./app.07ce7a66.js";const r={},u=s(`

    Name Service (Name Servisi)

    Name registry (Name kayd\u0131)

    Name registry stores (ad kay\u0131t defteri), alan ad\u0131yla ilgili bilgileri depolar. \u0130ki \u015Feyden olu\u015Fur:

    • Ba\u015Fl\u0131k
    • Veri

    Bir alan ad\u0131n\u0131n verilerinin \xF6n\xFCne her zaman ba\u015Fl\u0131k eklenir, JS'deki ba\u015Fl\u0131\u011F\u0131n yap\u0131s\u0131 a\u015Fa\u011F\u0131dad\u0131r:

    export class NameRegistryState {
    +import{_ as p,r as t,o,c,a as n,b as l,F as i,e as s,d as a}from"./app.d411e3b3.js";const r={},u=s(`

    Name Service (Name Servisi)

    Name registry (Name kayd\u0131)

    Name registry stores (ad kay\u0131t defteri), alan ad\u0131yla ilgili bilgileri depolar. \u0130ki \u015Feyden olu\u015Fur:

    • Ba\u015Fl\u0131k
    • Veri

    Bir alan ad\u0131n\u0131n verilerinin \xF6n\xFCne her zaman ba\u015Fl\u0131k eklenir, JS'deki ba\u015Fl\u0131\u011F\u0131n yap\u0131s\u0131 a\u015Fa\u011F\u0131dad\u0131r:

    export class NameRegistryState {
       parentName: PublicKey;
       owner: PublicKey;
       class: PublicKey;
    diff --git a/docs/.vuepress/dist/assets/nfts-in-games.html.e1b77b87.js b/docs/.vuepress/dist/assets/nfts-in-games.html.4d0d92b9.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/nfts-in-games.html.e1b77b87.js
    rename to docs/.vuepress/dist/assets/nfts-in-games.html.4d0d92b9.js
    index 97627afa2..1137869cf 100644
    --- a/docs/.vuepress/dist/assets/nfts-in-games.html.e1b77b87.js
    +++ b/docs/.vuepress/dist/assets/nfts-in-games.html.4d0d92b9.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a,b as t,F as i,d as n,e as p}from"./app.07ce7a66.js";const r={},u=a("h1",{id:"nft-sa-mga-laro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#nft-sa-mga-laro","aria-hidden":"true"},"#"),n(" NFT Sa Mga Laro")],-1),k=a("p",null,"Ang mga non-fungible token (NFTs) ay mabilis na nagiging popular bilang isang paraan ng pagsasama ng Solana sa mga laro. Ang mga natatanging digital asset na ito ay naka-store sa Solana blockchain at may naka-attach na JSON metadata sa kanila. Ang metadata ay nagpapahintulot sa mga developer na mag-imbak ng mahahalagang katangian at impormasyon tungkol sa NFT, tulad bilang pambihira o partikular na mga kakayahan sa laro. Maaaring gamitin ang mga NFT sa mga laro upang kumatawan sa anumang bagay mula sa mga armas at armor sa digital real estate at collectibles, na nagbibigay ng bagong antas ng pagmamay-ari at kakulangan para sa mga manlalaro.",-1),g=a("h2",{id:"token-gating-sa-mga-nft",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#token-gating-sa-mga-nft","aria-hidden":"true"},"#"),n(" Token gating sa mga NFT")],-1),m=n("Gamit ang mga NFT, maaari mong i-gate ang access sa isang partikular na bahagi ng isang laro batay sa pagmamay-ari ng NFT. Maaari itong bumuo ng isang mas mahigpit na komunidad sa loob ng iyong laro. Sa "),d={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},b=n("js"),h=n(" gamit ang "),f={href:"https://github.com/metaplex-foundation/js#readme",target:"_blank",rel:"noopener noreferrer"},y=n("Metaplex sdk"),_=n(" gagawin nito ganito ang hitsura:"),w=p(`
    JSON.parse(
    +import{_ as e,r as o,o as c,c as l,a,b as t,F as i,d as n,e as p}from"./app.d411e3b3.js";const r={},u=a("h1",{id:"nft-sa-mga-laro",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#nft-sa-mga-laro","aria-hidden":"true"},"#"),n(" NFT Sa Mga Laro")],-1),k=a("p",null,"Ang mga non-fungible token (NFTs) ay mabilis na nagiging popular bilang isang paraan ng pagsasama ng Solana sa mga laro. Ang mga natatanging digital asset na ito ay naka-store sa Solana blockchain at may naka-attach na JSON metadata sa kanila. Ang metadata ay nagpapahintulot sa mga developer na mag-imbak ng mahahalagang katangian at impormasyon tungkol sa NFT, tulad bilang pambihira o partikular na mga kakayahan sa laro. Maaaring gamitin ang mga NFT sa mga laro upang kumatawan sa anumang bagay mula sa mga armas at armor sa digital real estate at collectibles, na nagbibigay ng bagong antas ng pagmamay-ari at kakulangan para sa mga manlalaro.",-1),g=a("h2",{id:"token-gating-sa-mga-nft",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#token-gating-sa-mga-nft","aria-hidden":"true"},"#"),n(" Token gating sa mga NFT")],-1),m=n("Gamit ang mga NFT, maaari mong i-gate ang access sa isang partikular na bahagi ng isang laro batay sa pagmamay-ari ng NFT. Maaari itong bumuo ng isang mas mahigpit na komunidad sa loob ng iyong laro. Sa "),d={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},b=n("js"),h=n(" gamit ang "),f={href:"https://github.com/metaplex-foundation/js#readme",target:"_blank",rel:"noopener noreferrer"},y=n("Metaplex sdk"),_=n(" gagawin nito ganito ang hitsura:"),w=p(`
    JSON.parse(
       // For example '.config/solana/devnet.json'
       fs.readFileSync("yourKeyPair.json").toString())
     );
    diff --git a/docs/.vuepress/dist/assets/nfts-in-games.html.46772392.js b/docs/.vuepress/dist/assets/nfts-in-games.html.d5038ca4.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/nfts-in-games.html.46772392.js
    rename to docs/.vuepress/dist/assets/nfts-in-games.html.d5038ca4.js
    index c1615fedb..991ba9010 100644
    --- a/docs/.vuepress/dist/assets/nfts-in-games.html.46772392.js
    +++ b/docs/.vuepress/dist/assets/nfts-in-games.html.d5038ca4.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as o,o as c,c as l,a as n,b as t,F as r,d as s,e}from"./app.07ce7a66.js";const i={},u=n("h1",{id:"nfts-in-games",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#nfts-in-games","aria-hidden":"true"},"#"),s(" NFTs In Games")],-1),k=n("p",null,"Non-fungible tokens (NFTs) are rapidly gaining popularity as a means of integrating Solana into games. These unique digital assets are stored on the Solana blockchain and come with a JSON metadata attached to them. The metadata allows developers to store important attributes and information about the NFT, such as its rarity or specific in-game capabilities. NFTs can be used in games to represent anything from weapons and armor to digital real estate and collectibles, providing a new level of ownership and scarcity for players.",-1),d=n("h2",{id:"token-gating-with-nfts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token-gating-with-nfts","aria-hidden":"true"},"#"),s(" Token gating with NFTs")],-1),m=s("Using NFTs, you can gate access to a particular part of a game based on owning the NFT. This can form a more tight-knit community within your game. In "),h={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},b=s("js"),f=s(" using the "),g={href:"https://github.com/metaplex-foundation/js#readme",target:"_blank",rel:"noopener noreferrer"},y=s("Metaplex sdk"),w=s(" this would look like this:"),_=e(`
    JSON.parse(
    +import{_ as p,r as o,o as c,c as l,a as n,b as t,F as r,d as s,e}from"./app.d411e3b3.js";const i={},u=n("h1",{id:"nfts-in-games",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#nfts-in-games","aria-hidden":"true"},"#"),s(" NFTs In Games")],-1),k=n("p",null,"Non-fungible tokens (NFTs) are rapidly gaining popularity as a means of integrating Solana into games. These unique digital assets are stored on the Solana blockchain and come with a JSON metadata attached to them. The metadata allows developers to store important attributes and information about the NFT, such as its rarity or specific in-game capabilities. NFTs can be used in games to represent anything from weapons and armor to digital real estate and collectibles, providing a new level of ownership and scarcity for players.",-1),d=n("h2",{id:"token-gating-with-nfts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token-gating-with-nfts","aria-hidden":"true"},"#"),s(" Token gating with NFTs")],-1),m=s("Using NFTs, you can gate access to a particular part of a game based on owning the NFT. This can form a more tight-knit community within your game. In "),h={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},b=s("js"),f=s(" using the "),g={href:"https://github.com/metaplex-foundation/js#readme",target:"_blank",rel:"noopener noreferrer"},y=s("Metaplex sdk"),w=s(" this would look like this:"),_=e(`
    JSON.parse(
       // For example '.config/solana/devnet.json'
       fs.readFileSync("yourKeyPair.json").toString())
     );
    diff --git a/docs/.vuepress/dist/assets/nfts-in-games.html.2b65cbf5.js b/docs/.vuepress/dist/assets/nfts-in-games.html.e55ae003.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/nfts-in-games.html.2b65cbf5.js
    rename to docs/.vuepress/dist/assets/nfts-in-games.html.e55ae003.js
    index 8bd71259f..12e763761 100644
    --- a/docs/.vuepress/dist/assets/nfts-in-games.html.2b65cbf5.js
    +++ b/docs/.vuepress/dist/assets/nfts-in-games.html.e55ae003.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as o,o as c,c as u,a as n,b as e,F as l,d as s,e as t}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"les-nfts-dans-les-jeux",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#les-nfts-dans-les-jeux","aria-hidden":"true"},"#"),s(" Les NFTs dans les jeux")],-1),k=n("p",null,"Les jetons non fongibles (NFT) deviennent rapidement populaires en tant que moyen d'int\xE9grer Solana dans les jeux. Ces actifs num\xE9riques uniques sont stock\xE9s sur la blockchain Solana et sont accompagn\xE9s de m\xE9tadonn\xE9es JSON. Les m\xE9tadonn\xE9es permettent aux d\xE9veloppeurs de stocker des attributs et des informations importants sur le NFT, tels que sa raret\xE9 ou ses caract\xE9ristiques sp\xE9cifiques dans le jeu. Les NFTs peuvent \xEAtre utilis\xE9s dans les jeux pour repr\xE9senter n'importe quoi, des armes et armures aux biens immobiliers num\xE9riques et aux objets de collection, offrant ainsi aux joueurs un nouveau niveau de propri\xE9t\xE9 et de raret\xE9.",-1),d=n("h2",{id:"token-gating-avec-des-nfts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token-gating-avec-des-nfts","aria-hidden":"true"},"#"),s(" Token gating avec des NFTs")],-1),m=s("Gr\xE2ce aux NFTs, vous pouvez autoriser l'acc\xE8s \xE0 une certaine partie d'un jeu en fonction de la possession d'un NFT. Cela permet de cr\xE9er une communaut\xE9 plus soud\xE9e au sein de votre jeu. En "),b={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},f=s("JS"),h=s(" et en utilisant le "),g={href:"https://github.com/metaplex-foundation/js#readme",target:"_blank",rel:"noopener noreferrer"},y=s("SDK de Metaplex"),_=s(", cela ressemblerait \xE0 ceci :"),v=t(`
    JSON.parse(
    +import{_ as p,r as o,o as c,c as u,a as n,b as e,F as l,d as s,e as t}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"les-nfts-dans-les-jeux",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#les-nfts-dans-les-jeux","aria-hidden":"true"},"#"),s(" Les NFTs dans les jeux")],-1),k=n("p",null,"Les jetons non fongibles (NFT) deviennent rapidement populaires en tant que moyen d'int\xE9grer Solana dans les jeux. Ces actifs num\xE9riques uniques sont stock\xE9s sur la blockchain Solana et sont accompagn\xE9s de m\xE9tadonn\xE9es JSON. Les m\xE9tadonn\xE9es permettent aux d\xE9veloppeurs de stocker des attributs et des informations importants sur le NFT, tels que sa raret\xE9 ou ses caract\xE9ristiques sp\xE9cifiques dans le jeu. Les NFTs peuvent \xEAtre utilis\xE9s dans les jeux pour repr\xE9senter n'importe quoi, des armes et armures aux biens immobiliers num\xE9riques et aux objets de collection, offrant ainsi aux joueurs un nouveau niveau de propri\xE9t\xE9 et de raret\xE9.",-1),d=n("h2",{id:"token-gating-avec-des-nfts",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token-gating-avec-des-nfts","aria-hidden":"true"},"#"),s(" Token gating avec des NFTs")],-1),m=s("Gr\xE2ce aux NFTs, vous pouvez autoriser l'acc\xE8s \xE0 une certaine partie d'un jeu en fonction de la possession d'un NFT. Cela permet de cr\xE9er une communaut\xE9 plus soud\xE9e au sein de votre jeu. En "),b={href:"https://docs.solana.com/de/developing/clients/javascript-api",target:"_blank",rel:"noopener noreferrer"},f=s("JS"),h=s(" et en utilisant le "),g={href:"https://github.com/metaplex-foundation/js#readme",target:"_blank",rel:"noopener noreferrer"},y=s("SDK de Metaplex"),_=s(", cela ressemblerait \xE0 ceci :"),v=t(`
    JSON.parse(
       // For example '.config/solana/devnet.json'
       fs.readFileSync("yourKeyPair.json").toString())
     );
    diff --git a/docs/.vuepress/dist/assets/nfts.html.d9599439.js b/docs/.vuepress/dist/assets/nfts.html.0c0cb140.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/nfts.html.d9599439.js
    rename to docs/.vuepress/dist/assets/nfts.html.0c0cb140.js
    index c63af2027..a6c6dd80f 100644
    --- a/docs/.vuepress/dist/assets/nfts.html.d9599439.js
    +++ b/docs/.vuepress/dist/assets/nfts.html.0c0cb140.js
    @@ -1,4 +1,4 @@
    -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Nicht fungible Tokens (NFTs)

    So erstellen Sie eine NFT

    Um eine NFT zu erstellen, m\xFCssen Sie:

    1. Laden Sie das Bild zu Arweave oder IPFS hoch
    2. Laden Sie die json-Metadaten zu Arweave oder IPFS hoch
    3. Rufen Sie metaplex auf, um ein Konto f\xFCr das NFT zu erstellen

    Upload zu Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Nicht fungible Tokens (NFTs)

    So erstellen Sie eine NFT

    Um eine NFT zu erstellen, m\xFCssen Sie:

    1. Laden Sie das Bild zu Arweave oder IPFS hoch
    2. Laden Sie die json-Metadaten zu Arweave oder IPFS hoch
    3. Rufen Sie metaplex auf, um ein Konto f\xFCr das NFT zu erstellen

    Upload zu Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.3a4dc806.js b/docs/.vuepress/dist/assets/nfts.html.1976c787.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.3a4dc806.js rename to docs/.vuepress/dist/assets/nfts.html.1976c787.js index 2a0c89969..8682cfbe8 100644 --- a/docs/.vuepress/dist/assets/nfts.html.3a4dc806.js +++ b/docs/.vuepress/dist/assets/nfts.html.1976c787.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t NFT

    \u0110\u1EC3 t\u1EA1o m\u1ED9t NFT b\u1EA1n ph\u1EA3i:

    1. \u0110\u0103ng t\u1EA3i \u1EA3nh l\xEAn IPFS v\xED nh\u01B0 Arweave
    2. \u0110\u0103ng t\u1EA3i json metadata l\xEAn IPFS v\xED nh\u01B0 Arweave
    3. G\u1ECDi metaplex \u0111\u1EC3 t\u1EA1o m\u1ED9t account cho NFT

    \u0110\u0103ng t\u1EA3i l\xEAn Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t NFT

    \u0110\u1EC3 t\u1EA1o m\u1ED9t NFT b\u1EA1n ph\u1EA3i:

    1. \u0110\u0103ng t\u1EA3i \u1EA3nh l\xEAn IPFS v\xED nh\u01B0 Arweave
    2. \u0110\u0103ng t\u1EA3i json metadata l\xEAn IPFS v\xED nh\u01B0 Arweave
    3. G\u1ECDi metaplex \u0111\u1EC3 t\u1EA1o m\u1ED9t account cho NFT

    \u0110\u0103ng t\u1EA3i l\xEAn Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.8062119a.js b/docs/.vuepress/dist/assets/nfts.html.1ad11441.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.8062119a.js rename to docs/.vuepress/dist/assets/nfts.html.1ad11441.js index c95e4970d..25044ab6a 100644 --- a/docs/.vuepress/dist/assets/nfts.html.8062119a.js +++ b/docs/.vuepress/dist/assets/nfts.html.1ad11441.js @@ -1,4 +1,4 @@ -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Tokens N\xE3o Fung\xEDveis (NFTs)

    Como criar um NFT

    Para criar um NFT, voc\xEA deve:

    1. Carregar a imagem para o IPFS, especificamente na plataforma Arweave;
    2. Carregar os metadados JSON para o IPFS, especificamente na plataforma Arweave;
    3. Chamar o Metaplex para criar uma conta para o NFT.

    Carregar para o Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Tokens N\xE3o Fung\xEDveis (NFTs)

    Como criar um NFT

    Para criar um NFT, voc\xEA deve:

    1. Carregar a imagem para o IPFS, especificamente na plataforma Arweave;
    2. Carregar os metadados JSON para o IPFS, especificamente na plataforma Arweave;
    3. Chamar o Metaplex para criar uma conta para o NFT.

    Carregar para o Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.0870f8d4.js b/docs/.vuepress/dist/assets/nfts.html.2e49b605.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.0870f8d4.js rename to docs/.vuepress/dist/assets/nfts.html.2e49b605.js index 88d0c0046..430273deb 100644 --- a/docs/.vuepress/dist/assets/nfts.html.0870f8d4.js +++ b/docs/.vuepress/dist/assets/nfts.html.2e49b605.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Non Fungible Token (NFT)

    Cara membuat NFT

    Untuk Membuat Sebuah NFT Kamu Harus:

    1. Upload gambar ke IPFS seperti Arweave
    2. Upload metadata json ke IPFS seperti Arweave
    3. Call metaplex untuk membuat sebuah account untuk NFT

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Non Fungible Token (NFT)

    Cara membuat NFT

    Untuk Membuat Sebuah NFT Kamu Harus:

    1. Upload gambar ke IPFS seperti Arweave
    2. Upload metadata json ke IPFS seperti Arweave
    3. Call metaplex untuk membuat sebuah account untuk NFT

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.73b95415.js b/docs/.vuepress/dist/assets/nfts.html.3c31ce39.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.73b95415.js rename to docs/.vuepress/dist/assets/nfts.html.3c31ce39.js index 3ab2b525b..89f7d0c93 100644 --- a/docs/.vuepress/dist/assets/nfts.html.73b95415.js +++ b/docs/.vuepress/dist/assets/nfts.html.3c31ce39.js @@ -1,4 +1,4 @@ -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    \u975E\u4EE3\u66FF\u6027\u30C8\u30FC\u30AF\u30F3(NFT)

    NFT \u306E\u4F5C\u6210\u65B9\u6CD5

    NFT \u3092\u4F5C\u6210\u3059\u308B\u306B\u306F\u3001\u6B21\u306E\u3053\u3068\u3092\u884C\u3046\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059:

    1. Arweave \u306E\u3088\u3046\u306AIPFS\u306B\u753B\u50CF\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9
    2. json\u30E1\u30BF\u30C7\u30FC\u30BF\u3092Arweave\u306A\u3069\u306EIPFS\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9
    3. metaplex\u3092\u547C\u3073\u51FA\u3057\u3066NFT\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210

    Arweave\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    \u975E\u4EE3\u66FF\u6027\u30C8\u30FC\u30AF\u30F3(NFT)

    NFT \u306E\u4F5C\u6210\u65B9\u6CD5

    NFT \u3092\u4F5C\u6210\u3059\u308B\u306B\u306F\u3001\u6B21\u306E\u3053\u3068\u3092\u884C\u3046\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059:

    1. Arweave \u306E\u3088\u3046\u306AIPFS\u306B\u753B\u50CF\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9
    2. json\u30E1\u30BF\u30C7\u30FC\u30BF\u3092Arweave\u306A\u3069\u306EIPFS\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9
    3. metaplex\u3092\u547C\u3073\u51FA\u3057\u3066NFT\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u4F5C\u6210

    Arweave\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.75a819e1.js b/docs/.vuepress/dist/assets/nfts.html.61a0212c.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.75a819e1.js rename to docs/.vuepress/dist/assets/nfts.html.61a0212c.js index 1d7315237..355012e20 100644 --- a/docs/.vuepress/dist/assets/nfts.html.75a819e1.js +++ b/docs/.vuepress/dist/assets/nfts.html.61a0212c.js @@ -1,4 +1,4 @@ -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Non Fungible Token (NFTs)

    Paano lumikha ng isang NFT

    Upang lumikha ng isang NFT kailangan mong:

    1. I-upload ang larawan sa IPFS tulad ng Arweave
    2. I-upload ang json metadata sa IPFS tulad ng Arweave
    3. Tumawag sa metaplex para gumawa ng account para sa NFT

    I-upload sa Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Non Fungible Token (NFTs)

    Paano lumikha ng isang NFT

    Upang lumikha ng isang NFT kailangan mong:

    1. I-upload ang larawan sa IPFS tulad ng Arweave
    2. I-upload ang json metadata sa IPFS tulad ng Arweave
    3. Tumawag sa metaplex para gumawa ng account para sa NFT

    I-upload sa Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.1e42ca51.js b/docs/.vuepress/dist/assets/nfts.html.6c227031.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.1e42ca51.js rename to docs/.vuepress/dist/assets/nfts.html.6c227031.js index feb587cbf..d709cb477 100644 --- a/docs/.vuepress/dist/assets/nfts.html.1e42ca51.js +++ b/docs/.vuepress/dist/assets/nfts.html.6c227031.js @@ -1,4 +1,4 @@ -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    \u975E\u540C\u8CEA\u5316\u4EE3\u5E63 (NFTs)

    \u5982\u4F55\u5275\u5EFA\u4E00\u500BNFT

    \u8981\u5275\u5EFA\u4E00\u500B NFT\uFF0C\u4F60\u9700\u8981\uFF1A

    1. \u5C07\u5716\u50CF\u4E0A\u50B3\u5230\u50CF Arweave \u9019\u6A23\u7684 IPFS \u7DB2\u7D61\u4E0A\u3002
    2. \u5C07 JSON \u5143\u6578\u64DA\u4E0A\u50B3\u5230\u50CF Arweave \u9019\u6A23\u7684 IPFS \u7DB2\u7D61\u4E0A\u3002
    3. \u8ABF\u7528 Metaplex \u5275\u5EFA\u4E00\u500B\u7528\u65BC\u8A72 NFT \u7684\u8CEC\u6236\u3002

    \u4E0A\u50B3\u5230 Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    \u975E\u540C\u8CEA\u5316\u4EE3\u5E63 (NFTs)

    \u5982\u4F55\u5275\u5EFA\u4E00\u500BNFT

    \u8981\u5275\u5EFA\u4E00\u500B NFT\uFF0C\u4F60\u9700\u8981\uFF1A

    1. \u5C07\u5716\u50CF\u4E0A\u50B3\u5230\u50CF Arweave \u9019\u6A23\u7684 IPFS \u7DB2\u7D61\u4E0A\u3002
    2. \u5C07 JSON \u5143\u6578\u64DA\u4E0A\u50B3\u5230\u50CF Arweave \u9019\u6A23\u7684 IPFS \u7DB2\u7D61\u4E0A\u3002
    3. \u8ABF\u7528 Metaplex \u5275\u5EFA\u4E00\u500B\u7528\u65BC\u8A72 NFT \u7684\u8CEC\u6236\u3002

    \u4E0A\u50B3\u5230 Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.93f43d02.js b/docs/.vuepress/dist/assets/nfts.html.78d4bd36.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.93f43d02.js rename to docs/.vuepress/dist/assets/nfts.html.78d4bd36.js index 09dd4f2f9..fb1dea528 100644 --- a/docs/.vuepress/dist/assets/nfts.html.93f43d02.js +++ b/docs/.vuepress/dist/assets/nfts.html.78d4bd36.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    How to create an NFT

    NFT\uB97C \uB9CC\uB4E4\uAE30 \uC704\uD574 \uB2F9\uC2E0\uC774 \uD574\uC57C \uD558\uB294 \uAC83:

    1. Arweave\uC640 \uAC19\uC740 IPFS\uC5D0 \uC774\uBBF8\uC9C0\uB97C \uC5C5\uB85C\uB2E4\uD569\uB2C8\uB2E4.
    2. Arweave\uC640 \uAC19\uC740 IPFS\uC5D0 json \uBA54\uD0C0\uB370\uC774\uD130\uB97C \uC5C5\uB85C\uB4DC\uD569\uB2C8\uB2E4.
    3. NFT\uB97C \uC704\uD55C Account\uB97C \uC0DD\uC131\uD558\uAE30 \uC704\uD574 metaplex\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4.

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    How to create an NFT

    NFT\uB97C \uB9CC\uB4E4\uAE30 \uC704\uD574 \uB2F9\uC2E0\uC774 \uD574\uC57C \uD558\uB294 \uAC83:

    1. Arweave\uC640 \uAC19\uC740 IPFS\uC5D0 \uC774\uBBF8\uC9C0\uB97C \uC5C5\uB85C\uB2E4\uD569\uB2C8\uB2E4.
    2. Arweave\uC640 \uAC19\uC740 IPFS\uC5D0 json \uBA54\uD0C0\uB370\uC774\uD130\uB97C \uC5C5\uB85C\uB4DC\uD569\uB2C8\uB2E4.
    3. NFT\uB97C \uC704\uD55C Account\uB97C \uC0DD\uC131\uD558\uAE30 \uC704\uD574 metaplex\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4.

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.cb306959.js b/docs/.vuepress/dist/assets/nfts.html.a54e18bd.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.cb306959.js rename to docs/.vuepress/dist/assets/nfts.html.a54e18bd.js index 053beb684..12e47629b 100644 --- a/docs/.vuepress/dist/assets/nfts.html.cb306959.js +++ b/docs/.vuepress/dist/assets/nfts.html.a54e18bd.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 an NFT

    \u0E43\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 NFT \u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07:

    1. Upload \u0E23\u0E39\u0E1B (image) \u200B\u0E44\u0E1B\u0E17\u0E35\u0E48 IPFS \u0E40\u0E0A\u0E48\u0E19 Arweave
    2. Upload json metadata \u0E44\u0E1B\u0E17\u0E35\u0E48 IPFS \u0E40\u0E0A\u0E48\u0E19 Arweave
    3. \u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 metaplex \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07 account \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A NFT

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 an NFT

    \u0E43\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 NFT \u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07:

    1. Upload \u0E23\u0E39\u0E1B (image) \u200B\u0E44\u0E1B\u0E17\u0E35\u0E48 IPFS \u0E40\u0E0A\u0E48\u0E19 Arweave
    2. Upload json metadata \u0E44\u0E1B\u0E17\u0E35\u0E48 IPFS \u0E40\u0E0A\u0E48\u0E19 Arweave
    3. \u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 metaplex \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E2A\u0E23\u0E49\u0E32\u0E07 account \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A NFT

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.6cf05cb7.js b/docs/.vuepress/dist/assets/nfts.html.bc8395bd.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.6cf05cb7.js rename to docs/.vuepress/dist/assets/nfts.html.bc8395bd.js index 9684138bb..ef10ae3bf 100644 --- a/docs/.vuepress/dist/assets/nfts.html.6cf05cb7.js +++ b/docs/.vuepress/dist/assets/nfts.html.bc8395bd.js @@ -1,4 +1,4 @@ -import{_ as u,r as c,o as r,c as i,b as t,w as a,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";const b={},m=p('

    Jetons Non Fongibles (NFTs)

    Comment cr\xE9er un NFT

    Pour cr\xE9er un NFT, vous devez :

    1. T\xE9l\xE9charger l'image sur IPFS comme Arweave
    2. T\xE9l\xE9charger les m\xE9tadonn\xE9es json sur IPFS comme Arweave
    3. Appeler metaplex pour cr\xE9er un compte pour le NFT

    T\xE9l\xE9charger sur Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as u,r as c,o as r,c as i,b as t,w as a,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";const b={},m=p('

    Jetons Non Fongibles (NFTs)

    Comment cr\xE9er un NFT

    Pour cr\xE9er un NFT, vous devez :

    1. T\xE9l\xE9charger l'image sur IPFS comme Arweave
    2. T\xE9l\xE9charger les m\xE9tadonn\xE9es json sur IPFS comme Arweave
    3. Appeler metaplex pour cr\xE9er un compte pour le NFT

    T\xE9l\xE9charger sur Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.06449cbe.js b/docs/.vuepress/dist/assets/nfts.html.ca44adf3.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.06449cbe.js rename to docs/.vuepress/dist/assets/nfts.html.ca44adf3.js index eff950754..967fa04f2 100644 --- a/docs/.vuepress/dist/assets/nfts.html.06449cbe.js +++ b/docs/.vuepress/dist/assets/nfts.html.ca44adf3.js @@ -1,4 +1,4 @@ -import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Tokens no fungibles (NFTs)

    \xBFC\xF3mo crear un NFT?

    Para crear un NFT tu tienes que:

    1. Subir la imagen a IPFS como Arweave
    2. Subir los metadatos en json a IPFS como Arweave
    3. Llamar a metaplex para crear la cuenta para el NFT

    Subir a Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as c,o as u,c as r,b as t,w as a,a as n,F as i,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Tokens no fungibles (NFTs)

    \xBFC\xF3mo crear un NFT?

    Para crear un NFT tu tienes que:

    1. Subir la imagen a IPFS como Arweave
    2. Subir los metadatos en json a IPFS como Arweave
    3. Llamar a metaplex para crear la cuenta para el NFT

    Subir a Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.88b22980.js b/docs/.vuepress/dist/assets/nfts.html.e4e4c010.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.88b22980.js rename to docs/.vuepress/dist/assets/nfts.html.e4e4c010.js index 50c4b7448..6085c7be2 100644 --- a/docs/.vuepress/dist/assets/nfts.html.88b22980.js +++ b/docs/.vuepress/dist/assets/nfts.html.e4e4c010.js @@ -1,4 +1,4 @@ -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    \u975E\u540C\u8D28\u5316\u4EE3\u5E01 (NFTs)

    \u5982\u4F55\u521B\u5EFA\u4E00\u4E2ANFT

    \u8981\u521B\u5EFA\u4E00\u4E2A NFT\uFF0C\u4F60\u9700\u8981\uFF1A

    1. \u5C06\u56FE\u50CF\u4E0A\u4F20\u5230\u50CF Arweave \u8FD9\u6837\u7684 IPFS \u7F51\u7EDC\u4E0A\u3002
    2. \u5C06 JSON \u5143\u6570\u636E\u4E0A\u4F20\u5230\u50CF Arweave \u8FD9\u6837\u7684 IPFS \u7F51\u7EDC\u4E0A\u3002
    3. \u8C03\u7528 Metaplex \u521B\u5EFA\u4E00\u4E2A\u7528\u4E8E\u8BE5 NFT \u7684\u8D26\u6237\u3002

    \u4E0A\u4F20\u5230 Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    \u975E\u540C\u8D28\u5316\u4EE3\u5E01 (NFTs)

    \u5982\u4F55\u521B\u5EFA\u4E00\u4E2ANFT

    \u8981\u521B\u5EFA\u4E00\u4E2A NFT\uFF0C\u4F60\u9700\u8981\uFF1A

    1. \u5C06\u56FE\u50CF\u4E0A\u4F20\u5230\u50CF Arweave \u8FD9\u6837\u7684 IPFS \u7F51\u7EDC\u4E0A\u3002
    2. \u5C06 JSON \u5143\u6570\u636E\u4E0A\u4F20\u5230\u50CF Arweave \u8FD9\u6837\u7684 IPFS \u7F51\u7EDC\u4E0A\u3002
    3. \u8C03\u7528 Metaplex \u521B\u5EFA\u4E00\u4E2A\u7528\u4E8E\u8BE5 NFT \u7684\u8D26\u6237\u3002

    \u4E0A\u4F20\u5230 Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.4488b5bf.js b/docs/.vuepress/dist/assets/nfts.html.f6b5f79a.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.4488b5bf.js rename to docs/.vuepress/dist/assets/nfts.html.f6b5f79a.js index d8466d45f..64cadd1f6 100644 --- a/docs/.vuepress/dist/assets/nfts.html.4488b5bf.js +++ b/docs/.vuepress/dist/assets/nfts.html.f6b5f79a.js @@ -1,4 +1,4 @@ -import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.07ce7a66.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    How to create an NFT

    To create an NFT you have to:

    1. Upload the image to IPFS like Arweave
    2. Upload the json metadata to IPFS like Arweave
    3. Call metaplex to create an account for the NFT

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as l,r as p,o as u,c as i,b as t,w as a,a as n,F as r,e as k,d as s}from"./app.d411e3b3.js";const b={},m=k('

    Non Fungible Tokens (NFTs)

    How to create an NFT

    To create an NFT you have to:

    1. Upload the image to IPFS like Arweave
    2. Upload the json metadata to IPFS like Arweave
    3. Call metaplex to create an account for the NFT

    Upload to Arweave

    ',5),d=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(" fs "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"fs"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"import"),s(" Arweave "),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"arweave"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` diff --git a/docs/.vuepress/dist/assets/nfts.html.f3815a10.js b/docs/.vuepress/dist/assets/nfts.html.f888c16f.js similarity index 99% rename from docs/.vuepress/dist/assets/nfts.html.f3815a10.js rename to docs/.vuepress/dist/assets/nfts.html.f888c16f.js index 3367df684..52110296e 100644 --- a/docs/.vuepress/dist/assets/nfts.html.f3815a10.js +++ b/docs/.vuepress/dist/assets/nfts.html.f888c16f.js @@ -1,4 +1,4 @@ -import{_ as p,r as e,o,c,a as n,b as l,F as i,e as a,d as s}from"./app.07ce7a66.js";const u={},r=a(`

    Non Fungible Tokens (NFTs)

    How to create an NFT (NFT olu\u015Fturma)

    Bir NFT olu\u015Fturmak i\xE7in yapman\u0131z gerekenler:

    1. Resmi bir IPFS'e y\xFCkleyin (Arweave gibi)
    2. Json meta verilerini IPFS'ye y\xFCkleyin (Arweave gibi)
    3. NFT i\xE7in bir account olu\u015Fturmak \xFCzere metaplex'i \xE7a\u011F\u0131r\u0131n (call)

    Upload to Arweave (Arwave\u2019e y\xFCkleme)

    // 1. Upload image to Arweave
    +import{_ as p,r as e,o,c,a as n,b as l,F as i,e as a,d as s}from"./app.d411e3b3.js";const u={},r=a(`

    Non Fungible Tokens (NFTs)

    How to create an NFT (NFT olu\u015Fturma)

    Bir NFT olu\u015Fturmak i\xE7in yapman\u0131z gerekenler:

    1. Resmi bir IPFS'e y\xFCkleyin (Arweave gibi)
    2. Json meta verilerini IPFS'ye y\xFCkleyin (Arweave gibi)
    3. NFT i\xE7in bir account olu\u015Fturmak \xFCzere metaplex'i \xE7a\u011F\u0131r\u0131n (call)

    Upload to Arweave (Arwave\u2019e y\xFCkleme)

    // 1. Upload image to Arweave
     const data = fs.readFileSync("./code/nfts/arweave-upload/lowres-dog.png");
     
     const transaction = await arweave.createTransaction({
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.6bb56d3c.js b/docs/.vuepress/dist/assets/offline-transactions.html.0827c37c.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.6bb56d3c.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.0827c37c.js
    index 258f171f7..a60ab25c8 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.6bb56d3c.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.0827c37c.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"transactions-hors-connexion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transactions-hors-connexion","aria-hidden":"true"},"#"),s(" Transactions hors connexion")],-1),m=n("h2",{id:"signer-la-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#signer-la-transaction","aria-hidden":"true"},"#"),s(" Signer la Transaction")],-1),d=n("p",null,"Pour cr\xE9er une transaction hors connexion, vous devez signer la transaction, puis n'importe qui peut la diffuser sur le r\xE9seau.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"transactions-hors-connexion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transactions-hors-connexion","aria-hidden":"true"},"#"),s(" Transactions hors connexion")],-1),m=n("h2",{id:"signer-la-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#signer-la-transaction","aria-hidden":"true"},"#"),s(" Signer la Transaction")],-1),d=n("p",null,"Pour cr\xE9er une transaction hors connexion, vous devez signer la transaction, puis n'importe qui peut la diffuser sur le r\xE9seau.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.a7cb4369.js b/docs/.vuepress/dist/assets/offline-transactions.html.08d142d8.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.a7cb4369.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.08d142d8.js
    index 2c18d00b9..0f62c63f1 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.a7cb4369.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.08d142d8.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"transaction-ngoai-tuyen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaction-ngoai-tuyen","aria-hidden":"true"},"#"),s(" Transaction Ngo\u1EA1i tuy\u1EBFn")],-1),m=n("h2",{id:"ky-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ky-transaction","aria-hidden":"true"},"#"),s(" K\xFD Transaction")],-1),d=n("p",null,"\u0110\u1EC3 t\u1EA1o m\u1ED9t transaction ngo\u1EA1i tuy\u1EBFn, b\u1EA1n ph\u1EA3i k\xFD l\xEAn transaction v\xE0 sau \u0111\xF3 b\u1EA5t k\u1EF3 ai \u0111\u1EC1u c\xF3 th\u1EC3 g\u1EEDi transaction \u0111\xF3 l\xEAn tr\xEAn m\u1EA1ng l\u01B0\u1EDBi.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"transaction-ngoai-tuyen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaction-ngoai-tuyen","aria-hidden":"true"},"#"),s(" Transaction Ngo\u1EA1i tuy\u1EBFn")],-1),m=n("h2",{id:"ky-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ky-transaction","aria-hidden":"true"},"#"),s(" K\xFD Transaction")],-1),d=n("p",null,"\u0110\u1EC3 t\u1EA1o m\u1ED9t transaction ngo\u1EA1i tuy\u1EBFn, b\u1EA1n ph\u1EA3i k\xFD l\xEAn transaction v\xE0 sau \u0111\xF3 b\u1EA5t k\u1EF3 ai \u0111\u1EC1u c\xF3 th\u1EC3 g\u1EEDi transaction \u0111\xF3 l\xEAn tr\xEAn m\u1EA1ng l\u01B0\u1EDBi.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.d0d3f6bf.js b/docs/.vuepress/dist/assets/offline-transactions.html.3661f39c.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.d0d3f6bf.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.3661f39c.js
    index 8c97f971a..2dd62b09b 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.d0d3f6bf.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.3661f39c.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3","aria-hidden":"true"},"#"),s(" \u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3")],-1),m=n("h2",{id:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D","aria-hidden":"true"},"#"),s(" \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D")],-1),d=n("p",null,"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u4F5C\u6210\u3059\u308B\u306B\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u7F72\u540D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u306E\u5F8C\u3001\u8AB0\u3067\u3082\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u4E0A\u3067\u30D6\u30ED\u30FC\u30C9\u30AD\u30E3\u30B9\u30C8\u3067\u304D\u307E\u3059\u3002",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3","aria-hidden":"true"},"#"),s(" \u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3")],-1),m=n("h2",{id:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D","aria-hidden":"true"},"#"),s(" \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u7F72\u540D")],-1),d=n("p",null,"\u30AA\u30D5\u30E9\u30A4\u30F3\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u4F5C\u6210\u3059\u308B\u306B\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u7F72\u540D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305D\u306E\u5F8C\u3001\u8AB0\u3067\u3082\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u4E0A\u3067\u30D6\u30ED\u30FC\u30C9\u30AD\u30E3\u30B9\u30C8\u3067\u304D\u307E\u3059\u3002",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.1cebdb75.js b/docs/.vuepress/dist/assets/offline-transactions.html.43fa2f34.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.1cebdb75.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.43fa2f34.js
    index 8e1efcfdc..f81d1b98f 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.1cebdb75.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.43fa2f34.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"offline-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaction","aria-hidden":"true"},"#"),s(" Offline Transaction")],-1),m=n("h2",{id:"sign-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaction","aria-hidden":"true"},"#"),s(" Sign Transaction")],-1),d=n("p",null,"\uC624\uD504\uB77C\uC778 Transaction\uC744 \uC0DD\uC131\uD558\uAE30 \uC704\uD574\uC11C, \uB2F9\uC2E0\uC740 Transaction\uC5D0 \uC11C\uBA85\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB7EC\uBA74 \uB204\uAD6C\uB4E0 \uC774\uAC83\uC744 network\uC5D0 \uBE0C\uB85C\uB4DC\uCE90\uC2A4\uD305\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"offline-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaction","aria-hidden":"true"},"#"),s(" Offline Transaction")],-1),m=n("h2",{id:"sign-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaction","aria-hidden":"true"},"#"),s(" Sign Transaction")],-1),d=n("p",null,"\uC624\uD504\uB77C\uC778 Transaction\uC744 \uC0DD\uC131\uD558\uAE30 \uC704\uD574\uC11C, \uB2F9\uC2E0\uC740 Transaction\uC5D0 \uC11C\uBA85\uD574\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB7EC\uBA74 \uB204\uAD6C\uB4E0 \uC774\uAC83\uC744 network\uC5D0 \uBE0C\uB85C\uB4DC\uCE90\uC2A4\uD305\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.26de122f.js b/docs/.vuepress/dist/assets/offline-transactions.html.467fd989.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.26de122f.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.467fd989.js
    index 5369114ea..a23b22898 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.26de122f.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.467fd989.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"offline-transaktion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaktion","aria-hidden":"true"},"#"),s(" Offline-Transaktion")],-1),m=n("h2",{id:"transaktion-unterzeichnen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaktion-unterzeichnen","aria-hidden":"true"},"#"),s(" Transaktion unterzeichnen")],-1),d=n("p",null,"Um eine Offline-Transaktion zu erstellen, m\xFCssen Sie die Transaktion signieren und dann kann jeder es im Netzwerk \xFCbertragen.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"offline-transaktion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaktion","aria-hidden":"true"},"#"),s(" Offline-Transaktion")],-1),m=n("h2",{id:"transaktion-unterzeichnen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaktion-unterzeichnen","aria-hidden":"true"},"#"),s(" Transaktion unterzeichnen")],-1),d=n("p",null,"Um eine Offline-Transaktion zu erstellen, m\xFCssen Sie die Transaktion signieren und dann kann jeder es im Netzwerk \xFCbertragen.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.411f2083.js b/docs/.vuepress/dist/assets/offline-transactions.html.7895faf9.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.411f2083.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.7895faf9.js
    index 651a9989c..7187ce1ec 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.411f2083.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.7895faf9.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"offline-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaction","aria-hidden":"true"},"#"),s(" Offline Transaction")],-1),m=n("h2",{id:"sign-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaction","aria-hidden":"true"},"#"),s(" Sign Transaction")],-1),d=n("p",null,"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 offline transaction \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign transaction \u0E41\u0E25\u0E30\u0E43\u0E2B\u0E49\u0E04\u0E19\u0E2D\u0E37\u0E48\u0E19 broadcast \u0E44\u0E1B\u0E17\u0E35\u0E48 network \u0E44\u0E14\u0E49",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"offline-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaction","aria-hidden":"true"},"#"),s(" Offline Transaction")],-1),m=n("h2",{id:"sign-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaction","aria-hidden":"true"},"#"),s(" Sign Transaction")],-1),d=n("p",null,"\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 offline transaction \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign transaction \u0E41\u0E25\u0E30\u0E43\u0E2B\u0E49\u0E04\u0E19\u0E2D\u0E37\u0E48\u0E19 broadcast \u0E44\u0E1B\u0E17\u0E35\u0E48 network \u0E44\u0E14\u0E49",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.cd22f1cb.js b/docs/.vuepress/dist/assets/offline-transactions.html.7d2ff671.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.cd22f1cb.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.7d2ff671.js
    index 40d45aea0..1e00d2cc8 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.cd22f1cb.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.7d2ff671.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"transaksi-offline",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaksi-offline","aria-hidden":"true"},"#"),s(" Transaksi Offline")],-1),m=n("h2",{id:"sign-transaksi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaksi","aria-hidden":"true"},"#"),s(" Sign Transaksi")],-1),d=n("p",null,"Untuk membuat suatu transaksi offline, kamu harus sign transaksi tersebut, kemudian siapapun dapat mem-broadcast-nya di network.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"transaksi-offline",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaksi-offline","aria-hidden":"true"},"#"),s(" Transaksi Offline")],-1),m=n("h2",{id:"sign-transaksi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaksi","aria-hidden":"true"},"#"),s(" Sign Transaksi")],-1),d=n("p",null,"Untuk membuat suatu transaksi offline, kamu harus sign transaksi tersebut, kemudian siapapun dapat mem-broadcast-nya di network.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.62c2bb84.js b/docs/.vuepress/dist/assets/offline-transactions.html.8844fb23.js
    similarity index 97%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.62c2bb84.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.8844fb23.js
    index 78c0dc969..7ed80d17d 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.62c2bb84.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.8844fb23.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"offline-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaction","aria-hidden":"true"},"#"),s(" Offline Transaction")],-1),m=n("h2",{id:"sign-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaction","aria-hidden":"true"},"#"),s(" Sign Transaction")],-1),d=n("p",null,"To create an offline transaction, you have to sign the transaction and then anyone can broadcast it on the network.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"offline-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-transaction","aria-hidden":"true"},"#"),s(" Offline Transaction")],-1),m=n("h2",{id:"sign-transaction",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#sign-transaction","aria-hidden":"true"},"#"),s(" Sign Transaction")],-1),d=n("p",null,"To create an offline transaction, you have to sign the transaction and then anyone can broadcast it on the network.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    @@ -321,7 +325,7 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
     `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br")])],-1),x=n("h3",{id:"get-nonce-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-nonce-account","aria-hidden":"true"},"#"),s(" Get Nonce Account")],-1),N=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br")])],-1),x=n("h3",{id:"get-nonce-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-nonce-account","aria-hidden":"true"},"#"),s(" Get Nonce Account")],-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       PublicKey`),n("span",{class:"token punctuation"},","),s(`
    @@ -343,7 +347,7 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"authority: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("nonceAccount"),n("span",{class:"token punctuation"},"."),s("authorizedPubkey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"fee calculator: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),s("nonceAccount"),n("span",{class:"token punctuation"},"."),s("feeCalculator"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" accountInfo "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getAccountInfo"),n("span",{class:"token punctuation"},"("),s("nonceAccountPubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1),N=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" accountInfo "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getAccountInfo"),n("span",{class:"token punctuation"},"("),s("nonceAccountPubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"let"),s(" nonceAccount "),n("span",{class:"token operator"},"="),s(" NonceAccount"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromAccountData"),n("span",{class:"token punctuation"},"("),s("accountInfo"),n("span",{class:"token punctuation"},"."),s("data"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),R=n("h3",{id:"use-nonce-account",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#use-nonce-account","aria-hidden":"true"},"#"),s(" Use Nonce Account")],-1),B=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
    @@ -427,4 +431,4 @@ tx`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"}
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"/* fee payer + nonce account authority + ... */"),s(`
     
     `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendRawTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"serialize"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1);function O(z,M){const e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return l(),u(i,null,[b,m,d,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[y]),preview:a(()=>[f]),_:1})]),_:1}),g,w,h,A,T,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[P]),preview:a(()=>[S]),_:1})]),_:1}),_,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[v]),preview:a(()=>[K]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[N]),preview:a(()=>[C]),_:1})]),_:1}),R,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[L]),_:1})]),_:1})],64)}var I=p(k,[["render",O]]);export{I as default};
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1);function O(z,M){const e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return l(),u(i,null,[b,m,d,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[y]),preview:a(()=>[f]),_:1})]),_:1}),g,w,h,A,T,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[P]),preview:a(()=>[S]),_:1})]),_:1}),_,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[v]),preview:a(()=>[K]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[N]),_:1})]),_:1}),R,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[L]),_:1})]),_:1})],64)}var I=p(k,[["render",O]]);export{I as default};
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.5d4f9b52.js b/docs/.vuepress/dist/assets/offline-transactions.html.9c9377a3.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.5d4f9b52.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.9c9377a3.js
    index 15513e246..e6a5a0c5d 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.5d4f9b52.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.9c9377a3.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"\u767C\u9001\u96E2\u7DDA\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u767C\u9001\u96E2\u7DDA\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u767C\u9001\u96E2\u7DDA\u4EA4\u6613")],-1),m=n("h2",{id:"\u7C3D\u7F72\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7C3D\u7F72\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u7C3D\u7F72\u4EA4\u6613")],-1),d=n("p",null,"\u8981\u5275\u5EFA\u96E2\u7DDA\u4EA4\u6613\uFF0C\u4F60\u9700\u8981\u7C3D\u7F72\u4EA4\u6613\uFF0C\u7136\u5F8C\u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5728\u7DB2\u7D61\u4E0A\u5EE3\u64AD\u5B83\u3002",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"\u767C\u9001\u96E2\u7DDA\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u767C\u9001\u96E2\u7DDA\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u767C\u9001\u96E2\u7DDA\u4EA4\u6613")],-1),m=n("h2",{id:"\u7C3D\u7F72\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7C3D\u7F72\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u7C3D\u7F72\u4EA4\u6613")],-1),d=n("p",null,"\u8981\u5275\u5EFA\u96E2\u7DDA\u4EA4\u6613\uFF0C\u4F60\u9700\u8981\u7C3D\u7F72\u4EA4\u6613\uFF0C\u7136\u5F8C\u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5728\u7DB2\u7D61\u4E0A\u5EE3\u64AD\u5B83\u3002",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.328bb708.js b/docs/.vuepress/dist/assets/offline-transactions.html.ba25b570.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.328bb708.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.ba25b570.js
    index 6c02cd211..99e92d1ea 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.328bb708.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.ba25b570.js
    @@ -1,4 +1,4 @@
    -import{_ as n,e as a}from"./app.07ce7a66.js";const s={},t=a(`

    Offline Transaction (\xC7evrimd\u0131\u015F\u0131 i\u015Flem)

    Sign Transaction (\u0130\u015Flem \u0130mzalama)

    \xC7evrimd\u0131\u015F\u0131 bir i\u015Flem olu\u015Fturmak i\xE7in i\u015Flemi imzalaman\u0131z gerekir ve ard\u0131ndan herkes bunu a\u011Fda yay\u0131nlayabilir.

    // there are two ways you can recover the tx
    +import{_ as n,e as a}from"./app.d411e3b3.js";const s={},t=a(`

    Offline Transaction (\xC7evrimd\u0131\u015F\u0131 i\u015Flem)

    Sign Transaction (\u0130\u015Flem \u0130mzalama)

    \xC7evrimd\u0131\u015F\u0131 bir i\u015Flem olu\u015Fturmak i\xE7in i\u015Flemi imzalaman\u0131z gerekir ve ard\u0131ndan herkes bunu a\u011Fda yay\u0131nlayabilir.

    // there are two ways you can recover the tx
     // 3.a Recover Tranasction (use populate then addSignauture)
     {
       let recoverTx = Transaction.populate(Message.from(realDataNeedToSign));
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.0bf4dc0d.js b/docs/.vuepress/dist/assets/offline-transactions.html.c710df8e.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.0bf4dc0d.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.c710df8e.js
    index 48fc1b94b..452d4db85 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.0bf4dc0d.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.c710df8e.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"offline-na-transaksyon",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-na-transaksyon","aria-hidden":"true"},"#"),s(" Offline na Transaksyon")],-1),m=n("h2",{id:"mag-sign-transaksyon",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mag-sign-transaksyon","aria-hidden":"true"},"#"),s(" Mag-sign Transaksyon")],-1),d=n("p",null,"Upang lumikha ng isang offline na transaksyon, kailangan mong lagdaan ang transaksyon at pagkatapos kahit sino ay maaaring i-broadcast ito sa network.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"offline-na-transaksyon",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#offline-na-transaksyon","aria-hidden":"true"},"#"),s(" Offline na Transaksyon")],-1),m=n("h2",{id:"mag-sign-transaksyon",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mag-sign-transaksyon","aria-hidden":"true"},"#"),s(" Mag-sign Transaksyon")],-1),d=n("p",null,"Upang lumikha ng isang offline na transaksyon, kailangan mong lagdaan ang transaksyon at pagkatapos kahit sino ay maaaring i-broadcast ito sa network.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.ef38def6.js b/docs/.vuepress/dist/assets/offline-transactions.html.c7b8e6f1.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.ef38def6.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.c7b8e6f1.js
    index d8a34f71d..b7df10996 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.ef38def6.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.c7b8e6f1.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"transaccion-offline",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaccion-offline","aria-hidden":"true"},"#"),s(" Transacci\xF3n offline")],-1),m=n("h2",{id:"firmar-una-transaccion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#firmar-una-transaccion","aria-hidden":"true"},"#"),s(" Firmar una transacci\xF3n")],-1),d=n("p",null,"Para crear una transacci\xF3n offline, debes firmar la transacci\xF3n y luego cualquiera puede transmitirla en la red.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"transaccion-offline",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transaccion-offline","aria-hidden":"true"},"#"),s(" Transacci\xF3n offline")],-1),m=n("h2",{id:"firmar-una-transaccion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#firmar-una-transaccion","aria-hidden":"true"},"#"),s(" Firmar una transacci\xF3n")],-1),d=n("p",null,"Para crear una transacci\xF3n offline, debes firmar la transacci\xF3n y luego cualquiera puede transmitirla en la red.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.afa81fed.js b/docs/.vuepress/dist/assets/offline-transactions.html.c90e0a69.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.afa81fed.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.c90e0a69.js
    index a5ac0d7d1..d0b4de9d8 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.afa81fed.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.c90e0a69.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u53D1\u9001\u79BB\u7EBF\u4EA4\u6613")],-1),m=n("h2",{id:"\u7B7E\u7F72\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7B7E\u7F72\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u7B7E\u7F72\u4EA4\u6613")],-1),d=n("p",null,"\u8981\u521B\u5EFA\u79BB\u7EBF\u4EA4\u6613\uFF0C\u4F60\u9700\u8981\u7B7E\u7F72\u4EA4\u6613\uFF0C\u7136\u540E\u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5728\u7F51\u7EDC\u4E0A\u5E7F\u64AD\u5B83\u3002",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u53D1\u9001\u79BB\u7EBF\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u53D1\u9001\u79BB\u7EBF\u4EA4\u6613")],-1),m=n("h2",{id:"\u7B7E\u7F72\u4EA4\u6613",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7B7E\u7F72\u4EA4\u6613","aria-hidden":"true"},"#"),s(" \u7B7E\u7F72\u4EA4\u6613")],-1),d=n("p",null,"\u8981\u521B\u5EFA\u79BB\u7EBF\u4EA4\u6613\uFF0C\u4F60\u9700\u8981\u7B7E\u7F72\u4EA4\u6613\uFF0C\u7136\u540E\u4EFB\u4F55\u4EBA\u90FD\u53EF\u4EE5\u5728\u7F51\u7EDC\u4E0A\u5E7F\u64AD\u5B83\u3002",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/offline-transactions.html.93364c85.js b/docs/.vuepress/dist/assets/offline-transactions.html.f368258e.js
    similarity index 97%
    rename from docs/.vuepress/dist/assets/offline-transactions.html.93364c85.js
    rename to docs/.vuepress/dist/assets/offline-transactions.html.f368258e.js
    index eb907f257..6ec67ac60 100644
    --- a/docs/.vuepress/dist/assets/offline-transactions.html.93364c85.js
    +++ b/docs/.vuepress/dist/assets/offline-transactions.html.f368258e.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.07ce7a66.js";const k={},b=n("h1",{id:"transacoes-offline",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transacoes-offline","aria-hidden":"true"},"#"),s(" Transa\xE7\xF5es Offline")],-1),m=n("h2",{id:"assinatura-de-transacao",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#assinatura-de-transacao","aria-hidden":"true"},"#"),s(" Assinatura de Transa\xE7\xE3o")],-1),d=n("p",null,"Para criar uma transa\xE7\xE3o offline, voc\xEA precisa assinar a transa\xE7\xE3o e, em seguida, qualquer pessoa pode transmiti-la na rede.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +import{_ as p,r as c,o as l,c as u,b as t,w as a,F as i,a as n,d as s,e as r}from"./app.d411e3b3.js";const k={},b=n("h1",{id:"transacoes-offline",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transacoes-offline","aria-hidden":"true"},"#"),s(" Transa\xE7\xF5es Offline")],-1),m=n("h2",{id:"assinatura-de-transacao",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#assinatura-de-transacao","aria-hidden":"true"},"#"),s(" Assinatura de Transa\xE7\xE3o")],-1),d=n("p",null,"Para criar uma transa\xE7\xE3o offline, voc\xEA precisa assinar a transa\xE7\xE3o e, em seguida, qualquer pessoa pode transmiti-la na rede.",-1),y=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       Keypair`),n("span",{class:"token punctuation"},","),s(`
    @@ -259,11 +259,12 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token constant"},"NONCE_ACCOUNT_LENGTH"),n("span",{class:"token punctuation"},","),s(`
       SystemProgram`),n("span",{class:"token punctuation"},","),s(`
       `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(`
    -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +  sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(`
    +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token comment"},"// Setup our connection and wallet"),s(`
    -  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +  `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token comment"},"// Fund our wallet with 1 SOL"),s(`
    @@ -297,10 +298,13 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
    -    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
    +    `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(`
    +      feePayer`),n("span",{class:"token punctuation"},","),s(`
    +      nonceAccount`),n("span",{class:"token punctuation"},","),s(`
    +    `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
       `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" tx "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token comment"},"// create nonce account"),s(`
       SystemProgram`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"createAccount"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"{"),s(`
         fromPubkey`),n("span",{class:"token operator"},":"),s(" feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(`
    @@ -321,7 +325,7 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
     `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),s(`
       `),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s("feePayer"),n("span",{class:"token punctuation"},","),s(" nonceAccount"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),s(`
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br")])],-1),x=n("h3",{id:"obter-conta-de-nonce",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obter-conta-de-nonce","aria-hidden":"true"},"#"),s(" Obter Conta de Nonce")],-1),N=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br")])],-1),x=n("h3",{id:"obter-conta-de-nonce",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obter-conta-de-nonce","aria-hidden":"true"},"#"),s(" Obter Conta de Nonce")],-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       PublicKey`),n("span",{class:"token punctuation"},","),s(`
    @@ -343,7 +347,7 @@ transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"authority: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("nonceAccount"),n("span",{class:"token punctuation"},"."),s("authorizedPubkey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBase58"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
       `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"fee calculator: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token constant"},"JSON"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"stringify"),n("span",{class:"token punctuation"},"("),s("nonceAccount"),n("span",{class:"token punctuation"},"."),s("feeCalculator"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" accountInfo "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getAccountInfo"),n("span",{class:"token punctuation"},"("),s("nonceAccountPubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1),N=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" accountInfo "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getAccountInfo"),n("span",{class:"token punctuation"},"("),s("nonceAccountPubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `),n("span",{class:"token keyword"},"let"),s(" nonceAccount "),n("span",{class:"token operator"},"="),s(" NonceAccount"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"fromAccountData"),n("span",{class:"token punctuation"},"("),s("accountInfo"),n("span",{class:"token punctuation"},"."),s("data"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),R=n("h3",{id:"usar-conta-de-nonce",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#usar-conta-de-nonce","aria-hidden":"true"},"#"),s(" Usar Conta de Nonce")],-1),B=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
    @@ -427,4 +431,4 @@ tx`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"}
     `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token comment"},"/* fee payer + nonce account authority + ... */"),s(`
     
     `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"txhash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendRawTransaction"),n("span",{class:"token punctuation"},"("),s("tx"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"serialize"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1);function L(z,M){const e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return l(),u(i,null,[b,m,d,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[y]),preview:a(()=>[f]),_:1})]),_:1}),g,w,h,A,P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[S]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[_]),preview:a(()=>[K]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[N]),preview:a(()=>[C]),_:1})]),_:1}),R,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[O]),_:1})]),_:1})],64)}var q=p(k,[["render",L]]);export{q as default};
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br")])],-1);function L(z,M){const e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return l(),u(i,null,[b,m,d,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[y]),preview:a(()=>[f]),_:1})]),_:1}),g,w,h,A,P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[S]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[_]),preview:a(()=>[K]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[N]),_:1})]),_:1}),R,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[O]),_:1})]),_:1})],64)}var q=p(k,[["render",L]]);export{q as default};
    diff --git a/docs/.vuepress/dist/assets/pdas.html.cf2a36cd.js b/docs/.vuepress/dist/assets/pdas.html.12f9e1cc.js
    similarity index 98%
    rename from docs/.vuepress/dist/assets/pdas.html.cf2a36cd.js
    rename to docs/.vuepress/dist/assets/pdas.html.12f9e1cc.js
    index d3622170e..7e775ee40 100644
    --- a/docs/.vuepress/dist/assets/pdas.html.cf2a36cd.js
    +++ b/docs/.vuepress/dist/assets/pdas.html.12f9e1cc.js
    @@ -1 +1 @@
    -import{_ as i,r as n,o as d,c,a as e,b as o,w as r,F as l,d as t,e as h}from"./app.07ce7a66.js";var p="/assets/account-matrix.c3a79f80.png",u="/assets/pda-curve.7c0b9307.png";const g={},m=e("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),t(" Program Derived Addresses (PDAs)")],-1),_=t("Program Derived Addresses (PDAs) are home to accounts that are designed to be controlled by a specific program. With PDAs, programs can programmatically sign for certain addresses without needing a private key. PDAs serve as the foundation for "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=t("Cross-Program Invocation"),v=t(", which allows Solana apps to be composable with one another."),w=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),A={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Fact Sheet",-1),y=e("li",null,"PDAs are 32 byte strings that look like public keys, but don\u2019t have corresponding private keys",-1),D=e("li",null,[e("code",null,"findProgramAddress"),t(" will deterministically derive a PDA from a programId and seeds (collection of bytes)")],-1),k=e("li",null,"A bump (one byte) is used to push a potential PDA off the ed25519 elliptic curve",-1),x=t("Programs can sign for their PDAs by providing the seeds and bump to "),I={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},T=t("invoke_signed"),L=e("li",null,"A PDA can only be signed by the program from which it was derived",-1),S=t("In addition to allowing for programs to sign for different instructions, PDAs also provide a hashmap-like interface for "),F=t("indexing accounts"),N=h('

    Deep Dive

    PDAs are an essential building block for developing programs on Solana. With PDAs, programs can sign for accounts while guaranteeing that no external user could also generate a valid signature for the same account. In addition to signing for accounts, certain programs can also modify accounts held at their PDAs.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs

    To understand the concept behind PDAs, it may be helpful to consider that PDAs are not technically created, but rather found. PDAs are generated from a combination of seeds (such as the string \u201Cvote_account\u201D) and a program id. This combination of seeds and program id is then run through a sha256 hash function to see whether or not they generate a public key that lies on the ed25519 elliptic curve.

    In running our program id and seeds through a hash function, there is a ~50% chance that we actually end up with a valid public key that does lie on the elliptic curve. In this case, we simply add something to fudge our input a little bit and try again. The technical term for this fudge factor is a bump. In Solana, we start with bump = 255 and simply iterate down through bump = 254, bump = 253, etc. until we get an address that is not on the elliptic curve. This may seem rudimentary, but once found it gives us a deterministic way of deriving the same PDA over and over again.

    PDA on the ellipitic curve

    Interacting with PDAs

    ',9),V=t("When a PDA is generated, "),W=e("code",null,"findProgramAddress",-1),B=t(" will return both the address and the bump used to kick the address off of the elliptic curve. Armed with this bump, a program can then "),C=t("sign"),E=t(" for any instruction that requires its PDA. In order to sign, programs should pass the instruction, the list of accounts, and the seeds and bump used to derive the PDA to "),R=e("code",null,"invoke_signed",-1),O=t(". In addition to signing for instructions, PDAs must also sign for their own creation via "),q=e("code",null,"invoke_signed",-1),z=t("."),G=t("When building with PDAs, it is common to "),U={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},j=t("store the bump seed"),H=t(" in the account data itself. This allows developers to easily validate a PDA without having to pass in the bump as an instruction argument."),J=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),t(" Other Resources")],-1),K={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},M=t("Official Documentation"),Q={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=t("Understanding Program Derived Addresses");function Y(Z,$){const a=n("ExternalLinkIcon"),s=n("RouterLink");return d(),c(l,null,[m,e("p",null,[_,e("a",f,[b,o(a)]),v]),w,e("div",A,[P,e("ul",null,[y,D,k,e("li",null,[x,e("a",I,[T,o(a)])]),L,e("li",null,[S,o(s,{to:"/guides/account-maps.html"},{default:r(()=>[F]),_:1})])])]),N,e("p",null,[V,W,B,o(s,{to:"/references/accounts.html#sign-with-a-pda"},{default:r(()=>[C]),_:1}),E,R,O,q,z]),e("p",null,[G,e("a",U,[j,o(a)]),H]),J,e("ul",null,[e("li",null,[e("a",K,[M,o(a)])]),e("li",null,[e("a",Q,[X,o(a)])])])],64)}var te=i(g,[["render",Y]]);export{te as default}; +import{_ as i,r as n,o as d,c,a as e,b as o,w as r,F as l,d as t,e as h}from"./app.d411e3b3.js";var p="/assets/account-matrix.c3a79f80.png",u="/assets/pda-curve.7c0b9307.png";const g={},m=e("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),t(" Program Derived Addresses (PDAs)")],-1),_=t("Program Derived Addresses (PDAs) are home to accounts that are designed to be controlled by a specific program. With PDAs, programs can programmatically sign for certain addresses without needing a private key. PDAs serve as the foundation for "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=t("Cross-Program Invocation"),v=t(", which allows Solana apps to be composable with one another."),w=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),A={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Fact Sheet",-1),y=e("li",null,"PDAs are 32 byte strings that look like public keys, but don\u2019t have corresponding private keys",-1),D=e("li",null,[e("code",null,"findProgramAddress"),t(" will deterministically derive a PDA from a programId and seeds (collection of bytes)")],-1),k=e("li",null,"A bump (one byte) is used to push a potential PDA off the ed25519 elliptic curve",-1),x=t("Programs can sign for their PDAs by providing the seeds and bump to "),I={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},T=t("invoke_signed"),L=e("li",null,"A PDA can only be signed by the program from which it was derived",-1),S=t("In addition to allowing for programs to sign for different instructions, PDAs also provide a hashmap-like interface for "),F=t("indexing accounts"),N=h('

    Deep Dive

    PDAs are an essential building block for developing programs on Solana. With PDAs, programs can sign for accounts while guaranteeing that no external user could also generate a valid signature for the same account. In addition to signing for accounts, certain programs can also modify accounts held at their PDAs.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs

    To understand the concept behind PDAs, it may be helpful to consider that PDAs are not technically created, but rather found. PDAs are generated from a combination of seeds (such as the string \u201Cvote_account\u201D) and a program id. This combination of seeds and program id is then run through a sha256 hash function to see whether or not they generate a public key that lies on the ed25519 elliptic curve.

    In running our program id and seeds through a hash function, there is a ~50% chance that we actually end up with a valid public key that does lie on the elliptic curve. In this case, we simply add something to fudge our input a little bit and try again. The technical term for this fudge factor is a bump. In Solana, we start with bump = 255 and simply iterate down through bump = 254, bump = 253, etc. until we get an address that is not on the elliptic curve. This may seem rudimentary, but once found it gives us a deterministic way of deriving the same PDA over and over again.

    PDA on the ellipitic curve

    Interacting with PDAs

    ',9),V=t("When a PDA is generated, "),W=e("code",null,"findProgramAddress",-1),B=t(" will return both the address and the bump used to kick the address off of the elliptic curve. Armed with this bump, a program can then "),C=t("sign"),E=t(" for any instruction that requires its PDA. In order to sign, programs should pass the instruction, the list of accounts, and the seeds and bump used to derive the PDA to "),R=e("code",null,"invoke_signed",-1),O=t(". In addition to signing for instructions, PDAs must also sign for their own creation via "),q=e("code",null,"invoke_signed",-1),z=t("."),G=t("When building with PDAs, it is common to "),U={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},j=t("store the bump seed"),H=t(" in the account data itself. This allows developers to easily validate a PDA without having to pass in the bump as an instruction argument."),J=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),t(" Other Resources")],-1),K={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},M=t("Official Documentation"),Q={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=t("Understanding Program Derived Addresses");function Y(Z,$){const a=n("ExternalLinkIcon"),s=n("RouterLink");return d(),c(l,null,[m,e("p",null,[_,e("a",f,[b,o(a)]),v]),w,e("div",A,[P,e("ul",null,[y,D,k,e("li",null,[x,e("a",I,[T,o(a)])]),L,e("li",null,[S,o(s,{to:"/guides/account-maps.html"},{default:r(()=>[F]),_:1})])])]),N,e("p",null,[V,W,B,o(s,{to:"/references/accounts.html#sign-with-a-pda"},{default:r(()=>[C]),_:1}),E,R,O,q,z]),e("p",null,[G,e("a",U,[j,o(a)]),H]),J,e("ul",null,[e("li",null,[e("a",K,[M,o(a)])]),e("li",null,[e("a",Q,[X,o(a)])])])],64)}var te=i(g,[["render",Y]]);export{te as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.dd1806d8.js b/docs/.vuepress/dist/assets/pdas.html.1b5e9aea.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.dd1806d8.js rename to docs/.vuepress/dist/assets/pdas.html.1b5e9aea.js index b39725541..8fbbb5f9f 100644 --- a/docs/.vuepress/dist/assets/pdas.html.dd1806d8.js +++ b/docs/.vuepress/dist/assets/pdas.html.1b5e9aea.js @@ -1 +1 @@ -import{_ as d,r as n,o as i,c,a as e,b as o,w as t,F as m,d as a,e as p}from"./app.07ce7a66.js";var u="/assets/account-matrix.c3a79f80.png",l="/assets/pda-curve.7c0b9307.png";const h={},_=e("h1",{id:"enderecos-derivados-de-programa-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#enderecos-derivados-de-programa-pdas","aria-hidden":"true"},"#"),a(" Endere\xE7os Derivados de Programa (PDAs)")],-1),g=a("Os Endere\xE7os Derivados de Programa (PDAs) abrigam contas que s\xE3o projetadas para serem controladas por um programa espec\xEDfico. Com os PDAs, os programas podem assinar programaticamente para determinados endere\xE7os sem precisar de uma chave privada. Os PDAs servem como base para a "),v={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=a("Invoca\xE7\xE3o de Programas Cruzados (CPI)"),b=a(", que permite que os aplicativos da Solana sejam compon\xEDveis uns com os outros."),P=e("h2",{id:"fatos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fatos","aria-hidden":"true"},"#"),a(" Fatos")],-1),A={class:"custom-container tip"},D=e("p",{class:"custom-container-title"},"Ficha Informativa",-1),x=e("li",null,"Os PDAs s\xE3o strings de 32 bytes que se parecem com chaves p\xFAblicas, mas n\xE3o possuem chaves privadas correspondentes",-1),q=e("li",null,[a("A fun\xE7\xE3o "),e("code",null,"findProgramAddress"),a(" \xE9 usada para derivar de forma determin\xEDstica um PDA a partir de um programId e sementes (cole\xE7\xE3o de bytes)")],-1),k=e("li",null,"Um bump (um byte) \xE9 usado para afastar potenciais PDAs da curva el\xEDptica ed25519",-1),I=a("Programas podem assinar seus PDAs fornecendo as sementes e o bump para a fun\xE7\xE3o "),w={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},C=a("invoke_signed"),O=e("li",null,"Um PDA s\xF3 pode ser assinado pelo programa do qual foi derivado",-1),y=a("Al\xE9m de permitir que programas assinem diferentes instru\xE7\xF5es, os PDAs tamb\xE9m fornecem uma interface similar a um hashmap para "),E=a("indexar contas"),N=p('

    Mergulho Profundo

    Os PDAs s\xE3o blocos de constru\xE7\xE3o essenciais para o desenvolvimento de programas na Solana. Com os PDAs, os programas podem assinar contas garantindo que nenhum usu\xE1rio externo possa gerar uma assinatura v\xE1lida para a mesma conta. Al\xE9m de assinar as contas, certos programas tamb\xE9m podem modificar as contas mantidas em seus PDAs.

    Matriz de Contas

    Imagem cortesia de Pencilflip

    Gerando PDAs

    Para entender o conceito por tr\xE1s dos PDAs, pode ser \xFAtil considerar que os PDAs n\xE3o s\xE3o tecnicamente criados, mas sim encontrados. Os PDAs s\xE3o gerados a partir de uma combina\xE7\xE3o de sementes (como a string "vote_account") e um ID de programa. Essa combina\xE7\xE3o de sementes e ID de programa \xE9 ent\xE3o executada atrav\xE9s de uma fun\xE7\xE3o hash sha256 para verificar se \xE9 gerada uma chave p\xFAblica que est\xE1 na curva el\xEDptica ed25519.

    Ao executar nosso ID de programa e sementes atrav\xE9s de uma fun\xE7\xE3o hash, h\xE1 uma chance de ~50% de que acabaremos com uma chave p\xFAblica v\xE1lida que est\xE1 na curva el\xEDptica. Nesse caso, simplesmente adicionamos algo para ajustar nossa entrada um pouco e tentamos novamente. O termo t\xE9cnico para esse fator de ajuste \xE9 um bump. Na Solana, come\xE7amos com bump = 255 e simplesmente iteramos para baixo atrav\xE9s de bump = 254, bump = 253, etc. at\xE9 obtermos um endere\xE7o que n\xE3o esteja na curva el\xEDptica. Isso pode parecer rudimentar, mas uma vez encontrado, nos d\xE1 uma maneira determin\xEDstica de derivar o mesmo PDA repetidamente.

    O PDA na curva el\xEDptica

    Interagindo com PDAs

    ',9),j=a("Quando um PDA \xE9 gerado, "),z=e("code",null,"findProgramAddress",-1),L=a(" retornar\xE1 tanto o endere\xE7o quanto o bump usado para remover o endere\xE7o da curva el\xEDptica. Com esse bump, um programa pode "),F=a("assinar"),S=a(" qualquer instru\xE7\xE3o que requer o PDA. Para assinar, os programas devem passar a instru\xE7\xE3o, a lista de contas e as sementes e o bump usados para derivar o PDA para "),V=e("code",null,"invoke_signed",-1),B=a(". Al\xE9m de assinar as instru\xE7\xF5es, os PDAs tamb\xE9m devem assinar a pr\xF3pria cria\xE7\xE3o atrav\xE9s de "),M=e("code",null,"invoke_signed",-1),R=a("."),U=a("Ao construir com PDAs, \xE9 comum "),G={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},Q=a("armazenar a semente do bump"),T=a(" nos dados da conta em si. Isso permite que os desenvolvedores validem facilmente um PDA sem precisar passar o bump como um argumento de instru\xE7\xE3o."),H=e("h2",{id:"outros-recursos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#outros-recursos","aria-hidden":"true"},"#"),a(" Outros recursos:")],-1),J={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},K=a("Documenta\xE7\xE3o Oficial"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=a("Compreendendo os Endere\xE7os Derivados de Programa");function Y(Z,$){const s=n("ExternalLinkIcon"),r=n("RouterLink");return i(),c(m,null,[_,e("p",null,[g,e("a",v,[f,o(s)]),b]),P,e("div",A,[D,e("ul",null,[x,q,k,e("li",null,[I,e("a",w,[C,o(s)])]),O,e("li",null,[y,o(r,{to:"/pt/guides/account-maps.html"},{default:t(()=>[E]),_:1})])])]),N,e("p",null,[j,z,L,o(r,{to:"/pt/references/accounts.html#sign-with-a-pda"},{default:t(()=>[F]),_:1}),S,V,B,M,R]),e("p",null,[U,e("a",G,[Q,o(s)]),T]),H,e("ul",null,[e("li",null,[e("a",J,[K,o(s)])]),e("li",null,[e("a",W,[X,o(s)])])])],64)}var ae=d(h,[["render",Y]]);export{ae as default}; +import{_ as d,r as n,o as i,c,a as e,b as o,w as t,F as m,d as a,e as p}from"./app.d411e3b3.js";var u="/assets/account-matrix.c3a79f80.png",l="/assets/pda-curve.7c0b9307.png";const h={},_=e("h1",{id:"enderecos-derivados-de-programa-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#enderecos-derivados-de-programa-pdas","aria-hidden":"true"},"#"),a(" Endere\xE7os Derivados de Programa (PDAs)")],-1),g=a("Os Endere\xE7os Derivados de Programa (PDAs) abrigam contas que s\xE3o projetadas para serem controladas por um programa espec\xEDfico. Com os PDAs, os programas podem assinar programaticamente para determinados endere\xE7os sem precisar de uma chave privada. Os PDAs servem como base para a "),v={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=a("Invoca\xE7\xE3o de Programas Cruzados (CPI)"),b=a(", que permite que os aplicativos da Solana sejam compon\xEDveis uns com os outros."),P=e("h2",{id:"fatos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fatos","aria-hidden":"true"},"#"),a(" Fatos")],-1),A={class:"custom-container tip"},D=e("p",{class:"custom-container-title"},"Ficha Informativa",-1),x=e("li",null,"Os PDAs s\xE3o strings de 32 bytes que se parecem com chaves p\xFAblicas, mas n\xE3o possuem chaves privadas correspondentes",-1),q=e("li",null,[a("A fun\xE7\xE3o "),e("code",null,"findProgramAddress"),a(" \xE9 usada para derivar de forma determin\xEDstica um PDA a partir de um programId e sementes (cole\xE7\xE3o de bytes)")],-1),k=e("li",null,"Um bump (um byte) \xE9 usado para afastar potenciais PDAs da curva el\xEDptica ed25519",-1),I=a("Programas podem assinar seus PDAs fornecendo as sementes e o bump para a fun\xE7\xE3o "),w={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},C=a("invoke_signed"),O=e("li",null,"Um PDA s\xF3 pode ser assinado pelo programa do qual foi derivado",-1),y=a("Al\xE9m de permitir que programas assinem diferentes instru\xE7\xF5es, os PDAs tamb\xE9m fornecem uma interface similar a um hashmap para "),E=a("indexar contas"),N=p('

    Mergulho Profundo

    Os PDAs s\xE3o blocos de constru\xE7\xE3o essenciais para o desenvolvimento de programas na Solana. Com os PDAs, os programas podem assinar contas garantindo que nenhum usu\xE1rio externo possa gerar uma assinatura v\xE1lida para a mesma conta. Al\xE9m de assinar as contas, certos programas tamb\xE9m podem modificar as contas mantidas em seus PDAs.

    Matriz de Contas

    Imagem cortesia de Pencilflip

    Gerando PDAs

    Para entender o conceito por tr\xE1s dos PDAs, pode ser \xFAtil considerar que os PDAs n\xE3o s\xE3o tecnicamente criados, mas sim encontrados. Os PDAs s\xE3o gerados a partir de uma combina\xE7\xE3o de sementes (como a string "vote_account") e um ID de programa. Essa combina\xE7\xE3o de sementes e ID de programa \xE9 ent\xE3o executada atrav\xE9s de uma fun\xE7\xE3o hash sha256 para verificar se \xE9 gerada uma chave p\xFAblica que est\xE1 na curva el\xEDptica ed25519.

    Ao executar nosso ID de programa e sementes atrav\xE9s de uma fun\xE7\xE3o hash, h\xE1 uma chance de ~50% de que acabaremos com uma chave p\xFAblica v\xE1lida que est\xE1 na curva el\xEDptica. Nesse caso, simplesmente adicionamos algo para ajustar nossa entrada um pouco e tentamos novamente. O termo t\xE9cnico para esse fator de ajuste \xE9 um bump. Na Solana, come\xE7amos com bump = 255 e simplesmente iteramos para baixo atrav\xE9s de bump = 254, bump = 253, etc. at\xE9 obtermos um endere\xE7o que n\xE3o esteja na curva el\xEDptica. Isso pode parecer rudimentar, mas uma vez encontrado, nos d\xE1 uma maneira determin\xEDstica de derivar o mesmo PDA repetidamente.

    O PDA na curva el\xEDptica

    Interagindo com PDAs

    ',9),j=a("Quando um PDA \xE9 gerado, "),z=e("code",null,"findProgramAddress",-1),L=a(" retornar\xE1 tanto o endere\xE7o quanto o bump usado para remover o endere\xE7o da curva el\xEDptica. Com esse bump, um programa pode "),F=a("assinar"),S=a(" qualquer instru\xE7\xE3o que requer o PDA. Para assinar, os programas devem passar a instru\xE7\xE3o, a lista de contas e as sementes e o bump usados para derivar o PDA para "),V=e("code",null,"invoke_signed",-1),B=a(". Al\xE9m de assinar as instru\xE7\xF5es, os PDAs tamb\xE9m devem assinar a pr\xF3pria cria\xE7\xE3o atrav\xE9s de "),M=e("code",null,"invoke_signed",-1),R=a("."),U=a("Ao construir com PDAs, \xE9 comum "),G={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},Q=a("armazenar a semente do bump"),T=a(" nos dados da conta em si. Isso permite que os desenvolvedores validem facilmente um PDA sem precisar passar o bump como um argumento de instru\xE7\xE3o."),H=e("h2",{id:"outros-recursos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#outros-recursos","aria-hidden":"true"},"#"),a(" Outros recursos:")],-1),J={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},K=a("Documenta\xE7\xE3o Oficial"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=a("Compreendendo os Endere\xE7os Derivados de Programa");function Y(Z,$){const s=n("ExternalLinkIcon"),r=n("RouterLink");return i(),c(m,null,[_,e("p",null,[g,e("a",v,[f,o(s)]),b]),P,e("div",A,[D,e("ul",null,[x,q,k,e("li",null,[I,e("a",w,[C,o(s)])]),O,e("li",null,[y,o(r,{to:"/pt/guides/account-maps.html"},{default:t(()=>[E]),_:1})])])]),N,e("p",null,[j,z,L,o(r,{to:"/pt/references/accounts.html#sign-with-a-pda"},{default:t(()=>[F]),_:1}),S,V,B,M,R]),e("p",null,[U,e("a",G,[Q,o(s)]),T]),H,e("ul",null,[e("li",null,[e("a",J,[K,o(s)])]),e("li",null,[e("a",W,[X,o(s)])])])],64)}var ae=d(h,[["render",Y]]);export{ae as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.6d743213.js b/docs/.vuepress/dist/assets/pdas.html.20ee0dd7.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.6d743213.js rename to docs/.vuepress/dist/assets/pdas.html.20ee0dd7.js index 180861edd..1c4fda0ea 100644 --- a/docs/.vuepress/dist/assets/pdas.html.6d743213.js +++ b/docs/.vuepress/dist/assets/pdas.html.20ee0dd7.js @@ -1 +1 @@ -import{_ as d,r as a,o as i,c,a as e,b as t,w as r,F as l,d as o,e as _}from"./app.07ce7a66.js";var h="/assets/account-matrix.c3a79f80.png",p="/assets/pda-curve.7c0b9307.png";const m={},u=e("h1",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u6D3E\u751F\u30A2\u30C8\u3099\u30EC\u30B9-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u6D3E\u751F\u30A2\u30C8\u3099\u30EC\u30B9-pdas","aria-hidden":"true"},"#"),o(" \u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(PDAs)")],-1),g=o("\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(Program Derived Addresses/PDAs)\u306F\u3001\u7279\u5B9A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u3088\u3063\u3066\u5236\u5FA1\u3055\u308C\u308B\u3088\u3046\u306B\u8A2D\u8A08\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30DB\u30FC\u30E0\u3067\u3059\u3002 PDA \u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u79D8\u5BC6\u9375\u3092\u5FC5\u8981\u3068\u305B\u305A\u306B\u7279\u5B9A\u306E\u30A2\u30C9\u30EC\u30B9\u306B\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u7F72\u540D\u3067\u304D\u307E\u3059\u3002 PDA\u306F\u3001Solana\u30A2\u30D7\u30EA\u3092\u4E92\u3044\u306B\u69CB\u6210\u53EF\u80FD\u306B\u3059\u308B"),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=o("Cross-Program Invocation"),P=o("\u306E\u57FA\u76E4\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002"),A=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),o(" Facts")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"Fact Sheet",-1),x=e("li",null,"PDA\u306F\u516C\u958B\u9375\u306E\u3088\u3046\u306B\u898B\u3048\u308B32byte\u306E\u6587\u5B57\u5217\u3067\u3059\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u79D8\u5BC6\u9375\u306F\u3042\u308A\u307E\u305B\u3093\u3002",-1),k=e("li",null,[e("code",null,"findProgramAddress"),o(" \u306F\u3001programId \u3068\u30B7\u30FC\u30C9 (byte\u306E\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3) \u304B\u3089\u6C7A\u5B9A\u8AD6\u7684\u306B PDA \u3092\u5C0E\u51FA\u3057\u307E\u3059\u3002")],-1),w=e("li",null,"bump (1 byte) \u6F5C\u5728\u7684\u306A PDA \u3092 ed25519 \u6955\u5186\u66F2\u7DDA\u304B\u3089\u62BC\u3057\u51FA\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002",-1),y=o("\u30D7\u30ED\u30B0\u30E9\u30E0"),I={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},L=o("invoke_signed"),S=o(" \u306B\u30B7\u30FC\u30C9\u3068\u30D0\u30F3\u30D7\u3092\u63D0\u4F9B\u3059\u308B\u3053\u3068\u3067PDA\u306B\u7F72\u540D\u3067\u304D\u307E\u3059\u3002"),F=e("li",null,"PDA\u306F\u6D3E\u751F\u5143\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u3088\u3063\u3066\u306E\u307F\u7F72\u540D\u3067\u304D\u307E\u3059\u3002",-1),N=o("\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u3055\u307E\u3056\u307E\u306A\u547D\u4EE4\u306B\u7F72\u540D\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u3060\u3051\u3067\u306A\u304F\u3001PDA\u306F"),V=o("indexing accounts"),B=o("\u306E\u305F\u3081\u306E\u30CF\u30C3\u30B7\u30E5\u30DE\u30C3\u30D7\u306E\u3088\u3046\u306A\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9\u3082\u63D0\u4F9B\u3057\u307E\u3059\u3002"),C=_('

    \u8A73\u7D30

    PDA\u306F\u3001Solana\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u958B\u767A\u3059\u308B\u305F\u3081\u306E\u4E0D\u53EF\u6B20\u306A\u69CB\u6210\u8981\u7D20\u3067\u3059\u3002
    PDA\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u5916\u90E8\u30E6\u30FC\u30B6\u30FC\u304C\u540C\u3058\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5BFE\u3057\u3066\u6709\u52B9\u306A\u7F72\u540D\u3092\u751F\u6210\u3067\u304D\u306A\u3044\u3053\u3068\u3092\u4FDD\u8A3C\u3057\u3064\u3064\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u7F72\u540D\u3067\u304D\u307E\u3059\u3002
    \u52A0\u3048\u3066\u3001\u7279\u5B9A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001PDA \u306B\u4FDD\u6301\u3055\u308C\u3066\u3044\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u5909\u66F4\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002

    Accounts matrix

    Image courtesy of Pencilflip

    PDA \u306E\u751F\u6210

    PDA\u306E\u80CC\u5F8C\u306B\u3042\u308B\u6982\u5FF5\u3092\u7406\u89E3\u3059\u308B\u306B\u306F\u3001PDA \u306F\u6280\u8853\u7684\u306B\u4F5C\u6210\u3055\u308C\u308B\u306E\u3067\u306F\u306A\u304F\u3001\u767A\u898B\u3055\u308C\u308B\u3082\u306E\u3067\u3042\u308B\u3068\u8003\u3048\u308B\u3068\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002
    PDA \u306F\u3001\u30B7\u30FC\u30C9 (\u201Cvote_account\u201D\u6587\u5B57\u5217\u306A\u3069) \u3068\u30D7\u30ED\u30B0\u30E9\u30E0ID\u306E\u7D44\u307F\u5408\u308F\u305B\u304B\u3089\u751F\u6210\u3055\u308C\u307E\u3059\u3002
    \u6B21\u306B\u3001\u30B7\u30FC\u30C9\u3068\u30D7\u30ED\u30B0\u30E9\u30E0 ID \u306E\u3053\u306E\u7D44\u307F\u5408\u308F\u305B\u3092 sha256 \u30CF\u30C3\u30B7\u30E5\u95A2\u6570\u306B\u6E21\u3057\u3001ed25519\u6955\u5186\u66F2\u7DDA\u4E0A\u306B\u3042\u308B\u516C\u958B\u9375\u304C\u751F\u6210\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002

    \u3053\u308C\u306B\u3088\u308A\u3001\u6700\u592750%\u306E\u78BA\u7387\u3067\u6955\u5186\u66F2\u7DDA\u4E0A\u306B\u5B58\u5728\u3059\u308B\u6709\u52B9\u306A\u516C\u958B\u9375\u304C\u5B9F\u969B\u306B\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002\u305D\u306E\u5834\u5408\u306F\u3001\u5165\u529B\u5024\u306B\u8ABF\u6574\u3092\u52A0\u3048\u518D\u5EA6\u5B9F\u884C\u3057\u307E\u3059\u3002
    \u3053\u306E\u8FFD\u52A0\u306E\u8ABF\u6574\u3092\u6280\u8853\u7528\u8A9E\u3067\u306Fbump\u3068\u8A00\u3044\u307E\u3059\u3002Solana\u3067\u306F\u3001bump\u5024\u306F255\u3067\u59CB\u307E\u308A\u3001 \u6955\u5186\u66F2\u7DDA\u306B\u5B58\u5728\u3057\u306A\u3044\u30A2\u30C9\u30EC\u30B9\u304C\u53D6\u5F97\u3067\u304D\u308B\u307E\u3067 bump = 254, bump = 253...\u3068\u5024\u30921\u305A\u3064\u4E0B\u3052\u3066\u7E70\u308A\u8FD4\u3057\u307E\u3059\u3002 \u3053\u308C\u306F\u521D\u6B69\u7684\u306A\u3053\u3068\u306E\u3088\u3046\u306B\u601D\u3048\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u304C\u3001\u4E00\u5EA6\u898B\u3064\u304B\u308C\u3070\u3001\u540C\u3058PDA\u306F\u6C7A\u5B9A\u8AD6\u7684\u306A\u65B9\u6CD5\u306B\u3088\u308A\u4F55\u5EA6\u3082\u5C0E\u51FA\u304C\u53EF\u80FD\u3067\u3059\u3002

    PDA on the ellipitic curve

    PDA\u3068\u5BFE\u8A71\u3059\u308B

    ',9),E=o("PDA \u304C\u751F\u6210\u3055\u308C\u308B\u3068\u3001"),j=e("code",null,"findProgramAddress",-1),R=o(" \u6955\u5186\u66F2\u7DDA\u304B\u3089\u30A2\u30C9\u30EC\u30B9\u3092\u306F\u3058\u304D\u51FA\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308Bbump\u3068\u30A2\u30C9\u30EC\u30B9\u306E\u4E21\u65B9\u3092\u8FD4\u5374\u3057\u307E\u3059\u3002 \u3053\u306Ebump\u3092\u5099\u3048\u305F\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001PDA \u3092\u5FC5\u8981\u3068\u3059\u308B\u547D\u4EE4\u306B"),z=o("sign"),O=o("\u3067\u304D\u307E\u3059\u3002 \u7F72\u540D\u3059\u308B\u305F\u3081\u306B\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u547D\u4EE4\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30EA\u30B9\u30C8\u3001PDA \u306E\u6D3E\u751F\u306B\u4F7F\u7528\u3055\u308C\u308B\u30B7\u30FC\u30C9\u3068bump\u3092 "),T=e("code",null,"invoke_signed",-1),U=o(" \u306B\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 \u547D\u4EE4\u306B\u5BFE\u3059\u308B\u7F72\u540D\u306B\u52A0\u3048\u3066\u3001PDA\u306F"),q=e("code",null,"invoke_signed",-1),G=o("\u3092\u4ECB\u3057\u3066\u81EA\u8EAB\u306E\u751F\u6210\u306B\u5BFE\u3057\u3066\u3082\u7F72\u540D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),H=o("PDA\u3092\u5099\u3048\u305F\u30D3\u30EB\u30C9\u306E\u969B\u306B\u306F\u3001"),J={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},K=o("bump seed\u3092\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u81EA\u4F53\u306B\u4FDD\u5B58\u3059\u308B"),M=o("\u306E\u304C\u4E00\u822C\u7684\u3067\u3059\u3002 \u3053\u308C\u306B\u3088\u308A\u3001\u958B\u767A\u8005\u306Fbump\u3092\u547D\u4EE4\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3059\u3053\u3068\u306A\u304F\u3001PDA\u3092\u7C21\u5358\u306B\u691C\u8A3C\u3067\u304D\u307E\u3059\u3002"),Q=e("h2",{id:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599","aria-hidden":"true"},"#"),o(" \u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599")],-1),W={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},X=o("Official Documentation"),Y={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},Z=o("Understanding Program Derived Addresses");function $(ee,oe){const s=a("ExternalLinkIcon"),n=a("RouterLink");return i(),c(l,null,[u,e("p",null,[g,e("a",b,[f,t(s)]),P]),A,e("div",D,[v,e("ul",null,[x,k,w,e("li",null,[y,e("a",I,[L,t(s)]),S]),F,e("li",null,[N,t(n,{to:"/ja/guides/account-maps.html"},{default:r(()=>[V]),_:1}),B])])]),C,e("p",null,[E,j,R,t(n,{to:"/ja/references/accounts.html#sign-with-a-pda"},{default:r(()=>[z]),_:1}),O,T,U,q,G]),e("p",null,[H,e("a",J,[K,t(s)]),M]),Q,e("ul",null,[e("li",null,[e("a",W,[X,t(s)])]),e("li",null,[e("a",Y,[Z,t(s)])])])],64)}var se=d(m,[["render",$]]);export{se as default}; +import{_ as d,r as a,o as i,c,a as e,b as t,w as r,F as l,d as o,e as _}from"./app.d411e3b3.js";var h="/assets/account-matrix.c3a79f80.png",p="/assets/pda-curve.7c0b9307.png";const m={},u=e("h1",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u6D3E\u751F\u30A2\u30C8\u3099\u30EC\u30B9-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u6D3E\u751F\u30A2\u30C8\u3099\u30EC\u30B9-pdas","aria-hidden":"true"},"#"),o(" \u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(PDAs)")],-1),g=o("\u30D7\u30ED\u30B0\u30E9\u30E0\u6D3E\u751F\u30A2\u30C9\u30EC\u30B9(Program Derived Addresses/PDAs)\u306F\u3001\u7279\u5B9A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u3088\u3063\u3066\u5236\u5FA1\u3055\u308C\u308B\u3088\u3046\u306B\u8A2D\u8A08\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30DB\u30FC\u30E0\u3067\u3059\u3002 PDA \u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u79D8\u5BC6\u9375\u3092\u5FC5\u8981\u3068\u305B\u305A\u306B\u7279\u5B9A\u306E\u30A2\u30C9\u30EC\u30B9\u306B\u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u7F72\u540D\u3067\u304D\u307E\u3059\u3002 PDA\u306F\u3001Solana\u30A2\u30D7\u30EA\u3092\u4E92\u3044\u306B\u69CB\u6210\u53EF\u80FD\u306B\u3059\u308B"),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=o("Cross-Program Invocation"),P=o("\u306E\u57FA\u76E4\u3068\u3057\u3066\u6A5F\u80FD\u3057\u307E\u3059\u3002"),A=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),o(" Facts")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"Fact Sheet",-1),x=e("li",null,"PDA\u306F\u516C\u958B\u9375\u306E\u3088\u3046\u306B\u898B\u3048\u308B32byte\u306E\u6587\u5B57\u5217\u3067\u3059\u304C\u3001\u5BFE\u5FDC\u3059\u308B\u79D8\u5BC6\u9375\u306F\u3042\u308A\u307E\u305B\u3093\u3002",-1),k=e("li",null,[e("code",null,"findProgramAddress"),o(" \u306F\u3001programId \u3068\u30B7\u30FC\u30C9 (byte\u306E\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3) \u304B\u3089\u6C7A\u5B9A\u8AD6\u7684\u306B PDA \u3092\u5C0E\u51FA\u3057\u307E\u3059\u3002")],-1),w=e("li",null,"bump (1 byte) \u6F5C\u5728\u7684\u306A PDA \u3092 ed25519 \u6955\u5186\u66F2\u7DDA\u304B\u3089\u62BC\u3057\u51FA\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002",-1),y=o("\u30D7\u30ED\u30B0\u30E9\u30E0"),I={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},L=o("invoke_signed"),S=o(" \u306B\u30B7\u30FC\u30C9\u3068\u30D0\u30F3\u30D7\u3092\u63D0\u4F9B\u3059\u308B\u3053\u3068\u3067PDA\u306B\u7F72\u540D\u3067\u304D\u307E\u3059\u3002"),F=e("li",null,"PDA\u306F\u6D3E\u751F\u5143\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u3088\u3063\u3066\u306E\u307F\u7F72\u540D\u3067\u304D\u307E\u3059\u3002",-1),N=o("\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u3055\u307E\u3056\u307E\u306A\u547D\u4EE4\u306B\u7F72\u540D\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u3060\u3051\u3067\u306A\u304F\u3001PDA\u306F"),V=o("indexing accounts"),B=o("\u306E\u305F\u3081\u306E\u30CF\u30C3\u30B7\u30E5\u30DE\u30C3\u30D7\u306E\u3088\u3046\u306A\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9\u3082\u63D0\u4F9B\u3057\u307E\u3059\u3002"),C=_('

    \u8A73\u7D30

    PDA\u306F\u3001Solana\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u958B\u767A\u3059\u308B\u305F\u3081\u306E\u4E0D\u53EF\u6B20\u306A\u69CB\u6210\u8981\u7D20\u3067\u3059\u3002
    PDA\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u5916\u90E8\u30E6\u30FC\u30B6\u30FC\u304C\u540C\u3058\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5BFE\u3057\u3066\u6709\u52B9\u306A\u7F72\u540D\u3092\u751F\u6210\u3067\u304D\u306A\u3044\u3053\u3068\u3092\u4FDD\u8A3C\u3057\u3064\u3064\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u7F72\u540D\u3067\u304D\u307E\u3059\u3002
    \u52A0\u3048\u3066\u3001\u7279\u5B9A\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001PDA \u306B\u4FDD\u6301\u3055\u308C\u3066\u3044\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u5909\u66F4\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u3059\u3002

    Accounts matrix

    Image courtesy of Pencilflip

    PDA \u306E\u751F\u6210

    PDA\u306E\u80CC\u5F8C\u306B\u3042\u308B\u6982\u5FF5\u3092\u7406\u89E3\u3059\u308B\u306B\u306F\u3001PDA \u306F\u6280\u8853\u7684\u306B\u4F5C\u6210\u3055\u308C\u308B\u306E\u3067\u306F\u306A\u304F\u3001\u767A\u898B\u3055\u308C\u308B\u3082\u306E\u3067\u3042\u308B\u3068\u8003\u3048\u308B\u3068\u5F79\u7ACB\u3064\u5834\u5408\u304C\u3042\u308A\u307E\u3059\u3002
    PDA \u306F\u3001\u30B7\u30FC\u30C9 (\u201Cvote_account\u201D\u6587\u5B57\u5217\u306A\u3069) \u3068\u30D7\u30ED\u30B0\u30E9\u30E0ID\u306E\u7D44\u307F\u5408\u308F\u305B\u304B\u3089\u751F\u6210\u3055\u308C\u307E\u3059\u3002
    \u6B21\u306B\u3001\u30B7\u30FC\u30C9\u3068\u30D7\u30ED\u30B0\u30E9\u30E0 ID \u306E\u3053\u306E\u7D44\u307F\u5408\u308F\u305B\u3092 sha256 \u30CF\u30C3\u30B7\u30E5\u95A2\u6570\u306B\u6E21\u3057\u3001ed25519\u6955\u5186\u66F2\u7DDA\u4E0A\u306B\u3042\u308B\u516C\u958B\u9375\u304C\u751F\u6210\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u78BA\u8A8D\u3057\u307E\u3059\u3002

    \u3053\u308C\u306B\u3088\u308A\u3001\u6700\u592750%\u306E\u78BA\u7387\u3067\u6955\u5186\u66F2\u7DDA\u4E0A\u306B\u5B58\u5728\u3059\u308B\u6709\u52B9\u306A\u516C\u958B\u9375\u304C\u5B9F\u969B\u306B\u53D6\u5F97\u3067\u304D\u307E\u3059\u3002\u305D\u306E\u5834\u5408\u306F\u3001\u5165\u529B\u5024\u306B\u8ABF\u6574\u3092\u52A0\u3048\u518D\u5EA6\u5B9F\u884C\u3057\u307E\u3059\u3002
    \u3053\u306E\u8FFD\u52A0\u306E\u8ABF\u6574\u3092\u6280\u8853\u7528\u8A9E\u3067\u306Fbump\u3068\u8A00\u3044\u307E\u3059\u3002Solana\u3067\u306F\u3001bump\u5024\u306F255\u3067\u59CB\u307E\u308A\u3001 \u6955\u5186\u66F2\u7DDA\u306B\u5B58\u5728\u3057\u306A\u3044\u30A2\u30C9\u30EC\u30B9\u304C\u53D6\u5F97\u3067\u304D\u308B\u307E\u3067 bump = 254, bump = 253...\u3068\u5024\u30921\u305A\u3064\u4E0B\u3052\u3066\u7E70\u308A\u8FD4\u3057\u307E\u3059\u3002 \u3053\u308C\u306F\u521D\u6B69\u7684\u306A\u3053\u3068\u306E\u3088\u3046\u306B\u601D\u3048\u308B\u304B\u3082\u3057\u308C\u307E\u305B\u3093\u304C\u3001\u4E00\u5EA6\u898B\u3064\u304B\u308C\u3070\u3001\u540C\u3058PDA\u306F\u6C7A\u5B9A\u8AD6\u7684\u306A\u65B9\u6CD5\u306B\u3088\u308A\u4F55\u5EA6\u3082\u5C0E\u51FA\u304C\u53EF\u80FD\u3067\u3059\u3002

    PDA on the ellipitic curve

    PDA\u3068\u5BFE\u8A71\u3059\u308B

    ',9),E=o("PDA \u304C\u751F\u6210\u3055\u308C\u308B\u3068\u3001"),j=e("code",null,"findProgramAddress",-1),R=o(" \u6955\u5186\u66F2\u7DDA\u304B\u3089\u30A2\u30C9\u30EC\u30B9\u3092\u306F\u3058\u304D\u51FA\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308Bbump\u3068\u30A2\u30C9\u30EC\u30B9\u306E\u4E21\u65B9\u3092\u8FD4\u5374\u3057\u307E\u3059\u3002 \u3053\u306Ebump\u3092\u5099\u3048\u305F\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001PDA \u3092\u5FC5\u8981\u3068\u3059\u308B\u547D\u4EE4\u306B"),z=o("sign"),O=o("\u3067\u304D\u307E\u3059\u3002 \u7F72\u540D\u3059\u308B\u305F\u3081\u306B\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u547D\u4EE4\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30EA\u30B9\u30C8\u3001PDA \u306E\u6D3E\u751F\u306B\u4F7F\u7528\u3055\u308C\u308B\u30B7\u30FC\u30C9\u3068bump\u3092 "),T=e("code",null,"invoke_signed",-1),U=o(" \u306B\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002 \u547D\u4EE4\u306B\u5BFE\u3059\u308B\u7F72\u540D\u306B\u52A0\u3048\u3066\u3001PDA\u306F"),q=e("code",null,"invoke_signed",-1),G=o("\u3092\u4ECB\u3057\u3066\u81EA\u8EAB\u306E\u751F\u6210\u306B\u5BFE\u3057\u3066\u3082\u7F72\u540D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"),H=o("PDA\u3092\u5099\u3048\u305F\u30D3\u30EB\u30C9\u306E\u969B\u306B\u306F\u3001"),J={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},K=o("bump seed\u3092\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u81EA\u4F53\u306B\u4FDD\u5B58\u3059\u308B"),M=o("\u306E\u304C\u4E00\u822C\u7684\u3067\u3059\u3002 \u3053\u308C\u306B\u3088\u308A\u3001\u958B\u767A\u8005\u306Fbump\u3092\u547D\u4EE4\u306E\u5F15\u6570\u3068\u3057\u3066\u6E21\u3059\u3053\u3068\u306A\u304F\u3001PDA\u3092\u7C21\u5358\u306B\u691C\u8A3C\u3067\u304D\u307E\u3059\u3002"),Q=e("h2",{id:"\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599","aria-hidden":"true"},"#"),o(" \u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599")],-1),W={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},X=o("Official Documentation"),Y={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},Z=o("Understanding Program Derived Addresses");function $(ee,oe){const s=a("ExternalLinkIcon"),n=a("RouterLink");return i(),c(l,null,[u,e("p",null,[g,e("a",b,[f,t(s)]),P]),A,e("div",D,[v,e("ul",null,[x,k,w,e("li",null,[y,e("a",I,[L,t(s)]),S]),F,e("li",null,[N,t(n,{to:"/ja/guides/account-maps.html"},{default:r(()=>[V]),_:1}),B])])]),C,e("p",null,[E,j,R,t(n,{to:"/ja/references/accounts.html#sign-with-a-pda"},{default:r(()=>[z]),_:1}),O,T,U,q,G]),e("p",null,[H,e("a",J,[K,t(s)]),M]),Q,e("ul",null,[e("li",null,[e("a",W,[X,t(s)])]),e("li",null,[e("a",Y,[Z,t(s)])])])],64)}var se=d(m,[["render",$]]);export{se as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.9841e8a1.js b/docs/.vuepress/dist/assets/pdas.html.38085bda.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.9841e8a1.js rename to docs/.vuepress/dist/assets/pdas.html.38085bda.js index ca3944453..d8cef7afc 100644 --- a/docs/.vuepress/dist/assets/pdas.html.9841e8a1.js +++ b/docs/.vuepress/dist/assets/pdas.html.38085bda.js @@ -1 +1 @@ -import{_ as n,r as a,o as d,c as i,a as e,b as s,w as c,F as l,d as o,e as _}from"./app.07ce7a66.js";var h="/assets/account-matrix.11f1f839.png",p="/assets/pda-curve.018ed1bf.png";const m={},u=e("h1",{id:"\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237-pda","aria-hidden":"true"},"#"),o(" \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF08PDA\uFF09")],-1),g=o("\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF08PDA\uFF09\u662F\u4E3A\u4E86\u8BA9\u7279\u5B9A\u7A0B\u5E8F\u53EF\u4EE5\u63A7\u5236\u4E00\u4E9B\u8D26\u6237\u800C\u8BBE\u8BA1\u51FA\u6765\u7684\u3002\u4F7F\u7528PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u901A\u8FC7\u7F16\u7A0B\u65B9\u6CD5\u4E3A\u4E00\u4E9B\u5730\u5740\u8FDB\u884C\u7B7E\u540D\uFF0C\u800C\u4E0D\u4E00\u5B9A\u7528\u5230\u79C1\u94A5\u3002 PDA\u662F"),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=o("Cross-Program Invocation\uFF08\u8DE8\u7A0B\u5E8F\u8C03\u7528\uFF09"),P=o("\u7684\u57FA\u7840\uFF0C \u8FD9\u4E2A\u529F\u80FD\u8BA9Solana\u7684app\u53EF\u4EE5\u8DDF\u5176\u4ED6app\u8FDB\u884C\u7EC4\u5408\u3002"),A=e("h2",{id:"\u7EFC\u8FF0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7EFC\u8FF0","aria-hidden":"true"},"#"),o(" \u7EFC\u8FF0")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"\u8981\u70B9",-1),x=e("li",null,"PDA\u662F\u957F\u5EA6\u4E3A32\u7684\u5B57\u8282\u4E32\uFF0C\u770B\u8D77\u6765\u548C\u516C\u94A5\u5F88\u50CF\uFF0C\u4F46\u662F\u5E76\u6CA1\u6709\u4E0E\u4E4B\u5BF9\u5E94\u7684\u79C1\u94A5",-1),k=e("li",null,[e("code",null,"findProgramAddress"),o("\u53EF\u4EE5\u9488\u5BF9\u4E00\u4E2AprogramId\uFF08\u7A0B\u5E8Fid\uFF09\u548Cseeds\uFF08\u79CD\u5B50\uFF09\u552F\u4E00\u786E\u5B9A\u7684\u751F\u6210\u4E00\u4E2APDA\u3002\u8FD9\u91CC\u7684seeds\uFF08\u79CD\u5B50\uFF09\u662F\u4E00\u7EC4\u6307\u5B9A\u7684\u5B57\u8282\u4E32")],-1),w=e("li",null,"\u4E00\u4E2A\u8DF3\u8DC3\uFF08\u4E00\u4E2A\u5B57\u8282\uFF09\u7528\u4E8E\u5C06\u5019\u9009PDA\u63A8\u79BBed25519\u692D\u5706\u66F2\u7EBF",-1),L=o("\u7A0B\u5E8F\u901A\u8FC7\u4F20\u5165\u79CD\u5B50\u548C\u8DF3\u8DC3\u53C2\u6570\uFF0C\u8C03\u7528"),y={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},I=o("invoke_signed"),N=o("\u4E3APDA\u8FDB\u884C\u7B7E\u540D"),S=e("li",null,"PDA\u53EA\u80FD\u88AB\u7528\u6765\u6D3E\u751F\u51FA\u8FD9\u4E2A\u5730\u5740\u7684\u7A0B\u5E8F\u6240\u7B7E\u540D",-1),V=o("\u9664\u4E86\u5141\u8BB8\u7A0B\u5E8F\u4E3A\u4E0D\u540C\u7684instruction\u7B7E\u540D\u4E4B\u5916\uFF0CPDA\u8FD8\u63D0\u4F9B\u4E86\u4E00\u4E2A\u50CF\u54C8\u5E0C\u8868\u4E00\u6837\u7684\u63A5\u53E3\uFF0C\u7528\u4E8E"),B=o("\u5EFA\u7ACB\u8D26\u6237\u7D22\u5F15"),C=_('

    \u6DF1\u5165

    PDA\u662FSolana\u7A0B\u5E8F\u5F00\u53D1\u7684\u91CD\u8981\u6784\u6210\u8981\u7D20\u3002\u6709\u4E86PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u4E3A\u8D26\u6237\u7B7E\u540D\uFF0C\u540C\u65F6\u4FDD\u8BC1\u6CA1\u6709\u5916\u90E8\u7528\u6237\u80FD\u591F\u4EA7\u751F\u9488\u5BF9\u540C\u4E00\u4E2A\u8D26\u6237\u7684\u6709\u6548\u7B7E\u540D\u3002 \u9664\u4E86\u4E3A\u8D26\u6237\u7B7E\u540D\u5916\uFF0C\u4E00\u4E9B\u7A0B\u5E8F\u8FD8\u53EF\u4EE5\u4FEE\u6539\u81EA\u5DF1\u6D3E\u751F\u51FA\u6765\u7684PDA\u91CC\u7684\u6570\u636E\u3002

    Accounts matrix

    \u56FE\u7247\u6765\u6E90\uFF1APencilflip

    \u751F\u6210PDA

    \u4E3A\u4E86\u66F4\u597D\u7684\u7406\u89E3PDA\u7684\u6982\u5FF5\uFF0C\u53EF\u4EE5\u8BA4\u4E3APDA\u4ECE\u6280\u672F\u89D2\u5EA6\u8BB2\u5E76\u4E0D\u662F\u521B\u5EFA\u51FA\u6765\u7684\uFF0C\u800C\u662F\u627E\u5230\u7684\u3002PDA\u7531\u4E00\u7EC4\u79CD\u5B50\uFF08\u4F8B\u5982\u5B57\u7B26\u4E32"vote_account"\uFF09\u4EE5\u53CA\u7A0B\u5E8Fid\u751F\u6210\u3002 \u8FD9\u7EC4\u79CD\u5B50\u548C\u7A0B\u5E8Fid\u63A5\u4E0B\u6765\u4F1A\u653E\u5230sha256\u54C8\u5E0C\u51FD\u6570\u4E2D\u6267\u884C\u4E00\u904D\uFF0C\u68C0\u67E5\u4ED6\u4EEC\u4EA7\u751F\u7684\u516C\u94A5\u662F\u5426\u843D\u5728ed25519\u692D\u5706\u66F2\u7EBF\u4E0A\u3002

    \u5728\u7A0B\u5E8Fid\u548C\u79CD\u5B50\u4E0A\u8FD0\u884C\u54C8\u5E0C\u51FD\u6570\u65F6\uFF0C\u6709\u5927\u7EA650%\u7684\u6982\u7387\u4F1A\u5F97\u5230\u5728\u4E00\u4E2A\u843D\u5728\u692D\u5706\u66F2\u7EBF\u4E0A\u6709\u6548\u7684\u516C\u94A5\u3002\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u9700\u8981\u5411\u8F93\u5165\u5F53\u4E2D\u52A0\u70B9\u6270\u52A8\uFF0C\u7565\u5FAE\u6539\u53D8\u8F93\u5165\uFF0C\u518D\u8FDB\u884C\u91CD\u8BD5\u3002 \u8FD9\u4E2A\u6270\u52A8\u7684\u6280\u672F\u540D\u79F0\u53EBbump\uFF08\u8DF3\u8DC3\uFF09\u3002\u5728Solana\u4E2D\uFF0C\u6211\u4EEC\u4E00\u5F00\u59CB\u6307\u5B9Abump = 255\uFF0C\u7136\u540E\u5411\u4E0B\u8FED\u4EE3bump\uFF0C\u5230254\uFF0C253\u7B49\u7B49\u3002\u77E5\u9053\u6211\u4EEC\u80FD\u591F\u627E\u5230\u4E00\u4E2A\u4E0D\u5728\u692D\u5706\u66F2\u7EBF\u4E0A\u7684\u5730\u5740\u4E3A\u6B62\u3002 \u8FD9\u4E2A\u770B\u8D77\u6765\u7B80\u964B\u7684\u529E\u6CD5\u53EF\u4EE5\u8BA9\u6211\u4EEC\u6BCF\u6B21\u751F\u6210PDA\u7684\u65F6\u5019\u90FD\u80FD\u591F\u5F97\u5230\u552F\u4E00\u786E\u5B9A\u7684\u7ED3\u679C\u3002

    \u843D\u5728\u692D\u5706\u66F2\u7EBF\u4E0A\u7684PDA

    \u4E0EPDA\u4EA4\u4E92

    \u751F\u6210PDA\u7684\u65F6\u5019\uFF0CfindProgramAddress\u4F1A\u628A\u5F97\u5230\u7684\u5730\u5740\u548C\u7528\u6765\u5C06PDA\u78B0\u649E\u51FA\u692D\u5706\u66F2\u7EBF\u6240\u7528\u7684bump\u90FD\u8FD4\u56DE\u51FA\u6765\u3002 \u6709\u4E86\u8FD9\u4E2Abump\uFF0C\u7A0B\u5E8F\u5C31\u53EF\u4EE5\u5BF9\u4EFB\u4F55\u9700\u8981\u8FD9\u4E2APDA\u5730\u5740\u7684\u6307\u4EE4\u8FDB\u884C\u7B7E\u540D\u3002\u7B7E\u540D\u65F6\uFF0C\u7A0B\u5E8F\u8C03\u7528invoke_signed\u51FD\u6570\uFF0C\u4F20\u5165\u6307\u4EE4\uFF0C\u8D26\u6237\u5217\u8868\uFF0C\u4EE5\u53CA\u7528\u4E8E\u751F\u6210PDA\u7684\u79CD\u5B50\u548Cbump\u3002 \u9664\u4E86\u4E3A\u6307\u4EE4\u7B7E\u540D\u4E4B\u5916\uFF0CPDA\u5728\u4ED6\u81EA\u5DF1\u901A\u8FC7invoke_signed\u51FD\u6570\u88AB\u521B\u5EFA\u65F6\uFF0C\u4E5F\u9700\u8981\u7B7E\u540D\u3002

    ',10),E=o("\u5728\u4F7F\u7528PDA\u7F16\u5199\u7A0B\u5E8F\u65F6\uFF0C\u7ECF\u5E38\u4F1A\u5C06\u8FD9\u4E2Abump"),R={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},q=o("\u5B58\u50A8\u5728\u8FD9\u4E2A\u8D26\u6237\u672C\u8EAB\u7684\u6570\u636E\u5F53\u4E2D"),z=o("\u3002 \u8FD9\u79CD\u673A\u5236\u53EF\u4EE5\u8BA9\u5F00\u53D1\u8005\u8F7B\u6613\u7684\u5BF9PDA\u8FDB\u884C\u9A8C\u8BC1\uFF0C\u800C\u4E0D\u7528\u91CD\u65B0\u5728\u6307\u4EE4\u53C2\u6570\u5F53\u4E2D\u4F20\u5165\u8FD9\u4E2A\u503C\u3002"),F=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),o(" Other Resources")],-1),O={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},T=o("\u5B98\u65B9\u6587\u6863"),U={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},j=o("Understanding Program Derived Addresses");function G(H,J){const t=a("ExternalLinkIcon"),r=a("RouterLink");return d(),i(l,null,[u,e("p",null,[g,e("a",b,[f,s(t)]),P]),A,e("div",D,[v,e("ul",null,[x,k,w,e("li",null,[L,e("a",y,[I,s(t)]),N]),S,e("li",null,[V,s(r,{to:"/zh/guides/account-maps.html"},{default:c(()=>[B]),_:1})])])]),C,e("p",null,[E,e("a",R,[q,s(t)]),z]),F,e("ul",null,[e("li",null,[e("a",O,[T,s(t)])]),e("li",null,[e("a",U,[j,s(t)])])])],64)}var M=n(m,[["render",G]]);export{M as default}; +import{_ as n,r as a,o as d,c as i,a as e,b as s,w as c,F as l,d as o,e as _}from"./app.d411e3b3.js";var h="/assets/account-matrix.11f1f839.png",p="/assets/pda-curve.018ed1bf.png";const m={},u=e("h1",{id:"\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237-pda","aria-hidden":"true"},"#"),o(" \u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF08PDA\uFF09")],-1),g=o("\u7A0B\u5E8F\u6D3E\u751F\u8D26\u6237\uFF08PDA\uFF09\u662F\u4E3A\u4E86\u8BA9\u7279\u5B9A\u7A0B\u5E8F\u53EF\u4EE5\u63A7\u5236\u4E00\u4E9B\u8D26\u6237\u800C\u8BBE\u8BA1\u51FA\u6765\u7684\u3002\u4F7F\u7528PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u901A\u8FC7\u7F16\u7A0B\u65B9\u6CD5\u4E3A\u4E00\u4E9B\u5730\u5740\u8FDB\u884C\u7B7E\u540D\uFF0C\u800C\u4E0D\u4E00\u5B9A\u7528\u5230\u79C1\u94A5\u3002 PDA\u662F"),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=o("Cross-Program Invocation\uFF08\u8DE8\u7A0B\u5E8F\u8C03\u7528\uFF09"),P=o("\u7684\u57FA\u7840\uFF0C \u8FD9\u4E2A\u529F\u80FD\u8BA9Solana\u7684app\u53EF\u4EE5\u8DDF\u5176\u4ED6app\u8FDB\u884C\u7EC4\u5408\u3002"),A=e("h2",{id:"\u7EFC\u8FF0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7EFC\u8FF0","aria-hidden":"true"},"#"),o(" \u7EFC\u8FF0")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"\u8981\u70B9",-1),x=e("li",null,"PDA\u662F\u957F\u5EA6\u4E3A32\u7684\u5B57\u8282\u4E32\uFF0C\u770B\u8D77\u6765\u548C\u516C\u94A5\u5F88\u50CF\uFF0C\u4F46\u662F\u5E76\u6CA1\u6709\u4E0E\u4E4B\u5BF9\u5E94\u7684\u79C1\u94A5",-1),k=e("li",null,[e("code",null,"findProgramAddress"),o("\u53EF\u4EE5\u9488\u5BF9\u4E00\u4E2AprogramId\uFF08\u7A0B\u5E8Fid\uFF09\u548Cseeds\uFF08\u79CD\u5B50\uFF09\u552F\u4E00\u786E\u5B9A\u7684\u751F\u6210\u4E00\u4E2APDA\u3002\u8FD9\u91CC\u7684seeds\uFF08\u79CD\u5B50\uFF09\u662F\u4E00\u7EC4\u6307\u5B9A\u7684\u5B57\u8282\u4E32")],-1),w=e("li",null,"\u4E00\u4E2A\u8DF3\u8DC3\uFF08\u4E00\u4E2A\u5B57\u8282\uFF09\u7528\u4E8E\u5C06\u5019\u9009PDA\u63A8\u79BBed25519\u692D\u5706\u66F2\u7EBF",-1),L=o("\u7A0B\u5E8F\u901A\u8FC7\u4F20\u5165\u79CD\u5B50\u548C\u8DF3\u8DC3\u53C2\u6570\uFF0C\u8C03\u7528"),y={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},I=o("invoke_signed"),N=o("\u4E3APDA\u8FDB\u884C\u7B7E\u540D"),S=e("li",null,"PDA\u53EA\u80FD\u88AB\u7528\u6765\u6D3E\u751F\u51FA\u8FD9\u4E2A\u5730\u5740\u7684\u7A0B\u5E8F\u6240\u7B7E\u540D",-1),V=o("\u9664\u4E86\u5141\u8BB8\u7A0B\u5E8F\u4E3A\u4E0D\u540C\u7684instruction\u7B7E\u540D\u4E4B\u5916\uFF0CPDA\u8FD8\u63D0\u4F9B\u4E86\u4E00\u4E2A\u50CF\u54C8\u5E0C\u8868\u4E00\u6837\u7684\u63A5\u53E3\uFF0C\u7528\u4E8E"),B=o("\u5EFA\u7ACB\u8D26\u6237\u7D22\u5F15"),C=_('

    \u6DF1\u5165

    PDA\u662FSolana\u7A0B\u5E8F\u5F00\u53D1\u7684\u91CD\u8981\u6784\u6210\u8981\u7D20\u3002\u6709\u4E86PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u4E3A\u8D26\u6237\u7B7E\u540D\uFF0C\u540C\u65F6\u4FDD\u8BC1\u6CA1\u6709\u5916\u90E8\u7528\u6237\u80FD\u591F\u4EA7\u751F\u9488\u5BF9\u540C\u4E00\u4E2A\u8D26\u6237\u7684\u6709\u6548\u7B7E\u540D\u3002 \u9664\u4E86\u4E3A\u8D26\u6237\u7B7E\u540D\u5916\uFF0C\u4E00\u4E9B\u7A0B\u5E8F\u8FD8\u53EF\u4EE5\u4FEE\u6539\u81EA\u5DF1\u6D3E\u751F\u51FA\u6765\u7684PDA\u91CC\u7684\u6570\u636E\u3002

    Accounts matrix

    \u56FE\u7247\u6765\u6E90\uFF1APencilflip

    \u751F\u6210PDA

    \u4E3A\u4E86\u66F4\u597D\u7684\u7406\u89E3PDA\u7684\u6982\u5FF5\uFF0C\u53EF\u4EE5\u8BA4\u4E3APDA\u4ECE\u6280\u672F\u89D2\u5EA6\u8BB2\u5E76\u4E0D\u662F\u521B\u5EFA\u51FA\u6765\u7684\uFF0C\u800C\u662F\u627E\u5230\u7684\u3002PDA\u7531\u4E00\u7EC4\u79CD\u5B50\uFF08\u4F8B\u5982\u5B57\u7B26\u4E32"vote_account"\uFF09\u4EE5\u53CA\u7A0B\u5E8Fid\u751F\u6210\u3002 \u8FD9\u7EC4\u79CD\u5B50\u548C\u7A0B\u5E8Fid\u63A5\u4E0B\u6765\u4F1A\u653E\u5230sha256\u54C8\u5E0C\u51FD\u6570\u4E2D\u6267\u884C\u4E00\u904D\uFF0C\u68C0\u67E5\u4ED6\u4EEC\u4EA7\u751F\u7684\u516C\u94A5\u662F\u5426\u843D\u5728ed25519\u692D\u5706\u66F2\u7EBF\u4E0A\u3002

    \u5728\u7A0B\u5E8Fid\u548C\u79CD\u5B50\u4E0A\u8FD0\u884C\u54C8\u5E0C\u51FD\u6570\u65F6\uFF0C\u6709\u5927\u7EA650%\u7684\u6982\u7387\u4F1A\u5F97\u5230\u5728\u4E00\u4E2A\u843D\u5728\u692D\u5706\u66F2\u7EBF\u4E0A\u6709\u6548\u7684\u516C\u94A5\u3002\u8FD9\u79CD\u60C5\u51B5\u4E0B\uFF0C\u6211\u4EEC\u9700\u8981\u5411\u8F93\u5165\u5F53\u4E2D\u52A0\u70B9\u6270\u52A8\uFF0C\u7565\u5FAE\u6539\u53D8\u8F93\u5165\uFF0C\u518D\u8FDB\u884C\u91CD\u8BD5\u3002 \u8FD9\u4E2A\u6270\u52A8\u7684\u6280\u672F\u540D\u79F0\u53EBbump\uFF08\u8DF3\u8DC3\uFF09\u3002\u5728Solana\u4E2D\uFF0C\u6211\u4EEC\u4E00\u5F00\u59CB\u6307\u5B9Abump = 255\uFF0C\u7136\u540E\u5411\u4E0B\u8FED\u4EE3bump\uFF0C\u5230254\uFF0C253\u7B49\u7B49\u3002\u77E5\u9053\u6211\u4EEC\u80FD\u591F\u627E\u5230\u4E00\u4E2A\u4E0D\u5728\u692D\u5706\u66F2\u7EBF\u4E0A\u7684\u5730\u5740\u4E3A\u6B62\u3002 \u8FD9\u4E2A\u770B\u8D77\u6765\u7B80\u964B\u7684\u529E\u6CD5\u53EF\u4EE5\u8BA9\u6211\u4EEC\u6BCF\u6B21\u751F\u6210PDA\u7684\u65F6\u5019\u90FD\u80FD\u591F\u5F97\u5230\u552F\u4E00\u786E\u5B9A\u7684\u7ED3\u679C\u3002

    \u843D\u5728\u692D\u5706\u66F2\u7EBF\u4E0A\u7684PDA

    \u4E0EPDA\u4EA4\u4E92

    \u751F\u6210PDA\u7684\u65F6\u5019\uFF0CfindProgramAddress\u4F1A\u628A\u5F97\u5230\u7684\u5730\u5740\u548C\u7528\u6765\u5C06PDA\u78B0\u649E\u51FA\u692D\u5706\u66F2\u7EBF\u6240\u7528\u7684bump\u90FD\u8FD4\u56DE\u51FA\u6765\u3002 \u6709\u4E86\u8FD9\u4E2Abump\uFF0C\u7A0B\u5E8F\u5C31\u53EF\u4EE5\u5BF9\u4EFB\u4F55\u9700\u8981\u8FD9\u4E2APDA\u5730\u5740\u7684\u6307\u4EE4\u8FDB\u884C\u7B7E\u540D\u3002\u7B7E\u540D\u65F6\uFF0C\u7A0B\u5E8F\u8C03\u7528invoke_signed\u51FD\u6570\uFF0C\u4F20\u5165\u6307\u4EE4\uFF0C\u8D26\u6237\u5217\u8868\uFF0C\u4EE5\u53CA\u7528\u4E8E\u751F\u6210PDA\u7684\u79CD\u5B50\u548Cbump\u3002 \u9664\u4E86\u4E3A\u6307\u4EE4\u7B7E\u540D\u4E4B\u5916\uFF0CPDA\u5728\u4ED6\u81EA\u5DF1\u901A\u8FC7invoke_signed\u51FD\u6570\u88AB\u521B\u5EFA\u65F6\uFF0C\u4E5F\u9700\u8981\u7B7E\u540D\u3002

    ',10),E=o("\u5728\u4F7F\u7528PDA\u7F16\u5199\u7A0B\u5E8F\u65F6\uFF0C\u7ECF\u5E38\u4F1A\u5C06\u8FD9\u4E2Abump"),R={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},q=o("\u5B58\u50A8\u5728\u8FD9\u4E2A\u8D26\u6237\u672C\u8EAB\u7684\u6570\u636E\u5F53\u4E2D"),z=o("\u3002 \u8FD9\u79CD\u673A\u5236\u53EF\u4EE5\u8BA9\u5F00\u53D1\u8005\u8F7B\u6613\u7684\u5BF9PDA\u8FDB\u884C\u9A8C\u8BC1\uFF0C\u800C\u4E0D\u7528\u91CD\u65B0\u5728\u6307\u4EE4\u53C2\u6570\u5F53\u4E2D\u4F20\u5165\u8FD9\u4E2A\u503C\u3002"),F=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),o(" Other Resources")],-1),O={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},T=o("\u5B98\u65B9\u6587\u6863"),U={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},j=o("Understanding Program Derived Addresses");function G(H,J){const t=a("ExternalLinkIcon"),r=a("RouterLink");return d(),i(l,null,[u,e("p",null,[g,e("a",b,[f,s(t)]),P]),A,e("div",D,[v,e("ul",null,[x,k,w,e("li",null,[L,e("a",y,[I,s(t)]),N]),S,e("li",null,[V,s(r,{to:"/zh/guides/account-maps.html"},{default:c(()=>[B]),_:1})])])]),C,e("p",null,[E,e("a",R,[q,s(t)]),z]),F,e("ul",null,[e("li",null,[e("a",O,[T,s(t)])]),e("li",null,[e("a",U,[j,s(t)])])])],64)}var M=n(m,[["render",G]]);export{M as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.56ea1967.js b/docs/.vuepress/dist/assets/pdas.html.3955a4b5.js similarity index 98% rename from docs/.vuepress/dist/assets/pdas.html.56ea1967.js rename to docs/.vuepress/dist/assets/pdas.html.3955a4b5.js index 24c2752ee..cbfb4dd9b 100644 --- a/docs/.vuepress/dist/assets/pdas.html.56ea1967.js +++ b/docs/.vuepress/dist/assets/pdas.html.3955a4b5.js @@ -1 +1 @@ -import{_ as d,r as t,o,c as u,a,b as n,w as r,F as l,d as e,e as m}from"./app.07ce7a66.js";var c="/assets/account-matrix.508bf274.png",k="/assets/pda-curve.7c0b9307.png";const h={},p=a("h1",{id:"program-derived-addresses-pda",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program-derived-addresses-pda","aria-hidden":"true"},"#"),e(" Program Derived Addresses (PDA)")],-1),g=e("Program Derived Addresses (PDA) adalah tempat seperti rumah untuk akun-akun yang di desain untuk dikendalikan oleh suatu program tertentu. Dengan PDA, program bisa memverifikasi alamat tertentu secara terprogram tanpa membutuhkan private key. PDA berfungsi sebagai fondasi untuk "),_={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=e("Cross-Program Invocation"),f=e(", yang memungkinkan aplikasi Solana dapat disusun satu sama lain."),v=a("h2",{id:"fakta-fakta",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fakta-fakta","aria-hidden":"true"},"#"),e(" Fakta-Fakta")],-1),y={class:"custom-container tip"},D=a("p",{class:"custom-container-title"},"Fakta",-1),P=a("li",null,"PDA adalah string 32 byte yang mirip seperti public key, namun tidak memiliki private key",-1),A=a("li",null,[a("code",null,"findProgramAddress"),e(" akan menurunkan sebuah PDA dari programld dan seeds (kumpulan byte) secara deterministik")],-1),x=a("li",null,[e("Satu byte (bump) digunakan untuk mendorong sebuah potential PDA dari "),a("code",null,"ed25519 elliptic curve")],-1),w=e("Program bisa memverifikasi PDA-nya dengan menyediakan seeds dan bump untuk "),S={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},j=e("invoke_signed"),L=a("li",null,"Sebuah PDA hanya bisa diverifikasi oleh program asalnya",-1),F=e("Selain untuk mengizinkan program diverifikasi dengan instruksi lain, PDA juga menyediakan antarmuka ("),I=a("em",null,"interface",-1),B=e(") seperti hashmap untuk "),C=e("Mengindeks Akun"),N=m('

    Lebih Dalam

    PDA adalah bahan penting untuk mengembangkan program di Solana. Dengan PDA, program-program dapat memverifikasi akun sambil menjamin tidak ada pengguna dari luar yang bisa memverifikasi akun yang sama. Selain memverifikasi akun, program tertentu juga dapat memodifikasi akun dalam PDA masing-masing.

    Accounts matrix

    Image courtesy of Pencilflip

    Membuat PDA

    Untuk memahami konsep PDA, akan sangat membantu untuk memandang PDA sebagai sesuatu yang \u201Cditemukan\u201D dan bukan \u201Cdiciptakan\u201D. PDA dihasilkan dari kombinasi seeds (seperti string \u201Cvote_account\u201D) dan sebuah program id. Kombinasi seeds ini kemudian dijalankan melalui sebuah fungsi sha256 hash untuk melihat bahwa mereka menghasilkan sebuah public key yang berdasarkan pada ed25519 elliptic curve atau tidak.

    Dalam menjalankan program id dan seeds dengan sebuah fungsi hash, ada 50% kemungkinan menghasilkan sebuah public key yang valid namun tidak tepat di kurva ekliptik. Dalam kasus ini, yang dapat dilakukan adalah menambahkan sesuatu (fudge) untuk mendorong input dan uji coba ulang. Istilah teknis dari fudge ini adalah bump. Dalam Solana, dimulai dengan bump = 255 dan secara perlahan turunkan nilainya bump = 254, bump = 253 dan seterusnya. Sampai kita mendapatkan alamat (address) yang tidak ada di elliptic curve. Cara ini memang belum sempurna, namun ketika membuahkan hasil, ini memberikan kita cara deterministik untuk menurunkan PDA yang sama berulang kali.

    PDA on the ellipitic curve

    Berinteraksi dengan PDAs

    ',9),V=e("Ketika sebuah PDA dihasilkan, "),z=a("code",null,"findProgramAddress",-1),E=e(" akan mengembalikan alamat dan juga bump yang digunakan untuk mengeluarkannya dari "),K=a("code",null,"elliptic curve",-1),U=e(". Dilengkapi dengan bump ini, sebuah program dapat "),M=e("memverifikasi"),R=e(" instruksi apapun yang dibutuhkan oleh PDA tersebut. Untuk memverifikasi, program harus meloloskan instruksi, sejumlah akun, dan seeds yang digunakan untuk menurunkan PDA ke "),H=a("code",null,"invoke_signed",-1),O=e(". Selain memverifikasi instruksi, PDA juga harus memverifikasi hasilnya via "),T=a("code",null,"invoke_signed",-1),q=e("."),G=e("Ketika pembuatan dangan PDA, sangatlah umum untuk "),J={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},Q=e("menyimpan "),W=a("em",null,"bump seed",-1),X=e(" di data akun tersebut. Hal ini mengizinkan pada developer untuk memvalidasi sebuah PDA tanpa harus melewati bump sebagai argumen instruksi."),Y=a("h2",{id:"sumber-lainnya",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sumber-lainnya","aria-hidden":"true"},"#"),e(" Sumber lainnya")],-1),Z={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},$=e("Official Documentation"),aa={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},ea=e("Understanding Program Derived Addresses");function na(ia,sa){const i=t("ExternalLinkIcon"),s=t("RouterLink");return o(),u(l,null,[p,a("p",null,[g,a("a",_,[b,n(i)]),f]),v,a("div",y,[D,a("ul",null,[P,A,x,a("li",null,[w,a("a",S,[j,n(i)])]),L,a("li",null,[F,I,B,n(s,{to:"/id/guides/account-maps.html"},{default:r(()=>[C]),_:1})])])]),N,a("p",null,[V,z,E,K,U,n(s,{to:"/id/references/accounts.html#sign-with-a-pda"},{default:r(()=>[M]),_:1}),R,H,O,T,q]),a("p",null,[G,a("a",J,[Q,W,n(i)]),X]),Y,a("ul",null,[a("li",null,[a("a",Z,[$,n(i)])]),a("li",null,[a("a",aa,[ea,n(i)])])])],64)}var ra=d(h,[["render",na]]);export{ra as default}; +import{_ as d,r as t,o,c as u,a,b as n,w as r,F as l,d as e,e as m}from"./app.d411e3b3.js";var c="/assets/account-matrix.508bf274.png",k="/assets/pda-curve.7c0b9307.png";const h={},p=a("h1",{id:"program-derived-addresses-pda",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program-derived-addresses-pda","aria-hidden":"true"},"#"),e(" Program Derived Addresses (PDA)")],-1),g=e("Program Derived Addresses (PDA) adalah tempat seperti rumah untuk akun-akun yang di desain untuk dikendalikan oleh suatu program tertentu. Dengan PDA, program bisa memverifikasi alamat tertentu secara terprogram tanpa membutuhkan private key. PDA berfungsi sebagai fondasi untuk "),_={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=e("Cross-Program Invocation"),f=e(", yang memungkinkan aplikasi Solana dapat disusun satu sama lain."),v=a("h2",{id:"fakta-fakta",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fakta-fakta","aria-hidden":"true"},"#"),e(" Fakta-Fakta")],-1),y={class:"custom-container tip"},D=a("p",{class:"custom-container-title"},"Fakta",-1),P=a("li",null,"PDA adalah string 32 byte yang mirip seperti public key, namun tidak memiliki private key",-1),A=a("li",null,[a("code",null,"findProgramAddress"),e(" akan menurunkan sebuah PDA dari programld dan seeds (kumpulan byte) secara deterministik")],-1),x=a("li",null,[e("Satu byte (bump) digunakan untuk mendorong sebuah potential PDA dari "),a("code",null,"ed25519 elliptic curve")],-1),w=e("Program bisa memverifikasi PDA-nya dengan menyediakan seeds dan bump untuk "),S={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},j=e("invoke_signed"),L=a("li",null,"Sebuah PDA hanya bisa diverifikasi oleh program asalnya",-1),F=e("Selain untuk mengizinkan program diverifikasi dengan instruksi lain, PDA juga menyediakan antarmuka ("),I=a("em",null,"interface",-1),B=e(") seperti hashmap untuk "),C=e("Mengindeks Akun"),N=m('

    Lebih Dalam

    PDA adalah bahan penting untuk mengembangkan program di Solana. Dengan PDA, program-program dapat memverifikasi akun sambil menjamin tidak ada pengguna dari luar yang bisa memverifikasi akun yang sama. Selain memverifikasi akun, program tertentu juga dapat memodifikasi akun dalam PDA masing-masing.

    Accounts matrix

    Image courtesy of Pencilflip

    Membuat PDA

    Untuk memahami konsep PDA, akan sangat membantu untuk memandang PDA sebagai sesuatu yang \u201Cditemukan\u201D dan bukan \u201Cdiciptakan\u201D. PDA dihasilkan dari kombinasi seeds (seperti string \u201Cvote_account\u201D) dan sebuah program id. Kombinasi seeds ini kemudian dijalankan melalui sebuah fungsi sha256 hash untuk melihat bahwa mereka menghasilkan sebuah public key yang berdasarkan pada ed25519 elliptic curve atau tidak.

    Dalam menjalankan program id dan seeds dengan sebuah fungsi hash, ada 50% kemungkinan menghasilkan sebuah public key yang valid namun tidak tepat di kurva ekliptik. Dalam kasus ini, yang dapat dilakukan adalah menambahkan sesuatu (fudge) untuk mendorong input dan uji coba ulang. Istilah teknis dari fudge ini adalah bump. Dalam Solana, dimulai dengan bump = 255 dan secara perlahan turunkan nilainya bump = 254, bump = 253 dan seterusnya. Sampai kita mendapatkan alamat (address) yang tidak ada di elliptic curve. Cara ini memang belum sempurna, namun ketika membuahkan hasil, ini memberikan kita cara deterministik untuk menurunkan PDA yang sama berulang kali.

    PDA on the ellipitic curve

    Berinteraksi dengan PDAs

    ',9),V=e("Ketika sebuah PDA dihasilkan, "),z=a("code",null,"findProgramAddress",-1),E=e(" akan mengembalikan alamat dan juga bump yang digunakan untuk mengeluarkannya dari "),K=a("code",null,"elliptic curve",-1),U=e(". Dilengkapi dengan bump ini, sebuah program dapat "),M=e("memverifikasi"),R=e(" instruksi apapun yang dibutuhkan oleh PDA tersebut. Untuk memverifikasi, program harus meloloskan instruksi, sejumlah akun, dan seeds yang digunakan untuk menurunkan PDA ke "),H=a("code",null,"invoke_signed",-1),O=e(". Selain memverifikasi instruksi, PDA juga harus memverifikasi hasilnya via "),T=a("code",null,"invoke_signed",-1),q=e("."),G=e("Ketika pembuatan dangan PDA, sangatlah umum untuk "),J={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},Q=e("menyimpan "),W=a("em",null,"bump seed",-1),X=e(" di data akun tersebut. Hal ini mengizinkan pada developer untuk memvalidasi sebuah PDA tanpa harus melewati bump sebagai argumen instruksi."),Y=a("h2",{id:"sumber-lainnya",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#sumber-lainnya","aria-hidden":"true"},"#"),e(" Sumber lainnya")],-1),Z={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},$=e("Official Documentation"),aa={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},ea=e("Understanding Program Derived Addresses");function na(ia,sa){const i=t("ExternalLinkIcon"),s=t("RouterLink");return o(),u(l,null,[p,a("p",null,[g,a("a",_,[b,n(i)]),f]),v,a("div",y,[D,a("ul",null,[P,A,x,a("li",null,[w,a("a",S,[j,n(i)])]),L,a("li",null,[F,I,B,n(s,{to:"/id/guides/account-maps.html"},{default:r(()=>[C]),_:1})])])]),N,a("p",null,[V,z,E,K,U,n(s,{to:"/id/references/accounts.html#sign-with-a-pda"},{default:r(()=>[M]),_:1}),R,H,O,T,q]),a("p",null,[G,a("a",J,[Q,W,n(i)]),X]),Y,a("ul",null,[a("li",null,[a("a",Z,[$,n(i)])]),a("li",null,[a("a",aa,[ea,n(i)])])])],64)}var ra=d(h,[["render",na]]);export{ra as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.e5cff056.js b/docs/.vuepress/dist/assets/pdas.html.433df04a.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.e5cff056.js rename to docs/.vuepress/dist/assets/pdas.html.433df04a.js index e6a85cfa9..4b6e9e229 100644 --- a/docs/.vuepress/dist/assets/pdas.html.e5cff056.js +++ b/docs/.vuepress/dist/assets/pdas.html.433df04a.js @@ -1 +1 @@ -import{_ as i,r as o,o as l,c as d,a as e,b as n,w as a,F as u,d as s,e as c}from"./app.07ce7a66.js";var p="/assets/account-matrix.c3a79f80.png",m="/assets/pda-curve.7c0b9307.png";const h={},_=e("h1",{id:"adresses-derivees-de-programmes-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#adresses-derivees-de-programmes-pdas","aria-hidden":"true"},"#"),s(" Adresses d\xE9riv\xE9es de programmes (PDAs)")],-1),g=s("Les adresses d\xE9riv\xE9es de programmes (PDA) sont des comptes qui sont con\xE7us pour \xEAtre contr\xF4l\xE9s par un programme sp\xE9cifique. Avec les PDAs, les programmes peuvent signer, de mani\xE8re programm\xE9e, pour certaines adresses sans avoir besoin d'une cl\xE9 priv\xE9e. Les PDAs servent de base \xE0 "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=s("l'invocation inter-programmes"),v=s(", qui permet aux applications de Solana d'\xEAtre composables les unes avec les autres."),q=e("h2",{id:"faits",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),s(" Faits")],-1),A={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Fiche d'Information",-1),D=e("li",null,"Les PDAs sont des cha\xEEnes de caract\xE8res de 32 bytes qui ressemblent \xE0 des cl\xE9s publiques, mais qui n'ont pas de cl\xE9s priv\xE9es correspondantes",-1),x=e("li",null,[e("code",null,"findProgramAddress"),s(" d\xE9rivera de mani\xE8re d\xE9terministe un PDA \xE0 partir d'un programId et de seeds (collection de bytes)")],-1),k=e("li",null,"Un bump (un byte) est utilis\xE9 pour d\xE9placer un PDA potentiel hors de la courbe elliptique ed25519",-1),L=s("Les programmes peuvent signer pour leurs PDAs en fournissant les seeds et le bump \xE0 l'"),y={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},w=s("invoke_signed"),E=e("li",null,"Un PDA ne peut \xEAtre sign\xE9 que par le programme dont il est d\xE9riv\xE9",-1),C=s("En plus de permettre aux programmes de signer pour diff\xE9rentes instructions, les PDAs fournissent aussi une interface de type hashmap pour les "),I=s("indexing accounts"),F=c('

    Examen plus approfondi

    Les PDAs sont un \xE9l\xE9ment essentiel pour le d\xE9veloppement de programmes sur Solana. Avec les PDAs, les programmes peuvent signer pour des comptes tout en garantissant qu'aucun utilisateur externe ne pourrait \xE9galement g\xE9n\xE9rer une signature valide pour le m\xEAme compte. En plus de la signature des comptes, certains programmes peuvent \xE9galement modifier les comptes d\xE9tenus par leurs PDAs.

    Accounts matrix

    Image courtesy of Pencilflip

    G\xE9n\xE9ration des PDAs

    Pour comprendre le concept des PDAs, il peut \xEAtre utile de consid\xE9rer que les PDAs ne sont pas techniquement cr\xE9\xE9s, mais plut\xF4t trouv\xE9s. Les PDAs sont g\xE9n\xE9r\xE9s \xE0 partir d'une combinaison de seeds (telles que la cha\xEEne \u201Cvote_account\u201D) et d'un identifiant de programme. Cette combinaison de seeds et d'identifiant de programme est ensuite ex\xE9cut\xE9e par une fonction de hachage sha256 pour voir si elle g\xE9n\xE8re ou non une cl\xE9 publique qui se trouve sur la courbe elliptique ed25519.

    En faisant passer notre identifiant de programme et nos seeds \xE0 travers une fonction de hachage, il y a environ 50 % de chances que nous obtenions une cl\xE9 publique valide qui se trouve sur la courbe elliptique. Dans ce cas, nous ajoutons simplement quelque chose pour modifier un peu notre entr\xE9e et nous r\xE9essayons. Le terme technique pour le quelque chose que nous rajoutons est un "bump". Dans Solana, nous commen\xE7ons par bump = 255 et it\xE9rons simplement en soustrayant 1 \xE0 chaque fois, nous utilisons ainsi bump = 254, bump = 253, etc. jusqu'\xE0 ce que nous obtenions une adresse qui n'est pas sur la courbe elliptique. Cela peut sembler rudimentaire, mais une fois trouv\xE9, cela nous donne un moyen d\xE9terministe de d\xE9river le m\xEAme PDA encore et encore.

    Le PDA sur la courbe elliptique

    Interaction avec les PDAs

    ',9),N=s("Quand un PDA est g\xE9n\xE9r\xE9, "),S=e("code",null,"findProgramAddress",-1),V=s(" retournera \xE0 la fois l'adresse et le bump utilis\xE9 pour d\xE9placer celle-ci hors de la courbe elliptique. Avec ce bump, un programme peut alors "),j=s("signer"),B=s(" pour toute instruction qui requiert son PDA. Afin de signer, les programmes doivent passer l'instruction, la liste des comptes, ainsi que les seeds et le bump utilis\xE9s pour d\xE9river le PDA \xE0 "),R=e("code",null,"invoke_signed",-1),U=s(". En plus de signer pour les instructions, les PDAs doivent \xE9galement signer leur propre cr\xE9ation avec "),z=e("code",null,"invoke_signed",-1),G=s("."),Q=s("Lors de la cr\xE9ation de PDAs, il est courant de "),T={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},H=s("stocker le bump et les seeds"),J=s(" dans les donn\xE9es du compte lui-m\xEAme. Cela permet ainsi aux d\xE9veloppeurs de valider facilement un PDA sans avoir \xE0 transmettre en argument de l'instruction le bump."),K=e("h2",{id:"autres-ressources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#autres-ressources","aria-hidden":"true"},"#"),s(" Autres Ressources")],-1),M={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},O=s("Documentation officielle"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=s("Comprendre les Adresses D\xE9riv\xE9es de Programmes");function Y(Z,$){const r=o("ExternalLinkIcon"),t=o("RouterLink");return l(),d(u,null,[_,e("p",null,[g,e("a",f,[b,n(r)]),v]),q,e("div",A,[P,e("ul",null,[D,x,k,e("li",null,[L,e("a",y,[w,n(r)])]),E,e("li",null,[C,n(t,{to:"/fr/guides/account-maps.html"},{default:a(()=>[I]),_:1})])])]),F,e("p",null,[N,S,V,n(t,{to:"/fr/references/accounts.html#sign-with-a-pda"},{default:a(()=>[j]),_:1}),B,R,U,z,G]),e("p",null,[Q,e("a",T,[H,n(r)]),J]),K,e("ul",null,[e("li",null,[e("a",M,[O,n(r)])]),e("li",null,[e("a",W,[X,n(r)])])])],64)}var se=i(h,[["render",Y]]);export{se as default}; +import{_ as i,r as o,o as l,c as d,a as e,b as n,w as a,F as u,d as s,e as c}from"./app.d411e3b3.js";var p="/assets/account-matrix.c3a79f80.png",m="/assets/pda-curve.7c0b9307.png";const h={},_=e("h1",{id:"adresses-derivees-de-programmes-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#adresses-derivees-de-programmes-pdas","aria-hidden":"true"},"#"),s(" Adresses d\xE9riv\xE9es de programmes (PDAs)")],-1),g=s("Les adresses d\xE9riv\xE9es de programmes (PDA) sont des comptes qui sont con\xE7us pour \xEAtre contr\xF4l\xE9s par un programme sp\xE9cifique. Avec les PDAs, les programmes peuvent signer, de mani\xE8re programm\xE9e, pour certaines adresses sans avoir besoin d'une cl\xE9 priv\xE9e. Les PDAs servent de base \xE0 "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=s("l'invocation inter-programmes"),v=s(", qui permet aux applications de Solana d'\xEAtre composables les unes avec les autres."),q=e("h2",{id:"faits",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),s(" Faits")],-1),A={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Fiche d'Information",-1),D=e("li",null,"Les PDAs sont des cha\xEEnes de caract\xE8res de 32 bytes qui ressemblent \xE0 des cl\xE9s publiques, mais qui n'ont pas de cl\xE9s priv\xE9es correspondantes",-1),x=e("li",null,[e("code",null,"findProgramAddress"),s(" d\xE9rivera de mani\xE8re d\xE9terministe un PDA \xE0 partir d'un programId et de seeds (collection de bytes)")],-1),k=e("li",null,"Un bump (un byte) est utilis\xE9 pour d\xE9placer un PDA potentiel hors de la courbe elliptique ed25519",-1),L=s("Les programmes peuvent signer pour leurs PDAs en fournissant les seeds et le bump \xE0 l'"),y={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},w=s("invoke_signed"),E=e("li",null,"Un PDA ne peut \xEAtre sign\xE9 que par le programme dont il est d\xE9riv\xE9",-1),C=s("En plus de permettre aux programmes de signer pour diff\xE9rentes instructions, les PDAs fournissent aussi une interface de type hashmap pour les "),I=s("indexing accounts"),F=c('

    Examen plus approfondi

    Les PDAs sont un \xE9l\xE9ment essentiel pour le d\xE9veloppement de programmes sur Solana. Avec les PDAs, les programmes peuvent signer pour des comptes tout en garantissant qu'aucun utilisateur externe ne pourrait \xE9galement g\xE9n\xE9rer une signature valide pour le m\xEAme compte. En plus de la signature des comptes, certains programmes peuvent \xE9galement modifier les comptes d\xE9tenus par leurs PDAs.

    Accounts matrix

    Image courtesy of Pencilflip

    G\xE9n\xE9ration des PDAs

    Pour comprendre le concept des PDAs, il peut \xEAtre utile de consid\xE9rer que les PDAs ne sont pas techniquement cr\xE9\xE9s, mais plut\xF4t trouv\xE9s. Les PDAs sont g\xE9n\xE9r\xE9s \xE0 partir d'une combinaison de seeds (telles que la cha\xEEne \u201Cvote_account\u201D) et d'un identifiant de programme. Cette combinaison de seeds et d'identifiant de programme est ensuite ex\xE9cut\xE9e par une fonction de hachage sha256 pour voir si elle g\xE9n\xE8re ou non une cl\xE9 publique qui se trouve sur la courbe elliptique ed25519.

    En faisant passer notre identifiant de programme et nos seeds \xE0 travers une fonction de hachage, il y a environ 50 % de chances que nous obtenions une cl\xE9 publique valide qui se trouve sur la courbe elliptique. Dans ce cas, nous ajoutons simplement quelque chose pour modifier un peu notre entr\xE9e et nous r\xE9essayons. Le terme technique pour le quelque chose que nous rajoutons est un "bump". Dans Solana, nous commen\xE7ons par bump = 255 et it\xE9rons simplement en soustrayant 1 \xE0 chaque fois, nous utilisons ainsi bump = 254, bump = 253, etc. jusqu'\xE0 ce que nous obtenions une adresse qui n'est pas sur la courbe elliptique. Cela peut sembler rudimentaire, mais une fois trouv\xE9, cela nous donne un moyen d\xE9terministe de d\xE9river le m\xEAme PDA encore et encore.

    Le PDA sur la courbe elliptique

    Interaction avec les PDAs

    ',9),N=s("Quand un PDA est g\xE9n\xE9r\xE9, "),S=e("code",null,"findProgramAddress",-1),V=s(" retournera \xE0 la fois l'adresse et le bump utilis\xE9 pour d\xE9placer celle-ci hors de la courbe elliptique. Avec ce bump, un programme peut alors "),j=s("signer"),B=s(" pour toute instruction qui requiert son PDA. Afin de signer, les programmes doivent passer l'instruction, la liste des comptes, ainsi que les seeds et le bump utilis\xE9s pour d\xE9river le PDA \xE0 "),R=e("code",null,"invoke_signed",-1),U=s(". En plus de signer pour les instructions, les PDAs doivent \xE9galement signer leur propre cr\xE9ation avec "),z=e("code",null,"invoke_signed",-1),G=s("."),Q=s("Lors de la cr\xE9ation de PDAs, il est courant de "),T={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},H=s("stocker le bump et les seeds"),J=s(" dans les donn\xE9es du compte lui-m\xEAme. Cela permet ainsi aux d\xE9veloppeurs de valider facilement un PDA sans avoir \xE0 transmettre en argument de l'instruction le bump."),K=e("h2",{id:"autres-ressources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#autres-ressources","aria-hidden":"true"},"#"),s(" Autres Ressources")],-1),M={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},O=s("Documentation officielle"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=s("Comprendre les Adresses D\xE9riv\xE9es de Programmes");function Y(Z,$){const r=o("ExternalLinkIcon"),t=o("RouterLink");return l(),d(u,null,[_,e("p",null,[g,e("a",f,[b,n(r)]),v]),q,e("div",A,[P,e("ul",null,[D,x,k,e("li",null,[L,e("a",y,[w,n(r)])]),E,e("li",null,[C,n(t,{to:"/fr/guides/account-maps.html"},{default:a(()=>[I]),_:1})])])]),F,e("p",null,[N,S,V,n(t,{to:"/fr/references/accounts.html#sign-with-a-pda"},{default:a(()=>[j]),_:1}),B,R,U,z,G]),e("p",null,[Q,e("a",T,[H,n(r)]),J]),K,e("ul",null,[e("li",null,[e("a",M,[O,n(r)])]),e("li",null,[e("a",W,[X,n(r)])])])],64)}var se=i(h,[["render",Y]]);export{se as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.6cdffc98.js b/docs/.vuepress/dist/assets/pdas.html.61b14f37.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.6cdffc98.js rename to docs/.vuepress/dist/assets/pdas.html.61b14f37.js index 2ec54c6a6..7e9970559 100644 --- a/docs/.vuepress/dist/assets/pdas.html.6cdffc98.js +++ b/docs/.vuepress/dist/assets/pdas.html.61b14f37.js @@ -1 +1 @@ -import{_ as i,r as n,o as d,c,a as e,b as s,w as a,F as l,d as t,e as _}from"./app.07ce7a66.js";var h="/assets/account-matrix.c3a79f80.png",p="/assets/pda-curve.7c0b9307.png";const u={},m=e("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),t(" Program Derived Addresses (PDAs)")],-1),g=t("Program Derived Addresses (PDAs)\uB294 \uD2B9\uC815 Program\uC5D0 \uC758\uD574 \uC791\uB3D9\uB418\uB3C4\uB85D \uC124\uACC4\uB41C Account\uB4E4\uC785\uB2C8\uB2E4. Program\uB4E4\uC740 PDA\uB4E4\uC744 \uD1B5\uD574 Private Key \uC5C6\uC774 \uD2B9\uC815 Addresse\uC5D0 \uB300\uD574 \uC11C\uBA85\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. PDA\uB294 Solana App\uC774 \uB2E4\uB978 App\uB4E4\uACFC \uD568\uAED8 \uAD6C\uC131\uB420 \uC218 \uC788\uB3C4\uB85D \uD558\uB294 "),P={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},A=t("Cross-Program Invocation"),b=t("\uB97C \uC704\uD55C \uAE30\uBC18\uC73C\uB85C\uC368\uC758 \uAE30\uB2A5\uC744 \uD569\uB2C8\uB2E4."),f=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"Fact Sheet",-1),k=e("li",null,"PDAs are 32 byte strings that look like public keys, but don\u2019t have corresponding private keys",-1),x=e("li",null,"PDA\uB294 Public Key \uCC98\uB7FC \uBCF4\uC774\uB294 32 byte\uC758 String \uC774\uC9C0\uB9CC, \uB300\uC751\uB418\uB294 Private Key\uB294 \uC5C6\uC2B5\uB2C8\uB2E4.",-1),y=e("li",null,[e("code",null,"findProgramAddress"),t("\uB294 programId\uC640 seeds(collection of bytes) \uAC12\uC73C\uB85C\uBD80\uD130 \uC815\uD655\uD55C PDA\uB97C \uC870\uD68C\uD560 \uAC83\uC785\uB2C8\uB2E4.")],-1),w=e("li",null,"bump (one byte) \uB294 ed25519 \uD0C0\uC6D0 \uACE1\uC120\uC5D0\uC11C \uC7A0\uC7AC\uC801\uC778 PDA\uB97C \uBC00\uC5B4\uB0B4\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.",-1),I=t("Program\uC740 seeds\uC640 bump \uAC12\uC744 "),K={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},L=t("invoke_signed"),S=t("\uC5D0 \uC81C\uACF5\uD574\uC11C PDA\uB4E4\uC5D0 \uC11C\uBA85\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),F=e("li",null,"PDA\uB294 \uC790\uC2E0\uC744 \uB9CC\uB4E0 Program\uC5D0 \uC758\uD574\uC11C\uB9CC \uC11C\uBA85\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),N=t("PDA\uB294 Program\uC774 \uB2E4\uB978 Instruction\uB4E4\uC5D0 \uC11C\uBA85\uD558\uB3C4\uB85D \uD558\uB294 \uAC83 \uBFD0\uB9CC \uC544\uB2C8\uB77C, "),V=t("indexing accounts"),B=t("\uB97C \uC704\uD55C hashmap\uACFC \uAC19\uC740 interface \uB610\uD55C \uC81C\uACF5\uD569\uB2C8\uB2E4."),C=_('

    Deep Dive

    PDA\uB294 Solana\uC5D0\uC11C Program\uB4E4\uC744 \uAC1C\uBC1C\uD558\uAE30 \uC704\uD55C \uD544\uC218\uC801\uC778 \uAD6C\uC131 \uC694\uC18C\uC785\uB2C8\uB2E4. Program\uB4E4\uC740 PDA\uB4E4\uC744 \uAC00\uC9C0\uACE0 Account\uB4E4\uC5D0 \uC11C\uBA85\uD560 \uC218 \uC788\uACE0, \uB2E4\uB978 \uC0AC\uC6A9\uC790\uB4E4\uC774 \uAC19\uC740 Account\uC5D0 \uC720\uD6A8\uD55C \uC11C\uBA85\uC744 \uB9CC\uB4E4 \uC218 \uC5C6\uB2E4\uB294 \uAC83\uC744 \uBCF4\uC7A5\uD569\uB2C8\uB2E4. \uC5B4\uB5A4 Program\uB4E4\uC740 Account\uB4E4\uC5D0 \uC11C\uBA85\uD558\uB294 \uAC83\uACFC \uB354\uBD88\uC5B4 \uADF8\uB4E4\uC758 PDA\uB4E4\uC5D0 \uC758\uD574 \uB9CC\uB4E4\uC5B4\uC9C4 Account\uB4E4\uC744 \uC218\uC815\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs

    PDA\uC5D0 \uB300\uD55C \uAC1C\uB150\uC744 \uC774\uD574\uD558\uAE30 \uC704\uD574\uC11C, PDA\uB294 \uAE30\uC220\uC801\uC73C\uB85C \uCC3D\uC870\uB41C \uAC83\uC774 \uC544\uB2C8\uB77C \uBC1C\uACAC\uB41C \uAC83\uC774\uB77C\uACE0 \uC0DD\uAC01\uD558\uB294 \uAC83\uC774 \uC880 \uB354 \uB3C4\uC6C0\uC774 \uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. PDA\uB4E4\uC740 seed (\uBB38\uC790\uC5F4 \u201Cvote_account\u201D\uC640 \uAC19\uC740)\uB4E4\uACFC Program ID\uC758 \uC870\uD569\uC73C\uB85C \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uADF8\uB7EC\uACE0 \uB098\uC11C, \uC774 seed\uB4E4\uACFC Program ID\uC758 \uC870\uD569\uC740 ed25519 \uD0C0\uC6D0 \uACE1\uC120 \uC0C1\uC5D0\uC11C Public Key\uB97C \uB9CC\uB4E4\uC5B4\uB0B4\uB294\uC9C0 \uC5EC\uBD80\uB97C \uD655\uC778\uD558\uAE30 \uC704\uD574 sha256 \uD574\uC2DC \uD568\uC218\uB85C \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4.

    Program ID\uC640 seeds\uB97C \uD574\uC2DC \uD568\uC218\uB85C \uB3CC\uB9AC\uB294 \uB3D9\uC548, \uD0C0\uC6D0 \uACE1\uC120\uC0C1\uC5D0 \uC788\uB294 \uC720\uD6A8\uD55C Public Key\uB97C 50% \uD655\uB960\uB85C \uBC1C\uACAC\uD569\uB2C8\uB2E4. \uC774\uB7F0 \uACBD\uC6B0, \uC6B0\uB9AC\uB294 input \uAC12\uB4E4\uC744 \uC870\uAE08 \uB2E4\uB974\uAC8C \uD558\uAE30 \uC704\uD574 \uB2E8\uC21C\uD788 \uC5B4\uB5A4 \uAC12\uC744 \uCD94\uAC00\uD569\uB2C8\uB2E4. \uC774 \uC791\uC5C5\uC744 \uC704\uD574 \uCD94\uAC00\uD558\uB294 \uAC83\uC758 \uAE30\uC220\uC801\uC778 \uC6A9\uC5B4\uB294 bump\uC785\uB2C8\uB2E4. \uC194\uB77C\uB098\uC5D0\uC11C bump \uAC12\uC740 255\uB85C \uC2DC\uC791\uD574\uC11C bum=254, bump=253, etc... \uC640 \uAC19\uC774 \uD0C0\uC6D0 \uACE1\uC120 \uC0C1\uC5D0 \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 Address\uB97C \uC5BB\uC744 \uB54C\uAE4C\uC9C0 \uB2E8\uC21C\uD558\uAC8C \uAC12\uC744 \uD558\uB098\uC529 \uB0B4\uB9AC\uBA70 \uBC18\uBCF5\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 \uCD08\uBCF4\uC801\uC73C\uB85C \uBCF4\uC77C\uC9C0 \uBAA8\uB974\uC9C0\uB9CC, \uC77C\uB2E8 \uD55C\uBC88 \uBC1C\uACAC\uB418\uBA74 \uD655\uC2E4\uD788 \uC6B0\uB9AC\uB294 \uAC19\uC740 PDA\uB97C \uACC4\uC18D\uD574\uC11C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    PDA on the ellipitic curve

    Interacting with PDAs

    ',9),E=t("PDA\uAC00 \uC0DD\uC131\uB410\uC744 \uB54C, "),R=e("code",null,"findProgramAddress",-1),O=t("\uB294 Address\uB97C \uD0C0\uC6D0 \uACE1\uC120 \uBC16\uC73C\uB85C \uBCF4\uB0B4\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB418\uB3C4\uB85D Address\uC640 bump \uAC12\uC744 \uBC18\uD658\uD560 \uAC83\uC785\uB2C8\uB2E4. \uC774 bump \uAC12\uC73C\uB85C \uBB34\uC7A5\uD55C Program\uC740 PDA\uB97C \uC694\uAD6C\uD558\uB294 \uC5B4\uB5A4 Instruction\uC5D0\uB3C4 "),z=t("sign"),G=t("\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC11C\uBA85\uC744 \uC704\uD574 Program\uB4E4\uC740 Instruction\uB4E4\uACFC Account\uB4E4\uC758 \uBAA9\uB85D \uADF8\uB9AC\uACE0 "),T=e("code",null,"invoked_signed",-1),U=t("\uD558\uAE30 \uC704\uD574 PDA\uB97C \uC5BB\uAE30 \uC704\uD55C seeds\uC640 bump\uAC12\uB4E4\uC744 \uBCF4\uB0B4\uC57C \uD569\uB2C8\uB2E4. PDA\uB4E4\uC740 Instuction\uC5D0 \uC11C\uBA85\uD558\uB294 \uAC83\uACFC \uB354\uBD88\uC5B4 "),j=e("code",null,"invoke_signed",-1),q=t("\uB97C \uD1B5\uD574 \uC790\uC2E0\uC758 \uC0DD\uC131\uC744 \uC704\uD55C \uC11C\uBA85\uB3C4 \uD574\uC57C \uD569\uB2C8\uB2E4."),H=t("PDA\uB4E4\uC744 \uB9CC\uB4E4 \uB54C, Account Data \uC790\uCCB4\uC801\uC73C\uB85C "),J={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},M=t("store the bump seed"),Q=t(" \uD558\uB294 \uAC83\uC740 \uD754\uD55C \uBC29\uBC95\uC785\uB2C8\uB2E4. \uC774\uAC83\uC740 \uAC1C\uBC1C\uC790\uB4E4\uC774 bump\uB97C Instruction \uC778\uC790\uB85C\uC368 \uC804\uC1A1\uD558\uC9C0 \uC54A\uACE0 \uC27D\uAC8C PDA\uB97C \uAC80\uC99D\uD558\uB3C4\uB85D \uD574\uC90D\uB2C8\uB2E4."),W=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),t(" Other Resources")],-1),X={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},Y=t("Official Documentation"),Z={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},$=t("Understanding Program Derived Addresses");function ee(te,se){const o=n("ExternalLinkIcon"),r=n("RouterLink");return d(),c(l,null,[m,e("p",null,[g,e("a",P,[A,s(o)]),b]),f,e("div",D,[v,e("ul",null,[k,x,y,w,e("li",null,[I,e("a",K,[L,s(o)]),S]),F,e("li",null,[N,s(r,{to:"/kr/guides/account-maps.html"},{default:a(()=>[V]),_:1}),B])])]),C,e("p",null,[E,R,O,s(r,{to:"/kr/references/accounts.html#sign-with-a-pda"},{default:a(()=>[z]),_:1}),G,T,U,j,q]),e("p",null,[H,e("a",J,[M,s(o)]),Q]),W,e("ul",null,[e("li",null,[e("a",X,[Y,s(o)])]),e("li",null,[e("a",Z,[$,s(o)])])])],64)}var re=i(u,[["render",ee]]);export{re as default}; +import{_ as i,r as n,o as d,c,a as e,b as s,w as a,F as l,d as t,e as _}from"./app.d411e3b3.js";var h="/assets/account-matrix.c3a79f80.png",p="/assets/pda-curve.7c0b9307.png";const u={},m=e("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),t(" Program Derived Addresses (PDAs)")],-1),g=t("Program Derived Addresses (PDAs)\uB294 \uD2B9\uC815 Program\uC5D0 \uC758\uD574 \uC791\uB3D9\uB418\uB3C4\uB85D \uC124\uACC4\uB41C Account\uB4E4\uC785\uB2C8\uB2E4. Program\uB4E4\uC740 PDA\uB4E4\uC744 \uD1B5\uD574 Private Key \uC5C6\uC774 \uD2B9\uC815 Addresse\uC5D0 \uB300\uD574 \uC11C\uBA85\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. PDA\uB294 Solana App\uC774 \uB2E4\uB978 App\uB4E4\uACFC \uD568\uAED8 \uAD6C\uC131\uB420 \uC218 \uC788\uB3C4\uB85D \uD558\uB294 "),P={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},A=t("Cross-Program Invocation"),b=t("\uB97C \uC704\uD55C \uAE30\uBC18\uC73C\uB85C\uC368\uC758 \uAE30\uB2A5\uC744 \uD569\uB2C8\uB2E4."),f=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"Fact Sheet",-1),k=e("li",null,"PDAs are 32 byte strings that look like public keys, but don\u2019t have corresponding private keys",-1),x=e("li",null,"PDA\uB294 Public Key \uCC98\uB7FC \uBCF4\uC774\uB294 32 byte\uC758 String \uC774\uC9C0\uB9CC, \uB300\uC751\uB418\uB294 Private Key\uB294 \uC5C6\uC2B5\uB2C8\uB2E4.",-1),y=e("li",null,[e("code",null,"findProgramAddress"),t("\uB294 programId\uC640 seeds(collection of bytes) \uAC12\uC73C\uB85C\uBD80\uD130 \uC815\uD655\uD55C PDA\uB97C \uC870\uD68C\uD560 \uAC83\uC785\uB2C8\uB2E4.")],-1),w=e("li",null,"bump (one byte) \uB294 ed25519 \uD0C0\uC6D0 \uACE1\uC120\uC5D0\uC11C \uC7A0\uC7AC\uC801\uC778 PDA\uB97C \uBC00\uC5B4\uB0B4\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.",-1),I=t("Program\uC740 seeds\uC640 bump \uAC12\uC744 "),K={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},L=t("invoke_signed"),S=t("\uC5D0 \uC81C\uACF5\uD574\uC11C PDA\uB4E4\uC5D0 \uC11C\uBA85\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),F=e("li",null,"PDA\uB294 \uC790\uC2E0\uC744 \uB9CC\uB4E0 Program\uC5D0 \uC758\uD574\uC11C\uB9CC \uC11C\uBA85\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),N=t("PDA\uB294 Program\uC774 \uB2E4\uB978 Instruction\uB4E4\uC5D0 \uC11C\uBA85\uD558\uB3C4\uB85D \uD558\uB294 \uAC83 \uBFD0\uB9CC \uC544\uB2C8\uB77C, "),V=t("indexing accounts"),B=t("\uB97C \uC704\uD55C hashmap\uACFC \uAC19\uC740 interface \uB610\uD55C \uC81C\uACF5\uD569\uB2C8\uB2E4."),C=_('

    Deep Dive

    PDA\uB294 Solana\uC5D0\uC11C Program\uB4E4\uC744 \uAC1C\uBC1C\uD558\uAE30 \uC704\uD55C \uD544\uC218\uC801\uC778 \uAD6C\uC131 \uC694\uC18C\uC785\uB2C8\uB2E4. Program\uB4E4\uC740 PDA\uB4E4\uC744 \uAC00\uC9C0\uACE0 Account\uB4E4\uC5D0 \uC11C\uBA85\uD560 \uC218 \uC788\uACE0, \uB2E4\uB978 \uC0AC\uC6A9\uC790\uB4E4\uC774 \uAC19\uC740 Account\uC5D0 \uC720\uD6A8\uD55C \uC11C\uBA85\uC744 \uB9CC\uB4E4 \uC218 \uC5C6\uB2E4\uB294 \uAC83\uC744 \uBCF4\uC7A5\uD569\uB2C8\uB2E4. \uC5B4\uB5A4 Program\uB4E4\uC740 Account\uB4E4\uC5D0 \uC11C\uBA85\uD558\uB294 \uAC83\uACFC \uB354\uBD88\uC5B4 \uADF8\uB4E4\uC758 PDA\uB4E4\uC5D0 \uC758\uD574 \uB9CC\uB4E4\uC5B4\uC9C4 Account\uB4E4\uC744 \uC218\uC815\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs

    PDA\uC5D0 \uB300\uD55C \uAC1C\uB150\uC744 \uC774\uD574\uD558\uAE30 \uC704\uD574\uC11C, PDA\uB294 \uAE30\uC220\uC801\uC73C\uB85C \uCC3D\uC870\uB41C \uAC83\uC774 \uC544\uB2C8\uB77C \uBC1C\uACAC\uB41C \uAC83\uC774\uB77C\uACE0 \uC0DD\uAC01\uD558\uB294 \uAC83\uC774 \uC880 \uB354 \uB3C4\uC6C0\uC774 \uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. PDA\uB4E4\uC740 seed (\uBB38\uC790\uC5F4 \u201Cvote_account\u201D\uC640 \uAC19\uC740)\uB4E4\uACFC Program ID\uC758 \uC870\uD569\uC73C\uB85C \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uADF8\uB7EC\uACE0 \uB098\uC11C, \uC774 seed\uB4E4\uACFC Program ID\uC758 \uC870\uD569\uC740 ed25519 \uD0C0\uC6D0 \uACE1\uC120 \uC0C1\uC5D0\uC11C Public Key\uB97C \uB9CC\uB4E4\uC5B4\uB0B4\uB294\uC9C0 \uC5EC\uBD80\uB97C \uD655\uC778\uD558\uAE30 \uC704\uD574 sha256 \uD574\uC2DC \uD568\uC218\uB85C \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4.

    Program ID\uC640 seeds\uB97C \uD574\uC2DC \uD568\uC218\uB85C \uB3CC\uB9AC\uB294 \uB3D9\uC548, \uD0C0\uC6D0 \uACE1\uC120\uC0C1\uC5D0 \uC788\uB294 \uC720\uD6A8\uD55C Public Key\uB97C 50% \uD655\uB960\uB85C \uBC1C\uACAC\uD569\uB2C8\uB2E4. \uC774\uB7F0 \uACBD\uC6B0, \uC6B0\uB9AC\uB294 input \uAC12\uB4E4\uC744 \uC870\uAE08 \uB2E4\uB974\uAC8C \uD558\uAE30 \uC704\uD574 \uB2E8\uC21C\uD788 \uC5B4\uB5A4 \uAC12\uC744 \uCD94\uAC00\uD569\uB2C8\uB2E4. \uC774 \uC791\uC5C5\uC744 \uC704\uD574 \uCD94\uAC00\uD558\uB294 \uAC83\uC758 \uAE30\uC220\uC801\uC778 \uC6A9\uC5B4\uB294 bump\uC785\uB2C8\uB2E4. \uC194\uB77C\uB098\uC5D0\uC11C bump \uAC12\uC740 255\uB85C \uC2DC\uC791\uD574\uC11C bum=254, bump=253, etc... \uC640 \uAC19\uC774 \uD0C0\uC6D0 \uACE1\uC120 \uC0C1\uC5D0 \uC874\uC7AC\uD558\uC9C0 \uC54A\uB294 Address\uB97C \uC5BB\uC744 \uB54C\uAE4C\uC9C0 \uB2E8\uC21C\uD558\uAC8C \uAC12\uC744 \uD558\uB098\uC529 \uB0B4\uB9AC\uBA70 \uBC18\uBCF5\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 \uCD08\uBCF4\uC801\uC73C\uB85C \uBCF4\uC77C\uC9C0 \uBAA8\uB974\uC9C0\uB9CC, \uC77C\uB2E8 \uD55C\uBC88 \uBC1C\uACAC\uB418\uBA74 \uD655\uC2E4\uD788 \uC6B0\uB9AC\uB294 \uAC19\uC740 PDA\uB97C \uACC4\uC18D\uD574\uC11C \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    PDA on the ellipitic curve

    Interacting with PDAs

    ',9),E=t("PDA\uAC00 \uC0DD\uC131\uB410\uC744 \uB54C, "),R=e("code",null,"findProgramAddress",-1),O=t("\uB294 Address\uB97C \uD0C0\uC6D0 \uACE1\uC120 \uBC16\uC73C\uB85C \uBCF4\uB0B4\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB418\uB3C4\uB85D Address\uC640 bump \uAC12\uC744 \uBC18\uD658\uD560 \uAC83\uC785\uB2C8\uB2E4. \uC774 bump \uAC12\uC73C\uB85C \uBB34\uC7A5\uD55C Program\uC740 PDA\uB97C \uC694\uAD6C\uD558\uB294 \uC5B4\uB5A4 Instruction\uC5D0\uB3C4 "),z=t("sign"),G=t("\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC11C\uBA85\uC744 \uC704\uD574 Program\uB4E4\uC740 Instruction\uB4E4\uACFC Account\uB4E4\uC758 \uBAA9\uB85D \uADF8\uB9AC\uACE0 "),T=e("code",null,"invoked_signed",-1),U=t("\uD558\uAE30 \uC704\uD574 PDA\uB97C \uC5BB\uAE30 \uC704\uD55C seeds\uC640 bump\uAC12\uB4E4\uC744 \uBCF4\uB0B4\uC57C \uD569\uB2C8\uB2E4. PDA\uB4E4\uC740 Instuction\uC5D0 \uC11C\uBA85\uD558\uB294 \uAC83\uACFC \uB354\uBD88\uC5B4 "),j=e("code",null,"invoke_signed",-1),q=t("\uB97C \uD1B5\uD574 \uC790\uC2E0\uC758 \uC0DD\uC131\uC744 \uC704\uD55C \uC11C\uBA85\uB3C4 \uD574\uC57C \uD569\uB2C8\uB2E4."),H=t("PDA\uB4E4\uC744 \uB9CC\uB4E4 \uB54C, Account Data \uC790\uCCB4\uC801\uC73C\uB85C "),J={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},M=t("store the bump seed"),Q=t(" \uD558\uB294 \uAC83\uC740 \uD754\uD55C \uBC29\uBC95\uC785\uB2C8\uB2E4. \uC774\uAC83\uC740 \uAC1C\uBC1C\uC790\uB4E4\uC774 bump\uB97C Instruction \uC778\uC790\uB85C\uC368 \uC804\uC1A1\uD558\uC9C0 \uC54A\uACE0 \uC27D\uAC8C PDA\uB97C \uAC80\uC99D\uD558\uB3C4\uB85D \uD574\uC90D\uB2C8\uB2E4."),W=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),t(" Other Resources")],-1),X={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},Y=t("Official Documentation"),Z={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},$=t("Understanding Program Derived Addresses");function ee(te,se){const o=n("ExternalLinkIcon"),r=n("RouterLink");return d(),c(l,null,[m,e("p",null,[g,e("a",P,[A,s(o)]),b]),f,e("div",D,[v,e("ul",null,[k,x,y,w,e("li",null,[I,e("a",K,[L,s(o)]),S]),F,e("li",null,[N,s(r,{to:"/kr/guides/account-maps.html"},{default:a(()=>[V]),_:1}),B])])]),C,e("p",null,[E,R,O,s(r,{to:"/kr/references/accounts.html#sign-with-a-pda"},{default:a(()=>[z]),_:1}),G,T,U,j,q]),e("p",null,[H,e("a",J,[M,s(o)]),Q]),W,e("ul",null,[e("li",null,[e("a",X,[Y,s(o)])]),e("li",null,[e("a",Z,[$,s(o)])])])],64)}var re=i(u,[["render",ee]]);export{re as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.35c6152a.js b/docs/.vuepress/dist/assets/pdas.html.61fb8770.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.35c6152a.js rename to docs/.vuepress/dist/assets/pdas.html.61fb8770.js index cbc05f480..0669c1335 100644 --- a/docs/.vuepress/dist/assets/pdas.html.35c6152a.js +++ b/docs/.vuepress/dist/assets/pdas.html.61fb8770.js @@ -1 +1 @@ -import{_ as r,r as n,o as d,c as i,a as e,b as a,w as c,F as l,d as o,e as _}from"./app.07ce7a66.js";var p="/assets/account-matrix.11f1f839.png",h="/assets/pda-curve.018ed1bf.png";const m={},u=e("h1",{id:"\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236-pda","aria-hidden":"true"},"#"),o(" \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF08PDA\uFF09")],-1),g=o("\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF08PDA\uFF09\u662F\u7232\u4E86\u8B93\u7279\u5B9A\u7A0B\u5E8F\u53EF\u4EE5\u63A7\u5236\u4E00\u4E9B\u8CEC\u6236\u800C\u8A2D\u8A08\u51FA\u4F86\u7684\u3002\u4F7F\u7528PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u901A\u904E\u7DE8\u7A0B\u65B9\u6CD5\u7232\u4E00\u4E9B\u5730\u5740\u9032\u884C\u7C3D\u540D\uFF0C\u800C\u4E0D\u4E00\u5B9A\u7528\u5230\u79C1\u9470\u3002 PDA\u662F"),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=o("Cross-Program Invocation\uFF08\u8DE8\u7A0B\u5E8F\u8ABF\u7528\uFF09"),P=o("\u7684\u57FA\u790E\uFF0C \u9019\u500B\u529F\u80FD\u8B93Solana\u7684app\u53EF\u4EE5\u8DDF\u5176\u4ED6app\u9032\u884C\u7D44\u5408\u3002"),A=e("h2",{id:"\u7D9C\u8FF0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7D9C\u8FF0","aria-hidden":"true"},"#"),o(" \u7D9C\u8FF0")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"\u8981\u9EDE",-1),x=e("li",null,"PDA\u662F\u9577\u5EA6\u723232\u7684\u5B57\u7BC0\u4E32\uFF0C\u770B\u8D77\u4F86\u548C\u516C\u9470\u5F88\u50CF\uFF0C\u4F46\u662F\u4E26\u6C92\u6709\u8207\u4E4B\u5C0D\u61C9\u7684\u79C1\u9470",-1),k=e("li",null,[e("code",null,"findProgramAddress"),o("\u53EF\u4EE5\u91DD\u5C0D\u4E00\u500BprogramId\uFF08\u7A0B\u5E8Fid\uFF09\u548Cseeds\uFF08\u7A2E\u5B50\uFF09\u552F\u4E00\u78BA\u5B9A\u7684\u751F\u6210\u4E00\u500BPDA\u3002\u9019\u88CF\u7684seeds\uFF08\u7A2E\u5B50\uFF09\u662F\u4E00\u7D44\u6307\u5B9A\u7684\u5B57\u7BC0\u4E32")],-1),w=e("li",null,"\u4E00\u500B\u8DF3\u8E8D\uFF08\u4E00\u500B\u5B57\u7BC0\uFF09\u7528\u65BC\u5C07\u5019\u9078PDA\u63A8\u96E2ed25519\u6A62\u5713\u66F2\u7DDA",-1),L=o("\u7A0B\u5E8F\u901A\u904E\u50B3\u5165\u7A2E\u5B50\u548C\u8DF3\u8E8D\u53C3\u6578\uFF0C\u8ABF\u7528"),y={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},I=o("invoke_signed"),N=o("\u7232PDA\u9032\u884C\u7C3D\u540D"),S=e("li",null,"PDA\u53EA\u80FD\u88AB\u7528\u4F86\u6D3E\u751F\u51FA\u9019\u500B\u5730\u5740\u7684\u7A0B\u5E8F\u6240\u7C3D\u540D",-1),V=o("\u9664\u4E86\u5141\u8A31\u7A0B\u5E8F\u7232\u4E0D\u540C\u7684instruction\u7C3D\u540D\u4E4B\u5916\uFF0CPDA\u9084\u63D0\u4F9B\u4E86\u4E00\u500B\u50CF\u54C8\u5E0C\u8868\u4E00\u6A23\u7684\u63A5\u53E3\uFF0C\u7528\u65BC"),B=o("\u5EFA\u7ACB\u8CEC\u6236\u7D22\u5F15"),C=_('

    \u6DF1\u5165

    PDA\u662FSolana\u7A0B\u5E8F\u958B\u767C\u7684\u91CD\u8981\u69CB\u6210\u8981\u7D20\u3002\u6709\u4E86PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u7232\u8CEC\u6236\u7C3D\u540D\uFF0C\u540C\u6642\u4FDD\u8B49\u6C92\u6709\u5916\u90E8\u7528\u6236\u80FD\u5920\u7522\u751F\u91DD\u5C0D\u540C\u4E00\u500B\u8CEC\u6236\u7684\u6709\u6548\u7C3D\u540D\u3002 \u9664\u4E86\u7232\u8CEC\u6236\u7C3D\u540D\u5916\uFF0C\u4E00\u4E9B\u7A0B\u5E8F\u9084\u53EF\u4EE5\u4FEE\u6539\u81EA\u5DF1\u6D3E\u751F\u51FA\u4F86\u7684PDA\u88CF\u7684\u6578\u64DA\u3002

    Accounts matrix

    \u56FE\u7247\u6765\u6E90\uFF1APencilflip

    \u751F\u6210PDA

    \u7232\u4E86\u66F4\u597D\u7684\u7406\u89E3PDA\u7684\u6982\u5FF5\uFF0C\u53EF\u4EE5\u8A8D\u7232PDA\u5F9E\u6280\u8853\u89D2\u5EA6\u8B1B\u4E26\u4E0D\u662F\u5275\u5EFA\u51FA\u4F86\u7684\uFF0C\u800C\u662F\u627E\u5230\u7684\u3002PDA\u7531\u4E00\u7D44\u7A2E\u5B50\uFF08\u4F8B\u5982\u5B57\u7B26\u4E32"vote_account"\uFF09\u4EE5\u53CA\u7A0B\u5E8Fid\u751F\u6210\u3002 \u9019\u7D44\u7A2E\u5B50\u548C\u7A0B\u5E8Fid\u63A5\u4E0B\u4F86\u6703\u653E\u5230sha256\u54C8\u5E0C\u51FD\u6578\u4E2D\u57F7\u884C\u4E00\u904D\uFF0C\u6AA2\u67E5\u4ED6\u5011\u7522\u751F\u7684\u516C\u9470\u662F\u5426\u843D\u5728ed25519\u6A62\u5713\u66F2\u7DDA\u4E0A\u3002

    \u5728\u7A0B\u5E8Fid\u548C\u7A2E\u5B50\u4E0A\u904B\u884C\u54C8\u5E0C\u51FD\u6578\u6642\uFF0C\u6709\u5927\u7D0450%\u7684\u6982\u7387\u6703\u5F97\u5230\u5728\u4E00\u500B\u843D\u5728\u6A62\u5713\u66F2\u7DDA\u4E0A\u6709\u6548\u7684\u516C\u9470\u3002\u9019\u7A2E\u60C5\u6CC1\u4E0B\uFF0C\u6211\u5011\u9700\u8981\u5411\u8F38\u5165\u7576\u4E2D\u52A0\u9EDE\u64FE\u52D5\uFF0C\u7565\u5FAE\u6539\u8B8A\u8F38\u5165\uFF0C\u518D\u9032\u884C\u91CD\u8A66\u3002 \u9019\u500B\u64FE\u52D5\u7684\u6280\u8853\u540D\u7A31\u53EBbump\uFF08\u8DF3\u8E8D\uFF09\u3002\u5728Solana\u4E2D\uFF0C\u6211\u5011\u4E00\u958B\u59CB\u6307\u5B9Abump = 255\uFF0C\u7136\u5F8C\u5411\u4E0B\u8FED\u4EE3bump\uFF0C\u5230254\uFF0C253\u7B49\u7B49\u3002\u77E5\u9053\u6211\u5011\u80FD\u5920\u627E\u5230\u4E00\u500B\u4E0D\u5728\u6A62\u5713\u66F2\u7DDA\u4E0A\u7684\u5730\u5740\u7232\u6B62\u3002 \u9019\u500B\u770B\u8D77\u4F86\u7C21\u964B\u7684\u8FA6\u6CD5\u53EF\u4EE5\u8B93\u6211\u5011\u6BCF\u6B21\u751F\u6210PDA\u7684\u6642\u5019\u90FD\u80FD\u5920\u5F97\u5230\u552F\u4E00\u78BA\u5B9A\u7684\u7D50\u679C\u3002

    \u843D\u5728\u6A62\u5713\u66F2\u7DDA\u4E0A\u7684PDA

    \u8207PDA\u4EA4\u4E92

    \u751F\u6210PDA\u7684\u6642\u5019\uFF0CfindProgramAddress\u6703\u628A\u5F97\u5230\u7684\u5730\u5740\u548C\u7528\u4F86\u5C07PDA\u78B0\u649E\u51FA\u6A62\u5713\u66F2\u7DDA\u6240\u7528\u7684bump\u90FD\u8FD4\u56DE\u51FA\u4F86\u3002 \u6709\u4E86\u9019\u500Bbump\uFF0C\u7A0B\u5E8F\u5C31\u53EF\u4EE5\u5C0D\u4EFB\u4F55\u9700\u8981\u9019\u500BPDA\u5730\u5740\u7684\u6307\u4EE4\u9032\u884C\u7C3D\u540D\u3002\u7C3D\u540D\u6642\uFF0C\u7A0B\u5E8F\u8ABF\u7528invoke_signed\u51FD\u6578\uFF0C\u50B3\u5165\u6307\u4EE4\uFF0C\u8CEC\u6236\u5217\u8868\uFF0C\u4EE5\u53CA\u7528\u65BC\u751F\u6210PDA\u7684\u7A2E\u5B50\u548Cbump\u3002 \u9664\u4E86\u7232\u6307\u4EE4\u7C3D\u540D\u4E4B\u5916\uFF0CPDA\u5728\u4ED6\u81EA\u5DF1\u901A\u904Einvoke_signed\u51FD\u6578\u88AB\u5275\u5EFA\u6642\uFF0C\u4E5F\u9700\u8981\u7C3D\u540D\u3002

    ',10),E=o("\u5728\u4F7F\u7528PDA\u7DE8\u5BEB\u7A0B\u5E8F\u6642\uFF0C\u7D93\u5E38\u6703\u5C07\u9019\u500Bbump"),q={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},z=o("\u5B58\u5132\u5728\u9019\u500B\u8CEC\u6236\u672C\u8EAB\u7684\u6578\u64DA\u7576\u4E2D"),F=o("\u3002 \u9019\u7A2E\u6A5F\u5236\u53EF\u4EE5\u8B93\u958B\u767C\u8005\u8F15\u6613\u7684\u5C0DPDA\u9032\u884C\u9A57\u8B49\uFF0C\u800C\u4E0D\u7528\u91CD\u65B0\u5728\u6307\u4EE4\u53C3\u6578\u7576\u4E2D\u50B3\u5165\u9019\u500B\u503C\u3002"),R=e("h2",{id:"\u5176\u4ED6\u8CC7\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u5176\u4ED6\u8CC7\u6599","aria-hidden":"true"},"#"),o(" \u5176\u4ED6\u8CC7\u6599")],-1),T={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},U=o("\u5B98\u65B9\u6587\u6A94"),j={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},G=o("Understanding Program Derived Addresses");function H(J,K){const t=n("ExternalLinkIcon"),s=n("RouterLink");return d(),i(l,null,[u,e("p",null,[g,e("a",b,[f,a(t)]),P]),A,e("div",D,[v,e("ul",null,[x,k,w,e("li",null,[L,e("a",y,[I,a(t)]),N]),S,e("li",null,[V,a(s,{to:"/zh_t/guides/account-maps.html"},{default:c(()=>[B]),_:1})])])]),C,e("p",null,[E,e("a",q,[z,a(t)]),F]),R,e("ul",null,[e("li",null,[e("a",T,[U,a(t)])]),e("li",null,[e("a",j,[G,a(t)])])])],64)}var O=r(m,[["render",H]]);export{O as default}; +import{_ as r,r as n,o as d,c as i,a as e,b as a,w as c,F as l,d as o,e as _}from"./app.d411e3b3.js";var p="/assets/account-matrix.11f1f839.png",h="/assets/pda-curve.018ed1bf.png";const m={},u=e("h1",{id:"\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236-pda",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236-pda","aria-hidden":"true"},"#"),o(" \u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF08PDA\uFF09")],-1),g=o("\u7A0B\u5E8F\u6D3E\u751F\u8CEC\u6236\uFF08PDA\uFF09\u662F\u7232\u4E86\u8B93\u7279\u5B9A\u7A0B\u5E8F\u53EF\u4EE5\u63A7\u5236\u4E00\u4E9B\u8CEC\u6236\u800C\u8A2D\u8A08\u51FA\u4F86\u7684\u3002\u4F7F\u7528PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u901A\u904E\u7DE8\u7A0B\u65B9\u6CD5\u7232\u4E00\u4E9B\u5730\u5740\u9032\u884C\u7C3D\u540D\uFF0C\u800C\u4E0D\u4E00\u5B9A\u7528\u5230\u79C1\u9470\u3002 PDA\u662F"),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=o("Cross-Program Invocation\uFF08\u8DE8\u7A0B\u5E8F\u8ABF\u7528\uFF09"),P=o("\u7684\u57FA\u790E\uFF0C \u9019\u500B\u529F\u80FD\u8B93Solana\u7684app\u53EF\u4EE5\u8DDF\u5176\u4ED6app\u9032\u884C\u7D44\u5408\u3002"),A=e("h2",{id:"\u7D9C\u8FF0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u7D9C\u8FF0","aria-hidden":"true"},"#"),o(" \u7D9C\u8FF0")],-1),D={class:"custom-container tip"},v=e("p",{class:"custom-container-title"},"\u8981\u9EDE",-1),x=e("li",null,"PDA\u662F\u9577\u5EA6\u723232\u7684\u5B57\u7BC0\u4E32\uFF0C\u770B\u8D77\u4F86\u548C\u516C\u9470\u5F88\u50CF\uFF0C\u4F46\u662F\u4E26\u6C92\u6709\u8207\u4E4B\u5C0D\u61C9\u7684\u79C1\u9470",-1),k=e("li",null,[e("code",null,"findProgramAddress"),o("\u53EF\u4EE5\u91DD\u5C0D\u4E00\u500BprogramId\uFF08\u7A0B\u5E8Fid\uFF09\u548Cseeds\uFF08\u7A2E\u5B50\uFF09\u552F\u4E00\u78BA\u5B9A\u7684\u751F\u6210\u4E00\u500BPDA\u3002\u9019\u88CF\u7684seeds\uFF08\u7A2E\u5B50\uFF09\u662F\u4E00\u7D44\u6307\u5B9A\u7684\u5B57\u7BC0\u4E32")],-1),w=e("li",null,"\u4E00\u500B\u8DF3\u8E8D\uFF08\u4E00\u500B\u5B57\u7BC0\uFF09\u7528\u65BC\u5C07\u5019\u9078PDA\u63A8\u96E2ed25519\u6A62\u5713\u66F2\u7DDA",-1),L=o("\u7A0B\u5E8F\u901A\u904E\u50B3\u5165\u7A2E\u5B50\u548C\u8DF3\u8E8D\u53C3\u6578\uFF0C\u8ABF\u7528"),y={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},I=o("invoke_signed"),N=o("\u7232PDA\u9032\u884C\u7C3D\u540D"),S=e("li",null,"PDA\u53EA\u80FD\u88AB\u7528\u4F86\u6D3E\u751F\u51FA\u9019\u500B\u5730\u5740\u7684\u7A0B\u5E8F\u6240\u7C3D\u540D",-1),V=o("\u9664\u4E86\u5141\u8A31\u7A0B\u5E8F\u7232\u4E0D\u540C\u7684instruction\u7C3D\u540D\u4E4B\u5916\uFF0CPDA\u9084\u63D0\u4F9B\u4E86\u4E00\u500B\u50CF\u54C8\u5E0C\u8868\u4E00\u6A23\u7684\u63A5\u53E3\uFF0C\u7528\u65BC"),B=o("\u5EFA\u7ACB\u8CEC\u6236\u7D22\u5F15"),C=_('

    \u6DF1\u5165

    PDA\u662FSolana\u7A0B\u5E8F\u958B\u767C\u7684\u91CD\u8981\u69CB\u6210\u8981\u7D20\u3002\u6709\u4E86PDA\uFF0C\u7A0B\u5E8F\u53EF\u4EE5\u7232\u8CEC\u6236\u7C3D\u540D\uFF0C\u540C\u6642\u4FDD\u8B49\u6C92\u6709\u5916\u90E8\u7528\u6236\u80FD\u5920\u7522\u751F\u91DD\u5C0D\u540C\u4E00\u500B\u8CEC\u6236\u7684\u6709\u6548\u7C3D\u540D\u3002 \u9664\u4E86\u7232\u8CEC\u6236\u7C3D\u540D\u5916\uFF0C\u4E00\u4E9B\u7A0B\u5E8F\u9084\u53EF\u4EE5\u4FEE\u6539\u81EA\u5DF1\u6D3E\u751F\u51FA\u4F86\u7684PDA\u88CF\u7684\u6578\u64DA\u3002

    Accounts matrix

    \u56FE\u7247\u6765\u6E90\uFF1APencilflip

    \u751F\u6210PDA

    \u7232\u4E86\u66F4\u597D\u7684\u7406\u89E3PDA\u7684\u6982\u5FF5\uFF0C\u53EF\u4EE5\u8A8D\u7232PDA\u5F9E\u6280\u8853\u89D2\u5EA6\u8B1B\u4E26\u4E0D\u662F\u5275\u5EFA\u51FA\u4F86\u7684\uFF0C\u800C\u662F\u627E\u5230\u7684\u3002PDA\u7531\u4E00\u7D44\u7A2E\u5B50\uFF08\u4F8B\u5982\u5B57\u7B26\u4E32"vote_account"\uFF09\u4EE5\u53CA\u7A0B\u5E8Fid\u751F\u6210\u3002 \u9019\u7D44\u7A2E\u5B50\u548C\u7A0B\u5E8Fid\u63A5\u4E0B\u4F86\u6703\u653E\u5230sha256\u54C8\u5E0C\u51FD\u6578\u4E2D\u57F7\u884C\u4E00\u904D\uFF0C\u6AA2\u67E5\u4ED6\u5011\u7522\u751F\u7684\u516C\u9470\u662F\u5426\u843D\u5728ed25519\u6A62\u5713\u66F2\u7DDA\u4E0A\u3002

    \u5728\u7A0B\u5E8Fid\u548C\u7A2E\u5B50\u4E0A\u904B\u884C\u54C8\u5E0C\u51FD\u6578\u6642\uFF0C\u6709\u5927\u7D0450%\u7684\u6982\u7387\u6703\u5F97\u5230\u5728\u4E00\u500B\u843D\u5728\u6A62\u5713\u66F2\u7DDA\u4E0A\u6709\u6548\u7684\u516C\u9470\u3002\u9019\u7A2E\u60C5\u6CC1\u4E0B\uFF0C\u6211\u5011\u9700\u8981\u5411\u8F38\u5165\u7576\u4E2D\u52A0\u9EDE\u64FE\u52D5\uFF0C\u7565\u5FAE\u6539\u8B8A\u8F38\u5165\uFF0C\u518D\u9032\u884C\u91CD\u8A66\u3002 \u9019\u500B\u64FE\u52D5\u7684\u6280\u8853\u540D\u7A31\u53EBbump\uFF08\u8DF3\u8E8D\uFF09\u3002\u5728Solana\u4E2D\uFF0C\u6211\u5011\u4E00\u958B\u59CB\u6307\u5B9Abump = 255\uFF0C\u7136\u5F8C\u5411\u4E0B\u8FED\u4EE3bump\uFF0C\u5230254\uFF0C253\u7B49\u7B49\u3002\u77E5\u9053\u6211\u5011\u80FD\u5920\u627E\u5230\u4E00\u500B\u4E0D\u5728\u6A62\u5713\u66F2\u7DDA\u4E0A\u7684\u5730\u5740\u7232\u6B62\u3002 \u9019\u500B\u770B\u8D77\u4F86\u7C21\u964B\u7684\u8FA6\u6CD5\u53EF\u4EE5\u8B93\u6211\u5011\u6BCF\u6B21\u751F\u6210PDA\u7684\u6642\u5019\u90FD\u80FD\u5920\u5F97\u5230\u552F\u4E00\u78BA\u5B9A\u7684\u7D50\u679C\u3002

    \u843D\u5728\u6A62\u5713\u66F2\u7DDA\u4E0A\u7684PDA

    \u8207PDA\u4EA4\u4E92

    \u751F\u6210PDA\u7684\u6642\u5019\uFF0CfindProgramAddress\u6703\u628A\u5F97\u5230\u7684\u5730\u5740\u548C\u7528\u4F86\u5C07PDA\u78B0\u649E\u51FA\u6A62\u5713\u66F2\u7DDA\u6240\u7528\u7684bump\u90FD\u8FD4\u56DE\u51FA\u4F86\u3002 \u6709\u4E86\u9019\u500Bbump\uFF0C\u7A0B\u5E8F\u5C31\u53EF\u4EE5\u5C0D\u4EFB\u4F55\u9700\u8981\u9019\u500BPDA\u5730\u5740\u7684\u6307\u4EE4\u9032\u884C\u7C3D\u540D\u3002\u7C3D\u540D\u6642\uFF0C\u7A0B\u5E8F\u8ABF\u7528invoke_signed\u51FD\u6578\uFF0C\u50B3\u5165\u6307\u4EE4\uFF0C\u8CEC\u6236\u5217\u8868\uFF0C\u4EE5\u53CA\u7528\u65BC\u751F\u6210PDA\u7684\u7A2E\u5B50\u548Cbump\u3002 \u9664\u4E86\u7232\u6307\u4EE4\u7C3D\u540D\u4E4B\u5916\uFF0CPDA\u5728\u4ED6\u81EA\u5DF1\u901A\u904Einvoke_signed\u51FD\u6578\u88AB\u5275\u5EFA\u6642\uFF0C\u4E5F\u9700\u8981\u7C3D\u540D\u3002

    ',10),E=o("\u5728\u4F7F\u7528PDA\u7DE8\u5BEB\u7A0B\u5E8F\u6642\uFF0C\u7D93\u5E38\u6703\u5C07\u9019\u500Bbump"),q={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},z=o("\u5B58\u5132\u5728\u9019\u500B\u8CEC\u6236\u672C\u8EAB\u7684\u6578\u64DA\u7576\u4E2D"),F=o("\u3002 \u9019\u7A2E\u6A5F\u5236\u53EF\u4EE5\u8B93\u958B\u767C\u8005\u8F15\u6613\u7684\u5C0DPDA\u9032\u884C\u9A57\u8B49\uFF0C\u800C\u4E0D\u7528\u91CD\u65B0\u5728\u6307\u4EE4\u53C3\u6578\u7576\u4E2D\u50B3\u5165\u9019\u500B\u503C\u3002"),R=e("h2",{id:"\u5176\u4ED6\u8CC7\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u5176\u4ED6\u8CC7\u6599","aria-hidden":"true"},"#"),o(" \u5176\u4ED6\u8CC7\u6599")],-1),T={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},U=o("\u5B98\u65B9\u6587\u6A94"),j={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},G=o("Understanding Program Derived Addresses");function H(J,K){const t=n("ExternalLinkIcon"),s=n("RouterLink");return d(),i(l,null,[u,e("p",null,[g,e("a",b,[f,a(t)]),P]),A,e("div",D,[v,e("ul",null,[x,k,w,e("li",null,[L,e("a",y,[I,a(t)]),N]),S,e("li",null,[V,a(s,{to:"/zh_t/guides/account-maps.html"},{default:c(()=>[B]),_:1})])])]),C,e("p",null,[E,e("a",q,[z,a(t)]),F]),R,e("ul",null,[e("li",null,[e("a",T,[U,a(t)])]),e("li",null,[e("a",j,[G,a(t)])])])],64)}var O=r(m,[["render",H]]);export{O as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.a4275910.js b/docs/.vuepress/dist/assets/pdas.html.6e5a8058.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.a4275910.js rename to docs/.vuepress/dist/assets/pdas.html.6e5a8058.js index 4a5cd3299..2d8249ca0 100644 --- a/docs/.vuepress/dist/assets/pdas.html.a4275910.js +++ b/docs/.vuepress/dist/assets/pdas.html.6e5a8058.js @@ -1 +1 @@ -import{_ as s,r as i,o as r,c as a,a as t,b as c,w as h,F as d,d as n,e as l}from"./app.07ce7a66.js";var g="/assets/account-matrix.c3a79f80.png",u="/assets/pda-curve.7c0b9307.png";const _={},p=t("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),n(" Program Derived Addresses (PDAs)")],-1),m=n("Program Derived Addresses (hay c\xF2n g\u1ECDi v\u1EAFn t\u1EAFt l\xE0 PDA) l\xE0 nh\u1EEFng Account \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF cho c\xE1c Program c\xF3 th\u1EC3 ki\u1EC3m so\xE1t. V\u1EDBi PDA, Program c\xF3 th\u1EC3 l\u1EADp tr\xECnh \u0111\u01B0\u1EE3c ch\u1EEF k\xFD cho m\u1ED9t s\u1ED1 \u0111\u1ECBa ch\u1EC9 c\u1EE5 th\u1EC3 m\xE0 kh\xF4ng c\u1EA7n kho\xE1 ri\xEAng t\u01B0 - private key. PDA l\xE0 c\u01A1 s\u1EDF \u0111\u1EC3 hi\u1EC7n th\u1EF1c "),k={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=n("Cross-Program Invocation"),v=n(", trong \u0111\xF3 Solana cho ph\xE9p c\xE1c Program c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c c\u0169ng nh\u01B0 k\u1EBFt h\u1EE3p v\u1EDBi nhau \u0111\u1EC3 t\u1EA1o n\xEAn m\u1ED9t h\u1EC7 th\u1ED1ng ph\u1EE9c t\u1EA1p h\u01A1n."),P=t("h2",{id:"co-the-ban-chua-biet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#co-the-ban-chua-biet","aria-hidden":"true"},"#"),n(" C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt")],-1),A={class:"custom-container tip"},f=t("p",{class:"custom-container-title"},"Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",-1),D=t("li",null,"PDA l\xE0 m\u1ED9t chu\u1ED7i 32 byte t\u01B0\u01A1ng t\u1EF1 kho\xE1 c\xF4ng khai - public keys, nh\u01B0ng l\u1EA1i kh\xF4ng t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE9ng",-1),y=t("li",null,[t("code",null,"findProgramAddress"),n(" \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 suy ra m\u1ED9t PDA t\u1EEB th\xF4ng tin "),t("code",null,"program_id"),n(" v\xE0 "),t("code",null,"seeds"),n(" (m\u1ED9t t\u1EADp h\u1EE3p c\xE1c bytes)")],-1),x=t("li",null,[n("M\u1ED9t "),t("code",null,"bump"),n(" (c\xF3 gi\xE1 tr\u1ECB 1 byte) \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 t\u1EA1o ra m\u1ED9t PDA kh\u1EA3 d\u0129 n\u1EB1m ngo\xE0i \u0111\u01B0\u1EDDng cong ellipitic ed25519.")],-1),w=n("Program c\xF3 th\u1EC3 t\u1EA1o ra ch\u1EEF k\xFD cho PDA b\u1EB1ng c\xE1ch cung c\u1EA5p "),N=t("code",null,"seeds",-1),V=n(" v\xE0 "),q=t("code",null,"bump",-1),C=n(" cho h\xE0m "),L={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},T=n("invoke_signed"),S=t("li",null,"M\u1ED9t PDA ch\u1EC9 c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c k\xFD b\u1EDFi Program m\xE0 n\xF3 \u0111\u01B0\u1EE3c suy ra.",-1),B=n("Ngo\xE0i vi\u1EC7c cho ph\xE9p Program c\xF3 th\u1EC3 k\xFD l\xEAn c\xE1c instruction, PDA c\u0169ng cung c\u1EA5p m\u1ED9t interface gi\u1ED1ng v\u1EDBi hashmap d\xE0nh cho vi\u1EC7c "),E=n("\u0111\xE1nh ch\u1EC9 s\u1ED1 Account"),I=l('

    Chi ti\u1EBFt

    PDA l\xE0 m\u1ED9t kh\u1ED1i c\u01A1 s\u1EDF cho vi\u1EC7c l\u1EADp tr\xECnh tr\xEAn Solana. V\u1EDBi PDA, Program c\xF3 th\u1EC3 k\xFD cho nhi\u1EC1u Account trong khi \u0111\u1EA3m b\u1EA3o r\u1EB1ng kh\xF4ng t\u1ED3n t\u1EA1i ng\u01B0\u1EDDi d\xF9ng n\xE0o c\xF3 th\u1EC3 gi\u1EA3 m\u1EA1o ch\u1EEF k\xFD cho c\xF9ng Account \u0111\xF3. Ngo\xE0i vi\u1EC7c t\u1EA1o ra ch\u1EEF k\xFD, Program c\u0169ng c\xF3 th\u1EC3 ch\u1EC9nh s\u1EEDa Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi PDA c\u1EE7a n\xF3.

    Accounts matrix

    H\xECnh \u1EA3nh \u0111\u01B0\u1EE3c cho ph\xE9p b\u1EDDi Pencilflip

    C\xE1ch sinh PDA

    \u0110\u1EC3 hi\u1EC3u \u0111\u01B0\u1EE3c kh\xE1i ni\u1EC7m \u0111\u1EB1ng sau PDA, l\xE0 c\u1EA7n thi\u1EBFt \u0111\u1EC3 l\xE0m r\xF5 r\u1EB1ng PDA kh\xF4ng ph\u1EA3i \u0111\u01B0\u1EE3c "t\u1EA1o ra" m\xE0 l\xE0 "t\xECm ra". PDA \u0111\u01B0\u1EE3c sinh ra t\u1EEB qu\xE1 tr\xECnh k\u1EBFt h\u1EE3p gi\u1EEFa seeds (v\xED d\u1EE5 nh\u01B0 chu\u1ED7i k\xFD t\u1EF1 \u201Cvote_account\u201D) v\xE0 program_id. Vi\u1EC7c k\u1EBFt h\u1EE3p n\xE0y \u0111\u01B0\u1EE3c cho qua m\u1ED9t h\xE0m b\u0103m - sha256 - \u0111\u1EC3 th\u1EED xem gi\xE1 tr\u1ECB t\u1EA1o ra c\xF3 ph\u1EA3i l\xE0 m\u1ED9t kho\xE1 c\xF4ng khai n\u1EB1m ngo\xE0i \u0111\u01B0\u1EDDng cong ellipitic ed25519 hay kh\xF4ng.

    Qu\xE1 tr\xECnh th\u1EED n\xE0y s\u1EBD c\xF3 x\xE1c su\u1EA5t 50/50. Ngh\u0129a l\xE0 s\u1EBD c\xF3 50% c\u01A1 h\u1ED9i qu\xE1 tr\xECnh sinh ra m\u1ED9t kho\xE1 c\xF4ng khai n\u1EB1m tr\xEAn \u0111\u01B0\u1EDDng cong ellipitic ed25519. Trong tr\u01B0\u1EDDng h\u1EE3p \u0111\xF3, ch\xFAng ta \u0111\u01A1n gi\u1EA3n ch\u1EC9 c\u1EA7n th\xEAm m\u1ED9t v\xE0i bit v\xE0o \u0111\u1EA7u v\xE0o \u0111\u1EC3 th\u1EED l\u1EA1i. Nh\u1EEFng bit \u0111\u01B0\u1EE3c th\xEAm v\xE0o trong thu\u1EADt ng\u1EEF k\u1EF9 thu\u1EADt \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 bump. Trong Solana, ch\xFAng ta b\u1EAFt \u0111\u1EA7u v\u1EDBi bump = 255 v\xE0 ti\u1EBFp t\u1EE5c gi\u1EA3m xu\u1ED1ng 254, 253 c\u1EE9 th\u1EC3 cho \u0111\u1EBFn khi t\xECm \u0111\u01B0\u1EE3c \u0111\u1ECBa ch\u1EC9 PDA kh\xF4ng n\u1EB1m tr\xEAn \u0111\u01B0\u1EDDng cong ellipitic. Vi\u1EC7c n\xE0y c\xF3 v\u1EBB th\xF4 s\u01A1, nh\u01B0ng th\u1EF1c ra n\xF3 l\u1EA1i cho ch\xFAng ta m\u1ED9t ph\u01B0\u01A1ng ph\xE1p b\u1EA5t bi\u1EBFn \u0111\u1EC3 suy ra PDA cho c\xE1c l\u1EA7n th\u1EED kh\xE1c nhau, mi\u1EC5n l\xE0 c\xF9ng m\u1ED9t gi\xE1 tr\u1ECB \u0111\u1EA7u v\xE0o.

    PDA on the ellipitic curve

    T\u01B0\u01A1ng t\xE1c v\u1EDBi PDAs

    ',9),F=n("Khi m\u1ED9t PDA \u0111\u01B0\u1EE3c sinh ra, "),K=t("code",null,"findProgramAddress",-1),M=n(" s\u1EBD tr\u1EA3 v\u1EC1 hai gi\xE1 tr\u1ECB l\xE0 \u0111\u1ECBa ch\u1EC9 c\u1EE7a PDA v\xE0 "),R=t("code",null,"bump",-1),z=n(" d\xF9ng \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o PDA n\xE0y ngo\xE0i \u0111\u01B0\u1EDDng cong ellipitic. V\u1EDBi gi\xE1 tr\u1ECB "),H=t("code",null,"bump",-1),Q=n(" n\xE0y, Program c\xF3 th\u1EC3 "),U=n("k\xFD l\xEAn"),j=n(" b\u1EA5t k\u1EF3 instruction n\xE0o c\xF3 ch\u1EE9a PDA c\u1EE7a n\xF3 v\u1EC1 sau. \u0110\u1EC3 k\xFD, Program ph\u1EA3i truy\u1EC1n cho instruction m\u1ED9t danh s\xE1ch c\xE1c Account, c\xE1c "),G=t("code",null,"seeds",-1),J=n(" v\xE0 "),O=t("code",null,"bump",-1),W=n(" d\xF9ng \u0111\u1EC3 suy ra PDA v\xE0o h\xE0m "),X=t("code",null,"invoke_signed",-1),Y=n(". Ngo\xE0i vi\u1EC7c k\xFD l\xEAn instruction, PDA c\xF2n k\xFD cho vi\u1EC7c t\u1EA1o ra ch\xEDnh b\u1EA3n th\xE2n n\xF3 th\xF4ng qua h\xE0m "),Z=t("code",null,"invoke_signed",-1),$=n("."),tt=n("Khi ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng v\u1EDBi PDA, th\u01B0\u1EDDng th\xEC b\u1EA1n s\u1EBD ph\u1EA3i "),nt={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},ct=n("l\u01B0u bump"),ot=n(" trong d\u1EEF li\u1EC7u Account. \u0110i\u1EC1u n\xE0y cho ph\xE9p l\u1EADp tr\xECnh vi\xEAn c\xF3 th\u1EC3 ki\u1EC3m tra PDA m\xE0 kh\xF4ng c\u1EA7n truy\u1EC1n bump v\xE0o d\u1EEF li\u1EC7u \u0111\u1EA7u v\xE0o c\u1EE7a instruction."),et=t("h2",{id:"cac-nguon-tai-lieu-khac",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#cac-nguon-tai-lieu-khac","aria-hidden":"true"},"#"),n(),t("a",{name:"resources"}),n(" C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c")],-1),it={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},ht=n("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),st={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},rt=n("Understanding Program Derived Addresses");function at(dt,lt){const o=i("ExternalLinkIcon"),e=i("RouterLink");return r(),a(d,null,[p,t("p",null,[m,t("a",k,[b,c(o)]),v]),P,t("div",A,[f,t("ul",null,[D,y,x,t("li",null,[w,N,V,q,C,t("a",L,[T,c(o)])]),S,t("li",null,[B,c(e,{to:"/vi/guides/account-maps.html"},{default:h(()=>[E]),_:1})])])]),I,t("p",null,[F,K,M,R,z,H,Q,c(e,{to:"/vi/references/accounts.html#sign-with-a-pda"},{default:h(()=>[U]),_:1}),j,G,J,O,W,X,Y,Z,$]),t("p",null,[tt,t("a",nt,[ct,c(o)]),ot]),et,t("ul",null,[t("li",null,[t("a",it,[ht,c(o)])]),t("li",null,[t("a",st,[rt,c(o)])])])],64)}var ut=s(_,[["render",at]]);export{ut as default}; +import{_ as s,r as i,o as r,c as a,a as t,b as c,w as h,F as d,d as n,e as l}from"./app.d411e3b3.js";var g="/assets/account-matrix.c3a79f80.png",u="/assets/pda-curve.7c0b9307.png";const _={},p=t("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),n(" Program Derived Addresses (PDAs)")],-1),m=n("Program Derived Addresses (hay c\xF2n g\u1ECDi v\u1EAFn t\u1EAFt l\xE0 PDA) l\xE0 nh\u1EEFng Account \u0111\u01B0\u1EE3c thi\u1EBFt k\u1EBF cho c\xE1c Program c\xF3 th\u1EC3 ki\u1EC3m so\xE1t. V\u1EDBi PDA, Program c\xF3 th\u1EC3 l\u1EADp tr\xECnh \u0111\u01B0\u1EE3c ch\u1EEF k\xFD cho m\u1ED9t s\u1ED1 \u0111\u1ECBa ch\u1EC9 c\u1EE5 th\u1EC3 m\xE0 kh\xF4ng c\u1EA7n kho\xE1 ri\xEAng t\u01B0 - private key. PDA l\xE0 c\u01A1 s\u1EDF \u0111\u1EC3 hi\u1EC7n th\u1EF1c "),k={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=n("Cross-Program Invocation"),v=n(", trong \u0111\xF3 Solana cho ph\xE9p c\xE1c Program c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c c\u0169ng nh\u01B0 k\u1EBFt h\u1EE3p v\u1EDBi nhau \u0111\u1EC3 t\u1EA1o n\xEAn m\u1ED9t h\u1EC7 th\u1ED1ng ph\u1EE9c t\u1EA1p h\u01A1n."),P=t("h2",{id:"co-the-ban-chua-biet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#co-the-ban-chua-biet","aria-hidden":"true"},"#"),n(" C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt")],-1),A={class:"custom-container tip"},f=t("p",{class:"custom-container-title"},"Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",-1),D=t("li",null,"PDA l\xE0 m\u1ED9t chu\u1ED7i 32 byte t\u01B0\u01A1ng t\u1EF1 kho\xE1 c\xF4ng khai - public keys, nh\u01B0ng l\u1EA1i kh\xF4ng t\u1ED3n t\u1EA1i kho\xE1 ri\xEAng t\u01B0 t\u01B0\u01A1ng \u1EE9ng",-1),y=t("li",null,[t("code",null,"findProgramAddress"),n(" \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 suy ra m\u1ED9t PDA t\u1EEB th\xF4ng tin "),t("code",null,"program_id"),n(" v\xE0 "),t("code",null,"seeds"),n(" (m\u1ED9t t\u1EADp h\u1EE3p c\xE1c bytes)")],-1),x=t("li",null,[n("M\u1ED9t "),t("code",null,"bump"),n(" (c\xF3 gi\xE1 tr\u1ECB 1 byte) \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 t\u1EA1o ra m\u1ED9t PDA kh\u1EA3 d\u0129 n\u1EB1m ngo\xE0i \u0111\u01B0\u1EDDng cong ellipitic ed25519.")],-1),w=n("Program c\xF3 th\u1EC3 t\u1EA1o ra ch\u1EEF k\xFD cho PDA b\u1EB1ng c\xE1ch cung c\u1EA5p "),N=t("code",null,"seeds",-1),V=n(" v\xE0 "),q=t("code",null,"bump",-1),C=n(" cho h\xE0m "),L={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},T=n("invoke_signed"),S=t("li",null,"M\u1ED9t PDA ch\u1EC9 c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c k\xFD b\u1EDFi Program m\xE0 n\xF3 \u0111\u01B0\u1EE3c suy ra.",-1),B=n("Ngo\xE0i vi\u1EC7c cho ph\xE9p Program c\xF3 th\u1EC3 k\xFD l\xEAn c\xE1c instruction, PDA c\u0169ng cung c\u1EA5p m\u1ED9t interface gi\u1ED1ng v\u1EDBi hashmap d\xE0nh cho vi\u1EC7c "),E=n("\u0111\xE1nh ch\u1EC9 s\u1ED1 Account"),I=l('

    Chi ti\u1EBFt

    PDA l\xE0 m\u1ED9t kh\u1ED1i c\u01A1 s\u1EDF cho vi\u1EC7c l\u1EADp tr\xECnh tr\xEAn Solana. V\u1EDBi PDA, Program c\xF3 th\u1EC3 k\xFD cho nhi\u1EC1u Account trong khi \u0111\u1EA3m b\u1EA3o r\u1EB1ng kh\xF4ng t\u1ED3n t\u1EA1i ng\u01B0\u1EDDi d\xF9ng n\xE0o c\xF3 th\u1EC3 gi\u1EA3 m\u1EA1o ch\u1EEF k\xFD cho c\xF9ng Account \u0111\xF3. Ngo\xE0i vi\u1EC7c t\u1EA1o ra ch\u1EEF k\xFD, Program c\u0169ng c\xF3 th\u1EC3 ch\u1EC9nh s\u1EEDa Account \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi PDA c\u1EE7a n\xF3.

    Accounts matrix

    H\xECnh \u1EA3nh \u0111\u01B0\u1EE3c cho ph\xE9p b\u1EDDi Pencilflip

    C\xE1ch sinh PDA

    \u0110\u1EC3 hi\u1EC3u \u0111\u01B0\u1EE3c kh\xE1i ni\u1EC7m \u0111\u1EB1ng sau PDA, l\xE0 c\u1EA7n thi\u1EBFt \u0111\u1EC3 l\xE0m r\xF5 r\u1EB1ng PDA kh\xF4ng ph\u1EA3i \u0111\u01B0\u1EE3c "t\u1EA1o ra" m\xE0 l\xE0 "t\xECm ra". PDA \u0111\u01B0\u1EE3c sinh ra t\u1EEB qu\xE1 tr\xECnh k\u1EBFt h\u1EE3p gi\u1EEFa seeds (v\xED d\u1EE5 nh\u01B0 chu\u1ED7i k\xFD t\u1EF1 \u201Cvote_account\u201D) v\xE0 program_id. Vi\u1EC7c k\u1EBFt h\u1EE3p n\xE0y \u0111\u01B0\u1EE3c cho qua m\u1ED9t h\xE0m b\u0103m - sha256 - \u0111\u1EC3 th\u1EED xem gi\xE1 tr\u1ECB t\u1EA1o ra c\xF3 ph\u1EA3i l\xE0 m\u1ED9t kho\xE1 c\xF4ng khai n\u1EB1m ngo\xE0i \u0111\u01B0\u1EDDng cong ellipitic ed25519 hay kh\xF4ng.

    Qu\xE1 tr\xECnh th\u1EED n\xE0y s\u1EBD c\xF3 x\xE1c su\u1EA5t 50/50. Ngh\u0129a l\xE0 s\u1EBD c\xF3 50% c\u01A1 h\u1ED9i qu\xE1 tr\xECnh sinh ra m\u1ED9t kho\xE1 c\xF4ng khai n\u1EB1m tr\xEAn \u0111\u01B0\u1EDDng cong ellipitic ed25519. Trong tr\u01B0\u1EDDng h\u1EE3p \u0111\xF3, ch\xFAng ta \u0111\u01A1n gi\u1EA3n ch\u1EC9 c\u1EA7n th\xEAm m\u1ED9t v\xE0i bit v\xE0o \u0111\u1EA7u v\xE0o \u0111\u1EC3 th\u1EED l\u1EA1i. Nh\u1EEFng bit \u0111\u01B0\u1EE3c th\xEAm v\xE0o trong thu\u1EADt ng\u1EEF k\u1EF9 thu\u1EADt \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 bump. Trong Solana, ch\xFAng ta b\u1EAFt \u0111\u1EA7u v\u1EDBi bump = 255 v\xE0 ti\u1EBFp t\u1EE5c gi\u1EA3m xu\u1ED1ng 254, 253 c\u1EE9 th\u1EC3 cho \u0111\u1EBFn khi t\xECm \u0111\u01B0\u1EE3c \u0111\u1ECBa ch\u1EC9 PDA kh\xF4ng n\u1EB1m tr\xEAn \u0111\u01B0\u1EDDng cong ellipitic. Vi\u1EC7c n\xE0y c\xF3 v\u1EBB th\xF4 s\u01A1, nh\u01B0ng th\u1EF1c ra n\xF3 l\u1EA1i cho ch\xFAng ta m\u1ED9t ph\u01B0\u01A1ng ph\xE1p b\u1EA5t bi\u1EBFn \u0111\u1EC3 suy ra PDA cho c\xE1c l\u1EA7n th\u1EED kh\xE1c nhau, mi\u1EC5n l\xE0 c\xF9ng m\u1ED9t gi\xE1 tr\u1ECB \u0111\u1EA7u v\xE0o.

    PDA on the ellipitic curve

    T\u01B0\u01A1ng t\xE1c v\u1EDBi PDAs

    ',9),F=n("Khi m\u1ED9t PDA \u0111\u01B0\u1EE3c sinh ra, "),K=t("code",null,"findProgramAddress",-1),M=n(" s\u1EBD tr\u1EA3 v\u1EC1 hai gi\xE1 tr\u1ECB l\xE0 \u0111\u1ECBa ch\u1EC9 c\u1EE7a PDA v\xE0 "),R=t("code",null,"bump",-1),z=n(" d\xF9ng \u0111\u1EC3 \u0111\u1EA3m b\u1EA3o PDA n\xE0y ngo\xE0i \u0111\u01B0\u1EDDng cong ellipitic. V\u1EDBi gi\xE1 tr\u1ECB "),H=t("code",null,"bump",-1),Q=n(" n\xE0y, Program c\xF3 th\u1EC3 "),U=n("k\xFD l\xEAn"),j=n(" b\u1EA5t k\u1EF3 instruction n\xE0o c\xF3 ch\u1EE9a PDA c\u1EE7a n\xF3 v\u1EC1 sau. \u0110\u1EC3 k\xFD, Program ph\u1EA3i truy\u1EC1n cho instruction m\u1ED9t danh s\xE1ch c\xE1c Account, c\xE1c "),G=t("code",null,"seeds",-1),J=n(" v\xE0 "),O=t("code",null,"bump",-1),W=n(" d\xF9ng \u0111\u1EC3 suy ra PDA v\xE0o h\xE0m "),X=t("code",null,"invoke_signed",-1),Y=n(". Ngo\xE0i vi\u1EC7c k\xFD l\xEAn instruction, PDA c\xF2n k\xFD cho vi\u1EC7c t\u1EA1o ra ch\xEDnh b\u1EA3n th\xE2n n\xF3 th\xF4ng qua h\xE0m "),Z=t("code",null,"invoke_signed",-1),$=n("."),tt=n("Khi ph\xE1t tri\u1EC3n \u1EE9ng d\u1EE5ng v\u1EDBi PDA, th\u01B0\u1EDDng th\xEC b\u1EA1n s\u1EBD ph\u1EA3i "),nt={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},ct=n("l\u01B0u bump"),ot=n(" trong d\u1EEF li\u1EC7u Account. \u0110i\u1EC1u n\xE0y cho ph\xE9p l\u1EADp tr\xECnh vi\xEAn c\xF3 th\u1EC3 ki\u1EC3m tra PDA m\xE0 kh\xF4ng c\u1EA7n truy\u1EC1n bump v\xE0o d\u1EEF li\u1EC7u \u0111\u1EA7u v\xE0o c\u1EE7a instruction."),et=t("h2",{id:"cac-nguon-tai-lieu-khac",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#cac-nguon-tai-lieu-khac","aria-hidden":"true"},"#"),n(),t("a",{name:"resources"}),n(" C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c")],-1),it={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},ht=n("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),st={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},rt=n("Understanding Program Derived Addresses");function at(dt,lt){const o=i("ExternalLinkIcon"),e=i("RouterLink");return r(),a(d,null,[p,t("p",null,[m,t("a",k,[b,c(o)]),v]),P,t("div",A,[f,t("ul",null,[D,y,x,t("li",null,[w,N,V,q,C,t("a",L,[T,c(o)])]),S,t("li",null,[B,c(e,{to:"/vi/guides/account-maps.html"},{default:h(()=>[E]),_:1})])])]),I,t("p",null,[F,K,M,R,z,H,Q,c(e,{to:"/vi/references/accounts.html#sign-with-a-pda"},{default:h(()=>[U]),_:1}),j,G,J,O,W,X,Y,Z,$]),t("p",null,[tt,t("a",nt,[ct,c(o)]),ot]),et,t("ul",null,[t("li",null,[t("a",it,[ht,c(o)])]),t("li",null,[t("a",st,[rt,c(o)])])])],64)}var ut=s(_,[["render",at]]);export{ut as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.08e26e07.js b/docs/.vuepress/dist/assets/pdas.html.8eaf91cc.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.08e26e07.js rename to docs/.vuepress/dist/assets/pdas.html.8eaf91cc.js index e355ca511..8ff11a877 100644 --- a/docs/.vuepress/dist/assets/pdas.html.08e26e07.js +++ b/docs/.vuepress/dist/assets/pdas.html.8eaf91cc.js @@ -1 +1 @@ -import{_ as o,r as s,o as r,c as d,a,b as g,w as t,F as l,d as n,e as m}from"./app.07ce7a66.js";var p="/assets/account-matrix.c3a79f80.png",c="/assets/pda-curve.7c0b9307.png";const u={},h=a("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),n(" Program Derived Addresses (PDAs)")],-1),_=n("Ang Program Derived Addresses (Mga PDA) ay tahanan ng mga account na idinisenyo upang kontrolin ng isang partikular na programa. Sa mga PDA, ang mga programa ay maaaring mag-sign program para sa ilang partikular na address nang hindi nangangailangan ng pribadong key. Ang mga PDA ay nagsisilbing pundasyon para sa "),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},k=n("Cross-Program Invocation"),y=n(", na nagbibigay-daan sa mga Solana app na maging composable sa isa't isa."),f=a("h2",{id:"facts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),A={class:"custom-container tip"},P=a("p",{class:"custom-container-title"},"Fact Sheet",-1),v=a("li",null,"Ang mga PDA ay 32 byte string na mukhang mga pampublikong key, ngunit walang kaukulang pribadong key",-1),D=a("li",null,[n("Ang "),a("code",null,"findProgramAddress"),n(" ay tiyak na kukuha ng PDA mula sa isang programId at mga buto (koleksyon ng mga byte)")],-1),w=a("li",null,"Isang bump (isang byte) ang ginagamit upang itulak ang isang potensyal na PDA mula sa ed25519 elliptic curve",-1),x=n("Maaaring mag-sign ang mga program para sa kanilang mga PDA sa pamamagitan ng pagbibigay ng mga buto at bump sa "),S={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},I=n("invoke_signed"),B=a("li",null,"Ang isang PDA ay maaari lamang pirmahan ng programa kung saan ito hinango",-1),L=n("Bilang karagdagan sa pagpapahintulot sa mga programa na mag-sign para sa iba't ibang mga instruction, ang mga PDA ay nagbibigay din ng isang interface na parang hashmap para sa "),N=n("mga indexing account"),F=m('

    Deep Dive

    Ang mga PDA ay isang mahalagang building block para sa pagbuo ng mga programa sa Solana. Sa mga PDA, maaaring mag-sign ang mga program para sa mga account habang ginagarantiyahan na walang external na user ang makakabuo din ng wastong lagda para sa parehong account. Bilang karagdagan sa pag-sign para sa mga account, maaari ding baguhin ng ilang programa ang mga account na hawak sa kanilang mga PDA.

    Accounts matrix

    Larawan ng kagandahang-loob ni Pencilflip

    Generating PDAs

    Upang maunawaan ang konsepto sa likod ng mga PDA, maaaring makatulong na isaalang-alang na ang mga PDA ay hindi teknikal na nilikha, ngunit sa halip ay natagpuan. Ang mga PDA ay nabuo mula sa kumbinasyon ng mga buto (gaya ng string \u201Cvote_account\u201D) at isang program id. Ang kumbinasyong ito ng mga buto at program id ay pinapatakbo sa pamamagitan ng sha256 hash function upang makita kung bumubuo sila ng pampublikong key na nasa ed25519 elliptic curve o hindi.

    Sa pagpapatakbo ng aming program id at seeds sa pamamagitan ng hash function, mayroong ~50% na pagkakataon na talagang magkakaroon kami ng wastong pampublikong key na nasa elliptic curve. Sa kasong ito, nagdaragdag lang kami ng isang bagay upang i-fudge ang aming input nang kaunti at subukang muli. Ang teknikal na termino para sa fudge factor na ito ay isang bump. Sa Solana, magsisimula tayo sa bump = 255 at umulit lang pababa sa bump = 254, bump = 253, atbp. hanggang sa makakuha tayo ng address na wala sa elliptic curve. Ito ay maaaring mukhang pasimula, ngunit kapag nahanap na ito ay nagbibigay sa amin ng isang tiyak na paraan ng pagkuha ng parehong PDA nang paulit-ulit.

    PDA on the ellipitic curve

    Interacting with PDAs

    ',9),V=n("When a PDA is generated, "),C=a("code",null,"findProgramAddress",-1),E=n(" will return both the address and Kapag nabuo ang isang PDA, ibabalik ng "),R=a("code",null,"findProgramAddress",-1),U=n(" ang address at ang bump na ginamit upang maalis ang address sa elliptic curve. Gamit ang bump na ito, ang isang program ay maaaring "),G=n("mag-sign"),K=n(" para sa anumang pagtuturo na nangangailangan ng PDA nito. Upang makapirma, dapat na ipasa ng mga programa ang pagtuturo, ang listahan ng mga account, at ang mga buto at bump na ginamit upang gawing "),M=a("code",null,"invoke_signed",-1),O=n(" ang PDA. Bilang karagdagan sa pag-sign para sa mga instruction, dapat ding pumirma ang mga PDA para sa sarili nilang paggawa sa pamamagitan ng "),z=a("code",null,"invoke_signed",-1),T=n("."),W=n("Kapag nagtatayo gamit ang mga PDA, karaniwan nang "),j={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},q=n("imbakin ang bump seed"),H=n(" sa mismong data ng account. Nagbibigay-daan ito sa mga developer na madaling ma-validate ang isang PDA nang hindi kinakailangang pumasa sa bump bilang argumento ng pagtuturo."),J=a("h2",{id:"other-resources",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),n(" Other Resources")],-1),Q={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},X=n("Official Documentation"),Y={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},Z=n("Understanding Program Derived Addresses");function $(aa,na){const i=s("ExternalLinkIcon"),e=s("RouterLink");return r(),d(l,null,[h,a("p",null,[_,a("a",b,[k,g(i)]),y]),f,a("div",A,[P,a("ul",null,[v,D,w,a("li",null,[x,a("a",S,[I,g(i)])]),B,a("li",null,[L,g(e,{to:"/fil/guides/account-maps.html"},{default:t(()=>[N]),_:1})])])]),F,a("p",null,[V,C,E,R,U,g(e,{to:"/fil/references/accounts.html#sign-with-a-pda"},{default:t(()=>[G]),_:1}),K,M,O,z,T]),a("p",null,[W,a("a",j,[q,g(i)]),H]),J,a("ul",null,[a("li",null,[a("a",Q,[X,g(i)])]),a("li",null,[a("a",Y,[Z,g(i)])])])],64)}var ia=o(u,[["render",$]]);export{ia as default}; +import{_ as o,r as s,o as r,c as d,a,b as g,w as t,F as l,d as n,e as m}from"./app.d411e3b3.js";var p="/assets/account-matrix.c3a79f80.png",c="/assets/pda-curve.7c0b9307.png";const u={},h=a("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),n(" Program Derived Addresses (PDAs)")],-1),_=n("Ang Program Derived Addresses (Mga PDA) ay tahanan ng mga account na idinisenyo upang kontrolin ng isang partikular na programa. Sa mga PDA, ang mga programa ay maaaring mag-sign program para sa ilang partikular na address nang hindi nangangailangan ng pribadong key. Ang mga PDA ay nagsisilbing pundasyon para sa "),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},k=n("Cross-Program Invocation"),y=n(", na nagbibigay-daan sa mga Solana app na maging composable sa isa't isa."),f=a("h2",{id:"facts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),A={class:"custom-container tip"},P=a("p",{class:"custom-container-title"},"Fact Sheet",-1),v=a("li",null,"Ang mga PDA ay 32 byte string na mukhang mga pampublikong key, ngunit walang kaukulang pribadong key",-1),D=a("li",null,[n("Ang "),a("code",null,"findProgramAddress"),n(" ay tiyak na kukuha ng PDA mula sa isang programId at mga buto (koleksyon ng mga byte)")],-1),w=a("li",null,"Isang bump (isang byte) ang ginagamit upang itulak ang isang potensyal na PDA mula sa ed25519 elliptic curve",-1),x=n("Maaaring mag-sign ang mga program para sa kanilang mga PDA sa pamamagitan ng pagbibigay ng mga buto at bump sa "),S={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},I=n("invoke_signed"),B=a("li",null,"Ang isang PDA ay maaari lamang pirmahan ng programa kung saan ito hinango",-1),L=n("Bilang karagdagan sa pagpapahintulot sa mga programa na mag-sign para sa iba't ibang mga instruction, ang mga PDA ay nagbibigay din ng isang interface na parang hashmap para sa "),N=n("mga indexing account"),F=m('

    Deep Dive

    Ang mga PDA ay isang mahalagang building block para sa pagbuo ng mga programa sa Solana. Sa mga PDA, maaaring mag-sign ang mga program para sa mga account habang ginagarantiyahan na walang external na user ang makakabuo din ng wastong lagda para sa parehong account. Bilang karagdagan sa pag-sign para sa mga account, maaari ding baguhin ng ilang programa ang mga account na hawak sa kanilang mga PDA.

    Accounts matrix

    Larawan ng kagandahang-loob ni Pencilflip

    Generating PDAs

    Upang maunawaan ang konsepto sa likod ng mga PDA, maaaring makatulong na isaalang-alang na ang mga PDA ay hindi teknikal na nilikha, ngunit sa halip ay natagpuan. Ang mga PDA ay nabuo mula sa kumbinasyon ng mga buto (gaya ng string \u201Cvote_account\u201D) at isang program id. Ang kumbinasyong ito ng mga buto at program id ay pinapatakbo sa pamamagitan ng sha256 hash function upang makita kung bumubuo sila ng pampublikong key na nasa ed25519 elliptic curve o hindi.

    Sa pagpapatakbo ng aming program id at seeds sa pamamagitan ng hash function, mayroong ~50% na pagkakataon na talagang magkakaroon kami ng wastong pampublikong key na nasa elliptic curve. Sa kasong ito, nagdaragdag lang kami ng isang bagay upang i-fudge ang aming input nang kaunti at subukang muli. Ang teknikal na termino para sa fudge factor na ito ay isang bump. Sa Solana, magsisimula tayo sa bump = 255 at umulit lang pababa sa bump = 254, bump = 253, atbp. hanggang sa makakuha tayo ng address na wala sa elliptic curve. Ito ay maaaring mukhang pasimula, ngunit kapag nahanap na ito ay nagbibigay sa amin ng isang tiyak na paraan ng pagkuha ng parehong PDA nang paulit-ulit.

    PDA on the ellipitic curve

    Interacting with PDAs

    ',9),V=n("When a PDA is generated, "),C=a("code",null,"findProgramAddress",-1),E=n(" will return both the address and Kapag nabuo ang isang PDA, ibabalik ng "),R=a("code",null,"findProgramAddress",-1),U=n(" ang address at ang bump na ginamit upang maalis ang address sa elliptic curve. Gamit ang bump na ito, ang isang program ay maaaring "),G=n("mag-sign"),K=n(" para sa anumang pagtuturo na nangangailangan ng PDA nito. Upang makapirma, dapat na ipasa ng mga programa ang pagtuturo, ang listahan ng mga account, at ang mga buto at bump na ginamit upang gawing "),M=a("code",null,"invoke_signed",-1),O=n(" ang PDA. Bilang karagdagan sa pag-sign para sa mga instruction, dapat ding pumirma ang mga PDA para sa sarili nilang paggawa sa pamamagitan ng "),z=a("code",null,"invoke_signed",-1),T=n("."),W=n("Kapag nagtatayo gamit ang mga PDA, karaniwan nang "),j={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},q=n("imbakin ang bump seed"),H=n(" sa mismong data ng account. Nagbibigay-daan ito sa mga developer na madaling ma-validate ang isang PDA nang hindi kinakailangang pumasa sa bump bilang argumento ng pagtuturo."),J=a("h2",{id:"other-resources",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),n(" Other Resources")],-1),Q={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},X=n("Official Documentation"),Y={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},Z=n("Understanding Program Derived Addresses");function $(aa,na){const i=s("ExternalLinkIcon"),e=s("RouterLink");return r(),d(l,null,[h,a("p",null,[_,a("a",b,[k,g(i)]),y]),f,a("div",A,[P,a("ul",null,[v,D,w,a("li",null,[x,a("a",S,[I,g(i)])]),B,a("li",null,[L,g(e,{to:"/fil/guides/account-maps.html"},{default:t(()=>[N]),_:1})])])]),F,a("p",null,[V,C,E,R,U,g(e,{to:"/fil/references/accounts.html#sign-with-a-pda"},{default:t(()=>[G]),_:1}),K,M,O,z,T]),a("p",null,[W,a("a",j,[q,g(i)]),H]),J,a("ul",null,[a("li",null,[a("a",Q,[X,g(i)])]),a("li",null,[a("a",Y,[Z,g(i)])])])],64)}var ia=o(u,[["render",$]]);export{ia as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.da9ce228.js b/docs/.vuepress/dist/assets/pdas.html.929e2544.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.da9ce228.js rename to docs/.vuepress/dist/assets/pdas.html.929e2544.js index 0a3ead04a..5fb443090 100644 --- a/docs/.vuepress/dist/assets/pdas.html.da9ce228.js +++ b/docs/.vuepress/dist/assets/pdas.html.929e2544.js @@ -1 +1 @@ -import{_ as i,r as a,o as d,c,a as e,b as r,w as n,F as l,d as s,e as p}from"./app.07ce7a66.js";var _="/assets/account-matrix.c3a79f80.png",h="/assets/pda-curve.7c0b9307.png";const m={},u=e("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),s(" Program Derived Addresses (PDAs)")],-1),g=s("Program Derived Addresses (PDAs) \u0E04\u0E37\u0E2D\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E42\u0E22\u0E07\u0E01\u0E31\u0E1A accounts \u0E17\u0E35\u0E48\u0E2D\u0E2D\u0E01\u0E41\u0E1A\u0E1A\u0E21\u0E32\u0E43\u0E2B\u0E49\u0E16\u0E39\u0E01\u0E04\u0E27\u0E1A\u0E04\u0E38\u0E21\u0E42\u0E14\u0E22 program \u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49. \u0E16\u0E49\u0E32\u0E21\u0E35 PDAs \u0E15\u0E31\u0E27 programs \u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 program (programmatically sign) \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A addresses \u0E17\u0E35\u0E48\u0E40\u0E08\u0E32\u0E30\u0E08\u0E07\u0E44\u0E27\u0E49\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 private key. PDAs \u0E21\u0E35\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E33 CPI "),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=s("Cross-Program Invocation"),v=s(", \u0E42\u0E14\u0E22\u0E08\u0E30\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15 Solana apps \u0E43\u0E2B\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19 (composable) \u200B\u0E01\u0E31\u0E1A program \u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E44\u0E14\u0E49."),P=e("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),A={class:"custom-container tip"},D=e("p",{class:"custom-container-title"},"Fact Sheet",-1),k=e("li",null,"PDAs \u0E04\u0E37\u0E2D 32 byte strings \u0E17\u0E35\u0E48\u0E14\u0E39\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 public keys, \u0E41\u0E15\u0E48\u0E08\u0E30\u0E44\u0E21\u0E48\u0E21\u0E35 private keys",-1),x=e("li",null,[e("code",null,"findProgramAddress"),s(" \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14(derive) \u0E41\u0E1A\u0E1A deterministic \u0E40\u0E1B\u0E47\u0E19 PDA \u0E08\u0E32\u0E01 programId \u0E41\u0E25\u0E30 seeds (\u0E0A\u0E38\u0E14\u0E02\u0E2D\u0E07 bytes)")],-1),y=e("li",null,"bump (1 byte) \u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E2D\u0E01\u0E32\u0E2A\u0E17\u0E35\u0E48 PDA \u0E08\u0E30\u0E2B\u0E25\u0E38\u0E14\u0E08\u0E32\u0E01 ed25519 elliptic curve",-1),w=s("Programs \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E43\u0E2B\u0E49 PDAs \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 seeds \u0E41\u0E25\u0E30 bump \u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23 "),I={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},L=s("invoke_signed"),S=e("li",null,"PDA \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E14\u0E49\u0E27\u0E22 program \u0E17\u0E35\u0E48\u0E21\u0E31\u0E19 derived \u0E21\u0E32\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",-1),C=s("\u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 programs \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E43\u0E19 instructions \u0E17\u0E35\u0E48\u0E15\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19, PDAs \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 interface \u0E04\u0E25\u0E49\u0E32\u0E22\u0E46 hashmap \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A "),N=s("indexing accounts"),V=p('

    \u0E25\u0E07\u0E25\u0E36\u0E01

    PDAs \u0E04\u0E37\u0E2D\u0E2A\u0E48\u0E27\u0E19\u0E2A\u0E33\u0E04\u0E31\u0E0D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32 programs \u0E1A\u0E19 Solana. \u0E16\u0E49\u0E32\u0E21\u0E35 PDAs, programs \u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E41\u0E17\u0E19 accounts \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49\u0E27\u0E48\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E21\u0E35 user \u0E2D\u0E37\u0E48\u0E19\u0E21\u0E32\u0E2A\u0E23\u0E49\u0E32\u0E07 signature \u0E17\u0E35\u0E48\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49. \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E17\u0E35\u0E48\u0E08\u0E30 sign \u0E41\u0E17\u0E19 account \u0E44\u0E14\u0E49\u0E41\u0E25\u0E49\u0E27 \u0E1A\u0E32\u0E07 programs \u0E22\u0E31\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 accounts \u0E17\u0E35\u0E48\u0E21\u0E31\u0E19\u0E16\u0E37\u0E2D PDAs \u0E44\u0E27\u0E49\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22

    Accounts matrix

    Image courtesy of Pencilflip

    \u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 PDAs

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E2B\u0E25\u0E31\u0E01\u0E01\u0E32\u0E23\u0E40\u0E1A\u0E37\u0E49\u0E2D\u0E07\u0E2B\u0E25\u0E31\u0E07 PDAs, \u0E40\u0E23\u0E32\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E01\u0E48\u0E2D\u0E19\u0E27\u0E48\u0E32 PDAs \u0E08\u0E23\u0E34\u0E07\u0E46 \u0E41\u0E25\u0E49\u0E27\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E41\u0E15\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E08\u0E19\u0E40\u0E08\u0E2D. PDAs \u0E40\u0E01\u0E34\u0E14\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E1C\u0E2A\u0E21 seeds (\u0E40\u0E0A\u0E48\u0E19 \u201Cvote_account\u201D) \u0E41\u0E25\u0E30 program id. \u0E01\u0E32\u0E23\u0E1C\u0E2A\u0E21\u0E01\u0E31\u0E19\u0E02\u0E2D\u0E07 seeds \u0E41\u0E25\u0E30 program id \u0E08\u0E30 run \u0E1C\u0E48\u0E32\u0E19 sha256 hash function \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E27\u0E48\u0E32 public key \u0E19\u0E31\u0E49\u0E19\u0E15\u0E01\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 ed25519 elliptic curve \u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48.

    \u0E43\u0E19\u0E01\u0E32\u0E23 run program id \u0E41\u0E25\u0E30 seeds \u0E1C\u0E48\u0E32\u0E19 hash function \u0E08\u0E30\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E1B\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 ~50% \u0E17\u0E35\u0E48\u0E08\u0E30\u0E44\u0E14\u0E49 valid public key \u0E17\u0E35\u0E48\u0E15\u0E01\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 elliptic curve. \u0E43\u0E19\u0E01\u0E23\u0E13\u0E35\u0E19\u0E35\u0E49 \u0E08\u0E30\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E41\u0E01\u0E25\u0E49\u0E07 (fudge) \u0E43\u0E2B\u0E49 input \u0E02\u0E22\u0E31\u0E1A\u0E44\u0E1B\u0E19\u0E34\u0E14\u0E2B\u0E19\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27\u0E01\u0E47\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07. \u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E17\u0E32\u0E07\u0E40\u0E17\u0E04\u0E19\u0E34\u0E04\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23 fudge \u0E19\u0E35\u0E49\u0E01\u0E47\u0E04\u0E37\u0E2D bump. \u0E43\u0E19 Solana, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22 bump = 255 \u0E41\u0E25\u0E30\u0E04\u0E48\u0E2D\u0E22\u0E46 \u0E25\u0E14\u0E25\u0E07\u0E40\u0E1B\u0E47\u0E19 bump = 254, bump = 253, \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E22\u0E46 \u0E08\u0E19\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49 address \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 elliptic curve. \u0E19\u0E35\u0E48\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E1F\u0E31\u0E07\u0E14\u0E39\u0E07\u0E48\u0E32\u0E22\u0E46 \u0E41\u0E15\u0E48\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E21\u0E31\u0E19\u0E40\u0E08\u0E2D address \u0E21\u0E31\u0E19\u0E01\u0E47\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E27\u0E34\u0E18\u0E35\u0E43\u0E19\u0E41\u0E1A\u0E1A deterministic \u0E17\u0E35\u0E48\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 derive PDA \u0E40\u0E14\u0E34\u0E21\u0E2D\u0E2D\u0E01\u0E21\u0E32\u0E44\u0E14\u0E49.

    PDA on the ellipitic curve

    \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 PDAs

    ',9),B=s("\u0E40\u0E21\u0E37\u0E48\u0E2D PDA \u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E21\u0E32\u0E41\u0E25\u0E49\u0E27, "),E=e("code",null,"findProgramAddress",-1),F=s(" \u0E08\u0E30\u0E04\u0E37\u0E19 address \u0E41\u0E25\u0E30 bump \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E40\u0E15\u0E30 address \u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01 elliptic curve. \u0E16\u0E49\u0E32\u0E21\u0E35 bump \u0E19\u0E35\u0E49, program \u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 "),R=s("sign"),z=s(" instruction \u0E43\u0E14\u0E46\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 PDA. \u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E08\u0E30 sign, \u0E15\u0E31\u0E27 programs \u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 instruction, list \u0E02\u0E2D\u0E07 accounts, \u0E41\u0E25\u0E30 seeds \u0E01\u0E31\u0E1A bump \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 derive \u0E15\u0E31\u0E27 PDA \u0E44\u0E1B "),O=e("code",null,"invoke_signed",-1),T=s(". \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E19\u0E35\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23 sign \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A instructions, PDAs \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07 sign \u0E1C\u0E48\u0E32\u0E19 "),U=e("code",null,"invoke_signed",-1),j=s(" \u0E14\u0E49\u0E27\u0E22."),q=s("\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E08\u0E30\u0E43\u0E0A\u0E49 PDAs, \u0E21\u0E31\u0E19\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E1B\u0E01\u0E15\u0E34\u0E17\u0E35\u0E48\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07 "),G={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},H=s("\u0E40\u0E01\u0E47\u0E1A bump seed"),J=s(" \u0E44\u0E27\u0E49\u0E43\u0E19 account data \u0E19\u0E31\u0E49\u0E19\u0E46 \u0E14\u0E49\u0E27\u0E22. \u0E21\u0E31\u0E19\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A PDA \u0E44\u0E14\u0E49\u0E07\u0E48\u0E32\u0E22\u0E02\u0E36\u0E49\u0E19\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 bump \u0E21\u0E32\u0E43\u0E19 instruction argument."),K=e("h2",{id:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19","aria-hidden":"true"},"#"),s(" \u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19")],-1),M={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},Q=s("Official Documentation"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=s("Understanding Program Derived Addresses");function Y(Z,$){const o=a("ExternalLinkIcon"),t=a("RouterLink");return d(),c(l,null,[u,e("p",null,[g,e("a",b,[f,r(o)]),v]),P,e("div",A,[D,e("ul",null,[k,x,y,e("li",null,[w,e("a",I,[L,r(o)])]),S,e("li",null,[C,r(t,{to:"/th/guides/account-maps.html"},{default:n(()=>[N]),_:1})])])]),V,e("p",null,[B,E,F,r(t,{to:"/th/references/accounts.html#sign-with-a-pda"},{default:n(()=>[R]),_:1}),z,O,T,U,j]),e("p",null,[q,e("a",G,[H,r(o)]),J]),K,e("ul",null,[e("li",null,[e("a",M,[Q,r(o)])]),e("li",null,[e("a",W,[X,r(o)])])])],64)}var se=i(m,[["render",Y]]);export{se as default}; +import{_ as i,r as a,o as d,c,a as e,b as r,w as n,F as l,d as s,e as p}from"./app.d411e3b3.js";var _="/assets/account-matrix.c3a79f80.png",h="/assets/pda-curve.7c0b9307.png";const m={},u=e("h1",{id:"program-derived-addresses-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#program-derived-addresses-pdas","aria-hidden":"true"},"#"),s(" Program Derived Addresses (PDAs)")],-1),g=s("Program Derived Addresses (PDAs) \u0E04\u0E37\u0E2D\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E21\u0E42\u0E22\u0E07\u0E01\u0E31\u0E1A accounts \u0E17\u0E35\u0E48\u0E2D\u0E2D\u0E01\u0E41\u0E1A\u0E1A\u0E21\u0E32\u0E43\u0E2B\u0E49\u0E16\u0E39\u0E01\u0E04\u0E27\u0E1A\u0E04\u0E38\u0E21\u0E42\u0E14\u0E22 program \u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49. \u0E16\u0E49\u0E32\u0E21\u0E35 PDAs \u0E15\u0E31\u0E27 programs \u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22 program (programmatically sign) \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A addresses \u0E17\u0E35\u0E48\u0E40\u0E08\u0E32\u0E30\u0E08\u0E07\u0E44\u0E27\u0E49\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E0A\u0E49 private key. PDAs \u0E21\u0E35\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E33 CPI "),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},f=s("Cross-Program Invocation"),v=s(", \u0E42\u0E14\u0E22\u0E08\u0E30\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15 Solana apps \u0E43\u0E2B\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E23\u0E48\u0E27\u0E21\u0E01\u0E31\u0E19 (composable) \u200B\u0E01\u0E31\u0E1A program \u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E44\u0E14\u0E49."),P=e("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),A={class:"custom-container tip"},D=e("p",{class:"custom-container-title"},"Fact Sheet",-1),k=e("li",null,"PDAs \u0E04\u0E37\u0E2D 32 byte strings \u0E17\u0E35\u0E48\u0E14\u0E39\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 public keys, \u0E41\u0E15\u0E48\u0E08\u0E30\u0E44\u0E21\u0E48\u0E21\u0E35 private keys",-1),x=e("li",null,[e("code",null,"findProgramAddress"),s(" \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E37\u0E1A\u0E17\u0E2D\u0E14(derive) \u0E41\u0E1A\u0E1A deterministic \u0E40\u0E1B\u0E47\u0E19 PDA \u0E08\u0E32\u0E01 programId \u0E41\u0E25\u0E30 seeds (\u0E0A\u0E38\u0E14\u0E02\u0E2D\u0E07 bytes)")],-1),y=e("li",null,"bump (1 byte) \u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E2D\u0E01\u0E32\u0E2A\u0E17\u0E35\u0E48 PDA \u0E08\u0E30\u0E2B\u0E25\u0E38\u0E14\u0E08\u0E32\u0E01 ed25519 elliptic curve",-1),w=s("Programs \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E43\u0E2B\u0E49 PDAs \u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 seeds \u0E41\u0E25\u0E30 bump \u0E44\u0E27\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E0A\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23 "),I={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},L=s("invoke_signed"),S=e("li",null,"PDA \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E14\u0E49\u0E27\u0E22 program \u0E17\u0E35\u0E48\u0E21\u0E31\u0E19 derived \u0E21\u0E32\u0E40\u0E17\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19",-1),C=s("\u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 programs \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E43\u0E19 instructions \u0E17\u0E35\u0E48\u0E15\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19, PDAs \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 interface \u0E04\u0E25\u0E49\u0E32\u0E22\u0E46 hashmap \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A "),N=s("indexing accounts"),V=p('

    \u0E25\u0E07\u0E25\u0E36\u0E01

    PDAs \u0E04\u0E37\u0E2D\u0E2A\u0E48\u0E27\u0E19\u0E2A\u0E33\u0E04\u0E31\u0E0D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32 programs \u0E1A\u0E19 Solana. \u0E16\u0E49\u0E32\u0E21\u0E35 PDAs, programs \u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 sign \u0E41\u0E17\u0E19 accounts \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48\u0E23\u0E31\u0E1A\u0E1B\u0E23\u0E30\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49\u0E27\u0E48\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E21\u0E35 user \u0E2D\u0E37\u0E48\u0E19\u0E21\u0E32\u0E2A\u0E23\u0E49\u0E32\u0E07 signature \u0E17\u0E35\u0E48\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E19\u0E44\u0E14\u0E49. \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E17\u0E35\u0E48\u0E08\u0E30 sign \u0E41\u0E17\u0E19 account \u0E44\u0E14\u0E49\u0E41\u0E25\u0E49\u0E27 \u0E1A\u0E32\u0E07 programs \u0E22\u0E31\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 accounts \u0E17\u0E35\u0E48\u0E21\u0E31\u0E19\u0E16\u0E37\u0E2D PDAs \u0E44\u0E27\u0E49\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22

    Accounts matrix

    Image courtesy of Pencilflip

    \u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 PDAs

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E2B\u0E25\u0E31\u0E01\u0E01\u0E32\u0E23\u0E40\u0E1A\u0E37\u0E49\u0E2D\u0E07\u0E2B\u0E25\u0E31\u0E07 PDAs, \u0E40\u0E23\u0E32\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E01\u0E48\u0E2D\u0E19\u0E27\u0E48\u0E32 PDAs \u0E08\u0E23\u0E34\u0E07\u0E46 \u0E41\u0E25\u0E49\u0E27\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E41\u0E15\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E01\u0E32\u0E23\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E08\u0E19\u0E40\u0E08\u0E2D. PDAs \u0E40\u0E01\u0E34\u0E14\u0E08\u0E32\u0E01\u0E01\u0E32\u0E23\u0E1C\u0E2A\u0E21 seeds (\u0E40\u0E0A\u0E48\u0E19 \u201Cvote_account\u201D) \u0E41\u0E25\u0E30 program id. \u0E01\u0E32\u0E23\u0E1C\u0E2A\u0E21\u0E01\u0E31\u0E19\u0E02\u0E2D\u0E07 seeds \u0E41\u0E25\u0E30 program id \u0E08\u0E30 run \u0E1C\u0E48\u0E32\u0E19 sha256 hash function \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E14\u0E39\u0E27\u0E48\u0E32 public key \u0E19\u0E31\u0E49\u0E19\u0E15\u0E01\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 ed25519 elliptic curve \u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48.

    \u0E43\u0E19\u0E01\u0E32\u0E23 run program id \u0E41\u0E25\u0E30 seeds \u0E1C\u0E48\u0E32\u0E19 hash function \u0E08\u0E30\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E1B\u0E44\u0E14\u0E49\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 ~50% \u0E17\u0E35\u0E48\u0E08\u0E30\u0E44\u0E14\u0E49 valid public key \u0E17\u0E35\u0E48\u0E15\u0E01\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 elliptic curve. \u0E43\u0E19\u0E01\u0E23\u0E13\u0E35\u0E19\u0E35\u0E49 \u0E08\u0E30\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E41\u0E01\u0E25\u0E49\u0E07 (fudge) \u0E43\u0E2B\u0E49 input \u0E02\u0E22\u0E31\u0E1A\u0E44\u0E1B\u0E19\u0E34\u0E14\u0E2B\u0E19\u0E48\u0E2D\u0E22\u0E41\u0E25\u0E49\u0E27\u0E01\u0E47\u0E25\u0E2D\u0E07\u0E43\u0E2B\u0E21\u0E48\u0E2D\u0E35\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07. \u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E17\u0E32\u0E07\u0E40\u0E17\u0E04\u0E19\u0E34\u0E04\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23 fudge \u0E19\u0E35\u0E49\u0E01\u0E47\u0E04\u0E37\u0E2D bump. \u0E43\u0E19 Solana, \u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E14\u0E49\u0E27\u0E22 bump = 255 \u0E41\u0E25\u0E30\u0E04\u0E48\u0E2D\u0E22\u0E46 \u0E25\u0E14\u0E25\u0E07\u0E40\u0E1B\u0E47\u0E19 bump = 254, bump = 253, \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E22\u0E46 \u0E08\u0E19\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49 address \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E19 elliptic curve. \u0E19\u0E35\u0E48\u0E2D\u0E32\u0E08\u0E08\u0E30\u0E1F\u0E31\u0E07\u0E14\u0E39\u0E07\u0E48\u0E32\u0E22\u0E46 \u0E41\u0E15\u0E48\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E21\u0E31\u0E19\u0E40\u0E08\u0E2D address \u0E21\u0E31\u0E19\u0E01\u0E47\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E27\u0E34\u0E18\u0E35\u0E43\u0E19\u0E41\u0E1A\u0E1A deterministic \u0E17\u0E35\u0E48\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 derive PDA \u0E40\u0E14\u0E34\u0E21\u0E2D\u0E2D\u0E01\u0E21\u0E32\u0E44\u0E14\u0E49.

    PDA on the ellipitic curve

    \u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 PDAs

    ',9),B=s("\u0E40\u0E21\u0E37\u0E48\u0E2D PDA \u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E21\u0E32\u0E41\u0E25\u0E49\u0E27, "),E=e("code",null,"findProgramAddress",-1),F=s(" \u0E08\u0E30\u0E04\u0E37\u0E19 address \u0E41\u0E25\u0E30 bump \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E40\u0E15\u0E30 address \u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01 elliptic curve. \u0E16\u0E49\u0E32\u0E21\u0E35 bump \u0E19\u0E35\u0E49, program \u0E01\u0E47\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 "),R=s("sign"),z=s(" instruction \u0E43\u0E14\u0E46\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 PDA. \u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E08\u0E30 sign, \u0E15\u0E31\u0E27 programs \u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 instruction, list \u0E02\u0E2D\u0E07 accounts, \u0E41\u0E25\u0E30 seeds \u0E01\u0E31\u0E1A bump \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49 derive \u0E15\u0E31\u0E27 PDA \u0E44\u0E1B "),O=e("code",null,"invoke_signed",-1),T=s(". \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E19\u0E35\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23 sign \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A instructions, PDAs \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07 sign \u0E1C\u0E48\u0E32\u0E19 "),U=e("code",null,"invoke_signed",-1),j=s(" \u0E14\u0E49\u0E27\u0E22."),q=s("\u0E40\u0E21\u0E37\u0E48\u0E2D\u0E08\u0E30\u0E43\u0E0A\u0E49 PDAs, \u0E21\u0E31\u0E19\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E1B\u0E01\u0E15\u0E34\u0E17\u0E35\u0E48\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07 "),G={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},H=s("\u0E40\u0E01\u0E47\u0E1A bump seed"),J=s(" \u0E44\u0E27\u0E49\u0E43\u0E19 account data \u0E19\u0E31\u0E49\u0E19\u0E46 \u0E14\u0E49\u0E27\u0E22. \u0E21\u0E31\u0E19\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A PDA \u0E44\u0E14\u0E49\u0E07\u0E48\u0E32\u0E22\u0E02\u0E36\u0E49\u0E19\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 bump \u0E21\u0E32\u0E43\u0E19 instruction argument."),K=e("h2",{id:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19","aria-hidden":"true"},"#"),s(" \u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19")],-1),M={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},Q=s("Official Documentation"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=s("Understanding Program Derived Addresses");function Y(Z,$){const o=a("ExternalLinkIcon"),t=a("RouterLink");return d(),c(l,null,[u,e("p",null,[g,e("a",b,[f,r(o)]),v]),P,e("div",A,[D,e("ul",null,[k,x,y,e("li",null,[w,e("a",I,[L,r(o)])]),S,e("li",null,[C,r(t,{to:"/th/guides/account-maps.html"},{default:n(()=>[N]),_:1})])])]),V,e("p",null,[B,E,F,r(t,{to:"/th/references/accounts.html#sign-with-a-pda"},{default:n(()=>[R]),_:1}),z,O,T,U,j]),e("p",null,[q,e("a",G,[H,r(o)]),J]),K,e("ul",null,[e("li",null,[e("a",M,[Q,r(o)])]),e("li",null,[e("a",W,[X,r(o)])])])],64)}var se=i(m,[["render",Y]]);export{se as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.eaddc26f.js b/docs/.vuepress/dist/assets/pdas.html.c12b509f.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.eaddc26f.js rename to docs/.vuepress/dist/assets/pdas.html.c12b509f.js index 7bd1fde1b..a1607a7c9 100644 --- a/docs/.vuepress/dist/assets/pdas.html.eaddc26f.js +++ b/docs/.vuepress/dist/assets/pdas.html.c12b509f.js @@ -1 +1 @@ -import{_ as t,r as l,o,c as s,a,b as r,w as d,F as m,d as e,e as c}from"./app.07ce7a66.js";var u="/assets/account-matrix.c3a79f80.png",p="/assets/pda-curve.7c0b9307.png";const k={},g=a("h1",{id:"program-derived-addresses-pdas-programdan-turetilmis-adresler",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program-derived-addresses-pdas-programdan-turetilmis-adresler","aria-hidden":"true"},"#"),e(" Program Derived Addresses (PDAs) (Programdan T\xFCretilmi\u015F Adresler)")],-1),h=e("Program Derived Addresses (Programdan T\xFCretilmi\u015F Adresler, PDA\u2019lar), belirli bir program taraf\u0131ndan kontrol edilmek \xFCzere tasarlanm\u0131\u015F account'lara ev sahipli\u011Fi yapar. PDA'lar ile programlar, private key\u2019e ihtiya\xE7 duymadan belirli adresleri programl\u0131 olarak imzalayabilir. PDA'lar, Solana uygulamalar\u0131n\u0131n birbirleriyle birle\u015Ftirilebilir olmas\u0131n\u0131 sa\u011Flayan "),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},_=e("Cross-Program Invocation"),y=e("\u2019\u0131n(programlar aras\u0131 \xE7a\u011F\u0131rma) temeli olarak hizmet eder."),f=a("h2",{id:"facts-ozet-bilgiler",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts-ozet-bilgiler","aria-hidden":"true"},"#"),e(" Facts (\xD6zet Bilgiler)")],-1),P=a("p",null,[a("strong",null,"Bilgi Tablosu")],-1),v=a("li",null,"PDA'lar, public key\u2019lere benzeyen ancak kar\u015F\u0131l\u0131k gelen private key\u2019e sahip olmayan 32 byte\u2019l\u0131k array\u2019lerdir.",-1),A=a("li",null,[a("code",null,"findProgramAddress"),e(", bir programId ve seed\u2019lerden (bayt koleksiyonu) deterministik olarak bir PDA t\xFCretecektir.")],-1),D=a("li",null,"Potansiyel bir PDA'y\u0131 ed25519 eliptik e\u011Friden \xE7\u0131karmak i\xE7in bir bump (bir bayt) kullan\u0131l\u0131r.",-1),z=e("Programlar, seed\u2019ler "),x={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},B=e("invoke_signed"),w=e(" ile kendi PDA'lar\u0131 i\xE7in imzalama yapabilir."),I=a("li",null,"Bir PDA yaln\u0131zca t\xFCretildi\u011Fi program taraf\u0131ndan imzalanabilir.",-1),T=e("Programlar\u0131n farkl\u0131 talimatlar\u0131 imzalamas\u0131na izin vermenin yan\u0131 s\u0131ra, PDA'lar ayr\u0131ca "),C=e("Account'lar\u0131 indekslemek"),E=e(" i\xE7in hashmap benzeri bir aray\xFCz sa\u011Flar."),L=c('

    Deep Dive (Derinlemesine Bak\u0131\u015F)

    PDA'lar, Solana'da programlar geli\u015Ftirmek i\xE7in temel bir yap\u0131 ta\u015F\u0131d\u0131r. PDA'lar sayesinde programlar, hi\xE7bir harici kullan\u0131c\u0131n\u0131n ayn\u0131 Account i\xE7in ge\xE7erli bir imza olu\u015Fturamayaca\u011F\u0131n\u0131 garanti ederken Account\u2019lar\u0131 imzalayabilir. Hesaplar\u0131 imzalamaya ek olarak, belirli programlar kendi PDA'lar\u0131nda tutulan account'lar\u0131 da de\u011Fi\u015Ftirebilir.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs (PDA\u2019lar Olu\u015Fturma)

    PDA'lar\u0131n arkas\u0131ndaki kavram\u0131 anlamak i\xE7in, PDA'lar\u0131n teknik olarak yarat\u0131lmad\u0131\u011F\u0131n\u0131, daha \xE7ok bulundu\u011Funu d\xFC\u015F\xFCnmek faydal\u0131 olabilir. PDA'lar, seed ("vote_account" string\u2019i gibi) ve bir program kimli\u011Fi kombinasyonundan olu\u015Fturulur. Bu seed ve program kimli\u011Fi kombinasyonu daha sonra, ed25519 eliptik e\u011Fri \xFCzerinde yer alan bir public key olu\u015Fturup olu\u015Fturmad\u0131klar\u0131n\u0131 g\xF6rmek i\xE7in bir sha256 hash fonksiyonu arac\u0131l\u0131\u011F\u0131yla \xE7al\u0131\u015Ft\u0131r\u0131l\u0131r.

    Program kimli\u011Fimizi ve seed\u2019leri bir hash fonksiyonu arac\u0131l\u0131\u011F\u0131yla \xE7al\u0131\u015Ft\u0131r\u0131rken, eliptik e\u011Fri \xFCzerinde yer alan ge\xE7erli bir public key ile kar\u015F\u0131la\u015Fma \u015Fans\u0131m\u0131z ~%50'dir. Bu durumda, girdimizi biraz ge\xE7i\u015Ftirmek i\xE7in bir \u015Feyler ekleriz ve tekrar deneriz. Bu fudge fakt\xF6r i\xE7in teknik terim bump\u2019t\u0131r. Solana'da, bump = 255 ile ba\u015Fl\u0131yoruz ve eliptik e\u011Fride olmayan bir adres elde edene kadar, bump = 254, bump = 253, vb. ile a\u015Fa\u011F\u0131 do\u011Fru yineliyoruz. Bu ilkel g\xF6r\xFCnebilir, ancak bir kez bulundu\u011Funda bize ayn\u0131 PDA'y\u0131 tekrar tekrar t\xFCretmenin deterministik bir yolunu sunar.

    PDA Curve

    Interacting with PDAs (PDA\u2019lar ile Etkile\u015Fim)

    Bir PDA olu\u015Fturuldu\u011Funda, findProgramAddress hem adresi hem de adresi eliptik e\u011Friden \xE7\u0131karmak i\xE7in kullan\u0131lan bump\u2019\u0131 d\xF6nd\xFCr\xFCr. Bu bump ile donanm\u0131\u015F bir program, daha sonra PDA's\u0131n\u0131 gerektiren herhangi bir talimat i\xE7in imzalayabilir. \u0130mzalamak i\xE7in, programlar\u0131n talimat\u0131, account listesini ve PDA'y\u0131 invoke_signed olarak t\xFCretmek i\xE7in kullan\u0131lan seed ve bump\u2019\u0131 ge\xE7mesi gerekir. Talimatlar\u0131 imzalamaya ek olarak, PDA'lar invoke_signed arac\u0131l\u0131\u011F\u0131yla kendi yarat\u0131mlar\u0131 i\xE7in de imzalamal\u0131d\u0131r.

    PDA'larla olu\u015Ftururken, bump seed account verilerinin kendisinde saklamak yayg\u0131nd\u0131r. Bu, geli\u015Ftiricilerin, bir talimat arg\xFCman\u0131 olarak bump\u2019tan ge\xE7mek zorunda kalmadan bir PDA'y\u0131 kolayca do\u011Frulamas\u0131n\u0131 sa\u011Flar.

    Other Resources (Di\u011Fer Kaynaklar)

    ',12),N={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},S=e("Official Documentation"),V={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},F=e("Understanding Program Derived Addresses");function O(R,q){const i=l("ExternalLinkIcon"),n=l("RouterLink");return o(),s(m,null,[g,a("p",null,[h,a("a",b,[_,r(i)]),y]),f,P,a("ul",null,[v,A,D,a("li",null,[z,a("a",x,[B,r(i)]),w]),I,a("li",null,[T,r(n,{to:"/tr/guides/account-maps.html"},{default:d(()=>[C]),_:1}),E])]),L,a("ul",null,[a("li",null,[a("a",N,[S,r(i)])]),a("li",null,[a("a",V,[F,r(i)])])])],64)}var H=t(k,[["render",O]]);export{H as default}; +import{_ as t,r as l,o,c as s,a,b as r,w as d,F as m,d as e,e as c}from"./app.d411e3b3.js";var u="/assets/account-matrix.c3a79f80.png",p="/assets/pda-curve.7c0b9307.png";const k={},g=a("h1",{id:"program-derived-addresses-pdas-programdan-turetilmis-adresler",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program-derived-addresses-pdas-programdan-turetilmis-adresler","aria-hidden":"true"},"#"),e(" Program Derived Addresses (PDAs) (Programdan T\xFCretilmi\u015F Adresler)")],-1),h=e("Program Derived Addresses (Programdan T\xFCretilmi\u015F Adresler, PDA\u2019lar), belirli bir program taraf\u0131ndan kontrol edilmek \xFCzere tasarlanm\u0131\u015F account'lara ev sahipli\u011Fi yapar. PDA'lar ile programlar, private key\u2019e ihtiya\xE7 duymadan belirli adresleri programl\u0131 olarak imzalayabilir. PDA'lar, Solana uygulamalar\u0131n\u0131n birbirleriyle birle\u015Ftirilebilir olmas\u0131n\u0131 sa\u011Flayan "),b={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},_=e("Cross-Program Invocation"),y=e("\u2019\u0131n(programlar aras\u0131 \xE7a\u011F\u0131rma) temeli olarak hizmet eder."),f=a("h2",{id:"facts-ozet-bilgiler",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts-ozet-bilgiler","aria-hidden":"true"},"#"),e(" Facts (\xD6zet Bilgiler)")],-1),P=a("p",null,[a("strong",null,"Bilgi Tablosu")],-1),v=a("li",null,"PDA'lar, public key\u2019lere benzeyen ancak kar\u015F\u0131l\u0131k gelen private key\u2019e sahip olmayan 32 byte\u2019l\u0131k array\u2019lerdir.",-1),A=a("li",null,[a("code",null,"findProgramAddress"),e(", bir programId ve seed\u2019lerden (bayt koleksiyonu) deterministik olarak bir PDA t\xFCretecektir.")],-1),D=a("li",null,"Potansiyel bir PDA'y\u0131 ed25519 eliptik e\u011Friden \xE7\u0131karmak i\xE7in bir bump (bir bayt) kullan\u0131l\u0131r.",-1),z=e("Programlar, seed\u2019ler "),x={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},B=e("invoke_signed"),w=e(" ile kendi PDA'lar\u0131 i\xE7in imzalama yapabilir."),I=a("li",null,"Bir PDA yaln\u0131zca t\xFCretildi\u011Fi program taraf\u0131ndan imzalanabilir.",-1),T=e("Programlar\u0131n farkl\u0131 talimatlar\u0131 imzalamas\u0131na izin vermenin yan\u0131 s\u0131ra, PDA'lar ayr\u0131ca "),C=e("Account'lar\u0131 indekslemek"),E=e(" i\xE7in hashmap benzeri bir aray\xFCz sa\u011Flar."),L=c('

    Deep Dive (Derinlemesine Bak\u0131\u015F)

    PDA'lar, Solana'da programlar geli\u015Ftirmek i\xE7in temel bir yap\u0131 ta\u015F\u0131d\u0131r. PDA'lar sayesinde programlar, hi\xE7bir harici kullan\u0131c\u0131n\u0131n ayn\u0131 Account i\xE7in ge\xE7erli bir imza olu\u015Fturamayaca\u011F\u0131n\u0131 garanti ederken Account\u2019lar\u0131 imzalayabilir. Hesaplar\u0131 imzalamaya ek olarak, belirli programlar kendi PDA'lar\u0131nda tutulan account'lar\u0131 da de\u011Fi\u015Ftirebilir.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs (PDA\u2019lar Olu\u015Fturma)

    PDA'lar\u0131n arkas\u0131ndaki kavram\u0131 anlamak i\xE7in, PDA'lar\u0131n teknik olarak yarat\u0131lmad\u0131\u011F\u0131n\u0131, daha \xE7ok bulundu\u011Funu d\xFC\u015F\xFCnmek faydal\u0131 olabilir. PDA'lar, seed ("vote_account" string\u2019i gibi) ve bir program kimli\u011Fi kombinasyonundan olu\u015Fturulur. Bu seed ve program kimli\u011Fi kombinasyonu daha sonra, ed25519 eliptik e\u011Fri \xFCzerinde yer alan bir public key olu\u015Fturup olu\u015Fturmad\u0131klar\u0131n\u0131 g\xF6rmek i\xE7in bir sha256 hash fonksiyonu arac\u0131l\u0131\u011F\u0131yla \xE7al\u0131\u015Ft\u0131r\u0131l\u0131r.

    Program kimli\u011Fimizi ve seed\u2019leri bir hash fonksiyonu arac\u0131l\u0131\u011F\u0131yla \xE7al\u0131\u015Ft\u0131r\u0131rken, eliptik e\u011Fri \xFCzerinde yer alan ge\xE7erli bir public key ile kar\u015F\u0131la\u015Fma \u015Fans\u0131m\u0131z ~%50'dir. Bu durumda, girdimizi biraz ge\xE7i\u015Ftirmek i\xE7in bir \u015Feyler ekleriz ve tekrar deneriz. Bu fudge fakt\xF6r i\xE7in teknik terim bump\u2019t\u0131r. Solana'da, bump = 255 ile ba\u015Fl\u0131yoruz ve eliptik e\u011Fride olmayan bir adres elde edene kadar, bump = 254, bump = 253, vb. ile a\u015Fa\u011F\u0131 do\u011Fru yineliyoruz. Bu ilkel g\xF6r\xFCnebilir, ancak bir kez bulundu\u011Funda bize ayn\u0131 PDA'y\u0131 tekrar tekrar t\xFCretmenin deterministik bir yolunu sunar.

    PDA Curve

    Interacting with PDAs (PDA\u2019lar ile Etkile\u015Fim)

    Bir PDA olu\u015Fturuldu\u011Funda, findProgramAddress hem adresi hem de adresi eliptik e\u011Friden \xE7\u0131karmak i\xE7in kullan\u0131lan bump\u2019\u0131 d\xF6nd\xFCr\xFCr. Bu bump ile donanm\u0131\u015F bir program, daha sonra PDA's\u0131n\u0131 gerektiren herhangi bir talimat i\xE7in imzalayabilir. \u0130mzalamak i\xE7in, programlar\u0131n talimat\u0131, account listesini ve PDA'y\u0131 invoke_signed olarak t\xFCretmek i\xE7in kullan\u0131lan seed ve bump\u2019\u0131 ge\xE7mesi gerekir. Talimatlar\u0131 imzalamaya ek olarak, PDA'lar invoke_signed arac\u0131l\u0131\u011F\u0131yla kendi yarat\u0131mlar\u0131 i\xE7in de imzalamal\u0131d\u0131r.

    PDA'larla olu\u015Ftururken, bump seed account verilerinin kendisinde saklamak yayg\u0131nd\u0131r. Bu, geli\u015Ftiricilerin, bir talimat arg\xFCman\u0131 olarak bump\u2019tan ge\xE7mek zorunda kalmadan bir PDA'y\u0131 kolayca do\u011Frulamas\u0131n\u0131 sa\u011Flar.

    Other Resources (Di\u011Fer Kaynaklar)

    ',12),N={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},S=e("Official Documentation"),V={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},F=e("Understanding Program Derived Addresses");function O(R,q){const i=l("ExternalLinkIcon"),n=l("RouterLink");return o(),s(m,null,[g,a("p",null,[h,a("a",b,[_,r(i)]),y]),f,P,a("ul",null,[v,A,D,a("li",null,[z,a("a",x,[B,r(i)]),w]),I,a("li",null,[T,r(n,{to:"/tr/guides/account-maps.html"},{default:d(()=>[C]),_:1}),E])]),L,a("ul",null,[a("li",null,[a("a",N,[S,r(i)])]),a("li",null,[a("a",V,[F,r(i)])])])],64)}var H=t(k,[["render",O]]);export{H as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.3b9289a8.js b/docs/.vuepress/dist/assets/pdas.html.d7edeb46.js similarity index 99% rename from docs/.vuepress/dist/assets/pdas.html.3b9289a8.js rename to docs/.vuepress/dist/assets/pdas.html.d7edeb46.js index 3f22f4675..74cf275ab 100644 --- a/docs/.vuepress/dist/assets/pdas.html.3b9289a8.js +++ b/docs/.vuepress/dist/assets/pdas.html.d7edeb46.js @@ -1 +1 @@ -import{_ as i,r as o,o as d,c,a as e,b as n,w as t,F as l,d as a,e as u}from"./app.07ce7a66.js";var p="/assets/account-matrix.c3a79f80.png",m="/assets/pda-curve.7c0b9307.png";const h={},_=e("h1",{id:"direcciones-derivadas-de-programa-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#direcciones-derivadas-de-programa-pdas","aria-hidden":"true"},"#"),a(" Direcciones derivadas de programa (PDAs)")],-1),g=a("Direcciones derivadas de programa (PDAs) son cuentas dise\xF1adas espec\xEDficamente para ser controladas por programas. Con PDAs, los programas puede firmar para ciertas direcciones sin la necesidad de una llave privada. PDAs sirven como la base para la "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=a("Invocaci\xF3n entre programas"),v=a(", que permite la composici\xF3n entre apps de Solana."),A=e("h2",{id:"hechos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),a(" Hechos")],-1),P={class:"custom-container tip"},D=e("p",{class:"custom-container-title"},"Hola de hechos",-1),y=e("li",null,"PDAs son cadenas de 32 bytes que lucen como llaves p\xFAblicas pero no tienen una llave privada relacionada",-1),x=e("li",null,[e("code",null,"findProgramAddress"),a(" deriva de forma determinista un PDA de un programId y unas semillas (colecci\xF3n de bytes)")],-1),k=e("li",null,"Un bump (un byte) es usado para empujar a un potencial PDA fuera de la curva el\xEDptica ed25519",-1),q=a("Los programas pueden firmar por sus PDAs usando sus seeds y bump "),w={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},E=a("invoke_signed"),z=e("li",null,"Un PDA solo puede ser firmado por el programa del cual ha sido derivada",-1),L=a("Adem\xE1s de permitir a los programas firmar diferentes instrucciones, PDAs tambi\xE9n brindan una interfaz tipo hashmap para "),C=a("indexar cuentas"),I=u('

    Un vistazo m\xE1s profundo

    Los PDA son un componente esencial para desarrollar programas en Solana. Con las PDA, los programas pueden firmar cuentas mientras garantizan que ning\xFAn usuario externo pueda generar una firma v\xE1lida para la misma. Adem\xE1s de firmar cuentas, ciertos programas tambi\xE9n pueden modificar cuentas en sus PDA.

    Accounts matrix

    Image courtesy of Pencilflip

    Generando PDAs

    Para entender el concepto detr\xE1s de las PDA, puede ser \xFAtil considerar que las PDA no se crean t\xE9cnicamente, sino que se encuentran. Los PDA se generan a partir de una combinaci\xF3n de semillas (como la cadena \u201Cvote_account\u201D) y un id de programa. Esta combinaci\xF3n de semillas y de un id de programa luego se ejecuta a trav\xE9s de una funci\xF3n hash sha256 para ver si generan o no una clave p\xFAblica que se encuentra en la curva el\xEDptica ed25519.

    Al ejecutar el id del programa y las semillas de nuestro programa a trav\xE9s de una funci\xF3n hash, hay una probabilidad de ~50% de que en realidad terminemos con una clave p\xFAblica v\xE1lida que se encuentre en la curva el\xEDptica. En este caso, simplemente agregamos algo para modificar un poco nuestra entrada y lo intentamos de nuevo. El t\xE9rmino t\xE9cnico para este algo es un bump. En Solana, comenzamos con bump = 255 y simplemente iteramos hacia abajo, bump = 254, bump = 253, etc. hasta que obtengamos una direcci\xF3n que no est\xE9 en la curva el\xEDptica. Esto puede parecer rudimentario, pero una vez encontrado nos da una forma determinista de derivar el mismo PDA una y otra vez.

    PDA en la curva el\xEDptica

    Interactuando con PDAs

    ',9),j=a("Cuando un PDA es generado, "),N=e("code",null,"findProgramAddress",-1),S=a(" retorna la direcci\xF3n y el bump usado para sacar la direcci\xF3n fuera de la curva el\xEDptica. Con el bump, un programa puede "),V=a("firmar"),B=a(" por cualquier transacci\xF3n que requiera el PDA. Para firmar, los programas deben pasar la instrucci\xF3n, la lista de las cuentas, las semillas y el bump usado para derivar el PDA a la funci\xF3n "),R=e("code",null,"invoke_signed",-1),U=a(". Adem\xE1s de firmar para instrucciones, PDAs tambi\xE9n deben firmar su propia creaci\xF3n con "),F=e("code",null,"invoke_signed",-1),H=a("."),G=a("Cuando se crean PDAs, es com\xFAn "),O={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},T=a("guardar el bump y los seeds"),J=a(" en los datos de la misma cuenta. Esto permite a los desarrolladores validar f\xE1cilmente un PDA sin tener que enviar el bump como argumento en la instrucci\xF3n."),K=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),a(" Other Resources")],-1),M={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},Q=a("Documentaci\xF3n oficial"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=a("Entendiendo las direcciones derivadas de programa");function Y(Z,$){const r=o("ExternalLinkIcon"),s=o("RouterLink");return d(),c(l,null,[_,e("p",null,[g,e("a",f,[b,n(r)]),v]),A,e("div",P,[D,e("ul",null,[y,x,k,e("li",null,[q,e("a",w,[E,n(r)])]),z,e("li",null,[L,n(s,{to:"/es/guides/account-maps.html"},{default:t(()=>[C]),_:1})])])]),I,e("p",null,[j,N,S,n(s,{to:"/es/references/accounts.html#sign-with-a-pda"},{default:t(()=>[V]),_:1}),B,R,U,F,H]),e("p",null,[G,e("a",O,[T,n(r)]),J]),K,e("ul",null,[e("li",null,[e("a",M,[Q,n(r)])]),e("li",null,[e("a",W,[X,n(r)])])])],64)}var ae=i(h,[["render",Y]]);export{ae as default}; +import{_ as i,r as o,o as d,c,a as e,b as n,w as t,F as l,d as a,e as u}from"./app.d411e3b3.js";var p="/assets/account-matrix.c3a79f80.png",m="/assets/pda-curve.7c0b9307.png";const h={},_=e("h1",{id:"direcciones-derivadas-de-programa-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#direcciones-derivadas-de-programa-pdas","aria-hidden":"true"},"#"),a(" Direcciones derivadas de programa (PDAs)")],-1),g=a("Direcciones derivadas de programa (PDAs) son cuentas dise\xF1adas espec\xEDficamente para ser controladas por programas. Con PDAs, los programas puede firmar para ciertas direcciones sin la necesidad de una llave privada. PDAs sirven como la base para la "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=a("Invocaci\xF3n entre programas"),v=a(", que permite la composici\xF3n entre apps de Solana."),A=e("h2",{id:"hechos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),a(" Hechos")],-1),P={class:"custom-container tip"},D=e("p",{class:"custom-container-title"},"Hola de hechos",-1),y=e("li",null,"PDAs son cadenas de 32 bytes que lucen como llaves p\xFAblicas pero no tienen una llave privada relacionada",-1),x=e("li",null,[e("code",null,"findProgramAddress"),a(" deriva de forma determinista un PDA de un programId y unas semillas (colecci\xF3n de bytes)")],-1),k=e("li",null,"Un bump (un byte) es usado para empujar a un potencial PDA fuera de la curva el\xEDptica ed25519",-1),q=a("Los programas pueden firmar por sus PDAs usando sus seeds y bump "),w={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},E=a("invoke_signed"),z=e("li",null,"Un PDA solo puede ser firmado por el programa del cual ha sido derivada",-1),L=a("Adem\xE1s de permitir a los programas firmar diferentes instrucciones, PDAs tambi\xE9n brindan una interfaz tipo hashmap para "),C=a("indexar cuentas"),I=u('

    Un vistazo m\xE1s profundo

    Los PDA son un componente esencial para desarrollar programas en Solana. Con las PDA, los programas pueden firmar cuentas mientras garantizan que ning\xFAn usuario externo pueda generar una firma v\xE1lida para la misma. Adem\xE1s de firmar cuentas, ciertos programas tambi\xE9n pueden modificar cuentas en sus PDA.

    Accounts matrix

    Image courtesy of Pencilflip

    Generando PDAs

    Para entender el concepto detr\xE1s de las PDA, puede ser \xFAtil considerar que las PDA no se crean t\xE9cnicamente, sino que se encuentran. Los PDA se generan a partir de una combinaci\xF3n de semillas (como la cadena \u201Cvote_account\u201D) y un id de programa. Esta combinaci\xF3n de semillas y de un id de programa luego se ejecuta a trav\xE9s de una funci\xF3n hash sha256 para ver si generan o no una clave p\xFAblica que se encuentra en la curva el\xEDptica ed25519.

    Al ejecutar el id del programa y las semillas de nuestro programa a trav\xE9s de una funci\xF3n hash, hay una probabilidad de ~50% de que en realidad terminemos con una clave p\xFAblica v\xE1lida que se encuentre en la curva el\xEDptica. En este caso, simplemente agregamos algo para modificar un poco nuestra entrada y lo intentamos de nuevo. El t\xE9rmino t\xE9cnico para este algo es un bump. En Solana, comenzamos con bump = 255 y simplemente iteramos hacia abajo, bump = 254, bump = 253, etc. hasta que obtengamos una direcci\xF3n que no est\xE9 en la curva el\xEDptica. Esto puede parecer rudimentario, pero una vez encontrado nos da una forma determinista de derivar el mismo PDA una y otra vez.

    PDA en la curva el\xEDptica

    Interactuando con PDAs

    ',9),j=a("Cuando un PDA es generado, "),N=e("code",null,"findProgramAddress",-1),S=a(" retorna la direcci\xF3n y el bump usado para sacar la direcci\xF3n fuera de la curva el\xEDptica. Con el bump, un programa puede "),V=a("firmar"),B=a(" por cualquier transacci\xF3n que requiera el PDA. Para firmar, los programas deben pasar la instrucci\xF3n, la lista de las cuentas, las semillas y el bump usado para derivar el PDA a la funci\xF3n "),R=e("code",null,"invoke_signed",-1),U=a(". Adem\xE1s de firmar para instrucciones, PDAs tambi\xE9n deben firmar su propia creaci\xF3n con "),F=e("code",null,"invoke_signed",-1),H=a("."),G=a("Cuando se crean PDAs, es com\xFAn "),O={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},T=a("guardar el bump y los seeds"),J=a(" en los datos de la misma cuenta. Esto permite a los desarrolladores validar f\xE1cilmente un PDA sin tener que enviar el bump como argumento en la instrucci\xF3n."),K=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),a(" Other Resources")],-1),M={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},Q=a("Documentaci\xF3n oficial"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},X=a("Entendiendo las direcciones derivadas de programa");function Y(Z,$){const r=o("ExternalLinkIcon"),s=o("RouterLink");return d(),c(l,null,[_,e("p",null,[g,e("a",f,[b,n(r)]),v]),A,e("div",P,[D,e("ul",null,[y,x,k,e("li",null,[q,e("a",w,[E,n(r)])]),z,e("li",null,[L,n(s,{to:"/es/guides/account-maps.html"},{default:t(()=>[C]),_:1})])])]),I,e("p",null,[j,N,S,n(s,{to:"/es/references/accounts.html#sign-with-a-pda"},{default:t(()=>[V]),_:1}),B,R,U,F,H]),e("p",null,[G,e("a",O,[T,n(r)]),J]),K,e("ul",null,[e("li",null,[e("a",M,[Q,n(r)])]),e("li",null,[e("a",W,[X,n(r)])])])],64)}var ae=i(h,[["render",Y]]);export{ae as default}; diff --git a/docs/.vuepress/dist/assets/pdas.html.6fd7b3e7.js b/docs/.vuepress/dist/assets/pdas.html.eed3e90e.js similarity index 98% rename from docs/.vuepress/dist/assets/pdas.html.6fd7b3e7.js rename to docs/.vuepress/dist/assets/pdas.html.eed3e90e.js index ebcdba6a7..a92b07317 100644 --- a/docs/.vuepress/dist/assets/pdas.html.6fd7b3e7.js +++ b/docs/.vuepress/dist/assets/pdas.html.eed3e90e.js @@ -1 +1 @@ -import{_ as o,r as t,o as d,c as l,a as e,b as s,w as a,F as c,d as n,e as h}from"./app.07ce7a66.js";var u="/assets/account-matrix.c3a79f80.png",m="/assets/pda-curve.7c0b9307.png";const g={},p=e("h1",{id:"programm-eigene-adressen-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programm-eigene-adressen-pdas","aria-hidden":"true"},"#"),n(" Programm-eigene-Adressen (PDAs)")],-1),_=n("Program-eigene-Adressen (PDAs) sind das zu Hause von Accounts die dazu designed sind, um von einem bestimmten Programm kontrolliert bzw. gesteuert zu werden. Mit PDAs k\xF6nnen Programme programmgesteuert f\xFCr bestimmte Adressen signieren, ohne einen privaten Schl\xFCssel zu ben\xF6tigen. PDAs dienen als Grundlage f\xFCr "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=n("Cross-Program Invocation"),A=n(", wodurch Solana-Apps miteinander kombinierbar sind."),v=e("h2",{id:"fakten",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fakten","aria-hidden":"true"},"#"),n(" Fakten")],-1),P={class:"custom-container tip"},k=e("p",{class:"custom-container-title"},"Fact Sheet",-1),w=e("li",null,"PDAs sind 32-Byte-Strings, die wie \xF6ffentliche Schl\xFCssel aussehen, aber keine entsprechenden privaten Schl\xFCssel haben",-1),D=e("li",null,[e("code",null,"findProgramAddress"),n(" wird einen PDA deterministisch aus einer programId und Seeds (Sammlung von Bytes) ableiten")],-1),z=e("li",null,"Ein Bump (ein Byte) wird verwendet, um einen potenziellen PDA von der elliptischen Kurve ed25519 zu schieben",-1),S=n("Programme k\xF6nnen f\xFCr ihre PDAs signieren, indem sie die Seeds und Bump bereitstellen "),x={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},B=n("invoke_signed"),E=e("li",null,"Ein PDA kann nur von dem Programm signiert werden, von dem es abgeleitet wurde",-1),K=n("PDAs erm\xF6glichen es Programmen nicht nur, verschiedene Anweisungen zu signieren, sondern bieten auch eine Hashmap-\xE4hnliche Schnittstelle um "),y=n("Accounts zu indexieren"),I=h('

    Deep Dive

    PDAs sind ein wesentlicher Baustein f\xFCr die Entwicklung von Programmen auf Solana. Mit PDAs k\xF6nnen Programme f\xFCr Accounts signieren und gleichzeitig sicherstellen, dass kein externer Benutzer auch eine g\xFCltige Signatur f\xFCr dasselbe Konto erstellen kann. Zus\xE4tzlich zum Signieren von Accounts k\xF6nnen bestimmte Programme auch Accounts \xE4ndern, die auf ihren PDAs gef\xFChrt werden.

    Accounts matrix

    Bildausschnit von Pencilflip

    Generating PDAs

    Um das Konzept hinter PDAs zu verstehen, kann es hilfreich sein zu bedenken, dass PDAs nicht technisch erstellt, sondern eher gefunden werden. PDAs werden aus einer Kombination von Seeds (z. B. der Zeichenfolge \u201Evote_account\u201C\u201C) und einer Programm-ID generiert. Diese Kombination aus Seeds und Programm-ID wird dann durch eine sha256-Hash-Funktion geleitet, um zu sehen, ob sie einen \xF6ffentlichen Schl\xFCssel generieren, der auf der elliptischen Kurve ed25519 liegt.

    PDA on the ellipitic curve

    Interaktion mit PDAs

    ',8),L=n("Wenn ein PDA generiert wird, gibt "),F=e("code",null,"findProgramAddress",-1),N=n(" sowohl die Adresse als auch den Bump zur\xFCck, der verwendet wird, um die Adresse aus der elliptischen Kurve zu entfernen. Mit diesem Bump bewaffnet, kann ein Programm dann f\xFCr jede Anweisung, die seinen PDA erfordert, "),V=n("signieren"),C=n('. Um zu signieren, sollten Programme die Anweisung, die Liste der Accounts und die Seeds und Bump, die verwendet werden, um den PDA abzuleiten, an \u201Einvoke_signed\u201C \xFCbergeben. Zus\xE4tzlich zum Signieren von Anweisungen m\xFCssen PDAs auch f\xFCr ihre eigene Erstellung \xFCber "invoke_signed" signieren.'),H=n("Beim Bauen mit PDAs ist es \xFCblich, "),M={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},Z=n("den Bump Seed in den Kontodaten selbst zu speichern"),q=n(". Auf diese Weise k\xF6nnen Entwickler einen PDA einfach validieren, ohne den Bump als Anweisungsargument \xFCbergeben zu m\xFCssen.having to pass in the bump as an instruction argument."),G=e("h2",{id:"andere-quellen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#andere-quellen","aria-hidden":"true"},"#"),n(" Andere Quellen")],-1),R={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},U=n("Offizielle Dokumentation"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},j=n("Programmeigene Accounts verstehen");function O(Q,T){const r=t("ExternalLinkIcon"),i=t("RouterLink");return d(),l(c,null,[p,e("p",null,[_,e("a",f,[b,s(r)]),A]),v,e("div",P,[k,e("ul",null,[w,D,z,e("li",null,[S,e("a",x,[B,s(r)])]),E,e("li",null,[K,s(i,{to:"/de/guides/account-maps.html"},{default:a(()=>[y]),_:1})])])]),I,e("p",null,[L,F,N,s(i,{to:"/de/references/accounts.html#sign-with-a-pda"},{default:a(()=>[V]),_:1}),C]),e("p",null,[H,e("a",M,[Z,s(r)]),q]),G,e("ul",null,[e("li",null,[e("a",R,[U,s(r)])]),e("li",null,[e("a",W,[j,s(r)])])])],64)}var X=o(g,[["render",O]]);export{X as default}; +import{_ as o,r as t,o as d,c as l,a as e,b as s,w as a,F as c,d as n,e as h}from"./app.d411e3b3.js";var u="/assets/account-matrix.c3a79f80.png",m="/assets/pda-curve.7c0b9307.png";const g={},p=e("h1",{id:"programm-eigene-adressen-pdas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programm-eigene-adressen-pdas","aria-hidden":"true"},"#"),n(" Programm-eigene-Adressen (PDAs)")],-1),_=n("Program-eigene-Adressen (PDAs) sind das zu Hause von Accounts die dazu designed sind, um von einem bestimmten Programm kontrolliert bzw. gesteuert zu werden. Mit PDAs k\xF6nnen Programme programmgesteuert f\xFCr bestimmte Adressen signieren, ohne einen privaten Schl\xFCssel zu ben\xF6tigen. PDAs dienen als Grundlage f\xFCr "),f={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#cross-program-invocations",target:"_blank",rel:"noopener noreferrer"},b=n("Cross-Program Invocation"),A=n(", wodurch Solana-Apps miteinander kombinierbar sind."),v=e("h2",{id:"fakten",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fakten","aria-hidden":"true"},"#"),n(" Fakten")],-1),P={class:"custom-container tip"},k=e("p",{class:"custom-container-title"},"Fact Sheet",-1),w=e("li",null,"PDAs sind 32-Byte-Strings, die wie \xF6ffentliche Schl\xFCssel aussehen, aber keine entsprechenden privaten Schl\xFCssel haben",-1),D=e("li",null,[e("code",null,"findProgramAddress"),n(" wird einen PDA deterministisch aus einer programId und Seeds (Sammlung von Bytes) ableiten")],-1),z=e("li",null,"Ein Bump (ein Byte) wird verwendet, um einen potenziellen PDA von der elliptischen Kurve ed25519 zu schieben",-1),S=n("Programme k\xF6nnen f\xFCr ihre PDAs signieren, indem sie die Seeds und Bump bereitstellen "),x={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-signed-accounts",target:"_blank",rel:"noopener noreferrer"},B=n("invoke_signed"),E=e("li",null,"Ein PDA kann nur von dem Programm signiert werden, von dem es abgeleitet wurde",-1),K=n("PDAs erm\xF6glichen es Programmen nicht nur, verschiedene Anweisungen zu signieren, sondern bieten auch eine Hashmap-\xE4hnliche Schnittstelle um "),y=n("Accounts zu indexieren"),I=h('

    Deep Dive

    PDAs sind ein wesentlicher Baustein f\xFCr die Entwicklung von Programmen auf Solana. Mit PDAs k\xF6nnen Programme f\xFCr Accounts signieren und gleichzeitig sicherstellen, dass kein externer Benutzer auch eine g\xFCltige Signatur f\xFCr dasselbe Konto erstellen kann. Zus\xE4tzlich zum Signieren von Accounts k\xF6nnen bestimmte Programme auch Accounts \xE4ndern, die auf ihren PDAs gef\xFChrt werden.

    Accounts matrix

    Bildausschnit von Pencilflip

    Generating PDAs

    Um das Konzept hinter PDAs zu verstehen, kann es hilfreich sein zu bedenken, dass PDAs nicht technisch erstellt, sondern eher gefunden werden. PDAs werden aus einer Kombination von Seeds (z. B. der Zeichenfolge \u201Evote_account\u201C\u201C) und einer Programm-ID generiert. Diese Kombination aus Seeds und Programm-ID wird dann durch eine sha256-Hash-Funktion geleitet, um zu sehen, ob sie einen \xF6ffentlichen Schl\xFCssel generieren, der auf der elliptischen Kurve ed25519 liegt.

    PDA on the ellipitic curve

    Interaktion mit PDAs

    ',8),L=n("Wenn ein PDA generiert wird, gibt "),F=e("code",null,"findProgramAddress",-1),N=n(" sowohl die Adresse als auch den Bump zur\xFCck, der verwendet wird, um die Adresse aus der elliptischen Kurve zu entfernen. Mit diesem Bump bewaffnet, kann ein Programm dann f\xFCr jede Anweisung, die seinen PDA erfordert, "),V=n("signieren"),C=n('. Um zu signieren, sollten Programme die Anweisung, die Liste der Accounts und die Seeds und Bump, die verwendet werden, um den PDA abzuleiten, an \u201Einvoke_signed\u201C \xFCbergeben. Zus\xE4tzlich zum Signieren von Anweisungen m\xFCssen PDAs auch f\xFCr ihre eigene Erstellung \xFCber "invoke_signed" signieren.'),H=n("Beim Bauen mit PDAs ist es \xFCblich, "),M={href:"https://github.com/solana-labs/solana-program-library/blob/78e29e9238e555967b9125799d7d420d7d12b959/token-swap/program/src/state.rs#L100",target:"_blank",rel:"noopener noreferrer"},Z=n("den Bump Seed in den Kontodaten selbst zu speichern"),q=n(". Auf diese Weise k\xF6nnen Entwickler einen PDA einfach validieren, ohne den Bump als Anweisungsargument \xFCbergeben zu m\xFCssen.having to pass in the bump as an instruction argument."),G=e("h2",{id:"andere-quellen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#andere-quellen","aria-hidden":"true"},"#"),n(" Andere Quellen")],-1),R={href:"https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses",target:"_blank",rel:"noopener noreferrer"},U=n("Offizielle Dokumentation"),W={href:"https://www.brianfriel.xyz/understanding-program-derived-addresses/",target:"_blank",rel:"noopener noreferrer"},j=n("Programmeigene Accounts verstehen");function O(Q,T){const r=t("ExternalLinkIcon"),i=t("RouterLink");return d(),l(c,null,[p,e("p",null,[_,e("a",f,[b,s(r)]),A]),v,e("div",P,[k,e("ul",null,[w,D,z,e("li",null,[S,e("a",x,[B,s(r)])]),E,e("li",null,[K,s(i,{to:"/de/guides/account-maps.html"},{default:a(()=>[y]),_:1})])])]),I,e("p",null,[L,F,N,s(i,{to:"/de/references/accounts.html#sign-with-a-pda"},{default:a(()=>[V]),_:1}),C]),e("p",null,[H,e("a",M,[Z,s(r)]),q]),G,e("ul",null,[e("li",null,[e("a",R,[U,s(r)])]),e("li",null,[e("a",W,[j,s(r)])])])],64)}var X=o(g,[["render",O]]);export{X as default}; diff --git a/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.a3b74cb4.js b/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.1b61517d.js similarity index 99% rename from docs/.vuepress/dist/assets/porting-anchor-to-unity.html.a3b74cb4.js rename to docs/.vuepress/dist/assets/porting-anchor-to-unity.html.1b61517d.js index a93b2434f..e5cf8c203 100644 --- a/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.a3b74cb4.js +++ b/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.1b61517d.js @@ -1,4 +1,4 @@ -import{_ as o,r as p,o as c,c as l,a as n,b as t,F as i,d as a,e}from"./app.07ce7a66.js";const r={},u=n("h1",{id:"porting-a-program-to-unity",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#porting-a-program-to-unity","aria-hidden":"true"},"#"),a(" Porting a program to Unity")],-1),k=n("p",null,"When you have written a solana program you now maybe want to use it in the Unity Game engine. Fortunately there is a code generator which lets you port a anchor idl (a json representation of a solana program) to C#",-1),h=n("h2",{id:"generating-the-client",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#generating-the-client","aria-hidden":"true"},"#"),a(" Generating the Client")],-1),d=a("When using Anchor you will be able to generate an IDL file which is a JSON representation of your program. With this IDL you can then generate different clients. For example JS or C# to Unity. "),m=n("br",null,null,-1),b={href:"https://github.com/magicblock-labs/Solana.Unity.Anchor",target:"_blank",rel:"noopener noreferrer"},g=a("IDL to C# Converter"),_=n("br",null,null,-1),f=e(`

    These two lines will generate a C# client for the game.

    dotnet tool install Solana.Unity.Anchor.Tool
    +import{_ as o,r as p,o as c,c as l,a as n,b as t,F as i,d as a,e}from"./app.d411e3b3.js";const r={},u=n("h1",{id:"porting-a-program-to-unity",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#porting-a-program-to-unity","aria-hidden":"true"},"#"),a(" Porting a program to Unity")],-1),k=n("p",null,"When you have written a solana program you now maybe want to use it in the Unity Game engine. Fortunately there is a code generator which lets you port a anchor idl (a json representation of a solana program) to C#",-1),h=n("h2",{id:"generating-the-client",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#generating-the-client","aria-hidden":"true"},"#"),a(" Generating the Client")],-1),d=a("When using Anchor you will be able to generate an IDL file which is a JSON representation of your program. With this IDL you can then generate different clients. For example JS or C# to Unity. "),m=n("br",null,null,-1),b={href:"https://github.com/magicblock-labs/Solana.Unity.Anchor",target:"_blank",rel:"noopener noreferrer"},g=a("IDL to C# Converter"),_=n("br",null,null,-1),f=e(`

    These two lines will generate a C# client for the game.

    dotnet tool install Solana.Unity.Anchor.Tool
     dotnet anchorgen -i idl/file.json -o src/ProgramCode.cs
     

    This will generate you a C# representation of you program, which lets you deserialize the data and easily create instructions to the program.

    Building the Transaction in Unity C#

    `,4),y=a("Within Unity game engine we can then use the "),w={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},v=a("Solana Unity SDK"),S=a(" to interact with the program."),T=n("li",null,[n("p",null,"First we find the on chain adress of the game data account with TryFindProgramAddress. We need to pass in this account to the transaction so that the Solana runtime knows that we want to change this account.")],-1),C=n("li",null,[n("p",null,"Next we use the generated client to create a MoveRight instruction.")],-1),A=n("li",null,[n("p",null,"Then we request a block hash from an RPC node. This is needed so that Solana knows how long the transaction will be valid.")],-1),R=n("li",null,[n("p",null,"Next we set the fee payer to be the players wallet.")],-1),x=n("li",null,[n("p",null,"Then we add the move right instruction to the Transaction. We can also add multiple instructions to a singe transaction if needed.")],-1),P=n("li",null,[n("p",null,"Afterwards the transaction gets signed and then send to the RPC node for processing. Solana has different Commitment levels. If we set the commitment level to Confirmed we will be able to get the new state already within the next 500ms.")],-1),I={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},B=a("Full C# Source Code"),W=e(`
    public async void MoveRight()
     {
    diff --git a/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.2d7da15e.js b/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.74618a6d.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/porting-anchor-to-unity.html.2d7da15e.js
    rename to docs/.vuepress/dist/assets/porting-anchor-to-unity.html.74618a6d.js
    index cca119259..713a65c22 100644
    --- a/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.2d7da15e.js
    +++ b/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.74618a6d.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as e,o as c,c as i,a as n,b as t,F as l,d as a,e as o}from"./app.07ce7a66.js";const u={},r=n("h1",{id:"pag-port-ng-isang-programa-sa-unity",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pag-port-ng-isang-programa-sa-unity","aria-hidden":"true"},"#"),a(" Pag-port ng isang programa sa Unity")],-1),g=n("p",null,"Kapag nakapagsulat ka na ng solana program ay baka gusto mo na itong gamitin sa Unity Game engine. Sa kabutihang palad mayroong isang code generator na nagbibigay-daan sa iyo na mag-port ng isang anchor idl (isang representasyon ng json ng isang solana program) sa C#",-1),k=n("h2",{id:"pagbuo-ng-kliyente",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagbuo-ng-kliyente","aria-hidden":"true"},"#"),a(" Pagbuo ng Kliyente")],-1),m=a("Kapag gumagamit ng Anchor makakabuo ka ng isang IDL file na isang representasyon ng JSON ng iyong programa. Gamit ang IDL na ito maaari kang makabuo ng iba't ibang mga kliyente. Halimbawa JS o C# sa Unity. "),d=n("br",null,null,-1),b={href:"https://github.com/magicblock-labs/Solana.Unity.Anchor",target:"_blank",rel:"noopener noreferrer"},h=a("IDL to C# Converter"),y=n("br",null,null,-1),_=o(`

    Ang dalawang linyang ito ay bubuo ng isang C# client para sa laro.

    dotnet tool install Solana.Unity.Anchor.Tool
    +import{_ as p,r as e,o as c,c as i,a as n,b as t,F as l,d as a,e as o}from"./app.d411e3b3.js";const u={},r=n("h1",{id:"pag-port-ng-isang-programa-sa-unity",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pag-port-ng-isang-programa-sa-unity","aria-hidden":"true"},"#"),a(" Pag-port ng isang programa sa Unity")],-1),g=n("p",null,"Kapag nakapagsulat ka na ng solana program ay baka gusto mo na itong gamitin sa Unity Game engine. Sa kabutihang palad mayroong isang code generator na nagbibigay-daan sa iyo na mag-port ng isang anchor idl (isang representasyon ng json ng isang solana program) sa C#",-1),k=n("h2",{id:"pagbuo-ng-kliyente",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagbuo-ng-kliyente","aria-hidden":"true"},"#"),a(" Pagbuo ng Kliyente")],-1),m=a("Kapag gumagamit ng Anchor makakabuo ka ng isang IDL file na isang representasyon ng JSON ng iyong programa. Gamit ang IDL na ito maaari kang makabuo ng iba't ibang mga kliyente. Halimbawa JS o C# sa Unity. "),d=n("br",null,null,-1),b={href:"https://github.com/magicblock-labs/Solana.Unity.Anchor",target:"_blank",rel:"noopener noreferrer"},h=a("IDL to C# Converter"),y=n("br",null,null,-1),_=o(`

    Ang dalawang linyang ito ay bubuo ng isang C# client para sa laro.

    dotnet tool install Solana.Unity.Anchor.Tool
     dotnet anchorgen -i idl/file.json -o src/ProgramCode.cs
     

    Ito ay bubuo sa iyo ng isang C# na representasyon ng iyong programa, na nagbibigay-daan sa iyong deserialize ang data at madaling gumawa ng mga instruction sa programa.

    Pagbuo ng Transaksyon sa Unity C#

    `,4),v=a("Sa loob ng Unity game engine, magagamit natin ang "),f={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},S=a("Solana Unity SDK"),A=a(" upang makipag-ugnayan sa programa."),C=n("li",null,[n("p",null,"Una nating mahanap ang nasa chain address ng game data account na may TryFindProgramAddress. Kailangan nating ipasa ang account na ito sa transaksyon para malaman ng Solana runtime na gusto nating baguhin ang account na ito.")],-1),P=n("li",null,[n("p",null,"Susunod na ginagamit namin ang nabuong kliyente upang lumikha ng MoveRight na pagtuturo.")],-1),T=n("li",null,[n("p",null,"Pagkatapos ay humiling kami ng block hash mula sa isang RPC node. Ito ay kinakailangan upang malaman ni Solana kung gaano katagal ang magiging bisa ng transaksyon.")],-1),w=n("li",null,[n("p",null,"Susunod na itinakda namin ang nagbabayad ng bayad upang maging wallet ng mga manlalaro.")],-1),R=n("li",null,[n("p",null,"Pagkatapos ay idinagdag namin ang paglipat ng tamang pagtuturo sa Transaksyon. Maaari din kaming magdagdag ng maraming instruction sa isang solong transaksyon kung kinakailangan.")],-1),I=n("li",null,[n("p",null,"Pagkatapos ang transaksyon ay mapirmahan at pagkatapos ay ipadala sa RPC node para sa pagproseso. May iba't ibang antas ng Commitment ang Solana. Kung itatakda namin ang antas ng pangako sa Nakumpirma, makukuha na namin ang bagong estado sa loob ng susunod na 500ms.")],-1),B={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},x=a("Buong C# Source Code"),U=o(`
    public async void MoveRight()
     {
    diff --git a/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.d93d3149.js b/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.81c8bafe.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/porting-anchor-to-unity.html.d93d3149.js
    rename to docs/.vuepress/dist/assets/porting-anchor-to-unity.html.81c8bafe.js
    index a1736175f..a702a0559 100644
    --- a/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.d93d3149.js
    +++ b/docs/.vuepress/dist/assets/porting-anchor-to-unity.html.81c8bafe.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r as p,o as c,c as u,a as n,b as t,F as r,d as s,e}from"./app.07ce7a66.js";const i={},l=n("h1",{id:"portage-d-un-programme-vers-unity",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#portage-d-un-programme-vers-unity","aria-hidden":"true"},"#"),s(" Portage d'un programme vers Unity")],-1),d=n("p",null,"Lorsque vous avez \xE9crit un programme Solana, vous souhaitez peut-\xEAtre l'utiliser dans le moteur de jeu Unity. Heureusement, il existe un g\xE9n\xE9rateur de code qui vous permet de porter un IDL anchor (une repr\xE9sentation json d'un programme solana) en C#.",-1),k=n("h2",{id:"creation-du-client",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#creation-du-client","aria-hidden":"true"},"#"),s(" Cr\xE9ation du client")],-1),m=s("En utilisant Anchor, vous pourrez g\xE9n\xE9rer un fichier IDL qui est une repr\xE9sentation JSON de votre programme. Cet IDL permet de g\xE9n\xE9rer diff\xE9rents clients. Par exemple, JS ou C# pour Unity. "),b=n("br",null,null,-1),g={href:"https://github.com/magicblock-labs/Solana.Unity.Anchor",target:"_blank",rel:"noopener noreferrer"},h=s("Convertisseur IDL vers C#"),v=n("br",null,null,-1),_=e(`

    Ces deux lignes g\xE9n\xE8rent un client C# pour le jeu.

    dotnet tool install Solana.Unity.Anchor.Tool
    +import{_ as o,r as p,o as c,c as u,a as n,b as t,F as r,d as s,e}from"./app.d411e3b3.js";const i={},l=n("h1",{id:"portage-d-un-programme-vers-unity",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#portage-d-un-programme-vers-unity","aria-hidden":"true"},"#"),s(" Portage d'un programme vers Unity")],-1),d=n("p",null,"Lorsque vous avez \xE9crit un programme Solana, vous souhaitez peut-\xEAtre l'utiliser dans le moteur de jeu Unity. Heureusement, il existe un g\xE9n\xE9rateur de code qui vous permet de porter un IDL anchor (une repr\xE9sentation json d'un programme solana) en C#.",-1),k=n("h2",{id:"creation-du-client",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#creation-du-client","aria-hidden":"true"},"#"),s(" Cr\xE9ation du client")],-1),m=s("En utilisant Anchor, vous pourrez g\xE9n\xE9rer un fichier IDL qui est une repr\xE9sentation JSON de votre programme. Cet IDL permet de g\xE9n\xE9rer diff\xE9rents clients. Par exemple, JS ou C# pour Unity. "),b=n("br",null,null,-1),g={href:"https://github.com/magicblock-labs/Solana.Unity.Anchor",target:"_blank",rel:"noopener noreferrer"},h=s("Convertisseur IDL vers C#"),v=n("br",null,null,-1),_=e(`

    Ces deux lignes g\xE9n\xE8rent un client C# pour le jeu.

    dotnet tool install Solana.Unity.Anchor.Tool
     dotnet anchorgen -i idl/file.json -o src/ProgramCode.cs
     

    Vous obtiendrez ainsi une repr\xE9sentation C# de votre programme, qui vous permettra de d\xE9s\xE9rialiser les donn\xE9es et de cr\xE9er facilement des instructions du programme.

    Cr\xE9ation de la transaction dans Unity C#

    `,4),f=s("Dans le moteur de jeu Unity, nous pouvons utiliser le "),y={href:"https://assetstore.unity.com/packages/decentralization/infrastructure/solana-sdk-for-unity-246931",target:"_blank",rel:"noopener noreferrer"},S=s("SDK Solana Unity"),C=s(" pour interagir avec le programme."),A=e("
  • Tout d'abord, nous trouvons l'adresse du compte de donn\xE9es de jeu stock\xE9 sur la cha\xEEne avec TryFindProgramAddress. Nous devons transmettre ce compte \xE0 la transaction pour que le runtime de Solana sache que nous voulons changer ce compte.

  • Nous utilisons ensuite le client g\xE9n\xE9r\xE9 pour cr\xE9er une instruction MoveRight.

  • Nous r\xE9cup\xE9rons ensuite un hash de bloc en le demandant \xE0 un n\u0153ud RPC. Cela est n\xE9cessaire pour que Solana sache combien de temps la transaction sera valable.

  • Ensuite, nous d\xE9finissons le payeur des frais comme \xE9tant le portefeuille du joueur.

  • Nous ajoutons ensuite l'instruction MoveRight \xE0 la transaction. Nous pouvons \xE9galement ajouter plusieurs instructions \xE0 une seule transaction si n\xE9cessaire.

  • La transaction est ensuite sign\xE9e et envoy\xE9e au n\u0153ud RPC pour traitement. Solana propose diff\xE9rents niveaux d'engagement (Commitment). Si nous fixons le niveau d'engagement \xE0 Confirmed nous pourrons obtenir le nouvel \xE9tat dans les 500ms prochaines.

  • ",6),T={href:"https://github.com/Woody4618/SolPlay_Unity_SDK/tree/main/Assets/SolPlay/Examples/TinyAdventure",target:"_blank",rel:"noopener noreferrer"},R=s("Code source en C# complet"),x=e(`
    public async void MoveRight()
     {
    diff --git a/docs/.vuepress/dist/assets/programs.html.fb2104eb.js b/docs/.vuepress/dist/assets/programs.html.11e7bbe0.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/programs.html.fb2104eb.js
    rename to docs/.vuepress/dist/assets/programs.html.11e7bbe0.js
    index 151b167a7..5e60a49be 100644
    --- a/docs/.vuepress/dist/assets/programs.html.fb2104eb.js
    +++ b/docs/.vuepress/dist/assets/programs.html.11e7bbe0.js
    @@ -1,2 +1,2 @@
    -import{_ as i,r as s,o as c,c as d,a as o,b as t,w as l,F as _,d as e,e as n}from"./app.07ce7a66.js";const h={},p=o("h1",{id:"programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),e(" Programs")],-1),m=o("p",null,"\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19 \u0E41\u0E25\u0E30\u0E1B\u0E25\u0E48\u0E2D\u0E22 (deploy) programs \u0E1A\u0E19 Solana blockchain. Programs (\u0E0B\u0E36\u0E48\u0E07\u0E01\u0E47\u0E04\u0E37\u0E2D smart contracts \u0E1A\u0E19 protocols \u0E2D\u0E37\u0E48\u0E19\u0E46) \u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E23\u0E32\u0E01\u0E10\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19 on-chain, \u0E17\u0E33\u0E44\u0E14\u0E49\u0E17\u0E38\u0E01\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48 DeFi \u0E41\u0E25\u0E30 NFTs \u0E08\u0E19\u0E44\u0E1B\u0E16\u0E36\u0E07 Social Media \u0E41\u0E25\u0E30 Gaming.",-1),g=o("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),e(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),u={class:"custom-container tip"},b=o("p",{class:"custom-container-title"},"Fact Sheet",-1),f=o("li",null,[e("Programs \u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 "),o("a",{href:"./transactions"},"instructions"),e(" \u0E17\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48\u0E21\u0E32\u0E08\u0E32\u0E01 end users \u0E41\u0E25\u0E30\u0E21\u0E32\u0E08\u0E32\u0E01 programs \u0E2D\u0E37\u0E48\u0E19\u0E46")],-1),k=e("\u0E17\u0E38\u0E01\u0E46 programs \u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 "),P=o("em",null,"stateless",-1),y=e(": \u0E41\u0E25\u0E30 data \u0E17\u0E35\u0E48\u0E21\u0E31\u0E19\u0E17\u0E33\u0E07\u0E32\u0E19\u0E14\u0E49\u0E27\u0E22\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E41\u0E22\u0E01\u0E44\u0E27\u0E49\u0E17\u0E35\u0E48 "),v=e("accounts"),L=e(" \u0E17\u0E35\u0E48\u0E2A\u0E48\u0E07\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32\u0E17\u0E32\u0E07 instructions"),S=o("li",null,[e("Programs \u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E43\u0E19 accounts \u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 "),o("code",null,"executable")],-1),x=e("\u0E17\u0E38\u0E01\u0E46 programs \u0E08\u0E30\u0E21\u0E35\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E04\u0E37\u0E2D "),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},R=e("BPF Loader"),B=e(" \u0E41\u0E25\u0E30\u0E08\u0E30\u0E16\u0E39\u0E01\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 (executed) \u0E42\u0E14\u0E22 "),w={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},A=e("Solana Runtime"),C=e("\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E08\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19 programs \u0E14\u0E49\u0E27\u0E22\u0E20\u0E32\u0E29\u0E32 Rust \u0E2B\u0E23\u0E37\u0E2D C++, \u0E41\u0E15\u0E48\u0E01\u0E47\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E20\u0E32\u0E29\u0E32\u0E43\u0E14\u0E46 \u0E01\u0E47\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 target "),N={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=e("LLVM"),E=e("'s "),T={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},I=e("BPF"),M=e(" \u0E44\u0E14\u0E49"),V=n("
  • \u0E17\u0E38\u0E01\u0E46 programs \u0E08\u0E30\u0E21\u0E35\u0E17\u0E32\u0E07\u0E40\u0E02\u0E49\u0E32 (entry point) \u0E17\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 \u0E0B\u0E36\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48 instruction \u0E08\u0E30\u0E16\u0E39\u0E01\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23(process_instruction); parameters \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E2A\u0E34\u0E48\u0E07\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E40\u0E2A\u0E21\u0E2D:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),z=o("h2",{id:"\u0E25\u0E07\u0E25\u0E36\u0E01",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u0E25\u0E07\u0E25\u0E36\u0E01","aria-hidden":"true"},"#"),e(" \u0E25\u0E07\u0E25\u0E36\u0E01")],-1),j=o("p",null,"Solana \u0E44\u0E21\u0E48\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 blockchains \u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E15\u0E23\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E41\u0E22\u0E01 code \u0E01\u0E31\u0E1A data \u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E01\u0E31\u0E19 \u0E17\u0E38\u0E01\u0E46 data \u0E17\u0E35\u0E48 programs \u0E08\u0E30\u0E43\u0E0A\u0E49\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E27\u0E49\u0E43\u0E19 account \u0E2D\u0E35\u0E01\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E01\u0E31\u0E19 \u0E41\u0E25\u0E30 programs \u0E08\u0E30\u0E23\u0E31\u0E1A\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07 (references) \u0E44\u0E1B\u0E16\u0E36\u0E07 account \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19\u0E1C\u0E48\u0E32\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E0A\u0E38\u0E14\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 (instructions) \u0E01\u0E32\u0E23\u0E17\u0E33\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 program \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E07\u0E32\u0E19\u0E02\u0E49\u0E32\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 accounts \u0E15\u0E48\u0E32\u0E07\u0E46 \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07 deploy \u0E43\u0E2B\u0E21\u0E48 \u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A (pattern) \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2B\u0E47\u0E19\u0E44\u0E14\u0E49\u0E43\u0E19\u0E17\u0E31\u0E49\u0E07 Native \u0E41\u0E25\u0E30 SPL Programs",-1),O=o("h3",{id:"native-programs-\u0E41\u0E25\u0E30-the-solana-program-library-spl",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#native-programs-\u0E41\u0E25\u0E30-the-solana-program-library-spl","aria-hidden":"true"},"#"),e(" Native Programs \u0E41\u0E25\u0E30 The Solana Program Library (SPL)")],-1),U=e("Solana \u0E21\u0E32\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E01\u0E31\u0E1A programs \u0E2B\u0E25\u0E32\u0E22\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19 on-chain. \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 programs \u0E08\u0E30\u0E41\u0E1A\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19 "),G={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},H=e("Native Programs"),J=e(" \u0E41\u0E25\u0E30 "),K={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},q=e("Solana Program Library (SPL) Programs"),Q=e("."),W=e("Native Programs \u0E21\u0E35\u0E44\u0E27\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07 validators \u0E42\u0E14\u0E22\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E01\u0E31\u0E19\u0E21\u0E32\u0E01\u0E04\u0E37\u0E2D "),X={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Y=e("System Program"),Z=e(" \u0E17\u0E35\u0E48\u0E08\u0E30\u0E04\u0E2D\u0E22\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A\u0E14\u0E39\u0E41\u0E25 accounts \u0E43\u0E2B\u0E21\u0E48 \u0E41\u0E25\u0E30\u0E2A\u0E48\u0E07(transfer) SOL \u0E44\u0E1B\u0E21\u0E32."),$=e("SPL Programs \u0E21\u0E35\u0E44\u0E27\u0E49\u0E17\u0E33\u0E07\u0E32\u0E19 on-chain \u0E2B\u0E25\u0E32\u0E22\u0E2D\u0E22\u0E48\u0E32\u0E07, \u0E17\u0E31\u0E49\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 (creating), \u0E2A\u0E25\u0E31\u0E1A (swapping), \u0E41\u0E25\u0E30\u0E40\u0E0A\u0E48\u0E32 (lending) \u0E42\u0E17\u0E40\u0E04\u0E19 (tokens), \u0E41\u0E25\u0E30\u0E22\u0E31\u0E07\u0E21\u0E35\u0E44\u0E27\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07 stake pools \u0E41\u0E25\u0E30\u0E14\u0E39\u0E41\u0E25 on-chain name service \u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22 \u0E42\u0E14\u0E22 "),oo={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},eo=e("SPL Token Program"),to=e(" \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 (invoke) \u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E1C\u0E48\u0E32\u0E19 CLI, \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48 "),ro={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},no=e("Associated Token Account Program"),so=e(" \u0E08\u0E30\u0E16\u0E39\u0E01\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E14\u0E49\u0E27\u0E22 programs \u0E17\u0E35\u0E48\u0E17\u0E33\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E40\u0E2D\u0E07."),ao=o("h3",{id:"\u0E40\u0E02\u0E35\u0E22\u0E19-programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u0E40\u0E02\u0E35\u0E22\u0E19-programs","aria-hidden":"true"},"#"),e(" \u0E40\u0E02\u0E35\u0E22\u0E19 Programs")],-1),io=e("Programs \u0E2A\u0E48\u0E27\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E08\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19\u0E14\u0E49\u0E27\u0E22 Rust \u0E2B\u0E23\u0E37\u0E2D C++, \u0E41\u0E15\u0E48\u0E01\u0E47\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E20\u0E32\u0E29\u0E32\u0E43\u0E14\u0E46 \u0E01\u0E47\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 target LLVM\u2019s BPF \u0E44\u0E14\u0E49 \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E19\u0E35\u0E49\u0E08\u0E32\u0E01\u0E04\u0E27\u0E32\u0E21\u0E23\u0E48\u0E27\u0E21\u0E21\u0E37\u0E2D\u0E02\u0E2D\u0E07 "),co={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},lo=e("Neon Labs"),_o=e(" \u0E41\u0E25\u0E30 "),ho={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},po=e("Solang"),mo=e(" \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 "),go={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},uo=e("EVM"),bo=e(" \u0E0B\u0E36\u0E48\u0E07\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19 programs \u0E14\u0E49\u0E27\u0E22 Solidity \u0E44\u0E14\u0E49."),fo=n("

    programs \u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E14\u0E49\u0E27\u0E22 Rust \u0E08\u0E30\u0E22\u0E36\u0E14\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E19\u0E35\u0E49:

    \u0E44\u0E1F\u0E25\u0E4C (File)\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22
    lib.rs\u0E25\u0E07\u0E17\u0E30\u0E40\u0E1A\u0E35\u0E22\u0E19 modules
    entrypoint.rs\u0E17\u0E32\u0E07\u0E40\u0E02\u0E49\u0E32 (Entrypoint) \u0E02\u0E2D\u0E07 program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),ko=e("\u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49, "),Po={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},yo=e("Anchor"),vo=e(" \u0E40\u0E1B\u0E47\u0E19 framework \u0E17\u0E35\u0E48\u0E19\u0E34\u0E22\u0E21\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1E\u0E31\u0E12\u0E19\u0E32 programs. Anchor \u0E04\u0E37\u0E2D framework \u0E17\u0E35\u0E48\u0E21\u0E35\u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19 (opinionated), \u0E04\u0E25\u0E49\u0E32\u0E22\u0E01\u0E31\u0E1A Ruby on Rails \u0E17\u0E35\u0E48\u0E25\u0E14\u0E01\u0E32\u0E23\u0E40\u0E02\u0E35\u0E22\u0E19\u0E2D\u0E30\u0E44\u0E23\u0E0B\u0E49\u0E33\u0E46 \u0E41\u0E25\u0E30\u0E0A\u0E48\u0E27\u0E22\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E41\u0E01\u0E30 (de)serialization \u0E2A\u0E30\u0E14\u0E27\u0E01\u0E02\u0E36\u0E49\u0E19\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E14\u0E49\u0E27\u0E22 Rust."),Lo=n("

    Programs \u0E1B\u0E01\u0E15\u0E34\u0E41\u0E25\u0E49\u0E27\u0E08\u0E30\u0E16\u0E39\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 (dev) \u0E41\u0E25\u0E30\u0E17\u0E14\u0E2A\u0E2D\u0E1A(test) \u0E1A\u0E19\u0E2A\u0E34\u0E48\u0E07\u0E41\u0E27\u0E14\u0E25\u0E49\u0E2D\u0E21(environments) Localhost \u0E41\u0E25\u0E30 Devnet \u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30 deploy \u0E44\u0E1B\u0E1A\u0E19 Testnet \u0E2B\u0E23\u0E37\u0E2D Mainnet. Solana \u0E08\u0E30\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 environments \u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E19\u0E35\u0E49:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),So=e("\u0E40\u0E21\u0E37\u0E48\u0E2D deployed \u0E44\u0E1B\u0E1A\u0E19 environment \u0E41\u0E25\u0E49\u0E27\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49 (clients) \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 on-chain programs \u0E1C\u0E48\u0E32\u0E19 "),xo={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Fo=e("RPC connections"),Ro=e(" \u0E44\u0E1B\u0E17\u0E35\u0E48 cluster \u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E27\u0E49."),Bo=o("h3",{id:"deploying-programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#deploying-programs","aria-hidden":"true"},"#"),e(" Deploying Programs")],-1),wo=e("\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 deploy programs \u0E1C\u0E48\u0E32\u0E19 "),Ao={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Co=e("CLI"),No=e(":"),Do=n(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as s,o as c,c as d,a as o,b as t,w as l,F as _,d as e,e as n}from"./app.d411e3b3.js";const h={},p=o("h1",{id:"programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),e(" Programs")],-1),m=o("p",null,"\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19 \u0E41\u0E25\u0E30\u0E1B\u0E25\u0E48\u0E2D\u0E22 (deploy) programs \u0E1A\u0E19 Solana blockchain. Programs (\u0E0B\u0E36\u0E48\u0E07\u0E01\u0E47\u0E04\u0E37\u0E2D smart contracts \u0E1A\u0E19 protocols \u0E2D\u0E37\u0E48\u0E19\u0E46) \u0E40\u0E1B\u0E47\u0E19\u0E2A\u0E48\u0E27\u0E19\u0E23\u0E32\u0E01\u0E10\u0E32\u0E19\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19 on-chain, \u0E17\u0E33\u0E44\u0E14\u0E49\u0E17\u0E38\u0E01\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E15\u0E31\u0E49\u0E07\u0E41\u0E15\u0E48 DeFi \u0E41\u0E25\u0E30 NFTs \u0E08\u0E19\u0E44\u0E1B\u0E16\u0E36\u0E07 Social Media \u0E41\u0E25\u0E30 Gaming.",-1),g=o("h2",{id:"\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49","aria-hidden":"true"},"#"),e(" \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49")],-1),u={class:"custom-container tip"},b=o("p",{class:"custom-container-title"},"Fact Sheet",-1),f=o("li",null,[e("Programs \u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 "),o("a",{href:"./transactions"},"instructions"),e(" \u0E17\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48\u0E21\u0E32\u0E08\u0E32\u0E01 end users \u0E41\u0E25\u0E30\u0E21\u0E32\u0E08\u0E32\u0E01 programs \u0E2D\u0E37\u0E48\u0E19\u0E46")],-1),k=e("\u0E17\u0E38\u0E01\u0E46 programs \u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 "),P=o("em",null,"stateless",-1),y=e(": \u0E41\u0E25\u0E30 data \u0E17\u0E35\u0E48\u0E21\u0E31\u0E19\u0E17\u0E33\u0E07\u0E32\u0E19\u0E14\u0E49\u0E27\u0E22\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E41\u0E22\u0E01\u0E44\u0E27\u0E49\u0E17\u0E35\u0E48 "),v=e("accounts"),L=e(" \u0E17\u0E35\u0E48\u0E2A\u0E48\u0E07\u0E1C\u0E48\u0E32\u0E19\u0E21\u0E32\u0E17\u0E32\u0E07 instructions"),S=o("li",null,[e("Programs \u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E43\u0E19 accounts \u0E17\u0E35\u0E48\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 "),o("code",null,"executable")],-1),x=e("\u0E17\u0E38\u0E01\u0E46 programs \u0E08\u0E30\u0E21\u0E35\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07\u0E04\u0E37\u0E2D "),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},R=e("BPF Loader"),B=e(" \u0E41\u0E25\u0E30\u0E08\u0E30\u0E16\u0E39\u0E01\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 (executed) \u0E42\u0E14\u0E22 "),w={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},A=e("Solana Runtime"),C=e("\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E08\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19 programs \u0E14\u0E49\u0E27\u0E22\u0E20\u0E32\u0E29\u0E32 Rust \u0E2B\u0E23\u0E37\u0E2D C++, \u0E41\u0E15\u0E48\u0E01\u0E47\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E20\u0E32\u0E29\u0E32\u0E43\u0E14\u0E46 \u0E01\u0E47\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 target "),N={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=e("LLVM"),E=e("'s "),T={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},I=e("BPF"),M=e(" \u0E44\u0E14\u0E49"),V=n("
  • \u0E17\u0E38\u0E01\u0E46 programs \u0E08\u0E30\u0E21\u0E35\u0E17\u0E32\u0E07\u0E40\u0E02\u0E49\u0E32 (entry point) \u0E17\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 \u0E0B\u0E36\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E17\u0E35\u0E48\u0E17\u0E35\u0E48 instruction \u0E08\u0E30\u0E16\u0E39\u0E01\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23(process_instruction); parameters \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E2A\u0E34\u0E48\u0E07\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E40\u0E2A\u0E21\u0E2D:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),z=o("h2",{id:"\u0E25\u0E07\u0E25\u0E36\u0E01",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u0E25\u0E07\u0E25\u0E36\u0E01","aria-hidden":"true"},"#"),e(" \u0E25\u0E07\u0E25\u0E36\u0E01")],-1),j=o("p",null,"Solana \u0E44\u0E21\u0E48\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19 blockchains \u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E15\u0E23\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E41\u0E22\u0E01 code \u0E01\u0E31\u0E1A data \u0E2D\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E01\u0E31\u0E19 \u0E17\u0E38\u0E01\u0E46 data \u0E17\u0E35\u0E48 programs \u0E08\u0E30\u0E43\u0E0A\u0E49\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E27\u0E49\u0E43\u0E19 account \u0E2D\u0E35\u0E01\u0E15\u0E31\u0E27\u0E41\u0E22\u0E01\u0E01\u0E31\u0E19 \u0E41\u0E25\u0E30 programs \u0E08\u0E30\u0E23\u0E31\u0E1A\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07 (references) \u0E44\u0E1B\u0E16\u0E36\u0E07 account \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E31\u0E49\u0E19\u0E1C\u0E48\u0E32\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E0A\u0E38\u0E14\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 (instructions) \u0E01\u0E32\u0E23\u0E17\u0E33\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 program \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E07\u0E32\u0E19\u0E02\u0E49\u0E32\u0E21 \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 accounts \u0E15\u0E48\u0E32\u0E07\u0E46 \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07 deploy \u0E43\u0E2B\u0E21\u0E48 \u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A (pattern) \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2B\u0E47\u0E19\u0E44\u0E14\u0E49\u0E43\u0E19\u0E17\u0E31\u0E49\u0E07 Native \u0E41\u0E25\u0E30 SPL Programs",-1),O=o("h3",{id:"native-programs-\u0E41\u0E25\u0E30-the-solana-program-library-spl",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#native-programs-\u0E41\u0E25\u0E30-the-solana-program-library-spl","aria-hidden":"true"},"#"),e(" Native Programs \u0E41\u0E25\u0E30 The Solana Program Library (SPL)")],-1),U=e("Solana \u0E21\u0E32\u0E1E\u0E23\u0E49\u0E2D\u0E21\u0E01\u0E31\u0E1A programs \u0E2B\u0E25\u0E32\u0E22\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19 on-chain. \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 programs \u0E08\u0E30\u0E41\u0E1A\u0E48\u0E07\u0E40\u0E1B\u0E47\u0E19 "),G={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},H=e("Native Programs"),J=e(" \u0E41\u0E25\u0E30 "),K={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},q=e("Solana Program Library (SPL) Programs"),Q=e("."),W=e("Native Programs \u0E21\u0E35\u0E44\u0E27\u0E49\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19\u0E02\u0E2D\u0E07 validators \u0E42\u0E14\u0E22\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01\u0E01\u0E31\u0E19\u0E21\u0E32\u0E01\u0E04\u0E37\u0E2D "),X={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Y=e("System Program"),Z=e(" \u0E17\u0E35\u0E48\u0E08\u0E30\u0E04\u0E2D\u0E22\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A\u0E14\u0E39\u0E41\u0E25 accounts \u0E43\u0E2B\u0E21\u0E48 \u0E41\u0E25\u0E30\u0E2A\u0E48\u0E07(transfer) SOL \u0E44\u0E1B\u0E21\u0E32."),$=e("SPL Programs \u0E21\u0E35\u0E44\u0E27\u0E49\u0E17\u0E33\u0E07\u0E32\u0E19 on-chain \u0E2B\u0E25\u0E32\u0E22\u0E2D\u0E22\u0E48\u0E32\u0E07, \u0E17\u0E31\u0E49\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 (creating), \u0E2A\u0E25\u0E31\u0E1A (swapping), \u0E41\u0E25\u0E30\u0E40\u0E0A\u0E48\u0E32 (lending) \u0E42\u0E17\u0E40\u0E04\u0E19 (tokens), \u0E41\u0E25\u0E30\u0E22\u0E31\u0E07\u0E21\u0E35\u0E44\u0E27\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07 stake pools \u0E41\u0E25\u0E30\u0E14\u0E39\u0E41\u0E25 on-chain name service \u0E2D\u0E35\u0E01\u0E14\u0E49\u0E27\u0E22 \u0E42\u0E14\u0E22 "),oo={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},eo=e("SPL Token Program"),to=e(" \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 (invoke) \u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E1C\u0E48\u0E32\u0E19 CLI, \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48 "),ro={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},no=e("Associated Token Account Program"),so=e(" \u0E08\u0E30\u0E16\u0E39\u0E01\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E14\u0E49\u0E27\u0E22 programs \u0E17\u0E35\u0E48\u0E17\u0E33\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E40\u0E2D\u0E07."),ao=o("h3",{id:"\u0E40\u0E02\u0E35\u0E22\u0E19-programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#\u0E40\u0E02\u0E35\u0E22\u0E19-programs","aria-hidden":"true"},"#"),e(" \u0E40\u0E02\u0E35\u0E22\u0E19 Programs")],-1),io=e("Programs \u0E2A\u0E48\u0E27\u0E19\u0E43\u0E2B\u0E0D\u0E48\u0E08\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19\u0E14\u0E49\u0E27\u0E22 Rust \u0E2B\u0E23\u0E37\u0E2D C++, \u0E41\u0E15\u0E48\u0E01\u0E47\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E20\u0E32\u0E29\u0E32\u0E43\u0E14\u0E46 \u0E01\u0E47\u0E44\u0E14\u0E49\u0E17\u0E35\u0E48 target LLVM\u2019s BPF \u0E44\u0E14\u0E49 \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E19\u0E35\u0E49\u0E08\u0E32\u0E01\u0E04\u0E27\u0E32\u0E21\u0E23\u0E48\u0E27\u0E21\u0E21\u0E37\u0E2D\u0E02\u0E2D\u0E07 "),co={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},lo=e("Neon Labs"),_o=e(" \u0E41\u0E25\u0E30 "),ho={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},po=e("Solang"),mo=e(" \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 "),go={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},uo=e("EVM"),bo=e(" \u0E0B\u0E36\u0E48\u0E07\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19 programs \u0E14\u0E49\u0E27\u0E22 Solidity \u0E44\u0E14\u0E49."),fo=n("

    programs \u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E14\u0E49\u0E27\u0E22 Rust \u0E08\u0E30\u0E22\u0E36\u0E14\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E19\u0E35\u0E49:

    \u0E44\u0E1F\u0E25\u0E4C (File)\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22
    lib.rs\u0E25\u0E07\u0E17\u0E30\u0E40\u0E1A\u0E35\u0E22\u0E19 modules
    entrypoint.rs\u0E17\u0E32\u0E07\u0E40\u0E02\u0E49\u0E32 (Entrypoint) \u0E02\u0E2D\u0E07 program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),ko=e("\u0E43\u0E19\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49, "),Po={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},yo=e("Anchor"),vo=e(" \u0E40\u0E1B\u0E47\u0E19 framework \u0E17\u0E35\u0E48\u0E19\u0E34\u0E22\u0E21\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1E\u0E31\u0E12\u0E19\u0E32 programs. Anchor \u0E04\u0E37\u0E2D framework \u0E17\u0E35\u0E48\u0E21\u0E35\u0E41\u0E19\u0E27\u0E17\u0E32\u0E07\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19 (opinionated), \u0E04\u0E25\u0E49\u0E32\u0E22\u0E01\u0E31\u0E1A Ruby on Rails \u0E17\u0E35\u0E48\u0E25\u0E14\u0E01\u0E32\u0E23\u0E40\u0E02\u0E35\u0E22\u0E19\u0E2D\u0E30\u0E44\u0E23\u0E0B\u0E49\u0E33\u0E46 \u0E41\u0E25\u0E30\u0E0A\u0E48\u0E27\u0E22\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E41\u0E01\u0E30 (de)serialization \u0E2A\u0E30\u0E14\u0E27\u0E01\u0E02\u0E36\u0E49\u0E19\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E14\u0E49\u0E27\u0E22 Rust."),Lo=n("

    Programs \u0E1B\u0E01\u0E15\u0E34\u0E41\u0E25\u0E49\u0E27\u0E08\u0E30\u0E16\u0E39\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32 (dev) \u0E41\u0E25\u0E30\u0E17\u0E14\u0E2A\u0E2D\u0E1A(test) \u0E1A\u0E19\u0E2A\u0E34\u0E48\u0E07\u0E41\u0E27\u0E14\u0E25\u0E49\u0E2D\u0E21(environments) Localhost \u0E41\u0E25\u0E30 Devnet \u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30 deploy \u0E44\u0E1B\u0E1A\u0E19 Testnet \u0E2B\u0E23\u0E37\u0E2D Mainnet. Solana \u0E08\u0E30\u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 environments \u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E19\u0E35\u0E49:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),So=e("\u0E40\u0E21\u0E37\u0E48\u0E2D deployed \u0E44\u0E1B\u0E1A\u0E19 environment \u0E41\u0E25\u0E49\u0E27\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49 (clients) \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 on-chain programs \u0E1C\u0E48\u0E32\u0E19 "),xo={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Fo=e("RPC connections"),Ro=e(" \u0E44\u0E1B\u0E17\u0E35\u0E48 cluster \u0E15\u0E32\u0E21\u0E17\u0E35\u0E48\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E27\u0E49."),Bo=o("h3",{id:"deploying-programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#deploying-programs","aria-hidden":"true"},"#"),e(" Deploying Programs")],-1),wo=e("\u0E19\u0E31\u0E01\u0E1E\u0E31\u0E12\u0E19\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 deploy programs \u0E1C\u0E48\u0E32\u0E19 "),Ao={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Co=e("CLI"),No=e(":"),Do=n(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Eo=e("\u0E40\u0E21\u0E37\u0E48\u0E2D program \u0E16\u0E39\u0E01 deploy \u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27, \u0E21\u0E31\u0E19\u0E08\u0E30\u0E16\u0E39\u0E01\u0E41\u0E1B\u0E25\u0E07 (compile) \u0E40\u0E1B\u0E47\u0E19 "),To={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Io=e("ELF shared object"),Mo=e(" (\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22 BPF bytecode) \u0E41\u0E25\u0E30\u0E16\u0E39\u0E01 upload \u0E44\u0E1B\u0E17\u0E35\u0E48 Solana cluster. Programs \u0E08\u0E30\u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19 accounts (\u0E1A\u0E19 Solana \u0E17\u0E38\u0E01\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E22\u0E38\u0E48\u0E43\u0E19 accounts), \u0E15\u0E48\u0E32\u0E07\u0E15\u0E23\u0E07\u0E17\u0E35\u0E48 accounts \u0E19\u0E35\u0E49\u0E08\u0E30\u0E21\u0E35\u0E2A\u0E16\u0E32\u0E19\u0E30 "),Vo=o("code",null,"executable",-1),zo=e(" \u0E41\u0E25\u0E30\u0E16\u0E39\u0E01\u0E21\u0E2D\u0E1A\u0E2B\u0E21\u0E32\u0E22\u0E43\u0E2B\u0E49 BPF Loader. \u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 (address) \u0E02\u0E2D\u0E07 account \u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 "),jo=o("code",null,"program_id",-1),Oo=e(" \u0E41\u0E25\u0E30\u0E08\u0E30\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E43\u0E19\u0E01\u0E32\u0E23\u0E17\u0E33 transactions \u0E15\u0E48\u0E2D\u0E44\u0E1B."),Uo=e("Solana \u0E2A\u0E19\u0E31\u0E1A\u0E2A\u0E19\u0E38\u0E19 BPF Loaders \u0E2B\u0E25\u0E32\u0E22\u0E41\u0E1A\u0E1A, \u0E40\u0E0A\u0E48\u0E19 "),Go={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ho=e("Upgradable BPF Loader"),Jo=e(". The BPF Loader \u0E08\u0E30\u0E23\u0E31\u0E1A\u0E1C\u0E34\u0E14\u0E0A\u0E2D\u0E1A\u0E14\u0E39\u0E41\u0E25 program\u2019s account \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 clients \u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E1C\u0E48\u0E32\u0E19 "),Ko=o("code",null,"program_id",-1),qo=e(". \u0E17\u0E38\u0E01 programs \u0E21\u0E35 entry point \u0E17\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 \u0E41\u0E25\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 instruction ("),Qo=o("code",null,"process_instruction",-1),Wo=e(") \u0E41\u0E25\u0E30 parameters \u0E17\u0E35\u0E48\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E40\u0E2A\u0E21\u0E2D\u0E04\u0E37\u0E2D:"),Xo=n('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E01\u0E34\u0E14\u0E01\u0E32\u0E23\u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 (invoke) programs \u0E21\u0E31\u0E19\u0E08\u0E30\u0E16\u0E39\u0E01\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 (execute) \u0E42\u0E14\u0E22 Solana Runtime.

    \u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19

    ',3),Yo={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Zo=e("Official Documentation"),$o={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},oe=e("SPL Documentation"),ee={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},te=e("Program Deploys by Justin Starry"),re={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},ne=e("Solana Starter Kit by Iron Addicted Dog"),se={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},ae=e("Programming on Solana by Paulx"),ie={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},ce=e("An Introduction to the Solana Blockchain by Hana"),de={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},le=e("Anchor");function _e(he,pe){const a=s("RouterLink"),r=s("ExternalLinkIcon");return c(),d(_,null,[p,m,g,o("div",u,[b,o("ul",null,[f,o("li",null,[k,P,y,t(a,{to:"/th/core-concepts/accounts.html"},{default:l(()=>[v]),_:1}),L]),S,o("li",null,[x,o("a",F,[R,t(r)]),B,o("a",w,[A,t(r)])]),o("li",null,[C,o("a",N,[D,t(r)]),E,o("a",T,[I,t(r)]),M]),V])]),z,j,O,o("p",null,[U,o("a",G,[H,t(r)]),J,o("a",K,[q,t(r)]),Q]),o("p",null,[W,o("a",X,[Y,t(r)]),Z]),o("p",null,[$,o("a",oo,[eo,t(r)]),to,o("a",ro,[no,t(r)]),so]),ao,o("p",null,[io,o("a",co,[lo,t(r)]),_o,o("a",ho,[po,t(r)]),mo,o("a",go,[uo,t(r)]),bo]),fo,o("p",null,[ko,o("a",Po,[yo,t(r)]),vo]),Lo,o("p",null,[So,o("a",xo,[Fo,t(r)]),Ro]),Bo,o("p",null,[wo,o("a",Ao,[Co,t(r)]),No]),Do,o("p",null,[Eo,o("a",To,[Io,t(r)]),Mo,Vo,zo,jo,Oo]),o("p",null,[Uo,o("a",Go,[Ho,t(r)]),Jo,Ko,qo,Qo,Wo]),Xo,o("ul",null,[o("li",null,[o("a",Yo,[Zo,t(r)])]),o("li",null,[o("a",$o,[oe,t(r)])]),o("li",null,[o("a",ee,[te,t(r)])]),o("li",null,[o("a",re,[ne,t(r)])]),o("li",null,[o("a",se,[ae,t(r)])]),o("li",null,[o("a",ie,[ce,t(r)])]),o("li",null,[o("a",de,[le,t(r)])])])],64)}var ge=i(h,[["render",_e]]);export{ge as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.c4b45e07.js b/docs/.vuepress/dist/assets/programs.html.263f47ee.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.c4b45e07.js rename to docs/.vuepress/dist/assets/programs.html.263f47ee.js index af58dbd1c..a5937cd6e 100644 --- a/docs/.vuepress/dist/assets/programs.html.c4b45e07.js +++ b/docs/.vuepress/dist/assets/programs.html.263f47ee.js @@ -1,2 +1,2 @@ -import{_ as i,r as n,o as s,c as d,a as e,b as a,w as c,F as h,d as r,e as o}from"./app.07ce7a66.js";const m={},_=e("h1",{id:"programs-programlar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programs-programlar","aria-hidden":"true"},"#"),r(" Programs (Programlar)")],-1),p=e("h2",{id:"facts-ozet-bilgiler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts-ozet-bilgiler","aria-hidden":"true"},"#"),r(" Facts (\xD6zet Bilgiler)")],-1),g=e("p",null,[e("strong",null,"Bilgi Tablosu")],-1),u=e("li",null,[r("Programlar, hem son kullan\u0131c\u0131lardan hem de di\u011Fer programlardan gelen "),e("a",{href:"./transactions"},"talimatlar\u0131"),r(" i\u015Fler.")],-1),k=r("T\xFCm programlar stateless\u2019d\u0131r(durumsuzdur): etkile\u015Fime girdikleri t\xFCm veriler, talimatlar yoluyla iletilen ayr\u0131 "),b=r("account'larda"),y=r(" saklan\u0131r."),f=e("li",null,[r("Programlar "),e("code",null,"executable (y\xFCr\xFCt\xFClebilir)"),r(" olarak i\u015Faretlenmi\u015F account'larda saklan\u0131r.")],-1),v=r("T\xFCm programlar "),P={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},L=r("BPF Loader"),z=r("'a aittir ve "),S={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},B=r("Solana Runtime"),x=r(" taraf\u0131ndan y\xFCr\xFCt\xFCl\xFCr."),R=r("Geli\u015Ftiriciler en yayg\u0131n olarak Rust veya C++'da programlar yazarlar, ancak "),F={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=r("LLVM"),w=r("'nin "),A={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},C=r("BPF"),T=r(" arka ucunu hedefleyen herhangi bir dili se\xE7ebilirler."),N=o("
  • T\xFCm programlar\u0131n, talimat i\u015Flemenin ger\xE7ekle\u015Fti\u011Fi tek bir giri\u015F noktas\u0131 vard\u0131r. (process_instruction); parametreler her zaman \u015Funlar\u0131 i\xE7erir:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),E=e("h2",{id:"deep-dive-derinlemesine-bak\u0131s",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deep-dive-derinlemesine-bak\u0131s","aria-hidden":"true"},"#"),r(" Deep Dive (Derinlemesine Bak\u0131\u015F)")],-1),I=e("p",null,"Di\u011Fer bir\xE7ok blockchainden farkl\u0131 olarak Solana, kodu verilerden tamamen ay\u0131r\u0131r. Programlar\u0131n etkile\u015Fimde bulundu\u011Fu t\xFCm veriler ayr\u0131 account'larda saklan\u0131r ve talimatlar arac\u0131l\u0131\u011F\u0131yla referans olarak iletilir. Bu model, tek bir genel program\u0131n ek da\u011F\u0131t\u0131mlar gerektirmeden \xE7e\u015Fitli account'larda \xE7al\u0131\u015Fmas\u0131na izin verir. Bu kal\u0131b\u0131n yayg\u0131n \xF6rnekleri, Native(yerel) ve SPL Programlar\u0131nda g\xF6r\xFCl\xFCr.",-1),M=e("h3",{id:"native-program-lar-solana-program-library-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-program-lar-solana-program-library-spl","aria-hidden":"true"},"#"),r(" Native Program\u2019lar & Solana Program Library (SPL)")],-1),V=e("p",null,"Solana, on-chain etkile\u015Fimler i\xE7in temel yap\u0131 ta\u015Flar\u0131 olarak hizmet eden bir dizi programla donat\u0131lm\u0131\u015F olarak gelir. Bu programlar Native Programlar ve Solana Program Library (SPL) Programlar\u0131 olarak ikiye ayr\u0131l\u0131r.",-1),O=e("p",null,"Native Program\u2019lar, validator\u2019leri \xE7al\u0131\u015Ft\u0131rmak i\xE7in gereken temel i\u015Flevleri sa\u011Flar. Bu programlar aras\u0131nda en \xE7ok bilineni, yeni account\u2019lar\u0131n y\xF6netilmesinden ve iki taraf aras\u0131nda SOL transferinden sorumlu olan Sistem Program\u0131d\u0131r.",-1),j=r("SPL Programlar\u0131, token olu\u015Fturma, takas etme ve \xF6d\xFCn\xE7 vermenin yan\u0131 s\u0131ra stake pool (hisse havuzu) olu\u015Fturma ve on-chain name service dahil olmak \xFCzere bir dizi on-chain etkinli\u011Fi destekler. SPL Token Program\u0131 do\u011Frudan CLI arac\u0131l\u0131\u011F\u0131yla \xE7a\u011Fr\u0131labilirken, "),G={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},H=r("Associated Token Account Program"),K=r(" gibi di\u011Ferleri genellikle \xF6zel programlardan olu\u015Fur."),U=e("h3",{id:"writing-programs-program-yazma",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#writing-programs-program-yazma","aria-hidden":"true"},"#"),r(" Writing Programs (Program Yazma)")],-1),J=r("Programlar en yayg\u0131n olarak Rust veya C++ ile geli\u015Ftirilir, ancak LLVM'nin BPF arka ucunu hedefleyen herhangi bir dille geli\u015Ftirilebilir. "),W={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},Y=r("Neon Labs"),q=r(" ve "),Q={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},X=r("Solang"),Z=r("'\u0131n son giri\u015Fimleri, "),$={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ee=r("EVM"),re=r(" uyumlulu\u011Funu m\xFCmk\xFCn k\u0131lar ve geli\u015Ftiricilerin Solidity'de programlar yazmas\u0131na olanak tan\u0131r."),ae=o("

    Rust tabanl\u0131 programlar\u0131n \xE7o\u011Fu a\u015Fa\u011F\u0131daki mimariye uyar:

    DosyaA\xE7\u0131klama
    lib.rsMod\xFCllerin kaydedilmesi
    entrypoint.rsPrograma ba\u015Flang\u0131\xE7
    instruction.rsProgram API'si, komut verilerini (de)serialize etme
    processor.rsProgram mant\u0131\u011F\u0131n\u0131n bulundu\u011Fu b\xF6l\xFCm
    state.rsProgram nesneleri, durumu (de) serialize etme
    error.rsPrograma \xF6zg\xFC hatalar
    ",2),te=r("Son zamanlarda, "),oe={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ne=r("Anchor"),le=r(" program geli\u015Ftirmek i\xE7in pop\xFCler bir framework olarak ortaya \xE7\u0131km\u0131\u015Ft\u0131r. Anchor, Ruby on Rails'e benzeyen, Rust tabanl\u0131 geli\u015Ftirme i\xE7in (de)serialization s\xFCrecini kolayla\u015Ft\u0131ran, \xFCzerinde d\xFC\u015F\xFCn\xFClm\xFC\u015F bir frameworkt\xFCr."),ie=o("

    Programlar genellikle Testnet veya Mainnet'e da\u011F\u0131t\u0131lmadan \xF6nce Localhost ve Devnet geli\u015Ftirilir ve test edilir. Solana a\u015Fa\u011F\u0131daki ortamlar\u0131 destekler:

    Cluster EnvironmenRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),se=r("Bir ortamda deploy edildikten sonra Client\u2019lar ilgili cluster'la olan "),de={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ce=r("RPC ba\u011Flant\u0131lar\u0131"),he=r(" arac\u0131l\u0131\u011F\u0131yla on-chain programlarla etkile\u015Fime girebilir."),me=e("h3",{id:"deploying-programs-programlar\u0131-cal\u0131st\u0131rma",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deploying-programs-programlar\u0131-cal\u0131st\u0131rma","aria-hidden":"true"},"#"),r(" Deploying Programs (Programlar\u0131 \xC7al\u0131\u015Ft\u0131rma)")],-1),_e=r("Geli\u015Ftiriciler programlar\u0131n\u0131 "),pe={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},ge=r("CLI"),ue=r(" arac\u0131l\u0131\u011F\u0131yla \xE7al\u0131\u015Ft\u0131rabilir:"),ke=o(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as n,o as s,c as d,a as e,b as a,w as c,F as h,d as r,e as o}from"./app.d411e3b3.js";const m={},_=e("h1",{id:"programs-programlar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programs-programlar","aria-hidden":"true"},"#"),r(" Programs (Programlar)")],-1),p=e("h2",{id:"facts-ozet-bilgiler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts-ozet-bilgiler","aria-hidden":"true"},"#"),r(" Facts (\xD6zet Bilgiler)")],-1),g=e("p",null,[e("strong",null,"Bilgi Tablosu")],-1),u=e("li",null,[r("Programlar, hem son kullan\u0131c\u0131lardan hem de di\u011Fer programlardan gelen "),e("a",{href:"./transactions"},"talimatlar\u0131"),r(" i\u015Fler.")],-1),k=r("T\xFCm programlar stateless\u2019d\u0131r(durumsuzdur): etkile\u015Fime girdikleri t\xFCm veriler, talimatlar yoluyla iletilen ayr\u0131 "),b=r("account'larda"),y=r(" saklan\u0131r."),f=e("li",null,[r("Programlar "),e("code",null,"executable (y\xFCr\xFCt\xFClebilir)"),r(" olarak i\u015Faretlenmi\u015F account'larda saklan\u0131r.")],-1),v=r("T\xFCm programlar "),P={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},L=r("BPF Loader"),z=r("'a aittir ve "),S={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},B=r("Solana Runtime"),x=r(" taraf\u0131ndan y\xFCr\xFCt\xFCl\xFCr."),R=r("Geli\u015Ftiriciler en yayg\u0131n olarak Rust veya C++'da programlar yazarlar, ancak "),F={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=r("LLVM"),w=r("'nin "),A={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},C=r("BPF"),T=r(" arka ucunu hedefleyen herhangi bir dili se\xE7ebilirler."),N=o("
  • T\xFCm programlar\u0131n, talimat i\u015Flemenin ger\xE7ekle\u015Fti\u011Fi tek bir giri\u015F noktas\u0131 vard\u0131r. (process_instruction); parametreler her zaman \u015Funlar\u0131 i\xE7erir:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),E=e("h2",{id:"deep-dive-derinlemesine-bak\u0131s",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deep-dive-derinlemesine-bak\u0131s","aria-hidden":"true"},"#"),r(" Deep Dive (Derinlemesine Bak\u0131\u015F)")],-1),I=e("p",null,"Di\u011Fer bir\xE7ok blockchainden farkl\u0131 olarak Solana, kodu verilerden tamamen ay\u0131r\u0131r. Programlar\u0131n etkile\u015Fimde bulundu\u011Fu t\xFCm veriler ayr\u0131 account'larda saklan\u0131r ve talimatlar arac\u0131l\u0131\u011F\u0131yla referans olarak iletilir. Bu model, tek bir genel program\u0131n ek da\u011F\u0131t\u0131mlar gerektirmeden \xE7e\u015Fitli account'larda \xE7al\u0131\u015Fmas\u0131na izin verir. Bu kal\u0131b\u0131n yayg\u0131n \xF6rnekleri, Native(yerel) ve SPL Programlar\u0131nda g\xF6r\xFCl\xFCr.",-1),M=e("h3",{id:"native-program-lar-solana-program-library-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-program-lar-solana-program-library-spl","aria-hidden":"true"},"#"),r(" Native Program\u2019lar & Solana Program Library (SPL)")],-1),V=e("p",null,"Solana, on-chain etkile\u015Fimler i\xE7in temel yap\u0131 ta\u015Flar\u0131 olarak hizmet eden bir dizi programla donat\u0131lm\u0131\u015F olarak gelir. Bu programlar Native Programlar ve Solana Program Library (SPL) Programlar\u0131 olarak ikiye ayr\u0131l\u0131r.",-1),O=e("p",null,"Native Program\u2019lar, validator\u2019leri \xE7al\u0131\u015Ft\u0131rmak i\xE7in gereken temel i\u015Flevleri sa\u011Flar. Bu programlar aras\u0131nda en \xE7ok bilineni, yeni account\u2019lar\u0131n y\xF6netilmesinden ve iki taraf aras\u0131nda SOL transferinden sorumlu olan Sistem Program\u0131d\u0131r.",-1),j=r("SPL Programlar\u0131, token olu\u015Fturma, takas etme ve \xF6d\xFCn\xE7 vermenin yan\u0131 s\u0131ra stake pool (hisse havuzu) olu\u015Fturma ve on-chain name service dahil olmak \xFCzere bir dizi on-chain etkinli\u011Fi destekler. SPL Token Program\u0131 do\u011Frudan CLI arac\u0131l\u0131\u011F\u0131yla \xE7a\u011Fr\u0131labilirken, "),G={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},H=r("Associated Token Account Program"),K=r(" gibi di\u011Ferleri genellikle \xF6zel programlardan olu\u015Fur."),U=e("h3",{id:"writing-programs-program-yazma",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#writing-programs-program-yazma","aria-hidden":"true"},"#"),r(" Writing Programs (Program Yazma)")],-1),J=r("Programlar en yayg\u0131n olarak Rust veya C++ ile geli\u015Ftirilir, ancak LLVM'nin BPF arka ucunu hedefleyen herhangi bir dille geli\u015Ftirilebilir. "),W={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},Y=r("Neon Labs"),q=r(" ve "),Q={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},X=r("Solang"),Z=r("'\u0131n son giri\u015Fimleri, "),$={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ee=r("EVM"),re=r(" uyumlulu\u011Funu m\xFCmk\xFCn k\u0131lar ve geli\u015Ftiricilerin Solidity'de programlar yazmas\u0131na olanak tan\u0131r."),ae=o("

    Rust tabanl\u0131 programlar\u0131n \xE7o\u011Fu a\u015Fa\u011F\u0131daki mimariye uyar:

    DosyaA\xE7\u0131klama
    lib.rsMod\xFCllerin kaydedilmesi
    entrypoint.rsPrograma ba\u015Flang\u0131\xE7
    instruction.rsProgram API'si, komut verilerini (de)serialize etme
    processor.rsProgram mant\u0131\u011F\u0131n\u0131n bulundu\u011Fu b\xF6l\xFCm
    state.rsProgram nesneleri, durumu (de) serialize etme
    error.rsPrograma \xF6zg\xFC hatalar
    ",2),te=r("Son zamanlarda, "),oe={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ne=r("Anchor"),le=r(" program geli\u015Ftirmek i\xE7in pop\xFCler bir framework olarak ortaya \xE7\u0131km\u0131\u015Ft\u0131r. Anchor, Ruby on Rails'e benzeyen, Rust tabanl\u0131 geli\u015Ftirme i\xE7in (de)serialization s\xFCrecini kolayla\u015Ft\u0131ran, \xFCzerinde d\xFC\u015F\xFCn\xFClm\xFC\u015F bir frameworkt\xFCr."),ie=o("

    Programlar genellikle Testnet veya Mainnet'e da\u011F\u0131t\u0131lmadan \xF6nce Localhost ve Devnet geli\u015Ftirilir ve test edilir. Solana a\u015Fa\u011F\u0131daki ortamlar\u0131 destekler:

    Cluster EnvironmenRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),se=r("Bir ortamda deploy edildikten sonra Client\u2019lar ilgili cluster'la olan "),de={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ce=r("RPC ba\u011Flant\u0131lar\u0131"),he=r(" arac\u0131l\u0131\u011F\u0131yla on-chain programlarla etkile\u015Fime girebilir."),me=e("h3",{id:"deploying-programs-programlar\u0131-cal\u0131st\u0131rma",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deploying-programs-programlar\u0131-cal\u0131st\u0131rma","aria-hidden":"true"},"#"),r(" Deploying Programs (Programlar\u0131 \xC7al\u0131\u015Ft\u0131rma)")],-1),_e=r("Geli\u015Ftiriciler programlar\u0131n\u0131 "),pe={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},ge=r("CLI"),ue=r(" arac\u0131l\u0131\u011F\u0131yla \xE7al\u0131\u015Ft\u0131rabilir:"),ke=o(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),be=r("Bir program \xE7al\u0131\u015Ft\u0131\u011F\u0131nda, bir "),ye={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},fe=r("ELF"),ve=r(" shared object\u2019e (BPF bayt kodu i\xE7eren) derlenir ve Solana cluster\u2019a y\xFCklenir. Programlar account\u2019larda ya\u015Far (Solana'daki di\u011Fer her \u015Fey gibi), ancak bu account'lar "),Pe=e("code",null,"executable",-1),Le=r(" olarak i\u015Faretlenir ve BPF Loader\u2019a atan\u0131r. Bu account\u2019\u0131n adresi "),ze=e("code",null,"program_id",-1),Se=r(" olarak adland\u0131r\u0131l\u0131r ve gelecekteki t\xFCm i\u015Flemlerde programa ba\u015Fvurmak i\xE7in kullan\u0131l\u0131r."),Be=o('

    Solana, Upgradable BPF Loader da dahil olmak \xFCzere birden fazla BPF Loader\u2019\u0131 destekler. BPF Loader, program\u0131n account\u2019\u0131n\u0131 y\xF6netmekten ve program_id arac\u0131l\u0131\u011F\u0131yla client\u2019lara (client\u2019lara) sunmaktan sorumludur. T\xFCm programlarda instruction i\u015Flemenin ger\xE7ekle\u015Fti\u011Fi tek bir giri\u015F noktas\u0131 vard\u0131r (proses_instruction) ve parametreler her zaman \u015Funlar\u0131 i\xE7erir:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    \xC7a\u011Fr\u0131ld\u0131klar\u0131nda programlar Solana Runtime taraf\u0131ndan y\xFCr\xFCt\xFCl\xFCr.

    Other Resources (Di\u011Fer Kaynaklar)

    ',4),xe={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Re=r("Official Documentation"),Fe={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},De=r("SPL Documentation"),we={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},Ae=r("Program Deploys by Justin Starry"),Ce={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},Te=r("Solana Starter Kit by Iron Addicted Dog"),Ne={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},Ee=r("Programming on Solana by Paulx"),Ie={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},Me=r("An Introduction to the Solana Blockchain by Hana"),Ve={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},Oe=r("Anchor");function je(Ge,He){const l=n("RouterLink"),t=n("ExternalLinkIcon");return s(),d(h,null,[_,p,g,e("ul",null,[u,e("li",null,[k,a(l,{to:"/tr/core-concepts/accounts.html"},{default:c(()=>[b]),_:1}),y]),f,e("li",null,[v,e("a",P,[L,a(t)]),z,e("a",S,[B,a(t)]),x]),e("li",null,[R,e("a",F,[D,a(t)]),w,e("a",A,[C,a(t)]),T]),N]),E,I,M,V,O,e("p",null,[j,e("a",G,[H,a(t)]),K]),U,e("p",null,[J,e("a",W,[Y,a(t)]),q,e("a",Q,[X,a(t)]),Z,e("a",$,[ee,a(t)]),re]),ae,e("p",null,[te,e("a",oe,[ne,a(t)]),le]),ie,e("p",null,[se,e("a",de,[ce,a(t)]),he]),me,e("p",null,[_e,e("a",pe,[ge,a(t)]),ue]),ke,e("p",null,[be,e("a",ye,[fe,a(t)]),ve,Pe,Le,ze,Se]),Be,e("ul",null,[e("li",null,[e("a",xe,[Re,a(t)])]),e("li",null,[e("a",Fe,[De,a(t)])]),e("li",null,[e("a",we,[Ae,a(t)])]),e("li",null,[e("a",Ce,[Te,a(t)])]),e("li",null,[e("a",Ne,[Ee,a(t)])]),e("li",null,[e("a",Ie,[Me,a(t)])]),e("li",null,[e("a",Ve,[Oe,a(t)])])])],64)}var Ue=i(m,[["render",je]]);export{Ue as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.3f12c384.js b/docs/.vuepress/dist/assets/programs.html.2cf46764.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.3f12c384.js rename to docs/.vuepress/dist/assets/programs.html.2cf46764.js index 878495e48..7a9a783af 100644 --- a/docs/.vuepress/dist/assets/programs.html.3f12c384.js +++ b/docs/.vuepress/dist/assets/programs.html.2cf46764.js @@ -1,2 +1,2 @@ -import{_ as i,r as a,o as c,c as d,a as o,b as t,w as l,F as _,d as e,e as n}from"./app.07ce7a66.js";const h={},p=o("h1",{id:"programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),e(" Programs")],-1),g=o("p",null,"\uC5B4\uB5A4 \uAC1C\uBC1C\uC790\uB4E0 Solana \uBE14\uB85D\uCCB4\uC778\uC5D0 Program\uC744 \uC791\uC131\uD558\uACE0 \uBC30\uD3EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. Program(\uB2E4\uB978 \uD504\uB85C\uD1A0\uCF5C\uB4E4\uC5D0\uC11C smart contract\uB85C \uC54C\uB824\uC9C4)\uB4E4\uC740 DeFi, NFTs\uBD80\uD130 \uC18C\uC15C \uBBF8\uB514\uC5B4\uC640 \uAC8C\uC784\uAE4C\uC9C0 \uBAA8\uB4E0 \uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uD558\uB294 on-chain \uD65C\uB3D9\uC744 \uC704\uD55C \uAE30\uBC18 \uC5ED\uD560\uC744 \uC218\uD589\uD569\uB2C8\uB2E4.",-1),m=o("h2",{id:"facts",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),e(" Facts")],-1),u={class:"custom-container tip"},b=o("p",{class:"custom-container-title"},"Fact Sheet",-1),P=o("li",null,[e("Program\uC740 \uC0AC\uC6A9\uC790\uB098 \uB2E4\uB978 Program\uC73C\uB85C\uBD80\uD130 \uBC1B\uC740 "),o("a",{href:"./transactions"},"instructions"),e("\uC744 \uCC98\uB9AC\uD569\uB2C8\uB2E4.")],-1),f=e("\uBAA8\uB4E0 Program\uB4E4\uC740 \uC0C1\uD0DC\uB97C \uBCF4\uC874\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC989, Program\uB4E4\uC774 \uC0AC\uC6A9\uD558\uB294 \uBAA8\uB4E0 \uB370\uC774\uD130\uB294 Instruction\uB4E4\uC744 \uAC70\uCCD0 \uBD84\uB9AC\uB41C "),k=e("Account"),y=e("\uB4E4\uB85C \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4."),v=o("li",null,[e("Program \uADF8 \uC790\uCCB4\uB294 "),o("code",null,"executable"),e(" \uD45C\uC2DC\uB41C Account\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4.")],-1),L=e("\uBAA8\uB4E0 Program\uC740 "),S={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=e("BPF Loader"),F=e("\uC5D0 \uC758\uD574 \uC18C\uC720\uB418\uACE0 "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},R=e("Solana Runtime"),C=e("\uC5D0 \uC758\uD574 \uC2E4\uD589\uB429\uB2C8\uB2E4."),B=e("\uAC1C\uBC1C\uC790\uB4E4\uC740 \uBCF4\uD1B5 Rust\uB098 C++\uB85C Program\uC744 \uC791\uC131\uD569\uB2C8\uB2E4. \uD558\uC9C0\uB9CC, "),D={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},I=e("LLVM"),E=e("\uC758 "),N={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},w=e("BPF"),T=e(" backend\uB85C \uBE4C\uB4DC\uB418\uB294 \uC5B4\uB5A4 \uC5B8\uC5B4\uB3C4 \uC120\uD0DD \uAC00\uB2A5\uD569\uB2C8\uB2E4."),V=n("
  • \uBAA8\uB4E0 Program\uC740 Instruction \uCC98\uB9AC\uAC00 \uC77C\uC5B4\uB098\uB294 \uB2E8\uC77C entry point\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4.(i.e. process_instructio);
    \uC544\uB798\uB294 \uD56D\uC0C1 \uD3EC\uD568\uB418\uB294 \uD30C\uB77C\uBBF8\uD130\uB4E4\uC785\uB2C8\uB2E4.
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),M=o("h2",{id:"deep-dive",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),e(" Deep Dive")],-1),z=o("p",null,"\uB300\uBD80\uBD84\uC758 \uB2E4\uB978 \uBE14\uB85D\uCCB4\uC778\uB4E4\uACFC \uB2E4\uB974\uAC8C, Solana\uB294 \uB370\uC774\uD130\uC640 \uCF54\uB4DC\uB97C \uC644\uBCBD\uD558\uAC8C \uBD84\uB9AC\uD569\uB2C8\uB2E4. Program\uC774 \uC0C1\uD638 \uC791\uC6A9\uD558\uB294 \uBAA8\uB4E0 \uB370\uC774\uD130\uB4E4\uC740 \uBD84\uB9AC\uB41C Account\uB4E4\uC5D0 \uC800\uC7A5\uB418\uBA70, Instruction\uB4E4\uC744 \uAC70\uCCD0 \uD638\uCD9C\uB429\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uBAA8\uB378\uC740 \uB2E8\uC77C Generic Program\uC774 \uCD94\uAC00\uC801\uC778 \uBC30\uD3EC \uC5C6\uC774 \uB2E4\uC591\uD55C Account\uB4E4\uC744 \uAC70\uCCD0 \uB3D9\uC791\uD558\uB294 \uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uD569\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uD328\uD134\uC758 \uD754\uD55C \uC608\uB294 Native\uC640 SPL Program \uB4E4\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),O=o("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),e(" Native Programs & The Solana Program Library (SPL)")],-1),j=e("Solana\uB294 on-chain \uC0C1\uD638 \uC791\uC6A9\uC744 \uC704\uD574 \uD589\uC2DD \uAD6C\uC131 \uC694\uC18C\uB85C\uC368 \uAE30\uB2A5\uD558\uB294 \uB2E4\uC218\uC758 Program\uB4E4\uC744 \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774 Program\uB4E4\uC740 "),U={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=e("Native Program"),H=e("\uB4E4\uACFC "),J={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},K=e("Solana Program Library (SPL) Program"),W=e("\uB4E4\uB85C \uB098\uB269\uB2C8\uB2E4."),q=e("Native Program\uB4E4\uC740 validator\uB4E4\uC744 \uC6B4\uC601\uD558\uAE30 \uC704\uD574 \uC694\uAD6C\uB418\uB294 \uAE30\uBC18 \uAE30\uB2A5\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4. \uC774 Program\uB4E4 \uC911\uC5D0 \uAC00\uC7A5 \uC798 \uC54C\uB824\uC9C4 \uAC83\uC774 "),Q={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=e("System Program"),Y=e("\uC785\uB2C8\uB2E4. System Program\uC740 \uC0C8\uB85C\uC6B4 Account\uB4E4\uC744 \uAD00\uB9AC\uD558\uB294 \uAC83\uACFC \uB450 \uC9D1\uB2E8 \uC0AC\uC774\uC5D0\uC11C SOL\uC744 \uC804\uC1A1\uD558\uB294 \uAC83\uC744 \uCC45\uC784\uC9D1\uB2C8\uB2E4."),Z=e("SLP Program\uC740 \uD1A0\uD070 \uC0DD\uC131, \uAD50\uD658, \uB300\uC5EC\uD558\uB294 \uAC83\uC5D0 \uB354\uD574 stake pool\uC744 \uBC1C\uC0DD\uC2DC\uD0A4\uACE0, on-chain name service\uB97C \uC720\uC9C0\uD558\uB294 \uAC83 \uD3EC\uD568\uD574 \uB2E4\uC218\uC758 on-chain \uD65C\uB3D9\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4. "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},oo=e("SPL Token Program"),eo=e("\uB4E4\uC740 CLI\uB97C \uAC70\uCCD0 \uC9C1\uC811 \uD638\uCD9C\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBC18\uBA74\uC5D0 "),to={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ro=e("Associated Token Account Program"),no=e(" \uAC19\uC740 \uB2E4\uB978 \uAC83\uB4E4\uC740 \uBCF4\uD1B5 Custom Program\uB4E4\uB85C \uAD6C\uC131\uB429\uB2C8\uB2E4."),ao=o("h3",{id:"writing-programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),e(" Writing Programs")],-1),so=e("Program\uB4E4\uC740 \uBCF4\uD1B5 Rust\uC640 C++\uB85C \uAC1C\uBC1C\uB429\uB2C8\uB2E4. \uD558\uC9C0\uB9CC, LLVM\uC758 BPF backend\uB85C \uBE4C\uB4DC\uB418\uB294 \uC5B4\uB5A4 \uC5B8\uC5B4\uB85C\uB3C4 \uAC1C\uBC1C \uAC00\uB2A5\uD569\uB2C8\uB2E4. "),io={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},co=e("Neon Labs"),lo=e("\uC640 "),_o={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ho=e("Solang"),po=e("\uC740 \uCD5C\uADFC "),go={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},mo=e("EVM"),uo=e(" \uD638\uD658\uC744 \uAC00\uB2A5\uD558\uAC8C \uD558\uACE0 \uAC1C\uBC1C\uC790\uB4E4\uC774 Program\uC744 Solidity\uC5D0\uC11C \uC791\uC131\uD560 \uC218 \uC788\uAC8C \uD558\uB294 \uC2DC\uB3C4\uB97C \uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4."),bo=n("

    \uB300\uBD80\uBD84\uC758 Rust \uAE30\uBC18 Program\uB4E4\uC740 \uC544\uB798\uC640 \uAC19\uC740 \uC544\uD0A4\uD14D\uCC98\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),Po=e("\uCD5C\uADFC\uC5D0\uB294, "),fo={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ko=e("Anchor"),yo=e("\uAC00 Program\uC744 \uAC1C\uBC1C\uD558\uAE30 \uC704\uD55C \uD504\uB808\uC784\uC6CC\uD06C\uB85C \uB728\uACE0 \uC788\uC2B5\uB2C8\uB2E4. Anchor\uB294 boilerplate\uB97C \uC904\uC774\uACE0 (de)serialization \uCC98\uB9AC\uB97C \uAC04\uC18C\uD654\uD558\uB294 Ruby on Rails\uC640 \uBE44\uC2B7\uD55C Rust \uAE30\uBC18 \uD504\uB808\uC784\uC6CC\uD06C\uC785\uB2C8\uB2E4."),vo=n('

    Program\uB4E4\uC740 \uBCF4\uD1B5 Testnet\uACFC Mainnet\uC5D0 \uBC30\uD3EC\uB418\uAE30 \uC804\uC5D0 Localhost\uC640 Devnet \uD658\uACBD\uC5D0\uC11C \uAC1C\uBC1C\uB418\uACE0 \uD14C\uC2A4\uD2B8\uB429\uB2C8\uB2E4. Solana\uB294 \uC544\uB798 \uD658\uACBD\uB4E4\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4.

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    \uC77C\uB2E8 \uD658\uACBD\uC5D0 \uBC30\uD3EC\uB418\uACE0 \uB098\uBA74, Client\uB4E4\uC740 \uAC01\uAC01\uC758 Cluster\uB85C\uC758 RPC \uC5F0\uACB0\uC744 \uD1B5\uD574 On-chain Program\uB4E4\uACFC \uC0C1\uD638\uC791\uC6A9 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    Deploying Programs

    ',4),Lo=e("\uAC1C\uBC1C\uC790\uB4E4\uC740 \uB2E4\uC74C\uACFC \uAC19\uC774 "),So={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},xo=e("CLI"),Fo=e("\uB97C \uD1B5\uD574 Program\uC744 \uBC30\uD3EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ao=n(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as a,o as c,c as d,a as o,b as t,w as l,F as _,d as e,e as n}from"./app.d411e3b3.js";const h={},p=o("h1",{id:"programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),e(" Programs")],-1),g=o("p",null,"\uC5B4\uB5A4 \uAC1C\uBC1C\uC790\uB4E0 Solana \uBE14\uB85D\uCCB4\uC778\uC5D0 Program\uC744 \uC791\uC131\uD558\uACE0 \uBC30\uD3EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. Program(\uB2E4\uB978 \uD504\uB85C\uD1A0\uCF5C\uB4E4\uC5D0\uC11C smart contract\uB85C \uC54C\uB824\uC9C4)\uB4E4\uC740 DeFi, NFTs\uBD80\uD130 \uC18C\uC15C \uBBF8\uB514\uC5B4\uC640 \uAC8C\uC784\uAE4C\uC9C0 \uBAA8\uB4E0 \uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uD558\uB294 on-chain \uD65C\uB3D9\uC744 \uC704\uD55C \uAE30\uBC18 \uC5ED\uD560\uC744 \uC218\uD589\uD569\uB2C8\uB2E4.",-1),m=o("h2",{id:"facts",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),e(" Facts")],-1),u={class:"custom-container tip"},b=o("p",{class:"custom-container-title"},"Fact Sheet",-1),P=o("li",null,[e("Program\uC740 \uC0AC\uC6A9\uC790\uB098 \uB2E4\uB978 Program\uC73C\uB85C\uBD80\uD130 \uBC1B\uC740 "),o("a",{href:"./transactions"},"instructions"),e("\uC744 \uCC98\uB9AC\uD569\uB2C8\uB2E4.")],-1),f=e("\uBAA8\uB4E0 Program\uB4E4\uC740 \uC0C1\uD0DC\uB97C \uBCF4\uC874\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC989, Program\uB4E4\uC774 \uC0AC\uC6A9\uD558\uB294 \uBAA8\uB4E0 \uB370\uC774\uD130\uB294 Instruction\uB4E4\uC744 \uAC70\uCCD0 \uBD84\uB9AC\uB41C "),k=e("Account"),y=e("\uB4E4\uB85C \uBCF4\uB0B4\uC9D1\uB2C8\uB2E4."),v=o("li",null,[e("Program \uADF8 \uC790\uCCB4\uB294 "),o("code",null,"executable"),e(" \uD45C\uC2DC\uB41C Account\uC5D0 \uC800\uC7A5\uB429\uB2C8\uB2E4.")],-1),L=e("\uBAA8\uB4E0 Program\uC740 "),S={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=e("BPF Loader"),F=e("\uC5D0 \uC758\uD574 \uC18C\uC720\uB418\uACE0 "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},R=e("Solana Runtime"),C=e("\uC5D0 \uC758\uD574 \uC2E4\uD589\uB429\uB2C8\uB2E4."),B=e("\uAC1C\uBC1C\uC790\uB4E4\uC740 \uBCF4\uD1B5 Rust\uB098 C++\uB85C Program\uC744 \uC791\uC131\uD569\uB2C8\uB2E4. \uD558\uC9C0\uB9CC, "),D={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},I=e("LLVM"),E=e("\uC758 "),N={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},w=e("BPF"),T=e(" backend\uB85C \uBE4C\uB4DC\uB418\uB294 \uC5B4\uB5A4 \uC5B8\uC5B4\uB3C4 \uC120\uD0DD \uAC00\uB2A5\uD569\uB2C8\uB2E4."),V=n("
  • \uBAA8\uB4E0 Program\uC740 Instruction \uCC98\uB9AC\uAC00 \uC77C\uC5B4\uB098\uB294 \uB2E8\uC77C entry point\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4.(i.e. process_instructio);
    \uC544\uB798\uB294 \uD56D\uC0C1 \uD3EC\uD568\uB418\uB294 \uD30C\uB77C\uBBF8\uD130\uB4E4\uC785\uB2C8\uB2E4.
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),M=o("h2",{id:"deep-dive",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),e(" Deep Dive")],-1),z=o("p",null,"\uB300\uBD80\uBD84\uC758 \uB2E4\uB978 \uBE14\uB85D\uCCB4\uC778\uB4E4\uACFC \uB2E4\uB974\uAC8C, Solana\uB294 \uB370\uC774\uD130\uC640 \uCF54\uB4DC\uB97C \uC644\uBCBD\uD558\uAC8C \uBD84\uB9AC\uD569\uB2C8\uB2E4. Program\uC774 \uC0C1\uD638 \uC791\uC6A9\uD558\uB294 \uBAA8\uB4E0 \uB370\uC774\uD130\uB4E4\uC740 \uBD84\uB9AC\uB41C Account\uB4E4\uC5D0 \uC800\uC7A5\uB418\uBA70, Instruction\uB4E4\uC744 \uAC70\uCCD0 \uD638\uCD9C\uB429\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uBAA8\uB378\uC740 \uB2E8\uC77C Generic Program\uC774 \uCD94\uAC00\uC801\uC778 \uBC30\uD3EC \uC5C6\uC774 \uB2E4\uC591\uD55C Account\uB4E4\uC744 \uAC70\uCCD0 \uB3D9\uC791\uD558\uB294 \uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uD569\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uD328\uD134\uC758 \uD754\uD55C \uC608\uB294 Native\uC640 SPL Program \uB4E4\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),O=o("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),e(" Native Programs & The Solana Program Library (SPL)")],-1),j=e("Solana\uB294 on-chain \uC0C1\uD638 \uC791\uC6A9\uC744 \uC704\uD574 \uD589\uC2DD \uAD6C\uC131 \uC694\uC18C\uB85C\uC368 \uAE30\uB2A5\uD558\uB294 \uB2E4\uC218\uC758 Program\uB4E4\uC744 \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. \uC774 Program\uB4E4\uC740 "),U={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=e("Native Program"),H=e("\uB4E4\uACFC "),J={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},K=e("Solana Program Library (SPL) Program"),W=e("\uB4E4\uB85C \uB098\uB269\uB2C8\uB2E4."),q=e("Native Program\uB4E4\uC740 validator\uB4E4\uC744 \uC6B4\uC601\uD558\uAE30 \uC704\uD574 \uC694\uAD6C\uB418\uB294 \uAE30\uBC18 \uAE30\uB2A5\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4. \uC774 Program\uB4E4 \uC911\uC5D0 \uAC00\uC7A5 \uC798 \uC54C\uB824\uC9C4 \uAC83\uC774 "),Q={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=e("System Program"),Y=e("\uC785\uB2C8\uB2E4. System Program\uC740 \uC0C8\uB85C\uC6B4 Account\uB4E4\uC744 \uAD00\uB9AC\uD558\uB294 \uAC83\uACFC \uB450 \uC9D1\uB2E8 \uC0AC\uC774\uC5D0\uC11C SOL\uC744 \uC804\uC1A1\uD558\uB294 \uAC83\uC744 \uCC45\uC784\uC9D1\uB2C8\uB2E4."),Z=e("SLP Program\uC740 \uD1A0\uD070 \uC0DD\uC131, \uAD50\uD658, \uB300\uC5EC\uD558\uB294 \uAC83\uC5D0 \uB354\uD574 stake pool\uC744 \uBC1C\uC0DD\uC2DC\uD0A4\uACE0, on-chain name service\uB97C \uC720\uC9C0\uD558\uB294 \uAC83 \uD3EC\uD568\uD574 \uB2E4\uC218\uC758 on-chain \uD65C\uB3D9\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4. "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},oo=e("SPL Token Program"),eo=e("\uB4E4\uC740 CLI\uB97C \uAC70\uCCD0 \uC9C1\uC811 \uD638\uCD9C\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBC18\uBA74\uC5D0 "),to={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ro=e("Associated Token Account Program"),no=e(" \uAC19\uC740 \uB2E4\uB978 \uAC83\uB4E4\uC740 \uBCF4\uD1B5 Custom Program\uB4E4\uB85C \uAD6C\uC131\uB429\uB2C8\uB2E4."),ao=o("h3",{id:"writing-programs",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),e(" Writing Programs")],-1),so=e("Program\uB4E4\uC740 \uBCF4\uD1B5 Rust\uC640 C++\uB85C \uAC1C\uBC1C\uB429\uB2C8\uB2E4. \uD558\uC9C0\uB9CC, LLVM\uC758 BPF backend\uB85C \uBE4C\uB4DC\uB418\uB294 \uC5B4\uB5A4 \uC5B8\uC5B4\uB85C\uB3C4 \uAC1C\uBC1C \uAC00\uB2A5\uD569\uB2C8\uB2E4. "),io={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},co=e("Neon Labs"),lo=e("\uC640 "),_o={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ho=e("Solang"),po=e("\uC740 \uCD5C\uADFC "),go={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},mo=e("EVM"),uo=e(" \uD638\uD658\uC744 \uAC00\uB2A5\uD558\uAC8C \uD558\uACE0 \uAC1C\uBC1C\uC790\uB4E4\uC774 Program\uC744 Solidity\uC5D0\uC11C \uC791\uC131\uD560 \uC218 \uC788\uAC8C \uD558\uB294 \uC2DC\uB3C4\uB97C \uD558\uACE0 \uC788\uC2B5\uB2C8\uB2E4."),bo=n("

    \uB300\uBD80\uBD84\uC758 Rust \uAE30\uBC18 Program\uB4E4\uC740 \uC544\uB798\uC640 \uAC19\uC740 \uC544\uD0A4\uD14D\uCC98\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),Po=e("\uCD5C\uADFC\uC5D0\uB294, "),fo={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ko=e("Anchor"),yo=e("\uAC00 Program\uC744 \uAC1C\uBC1C\uD558\uAE30 \uC704\uD55C \uD504\uB808\uC784\uC6CC\uD06C\uB85C \uB728\uACE0 \uC788\uC2B5\uB2C8\uB2E4. Anchor\uB294 boilerplate\uB97C \uC904\uC774\uACE0 (de)serialization \uCC98\uB9AC\uB97C \uAC04\uC18C\uD654\uD558\uB294 Ruby on Rails\uC640 \uBE44\uC2B7\uD55C Rust \uAE30\uBC18 \uD504\uB808\uC784\uC6CC\uD06C\uC785\uB2C8\uB2E4."),vo=n('

    Program\uB4E4\uC740 \uBCF4\uD1B5 Testnet\uACFC Mainnet\uC5D0 \uBC30\uD3EC\uB418\uAE30 \uC804\uC5D0 Localhost\uC640 Devnet \uD658\uACBD\uC5D0\uC11C \uAC1C\uBC1C\uB418\uACE0 \uD14C\uC2A4\uD2B8\uB429\uB2C8\uB2E4. Solana\uB294 \uC544\uB798 \uD658\uACBD\uB4E4\uC744 \uC9C0\uC6D0\uD569\uB2C8\uB2E4.

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    \uC77C\uB2E8 \uD658\uACBD\uC5D0 \uBC30\uD3EC\uB418\uACE0 \uB098\uBA74, Client\uB4E4\uC740 \uAC01\uAC01\uC758 Cluster\uB85C\uC758 RPC \uC5F0\uACB0\uC744 \uD1B5\uD574 On-chain Program\uB4E4\uACFC \uC0C1\uD638\uC791\uC6A9 \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    Deploying Programs

    ',4),Lo=e("\uAC1C\uBC1C\uC790\uB4E4\uC740 \uB2E4\uC74C\uACFC \uAC19\uC774 "),So={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},xo=e("CLI"),Fo=e("\uB97C \uD1B5\uD574 Program\uC744 \uBC30\uD3EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."),Ao=n(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Ro=e("Program\uC774 \uBC30\uD3EC\uB420 \uB54C, "),Co={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Bo=e("ELF shared object"),Do=e("(BPF bytecode\uB97C \uD3EC\uD568\uD558\uB294)\uB85C \uCEF4\uD30C\uC77C\uB418\uACE0 Solana Cluster\uB85C \uC5C5\uB85C\uB4DC\uB429\uB2C8\uB2E4. Program\uB4E4\uC740 \uADF8\uB4E4\uC758 Account\uAC00 "),Io=o("code",null,"execuable",-1),Eo=e(" \uD45C\uC2DC\uB418\uACE0 BPF Loader\uC5D0 \uD560\uB2F9\uB420 \uB54C\uB97C \uC81C\uC678\uD558\uACE0 Account \uC548\uC5D0 \uC874\uC7AC\uD569\uB2C8\uB2E4. \uC774 Account\uC758 \uC8FC\uC18C\uB294 "),No=o("code",null,"program_id",-1),wo=e("\uB85C\uC368 \uBAA8\uB4E0 Transaction\uC5D0\uC11C Program\uC744 \uCC38\uC870\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4."),To=e("Solana\uB294 \uCD5C\uADFC "),Vo={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Mo=e("Upgradable BPF Loader"),zo=e("\uB97C \uD3EC\uD568\uD574 multiple BPF Loader\uB97C \uC9C0\uC6D0\uD569\uB2C8\uB2E4. BPF Loader\uB294 Program\uC758 Account\uB97C \uAD00\uB9AC\uD558\uB294\uB370 Client\uB4E4\uC774 "),Oo=o("code",null,"program_id",-1),jo=e("\uB97C \uD1B5\uD574 \uC774\uAC83\uC744 \uAC00\uB2A5\uD558\uAC8C \uB9CC\uB4E4 \uCC45\uC784\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uBAA8\uB4E0 Program\uB4E4\uC740 Instruction\uC5D0 \uB300\uD55C \uCC98\uB9AC\uAC00 \uC77C\uC5B4\uB098\uB294 \uD558\uB098\uC758 Entry Point\uB97C \uAC16\uACE0 \uC788\uC2B5\uB2C8\uB2E4. (i.e. "),Uo=o("code",null,"process_instruction",-1),Go=e(")"),Ho=o("br",null,null,-1),Jo=e(" \uC544\uB798\uB294 \uD56D\uC0C1 \uD3EC\uD568\uB418\uB294 \uD30C\uB77C\uBBF8\uD130\uB4E4\uC785\uB2C8\uB2E4."),Ko=n('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    \uC77C\uB2E8 \uD638\uCD9C\uB418\uACE0 \uB098\uBA74, Program\uB4E4\uC740 Solana Runtime\uC5D0 \uC758\uD574 \uC2E4\uD589\uB429\uB2C8\uB2E4.

    Other Resources

    ',3),Wo={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},qo=e("Official Documentation"),Qo={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Xo=e("SPL Documentation"),Yo={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},Zo=e("Program Deploys by Justin Starry"),$o={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},oe=e("Solana Starter Kit by Iron Addicted Dog"),ee={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},te=e("Programming on Solana by Paulx"),re={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},ne=e("An Introduction to the Solana Blockchain by Hana"),ae={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},se=e("Anchor");function ie(ce,de){const s=a("RouterLink"),r=a("ExternalLinkIcon");return c(),d(_,null,[p,g,m,o("div",u,[b,o("ul",null,[P,o("li",null,[f,t(s,{to:"/kr/core-concepts/accounts.html"},{default:l(()=>[k]),_:1}),y]),v,o("li",null,[L,o("a",S,[x,t(r)]),F,o("a",A,[R,t(r)]),C]),o("li",null,[B,o("a",D,[I,t(r)]),E,o("a",N,[w,t(r)]),T]),V])]),M,z,O,o("p",null,[j,o("a",U,[G,t(r)]),H,o("a",J,[K,t(r)]),W]),o("p",null,[q,o("a",Q,[X,t(r)]),Y]),o("p",null,[Z,o("a",$,[oo,t(r)]),eo,o("a",to,[ro,t(r)]),no]),ao,o("p",null,[so,o("a",io,[co,t(r)]),lo,o("a",_o,[ho,t(r)]),po,o("a",go,[mo,t(r)]),uo]),bo,o("p",null,[Po,o("a",fo,[ko,t(r)]),yo]),vo,o("p",null,[Lo,o("a",So,[xo,t(r)]),Fo]),Ao,o("p",null,[Ro,o("a",Co,[Bo,t(r)]),Do,Io,Eo,No,wo]),o("p",null,[To,o("a",Vo,[Mo,t(r)]),zo,Oo,jo,Uo,Go,Ho,Jo]),Ko,o("ul",null,[o("li",null,[o("a",Wo,[qo,t(r)])]),o("li",null,[o("a",Qo,[Xo,t(r)])]),o("li",null,[o("a",Yo,[Zo,t(r)])]),o("li",null,[o("a",$o,[oe,t(r)])]),o("li",null,[o("a",ee,[te,t(r)])]),o("li",null,[o("a",re,[ne,t(r)])]),o("li",null,[o("a",ae,[se,t(r)])])])],64)}var _e=i(h,[["render",ie]]);export{_e as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.e8e9b38e.js b/docs/.vuepress/dist/assets/programs.html.49c7c645.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.e8e9b38e.js rename to docs/.vuepress/dist/assets/programs.html.49c7c645.js index 8bd837e3d..7d789f508 100644 --- a/docs/.vuepress/dist/assets/programs.html.e8e9b38e.js +++ b/docs/.vuepress/dist/assets/programs.html.49c7c645.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u7DE8\u5BEB\u7A0B\u5E8F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7DE8\u5BEB\u7A0B\u5E8F","aria-hidden":"true"},"#"),s(" \u7DE8\u5BEB\u7A0B\u5E8F")],-1),_=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB-sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB SOL")],-1),y=n("p",null,'\u4F60\u7684Solana\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D"\u8ABF\u7528"\u7CFB\u7D71\u7A0B\u5E8F\u7684\u60C5\u6CC1\u4E0B\u5C07lamports\u5F9E\u4E00\u500B\u8CEC\u6236\u8F49\u79FB\u7D66\u53E6\u4E00\u500B\u8CEC\u6236\u3002\u57FA\u672C\u898F\u5247\u662F\uFF0C\u4F60\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5C07lamports\u5F9E\u4F60\u7684\u7A0B\u5E8F\u6240\u64C1\u6709\u7684\u4EFB\u4F55\u8CEC\u6236\u8F49\u79FB\u5230\u4EFB\u4F55\u8CEC\u6236\u3002',-1),f=n("p",null,"\u63A5\u6536\u65B9\u8CEC\u6236\u4E0D\u4E00\u5B9A\u8981\u662F\u4F60\u7684\u7A0B\u5E8F\u6240\u64C1\u6709\u7684\u8CEC\u6236\u3002",-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u7DE8\u5BEB\u7A0B\u5E8F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7DE8\u5BEB\u7A0B\u5E8F","aria-hidden":"true"},"#"),s(" \u7DE8\u5BEB\u7A0B\u5E8F")],-1),_=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB-sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F49\u79FB SOL")],-1),y=n("p",null,'\u4F60\u7684Solana\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D"\u8ABF\u7528"\u7CFB\u7D71\u7A0B\u5E8F\u7684\u60C5\u6CC1\u4E0B\u5C07lamports\u5F9E\u4E00\u500B\u8CEC\u6236\u8F49\u79FB\u7D66\u53E6\u4E00\u500B\u8CEC\u6236\u3002\u57FA\u672C\u898F\u5247\u662F\uFF0C\u4F60\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5C07lamports\u5F9E\u4F60\u7684\u7A0B\u5E8F\u6240\u64C1\u6709\u7684\u4EFB\u4F55\u8CEC\u6236\u8F49\u79FB\u5230\u4EFB\u4F55\u8CEC\u6236\u3002',-1),f=n("p",null,"\u63A5\u6536\u65B9\u8CEC\u6236\u4E0D\u4E00\u5B9A\u8981\u662F\u4F60\u7684\u7A0B\u5E8F\u6240\u64C1\u6709\u7684\u8CEC\u6236\u3002",-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -233,9 +233,9 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),x=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),v=n("p",null,"\u73FE\u5728\uFF0C\u5BA2\u6236\u7AEF\u53EA\u9700\u8981\u50B3\u905E\u72C0\u614B\u548C\u652F\u4ED8\u8CEC\u6236\u7684\u6307\u4EE4:",-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),x=n("p",null,"\u73FE\u5728\uFF0C\u5BA2\u6236\u7AEF\u53EA\u9700\u8981\u50B3\u905E\u72C0\u614B\u548C\u652F\u4ED8\u8CEC\u6236\u7684\u6307\u4EE4:",-1),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    \u8DE8\u7A0B\u5E8F\u8ABF\u7528\u7684\u65B9\u6CD5

    \u8DE8\u7A0B\u5E8F\u8ABF\u7528\uFF0C\u7C21\u55AE\u4F86\u8AAA\uFF0C\u5C31\u662F\u5728\u6211\u5011\u7684\u7A0B\u5E8F\u4E2D\u8ABF\u7528\u53E6\u4E00\u500B\u7A0B\u5E8F\u7684\u6307\u4EE4\u3002\u4E00\u500B\u5F88\u597D\u7684\u4F8B\u5B50\u662FUniswap\u7684swap\u529F\u80FD\u3002UniswapV2Router\u5408\u7D04\u8ABF\u7528\u5FC5\u8981\u7684\u908F\u8F2F\u9032\u884C\u4EA4\u63DB\uFF0C\u4E26\u8ABF\u7528ERC20\u5408\u7D04\u7684transfer\u51FD\u6578\u5C07\u4EE3\u5E63\u5F9E\u4E00\u500B\u4EBA\u8F49\u79FB\u5230\u53E6\u4E00\u500B\u4EBA\u3002\u540C\u6A23\u7684\u65B9\u5F0F\uFF0C\u6211\u5011\u53EF\u4EE5\u8ABF\u7528\u7A0B\u5E8F\u7684\u6307\u4EE4\u4F86\u5BE6\u73FE\u591A\u7A2E\u76EE\u7684\u3002

    \u8B93\u6211\u5011\u4F86\u770B\u770B\u6211\u5011\u7684\u7B2C\u4E00\u500B\u4F8B\u5B50\uFF0C\u5373SPL Token Program\u7684transfer\u6307\u4EE4\u3002\u9032\u884C\u8F49\u8CEC\u6240\u9700\u7684\u8CEC\u6236\u5305\u62EC\uFF1A

    1. \u6E90\u4EE3\u5E63\u8CEC\u6236\uFF08\u6211\u5011\u6301\u6709\u4EE3\u5E63\u7684\u8CEC\u6236\uFF09
    2. \u76EE\u6A19\u4EE3\u5E63\u8CEC\u6236\uFF08\u6211\u5011\u8981\u5C07\u4EE3\u5E63\u8F49\u79FB\u81F3\u7684\u8CEC\u6236\uFF09
    3. \u6E90\u4EE3\u5E63\u8CEC\u6236\u7684\u6301\u6709\u8005\uFF08\u6211\u5011\u5C07\u7232\u5176\u7C3D\u540D\u7684\u9322\u5305\u5730\u5740\uFF09
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    \u8DE8\u7A0B\u5E8F\u8ABF\u7528\u7684\u65B9\u6CD5

    \u8DE8\u7A0B\u5E8F\u8ABF\u7528\uFF0C\u7C21\u55AE\u4F86\u8AAA\uFF0C\u5C31\u662F\u5728\u6211\u5011\u7684\u7A0B\u5E8F\u4E2D\u8ABF\u7528\u53E6\u4E00\u500B\u7A0B\u5E8F\u7684\u6307\u4EE4\u3002\u4E00\u500B\u5F88\u597D\u7684\u4F8B\u5B50\u662FUniswap\u7684swap\u529F\u80FD\u3002UniswapV2Router\u5408\u7D04\u8ABF\u7528\u5FC5\u8981\u7684\u908F\u8F2F\u9032\u884C\u4EA4\u63DB\uFF0C\u4E26\u8ABF\u7528ERC20\u5408\u7D04\u7684transfer\u51FD\u6578\u5C07\u4EE3\u5E63\u5F9E\u4E00\u500B\u4EBA\u8F49\u79FB\u5230\u53E6\u4E00\u500B\u4EBA\u3002\u540C\u6A23\u7684\u65B9\u5F0F\uFF0C\u6211\u5011\u53EF\u4EE5\u8ABF\u7528\u7A0B\u5E8F\u7684\u6307\u4EE4\u4F86\u5BE6\u73FE\u591A\u7A2E\u76EE\u7684\u3002

    \u8B93\u6211\u5011\u4F86\u770B\u770B\u6211\u5011\u7684\u7B2C\u4E00\u500B\u4F8B\u5B50\uFF0C\u5373SPL Token Program\u7684transfer\u6307\u4EE4\u3002\u9032\u884C\u8F49\u8CEC\u6240\u9700\u7684\u8CEC\u6236\u5305\u62EC\uFF1A

    1. \u6E90\u4EE3\u5E63\u8CEC\u6236\uFF08\u6211\u5011\u6301\u6709\u4EE3\u5E63\u7684\u8CEC\u6236\uFF09
    2. \u76EE\u6A19\u4EE3\u5E63\u8CEC\u6236\uFF08\u6211\u5011\u8981\u5C07\u4EE3\u5E63\u8F49\u79FB\u81F3\u7684\u8CEC\u6236\uFF09
    3. \u6E90\u4EE3\u5E63\u8CEC\u6236\u7684\u6301\u6709\u8005\uFF08\u6211\u5011\u5C07\u7232\u5176\u7C3D\u540D\u7684\u9322\u5305\u5730\u5740\uFF09
    ',4),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),B=s(" \u76F8\u61C9\u7684\u5BA2\u6236\u7AEF\u6307\u4EE4\u5982\u4E0B\u6240\u793A\u3002\u6709\u95DC\u4E86\u89E3\u9444\u5E63\u548C\u4EE3\u5E63\u5275\u5EFA\u6307\u4EE4\uFF0C\u8ACB\u53C3\u8003\u9644\u8FD1\u7684\u5B8C\u6574\u4EE3\u78BC\u3002 "),H=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),H=n("br",null,null,-1),L=s(" \u76F8\u61C9\u7684\u5BA2\u6236\u7AEF\u6307\u4EE4\u5982\u4E0B\u6240\u793A\u3002\u6709\u95DC\u4E86\u89E3\u9444\u5E63\u548C\u4EE3\u5E63\u5275\u5EFA\u6307\u4EE4\uFF0C\u8ACB\u53C3\u8003\u9644\u8FD1\u7684\u5B8C\u6574\u4EE3\u78BC\u3002 "),M=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    \u73FE\u5728\u8B93\u6211\u5011\u4F86\u770B\u53E6\u4E00\u500B\u4F8B\u5B50\uFF0C\u5373System Program\u7684create_account\u6307\u4EE4\u3002\u9019\u88CF\u8207\u4E0A\u9762\u63D0\u5230\u7684\u6307\u4EE4\u6709\u4E00\u9EDE\u4E0D\u540C\u3002\u5728\u4E0A\u8FF0\u4F8B\u5B50\u4E2D\uFF0C\u6211\u5011\u4E0D\u9700\u8981\u5728invoke\u51FD\u6578\u4E2D\u5C07token_program\u4F5C\u7232\u8CEC\u6236\u4E4B\u4E00\u50B3\u905E\u3002\u7136\u800C\uFF0C\u5728\u67D0\u4E9B\u60C5\u6CC1\u4E0B\uFF0C\u60A8\u9700\u8981\u50B3\u905E\u8ABF\u7528\u6307\u4EE4\u7684program_id\u3002\u5728\u6211\u5011\u7684\u4F8B\u5B50\u4E2D\uFF0C\u5B83\u5C07\u662FSystem Program\u7684program_id\uFF08"11111111111111111111111111111111"\uFF09\u3002\u6240\u4EE5\u73FE\u5728\u6240\u9700\u7684\u8CEC\u6236\u5305\u62EC\uFF1A

    1. \u8CA0\u8CAC\u652F\u4ED8\u79DF\u91D1\u7684\u652F\u4ED8\u8CEC\u6236
    2. \u5C07\u8981\u5275\u5EFA\u7684\u8CEC\u6236
    3. \u7CFB\u7D71\u7A0B\u5E8F\uFF08System Program\uFF09\u8CEC\u6236
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    \u73FE\u5728\u8B93\u6211\u5011\u4F86\u770B\u53E6\u4E00\u500B\u4F8B\u5B50\uFF0C\u5373System Program\u7684create_account\u6307\u4EE4\u3002\u9019\u88CF\u8207\u4E0A\u9762\u63D0\u5230\u7684\u6307\u4EE4\u6709\u4E00\u9EDE\u4E0D\u540C\u3002\u5728\u4E0A\u8FF0\u4F8B\u5B50\u4E2D\uFF0C\u6211\u5011\u4E0D\u9700\u8981\u5728invoke\u51FD\u6578\u4E2D\u5C07token_program\u4F5C\u7232\u8CEC\u6236\u4E4B\u4E00\u50B3\u905E\u3002\u7136\u800C\uFF0C\u5728\u67D0\u4E9B\u60C5\u6CC1\u4E0B\uFF0C\u60A8\u9700\u8981\u50B3\u905E\u8ABF\u7528\u6307\u4EE4\u7684program_id\u3002\u5728\u6211\u5011\u7684\u4F8B\u5B50\u4E2D\uFF0C\u5B83\u5C07\u662FSystem Program\u7684program_id\uFF08"11111111111111111111111111111111"\uFF09\u3002\u6240\u4EE5\u73FE\u5728\u6240\u9700\u7684\u8CEC\u6236\u5305\u62EC\uFF1A

    1. \u8CA0\u8CAC\u652F\u4ED8\u79DF\u91D1\u7684\u652F\u4ED8\u8CEC\u6236
    2. \u5C07\u8981\u5275\u5EFA\u7684\u8CEC\u6236
    3. \u7CFB\u7D71\u7A0B\u5E8F\uFF08System Program\uFF09\u8CEC\u6236
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u5C0D\u61C9\u7684\u5BA2\u6236\u7AEF\u4EE3\u78BC\u5982\u4E0B\u6240\u793A\uFF1A",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u5C0D\u61C9\u7684\u5BA2\u6236\u7AEF\u4EE3\u78BC\u5982\u4E0B\u6240\u793A\uFF1A",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[x]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[M]),_:1})]),_:1}),L,B,H,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var In=r(m,[["render",gn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[C]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[v]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[B]),preview:a(()=>[z]),_:1})]),_:1}),H,L,M,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var In=r(m,[["render",gn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.98fb8b49.js b/docs/.vuepress/dist/assets/programs.html.55c372ec.js similarity index 84% rename from docs/.vuepress/dist/assets/programs.html.98fb8b49.js rename to docs/.vuepress/dist/assets/programs.html.55c372ec.js index 742e3d79f..ddf6202fd 100644 --- a/docs/.vuepress/dist/assets/programs.html.98fb8b49.js +++ b/docs/.vuepress/dist/assets/programs.html.55c372ec.js @@ -1 +1 @@ -const o={key:"v-877d9708",path:"/references/programs.html",title:"Writing Programs",lang:"en-US",frontmatter:{title:"Writing Programs",head:[["meta",{name:"title",content:"Solana Cookbook | Solana Program References"}],["meta",{name:"og:title",content:"Solana Cookbook | Solana Program References"}],["meta",{name:"description",content:"Learn how to write programs on Solana, with references on cross program invocation, reading accounts, and more"}],["meta",{name:"og:description",content:"Learn how to write programs on Solana, with references on cross program invocation, reading accounts, and more"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]]},excerpt:"",headers:[{level:2,title:"How to transfer SOL in a program",slug:"how-to-transfer-sol-in-a-program",children:[]},{level:2,title:"How to get clock in a program",slug:"how-to-get-clock-in-a-program",children:[{level:3,title:"Passing Clock as an account inside an instruction",slug:"passing-clock-as-an-account-inside-an-instruction",children:[]},{level:3,title:"Accessing Clock directly inside an instruction",slug:"accessing-clock-directly-inside-an-instruction",children:[]}]},{level:2,title:"How to change account size",slug:"how-to-change-account-size",children:[]},{level:2,title:"How to do Cross Program Invocation",slug:"how-to-do-cross-program-invocation",children:[]},{level:2,title:"How to create a PDA",slug:"how-to-create-a-pda",children:[]},{level:2,title:"How to read accounts",slug:"how-to-read-accounts",children:[]},{level:2,title:"How to verify accounts",slug:"how-to-verify-accounts",children:[]},{level:2,title:"How to read multiple instructions from a transaction",slug:"how-to-read-multiple-instructions-from-a-transaction",children:[]}],git:{updatedTime:1685979815e3,contributors:[{name:"Jacob Creech",email:"82475023+jacobcreech@users.noreply.github.com",commits:3},{name:"Jacob Creech",email:"jacob.creech@solana.com",commits:1},{name:"Sergey Kaunov",email:"skaunov@disroot.org",commits:1},{name:"migui3230",email:"74937076+migui3230@users.noreply.github.com",commits:1}]},filePathRelative:"references/programs.md"};export{o as data}; +const o={key:"v-877d9708",path:"/references/programs.html",title:"Writing Programs",lang:"en-US",frontmatter:{title:"Writing Programs",head:[["meta",{name:"title",content:"Solana Cookbook | Solana Program References"}],["meta",{name:"og:title",content:"Solana Cookbook | Solana Program References"}],["meta",{name:"description",content:"Learn how to write programs on Solana, with references on cross program invocation, reading accounts, and more"}],["meta",{name:"og:description",content:"Learn how to write programs on Solana, with references on cross program invocation, reading accounts, and more"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]]},excerpt:"",headers:[{level:2,title:"How to transfer SOL in a program",slug:"how-to-transfer-sol-in-a-program",children:[]},{level:2,title:"How to get clock in a program",slug:"how-to-get-clock-in-a-program",children:[{level:3,title:"Passing Clock as an account inside an instruction",slug:"passing-clock-as-an-account-inside-an-instruction",children:[]},{level:3,title:"Accessing Clock directly inside an instruction",slug:"accessing-clock-directly-inside-an-instruction",children:[]}]},{level:2,title:"How to change account size",slug:"how-to-change-account-size",children:[]},{level:2,title:"How to do Cross Program Invocation",slug:"how-to-do-cross-program-invocation",children:[]},{level:2,title:"How to create a PDA",slug:"how-to-create-a-pda",children:[]},{level:2,title:"How to read accounts",slug:"how-to-read-accounts",children:[]},{level:2,title:"How to verify accounts",slug:"how-to-verify-accounts",children:[]},{level:2,title:"How to read multiple instructions from a transaction",slug:"how-to-read-multiple-instructions-from-a-transaction",children:[]}],git:{updatedTime:1727402738e3,contributors:[{name:"Jacob Creech",email:"82475023+jacobcreech@users.noreply.github.com",commits:3},{name:"Ayush",email:"Ayush-15@live.com",commits:1},{name:"Jacob Creech",email:"jacob.creech@solana.com",commits:1},{name:"Sergey Kaunov",email:"skaunov@disroot.org",commits:1},{name:"migui3230",email:"74937076+migui3230@users.noreply.github.com",commits:1}]},filePathRelative:"references/programs.md"};export{o as data}; diff --git a/docs/.vuepress/dist/assets/programs.html.2a06f575.js b/docs/.vuepress/dist/assets/programs.html.5fe96c87.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.2a06f575.js rename to docs/.vuepress/dist/assets/programs.html.5fe96c87.js index c48bb5e85..26400605a 100644 --- a/docs/.vuepress/dist/assets/programs.html.2a06f575.js +++ b/docs/.vuepress/dist/assets/programs.html.5fe96c87.js @@ -1,2 +1,2 @@ -import{_ as d,r as s,o as i,c as l,a as t,b as o,w as c,F as _,d as e,e as r}from"./app.07ce7a66.js";const h={},p=t("h1",{id:"\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7A0B\u5E8F")],-1),u=t("p",null,"\u4EFB\u4F55\u958B\u767C\u8005\u90FD\u53EF\u4EE5\u5728Solana\u93C8\u4E0A\u7DE8\u5BEB\u4EE5\u53CA\u90E8\u7F72\u7A0B\u5E8F\u3002Solana\u7A0B\u5E8F\uFF08\u5728\u5176\u4ED6\u93C8\u4E0A\u53EB\u505A\u667A\u80FD\u5408\u7D04\uFF09\uFF0C\u662F\u6240\u6709\u93C8\u4E0A\u6D3B\u52D5\u7684\u57FA\u790E\u3002 \u93C8\u4E0A\u7684\u4E00\u5207\u6D3B\u52D5\uFF0C\u5F9E\u53BB\u4E2D\u5FC3\u5316\u91D1\u878D\uFF08DeFi\uFF09\uFF0C\u5230\u975E\u540C\u8CEA\u5316\u4EE3\u5E63\uFF08NFT\uFF09\uFF0C\u518D\u5230\u793E\u4EA4\u5A92\u9AD4\uFF0C\u93C8\u4E0A\u6E38\u6232\uFF0C\u90FD\u7531Solana\u7A0B\u5E8F\u6240\u9A45\u52D5\u3002",-1),g=t("h2",{id:"\u7D9C\u8FF0",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7D9C\u8FF0","aria-hidden":"true"},"#"),e(" \u7D9C\u8FF0")],-1),b={class:"custom-container tip"},m=t("p",{class:"custom-container-title"},"\u8981\u9EDE",-1),f=t("li",null,[e("\u7A0B\u5E8F\u53EF\u4EE5\u8655\u7406\u4F86\u81EA\u7528\u6236\u548C\u5176\u4ED6\u7A0B\u5E8F\u7684"),t("a",{href:"./transactions"},"\u6307\u4EE4")],-1),k=e("\u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u662F"),S=t("strong",null,"\u7121\u72C0\u614B",-1),P=e("\u7684\uFF1A\u6240\u6709\u7684\u548C\u7A0B\u5E8F\u4EA4\u4E92\u7684\u6578\u64DA\u90FD\u662F\u5B58\u5132\u5728\u7368\u7ACB\u7684"),y=e("\u8CEC\u6236"),L=e("\u4E2D\u3002\u57F7\u884C\u6642\uFF0C\u9019\u4E9B\u8CEC\u6236\u85C9\u7531\u6307\u4EE4\u50B3\u5165\u7A0B\u5E8F"),v=t("li",null,[e("\u7A0B\u5E8F\u672C\u8EAB\u5B58\u5132\u5728\u6A19\u8A18\u7232"),t("code",null,"executable"),e("\uFF08\u53EF\u57F7\u884C\uFF09\u7684\u8CEC\u6236\u4E2D\u3002")],-1),x=e("\u4EFB\u4F55\u7A0B\u5E8F\u7684\u6240\u6709\u8005\u90FD\u662F"),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},B=e("BPF Loader"),R=e(" and executed by the "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},w=e("Solana Runtime"),E=e("\u958B\u767C\u8005\u901A\u5E38\u4F7F\u7528Rust\u6216C++\u4F86\u7DE8\u5BEB\u7A0B\u5E8F\uFF0C\u4E5F\u53EF\u4EE5\u63A1\u7528\u4EFB\u4F55\u5176\u4ED6\u53EF\u4EE5\u7DE8\u8B6F\u7232"),T={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=e("LLVM"),C=e("\u7684"),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=e("BPF"),N=e("\u5F8C\u7AEF\u7684\u8A9E\u8A00"),D=r("
  • \u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u6709\u4E00\u500B\u55AE\u7368\u7684\u5165\u53E3\u9EDE\uFF0C\u6307\u4EE4\u7684\u57F7\u884C\u5C31\u662F\u5F9E\u9019\u88CF\u958B\u59CB\u7684\uFF08\u4EA6\u5373process_instruction\uFF09\u3002\u53C3\u6578\u9808\u5305\u62EC\uFF1A
    • program_id: pubkey \uFF08\u516C\u9470\uFF09
    • accounts: array \uFF08\u6578\u7D44\uFF09
    • instruction_data: byte array \uFF08\u5B57\u7BC0\u6578\u7D44\uFF09
  • ",1),j=t("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),e(" \u6DF1\u5165")],-1),U=t("p",null,'\u8207\u5176\u4ED6\u93C8\u4E0D\u540C\uFF0CSolana\u5C07\u4EE3\u78BC\u8207\u6578\u64DA\u5B8C\u5168\u5206\u958B\u3002 \u7A0B\u5E8F\u9700\u8981\u8A2A\u554F\u7684\u5168\u90E8\u6578\u64DA\u90FD\u5B58\u5132\u5728\u7368\u7ACB\u7684\u8CEC\u6236\u4E2D\uFF0C\u5728\u6307\u4EE4\u4E2D\u9019\u4E9B\u8CEC\u6236\u9700\u8981\u4EE5\u5F15\u7528\u7684\u65B9\u5F0F\u50B3\u5165\u3002 \u9019\u7A2E\u6A21\u5F0F\u4F7F\u5F97\u4E00\u500B\u901A\u7528\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u8CEC\u6236\u4E0A\u904B\u884C\uFF0C\u800C\u4E0D\u7528\u7232\u6B64\u984D\u5916\u90E8\u7F72\u7A0B\u5E8F\u3002 \u9019\u7A2E\u6A21\u5F0F\u7684\u4F8B\u5B50\u5F88\u5E38\u898B\uFF0C\u5305\u62EC\u4E86"\u539F\u751F\u7A0B\u5E8F"\u4EE5\u53CA"SPL\u7A0B\u5E8F"\u7B49\u3002',-1),H=t("h3",{id:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5EAB-spl",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5EAB-spl","aria-hidden":"true"},"#"),e(" \u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5EAB\uFF08SPL\uFF09")],-1),O=e("Solana\u81EA\u5E36\u4E00\u7CFB\u5217\u7A0B\u5E8F\uFF0C\u9019\u4E9B\u7A0B\u5E8F\u662F\u93C8\u4E0A\u4EA4\u4E92\u7684\u6838\u5FC3\u69CB\u6210\u8981\u7D20\u3002 \u9019\u4E9B\u7A0B\u5E8F\u5206\u7232"),z={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=e("\u539F\u751F\u7A0B\u5E8F"),J=e(" \u548C"),K={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},q=e("Solana\u7A0B\u5E8F\u5EAB\uFF08SPL\u7A0B\u5E8F\uFF09"),Q=e("\u539F\u751F\u7A0B\u5E8F\u63D0\u4F9B\u4E86\u904B\u884C\u9A57\u8B49\u7BC0\u9EDE\uFF08validator\uFF09\u6240\u9700\u7684\u529F\u80FD\u3002\u539F\u751F\u7A0B\u5E8F\u4E2D\u6700\u5EE3\u7232\u4EBA\u77E5\u7684\u662F"),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=e("System Program"),Y=e("\u3002 \u9019\u500B\u7A0B\u5E8F\u8CA0\u8CAC\u7BA1\u7406\u5EFA\u7ACB\u65B0\u8CEC\u6236\u4EE5\u53CA\u5728\u5169\u500B\u8CEC\u6236\u4E4B\u9593\u8F49\u8CECSOL\u3002"),Z=e("SPL\u7A0B\u5E8F\u5B9A\u7FA9\u4E86\u4E00\u7CFB\u5217\u7684\u93C8\u4E0A\u6D3B\u52D5\uFF0C\u5176\u4E2D\u5305\u62EC\u91DD\u5C0D\u4EE3\u5E63\u7684\u5275\u5EFA\uFF0C\u4EA4\u63DB\uFF0C\u501F\u8CB8\uFF0C\u4EE5\u53CA\u5275\u5EFA\u8CEA\u62BC\u6C60\uFF0C\u7DAD\u8B77\u93C8\u4E0A\u57DF\u540D\u89E3\u6790\u670D\u52D9\u7B49\u3002 "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},tt=e("SPL Token Program\uFF08SPL\u4EE3\u5E63\u7A0B\u5E8F\uFF09"),et=e("\u53EF\u4EE5\u76F4\u63A5\u5728\u547D\u4EE4\u884C\u8ABF\u7528\uFF0C\u5176\u4ED6\u7684\u4E00\u4E9B\uFF0C\u5982 "),ot={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},nt=e("Associated Token Account Program\uFF08\u95DC\u806F\u4EE3\u5E63\u8CEC\u6236\u7A0B\u5E8F\uFF09"),rt=e("\uFF0C \u5247\u5E38\u88AB\u7528\u65BC\u7DE8\u5BEB\u5176\u4ED6\u5B9A\u88FD\u7A0B\u5E8F\u3002"),st=t("h3",{id:"\u7DE8\u5BEB\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7DE8\u5BEB\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7DE8\u5BEB\u7A0B\u5E8F")],-1),at=e("\u7DE8\u5BEBSolana\u7A0B\u5E8F\u5E38\u7528\u7684\u662FRust\u548CC++\uFF0C\u4F46\u662F\u4E5F\u53EF\u4EE5\u4F7F\u7528\u5176\u4ED6\u53EF\u4EE5\u7DE8\u8B6F\u7232LLVM\u7684BPF\u5F8C\u7AEF\u7684\u8A9E\u8A00\u3002 \u6700\u8FD1"),dt={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},it=e("Neon Labs"),lt=e("\u548C"),ct={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_t=e("Solang"),ht=e("\u767C\u8D77\u4E86\u4E00\u500B\u9805\u76EE\uFF0C \u65E8\u5728\u5EFA\u7ACBSolana\u7684"),pt={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ut=e("EVM"),gt=e("\u517C\u5BB9\u6027\uFF0C\u9032\u800C\u8B93\u958B\u767C\u8005\u53EF\u4EE5\u4F7F\u7528Solidity\u7DE8\u5BEB\u7A0B\u5E8F\u3002"),bt=r("

    \u5927\u90E8\u5206Rust\u7DE8\u5BEB\u7684\u7A0B\u5E8F\u9075\u5FAA\u4EE5\u4E0B\u67B6\u69CB\uFF1A

    \u6587\u4EF6\u63CF\u8FF0
    lib.rs\u8A3B\u518A\u6A21\u584A
    entrypoint.rs\u7A0B\u5E8F\u7684\u5165\u53E3\u9EDE
    instruction.rs\u7A0B\u5E8F\u7684API, \u5C0D\u6307\u4EE4\u7684\u6578\u64DA\u9032\u884C\u5E8F\u5217\u5316\u8207\u53CD\u5E8F\u5217\u5316
    processor.rs\u7A0B\u5E8F\u7684\u696D\u52D9\u908F\u8F2F
    state.rs\u7A0B\u5E8F\u5C0D\u8C61\uFF0C\u5C0D\u72C0\u614B\u9032\u884C\u53CD\u5E8F\u5217\u5316
    error.rs\u7A0B\u5E8F\u4E2D\u5236\u5B9A\u7684\u932F\u8AA4
    ",2),mt=e("\u6700\u8FD1\uFF0C"),ft={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},kt=e("Anchor"),St=e("\u9010\u6F38\u6210\u7232\u4E86\u4E00\u500B\u5EE3\u53D7\u6B61\u8FCE\u7684Solana\u7A0B\u5E8F\u958B\u767C\u6846\u67B6\u3002 Anchor\u662F\u4E00\u500B\u6709\u614B\u5EA6\u7684\u6846\u67B6\uFF0C\u8207Ruby on Rails\u76F8\u4F3C\uFF0C\u9019\u500B\u6846\u67B6\u65E8\u5728\u6E1B\u5C11\u6A21\u5F0F\u5316\u7684\u4EE3\u78BC\uFF0C\u5C07Rust\u958B\u767C\u6D41\u7A0B\u4E2D\u7684\u5E8F\u5217\u5316\u8207\u53CD\u5E8F\u5217\u5316\u904E\u7A0B\u6D41\u6C34\u7DDA\u5316\u3002"),Pt=r("

    \u5728\u90E8\u7F72\u5230Testnet\uFF08\u6E2C\u8A66\u7DB2\uFF09\u548CMainnet\uFF08\u4E3B\u7DB2\uFF09\u4E4B\u524D\uFF0C\u7A0B\u5E8F\u5728\u958B\u767C\u548C\u6E2C\u8A66\u968E\u6BB5\u7D93\u5E38\u4F7F\u7528Localhost\u548CDevnet\uFF08\u958B\u767C\u7DB2\uFF09\u74B0\u5883\u3002 Solana\u652F\u6301\u4EE5\u4E0B\u7684\u5E7E\u500B\u74B0\u5883\uFF1A

    \u96C6\u7FA3\u74B0\u5883RPC\u9023\u63A5URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhost\u9ED8\u8A8D\u7AEF\u53E3\uFF1A8899\uFF08\u4F8B\u5982\uFF0Chttp://localhost:8899\uFF0Chttp://192.168.1.88:8899\uFF09
    ",2),yt=e("\u90E8\u7F72\u5230\u4E00\u500B\u74B0\u5883\u4E4B\u5F8C\uFF0C\u5BA2\u6236\u7AEF\u5C31\u53EF\u4EE5\u901A\u904E\u5C0D\u61C9\u96C6\u7FA3\u7684"),Lt={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},vt=e("RPC\u9023\u63A5"),xt=e("\u8207\u93C8\u4E0A\u7A0B\u5E8F\u9032\u884C\u4EA4\u4E92\u3002"),Ft=t("h3",{id:"\u90E8\u7F72\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u90E8\u7F72\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u90E8\u7F72\u7A0B\u5E8F")],-1),Bt=e("\u958B\u767C\u8005\u53EF\u4EE5\u4F7F\u7528"),Rt={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},At=e("\u547D\u4EE4\u884C"),wt=e("\u90E8\u7F72\u7A0B\u5E8F\uFF1A"),Et=r(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as d,r as s,o as i,c as l,a as t,b as o,w as c,F as _,d as e,e as r}from"./app.d411e3b3.js";const h={},p=t("h1",{id:"\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7A0B\u5E8F")],-1),u=t("p",null,"\u4EFB\u4F55\u958B\u767C\u8005\u90FD\u53EF\u4EE5\u5728Solana\u93C8\u4E0A\u7DE8\u5BEB\u4EE5\u53CA\u90E8\u7F72\u7A0B\u5E8F\u3002Solana\u7A0B\u5E8F\uFF08\u5728\u5176\u4ED6\u93C8\u4E0A\u53EB\u505A\u667A\u80FD\u5408\u7D04\uFF09\uFF0C\u662F\u6240\u6709\u93C8\u4E0A\u6D3B\u52D5\u7684\u57FA\u790E\u3002 \u93C8\u4E0A\u7684\u4E00\u5207\u6D3B\u52D5\uFF0C\u5F9E\u53BB\u4E2D\u5FC3\u5316\u91D1\u878D\uFF08DeFi\uFF09\uFF0C\u5230\u975E\u540C\u8CEA\u5316\u4EE3\u5E63\uFF08NFT\uFF09\uFF0C\u518D\u5230\u793E\u4EA4\u5A92\u9AD4\uFF0C\u93C8\u4E0A\u6E38\u6232\uFF0C\u90FD\u7531Solana\u7A0B\u5E8F\u6240\u9A45\u52D5\u3002",-1),g=t("h2",{id:"\u7D9C\u8FF0",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7D9C\u8FF0","aria-hidden":"true"},"#"),e(" \u7D9C\u8FF0")],-1),b={class:"custom-container tip"},m=t("p",{class:"custom-container-title"},"\u8981\u9EDE",-1),f=t("li",null,[e("\u7A0B\u5E8F\u53EF\u4EE5\u8655\u7406\u4F86\u81EA\u7528\u6236\u548C\u5176\u4ED6\u7A0B\u5E8F\u7684"),t("a",{href:"./transactions"},"\u6307\u4EE4")],-1),k=e("\u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u662F"),S=t("strong",null,"\u7121\u72C0\u614B",-1),P=e("\u7684\uFF1A\u6240\u6709\u7684\u548C\u7A0B\u5E8F\u4EA4\u4E92\u7684\u6578\u64DA\u90FD\u662F\u5B58\u5132\u5728\u7368\u7ACB\u7684"),y=e("\u8CEC\u6236"),L=e("\u4E2D\u3002\u57F7\u884C\u6642\uFF0C\u9019\u4E9B\u8CEC\u6236\u85C9\u7531\u6307\u4EE4\u50B3\u5165\u7A0B\u5E8F"),v=t("li",null,[e("\u7A0B\u5E8F\u672C\u8EAB\u5B58\u5132\u5728\u6A19\u8A18\u7232"),t("code",null,"executable"),e("\uFF08\u53EF\u57F7\u884C\uFF09\u7684\u8CEC\u6236\u4E2D\u3002")],-1),x=e("\u4EFB\u4F55\u7A0B\u5E8F\u7684\u6240\u6709\u8005\u90FD\u662F"),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},B=e("BPF Loader"),R=e(" and executed by the "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},w=e("Solana Runtime"),E=e("\u958B\u767C\u8005\u901A\u5E38\u4F7F\u7528Rust\u6216C++\u4F86\u7DE8\u5BEB\u7A0B\u5E8F\uFF0C\u4E5F\u53EF\u4EE5\u63A1\u7528\u4EFB\u4F55\u5176\u4ED6\u53EF\u4EE5\u7DE8\u8B6F\u7232"),T={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=e("LLVM"),C=e("\u7684"),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=e("BPF"),N=e("\u5F8C\u7AEF\u7684\u8A9E\u8A00"),D=r("
  • \u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u6709\u4E00\u500B\u55AE\u7368\u7684\u5165\u53E3\u9EDE\uFF0C\u6307\u4EE4\u7684\u57F7\u884C\u5C31\u662F\u5F9E\u9019\u88CF\u958B\u59CB\u7684\uFF08\u4EA6\u5373process_instruction\uFF09\u3002\u53C3\u6578\u9808\u5305\u62EC\uFF1A
    • program_id: pubkey \uFF08\u516C\u9470\uFF09
    • accounts: array \uFF08\u6578\u7D44\uFF09
    • instruction_data: byte array \uFF08\u5B57\u7BC0\u6578\u7D44\uFF09
  • ",1),j=t("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),e(" \u6DF1\u5165")],-1),U=t("p",null,'\u8207\u5176\u4ED6\u93C8\u4E0D\u540C\uFF0CSolana\u5C07\u4EE3\u78BC\u8207\u6578\u64DA\u5B8C\u5168\u5206\u958B\u3002 \u7A0B\u5E8F\u9700\u8981\u8A2A\u554F\u7684\u5168\u90E8\u6578\u64DA\u90FD\u5B58\u5132\u5728\u7368\u7ACB\u7684\u8CEC\u6236\u4E2D\uFF0C\u5728\u6307\u4EE4\u4E2D\u9019\u4E9B\u8CEC\u6236\u9700\u8981\u4EE5\u5F15\u7528\u7684\u65B9\u5F0F\u50B3\u5165\u3002 \u9019\u7A2E\u6A21\u5F0F\u4F7F\u5F97\u4E00\u500B\u901A\u7528\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u8CEC\u6236\u4E0A\u904B\u884C\uFF0C\u800C\u4E0D\u7528\u7232\u6B64\u984D\u5916\u90E8\u7F72\u7A0B\u5E8F\u3002 \u9019\u7A2E\u6A21\u5F0F\u7684\u4F8B\u5B50\u5F88\u5E38\u898B\uFF0C\u5305\u62EC\u4E86"\u539F\u751F\u7A0B\u5E8F"\u4EE5\u53CA"SPL\u7A0B\u5E8F"\u7B49\u3002',-1),H=t("h3",{id:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5EAB-spl",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5EAB-spl","aria-hidden":"true"},"#"),e(" \u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5EAB\uFF08SPL\uFF09")],-1),O=e("Solana\u81EA\u5E36\u4E00\u7CFB\u5217\u7A0B\u5E8F\uFF0C\u9019\u4E9B\u7A0B\u5E8F\u662F\u93C8\u4E0A\u4EA4\u4E92\u7684\u6838\u5FC3\u69CB\u6210\u8981\u7D20\u3002 \u9019\u4E9B\u7A0B\u5E8F\u5206\u7232"),z={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=e("\u539F\u751F\u7A0B\u5E8F"),J=e(" \u548C"),K={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},q=e("Solana\u7A0B\u5E8F\u5EAB\uFF08SPL\u7A0B\u5E8F\uFF09"),Q=e("\u539F\u751F\u7A0B\u5E8F\u63D0\u4F9B\u4E86\u904B\u884C\u9A57\u8B49\u7BC0\u9EDE\uFF08validator\uFF09\u6240\u9700\u7684\u529F\u80FD\u3002\u539F\u751F\u7A0B\u5E8F\u4E2D\u6700\u5EE3\u7232\u4EBA\u77E5\u7684\u662F"),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=e("System Program"),Y=e("\u3002 \u9019\u500B\u7A0B\u5E8F\u8CA0\u8CAC\u7BA1\u7406\u5EFA\u7ACB\u65B0\u8CEC\u6236\u4EE5\u53CA\u5728\u5169\u500B\u8CEC\u6236\u4E4B\u9593\u8F49\u8CECSOL\u3002"),Z=e("SPL\u7A0B\u5E8F\u5B9A\u7FA9\u4E86\u4E00\u7CFB\u5217\u7684\u93C8\u4E0A\u6D3B\u52D5\uFF0C\u5176\u4E2D\u5305\u62EC\u91DD\u5C0D\u4EE3\u5E63\u7684\u5275\u5EFA\uFF0C\u4EA4\u63DB\uFF0C\u501F\u8CB8\uFF0C\u4EE5\u53CA\u5275\u5EFA\u8CEA\u62BC\u6C60\uFF0C\u7DAD\u8B77\u93C8\u4E0A\u57DF\u540D\u89E3\u6790\u670D\u52D9\u7B49\u3002 "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},tt=e("SPL Token Program\uFF08SPL\u4EE3\u5E63\u7A0B\u5E8F\uFF09"),et=e("\u53EF\u4EE5\u76F4\u63A5\u5728\u547D\u4EE4\u884C\u8ABF\u7528\uFF0C\u5176\u4ED6\u7684\u4E00\u4E9B\uFF0C\u5982 "),ot={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},nt=e("Associated Token Account Program\uFF08\u95DC\u806F\u4EE3\u5E63\u8CEC\u6236\u7A0B\u5E8F\uFF09"),rt=e("\uFF0C \u5247\u5E38\u88AB\u7528\u65BC\u7DE8\u5BEB\u5176\u4ED6\u5B9A\u88FD\u7A0B\u5E8F\u3002"),st=t("h3",{id:"\u7DE8\u5BEB\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7DE8\u5BEB\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7DE8\u5BEB\u7A0B\u5E8F")],-1),at=e("\u7DE8\u5BEBSolana\u7A0B\u5E8F\u5E38\u7528\u7684\u662FRust\u548CC++\uFF0C\u4F46\u662F\u4E5F\u53EF\u4EE5\u4F7F\u7528\u5176\u4ED6\u53EF\u4EE5\u7DE8\u8B6F\u7232LLVM\u7684BPF\u5F8C\u7AEF\u7684\u8A9E\u8A00\u3002 \u6700\u8FD1"),dt={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},it=e("Neon Labs"),lt=e("\u548C"),ct={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_t=e("Solang"),ht=e("\u767C\u8D77\u4E86\u4E00\u500B\u9805\u76EE\uFF0C \u65E8\u5728\u5EFA\u7ACBSolana\u7684"),pt={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ut=e("EVM"),gt=e("\u517C\u5BB9\u6027\uFF0C\u9032\u800C\u8B93\u958B\u767C\u8005\u53EF\u4EE5\u4F7F\u7528Solidity\u7DE8\u5BEB\u7A0B\u5E8F\u3002"),bt=r("

    \u5927\u90E8\u5206Rust\u7DE8\u5BEB\u7684\u7A0B\u5E8F\u9075\u5FAA\u4EE5\u4E0B\u67B6\u69CB\uFF1A

    \u6587\u4EF6\u63CF\u8FF0
    lib.rs\u8A3B\u518A\u6A21\u584A
    entrypoint.rs\u7A0B\u5E8F\u7684\u5165\u53E3\u9EDE
    instruction.rs\u7A0B\u5E8F\u7684API, \u5C0D\u6307\u4EE4\u7684\u6578\u64DA\u9032\u884C\u5E8F\u5217\u5316\u8207\u53CD\u5E8F\u5217\u5316
    processor.rs\u7A0B\u5E8F\u7684\u696D\u52D9\u908F\u8F2F
    state.rs\u7A0B\u5E8F\u5C0D\u8C61\uFF0C\u5C0D\u72C0\u614B\u9032\u884C\u53CD\u5E8F\u5217\u5316
    error.rs\u7A0B\u5E8F\u4E2D\u5236\u5B9A\u7684\u932F\u8AA4
    ",2),mt=e("\u6700\u8FD1\uFF0C"),ft={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},kt=e("Anchor"),St=e("\u9010\u6F38\u6210\u7232\u4E86\u4E00\u500B\u5EE3\u53D7\u6B61\u8FCE\u7684Solana\u7A0B\u5E8F\u958B\u767C\u6846\u67B6\u3002 Anchor\u662F\u4E00\u500B\u6709\u614B\u5EA6\u7684\u6846\u67B6\uFF0C\u8207Ruby on Rails\u76F8\u4F3C\uFF0C\u9019\u500B\u6846\u67B6\u65E8\u5728\u6E1B\u5C11\u6A21\u5F0F\u5316\u7684\u4EE3\u78BC\uFF0C\u5C07Rust\u958B\u767C\u6D41\u7A0B\u4E2D\u7684\u5E8F\u5217\u5316\u8207\u53CD\u5E8F\u5217\u5316\u904E\u7A0B\u6D41\u6C34\u7DDA\u5316\u3002"),Pt=r("

    \u5728\u90E8\u7F72\u5230Testnet\uFF08\u6E2C\u8A66\u7DB2\uFF09\u548CMainnet\uFF08\u4E3B\u7DB2\uFF09\u4E4B\u524D\uFF0C\u7A0B\u5E8F\u5728\u958B\u767C\u548C\u6E2C\u8A66\u968E\u6BB5\u7D93\u5E38\u4F7F\u7528Localhost\u548CDevnet\uFF08\u958B\u767C\u7DB2\uFF09\u74B0\u5883\u3002 Solana\u652F\u6301\u4EE5\u4E0B\u7684\u5E7E\u500B\u74B0\u5883\uFF1A

    \u96C6\u7FA3\u74B0\u5883RPC\u9023\u63A5URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhost\u9ED8\u8A8D\u7AEF\u53E3\uFF1A8899\uFF08\u4F8B\u5982\uFF0Chttp://localhost:8899\uFF0Chttp://192.168.1.88:8899\uFF09
    ",2),yt=e("\u90E8\u7F72\u5230\u4E00\u500B\u74B0\u5883\u4E4B\u5F8C\uFF0C\u5BA2\u6236\u7AEF\u5C31\u53EF\u4EE5\u901A\u904E\u5C0D\u61C9\u96C6\u7FA3\u7684"),Lt={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},vt=e("RPC\u9023\u63A5"),xt=e("\u8207\u93C8\u4E0A\u7A0B\u5E8F\u9032\u884C\u4EA4\u4E92\u3002"),Ft=t("h3",{id:"\u90E8\u7F72\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u90E8\u7F72\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u90E8\u7F72\u7A0B\u5E8F")],-1),Bt=e("\u958B\u767C\u8005\u53EF\u4EE5\u4F7F\u7528"),Rt={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},At=e("\u547D\u4EE4\u884C"),wt=e("\u90E8\u7F72\u7A0B\u5E8F\uFF1A"),Et=r(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Tt=e("\u90E8\u7F72\u7A0B\u5E8F\u7684\u6642\u5019\uFF0C\u7A0B\u5E8F\u6703\u88AB\u7DE8\u8B6F\u7232\u5305\u542BBPF\u5B57\u7BC0\u78BC\u7684"),Vt={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ct=e("ELF\u5171\u4EAB\u5C0D\u8C61"),It=e("\uFF0C\u4E26\u4E0A\u50B3\u5230Solana\u96C6\u7FA3\u4E0A\u3002 \u548CSolana\u4E0A\u5176\u4ED6\u7684\u4EFB\u4F55\u6771\u897F\u4E00\u6A23\uFF0C\u7A0B\u5E8F\u5132\u5B58\u5728\u8CEC\u6236\u7576\u4E2D\u3002\u552F\u4E00\u7684\u7279\u6B8A\u4E4B\u8655\u662F\uFF0C\u9019\u4E9B\u8CEC\u6236\u6A19\u8A18\u7232"),Mt=t("code",null,"executable",-1),Nt=e('\uFF08\u53EF\u57F7\u884C\uFF09\uFF0C\u4E26\u4E14\u5176\u6240\u6709\u8005\u662F"BPF Loader\uFF08BPF\u52A0\u8F09\u5668\uFF09"\u3002 \u9019\u500B\u8CEC\u6236\u7684\u5730\u5740\u88AB\u7A31\u7232'),Dt=t("code",null,"program_id",-1),jt=e("\uFF0C\u5728\u5F8C\u9762\u7684\u4E00\u5207\u4EA4\u6613\u7576\u4E2D\uFF0C\u7528\u65BC\u6307\u4EE3\u9019\u500B\u7A0B\u5E8F\u3002"),Ut=e("Solana\u652F\u6301\u591A\u7A2EBPF\u52A0\u8F09\u5668\uFF0C\u6700\u65B0\u7684\u662F"),Ht={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ot=e("Upgradable BPF Loader"),zt=e("\u3002 BPF\u52A0\u8F09\u5668\u8CA0\u8CAC\u7BA1\u7406\u7A0B\u5E8F\u8CEC\u6236\uFF0C\u8B93\u5BA2\u6236\u7AEF\u53EF\u4EE5\u901A\u904E\u5176"),Gt=t("code",null,"program_id",-1),Jt=e("\u5C0D\u7A0B\u5E8F\u9032\u884C\u8A2A\u554F\u3002\u6BCF\u500B\u7A0B\u5E8F\u90FD\u53EA\u6709\u4E00\u500B\u5165\u53E3\u9EDE\uFF0C\u9019\u88CF\u5C0D\u6307\u4EE4\u9032\u884C\u8655\u7406\u3002\u9019\u88CF\u7684\u53C3\u6578\u9808\u5305\u62EC\uFF1A"),Kt=r('
    • program_id: pubkey\uFF08\u516C\u9470\uFF09
    • accounts: array\uFF08\u6578\u7D44\uFF09
    • instruction_data: byte array\uFF08\u5B57\u7BC0\u6578\u7D44\uFF09

    \u7576\u7A0B\u5E8F\u88AB\u8ABF\u7528\u6642\uFF0C\u6703\u5728Solana\u904B\u884C\u5EAB\u4E2D\u88AB\u57F7\u884C\u3002

    \u5176\u4ED6\u8CC7\u6599

    ',3),qt={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Qt=e("\u5B98\u65B9\u6587\u6A94"),Wt={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Xt=e("SPL\u6587\u6A94"),Yt={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},Zt=e("Program Deploys by Justin Starry"),$t={href:"https://hackmd.io/@ironaddicteddog/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},te=e("Solana Starter Kit by Iron Addicted Dog"),ee={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},oe=e("Programming on Solana by Paulx"),ne={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},re=e("An Introduction to the Solana Blockchain by Hana"),se={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},ae=e("Anchor");function de(ie,le){const a=s("RouterLink"),n=s("ExternalLinkIcon");return i(),l(_,null,[p,u,g,t("div",b,[m,t("ul",null,[f,t("li",null,[k,S,P,o(a,{to:"/zh_t/core-concepts/accounts.html"},{default:c(()=>[y]),_:1}),L]),v,t("li",null,[x,t("a",F,[B,o(n)]),R,t("a",A,[w,o(n)])]),t("li",null,[E,t("a",T,[V,o(n)]),C,t("a",I,[M,o(n)]),N]),D])]),j,U,H,t("p",null,[O,t("a",z,[G,o(n)]),J,t("a",K,[q,o(n)])]),t("p",null,[Q,t("a",W,[X,o(n)]),Y]),t("p",null,[Z,t("a",$,[tt,o(n)]),et,t("a",ot,[nt,o(n)]),rt]),st,t("p",null,[at,t("a",dt,[it,o(n)]),lt,t("a",ct,[_t,o(n)]),ht,t("a",pt,[ut,o(n)]),gt]),bt,t("p",null,[mt,t("a",ft,[kt,o(n)]),St]),Pt,t("p",null,[yt,t("a",Lt,[vt,o(n)]),xt]),Ft,t("p",null,[Bt,t("a",Rt,[At,o(n)]),wt]),Et,t("p",null,[Tt,t("a",Vt,[Ct,o(n)]),It,Mt,Nt,Dt,jt]),t("p",null,[Ut,t("a",Ht,[Ot,o(n)]),zt,Gt,Jt]),Kt,t("ul",null,[t("li",null,[t("a",qt,[Qt,o(n)])]),t("li",null,[t("a",Wt,[Xt,o(n)])]),t("li",null,[t("a",Yt,[Zt,o(n)])]),t("li",null,[t("a",$t,[te,o(n)])]),t("li",null,[t("a",ee,[oe,o(n)])]),t("li",null,[t("a",ne,[re,o(n)])]),t("li",null,[t("a",se,[ae,o(n)])])])],64)}var _e=d(h,[["render",de]]);export{_e as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.6d41107a.js b/docs/.vuepress/dist/assets/programs.html.70fa58f4.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.6d41107a.js rename to docs/.vuepress/dist/assets/programs.html.70fa58f4.js index e1bd6b6b3..20145ee9f 100644 --- a/docs/.vuepress/dist/assets/programs.html.6d41107a.js +++ b/docs/.vuepress/dist/assets/programs.html.70fa58f4.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"writing-programs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),s(" Writing Programs")],-1),_=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-transfer-sol-in-a-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-transfer-sol-in-a-program","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 transfer SOL in a program")],-1),y=n("p",null,[s("Solana Program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E48\u0E07 lamports \u0E08\u0E32\u0E01 account \u0E19\u0E36\u0E07\u0E44\u0E1B\u0E2D\u0E35\u0E01 account \u0E19\u0E36\u0E07\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07 '\u0E23\u0E49\u0E2D\u0E07\u0E02\u0E2D' (invoking) \u0E44\u0E1B\u0E17\u0E35\u0E48 System program. \u0E42\u0E14\u0E22\u0E2B\u0E25\u0E31\u0E01\u0E40\u0E1A\u0E37\u0E49\u0E2D\u0E07\u0E15\u0E49\u0E19\u0E01\u0E47\u0E04\u0E37\u0E2D program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E48\u0E07 lamports \u0E08\u0E32\u0E01 account \u0E17\u0E35\u0E48 program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32 "),n("strong",null,"\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07"),s(" \u0E44\u0E1B\u0E17\u0E35\u0E48 account \u0E44\u0E2B\u0E19\u0E01\u0E47\u0E44\u0E14\u0E49")],-1),f=n("p",null,[s("account \u0E02\u0E2D\u0E07\u0E04\u0E19\u0E23\u0E31\u0E1A "),n("em",null,"\u0E44\u0E21\u0E48\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07"),s(" \u0E40\u0E1B\u0E47\u0E19 account \u0E17\u0E35\u0E48 program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"writing-programs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),s(" Writing Programs")],-1),_=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-transfer-sol-in-a-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-transfer-sol-in-a-program","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 transfer SOL in a program")],-1),y=n("p",null,[s("Solana Program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E48\u0E07 lamports \u0E08\u0E32\u0E01 account \u0E19\u0E36\u0E07\u0E44\u0E1B\u0E2D\u0E35\u0E01 account \u0E19\u0E36\u0E07\u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07 '\u0E23\u0E49\u0E2D\u0E07\u0E02\u0E2D' (invoking) \u0E44\u0E1B\u0E17\u0E35\u0E48 System program. \u0E42\u0E14\u0E22\u0E2B\u0E25\u0E31\u0E01\u0E40\u0E1A\u0E37\u0E49\u0E2D\u0E07\u0E15\u0E49\u0E19\u0E01\u0E47\u0E04\u0E37\u0E2D program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2A\u0E48\u0E07 lamports \u0E08\u0E32\u0E01 account \u0E17\u0E35\u0E48 program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32 "),n("strong",null,"\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07"),s(" \u0E44\u0E1B\u0E17\u0E35\u0E48 account \u0E44\u0E2B\u0E19\u0E01\u0E47\u0E44\u0E14\u0E49")],-1),f=n("p",null,[s("account \u0E02\u0E2D\u0E07\u0E04\u0E19\u0E23\u0E31\u0E1A "),n("em",null,"\u0E44\u0E21\u0E48\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07"),s(" \u0E40\u0E1B\u0E47\u0E19 account \u0E17\u0E35\u0E48 program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -81,7 +81,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br")])],-1),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_account_info"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("sysvar_clock_pubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"\u0E41\u0E25\u0E49\u0E27\u0E01\u0E47\u0E25\u0E2D\u0E07\u0E2A\u0E48\u0E07 clock's sysvar public address \u0E14\u0E49\u0E27\u0E22 client",-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"\u0E41\u0E25\u0E49\u0E27\u0E01\u0E47\u0E25\u0E2D\u0E07\u0E2A\u0E48\u0E07 clock's sysvar public address \u0E14\u0E49\u0E27\u0E22 client",-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -155,7 +155,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"77ezihTV6mTh2Uf3ggwbYF2NyGJJ5HHah1GrdowWJVD3"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),B=s(" client instruction \u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E08\u0E30\u0E2D\u0E22\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07 \u0E16\u0E49\u0E32\u0E2D\u0E22\u0E32\u0E01\u0E17\u0E33\u0E04\u0E27\u0E32\u0E21\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07 mint \u0E41\u0E25\u0E30\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 token instructions \u0E43\u0E2B\u0E49\u0E25\u0E2D\u0E07\u0E14\u0E39 code \u0E41\u0E1A\u0E1A\u0E40\u0E15\u0E47\u0E21\u0E43\u0E01\u0E25\u0E49\u0E46 \u0E01\u0E31\u0E19 "),q=n("br",null,null,-1),H=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),H=n("br",null,null,-1),L=s(" client instruction \u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E08\u0E30\u0E2D\u0E22\u0E39\u0E48\u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07 \u0E16\u0E49\u0E32\u0E2D\u0E22\u0E32\u0E01\u0E17\u0E33\u0E04\u0E27\u0E32\u0E21\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07 mint \u0E41\u0E25\u0E30\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 token instructions \u0E43\u0E2B\u0E49\u0E25\u0E2D\u0E07\u0E14\u0E39 code \u0E41\u0E1A\u0E1A\u0E40\u0E15\u0E47\u0E21\u0E43\u0E01\u0E25\u0E49\u0E46 \u0E01\u0E31\u0E19 "),M=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    \u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E21\u0E32\u0E25\u0E2D\u0E07\u0E14\u0E39\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19\u0E01\u0E31\u0E19\u0E1A\u0E49\u0E32\u0E07 \u0E19\u0E31\u0E48\u0E19\u0E01\u0E47\u0E04\u0E37\u0E2D instruction \u0E02\u0E2D\u0E07 System Program's create_account \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E49\u0E32\u0E07\u0E40\u0E25\u0E4A\u0E01\u0E19\u0E49\u0E2D\u0E22 \u0E40\u0E23\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E2A\u0E48\u0E07 token_program \u0E44\u0E1B\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 accounts \u0E43\u0E19 function invoke \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21\u0E21\u0E31\u0E19\u0E08\u0E30\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E22\u0E01\u0E40\u0E27\u0E49\u0E19\u0E2D\u0E22\u0E39\u0E48 \u0E1A\u0E49\u0E32\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 invoking instruction's program_id \u0E43\u0E19\u0E01\u0E23\u0E13\u0E35\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E01\u0E47\u0E04\u0E37\u0E2D program_id \u0E02\u0E2D\u0E07 System Program's ("11111111111111111111111111111111") \u0E17\u0E33\u0E43\u0E2B\u0E49 accounts \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D

    1. payer account \u0E0B\u0E36\u0E48\u0E07\u0E01\u0E47\u0E04\u0E37\u0E2D\u0E04\u0E19\u0E08\u0E48\u0E32\u0E22\u0E04\u0E48\u0E32 rent
    2. account \u0E17\u0E35\u0E48\u0E08\u0E30\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E43\u0E2B\u0E21\u0E48
    3. System Program account
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    \u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E40\u0E23\u0E32\u0E21\u0E32\u0E25\u0E2D\u0E07\u0E14\u0E39\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E2D\u0E37\u0E48\u0E19\u0E01\u0E31\u0E19\u0E1A\u0E49\u0E32\u0E07 \u0E19\u0E31\u0E48\u0E19\u0E01\u0E47\u0E04\u0E37\u0E2D instruction \u0E02\u0E2D\u0E07 System Program's create_account \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E41\u0E15\u0E01\u0E15\u0E48\u0E32\u0E07\u0E01\u0E31\u0E19\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E49\u0E32\u0E07\u0E40\u0E25\u0E4A\u0E01\u0E19\u0E49\u0E2D\u0E22 \u0E40\u0E23\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E2A\u0E48\u0E07 token_program \u0E44\u0E1B\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 accounts \u0E43\u0E19 function invoke \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21\u0E21\u0E31\u0E19\u0E08\u0E30\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E22\u0E01\u0E40\u0E27\u0E49\u0E19\u0E2D\u0E22\u0E39\u0E48 \u0E1A\u0E49\u0E32\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E2A\u0E48\u0E07 invoking instruction's program_id \u0E43\u0E19\u0E01\u0E23\u0E13\u0E35\u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E01\u0E47\u0E04\u0E37\u0E2D program_id \u0E02\u0E2D\u0E07 System Program's ("11111111111111111111111111111111") \u0E17\u0E33\u0E43\u0E2B\u0E49 accounts \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E15\u0E2D\u0E19\u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D

    1. payer account \u0E0B\u0E36\u0E48\u0E07\u0E01\u0E47\u0E04\u0E37\u0E2D\u0E04\u0E19\u0E08\u0E48\u0E32\u0E22\u0E04\u0E48\u0E32 rent
    2. account \u0E17\u0E35\u0E48\u0E08\u0E30\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E36\u0E49\u0E19\u0E21\u0E32\u0E43\u0E2B\u0E21\u0E48
    3. System Program account
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u0E1D\u0E31\u0E48\u0E07 client \u0E08\u0E30\u0E21\u0E35 code \u0E14\u0E31\u0E07\u0E19\u0E35\u0E49",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u0E1D\u0E31\u0E48\u0E07 client \u0E08\u0E30\u0E21\u0E35 code \u0E14\u0E31\u0E07\u0E19\u0E35\u0E49",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),tn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(wn,hn){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),z,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[M]),_:1})]),_:1}),L,B,q,H,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[Z]),preview:a(()=>[nn]),_:1})]),_:1}),sn,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[an]),preview:a(()=>[tn]),_:1})]),_:1}),on,en,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[cn]),preview:a(()=>[pn]),_:1})]),_:1}),ln,un,rn,kn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[bn]),preview:a(()=>[mn]),_:1})]),_:1}),dn,_n,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[yn]),preview:a(()=>[fn]),_:1})]),_:1})],64)}var Pn=r(m,[["render",gn]]);export{Pn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(wn,hn){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),z,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[B]),_:1})]),_:1}),H,L,M,q,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[Z]),preview:a(()=>[nn]),_:1})]),_:1}),sn,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[an]),preview:a(()=>[tn]),_:1})]),_:1}),on,en,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[cn]),preview:a(()=>[pn]),_:1})]),_:1}),ln,un,rn,kn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[bn]),preview:a(()=>[mn]),_:1})]),_:1}),dn,_n,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[yn]),preview:a(()=>[fn]),_:1})]),_:1})],64)}var Pn=r(m,[["render",gn]]);export{Pn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.3c48317e.js b/docs/.vuepress/dist/assets/programs.html.777bc9d0.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.3c48317e.js rename to docs/.vuepress/dist/assets/programs.html.777bc9d0.js index 2f3188ec3..056ee4b59 100644 --- a/docs/.vuepress/dist/assets/programs.html.3c48317e.js +++ b/docs/.vuepress/dist/assets/programs.html.777bc9d0.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"mga-programa-sa-pagsusulat",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mga-programa-sa-pagsusulat","aria-hidden":"true"},"#"),s(" Mga Programa sa Pagsusulat")],-1),g=n("h2",{id:"paano-maglipat-ng-sol-sa-isang-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-maglipat-ng-sol-sa-isang-programa","aria-hidden":"true"},"#"),s(" Paano maglipat ng SOL sa isang programa")],-1),_=n("p",null,[s("Ang iyong Solana Program ay maaaring maglipat ng mga lampor mula sa isang account patungo sa isa pa nang walang 'invoking' ang System program. Ang pangunahing tuntunin ay iyon ang iyong programa ay maaaring maglipat ng mga lampor mula sa anumang account "),n("strong",null,"pagmamay-ari"),s(" ng iyong programa sa anumang account sa lahat.")],-1),y=n("p",null,[s("Ang recipient account "),n("em",null,"ay hindi kailangang"),s(" isang account na pagmamay-ari ng iyong programa.")],-1),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"mga-programa-sa-pagsusulat",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#mga-programa-sa-pagsusulat","aria-hidden":"true"},"#"),s(" Mga Programa sa Pagsusulat")],-1),g=n("h2",{id:"paano-maglipat-ng-sol-sa-isang-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-maglipat-ng-sol-sa-isang-programa","aria-hidden":"true"},"#"),s(" Paano maglipat ng SOL sa isang programa")],-1),_=n("p",null,[s("Ang iyong Solana Program ay maaaring maglipat ng mga lampor mula sa isang account patungo sa isa pa nang walang 'invoking' ang System program. Ang pangunahing tuntunin ay iyon ang iyong programa ay maaaring maglipat ng mga lampor mula sa anumang account "),n("strong",null,"pagmamay-ari"),s(" ng iyong programa sa anumang account sa lahat.")],-1),y=n("p",null,[s("Ang recipient account "),n("em",null,"ay hindi kailangang"),s(" isang account na pagmamay-ari ng iyong programa.")],-1),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -81,7 +81,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br")])],-1),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_account_info"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("sysvar_clock_pubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"Ngayon ipinapasa namin ang sysvar pampublikong address ng orasan sa pamamagitan ng kliyente",-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"Ngayon ipinapasa namin ang sysvar pampublikong address ng orasan sa pamamagitan ng kliyente",-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -155,7 +155,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"77ezihTV6mTh2Uf3ggwbYF2NyGJJ5HHah1GrdowWJVD3"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    Paano gawin ang Cross Program Invocation

    Ang isang cross program invocation, ay simpleng pagtawag sa isa pa pagtuturo ng programa sa loob ng aming programa. Isang pinakamagandang halimbawa ang ilalabas ay ang swap functionality ng Uniswap. Ang Ang kontrata ng UniswapV2Router, ay tumatawag sa kinakailangang lohika sa swap, at tinatawagan ang function ng paglilipat ng kontrata ng ERC20 upang magpalit mula sa isang tao patungo sa isa pa. Sa parehong paraan, kaya natin tumawag sa pagtuturo ng isang programa upang magkaroon ng maraming layunin.

    Tingnan natin ang aming unang halimbawa na kung saan ay ang Paglipat ng SPL Token Program na pagtuturo. Ang kinakailangan ang mga account na kakailanganin namin para mangyari ang paglilipat ay

    1. Ang Source Token Account (Ang account na hawak namin ng aming mga token)
    2. Ang Destination Token Account (Ang account kung saan namin ililipat ang aming mga token)
    3. Ang May-ari ng Source Token Account (Ang aming wallet address kung saan kami pipirmahan)
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    Paano gawin ang Cross Program Invocation

    Ang isang cross program invocation, ay simpleng pagtawag sa isa pa pagtuturo ng programa sa loob ng aming programa. Isang pinakamagandang halimbawa ang ilalabas ay ang swap functionality ng Uniswap. Ang Ang kontrata ng UniswapV2Router, ay tumatawag sa kinakailangang lohika sa swap, at tinatawagan ang function ng paglilipat ng kontrata ng ERC20 upang magpalit mula sa isang tao patungo sa isa pa. Sa parehong paraan, kaya natin tumawag sa pagtuturo ng isang programa upang magkaroon ng maraming layunin.

    Tingnan natin ang aming unang halimbawa na kung saan ay ang Paglipat ng SPL Token Program na pagtuturo. Ang kinakailangan ang mga account na kakailanganin namin para mangyari ang paglilipat ay

    1. Ang Source Token Account (Ang account na hawak namin ng aming mga token)
    2. Ang Destination Token Account (Ang account kung saan namin ililipat ang aming mga token)
    3. Ang May-ari ng Source Token Account (Ang aming wallet address kung saan kami pipirmahan)
    ',4),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),B=s(" Ang kaukulang instruction ng kliyente ay ang mga sumusunod. Para sa pag-alam sa mga instruction sa paggawa ng mint at token, mangyaring sumangguni sa buong code sa malapit. "),H=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),M=n("br",null,null,-1),H=s(" Ang kaukulang instruction ng kliyente ay ang mga sumusunod. Para sa pag-alam sa mga instruction sa paggawa ng mint at token, mangyaring sumangguni sa buong code sa malapit. "),L=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    Ngayon tingnan natin ang isa pang halimbawa, na pagtuturo ng System Program's create_account. Mayroong kaunting pagkakaiba sa pagitan ng nabanggit na pagtuturo at ito. Doon, hindi na namin kinailangang ipasa ang token_program bilang isa sa mga account sa loob ng function na invoke. Gayunpaman, may mga pagbubukod kung saan kailangan mong ipasa ang program_id ng invoking instruction. Sa aming kaso, ito ang magiging program_id ng System Program's. ("1111111111111111111111111111111111"). Kaya ngayon ang mga kinakailangang account ay magiging

    1. Ang account ng nagbabayad na nagpopondo sa upa
    2. Ang account na gagawin
    3. Account ng System Program
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    Ngayon tingnan natin ang isa pang halimbawa, na pagtuturo ng System Program's create_account. Mayroong kaunting pagkakaiba sa pagitan ng nabanggit na pagtuturo at ito. Doon, hindi na namin kinailangang ipasa ang token_program bilang isa sa mga account sa loob ng function na invoke. Gayunpaman, may mga pagbubukod kung saan kailangan mong ipasa ang program_id ng invoking instruction. Sa aming kaso, ito ang magiging program_id ng System Program's. ("1111111111111111111111111111111111"). Kaya ngayon ang mga kinakailangang account ay magiging

    1. Ang account ng nagbabayad na nagpopondo sa upa
    2. Ang account na gagawin
    3. Account ng System Program
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Ang kaukulang client side code ay magiging ganito ang hitsura",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Ang kaukulang client side code ay magiging ganito ang hitsura",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),on=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),on=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,g,_,y,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[f]),_:1})]),_:1}),w,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[M]),_:1})]),_:1}),L,B,H,q,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[on]),_:1})]),_:1}),en,cn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),gn,_n,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[yn]),preview:a(()=>[fn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,g,_,y,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[f]),_:1})]),_:1}),w,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[B]),preview:a(()=>[z]),_:1})]),_:1}),M,H,L,q,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[on]),_:1})]),_:1}),en,cn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),gn,_n,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[yn]),preview:a(()=>[fn]),_:1})]),_:1})],64)}var Tn=r(m,[["render",wn]]);export{Tn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.48b1db94.js b/docs/.vuepress/dist/assets/programs.html.82f73bda.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.48b1db94.js rename to docs/.vuepress/dist/assets/programs.html.82f73bda.js index 8ad330b8d..084132c90 100644 --- a/docs/.vuepress/dist/assets/programs.html.48b1db94.js +++ b/docs/.vuepress/dist/assets/programs.html.82f73bda.js @@ -1,2 +1,2 @@ -import{_ as h,r as c,o as i,c as s,a as t,b as o,w as l,F as d,d as n,e}from"./app.07ce7a66.js";const _={},g=t("h1",{id:"program",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#program","aria-hidden":"true"},"#"),n(" Program")],-1),u=t("p",null,"B\u1EA5t k\u1EF3 l\u1EADp tr\xECnh vi\xEAn n\xE0o \u0111\u1EC1u c\xF3 th\u1EC3 vi\u1EBFt v\xE0 tri\u1EC3n khai m\u1ED9t ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana. Program (hay \u0111\u01B0\u1EE3c bi\u1EBFt \u0111\u1EBFn v\u1EDBi t\xEAn g\u1ECDi l\xE0 Smart Contract tr\xEAn c\xE1c blockchain kh\xE1c) s\u1EBD l\xE0 n\u1EC1n t\u1EA3ng cho c\xE1c ho\u1EA1t \u0111\u1ED9ng on-chain; th\u1EE9 gi\xFAp t\u1EA1o n\xEAn \u0111a s\u1ED1 c\xE1c h\xECnh th\xE1i t\u1EEB DeFi, NFTs cho \u0111\u1EBFn M\u1EA1ng x\xE3 h\u1ED9i v\xE0 Tr\xF2 ch\u01A1i.",-1),m=t("h2",{id:"co-the-ban-chua-biet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#co-the-ban-chua-biet","aria-hidden":"true"},"#"),n(" C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt")],-1),p={class:"custom-container tip"},b=t("p",{class:"custom-container-title"},"Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",-1),k=t("li",null,[n("Program s\u1EBD x\u1EED l\xFD c\xE1c "),t("a",{href:"./transactions"},"instruction"),n(" t\u1EEB ng\u01B0\u1EDDi d\xF9ng v\xE0 c\xE1c Program kh\xE1c")],-1),v=n("T\u1EA5t c\u1EA3 c\xE1c Program \u0111\u1EC1u l\xE0 "),P=t("em",null,"stateless",-1),f=n(": m\u1ECDi d\u1EEF li\u1EC7u m\xE0 Program t\u01B0\u01A1ng t\xE1c \u0111\u1EC1u \u0111\u01B0\u1EE3c l\u01B0u tr\xEAn nh\u1EEFng "),y=n("Account"),L=n(" t\xE1ch bi\u1EC7t v\xE0 \u0111\u01B0\u1EE3c lan truy\u1EC1n th\xF4ng qua c\xE1c instruction"),S=t("li",null,[n("B\u1EA3n th\xE2n Program \u0111\u01B0\u1EE3c l\u01B0u b\xEAn trong nh\u1EEFng Account \u0111\u01B0\u1EE3c \u0111\xE1nh d\u1EA5u l\xE0 "),t("code",null,"executable")],-1),x=n("T\u1EA5t c\u1EA3 Program \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi "),A={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},T=n("BPF Loader"),F=n(" v\xE0 \u0111\u01B0\u1EE3c th\u1EF1c thi b\u1EDFi "),B={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},C=n("Solana Runtime"),R=n("H\u1EA7u h\u1EBFt c\xE1c l\u1EADp tr\xECnh vi\xEAn \u0111\u1EC1u ph\xE1t tri\u1EC3n Program b\u1EB1ng Rust ho\u1EB7c C++, nh\u01B0ng b\u1EA1n v\u1EABn c\xF3 th\u1EC3 l\u1EF1a ch\u1ECDn b\u1EA5t k\u1EF3 ng\xF4n ng\u1EEF l\u1EADp tr\xECnh m\xE0 c\xF3 h\u1ED7 tr\u1EE3 "),N={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=n("BPF"),w=n(" c\u1EE7a "),I={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=n("LLVM"),q=e("
  • M\u1ECDi Program ch\u1EC9 c\xF3 duy nh\u1EA5t m\u1ED9t \u0111i\u1EC3m truy c\u1EADp, n\u01A1i m\xE0 c\xE1c instruction \u0111\u01B0\u1EE3c x\u1EED l\xFD (c\u1EE5 th\u1EC3 l\xE0 process_instruction); c\xE1c tham s\u1ED1 \u0111\u1EA7u v\xE0o lu\xF4n bao g\u1ED3m:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),E=t("h2",{id:"chi-tiet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#chi-tiet","aria-hidden":"true"},"#"),n(" Chi ti\u1EBFt")],-1),H=t("p",null,"Kh\xF4ng gi\u1ED1ng nh\u01B0 h\u1EA5u h\u1EBFt c\xE1c blockchain kh\xE1c, Solana t\xE1ch b\u1EA1ch gi\u1EEFa code v\xE0 d\u1EEF li\u1EC7u. T\u1EA5t c\u1EA3 d\u1EEF li\u1EC7u m\xE0 ch\u01B0\u01A1ng tr\xECnh c\u1EA7n t\u01B0\u01A1ng t\xE1c s\u1EBD \u0111\u01B0\u1EE3c l\u01B0u \u1EDF c\xE1c Account t\xE1ch bi\u1EC7t v\xE0 \u0111\u01B0\u1EE3c lan truy\u1EC1n th\xF4ng d\u01B0\u1EDBi d\u1EA1ng tham chi\u1EBFu th\xF4ng qua c\xE1c instruction. M\xF4 h\xECnh n\xE0y cho ph\xE9p m\u1ED9t ch\u01B0\u01A1ng tr\xECnh chung c\xF3 th\u1EC3 ho\u1EA1t \u0111\u1ED9ng tr\xEAn nhi\u1EC1u ki\u1EC3u Account kh\xE1c nhau m\xE0 kh\xF4ng c\u1EA7n t\xE1i c\u01A1 c\u1EA5u l\u1EA1i ch\u01B0\u01A1ng tr\xECnh. M\u1ED9t v\xED d\u1EE5 hay g\u1EB7p c\u1EE7a m\xF4 h\xECnh n\xE0y l\xE0 Native Programs v\xE0 SPL Programs.",-1),D=t("h3",{id:"native-programs-solana-program-library-spl-programs",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#native-programs-solana-program-library-spl-programs","aria-hidden":"true"},"#"),n(" Native Programs & Solana Program Library (SPL) Programs")],-1),j=n("Solana \u0111\u01B0\u1EE3c trang b\u1ECB s\u1EB5n m\u1ED9t s\u1ED1 Program n\u1EC1n t\u1EA3ng v\xE0 \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 x\xE2y d\u1EF1ng c\xE1c t\u01B0\u01A1ng t\xE1c on-chain. Nh\u1EEFng Program n\xE0y th\u01B0\u1EDDng \u0111\u01B0\u1EE3c chia th\xE0nh "),K={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},z=n("Native Programs"),O=n(" v\xE0 "),U={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},G=n("Solana Program Library (SPL) Programs"),J=n("."),Q=n("Native Programs cung c\u1EA5p c\xE1c ch\u1EE9c n\u0103ng c\u01A1 s\u1EDF v\xE0 c\u1EA7n thi\u1EBFt \u0111\u1EC3 v\u1EADn h\xE0nh c\xE1c validators. Trong c\xE1c Program n\xE0y, ch\u01B0\u01A1ng tr\xECnh \u0111\u01B0\u1EE3c bi\u1EBFt \u0111\u1EBFn r\u1ED9ng r\xE3i nh\u1EA5t l\xE0 "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=n("System Program"),Y=n(". System Program ch\u1ECBu tr\xE1ch nhi\u1EC7m cho vi\u1EC7c c\u1EA5p ph\xE1t Account m\u1EDBi, c\u0169ng nh\u01B0 chuy\u1EC3n SOL gi\u1EEFa c\xE1c Account kh\xE1c nhau."),Z=n("SPL Programs h\u1ED7 tr\u1EE3 m\u1ED9t s\u1ED1 c\xE1c ho\u1EA1t \u0111\u1ED9ng on-chain bao g\u1ED3m t\u1EA1o tokens, trao \u0111\u1ED5i tokens, cho vay tokens, c\u0169ng nh\u01B0 t\u1EA1o stake pools, v\xE0 duy tr\xEC name service. "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},tt=n("SPL Token Program"),nt=n(" c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c g\u1ECDi tr\u1EF1c ti\u1EBFp th\xF4ng qua Solana CLI, ho\u1EB7c b\u1EB1ng c\xE1ch kh\xE1c h\u01A1n nh\u01B0 l\xE0 "),ot={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},rt=n("Associated Token Account Program"),et=n(". Associated Token Account Program th\u01B0\u1EDDng \u0111\u01B0\u1EE3c k\u1EBFt h\u1EE3p v\u1EDBi c\xE1c ch\u01B0\u01A1ng tr\xECnh tu\u1EF3 ch\u1EC9nh \u0111\u1EC3 g\u1ECDi \u0111\u1EBFn SPL Token Program h\u01A1n l\xE0 g\u1ECDi \u0111\u1ED9c l\u1EADp."),ct=t("h3",{id:"viet-mot-program",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#viet-mot-program","aria-hidden":"true"},"#"),n(" Vi\u1EBFt m\u1ED9t Program")],-1),at=n("Program h\u1EA7u nh\u01B0 \u0111\u01B0\u1EE3c ph\xE1t tri\u1EC3n d\u1EF1a tr\xEAn Rust ho\u1EB7c C++. Tuy nhi\xEAn b\u1EA1n v\u1EABn c\xF3 th\u1EC3 ph\xE1t tri\u1EC3n b\u1EB1ng b\u1EA5t k\u1EF3 ng\xF4n ng\u1EEF n\xE0o mi\u1EC5n l\xE0 h\u1ED7 tr\u1EE3 BPF c\u1EE7a LLVM. Hi\u1EC7n t\u1EA1i, l\u1EADp tr\xECnh vi\xEAn c\u0169ng c\xF3 th\u1EC3 chuy\u1EC3n \u0111\u1ED5i smart contract tr\xEAn EVM \u0111\u01B0\u1EE3c vi\u1EBFt b\u1EB1ng Solidity th\xF4ng qua d\u1EF1 \xE1n \u0111\u01B0\u1EE3c kh\u1EDFi x\u01B0\u1EDBng b\u1EDFi "),ht={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},it=n("Neon Labs"),st=n(" v\xE0 "),lt={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},dt=n("Solang"),_t=n("."),gt=e("

    \u0110a s\u1ED1 c\xE1c Program d\u1EF1 tr\xEAn Rust \u0111\u1EC1u b\xE1m s\xE1t ki\u1EBFn tr\xFAc sau:

    T\u1EC7pM\xF4 t\u1EA3
    lib.rs\u0110\u0103ng k\xFD c\xE1c modules
    entrypoint.rs\u0110i\u1EC3m truy c\u1EADp c\u1EE7a Program
    instruction.rsProgram API, tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u \u0111\u1EA7u v\xE0o
    processor.rsLogic c\u1EE7a Program
    state.rsC\xE1c \u0111\u1ED1i t\u01B0\u1EE3ng c\u1EE7a Program, tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 tr\u1EA1ng th\xE1i
    error.rs\u0110\u1ECBnh ngh\u0129a l\u1ED7i c\u1EE7a Program
    ",2),ut=n("Hi\u1EC7n t\u1EA1i, "),mt={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},pt=n("Anchor"),bt=n(" \u0111ang n\u1ED5i l\xEAn nh\u01B0 l\xE0 m\u1ED9t framework ph\u1ED5 bi\u1EBFn gi\xFAp ph\xE1t tri\u1EC3n Program nhanh ch\xF3ng h\u01A1n. Anchor \u0111\u01B0\u1EE3c l\u1EA5y c\u1EA3m h\u1EE9ng nhi\u1EC1u t\u1EEB Ruby on Rails nh\u1EB1m gi\u1EA3m thi\u1EC3u c\xE1c m\u1EABu code l\u1EB7p l\u1EA1i, \u0111\u1ED3ng th\u1EDDi chu\u1EA9n ho\xE1 vi\u1EC7c tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n b\u1EB1ng Rust."),kt=e("

    Program th\u01B0\u1EDDng \u0111\u01B0\u1EE3c ph\xE1t tri\u1EC3n v\xE0 ki\u1EC3m th\u1EED tr\xEAn m\xF4i tr\u01B0\u1EDDng localhost v\xE0 devnet tr\u01B0\u1EDBc khi \u0111\u01B0\u1EE3c tri\u1EC3n khai tr\xEAn testnet ho\u1EB7c mainnet. Solana h\u1ED7 tr\u1EE3 c\xE1c m\xF4i tr\u01B0\u1EDDng sau:

    C\u1EE5m m\xF4i tr\u01B0\u1EDDng\u0110\u01B0\u1EDDng d\u1EABn k\u1EBFt n\u1ED1i RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostPort m\u1EB7c \u0111\u1ECBnh: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),vt=n("Sau khi tri\u1EC3n khai l\xEAn m\u1ED9t m\xF4i tr\u01B0\u1EDDng c\u1EE5 th\u1EC3, ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi c\xE1c Program tr\xEAn on-chain th\xF4ng qua "),Pt={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ft=n("k\u1EBFt n\u1ED1i RPC"),yt=n(" t\u01B0\u01A1ng \u1EE9ng."),Lt=t("h3",{id:"trien-khai-program",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#trien-khai-program","aria-hidden":"true"},"#"),n(" Tri\u1EC3n khai Program")],-1),St=n("L\u1EADp tr\xECnh vi\xEAn c\xF3 th\u1EC3 tri\u1EC3n khai Program c\u1EE7a h\u1ECD th\xF4ng qua "),xt={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},At=n("CLI"),Tt=n(":"),Ft=e(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as h,r as c,o as i,c as s,a as t,b as o,w as l,F as d,d as n,e}from"./app.d411e3b3.js";const _={},g=t("h1",{id:"program",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#program","aria-hidden":"true"},"#"),n(" Program")],-1),u=t("p",null,"B\u1EA5t k\u1EF3 l\u1EADp tr\xECnh vi\xEAn n\xE0o \u0111\u1EC1u c\xF3 th\u1EC3 vi\u1EBFt v\xE0 tri\u1EC3n khai m\u1ED9t ch\u01B0\u01A1ng tr\xECnh tr\xEAn Solana. Program (hay \u0111\u01B0\u1EE3c bi\u1EBFt \u0111\u1EBFn v\u1EDBi t\xEAn g\u1ECDi l\xE0 Smart Contract tr\xEAn c\xE1c blockchain kh\xE1c) s\u1EBD l\xE0 n\u1EC1n t\u1EA3ng cho c\xE1c ho\u1EA1t \u0111\u1ED9ng on-chain; th\u1EE9 gi\xFAp t\u1EA1o n\xEAn \u0111a s\u1ED1 c\xE1c h\xECnh th\xE1i t\u1EEB DeFi, NFTs cho \u0111\u1EBFn M\u1EA1ng x\xE3 h\u1ED9i v\xE0 Tr\xF2 ch\u01A1i.",-1),m=t("h2",{id:"co-the-ban-chua-biet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#co-the-ban-chua-biet","aria-hidden":"true"},"#"),n(" C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt")],-1),p={class:"custom-container tip"},b=t("p",{class:"custom-container-title"},"Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",-1),k=t("li",null,[n("Program s\u1EBD x\u1EED l\xFD c\xE1c "),t("a",{href:"./transactions"},"instruction"),n(" t\u1EEB ng\u01B0\u1EDDi d\xF9ng v\xE0 c\xE1c Program kh\xE1c")],-1),v=n("T\u1EA5t c\u1EA3 c\xE1c Program \u0111\u1EC1u l\xE0 "),P=t("em",null,"stateless",-1),f=n(": m\u1ECDi d\u1EEF li\u1EC7u m\xE0 Program t\u01B0\u01A1ng t\xE1c \u0111\u1EC1u \u0111\u01B0\u1EE3c l\u01B0u tr\xEAn nh\u1EEFng "),y=n("Account"),L=n(" t\xE1ch bi\u1EC7t v\xE0 \u0111\u01B0\u1EE3c lan truy\u1EC1n th\xF4ng qua c\xE1c instruction"),S=t("li",null,[n("B\u1EA3n th\xE2n Program \u0111\u01B0\u1EE3c l\u01B0u b\xEAn trong nh\u1EEFng Account \u0111\u01B0\u1EE3c \u0111\xE1nh d\u1EA5u l\xE0 "),t("code",null,"executable")],-1),x=n("T\u1EA5t c\u1EA3 Program \u0111\u01B0\u1EE3c s\u1EDF h\u1EEFu b\u1EDFi "),A={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},T=n("BPF Loader"),F=n(" v\xE0 \u0111\u01B0\u1EE3c th\u1EF1c thi b\u1EDFi "),B={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},C=n("Solana Runtime"),R=n("H\u1EA7u h\u1EBFt c\xE1c l\u1EADp tr\xECnh vi\xEAn \u0111\u1EC1u ph\xE1t tri\u1EC3n Program b\u1EB1ng Rust ho\u1EB7c C++, nh\u01B0ng b\u1EA1n v\u1EABn c\xF3 th\u1EC3 l\u1EF1a ch\u1ECDn b\u1EA5t k\u1EF3 ng\xF4n ng\u1EEF l\u1EADp tr\xECnh m\xE0 c\xF3 h\u1ED7 tr\u1EE3 "),N={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=n("BPF"),w=n(" c\u1EE7a "),I={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=n("LLVM"),q=e("
  • M\u1ECDi Program ch\u1EC9 c\xF3 duy nh\u1EA5t m\u1ED9t \u0111i\u1EC3m truy c\u1EADp, n\u01A1i m\xE0 c\xE1c instruction \u0111\u01B0\u1EE3c x\u1EED l\xFD (c\u1EE5 th\u1EC3 l\xE0 process_instruction); c\xE1c tham s\u1ED1 \u0111\u1EA7u v\xE0o lu\xF4n bao g\u1ED3m:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),E=t("h2",{id:"chi-tiet",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#chi-tiet","aria-hidden":"true"},"#"),n(" Chi ti\u1EBFt")],-1),H=t("p",null,"Kh\xF4ng gi\u1ED1ng nh\u01B0 h\u1EA5u h\u1EBFt c\xE1c blockchain kh\xE1c, Solana t\xE1ch b\u1EA1ch gi\u1EEFa code v\xE0 d\u1EEF li\u1EC7u. T\u1EA5t c\u1EA3 d\u1EEF li\u1EC7u m\xE0 ch\u01B0\u01A1ng tr\xECnh c\u1EA7n t\u01B0\u01A1ng t\xE1c s\u1EBD \u0111\u01B0\u1EE3c l\u01B0u \u1EDF c\xE1c Account t\xE1ch bi\u1EC7t v\xE0 \u0111\u01B0\u1EE3c lan truy\u1EC1n th\xF4ng d\u01B0\u1EDBi d\u1EA1ng tham chi\u1EBFu th\xF4ng qua c\xE1c instruction. M\xF4 h\xECnh n\xE0y cho ph\xE9p m\u1ED9t ch\u01B0\u01A1ng tr\xECnh chung c\xF3 th\u1EC3 ho\u1EA1t \u0111\u1ED9ng tr\xEAn nhi\u1EC1u ki\u1EC3u Account kh\xE1c nhau m\xE0 kh\xF4ng c\u1EA7n t\xE1i c\u01A1 c\u1EA5u l\u1EA1i ch\u01B0\u01A1ng tr\xECnh. M\u1ED9t v\xED d\u1EE5 hay g\u1EB7p c\u1EE7a m\xF4 h\xECnh n\xE0y l\xE0 Native Programs v\xE0 SPL Programs.",-1),D=t("h3",{id:"native-programs-solana-program-library-spl-programs",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#native-programs-solana-program-library-spl-programs","aria-hidden":"true"},"#"),n(" Native Programs & Solana Program Library (SPL) Programs")],-1),j=n("Solana \u0111\u01B0\u1EE3c trang b\u1ECB s\u1EB5n m\u1ED9t s\u1ED1 Program n\u1EC1n t\u1EA3ng v\xE0 \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 x\xE2y d\u1EF1ng c\xE1c t\u01B0\u01A1ng t\xE1c on-chain. Nh\u1EEFng Program n\xE0y th\u01B0\u1EDDng \u0111\u01B0\u1EE3c chia th\xE0nh "),K={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},z=n("Native Programs"),O=n(" v\xE0 "),U={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},G=n("Solana Program Library (SPL) Programs"),J=n("."),Q=n("Native Programs cung c\u1EA5p c\xE1c ch\u1EE9c n\u0103ng c\u01A1 s\u1EDF v\xE0 c\u1EA7n thi\u1EBFt \u0111\u1EC3 v\u1EADn h\xE0nh c\xE1c validators. Trong c\xE1c Program n\xE0y, ch\u01B0\u01A1ng tr\xECnh \u0111\u01B0\u1EE3c bi\u1EBFt \u0111\u1EBFn r\u1ED9ng r\xE3i nh\u1EA5t l\xE0 "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=n("System Program"),Y=n(". System Program ch\u1ECBu tr\xE1ch nhi\u1EC7m cho vi\u1EC7c c\u1EA5p ph\xE1t Account m\u1EDBi, c\u0169ng nh\u01B0 chuy\u1EC3n SOL gi\u1EEFa c\xE1c Account kh\xE1c nhau."),Z=n("SPL Programs h\u1ED7 tr\u1EE3 m\u1ED9t s\u1ED1 c\xE1c ho\u1EA1t \u0111\u1ED9ng on-chain bao g\u1ED3m t\u1EA1o tokens, trao \u0111\u1ED5i tokens, cho vay tokens, c\u0169ng nh\u01B0 t\u1EA1o stake pools, v\xE0 duy tr\xEC name service. "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},tt=n("SPL Token Program"),nt=n(" c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c g\u1ECDi tr\u1EF1c ti\u1EBFp th\xF4ng qua Solana CLI, ho\u1EB7c b\u1EB1ng c\xE1ch kh\xE1c h\u01A1n nh\u01B0 l\xE0 "),ot={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},rt=n("Associated Token Account Program"),et=n(". Associated Token Account Program th\u01B0\u1EDDng \u0111\u01B0\u1EE3c k\u1EBFt h\u1EE3p v\u1EDBi c\xE1c ch\u01B0\u01A1ng tr\xECnh tu\u1EF3 ch\u1EC9nh \u0111\u1EC3 g\u1ECDi \u0111\u1EBFn SPL Token Program h\u01A1n l\xE0 g\u1ECDi \u0111\u1ED9c l\u1EADp."),ct=t("h3",{id:"viet-mot-program",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#viet-mot-program","aria-hidden":"true"},"#"),n(" Vi\u1EBFt m\u1ED9t Program")],-1),at=n("Program h\u1EA7u nh\u01B0 \u0111\u01B0\u1EE3c ph\xE1t tri\u1EC3n d\u1EF1a tr\xEAn Rust ho\u1EB7c C++. Tuy nhi\xEAn b\u1EA1n v\u1EABn c\xF3 th\u1EC3 ph\xE1t tri\u1EC3n b\u1EB1ng b\u1EA5t k\u1EF3 ng\xF4n ng\u1EEF n\xE0o mi\u1EC5n l\xE0 h\u1ED7 tr\u1EE3 BPF c\u1EE7a LLVM. Hi\u1EC7n t\u1EA1i, l\u1EADp tr\xECnh vi\xEAn c\u0169ng c\xF3 th\u1EC3 chuy\u1EC3n \u0111\u1ED5i smart contract tr\xEAn EVM \u0111\u01B0\u1EE3c vi\u1EBFt b\u1EB1ng Solidity th\xF4ng qua d\u1EF1 \xE1n \u0111\u01B0\u1EE3c kh\u1EDFi x\u01B0\u1EDBng b\u1EDFi "),ht={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},it=n("Neon Labs"),st=n(" v\xE0 "),lt={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},dt=n("Solang"),_t=n("."),gt=e("

    \u0110a s\u1ED1 c\xE1c Program d\u1EF1 tr\xEAn Rust \u0111\u1EC1u b\xE1m s\xE1t ki\u1EBFn tr\xFAc sau:

    T\u1EC7pM\xF4 t\u1EA3
    lib.rs\u0110\u0103ng k\xFD c\xE1c modules
    entrypoint.rs\u0110i\u1EC3m truy c\u1EADp c\u1EE7a Program
    instruction.rsProgram API, tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u \u0111\u1EA7u v\xE0o
    processor.rsLogic c\u1EE7a Program
    state.rsC\xE1c \u0111\u1ED1i t\u01B0\u1EE3ng c\u1EE7a Program, tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 tr\u1EA1ng th\xE1i
    error.rs\u0110\u1ECBnh ngh\u0129a l\u1ED7i c\u1EE7a Program
    ",2),ut=n("Hi\u1EC7n t\u1EA1i, "),mt={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},pt=n("Anchor"),bt=n(" \u0111ang n\u1ED5i l\xEAn nh\u01B0 l\xE0 m\u1ED9t framework ph\u1ED5 bi\u1EBFn gi\xFAp ph\xE1t tri\u1EC3n Program nhanh ch\xF3ng h\u01A1n. Anchor \u0111\u01B0\u1EE3c l\u1EA5y c\u1EA3m h\u1EE9ng nhi\u1EC1u t\u1EEB Ruby on Rails nh\u1EB1m gi\u1EA3m thi\u1EC3u c\xE1c m\u1EABu code l\u1EB7p l\u1EA1i, \u0111\u1ED3ng th\u1EDDi chu\u1EA9n ho\xE1 vi\u1EC7c tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u trong qu\xE1 tr\xECnh ph\xE1t tri\u1EC3n b\u1EB1ng Rust."),kt=e("

    Program th\u01B0\u1EDDng \u0111\u01B0\u1EE3c ph\xE1t tri\u1EC3n v\xE0 ki\u1EC3m th\u1EED tr\xEAn m\xF4i tr\u01B0\u1EDDng localhost v\xE0 devnet tr\u01B0\u1EDBc khi \u0111\u01B0\u1EE3c tri\u1EC3n khai tr\xEAn testnet ho\u1EB7c mainnet. Solana h\u1ED7 tr\u1EE3 c\xE1c m\xF4i tr\u01B0\u1EDDng sau:

    C\u1EE5m m\xF4i tr\u01B0\u1EDDng\u0110\u01B0\u1EDDng d\u1EABn k\u1EBFt n\u1ED1i RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostPort m\u1EB7c \u0111\u1ECBnh: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),vt=n("Sau khi tri\u1EC3n khai l\xEAn m\u1ED9t m\xF4i tr\u01B0\u1EDDng c\u1EE5 th\u1EC3, ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi c\xE1c Program tr\xEAn on-chain th\xF4ng qua "),Pt={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ft=n("k\u1EBFt n\u1ED1i RPC"),yt=n(" t\u01B0\u01A1ng \u1EE9ng."),Lt=t("h3",{id:"trien-khai-program",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#trien-khai-program","aria-hidden":"true"},"#"),n(" Tri\u1EC3n khai Program")],-1),St=n("L\u1EADp tr\xECnh vi\xEAn c\xF3 th\u1EC3 tri\u1EC3n khai Program c\u1EE7a h\u1ECD th\xF4ng qua "),xt={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},At=n("CLI"),Tt=n(":"),Ft=e(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Bt=n("Khi m\u1ED9t Program \u0111\u01B0\u1EE3c tri\u1EC3n khai, n\xF3 s\u1EBD \u0111\u01B0\u1EE3c bi\xEAn d\u1ECBch th\xE0nh m\u1ED9t "),Ct={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Rt=n("ELF shared object"),Nt=n(" (c\xF3 ch\u1EE9a BPF bytecode) v\xE0 \u0111\u01B0\u1EE3c t\u1EA3i l\xEAn m\u1EA1ng Solana. Program \u0111\u01B0\u1EE3c l\u01B0u tr\u1EEF trong Account (gi\u1ED1ng nh\u01B0 h\u1EA5u h\u1EBFt m\u1ECDi th\u1EE9 tr\xEAn Solana), ngo\u1EA1i tr\u1EEB vi\u1EC7c \u0111\u01B0\u1EE3c \u0111\xE1nh d\u1EA5u l\xE0 "),Mt=t("code",null,"executable",-1),wt=n(" v\xE0 "),It=t("code",null,"owner",-1),Vt=n(" \u0111\u01B0\u1EE3c g\xE1n cho BPF Loader. \u0110\u1ECBa ch\u1EC9 c\u1EE7a Account n\xE0y s\u1EBD \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 "),qt=t("code",null,"program_id",-1),Et=n(" v\xE0 \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng nh\u01B0ng l\xE0 tham chi\u1EBFu cho Program trong c\xE1c giao d\u1ECBch \u1EDF t\u01B0\u01A1ng lai."),Ht=n("Solana h\u1ED7 tr\u1EE3 \u0111a d\u1EA1ng c\xE1c BPF Loader v\u1EDBi phi\xEAn b\u1EA3n m\u1EDBi nh\u1EA5t l\xE0 "),Dt={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},jt=n("Upgradable BPF Loader"),Kt=n(". BPF Loader ch\u1ECBu tr\xE1ch nhi\u1EC7m cho vi\u1EC7c \u0111i\u1EC1u h\xE0nh c\xE1c Account c\u1EE7a Program v\xE0 cho ph\xE9p ng\u01B0\u1EDDi d\xF9ng t\u01B0\u01A1ng t\xE1c b\u1EB1ng "),zt=t("code",null,"program_id",-1),Ot=n(". T\u1EA5t c\u1EA3 Program ch\u1EC9 c\xF3 m\u1ED9t \u0111i\u1EC3m truy c\u1EADp duy nh\u1EA5t, n\u01A1i m\xE0 c\xE1c instruction s\u1EBD \u0111\u01B0\u1EE3c ghi nh\u1EADn v\xE0 x\u1EED l\xFD (c\u1EE5 th\u1EC3 l\xE0 "),Ut=t("code",null,"process_instruction",-1),Gt=n(") v\u1EDBi c\xE1c tham s\u1ED1 bao g\u1ED3m:"),Jt=e('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    M\u1ED7i khi \u0111\u01B0\u1EE3c g\u1ECDi, Program s\u1EBD \u0111\u01B0\u1EE3c th\u1EF1c thi b\u1EDFi Solana Runtime.

    C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c

    ',3),Qt={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Wt=n("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),Xt={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Yt=n("T\xE0i li\u1EC7u SPL"),Zt={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},$t=n("Program Deploys by Justin Starry"),tn={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},nn=n("Solana Starter Kit by Iron Addicted Dog"),on={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},rn=n("Programming on Solana by Paulx"),en={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},cn=n("An Introduction to the Solana Blockchain by Hana"),an={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},hn=n("Anchor");function sn(ln,dn){const a=c("RouterLink"),r=c("ExternalLinkIcon");return i(),s(d,null,[g,u,m,t("div",p,[b,t("ul",null,[k,t("li",null,[v,P,f,o(a,{to:"/vi/core-concepts/accounts.html"},{default:l(()=>[y]),_:1}),L]),S,t("li",null,[x,t("a",A,[T,o(r)]),F,t("a",B,[C,o(r)])]),t("li",null,[R,t("a",N,[M,o(r)]),w,t("a",I,[V,o(r)])]),q])]),E,H,D,t("p",null,[j,t("a",K,[z,o(r)]),O,t("a",U,[G,o(r)]),J]),t("p",null,[Q,t("a",W,[X,o(r)]),Y]),t("p",null,[Z,t("a",$,[tt,o(r)]),nt,t("a",ot,[rt,o(r)]),et]),ct,t("p",null,[at,t("a",ht,[it,o(r)]),st,t("a",lt,[dt,o(r)]),_t]),gt,t("p",null,[ut,t("a",mt,[pt,o(r)]),bt]),kt,t("p",null,[vt,t("a",Pt,[ft,o(r)]),yt]),Lt,t("p",null,[St,t("a",xt,[At,o(r)]),Tt]),Ft,t("p",null,[Bt,t("a",Ct,[Rt,o(r)]),Nt,Mt,wt,It,Vt,qt,Et]),t("p",null,[Ht,t("a",Dt,[jt,o(r)]),Kt,zt,Ot,Ut,Gt]),Jt,t("ul",null,[t("li",null,[t("a",Qt,[Wt,o(r)])]),t("li",null,[t("a",Xt,[Yt,o(r)])]),t("li",null,[t("a",Zt,[$t,o(r)])]),t("li",null,[t("a",tn,[nn,o(r)])]),t("li",null,[t("a",on,[rn,o(r)])]),t("li",null,[t("a",en,[cn,o(r)])]),t("li",null,[t("a",an,[hn,o(r)])])])],64)}var gn=h(_,[["render",sn]]);export{gn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.9cdb4de3.js b/docs/.vuepress/dist/assets/programs.html.8726b1de.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.9cdb4de3.js rename to docs/.vuepress/dist/assets/programs.html.8726b1de.js index 45cda7d96..1c8145d39 100644 --- a/docs/.vuepress/dist/assets/programs.html.9cdb4de3.js +++ b/docs/.vuepress/dist/assets/programs.html.8726b1de.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"writing-programs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),s(" Writing Programs")],-1),_=n("h2",{id:"how-to-transfer-sol-in-a-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-transfer-sol-in-a-program","aria-hidden":"true"},"#"),s(" How to transfer SOL in a program")],-1),y=n("p",null,[s("\uB2F9\uC2E0\uC758 Solana Program\uC740 System Program\uC744 \uD638\uCD9C\uD558\uC9C0 \uC54A\uACE0 \uD558\uB098\uC758 Account\uC5D0\uC11C \uB2E4\uB978 Account\uB85C \uC804\uC1A1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD575\uC2EC\uC801\uC778 \uADDC\uCE59\uC740 \uB2F9\uC2E0\uC758 Program\uC774 "),n("strong",null,"\uC18C\uC720\uD55C"),s(" \uBAA8\uB4E0 Account\uC5D0\uC11C \uB2E4\uB978 Account\uB4E4\uB85C lamports\uB97C \uBCF4\uB0BC \uC218 \uC788\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4.")],-1),f=n("p",null,"\uC804\uC1A1\uC744 \uBC1B\uB294 Account\uB294 \uB2F9\uC2E0\uC774 Program\uC774 \uC18C\uC720\uD55C Account\uAC00 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.",-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"writing-programs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),s(" Writing Programs")],-1),_=n("h2",{id:"how-to-transfer-sol-in-a-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-transfer-sol-in-a-program","aria-hidden":"true"},"#"),s(" How to transfer SOL in a program")],-1),y=n("p",null,[s("\uB2F9\uC2E0\uC758 Solana Program\uC740 System Program\uC744 \uD638\uCD9C\uD558\uC9C0 \uC54A\uACE0 \uD558\uB098\uC758 Account\uC5D0\uC11C \uB2E4\uB978 Account\uB85C \uC804\uC1A1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD575\uC2EC\uC801\uC778 \uADDC\uCE59\uC740 \uB2F9\uC2E0\uC758 Program\uC774 "),n("strong",null,"\uC18C\uC720\uD55C"),s(" \uBAA8\uB4E0 Account\uC5D0\uC11C \uB2E4\uB978 Account\uB4E4\uB85C lamports\uB97C \uBCF4\uB0BC \uC218 \uC788\uB2E4\uB294 \uAC83\uC785\uB2C8\uB2E4.")],-1),f=n("p",null,"\uC804\uC1A1\uC744 \uBC1B\uB294 Account\uB294 \uB2F9\uC2E0\uC774 Program\uC774 \uC18C\uC720\uD55C Account\uAC00 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4.",-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -31,7 +31,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br")])],-1),w=p('

    How to get clock in a program

    2\uAC00\uC9C0 \uBC29\uBC95\uC73C\uB85C clock\uC744 \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    1. Instruction\uC5D0 SYSVAR_CLOCK_PUBKEY\uC744 \uB118\uAE30\uB294 \uAC83
    2. Instruction \uC548\uC5D0\uC11C \uC9C1\uC811 Clock\uC5D0 \uC811\uADFC\uD558\uB294 \uAC83

    \uC5B4\uB5A4 \uB808\uAC70\uC2DC Program\uB4E4\uC740 Account\uB85C \uC5EC\uC804\uD788 SYSVAR_CLOCK_PUBKEY\uB97C \uAE30\uB300\uD558\uAE30 \uB54C\uBB38\uC5D0, \uB450 \uAC00\uC9C0 \uBC29\uBC95 \uBAA8\uB450 \uC54C\uC544\uB450\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.

    Passing Clock as an account inside an instruction

    \uCD08\uAE30\uD654\uB97C \uC704\uD55C \uD558\uB098\uC758 Account\uC640 sysvar pubkey\uB97C \uBC1B\uB294 \uD558\uB098\uC758 Instruction\uC744 \uB9CC\uB4E4\uC5B4 \uBD05\uC2DC\uB2E4.

    ',6),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br")])],-1),w=p('

    How to get clock in a program

    2\uAC00\uC9C0 \uBC29\uBC95\uC73C\uB85C clock\uC744 \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    1. Instruction\uC5D0 SYSVAR_CLOCK_PUBKEY\uC744 \uB118\uAE30\uB294 \uAC83
    2. Instruction \uC548\uC5D0\uC11C \uC9C1\uC811 Clock\uC5D0 \uC811\uADFC\uD558\uB294 \uAC83

    \uC5B4\uB5A4 \uB808\uAC70\uC2DC Program\uB4E4\uC740 Account\uB85C \uC5EC\uC804\uD788 SYSVAR_CLOCK_PUBKEY\uB97C \uAE30\uB300\uD558\uAE30 \uB54C\uBB38\uC5D0, \uB450 \uAC00\uC9C0 \uBC29\uBC95 \uBAA8\uB450 \uC54C\uC544\uB450\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.

    Passing Clock as an account inside an instruction

    \uCD08\uAE30\uD654\uB97C \uC704\uD55C \uD558\uB098\uC758 Account\uC640 sysvar pubkey\uB97C \uBC1B\uB294 \uD558\uB098\uC758 Instruction\uC744 \uB9CC\uB4E4\uC5B4 \uBD05\uC2DC\uB2E4.

    ',6),h=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("clock"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},","),s(` @@ -79,7 +79,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br")])],-1),h=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_account_info"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("sysvar_clock_pubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br")])],-1),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_account_info"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("sysvar_clock_pubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"\uC774\uC81C Cient\uB97C \uD1B5\uD574 clock\uC758 sysvar public address\uB97C \uBCF4\uB0C5\uB2C8\uB2E4.",-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),H=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),H=s(" \uB300\uC751\uB418\uB294 Client Instruction\uC740 \uC544\uB798 \uC788\uC2B5\uB2C8\uB2E4. mint\uC640 token \uC0DD\uC131 Instruction\uC744 \uC54C\uACE0 \uC2F6\uB2E4\uBA74, \uADFC\uCC98\uC5D0 \uC788\uB294 \uC804\uCCB4 \uCF54\uB4DC\uB97C \uCC38\uC870\uD558\uC138\uC694. "),B=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),B=n("br",null,null,-1),L=s(" \uB300\uC751\uB418\uB294 Client Instruction\uC740 \uC544\uB798 \uC788\uC2B5\uB2C8\uB2E4. mint\uC640 token \uC0DD\uC131 Instruction\uC744 \uC54C\uACE0 \uC2F6\uB2E4\uBA74, \uADFC\uCC98\uC5D0 \uC788\uB294 \uC804\uCCB4 \uCF54\uB4DC\uB97C \uCC38\uC870\uD558\uC138\uC694. "),M=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    \uC774\uC81C \uB610 \uB2E4\uB978 System Program's create_account Insctuction \uC608\uC81C\uB97C \uC0B4\uD3B4\uBD05\uC2DC\uB2E4. \uC704\uC5D0 \uC5B8\uAE09\uD55C Instruction\uACFC \uC774\uAC83\uC740 \uC57D\uAC04\uC758 \uCC28\uC774\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 invoke \uD568\uC218 \uC548\uC5D0 \uC788\uB294 Account\uB4E4 \uC911 \uD558\uB098\uB85C token_program\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB7EC\uB098, \uD638\uCD9C\uD558\uB294 Instruction\uC740 program_id\uB97C \uBCF4\uB0B4\uB3C4\uB85D \uC694\uAD6C\uBC1B\uB294 \uC608\uC678 \uCF00\uC774\uC2A4\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uC758 \uACBD\uC6B0 System Program's program_id("11111111111111111111111111111111") \uC785\uB2C8\uB2E4. \uADF8\uB798\uC11C \uC774\uC81C \uD544\uC694\uD55C Account\uB4E4\uC740 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4: ``

    1. rent\uB97C \uC9C0\uBD88\uD558\uB294 payer Account
    2. \uC0DD\uC131\uB420 Account
    3. System Program Account
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    \uC774\uC81C \uB610 \uB2E4\uB978 System Program's create_account Insctuction \uC608\uC81C\uB97C \uC0B4\uD3B4\uBD05\uC2DC\uB2E4. \uC704\uC5D0 \uC5B8\uAE09\uD55C Instruction\uACFC \uC774\uAC83\uC740 \uC57D\uAC04\uC758 \uCC28\uC774\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uB294 invoke \uD568\uC218 \uC548\uC5D0 \uC788\uB294 Account\uB4E4 \uC911 \uD558\uB098\uB85C token_program\uC744 \uBCF4\uB0B4\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4. \uADF8\uB7EC\uB098, \uD638\uCD9C\uD558\uB294 Instruction\uC740 program_id\uB97C \uBCF4\uB0B4\uB3C4\uB85D \uC694\uAD6C\uBC1B\uB294 \uC608\uC678 \uCF00\uC774\uC2A4\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC6B0\uB9AC\uC758 \uACBD\uC6B0 System Program's program_id("11111111111111111111111111111111") \uC785\uB2C8\uB2E4. \uADF8\uB798\uC11C \uC774\uC81C \uD544\uC694\uD55C Account\uB4E4\uC740 \uC544\uB798\uC640 \uAC19\uC2B5\uB2C8\uB2E4: ``

    1. rent\uB97C \uC9C0\uBD88\uD558\uB294 payer Account
    2. \uC0DD\uC131\uB420 Account
    3. System Program Account
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Client \uC0AC\uC774\uB4DC \uCF54\uB4DC\uB294 \uC544\uB798\uCC98\uB7FC \uBCF4\uC77C \uAC83\uC785\uB2C8\uB2E4.",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Client \uC0AC\uC774\uB4DC \uCF54\uB4DC\uB294 \uC544\uB798\uCC98\uB7FC \uBCF4\uC77C \uAC83\uC785\uB2C8\uB2E4.",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),on=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),on=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(An,hn){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[A]),preview:a(()=>[h]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[C]),_:1})]),_:1}),v,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[M]),_:1})]),_:1}),L,H,B,q,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[on]),_:1})]),_:1}),en,cn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[C]),_:1})]),_:1}),v,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[H]),_:1})]),_:1}),B,L,M,q,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[on]),_:1})]),_:1}),en,cn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.90aa36af.js b/docs/.vuepress/dist/assets/programs.html.8b269692.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.90aa36af.js rename to docs/.vuepress/dist/assets/programs.html.8b269692.js index 72a94f0d6..7181ce97b 100644 --- a/docs/.vuepress/dist/assets/programs.html.90aa36af.js +++ b/docs/.vuepress/dist/assets/programs.html.8b269692.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"escrevendo-programas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#escrevendo-programas","aria-hidden":"true"},"#"),s(" Escrevendo Programas")],-1),_=n("h2",{id:"como-transferir-sol-em-um-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-transferir-sol-em-um-programa","aria-hidden":"true"},"#"),s(" Como transferir SOL em um programa")],-1),y=n("p",null,"Seu programa Solana pode transferir lamports de uma conta para outra sem 'invocar' o programa do Sistema. A regra fundamental \xE9 que seu programa pode transferir lamports de qualquer conta possu\xEDda pelo seu programa para qualquer outra conta.",-1),f=n("p",null,[s("A conta receptora "),n("em",null,"n\xE3o precisa ser"),s(" uma conta possu\xEDda pelo seu programa.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"escrevendo-programas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#escrevendo-programas","aria-hidden":"true"},"#"),s(" Escrevendo Programas")],-1),_=n("h2",{id:"como-transferir-sol-em-um-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-transferir-sol-em-um-programa","aria-hidden":"true"},"#"),s(" Como transferir SOL em um programa")],-1),y=n("p",null,"Seu programa Solana pode transferir lamports de uma conta para outra sem 'invocar' o programa do Sistema. A regra fundamental \xE9 que seu programa pode transferir lamports de qualquer conta possu\xEDda pelo seu programa para qualquer outra conta.",-1),f=n("p",null,[s("A conta receptora "),n("em",null,"n\xE3o precisa ser"),s(" uma conta possu\xEDda pelo seu programa.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -235,7 +235,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),S=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),x=n("p",null,"A instru\xE7\xE3o do lado do cliente agora s\xF3 precisa passar as contas de estado e de pagamento.",-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),C=n("p",null,"A instru\xE7\xE3o do lado do cliente agora s\xF3 precisa passar as contas de estado e de pagamento.",-1),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),U=p('

    Como fazer uma Invoca\xE7\xE3o de Programas Cruzados

    Uma invoca\xE7\xE3o de programas cruzados, em poucas palavras, \xE9 chamar a instru\xE7\xE3o de outro programa dentro do nosso programa. Um dos melhores exemplos \xE9 a funcionalidade de swap, ou troca, da Uniswap. O contrato UniswapV2Router chama a l\xF3gica necess\xE1ria para a troca e chama a fun\xE7\xE3o de transfer\xEAncia do contrato ERC20 para trocar de uma pessoa para outra. Da mesma forma, podemos chamar a instru\xE7\xE3o de um programa para ter uma infinidade de prop\xF3sitos.

    Vamos dar uma olhada em nosso primeiro exemplo, que \xE9 a instru\xE7\xE3o de transfer\xEAncia do programa de tokens SPL (SPL Token Program's transfer). As contas necess\xE1rias para que ocorra uma transfer\xEAncia s\xE3o:

    1. A conta de token de origem (a conta na qual estamos mantendo nossos tokens)
    2. A conta de token de destino (a conta para a qual estaremos transferindo nossos tokens)
    3. O titular da conta de token de origem (nosso endere\xE7o de carteira pelo qual estar\xEDamos assinando)
    ',4),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),U=p('

    Como fazer uma Invoca\xE7\xE3o de Programas Cruzados

    Uma invoca\xE7\xE3o de programas cruzados, em poucas palavras, \xE9 chamar a instru\xE7\xE3o de outro programa dentro do nosso programa. Um dos melhores exemplos \xE9 a funcionalidade de swap, ou troca, da Uniswap. O contrato UniswapV2Router chama a l\xF3gica necess\xE1ria para a troca e chama a fun\xE7\xE3o de transfer\xEAncia do contrato ERC20 para trocar de uma pessoa para outra. Da mesma forma, podemos chamar a instru\xE7\xE3o de um programa para ter uma infinidade de prop\xF3sitos.

    Vamos dar uma olhada em nosso primeiro exemplo, que \xE9 a instru\xE7\xE3o de transfer\xEAncia do programa de tokens SPL (SPL Token Program's transfer). As contas necess\xE1rias para que ocorra uma transfer\xEAncia s\xE3o:

    1. A conta de token de origem (a conta na qual estamos mantendo nossos tokens)
    2. A conta de token de destino (a conta para a qual estaremos transferindo nossos tokens)
    3. O titular da conta de token de origem (nosso endere\xE7o de carteira pelo qual estar\xEDamos assinando)
    ',4),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),M=n("br",null,null,-1),L=s(" A instru\xE7\xE3o do lado do cliente correspondente seria a seguinte. Para saber as instru\xE7\xF5es de cunhagem e cria\xE7\xE3o de tokens, consulte o c\xF3digo completo nas proximidades. "),B=n("br",null,null,-1),H=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),B=n("br",null,null,-1),H=s(" A instru\xE7\xE3o do lado do cliente correspondente seria a seguinte. Para saber as instru\xE7\xF5es de cunhagem e cria\xE7\xE3o de tokens, consulte o c\xF3digo completo nas proximidades. "),L=n("br",null,null,-1),M=n("br",null,null,-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"O c\xF3digo do lado do cliente correspondente ficar\xE1 assim:",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"O c\xF3digo do lado do cliente correspondente ficar\xE1 assim:",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[q]),_:1})]),_:1}),M,L,B,H,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[q]),preview:a(()=>[Y]),_:1})]),_:1}),B,H,L,M,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[V]),preview:a(()=>[G]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.f73d3347.js b/docs/.vuepress/dist/assets/programs.html.933f8e90.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.f73d3347.js rename to docs/.vuepress/dist/assets/programs.html.933f8e90.js index cf98b65af..211f69b1b 100644 --- a/docs/.vuepress/dist/assets/programs.html.f73d3347.js +++ b/docs/.vuepress/dist/assets/programs.html.933f8e90.js @@ -1,2 +1,2 @@ -import{_ as d,r as t,o as i,c as l,a as e,b as a,w as c,F as p,d as o,e as r}from"./app.07ce7a66.js";const _={},h=e("h1",{id:"programas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programas","aria-hidden":"true"},"#"),o(" Programas")],-1),u=e("p",null,"Cualquier desarrollador puede escribir e implementar programas en la cadena de bloques de Solana. Los programas (conocidos como contratos inteligentes en otros protocolos) sirven como base para la actividad dentro de la cadena de bloques, potenciando desde DeFi y NFTs hasta redes sociales y juegos.",-1),m=e("h2",{id:"hechos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),o(" Hechos")],-1),g={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Hoja de hechos",-1),f=e("li",null,[o("Los programas procesan "),e("a",{href:"./transactions"},"instrucciones"),o(" de otros programas y de usuarios finales")],-1),k=o("Todos los programas son "),v=e("em",null,"stateless",-1),y=o(" (sin estado): Los datos con los que interact\xFAan son almacenados en "),L=o("cuentas"),P=o(" que son enviadas al programa en instrucciones"),q=e("li",null,[o("Los mismos programas son almacenadas en cuentas marcadas como "),e("code",null,"executable"),o(" (ejecutables)")],-1),x=o("El due\xF1o de todos los programas es "),S={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},F=o("BPF Loader"),E=o(" y es ejectuado por el "),R={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},j=o("Runtime de Solana"),B=o("Los programadores comunmente utilizan Rust y C++ para escribir programas, pero pueden elegir cualquier lenguaje que compile con el backend de "),C={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},T=o("BPF"),z=o(" para "),A={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=o("LLVM"),w=r("
  • Todos los programas tienen un punto \xFAnico de entrada donde se procesan las instrucciones (i.e. process_instruction); los par\xE1metros siempre incluyen:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),I=e("h2",{id:"un-vistazo-mas-profundo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#un-vistazo-mas-profundo","aria-hidden":"true"},"#"),o(" Un vistazo m\xE1s profundo")],-1),U=e("p",null,"A diferencia de la mayor\xEDa de cadenas de bloques, Solana separa completamente el c\xF3digo de los datos. Todos los datos con los que interact\xFAan los programas se almacenan en cuentas separadas y se env\xEDan a trav\xE9s de instrucciones. Este modelo permite que un \xFAnico programa gen\xE9rico funcione en varias cuentas sin necesidad de implementaciones adicionales. Se ven ejemplos comunes de este patr\xF3n en los programas nativos y SPL.",-1),V=e("h3",{id:"programas-nativos-la-libreria-de-programas-de-solana-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programas-nativos-la-libreria-de-programas-de-solana-spl","aria-hidden":"true"},"#"),o(" Programas nativos & La librer\xEDa de Programas de Solana (SPL)")],-1),M=o("Solana viene equipado con programas que sirven como bloques de construcci\xF3n para interactuar con la cadena de bloques. Estos programas est\xE1n dividos en "),N={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},H=o("Programas nativos"),O=o(" y "),G={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},J=o("Programas de la librer\xEDa de programas (SPL)"),K=o("."),Q=o("Los programas nativos brindan la funcionalidad base que es requerida para operar validadores. Entre estos programas el m\xE1s conocido es el "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=o("Programa del sistema (System Program)"),Y=o(" que es responsable de administrar las cuentas y transferir SOL."),Z=o("Los programas de la librer\xEDa de programas soportan otras actividades dentro de la cadena de bloques como crear tokens, intercambiarlos, prestar tokens, as\xED como generar pools de staking y mantener el servicio de nombres dentro de la cadena de bloques. El "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ee=o("Programa de Token (SPL Token Program)"),oe=o(" puede ser invocado directamente desde el CLI (Command Line Interface), mientras que otros como el "),ae={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},se=o("Programa de cuentas asociadas a token (Associated Token Account Program)"),re=o(" son usados dentro de otros programas."),te=e("h3",{id:"escribiendo-programas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#escribiendo-programas","aria-hidden":"true"},"#"),o(" Escribiendo programas")],-1),ne=o("Los Programas est\xE1n escritos comunmente en Rust o C++, pero pueden ser desarrollado con cualquier lenguaje que compile al backend BPF de LLVM. Iniciativas recientes de "),de={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ie=o("Neon Labs"),le=o(" y "),ce={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},pe=o("Solang"),_e=o(" habilitan la compatibilidad con "),he={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ue=o("EVM"),me=o(" para permitir a desarrolladores escribir programas con Solidity."),ge=r("

    La mayor\xEDa de programas de Rust siguen la siguiente arquitectura:

    ArcguviDescripci\xF3n
    lib.rsRegistro de m\xF3dulos
    entrypoint.rsPunto de entrada para el programa
    instruction.rsAPI del programa, deserializa las instrucciones
    processor.rsL\xF3gica del programa
    state.rsObjetos del programa, deserializa el estado
    error.rsErrores espec\xEDficos del programa
    ",2),be=o("Recientemente, "),fe={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},ke=o("Anchor"),ve=o(" se ha convertido en el framework m\xE1s popular para desarrollar programas. Anchor es un framework que reduce el boilerplate y facilita la deserializaci\xF3n para los programas desarrollados en Rust."),ye=r("

    Los programas normalmente son desarrollados y testeados en los entornos Localhost y Devnet antes de ser desplegados a Testnet y Mainnet. Solana soporta los siguientes entornos:

    Entorno del clusterURL de conexi\xF3n RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),Le=o("Una vez desplegado a un entorno, los clientes pueden interactuar con el programa dentro de la cadena de bloques utilizando "),Pe={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},qe=o("Conexiones RPC"),xe=o(" apuntando al cluster correspondiente."),Se=e("h3",{id:"desplegando-programas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#desplegando-programas","aria-hidden":"true"},"#"),o(" Desplegando Programas")],-1),Fe=o("Los desarrolladores pueden desplegar sus programas utilizando el "),Ee={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Re=o("CLI"),je=o(":"),Be=r(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as d,r as t,o as i,c as l,a as e,b as a,w as c,F as p,d as o,e as r}from"./app.d411e3b3.js";const _={},h=e("h1",{id:"programas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programas","aria-hidden":"true"},"#"),o(" Programas")],-1),u=e("p",null,"Cualquier desarrollador puede escribir e implementar programas en la cadena de bloques de Solana. Los programas (conocidos como contratos inteligentes en otros protocolos) sirven como base para la actividad dentro de la cadena de bloques, potenciando desde DeFi y NFTs hasta redes sociales y juegos.",-1),m=e("h2",{id:"hechos",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#hechos","aria-hidden":"true"},"#"),o(" Hechos")],-1),g={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Hoja de hechos",-1),f=e("li",null,[o("Los programas procesan "),e("a",{href:"./transactions"},"instrucciones"),o(" de otros programas y de usuarios finales")],-1),k=o("Todos los programas son "),v=e("em",null,"stateless",-1),y=o(" (sin estado): Los datos con los que interact\xFAan son almacenados en "),L=o("cuentas"),P=o(" que son enviadas al programa en instrucciones"),q=e("li",null,[o("Los mismos programas son almacenadas en cuentas marcadas como "),e("code",null,"executable"),o(" (ejecutables)")],-1),x=o("El due\xF1o de todos los programas es "),S={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},F=o("BPF Loader"),E=o(" y es ejectuado por el "),R={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},j=o("Runtime de Solana"),B=o("Los programadores comunmente utilizan Rust y C++ para escribir programas, pero pueden elegir cualquier lenguaje que compile con el backend de "),C={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},T=o("BPF"),z=o(" para "),A={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=o("LLVM"),w=r("
  • Todos los programas tienen un punto \xFAnico de entrada donde se procesan las instrucciones (i.e. process_instruction); los par\xE1metros siempre incluyen:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),I=e("h2",{id:"un-vistazo-mas-profundo",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#un-vistazo-mas-profundo","aria-hidden":"true"},"#"),o(" Un vistazo m\xE1s profundo")],-1),U=e("p",null,"A diferencia de la mayor\xEDa de cadenas de bloques, Solana separa completamente el c\xF3digo de los datos. Todos los datos con los que interact\xFAan los programas se almacenan en cuentas separadas y se env\xEDan a trav\xE9s de instrucciones. Este modelo permite que un \xFAnico programa gen\xE9rico funcione en varias cuentas sin necesidad de implementaciones adicionales. Se ven ejemplos comunes de este patr\xF3n en los programas nativos y SPL.",-1),V=e("h3",{id:"programas-nativos-la-libreria-de-programas-de-solana-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programas-nativos-la-libreria-de-programas-de-solana-spl","aria-hidden":"true"},"#"),o(" Programas nativos & La librer\xEDa de Programas de Solana (SPL)")],-1),M=o("Solana viene equipado con programas que sirven como bloques de construcci\xF3n para interactuar con la cadena de bloques. Estos programas est\xE1n dividos en "),N={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},H=o("Programas nativos"),O=o(" y "),G={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},J=o("Programas de la librer\xEDa de programas (SPL)"),K=o("."),Q=o("Los programas nativos brindan la funcionalidad base que es requerida para operar validadores. Entre estos programas el m\xE1s conocido es el "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=o("Programa del sistema (System Program)"),Y=o(" que es responsable de administrar las cuentas y transferir SOL."),Z=o("Los programas de la librer\xEDa de programas soportan otras actividades dentro de la cadena de bloques como crear tokens, intercambiarlos, prestar tokens, as\xED como generar pools de staking y mantener el servicio de nombres dentro de la cadena de bloques. El "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ee=o("Programa de Token (SPL Token Program)"),oe=o(" puede ser invocado directamente desde el CLI (Command Line Interface), mientras que otros como el "),ae={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},se=o("Programa de cuentas asociadas a token (Associated Token Account Program)"),re=o(" son usados dentro de otros programas."),te=e("h3",{id:"escribiendo-programas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#escribiendo-programas","aria-hidden":"true"},"#"),o(" Escribiendo programas")],-1),ne=o("Los Programas est\xE1n escritos comunmente en Rust o C++, pero pueden ser desarrollado con cualquier lenguaje que compile al backend BPF de LLVM. Iniciativas recientes de "),de={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ie=o("Neon Labs"),le=o(" y "),ce={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},pe=o("Solang"),_e=o(" habilitan la compatibilidad con "),he={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ue=o("EVM"),me=o(" para permitir a desarrolladores escribir programas con Solidity."),ge=r("

    La mayor\xEDa de programas de Rust siguen la siguiente arquitectura:

    ArcguviDescripci\xF3n
    lib.rsRegistro de m\xF3dulos
    entrypoint.rsPunto de entrada para el programa
    instruction.rsAPI del programa, deserializa las instrucciones
    processor.rsL\xF3gica del programa
    state.rsObjetos del programa, deserializa el estado
    error.rsErrores espec\xEDficos del programa
    ",2),be=o("Recientemente, "),fe={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},ke=o("Anchor"),ve=o(" se ha convertido en el framework m\xE1s popular para desarrollar programas. Anchor es un framework que reduce el boilerplate y facilita la deserializaci\xF3n para los programas desarrollados en Rust."),ye=r("

    Los programas normalmente son desarrollados y testeados en los entornos Localhost y Devnet antes de ser desplegados a Testnet y Mainnet. Solana soporta los siguientes entornos:

    Entorno del clusterURL de conexi\xF3n RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),Le=o("Una vez desplegado a un entorno, los clientes pueden interactuar con el programa dentro de la cadena de bloques utilizando "),Pe={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},qe=o("Conexiones RPC"),xe=o(" apuntando al cluster correspondiente."),Se=e("h3",{id:"desplegando-programas",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#desplegando-programas","aria-hidden":"true"},"#"),o(" Desplegando Programas")],-1),Fe=o("Los desarrolladores pueden desplegar sus programas utilizando el "),Ee={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Re=o("CLI"),je=o(":"),Be=r(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Ce=o("Cuando un programa es desplegado, es compilado a un "),Te={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},ze=o("ELF shared object"),Ae=o(" (conteniendo el bytecode de BPF) y subido al cluster de Solana. Los Programas viven en cuentas (como casi todo en Solana), con la excepci\xF3n de aquellas marcadas como "),De=e("code",null,"executable",-1),we=o(" y asignadas al BPF Loader. La direcci\xF3n del programa desplegada se llama "),Ie=e("code",null,"program_id",-1),Ue=o(" y es usada para llamar al programa."),Ve=o("Solana soporta m\xFAltiples BPF Loaders, siendo el \xFAltimo el "),Me={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ne=o("Upgradable BPF Loader"),He=o(". El BPF Loader es responsable de administrar las cuentas del programa y hacerlas accesibles a los clientes a trav\xE9s del "),Oe=e("code",null,"program_id",-1),Ge=o(". Todos los programas tienen un \xFAnico punto de entrada donde se procesan las instrucciones (i.e. "),Je=e("code",null,"process_instruction",-1),Ke=o(") y los par\xE1metros siempre incluyen:"),Qe=r('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Una vez llamado, los Programas son ejecutados por el Runtime de Solana.

    Other Resources

    ',3),We={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Xe=o("Documentaci\xF3n oficial"),Ye={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Ze=o("Documentaci\xF3n de SPL"),$e={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},eo=o("Despliegue de Programas por Justin Starry"),oo={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},ao=o("Kit de inicio de Solana por Iron Addicted Dog"),so={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},ro=o("Programando en Solana por Paulx"),to={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},no=o("Una introducci\xF3n a la cadena de bloques por Hana"),io={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},lo=o("Anchor");function co(po,_o){const n=t("RouterLink"),s=t("ExternalLinkIcon");return i(),l(p,null,[h,u,m,e("div",g,[b,e("ul",null,[f,e("li",null,[k,v,y,a(n,{to:"/es/core-concepts/accounts.html"},{default:c(()=>[L]),_:1}),P]),q,e("li",null,[x,e("a",S,[F,a(s)]),E,e("a",R,[j,a(s)])]),e("li",null,[B,e("a",C,[T,a(s)]),z,e("a",A,[D,a(s)])]),w])]),I,U,V,e("p",null,[M,e("a",N,[H,a(s)]),O,e("a",G,[J,a(s)]),K]),e("p",null,[Q,e("a",W,[X,a(s)]),Y]),e("p",null,[Z,e("a",$,[ee,a(s)]),oe,e("a",ae,[se,a(s)]),re]),te,e("p",null,[ne,e("a",de,[ie,a(s)]),le,e("a",ce,[pe,a(s)]),_e,e("a",he,[ue,a(s)]),me]),ge,e("p",null,[be,e("a",fe,[ke,a(s)]),ve]),ye,e("p",null,[Le,e("a",Pe,[qe,a(s)]),xe]),Se,e("p",null,[Fe,e("a",Ee,[Re,a(s)]),je]),Be,e("p",null,[Ce,e("a",Te,[ze,a(s)]),Ae,De,we,Ie,Ue]),e("p",null,[Ve,e("a",Me,[Ne,a(s)]),He,Oe,Ge,Je,Ke]),Qe,e("ul",null,[e("li",null,[e("a",We,[Xe,a(s)])]),e("li",null,[e("a",Ye,[Ze,a(s)])]),e("li",null,[e("a",$e,[eo,a(s)])]),e("li",null,[e("a",oo,[ao,a(s)])]),e("li",null,[e("a",so,[ro,a(s)])]),e("li",null,[e("a",to,[no,a(s)])]),e("li",null,[e("a",io,[lo,a(s)])])])],64)}var uo=d(_,[["render",co]]);export{uo as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.01e229c2.js b/docs/.vuepress/dist/assets/programs.html.95125d01.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.01e229c2.js rename to docs/.vuepress/dist/assets/programs.html.95125d01.js index cab4a4a18..91646e29c 100644 --- a/docs/.vuepress/dist/assets/programs.html.01e229c2.js +++ b/docs/.vuepress/dist/assets/programs.html.95125d01.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"ecrire-des-programmes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ecrire-des-programmes","aria-hidden":"true"},"#"),s(" \xC9crire des Programmes")],-1),_=n("h2",{id:"comment-transferer-sol-dans-un-programme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-transferer-sol-dans-un-programme","aria-hidden":"true"},"#"),s(" Comment transf\xE9rer SOL dans un programme")],-1),y=n("p",null,[s(`Votre Programme Solana peut transf\xE9rer des lamports d'un compte \xE0 un autre sans "invoquer" le programme du Syst\xE8me (System program). La r\xE8gle fondamentale est que votre programme peut transf\xE9rer des lamports de n'importe quel compte `),n("strong",null,"appartenant"),s(" \xE0 votre programme vers n'importe quel compte.")],-1),f=n("p",null,[s("Le compte destinataire "),n("em",null,"ne doit pas n\xE9cessairement \xEAtre"),s(" un compte appartenant \xE0 votre programme.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"ecrire-des-programmes",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ecrire-des-programmes","aria-hidden":"true"},"#"),s(" \xC9crire des Programmes")],-1),_=n("h2",{id:"comment-transferer-sol-dans-un-programme",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-transferer-sol-dans-un-programme","aria-hidden":"true"},"#"),s(" Comment transf\xE9rer SOL dans un programme")],-1),y=n("p",null,[s(`Votre Programme Solana peut transf\xE9rer des lamports d'un compte \xE0 un autre sans "invoquer" le programme du Syst\xE8me (System program). La r\xE8gle fondamentale est que votre programme peut transf\xE9rer des lamports de n'importe quel compte `),n("strong",null,"appartenant"),s(" \xE0 votre programme vers n'importe quel compte.")],-1),f=n("p",null,[s("Le compte destinataire "),n("em",null,"ne doit pas n\xE9cessairement \xEAtre"),s(" un compte appartenant \xE0 votre programme.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -235,7 +235,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),S=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),x=n("p",null,"L'instruction c\xF4t\xE9 client ne doit plus transmettre que les comptes de l'\xE9tat et du payeur.",-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),C=n("p",null,"L'instruction c\xF4t\xE9 client ne doit plus transmettre que les comptes de l'\xE9tat et du payeur.",-1),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),q=p('

    Comment faire l'Invocation de Programme Crois\xE9

    Une invocation de programme crois\xE9 est tout simplement l'appel d'une instruction d'un autre programme dans notre programme. Le meilleur exemple \xE0 mettre en avant est la fonctionnalit\xE9 swap d'Uniswap. Le contrat UniswapV2Router appelle la logique n\xE9cessaire pour faire le swap et appelle la fonction de transfert du contrat ERC20 pour effectuer l'\xE9change d'une personne \xE0 une autre. De la m\xEAme mani\xE8re, on peut appeler l'instruction d'un programme pour avoir une multitude de buts.

    Examinons notre premier exemple qui est l'instruction de transfert du Programme de Jetons SPL. Les comptes requis pour qu'un transfert ait lieu sont les suivants

    1. Le Compte de Jetons Source (Le compte sur lequel nous d\xE9tenons nos jetons)
    2. Le Compte de Jetons de Destination (Le compte vers lequel nous souhaitons transf\xE9rer nos jetons)
    3. Le Propri\xE9taire du Compte de Jetons Source (L'adresse de notre portefeuille avec lequel nous signerons)
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),q=p('

    Comment faire l'Invocation de Programme Crois\xE9

    Une invocation de programme crois\xE9 est tout simplement l'appel d'une instruction d'un autre programme dans notre programme. Le meilleur exemple \xE0 mettre en avant est la fonctionnalit\xE9 swap d'Uniswap. Le contrat UniswapV2Router appelle la logique n\xE9cessaire pour faire le swap et appelle la fonction de transfert du contrat ERC20 pour effectuer l'\xE9change d'une personne \xE0 une autre. De la m\xEAme mani\xE8re, on peut appeler l'instruction d'un programme pour avoir une multitude de buts.

    Examinons notre premier exemple qui est l'instruction de transfert du Programme de Jetons SPL. Les comptes requis pour qu'un transfert ait lieu sont les suivants

    1. Le Compte de Jetons Source (Le compte sur lequel nous d\xE9tenons nos jetons)
    2. Le Compte de Jetons de Destination (Le compte vers lequel nous souhaitons transf\xE9rer nos jetons)
    3. Le Propri\xE9taire du Compte de Jetons Source (L'adresse de notre portefeuille avec lequel nous signerons)
    ',4),L=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),M=s(" L'instruction client correspondante serait la suivante. Pour conna\xEEtre les instructions de cr\xE9ation de mint et de jetons, veuillez vous r\xE9f\xE9rer au code complet. "),B=n("br",null,null,-1),H=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),Y=n("br",null,null,-1),B=s(" L'instruction client correspondante serait la suivante. Pour conna\xEEtre les instructions de cr\xE9ation de mint et de jetons, veuillez vous r\xE9f\xE9rer au code complet. "),H=n("br",null,null,-1),M=n("br",null,null,-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Le code c\xF4t\xE9 client correspondant sera le suivant",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Le code c\xF4t\xE9 client correspondant sera le suivant",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),q,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[Y]),_:1})]),_:1}),L,M,B,H,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),q,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[L]),preview:a(()=>[z]),_:1})]),_:1}),Y,B,H,M,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[V]),preview:a(()=>[G]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.dec531fb.js b/docs/.vuepress/dist/assets/programs.html.9539084b.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.dec531fb.js rename to docs/.vuepress/dist/assets/programs.html.9539084b.js index 09f174745..4e3aeef95 100644 --- a/docs/.vuepress/dist/assets/programs.html.dec531fb.js +++ b/docs/.vuepress/dist/assets/programs.html.9539084b.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"escribiendo-programas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#escribiendo-programas","aria-hidden":"true"},"#"),s(" Escribiendo Programas")],-1),_=n("h2",{id:"como-transferir-sol-a-un-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-transferir-sol-a-un-programa","aria-hidden":"true"},"#"),s(" C\xF3mo transferir SOL a un programa")],-1),y=n("p",null,[s("Tu programa en Solana puede transferir lamports de una cuenta a otra sin 'invocar' al programa del Sistema (System Program). La regla fundamental es que tu programa puede transferir lamports desde cualquier cuenta "),n("strong",null,"propiedad"),s(" de tu programa a cualquier cuenta.")],-1),f=n("p",null,[s("La cuenta del destinatario "),n("em",null,"no tiene que ser"),s(" una cuenta propiedad de tu programa.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"escribiendo-programas",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#escribiendo-programas","aria-hidden":"true"},"#"),s(" Escribiendo Programas")],-1),_=n("h2",{id:"como-transferir-sol-a-un-programa",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-transferir-sol-a-un-programa","aria-hidden":"true"},"#"),s(" C\xF3mo transferir SOL a un programa")],-1),y=n("p",null,[s("Tu programa en Solana puede transferir lamports de una cuenta a otra sin 'invocar' al programa del Sistema (System Program). La regla fundamental es que tu programa puede transferir lamports desde cualquier cuenta "),n("strong",null,"propiedad"),s(" de tu programa a cualquier cuenta.")],-1),f=n("p",null,[s("La cuenta del destinatario "),n("em",null,"no tiene que ser"),s(" una cuenta propiedad de tu programa.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -81,7 +81,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br")])],-1),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_account_info"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("sysvar_clock_pubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"Ahora enviamos la direcci\xF3n p\xFAblica de la variable del sistema (sysvar) del reloj desde el cliente",-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"Ahora enviamos la direcci\xF3n p\xFAblica de la variable del sistema (sysvar) del reloj desde el cliente",-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -155,7 +155,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),E=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"77ezihTV6mTh2Uf3ggwbYF2NyGJJ5HHah1GrdowWJVD3"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -187,7 +187,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br")])],-1),T=n("h3",{id:"accediendo-al-reloj-directamente-dentro-de-una-instruccion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accediendo-al-reloj-directamente-dentro-de-una-instruccion","aria-hidden":"true"},"#"),s(" Accediendo al reloj directamente dentro de una instrucci\xF3n")],-1),R=n("p",null,[s("Creemos la misma instrucci\xF3n pero sin esperar "),n("code",null,"SYSVAR_CLOCK_PUBKEY"),s(" desde el cliente")],-1),v=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br")])],-1),E=n("h3",{id:"accediendo-al-reloj-directamente-dentro-de-una-instruccion",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#accediendo-al-reloj-directamente-dentro-de-una-instruccion","aria-hidden":"true"},"#"),s(" Accediendo al reloj directamente dentro de una instrucci\xF3n")],-1),R=n("p",null,[s("Creemos la misma instrucci\xF3n pero sin esperar "),n("code",null,"SYSVAR_CLOCK_PUBKEY"),s(" desde el cliente")],-1),v=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("clock"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),z=p('

    C\xF3mo hacer una invocaci\xF3n entre programas (Cross Program Invocation)

    Una invocaci\xF3n de programa cruzada (Cross Program Invocation), simplemente llama a la instrucci\xF3n de otro programa dentro del nuestro. Un buen ejemplo es el swap de Uniswap. El contrato UniswapV2Router, llama a la l\xF3gica necesaria para hacer swap, y llama a la funci\xF3n de transferencia del contrato ERC20 para hacer swap de una persona a otra. De la misma manera, podemos llamer a la instrucci\xF3n de un programa de acuerdo a nuestras necesidades.

    Echemos un vistazo a nuestro primer ejemplo, que es la instrucci\xF3n Transferencia del Programa Token SPL. Las cuentas requeridas para que la transferencia ocurra son:

    1. La cuenta de token de origin (La cuenta donde tenemos los tokens)
    2. La cuenta de token de destino (La cuenta a la que le vamos a transferir los tokens)
    3. La cuenta principal del due\xF1o de los tokens a transferir (La direcci\xF3n con la que vamos a firmar)
    ',4),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),z=p('

    C\xF3mo hacer una invocaci\xF3n entre programas (Cross Program Invocation)

    Una invocaci\xF3n de programa cruzada (Cross Program Invocation), simplemente llama a la instrucci\xF3n de otro programa dentro del nuestro. Un buen ejemplo es el swap de Uniswap. El contrato UniswapV2Router, llama a la l\xF3gica necesaria para hacer swap, y llama a la funci\xF3n de transferencia del contrato ERC20 para hacer swap de una persona a otra. De la misma manera, podemos llamer a la instrucci\xF3n de un programa de acuerdo a nuestras necesidades.

    Echemos un vistazo a nuestro primer ejemplo, que es la instrucci\xF3n Transferencia del Programa Token SPL. Las cuentas requeridas para que la transferencia ocurra son:

    1. La cuenta de token de origin (La cuenta donde tenemos los tokens)
    2. La cuenta de token de destino (La cuenta a la que le vamos a transferir los tokens)
    3. La cuenta principal del due\xF1o de los tokens a transferir (La direcci\xF3n con la que vamos a firmar)
    ',4),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),q=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),L=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),M=s(" La instrucci\xF3n del cliente ser\xEDa la siguiente. Para conocer las instrucciones de creaci\xF3n de token y mint, consulte el c\xF3digo completo. "),B=n("br",null,null,-1),H=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),Y=n("br",null,null,-1),B=s(" La instrucci\xF3n del cliente ser\xEDa la siguiente. Para conocer las instrucciones de creaci\xF3n de token y mint, consulte el c\xF3digo completo. "),H=n("br",null,null,-1),M=n("br",null,null,-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"El c\xF3digo del lado del cliente se ver\xE1 de la siguiente manera:",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"El c\xF3digo del lado del cliente se ver\xE1 de la siguiente manera:",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[E]),_:1})]),_:1}),T,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[q]),_:1})]),_:1}),L,M,B,H,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),C,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[q]),preview:a(()=>[L]),_:1})]),_:1}),Y,B,H,M,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[V]),preview:a(()=>[G]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var Tn=r(m,[["render",wn]]);export{Tn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.072a911a.js b/docs/.vuepress/dist/assets/programs.html.9975ecda.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.072a911a.js rename to docs/.vuepress/dist/assets/programs.html.9975ecda.js index e34d51c24..7eaa3f46b 100644 --- a/docs/.vuepress/dist/assets/programs.html.072a911a.js +++ b/docs/.vuepress/dist/assets/programs.html.9975ecda.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u7F16\u5199\u7A0B\u5E8F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7F16\u5199\u7A0B\u5E8F","aria-hidden":"true"},"#"),s(" \u7F16\u5199\u7A0B\u5E8F")],-1),_=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB-sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB SOL")],-1),y=n("p",null,'\u4F60\u7684Solana\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D"\u8C03\u7528"\u7CFB\u7EDF\u7A0B\u5E8F\u7684\u60C5\u51B5\u4E0B\u5C06lamports\u4ECE\u4E00\u4E2A\u8D26\u6237\u8F6C\u79FB\u7ED9\u53E6\u4E00\u4E2A\u8D26\u6237\u3002\u57FA\u672C\u89C4\u5219\u662F\uFF0C\u4F60\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5C06lamports\u4ECE\u4F60\u7684\u7A0B\u5E8F\u6240\u62E5\u6709\u7684\u4EFB\u4F55\u8D26\u6237\u8F6C\u79FB\u5230\u4EFB\u4F55\u8D26\u6237\u3002',-1),f=n("p",null,"\u63A5\u6536\u65B9\u8D26\u6237\u4E0D\u4E00\u5B9A\u8981\u662F\u4F60\u7684\u7A0B\u5E8F\u6240\u62E5\u6709\u7684\u8D26\u6237\u3002",-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u7F16\u5199\u7A0B\u5E8F",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7F16\u5199\u7A0B\u5E8F","aria-hidden":"true"},"#"),s(" \u7F16\u5199\u7A0B\u5E8F")],-1),_=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB-sol",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB-sol","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u8F6C\u79FB SOL")],-1),y=n("p",null,'\u4F60\u7684Solana\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D"\u8C03\u7528"\u7CFB\u7EDF\u7A0B\u5E8F\u7684\u60C5\u51B5\u4E0B\u5C06lamports\u4ECE\u4E00\u4E2A\u8D26\u6237\u8F6C\u79FB\u7ED9\u53E6\u4E00\u4E2A\u8D26\u6237\u3002\u57FA\u672C\u89C4\u5219\u662F\uFF0C\u4F60\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5C06lamports\u4ECE\u4F60\u7684\u7A0B\u5E8F\u6240\u62E5\u6709\u7684\u4EFB\u4F55\u8D26\u6237\u8F6C\u79FB\u5230\u4EFB\u4F55\u8D26\u6237\u3002',-1),f=n("p",null,"\u63A5\u6536\u65B9\u8D26\u6237\u4E0D\u4E00\u5B9A\u8981\u662F\u4F60\u7684\u7A0B\u5E8F\u6240\u62E5\u6709\u7684\u8D26\u6237\u3002",-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -233,9 +233,9 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),x=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),v=n("p",null,"\u73B0\u5728\uFF0C\u5BA2\u6237\u7AEF\u53EA\u9700\u8981\u4F20\u9012\u72B6\u6001\u548C\u652F\u4ED8\u8D26\u6237\u7684\u6307\u4EE4:",-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),x=n("p",null,"\u73B0\u5728\uFF0C\u5BA2\u6237\u7AEF\u53EA\u9700\u8981\u4F20\u9012\u72B6\u6001\u548C\u652F\u4ED8\u8D26\u6237\u7684\u6307\u4EE4:",-1),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    \u8DE8\u7A0B\u5E8F\u8C03\u7528\u7684\u65B9\u6CD5

    \u8DE8\u7A0B\u5E8F\u8C03\u7528\uFF0C\u7B80\u5355\u6765\u8BF4\uFF0C\u5C31\u662F\u5728\u6211\u4EEC\u7684\u7A0B\u5E8F\u4E2D\u8C03\u7528\u53E6\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6307\u4EE4\u3002\u4E00\u4E2A\u5F88\u597D\u7684\u4F8B\u5B50\u662FUniswap\u7684swap\u529F\u80FD\u3002UniswapV2Router\u5408\u7EA6\u8C03\u7528\u5FC5\u8981\u7684\u903B\u8F91\u8FDB\u884C\u4EA4\u6362\uFF0C\u5E76\u8C03\u7528ERC20\u5408\u7EA6\u7684transfer\u51FD\u6570\u5C06\u4EE3\u5E01\u4ECE\u4E00\u4E2A\u4EBA\u8F6C\u79FB\u5230\u53E6\u4E00\u4E2A\u4EBA\u3002\u540C\u6837\u7684\u65B9\u5F0F\uFF0C\u6211\u4EEC\u53EF\u4EE5\u8C03\u7528\u7A0B\u5E8F\u7684\u6307\u4EE4\u6765\u5B9E\u73B0\u591A\u79CD\u76EE\u7684\u3002

    \u8BA9\u6211\u4EEC\u6765\u770B\u770B\u6211\u4EEC\u7684\u7B2C\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u5373SPL Token Program\u7684transfer\u6307\u4EE4\u3002\u8FDB\u884C\u8F6C\u8D26\u6240\u9700\u7684\u8D26\u6237\u5305\u62EC\uFF1A

    1. \u6E90\u4EE3\u5E01\u8D26\u6237\uFF08\u6211\u4EEC\u6301\u6709\u4EE3\u5E01\u7684\u8D26\u6237\uFF09
    2. \u76EE\u6807\u4EE3\u5E01\u8D26\u6237\uFF08\u6211\u4EEC\u8981\u5C06\u4EE3\u5E01\u8F6C\u79FB\u81F3\u7684\u8D26\u6237\uFF09
    3. \u6E90\u4EE3\u5E01\u8D26\u6237\u7684\u6301\u6709\u8005\uFF08\u6211\u4EEC\u5C06\u4E3A\u5176\u7B7E\u540D\u7684\u94B1\u5305\u5730\u5740\uFF09
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    \u8DE8\u7A0B\u5E8F\u8C03\u7528\u7684\u65B9\u6CD5

    \u8DE8\u7A0B\u5E8F\u8C03\u7528\uFF0C\u7B80\u5355\u6765\u8BF4\uFF0C\u5C31\u662F\u5728\u6211\u4EEC\u7684\u7A0B\u5E8F\u4E2D\u8C03\u7528\u53E6\u4E00\u4E2A\u7A0B\u5E8F\u7684\u6307\u4EE4\u3002\u4E00\u4E2A\u5F88\u597D\u7684\u4F8B\u5B50\u662FUniswap\u7684swap\u529F\u80FD\u3002UniswapV2Router\u5408\u7EA6\u8C03\u7528\u5FC5\u8981\u7684\u903B\u8F91\u8FDB\u884C\u4EA4\u6362\uFF0C\u5E76\u8C03\u7528ERC20\u5408\u7EA6\u7684transfer\u51FD\u6570\u5C06\u4EE3\u5E01\u4ECE\u4E00\u4E2A\u4EBA\u8F6C\u79FB\u5230\u53E6\u4E00\u4E2A\u4EBA\u3002\u540C\u6837\u7684\u65B9\u5F0F\uFF0C\u6211\u4EEC\u53EF\u4EE5\u8C03\u7528\u7A0B\u5E8F\u7684\u6307\u4EE4\u6765\u5B9E\u73B0\u591A\u79CD\u76EE\u7684\u3002

    \u8BA9\u6211\u4EEC\u6765\u770B\u770B\u6211\u4EEC\u7684\u7B2C\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u5373SPL Token Program\u7684transfer\u6307\u4EE4\u3002\u8FDB\u884C\u8F6C\u8D26\u6240\u9700\u7684\u8D26\u6237\u5305\u62EC\uFF1A

    1. \u6E90\u4EE3\u5E01\u8D26\u6237\uFF08\u6211\u4EEC\u6301\u6709\u4EE3\u5E01\u7684\u8D26\u6237\uFF09
    2. \u76EE\u6807\u4EE3\u5E01\u8D26\u6237\uFF08\u6211\u4EEC\u8981\u5C06\u4EE3\u5E01\u8F6C\u79FB\u81F3\u7684\u8D26\u6237\uFF09
    3. \u6E90\u4EE3\u5E01\u8D26\u6237\u7684\u6301\u6709\u8005\uFF08\u6211\u4EEC\u5C06\u4E3A\u5176\u7B7E\u540D\u7684\u94B1\u5305\u5730\u5740\uFF09
    ',4),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),B=s(" \u76F8\u5E94\u7684\u5BA2\u6237\u7AEF\u6307\u4EE4\u5982\u4E0B\u6240\u793A\u3002\u6709\u5173\u4E86\u89E3\u94F8\u5E01\u548C\u4EE3\u5E01\u521B\u5EFA\u6307\u4EE4\uFF0C\u8BF7\u53C2\u8003\u9644\u8FD1\u7684\u5B8C\u6574\u4EE3\u7801\u3002 "),H=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),H=n("br",null,null,-1),L=s(" \u76F8\u5E94\u7684\u5BA2\u6237\u7AEF\u6307\u4EE4\u5982\u4E0B\u6240\u793A\u3002\u6709\u5173\u4E86\u89E3\u94F8\u5E01\u548C\u4EE3\u5E01\u521B\u5EFA\u6307\u4EE4\uFF0C\u8BF7\u53C2\u8003\u9644\u8FD1\u7684\u5B8C\u6574\u4EE3\u7801\u3002 "),M=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    \u73B0\u5728\u8BA9\u6211\u4EEC\u6765\u770B\u53E6\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u5373System Program\u7684create_account\u6307\u4EE4\u3002\u8FD9\u91CC\u4E0E\u4E0A\u9762\u63D0\u5230\u7684\u6307\u4EE4\u6709\u4E00\u70B9\u4E0D\u540C\u3002\u5728\u4E0A\u8FF0\u4F8B\u5B50\u4E2D\uFF0C\u6211\u4EEC\u4E0D\u9700\u8981\u5728invoke\u51FD\u6570\u4E2D\u5C06token_program\u4F5C\u4E3A\u8D26\u6237\u4E4B\u4E00\u4F20\u9012\u3002\u7136\u800C\uFF0C\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B\uFF0C\u60A8\u9700\u8981\u4F20\u9012\u8C03\u7528\u6307\u4EE4\u7684program_id\u3002\u5728\u6211\u4EEC\u7684\u4F8B\u5B50\u4E2D\uFF0C\u5B83\u5C06\u662FSystem Program\u7684program_id\uFF08"11111111111111111111111111111111"\uFF09\u3002\u6240\u4EE5\u73B0\u5728\u6240\u9700\u7684\u8D26\u6237\u5305\u62EC\uFF1A

    1. \u8D1F\u8D23\u652F\u4ED8\u79DF\u91D1\u7684\u652F\u4ED8\u8D26\u6237
    2. \u5C06\u8981\u521B\u5EFA\u7684\u8D26\u6237
    3. \u7CFB\u7EDF\u7A0B\u5E8F\uFF08System Program\uFF09\u8D26\u6237
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    \u73B0\u5728\u8BA9\u6211\u4EEC\u6765\u770B\u53E6\u4E00\u4E2A\u4F8B\u5B50\uFF0C\u5373System Program\u7684create_account\u6307\u4EE4\u3002\u8FD9\u91CC\u4E0E\u4E0A\u9762\u63D0\u5230\u7684\u6307\u4EE4\u6709\u4E00\u70B9\u4E0D\u540C\u3002\u5728\u4E0A\u8FF0\u4F8B\u5B50\u4E2D\uFF0C\u6211\u4EEC\u4E0D\u9700\u8981\u5728invoke\u51FD\u6570\u4E2D\u5C06token_program\u4F5C\u4E3A\u8D26\u6237\u4E4B\u4E00\u4F20\u9012\u3002\u7136\u800C\uFF0C\u5728\u67D0\u4E9B\u60C5\u51B5\u4E0B\uFF0C\u60A8\u9700\u8981\u4F20\u9012\u8C03\u7528\u6307\u4EE4\u7684program_id\u3002\u5728\u6211\u4EEC\u7684\u4F8B\u5B50\u4E2D\uFF0C\u5B83\u5C06\u662FSystem Program\u7684program_id\uFF08"11111111111111111111111111111111"\uFF09\u3002\u6240\u4EE5\u73B0\u5728\u6240\u9700\u7684\u8D26\u6237\u5305\u62EC\uFF1A

    1. \u8D1F\u8D23\u652F\u4ED8\u79DF\u91D1\u7684\u652F\u4ED8\u8D26\u6237
    2. \u5C06\u8981\u521B\u5EFA\u7684\u8D26\u6237
    3. \u7CFB\u7EDF\u7A0B\u5E8F\uFF08System Program\uFF09\u8D26\u6237
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u5BF9\u5E94\u7684\u5BA2\u6237\u7AEF\u4EE3\u7801\u5982\u4E0B\u6240\u793A\uFF1A",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u5BF9\u5E94\u7684\u5BA2\u6237\u7AEF\u4EE3\u7801\u5982\u4E0B\u6240\u793A\uFF1A",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[x]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[M]),_:1})]),_:1}),L,B,H,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var In=r(m,[["render",gn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[C]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[v]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[B]),preview:a(()=>[z]),_:1})]),_:1}),H,L,M,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var In=r(m,[["render",gn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.ebf949b0.js b/docs/.vuepress/dist/assets/programs.html.a475d1f5.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.ebf949b0.js rename to docs/.vuepress/dist/assets/programs.html.a475d1f5.js index 61eedebe8..f19099208 100644 --- a/docs/.vuepress/dist/assets/programs.html.ebf949b0.js +++ b/docs/.vuepress/dist/assets/programs.html.a475d1f5.js @@ -1,2 +1,2 @@ -import{_ as i,r,o as g,c as l,a,b as t,w as d,F as c,d as n,e}from"./app.07ce7a66.js";const p={},h=a("h1",{id:"programs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),n(" Programs")],-1),m=a("p",null,"Ang sinumang developer ay maaaring magsulat at mag-deploy ng mga programa sa Solana blockchain. Ang mga programa (kilala bilang mga matalinong kontrata sa iba pang mga protocol) ay nagsisilbing pundasyon para sa on-chain na aktibidad, na nagpapagana ng anuman mula sa DeFi at NFT hanggang sa Social Media at Gaming.",-1),_=a("h2",{id:"facts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),u={class:"custom-container tip"},b=a("p",{class:"custom-container-title"},"Fact Sheet",-1),k=a("li",null,[n("Pinoproseso ng mga program ang "),a("a",{href:"./transactions"},"mga transaksyon"),n(" mula sa parehong mga end user at iba pang mga program")],-1),y=n("Ang lahat ng mga programa ay "),f=a("em",null,"stateless",-1),v=n(": anumang data na nakipag-ugnayan sa kanila ay nakaimbak sa magkahiwalay na "),P=n("accounts"),L=n(" na ipinapasa sa pamamagitan ng mga instructions"),S=a("li",null,[n("Ang mga program mismo ay nakaimbak sa mga account na minarkahan bilang "),a("code",null,"mapapatupad")],-1),w=n("Lahat ng mga programa ay pagmamay-ari ng "),A={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=n("BPF Loader"),F=n(" at isinasagawa ng "),R={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},B=n("Solana Runtime"),D=n("Ang mga developer ay karaniwang nagsusulat ng mga programa sa Rust o C++, ngunit maaaring pumili ng anumang wika na nagta-target ng "),C={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},M=n("LLVM"),N=n(" ng "),E={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},I=n("BPF"),T=n(" backend"),K=e("
  • Lahat ng mga programa ay may iisang entry point kung saan nagaganap ang pagpoproseso ng pagtuturo (i.e. process_instruction); palaging kasama sa mga parameter ang:
    • program_id: pubkey
    • account: array,
    • instruction_data: byte array
  • ",1),V=a("h2",{id:"deep-dive",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),n(" Deep Dive")],-1),z=a("p",null,"Hindi tulad ng karamihan sa iba pang mga blockchain, ganap na pinaghihiwalay ng Solana ang code mula sa data. Ang lahat ng data kung saan nakikipag-ugnayan ang mga programa ay iniimbak sa magkahiwalay na mga account at ipinapasa bilang mga sanggunian sa pamamagitan ng mga instruction. Ang modelong ito ay nagbibigay-daan para sa isang generic na programa na gumana sa iba't ibang mga account nang hindi nangangailangan ng mga karagdagang deployment. Ang mga karaniwang halimbawa ng pattern na ito ay makikita sa buong Native at SPL Programs.",-1),j=a("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),n(" Native Programs & The Solana Program Library (SPL)")],-1),O=n("Ang Solana ay nilagyan ng ilang mga programa na nagsisilbing pangunahing mga bloke para sa mga on-chain na pakikipag-ugnayan. Ang mga programang ito ay nahahati sa "),H={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},U=n("Mga Native na Program"),G=n(" at "),J={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},W=n("Mga Programa ng Solana Program Library (SPL)"),q=n("."),Q=n("Ibinibigay ng Native Programs ang base functionality na kinakailangan para magpatakbo ng mga validator. Sa mga programang ito, ang pinakakilala ay ang "),X={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Y=n("System Program"),Z=n(" na responsable sa pangangasiwa ng mga bagong account at paglilipat ng SOL sa pagitan ng dalawang partido ."),$=n("Sinusuportahan ng SPL Programs ang ilang mga on-chain na aktibidad, kabilang ang paggawa, pagpapalit, at pagpapahiram ng mga token, pati na rin ang pagbuo ng mga stake pool at pagpapanatili ng on-chain name service. Ang "),aa={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},na=n("SPL Token Program"),ta=n(" ay maaaring direktang gamitin sa pamamagitan ng CLI, habang ang iba ay tulad ng "),oa={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ea=n("Associated Token Account Program"),ra=n(" ay karaniwang binubuo ng mga pasadyang programa."),sa=a("h3",{id:"writing-programs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),n(" Writing Programs")],-1),ia=n("Ang mga programa ay pinakakaraniwang binuo gamit ang Rust o C++, ngunit maaaring mabuo sa anumang wika na nagta-target sa backend ng BPF ng LLVM. Pinapagana ng mga kamakailang inisyatiba ng "),ga={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},la=n("Neon Labs"),da=n(" at "),ca={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},pa=n("Solang"),ha=n(" ang "),ma={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},_a=n("EVM"),ua=n(" compatibility at payagan ang mga developer na magsulat ng mga program sa Solidity."),ba=e("

    Karamihan sa mga programang nakabatay sa kalawang ay sumusunod sa sumusunod na arkitektura:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),ka=n("Kamakailan, ang "),ya={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},fa=n("Anchor"),va=n(" ay lumitaw bilang isang sikat na framework para sa pagbuo ng mga programa. Ang Anchor ay isang opinionated framework, na katulad ng Ruby on Rails, na binabawasan ang boilerplate at pinapa-streamline ang (de)serialization na proseso para sa Rust-based na development."),Pa=e("

    Karaniwang binuo at sinusubok ang mga programa laban sa mga environment ng Localhost at Devnet bago i-deploy sa Testnet o Mainnet. Sinusuportahan ng Solana ang mga sumusunod na environment:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),La=n("Kapag na-deploy na sa isang environment, maaaring makipag-ugnayan ang mga kliyente sa mga on-chain na program sa pamamagitan ng "),Sa={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},wa=n("RPC connections"),Aa=n(" sa kaukulang cluster."),xa=a("h3",{id:"deploying-programs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#deploying-programs","aria-hidden":"true"},"#"),n(" Deploying Programs")],-1),Fa=n("Maaaring i-deploy ng mga developer ang kanilang mga programa sa pamamagitan ng "),Ra={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ba=n("CLI"),Da=n(":"),Ca=e(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r,o as g,c as l,a,b as t,w as d,F as c,d as n,e}from"./app.d411e3b3.js";const p={},h=a("h1",{id:"programs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),n(" Programs")],-1),m=a("p",null,"Ang sinumang developer ay maaaring magsulat at mag-deploy ng mga programa sa Solana blockchain. Ang mga programa (kilala bilang mga matalinong kontrata sa iba pang mga protocol) ay nagsisilbing pundasyon para sa on-chain na aktibidad, na nagpapagana ng anuman mula sa DeFi at NFT hanggang sa Social Media at Gaming.",-1),_=a("h2",{id:"facts",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),u={class:"custom-container tip"},b=a("p",{class:"custom-container-title"},"Fact Sheet",-1),k=a("li",null,[n("Pinoproseso ng mga program ang "),a("a",{href:"./transactions"},"mga transaksyon"),n(" mula sa parehong mga end user at iba pang mga program")],-1),y=n("Ang lahat ng mga programa ay "),f=a("em",null,"stateless",-1),v=n(": anumang data na nakipag-ugnayan sa kanila ay nakaimbak sa magkahiwalay na "),P=n("accounts"),L=n(" na ipinapasa sa pamamagitan ng mga instructions"),S=a("li",null,[n("Ang mga program mismo ay nakaimbak sa mga account na minarkahan bilang "),a("code",null,"mapapatupad")],-1),w=n("Lahat ng mga programa ay pagmamay-ari ng "),A={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=n("BPF Loader"),F=n(" at isinasagawa ng "),R={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},B=n("Solana Runtime"),D=n("Ang mga developer ay karaniwang nagsusulat ng mga programa sa Rust o C++, ngunit maaaring pumili ng anumang wika na nagta-target ng "),C={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},M=n("LLVM"),N=n(" ng "),E={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},I=n("BPF"),T=n(" backend"),K=e("
  • Lahat ng mga programa ay may iisang entry point kung saan nagaganap ang pagpoproseso ng pagtuturo (i.e. process_instruction); palaging kasama sa mga parameter ang:
    • program_id: pubkey
    • account: array,
    • instruction_data: byte array
  • ",1),V=a("h2",{id:"deep-dive",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),n(" Deep Dive")],-1),z=a("p",null,"Hindi tulad ng karamihan sa iba pang mga blockchain, ganap na pinaghihiwalay ng Solana ang code mula sa data. Ang lahat ng data kung saan nakikipag-ugnayan ang mga programa ay iniimbak sa magkahiwalay na mga account at ipinapasa bilang mga sanggunian sa pamamagitan ng mga instruction. Ang modelong ito ay nagbibigay-daan para sa isang generic na programa na gumana sa iba't ibang mga account nang hindi nangangailangan ng mga karagdagang deployment. Ang mga karaniwang halimbawa ng pattern na ito ay makikita sa buong Native at SPL Programs.",-1),j=a("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),n(" Native Programs & The Solana Program Library (SPL)")],-1),O=n("Ang Solana ay nilagyan ng ilang mga programa na nagsisilbing pangunahing mga bloke para sa mga on-chain na pakikipag-ugnayan. Ang mga programang ito ay nahahati sa "),H={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},U=n("Mga Native na Program"),G=n(" at "),J={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},W=n("Mga Programa ng Solana Program Library (SPL)"),q=n("."),Q=n("Ibinibigay ng Native Programs ang base functionality na kinakailangan para magpatakbo ng mga validator. Sa mga programang ito, ang pinakakilala ay ang "),X={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Y=n("System Program"),Z=n(" na responsable sa pangangasiwa ng mga bagong account at paglilipat ng SOL sa pagitan ng dalawang partido ."),$=n("Sinusuportahan ng SPL Programs ang ilang mga on-chain na aktibidad, kabilang ang paggawa, pagpapalit, at pagpapahiram ng mga token, pati na rin ang pagbuo ng mga stake pool at pagpapanatili ng on-chain name service. Ang "),aa={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},na=n("SPL Token Program"),ta=n(" ay maaaring direktang gamitin sa pamamagitan ng CLI, habang ang iba ay tulad ng "),oa={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ea=n("Associated Token Account Program"),ra=n(" ay karaniwang binubuo ng mga pasadyang programa."),sa=a("h3",{id:"writing-programs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),n(" Writing Programs")],-1),ia=n("Ang mga programa ay pinakakaraniwang binuo gamit ang Rust o C++, ngunit maaaring mabuo sa anumang wika na nagta-target sa backend ng BPF ng LLVM. Pinapagana ng mga kamakailang inisyatiba ng "),ga={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},la=n("Neon Labs"),da=n(" at "),ca={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},pa=n("Solang"),ha=n(" ang "),ma={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},_a=n("EVM"),ua=n(" compatibility at payagan ang mga developer na magsulat ng mga program sa Solidity."),ba=e("

    Karamihan sa mga programang nakabatay sa kalawang ay sumusunod sa sumusunod na arkitektura:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),ka=n("Kamakailan, ang "),ya={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},fa=n("Anchor"),va=n(" ay lumitaw bilang isang sikat na framework para sa pagbuo ng mga programa. Ang Anchor ay isang opinionated framework, na katulad ng Ruby on Rails, na binabawasan ang boilerplate at pinapa-streamline ang (de)serialization na proseso para sa Rust-based na development."),Pa=e("

    Karaniwang binuo at sinusubok ang mga programa laban sa mga environment ng Localhost at Devnet bago i-deploy sa Testnet o Mainnet. Sinusuportahan ng Solana ang mga sumusunod na environment:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),La=n("Kapag na-deploy na sa isang environment, maaaring makipag-ugnayan ang mga kliyente sa mga on-chain na program sa pamamagitan ng "),Sa={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},wa=n("RPC connections"),Aa=n(" sa kaukulang cluster."),xa=a("h3",{id:"deploying-programs",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#deploying-programs","aria-hidden":"true"},"#"),n(" Deploying Programs")],-1),Fa=n("Maaaring i-deploy ng mga developer ang kanilang mga programa sa pamamagitan ng "),Ra={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ba=n("CLI"),Da=n(":"),Ca=e(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Ma=n("Kapag na-deploy ang isang program, iko-compile ito sa isang "),Na={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ea=n("ELF shared object"),Ia=n(" (containing BPF bytecode) at ia-upload sa Solana cluster. Ang mga programa ay nakatira sa mga account (katulad ng lahat ng iba pa sa Solana), maliban sa mga account na ito ay minarkahan bilang "),Ta=a("code",null,"executable",-1),Ka=n(" at itinalaga sa BPF Loader. Ang address ng account na ito ay tinutukoy bilang "),Va=a("code",null,"program_id",-1),za=n(" at ginagamit upang i-reference ang program sa lahat ng mga transaksyon sa hinaharap."),ja=n("Sinusuportahan ng Solana ang maraming BPF Loader, na ang pinakabago ay ang "),Oa={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ha=n("Upgradable BPF Loader"),Ua=n(". Ang BPF Loader ay may pananagutan sa pangangasiwa sa account ng programa at gawin itong available sa mga kliyente sa pamamagitan ng "),Ga=a("code",null,"program_id",-1),Ja=n(". Ang lahat ng mga programa ay may iisang entry point kung saan nagaganap ang pagpoproseso ng pagtuturo (ibig sabihin, "),Wa=a("code",null,"process_instruction",-1),qa=n(") at palaging kasama sa mga parameter ang:"),Qa=e('
    • program_id: pubkey
    • account: array,
    • instruction_data: byte array

    Kapag na-invoke, ang mga programa ay isinasagawa ng Solana Runtime.

    Other Resources

    ',3),Xa={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Ya=n("Official Documentation"),Za={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},$a=n("SPL Documentation"),an={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},nn=n("Program Deploys by Justin Starry"),tn={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},on=n("Solana Starter Kit by Iron Addicted Dog"),en={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},rn=n("Programming on Solana by Paulx"),sn={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},gn=n("An Introduction to the Solana Blockchain by Hana"),ln={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},dn=n("Anchor");function cn(pn,hn){const s=r("RouterLink"),o=r("ExternalLinkIcon");return g(),l(c,null,[h,m,_,a("div",u,[b,a("ul",null,[k,a("li",null,[y,f,v,t(s,{to:"/fil/core-concepts/accounts.html"},{default:d(()=>[P]),_:1}),L]),S,a("li",null,[w,a("a",A,[x,t(o)]),F,a("a",R,[B,t(o)])]),a("li",null,[D,a("a",C,[M,t(o)]),N,a("a",E,[I,t(o)]),T]),K])]),V,z,j,a("p",null,[O,a("a",H,[U,t(o)]),G,a("a",J,[W,t(o)]),q]),a("p",null,[Q,a("a",X,[Y,t(o)]),Z]),a("p",null,[$,a("a",aa,[na,t(o)]),ta,a("a",oa,[ea,t(o)]),ra]),sa,a("p",null,[ia,a("a",ga,[la,t(o)]),da,a("a",ca,[pa,t(o)]),ha,a("a",ma,[_a,t(o)]),ua]),ba,a("p",null,[ka,a("a",ya,[fa,t(o)]),va]),Pa,a("p",null,[La,a("a",Sa,[wa,t(o)]),Aa]),xa,a("p",null,[Fa,a("a",Ra,[Ba,t(o)]),Da]),Ca,a("p",null,[Ma,a("a",Na,[Ea,t(o)]),Ia,Ta,Ka,Va,za]),a("p",null,[ja,a("a",Oa,[Ha,t(o)]),Ua,Ga,Ja,Wa,qa]),Qa,a("ul",null,[a("li",null,[a("a",Xa,[Ya,t(o)])]),a("li",null,[a("a",Za,[$a,t(o)])]),a("li",null,[a("a",an,[nn,t(o)])]),a("li",null,[a("a",tn,[on,t(o)])]),a("li",null,[a("a",en,[rn,t(o)])]),a("li",null,[a("a",sn,[gn,t(o)])]),a("li",null,[a("a",ln,[dn,t(o)])])])],64)}var _n=i(p,[["render",cn]]);export{_n as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.96701793.js b/docs/.vuepress/dist/assets/programs.html.a53991e5.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.96701793.js rename to docs/.vuepress/dist/assets/programs.html.a53991e5.js index 0c004716f..4b251f92f 100644 --- a/docs/.vuepress/dist/assets/programs.html.96701793.js +++ b/docs/.vuepress/dist/assets/programs.html.a53991e5.js @@ -1,2 +1,2 @@ -import{_ as i,r,o as d,c as l,a,b as n,w as c,F as h,d as e,e as o}from"./app.07ce7a66.js";const _={},m=a("h1",{id:"program",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program","aria-hidden":"true"},"#"),e(" Program")],-1),u=a("p",null,"Setiap developer bisa menulis dan memasukan programnya ke Solana Blockchain. Program (diketahui sebagai smart contracts di protokol lain) berfungsi sebagai dasar untuk aktivitas on-chain, mendukung apa pun mulai dari DeFi dan NFT hingga ke Media Sosial dan Game.",-1),p=a("h2",{id:"fakta-fakta",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fakta-fakta","aria-hidden":"true"},"#"),e(" Fakta-Fakta")],-1),g={class:"custom-container tip"},k=a("p",{class:"custom-container-title"},"Fakta",-1),b=a("li",null,[e("Program Memproses "),a("a",{href:"./transactions"},"instruksi"),e(" dari pengguna akhir dan program lain")],-1),f=e("Semua program adalah "),y=a("em",null,"stateless",-1),P=e(" / "),S=a("em",null,"tidak memiliki status",-1),v=e(": semua data apa pun yang berinteraksi dengannya disimpan di "),L=e("Akun"),x=e(" terpisah yang diteruskan melalui intruksi"),F=a("li",null,"Program itu sendiri disimpan dalam akun yang ditandai sebagai 'executable'",-1),B=e("Semua program merupakan milik "),R={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},j=e("BPF Loader"),w=e(" dan dieksekusi oleh "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},D=e("Solana Runtime"),M=e("Pengembang paling sering menulis program dalam bahasa Rust atau C++, tetapi bisa memilih bahasa lain yang menargetkan "),C={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},N=e("LLVM"),E=e("'s "),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},T=e("BPF"),V=e(" backend"),K=o("
  • Semua program memiliki satu titik masuk dimana pemrosessan instruksi berlangsung (i.e. process_instruction); parameternya selalu meliputi:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),O=a("h2",{id:"lebih-dalam",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#lebih-dalam","aria-hidden":"true"},"#"),e(" Lebih Dalam")],-1),U=a("p",null,[e("Tidak seperti kebanyakan blockchain lainnya, Solana benar-benar memisahkan kode dari data. Semua data yang berinteraksi dengan program disimpan dalam akun terpisah dan diteruskan sebagai referensi via instruksi. Model ini memungkinkan satu program generik untuk beroperasi di berbagai akun tanpa memerlukan penerapan tambahan. Contoh umum dari pola ini terlihat di seluruh program bawaan ("),a("code",null,"Native"),e(") dan Program SPL.")],-1),z=a("h3",{id:"native-program-solana-program-library-spl",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#native-program-solana-program-library-spl","aria-hidden":"true"},"#"),e(" Native Program & Solana Program Library (SPL)")],-1),G=e("Solana dilengkapi dengan sejumlah program yang berfungsi sebagai blok bangunan inti untuk interaksi dalam on-chain. Program ini dibagi menjadi "),H={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},J=e("Native Programs"),q=e(" dan "),Q={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},W=e("Solana Program Library (SPL) Programs"),X=e("."),Y=e("Program bawaan ("),Z=a("code",null,"native",-1),$=e(") menyediakan fungsionalitas dasar yang yang diperlukan untuk mengoperasikan validator. Di antara program-program ini, yang paling terkenal adalah "),aa={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},ea=e("System Program"),na=e(" yang bertanggung jawab untuk mengelola akun baru dan mentransfer SOL antara dua belah pihak."),ta=e("Program SPL mendukung sejumlah aktivitas on-chain, termasuk membuat, menukar, dan meminjamkan token, serta membuat "),oa=a("code",null,"Stake Pools",-1),ra=e(" dan memelihara layanan nama ("),sa=a("code",null,"name service",-1),ia=e(") sebuah on-chain. "),da={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},la=e("SPL Token Program"),ca=e(" dapat dipanggil langsung melalui CLI, sementara yang lain seperti "),ha={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},_a=e("Associated Token Account Program"),ma=e(" biasanya dibuat dengan program khusus."),ua=a("h3",{id:"menulis-program",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#menulis-program","aria-hidden":"true"},"#"),e(" Menulis Program")],-1),pa=e("Program paling sering dikembangkan dengan bahasa Rust atau C++, tetapi bisa juga dikembangkan dengan berbagai bahasa yang menargetkan backend BPF LLVM. Inisiatif terbaru oleh "),ga={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ka=e("Neon Labs"),ba=e(" dan "),fa={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ya=e("Solang"),Pa=e(" mengaktifkan "),Sa={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},va=e("EVM"),La=e(" kompatibilitas dan memungkinkan para pengembang untuk menulis program dalam Solidity."),xa=o("

    Sebagian besar program berbasis Rust mengikuti arsitektur berikut:

    FileDeskripsi
    lib.rsMendaftarkan modul
    entrypoint.rsTitik masuk ke program
    instruction.rsProgram API, deserialisasi data instruksi
    processor.rsLogika program
    state.rsObjek program, status deserialisasi
    error.rsKesalahan (error) khusus program
    ",2),Fa=e("Baru-baru ini, "),Ba={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},Ra=e("Anchor"),ja=e(" telah muncul sebagai framework yang populer untuk mengembangkan program. Anchor adalah sebuah framework, mirip dengan Ruby on Rails, yang mengurangi boilerplate dan mempermudah proses deserialisasi untuk pengembangan berbasis Rust."),wa=o("

    Program pada umumnya dikembangkan dan diuji di localhost dan devnet sebelum di deploy ke testnet atau mainnet. Solana mendukung environment berikut:

    Kluster EnvironmentURL Koneksi RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhostport bawaan: 8899 (contoh http://localhost:8899, http://192.168.1.88:8899)
    ",2),Aa=e("Setelah di deploy ke environment, klien dapat berinteraksi dengan program on-chain melalui "),Da={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Ma=e("RPC connections"),Ca=e(" ke masing-masing kluster."),Na=a("h3",{id:"deploy-program",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#deploy-program","aria-hidden":"true"},"#"),e(" Deploy Program")],-1),Ea=e("Pengembang dapat men-deploy program mereka melalui "),Ia={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ta=e("CLI"),Va=e(":"),Ka=o(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r,o as d,c as l,a,b as n,w as c,F as h,d as e,e as o}from"./app.d411e3b3.js";const _={},m=a("h1",{id:"program",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#program","aria-hidden":"true"},"#"),e(" Program")],-1),u=a("p",null,"Setiap developer bisa menulis dan memasukan programnya ke Solana Blockchain. Program (diketahui sebagai smart contracts di protokol lain) berfungsi sebagai dasar untuk aktivitas on-chain, mendukung apa pun mulai dari DeFi dan NFT hingga ke Media Sosial dan Game.",-1),p=a("h2",{id:"fakta-fakta",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fakta-fakta","aria-hidden":"true"},"#"),e(" Fakta-Fakta")],-1),g={class:"custom-container tip"},k=a("p",{class:"custom-container-title"},"Fakta",-1),b=a("li",null,[e("Program Memproses "),a("a",{href:"./transactions"},"instruksi"),e(" dari pengguna akhir dan program lain")],-1),f=e("Semua program adalah "),y=a("em",null,"stateless",-1),P=e(" / "),S=a("em",null,"tidak memiliki status",-1),v=e(": semua data apa pun yang berinteraksi dengannya disimpan di "),L=e("Akun"),x=e(" terpisah yang diteruskan melalui intruksi"),F=a("li",null,"Program itu sendiri disimpan dalam akun yang ditandai sebagai 'executable'",-1),B=e("Semua program merupakan milik "),R={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},j=e("BPF Loader"),w=e(" dan dieksekusi oleh "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},D=e("Solana Runtime"),M=e("Pengembang paling sering menulis program dalam bahasa Rust atau C++, tetapi bisa memilih bahasa lain yang menargetkan "),C={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},N=e("LLVM"),E=e("'s "),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},T=e("BPF"),V=e(" backend"),K=o("
  • Semua program memiliki satu titik masuk dimana pemrosessan instruksi berlangsung (i.e. process_instruction); parameternya selalu meliputi:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),O=a("h2",{id:"lebih-dalam",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#lebih-dalam","aria-hidden":"true"},"#"),e(" Lebih Dalam")],-1),U=a("p",null,[e("Tidak seperti kebanyakan blockchain lainnya, Solana benar-benar memisahkan kode dari data. Semua data yang berinteraksi dengan program disimpan dalam akun terpisah dan diteruskan sebagai referensi via instruksi. Model ini memungkinkan satu program generik untuk beroperasi di berbagai akun tanpa memerlukan penerapan tambahan. Contoh umum dari pola ini terlihat di seluruh program bawaan ("),a("code",null,"Native"),e(") dan Program SPL.")],-1),z=a("h3",{id:"native-program-solana-program-library-spl",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#native-program-solana-program-library-spl","aria-hidden":"true"},"#"),e(" Native Program & Solana Program Library (SPL)")],-1),G=e("Solana dilengkapi dengan sejumlah program yang berfungsi sebagai blok bangunan inti untuk interaksi dalam on-chain. Program ini dibagi menjadi "),H={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},J=e("Native Programs"),q=e(" dan "),Q={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},W=e("Solana Program Library (SPL) Programs"),X=e("."),Y=e("Program bawaan ("),Z=a("code",null,"native",-1),$=e(") menyediakan fungsionalitas dasar yang yang diperlukan untuk mengoperasikan validator. Di antara program-program ini, yang paling terkenal adalah "),aa={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},ea=e("System Program"),na=e(" yang bertanggung jawab untuk mengelola akun baru dan mentransfer SOL antara dua belah pihak."),ta=e("Program SPL mendukung sejumlah aktivitas on-chain, termasuk membuat, menukar, dan meminjamkan token, serta membuat "),oa=a("code",null,"Stake Pools",-1),ra=e(" dan memelihara layanan nama ("),sa=a("code",null,"name service",-1),ia=e(") sebuah on-chain. "),da={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},la=e("SPL Token Program"),ca=e(" dapat dipanggil langsung melalui CLI, sementara yang lain seperti "),ha={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},_a=e("Associated Token Account Program"),ma=e(" biasanya dibuat dengan program khusus."),ua=a("h3",{id:"menulis-program",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#menulis-program","aria-hidden":"true"},"#"),e(" Menulis Program")],-1),pa=e("Program paling sering dikembangkan dengan bahasa Rust atau C++, tetapi bisa juga dikembangkan dengan berbagai bahasa yang menargetkan backend BPF LLVM. Inisiatif terbaru oleh "),ga={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ka=e("Neon Labs"),ba=e(" dan "),fa={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ya=e("Solang"),Pa=e(" mengaktifkan "),Sa={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},va=e("EVM"),La=e(" kompatibilitas dan memungkinkan para pengembang untuk menulis program dalam Solidity."),xa=o("

    Sebagian besar program berbasis Rust mengikuti arsitektur berikut:

    FileDeskripsi
    lib.rsMendaftarkan modul
    entrypoint.rsTitik masuk ke program
    instruction.rsProgram API, deserialisasi data instruksi
    processor.rsLogika program
    state.rsObjek program, status deserialisasi
    error.rsKesalahan (error) khusus program
    ",2),Fa=e("Baru-baru ini, "),Ba={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},Ra=e("Anchor"),ja=e(" telah muncul sebagai framework yang populer untuk mengembangkan program. Anchor adalah sebuah framework, mirip dengan Ruby on Rails, yang mengurangi boilerplate dan mempermudah proses deserialisasi untuk pengembangan berbasis Rust."),wa=o("

    Program pada umumnya dikembangkan dan diuji di localhost dan devnet sebelum di deploy ke testnet atau mainnet. Solana mendukung environment berikut:

    Kluster EnvironmentURL Koneksi RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhostport bawaan: 8899 (contoh http://localhost:8899, http://192.168.1.88:8899)
    ",2),Aa=e("Setelah di deploy ke environment, klien dapat berinteraksi dengan program on-chain melalui "),Da={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Ma=e("RPC connections"),Ca=e(" ke masing-masing kluster."),Na=a("h3",{id:"deploy-program",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#deploy-program","aria-hidden":"true"},"#"),e(" Deploy Program")],-1),Ea=e("Pengembang dapat men-deploy program mereka melalui "),Ia={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ta=e("CLI"),Va=e(":"),Ka=o(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Oa=e("Ketika program telah di deploy, program tersebut dikompilasi ke "),Ua={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},za=e("ELF shared object"),Ga=e(" (berisi BPF bytecode) dan diunggah ke kluster Solana. Program berjalan di akun (seperti semua yang lain di Solana), kecuali akun-akun itu telah ditandai sebagai "),Ha=a("code",null,"executable",-1),Ja=e(" dan ditugaskan ke BPF loader. Alamat akun ini disebut sebagai "),qa=a("code",null,"program_id",-1),Qa=e(" dan digunakan untuk merujuk program dalam semua transaksi."),Wa=e("Solana mendukung beberapa BPF Loaders, dengan yang terbaru adalah "),Xa={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ya=e("Upgradable BPF Loader"),Za=e(". BPF Loader bertanggung jawab untuk mengelola akun program dan membuatnya tersedia untuk klien melalui "),$a=a("code",null,"program_id",-1),ae=e(". Semua program mempunyai satu titik masuk dimana semua pemrosesan instruksi berlangsung (i.e. "),ee=a("code",null,"process_instruction",-1),ne=e(") dan parameternya selalu menyertakan :"),te=o('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Setelah dipanggil, program akan dijalankan oleh Solana Runtime.

    Sumber Lainnya

    ',3),oe={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},re=e("Dokumentasi Resmi "),se={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},ie=e("Dokumentasi SPL"),de={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},le=e("Program Deploys oleh Justin Starry"),ce={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},he=e("Solana Starter Kit oleh Iron Addicted Dog"),_e={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},me=e("Programming di Solana oleh Paulx"),ue={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},pe=e("Perkenalan Solana Blockchain oleh Hana"),ge={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ke=e("Anchor");function be(fe,ye){const s=r("RouterLink"),t=r("ExternalLinkIcon");return d(),l(h,null,[m,u,p,a("div",g,[k,a("ul",null,[b,a("li",null,[f,y,P,S,v,n(s,{to:"/id/core-concepts/accounts.html"},{default:c(()=>[L]),_:1}),x]),F,a("li",null,[B,a("a",R,[j,n(t)]),w,a("a",A,[D,n(t)])]),a("li",null,[M,a("a",C,[N,n(t)]),E,a("a",I,[T,n(t)]),V]),K])]),O,U,z,a("p",null,[G,a("a",H,[J,n(t)]),q,a("a",Q,[W,n(t)]),X]),a("p",null,[Y,Z,$,a("a",aa,[ea,n(t)]),na]),a("p",null,[ta,oa,ra,sa,ia,a("a",da,[la,n(t)]),ca,a("a",ha,[_a,n(t)]),ma]),ua,a("p",null,[pa,a("a",ga,[ka,n(t)]),ba,a("a",fa,[ya,n(t)]),Pa,a("a",Sa,[va,n(t)]),La]),xa,a("p",null,[Fa,a("a",Ba,[Ra,n(t)]),ja]),wa,a("p",null,[Aa,a("a",Da,[Ma,n(t)]),Ca]),Na,a("p",null,[Ea,a("a",Ia,[Ta,n(t)]),Va]),Ka,a("p",null,[Oa,a("a",Ua,[za,n(t)]),Ga,Ha,Ja,qa,Qa]),a("p",null,[Wa,a("a",Xa,[Ya,n(t)]),Za,$a,ae,ee,ne]),te,a("ul",null,[a("li",null,[a("a",oe,[re,n(t)])]),a("li",null,[a("a",se,[ie,n(t)])]),a("li",null,[a("a",de,[le,n(t)])]),a("li",null,[a("a",ce,[he,n(t)])]),a("li",null,[a("a",_e,[me,n(t)])]),a("li",null,[a("a",ue,[pe,n(t)])]),a("li",null,[a("a",ge,[ke,n(t)])])])],64)}var Se=i(_,[["render",be]]);export{Se as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.d7e559f7.js b/docs/.vuepress/dist/assets/programs.html.a57b3d47.js similarity index 92% rename from docs/.vuepress/dist/assets/programs.html.d7e559f7.js rename to docs/.vuepress/dist/assets/programs.html.a57b3d47.js index fab7a5fbc..0baa45fc7 100644 --- a/docs/.vuepress/dist/assets/programs.html.d7e559f7.js +++ b/docs/.vuepress/dist/assets/programs.html.a57b3d47.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"writing-programs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),s(" Writing Programs")],-1),_=n("h2",{id:"how-to-transfer-sol-in-a-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-transfer-sol-in-a-program","aria-hidden":"true"},"#"),s(" How to transfer SOL in a program")],-1),y=n("p",null,[s("Your Solana Program can transfer lamports from one account to another without 'invoking' the System program. The fundamental rule is that your program can transfer lamports from any account "),n("strong",null,"owned"),s(" by your program to any account at all.")],-1),f=n("p",null,[s("The recipient account "),n("em",null,"does not have to be"),s(" an account owned by your program.")],-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"writing-programs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),s(" Writing Programs")],-1),_=n("h2",{id:"how-to-transfer-sol-in-a-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-transfer-sol-in-a-program","aria-hidden":"true"},"#"),s(" How to transfer SOL in a program")],-1),y=n("p",null,[s("Your Solana Program can transfer lamports from one account to another without 'invoking' the System program. The fundamental rule is that your program can transfer lamports from any account "),n("strong",null,"owned"),s(" by your program to any account at all.")],-1),f=n("p",null,[s("The recipient account "),n("em",null,"does not have to be"),s(" an account owned by your program.")],-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -448,7 +458,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"// adding a publickey to the account"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br")])],-1),U=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"// adding a publickey to the account"),s(` `),n("span",{class:"token keyword"},"let"),s(" new_size "),n("span",{class:"token operator"},"="),s(" pda_account"),n("span",{class:"token punctuation"},"."),s("data"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"borrow"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"len"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" rent "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Rent"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),U=p('

    How to do Cross Program Invocation

    A cross program invocation, is simply put calling another program's instruction inside our program. One best example to put forth is Uniswap's swap functionality. The UniswapV2Router contract, calls the necessary logic to swap, and calls the ERC20 contract's transfer function to swap from one person to another. The same way, we can call a program's instruction to have multitude of purposes.

    Lets have a look at our first example which is the SPL Token Program's transfer instruction. The required accounts we would need for a transfer to happen are

    1. The Source Token Account (The account which we are holding our tokens)
    2. The Destination Token Account (The account which we would be transferring our tokens to)
    3. The Source Token Account's Holder (Our wallet address which we would be signing for)
    ',4),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    How to do Cross Program Invocation

    A cross program invocation, is simply put calling another program's instruction inside our program. One best example to put forth is Uniswap's swap functionality. The UniswapV2Router contract, calls the necessary logic to swap, and calls the ERC20 contract's transfer function to swap from one person to another. The same way, we can call a program's instruction to have multitude of purposes.

    Lets have a look at our first example which is the SPL Token Program's transfer instruction. The required accounts we would need for a transfer to happen are

    1. The Source Token Account (The account which we are holding our tokens)
    2. The Destination Token Account (The account which we would be transferring our tokens to)
    3. The Source Token Account's Holder (Our wallet address which we would be signing for)
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),H=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),H=s(" The corresponding client instruction would be as follows. For knowing the mint and token creation instructions, please refer to the full code nearby. "),B=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),B=n("br",null,null,-1),L=s(" The corresponding client instruction would be as follows. For knowing the mint and token creation instructions, please refer to the full code nearby. "),M=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    Now let's take a look at another example, which is System Program's create_account instruction. There is a slight difference between the above mentioned instruction and this. There, we never had to pass the token_program as one of the accounts inside the invoke function. However, there are exceptions where you are required to pass the invoking instruction's program_id. In our case it would be the System Program's program_id. ("11111111111111111111111111111111"). So now the required accounts would be

    1. The payer account who funds the rent
    2. The account which is going to be created
    3. System Program account
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    Now let's take a look at another example, which is System Program's create_account instruction. There is a slight difference between the above mentioned instruction and this. There, we never had to pass the token_program as one of the accounts inside the invoke function. However, there are exceptions where you are required to pass the invoking instruction's program_id. In our case it would be the System Program's program_id. ("11111111111111111111111111111111"). So now the required accounts would be

    1. The payer account who funds the rent
    2. The account which is going to be created
    3. System Program account
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"The respective client side code will look as follows",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"The respective client side code will look as follows",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1010,88 +1034,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),X=n("h2",{id:"how-to-create-a-pda",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-pda","aria-hidden":"true"},"#"),s(" How to create a PDA")],-1),Z=n("p",null,[s(`A Program Derived Address is simply an account owned by the program, but has no private key. Instead it's signature is obtained by a set of seeds and a bump (a nonce which makes sure it's off curve). "`),n("strong",null,"Generating"),s('" a Program Address is different from "'),n("strong",null,"creating"),s('" it. One can generate a PDA using '),n("code",null,"Pubkey::find_program_address"),s(". Creating a PDA essentially means to initialize the address with space and set the state to it. A normal Keypair account can be created outside of our program and then fed to initialize it's state. Unfortunately, for PDAs, it has to be created on chain, due to the nature of not being able to sign on behalf of itself. Hence we use "),n("code",null,"invoke_signed"),s(" to pass the seeds of the PDA, along with the funding account's signature which results in account creation of a PDA.")],-1),nn=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"BorshSerialize"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` - entrypoint`),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token namespace"},[s("program"),n("span",{class:"token punctuation"},"::")]),s("invoke_signed"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token namespace"},[s("program_error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token namespace"},[s("pubkey"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"Pubkey"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token namespace"},[s("rent"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"Rent"),n("span",{class:"token punctuation"},","),s(` - system_instruction`),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token namespace"},[s("sysvar"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"Sysvar"),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},";"),s(` - -`),n("span",{class:"token macro property"},"entrypoint!"),n("span",{class:"token punctuation"},"("),s("process_instruction"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - -`),n("span",{class:"token attribute attr-name"},"#[derive(BorshSerialize, BorshDeserialize, Debug)]"),s(` -`),n("span",{class:"token keyword"},"pub"),s(),n("span",{class:"token keyword"},"struct"),s(),n("span",{class:"token type-definition class-name"},"HelloState"),s(),n("span",{class:"token punctuation"},"{"),s(` - is_initialized`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token keyword"},"bool"),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(` - -`),n("span",{class:"token comment"},"// Accounts required"),s(` -`),n("span",{class:"token comment"},"/// 1. [signer, writable] Funding account"),s(` -`),n("span",{class:"token comment"},"/// 2. [writable] PDA account"),s(` -`),n("span",{class:"token comment"},"/// 3. [] System Program"),s(` -`),n("span",{class:"token keyword"},"pub"),s(),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"process_instruction"),n("span",{class:"token punctuation"},"("),s(` - program_id`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"Pubkey"),n("span",{class:"token punctuation"},","),s(` - accounts`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` - instruction_data`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"->"),s(),n("span",{class:"token class-name"},"ProgramResult"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_DATA_LEN"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token keyword"},"usize"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token number"},"1"),n("span",{class:"token punctuation"},";"),s(` - - `),n("span",{class:"token keyword"},"let"),s(" accounts_iter "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token keyword"},"mut"),s(" accounts"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"iter"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Getting required accounts"),s(` - `),n("span",{class:"token keyword"},"let"),s(" funding_account "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token function"},"next_account_info"),n("span",{class:"token punctuation"},"("),s("accounts_iter"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"let"),s(" pda_account "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token function"},"next_account_info"),n("span",{class:"token punctuation"},"("),s("accounts_iter"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"let"),s(" system_program "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token function"},"next_account_info"),n("span",{class:"token punctuation"},"("),s("accounts_iter"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - - `),n("span",{class:"token comment"},"// Getting PDA Bump from instruction data"),s(` - `),n("span",{class:"token keyword"},"let"),s(),n("span",{class:"token punctuation"},"("),s("pda_bump"),n("span",{class:"token punctuation"},","),s(" _"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"="),s(` instruction_data - `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"split_first"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(` - `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok_or"),n("span",{class:"token punctuation"},"("),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token class-name"},"InvalidInstructionData"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - - `),n("span",{class:"token comment"},"// Checking if passed PDA and expected PDA are equal"),s(` - `),n("span",{class:"token keyword"},"let"),s(" signers_seeds"),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),n("span",{class:"token keyword"},"u8"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(),n("span",{class:"token number"},"3"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),s(` - `),n("span",{class:"token string"},'b"customaddress"'),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token operator"},"&"),s("funding_account"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"to_bytes"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),n("span",{class:"token operator"},"*"),s("pda_bump"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"let"),s(" pda "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Pubkey"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"create_program_address"),n("span",{class:"token punctuation"},"("),s("signers_seeds"),n("span",{class:"token punctuation"},","),s(" program_id"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - - `),n("span",{class:"token keyword"},"if"),s(" pda"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ne"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("pda_account"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"return"),s(),n("span",{class:"token class-name"},"Err"),n("span",{class:"token punctuation"},"("),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token class-name"},"InvalidAccountData"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token punctuation"},"}"),s(` - - `),n("span",{class:"token comment"},"// Assessing required lamports and creating transaction instruction"),s(` - `),n("span",{class:"token keyword"},"let"),s(" lamports_required "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Rent"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"minimum_balance"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"ACCOUNT_DATA_LEN"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"let"),s(" create_pda_account_ix "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token namespace"},[s("system_instruction"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token function"},"create_account"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token operator"},"&"),s("funding_account"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token operator"},"&"),s("pda_account"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},","),s(` - lamports_required`),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token constant"},"ACCOUNT_DATA_LEN"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"unwrap"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token operator"},"&"),s("program_id"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Invoking the instruction but with PDAs as additional signer"),s(` - `),n("span",{class:"token function"},"invoke_signed"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token operator"},"&"),s("create_pda_account_ix"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),s(` - funding_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"clone"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` - pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"clone"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` - system_program`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"clone"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token operator"},"&"),n("span",{class:"token punctuation"},"["),s("signers_seeds"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` - `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - - `),n("span",{class:"token comment"},"// Setting state for PDA"),s(` - `),n("span",{class:"token keyword"},"let"),s(),n("span",{class:"token keyword"},"mut"),s(" pda_account_state "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"HelloState"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"try_from_slice"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("pda_account"),n("span",{class:"token punctuation"},"."),s("data"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"borrow"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - pda_account_state`),n("span",{class:"token punctuation"},"."),s("is_initialized "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},";"),s(` - pda_account_state`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"serialize"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),n("span",{class:"token keyword"},"mut"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token keyword"},"mut"),s(" pda_account"),n("span",{class:"token punctuation"},"."),s("data"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"borrow_mut"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"["),n("span",{class:"token punctuation"},".."),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` - - `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` -`),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br")])],-1),sn=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" create_pda_account_ix "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token namespace"},[s("system_instruction"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token function"},"create_account"),n("span",{class:"token punctuation"},"("),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),X=n("h2",{id:"how-to-create-a-pda",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-pda","aria-hidden":"true"},"#"),s(" How to create a PDA")],-1),Z=n("p",null,[s(`A Program Derived Address is simply an account owned by the program, but has no private key. Instead it's signature is obtained by a set of seeds and a bump (a nonce which makes sure it's off curve). "`),n("strong",null,"Generating"),s('" a Program Address is different from "'),n("strong",null,"creating"),s('" it. One can generate a PDA using '),n("code",null,"Pubkey::find_program_address"),s(". Creating a PDA essentially means to initialize the address with space and set the state to it. A normal Keypair account can be created outside of our program and then fed to initialize it's state. Unfortunately, for PDAs, it has to be created on chain, due to the nature of not being able to sign on behalf of itself. Hence we use "),n("code",null,"invoke_signed"),s(" to pass the seeds of the PDA, along with the funding account's signature which results in account creation of a PDA.")],-1),nn=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token class-name"},"File"),s(" not found")])]),n("div",{class:"line-numbers","aria-hidden":"true"})],-1),sn=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" create_pda_account_ix "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token namespace"},[s("system_instruction"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token function"},"create_account"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token operator"},"&"),s("funding_account"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token operator"},"&"),s("pda_account"),n("span",{class:"token punctuation"},"."),s("key"),n("span",{class:"token punctuation"},","),s(` lamports_required`),n("span",{class:"token punctuation"},","),s(` @@ -1110,26 +1053,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1127,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1435,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[M]),_:1})]),_:1}),L,H,B,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var Tn=r(m,[["render",gn]]);export{Tn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[H]),_:1})]),_:1}),B,L,M,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var Tn=r(m,[["render",gn]]);export{Tn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.555fde3c.js b/docs/.vuepress/dist/assets/programs.html.b0aa64e9.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.555fde3c.js rename to docs/.vuepress/dist/assets/programs.html.b0aa64e9.js index 2ddb70734..2e8e28f67 100644 --- a/docs/.vuepress/dist/assets/programs.html.555fde3c.js +++ b/docs/.vuepress/dist/assets/programs.html.b0aa64e9.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"xay-dung-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#xay-dung-program","aria-hidden":"true"},"#"),s(" X\xE2y d\u1EF1ng Program")],-1),_=n("h2",{id:"lam-the-nao-\u0111e-chuyen-sol-trong-mot-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-chuyen-sol-trong-mot-program","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n SOL trong m\u1ED9t program")],-1),y=n("p",null,"Program tr\xEAn Solana c\xF3 th\u1EC3 chuy\u1EC3n lamports \u1EEB m\u1ED9t account \u0111\u1EBFn m\u1ED9t account kh\xE1c m\xE0 kh\xF4ng c\u1EA7n \u0111\u1EBFn 'truy v\u1EA5n thu\u1EA7n' System program. M\u1ED9t lu\u1EADt c\u01A1 b\u1EA3n \u0111\xF3 l\xE0 program c\u1EE7a b\u1EA1n c\xF3 th\u1EC3 chuy\u1EC3n lamports t\u1EEB b\u1EA5t k\u1EF3 account n\xE0o m\xE0 n\xF3 s\u1EDF h\u1EEFu \u0111\u1EBFn g\u1EA7n nh\u01B0 h\u1EA7u h\u1EBFt c\xE1c account kh\xE1c.",-1),g=n("p",null,[s("Tuy nhi\xEAn, account nh\u1EADn "),n("em",null,"kh\xF4ng \u0111\u01B0\u1EE3c"),s(" l\xE0 account s\u1EDF h\u1EEFu b\u1EDFi ch\u01B0\u01A1ng ch\xECnh \u0111\xF3.")],-1),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"xay-dung-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#xay-dung-program","aria-hidden":"true"},"#"),s(" X\xE2y d\u1EF1ng Program")],-1),_=n("h2",{id:"lam-the-nao-\u0111e-chuyen-sol-trong-mot-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-chuyen-sol-trong-mot-program","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n SOL trong m\u1ED9t program")],-1),y=n("p",null,"Program tr\xEAn Solana c\xF3 th\u1EC3 chuy\u1EC3n lamports \u1EEB m\u1ED9t account \u0111\u1EBFn m\u1ED9t account kh\xE1c m\xE0 kh\xF4ng c\u1EA7n \u0111\u1EBFn 'truy v\u1EA5n thu\u1EA7n' System program. M\u1ED9t lu\u1EADt c\u01A1 b\u1EA3n \u0111\xF3 l\xE0 program c\u1EE7a b\u1EA1n c\xF3 th\u1EC3 chuy\u1EC3n lamports t\u1EEB b\u1EA5t k\u1EF3 account n\xE0o m\xE0 n\xF3 s\u1EDF h\u1EEFu \u0111\u1EBFn g\u1EA7n nh\u01B0 h\u1EA7u h\u1EBFt c\xE1c account kh\xE1c.",-1),g=n("p",null,[s("Tuy nhi\xEAn, account nh\u1EADn "),n("em",null,"kh\xF4ng \u0111\u01B0\u1EE3c"),s(" l\xE0 account s\u1EDF h\u1EEFu b\u1EDFi ch\u01B0\u01A1ng ch\xECnh \u0111\xF3.")],-1),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -235,7 +235,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),S=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),x=n("p",null,"Ch\u1EC9 th\u1ECB \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng gi\u1EDD ch\u1EC9 c\u1EA7n truy\u1EC1n duy nh\u1EA5t tr\u1EA1ng th\xE1i v\xE0 account ch\u1ECBu ph\xED.",-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),C=n("p",null,"Ch\u1EC9 th\u1ECB \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng gi\u1EDD ch\u1EC9 c\u1EA7n truy\u1EC1n duy nh\u1EA5t tr\u1EA1ng th\xE1i v\xE0 account ch\u1ECBu ph\xED.",-1),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1ECDi gi\u1EEFa c\xE1c program (Cross Program Invocation - CPI)

    M\u1ED9t CPI hi\u1EC3u \u0111\u01A1n gi\u1EA3n l\xE0 g\u1ECDi ch\u1EC9 th\u1ECB c\u1EE7a m\u1ED9t program t\u1EEB m\u1ED9t program kh\xE1c. M\u1ED9t v\xED d\u1EE5 kinh \u0111i\u1EC3n l\xE0 h\xE0m swap trong Uniswap. Ch\u01B0\u01A1ng tr\xECnh UniswapV2Router, l\xE0 ch\u01B0\u01A1ng tr\xECnh x\u1EED l\xFD lu\u1EADn l\xFD cho qu\xE1 tr\xECnh ho\xE1n \u0111\u1ED5i c\xE1c lo\u1EA1i token, s\u1EBD g\u1ECDi qua ch\u01B0\u01A1ng tr\xECnh ERC20 \u0111\u1EC3 th\u1EF1c hi\u1EC7n ch\u1EE9c n\u0103ng chuy\u1EC3n token t\u1EEB \u0111\xF3 ho\xE1n \u0111\u1ED5i c\xE1c token v\u1EDBi nhau. T\u01B0\u01A1ng t\u1EF1 v\u1EADy, ch\xFAng ta mu\u1ED1n c\xF3 th\u1EC3 g\u1ECDi ch\u1EC9 th\u1ECB c\u1EE7a m\u1ED9t program cho nhi\u1EC1u m\u1EE5c \u0111\xEDch kh\xE1c nhau.

    C\xD9ng nhau xem qua v\xED d\u1EE5 \u0111\u1EA7u ti\xEAn v\u1EC1 ch\u1EC9 th\u1ECB transfer c\u1EE7a SPL Token Program. Nh\u1EEFng account c\u1EA7n thi\u1EBFt ch\xFAng ta c\u1EA7n truy\u1EC1n v\xE0o s\u1EBD l\xE0:

    1. Token Account ngu\u1ED3n (Account m\xE0 ch\xFAng ta \u0111ang gi\u1EEF token)
    2. Token Account \u0111\xEDch (Account ch\xFAng ta mu\u1ED1n chuy\u1EC3n token t\u1EDBi)
    3. Ch\u1EE7 s\u1EDF h\u1EEFu Token Account ngu\u1ED3n (\u0110\u1ECBa ch\u1EC9 v\xED c\u1EE7a ch\xFAng ta v\xE0 s\u1EBD d\xF9ng \u0111\u1EC3 k\xFD)
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),B=p('

    L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 g\u1ECDi gi\u1EEFa c\xE1c program (Cross Program Invocation - CPI)

    M\u1ED9t CPI hi\u1EC3u \u0111\u01A1n gi\u1EA3n l\xE0 g\u1ECDi ch\u1EC9 th\u1ECB c\u1EE7a m\u1ED9t program t\u1EEB m\u1ED9t program kh\xE1c. M\u1ED9t v\xED d\u1EE5 kinh \u0111i\u1EC3n l\xE0 h\xE0m swap trong Uniswap. Ch\u01B0\u01A1ng tr\xECnh UniswapV2Router, l\xE0 ch\u01B0\u01A1ng tr\xECnh x\u1EED l\xFD lu\u1EADn l\xFD cho qu\xE1 tr\xECnh ho\xE1n \u0111\u1ED5i c\xE1c lo\u1EA1i token, s\u1EBD g\u1ECDi qua ch\u01B0\u01A1ng tr\xECnh ERC20 \u0111\u1EC3 th\u1EF1c hi\u1EC7n ch\u1EE9c n\u0103ng chuy\u1EC3n token t\u1EEB \u0111\xF3 ho\xE1n \u0111\u1ED5i c\xE1c token v\u1EDBi nhau. T\u01B0\u01A1ng t\u1EF1 v\u1EADy, ch\xFAng ta mu\u1ED1n c\xF3 th\u1EC3 g\u1ECDi ch\u1EC9 th\u1ECB c\u1EE7a m\u1ED9t program cho nhi\u1EC1u m\u1EE5c \u0111\xEDch kh\xE1c nhau.

    C\xD9ng nhau xem qua v\xED d\u1EE5 \u0111\u1EA7u ti\xEAn v\u1EC1 ch\u1EC9 th\u1ECB transfer c\u1EE7a SPL Token Program. Nh\u1EEFng account c\u1EA7n thi\u1EBFt ch\xFAng ta c\u1EA7n truy\u1EC1n v\xE0o s\u1EBD l\xE0:

    1. Token Account ngu\u1ED3n (Account m\xE0 ch\xFAng ta \u0111ang gi\u1EEF token)
    2. Token Account \u0111\xEDch (Account ch\xFAng ta mu\u1ED1n chuy\u1EC3n token t\u1EDBi)
    3. Ch\u1EE7 s\u1EDF h\u1EEFu Token Account ngu\u1ED3n (\u0110\u1ECBa ch\u1EC9 v\xED c\u1EE7a ch\xFAng ta v\xE0 s\u1EBD d\xF9ng \u0111\u1EC3 k\xFD)
    ',4),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("p",null,"Ch\u1EC9 th\u1ECB \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng s\u1EBD tr\xF4ng gi\u1ED1ng nh\u01B0 b\xEAn d\u01B0\u1EDBi. \u0110\u1EC3 bi\u1EBFt c\xE1ch t\u1EA1o mint v\xE0 token account, vui \xF2ng tham kh\u1EA3o c\xE1c \u0111o\u1EA1n m\xE3 b\xEAn c\u1EA1nh.",-1),B=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("p",null,"Ch\u1EC9 th\u1ECB \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng s\u1EBD tr\xF4ng gi\u1ED1ng nh\u01B0 b\xEAn d\u01B0\u1EDBi. \u0110\u1EC3 bi\u1EBFt c\xE1ch t\u1EA1o mint v\xE0 token account, vui \xF2ng tham kh\u1EA3o c\xE1c \u0111o\u1EA1n m\xE3 b\xEAn c\u1EA1nh.",-1),M=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),H=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),H=p("

    B\xE2y gi\u1EDD h\xE3y th\u1EED c\xF9ng nhau xem qua m\u1ED9t v\xED d\u1EE5 kh\xE1c v\u1EDBi ch\u1EC9 th\u1ECB create_account c\u1EE7a System Program. L\u1EA7n n\xE0y, ch\xFAng ta kh\xF4ng c\u1EA7n ph\u1EA3i truy\u1EC1n token_program nh\u01B0 l\xE0 m\u1ED9t account trong h\xE0m invoke. Ngo\xE0i ra, b\u1EA1n v\u1EABn c\u1EA7n ph\u1EA3i truy\u1EC1n program_id trong c\xE2u ch\u1EC9 th\u1ECB d\u1EABn v\xE0 trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y program_id s\u1EBD l\xE0 \u0111\u1ECBa ch\u1EC9 System Program, ("11111111111111111111111111111111"). C\xE1c account truy\u1EC1n v\xE0o s\u1EBD l\xE0:

    1. Account ch\u1ECBu ph\xED \u0111\u1EC3 tr\u1EA3 ph\xED thu\xEA
    2. Account \u0111\u1EC3 \u0111\u01B0\u1EE3c t\u1EA1o
    3. Account cho System Program
    ",2),G=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),q=p("

    B\xE2y gi\u1EDD h\xE3y th\u1EED c\xF9ng nhau xem qua m\u1ED9t v\xED d\u1EE5 kh\xE1c v\u1EDBi ch\u1EC9 th\u1ECB create_account c\u1EE7a System Program. L\u1EA7n n\xE0y, ch\xFAng ta kh\xF4ng c\u1EA7n ph\u1EA3i truy\u1EC1n token_program nh\u01B0 l\xE0 m\u1ED9t account trong h\xE0m invoke. Ngo\xE0i ra, b\u1EA1n v\u1EABn c\u1EA7n ph\u1EA3i truy\u1EC1n program_id trong c\xE2u ch\u1EC9 th\u1ECB d\u1EABn v\xE0 trong tr\u01B0\u1EDDng h\u1EE3p n\xE0y program_id s\u1EBD l\xE0 \u0111\u1ECBa ch\u1EC9 System Program, ("11111111111111111111111111111111"). C\xE1c account truy\u1EC1n v\xE0o s\u1EBD l\xE0:

    1. Account ch\u1ECBu ph\xED \u0111\u1EC3 tr\u1EA3 ph\xED thu\xEA
    2. Account \u0111\u1EC3 \u0111\u01B0\u1EE3c t\u1EA1o
    3. Account cho System Program
    ",2),G=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -883,7 +893,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" account_span "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br")])],-1),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" account_span "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),W=n("p",null,"T\u01B0\u01A1ng t\u1EF1 code \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng s\u1EBD gi\u1ED1ng nh\u01B0 sau:",-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),F=n("p",null,"T\u01B0\u01A1ng t\u1EF1 code \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng s\u1EBD gi\u1ED1ng nh\u01B0 sau:",-1),W=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),sn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),sn=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function mn(dn,_n){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,g,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[f]),_:1})]),_:1}),h,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[w]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),x,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[M]),_:1})]),_:1}),L,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[B]),preview:a(()=>[q]),_:1})]),_:1}),H,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,Q,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[$]),preview:a(()=>[X]),_:1})]),_:1}),Z,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,tn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[on]),preview:a(()=>[en]),_:1})]),_:1}),cn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1})],64)}var gn=r(m,[["render",mn]]);export{gn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function mn(dn,_n){const l=c("CodeGroupItem"),u=c("CodeGroup"),o=c("SolanaCodeGroupItem"),e=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,g,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[f]),_:1})]),_:1}),h,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[w]),preview:a(()=>[A]),_:1})]),_:1}),P,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[v]),preview:a(()=>[S]),_:1})]),_:1}),C,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[x]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),B,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[z]),_:1})]),_:1}),L,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[M]),preview:a(()=>[H]),_:1})]),_:1}),q,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,Q,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[$]),preview:a(()=>[X]),_:1})]),_:1}),Z,t(e,null,{default:a(()=>[t(o,{title:"TS",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,tn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[on]),preview:a(()=>[en]),_:1})]),_:1}),cn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,t(e,null,{default:a(()=>[t(o,{title:"Rust",active:""},{default:a(()=>[kn]),preview:a(()=>[bn]),_:1})]),_:1})],64)}var gn=r(m,[["render",mn]]);export{gn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.a673792c.js b/docs/.vuepress/dist/assets/programs.html.b4edbb78.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.a673792c.js rename to docs/.vuepress/dist/assets/programs.html.b4edbb78.js index 20eb50549..e4ab61381 100644 --- a/docs/.vuepress/dist/assets/programs.html.a673792c.js +++ b/docs/.vuepress/dist/assets/programs.html.b4edbb78.js @@ -1,2 +1,2 @@ -import{_ as i,r as a,o as d,c as l,a as e,b as t,w as h,F as c,d as n,e as o}from"./app.07ce7a66.js";const _={},m=e("h1",{id:"programme",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programme","aria-hidden":"true"},"#"),n(" Programme")],-1),g=e("p",null,"Jeder Entwickler kann Programme f\xFCr die Solana-Blockchain schreiben und bereitstellen. Das Programm (in anderen Protokollen als Smart Contracts bekannt) dient als Grundlage f\xFCr On-Chain-Aktivit\xE4ten und treibt alles an, von DeFi und NFTs bis hin zu Social Media und Gaming.",-1),u=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),p={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,[n("Programme verarbeiten "),e("a",{href:"./transactions"},"Aneweisungen"),n(" sowohl von Endbenutzern als auch von anderen Programmen")],-1),k=n("Alle Programme sind "),P=e("em",null,"zustandslos",-1),v=n(" ("),w=e("em",null,"stateless",-1),z=n("): Alle Daten, mit denen sie interagieren, werden in separaten "),S=n("Konten"),L=n(" gespeichert, die \xFCber Anweisungen gegeben werden."),B=e("li",null,'Programme selbst werden in Konten gespeichert, die als "ausf\xFChrbar" gekennzeichnet sind',-1),y=n("Alle Programme geh\xF6ren dem "),D={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=n("BPF Loader"),A=n(" und werden von der "),E={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},F=n("Solana Runtime"),C=n(" ausgef\xFChrt"),R=n("Entwickler schreiben am h\xE4ufigsten Programme in Rust oder C++, k\xF6nnen aber jede Sprache w\xE4hlen, die auf das "),K={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=n("LLVM"),N=n("'s "),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=n("BPF"),T=n(" Backend abziehlt"),j=o("
  • Alle Programme haben einen einzigen Einstiegspunkt, an dem die Befehlsverarbeitung stattfindet (i.e. process_instruction); Parameter beinhalten immer:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),O=e("h2",{id:"deep-dive",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),n(" Deep Dive")],-1),U=e("p",null,"Im Gegensatz zu den meisten anderen Blockchains trennt Solana Code vollst\xE4ndig von Daten. Alle Daten, mit denen Programme interagieren, werden in separaten Konten gespeichert und als Referenzen \xFCber Anweisungen weitergegeben. Dieses Modell erm\xF6glicht es, dass ein einziges generisches Programm \xFCber verschiedene Konten l\xE4uft, ohne dass zus\xE4tzliche Bereitstellungen (Deployments) erforderlich sind. \xDCbliche Beispiele f\xFCr dieses Muster finden sich in den Native- und SPL-Programmen.",-1),G=e("h3",{id:"native-programme-die-solana-programm-bibliothek-spl-solana-program-library",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-programme-die-solana-programm-bibliothek-spl-solana-program-library","aria-hidden":"true"},"#"),n(" Native Programme & Die Solana Programm Bibliothek (SPL - Solana Program Library)")],-1),J=n("Solana ist mit einer Reihe von Programmen ausgestattet, die als Kernbausteine \u200B\u200Bf\xFCr On-Chain-Interaktionen dienen. Diese Programme sind unterteilt in "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},q=n("Native Programme"),H=n(" und "),Q={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},X=n("Solana Programm (SPL) Bibliotheken"),Y=n("."),Z=n("Native Programme stellen die Basisfunktionalit\xE4t bereit, die f\xFCr den Betrieb von Validatoren erforderlich ist. Unter diesen Programmen ist das bekannteste das "),$={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},ee=n("System Programm"),ne=n(", welches f\xFCr die Verwaltung neuer Konten und die \xDCbertragung von SOL zwischen zwei Parteien verantwortlich ist."),te=n("SPL-Programme unterst\xFCtzen eine Reihe von On-Chain-Aktivit\xE4ten, darunter das Erstellen, Tauschen und Verleihen von Token sowie die Generierung von Stake-Pools und die Aufrechterhaltung eines On-Chain-Namensdienstes. Das "),re={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},oe=n("SPL Token Program"),ae=n(" an direkt \xFCber die CLI aufgerufen werden, w\xE4hrend andere wie das "),se={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ie=n("verbundene Token-Kontoprogramm"),de=n(" werden normalerweise mit benutzerdefinierten Programmen zusammengestellt."),le=e("h3",{id:"writing-programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),n(" Writing Programs")],-1),he=n("Programme werden am h\xE4ufigsten mit Rust oder C++ entwickelt, k\xF6nnen aber mit jeder Sprache entwickelt werden, die auf das BPF-Backend des LLVM abzielt. J\xFCngste Initiativen von "),ce={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},_e=n("Neon Labs"),me=n(" und "),ge={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ue=n("Solang"),pe=n(" erm\xF6glichen jedoch "),be={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},fe=n("EVM"),ke=n(" Kompatibilit\xE4t und erm\xF6glichen es Entwicklern, Programme in Solidity zu schreiben."),Pe=o("

    Die meisten Rust-basierten Programme halten sich an die folgende Architektur:

    DateiBeschreibung
    lib.rsModule registrieren
    entrypoint.rsEinstieg ins Programm
    instruction.rsProgramm-API, (De-)Serialisierung von Befehlsdaten
    processor.rsProgrammlogik
    state.rsProgrammobjekte, (De-)Serialisierungszustand
    error.rsProgrammspezifische Fehler
    ",2),ve=n("K\xFCrzlich hat sich "),we={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ze=n("Anchor"),Se=n(" zu einem beliebten Framework f\xFCr die Entwicklung von Programmen entwickelt. Anchor ist ein rechthaberisches Framework, \xE4hnlich wie Ruby on Rails, das Boilerplates reduziert und den (De-)Serialisierungsprozess f\xFCr die Rust-basierte Entwicklung rationalisiert."),Le=o("

    Programme werden normalerweise entwickelt und in Localhost- und Devnet-Umgebungen getestet, bevor sie auf Testnet oder Mainnet bereitgestellt werden. Solana unterst\xFCtzt die folgenden Umgebungen:

    Cluster-UmgebungRPC Verbindungs URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),Be=n("Nach der Bereitstellung in einer Umgebung k\xF6nnen Clients mit On-Chain-Programmen \xFCber "),ye={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},De=n("RPC Verbindungen"),xe=n(" mit dem jeweiligen Cluster interagieren."),Ae=e("h3",{id:"bereitstellen-von-programmen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#bereitstellen-von-programmen","aria-hidden":"true"},"#"),n(" Bereitstellen von Programmen")],-1),Ee=n("Entwickler k\xF6nnen ihre Programme \xFCber die "),Fe={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ce=n("CLI"),Re=n(" bereitstellen:"),Ke=o(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as a,o as d,c as l,a as e,b as t,w as h,F as c,d as n,e as o}from"./app.d411e3b3.js";const _={},m=e("h1",{id:"programme",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programme","aria-hidden":"true"},"#"),n(" Programme")],-1),g=e("p",null,"Jeder Entwickler kann Programme f\xFCr die Solana-Blockchain schreiben und bereitstellen. Das Programm (in anderen Protokollen als Smart Contracts bekannt) dient als Grundlage f\xFCr On-Chain-Aktivit\xE4ten und treibt alles an, von DeFi und NFTs bis hin zu Social Media und Gaming.",-1),u=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),n(" Facts")],-1),p={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,[n("Programme verarbeiten "),e("a",{href:"./transactions"},"Aneweisungen"),n(" sowohl von Endbenutzern als auch von anderen Programmen")],-1),k=n("Alle Programme sind "),P=e("em",null,"zustandslos",-1),v=n(" ("),w=e("em",null,"stateless",-1),z=n("): Alle Daten, mit denen sie interagieren, werden in separaten "),S=n("Konten"),L=n(" gespeichert, die \xFCber Anweisungen gegeben werden."),B=e("li",null,'Programme selbst werden in Konten gespeichert, die als "ausf\xFChrbar" gekennzeichnet sind',-1),y=n("Alle Programme geh\xF6ren dem "),D={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=n("BPF Loader"),A=n(" und werden von der "),E={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},F=n("Solana Runtime"),C=n(" ausgef\xFChrt"),R=n("Entwickler schreiben am h\xE4ufigsten Programme in Rust oder C++, k\xF6nnen aber jede Sprache w\xE4hlen, die auf das "),K={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=n("LLVM"),N=n("'s "),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=n("BPF"),T=n(" Backend abziehlt"),j=o("
  • Alle Programme haben einen einzigen Einstiegspunkt, an dem die Befehlsverarbeitung stattfindet (i.e. process_instruction); Parameter beinhalten immer:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),O=e("h2",{id:"deep-dive",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),n(" Deep Dive")],-1),U=e("p",null,"Im Gegensatz zu den meisten anderen Blockchains trennt Solana Code vollst\xE4ndig von Daten. Alle Daten, mit denen Programme interagieren, werden in separaten Konten gespeichert und als Referenzen \xFCber Anweisungen weitergegeben. Dieses Modell erm\xF6glicht es, dass ein einziges generisches Programm \xFCber verschiedene Konten l\xE4uft, ohne dass zus\xE4tzliche Bereitstellungen (Deployments) erforderlich sind. \xDCbliche Beispiele f\xFCr dieses Muster finden sich in den Native- und SPL-Programmen.",-1),G=e("h3",{id:"native-programme-die-solana-programm-bibliothek-spl-solana-program-library",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-programme-die-solana-programm-bibliothek-spl-solana-program-library","aria-hidden":"true"},"#"),n(" Native Programme & Die Solana Programm Bibliothek (SPL - Solana Program Library)")],-1),J=n("Solana ist mit einer Reihe von Programmen ausgestattet, die als Kernbausteine \u200B\u200Bf\xFCr On-Chain-Interaktionen dienen. Diese Programme sind unterteilt in "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},q=n("Native Programme"),H=n(" und "),Q={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},X=n("Solana Programm (SPL) Bibliotheken"),Y=n("."),Z=n("Native Programme stellen die Basisfunktionalit\xE4t bereit, die f\xFCr den Betrieb von Validatoren erforderlich ist. Unter diesen Programmen ist das bekannteste das "),$={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},ee=n("System Programm"),ne=n(", welches f\xFCr die Verwaltung neuer Konten und die \xDCbertragung von SOL zwischen zwei Parteien verantwortlich ist."),te=n("SPL-Programme unterst\xFCtzen eine Reihe von On-Chain-Aktivit\xE4ten, darunter das Erstellen, Tauschen und Verleihen von Token sowie die Generierung von Stake-Pools und die Aufrechterhaltung eines On-Chain-Namensdienstes. Das "),re={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},oe=n("SPL Token Program"),ae=n(" an direkt \xFCber die CLI aufgerufen werden, w\xE4hrend andere wie das "),se={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ie=n("verbundene Token-Kontoprogramm"),de=n(" werden normalerweise mit benutzerdefinierten Programmen zusammengestellt."),le=e("h3",{id:"writing-programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),n(" Writing Programs")],-1),he=n("Programme werden am h\xE4ufigsten mit Rust oder C++ entwickelt, k\xF6nnen aber mit jeder Sprache entwickelt werden, die auf das BPF-Backend des LLVM abzielt. J\xFCngste Initiativen von "),ce={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},_e=n("Neon Labs"),me=n(" und "),ge={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ue=n("Solang"),pe=n(" erm\xF6glichen jedoch "),be={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},fe=n("EVM"),ke=n(" Kompatibilit\xE4t und erm\xF6glichen es Entwicklern, Programme in Solidity zu schreiben."),Pe=o("

    Die meisten Rust-basierten Programme halten sich an die folgende Architektur:

    DateiBeschreibung
    lib.rsModule registrieren
    entrypoint.rsEinstieg ins Programm
    instruction.rsProgramm-API, (De-)Serialisierung von Befehlsdaten
    processor.rsProgrammlogik
    state.rsProgrammobjekte, (De-)Serialisierungszustand
    error.rsProgrammspezifische Fehler
    ",2),ve=n("K\xFCrzlich hat sich "),we={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ze=n("Anchor"),Se=n(" zu einem beliebten Framework f\xFCr die Entwicklung von Programmen entwickelt. Anchor ist ein rechthaberisches Framework, \xE4hnlich wie Ruby on Rails, das Boilerplates reduziert und den (De-)Serialisierungsprozess f\xFCr die Rust-basierte Entwicklung rationalisiert."),Le=o("

    Programme werden normalerweise entwickelt und in Localhost- und Devnet-Umgebungen getestet, bevor sie auf Testnet oder Mainnet bereitgestellt werden. Solana unterst\xFCtzt die folgenden Umgebungen:

    Cluster-UmgebungRPC Verbindungs URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),Be=n("Nach der Bereitstellung in einer Umgebung k\xF6nnen Clients mit On-Chain-Programmen \xFCber "),ye={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},De=n("RPC Verbindungen"),xe=n(" mit dem jeweiligen Cluster interagieren."),Ae=e("h3",{id:"bereitstellen-von-programmen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#bereitstellen-von-programmen","aria-hidden":"true"},"#"),n(" Bereitstellen von Programmen")],-1),Ee=n("Entwickler k\xF6nnen ihre Programme \xFCber die "),Fe={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ce=n("CLI"),Re=n(" bereitstellen:"),Ke=o(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Ve=n("Wenn ein Programm bereitgestellt wird, wird es zu einem "),Ne={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ie=n("ELF shared object"),Me=n(" kompiliert und in den Solana-Cluster hochgeladen. Programme befinden sich in Konten (\xE4hnlich wie alles andere auf Solana), au\xDFer dass diese Konten als \u201Eausf\xFChrbar\u201C markiert und dem BPF Loader zugewiesen sind. Die Adresse dieses Kontos wird als \u201Eprogram_id\u201C bezeichnet und wird verwendet, um bei allen zuk\xFCnftigen Transaktionen auf das Programm zu verweisen."),Te=n("Solana unterst\xFCtzt mehrere BPF Loader, wobei der neueste der "),je={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Oe=n("aktualisierbare BPF Lader"),Ue=n(". Der BPF Loader ist daf\xFCr verantwortlich, das Konto des Programms zu verwalten und es den Clients \xFCber die \u201Eprogram_id\u201C zur Verf\xFCgung zu stellen. Alle Programme haben einen einzigen Einstiegspunkt, an dem die Befehlsverarbeitung stattfindet (d. h. \u201Eprocess_instruction\u201C), und die Parameter beinhalten immer:"),Ge=o('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Einmal aufgerufen, werden Programme von der Solana-Laufzeit ausgef\xFChrt.

    Weitere Quellen

    ',3),Je={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},We=n("Offizielle Dokumentation"),qe={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},He=n("SPL Dokumentation"),Qe={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},Xe=n("Programm-Bereitstellung von Justin Starry"),Ye={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},Ze=n("Solana Starter Kit von Iron Addicted Dog"),$e={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},en=n("Programmierung auf Solana by Paulx"),nn={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},tn=n("Eine Einf\xFChrung in die Solana Blockchain von Hana"),rn={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},on=n("Anchor");function an(sn,dn){const s=a("RouterLink"),r=a("ExternalLinkIcon");return d(),l(c,null,[m,g,u,e("div",p,[b,e("ul",null,[f,e("li",null,[k,P,v,w,z,t(s,{to:"/de/core-concepts/accounts.html"},{default:h(()=>[S]),_:1}),L]),B,e("li",null,[y,e("a",D,[x,t(r)]),A,e("a",E,[F,t(r)]),C]),e("li",null,[R,e("a",K,[V,t(r)]),N,e("a",I,[M,t(r)]),T]),j])]),O,U,G,e("p",null,[J,e("a",W,[q,t(r)]),H,e("a",Q,[X,t(r)]),Y]),e("p",null,[Z,e("a",$,[ee,t(r)]),ne]),e("p",null,[te,e("a",re,[oe,t(r)]),ae,e("a",se,[ie,t(r)]),de]),le,e("p",null,[he,e("a",ce,[_e,t(r)]),me,e("a",ge,[ue,t(r)]),pe,e("a",be,[fe,t(r)]),ke]),Pe,e("p",null,[ve,e("a",we,[ze,t(r)]),Se]),Le,e("p",null,[Be,e("a",ye,[De,t(r)]),xe]),Ae,e("p",null,[Ee,e("a",Fe,[Ce,t(r)]),Re]),Ke,e("p",null,[Ve,e("a",Ne,[Ie,t(r)]),Me]),e("p",null,[Te,e("a",je,[Oe,t(r)]),Ue]),Ge,e("ul",null,[e("li",null,[e("a",Je,[We,t(r)])]),e("li",null,[e("a",qe,[He,t(r)])]),e("li",null,[e("a",Qe,[Xe,t(r)])]),e("li",null,[e("a",Ye,[Ze,t(r)])]),e("li",null,[e("a",$e,[en,t(r)])]),e("li",null,[e("a",nn,[tn,t(r)])]),e("li",null,[e("a",rn,[on,t(r)])])])],64)}var hn=i(_,[["render",an]]);export{hn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.09c93a73.js b/docs/.vuepress/dist/assets/programs.html.b5bf5151.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.09c93a73.js rename to docs/.vuepress/dist/assets/programs.html.b5bf5151.js index 46dcdfe0d..13ab54642 100644 --- a/docs/.vuepress/dist/assets/programs.html.09c93a73.js +++ b/docs/.vuepress/dist/assets/programs.html.b5bf5151.js @@ -1,2 +1,2 @@ -import{_ as i,r as a,o as d,c,a as e,b as o,w as l,F as h,d as t,e as n}from"./app.07ce7a66.js";const _={},p=e("h1",{id:"programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),t(" Programs")],-1),g=e("p",null,"Any developer can write and deploy programs to the Solana blockchain. Programs (known as smart contracts on other protocols) serve as the foundation for on-chain activity, powering anything from DeFi and NFTs to Social Media and Gaming.",-1),m=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),u={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,[t("Programs process "),e("a",{href:"./transactions"},"instructions"),t(" from both end users and other programs")],-1),k=t("All programs are "),v=e("em",null,"stateless",-1),y=t(": any data they interact with is stored in separate "),P=t("accounts"),w=t(" that are passed in via instructions"),L=e("li",null,[t("Programs themselves are stored in accounts marked as "),e("code",null,"executable")],-1),S=t("All programs are owned by the "),x={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},F=t("BPF Loader"),R=t(" and executed by the "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},B=t("Solana Runtime"),D=t("Developers most commonly write programs in Rust or C++, but can choose any language that targets the "),T={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},C=t("LLVM"),N=t("'s "),E={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},I=t("BPF"),M=t(" backend"),V=n("
  • All programs have a single entry point where instruction processing takes place (i.e. process_instruction); parameters always include:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),O=e("h2",{id:"deep-dive",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),t(" Deep Dive")],-1),z=e("p",null,"Unlike most other blockchains, Solana completely separates code from data. All data that programs interact with are stored in separate accounts and passed in as references via instructions. This model allows for a single generic program to operate across various accounts without requiring additional deployments. Common examples of this pattern are seen across the Native and SPL Programs.",-1),j=e("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),t(" Native Programs & The Solana Program Library (SPL)")],-1),U=t("Solana comes equipped with a number of programs that serve as core building blocks for on-chain interactions. These programs are divided into "),q={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=t("Native Programs"),H=t(" and "),W={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},J=t("Solana Program Library (SPL) Programs"),K=t("."),Q=t("Native Programs provide the base functionality that is required to operate validators. Among these programs, the most well known is the "),X={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Y=t("System Program"),Z=t(" which is responsible for administering new accounts and transferring SOL between two parties."),$=t("SPL Programs support a number of on-chain activities, including creating, swapping, and lending tokens, as well as generating stake pools and maintaining an on-chain name service. The "),ee={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},te=t("SPL Token Program"),oe=t(" can be invoked directly via the CLI, while others like the "),re={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ne=t("Associated Token Account Program"),ae=t(" are usually composed with custom programs."),se=e("h3",{id:"writing-programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),t(" Writing Programs")],-1),ie=t("Programs are most commonly developed with Rust or C++, but can be developed with any language that targets the LLVM\u2019s BPF backend. Recent initiatives by "),de={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ce=t("Neon Labs"),le=t(" and "),he={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_e=t("Solang"),pe=t(" enable "),ge={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},me=t("EVM"),ue=t(" compatibility and allow developers to write programs in Solidity."),be=n("

    Most Rust-based programs adhere to the following architecture:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),fe=t("Recently, "),ke={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ve=t("Anchor"),ye=t(" has emerged as a popular framework for developing programs. Anchor is an opinionated framework, akin to Ruby on Rails, that reduces boilerplate and streamlines the (de)serialization process for Rust-based development."),Pe=n("

    Programs are usually developed and tested against Localhost and Devnet environments before being deployed to Testnet or Mainnet. Solana supports the following environments:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),we=t("Once deployed to an environment, clients can interact with on-chain programs via "),Le={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Se=t("RPC connections"),xe=t(" to the respective cluster."),Fe=e("h3",{id:"deploying-programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deploying-programs","aria-hidden":"true"},"#"),t(" Deploying Programs")],-1),Re=t("Developers can deploy their programs via the "),Ae={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Be=t("CLI"),De=t(":"),Te=n(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as a,o as d,c,a as e,b as o,w as l,F as h,d as t,e as n}from"./app.d411e3b3.js";const _={},p=e("h1",{id:"programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programs","aria-hidden":"true"},"#"),t(" Programs")],-1),g=e("p",null,"Any developer can write and deploy programs to the Solana blockchain. Programs (known as smart contracts on other protocols) serve as the foundation for on-chain activity, powering anything from DeFi and NFTs to Social Media and Gaming.",-1),m=e("h2",{id:"facts",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#facts","aria-hidden":"true"},"#"),t(" Facts")],-1),u={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,[t("Programs process "),e("a",{href:"./transactions"},"instructions"),t(" from both end users and other programs")],-1),k=t("All programs are "),v=e("em",null,"stateless",-1),y=t(": any data they interact with is stored in separate "),P=t("accounts"),w=t(" that are passed in via instructions"),L=e("li",null,[t("Programs themselves are stored in accounts marked as "),e("code",null,"executable")],-1),S=t("All programs are owned by the "),x={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},F=t("BPF Loader"),R=t(" and executed by the "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},B=t("Solana Runtime"),D=t("Developers most commonly write programs in Rust or C++, but can choose any language that targets the "),T={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},C=t("LLVM"),N=t("'s "),E={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},I=t("BPF"),M=t(" backend"),V=n("
  • All programs have a single entry point where instruction processing takes place (i.e. process_instruction); parameters always include:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),O=e("h2",{id:"deep-dive",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deep-dive","aria-hidden":"true"},"#"),t(" Deep Dive")],-1),z=e("p",null,"Unlike most other blockchains, Solana completely separates code from data. All data that programs interact with are stored in separate accounts and passed in as references via instructions. This model allows for a single generic program to operate across various accounts without requiring additional deployments. Common examples of this pattern are seen across the Native and SPL Programs.",-1),j=e("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),t(" Native Programs & The Solana Program Library (SPL)")],-1),U=t("Solana comes equipped with a number of programs that serve as core building blocks for on-chain interactions. These programs are divided into "),q={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=t("Native Programs"),H=t(" and "),W={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},J=t("Solana Program Library (SPL) Programs"),K=t("."),Q=t("Native Programs provide the base functionality that is required to operate validators. Among these programs, the most well known is the "),X={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Y=t("System Program"),Z=t(" which is responsible for administering new accounts and transferring SOL between two parties."),$=t("SPL Programs support a number of on-chain activities, including creating, swapping, and lending tokens, as well as generating stake pools and maintaining an on-chain name service. The "),ee={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},te=t("SPL Token Program"),oe=t(" can be invoked directly via the CLI, while others like the "),re={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},ne=t("Associated Token Account Program"),ae=t(" are usually composed with custom programs."),se=e("h3",{id:"writing-programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#writing-programs","aria-hidden":"true"},"#"),t(" Writing Programs")],-1),ie=t("Programs are most commonly developed with Rust or C++, but can be developed with any language that targets the LLVM\u2019s BPF backend. Recent initiatives by "),de={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ce=t("Neon Labs"),le=t(" and "),he={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_e=t("Solang"),pe=t(" enable "),ge={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},me=t("EVM"),ue=t(" compatibility and allow developers to write programs in Solidity."),be=n("

    Most Rust-based programs adhere to the following architecture:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors
    ",2),fe=t("Recently, "),ke={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ve=t("Anchor"),ye=t(" has emerged as a popular framework for developing programs. Anchor is an opinionated framework, akin to Ruby on Rails, that reduces boilerplate and streamlines the (de)serialization process for Rust-based development."),Pe=n("

    Programs are usually developed and tested against Localhost and Devnet environments before being deployed to Testnet or Mainnet. Solana supports the following environments:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),we=t("Once deployed to an environment, clients can interact with on-chain programs via "),Le={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Se=t("RPC connections"),xe=t(" to the respective cluster."),Fe=e("h3",{id:"deploying-programs",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deploying-programs","aria-hidden":"true"},"#"),t(" Deploying Programs")],-1),Re=t("Developers can deploy their programs via the "),Ae={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Be=t("CLI"),De=t(":"),Te=n(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Ce=t("When a program is deployed, it is compiled to an "),Ne={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ee=t("ELF shared object"),Ie=t(" (containing BPF bytecode) and uploaded to the Solana cluster. Programs live in accounts (much like everything else on Solana), except these accounts are marked as "),Me=e("code",null,"executable",-1),Ve=t(" and assigned to the BPF Loader. The address of this account is referred to as the "),Oe=e("code",null,"program_id",-1),ze=t(" and is used to reference the program in all future transactions."),je=t("Solana supports multiple BPF Loaders, with the latest being the "),Ue={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},qe=t("Upgradable BPF Loader"),Ge=t(". The BPF Loader is responsible for administering the program\u2019s account and making it available to clients via the "),He=e("code",null,"program_id",-1),We=t(". All programs have a single entry point where instruction processing takes place (i.e. "),Je=e("code",null,"process_instruction",-1),Ke=t(") and parameters always include:"),Qe=n('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Once invoked, programs are executed by the Solana Runtime.

    Other Resources

    ',3),Xe={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Ye=t("Official Documentation"),Ze={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},$e=t("SPL Documentation"),et={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},tt=t("Program Deploys by Justin Starry"),ot={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},rt=t("Solana Starter Kit by Iron Addicted Dog"),nt={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},at=t("Programming on Solana by Paulx"),st={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},it=t("An Introduction to the Solana Blockchain by Hana"),dt={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ct=t("Anchor");function lt(ht,_t){const s=a("RouterLink"),r=a("ExternalLinkIcon");return d(),c(h,null,[p,g,m,e("div",u,[b,e("ul",null,[f,e("li",null,[k,v,y,o(s,{to:"/core-concepts/accounts.html"},{default:l(()=>[P]),_:1}),w]),L,e("li",null,[S,e("a",x,[F,o(r)]),R,e("a",A,[B,o(r)])]),e("li",null,[D,e("a",T,[C,o(r)]),N,e("a",E,[I,o(r)]),M]),V])]),O,z,j,e("p",null,[U,e("a",q,[G,o(r)]),H,e("a",W,[J,o(r)]),K]),e("p",null,[Q,e("a",X,[Y,o(r)]),Z]),e("p",null,[$,e("a",ee,[te,o(r)]),oe,e("a",re,[ne,o(r)]),ae]),se,e("p",null,[ie,e("a",de,[ce,o(r)]),le,e("a",he,[_e,o(r)]),pe,e("a",ge,[me,o(r)]),ue]),be,e("p",null,[fe,e("a",ke,[ve,o(r)]),ye]),Pe,e("p",null,[we,e("a",Le,[Se,o(r)]),xe]),Fe,e("p",null,[Re,e("a",Ae,[Be,o(r)]),De]),Te,e("p",null,[Ce,e("a",Ne,[Ee,o(r)]),Ie,Me,Ve,Oe,ze]),e("p",null,[je,e("a",Ue,[qe,o(r)]),Ge,He,We,Je,Ke]),Qe,e("ul",null,[e("li",null,[e("a",Xe,[Ye,o(r)])]),e("li",null,[e("a",Ze,[$e,o(r)])]),e("li",null,[e("a",et,[tt,o(r)])]),e("li",null,[e("a",ot,[rt,o(r)])]),e("li",null,[e("a",nt,[at,o(r)])]),e("li",null,[e("a",st,[it,o(r)])]),e("li",null,[e("a",dt,[ct,o(r)])])])],64)}var gt=i(_,[["render",lt]]);export{gt as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.6801ed73.js b/docs/.vuepress/dist/assets/programs.html.b7903707.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.6801ed73.js rename to docs/.vuepress/dist/assets/programs.html.b7903707.js index ac3dbc284..0723a3f4b 100644 --- a/docs/.vuepress/dist/assets/programs.html.6801ed73.js +++ b/docs/.vuepress/dist/assets/programs.html.b7903707.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u4F5C\u6210",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u4F5C\u6210","aria-hidden":"true"},"#"),s(" \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F5C\u6210")],-1),_=n("h2",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099sol\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099sol\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30D7\u30ED\u30B0\u30E9\u30E0\u3067SOL\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5")],-1),y=n("p",null,[s("Solana \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30B7\u30B9\u30C6\u30E0 \u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u300C\u547C\u3073\u51FA\u3059\u300D\u3053\u3068\u306A\u304F\u3001\u30E9\u30F3\u30DD\u30FC\u30C8\u3092\u3042\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u8EE2\u9001\u3067\u304D\u307E\u3059\u3002\u57FA\u672C\u7684\u306A\u30EB\u30FC\u30EB\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u304C"),n("strong",null,"\u6240\u6709\u3059\u308B"),s("\u4EFB\u610F\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089\u4EFB\u610F\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306Blamport\u3092\u8EE2\u9001\u3067\u304D\u308B\u3053\u3068\u3067\u3059\u3002")],-1),f=n("p",null,"\u53D7\u4FE1\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u3042\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002",-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u4F5C\u6210",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u306E\u4F5C\u6210","aria-hidden":"true"},"#"),s(" \u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4F5C\u6210")],-1),_=n("h2",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099sol\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0\u3066\u3099sol\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u30D7\u30ED\u30B0\u30E9\u30E0\u3067SOL\u3092\u8EE2\u9001\u3059\u308B\u65B9\u6CD5")],-1),y=n("p",null,[s("Solana \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30B7\u30B9\u30C6\u30E0 \u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u300C\u547C\u3073\u51FA\u3059\u300D\u3053\u3068\u306A\u304F\u3001\u30E9\u30F3\u30DD\u30FC\u30C8\u3092\u3042\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u8EE2\u9001\u3067\u304D\u307E\u3059\u3002\u57FA\u672C\u7684\u306A\u30EB\u30FC\u30EB\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u304C"),n("strong",null,"\u6240\u6709\u3059\u308B"),s("\u4EFB\u610F\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u304B\u3089\u4EFB\u610F\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306Blamport\u3092\u8EE2\u9001\u3067\u304D\u308B\u3053\u3068\u3067\u3059\u3002")],-1),f=n("p",null,"\u53D7\u4FE1\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u6240\u6709\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u3042\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002",-1),w=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -233,9 +233,9 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),x=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br")])],-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),v=n("p",null,"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u5074\u306E\u547D\u4EE4\u306F\u3001\u30B9\u30C6\u30FC\u30BF\u30B9\u3068\u652F\u6255\u4EBA\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u6E21\u3059\u3060\u3051\u3067\u6E08\u307F\u307E\u3059\u3002",-1),C=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),x=n("p",null,"\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u5074\u306E\u547D\u4EE4\u306F\u3001\u30B9\u30C6\u30FC\u30BF\u30B9\u3068\u652F\u6255\u4EBA\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u6E21\u3059\u3060\u3051\u3067\u6E08\u307F\u307E\u3059\u3002",-1),v=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    \u30D7\u30ED\u30B0\u30E9\u30E0\u540C\u58EB\u306E\u547C\u3073\u51FA\u3057\u65B9\u6CD5

    \u30D7\u30ED\u30B0\u30E9\u30E0\u540C\u58EB\u547C\u3073\u51FA\u3057\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u5185\u3067\u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u3092\u547C\u3073\u51FA\u3059\u3060\u3051\u3067\u3059\u3002\u6700\u3082\u826F\u3044\u4F8B\u306E 1 \u3064\u306F\u3001Uniswap\u306Eswap\u6A5F\u80FD\u3067\u3059\u3002The UniswapV2Router\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u306F\u3001\u30B9\u30EF\u30C3\u30D7\u306B\u5FC5\u8981\u306A\u30ED\u30B8\u30C3\u30AF\u3092\u547C\u3073\u51FA\u3057\u3001ERC20\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u306E\u8EE2\u9001\u95A2\u6570\u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u3042\u308B\u4EBA\u304B\u3089\u5225\u306E\u4EBA\u306B\u30B9\u30EF\u30C3\u30D7\u3057\u307E\u3059\u3002 The same way, we can \u540C\u3058\u3088\u3046\u306B\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3092\u547C\u3073\u51FA\u3057\u306B\u306F\u3055\u307E\u3056\u307E\u306A\u76EE\u7684\u3092\u6301\u305F\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 SPL\u30C8\u30FC\u30AF\u30F3\u306E\u8EE2\u9001\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u521D\u306E\u4F8B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u9001\u91D1\u306B\u5FC5\u8981\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059\u3002

    1. \u9001\u308A\u5143\u306Esource_token_account (\u30C8\u30FC\u30AF\u30F3\u3092\u4FDD\u6301\u3057\u3066\u3044\u308B\u30A2\u30AB\u30A6\u30F3\u30C8)
    2. \u9001\u308A\u5148\u306Edestination_token_account(\u30C8\u30FC\u30AF\u30F3\u3092\u8EE2\u9001\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8)
    3. \u9001\u308A\u5143\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u3067\u3042\u308Bsource_token_account_holder (\u7F72\u540D\u3059\u308B\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9)
    ',3),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),Y=p('

    \u30D7\u30ED\u30B0\u30E9\u30E0\u540C\u58EB\u306E\u547C\u3073\u51FA\u3057\u65B9\u6CD5

    \u30D7\u30ED\u30B0\u30E9\u30E0\u540C\u58EB\u547C\u3073\u51FA\u3057\u306F\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u5185\u3067\u5225\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u547D\u4EE4\u3092\u547C\u3073\u51FA\u3059\u3060\u3051\u3067\u3059\u3002\u6700\u3082\u826F\u3044\u4F8B\u306E 1 \u3064\u306F\u3001Uniswap\u306Eswap\u6A5F\u80FD\u3067\u3059\u3002The UniswapV2Router\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u306F\u3001\u30B9\u30EF\u30C3\u30D7\u306B\u5FC5\u8981\u306A\u30ED\u30B8\u30C3\u30AF\u3092\u547C\u3073\u51FA\u3057\u3001ERC20\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u306E\u8EE2\u9001\u95A2\u6570\u3092\u547C\u3073\u51FA\u3057\u3066\u3001\u3042\u308B\u4EBA\u304B\u3089\u5225\u306E\u4EBA\u306B\u30B9\u30EF\u30C3\u30D7\u3057\u307E\u3059\u3002 The same way, we can \u540C\u3058\u3088\u3046\u306B\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3092\u547C\u3073\u51FA\u3057\u306B\u306F\u3055\u307E\u3056\u307E\u306A\u76EE\u7684\u3092\u6301\u305F\u305B\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002 SPL\u30C8\u30FC\u30AF\u30F3\u306E\u8EE2\u9001\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u306E\u6700\u521D\u306E\u4F8B\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u9001\u91D1\u306B\u5FC5\u8981\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u6B21\u306E\u3068\u304A\u308A\u3067\u3059\u3002

    1. \u9001\u308A\u5143\u306Esource_token_account (\u30C8\u30FC\u30AF\u30F3\u3092\u4FDD\u6301\u3057\u3066\u3044\u308B\u30A2\u30AB\u30A6\u30F3\u30C8)
    2. \u9001\u308A\u5148\u306Edestination_token_account(\u30C8\u30FC\u30AF\u30F3\u3092\u8EE2\u9001\u3059\u308B\u30A2\u30AB\u30A6\u30F3\u30C8)
    3. \u9001\u308A\u5143\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u6240\u6709\u8005\u3067\u3042\u308Bsource_token_account_holder (\u7F72\u540D\u3059\u308B\u30A6\u30A9\u30EC\u30C3\u30C8\u30A2\u30C9\u30EC\u30B9)
    ',3),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),B=s(" \u5BFE\u5FDC\u3059\u308B\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u6307\u793A\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002\u30DF\u30F3\u30C8\u3068\u30C8\u30FC\u30AF\u30F3\u306E\u4F5C\u6210\u624B\u9806\u306B\u3064\u3044\u3066\u306F\u3001\u8FD1\u304F\u306B\u3042\u308B\u5B8C\u5168\u306A\u30B3\u30FC\u30C9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 "),H=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),H=n("br",null,null,-1),L=s(" \u5BFE\u5FDC\u3059\u308B\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u6307\u793A\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059\u3002\u30DF\u30F3\u30C8\u3068\u30C8\u30FC\u30AF\u30F3\u306E\u4F5C\u6210\u624B\u9806\u306B\u3064\u3044\u3066\u306F\u3001\u8FD1\u304F\u306B\u3042\u308B\u5B8C\u5168\u306A\u30B3\u30FC\u30C9\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002 "),M=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),F=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    \u6B21\u306E\u4F8B\u3068\u3057\u3066\u3001\u30B7\u30B9\u30C6\u30E0 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E create_account\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u524D\u4F8B\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3068\u6B21\u306E\u4F8B\u306B\u306F\u5C11\u3057\u306E\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002 \u524D\u4F8B\u3067\u306F\u3001invoke\u95A2\u6570\u5185\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4E00\u3064\u3068\u3057\u3066token_program\u3092\u6E21\u3059\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u305F\u3060\u3057\u3001\u5B9F\u884C\u3057\u3066\u3044\u308B\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u306Eprogram_id\u3092\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u6B21\u306E\u30B1\u30FC\u30B9\u3067\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30E0\u306Eprogram_id ("11111111111111111111111111111111")\u3092\u6E21\u3055\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u5FC5\u8981\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059:

    1. rent\u3092\u652F\u6255\u3046\u652F\u6255\u4EBA\u306E\u30A2\u30AB\u30A6\u30F3\u30C8
    2. \u3053\u308C\u304B\u3089\u4F5C\u6210\u3055\u308C\u308B\u30A2\u30AB\u30A6\u30F3\u30C8
    3. \u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    \u6B21\u306E\u4F8B\u3068\u3057\u3066\u3001\u30B7\u30B9\u30C6\u30E0 \u30D7\u30ED\u30B0\u30E9\u30E0\u306E create_account\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002\u524D\u4F8B\u306E\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u3068\u6B21\u306E\u4F8B\u306B\u306F\u5C11\u3057\u306E\u9055\u3044\u304C\u3042\u308A\u307E\u3059\u3002 \u524D\u4F8B\u3067\u306F\u3001invoke\u95A2\u6570\u5185\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4E00\u3064\u3068\u3057\u3066token_program\u3092\u6E21\u3059\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u305F\u3060\u3057\u3001\u5B9F\u884C\u3057\u3066\u3044\u308B\u30A4\u30F3\u30B9\u30C8\u30E9\u30AF\u30B7\u30E7\u30F3\u306Eprogram_id\u3092\u6E21\u3059\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u6B21\u306E\u30B1\u30FC\u30B9\u3067\u306F\u3001\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30E0\u306Eprogram_id ("11111111111111111111111111111111")\u3092\u6E21\u3055\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093\u3002\u3057\u305F\u304C\u3063\u3066\u3001\u5FC5\u8981\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059:

    1. rent\u3092\u652F\u6255\u3046\u652F\u6255\u4EBA\u306E\u30A2\u30AB\u30A6\u30F3\u30C8
    2. \u3053\u308C\u304B\u3089\u4F5C\u6210\u3055\u308C\u308B\u30A2\u30AB\u30A6\u30F3\u30C8
    3. \u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8
    ",2),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u305D\u308C\u305E\u308C\u306E\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u5074\u306E\u30B3\u30FC\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"\u305D\u308C\u305E\u308C\u306E\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u5074\u306E\u30B3\u30FC\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u306A\u308A\u307E\u3059",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),$=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[x]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[M]),_:1})]),_:1}),L,B,H,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[F]),_:1})]),_:1}),W,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var In=r(m,[["render",gn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function gn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[w]),_:1})]),_:1}),g,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[C]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[v]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),Y,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[B]),preview:a(()=>[z]),_:1})]),_:1}),H,L,M,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[W]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[$]),_:1})]),_:1}),X,Z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[wn]),_:1})]),_:1})],64)}var In=r(m,[["render",gn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.dd60d7aa.js b/docs/.vuepress/dist/assets/programs.html.cb377c15.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.dd60d7aa.js rename to docs/.vuepress/dist/assets/programs.html.cb377c15.js index f11f7ce6c..e7bef40b8 100644 --- a/docs/.vuepress/dist/assets/programs.html.dd60d7aa.js +++ b/docs/.vuepress/dist/assets/programs.html.cb377c15.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"programme-schreiben",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#programme-schreiben","aria-hidden":"true"},"#"),s(" Programme schreiben")],-1),_=n("h2",{id:"so-ubertragen-sie-sol-in-einem-programm",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-ubertragen-sie-sol-in-einem-programm","aria-hidden":"true"},"#"),s(" So \xFCbertragen Sie SOL in einem Programm")],-1),y=n("p",null,[s('Ihr Solana-Programm kann Lamports von einem Konto auf ein anderes \xFCbertragen ohne das Systemprogramm "aufzurufen". Die Grundregel ist die Ihr Programm kann Lamports von jedem Konto \xFCbertragen, das Ihrem Programm \xFCberhaupt auf irgendein Konto '),n("strong",null,"geh\xF6rt"),s(" .")],-1),f=n("p",null,[s("Das Empf\xE4ngerkonto "),n("em",null,"muss nicht"),s(" ein Konto Ihres Programms sein.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"programme-schreiben",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#programme-schreiben","aria-hidden":"true"},"#"),s(" Programme schreiben")],-1),_=n("h2",{id:"so-ubertragen-sie-sol-in-einem-programm",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-ubertragen-sie-sol-in-einem-programm","aria-hidden":"true"},"#"),s(" So \xFCbertragen Sie SOL in einem Programm")],-1),y=n("p",null,[s('Ihr Solana-Programm kann Lamports von einem Konto auf ein anderes \xFCbertragen ohne das Systemprogramm "aufzurufen". Die Grundregel ist die Ihr Programm kann Lamports von jedem Konto \xFCbertragen, das Ihrem Programm \xFCberhaupt auf irgendein Konto '),n("strong",null,"geh\xF6rt"),s(" .")],-1),f=n("p",null,[s("Das Empf\xE4ngerkonto "),n("em",null,"muss nicht"),s(" ein Konto Ihres Programms sein.")],-1),g=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),x=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),U=p('

    Wie man einen programm\xFCbergreifenden Aufruf durchf\xFChrt

    Ein programm\xFCbergreifender Aufruf wird einfach als Aufruf von Programmanweisungen innerhalb unseres Programms bezeichnet

    . Ein bestes Beispiel hervorzuheben ist die "swap"-Funktionalit\xE4t von Uniswap. Der UniswapV2Router Vertrag, ruft die notwendige Logik auf, und ruft die \xDCbertragungsfunktion des "ERC20"-Vertrags auf, die von einer Person zur anderen wechseln. Genauso k\xF6nnen wir die Anweisung eines Programms aufrufen, um eine Vielzahl von Zwecken zu erf\xFCllen.

    Werfen wir einen Blick auf unser erstes Beispiel, n\xE4mlich die Anweisung zur \xDCbertragung des SPL-Token-Programms. Die erforderlichen Konten, die wir f\xFCr eine \xDCberweisung ben\xF6tigen, sind

    1. Das Quell-Token-Konto (Das Konto, auf dem wir unsere Token halten)
    2. Das Ziel-Token-Konto (das Konto, auf das wir unsere Token \xFCbertragen w\xFCrden)
    3. Inhaber des Quell-Token-Kontos (Unsere Wallet-Adresse, f\xFCr die wir unterschreiben w\xFCrden)
    ',5),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),U=p('

    Wie man einen programm\xFCbergreifenden Aufruf durchf\xFChrt

    Ein programm\xFCbergreifender Aufruf wird einfach als Aufruf von Programmanweisungen innerhalb unseres Programms bezeichnet

    . Ein bestes Beispiel hervorzuheben ist die "swap"-Funktionalit\xE4t von Uniswap. Der UniswapV2Router Vertrag, ruft die notwendige Logik auf, und ruft die \xDCbertragungsfunktion des "ERC20"-Vertrags auf, die von einer Person zur anderen wechseln. Genauso k\xF6nnen wir die Anweisung eines Programms aufrufen, um eine Vielzahl von Zwecken zu erf\xFCllen.

    Werfen wir einen Blick auf unser erstes Beispiel, n\xE4mlich die Anweisung zur \xDCbertragung des SPL-Token-Programms. Die erforderlichen Konten, die wir f\xFCr eine \xDCberweisung ben\xF6tigen, sind

    1. Das Quell-Token-Konto (Das Konto, auf dem wir unsere Token halten)
    2. Das Ziel-Token-Konto (das Konto, auf das wir unsere Token \xFCbertragen w\xFCrden)
    3. Inhaber des Quell-Token-Kontos (Unsere Wallet-Adresse, f\xFCr die wir unterschreiben w\xFCrden)
    ',5),B=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),B=s(" Die entsprechende Client-Anweisung w\xE4re wie folgt. Um die Mint- und Token-Erstellungsanweisungen zu kennen, lesen Sie bitte den vollst\xE4ndigen Code in der N\xE4he. "),H=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),L=n("br",null,null,-1),M=s(" Die entsprechende Client-Anweisung w\xE4re wie folgt. Um die Mint- und Token-Erstellungsanweisungen zu kennen, lesen Sie bitte den vollst\xE4ndigen Code in der N\xE4he. "),H=n("br",null,null,-1),q=n("br",null,null,-1),G=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -750,7 +760,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),W=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br"),n("span",{class:"line-number"},"90"),n("br"),n("span",{class:"line-number"},"91"),n("br"),n("span",{class:"line-number"},"92"),n("br"),n("span",{class:"line-number"},"93"),n("br"),n("span",{class:"line-number"},"94"),n("br"),n("span",{class:"line-number"},"95"),n("br"),n("span",{class:"line-number"},"96"),n("br"),n("span",{class:"line-number"},"97"),n("br"),n("span",{class:"line-number"},"98"),n("br"),n("span",{class:"line-number"},"99"),n("br"),n("span",{class:"line-number"},"100"),n("br"),n("span",{class:"line-number"},"101"),n("br"),n("span",{class:"line-number"},"102"),n("br"),n("span",{class:"line-number"},"103"),n("br"),n("span",{class:"line-number"},"104"),n("br"),n("span",{class:"line-number"},"105"),n("br"),n("span",{class:"line-number"},"106"),n("br"),n("span",{class:"line-number"},"107"),n("br"),n("span",{class:"line-number"},"108"),n("br"),n("span",{class:"line-number"},"109"),n("br"),n("span",{class:"line-number"},"110"),n("br"),n("span",{class:"line-number"},"111"),n("br"),n("span",{class:"line-number"},"112"),n("br"),n("span",{class:"line-number"},"113"),n("br"),n("span",{class:"line-number"},"114"),n("br"),n("span",{class:"line-number"},"115"),n("br"),n("span",{class:"line-number"},"116"),n("br"),n("span",{class:"line-number"},"117"),n("br"),n("span",{class:"line-number"},"118"),n("br"),n("span",{class:"line-number"},"119"),n("br"),n("span",{class:"line-number"},"120"),n("br"),n("span",{class:"line-number"},"121"),n("br"),n("span",{class:"line-number"},"122"),n("br"),n("span",{class:"line-number"},"123"),n("br"),n("span",{class:"line-number"},"124"),n("br"),n("span",{class:"line-number"},"125"),n("br"),n("span",{class:"line-number"},"126"),n("br"),n("span",{class:"line-number"},"127"),n("br"),n("span",{class:"line-number"},"128"),n("br"),n("span",{class:"line-number"},"129"),n("br"),n("span",{class:"line-number"},"130"),n("br"),n("span",{class:"line-number"},"131"),n("br"),n("span",{class:"line-number"},"132"),n("br"),n("span",{class:"line-number"},"133"),n("br"),n("span",{class:"line-number"},"134"),n("br"),n("span",{class:"line-number"},"135"),n("br"),n("span",{class:"line-number"},"136"),n("br"),n("span",{class:"line-number"},"137"),n("br"),n("span",{class:"line-number"},"138"),n("br"),n("span",{class:"line-number"},"139"),n("br"),n("span",{class:"line-number"},"140"),n("br"),n("span",{class:"line-number"},"141"),n("br"),n("span",{class:"line-number"},"142"),n("br"),n("span",{class:"line-number"},"143"),n("br"),n("span",{class:"line-number"},"144"),n("br"),n("span",{class:"line-number"},"145"),n("br"),n("span",{class:"line-number"},"146"),n("br"),n("span",{class:"line-number"},"147"),n("br"),n("span",{class:"line-number"},"148"),n("br"),n("span",{class:"line-number"},"149"),n("br"),n("span",{class:"line-number"},"150"),n("br"),n("span",{class:"line-number"},"151"),n("br"),n("span",{class:"line-number"},"152"),n("br"),n("span",{class:"line-number"},"153"),n("br"),n("span",{class:"line-number"},"154"),n("br"),n("span",{class:"line-number"},"155"),n("br"),n("span",{class:"line-number"},"156"),n("br"),n("span",{class:"line-number"},"157"),n("br"),n("span",{class:"line-number"},"158"),n("br"),n("span",{class:"line-number"},"159"),n("br"),n("span",{class:"line-number"},"160"),n("br"),n("span",{class:"line-number"},"161"),n("br"),n("span",{class:"line-number"},"162"),n("br"),n("span",{class:"line-number"},"163"),n("br"),n("span",{class:"line-number"},"164"),n("br"),n("span",{class:"line-number"},"165"),n("br"),n("span",{class:"line-number"},"166"),n("br"),n("span",{class:"line-number"},"167"),n("br"),n("span",{class:"line-number"},"168"),n("br"),n("span",{class:"line-number"},"169"),n("br"),n("span",{class:"line-number"},"170"),n("br")])],-1),V=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"EfYK91eN3AqTwY1C34W6a33qGAtQ8HJYVhNv7cV4uMZj"'),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),F=p("

    Schauen wir uns nun ein weiteres Beispiel an, n\xE4mlich die Anweisung create_account des Systemprogramms. Es gibt einen kleinen Unterschied zwischen der oben erw\xE4hnten Anweisung und dieser. Dort mussten wir das token_program nie als eines der Konten innerhalb der invoke-Funktion \xFCbergeben. Es gibt jedoch Ausnahmen, bei denen Sie die program_id der aufrufenden Anweisung \xFCbergeben m\xFCssen. In unserem Fall w\xE4re es die program_id des Systemprogramms. ("11111111111111111111111111111111"). So jetzt w\xE4ren die ben\xF6tigten Accounts

    1. Das Zahlerkonto, das die Miete finanziert
    2. Das Konto, das erstellt werden soll
    3. Systemprogrammkonto
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),W=p("

    Schauen wir uns nun ein weiteres Beispiel an, n\xE4mlich die Anweisung create_account des Systemprogramms. Es gibt einen kleinen Unterschied zwischen der oben erw\xE4hnten Anweisung und dieser. Dort mussten wir das token_program nie als eines der Konten innerhalb der invoke-Funktion \xFCbergeben. Es gibt jedoch Ausnahmen, bei denen Sie die program_id der aufrufenden Anweisung \xFCbergeben m\xFCssen. In unserem Fall w\xE4re es die program_id des Systemprogramms. ("11111111111111111111111111111111"). So jetzt w\xE4ren die ben\xF6tigten Accounts

    1. Das Zahlerkonto, das die Miete finanziert
    2. Das Konto, das erstellt werden soll
    3. Systemprogrammkonto
    ",2),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Der entsprechende clientseitige Code sieht wie folgt aus",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),J=n("p",null,"Der entsprechende clientseitige Code sieht wie folgt aus",-1),Q=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),Z=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),en=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,S,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[R]),preview:a(()=>[K]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[x]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[M]),_:1})]),_:1}),L,B,H,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[W]),_:1})]),_:1}),F,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[Z]),_:1})]),_:1}),$,X,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function wn(hn,An){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,f,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[g]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,S,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[R]),preview:a(()=>[K]),_:1})]),_:1}),v,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[x]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[z]),_:1})]),_:1}),U,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[B]),preview:a(()=>[Y]),_:1})]),_:1}),L,M,H,q,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[G]),preview:a(()=>[V]),_:1})]),_:1}),W,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[F]),preview:a(()=>[j]),_:1})]),_:1}),J,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[Q]),preview:a(()=>[Z]),_:1})]),_:1}),$,X,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[nn]),preview:a(()=>[sn]),_:1})]),_:1}),an,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[tn]),preview:a(()=>[en]),_:1})]),_:1}),on,cn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[pn]),preview:a(()=>[ln]),_:1})]),_:1}),un,rn,kn,bn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[mn]),preview:a(()=>[dn]),_:1})]),_:1}),_n,yn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[fn]),preview:a(()=>[gn]),_:1})]),_:1})],64)}var In=r(m,[["render",wn]]);export{In as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.7db6ff71.js b/docs/.vuepress/dist/assets/programs.html.d385e4fe.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.7db6ff71.js rename to docs/.vuepress/dist/assets/programs.html.d385e4fe.js index ac2a4568e..835ab3dea 100644 --- a/docs/.vuepress/dist/assets/programs.html.7db6ff71.js +++ b/docs/.vuepress/dist/assets/programs.html.d385e4fe.js @@ -1,4 +1,4 @@ -import{_ as n,e as s}from"./app.07ce7a66.js";const a={},p=s(`

    Writing Programs (Programlar\u0131 Yazma)

    How to transfer SOL in a program (Programda SOL aktarma)

    Solana Program\u0131n\u0131z, Sistem program\u0131n\u0131 '\xE7a\u011F\u0131rmadan', lamp\u2019lar\u0131 bir account'tan di\u011Ferine aktarabilir. Temel kural, program\u0131n\u0131z\u0131n, program\u0131n\u0131z\u0131n sahip oldu\u011Fu herhangi bir account'tan herhangi bir account'a lamp aktarabilmesidir.

    Al\u0131c\u0131 account'\u0131n\u0131n, program\u0131n\u0131za ait bir account olmas\u0131 gerekmez.

    /// Transfers lamports from one account (must be program owned)
    +import{_ as n,e as s}from"./app.d411e3b3.js";const a={},p=s(`

    Writing Programs (Programlar\u0131 Yazma)

    How to transfer SOL in a program (Programda SOL aktarma)

    Solana Program\u0131n\u0131z, Sistem program\u0131n\u0131 '\xE7a\u011F\u0131rmadan', lamp\u2019lar\u0131 bir account'tan di\u011Ferine aktarabilir. Temel kural, program\u0131n\u0131z\u0131n, program\u0131n\u0131z\u0131n sahip oldu\u011Fu herhangi bir account'tan herhangi bir account'a lamp aktarabilmesidir.

    Al\u0131c\u0131 account'\u0131n\u0131n, program\u0131n\u0131za ait bir account olmas\u0131 gerekmez.

    /// Transfers lamports from one account (must be program owned)
     /// to another account. The recipient can by any account
     fn transfer_service_fee_lamports(
         from_account: &AccountInfo,
    diff --git a/docs/.vuepress/dist/assets/programs.html.5860dd01.js b/docs/.vuepress/dist/assets/programs.html.d74f6c75.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/programs.html.5860dd01.js
    rename to docs/.vuepress/dist/assets/programs.html.d74f6c75.js
    index bcddd86fe..467ca751c 100644
    --- a/docs/.vuepress/dist/assets/programs.html.5860dd01.js
    +++ b/docs/.vuepress/dist/assets/programs.html.d74f6c75.js
    @@ -1,2 +1,2 @@
    -import{_ as i,r as n,o as c,c as l,a as o,b as a,w as d,F as m,d as e,e as r}from"./app.07ce7a66.js";const p={},_=o("h1",{id:"programas",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programas","aria-hidden":"true"},"#"),e(" Programas")],-1),h=o("p",null,"Qualquer desenvolvedor pode escrever e implantar programas na blockchain Solana. Programas (conhecidos como contratos inteligentes em outros protocolos) servem como a base para atividades na cadeia, alimentando desde DeFi e NFTs at\xE9 m\xEDdia social e jogos.",-1),u=o("h2",{id:"fatos",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#fatos","aria-hidden":"true"},"#"),e(" Fatos")],-1),g={class:"custom-container tip"},b=o("p",{class:"custom-container-title"},"Ficha Informativa",-1),f=e("Programas processam "),v=e("instru\xE7\xF5es"),k=e(" tanto de usu\xE1rios finais quanto de outros programas"),P=e("Todos os programas s\xE3o "),S=o("em",null,"sem estado (stateless)",-1),x=e(": todos os dados com os quais eles interagem s\xE3o armazenados em "),L=e("contas"),y=e(" separadas que s\xE3o transmitidas por meio de instru\xE7\xF5es"),q=o("li",null,[e("Os programas em si s\xE3o armazenados em contas marcadas como "),o("code",null,"executable"),e(" (execut\xE1veis)")],-1),R=e("Todos os programas s\xE3o de propriedade do "),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},A=e("BPF Loader"),B=e(" executados pelo "),O={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},T=e("Solana Runtime"),I=e("Os desenvolvedores geralmente escrevem programas em Rust ou C++, mas podem escolher qualquer linguagem que compile para o backend "),z={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},E=e("BPF"),N=e(" do "),C={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=e("LLVM"),w=r("
  • Todos os programas t\xEAm um \xFAnico ponto de entrada onde ocorre o processamento de instru\xE7\xF5es (ou seja, process_instruction); os par\xE2metros sempre incluem:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),j=o("h2",{id:"mergulho-profundo",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#mergulho-profundo","aria-hidden":"true"},"#"),e(" Mergulho Profundo")],-1),M=o("p",null,"Ao contr\xE1rio da maioria das outras blockchains, a Solana separa completamente o c\xF3digo dos dados. Todos os dados com os quais os programas interagem s\xE3o armazenados em contas separadas e passados como refer\xEAncias por meio de instru\xE7\xF5es. Esse modelo permite que um \xFAnico programa gen\xE9rico opere em v\xE1rias contas sem exigir implanta\xE7\xF5es adicionais. Exemplos comuns desse padr\xE3o s\xE3o vistos nos programas Nativos e nos programas SPL.",-1),V=o("h3",{id:"programas-nativos-biblioteca-de-programas-da-solana-solana-program-library-ou-spl",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programas-nativos-biblioteca-de-programas-da-solana-solana-program-library-ou-spl","aria-hidden":"true"},"#"),e(" Programas Nativos & Biblioteca de Programas da Solana (Solana Program Library, ou SPL)")],-1),U=e("A Solana vem equipada com v\xE1rios programas que servem como blocos de constru\xE7\xE3o principais para intera\xE7\xF5es na cadeia. Esses programas s\xE3o divididos em "),H={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},K=e("Programas Nativos"),Q=e(" e "),G={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},J=e("Programas da Biblioteca de Programas da Solana (SPL)"),W=e("."),X=e("Os Programas Nativos fornecem a funcionalidade-base que \xE9 necess\xE1ria para operar validadores. Entre esses programas, o mais conhecido \xE9 o "),Y={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Z=e("Programa do Sistema (System Program)"),$=e(", que \xE9 respons\xE1vel por administrar novas contas e transferir SOL entre duas partes."),oo=e("Os Programas SPL suportam v\xE1rias atividades na cadeia, incluindo cria\xE7\xE3o, troca e empr\xE9stimo de tokens, al\xE9m de gerar pools de staking e manter um servi\xE7o de nome na cadeia (Solana Name Service, ou SNS). O "),eo={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ao=e("Programa de Tokens SPL (SPL Token Program)"),so=e(" pode ser invocado diretamente via CLI, enquanto outros, como o "),ro={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},to=e("Programa de Conta de Tokens Associada (Associated Token Account Program)"),no=e(" s\xE3o normalmente compostos por programas personalizados."),io=o("h3",{id:"escrevendo-programas",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#escrevendo-programas","aria-hidden":"true"},"#"),e(" Escrevendo Programas")],-1),co=e("Os programas s\xE3o mais comumente desenvolvidos com Rust ou C++, mas podem ser desenvolvidos com qualquer linguagem que compile para o backend BPF do LLVM. Iniciativas recentes da "),lo={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},mo=e("Neon Labs"),po=e(" e da "),_o={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ho=e("Solang"),uo=e(" possibilitam a compatibilidade com a "),go={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},bo=e("EVM"),fo=e(" e permitem que os desenvolvedores escrevam programas em Solidity."),vo=r("

    A maioria dos programas baseados em Rust adere \xE0 seguinte arquitetura:

    ArquivoDescri\xE7\xE3o
    lib.rsRegistro de m\xF3dulos
    entrypoint.rsPonto de entrada para o programa
    instruction.rsAPI do programa, desserializa dados de instru\xE7\xE3o
    processor.rsL\xF3gica do programa
    state.rsObjetos de programa, desserializa o estado
    error.rsErros espec\xEDficos do programa
    ",2),ko=e("Recentemente, o "),Po={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},So=e("Anchor"),xo=e(" surgiu como um framework popular para o desenvolvimento de programas. O Anchor \xE9 um framework opinativo, semelhante ao Ruby on Rails, que reduz o boilerplate e simplifica o processo de desserializa\xE7\xE3o para o desenvolvimento em Rust."),Lo=r("

    Os programas s\xE3o geralmente desenvolvidos e testados no Localhost e na Devnet (Rede de Desenvolvimento) antes de serem implantados na Testnet (Rede de Testes) ou na Mainnet (Rede Principal). A Solana suporta os seguintes ambientes:

    Ambiente de ClusterURL de Conex\xE3o RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostPorta padr\xE3o: 8899 (exemplos: http://localhost:8899, http://192.168.1.88:8899)
    ",2),yo=e("Depois de implantados em um ambiente, os clientes podem interagir com programas na cadeia por meio de "),qo={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Ro=e("conex\xF5es RPC"),Fo=e(" com o respectivo cluster."),Ao=o("h3",{id:"implantando-programas",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#implantando-programas","aria-hidden":"true"},"#"),e(" Implantando Programas")],-1),Bo=e("Os desenvolvedores podem implantar seus programas por meio da "),Oo={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},To=e("CLI"),Io=e(":"),zo=r(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as n,o as c,c as l,a as o,b as a,w as d,F as m,d as e,e as r}from"./app.d411e3b3.js";const p={},_=o("h1",{id:"programas",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programas","aria-hidden":"true"},"#"),e(" Programas")],-1),h=o("p",null,"Qualquer desenvolvedor pode escrever e implantar programas na blockchain Solana. Programas (conhecidos como contratos inteligentes em outros protocolos) servem como a base para atividades na cadeia, alimentando desde DeFi e NFTs at\xE9 m\xEDdia social e jogos.",-1),u=o("h2",{id:"fatos",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#fatos","aria-hidden":"true"},"#"),e(" Fatos")],-1),g={class:"custom-container tip"},b=o("p",{class:"custom-container-title"},"Ficha Informativa",-1),f=e("Programas processam "),v=e("instru\xE7\xF5es"),k=e(" tanto de usu\xE1rios finais quanto de outros programas"),P=e("Todos os programas s\xE3o "),S=o("em",null,"sem estado (stateless)",-1),x=e(": todos os dados com os quais eles interagem s\xE3o armazenados em "),L=e("contas"),y=e(" separadas que s\xE3o transmitidas por meio de instru\xE7\xF5es"),q=o("li",null,[e("Os programas em si s\xE3o armazenados em contas marcadas como "),o("code",null,"executable"),e(" (execut\xE1veis)")],-1),R=e("Todos os programas s\xE3o de propriedade do "),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},A=e("BPF Loader"),B=e(" executados pelo "),O={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},T=e("Solana Runtime"),I=e("Os desenvolvedores geralmente escrevem programas em Rust ou C++, mas podem escolher qualquer linguagem que compile para o backend "),z={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},E=e("BPF"),N=e(" do "),C={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},D=e("LLVM"),w=r("
  • Todos os programas t\xEAm um \xFAnico ponto de entrada onde ocorre o processamento de instru\xE7\xF5es (ou seja, process_instruction); os par\xE2metros sempre incluem:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),j=o("h2",{id:"mergulho-profundo",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#mergulho-profundo","aria-hidden":"true"},"#"),e(" Mergulho Profundo")],-1),M=o("p",null,"Ao contr\xE1rio da maioria das outras blockchains, a Solana separa completamente o c\xF3digo dos dados. Todos os dados com os quais os programas interagem s\xE3o armazenados em contas separadas e passados como refer\xEAncias por meio de instru\xE7\xF5es. Esse modelo permite que um \xFAnico programa gen\xE9rico opere em v\xE1rias contas sem exigir implanta\xE7\xF5es adicionais. Exemplos comuns desse padr\xE3o s\xE3o vistos nos programas Nativos e nos programas SPL.",-1),V=o("h3",{id:"programas-nativos-biblioteca-de-programas-da-solana-solana-program-library-ou-spl",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#programas-nativos-biblioteca-de-programas-da-solana-solana-program-library-ou-spl","aria-hidden":"true"},"#"),e(" Programas Nativos & Biblioteca de Programas da Solana (Solana Program Library, ou SPL)")],-1),U=e("A Solana vem equipada com v\xE1rios programas que servem como blocos de constru\xE7\xE3o principais para intera\xE7\xF5es na cadeia. Esses programas s\xE3o divididos em "),H={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},K=e("Programas Nativos"),Q=e(" e "),G={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},J=e("Programas da Biblioteca de Programas da Solana (SPL)"),W=e("."),X=e("Os Programas Nativos fornecem a funcionalidade-base que \xE9 necess\xE1ria para operar validadores. Entre esses programas, o mais conhecido \xE9 o "),Y={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},Z=e("Programa do Sistema (System Program)"),$=e(", que \xE9 respons\xE1vel por administrar novas contas e transferir SOL entre duas partes."),oo=e("Os Programas SPL suportam v\xE1rias atividades na cadeia, incluindo cria\xE7\xE3o, troca e empr\xE9stimo de tokens, al\xE9m de gerar pools de staking e manter um servi\xE7o de nome na cadeia (Solana Name Service, ou SNS). O "),eo={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ao=e("Programa de Tokens SPL (SPL Token Program)"),so=e(" pode ser invocado diretamente via CLI, enquanto outros, como o "),ro={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},to=e("Programa de Conta de Tokens Associada (Associated Token Account Program)"),no=e(" s\xE3o normalmente compostos por programas personalizados."),io=o("h3",{id:"escrevendo-programas",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#escrevendo-programas","aria-hidden":"true"},"#"),e(" Escrevendo Programas")],-1),co=e("Os programas s\xE3o mais comumente desenvolvidos com Rust ou C++, mas podem ser desenvolvidos com qualquer linguagem que compile para o backend BPF do LLVM. Iniciativas recentes da "),lo={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},mo=e("Neon Labs"),po=e(" e da "),_o={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},ho=e("Solang"),uo=e(" possibilitam a compatibilidade com a "),go={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},bo=e("EVM"),fo=e(" e permitem que os desenvolvedores escrevam programas em Solidity."),vo=r("

    A maioria dos programas baseados em Rust adere \xE0 seguinte arquitetura:

    ArquivoDescri\xE7\xE3o
    lib.rsRegistro de m\xF3dulos
    entrypoint.rsPonto de entrada para o programa
    instruction.rsAPI do programa, desserializa dados de instru\xE7\xE3o
    processor.rsL\xF3gica do programa
    state.rsObjetos de programa, desserializa o estado
    error.rsErros espec\xEDficos do programa
    ",2),ko=e("Recentemente, o "),Po={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},So=e("Anchor"),xo=e(" surgiu como um framework popular para o desenvolvimento de programas. O Anchor \xE9 um framework opinativo, semelhante ao Ruby on Rails, que reduz o boilerplate e simplifica o processo de desserializa\xE7\xE3o para o desenvolvimento em Rust."),Lo=r("

    Os programas s\xE3o geralmente desenvolvidos e testados no Localhost e na Devnet (Rede de Desenvolvimento) antes de serem implantados na Testnet (Rede de Testes) ou na Mainnet (Rede Principal). A Solana suporta os seguintes ambientes:

    Ambiente de ClusterURL de Conex\xE3o RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostPorta padr\xE3o: 8899 (exemplos: http://localhost:8899, http://192.168.1.88:8899)
    ",2),yo=e("Depois de implantados em um ambiente, os clientes podem interagir com programas na cadeia por meio de "),qo={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},Ro=e("conex\xF5es RPC"),Fo=e(" com o respectivo cluster."),Ao=o("h3",{id:"implantando-programas",tabindex:"-1"},[o("a",{class:"header-anchor",href:"#implantando-programas","aria-hidden":"true"},"#"),e(" Implantando Programas")],-1),Bo=e("Os desenvolvedores podem implantar seus programas por meio da "),Oo={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},To=e("CLI"),Io=e(":"),zo=r(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Eo=e("Quando um programa \xE9 implantado, ele \xE9 compilado em um "),No={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Co=e("objeto compartilhado ELF"),Do=e(" (contendo o bytecode BPF) e carregado no cluster Solana. Os programas residem em contas (assim como tudo na Solana), exceto que essas contas s\xE3o marcadas como "),wo=o("code",null,"executable",-1),jo=e(" e atribu\xEDdas ao BPF Loader. O endere\xE7o desta conta \xE9 referido como "),Mo=o("code",null,"program_id",-1),Vo=e(" e \xE9 usado para referenciar o programa em todas as transa\xE7\xF5es futuras."),Uo=e("A Solana suporta v\xE1rios BPF Loaders, sendo o mais recente o "),Ho={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ko=e("Upgradable BPF Loader"),Qo=e(". O BPF Loader \xE9 respons\xE1vel por administrar as contas do programa e disponibiliz\xE1-las aos clientes por meio do "),Go=o("code",null,"program_id",-1),Jo=e(". Todos os programas t\xEAm um \xFAnico ponto de entrada onde o processamento de instru\xE7\xF5es ocorre (ou seja, "),Wo=o("code",null,"process_instruction",-1),Xo=e(") e os par\xE2metros sempre incluem:"),Yo=r('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Uma vez chamados, os Programas s\xE3o executados pelo tempo de execu\xE7\xE3o (Solana Runtime).

    Outros Recursos

    ',3),Zo={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},$o=e("Documenta\xE7\xE3o oficial"),oe={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},ee=e("Documenta\xE7\xE3o SPL"),ae={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},se=e("Program Deploys (Implanta\xE7\xF5es de Programa), por Justin Starry"),re={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},te=e("Solana Starter Kit (Kit de Inicializa\xE7\xE3o da Solana), por Iron Addicted Dog"),ne={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},de=e("Programming on Solana (Programando na Solana), por Paulx"),ie={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},ce=e("An Introduction to the Solana Blockchain (Uma Introdu\xE7\xE3o \xE0 Blockchain Solana), por Hana"),le={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},me=e("Anchor");function pe(_e,he){const t=n("RouterLink"),s=n("ExternalLinkIcon");return c(),l(m,null,[_,h,u,o("div",g,[b,o("ul",null,[o("li",null,[f,a(t,{to:"/pt/core-concepts/transactions.html"},{default:d(()=>[v]),_:1}),k]),o("li",null,[P,S,x,a(t,{to:"/pt/core-concepts/accounts.html"},{default:d(()=>[L]),_:1}),y]),q,o("li",null,[R,o("a",F,[A,a(s)]),B,o("a",O,[T,a(s)])]),o("li",null,[I,o("a",z,[E,a(s)]),N,o("a",C,[D,a(s)])]),w])]),j,M,V,o("p",null,[U,o("a",H,[K,a(s)]),Q,o("a",G,[J,a(s)]),W]),o("p",null,[X,o("a",Y,[Z,a(s)]),$]),o("p",null,[oo,o("a",eo,[ao,a(s)]),so,o("a",ro,[to,a(s)]),no]),io,o("p",null,[co,o("a",lo,[mo,a(s)]),po,o("a",_o,[ho,a(s)]),uo,o("a",go,[bo,a(s)]),fo]),vo,o("p",null,[ko,o("a",Po,[So,a(s)]),xo]),Lo,o("p",null,[yo,o("a",qo,[Ro,a(s)]),Fo]),Ao,o("p",null,[Bo,o("a",Oo,[To,a(s)]),Io]),zo,o("p",null,[Eo,o("a",No,[Co,a(s)]),Do,wo,jo,Mo,Vo]),o("p",null,[Uo,o("a",Ho,[Ko,a(s)]),Qo,Go,Jo,Wo,Xo]),Yo,o("ul",null,[o("li",null,[o("a",Zo,[$o,a(s)])]),o("li",null,[o("a",oe,[ee,a(s)])]),o("li",null,[o("a",ae,[se,a(s)])]),o("li",null,[o("a",re,[te,a(s)])]),o("li",null,[o("a",ne,[de,a(s)])]),o("li",null,[o("a",ie,[ce,a(s)])]),o("li",null,[o("a",le,[me,a(s)])])])],64)}var ge=i(p,[["render",pe]]);export{ge as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.d77781f0.js b/docs/.vuepress/dist/assets/programs.html.dcaf461b.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.d77781f0.js rename to docs/.vuepress/dist/assets/programs.html.dcaf461b.js index 603e3b346..fbe948736 100644 --- a/docs/.vuepress/dist/assets/programs.html.d77781f0.js +++ b/docs/.vuepress/dist/assets/programs.html.dcaf461b.js @@ -1,2 +1,2 @@ -import{_ as i,r as n,o as d,c as l,a as e,b as s,w as c,F as p,d as t,e as r}from"./app.07ce7a66.js";const m={},u=e("h1",{id:"programmes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programmes","aria-hidden":"true"},"#"),t(" Programmes")],-1),_=e("p",null,"N'importe quel d\xE9veloppeur peut \xE9crire et d\xE9ployer des programmes sur la blockchain Solana. Les programmes (connus sous le nom de contrats intelligents sur d'autres protocoles) servent de base \xE0 l'activit\xE9 sur la blockchain, permettant tout, partant de la DeFi et des NFTs jusqu'aux m\xE9dias sociaux tout en passant par les jeux.",-1),h=e("h2",{id:"faits",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),t(" Faits")],-1),g={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fiche d'Information",-1),f=e("li",null,[t("Les programmes traitent les "),e("a",{href:"./transactions"},"instructions"),t(" des utilisateurs finaux mais aussi d'autres programmes")],-1),v=t("Tous les programmes sont "),k=e("em",null,"stateless",-1),L=t(" (sans \xE9tat): toutes les donn\xE9es avec lesquelles ils interagissent sont stock\xE9es dans des "),x=t("comptes"),P=t(" s\xE9par\xE9s qui sont transmis par des instructions."),y=e("li",null,[t("Les programmes eux-m\xEAmes sont stock\xE9s dans des comptes marqu\xE9s comme "),e("code",null,"executable")],-1),q=t("Tous les programmes appartiennent au "),S={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},F=t("BPF Loader"),R=t(" et sont ex\xE9cut\xE9s par le "),B={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},C=t("Solana Runtime"),j=t("Les d\xE9veloppeurs \xE9crivent le plus souvent des programmes en Rust ou en C++, mais ils peuvent choisir n'importe quel langage qui cible le backend "),E={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},T=t("BPF"),A=t(" de "),D={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},N=t("LLVM"),w=r("
  • Tous les programmes ont un point d'entr\xE9e unique o\xF9 le traitement des instructions a lieu (i.e. process_instruction); et dont les param\xE8tres incluent toujours:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),I=e("h2",{id:"examen-plus-approfondi",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#examen-plus-approfondi","aria-hidden":"true"},"#"),t(" Examen plus approfondi")],-1),V=e("p",null,"Contrairement \xE0 la plupart des autres blockchains, Solana s\xE9pare compl\xE8tement le code des donn\xE9es. Toutes les donn\xE9es avec lesquelles les programmes interagissent sont stock\xE9es dans des comptes s\xE9par\xE9s et sont transmises, en tant que r\xE9f\xE9rences, via des instructions. Ce mod\xE8le permet \xE0 un seul programme g\xE9n\xE9rique de fonctionner sur plusieurs comptes sans n\xE9cessiter de d\xE9ploiements suppl\xE9mentaires. Des exemples communs de ce mod\xE8le sont observ\xE9s dans les programmes natifs et les programmes SPL.",-1),M=e("h3",{id:"programmes-natifs-la-bibliotheque-des-programmes-de-solana-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programmes-natifs-la-bibliotheque-des-programmes-de-solana-spl","aria-hidden":"true"},"#"),t(" Programmes Natifs & La Biblioth\xE8que des Programmes de Solana (SPL)")],-1),U=t("Solana est \xE9quip\xE9 d'un certain nombre de programmes qui servent d'\xE9l\xE9ments de base pour les interactions sur la blockchain. Ces programmes sont divis\xE9s en "),J={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},O=t("Programmes Natifs"),z=t(" et en "),H={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},G=t("Programmes de la Biblioth\xE8que des Programmes de Solana (SPL)"),K=t("."),Q=t("Les Programmes Natifs fournissent les fonctions de base n\xE9cessaires au fonctionnement des validateurs. Parmi ces programmes, le plus connu est le "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=t("Programme Syst\xE8me (System Program)"),Y=t(" qui est responsable de l'administration des nouveaux comptes et de transf\xE9rer des SOL entre deux parties."),Z=t("Les programmes de la Biblioth\xE8que des Programmes de Solana (SPL) prennent en charge d'autres activit\xE9s au sein de la blockchain, telles que, par exemple, la cr\xE9ation de jetons, l'\xE9change de jetons ainsi ou encore le pr\xEAt de jetons, ainsi que la cr\xE9ation de pools de staking et le maintien on-chain du service de noms de domaine. Le "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ee=t("Programme de Jeton SPL (SPL Token Program)"),te=t(" peut \xEAtre invoqu\xE9 directement via l'interface CLI, tandis que d'autres, comme le "),se={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},oe=t("Programme de Compte de Jeton Associ\xE9 (Associated Token Account Program)"),re=t(" sont g\xE9n\xE9ralement utilis\xE9s par d'autres programmes."),ne=e("h3",{id:"ecrire-des-programmes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#ecrire-des-programmes","aria-hidden":"true"},"#"),t(" Ecrire des programmes")],-1),ae=t("Les programmes sont le plus souvent d\xE9velopp\xE9s avec Rust ou C++, mais peuvent \xEAtre d\xE9velopp\xE9s avec n'importe quel langage qui cible le backend BPF de LLVM. Les initiatives r\xE9centes de "),ie={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},de=t("Neon Labs"),le=t(" et "),ce={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},pe=t("Solang"),me=t(" permettent la compatibilit\xE9 "),ue={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},_e=t("EVM"),he=t(" et permettent donc aux d\xE9veloppeurs d'\xE9crire des programmes en Solidity."),ge=r("

    La plupart des programmes Rust suivent l'architecture suivante :

    FichierDescription
    lib.rsRegistre des modules
    entrypoint.rsPoint d'entr\xE9e du programme
    instruction.rsAPI du programme, (d\xE9)s\xE9rialisation des instructions
    processor.rsLogique du programme
    state.rsObjets du programme, (d\xE9)s\xE9rialisation des \xE9tats
    error.rsErreurs sp\xE9cifiques au programme
    ",2),be=t("R\xE9cemment, "),fe={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ve=t("Anchor"),ke=t(" est devenu le framework le plus populaire pour le d\xE9veloppement de programmes. Anchor est un framework, semblable \xE0 Ruby on Rails, qui r\xE9duit le boilerplate (code passe-partout) et facilite la (d\xE9)s\xE9rialisation pour les programmes d\xE9velopp\xE9s en Rust."),Le=r("

    Les programmes sont g\xE9n\xE9ralement d\xE9velopp\xE9s et test\xE9s dans les environnements appel\xE9s Localhost et Devnet avant d'\xEAtre d\xE9ploy\xE9s sur le Testnet ou le Mainnet. Solana supporte les environnements suivants :

    Environnement du clusterURL de Connexion RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),xe=t("Une fois d\xE9ploy\xE9s dans un environnement, les clients peuvent interagir avec les programmes de la blockchain via les "),Pe={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ye=t("Connexions RPC"),qe=t(" du cluster correspondant."),Se=e("h3",{id:"deployer-des-programmes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deployer-des-programmes","aria-hidden":"true"},"#"),t(" D\xE9ployer des programmes")],-1),Fe=t("Les d\xE9veloppeurs peuvent d\xE9ployer leurs programmes via le "),Re={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Be=t("CLI"),Ce=t(":"),je=r(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as i,r as n,o as d,c as l,a as e,b as s,w as c,F as p,d as t,e as r}from"./app.d411e3b3.js";const m={},u=e("h1",{id:"programmes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programmes","aria-hidden":"true"},"#"),t(" Programmes")],-1),_=e("p",null,"N'importe quel d\xE9veloppeur peut \xE9crire et d\xE9ployer des programmes sur la blockchain Solana. Les programmes (connus sous le nom de contrats intelligents sur d'autres protocoles) servent de base \xE0 l'activit\xE9 sur la blockchain, permettant tout, partant de la DeFi et des NFTs jusqu'aux m\xE9dias sociaux tout en passant par les jeux.",-1),h=e("h2",{id:"faits",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#faits","aria-hidden":"true"},"#"),t(" Faits")],-1),g={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fiche d'Information",-1),f=e("li",null,[t("Les programmes traitent les "),e("a",{href:"./transactions"},"instructions"),t(" des utilisateurs finaux mais aussi d'autres programmes")],-1),v=t("Tous les programmes sont "),k=e("em",null,"stateless",-1),L=t(" (sans \xE9tat): toutes les donn\xE9es avec lesquelles ils interagissent sont stock\xE9es dans des "),x=t("comptes"),P=t(" s\xE9par\xE9s qui sont transmis par des instructions."),y=e("li",null,[t("Les programmes eux-m\xEAmes sont stock\xE9s dans des comptes marqu\xE9s comme "),e("code",null,"executable")],-1),q=t("Tous les programmes appartiennent au "),S={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},F=t("BPF Loader"),R=t(" et sont ex\xE9cut\xE9s par le "),B={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},C=t("Solana Runtime"),j=t("Les d\xE9veloppeurs \xE9crivent le plus souvent des programmes en Rust ou en C++, mais ils peuvent choisir n'importe quel langage qui cible le backend "),E={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},T=t("BPF"),A=t(" de "),D={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},N=t("LLVM"),w=r("
  • Tous les programmes ont un point d'entr\xE9e unique o\xF9 le traitement des instructions a lieu (i.e. process_instruction); et dont les param\xE8tres incluent toujours:
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array
  • ",1),I=e("h2",{id:"examen-plus-approfondi",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#examen-plus-approfondi","aria-hidden":"true"},"#"),t(" Examen plus approfondi")],-1),V=e("p",null,"Contrairement \xE0 la plupart des autres blockchains, Solana s\xE9pare compl\xE8tement le code des donn\xE9es. Toutes les donn\xE9es avec lesquelles les programmes interagissent sont stock\xE9es dans des comptes s\xE9par\xE9s et sont transmises, en tant que r\xE9f\xE9rences, via des instructions. Ce mod\xE8le permet \xE0 un seul programme g\xE9n\xE9rique de fonctionner sur plusieurs comptes sans n\xE9cessiter de d\xE9ploiements suppl\xE9mentaires. Des exemples communs de ce mod\xE8le sont observ\xE9s dans les programmes natifs et les programmes SPL.",-1),M=e("h3",{id:"programmes-natifs-la-bibliotheque-des-programmes-de-solana-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#programmes-natifs-la-bibliotheque-des-programmes-de-solana-spl","aria-hidden":"true"},"#"),t(" Programmes Natifs & La Biblioth\xE8que des Programmes de Solana (SPL)")],-1),U=t("Solana est \xE9quip\xE9 d'un certain nombre de programmes qui servent d'\xE9l\xE9ments de base pour les interactions sur la blockchain. Ces programmes sont divis\xE9s en "),J={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},O=t("Programmes Natifs"),z=t(" et en "),H={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},G=t("Programmes de la Biblioth\xE8que des Programmes de Solana (SPL)"),K=t("."),Q=t("Les Programmes Natifs fournissent les fonctions de base n\xE9cessaires au fonctionnement des validateurs. Parmi ces programmes, le plus connu est le "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=t("Programme Syst\xE8me (System Program)"),Y=t(" qui est responsable de l'administration des nouveaux comptes et de transf\xE9rer des SOL entre deux parties."),Z=t("Les programmes de la Biblioth\xE8que des Programmes de Solana (SPL) prennent en charge d'autres activit\xE9s au sein de la blockchain, telles que, par exemple, la cr\xE9ation de jetons, l'\xE9change de jetons ainsi ou encore le pr\xEAt de jetons, ainsi que la cr\xE9ation de pools de staking et le maintien on-chain du service de noms de domaine. Le "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ee=t("Programme de Jeton SPL (SPL Token Program)"),te=t(" peut \xEAtre invoqu\xE9 directement via l'interface CLI, tandis que d'autres, comme le "),se={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},oe=t("Programme de Compte de Jeton Associ\xE9 (Associated Token Account Program)"),re=t(" sont g\xE9n\xE9ralement utilis\xE9s par d'autres programmes."),ne=e("h3",{id:"ecrire-des-programmes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#ecrire-des-programmes","aria-hidden":"true"},"#"),t(" Ecrire des programmes")],-1),ae=t("Les programmes sont le plus souvent d\xE9velopp\xE9s avec Rust ou C++, mais peuvent \xEAtre d\xE9velopp\xE9s avec n'importe quel langage qui cible le backend BPF de LLVM. Les initiatives r\xE9centes de "),ie={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},de=t("Neon Labs"),le=t(" et "),ce={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},pe=t("Solang"),me=t(" permettent la compatibilit\xE9 "),ue={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},_e=t("EVM"),he=t(" et permettent donc aux d\xE9veloppeurs d'\xE9crire des programmes en Solidity."),ge=r("

    La plupart des programmes Rust suivent l'architecture suivante :

    FichierDescription
    lib.rsRegistre des modules
    entrypoint.rsPoint d'entr\xE9e du programme
    instruction.rsAPI du programme, (d\xE9)s\xE9rialisation des instructions
    processor.rsLogique du programme
    state.rsObjets du programme, (d\xE9)s\xE9rialisation des \xE9tats
    error.rsErreurs sp\xE9cifiques au programme
    ",2),be=t("R\xE9cemment, "),fe={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ve=t("Anchor"),ke=t(" est devenu le framework le plus populaire pour le d\xE9veloppement de programmes. Anchor est un framework, semblable \xE0 Ruby on Rails, qui r\xE9duit le boilerplate (code passe-partout) et facilite la (d\xE9)s\xE9rialisation pour les programmes d\xE9velopp\xE9s en Rust."),Le=r("

    Les programmes sont g\xE9n\xE9ralement d\xE9velopp\xE9s et test\xE9s dans les environnements appel\xE9s Localhost et Devnet avant d'\xEAtre d\xE9ploy\xE9s sur le Testnet ou le Mainnet. Solana supporte les environnements suivants :

    Environnement du clusterURL de Connexion RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),xe=t("Une fois d\xE9ploy\xE9s dans un environnement, les clients peuvent interagir avec les programmes de la blockchain via les "),Pe={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ye=t("Connexions RPC"),qe=t(" du cluster correspondant."),Se=e("h3",{id:"deployer-des-programmes",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#deployer-des-programmes","aria-hidden":"true"},"#"),t(" D\xE9ployer des programmes")],-1),Fe=t("Les d\xE9veloppeurs peuvent d\xE9ployer leurs programmes via le "),Re={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Be=t("CLI"),Ce=t(":"),je=r(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Ee=t("Lorsqu'un programme est d\xE9ploy\xE9, il est compil\xE9 en un "),Te={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ae=t("objet partag\xE9 ELF (ELF shared object)"),De=t(" (contenant le bytecode du BPF) et t\xE9l\xE9charg\xE9 sur le cluster Solana. Les programmes vivent dans des comptes (comme \xE0 peu pr\xE8s tout ce qui se trouve sur Solana), sauf que ceux-ci sont marqu\xE9s comme "),Ne=e("code",null,"executable",-1),we=t(" et assign\xE9 au BPF Loader. L'adresse de ce compte est appel\xE9e "),Ie=e("code",null,"program_id",-1),Ve=t(" et est utilis\xE9e pour r\xE9f\xE9rencer le programme dans toutes les transactions futures."),Me=t("Solana supporte plusieurs BPF Loaders, dont le dernier en date est le "),Ue={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Je=t("Upgradable BPF Loader"),Oe=t(". Le BPF Loader est charg\xE9 de g\xE9rer les comptes du programme et de les rendre accessibles aux clients via le "),ze=e("code",null,"program_id",-1),He=t(". Tous les programmes ont un point d'entr\xE9e unique o\xF9 le traitement des instructions a lieu (i.e. "),Ge=e("code",null,"process_instruction",-1),Ke=t(") et dont les param\xE8tres incluent toujours:"),Qe=r('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Une fois invoqu\xE9s, les programmes sont ex\xE9cut\xE9s par le Runtime de Solana.

    Autres Ressources

    ',3),We={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Xe=t("Documentation officielle"),Ye={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Ze=t("Documentation sur le SPL"),$e={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},et=t("D\xE9ploiements de programmes par Justin Starry"),tt={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},st=t("Kit de d\xE9marrage pour Solana par Iron Addicted Dog"),ot={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},rt=t("Programmation sur Solana par Paulx"),nt={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},at=t("Une Introduction \xE0 la Blockchain Solana par Hana"),it={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},dt=t("Anchor");function lt(ct,pt){const a=n("RouterLink"),o=n("ExternalLinkIcon");return d(),l(p,null,[u,_,h,e("div",g,[b,e("ul",null,[f,e("li",null,[v,k,L,s(a,{to:"/fr/core-concepts/accounts.html"},{default:c(()=>[x]),_:1}),P]),y,e("li",null,[q,e("a",S,[F,s(o)]),R,e("a",B,[C,s(o)])]),e("li",null,[j,e("a",E,[T,s(o)]),A,e("a",D,[N,s(o)])]),w])]),I,V,M,e("p",null,[U,e("a",J,[O,s(o)]),z,e("a",H,[G,s(o)]),K]),e("p",null,[Q,e("a",W,[X,s(o)]),Y]),e("p",null,[Z,e("a",$,[ee,s(o)]),te,e("a",se,[oe,s(o)]),re]),ne,e("p",null,[ae,e("a",ie,[de,s(o)]),le,e("a",ce,[pe,s(o)]),me,e("a",ue,[_e,s(o)]),he]),ge,e("p",null,[be,e("a",fe,[ve,s(o)]),ke]),Le,e("p",null,[xe,e("a",Pe,[ye,s(o)]),qe]),Se,e("p",null,[Fe,e("a",Re,[Be,s(o)]),Ce]),je,e("p",null,[Ee,e("a",Te,[Ae,s(o)]),De,Ne,we,Ie,Ve]),e("p",null,[Me,e("a",Ue,[Je,s(o)]),Oe,ze,He,Ge,Ke]),Qe,e("ul",null,[e("li",null,[e("a",We,[Xe,s(o)])]),e("li",null,[e("a",Ye,[Ze,s(o)])]),e("li",null,[e("a",$e,[et,s(o)])]),e("li",null,[e("a",tt,[st,s(o)])]),e("li",null,[e("a",ot,[rt,s(o)])]),e("li",null,[e("a",nt,[at,s(o)])]),e("li",null,[e("a",it,[dt,s(o)])])])],64)}var ut=i(m,[["render",lt]]);export{ut as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.ea9dd7e3.js b/docs/.vuepress/dist/assets/programs.html.e55e9941.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.ea9dd7e3.js rename to docs/.vuepress/dist/assets/programs.html.e55e9941.js index b87157b24..dc76696d7 100644 --- a/docs/.vuepress/dist/assets/programs.html.ea9dd7e3.js +++ b/docs/.vuepress/dist/assets/programs.html.e55e9941.js @@ -1,2 +1,2 @@ -import{_ as d,r as s,o as i,c,a as e,b as o,w as l,F as _,d as t,e as n}from"./app.07ce7a66.js";const h={},p=e("h1",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0","aria-hidden":"true"},"#"),t(" \u30D7\u30ED\u30B0\u30E9\u30E0")],-1),u=e("p",null,"\u958B\u767A\u8005\u306F\u8AB0\u3067\u3082\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F5C\u6210\u3057\u3066Solana\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u306B\u30C7\u30D7\u30ED\u30A4\u3067\u304D\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0(\u4ED6\u306E\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u306F\u30B9\u30DE\u30FC\u30C8\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u3068\u3057\u3066\u77E5\u3089\u308C\u308B\u3053\u3068\u304C\u591A\u3044)\u306F\u3001 \u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306E\u57FA\u76E4\u3068\u3057\u3066\u6A5F\u80FD\u3057\u3001DeFi \u3084 NFT\u3001\u30BD\u30FC\u30B7\u30E3\u30EB\u30E1\u30C7\u30A3\u30A2\u3084\u30B2\u30FC\u30E0\u306B\u81F3\u308B\u307E\u3067\u3001\u3042\u3089\u3086\u308B\u3082\u306E\u3092\u5F37\u5316\u3057\u307E\u3059\u3002",-1),g=e("h2",{id:"\u6982\u8981",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u6982\u8981","aria-hidden":"true"},"#"),t(" \u6982\u8981")],-1),m={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,[t("\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30A8\u30F3\u30C9\u30E6\u30FC\u30B6\u30FC\u304B\u3089\u3068\u3001\u4ED6\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u306E "),e("a",{href:"./transactions"},"instructions"),t(" \u306E\u4E21\u65B9\u3092\u51E6\u7406\u3057\u307E\u3059\u3002")],-1),k=t("\u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u30B9\u30C6\u30FC\u30C8\u30EC\u30B9\u3067\u3059\u3002\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u3084\u308A\u53D6\u308A\u3059\u308B\u3059\u3079\u3066\u306E\u30C7\u30FC\u30BF\u306F\u3001\u547D\u4EE4\u3092\u4ECB\u3057\u3066\u6E21\u3055\u308C\u308B\u500B\u5225\u306E "),y=t("accounts"),P=t(" \u306B\u4FDD\u5B58\u3055\u308C\u307E\u3059\u3002"),L=e("li",null,[t("\u30D7\u30ED\u30B0\u30E9\u30E0\u81EA\u4F53\u306F\u3001"),e("code",null,"executable"),t("\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u307E\u3059")],-1),S=t("\u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F "),v={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=t("BPF Loader"),F=t(" \u306B\u3088\u3063\u3066\u6240\u6709\u3055\u308C\u3001"),B={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},R=t("Solana Runtime"),A=t("\u3000\u306B\u3088\u3063\u3066\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002"),C=t("\u958B\u767A\u8005\u306F\u3001Rust \u307E\u305F\u306F C++ \u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F5C\u6210\u3059\u308B\u306E\u304C\u6700\u3082\u4E00\u822C\u7684\u3067\u3059\u304C\u3001"),N={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},T=t("LLVM"),D=t(" \u306E "),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},w=t("BPF"),E=t(" \u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u3092\u5BFE\u8C61\u3068\u3059\u308B\u4EFB\u610F\u306E\u8A00\u8A9E\u3092\u9078\u629E\u3067\u304D\u307E\u3059\u3002"),V=n("
  • \u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u306F\u3001\u547D\u4EE4\u51E6\u7406\u304C\u884C\u308F\u308C\u308B\u5358\u4E00\u306E\u30A8\u30F3\u30C8\u30EA \u30DD\u30A4\u30F3\u30C8 (\u3064\u307E\u308A\u3001process_instruction) \u304C\u3042\u308A\u307E\u3059\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u306F\u5E38\u306B\u4EE5\u4E0B\u304C\u542B\u307E\u308C\u307E\u3059\u3002
    • program_id: pubkey(\u516C\u958B\u9375)
    • accounts: array (\u914D\u5217)
    • instruction_data: byte array(\u30D0\u30A4\u30C8\u914D\u5217)
  • ",1),M=e("h2",{id:"\u8A73\u7D30",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8A73\u7D30","aria-hidden":"true"},"#"),t(" \u8A73\u7D30")],-1),j=e("p",null,"\u4ED6\u306E\u307B\u3068\u3093\u3069\u306E\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u3068\u306F\u7570\u306A\u308A\u3001Solana\u306F\u30B3\u30FC\u30C9\u3068\u30C7\u30FC\u30BF\u3092\u5B8C\u5168\u306B\u5206\u96E2\u3057\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u3084\u308A\u53D6\u308A\u3059\u308B\u3059\u3079\u3066\u306E\u30C7\u30FC\u30BF\u306F\u500B\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u3001instructions\u3092\u4ECB\u3057\u3066\u53C2\u7167\u3068\u3057\u3066\u6E21\u3055\u308C\u307E\u3059\u3002 \u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u8FFD\u52A0\u306E\u30C7\u30D7\u30ED\u30A4\u3092\u5FC5\u8981\u3068\u305B\u305A\u306B1\u3064\u306E\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u3055\u307E\u3056\u307E\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u52D5\u4F5C\u3055\u305B\u308B\u3053\u3068\u3092\u53EF\u80FD\u306B\u3057\u307E\u3059\u3002 \u3053\u306E\u30D1\u30BF\u30FC\u30F3\u306E\u4E00\u822C\u7684\u306A\u4F8B\u306F\u3001Native Programs\u3068 SPL(The Solana Program Library)\u3067\u898B\u3089\u308C\u307E\u3059\u3002",-1),O=e("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),t(" Native Programs & The Solana Program Library (SPL)")],-1),U=t("Solana \u306B\u306F\u3001\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30A4\u30F3\u30BF\u30E9\u30AF\u30B7\u30E7\u30F3\u306E\u4E2D\u6838\u306E\u69CB\u6210\u8981\u7D20\u3068\u3057\u3066\u6A5F\u80FD\u3059\u308B\u591A\u6570\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u642D\u8F09\u3055\u308C\u3066\u3044\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001 "),z={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},H=t("Native Programs"),G=t(" \u3068 "),J={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},K=t("Solana Program Library (SPL) Programs"),q=t("\u306B\u5206\u3051\u3089\u308C\u307E\u3059\u3002"),Q=t("\u30CD\u30A4\u30C6\u30A3\u30D6\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30D0\u30EA\u30C7\u30FC\u30BF\u306E\u64CD\u4F5C\u306B\u5FC5\u8981\u306A\u57FA\u672C\u6A5F\u80FD\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4E2D\u3067\u6700\u3082\u3088\u304F\u77E5\u3089\u308C\u3066\u3044\u308B\u306E\u306F\u3001\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u7BA1\u7406\u30682\u8005\u9593\u3067\u306E SOL\u306E\u8EE2\u9001\u3092\u62C5\u5F53\u3059\u308B "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=t("System Program"),Y=t(" \u3067\u3059\u3002"),Z=t("SPL \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30C8\u30FC\u30AF\u30F3\u306E\u4F5C\u6210\u3001\u4EA4\u63DB\u3001\u8CB8\u4ED8\u3001\u30B9\u30C6\u30FC\u30AF\u30D7\u30FC\u30EB\u306E\u751F\u6210\u3001\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9\u306E\u7DAD\u6301\u306A\u3069\u3001\u591A\u304F\u306E\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3 \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002 "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ee=t("SPL Token Program"),te=t("CLI \u7D4C\u7531\u3067\u76F4\u63A5\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u304C\u3001 "),oe={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},re=t("Associated Token Account Program"),ne=t(" \u306F\u901A\u5E38\u3001\u30AB\u30B9\u30BF\u30E0 \u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002"),se=e("h3",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30DF\u30F3\u30AF\u3099",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30DF\u30F3\u30AF\u3099","aria-hidden":"true"},"#"),t(" \u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0")],-1),ae=t("\u30D7\u30ED\u30B0\u30E9\u30E0\u306FRust\u307E\u305F\u306FC++\u3067\u958B\u767A\u3055\u308C\u308B\u306E\u304C\u6700\u3082\u4E00\u822C\u7684\u3067\u3059\u304C\u3001LLVM\u306EBPF\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u3092\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3059\u308B\u4EFB\u610F\u306E\u8A00\u8A9E\u3067\u958B\u767A\u3067\u304D\u307E\u3059\u3002 "),de={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ie=t("Neon Labs"),ce=t(" \u3068 "),le={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_e=t("Solang"),he=t(" \u6700\u8FD1\u306E\u53D6\u308A\u7D44\u307F\u306B\u3088\u308A\u3001 "),pe={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ue=t("EVM"),ge=t("\u3068\u306E\u4E92\u63DB\u6027\u304C\u5B9F\u73FE\u3057\u3001\u958B\u767A\u8005\u304CSolidity\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u66F8\u3051\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002"),me=n("

    \u307B\u3068\u3093\u3069\u306E Rust \u30D9\u30FC\u30B9\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u6B21\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u6E96\u62E0\u3057\u3066\u3044\u307E\u3059\u3002:

    \u30D5\u30A1\u30A4\u30EB\u540D\u8AAC\u660E
    lib.rs\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u767B\u9332
    entrypoint.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u3078\u306E\u30A8\u30F3\u30C8\u30EA\u30DD\u30A4\u30F3\u30C8
    instruction.rs\u30D7\u30ED\u30B0\u30E9\u30E0 API\u3001\u547D\u4EE4\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3001\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA
    processor.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u30ED\u30B8\u30C3\u30AF
    state.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3001\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306E\u30B9\u30C6\u30FC\u30BF\u30B9
    error.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u56FA\u6709\u306E\u30A8\u30E9\u30FC
    ",2),be=t("\u8FD1\u5E74\u306F\u3001"),fe={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ke=t("Anchor"),ye=t(" \u304C\u4EBA\u6C17\u306E\u958B\u767A\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3068\u3057\u3066\u767B\u5834\u3057\u3066\u3044\u307E\u3059\u3002 Anchor \u306F\u3001Ruby on Rails \u306B\u4F3C\u305F\u72EC\u81EA\u306E\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3067\u3042\u308A\u3001\u5B9A\u578B\u6587\u3092\u524A\u6E1B\u3057\u3001Rust \u30D9\u30FC\u30B9\u306E\u958B\u767A\u306E (\u30C7) \u30B7\u30EA\u30A2\u30EB\u5316\u30D7\u30ED\u30BB\u30B9\u3092\u5408\u7406\u5316\u3057\u307E\u3059\u3002"),Pe=n("

    \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u901A\u5E38\u3001Testnet \u307E\u305F\u306F Mainnet \u306B\u30C7\u30D7\u30ED\u30A4\u3055\u308C\u308B\u524D\u306B\u3001Localhost \u304A\u3088\u3073 Devnet \u74B0\u5883\u306B\u5BFE\u3057\u3066\u958B\u767A\u304A\u3088\u3073\u30C6\u30B9\u30C8\u3055\u308C\u307E\u3059\u3002 Solana \u306F\u4EE5\u4E0B\u306E\u74B0\u5883\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059:

    \u30AF\u30E9\u30B9\u30BF\u74B0\u5883RPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),Le=t("\u5404\u74B0\u5883\u306B\u30C7\u30D7\u30ED\u30A4\u5F8C\u3001\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306F\u305D\u308C\u305E\u308C\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3078\u306E "),Se={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ve=t("RPC\u63A5\u7D9A"),xe=t(" \u3092\u4ECB\u3057\u3066\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u5BFE\u8A71\u304C\u53EF\u80FD\u3067\u3059\u3002"),Fe=e("h3",{id:"\u30C6\u3099\u30D5\u309A\u30ED\u30A4",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30C6\u3099\u30D5\u309A\u30ED\u30A4","aria-hidden":"true"},"#"),t(" \u30C7\u30D7\u30ED\u30A4")],-1),Be=t("\u958B\u767A\u8005\u306F "),Re={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ae=t("CLI"),Ce=t("\u7D4C\u7531\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30C7\u30D7\u30ED\u30A4\u53EF\u80FD\u3067\u3059\u3002:"),Ne=n(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as d,r as s,o as i,c,a as e,b as o,w as l,F as _,d as t,e as n}from"./app.d411e3b3.js";const h={},p=e("h1",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30E0","aria-hidden":"true"},"#"),t(" \u30D7\u30ED\u30B0\u30E9\u30E0")],-1),u=e("p",null,"\u958B\u767A\u8005\u306F\u8AB0\u3067\u3082\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F5C\u6210\u3057\u3066Solana\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u306B\u30C7\u30D7\u30ED\u30A4\u3067\u304D\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0(\u4ED6\u306E\u30D7\u30ED\u30C8\u30B3\u30EB\u3067\u306F\u30B9\u30DE\u30FC\u30C8\u30B3\u30F3\u30C8\u30E9\u30AF\u30C8\u3068\u3057\u3066\u77E5\u3089\u308C\u308B\u3053\u3068\u304C\u591A\u3044)\u306F\u3001 \u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306E\u57FA\u76E4\u3068\u3057\u3066\u6A5F\u80FD\u3057\u3001DeFi \u3084 NFT\u3001\u30BD\u30FC\u30B7\u30E3\u30EB\u30E1\u30C7\u30A3\u30A2\u3084\u30B2\u30FC\u30E0\u306B\u81F3\u308B\u307E\u3067\u3001\u3042\u3089\u3086\u308B\u3082\u306E\u3092\u5F37\u5316\u3057\u307E\u3059\u3002",-1),g=e("h2",{id:"\u6982\u8981",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u6982\u8981","aria-hidden":"true"},"#"),t(" \u6982\u8981")],-1),m={class:"custom-container tip"},b=e("p",{class:"custom-container-title"},"Fact Sheet",-1),f=e("li",null,[t("\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30A8\u30F3\u30C9\u30E6\u30FC\u30B6\u30FC\u304B\u3089\u3068\u3001\u4ED6\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304B\u3089\u306E "),e("a",{href:"./transactions"},"instructions"),t(" \u306E\u4E21\u65B9\u3092\u51E6\u7406\u3057\u307E\u3059\u3002")],-1),k=t("\u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u30B9\u30C6\u30FC\u30C8\u30EC\u30B9\u3067\u3059\u3002\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u3084\u308A\u53D6\u308A\u3059\u308B\u3059\u3079\u3066\u306E\u30C7\u30FC\u30BF\u306F\u3001\u547D\u4EE4\u3092\u4ECB\u3057\u3066\u6E21\u3055\u308C\u308B\u500B\u5225\u306E "),y=t("accounts"),P=t(" \u306B\u4FDD\u5B58\u3055\u308C\u307E\u3059\u3002"),L=e("li",null,[t("\u30D7\u30ED\u30B0\u30E9\u30E0\u81EA\u4F53\u306F\u3001"),e("code",null,"executable"),t("\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u307E\u3059")],-1),S=t("\u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F "),v={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},x=t("BPF Loader"),F=t(" \u306B\u3088\u3063\u3066\u6240\u6709\u3055\u308C\u3001"),B={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},R=t("Solana Runtime"),A=t("\u3000\u306B\u3088\u3063\u3066\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002"),C=t("\u958B\u767A\u8005\u306F\u3001Rust \u307E\u305F\u306F C++ \u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u4F5C\u6210\u3059\u308B\u306E\u304C\u6700\u3082\u4E00\u822C\u7684\u3067\u3059\u304C\u3001"),N={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},T=t("LLVM"),D=t(" \u306E "),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},w=t("BPF"),E=t(" \u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u3092\u5BFE\u8C61\u3068\u3059\u308B\u4EFB\u610F\u306E\u8A00\u8A9E\u3092\u9078\u629E\u3067\u304D\u307E\u3059\u3002"),V=n("
  • \u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u306F\u3001\u547D\u4EE4\u51E6\u7406\u304C\u884C\u308F\u308C\u308B\u5358\u4E00\u306E\u30A8\u30F3\u30C8\u30EA \u30DD\u30A4\u30F3\u30C8 (\u3064\u307E\u308A\u3001process_instruction) \u304C\u3042\u308A\u307E\u3059\u3002\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u306F\u5E38\u306B\u4EE5\u4E0B\u304C\u542B\u307E\u308C\u307E\u3059\u3002
    • program_id: pubkey(\u516C\u958B\u9375)
    • accounts: array (\u914D\u5217)
    • instruction_data: byte array(\u30D0\u30A4\u30C8\u914D\u5217)
  • ",1),M=e("h2",{id:"\u8A73\u7D30",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8A73\u7D30","aria-hidden":"true"},"#"),t(" \u8A73\u7D30")],-1),j=e("p",null,"\u4ED6\u306E\u307B\u3068\u3093\u3069\u306E\u30D6\u30ED\u30C3\u30AF\u30C1\u30A7\u30FC\u30F3\u3068\u306F\u7570\u306A\u308A\u3001Solana\u306F\u30B3\u30FC\u30C9\u3068\u30C7\u30FC\u30BF\u3092\u5B8C\u5168\u306B\u5206\u96E2\u3057\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u3084\u308A\u53D6\u308A\u3059\u308B\u3059\u3079\u3066\u306E\u30C7\u30FC\u30BF\u306F\u500B\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u4FDD\u5B58\u3055\u308C\u3001instructions\u3092\u4ECB\u3057\u3066\u53C2\u7167\u3068\u3057\u3066\u6E21\u3055\u308C\u307E\u3059\u3002 \u3053\u306E\u30E2\u30C7\u30EB\u306F\u3001\u8FFD\u52A0\u306E\u30C7\u30D7\u30ED\u30A4\u3092\u5FC5\u8981\u3068\u305B\u305A\u306B1\u3064\u306E\u6C4E\u7528\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u3055\u307E\u3056\u307E\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u52D5\u4F5C\u3055\u305B\u308B\u3053\u3068\u3092\u53EF\u80FD\u306B\u3057\u307E\u3059\u3002 \u3053\u306E\u30D1\u30BF\u30FC\u30F3\u306E\u4E00\u822C\u7684\u306A\u4F8B\u306F\u3001Native Programs\u3068 SPL(The Solana Program Library)\u3067\u898B\u3089\u308C\u307E\u3059\u3002",-1),O=e("h3",{id:"native-programs-the-solana-program-library-spl",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#native-programs-the-solana-program-library-spl","aria-hidden":"true"},"#"),t(" Native Programs & The Solana Program Library (SPL)")],-1),U=t("Solana \u306B\u306F\u3001\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30A4\u30F3\u30BF\u30E9\u30AF\u30B7\u30E7\u30F3\u306E\u4E2D\u6838\u306E\u69CB\u6210\u8981\u7D20\u3068\u3057\u3066\u6A5F\u80FD\u3059\u308B\u591A\u6570\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u642D\u8F09\u3055\u308C\u3066\u3044\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001 "),z={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},H=t("Native Programs"),G=t(" \u3068 "),J={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},K=t("Solana Program Library (SPL) Programs"),q=t("\u306B\u5206\u3051\u3089\u308C\u307E\u3059\u3002"),Q=t("\u30CD\u30A4\u30C6\u30A3\u30D6\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30D0\u30EA\u30C7\u30FC\u30BF\u306E\u64CD\u4F5C\u306B\u5FC5\u8981\u306A\u57FA\u672C\u6A5F\u80FD\u3092\u63D0\u4F9B\u3057\u307E\u3059\u3002 \u3053\u308C\u3089\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E\u4E2D\u3067\u6700\u3082\u3088\u304F\u77E5\u3089\u308C\u3066\u3044\u308B\u306E\u306F\u3001\u65B0\u3057\u3044\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u7BA1\u7406\u30682\u8005\u9593\u3067\u306E SOL\u306E\u8EE2\u9001\u3092\u62C5\u5F53\u3059\u308B "),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=t("System Program"),Y=t(" \u3067\u3059\u3002"),Z=t("SPL \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u30C8\u30FC\u30AF\u30F3\u306E\u4F5C\u6210\u3001\u4EA4\u63DB\u3001\u8CB8\u4ED8\u3001\u30B9\u30C6\u30FC\u30AF\u30D7\u30FC\u30EB\u306E\u751F\u6210\u3001\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30CD\u30FC\u30E0\u30B5\u30FC\u30D3\u30B9\u306E\u7DAD\u6301\u306A\u3069\u3001\u591A\u304F\u306E\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3 \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u307E\u3059\u3002 "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},ee=t("SPL Token Program"),te=t("CLI \u7D4C\u7531\u3067\u76F4\u63A5\u547C\u3073\u51FA\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u304C\u3001 "),oe={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},re=t("Associated Token Account Program"),ne=t(" \u306F\u901A\u5E38\u3001\u30AB\u30B9\u30BF\u30E0 \u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002"),se=e("h3",{id:"\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30DF\u30F3\u30AF\u3099",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30D5\u309A\u30ED\u30AF\u3099\u30E9\u30DF\u30F3\u30AF\u3099","aria-hidden":"true"},"#"),t(" \u30D7\u30ED\u30B0\u30E9\u30DF\u30F3\u30B0")],-1),ae=t("\u30D7\u30ED\u30B0\u30E9\u30E0\u306FRust\u307E\u305F\u306FC++\u3067\u958B\u767A\u3055\u308C\u308B\u306E\u304C\u6700\u3082\u4E00\u822C\u7684\u3067\u3059\u304C\u3001LLVM\u306EBPF\u30D0\u30C3\u30AF\u30A8\u30F3\u30C9\u3092\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3059\u308B\u4EFB\u610F\u306E\u8A00\u8A9E\u3067\u958B\u767A\u3067\u304D\u307E\u3059\u3002 "),de={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},ie=t("Neon Labs"),ce=t(" \u3068 "),le={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_e=t("Solang"),he=t(" \u6700\u8FD1\u306E\u53D6\u308A\u7D44\u307F\u306B\u3088\u308A\u3001 "),pe={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ue=t("EVM"),ge=t("\u3068\u306E\u4E92\u63DB\u6027\u304C\u5B9F\u73FE\u3057\u3001\u958B\u767A\u8005\u304CSolidity\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u66F8\u3051\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002"),me=n("

    \u307B\u3068\u3093\u3069\u306E Rust \u30D9\u30FC\u30B9\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u3001\u6B21\u306E\u30A2\u30FC\u30AD\u30C6\u30AF\u30C1\u30E3\u306B\u6E96\u62E0\u3057\u3066\u3044\u307E\u3059\u3002:

    \u30D5\u30A1\u30A4\u30EB\u540D\u8AAC\u660E
    lib.rs\u30E2\u30B8\u30E5\u30FC\u30EB\u306E\u767B\u9332
    entrypoint.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u3078\u306E\u30A8\u30F3\u30C8\u30EA\u30DD\u30A4\u30F3\u30C8
    instruction.rs\u30D7\u30ED\u30B0\u30E9\u30E0 API\u3001\u547D\u4EE4\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3001\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA
    processor.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u30ED\u30B8\u30C3\u30AF
    state.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3001\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u306E\u30B9\u30C6\u30FC\u30BF\u30B9
    error.rs\u30D7\u30ED\u30B0\u30E9\u30E0\u56FA\u6709\u306E\u30A8\u30E9\u30FC
    ",2),be=t("\u8FD1\u5E74\u306F\u3001"),fe={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},ke=t("Anchor"),ye=t(" \u304C\u4EBA\u6C17\u306E\u958B\u767A\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3068\u3057\u3066\u767B\u5834\u3057\u3066\u3044\u307E\u3059\u3002 Anchor \u306F\u3001Ruby on Rails \u306B\u4F3C\u305F\u72EC\u81EA\u306E\u30D5\u30EC\u30FC\u30E0\u30EF\u30FC\u30AF\u3067\u3042\u308A\u3001\u5B9A\u578B\u6587\u3092\u524A\u6E1B\u3057\u3001Rust \u30D9\u30FC\u30B9\u306E\u958B\u767A\u306E (\u30C7) \u30B7\u30EA\u30A2\u30EB\u5316\u30D7\u30ED\u30BB\u30B9\u3092\u5408\u7406\u5316\u3057\u307E\u3059\u3002"),Pe=n("

    \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u901A\u5E38\u3001Testnet \u307E\u305F\u306F Mainnet \u306B\u30C7\u30D7\u30ED\u30A4\u3055\u308C\u308B\u524D\u306B\u3001Localhost \u304A\u3088\u3073 Devnet \u74B0\u5883\u306B\u5BFE\u3057\u3066\u958B\u767A\u304A\u3088\u3073\u30C6\u30B9\u30C8\u3055\u308C\u307E\u3059\u3002 Solana \u306F\u4EE5\u4E0B\u306E\u74B0\u5883\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u3044\u307E\u3059:

    \u30AF\u30E9\u30B9\u30BF\u74B0\u5883RPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)
    ",2),Le=t("\u5404\u74B0\u5883\u306B\u30C7\u30D7\u30ED\u30A4\u5F8C\u3001\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306F\u305D\u308C\u305E\u308C\u306E\u30AF\u30E9\u30B9\u30BF\u30FC\u3078\u306E "),Se={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},ve=t("RPC\u63A5\u7D9A"),xe=t(" \u3092\u4ECB\u3057\u3066\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u5BFE\u8A71\u304C\u53EF\u80FD\u3067\u3059\u3002"),Fe=e("h3",{id:"\u30C6\u3099\u30D5\u309A\u30ED\u30A4",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30C6\u3099\u30D5\u309A\u30ED\u30A4","aria-hidden":"true"},"#"),t(" \u30C7\u30D7\u30ED\u30A4")],-1),Be=t("\u958B\u767A\u8005\u306F "),Re={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},Ae=t("CLI"),Ce=t("\u7D4C\u7531\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u30C7\u30D7\u30ED\u30A4\u53EF\u80FD\u3067\u3059\u3002:"),Ne=n(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Te=t("\u30D7\u30ED\u30B0\u30E9\u30E0\u304C\u30C7\u30D7\u30ED\u30A4\u3055\u308C\u308B\u3068\u3001"),De={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ie=t("ELF shared object"),we=t(" (BPF \u30D0\u30A4\u30C8\u30B3\u30FC\u30C9\u3092\u542B\u3080) \u306B\u30B3\u30F3\u30D1\u30A4\u30EB\u3055\u308C\u3001Solana \u30AF\u30E9\u30B9\u30BF\u30FC\u306B\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3055\u308C\u307E\u3059\u3002 \u30D7\u30ED\u30B0\u30E9\u30E0\u306F (Solana \u306E\u4ED6\u306E\u3059\u3079\u3066\u3068\u540C\u69D8\u306B) \u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5B58\u5728\u3057\u307E\u3059\u304C\u3001\u3053\u308C\u3089\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F "),Ee=e("code",null,"executable",-1),Ve=t(" \u3068\u3057\u3066\u30DE\u30FC\u30AF\u3055\u308C\u3001BPF Loader\u306B\u5272\u308A\u5F53\u3066\u3089\u308C\u307E\u3059\u3002 \u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30A2\u30C9\u30EC\u30B9\u306F "),Me=e("code",null,"program_id",-1),je=t(" \u3068\u547C\u3070\u308C\u3001\u4ECA\u5F8C\u306E\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3067\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u53C2\u7167\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002"),Oe=t("Solana \u306F\u8907\u6570\u306E BPF \u30ED\u30FC\u30C0\u30FC\u3092\u30B5\u30DD\u30FC\u30C8\u3057\u3066\u304A\u308A\u3001\u6700\u65B0\u306E\u3082\u306E\u306F "),Ue={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},ze=t("Upgradable BPF Loader"),He=t("\u3067\u3059\u3002 BPF Loader\u306F\u30D7\u30ED\u30B0\u30E9\u30E0\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u7BA1\u7406\u3057\u3001program_id \u3092\u4ECB\u3057\u3066\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u304C\u5229\u7528\u3067\u304D\u308B\u3088\u3046\u306B\u3059\u308B\u8CAC\u52D9\u3092\u8CA0\u3044\u307E\u3059\u3002 \u3059\u3079\u3066\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u306F\u3001\u547D\u4EE4\u51E6\u7406\u304C\u884C\u308F\u308C\u308B\u5358\u4E00\u306E\u30A8\u30F3\u30C8\u30EA \u30DD\u30A4\u30F3\u30C8 ("),Ge=e("code",null,"process_instruction",-1),Je=t(") \u304C\u3042\u308A\u3001\u30D1\u30E9\u30E1\u30FC\u30BF\u306B\u306F\u5E38\u306B\u6B21\u306E\u3082\u306E\u304C\u542B\u307E\u308C\u307E\u3059\u3002:"),Ke=n('
    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    \u547C\u3073\u51FA\u3055\u308C\u308B\u3068\u3001\u30D7\u30ED\u30B0\u30E9\u30E0\u306F Solana \u30E9\u30F3\u30BF\u30A4\u30E0\u306B\u3088\u3063\u3066\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002

    \u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599

    ',3),qe={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Qe=t("Official Documentation"),We={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Xe=t("SPL Documentation"),Ye={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},Ze=t("Program Deploys by Justin Starry"),$e={href:"https://book.solmeet.dev/notes/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},et=t("Solana Starter Kit by Iron Addicted Dog"),tt={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},ot=t("Programming on Solana by Paulx"),rt={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},nt=t("An Introduction to the Solana Blockchain by Hana"),st={href:"https://github.com/coral-xyz/anchor",target:"_blank",rel:"noopener noreferrer"},at=t("Anchor");function dt(it,ct){const a=s("RouterLink"),r=s("ExternalLinkIcon");return i(),c(_,null,[p,u,g,e("div",m,[b,e("ul",null,[f,e("li",null,[k,o(a,{to:"/ja/core-concepts/accounts.html"},{default:l(()=>[y]),_:1}),P]),L,e("li",null,[S,e("a",v,[x,o(r)]),F,e("a",B,[R,o(r)]),A]),e("li",null,[C,e("a",N,[T,o(r)]),D,e("a",I,[w,o(r)]),E]),V])]),M,j,O,e("p",null,[U,e("a",z,[H,o(r)]),G,e("a",J,[K,o(r)]),q]),e("p",null,[Q,e("a",W,[X,o(r)]),Y]),e("p",null,[Z,e("a",$,[ee,o(r)]),te,e("a",oe,[re,o(r)]),ne]),se,e("p",null,[ae,e("a",de,[ie,o(r)]),ce,e("a",le,[_e,o(r)]),he,e("a",pe,[ue,o(r)]),ge]),me,e("p",null,[be,e("a",fe,[ke,o(r)]),ye]),Pe,e("p",null,[Le,e("a",Se,[ve,o(r)]),xe]),Fe,e("p",null,[Be,e("a",Re,[Ae,o(r)]),Ce]),Ne,e("p",null,[Te,e("a",De,[Ie,o(r)]),we,Ee,Ve,Me,je]),e("p",null,[Oe,e("a",Ue,[ze,o(r)]),He,Ge,Je]),Ke,e("ul",null,[e("li",null,[e("a",qe,[Qe,o(r)])]),e("li",null,[e("a",We,[Xe,o(r)])]),e("li",null,[e("a",Ye,[Ze,o(r)])]),e("li",null,[e("a",$e,[et,o(r)])]),e("li",null,[e("a",tt,[ot,o(r)])]),e("li",null,[e("a",rt,[nt,o(r)])]),e("li",null,[e("a",st,[at,o(r)])])])],64)}var _t=d(h,[["render",dt]]);export{_t as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.135d8a1e.js b/docs/.vuepress/dist/assets/programs.html.e6708ad9.js similarity index 95% rename from docs/.vuepress/dist/assets/programs.html.135d8a1e.js rename to docs/.vuepress/dist/assets/programs.html.e6708ad9.js index 0270f89d8..e54a0fb5c 100644 --- a/docs/.vuepress/dist/assets/programs.html.135d8a1e.js +++ b/docs/.vuepress/dist/assets/programs.html.e6708ad9.js @@ -1,4 +1,4 @@ -import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"menulis-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#menulis-program","aria-hidden":"true"},"#"),s(" Menulis Program")],-1),_=n("h2",{id:"bagaimana-cara-mentransfer-sol-di-dalam-sebuah-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-mentransfer-sol-di-dalam-sebuah-program","aria-hidden":"true"},"#"),s(" Bagaimana cara mentransfer SOL di dalam sebuah program")],-1),y=n("p",null,[s("Program Solana anda dapat mentransfer lamports dari sebuah akun ke akun lainnya tanpa 'invoke' program system. Aturan dasar adalah program anda dapat mentransfer lamports dari akun mana saja yang "),n("strong",null,"dimiliki"),s(" oleh program anda ke semua akun.")],-1),g=n("p",null,[s("Penerima akun "),n("strong",null,"tidak harus menjadi"),s(" sebuah akun yang dimilik oleh program anda.")],-1),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` +import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"menulis-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#menulis-program","aria-hidden":"true"},"#"),s(" Menulis Program")],-1),_=n("h2",{id:"bagaimana-cara-mentransfer-sol-di-dalam-sebuah-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-mentransfer-sol-di-dalam-sebuah-program","aria-hidden":"true"},"#"),s(" Bagaimana cara mentransfer SOL di dalam sebuah program")],-1),y=n("p",null,[s("Program Solana anda dapat mentransfer lamports dari sebuah akun ke akun lainnya tanpa 'invoke' program system. Aturan dasar adalah program anda dapat mentransfer lamports dari akun mana saja yang "),n("strong",null,"dimiliki"),s(" oleh program anda ke semua akun.")],-1),g=n("p",null,[s("Penerima akun "),n("strong",null,"tidak harus menjadi"),s(" sebuah akun yang dimilik oleh program anda.")],-1),f=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"/// Transfers lamports from one account (must be program owned)"),s(` `),n("span",{class:"token comment"},"/// to another account. The recipient can by any account"),s(` `),n("span",{class:"token keyword"},"fn"),s(),n("span",{class:"token function-definition function"},"transfer_service_fee_lamports"),n("span",{class:"token punctuation"},"("),s(` from_account`),n("span",{class:"token punctuation"},":"),s(),n("span",{class:"token operator"},"&"),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},","),s(` @@ -81,7 +81,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},"}"),s(` `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br")])],-1),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" clock "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token class-name"},"Clock"),n("span",{class:"token punctuation"},"::"),n("span",{class:"token function"},"from_account_info"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("sysvar_clock_pubkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"let"),s(" current_timestamp "),n("span",{class:"token operator"},"="),s(" clock"),n("span",{class:"token punctuation"},"."),s("unix_timestamp"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"Now we pass the clock's sysvar public address via the client",-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br")])],-1),P=n("p",null,"Now we pass the clock's sysvar public address via the client",-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -155,7 +155,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),T=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br")])],-1),I=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"77ezihTV6mTh2Uf3ggwbYF2NyGJJ5HHah1GrdowWJVD3"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -244,19 +244,29 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` + `),n("span",{class:"token string"},"'4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s("feePayer"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Hello state account"),s(` @@ -295,14 +305,14 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("allocateHelloAccountIx"),n("span",{class:"token punctuation"},","),s(" initIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` feePayer`),n("span",{class:"token punctuation"},","),s(` helloAccount`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Transaction succeeded. TxHash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br")])],-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk"'),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -465,7 +475,7 @@ import{_ as r,r as c,o as i,c as k,b as t,w as a,F as b,a as n,d as s,e as p}fro `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"realloc"),n("span",{class:"token punctuation"},"("),s("new_size"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token boolean"},"false"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),z=p('

    Bagaimana cara untuk membuat program Cross Invocation

    Program cross invocaction hanya dengan memanggil instruksi program lainnya di dalam program kita. Salah satu contoh yang baik untuk menghasilkan adalah dengan fungsi swap di Uniswap. UniswapV2Router contract, memanggil logic yang diperlukan untuk swap, dana memanggil fungsi ERC20 contract transfer untuk swap dari seseorang ke lainnya. Hal yang sama, kieta dapat memanggil sebuah instruksi program untuk dapat menghasilkan banyak tujuan.

    Mari kita lihat contoh instruksi pertama kita SPL Token Program's transfer. Akun-akun yang kita perlukan untuk menjadikan sebuah transfer adalah

    1. The Source Token Account (Akun yang memegang tokens kita)
    2. The Destination Token Account (Akun yang ingin kita transferkan token kita)
    3. The Source Token Account's Holder (alamat wallet kita yang akan kita gunakan untuk sign-in)
    ',4),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br")])],-1),B=p('

    Bagaimana cara untuk membuat program Cross Invocation

    Program cross invocaction hanya dengan memanggil instruksi program lainnya di dalam program kita. Salah satu contoh yang baik untuk menghasilkan adalah dengan fungsi swap di Uniswap. UniswapV2Router contract, memanggil logic yang diperlukan untuk swap, dana memanggil fungsi ERC20 contract transfer untuk swap dari seseorang ke lainnya. Hal yang sama, kieta dapat memanggil sebuah instruksi program untuk dapat menghasilkan banyak tujuan.

    Mari kita lihat contoh instruksi pertama kita SPL Token Program's transfer. Akun-akun yang kita perlukan untuk menjadikan sebuah transfer adalah

    1. The Source Token Account (Akun yang memegang tokens kita)
    2. The Destination Token Account (Akun yang ingin kita transferkan token kita)
    3. The Source Token Account's Holder (alamat wallet kita yang akan kita gunakan untuk sign-in)
    ',4),z=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -554,7 +564,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br"),n("span",{class:"line-number"},"89"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" token_transfer_amount "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -580,7 +590,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token operator"},"&"),s("required_accounts_for_transfer"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),B=n("br",null,null,-1),L=n("p",null,[s("Korespondensi instruksi client adalah sebagai berikut. Untuk mengetahui mint dan instruksi pembuatan token, tolong lihat ke full code sekitar. "),n("br"),n("br")],-1),H=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br")])],-1),M=n("br",null,null,-1),H=n("p",null,[s("Korespondensi instruksi client adalah sebagai berikut. Untuk mengetahui mint dan instruksi pembuatan token, tolong lihat ke full code sekitar. "),n("br"),n("br")],-1),L=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` clusterApiUrl`),n("span",{class:"token punctuation"},","),s(` Connection`),n("span",{class:"token punctuation"},","),s(` Keypair`),n("span",{class:"token punctuation"},","),s(` @@ -795,7 +805,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Token transfer CPI success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),G=p("

    Mari sekarang lihat contoh lainnya yang adalah instruksi System Program's create_account. Ada beberapa perbedaan sedikit antara instruksi yang disebutkan diatas dan ini. Di atas, kita tidak pernah memerlukan token_program untuk dipass sebagai sebuah akun di dalam fungsi invoke. Namun, ada beberapa pengecualian dimana anda perlu untuk pass instruksi untuk meng-invoke program_id. Dalam kasus ini, itu adalah System Program's program_id. ("11111111111111111111111111111111"). Jadi akun-akun yang diperlukan sekarang akan menjadi

    1. Akun pembayar akun yang akan mendanai rent
    2. Akun yang akan dibuat
    3. Akun System Program
    ",2),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br")])],-1),G=p("

    Mari sekarang lihat contoh lainnya yang adalah instruksi System Program's create_account. Ada beberapa perbedaan sedikit antara instruksi yang disebutkan diatas dan ini. Di atas, kita tidak pernah memerlukan token_program untuk dipass sebagai sebuah akun di dalam fungsi invoke. Namun, ada beberapa pengecualian dimana anda perlu untuk pass instruksi untuk meng-invoke program_id. Dalam kasus ini, itu adalah System Program's program_id. ("11111111111111111111111111111111"). Jadi akun-akun yang diperlukan sekarang akan menjadi

    1. Akun pembayar akun yang akan mendanai rent
    2. Akun yang akan dibuat
    3. Akun System Program
    ",2),V=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token namespace"},[s("account_info"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token punctuation"},"{"),s("next_account_info"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token class-name"},"AccountInfo"),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` entrypoint`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token namespace"},[s("entrypoint"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramResult"),n("span",{class:"token punctuation"},","),s(` @@ -883,7 +893,7 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br")])],-1),W=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" account_span "),n("span",{class:"token operator"},"="),s(` instruction_data +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br"),n("span",{class:"line-number"},"86"),n("br"),n("span",{class:"line-number"},"87"),n("br"),n("span",{class:"line-number"},"88"),n("br")])],-1),F=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" account_span "),n("span",{class:"token operator"},"="),s(` instruction_data `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},".."),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"and_then"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("slice"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(" slice"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"try_into"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"ok"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map"),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"u64"),n("span",{class:"token punctuation"},"::"),s("from_le_bytes"),n("span",{class:"token punctuation"},")"),s(` @@ -906,29 +916,43 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token function"},"invoke"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("create_account_instruction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token operator"},"&"),s("required_accounts_for_create"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),V=n("p",null,"Code di client side akan terlihat seperti ini",-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" Transaction"),n("span",{class:"token punctuation"},","),s(" TransactionInstruction "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br")])],-1),W=n("p",null,"Code di client side akan terlihat seperti ini",-1),j=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection"),n("span",{class:"token punctuation"},","),s(" Keypair "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(" PublicKey"),n("span",{class:"token punctuation"},","),s(" SystemProgram "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(` + Transaction`),n("span",{class:"token punctuation"},","),s(` + TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` -`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"bn.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token constant"},"BN"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'bn.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Users"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"ACCOUNT_SPACE_BUFFER"),s(),n("span",{class:"token operator"},"="),s(" Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),s(` - Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"le"'),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` + Uint8Array`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"of"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"..."),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},[n("span",{class:"token constant"},"BN")]),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"100"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toArray"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'le'"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token number"},"8"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` + `),n("span",{class:"token string"},"'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token comment"},"// Airdropping some SOL"),s(` + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Our program's CPI instruction (create_account)"),s(` @@ -958,14 +982,14 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token comment"},"// Adding up all the above instructions"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createAccountIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"GENERAL_STATE_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Create Account CPI Success: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),J=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br")])],-1),J=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` `),n("span",{class:"token string"},'"DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"'),s(` @@ -1110,26 +1134,50 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f Keypair`),n("span",{class:"token punctuation"},","),s(` `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},","),s(` PublicKey`),n("span",{class:"token punctuation"},","),s(` + sendAndConfirmTransaction`),n("span",{class:"token punctuation"},","),s(` SystemProgram`),n("span",{class:"token punctuation"},","),s(` Transaction`),n("span",{class:"token punctuation"},","),s(` TransactionInstruction`),n("span",{class:"token punctuation"},","),s(` -`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +`),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},"'@solana/web3.js'"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` - `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'devnet'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},"'confirmed'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" latestBlockHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"getLatestBlockhash"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(" programId "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"PublicKey"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token string"},'"6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp"'),s(` + `),n("span",{class:"token string"},"'6eW5nnSosr2LpkUGCdznsjRGDhVb26tLmiM1P8RV1QQp'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token comment"},"// Airdop to Payer"),s(` `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),n("span",{class:"token punctuation"},")"),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + + `),n("span",{class:"token comment"},"// Airdropping 1 SOL"),s(` + `),n("span",{class:"token keyword"},"const"),s(" feePayer "),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"confirmTransaction"),n("span",{class:"token punctuation"},"("),s(` + `),n("span",{class:"token punctuation"},"{"),s(` + blockhash`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("blockhash"),n("span",{class:"token punctuation"},","),s(` + lastValidBlockHeight`),n("span",{class:"token operator"},":"),s(" latestBlockHash"),n("span",{class:"token punctuation"},"."),s("lastValidBlockHeight"),n("span",{class:"token punctuation"},","),s(` + signature`),n("span",{class:"token operator"},":"),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"requestAirdrop"),n("span",{class:"token punctuation"},"("),s(` + feePayer`),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token constant"},"LAMPORTS_PER_SOL"),s(` + `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token string"},"'confirmed'"),s(` `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token punctuation"},"["),s("pda"),n("span",{class:"token punctuation"},","),s(" bump"),n("span",{class:"token punctuation"},"]"),s(),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" PublicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"findProgramAddress"),n("span",{class:"token punctuation"},"("),s(` - `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"customaddress"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"["),s("Buffer"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"from"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},"'customaddress'"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"."),s("publicKey"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"toBuffer"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},","),s(` programId `),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1160,10 +1208,12 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f `),n("span",{class:"token keyword"},"const"),s(" transaction "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Transaction"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` transaction`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"add"),n("span",{class:"token punctuation"},"("),s("createPDAIx"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` - `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(" connection"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"sendTransaction"),n("span",{class:"token punctuation"},"("),s("transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` + `),n("span",{class:"token keyword"},"const"),s(" txHash "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"await"),s(),n("span",{class:"token function"},"sendAndConfirmTransaction"),n("span",{class:"token punctuation"},"("),s("connection"),n("span",{class:"token punctuation"},","),s(" transaction"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token punctuation"},"["),s(` + `),n("span",{class:"token constant"},"PAYER_KEYPAIR"),n("span",{class:"token punctuation"},","),s(` + `),n("span",{class:"token punctuation"},"]"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token builtin"},"console"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),n("span",{class:"token template-string"},[n("span",{class:"token template-punctuation string"},"`"),n("span",{class:"token string"},"Created PDA successfully. Tx Hash: "),n("span",{class:"token interpolation"},[n("span",{class:"token interpolation-punctuation punctuation"},"${"),s("txHash"),n("span",{class:"token interpolation-punctuation punctuation"},"}")]),n("span",{class:"token template-punctuation string"},"`")]),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br")])],-1),an=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br"),n("span",{class:"line-number"},"72"),n("br"),n("span",{class:"line-number"},"73"),n("br"),n("span",{class:"line-number"},"74"),n("br"),n("span",{class:"line-number"},"75"),n("br"),n("span",{class:"line-number"},"76"),n("br"),n("span",{class:"line-number"},"77"),n("br"),n("span",{class:"line-number"},"78"),n("br"),n("span",{class:"line-number"},"79"),n("br"),n("span",{class:"line-number"},"80"),n("br"),n("span",{class:"line-number"},"81"),n("br"),n("span",{class:"line-number"},"82"),n("br"),n("span",{class:"line-number"},"83"),n("br"),n("span",{class:"line-number"},"84"),n("br"),n("span",{class:"line-number"},"85"),n("br")])],-1),an=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"const"),s(),n("span",{class:"token constant"},"PAYER_KEYPAIR"),s(),n("span",{class:"token operator"},"="),s(" Keypair"),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"generate"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` @@ -1466,4 +1516,4 @@ pda_account`),n("span",{class:"token punctuation"},"."),n("span",{class:"token f current `),n("span",{class:"token operator"},"+="),s(),n("span",{class:"token punctuation"},"("),s("num_accounts "),n("span",{class:"token keyword"},"as"),s(),n("span",{class:"token keyword"},"usize"),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"*"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token number"},"1"),s(),n("span",{class:"token operator"},"+"),s(),n("span",{class:"token number"},"32"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function dn(_n,yn){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,g,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[f]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[I]),preview:a(()=>[T]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),z,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[Y]),preview:a(()=>[M]),_:1})]),_:1}),B,L,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[H]),preview:a(()=>[q]),_:1})]),_:1}),G,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[F]),preview:a(()=>[W]),_:1})]),_:1}),V,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[J]),_:1})]),_:1}),Q,$,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[X]),preview:a(()=>[Z]),_:1})]),_:1}),nn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1})]),_:1}),pn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[ln]),preview:a(()=>[un]),_:1})]),_:1}),rn,kn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[bn]),preview:a(()=>[mn]),_:1})]),_:1})],64)}var fn=r(m,[["render",dn]]);export{fn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br")])],-1);function dn(_n,yn){const l=c("CodeGroupItem"),u=c("CodeGroup"),e=c("SolanaCodeGroupItem"),o=c("SolanaCodeGroup");return i(),k(b,null,[d,_,y,g,t(u,null,{default:a(()=>[t(l,{title:"Program"},{default:a(()=>[f]),_:1})]),_:1}),w,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[h]),preview:a(()=>[A]),_:1})]),_:1}),P,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[T]),preview:a(()=>[I]),_:1})]),_:1}),E,R,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[S]),preview:a(()=>[v]),_:1})]),_:1}),x,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[C]),preview:a(()=>[K]),_:1})]),_:1}),O,N,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[D]),preview:a(()=>[U]),_:1})]),_:1}),B,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[z]),preview:a(()=>[Y]),_:1})]),_:1}),M,H,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[L]),preview:a(()=>[q]),_:1})]),_:1}),G,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[V]),preview:a(()=>[F]),_:1})]),_:1}),W,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[j]),preview:a(()=>[J]),_:1})]),_:1}),Q,$,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[X]),preview:a(()=>[Z]),_:1})]),_:1}),nn,t(o,null,{default:a(()=>[t(e,{title:"TS",active:""},{default:a(()=>[sn]),preview:a(()=>[an]),_:1})]),_:1}),tn,en,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[on]),preview:a(()=>[cn]),_:1})]),_:1}),pn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[ln]),preview:a(()=>[un]),_:1})]),_:1}),rn,kn,t(o,null,{default:a(()=>[t(e,{title:"Rust",active:""},{default:a(()=>[bn]),preview:a(()=>[mn]),_:1})]),_:1})],64)}var fn=r(m,[["render",dn]]);export{fn as default}; diff --git a/docs/.vuepress/dist/assets/programs.html.602c11ba.js b/docs/.vuepress/dist/assets/programs.html.f498c46e.js similarity index 99% rename from docs/.vuepress/dist/assets/programs.html.602c11ba.js rename to docs/.vuepress/dist/assets/programs.html.f498c46e.js index bb9152b1a..6f7866784 100644 --- a/docs/.vuepress/dist/assets/programs.html.602c11ba.js +++ b/docs/.vuepress/dist/assets/programs.html.f498c46e.js @@ -1,2 +1,2 @@ -import{_ as d,r as s,o as i,c as l,a as t,b as o,w as c,F as _,d as e,e as r}from"./app.07ce7a66.js";const h={},p=t("h1",{id:"\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7A0B\u5E8F")],-1),u=t("p",null,"\u4EFB\u4F55\u5F00\u53D1\u8005\u90FD\u53EF\u4EE5\u5728Solana\u94FE\u4E0A\u7F16\u5199\u4EE5\u53CA\u90E8\u7F72\u7A0B\u5E8F\u3002Solana\u7A0B\u5E8F\uFF08\u5728\u5176\u4ED6\u94FE\u4E0A\u53EB\u505A\u667A\u80FD\u5408\u7EA6\uFF09\uFF0C\u662F\u6240\u6709\u94FE\u4E0A\u6D3B\u52A8\u7684\u57FA\u7840\u3002 \u94FE\u4E0A\u7684\u4E00\u5207\u6D3B\u52A8\uFF0C\u4ECE\u53BB\u4E2D\u5FC3\u5316\u91D1\u878D\uFF08DeFi\uFF09\uFF0C\u5230\u975E\u540C\u8D28\u5316\u4EE3\u5E01\uFF08NFT\uFF09\uFF0C\u518D\u5230\u793E\u4EA4\u5A92\u4F53\uFF0C\u94FE\u4E0A\u6E38\u620F\uFF0C\u90FD\u7531Solana\u7A0B\u5E8F\u6240\u9A71\u52A8\u3002",-1),g=t("h2",{id:"\u7EFC\u8FF0",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7EFC\u8FF0","aria-hidden":"true"},"#"),e(" \u7EFC\u8FF0")],-1),b={class:"custom-container tip"},m=t("p",{class:"custom-container-title"},"\u8981\u70B9",-1),f=t("li",null,[e("\u7A0B\u5E8F\u53EF\u4EE5\u5904\u7406\u6765\u81EA\u7528\u6237\u548C\u5176\u4ED6\u7A0B\u5E8F\u7684"),t("a",{href:"./transactions"},"\u6307\u4EE4")],-1),k=e("\u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u662F"),S=t("strong",null,"\u65E0\u72B6\u6001",-1),P=e("\u7684\uFF1A\u6240\u6709\u7684\u548C\u7A0B\u5E8F\u4EA4\u4E92\u7684\u6570\u636E\u90FD\u662F\u5B58\u50A8\u5728\u72EC\u7ACB\u7684"),y=e("\u8D26\u6237"),L=e("\u4E2D\u3002\u6267\u884C\u65F6\uFF0C\u8FD9\u4E9B\u8D26\u6237\u501F\u7531\u6307\u4EE4\u4F20\u5165\u7A0B\u5E8F"),v=t("li",null,[e("\u7A0B\u5E8F\u672C\u8EAB\u5B58\u50A8\u5728\u6807\u8BB0\u4E3A"),t("code",null,"executable"),e("\uFF08\u53EF\u6267\u884C\uFF09\u7684\u8D26\u6237\u4E2D\u3002")],-1),x=e("\u4EFB\u4F55\u7A0B\u5E8F\u7684\u6240\u6709\u8005\u90FD\u662F"),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},B=e("BPF Loader"),R=e(" and executed by the "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},w=e("Solana Runtime"),E=e("\u5F00\u53D1\u8005\u901A\u5E38\u4F7F\u7528Rust\u6216C++\u6765\u7F16\u5199\u7A0B\u5E8F\uFF0C\u4E5F\u53EF\u4EE5\u91C7\u7528\u4EFB\u4F55\u5176\u4ED6\u53EF\u4EE5\u7F16\u8BD1\u4E3A"),T={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=e("LLVM"),C=e("\u7684"),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=e("BPF"),N=e("\u540E\u7AEF\u7684\u8BED\u8A00"),D=r("
  • \u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u6709\u4E00\u4E2A\u5355\u72EC\u7684\u5165\u53E3\u70B9\uFF0C\u6307\u4EE4\u7684\u6267\u884C\u5C31\u662F\u4ECE\u8FD9\u91CC\u5F00\u59CB\u7684\uFF08\u4EA6\u5373process_instruction\uFF09\u3002\u53C2\u6570\u987B\u5305\u62EC\uFF1A
    • program_id: pubkey \uFF08\u516C\u94A5\uFF09
    • accounts: array \uFF08\u6570\u7EC4\uFF09
    • instruction_data: byte array \uFF08\u5B57\u8282\u6570\u7EC4\uFF09
  • ",1),j=t("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),e(" \u6DF1\u5165")],-1),U=t("p",null,'\u4E0E\u5176\u4ED6\u94FE\u4E0D\u540C\uFF0CSolana\u5C06\u4EE3\u7801\u4E0E\u6570\u636E\u5B8C\u5168\u5206\u5F00\u3002 \u7A0B\u5E8F\u9700\u8981\u8BBF\u95EE\u7684\u5168\u90E8\u6570\u636E\u90FD\u5B58\u50A8\u5728\u72EC\u7ACB\u7684\u8D26\u6237\u4E2D\uFF0C\u5728\u6307\u4EE4\u4E2D\u8FD9\u4E9B\u8D26\u6237\u9700\u8981\u4EE5\u5F15\u7528\u7684\u65B9\u5F0F\u4F20\u5165\u3002 \u8FD9\u79CD\u6A21\u5F0F\u4F7F\u5F97\u4E00\u4E2A\u901A\u7528\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u8D26\u6237\u4E0A\u8FD0\u884C\uFF0C\u800C\u4E0D\u7528\u4E3A\u6B64\u989D\u5916\u90E8\u7F72\u7A0B\u5E8F\u3002 \u8FD9\u79CD\u6A21\u5F0F\u7684\u4F8B\u5B50\u5F88\u5E38\u89C1\uFF0C\u5305\u62EC\u4E86"\u539F\u751F\u7A0B\u5E8F"\u4EE5\u53CA"SPL\u7A0B\u5E8F"\u7B49\u3002',-1),H=t("h3",{id:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5E93-spl",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5E93-spl","aria-hidden":"true"},"#"),e(" \u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5E93\uFF08SPL\uFF09")],-1),O=e("Solana\u81EA\u5E26\u4E00\u7CFB\u5217\u7A0B\u5E8F\uFF0C\u8FD9\u4E9B\u7A0B\u5E8F\u662F\u94FE\u4E0A\u4EA4\u4E92\u7684\u6838\u5FC3\u6784\u6210\u8981\u7D20\u3002 \u8FD9\u4E9B\u7A0B\u5E8F\u5206\u4E3A"),z={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=e("\u539F\u751F\u7A0B\u5E8F"),J=e(" \u548C"),K={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},q=e("Solana\u7A0B\u5E8F\u5E93\uFF08SPL\u7A0B\u5E8F\uFF09"),Q=e("\u539F\u751F\u7A0B\u5E8F\u63D0\u4F9B\u4E86\u8FD0\u884C\u9A8C\u8BC1\u8282\u70B9\uFF08validator\uFF09\u6240\u9700\u7684\u529F\u80FD\u3002\u539F\u751F\u7A0B\u5E8F\u4E2D\u6700\u5E7F\u4E3A\u4EBA\u77E5\u7684\u662F"),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=e("System Program"),Y=e("\u3002 \u8FD9\u4E2A\u7A0B\u5E8F\u8D1F\u8D23\u7BA1\u7406\u5EFA\u7ACB\u65B0\u8D26\u6237\u4EE5\u53CA\u5728\u4E24\u4E2A\u8D26\u6237\u4E4B\u95F4\u8F6C\u8D26SOL\u3002"),Z=e("SPL\u7A0B\u5E8F\u5B9A\u4E49\u4E86\u4E00\u7CFB\u5217\u7684\u94FE\u4E0A\u6D3B\u52A8\uFF0C\u5176\u4E2D\u5305\u62EC\u9488\u5BF9\u4EE3\u5E01\u7684\u521B\u5EFA\uFF0C\u4EA4\u6362\uFF0C\u501F\u8D37\uFF0C\u4EE5\u53CA\u521B\u5EFA\u8D28\u62BC\u6C60\uFF0C\u7EF4\u62A4\u94FE\u4E0A\u57DF\u540D\u89E3\u6790\u670D\u52A1\u7B49\u3002 "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},tt=e("SPL Token Program\uFF08SPL\u4EE3\u5E01\u7A0B\u5E8F\uFF09"),et=e("\u53EF\u4EE5\u76F4\u63A5\u5728\u547D\u4EE4\u884C\u8C03\u7528\uFF0C\u5176\u4ED6\u7684\u4E00\u4E9B\uFF0C\u5982 "),ot={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},nt=e("Associated Token Account Program\uFF08\u5173\u8054\u4EE3\u5E01\u8D26\u6237\u7A0B\u5E8F\uFF09"),rt=e("\uFF0C \u5219\u5E38\u88AB\u7528\u4E8E\u7F16\u5199\u5176\u4ED6\u5B9A\u5236\u7A0B\u5E8F\u3002"),st=t("h3",{id:"\u7F16\u5199\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7F16\u5199\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7F16\u5199\u7A0B\u5E8F")],-1),at=e("\u7F16\u5199Solana\u7A0B\u5E8F\u5E38\u7528\u7684\u662FRust\u548CC++\uFF0C\u4F46\u662F\u4E5F\u53EF\u4EE5\u4F7F\u7528\u5176\u4ED6\u53EF\u4EE5\u7F16\u8BD1\u4E3ALLVM\u7684BPF\u540E\u7AEF\u7684\u8BED\u8A00\u3002 \u6700\u8FD1"),dt={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},it=e("Neon Labs"),lt=e("\u548C"),ct={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_t=e("Solang"),ht=e("\u53D1\u8D77\u4E86\u4E00\u4E2A\u9879\u76EE\uFF0C \u65E8\u5728\u5EFA\u7ACBSolana\u7684"),pt={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ut=e("EVM"),gt=e("\u517C\u5BB9\u6027\uFF0C\u8FDB\u800C\u8BA9\u5F00\u53D1\u8005\u53EF\u4EE5\u4F7F\u7528Solidity\u7F16\u5199\u7A0B\u5E8F\u3002"),bt=r("

    \u5927\u90E8\u5206Rust\u7F16\u5199\u7684\u7A0B\u5E8F\u9075\u5FAA\u4EE5\u4E0B\u67B6\u6784\uFF1A

    \u6587\u4EF6\u63CF\u8FF0
    lib.rs\u6CE8\u518C\u6A21\u5757
    entrypoint.rs\u7A0B\u5E8F\u7684\u5165\u53E3\u70B9
    instruction.rs\u7A0B\u5E8F\u7684API, \u5BF9\u6307\u4EE4\u7684\u6570\u636E\u8FDB\u884C\u5E8F\u5217\u5316\u4E0E\u53CD\u5E8F\u5217\u5316
    processor.rs\u7A0B\u5E8F\u7684\u4E1A\u52A1\u903B\u8F91
    state.rs\u7A0B\u5E8F\u5BF9\u8C61\uFF0C\u5BF9\u72B6\u6001\u8FDB\u884C\u53CD\u5E8F\u5217\u5316
    error.rs\u7A0B\u5E8F\u4E2D\u5236\u5B9A\u7684\u9519\u8BEF
    ",2),mt=e("\u6700\u8FD1\uFF0C"),ft={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},kt=e("Anchor"),St=e("\u9010\u6E10\u6210\u4E3A\u4E86\u4E00\u4E2A\u5E7F\u53D7\u6B22\u8FCE\u7684Solana\u7A0B\u5E8F\u5F00\u53D1\u6846\u67B6\u3002 Anchor\u662F\u4E00\u4E2A\u6709\u6001\u5EA6\u7684\u6846\u67B6\uFF0C\u4E0ERuby on Rails\u76F8\u4F3C\uFF0C\u8FD9\u4E2A\u6846\u67B6\u65E8\u5728\u51CF\u5C11\u6A21\u5F0F\u5316\u7684\u4EE3\u7801\uFF0C\u5C06Rust\u5F00\u53D1\u6D41\u7A0B\u4E2D\u7684\u5E8F\u5217\u5316\u4E0E\u53CD\u5E8F\u5217\u5316\u8FC7\u7A0B\u6D41\u6C34\u7EBF\u5316\u3002"),Pt=r("

    \u5728\u90E8\u7F72\u5230Testnet\uFF08\u6D4B\u8BD5\u7F51\uFF09\u548CMainnet\uFF08\u4E3B\u7F51\uFF09\u4E4B\u524D\uFF0C\u7A0B\u5E8F\u5728\u5F00\u53D1\u548C\u6D4B\u8BD5\u9636\u6BB5\u7ECF\u5E38\u4F7F\u7528Localhost\u548CDevnet\uFF08\u5F00\u53D1\u7F51\uFF09\u73AF\u5883\u3002 Solana\u652F\u6301\u4EE5\u4E0B\u7684\u51E0\u4E2A\u73AF\u5883\uFF1A

    \u96C6\u7FA4\u73AF\u5883RPC\u8FDE\u63A5URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhost\u9ED8\u8BA4\u7AEF\u53E3\uFF1A8899\uFF08\u4F8B\u5982\uFF0Chttp://localhost:8899\uFF0Chttp://192.168.1.88:8899\uFF09
    ",2),yt=e("\u90E8\u7F72\u5230\u4E00\u4E2A\u73AF\u5883\u4E4B\u540E\uFF0C\u5BA2\u6237\u7AEF\u5C31\u53EF\u4EE5\u901A\u8FC7\u5BF9\u5E94\u96C6\u7FA4\u7684"),Lt={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},vt=e("RPC\u8FDE\u63A5"),xt=e("\u4E0E\u94FE\u4E0A\u7A0B\u5E8F\u8FDB\u884C\u4EA4\u4E92\u3002"),Ft=t("h3",{id:"\u90E8\u7F72\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u90E8\u7F72\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u90E8\u7F72\u7A0B\u5E8F")],-1),Bt=e("\u5F00\u53D1\u8005\u53EF\u4EE5\u4F7F\u7528"),Rt={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},At=e("\u547D\u4EE4\u884C"),wt=e("\u90E8\u7F72\u7A0B\u5E8F\uFF1A"),Et=r(`
    solana program deploy <PROGRAM_FILEPATH>
    +import{_ as d,r as s,o as i,c as l,a as t,b as o,w as c,F as _,d as e,e as r}from"./app.d411e3b3.js";const h={},p=t("h1",{id:"\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7A0B\u5E8F")],-1),u=t("p",null,"\u4EFB\u4F55\u5F00\u53D1\u8005\u90FD\u53EF\u4EE5\u5728Solana\u94FE\u4E0A\u7F16\u5199\u4EE5\u53CA\u90E8\u7F72\u7A0B\u5E8F\u3002Solana\u7A0B\u5E8F\uFF08\u5728\u5176\u4ED6\u94FE\u4E0A\u53EB\u505A\u667A\u80FD\u5408\u7EA6\uFF09\uFF0C\u662F\u6240\u6709\u94FE\u4E0A\u6D3B\u52A8\u7684\u57FA\u7840\u3002 \u94FE\u4E0A\u7684\u4E00\u5207\u6D3B\u52A8\uFF0C\u4ECE\u53BB\u4E2D\u5FC3\u5316\u91D1\u878D\uFF08DeFi\uFF09\uFF0C\u5230\u975E\u540C\u8D28\u5316\u4EE3\u5E01\uFF08NFT\uFF09\uFF0C\u518D\u5230\u793E\u4EA4\u5A92\u4F53\uFF0C\u94FE\u4E0A\u6E38\u620F\uFF0C\u90FD\u7531Solana\u7A0B\u5E8F\u6240\u9A71\u52A8\u3002",-1),g=t("h2",{id:"\u7EFC\u8FF0",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7EFC\u8FF0","aria-hidden":"true"},"#"),e(" \u7EFC\u8FF0")],-1),b={class:"custom-container tip"},m=t("p",{class:"custom-container-title"},"\u8981\u70B9",-1),f=t("li",null,[e("\u7A0B\u5E8F\u53EF\u4EE5\u5904\u7406\u6765\u81EA\u7528\u6237\u548C\u5176\u4ED6\u7A0B\u5E8F\u7684"),t("a",{href:"./transactions"},"\u6307\u4EE4")],-1),k=e("\u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u662F"),S=t("strong",null,"\u65E0\u72B6\u6001",-1),P=e("\u7684\uFF1A\u6240\u6709\u7684\u548C\u7A0B\u5E8F\u4EA4\u4E92\u7684\u6570\u636E\u90FD\u662F\u5B58\u50A8\u5728\u72EC\u7ACB\u7684"),y=e("\u8D26\u6237"),L=e("\u4E2D\u3002\u6267\u884C\u65F6\uFF0C\u8FD9\u4E9B\u8D26\u6237\u501F\u7531\u6307\u4EE4\u4F20\u5165\u7A0B\u5E8F"),v=t("li",null,[e("\u7A0B\u5E8F\u672C\u8EAB\u5B58\u50A8\u5728\u6807\u8BB0\u4E3A"),t("code",null,"executable"),e("\uFF08\u53EF\u6267\u884C\uFF09\u7684\u8D26\u6237\u4E2D\u3002")],-1),x=e("\u4EFB\u4F55\u7A0B\u5E8F\u7684\u6240\u6709\u8005\u90FD\u662F"),F={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},B=e("BPF Loader"),R=e(" and executed by the "),A={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},w=e("Solana Runtime"),E=e("\u5F00\u53D1\u8005\u901A\u5E38\u4F7F\u7528Rust\u6216C++\u6765\u7F16\u5199\u7A0B\u5E8F\uFF0C\u4E5F\u53EF\u4EE5\u91C7\u7528\u4EFB\u4F55\u5176\u4ED6\u53EF\u4EE5\u7F16\u8BD1\u4E3A"),T={href:"https://llvm.org/",target:"_blank",rel:"noopener noreferrer"},V=e("LLVM"),C=e("\u7684"),I={href:"https://en.wikipedia.org/wiki/Berkeley_Packet_Filter",target:"_blank",rel:"noopener noreferrer"},M=e("BPF"),N=e("\u540E\u7AEF\u7684\u8BED\u8A00"),D=r("
  • \u6240\u6709\u7684\u7A0B\u5E8F\u90FD\u6709\u4E00\u4E2A\u5355\u72EC\u7684\u5165\u53E3\u70B9\uFF0C\u6307\u4EE4\u7684\u6267\u884C\u5C31\u662F\u4ECE\u8FD9\u91CC\u5F00\u59CB\u7684\uFF08\u4EA6\u5373process_instruction\uFF09\u3002\u53C2\u6570\u987B\u5305\u62EC\uFF1A
    • program_id: pubkey \uFF08\u516C\u94A5\uFF09
    • accounts: array \uFF08\u6570\u7EC4\uFF09
    • instruction_data: byte array \uFF08\u5B57\u8282\u6570\u7EC4\uFF09
  • ",1),j=t("h2",{id:"\u6DF1\u5165",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u6DF1\u5165","aria-hidden":"true"},"#"),e(" \u6DF1\u5165")],-1),U=t("p",null,'\u4E0E\u5176\u4ED6\u94FE\u4E0D\u540C\uFF0CSolana\u5C06\u4EE3\u7801\u4E0E\u6570\u636E\u5B8C\u5168\u5206\u5F00\u3002 \u7A0B\u5E8F\u9700\u8981\u8BBF\u95EE\u7684\u5168\u90E8\u6570\u636E\u90FD\u5B58\u50A8\u5728\u72EC\u7ACB\u7684\u8D26\u6237\u4E2D\uFF0C\u5728\u6307\u4EE4\u4E2D\u8FD9\u4E9B\u8D26\u6237\u9700\u8981\u4EE5\u5F15\u7528\u7684\u65B9\u5F0F\u4F20\u5165\u3002 \u8FD9\u79CD\u6A21\u5F0F\u4F7F\u5F97\u4E00\u4E2A\u901A\u7528\u7684\u7A0B\u5E8F\u53EF\u4EE5\u5728\u4E0D\u540C\u7684\u8D26\u6237\u4E0A\u8FD0\u884C\uFF0C\u800C\u4E0D\u7528\u4E3A\u6B64\u989D\u5916\u90E8\u7F72\u7A0B\u5E8F\u3002 \u8FD9\u79CD\u6A21\u5F0F\u7684\u4F8B\u5B50\u5F88\u5E38\u89C1\uFF0C\u5305\u62EC\u4E86"\u539F\u751F\u7A0B\u5E8F"\u4EE5\u53CA"SPL\u7A0B\u5E8F"\u7B49\u3002',-1),H=t("h3",{id:"\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5E93-spl",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u539F\u751F\u7A0B\u5E8F\u548Csolana\u7A0B\u5E8F\u5E93-spl","aria-hidden":"true"},"#"),e(" \u539F\u751F\u7A0B\u5E8F\u548CSolana\u7A0B\u5E8F\u5E93\uFF08SPL\uFF09")],-1),O=e("Solana\u81EA\u5E26\u4E00\u7CFB\u5217\u7A0B\u5E8F\uFF0C\u8FD9\u4E9B\u7A0B\u5E8F\u662F\u94FE\u4E0A\u4EA4\u4E92\u7684\u6838\u5FC3\u6784\u6210\u8981\u7D20\u3002 \u8FD9\u4E9B\u7A0B\u5E8F\u5206\u4E3A"),z={href:"https://docs.solana.com/developing/runtime-facilities/programs#bpf-loader",target:"_blank",rel:"noopener noreferrer"},G=e("\u539F\u751F\u7A0B\u5E8F"),J=e(" \u548C"),K={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},q=e("Solana\u7A0B\u5E8F\u5E93\uFF08SPL\u7A0B\u5E8F\uFF09"),Q=e("\u539F\u751F\u7A0B\u5E8F\u63D0\u4F9B\u4E86\u8FD0\u884C\u9A8C\u8BC1\u8282\u70B9\uFF08validator\uFF09\u6240\u9700\u7684\u529F\u80FD\u3002\u539F\u751F\u7A0B\u5E8F\u4E2D\u6700\u5E7F\u4E3A\u4EBA\u77E5\u7684\u662F"),W={href:"https://docs.solana.com/developing/runtime-facilities/programs#system-program",target:"_blank",rel:"noopener noreferrer"},X=e("System Program"),Y=e("\u3002 \u8FD9\u4E2A\u7A0B\u5E8F\u8D1F\u8D23\u7BA1\u7406\u5EFA\u7ACB\u65B0\u8D26\u6237\u4EE5\u53CA\u5728\u4E24\u4E2A\u8D26\u6237\u4E4B\u95F4\u8F6C\u8D26SOL\u3002"),Z=e("SPL\u7A0B\u5E8F\u5B9A\u4E49\u4E86\u4E00\u7CFB\u5217\u7684\u94FE\u4E0A\u6D3B\u52A8\uFF0C\u5176\u4E2D\u5305\u62EC\u9488\u5BF9\u4EE3\u5E01\u7684\u521B\u5EFA\uFF0C\u4EA4\u6362\uFF0C\u501F\u8D37\uFF0C\u4EE5\u53CA\u521B\u5EFA\u8D28\u62BC\u6C60\uFF0C\u7EF4\u62A4\u94FE\u4E0A\u57DF\u540D\u89E3\u6790\u670D\u52A1\u7B49\u3002 "),$={href:"https://spl.solana.com/token",target:"_blank",rel:"noopener noreferrer"},tt=e("SPL Token Program\uFF08SPL\u4EE3\u5E01\u7A0B\u5E8F\uFF09"),et=e("\u53EF\u4EE5\u76F4\u63A5\u5728\u547D\u4EE4\u884C\u8C03\u7528\uFF0C\u5176\u4ED6\u7684\u4E00\u4E9B\uFF0C\u5982 "),ot={href:"https://spl.solana.com/associated-token-account",target:"_blank",rel:"noopener noreferrer"},nt=e("Associated Token Account Program\uFF08\u5173\u8054\u4EE3\u5E01\u8D26\u6237\u7A0B\u5E8F\uFF09"),rt=e("\uFF0C \u5219\u5E38\u88AB\u7528\u4E8E\u7F16\u5199\u5176\u4ED6\u5B9A\u5236\u7A0B\u5E8F\u3002"),st=t("h3",{id:"\u7F16\u5199\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u7F16\u5199\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u7F16\u5199\u7A0B\u5E8F")],-1),at=e("\u7F16\u5199Solana\u7A0B\u5E8F\u5E38\u7528\u7684\u662FRust\u548CC++\uFF0C\u4F46\u662F\u4E5F\u53EF\u4EE5\u4F7F\u7528\u5176\u4ED6\u53EF\u4EE5\u7F16\u8BD1\u4E3ALLVM\u7684BPF\u540E\u7AEF\u7684\u8BED\u8A00\u3002 \u6700\u8FD1"),dt={href:"https://neon-labs.org/",target:"_blank",rel:"noopener noreferrer"},it=e("Neon Labs"),lt=e("\u548C"),ct={href:"https://solang.readthedocs.io/en/latest/",target:"_blank",rel:"noopener noreferrer"},_t=e("Solang"),ht=e("\u53D1\u8D77\u4E86\u4E00\u4E2A\u9879\u76EE\uFF0C \u65E8\u5728\u5EFA\u7ACBSolana\u7684"),pt={href:"https://ethereum.org/en/developers/docs/evm/",target:"_blank",rel:"noopener noreferrer"},ut=e("EVM"),gt=e("\u517C\u5BB9\u6027\uFF0C\u8FDB\u800C\u8BA9\u5F00\u53D1\u8005\u53EF\u4EE5\u4F7F\u7528Solidity\u7F16\u5199\u7A0B\u5E8F\u3002"),bt=r("

    \u5927\u90E8\u5206Rust\u7F16\u5199\u7684\u7A0B\u5E8F\u9075\u5FAA\u4EE5\u4E0B\u67B6\u6784\uFF1A

    \u6587\u4EF6\u63CF\u8FF0
    lib.rs\u6CE8\u518C\u6A21\u5757
    entrypoint.rs\u7A0B\u5E8F\u7684\u5165\u53E3\u70B9
    instruction.rs\u7A0B\u5E8F\u7684API, \u5BF9\u6307\u4EE4\u7684\u6570\u636E\u8FDB\u884C\u5E8F\u5217\u5316\u4E0E\u53CD\u5E8F\u5217\u5316
    processor.rs\u7A0B\u5E8F\u7684\u4E1A\u52A1\u903B\u8F91
    state.rs\u7A0B\u5E8F\u5BF9\u8C61\uFF0C\u5BF9\u72B6\u6001\u8FDB\u884C\u53CD\u5E8F\u5217\u5316
    error.rs\u7A0B\u5E8F\u4E2D\u5236\u5B9A\u7684\u9519\u8BEF
    ",2),mt=e("\u6700\u8FD1\uFF0C"),ft={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},kt=e("Anchor"),St=e("\u9010\u6E10\u6210\u4E3A\u4E86\u4E00\u4E2A\u5E7F\u53D7\u6B22\u8FCE\u7684Solana\u7A0B\u5E8F\u5F00\u53D1\u6846\u67B6\u3002 Anchor\u662F\u4E00\u4E2A\u6709\u6001\u5EA6\u7684\u6846\u67B6\uFF0C\u4E0ERuby on Rails\u76F8\u4F3C\uFF0C\u8FD9\u4E2A\u6846\u67B6\u65E8\u5728\u51CF\u5C11\u6A21\u5F0F\u5316\u7684\u4EE3\u7801\uFF0C\u5C06Rust\u5F00\u53D1\u6D41\u7A0B\u4E2D\u7684\u5E8F\u5217\u5316\u4E0E\u53CD\u5E8F\u5217\u5316\u8FC7\u7A0B\u6D41\u6C34\u7EBF\u5316\u3002"),Pt=r("

    \u5728\u90E8\u7F72\u5230Testnet\uFF08\u6D4B\u8BD5\u7F51\uFF09\u548CMainnet\uFF08\u4E3B\u7F51\uFF09\u4E4B\u524D\uFF0C\u7A0B\u5E8F\u5728\u5F00\u53D1\u548C\u6D4B\u8BD5\u9636\u6BB5\u7ECF\u5E38\u4F7F\u7528Localhost\u548CDevnet\uFF08\u5F00\u53D1\u7F51\uFF09\u73AF\u5883\u3002 Solana\u652F\u6301\u4EE5\u4E0B\u7684\u51E0\u4E2A\u73AF\u5883\uFF1A

    \u96C6\u7FA4\u73AF\u5883RPC\u8FDE\u63A5URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhost\u9ED8\u8BA4\u7AEF\u53E3\uFF1A8899\uFF08\u4F8B\u5982\uFF0Chttp://localhost:8899\uFF0Chttp://192.168.1.88:8899\uFF09
    ",2),yt=e("\u90E8\u7F72\u5230\u4E00\u4E2A\u73AF\u5883\u4E4B\u540E\uFF0C\u5BA2\u6237\u7AEF\u5C31\u53EF\u4EE5\u901A\u8FC7\u5BF9\u5E94\u96C6\u7FA4\u7684"),Lt={href:"https://docs.solana.com/developing/clients/jsonrpc-api",target:"_blank",rel:"noopener noreferrer"},vt=e("RPC\u8FDE\u63A5"),xt=e("\u4E0E\u94FE\u4E0A\u7A0B\u5E8F\u8FDB\u884C\u4EA4\u4E92\u3002"),Ft=t("h3",{id:"\u90E8\u7F72\u7A0B\u5E8F",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u90E8\u7F72\u7A0B\u5E8F","aria-hidden":"true"},"#"),e(" \u90E8\u7F72\u7A0B\u5E8F")],-1),Bt=e("\u5F00\u53D1\u8005\u53EF\u4EE5\u4F7F\u7528"),Rt={href:"https://docs.solana.com/cli/deploy-a-program",target:"_blank",rel:"noopener noreferrer"},At=e("\u547D\u4EE4\u884C"),wt=e("\u90E8\u7F72\u7A0B\u5E8F\uFF1A"),Et=r(`
    solana program deploy <PROGRAM_FILEPATH>
     
    `,1),Tt=e("\u90E8\u7F72\u7A0B\u5E8F\u7684\u65F6\u5019\uFF0C\u7A0B\u5E8F\u4F1A\u88AB\u7F16\u8BD1\u4E3A\u5305\u542BBPF\u5B57\u8282\u7801\u7684"),Vt={href:"https://en.wikipedia.org/wiki/Executable_and_Linkable_Format",target:"_blank",rel:"noopener noreferrer"},Ct=e("ELF\u5171\u4EAB\u5BF9\u8C61"),It=e("\uFF0C\u5E76\u4E0A\u4F20\u5230Solana\u96C6\u7FA4\u4E0A\u3002 \u548CSolana\u4E0A\u5176\u4ED6\u7684\u4EFB\u4F55\u4E1C\u897F\u4E00\u6837\uFF0C\u7A0B\u5E8F\u50A8\u5B58\u5728\u8D26\u6237\u5F53\u4E2D\u3002\u552F\u4E00\u7684\u7279\u6B8A\u4E4B\u5904\u662F\uFF0C\u8FD9\u4E9B\u8D26\u6237\u6807\u8BB0\u4E3A"),Mt=t("code",null,"executable",-1),Nt=e('\uFF08\u53EF\u6267\u884C\uFF09\uFF0C\u5E76\u4E14\u5176\u6240\u6709\u8005\u662F"BPF Loader\uFF08BPF\u52A0\u8F7D\u5668\uFF09"\u3002 \u8FD9\u4E2A\u8D26\u6237\u7684\u5730\u5740\u88AB\u79F0\u4E3A'),Dt=t("code",null,"program_id",-1),jt=e("\uFF0C\u5728\u540E\u9762\u7684\u4E00\u5207\u4EA4\u6613\u5F53\u4E2D\uFF0C\u7528\u4E8E\u6307\u4EE3\u8FD9\u4E2A\u7A0B\u5E8F\u3002"),Ut=e("Solana\u652F\u6301\u591A\u79CDBPF\u52A0\u8F7D\u5668\uFF0C\u6700\u65B0\u7684\u662F"),Ht={href:"https://explorer.solana.com/address/BPFLoaderUpgradeab1e11111111111111111111111",target:"_blank",rel:"noopener noreferrer"},Ot=e("Upgradable BPF Loader"),zt=e("\u3002 BPF\u52A0\u8F7D\u5668\u8D1F\u8D23\u7BA1\u7406\u7A0B\u5E8F\u8D26\u6237\uFF0C\u8BA9\u5BA2\u6237\u7AEF\u53EF\u4EE5\u901A\u8FC7\u5176"),Gt=t("code",null,"program_id",-1),Jt=e("\u5BF9\u7A0B\u5E8F\u8FDB\u884C\u8BBF\u95EE\u3002\u6BCF\u4E2A\u7A0B\u5E8F\u90FD\u53EA\u6709\u4E00\u4E2A\u5165\u53E3\u70B9\uFF0C\u8FD9\u91CC\u5BF9\u6307\u4EE4\u8FDB\u884C\u5904\u7406\u3002\u8FD9\u91CC\u7684\u53C2\u6570\u987B\u5305\u62EC\uFF1A"),Kt=r('
    • program_id: pubkey\uFF08\u516C\u94A5\uFF09
    • accounts: array\uFF08\u6570\u7EC4\uFF09
    • instruction_data: byte array\uFF08\u5B57\u8282\u6570\u7EC4\uFF09

    \u5F53\u7A0B\u5E8F\u88AB\u8C03\u7528\u65F6\uFF0C\u4F1A\u5728Solana\u8FD0\u884C\u5E93\u4E2D\u88AB\u6267\u884C\u3002

    \u5176\u4ED6\u8D44\u6599

    ',3),qt={href:"https://docs.solana.com/developing/on-chain-programs/overview",target:"_blank",rel:"noopener noreferrer"},Qt=e("\u5B98\u65B9\u6587\u6863"),Wt={href:"https://spl.solana.com/",target:"_blank",rel:"noopener noreferrer"},Xt=e("SPL\u6587\u6863"),Yt={href:"https://jstarry.notion.site/Program-deploys-29780c48794c47308d5f138074dd9838",target:"_blank",rel:"noopener noreferrer"},Zt=e("Program Deploys by Justin Starry"),$t={href:"https://hackmd.io/@ironaddicteddog/solana-starter-kit",target:"_blank",rel:"noopener noreferrer"},te=e("Solana Starter Kit by Iron Addicted Dog"),ee={href:"https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/",target:"_blank",rel:"noopener noreferrer"},oe=e("Programming on Solana by Paulx"),ne={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},re=e("An Introduction to the Solana Blockchain by Hana"),se={href:"https://project-serum.github.io/anchor/getting-started/introduction.html",target:"_blank",rel:"noopener noreferrer"},ae=e("Anchor");function de(ie,le){const a=s("RouterLink"),n=s("ExternalLinkIcon");return i(),l(_,null,[p,u,g,t("div",b,[m,t("ul",null,[f,t("li",null,[k,S,P,o(a,{to:"/zh/core-concepts/accounts.html"},{default:c(()=>[y]),_:1}),L]),v,t("li",null,[x,t("a",F,[B,o(n)]),R,t("a",A,[w,o(n)])]),t("li",null,[E,t("a",T,[V,o(n)]),C,t("a",I,[M,o(n)]),N]),D])]),j,U,H,t("p",null,[O,t("a",z,[G,o(n)]),J,t("a",K,[q,o(n)])]),t("p",null,[Q,t("a",W,[X,o(n)]),Y]),t("p",null,[Z,t("a",$,[tt,o(n)]),et,t("a",ot,[nt,o(n)]),rt]),st,t("p",null,[at,t("a",dt,[it,o(n)]),lt,t("a",ct,[_t,o(n)]),ht,t("a",pt,[ut,o(n)]),gt]),bt,t("p",null,[mt,t("a",ft,[kt,o(n)]),St]),Pt,t("p",null,[yt,t("a",Lt,[vt,o(n)]),xt]),Ft,t("p",null,[Bt,t("a",Rt,[At,o(n)]),wt]),Et,t("p",null,[Tt,t("a",Vt,[Ct,o(n)]),It,Mt,Nt,Dt,jt]),t("p",null,[Ut,t("a",Ht,[Ot,o(n)]),zt,Gt,Jt]),Kt,t("ul",null,[t("li",null,[t("a",qt,[Qt,o(n)])]),t("li",null,[t("a",Wt,[Xt,o(n)])]),t("li",null,[t("a",Yt,[Zt,o(n)])]),t("li",null,[t("a",$t,[te,o(n)])]),t("li",null,[t("a",ee,[oe,o(n)])]),t("li",null,[t("a",ne,[re,o(n)])]),t("li",null,[t("a",se,[ae,o(n)])])])],64)}var _e=d(h,[["render",de]]);export{_e as default}; diff --git a/docs/.vuepress/dist/assets/retrying-transactions.html.63745293.js b/docs/.vuepress/dist/assets/retrying-transactions.html.fbbd8db1.js similarity index 99% rename from docs/.vuepress/dist/assets/retrying-transactions.html.63745293.js rename to docs/.vuepress/dist/assets/retrying-transactions.html.fbbd8db1.js index f652a9b94..566b5f126 100644 --- a/docs/.vuepress/dist/assets/retrying-transactions.html.63745293.js +++ b/docs/.vuepress/dist/assets/retrying-transactions.html.fbbd8db1.js @@ -1,4 +1,4 @@ -import{_ as d,r as a,o as u,c as p,a as e,b as s,w as o,F as h,e as r,d as n}from"./app.07ce7a66.js";var k="/assets/tx-journey.dd6310be.png",b="/assets/tpu-jito-labs.8bb32fb6.png",g="/assets/dropped-via-rpc-pool.8d1ce9af.png",_="/assets/dropped-minority-fork-pre-process.555653e1.png",m="/assets/dropped-minority-fork-post-process.48c3c955.png";const f={},w=r('

    Die Reise einer Transaktion

    In einigen F\xE4llen kann eine scheinbar g\xFCltige Transaktion verworfen werden, bevor sie in einen Block aufgenommen wird. Dies tritt am h\xE4ufigsten in Zeiten von Netzwerk\xFCberlastung auf, wenn ein RPC-Knoten die Transaktion nicht erneut an den [Leader] (https://docs.solana.com/terminology#leader) sendet. F\xFCr einen Endbenutzer kann es so aussehen, als w\xFCrde seine Transaktion vollst\xE4ndig verschwinden. W\xE4hrend RPC-Knoten mit einem generischen Rebroadcasting-Algorithmus ausgestattet sind, sind Anwendungsentwickler auch in der Lage, ihre eigene benutzerdefinierte Rebroadcasting-Logik zu entwickeln.

    Fakten

    Fact Sheet

    • RPC-Knoten versuchen, Transaktionen unter Verwendung eines generischen Algorithmus erneut auszusenden
    • Anwendungsentwickler k\xF6nnen ihre eigene benutzerdefinierte Rebroadcasting-Logik implementieren
    • Entwickler sollten den Parameter "maxRetries" in der JSON-RPC-Methode "sendTransaction" nutzen
    • Entwickler sollten Preflight-Pr\xFCfungen aktivieren, um Fehler zu melden, bevor Transaktionen \xFCbermittelt werden
    • Bevor Sie eine Transaktion neu signieren, ist es sehr wichtig sicherzustellen, dass der Blockhash der urspr\xFCnglichen Transaktion abgelaufen ist

    Die Reise einer Transaktion

    Wie Anwender Transaktionen \xFCbermitteln

    In Solana gibt es kein Konzept eines Mempools. Alle Transaktionen, ob programmgesteuert oder von einem Endbenutzer initiiert, werden effizient an Leader weitergeleitet, damit sie in einem Block verarbeitet werden k\xF6nnen. Es gibt zwei Hauptwege, auf denen eine Transaktion an F\xFChrungskr\xE4fte gesendet werden kann:

    ',7),v=n("Per Proxy \xFCber einen RPC-Server und die JSON-RPC-Methode "),T={href:"https://docs.solana.com/developing/clients/jsonrpc-api#sendtransaction",target:"_blank",rel:"noopener noreferrer"},z=n("sendTransaction"),P=n("."),y=e("li",null,"Direkt zu F\xFChrungskr\xE4ften \xFCber einen [TPU-Client] (https://docs.rs/solana-client/1.7.3/solana_client/tpu_client/index.html)",-1),B=e("p",null,"Die \xFCberwiegende Mehrheit der Endbenutzer \xFCbermittelt Transaktionen \xFCber einen RPC-Server. Wenn ein Client eine Transaktion \xFCbermittelt, versucht der empfangende RPC-Knoten wiederum, die Transaktion sowohl an den aktuellen als auch an den n\xE4chsten Leader zu senden. Bis die Transaktion von einem Leader verarbeitet wird, gibt es keine Aufzeichnung der Transaktion au\xDFerhalb dessen, was dem Client und den weiterleitenden RPC-Knoten bekannt ist. Im Fall eines TPU-Clients wird das Rebroadcasting und die Leader-Weiterleitung vollst\xE4ndig von der Client-Software gehandhabt.",-1),L=e("p",null,[e("img",{src:k,alt:"Transaction Journey"})],-1),R=e("h3",{id:"wie-rpc-knoten-transaktionen-senden",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#wie-rpc-knoten-transaktionen-senden","aria-hidden":"true"},"#"),n(" Wie RPC-Knoten Transaktionen senden")],-1),C=n("Nachdem ein RPC-Knoten eine Transaktion \xFCber \u201EsendTransaction\u201C empfangen hat, konvertiert er die Transaktion in ein "),S={href:"https://en.wikipedia.org/wiki/User_Datagram_Protocol",target:"_blank",rel:"noopener noreferrer"},x=n("UDP"),A=n("-Paket, bevor er es an die relevanten Leader weiterleitet. UDP erm\xF6glicht es Validatoren, schnell miteinander zu kommunizieren, bietet jedoch keine Garantien f\xFCr die Transaktionszustellung."),K=n("Da Solanas Leader-Zeitplan vor jeder "),F={href:"https://docs.solana.com/terminology#epoch",target:"_blank",rel:"noopener noreferrer"},W=n("Epoche"),E=n(" (~2 Tage) bekannt ist, sendet ein RPC-Knoten seine Transaktion direkt an die aktuellen und n\xE4chsten Leader. Dies steht im Gegensatz zu anderen Klatschprotokollen wie Ethereum, die Transaktionen zuf\xE4llig und breit \xFCber das gesamte Netzwerk verbreiten. Standardm\xE4\xDFig versuchen RPC-Knoten alle zwei Sekunden, Transaktionen an Leader weiterzuleiten, bis entweder die Transaktion abgeschlossen ist oder der Blockhash der Transaktion abl\xE4uft (150 Bl\xF6cke oder ~1 Minute 19 Sekunden zum Zeitpunkt des Schreibens dieses Artikels). Wenn die Gr\xF6\xDFe der ausstehenden Rebroadcast-Warteschlange gr\xF6\xDFer als "),V={href:"https://github.com/solana-labs/solana/blob/bfbbc53dac93b3a5c6be9b4b65f679fdb13e41d9/send-transaction-service/src/send_transaction_service.rs#L20",target:"_blank",rel:"noopener noreferrer"},D=n("10.000 Transaktionen"),I=n(" ist, werden neu \xFCbermittelte Transaktionen fallengelassen. Es gibt Befehlszeilen-"),M={href:"https://github.com/solana-labs/solana/blob/bfbbc53dac93b3a5c6be9b4b65f679fdb13e41d9/validator/src/main.rs#L1172",target:"_blank",rel:"noopener noreferrer"},N=n("Argumente"),j=n(", die die Logik der RPC-Operatoren anpassen k\xF6nnen, um das Standardverhalten dieser Wiederholung zu \xE4ndern."),U=n("Wenn ein RPC-Knoten eine Transaktion sendet, versucht er, die Transaktion an die "),H={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/validator.rs#L867",target:"_blank",rel:"noopener noreferrer"},G=n("Transaction Processing Unit (TPU)"),Z=n(" eines Leaders weiterzuleiten . Die TPU verarbeitet Transaktionen in f\xFCnf verschiedenen Phasen:"),q={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/fetch_stage.rs#L21",target:"_blank",rel:"noopener noreferrer"},O=n("Fetch Stage"),J={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/tpu.rs#L91",target:"_blank",rel:"noopener noreferrer"},Y=n("SigVerify Stage"),Q={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/banking_stage.rs#L249",target:"_blank",rel:"noopener noreferrer"},X=n("Banking Stage"),$={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/poh/src/poh_service.rs",target:"_blank",rel:"noopener noreferrer"},ee=n("Proof of History Service"),ne={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/tpu.rs#L136",target:"_blank",rel:"noopener noreferrer"},se=n("Broadcast Stage"),te=e("p",null,[e("img",{src:b,alt:"TPU Overview"}),e("small",{style:{display:"block","text-align":"center"}},"Image Courtesy of Jito Labs")],-1),ae=e("p",null,"Von diesen f\xFCnf Phasen ist die Fetch-Phase f\xFCr den Empfang von Transaktionen verantwortlich. Innerhalb der Fetch-Phase kategorisieren Validatoren eingehende Transaktionen nach drei Ports:",-1),oe={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/gossip/src/contact_info.rs#L27",target:"_blank",rel:"noopener noreferrer"},re=n("tpu"),ie=n(" verarbeitet regelm\xE4\xDFige Transaktionen wie Token-Transfers, NFT-Mints und Programmanweisungen"),ce={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/gossip/src/contact_info.rs#L31",target:"_blank",rel:"noopener noreferrer"},le=n("tpu_vote"),de=n(" konzentriert sich ausschlie\xDFlich auf Stimmrechtsgesch\xE4fte"),ue={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/gossip/src/contact_info.rs#L29",target:"_blank",rel:"noopener noreferrer"},pe=n("tpu_forwards"),he=n(" leitet unverarbeitete Pakete an den n\xE4chsten Leader weiter, wenn der aktuelle Leader nicht in der Lage ist, alle Transaktionen zu verarbeiten"),ke=n("Weitere Informationen zum TPU finden Sie unter "),be={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},ge=n("dieser hervorragenden Beschreibung von Jito Labs"),_e=n("."),me=e("h2",{id:"wie-transaktionen-verworfen-werden",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#wie-transaktionen-verworfen-werden","aria-hidden":"true"},"#"),n(" Wie Transaktionen verworfen werden")],-1),fe=e("p",null,"W\xE4hrend der Reise einer Transaktion gibt es einige Szenarien, in denen die Transaktion unbeabsichtigt aus dem Netzwerk fallen gelassen werden kann.",-1),we=e("h3",{id:"bevor-eine-transaktion-verarbeitet-wird",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#bevor-eine-transaktion-verarbeitet-wird","aria-hidden":"true"},"#"),n(" Bevor eine Transaktion verarbeitet wird")],-1),ve=n("Wenn das Netzwerk eine Transaktion verwirft, wird es dies h\xF6chstwahrscheinlich tun, bevor die Transaktion von einem Leader verarbeitet wird. UDP "),Te={href:"https://en.wikipedia.org/wiki/Packet_loss",target:"_blank",rel:"noopener noreferrer"},ze=n("Paketverlust"),Pe=n(" ist der einfachste Grund, warum dies auftreten kann. In Zeiten intensiver Netzwerklast ist es auch m\xF6glich, dass Validierer von der schieren Anzahl der f\xFCr die Verarbeitung erforderlichen Transaktionen \xFCberw\xE4ltigt werden. W\xE4hrend Validatoren in der Lage sind, \xFCbersch\xFCssige Transaktionen \xFCber "),ye=e("code",null,"tpu_forwards",-1),Be=n(" weiterzuleiten, gibt es eine Grenze f\xFCr die Datenmenge, die "),Le={href:"https://github.com/solana-labs/solana/blob/master/core/src/banking_stage.rs#L389",target:"_blank",rel:"noopener noreferrer"},Re=n("weitergeleitet"),Ce=n(" werden kann . Dar\xFCber hinaus ist jede Weiterleitung auf einen einzelnen Sprung zwischen Pr\xFCfern beschr\xE4nkt. Das hei\xDFt, Transaktionen, die auf dem "),Se=e("code",null,"tpu_forwards",-1),xe=n("-Port empfangen werden, werden nicht an andere Validatoren weitergeleitet."),Ae=n("Es gibt auch zwei weniger bekannte Gr\xFCnde, warum eine Transaktion verworfen werden kann, bevor sie verarbeitet wird. Das erste Szenario umfasst Transaktionen, die \xFCber einen RPC-Pool \xFCbermittelt werden. Gelegentlich kann ein Teil des RPC-Pools dem Rest des Pools ausreichend voraus sein. Dies kann zu Problemen f\xFChren, wenn Knoten innerhalb des Pools zusammenarbeiten m\xFCssen. In diesem Beispiel wird der "),Ke={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},Fe=n("recentBlockhash"),We=n(" der Transaktion aus dem erweiterten Teil des Pools (Backend A) abgefragt. Wenn die Transaktion an den verz\xF6gerten Teil des Pools (Backend B) gesendet wird, erkennen die Knoten den erweiterten Blockhash nicht und verwerfen die Transaktion. Dies kann bei der Transaktions\xFCbermittlung erkannt werden, wenn Entwickler "),Ee={href:"https://docs.solana.com/developing/clients/jsonrpc-api#sendtransaction",target:"_blank",rel:"noopener noreferrer"},Ve=n("Preflight-Pr\xFCfungen"),De=n(" f\xFCr "),Ie=e("code",null,"sendTransaction",-1),Me=n(" aktivieren."),Ne=r('

    \xDCber RPC Pool gel\xF6scht

    Vor\xFCbergehende Netzwerk-Forks k\xF6nnen auch zu abgebrochenen Transaktionen f\xFChren. Wenn ein Validator seine Bl\xF6cke innerhalb der Banking-Phase nur langsam wiedergibt, kann er am Ende einen Minority Fork erstellen. Wenn ein Client eine Transaktion erstellt, ist es m\xF6glich, dass die Transaktion auf einen recentBlockhash verweist, der nur auf dem Minority Fork existiert. Nachdem die Transaktion \xFCbermittelt wurde, kann der Cluster von seinem Minority Fork wegschalten, bevor die Transaktion verarbeitet wird. In diesem Szenario wird die Transaktion verworfen, weil der Blockhash nicht gefunden wird.

    Aufgrund von Minority Fork fallen gelassen (vor der Verarbeitung)

    Nachdem eine Transaktion verarbeitet wurde und bevor sie abgeschlossen wird

    F\xFCr den Fall, dass eine Transaktion auf einen \u201ErecentBlockhash\u201C von einem Minority Fork verweist, ist es immer noch m\xF6glich, dass die Transaktion verarbeitet wird. In diesem Fall w\xFCrde es jedoch vom Leader auf dem Minority Fork verarbeitet. Wenn dieser Anf\xFChrer versucht, seine verarbeiteten Transaktionen mit dem Rest des Netzwerks zu teilen, w\xFCrde er keinen Konsens mit der Mehrheit der Validatoren erzielen, die den Minority Fork nicht anerkennen. Zu diesem Zeitpunkt w\xFCrde die Transaktion fallen gelassen, bevor sie abgeschlossen werden k\xF6nnte.

    Gefallen aufgrund von Minority Fork (nach Verarbeitung)

    Umgang mit abgebrochenen Transaktionen

    W\xE4hrend RPC-Knoten versuchen, Transaktionen erneut zu \xFCbertragen, ist der von ihnen verwendete Algorithmus generisch und oft f\xFCr die Anforderungen bestimmter Anwendungen ungeeignet. Um sich auf Zeiten der Netzwerk\xFCberlastung vorzubereiten, sollten Anwendungsentwickler ihre eigene Rebroadcasting-Logik anpassen.

    Ein eingehender Blick in sendTransaction

    Wenn es um das Senden von Transaktionen geht, ist die RPC-Methode sendTransaction das prim\xE4re Tool, das Entwicklern zur Verf\xFCgung steht. sendTransaction ist nur f\xFCr die Weiterleitung einer Transaktion von einem Client an einen RPC-Knoten verantwortlich. Wenn der Knoten die Transaktion empf\xE4ngt, gibt sendTransaction die Transaktions-ID zur\xFCck, die zum Verfolgen der Transaktion verwendet werden kann. Eine erfolgreiche Antwort zeigt nicht an, ob die Transaktion vom Cluster verarbeitet oder abgeschlossen wird.

    ',10),je={class:"custom-container tip"},Ue=e("p",{class:"custom-container-title"},"TIP",-1),He=e("h4",{id:"request-parameters",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#request-parameters","aria-hidden":"true"},"#"),n(" Request Parameters")],-1),Ge=e("li",null,[e("code",null,"transaction"),n(": "),e("code",null,"string"),n(" - vollst\xE4ndig signierte Transaktion als verschl\xFCsselte Zeichenfolge")],-1),Ze=n("(optional) "),qe=e("code",null,"Konfigurationsobjekt",-1),Oe=n(": "),Je=e("code",null,"Objekt",-1),Ye=e("li",null,[e("code",null,"skipPreflight"),n(": "),e("code",null,"boolean"),n(" - wenn wahr, die Preflight-Transaktionspr\xFCfungen \xFCberspringen (Standard: falsch)")],-1),Qe=n("(optional) "),Xe=e("code",null,"preflightCommitment",-1),$e=n(": "),en=e("code",null,"string",-1),nn=n(" - "),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},tn=n("Commitment"),an=n(' Level zur Verwendung f\xFCr Preflight-Simulationen gegen den Bank-Slot (Standard: "abgeschlossen").'),on=e("li",null,[n("(optional) "),e("code",null,"encoding"),n(": "),e("code",null,"string"),n(' - Codierung, die f\xFCr die Transaktionsdaten verwendet werden. Entweder "base58" (langsam) oder "base64". (Standard: "base58").')],-1),rn=e("li",null,[n("(optional) "),e("code",null,"maxRetries"),n(": "),e("code",null,"usize"),n(" - Maximale Anzahl von Malen f\xFCr den RPC-Knoten, um erneut zu versuchen, die Transaktion an den Leader zu senden. Wenn dieser Parameter nicht angegeben wird, wiederholt der RPC-Knoten die Transaktion, bis sie abgeschlossen ist oder bis der Blockhash abl\xE4uft.")],-1),cn=e("h4",{id:"antwort",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#antwort","aria-hidden":"true"},"#"),n(" Antwort")],-1),ln=e("code",null,"transaction id",-1),dn=n(": "),un=e("code",null,"string",-1),pn=n(" \u2013 Erste in die Transaktion eingebettete Transaktionssignatur als base-58-codierte Zeichenfolge. Diese Transaktions-ID kann mit "),hn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getsignaturestatuses",target:"_blank",rel:"noopener noreferrer"},kn=n("getSignatureStatuses"),bn=n(" verwendet werden, um Statusaktualisierungen abzurufen."),gn=e("h2",{id:"anpassen-der-reroadcast-logik",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#anpassen-der-reroadcast-logik","aria-hidden":"true"},"#"),n(" Anpassen der Reroadcast-Logik")],-1),_n=n("Um ihre eigene Rebroadcasting-Logik zu entwickeln, sollten Entwickler den Parameter "),mn=e("code",null,"maxRetries",-1),fn=n(" von "),wn=e("code",null,"sendTransaction",-1),vn=n(" nutzen. Falls angegeben, \xFCberschreibt "),Tn=e("code",null,"maxRetries",-1),zn=n(" die standardm\xE4\xDFige Wiederholungslogik eines RPC-Knotens, sodass Entwickler den Wiederholungsprozess "),Pn={href:"https://github.com/solana-labs/solana/blob/98707baec2385a4f7114d2167ef6dfb1406f954f/validator/src/main.rs#L1258-L1274",target:"_blank",rel:"noopener noreferrer"},yn=n("innerhalb vern\xFCnftiger Grenzen"),Bn=n(" manuell steuern k\xF6nnen."),Ln=n("Ein g\xE4ngiges Muster f\xFCr das manuelle Wiederholen von Transaktionen besteht darin, "),Rn=e("code",null,"lastValidBlockHeight",-1),Cn=n(" vor\xFCbergehend zu speichern, das von "),Sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getlatestblockhash",target:"_blank",rel:"noopener noreferrer"},xn=n("getLatestBlockhash"),An=n(" stammt. Nach dem Zwischenspeichern kann eine Anwendung dann "),Kn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getblockheight",target:"_blank",rel:"noopener noreferrer"},Fn=n("die Blockh\xF6he des Clusters abfragen"),Wn=n(" und die Transaktion in einem angemessenen Intervall manuell wiederholen. In Zeiten von Netzwerk\xFCberlastung ist es vorteilhaft, \u201EmaxRetries\u201C auf 0 zu setzen und manuell \xFCber einen benutzerdefinierten Algorithmus erneut zu senden. W\xE4hrend einige Anwendungen m\xF6glicherweise einen "),En={href:"https://en.wikipedia.org/wiki/Exponential_backoff",target:"_blank",rel:"noopener noreferrer"},Vn=n("exponentiellen Backoff"),Dn=n("-Algorithmus verwenden, entscheiden sich andere wie "),In={href:"https://www.mango.markets/",target:"_blank",rel:"noopener noreferrer"},Mn=n("Mango"),Nn=n(" daf\xFCr, Transaktionen in einem konstanten Intervall "),jn={href:"https://github.com/blockworks-foundation/mango-ui/blob/b6abfc6c13b71fc17ebbe766f50b8215fa1ec54f/src/utils/send.tsx#L713",target:"_blank",rel:"noopener noreferrer"},Un=n("kontinuierlich erneut einzureichen"),Hn=n(", bis eine Zeit\xFCberschreitung aufgetreten ist."),Gn=e("div",{class:"language-typescript ext-ts line-numbers-mode"},[e("pre",{class:"language-typescript"},[e("code",null,[e("span",{class:"token keyword"},"import"),n(),e("span",{class:"token punctuation"},"{"),n(` +import{_ as d,r as a,o as u,c as p,a as e,b as s,w as o,F as h,e as r,d as n}from"./app.d411e3b3.js";var k="/assets/tx-journey.dd6310be.png",b="/assets/tpu-jito-labs.8bb32fb6.png",g="/assets/dropped-via-rpc-pool.8d1ce9af.png",_="/assets/dropped-minority-fork-pre-process.555653e1.png",m="/assets/dropped-minority-fork-post-process.48c3c955.png";const f={},w=r('

    Die Reise einer Transaktion

    In einigen F\xE4llen kann eine scheinbar g\xFCltige Transaktion verworfen werden, bevor sie in einen Block aufgenommen wird. Dies tritt am h\xE4ufigsten in Zeiten von Netzwerk\xFCberlastung auf, wenn ein RPC-Knoten die Transaktion nicht erneut an den [Leader] (https://docs.solana.com/terminology#leader) sendet. F\xFCr einen Endbenutzer kann es so aussehen, als w\xFCrde seine Transaktion vollst\xE4ndig verschwinden. W\xE4hrend RPC-Knoten mit einem generischen Rebroadcasting-Algorithmus ausgestattet sind, sind Anwendungsentwickler auch in der Lage, ihre eigene benutzerdefinierte Rebroadcasting-Logik zu entwickeln.

    Fakten

    Fact Sheet

    • RPC-Knoten versuchen, Transaktionen unter Verwendung eines generischen Algorithmus erneut auszusenden
    • Anwendungsentwickler k\xF6nnen ihre eigene benutzerdefinierte Rebroadcasting-Logik implementieren
    • Entwickler sollten den Parameter "maxRetries" in der JSON-RPC-Methode "sendTransaction" nutzen
    • Entwickler sollten Preflight-Pr\xFCfungen aktivieren, um Fehler zu melden, bevor Transaktionen \xFCbermittelt werden
    • Bevor Sie eine Transaktion neu signieren, ist es sehr wichtig sicherzustellen, dass der Blockhash der urspr\xFCnglichen Transaktion abgelaufen ist

    Die Reise einer Transaktion

    Wie Anwender Transaktionen \xFCbermitteln

    In Solana gibt es kein Konzept eines Mempools. Alle Transaktionen, ob programmgesteuert oder von einem Endbenutzer initiiert, werden effizient an Leader weitergeleitet, damit sie in einem Block verarbeitet werden k\xF6nnen. Es gibt zwei Hauptwege, auf denen eine Transaktion an F\xFChrungskr\xE4fte gesendet werden kann:

    ',7),v=n("Per Proxy \xFCber einen RPC-Server und die JSON-RPC-Methode "),T={href:"https://docs.solana.com/developing/clients/jsonrpc-api#sendtransaction",target:"_blank",rel:"noopener noreferrer"},z=n("sendTransaction"),P=n("."),y=e("li",null,"Direkt zu F\xFChrungskr\xE4ften \xFCber einen [TPU-Client] (https://docs.rs/solana-client/1.7.3/solana_client/tpu_client/index.html)",-1),B=e("p",null,"Die \xFCberwiegende Mehrheit der Endbenutzer \xFCbermittelt Transaktionen \xFCber einen RPC-Server. Wenn ein Client eine Transaktion \xFCbermittelt, versucht der empfangende RPC-Knoten wiederum, die Transaktion sowohl an den aktuellen als auch an den n\xE4chsten Leader zu senden. Bis die Transaktion von einem Leader verarbeitet wird, gibt es keine Aufzeichnung der Transaktion au\xDFerhalb dessen, was dem Client und den weiterleitenden RPC-Knoten bekannt ist. Im Fall eines TPU-Clients wird das Rebroadcasting und die Leader-Weiterleitung vollst\xE4ndig von der Client-Software gehandhabt.",-1),L=e("p",null,[e("img",{src:k,alt:"Transaction Journey"})],-1),R=e("h3",{id:"wie-rpc-knoten-transaktionen-senden",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#wie-rpc-knoten-transaktionen-senden","aria-hidden":"true"},"#"),n(" Wie RPC-Knoten Transaktionen senden")],-1),C=n("Nachdem ein RPC-Knoten eine Transaktion \xFCber \u201EsendTransaction\u201C empfangen hat, konvertiert er die Transaktion in ein "),S={href:"https://en.wikipedia.org/wiki/User_Datagram_Protocol",target:"_blank",rel:"noopener noreferrer"},x=n("UDP"),A=n("-Paket, bevor er es an die relevanten Leader weiterleitet. UDP erm\xF6glicht es Validatoren, schnell miteinander zu kommunizieren, bietet jedoch keine Garantien f\xFCr die Transaktionszustellung."),K=n("Da Solanas Leader-Zeitplan vor jeder "),F={href:"https://docs.solana.com/terminology#epoch",target:"_blank",rel:"noopener noreferrer"},W=n("Epoche"),E=n(" (~2 Tage) bekannt ist, sendet ein RPC-Knoten seine Transaktion direkt an die aktuellen und n\xE4chsten Leader. Dies steht im Gegensatz zu anderen Klatschprotokollen wie Ethereum, die Transaktionen zuf\xE4llig und breit \xFCber das gesamte Netzwerk verbreiten. Standardm\xE4\xDFig versuchen RPC-Knoten alle zwei Sekunden, Transaktionen an Leader weiterzuleiten, bis entweder die Transaktion abgeschlossen ist oder der Blockhash der Transaktion abl\xE4uft (150 Bl\xF6cke oder ~1 Minute 19 Sekunden zum Zeitpunkt des Schreibens dieses Artikels). Wenn die Gr\xF6\xDFe der ausstehenden Rebroadcast-Warteschlange gr\xF6\xDFer als "),V={href:"https://github.com/solana-labs/solana/blob/bfbbc53dac93b3a5c6be9b4b65f679fdb13e41d9/send-transaction-service/src/send_transaction_service.rs#L20",target:"_blank",rel:"noopener noreferrer"},D=n("10.000 Transaktionen"),I=n(" ist, werden neu \xFCbermittelte Transaktionen fallengelassen. Es gibt Befehlszeilen-"),M={href:"https://github.com/solana-labs/solana/blob/bfbbc53dac93b3a5c6be9b4b65f679fdb13e41d9/validator/src/main.rs#L1172",target:"_blank",rel:"noopener noreferrer"},N=n("Argumente"),j=n(", die die Logik der RPC-Operatoren anpassen k\xF6nnen, um das Standardverhalten dieser Wiederholung zu \xE4ndern."),U=n("Wenn ein RPC-Knoten eine Transaktion sendet, versucht er, die Transaktion an die "),H={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/validator.rs#L867",target:"_blank",rel:"noopener noreferrer"},G=n("Transaction Processing Unit (TPU)"),Z=n(" eines Leaders weiterzuleiten . Die TPU verarbeitet Transaktionen in f\xFCnf verschiedenen Phasen:"),q={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/fetch_stage.rs#L21",target:"_blank",rel:"noopener noreferrer"},O=n("Fetch Stage"),J={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/tpu.rs#L91",target:"_blank",rel:"noopener noreferrer"},Y=n("SigVerify Stage"),Q={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/banking_stage.rs#L249",target:"_blank",rel:"noopener noreferrer"},X=n("Banking Stage"),$={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/poh/src/poh_service.rs",target:"_blank",rel:"noopener noreferrer"},ee=n("Proof of History Service"),ne={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/core/src/tpu.rs#L136",target:"_blank",rel:"noopener noreferrer"},se=n("Broadcast Stage"),te=e("p",null,[e("img",{src:b,alt:"TPU Overview"}),e("small",{style:{display:"block","text-align":"center"}},"Image Courtesy of Jito Labs")],-1),ae=e("p",null,"Von diesen f\xFCnf Phasen ist die Fetch-Phase f\xFCr den Empfang von Transaktionen verantwortlich. Innerhalb der Fetch-Phase kategorisieren Validatoren eingehende Transaktionen nach drei Ports:",-1),oe={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/gossip/src/contact_info.rs#L27",target:"_blank",rel:"noopener noreferrer"},re=n("tpu"),ie=n(" verarbeitet regelm\xE4\xDFige Transaktionen wie Token-Transfers, NFT-Mints und Programmanweisungen"),ce={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/gossip/src/contact_info.rs#L31",target:"_blank",rel:"noopener noreferrer"},le=n("tpu_vote"),de=n(" konzentriert sich ausschlie\xDFlich auf Stimmrechtsgesch\xE4fte"),ue={href:"https://github.com/solana-labs/solana/blob/cd6f931223181d5a1d47cba64e857785a175a760/gossip/src/contact_info.rs#L29",target:"_blank",rel:"noopener noreferrer"},pe=n("tpu_forwards"),he=n(" leitet unverarbeitete Pakete an den n\xE4chsten Leader weiter, wenn der aktuelle Leader nicht in der Lage ist, alle Transaktionen zu verarbeiten"),ke=n("Weitere Informationen zum TPU finden Sie unter "),be={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},ge=n("dieser hervorragenden Beschreibung von Jito Labs"),_e=n("."),me=e("h2",{id:"wie-transaktionen-verworfen-werden",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#wie-transaktionen-verworfen-werden","aria-hidden":"true"},"#"),n(" Wie Transaktionen verworfen werden")],-1),fe=e("p",null,"W\xE4hrend der Reise einer Transaktion gibt es einige Szenarien, in denen die Transaktion unbeabsichtigt aus dem Netzwerk fallen gelassen werden kann.",-1),we=e("h3",{id:"bevor-eine-transaktion-verarbeitet-wird",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#bevor-eine-transaktion-verarbeitet-wird","aria-hidden":"true"},"#"),n(" Bevor eine Transaktion verarbeitet wird")],-1),ve=n("Wenn das Netzwerk eine Transaktion verwirft, wird es dies h\xF6chstwahrscheinlich tun, bevor die Transaktion von einem Leader verarbeitet wird. UDP "),Te={href:"https://en.wikipedia.org/wiki/Packet_loss",target:"_blank",rel:"noopener noreferrer"},ze=n("Paketverlust"),Pe=n(" ist der einfachste Grund, warum dies auftreten kann. In Zeiten intensiver Netzwerklast ist es auch m\xF6glich, dass Validierer von der schieren Anzahl der f\xFCr die Verarbeitung erforderlichen Transaktionen \xFCberw\xE4ltigt werden. W\xE4hrend Validatoren in der Lage sind, \xFCbersch\xFCssige Transaktionen \xFCber "),ye=e("code",null,"tpu_forwards",-1),Be=n(" weiterzuleiten, gibt es eine Grenze f\xFCr die Datenmenge, die "),Le={href:"https://github.com/solana-labs/solana/blob/master/core/src/banking_stage.rs#L389",target:"_blank",rel:"noopener noreferrer"},Re=n("weitergeleitet"),Ce=n(" werden kann . Dar\xFCber hinaus ist jede Weiterleitung auf einen einzelnen Sprung zwischen Pr\xFCfern beschr\xE4nkt. Das hei\xDFt, Transaktionen, die auf dem "),Se=e("code",null,"tpu_forwards",-1),xe=n("-Port empfangen werden, werden nicht an andere Validatoren weitergeleitet."),Ae=n("Es gibt auch zwei weniger bekannte Gr\xFCnde, warum eine Transaktion verworfen werden kann, bevor sie verarbeitet wird. Das erste Szenario umfasst Transaktionen, die \xFCber einen RPC-Pool \xFCbermittelt werden. Gelegentlich kann ein Teil des RPC-Pools dem Rest des Pools ausreichend voraus sein. Dies kann zu Problemen f\xFChren, wenn Knoten innerhalb des Pools zusammenarbeiten m\xFCssen. In diesem Beispiel wird der "),Ke={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},Fe=n("recentBlockhash"),We=n(" der Transaktion aus dem erweiterten Teil des Pools (Backend A) abgefragt. Wenn die Transaktion an den verz\xF6gerten Teil des Pools (Backend B) gesendet wird, erkennen die Knoten den erweiterten Blockhash nicht und verwerfen die Transaktion. Dies kann bei der Transaktions\xFCbermittlung erkannt werden, wenn Entwickler "),Ee={href:"https://docs.solana.com/developing/clients/jsonrpc-api#sendtransaction",target:"_blank",rel:"noopener noreferrer"},Ve=n("Preflight-Pr\xFCfungen"),De=n(" f\xFCr "),Ie=e("code",null,"sendTransaction",-1),Me=n(" aktivieren."),Ne=r('

    \xDCber RPC Pool gel\xF6scht

    Vor\xFCbergehende Netzwerk-Forks k\xF6nnen auch zu abgebrochenen Transaktionen f\xFChren. Wenn ein Validator seine Bl\xF6cke innerhalb der Banking-Phase nur langsam wiedergibt, kann er am Ende einen Minority Fork erstellen. Wenn ein Client eine Transaktion erstellt, ist es m\xF6glich, dass die Transaktion auf einen recentBlockhash verweist, der nur auf dem Minority Fork existiert. Nachdem die Transaktion \xFCbermittelt wurde, kann der Cluster von seinem Minority Fork wegschalten, bevor die Transaktion verarbeitet wird. In diesem Szenario wird die Transaktion verworfen, weil der Blockhash nicht gefunden wird.

    Aufgrund von Minority Fork fallen gelassen (vor der Verarbeitung)

    Nachdem eine Transaktion verarbeitet wurde und bevor sie abgeschlossen wird

    F\xFCr den Fall, dass eine Transaktion auf einen \u201ErecentBlockhash\u201C von einem Minority Fork verweist, ist es immer noch m\xF6glich, dass die Transaktion verarbeitet wird. In diesem Fall w\xFCrde es jedoch vom Leader auf dem Minority Fork verarbeitet. Wenn dieser Anf\xFChrer versucht, seine verarbeiteten Transaktionen mit dem Rest des Netzwerks zu teilen, w\xFCrde er keinen Konsens mit der Mehrheit der Validatoren erzielen, die den Minority Fork nicht anerkennen. Zu diesem Zeitpunkt w\xFCrde die Transaktion fallen gelassen, bevor sie abgeschlossen werden k\xF6nnte.

    Gefallen aufgrund von Minority Fork (nach Verarbeitung)

    Umgang mit abgebrochenen Transaktionen

    W\xE4hrend RPC-Knoten versuchen, Transaktionen erneut zu \xFCbertragen, ist der von ihnen verwendete Algorithmus generisch und oft f\xFCr die Anforderungen bestimmter Anwendungen ungeeignet. Um sich auf Zeiten der Netzwerk\xFCberlastung vorzubereiten, sollten Anwendungsentwickler ihre eigene Rebroadcasting-Logik anpassen.

    Ein eingehender Blick in sendTransaction

    Wenn es um das Senden von Transaktionen geht, ist die RPC-Methode sendTransaction das prim\xE4re Tool, das Entwicklern zur Verf\xFCgung steht. sendTransaction ist nur f\xFCr die Weiterleitung einer Transaktion von einem Client an einen RPC-Knoten verantwortlich. Wenn der Knoten die Transaktion empf\xE4ngt, gibt sendTransaction die Transaktions-ID zur\xFCck, die zum Verfolgen der Transaktion verwendet werden kann. Eine erfolgreiche Antwort zeigt nicht an, ob die Transaktion vom Cluster verarbeitet oder abgeschlossen wird.

    ',10),je={class:"custom-container tip"},Ue=e("p",{class:"custom-container-title"},"TIP",-1),He=e("h4",{id:"request-parameters",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#request-parameters","aria-hidden":"true"},"#"),n(" Request Parameters")],-1),Ge=e("li",null,[e("code",null,"transaction"),n(": "),e("code",null,"string"),n(" - vollst\xE4ndig signierte Transaktion als verschl\xFCsselte Zeichenfolge")],-1),Ze=n("(optional) "),qe=e("code",null,"Konfigurationsobjekt",-1),Oe=n(": "),Je=e("code",null,"Objekt",-1),Ye=e("li",null,[e("code",null,"skipPreflight"),n(": "),e("code",null,"boolean"),n(" - wenn wahr, die Preflight-Transaktionspr\xFCfungen \xFCberspringen (Standard: falsch)")],-1),Qe=n("(optional) "),Xe=e("code",null,"preflightCommitment",-1),$e=n(": "),en=e("code",null,"string",-1),nn=n(" - "),sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#configuring-state-commitment",target:"_blank",rel:"noopener noreferrer"},tn=n("Commitment"),an=n(' Level zur Verwendung f\xFCr Preflight-Simulationen gegen den Bank-Slot (Standard: "abgeschlossen").'),on=e("li",null,[n("(optional) "),e("code",null,"encoding"),n(": "),e("code",null,"string"),n(' - Codierung, die f\xFCr die Transaktionsdaten verwendet werden. Entweder "base58" (langsam) oder "base64". (Standard: "base58").')],-1),rn=e("li",null,[n("(optional) "),e("code",null,"maxRetries"),n(": "),e("code",null,"usize"),n(" - Maximale Anzahl von Malen f\xFCr den RPC-Knoten, um erneut zu versuchen, die Transaktion an den Leader zu senden. Wenn dieser Parameter nicht angegeben wird, wiederholt der RPC-Knoten die Transaktion, bis sie abgeschlossen ist oder bis der Blockhash abl\xE4uft.")],-1),cn=e("h4",{id:"antwort",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#antwort","aria-hidden":"true"},"#"),n(" Antwort")],-1),ln=e("code",null,"transaction id",-1),dn=n(": "),un=e("code",null,"string",-1),pn=n(" \u2013 Erste in die Transaktion eingebettete Transaktionssignatur als base-58-codierte Zeichenfolge. Diese Transaktions-ID kann mit "),hn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getsignaturestatuses",target:"_blank",rel:"noopener noreferrer"},kn=n("getSignatureStatuses"),bn=n(" verwendet werden, um Statusaktualisierungen abzurufen."),gn=e("h2",{id:"anpassen-der-reroadcast-logik",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#anpassen-der-reroadcast-logik","aria-hidden":"true"},"#"),n(" Anpassen der Reroadcast-Logik")],-1),_n=n("Um ihre eigene Rebroadcasting-Logik zu entwickeln, sollten Entwickler den Parameter "),mn=e("code",null,"maxRetries",-1),fn=n(" von "),wn=e("code",null,"sendTransaction",-1),vn=n(" nutzen. Falls angegeben, \xFCberschreibt "),Tn=e("code",null,"maxRetries",-1),zn=n(" die standardm\xE4\xDFige Wiederholungslogik eines RPC-Knotens, sodass Entwickler den Wiederholungsprozess "),Pn={href:"https://github.com/solana-labs/solana/blob/98707baec2385a4f7114d2167ef6dfb1406f954f/validator/src/main.rs#L1258-L1274",target:"_blank",rel:"noopener noreferrer"},yn=n("innerhalb vern\xFCnftiger Grenzen"),Bn=n(" manuell steuern k\xF6nnen."),Ln=n("Ein g\xE4ngiges Muster f\xFCr das manuelle Wiederholen von Transaktionen besteht darin, "),Rn=e("code",null,"lastValidBlockHeight",-1),Cn=n(" vor\xFCbergehend zu speichern, das von "),Sn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getlatestblockhash",target:"_blank",rel:"noopener noreferrer"},xn=n("getLatestBlockhash"),An=n(" stammt. Nach dem Zwischenspeichern kann eine Anwendung dann "),Kn={href:"https://docs.solana.com/developing/clients/jsonrpc-api#getblockheight",target:"_blank",rel:"noopener noreferrer"},Fn=n("die Blockh\xF6he des Clusters abfragen"),Wn=n(" und die Transaktion in einem angemessenen Intervall manuell wiederholen. In Zeiten von Netzwerk\xFCberlastung ist es vorteilhaft, \u201EmaxRetries\u201C auf 0 zu setzen und manuell \xFCber einen benutzerdefinierten Algorithmus erneut zu senden. W\xE4hrend einige Anwendungen m\xF6glicherweise einen "),En={href:"https://en.wikipedia.org/wiki/Exponential_backoff",target:"_blank",rel:"noopener noreferrer"},Vn=n("exponentiellen Backoff"),Dn=n("-Algorithmus verwenden, entscheiden sich andere wie "),In={href:"https://www.mango.markets/",target:"_blank",rel:"noopener noreferrer"},Mn=n("Mango"),Nn=n(" daf\xFCr, Transaktionen in einem konstanten Intervall "),jn={href:"https://github.com/blockworks-foundation/mango-ui/blob/b6abfc6c13b71fc17ebbe766f50b8215fa1ec54f/src/utils/send.tsx#L713",target:"_blank",rel:"noopener noreferrer"},Un=n("kontinuierlich erneut einzureichen"),Hn=n(", bis eine Zeit\xFCberschreitung aufgetreten ist."),Gn=e("div",{class:"language-typescript ext-ts line-numbers-mode"},[e("pre",{class:"language-typescript"},[e("code",null,[e("span",{class:"token keyword"},"import"),n(),e("span",{class:"token punctuation"},"{"),n(` Keypair`),e("span",{class:"token punctuation"},","),n(` Connection`),e("span",{class:"token punctuation"},","),n(` `),e("span",{class:"token constant"},"LAMPORTS_PER_SOL"),e("span",{class:"token punctuation"},","),n(` diff --git a/docs/.vuepress/dist/assets/saving-game-state.html.40bb41f5.js b/docs/.vuepress/dist/assets/saving-game-state.html.b6db54c5.js similarity index 99% rename from docs/.vuepress/dist/assets/saving-game-state.html.40bb41f5.js rename to docs/.vuepress/dist/assets/saving-game-state.html.b6db54c5.js index 50aa1682a..131674f06 100644 --- a/docs/.vuepress/dist/assets/saving-game-state.html.40bb41f5.js +++ b/docs/.vuepress/dist/assets/saving-game-state.html.b6db54c5.js @@ -1,4 +1,4 @@ -import{_ as p,r as t,o,c as e,a as n,b as c,F as l,d as a,e as u}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"paano-i-save-ang-estado-ng-laro",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-i-save-ang-estado-ng-laro","aria-hidden":"true"},"#"),a(" Paano i-save ang estado ng laro")],-1),k=a("Maaari mong gamitin ang Solana block chain para i-save ang estado ng iyong laro sa mga program account. Ito ay mga account na pagmamay-ari ng iyong programa at ang mga ito ay hango sa program Id at ilang mga buto. Ang mga ito ay maaaring isipin bilang mga entry ng data base. Halimbawa, maaari tayong lumikha ng isang PlayerData account at gamitin ang pampublikong key ng mga manlalaro bilang isang binhi. Nangangahulugan ito na ang bawat manlalaro ay maaaring magkaroon ng isang player account sa bawat wallet. Ang mga account na ito ay maaaring hanggang 10Kb bilang default. Kung kailangan mo ng mas malaking account, tingnan ang "),b={href:"https://github.com/solana-developers/anchor-zero-copy-example",target:"_blank",rel:"noopener noreferrer"},m=a("Manage big accounts"),g=a(" Magagawa ito sa isang programa tulad nito:"),d=u(`
    pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
    +import{_ as p,r as t,o,c as e,a as n,b as c,F as l,d as a,e as u}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"paano-i-save-ang-estado-ng-laro",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-i-save-ang-estado-ng-laro","aria-hidden":"true"},"#"),a(" Paano i-save ang estado ng laro")],-1),k=a("Maaari mong gamitin ang Solana block chain para i-save ang estado ng iyong laro sa mga program account. Ito ay mga account na pagmamay-ari ng iyong programa at ang mga ito ay hango sa program Id at ilang mga buto. Ang mga ito ay maaaring isipin bilang mga entry ng data base. Halimbawa, maaari tayong lumikha ng isang PlayerData account at gamitin ang pampublikong key ng mga manlalaro bilang isang binhi. Nangangahulugan ito na ang bawat manlalaro ay maaaring magkaroon ng isang player account sa bawat wallet. Ang mga account na ito ay maaaring hanggang 10Kb bilang default. Kung kailangan mo ng mas malaking account, tingnan ang "),b={href:"https://github.com/solana-developers/anchor-zero-copy-example",target:"_blank",rel:"noopener noreferrer"},m=a("Manage big accounts"),g=a(" Magagawa ito sa isang programa tulad nito:"),d=u(`
    pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
         ctx.accounts.player.energy = MAX_ENERGY;
         ctx.accounts.player.health = MAX_HEALTH;
         ctx.accounts.player.last_login = Clock::get()?.unix_timestamp;
    diff --git a/docs/.vuepress/dist/assets/saving-game-state.html.9d6e5e66.js b/docs/.vuepress/dist/assets/saving-game-state.html.cde48a53.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/saving-game-state.html.9d6e5e66.js
    rename to docs/.vuepress/dist/assets/saving-game-state.html.cde48a53.js
    index 1c55acd17..16cdeac17 100644
    --- a/docs/.vuepress/dist/assets/saving-game-state.html.9d6e5e66.js
    +++ b/docs/.vuepress/dist/assets/saving-game-state.html.cde48a53.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as t,o as e,c as o,a as n,b as c,F as l,d as s,e as u}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"comment-sauvegarder-l-etat-d-un-jeu",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-sauvegarder-l-etat-d-un-jeu","aria-hidden":"true"},"#"),s(" Comment sauvegarder l'\xE9tat d'un jeu ?")],-1),k=s("Vous pouvez utiliser la blockchain Solana pour sauvegarder l'\xE9tat de votre jeu dans des comptes de programme. Il s'agit de comptes qui appartiennent \xE0 votre programme et qui sont d\xE9riv\xE9s de l'identifiant du programme et de certaines seeds. On peut les consid\xE9rer comme des entr\xE9es de base de donn\xE9es. Nous pouvons par exemple cr\xE9er un compte PlayerData et utiliser la cl\xE9 publique du joueur comme seed. Cela signifie que chaque joueur peut avoir un compte de joueur par portefeuille. Ces comptes peuvent avoir une taille maximale de 10 Ko par d\xE9faut. Si vous avez besoin d'un compte plus grand, consultez "),m={href:"https://github.com/solana-developers/anchor-zero-copy-example",target:"_blank",rel:"noopener noreferrer"},b=s("G\xE9rer les grands comptes"),d=s(" Cela peut \xEAtre fait dans un programme comme cela :"),y=u(`
    pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
    +import{_ as p,r as t,o as e,c as o,a as n,b as c,F as l,d as s,e as u}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"comment-sauvegarder-l-etat-d-un-jeu",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-sauvegarder-l-etat-d-un-jeu","aria-hidden":"true"},"#"),s(" Comment sauvegarder l'\xE9tat d'un jeu ?")],-1),k=s("Vous pouvez utiliser la blockchain Solana pour sauvegarder l'\xE9tat de votre jeu dans des comptes de programme. Il s'agit de comptes qui appartiennent \xE0 votre programme et qui sont d\xE9riv\xE9s de l'identifiant du programme et de certaines seeds. On peut les consid\xE9rer comme des entr\xE9es de base de donn\xE9es. Nous pouvons par exemple cr\xE9er un compte PlayerData et utiliser la cl\xE9 publique du joueur comme seed. Cela signifie que chaque joueur peut avoir un compte de joueur par portefeuille. Ces comptes peuvent avoir une taille maximale de 10 Ko par d\xE9faut. Si vous avez besoin d'un compte plus grand, consultez "),m={href:"https://github.com/solana-developers/anchor-zero-copy-example",target:"_blank",rel:"noopener noreferrer"},b=s("G\xE9rer les grands comptes"),d=s(" Cela peut \xEAtre fait dans un programme comme cela :"),y=u(`
    pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
         ctx.accounts.player.energy = MAX_ENERGY;
         ctx.accounts.player.health = MAX_HEALTH;
         ctx.accounts.player.last_login = Clock::get()?.unix_timestamp;
    diff --git a/docs/.vuepress/dist/assets/saving-game-state.html.aa5750ab.js b/docs/.vuepress/dist/assets/saving-game-state.html.ec310331.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/saving-game-state.html.aa5750ab.js
    rename to docs/.vuepress/dist/assets/saving-game-state.html.ec310331.js
    index ff7826b37..16447d220 100644
    --- a/docs/.vuepress/dist/assets/saving-game-state.html.aa5750ab.js
    +++ b/docs/.vuepress/dist/assets/saving-game-state.html.ec310331.js
    @@ -1,4 +1,4 @@
    -import{_ as p,r as t,o as e,c as o,a as n,b as c,F as l,d as s,e as u}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"how-to-save-game-state",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-save-game-state","aria-hidden":"true"},"#"),s(" How to save game state")],-1),k=s("You can use Solana block chain to save the state of your game in program accounts. These are accounts that are owned by your program and they are derived from the program Id and some seeds. These can be thought of as data base entries. We can for example create a PlayerData account and use the players public key as a seed. This means every player can have one player account per wallet. These accounts can be up to 10Kb by default. If you need a bigger account look into "),b={href:"https://github.com/solana-developers/anchor-zero-copy-example",target:"_blank",rel:"noopener noreferrer"},m=s("Manage big accounts"),d=s(" This can be done in a program like this:"),y=u(`
    pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
    +import{_ as p,r as t,o as e,c as o,a as n,b as c,F as l,d as s,e as u}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"how-to-save-game-state",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-save-game-state","aria-hidden":"true"},"#"),s(" How to save game state")],-1),k=s("You can use Solana block chain to save the state of your game in program accounts. These are accounts that are owned by your program and they are derived from the program Id and some seeds. These can be thought of as data base entries. We can for example create a PlayerData account and use the players public key as a seed. This means every player can have one player account per wallet. These accounts can be up to 10Kb by default. If you need a bigger account look into "),b={href:"https://github.com/solana-developers/anchor-zero-copy-example",target:"_blank",rel:"noopener noreferrer"},m=s("Manage big accounts"),d=s(" This can be done in a program like this:"),y=u(`
    pub fn init_player(ctx: Context<InitPlayer>) -> Result<()> {
         ctx.accounts.player.energy = MAX_ENERGY;
         ctx.accounts.player.health = MAX_HEALTH;
         ctx.accounts.player.last_login = Clock::get()?.unix_timestamp;
    diff --git a/docs/.vuepress/dist/assets/serialization.html.0d68a263.js b/docs/.vuepress/dist/assets/serialization.html.1259c629.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/serialization.html.0d68a263.js
    rename to docs/.vuepress/dist/assets/serialization.html.1259c629.js
    index b09679039..b97f0b4d5 100644
    --- a/docs/.vuepress/dist/assets/serialization.html.0d68a263.js
    +++ b/docs/.vuepress/dist/assets/serialization.html.1259c629.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},h=p('

    Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u

    Khi n\xF3i \u0111\u1EBFn tu\u1EA7n t\u1EF1 ho\xE1 ngh\u0129a l\xE0 t\xE1c gi\u1EA3 \u0111ang mu\u1ED1n \u0111\u1EC1 c\u1EADp \u0111\u1EBFn c\u1EA3 tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u.

    Tu\u1EA7n t\u1EF1 ho\xE1 tham gia v\xE0o m\u1ED9t v\xE0i \u0111i\u1EC3m trong v\xF2ng \u0111\u1EDDi c\u1EE7a Solana Program v\xE0 Program Account:

    1. Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u c\xE2u ch\u1EC9 th\u1ECB \u0111\u01B0\u1EE3c g\u1EEDi t\u1EEB ng\u01B0\u1EDDi d\xF9ng
    2. Phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u ch\u1EC9 th\u1ECB trong Program
    3. Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u Account trong Program
    4. Phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u Account \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng

    M\u1ED9t \u0111i\u1EC1u quan tr\u1ECDng l\xE0 t\u1EA5t c\u1EA3 c\xE1c qu\xE1 tr\xECnh b\xEAn tr\xEAn \u0111\u1EC1u \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 b\u1EDFi duy nh\u1EA5t m\u1ED9t ph\u01B0\u01A1ng ph\xE1p tu\u1EA7n t\u1EF1 ho\xE1. M\u1ED9t v\xE0i \u0111o\u1EA1n code m\u1EABu trong b\xE0i s\u1EBD s\u1EED d\u1EE5ng Borsh \u0111\u1EC3 l\xE0m v\xED d\u1EE5.

    Ph\u1EA7n c\xF2n l\u1EA1i s\u1EBD \u0111\u01B0\u1EE3c tr\xEDch d\u1EABn h\u1EA7u h\u1EBFt t\u1EEB Solana CLI Program Template.

    C\xE0i \u0111\u1EB7t Tu\u1EA7n t\u1EF1 ho\xE1 Borsh

    Nh\u1EEFng th\u01B0 vi\u1EC7n l\u1EADp tr\xECnh cho Borsh ph\u1EA3i \u0111\u01B0\u1EE3c c\xE0i \u0111\u1EB7t t\u01B0\u01A1ng th\xEDch v\u1EDBi ch\u01B0\u01A1ng tr\xECnh Rust, Node, v\xE0/ho\u1EB7c Python.

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},h=p('

    Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u

    Khi n\xF3i \u0111\u1EBFn tu\u1EA7n t\u1EF1 ho\xE1 ngh\u0129a l\xE0 t\xE1c gi\u1EA3 \u0111ang mu\u1ED1n \u0111\u1EC1 c\u1EADp \u0111\u1EBFn c\u1EA3 tu\u1EA7n t\u1EF1 v\xE0 phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u.

    Tu\u1EA7n t\u1EF1 ho\xE1 tham gia v\xE0o m\u1ED9t v\xE0i \u0111i\u1EC3m trong v\xF2ng \u0111\u1EDDi c\u1EE7a Solana Program v\xE0 Program Account:

    1. Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u c\xE2u ch\u1EC9 th\u1ECB \u0111\u01B0\u1EE3c g\u1EEDi t\u1EEB ng\u01B0\u1EDDi d\xF9ng
    2. Phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u ch\u1EC9 th\u1ECB trong Program
    3. Tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u Account trong Program
    4. Phi tu\u1EA7n t\u1EF1 ho\xE1 d\u1EEF li\u1EC7u Account \u1EDF ph\xEDa ng\u01B0\u1EDDi d\xF9ng

    M\u1ED9t \u0111i\u1EC1u quan tr\u1ECDng l\xE0 t\u1EA5t c\u1EA3 c\xE1c qu\xE1 tr\xECnh b\xEAn tr\xEAn \u0111\u1EC1u \u0111\u01B0\u1EE3c h\u1ED7 tr\u1EE3 b\u1EDFi duy nh\u1EA5t m\u1ED9t ph\u01B0\u01A1ng ph\xE1p tu\u1EA7n t\u1EF1 ho\xE1. M\u1ED9t v\xE0i \u0111o\u1EA1n code m\u1EABu trong b\xE0i s\u1EBD s\u1EED d\u1EE5ng Borsh \u0111\u1EC3 l\xE0m v\xED d\u1EE5.

    Ph\u1EA7n c\xF2n l\u1EA1i s\u1EBD \u0111\u01B0\u1EE3c tr\xEDch d\u1EABn h\u1EA7u h\u1EBFt t\u1EEB Solana CLI Program Template.

    C\xE0i \u0111\u1EB7t Tu\u1EA7n t\u1EF1 ho\xE1 Borsh

    Nh\u1EEFng th\u01B0 vi\u1EC7n l\u1EADp tr\xECnh cho Borsh ph\u1EA3i \u0111\u01B0\u1EE3c c\xE0i \u0111\u1EB7t t\u01B0\u01A1ng th\xEDch v\u1EDBi ch\u01B0\u01A1ng tr\xECnh Rust, Node, v\xE0/ho\u1EB7c Python.

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),Q=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),Q=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.a08f50dc.js b/docs/.vuepress/dist/assets/serialization.html.1a7f232d.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.a08f50dc.js rename to docs/.vuepress/dist/assets/serialization.html.1a7f232d.js index 3b96febb1..2909d56ef 100644 --- a/docs/.vuepress/dist/assets/serialization.html.a08f50dc.js +++ b/docs/.vuepress/dist/assets/serialization.html.1a7f232d.js @@ -1,4 +1,4 @@ -import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,e as t,d as s}from"./app.07ce7a66.js";var i="/assets/ser1.ceec0bad.png",r="/assets/ser3.7cdd43c8.png";const k={},b=t(`

    Serializing Data (Serile\u015Ftirme)

    Serialization(serile\u015Ftirme) hakk\u0131nda konu\u015Ftu\u011Fumuzda, hem serializing data (verilerin serile\u015Ftirilmesini) hem de deserialization of data (verilerin seri durumdan \xE7\u0131kar\u0131lmas\u0131n\u0131) kastediyoruz.

    Serialization, Solana program\u0131 ve program Account\u2019lar\u0131 ya\u015Fam d\xF6ng\xFCs\xFC boyunca birka\xE7 noktada devreye girer:

    1. Client\u2019ta instruction data\u2019n\u0131n serialize edilmesi
    2. Programdaki instruction data\u2019n\u0131n seri deserialize edilmesi
    3. Programdaki Account data\u2019n\u0131n serialize edilmesi
    4. Client\u2019ta Account data\u2019n\u0131n deserialize edilmesi

    Yukar\u0131daki eylemlerin hepsinin ayn\u0131 serialization yakla\u015F\u0131m\u0131yla desteklenmesi \xF6nemlidir. Dahil edilen snippet'ler, Borsh kullan\u0131larak serialization yapmay\u0131 g\xF6steriyor.

    Bu belgenin geri kalan\u0131ndaki \xF6rnekler, Solana CLI Program Template Program \u015Eablonundan al\u0131nan al\u0131nt\u0131lard\u0131r.

    Setting up for Borsh Serialization (Borsh Serialization i\xE7in Kurulum)

    Rust program, Rust client, Node ve/veya Python client i\xE7in Borsh k\xFCt\xFCphaneleri kurulmal\u0131d\u0131r.

    [package]
    +import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,e as t,d as s}from"./app.d411e3b3.js";var i="/assets/ser1.ceec0bad.png",r="/assets/ser3.7cdd43c8.png";const k={},b=t(`

    Serializing Data (Serile\u015Ftirme)

    Serialization(serile\u015Ftirme) hakk\u0131nda konu\u015Ftu\u011Fumuzda, hem serializing data (verilerin serile\u015Ftirilmesini) hem de deserialization of data (verilerin seri durumdan \xE7\u0131kar\u0131lmas\u0131n\u0131) kastediyoruz.

    Serialization, Solana program\u0131 ve program Account\u2019lar\u0131 ya\u015Fam d\xF6ng\xFCs\xFC boyunca birka\xE7 noktada devreye girer:

    1. Client\u2019ta instruction data\u2019n\u0131n serialize edilmesi
    2. Programdaki instruction data\u2019n\u0131n seri deserialize edilmesi
    3. Programdaki Account data\u2019n\u0131n serialize edilmesi
    4. Client\u2019ta Account data\u2019n\u0131n deserialize edilmesi

    Yukar\u0131daki eylemlerin hepsinin ayn\u0131 serialization yakla\u015F\u0131m\u0131yla desteklenmesi \xF6nemlidir. Dahil edilen snippet'ler, Borsh kullan\u0131larak serialization yapmay\u0131 g\xF6steriyor.

    Bu belgenin geri kalan\u0131ndaki \xF6rnekler, Solana CLI Program Template Program \u015Eablonundan al\u0131nan al\u0131nt\u0131lard\u0131r.

    Setting up for Borsh Serialization (Borsh Serialization i\xE7in Kurulum)

    Rust program, Rust client, Node ve/veya Python client i\xE7in Borsh k\xFCt\xFCphaneleri kurulmal\u0131d\u0131r.

    [package]
     name = "cli-program-template"
     version = "0.1.5"
     edition = "2018"
    diff --git a/docs/.vuepress/dist/assets/serialization.html.89a2791f.js b/docs/.vuepress/dist/assets/serialization.html.38ba2d1e.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/serialization.html.89a2791f.js
    rename to docs/.vuepress/dist/assets/serialization.html.38ba2d1e.js
    index b47f0cb2a..17de1759b 100644
    --- a/docs/.vuepress/dist/assets/serialization.html.89a2791f.js
    +++ b/docs/.vuepress/dist/assets/serialization.html.38ba2d1e.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serialisasi Data

    Ketika kita berbicara tentang serialisasi, yang kita maksud adalah serialisasi data dan juga deserialisasi data.

    Serialisasi berperan di beberapa titik sepanjang lifecycle akun program dan program Solana:

    1. Serialisasi data instruksi ke klien
    2. Deserialisasi data instruksi pada program
    3. Serialisasi data Akun pada program
    4. Deserialisasi Data Akun pada klien

    Penting bahwa semua tindakan di atas didukung oleh pendekatan serialisasi yang sama. Snippet yang dimasukkan disini mendemonstrasikan serialisasi menggunakan Borsh.

    Contoh dalam sisa dokumen ini adalah kutipan yang diambil dari Template Program CLI Solana

    Persiapan untuk Borsh Serialization

    Library untuk Borsh harus disiapkan dalam program Rust, klien Rust, Node dan/atau klien Python.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serialisasi Data

    Ketika kita berbicara tentang serialisasi, yang kita maksud adalah serialisasi data dan juga deserialisasi data.

    Serialisasi berperan di beberapa titik sepanjang lifecycle akun program dan program Solana:

    1. Serialisasi data instruksi ke klien
    2. Deserialisasi data instruksi pada program
    3. Serialisasi data Akun pada program
    4. Deserialisasi Data Akun pada klien

    Penting bahwa semua tindakan di atas didukung oleh pendekatan serialisasi yang sama. Snippet yang dimasukkan disini mendemonstrasikan serialisasi menggunakan Borsh.

    Contoh dalam sisa dokumen ini adalah kutipan yang diambil dari Template Program CLI Solana

    Persiapan untuk Borsh Serialization

    Library untuk Borsh harus disiapkan dalam program Rust, klien Rust, Node dan/atau klien Python.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.d1ade7c6.js b/docs/.vuepress/dist/assets/serialization.html.39f2c0b1.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.d1ade7c6.js rename to docs/.vuepress/dist/assets/serialization.html.39f2c0b1.js index c3b38431e..fda7ff93f 100644 --- a/docs/.vuepress/dist/assets/serialization.html.d1ade7c6.js +++ b/docs/.vuepress/dist/assets/serialization.html.39f2c0b1.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializando Dados

    Quando falamos sobre serializa\xE7\xE3o, estamos nos referindo tanto \xE0 serializa\xE7\xE3o quanto \xE0 desserializa\xE7\xE3o de dados.

    A serializa\xE7\xE3o entra em jogo em alguns pontos ao longo do ciclo de vida dos programas e das contas de programas da Solana:

    1. Serializando dados de instru\xE7\xF5es no cliente
    2. Desserializando dados de instru\xE7\xF5es no programa
    3. Serializando dados de contas no programa
    4. Desserializando dados de contas no cliente

    \xC9 importante que as a\xE7\xF5es acima sejam suportadas pela mesma abordagem de serializa\xE7\xE3o. Os trechos inclu\xEDdos demonstram a serializa\xE7\xE3o usando o Borsh.

    Os exemplos apresentados neste documento s\xE3o trechos extra\xEDdos do Modelo de Programa da CLI da Solana

    Configurando a Serializa\xE7\xE3o com o Borsh

    As bibliotecas para o Borsh devem ser configuradas para o programa Rust, cliente Rust, cliente Node e/ou Python.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializando Dados

    Quando falamos sobre serializa\xE7\xE3o, estamos nos referindo tanto \xE0 serializa\xE7\xE3o quanto \xE0 desserializa\xE7\xE3o de dados.

    A serializa\xE7\xE3o entra em jogo em alguns pontos ao longo do ciclo de vida dos programas e das contas de programas da Solana:

    1. Serializando dados de instru\xE7\xF5es no cliente
    2. Desserializando dados de instru\xE7\xF5es no programa
    3. Serializando dados de contas no programa
    4. Desserializando dados de contas no cliente

    \xC9 importante que as a\xE7\xF5es acima sejam suportadas pela mesma abordagem de serializa\xE7\xE3o. Os trechos inclu\xEDdos demonstram a serializa\xE7\xE3o usando o Borsh.

    Os exemplos apresentados neste documento s\xE3o trechos extra\xEDdos do Modelo de Programa da CLI da Solana

    Configurando a Serializa\xE7\xE3o com o Borsh

    As bibliotecas para o Borsh devem ser configuradas para o programa Rust, cliente Rust, cliente Node e/ou Python.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.ff6ce54c.js b/docs/.vuepress/dist/assets/serialization.html.489e403a.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.ff6ce54c.js rename to docs/.vuepress/dist/assets/serialization.html.489e403a.js index b233d860f..92186c66b 100644 --- a/docs/.vuepress/dist/assets/serialization.html.ff6ce54c.js +++ b/docs/.vuepress/dist/assets/serialization.html.489e403a.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    \u5E8F\u5217\u6570\u636E

    \u5F53\u6211\u4EEC\u8C08\u8BBA\u5E8F\u5217\u5316\u65F6\uFF0C\u6211\u4EEC\u6307\u7684\u662F\u6570\u636E\u7684\u5E8F\u5217\u5316\u548C\u53CD\u5E8F\u5217\u5316\u3002

    \u5E8F\u5217\u5316\u5728Solana\u7A0B\u5E8F\u548C\u7A0B\u5E8F\u8D26\u6237\u7684\u751F\u547D\u5468\u671F\u4E2D\u7684\u51E0\u4E2A\u70B9\u4E0A\u8D77\u7740\u4F5C\u7528\uFF1A

    1. \u5C06\u6307\u4EE4\u6570\u636E\u5E8F\u5217\u5316\u5230\u5BA2\u6237\u7AEF\u4E0A
    2. \u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E
    3. \u5C06\u8D26\u6237\u6570\u636E\u5E8F\u5217\u5316\u5230\u7A0B\u5E8F\u4E2D
    4. \u5728\u5BA2\u6237\u7AEF\u4E0A\u53CD\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E

    \u91CD\u8981\u7684\u662F\uFF0C\u4E0A\u8FF0\u64CD\u4F5C\u90FD\u5E94\u8BE5\u91C7\u7528\u76F8\u540C\u7684\u5E8F\u5217\u5316\u65B9\u6CD5\u3002\u4E0B\u9762\u7684\u793A\u4F8B\u6F14\u793A\u4E86\u4F7F\u7528Borsh\u8FDB\u884C\u5E8F\u5217\u5316\u3002

    \u672C\u6587\u6863\u7684\u5176\u4F59\u90E8\u5206\u4E2D\u7684\u793A\u4F8B\u6458\u5F55\u81EASolana CLI \u7A0B\u5E8F\u6A21\u677F

    \u8BBE\u7F6EBorsh\u5E8F\u5217\u5316

    \u4E3A\u4E86\u4F7F\u7528Borsh\u8FDB\u884C\u5E8F\u5217\u5316\uFF0C\u9700\u8981\u5728Rust\u7A0B\u5E8F\u3001Rust\u5BA2\u6237\u7AEF\u3001\u8282\u70B9\u548C/\u6216Python\u5BA2\u6237\u7AEF\u4E2D\u8BBE\u7F6EBorsh\u5E93\u3002

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    \u5E8F\u5217\u6570\u636E

    \u5F53\u6211\u4EEC\u8C08\u8BBA\u5E8F\u5217\u5316\u65F6\uFF0C\u6211\u4EEC\u6307\u7684\u662F\u6570\u636E\u7684\u5E8F\u5217\u5316\u548C\u53CD\u5E8F\u5217\u5316\u3002

    \u5E8F\u5217\u5316\u5728Solana\u7A0B\u5E8F\u548C\u7A0B\u5E8F\u8D26\u6237\u7684\u751F\u547D\u5468\u671F\u4E2D\u7684\u51E0\u4E2A\u70B9\u4E0A\u8D77\u7740\u4F5C\u7528\uFF1A

    1. \u5C06\u6307\u4EE4\u6570\u636E\u5E8F\u5217\u5316\u5230\u5BA2\u6237\u7AEF\u4E0A
    2. \u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E
    3. \u5C06\u8D26\u6237\u6570\u636E\u5E8F\u5217\u5316\u5230\u7A0B\u5E8F\u4E2D
    4. \u5728\u5BA2\u6237\u7AEF\u4E0A\u53CD\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E

    \u91CD\u8981\u7684\u662F\uFF0C\u4E0A\u8FF0\u64CD\u4F5C\u90FD\u5E94\u8BE5\u91C7\u7528\u76F8\u540C\u7684\u5E8F\u5217\u5316\u65B9\u6CD5\u3002\u4E0B\u9762\u7684\u793A\u4F8B\u6F14\u793A\u4E86\u4F7F\u7528Borsh\u8FDB\u884C\u5E8F\u5217\u5316\u3002

    \u672C\u6587\u6863\u7684\u5176\u4F59\u90E8\u5206\u4E2D\u7684\u793A\u4F8B\u6458\u5F55\u81EASolana CLI \u7A0B\u5E8F\u6A21\u677F

    \u8BBE\u7F6EBorsh\u5E8F\u5217\u5316

    \u4E3A\u4E86\u4F7F\u7528Borsh\u8FDB\u884C\u5E8F\u5217\u5316\uFF0C\u9700\u8981\u5728Rust\u7A0B\u5E8F\u3001Rust\u5BA2\u6237\u7AEF\u3001\u8282\u70B9\u548C/\u6216Python\u5BA2\u6237\u7AEF\u4E2D\u8BBE\u7F6EBorsh\u5E93\u3002

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -329,7 +329,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map_err"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("err"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(),n("span",{class:"token macro property"},"format!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"error: send transaction: {}"'),n("span",{class:"token punctuation"},","),s(" err"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),s("signature"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),x=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6570\u636E")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::"),s("program_error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},","),s(` @@ -378,7 +378,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),C=p('

    \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E

    Account Data Serialization

    \u7A0B\u5E8F\u8D26\u6237\u6570\u636E\u5757\uFF08\u6765\u81EA\u793A\u4F8B\u4ED3\u5E93\uFF09\u7684\u5E03\u5C40\u5982\u4E0B\uFF1A

    Byte 0Bytes 1-4Remaining Byte up to 1019
    Initialized flaglength of serialized BTreeMapBTreeMap (where key value pairs are stored)

    Pack

    ',5),E=s("\u5173\u4E8E "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s(" trait"),O=p("

    \u53EF\u4EE5\u66F4\u5BB9\u6613\u5730\u9690\u85CF\u8D26\u6237\u6570\u636E\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u7684\u7EC6\u8282\uFF0C\u4F7F\u4F60\u7684\u6838\u5FC3\u7A0B\u5E8F\u6307\u4EE4\u5904\u7406\u4EE3\u7801\u66F4\u7B80\u6D01\u3002\u56E0\u6B64\uFF0C\u4E0D\u9700\u8981\u5C06\u6240\u6709\u7684\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u903B\u8F91\u653E\u5728\u7A0B\u5E8F\u5904\u7406\u4EE3\u7801\u4E2D\uFF0C\u800C\u662F\u5C06\u8FD9\u4E9B\u7EC6\u8282\u5C01\u88C5\u5728\u4EE5\u4E0B\u4E09\u4E2A\u51FD\u6570\u4E2D\uFF1A

    1. unpack_unchecked - \u5141\u8BB8\u4F60\u5BF9\u8D26\u6237\u8FDB\u884C\u53CD\u5E8F\u5217\u5316\uFF0C\u800C\u65E0\u9700\u68C0\u67E5\u5B83\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002\u5F53\u5B9E\u9645\u5904\u7406\u521D\u59CB\u5316\u51FD\u6570\uFF08\u53D8\u4F53\u7D22\u5F15\u4E3A0\uFF09\u65F6\uFF0C\u8FD9\u975E\u5E38\u6709\u7528\u3002
    2. unpack - \u8C03\u7528\u4F60\u7684Pack\u5B9E\u73B0\u7684unpack_from_slice\u51FD\u6570\uFF0C\u5E76\u68C0\u67E5\u8D26\u6237\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002
    3. pack - \u8C03\u7528\u60A8\u7684Pack\u5B9E\u73B0\u7684pack_into_slice\u51FD\u6570\u3002

    \u4E0B\u9762\u662F\u6211\u4EEC\u793A\u4F8B\u7A0B\u5E8F\u7684Pack trait\u5B9E\u73B0\u3002\u968F\u540E\u662F\u4F7F\u7528Borsh\u8FDB\u884C\u8D26\u6237\u6570\u636E\u5904\u7406\u7684\u793A\u4F8B\u3002

    ",3),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),x=p('

    \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8D26\u6237\u6570\u636E

    Account Data Serialization

    \u7A0B\u5E8F\u8D26\u6237\u6570\u636E\u5757\uFF08\u6765\u81EA\u793A\u4F8B\u4ED3\u5E93\uFF09\u7684\u5E03\u5C40\u5982\u4E0B\uFF1A

    Byte 0Bytes 1-4Remaining Byte up to 1019
    Initialized flaglength of serialized BTreeMapBTreeMap (where key value pairs are stored)

    Pack

    ',5),E=s("\u5173\u4E8E "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s(" trait"),O=p("

    \u53EF\u4EE5\u66F4\u5BB9\u6613\u5730\u9690\u85CF\u8D26\u6237\u6570\u636E\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u7684\u7EC6\u8282\uFF0C\u4F7F\u4F60\u7684\u6838\u5FC3\u7A0B\u5E8F\u6307\u4EE4\u5904\u7406\u4EE3\u7801\u66F4\u7B80\u6D01\u3002\u56E0\u6B64\uFF0C\u4E0D\u9700\u8981\u5C06\u6240\u6709\u7684\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u903B\u8F91\u653E\u5728\u7A0B\u5E8F\u5904\u7406\u4EE3\u7801\u4E2D\uFF0C\u800C\u662F\u5C06\u8FD9\u4E9B\u7EC6\u8282\u5C01\u88C5\u5728\u4EE5\u4E0B\u4E09\u4E2A\u51FD\u6570\u4E2D\uFF1A

    1. unpack_unchecked - \u5141\u8BB8\u4F60\u5BF9\u8D26\u6237\u8FDB\u884C\u53CD\u5E8F\u5217\u5316\uFF0C\u800C\u65E0\u9700\u68C0\u67E5\u5B83\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002\u5F53\u5B9E\u9645\u5904\u7406\u521D\u59CB\u5316\u51FD\u6570\uFF08\u53D8\u4F53\u7D22\u5F15\u4E3A0\uFF09\u65F6\uFF0C\u8FD9\u975E\u5E38\u6709\u7528\u3002
    2. unpack - \u8C03\u7528\u4F60\u7684Pack\u5B9E\u73B0\u7684unpack_from_slice\u51FD\u6570\uFF0C\u5E76\u68C0\u67E5\u8D26\u6237\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002
    3. pack - \u8C03\u7528\u60A8\u7684Pack\u5B9E\u73B0\u7684pack_into_slice\u51FD\u6570\u3002

    \u4E0B\u9762\u662F\u6211\u4EEC\u793A\u4F8B\u7A0B\u5E8F\u7684Pack trait\u5B9E\u73B0\u3002\u968F\u540E\u662F\u4F7F\u7528Borsh\u8FDB\u884C\u8D26\u6237\u6570\u636E\u5904\u7406\u7684\u793A\u4F8B\u3002

    ",3),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("sol_template_shared"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token constant"},"ACCOUNT_STATE_SPACE"),n("span",{class:"token punctuation"},";"),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` @@ -986,4 +986,4 @@ primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Some = {:?} Pubkey = {:?}"'),n("span",{class:"token punctuation"},","),s(" toption"),n("span",{class:"token number"},".0"),n("span",{class:"token punctuation"},","),s(" pkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"\u8D44\u6599",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D44\u6599","aria-hidden":"true"},"#"),s(" \u8D44\u6599")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},fn=s("Python Borsh"),gn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),wn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},hn=s("Solana CLI Program Template2");function Sn(vn,Tn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[f,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[g]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[T]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[z]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[x]),_:1})]),_:1}),C,n("p",null,[E,n("a",B,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[M]),_:1})]),_:1}),N,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[U]),_:1})]),_:1}),K,G,D,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),j,H,Y,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[W]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[fn,a(c)])]),n("li",null,[n("a",gn,[_n,a(c)])]),n("li",null,[n("a",wn,[hn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"\u8D44\u6599",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D44\u6599","aria-hidden":"true"},"#"),s(" \u8D44\u6599")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},fn=s("Python Borsh"),gn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),wn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},hn=s("Solana CLI Program Template2");function Sn(vn,Tn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[f,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[g]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[T]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[z]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[C]),_:1})]),_:1}),x,n("p",null,[E,n("a",B,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[M]),_:1})]),_:1}),N,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[U]),_:1})]),_:1}),K,G,D,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),j,H,Y,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[W]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[fn,a(c)])]),n("li",null,[n("a",gn,[_n,a(c)])]),n("li",null,[n("a",wn,[hn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; diff --git a/docs/.vuepress/dist/assets/serialization.html.a34c46cf.js b/docs/.vuepress/dist/assets/serialization.html.4c219ebc.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.a34c46cf.js rename to docs/.vuepress/dist/assets/serialization.html.4c219ebc.js index ea4dded6f..b8cf28e24 100644 --- a/docs/.vuepress/dist/assets/serialization.html.a34c46cf.js +++ b/docs/.vuepress/dist/assets/serialization.html.4c219ebc.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    Serializing Data

    \u3053\u3053\u3067\u306F\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u306F\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3068\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u4E21\u65B9\u3092\u610F\u5473\u3057\u307E\u3059\u3002

    \u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u306F\u3001Solana \u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u30D7\u30ED\u30B0\u30E9\u30E0 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30E9\u30A4\u30D5\u30B5\u30A4\u30AF\u30EB\u306E\u3044\u304F\u3064\u304B\u306E\u30DD\u30A4\u30F3\u30C8\u3067\u6A5F\u80FD\u3057\u307E\u3059\u3002

    1. \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3078\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA
    2. \u30D7\u30ED\u30B0\u30E9\u30E0\u4E0A\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA
    3. \u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30EB\u5316
    4. \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA

    \u540C\u3058\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u30A2\u30D7\u30ED\u30FC\u30C1\u3067\u4E0A\u8A18\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3059\u3079\u3066\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u304C\u91CD\u8981\u3067\u3059\u3002 \u542B\u307E\u308C\u3066\u3044\u308B\u30B9\u30CB\u30DA\u30C3\u30C8\u306F Borsh\u3092\u4F7F\u7528\u3057\u305F\u30B7\u30EA\u30A2\u30EB\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u306E\u30C7\u30E2\u3067\u3059\u3002

    \u6B8B\u308A\u306E\u30B5\u30F3\u30D7\u30EB\u306F\u3001Solana CLI Program Template\u304B\u3089\u306E\u629C\u7C8B\u3067\u3059\u3002

    Setting up for Borsh Serialization

    Borsh \u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u306F\u3001Rust \u30D7\u30ED\u30B0\u30E9\u30E0\u3001Rust \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3001Node\u3001Python \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u7528\u306B\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    Serializing Data

    \u3053\u3053\u3067\u306F\u3001\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u306F\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3068\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u4E21\u65B9\u3092\u610F\u5473\u3057\u307E\u3059\u3002

    \u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u306F\u3001Solana \u30D7\u30ED\u30B0\u30E9\u30E0\u3068\u30D7\u30ED\u30B0\u30E9\u30E0 \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u30E9\u30A4\u30D5\u30B5\u30A4\u30AF\u30EB\u306E\u3044\u304F\u3064\u304B\u306E\u30DD\u30A4\u30F3\u30C8\u3067\u6A5F\u80FD\u3057\u307E\u3059\u3002

    1. \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3078\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA
    2. \u30D7\u30ED\u30B0\u30E9\u30E0\u4E0A\u306E\u547D\u4EE4\u30C7\u30FC\u30BF\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA
    3. \u30D7\u30ED\u30B0\u30E9\u30E0\u3067\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u30B7\u30EA\u30A2\u30EB\u5316
    4. \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3067\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u30C7\u30FC\u30BF\u306E\u30C7\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA

    \u540C\u3058\u30B7\u30EA\u30A2\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u30A2\u30D7\u30ED\u30FC\u30C1\u3067\u4E0A\u8A18\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3059\u3079\u3066\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u304C\u91CD\u8981\u3067\u3059\u3002 \u542B\u307E\u308C\u3066\u3044\u308B\u30B9\u30CB\u30DA\u30C3\u30C8\u306F Borsh\u3092\u4F7F\u7528\u3057\u305F\u30B7\u30EA\u30A2\u30EB\u30E9\u30A4\u30BC\u30FC\u30B7\u30E7\u30F3\u306E\u30C7\u30E2\u3067\u3059\u3002

    \u6B8B\u308A\u306E\u30B5\u30F3\u30D7\u30EB\u306F\u3001Solana CLI Program Template\u304B\u3089\u306E\u629C\u7C8B\u3067\u3059\u3002

    Setting up for Borsh Serialization

    Borsh \u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u306F\u3001Rust \u30D7\u30ED\u30B0\u30E9\u30E0\u3001Rust \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u3001Node\u3001Python \u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u7528\u306B\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),$=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.fc2b2085.js b/docs/.vuepress/dist/assets/serialization.html.58ace6bc.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.fc2b2085.js rename to docs/.vuepress/dist/assets/serialization.html.58ace6bc.js index 6fe3e0693..6f50496cd 100644 --- a/docs/.vuepress/dist/assets/serialization.html.fc2b2085.js +++ b/docs/.vuepress/dist/assets/serialization.html.58ace6bc.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializando datos

    Cuando hablamos de serializaci\xF3n, nos referimos tanto a la serializaci\xF3n de datos como a la deserializaci\xF3n de datos.

    La serializaci\xF3n entra en juego en algunos puntos a lo largo del ciclo de vida de las cuentas del programa y los programa en Solana:

    1. Serializaci\xF3n de datos de instrucciones en el cliente
    2. Deserializar datos de instrucci\xF3n en el programa
    3. Serializaci\xF3n de datos de la cuenta en el programa
    4. Deserializaci\xF3n de datos de cuenta en el cliente

    Es importante que todas las acciones anteriores est\xE9n respaldadas por el mismo enfoque de serializaci\xF3n. Los fragmentos (snippets) incluidos demuestran la serializaci\xF3n mediante Borsh.

    Los ejemplos en el resto de este documento son extractos tomados de la Plantilla del programa CLI de Solana

    Configuraci\xF3n para la serializaci\xF3n con Borsh

    Las bibliotecas para Borsh deben configurarse para el programa Rust, el cliente Rust, el cliente Node y/o Python.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializando datos

    Cuando hablamos de serializaci\xF3n, nos referimos tanto a la serializaci\xF3n de datos como a la deserializaci\xF3n de datos.

    La serializaci\xF3n entra en juego en algunos puntos a lo largo del ciclo de vida de las cuentas del programa y los programa en Solana:

    1. Serializaci\xF3n de datos de instrucciones en el cliente
    2. Deserializar datos de instrucci\xF3n en el programa
    3. Serializaci\xF3n de datos de la cuenta en el programa
    4. Deserializaci\xF3n de datos de cuenta en el cliente

    Es importante que todas las acciones anteriores est\xE9n respaldadas por el mismo enfoque de serializaci\xF3n. Los fragmentos (snippets) incluidos demuestran la serializaci\xF3n mediante Borsh.

    Los ejemplos en el resto de este documento son extractos tomados de la Plantilla del programa CLI de Solana

    Configuraci\xF3n para la serializaci\xF3n con Borsh

    Las bibliotecas para Borsh deben configurarse para el programa Rust, el cliente Rust, el cliente Node y/o Python.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -329,7 +329,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map_err"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("err"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(),n("span",{class:"token macro property"},"format!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"error: send transaction: {}"'),n("span",{class:"token punctuation"},","),s(" err"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),s("signature"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),E=n("h2",{id:"how-to-deserialize-instruction-data-on-the-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-deserialize-instruction-data-on-the-program","aria-hidden":"true"},"#"),s(" How to deserialize instruction data on the program")],-1),P=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),A=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),E=n("h2",{id:"how-to-deserialize-instruction-data-on-the-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-deserialize-instruction-data-on-the-program","aria-hidden":"true"},"#"),s(" How to deserialize instruction data on the program")],-1),C=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),P=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::"),s("program_error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},","),s(` @@ -378,7 +378,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),C=p('

    C\xF3mo serializar los datos de la cuenta en el programa

    Account Data Serialization

    El bloque de datos de la cuenta del programa (como se ve en el repositorio) est\xE1 estructurado de la siguiente manera:

    Byte 0Bytes 1-4Bytes hasta 1019
    bandera de inicializadolongitud del BTreeMap serializadoBTreeMap (donde los pares clave/valor son almacenados)

    Pack

    ',5),x=s("Unas palabras sobre el trait "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=p("

    El trait Pack hace que sea m\xE1s f\xE1cil ocultar los detalles de la serializaci\xF3n/deserializaci\xF3n de los datos de la cuenta en el procesamiento de instrucciones de su programa principal. En lugar de poner la serializaci\xF3n/deserializaci\xF3n en el c\xF3digo del programa, encapsula los detalles por detr\xE1s de (3) funciones:

    1. unpack_unchecked - Le permite deserializar una cuenta sin validar si se ha inicializado. Es \xFAtil cuando realmente est\xE1 procesando la funci\xF3n de inicializaci\xF3n (\xEDndice 0)
    2. unpack - LLama a tu implementaci\xF3n de unpack_from_slice y valida si la cuenta se ha inicializado.
    3. pack - LLama a tu implementaci\xF3n de pack_into_slice

    Here is the implementation of the Pack trait for our sample program. This is followed with the actual processing of the account data using borsh.

    Aqu\xED est\xE1 la implementaci\xF3n del trait Pack para nuestro programa de ejemplo. Seguido del procesamiento actual de la cuenta usando borsh.

    ",4),O=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),A=p('

    C\xF3mo serializar los datos de la cuenta en el programa

    Account Data Serialization

    El bloque de datos de la cuenta del programa (como se ve en el repositorio) est\xE1 estructurado de la siguiente manera:

    Byte 0Bytes 1-4Bytes hasta 1019
    bandera de inicializadolongitud del BTreeMap serializadoBTreeMap (donde los pares clave/valor son almacenados)

    Pack

    ',5),x=s("Unas palabras sobre el trait "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=p("

    El trait Pack hace que sea m\xE1s f\xE1cil ocultar los detalles de la serializaci\xF3n/deserializaci\xF3n de los datos de la cuenta en el procesamiento de instrucciones de su programa principal. En lugar de poner la serializaci\xF3n/deserializaci\xF3n en el c\xF3digo del programa, encapsula los detalles por detr\xE1s de (3) funciones:

    1. unpack_unchecked - Le permite deserializar una cuenta sin validar si se ha inicializado. Es \xFAtil cuando realmente est\xE1 procesando la funci\xF3n de inicializaci\xF3n (\xEDndice 0)
    2. unpack - LLama a tu implementaci\xF3n de unpack_from_slice y valida si la cuenta se ha inicializado.
    3. pack - LLama a tu implementaci\xF3n de pack_into_slice

    Here is the implementation of the Pack trait for our sample program. This is followed with the actual processing of the account data using borsh.

    Aqu\xED est\xE1 la implementaci\xF3n del trait Pack para nuestro programa de ejemplo. Seguido del procesamiento actual de la cuenta usando borsh.

    ",4),O=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("sol_template_shared"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token constant"},"ACCOUNT_STATE_SPACE"),n("span",{class:"token punctuation"},";"),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` @@ -986,4 +986,4 @@ primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Some = {:?} Pubkey = {:?}"'),n("span",{class:"token punctuation"},","),s(" toption"),n("span",{class:"token number"},".0"),n("span",{class:"token punctuation"},","),s(" pkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),pn=n("h2",{id:"recursos",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#recursos","aria-hidden":"true"},"#"),s(" Recursos")],-1),ln={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},un=s("Especificaci\xF3n de Borsh"),rn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},kn=s("Rust Borsh"),bn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},mn=s("TS/JS Borsh"),dn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},yn=s("Python Borsh"),gn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},fn=s("Python Borsh Documentation"),_n={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},wn=s("Programa CLI de Solana Template2");function hn(Sn,zn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[g,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[f]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[z]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[T]),_:1})]),_:1}),E,P,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[A]),_:1})]),_:1}),C,n("p",null,[x,n("a",B,[I,a(c)])]),R,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[O]),_:1})]),_:1}),M,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[N]),_:1})]),_:1}),U,D,K,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[G]),_:1})]),_:1}),q,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),F,V,j,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[H]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[Y]),_:1}),a(e,{title:"Rust"},{default:t(()=>[W]),_:1})]),_:1}),X,Z,J,Q,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[$]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[sn]),_:1})]),_:1}),an,tn,en,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[on]),_:1}),a(e,{title:"Rust"},{default:t(()=>[cn]),_:1})]),_:1}),pn,n("ul",null,[n("li",null,[n("a",ln,[un,a(c)])]),n("li",null,[n("a",rn,[kn,a(c)])]),n("li",null,[n("a",bn,[mn,a(c)])]),n("li",null,[n("a",dn,[yn,a(c)])]),n("li",null,[n("a",gn,[fn,a(c)])]),n("li",null,[n("a",_n,[wn,a(c)])])])],64)}var Tn=u(y,[["render",hn]]);export{Tn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),pn=n("h2",{id:"recursos",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#recursos","aria-hidden":"true"},"#"),s(" Recursos")],-1),ln={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},un=s("Especificaci\xF3n de Borsh"),rn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},kn=s("Rust Borsh"),bn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},mn=s("TS/JS Borsh"),dn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},yn=s("Python Borsh"),gn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},fn=s("Python Borsh Documentation"),_n={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},wn=s("Programa CLI de Solana Template2");function hn(Sn,zn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[g,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[f]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[z]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[T]),_:1})]),_:1}),E,C,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[P]),_:1})]),_:1}),A,n("p",null,[x,n("a",B,[I,a(c)])]),R,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[O]),_:1})]),_:1}),M,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[N]),_:1})]),_:1}),U,D,K,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[G]),_:1})]),_:1}),q,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),F,V,j,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[H]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[Y]),_:1}),a(e,{title:"Rust"},{default:t(()=>[W]),_:1})]),_:1}),X,Z,J,Q,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[$]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[sn]),_:1})]),_:1}),an,tn,en,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[on]),_:1}),a(e,{title:"Rust"},{default:t(()=>[cn]),_:1})]),_:1}),pn,n("ul",null,[n("li",null,[n("a",ln,[un,a(c)])]),n("li",null,[n("a",rn,[kn,a(c)])]),n("li",null,[n("a",bn,[mn,a(c)])]),n("li",null,[n("a",dn,[yn,a(c)])]),n("li",null,[n("a",gn,[fn,a(c)])]),n("li",null,[n("a",_n,[wn,a(c)])])])],64)}var Tn=u(y,[["render",hn]]);export{Tn as default}; diff --git a/docs/.vuepress/dist/assets/serialization.html.4cfc0d5a.js b/docs/.vuepress/dist/assets/serialization.html.5e0ca063.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.4cfc0d5a.js rename to docs/.vuepress/dist/assets/serialization.html.5e0ca063.js index 2cc835301..c0e2dfb6b 100644 --- a/docs/.vuepress/dist/assets/serialization.html.4cfc0d5a.js +++ b/docs/.vuepress/dist/assets/serialization.html.5e0ca063.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    S\xE9rialisation des donn\xE9es

    Lorsque nous parlons de s\xE9rialisation, nous parlons aussi bien de la s\xE9rialisation des donn\xE9es que de leur d\xE9s\xE9rialisation.

    La s\xE9rialisation entre en jeu \xE0 certains moments du cycle de vie des comptes de programmes et du programme de Solana :

    1. S\xE9rialisation des donn\xE9es d'instruction c\xF4t\xE9 client
    2. D\xE9s\xE9rialiser des donn\xE9es d'instruction dans le programme
    3. S\xE9rialisation des donn\xE9es du compte dans le programme
    4. D\xE9s\xE9rialisation des donn\xE9es du compte c\xF4t\xE9 client

    Il est important que les actions ci-dessus soient toutes prises en charge par la m\xEAme approche de s\xE9rialisation. Les snippets inclus montrent la s\xE9rialisation en utilisant Borsh.

    Les exemples figurant dans la suite de ce document sont des extraits du mod\xE8le de programme CLI de Solana

    Configuration pour la s\xE9rialisation avec Borsh

    Les biblioth\xE8ques pour Borsh doivent \xEAtre configur\xE9es pour le programme Rust, le client Rust, Node et/ou le client Python.

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    S\xE9rialisation des donn\xE9es

    Lorsque nous parlons de s\xE9rialisation, nous parlons aussi bien de la s\xE9rialisation des donn\xE9es que de leur d\xE9s\xE9rialisation.

    La s\xE9rialisation entre en jeu \xE0 certains moments du cycle de vie des comptes de programmes et du programme de Solana :

    1. S\xE9rialisation des donn\xE9es d'instruction c\xF4t\xE9 client
    2. D\xE9s\xE9rialiser des donn\xE9es d'instruction dans le programme
    3. S\xE9rialisation des donn\xE9es du compte dans le programme
    4. D\xE9s\xE9rialisation des donn\xE9es du compte c\xF4t\xE9 client

    Il est important que les actions ci-dessus soient toutes prises en charge par la m\xEAme approche de s\xE9rialisation. Les snippets inclus montrent la s\xE9rialisation en utilisant Borsh.

    Les exemples figurant dans la suite de ce document sont des extraits du mod\xE8le de programme CLI de Solana

    Configuration pour la s\xE9rialisation avec Borsh

    Les biblioth\xE8ques pour Borsh doivent \xEAtre configur\xE9es pour le programme Rust, le client Rust, Node et/ou le client Python.

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.b36b4ad5.js b/docs/.vuepress/dist/assets/serialization.html.5f9eff00.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.b36b4ad5.js rename to docs/.vuepress/dist/assets/serialization.html.5f9eff00.js index cb02bd1de..52978b049 100644 --- a/docs/.vuepress/dist/assets/serialization.html.b36b4ad5.js +++ b/docs/.vuepress/dist/assets/serialization.html.5f9eff00.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Pagse-serye ng Data

    Kapag pinag-uusapan natin ang tungkol sa serialization, ang ibig sabihin ay parehong serializing data pati na rin ang deserialization ng data.

    Naglalaro ang serialization sa ilang mga punto kasama ang lifecycle ng program at program account ng Solana:

    1. Pagse-serye ng data ng pagtuturo sa kliyente
    2. Deserializing data ng pagtuturo sa programa
    3. Pagse-serye ng data ng Account sa programa
    4. Deserializing Data ng Account sa kliyente

    Mahalagang lahat ng mga aksyon sa itaas ay sinusuportahan ng parehong paraan ng serialization. Ang ang mga kasamang snippet ay nagpapakita ng serialization gamit ang Borsh.

    Ang mga sample sa natitirang bahagi ng dokumentong ito ay mga sipi na kinuha mula sa Solana CLI Program Template

    Pagse-set up para sa Borsh Serialization

    Ang mga library para sa Borsh ay dapat na setup para sa Rust program, Rust client, Node at/o Python client.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Pagse-serye ng Data

    Kapag pinag-uusapan natin ang tungkol sa serialization, ang ibig sabihin ay parehong serializing data pati na rin ang deserialization ng data.

    Naglalaro ang serialization sa ilang mga punto kasama ang lifecycle ng program at program account ng Solana:

    1. Pagse-serye ng data ng pagtuturo sa kliyente
    2. Deserializing data ng pagtuturo sa programa
    3. Pagse-serye ng data ng Account sa programa
    4. Deserializing Data ng Account sa kliyente

    Mahalagang lahat ng mga aksyon sa itaas ay sinusuportahan ng parehong paraan ng serialization. Ang ang mga kasamang snippet ay nagpapakita ng serialization gamit ang Borsh.

    Ang mga sample sa natitirang bahagi ng dokumentong ito ay mga sipi na kinuha mula sa Solana CLI Program Template

    Pagse-set up para sa Borsh Serialization

    Ang mga library para sa Borsh ay dapat na setup para sa Rust program, Rust client, Node at/o Python client.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.bb0b6d3d.js b/docs/.vuepress/dist/assets/serialization.html.6e96a72c.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.bb0b6d3d.js rename to docs/.vuepress/dist/assets/serialization.html.6e96a72c.js index b3a2e974b..b8545e867 100644 --- a/docs/.vuepress/dist/assets/serialization.html.bb0b6d3d.js +++ b/docs/.vuepress/dist/assets/serialization.html.6e96a72c.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializing Data

    When we talk about serialization we mean both serializing data as well as deserialization of data.

    Serialization comes into play at a few points along Solana program and program accounts lifecycle:

    1. Serializing instruction data on to client
    2. Deserializing instruction data on the program
    3. Serializing Account data on the program
    4. Deserializing Account Data on the client

    It is important that the above actions are all supported by the same serialization approach. The included snippets are demonstrating serialization using Borsh.

    The samples in the remainder of this document are excerpts as taken from the Solana CLI Program Template

    Setting up for Borsh Serialization

    Libraries for Borsh must be setup for the Rust program, Rust client, Node and/or Python client.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializing Data

    When we talk about serialization we mean both serializing data as well as deserialization of data.

    Serialization comes into play at a few points along Solana program and program accounts lifecycle:

    1. Serializing instruction data on to client
    2. Deserializing instruction data on the program
    3. Serializing Account data on the program
    4. Deserializing Account Data on the client

    It is important that the above actions are all supported by the same serialization approach. The included snippets are demonstrating serialization using Borsh.

    The samples in the remainder of this document are excerpts as taken from the Solana CLI Program Template

    Setting up for Borsh Serialization

    Libraries for Borsh must be setup for the Rust program, Rust client, Node and/or Python client.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.d1b35c96.js b/docs/.vuepress/dist/assets/serialization.html.8240c6c3.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.d1b35c96.js rename to docs/.vuepress/dist/assets/serialization.html.8240c6c3.js index 2fb2c849d..de95b40a6 100644 --- a/docs/.vuepress/dist/assets/serialization.html.d1b35c96.js +++ b/docs/.vuepress/dist/assets/serialization.html.8240c6c3.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializing Data

    \u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E17\u0E33 serialization \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2B\u0E21\u0E32\u0E22\u0E16\u0E36\u0E07\u0E17\u0E31\u0E49\u0E07\u0E01\u0E32\u0E23 serialize data \u0E41\u0E25\u0E30\u0E01\u0E32\u0E23 deserialize data.

    Serialization \u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E17\u0E31\u0E49\u0E07\u0E43\u0E19 Solana program \u0E41\u0E25\u0E30\u0E43\u0E19 program accounts:

    1. Serializing instruction data \u0E17\u0E35\u0E48 client
    2. Deserializing instruction data \u0E43\u0E19 program
    3. Serializing Account data \u0E43\u0E19 program
    4. Deserializing Account Data \u0E17\u0E35\u0E48 client

    \u0E01\u0E32\u0E23 serialization \u0E43\u0E19\u0E41\u0E15\u0E48\u0E25\u0E30\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E44\u0E14\u0E49\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E46 \u0E01\u0E31\u0E19 \u0E42\u0E14\u0E22 code \u0E2A\u0E31\u0E49\u0E19\u0E46 (snippets) \u0E08\u0E30\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23 serialization \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 Borsh.

    \u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E19 document \u0E19\u0E33\u0E21\u0E32\u0E08\u0E32\u0E01 Solana CLI Program Template

    \u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Borsh Serialization

    Libraries \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Borsh \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Rust program, Rust client, Node and/or Python client.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializing Data

    \u0E40\u0E27\u0E25\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E17\u0E33 serialization \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2B\u0E21\u0E32\u0E22\u0E16\u0E36\u0E07\u0E17\u0E31\u0E49\u0E07\u0E01\u0E32\u0E23 serialize data \u0E41\u0E25\u0E30\u0E01\u0E32\u0E23 deserialize data.

    Serialization \u0E40\u0E02\u0E49\u0E32\u0E21\u0E32\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E17\u0E31\u0E49\u0E07\u0E43\u0E19 Solana program \u0E41\u0E25\u0E30\u0E43\u0E19 program accounts:

    1. Serializing instruction data \u0E17\u0E35\u0E48 client
    2. Deserializing instruction data \u0E43\u0E19 program
    3. Serializing Account data \u0E43\u0E19 program
    4. Deserializing Account Data \u0E17\u0E35\u0E48 client

    \u0E01\u0E32\u0E23 serialization \u0E43\u0E19\u0E41\u0E15\u0E48\u0E25\u0E30\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E44\u0E14\u0E49\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E46 \u0E01\u0E31\u0E19 \u0E42\u0E14\u0E22 code \u0E2A\u0E31\u0E49\u0E19\u0E46 (snippets) \u0E08\u0E30\u0E41\u0E2A\u0E14\u0E07\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E02\u0E2D\u0E07\u0E01\u0E32\u0E23 serialization \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 Borsh.

    \u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E43\u0E19 document \u0E19\u0E33\u0E21\u0E32\u0E08\u0E32\u0E01 Solana CLI Program Template

    \u0E01\u0E32\u0E23\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Borsh Serialization

    Libraries \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Borsh \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E15\u0E34\u0E14\u0E15\u0E31\u0E49\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Rust program, Rust client, Node and/or Python client.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -329,7 +329,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map_err"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("err"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(),n("span",{class:"token macro property"},"format!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"error: send transaction: {}"'),n("span",{class:"token punctuation"},","),s(" err"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),s("signature"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-deserialize-instruction-data-\u0E43\u0E19-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-deserialize-instruction-data-\u0E43\u0E19-program","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 deserialize instruction data \u0E43\u0E19 program")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),x=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35-deserialize-instruction-data-\u0E43\u0E19-program",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35-deserialize-instruction-data-\u0E43\u0E19-program","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35 deserialize instruction data \u0E43\u0E19 program")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::"),s("program_error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},","),s(` @@ -378,7 +378,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),C=p('

    \u0E27\u0E34\u0E18\u0E35 serialize account data \u0E43\u0E19 program

    Account Data Serialization

    program account data block (\u0E08\u0E32\u0E01 repo \u0E40\u0E14\u0E35\u0E22\u0E27\u0E01\u0E31\u0E19) \u0E21\u0E35\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E14\u0E31\u0E07\u0E19\u0E35\u0E49

    Byte 0Bytes 1-4\u0E40\u0E2B\u0E25\u0E37\u0E2D 1019 Bytes
    Initialized flag\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E02\u0E2D\u0E07 serialized BTreeMapBTreeMap (\u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A key value pairs)

    Pack

    ',5),E=s("\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s(" trait"),O=p("

    Pack trait \u0E08\u0E30\u0E0B\u0E48\u0E2D\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E43\u0E19\u0E01\u0E32\u0E23 serialization/deserialization account data \u0E08\u0E32\u0E01\u0E01\u0E32\u0E23 process Program instruction \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E41\u0E17\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E2A\u0E48 serialize/deserialize log \u0E43\u0E19 program processing code \u0E21\u0E31\u0E19\u0E08\u0E30\u0E0B\u0E48\u0E2D\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E2D\u0E22\u0E38\u0E48\u0E43\u0E19 (3) functions:

    1. unpack_unchecked - \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32 deserialize account \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E23\u0E27\u0E08\u0E27\u0E48\u0E32\u0E21\u0E31\u0E19\u0E16\u0E39\u0E01 initialized \u0E44\u0E1B\u0E23\u0E36\u0E22\u0E31\u0E07 \u0E21\u0E31\u0E19\u0E08\u0E30\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E42\u0E22\u0E0A\u0E19\u0E4C\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32 process Initialization function (variant index 0)
    2. unpack - \u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 unpack_from_slice \u0E43\u0E19 Pack \u0E41\u0E25\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E27\u0E48\u0E32 account \u0E16\u0E39\u0E01 initialized \u0E41\u0E25\u0E49\u0E27.
    3. pack - \u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 pack_into_slice \u0E43\u0E19 Pack

    \u0E19\u0E35\u0E48\u0E04\u0E37\u0E2D\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E17\u0E35\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23 implementation \u0E02\u0E2D\u0E07 Pack trait \u0E41\u0E25\u0E30\u0E15\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23 process account data \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 borsh.

    ",3),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),x=p('

    \u0E27\u0E34\u0E18\u0E35 serialize account data \u0E43\u0E19 program

    Account Data Serialization

    program account data block (\u0E08\u0E32\u0E01 repo \u0E40\u0E14\u0E35\u0E22\u0E27\u0E01\u0E31\u0E19) \u0E21\u0E35\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E14\u0E31\u0E07\u0E19\u0E35\u0E49

    Byte 0Bytes 1-4\u0E40\u0E2B\u0E25\u0E37\u0E2D 1019 Bytes
    Initialized flag\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E02\u0E2D\u0E07 serialized BTreeMapBTreeMap (\u0E17\u0E35\u0E48\u0E40\u0E01\u0E47\u0E1A key value pairs)

    Pack

    ',5),E=s("\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E01\u0E31\u0E1A "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s(" trait"),O=p("

    Pack trait \u0E08\u0E30\u0E0B\u0E48\u0E2D\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E43\u0E19\u0E01\u0E32\u0E23 serialization/deserialization account data \u0E08\u0E32\u0E01\u0E01\u0E32\u0E23 process Program instruction \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E41\u0E17\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E2A\u0E48 serialize/deserialize log \u0E43\u0E19 program processing code \u0E21\u0E31\u0E19\u0E08\u0E30\u0E0B\u0E48\u0E2D\u0E19\u0E23\u0E32\u0E22\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E2D\u0E22\u0E38\u0E48\u0E43\u0E19 (3) functions:

    1. unpack_unchecked - \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32 deserialize account \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E23\u0E27\u0E08\u0E27\u0E48\u0E32\u0E21\u0E31\u0E19\u0E16\u0E39\u0E01 initialized \u0E44\u0E1B\u0E23\u0E36\u0E22\u0E31\u0E07 \u0E21\u0E31\u0E19\u0E08\u0E30\u0E21\u0E35\u0E1B\u0E23\u0E30\u0E42\u0E22\u0E0A\u0E19\u0E4C\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32 process Initialization function (variant index 0)
    2. unpack - \u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 unpack_from_slice \u0E43\u0E19 Pack \u0E41\u0E25\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E27\u0E48\u0E32 account \u0E16\u0E39\u0E01 initialized \u0E41\u0E25\u0E49\u0E27.
    3. pack - \u0E40\u0E23\u0E35\u0E22\u0E01\u0E43\u0E0A\u0E49 pack_into_slice \u0E43\u0E19 Pack

    \u0E19\u0E35\u0E48\u0E04\u0E37\u0E2D\u0E15\u0E31\u0E27\u0E2D\u0E22\u0E48\u0E32\u0E07 program \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E17\u0E35\u0E48\u0E21\u0E35\u0E01\u0E32\u0E23 implementation \u0E02\u0E2D\u0E07 Pack trait \u0E41\u0E25\u0E30\u0E15\u0E48\u0E2D\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23 process account data \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 borsh.

    ",3),N=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("sol_template_shared"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token constant"},"ACCOUNT_STATE_SPACE"),n("span",{class:"token punctuation"},";"),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` @@ -986,4 +986,4 @@ primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Some = {:?} Pubkey = {:?}"'),n("span",{class:"token punctuation"},","),s(" toption"),n("span",{class:"token number"},".0"),n("span",{class:"token punctuation"},","),s(" pkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"resources",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#resources","aria-hidden":"true"},"#"),s(" Resources")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},gn=s("Python Borsh"),fn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),wn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},hn=s("Solana CLI Program Template2");function Sn(zn,vn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[g,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[f]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[z]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[T]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[x]),_:1})]),_:1}),C,n("p",null,[E,n("a",B,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[N]),_:1})]),_:1}),M,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[U]),_:1})]),_:1}),D,K,G,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),j,H,Y,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[W]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[gn,a(c)])]),n("li",null,[n("a",fn,[_n,a(c)])]),n("li",null,[n("a",wn,[hn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"resources",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#resources","aria-hidden":"true"},"#"),s(" Resources")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},gn=s("Python Borsh"),fn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),wn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},hn=s("Solana CLI Program Template2");function Sn(zn,vn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[g,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[f]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[z]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[T]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[C]),_:1})]),_:1}),x,n("p",null,[E,n("a",B,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[N]),_:1})]),_:1}),M,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[U]),_:1})]),_:1}),D,K,G,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),j,H,Y,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[W]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[gn,a(c)])]),n("li",null,[n("a",fn,[_n,a(c)])]),n("li",null,[n("a",wn,[hn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; diff --git a/docs/.vuepress/dist/assets/serialization.html.932862af.js b/docs/.vuepress/dist/assets/serialization.html.96be53fb.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.932862af.js rename to docs/.vuepress/dist/assets/serialization.html.96be53fb.js index 639126640..bed899306 100644 --- a/docs/.vuepress/dist/assets/serialization.html.932862af.js +++ b/docs/.vuepress/dist/assets/serialization.html.96be53fb.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializing Data

    \uC5EC\uAE30\uC11C Serialization\uC5D0 \uB300\uD574 \uC598\uAE30\uD560 \uB54C, Data\uB97C serializing \uD558\uB294 \uAC83\uACFC deserializing \uD558\uB294 \uAC83 \uBAA8\uB450\uB97C \uC758\uBBF8\uD569\uB2C8\uB2E4.

    Solana Program\uACFC Program Account\uB4E4\uC758 \uC0DD\uBA85 \uC8FC\uAE30\uB97C \uB530\uB77C\uC11C Serialization\uC774 \uB3D9\uC791\uD558\uB294 \uBA87 \uAC00\uC9C0 \uD3EC\uC778\uD2B8\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4:

    1. Client\uC5D0\uC11C Instruction Data\uB97C Serializing \uD558\uB294 \uAC83
    2. Program\uC5D0\uC11C Instruction Data\uB97C Deserializing \uD558\uB294 \uAC83
    3. Program\uC5D0\uC11C Account Data\uB97C Serializing \uD558\uB294 \uAC83
    4. Client\uC5D0\uC11C Account Data\uB97C Deserializing \uD558\uB294 \uAC83

    \uC704\uC758 \uD589\uC704\uB4E4\uC740 \uBAA8\uB450 \uAC19\uC740 Serialization \uC811\uADFC\uC5D0 \uC758\uD574 \uC9C0\uC6D0\uB41C\uB2E4\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4. \uD3EC\uD568\uB41C Snippet\uB4E4\uC774 Borsh\uB97C \uC0AC\uC6A9\uD558\uB294 Serialization\uC744 \uBCF4\uC5EC\uC8FC\uACE0 \uC788\uC2B5\uB2C8\uB2E4.

    \uC774 \uBB38\uC11C\uC758 \uB098\uBA38\uC9C0 \uC608\uC81C\uB4E4\uC740 Solana CLI Program Template\uC73C\uB85C\uBD80\uD130 \uAC00\uC838\uC628 \uAC83\uB4E4\uC785\uB2C8\uB2E4.

    Setting up for Borsh Serialization

    Rust Program, Rust Client, Node \uADF8\uB9AC\uACE0/\uB610\uB294 Python Client\uC5D0 Borsh \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uC124\uCE58\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serializing Data

    \uC5EC\uAE30\uC11C Serialization\uC5D0 \uB300\uD574 \uC598\uAE30\uD560 \uB54C, Data\uB97C serializing \uD558\uB294 \uAC83\uACFC deserializing \uD558\uB294 \uAC83 \uBAA8\uB450\uB97C \uC758\uBBF8\uD569\uB2C8\uB2E4.

    Solana Program\uACFC Program Account\uB4E4\uC758 \uC0DD\uBA85 \uC8FC\uAE30\uB97C \uB530\uB77C\uC11C Serialization\uC774 \uB3D9\uC791\uD558\uB294 \uBA87 \uAC00\uC9C0 \uD3EC\uC778\uD2B8\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4:

    1. Client\uC5D0\uC11C Instruction Data\uB97C Serializing \uD558\uB294 \uAC83
    2. Program\uC5D0\uC11C Instruction Data\uB97C Deserializing \uD558\uB294 \uAC83
    3. Program\uC5D0\uC11C Account Data\uB97C Serializing \uD558\uB294 \uAC83
    4. Client\uC5D0\uC11C Account Data\uB97C Deserializing \uD558\uB294 \uAC83

    \uC704\uC758 \uD589\uC704\uB4E4\uC740 \uBAA8\uB450 \uAC19\uC740 Serialization \uC811\uADFC\uC5D0 \uC758\uD574 \uC9C0\uC6D0\uB41C\uB2E4\uB294 \uAC83\uC774 \uC911\uC694\uD569\uB2C8\uB2E4. \uD3EC\uD568\uB41C Snippet\uB4E4\uC774 Borsh\uB97C \uC0AC\uC6A9\uD558\uB294 Serialization\uC744 \uBCF4\uC5EC\uC8FC\uACE0 \uC788\uC2B5\uB2C8\uB2E4.

    \uC774 \uBB38\uC11C\uC758 \uB098\uBA38\uC9C0 \uC608\uC81C\uB4E4\uC740 Solana CLI Program Template\uC73C\uB85C\uBD80\uD130 \uAC00\uC838\uC628 \uAC83\uB4E4\uC785\uB2C8\uB2E4.

    Setting up for Borsh Serialization

    Rust Program, Rust Client, Node \uADF8\uB9AC\uACE0/\uB610\uB294 Python Client\uC5D0 Borsh \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uC124\uCE58\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),nn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` diff --git a/docs/.vuepress/dist/assets/serialization.html.cd6e6685.js b/docs/.vuepress/dist/assets/serialization.html.a08cd6dd.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.cd6e6685.js rename to docs/.vuepress/dist/assets/serialization.html.a08cd6dd.js index 08f791bf5..733a1cee4 100644 --- a/docs/.vuepress/dist/assets/serialization.html.cd6e6685.js +++ b/docs/.vuepress/dist/assets/serialization.html.a08cd6dd.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    \u5E8F\u5217\u6578\u64DA

    \u7576\u6211\u5011\u8AC7\u8AD6\u5E8F\u5217\u5316\u6642\uFF0C\u6211\u5011\u6307\u7684\u662F\u6578\u64DA\u7684\u5E8F\u5217\u5316\u548C\u53CD\u5E8F\u5217\u5316\u3002

    \u5E8F\u5217\u5316\u5728Solana\u7A0B\u5E8F\u548C\u7A0B\u5E8F\u8CEC\u6236\u7684\u751F\u547D\u9031\u671F\u4E2D\u7684\u5E7E\u500B\u9EDE\u4E0A\u8D77\u7740\u4F5C\u7528\uFF1A

    1. \u5C07\u6307\u4EE4\u6578\u64DA\u5E8F\u5217\u5316\u5230\u5BA2\u6236\u7AEF\u4E0A
    2. \u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA
    3. \u5C07\u8CEC\u6236\u6578\u64DA\u5E8F\u5217\u5316\u5230\u7A0B\u5E8F\u4E2D
    4. \u5728\u5BA2\u6236\u7AEF\u4E0A\u53CD\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA

    \u91CD\u8981\u7684\u662F\uFF0C\u4E0A\u8FF0\u64CD\u4F5C\u90FD\u61C9\u8A72\u63A1\u7528\u76F8\u540C\u7684\u5E8F\u5217\u5316\u65B9\u6CD5\u3002\u4E0B\u9762\u7684\u793A\u4F8B\u6F14\u793A\u4E86\u4F7F\u7528Borsh\u9032\u884C\u5E8F\u5217\u5316\u3002

    \u672C\u6587\u6A94\u7684\u5176\u9918\u90E8\u5206\u4E2D\u7684\u793A\u4F8B\u6458\u9304\u81EASolana CLI \u7A0B\u5E8F\u6A21\u677F

    \u8A2D\u7F6EBorsh\u5E8F\u5217\u5316

    \u7232\u4E86\u4F7F\u7528Borsh\u9032\u884C\u5E8F\u5217\u5316\uFF0C\u9700\u8981\u5728Rust\u7A0B\u5E8F\u3001Rust\u5BA2\u6236\u7AEF\u3001\u7BC0\u9EDE\u548C/\u6216Python\u5BA2\u6236\u7AEF\u4E2D\u8A2D\u7F6EBorsh\u5EAB\u3002

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},f=p('

    \u5E8F\u5217\u6578\u64DA

    \u7576\u6211\u5011\u8AC7\u8AD6\u5E8F\u5217\u5316\u6642\uFF0C\u6211\u5011\u6307\u7684\u662F\u6578\u64DA\u7684\u5E8F\u5217\u5316\u548C\u53CD\u5E8F\u5217\u5316\u3002

    \u5E8F\u5217\u5316\u5728Solana\u7A0B\u5E8F\u548C\u7A0B\u5E8F\u8CEC\u6236\u7684\u751F\u547D\u9031\u671F\u4E2D\u7684\u5E7E\u500B\u9EDE\u4E0A\u8D77\u7740\u4F5C\u7528\uFF1A

    1. \u5C07\u6307\u4EE4\u6578\u64DA\u5E8F\u5217\u5316\u5230\u5BA2\u6236\u7AEF\u4E0A
    2. \u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA
    3. \u5C07\u8CEC\u6236\u6578\u64DA\u5E8F\u5217\u5316\u5230\u7A0B\u5E8F\u4E2D
    4. \u5728\u5BA2\u6236\u7AEF\u4E0A\u53CD\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA

    \u91CD\u8981\u7684\u662F\uFF0C\u4E0A\u8FF0\u64CD\u4F5C\u90FD\u61C9\u8A72\u63A1\u7528\u76F8\u540C\u7684\u5E8F\u5217\u5316\u65B9\u6CD5\u3002\u4E0B\u9762\u7684\u793A\u4F8B\u6F14\u793A\u4E86\u4F7F\u7528Borsh\u9032\u884C\u5E8F\u5217\u5316\u3002

    \u672C\u6587\u6A94\u7684\u5176\u9918\u90E8\u5206\u4E2D\u7684\u793A\u4F8B\u6458\u9304\u81EASolana CLI \u7A0B\u5E8F\u6A21\u677F

    \u8A2D\u7F6EBorsh\u5E8F\u5217\u5316

    \u7232\u4E86\u4F7F\u7528Borsh\u9032\u884C\u5E8F\u5217\u5316\uFF0C\u9700\u8981\u5728Rust\u7A0B\u5E8F\u3001Rust\u5BA2\u6236\u7AEF\u3001\u7BC0\u9EDE\u548C/\u6216Python\u5BA2\u6236\u7AEF\u4E2D\u8A2D\u7F6EBorsh\u5EAB\u3002

    ',8),g=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -329,7 +329,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map_err"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("err"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(),n("span",{class:"token macro property"},"format!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"error: send transaction: {}"'),n("span",{class:"token punctuation"},","),s(" err"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),s("signature"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),x=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u53CD\u5E8F\u5217\u5316\u6307\u4EE4\u6578\u64DA")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::"),s("program_error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},","),s(` @@ -378,7 +378,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),C=p('

    \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA

    Account Data Serialization

    \u7A0B\u5E8F\u8CEC\u6236\u6578\u64DA\u584A\uFF08\u4F86\u81EA\u793A\u4F8B\u5009\u5EAB\uFF09\u7684\u4F48\u5C40\u5982\u4E0B\uFF1A

    Byte 0Bytes 1-4Remaining Byte up to 1019
    Initialized flaglength of serialized BTreeMapBTreeMap (where key value pairs are stored)

    Pack

    ',5),E=s("\u95DC\u65BC "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s(" trait"),O=p("

    \u53EF\u4EE5\u66F4\u5BB9\u6613\u5730\u96B1\u85CF\u8CEC\u6236\u6578\u64DA\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u7684\u7D30\u7BC0\uFF0C\u4F7F\u4F60\u7684\u6838\u5FC3\u7A0B\u5E8F\u6307\u4EE4\u8655\u7406\u4EE3\u78BC\u66F4\u7C21\u6F54\u3002\u56E0\u6B64\uFF0C\u4E0D\u9700\u8981\u5C07\u6240\u6709\u7684\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u908F\u8F2F\u653E\u5728\u7A0B\u5E8F\u8655\u7406\u4EE3\u78BC\u4E2D\uFF0C\u800C\u662F\u5C07\u9019\u4E9B\u7D30\u7BC0\u5C01\u88DD\u5728\u4EE5\u4E0B\u4E09\u500B\u51FD\u6578\u4E2D\uFF1A

    1. unpack_unchecked - \u5141\u8A31\u4F60\u5C0D\u8CEC\u6236\u9032\u884C\u53CD\u5E8F\u5217\u5316\uFF0C\u800C\u7121\u9700\u6AA2\u67E5\u5B83\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002\u7576\u5BE6\u969B\u8655\u7406\u521D\u59CB\u5316\u51FD\u6578\uFF08\u8B8A\u9AD4\u7D22\u5F15\u72320\uFF09\u6642\uFF0C\u9019\u975E\u5E38\u6709\u7528\u3002
    2. unpack - \u8ABF\u7528\u4F60\u7684Pack\u5BE6\u73FE\u7684unpack_from_slice\u51FD\u6578\uFF0C\u4E26\u6AA2\u67E5\u8CEC\u6236\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002
    3. pack - \u8ABF\u7528\u60A8\u7684Pack\u5BE6\u73FE\u7684pack_into_slice\u51FD\u6578\u3002

    \u4E0B\u9762\u662F\u6211\u5011\u793A\u4F8B\u7A0B\u5E8F\u7684Pack trait\u5BE6\u73FE\u3002\u96A8\u5F8C\u662F\u4F7F\u7528Borsh\u9032\u884C\u8CEC\u6236\u6578\u64DA\u8655\u7406\u7684\u793A\u4F8B\u3002

    ",3),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),x=p('

    \u5982\u4F55\u5728\u7A0B\u5E8F\u4E2D\u5E8F\u5217\u5316\u8CEC\u6236\u6578\u64DA

    Account Data Serialization

    \u7A0B\u5E8F\u8CEC\u6236\u6578\u64DA\u584A\uFF08\u4F86\u81EA\u793A\u4F8B\u5009\u5EAB\uFF09\u7684\u4F48\u5C40\u5982\u4E0B\uFF1A

    Byte 0Bytes 1-4Remaining Byte up to 1019
    Initialized flaglength of serialized BTreeMapBTreeMap (where key value pairs are stored)

    Pack

    ',5),E=s("\u95DC\u65BC "),B={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s(" trait"),O=p("

    \u53EF\u4EE5\u66F4\u5BB9\u6613\u5730\u96B1\u85CF\u8CEC\u6236\u6578\u64DA\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u7684\u7D30\u7BC0\uFF0C\u4F7F\u4F60\u7684\u6838\u5FC3\u7A0B\u5E8F\u6307\u4EE4\u8655\u7406\u4EE3\u78BC\u66F4\u7C21\u6F54\u3002\u56E0\u6B64\uFF0C\u4E0D\u9700\u8981\u5C07\u6240\u6709\u7684\u5E8F\u5217\u5316/\u53CD\u5E8F\u5217\u5316\u908F\u8F2F\u653E\u5728\u7A0B\u5E8F\u8655\u7406\u4EE3\u78BC\u4E2D\uFF0C\u800C\u662F\u5C07\u9019\u4E9B\u7D30\u7BC0\u5C01\u88DD\u5728\u4EE5\u4E0B\u4E09\u500B\u51FD\u6578\u4E2D\uFF1A

    1. unpack_unchecked - \u5141\u8A31\u4F60\u5C0D\u8CEC\u6236\u9032\u884C\u53CD\u5E8F\u5217\u5316\uFF0C\u800C\u7121\u9700\u6AA2\u67E5\u5B83\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002\u7576\u5BE6\u969B\u8655\u7406\u521D\u59CB\u5316\u51FD\u6578\uFF08\u8B8A\u9AD4\u7D22\u5F15\u72320\uFF09\u6642\uFF0C\u9019\u975E\u5E38\u6709\u7528\u3002
    2. unpack - \u8ABF\u7528\u4F60\u7684Pack\u5BE6\u73FE\u7684unpack_from_slice\u51FD\u6578\uFF0C\u4E26\u6AA2\u67E5\u8CEC\u6236\u662F\u5426\u5DF2\u88AB\u521D\u59CB\u5316\u3002
    3. pack - \u8ABF\u7528\u60A8\u7684Pack\u5BE6\u73FE\u7684pack_into_slice\u51FD\u6578\u3002

    \u4E0B\u9762\u662F\u6211\u5011\u793A\u4F8B\u7A0B\u5E8F\u7684Pack trait\u5BE6\u73FE\u3002\u96A8\u5F8C\u662F\u4F7F\u7528Borsh\u9032\u884C\u8CEC\u6236\u6578\u64DA\u8655\u7406\u7684\u793A\u4F8B\u3002

    ",3),M=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("sol_template_shared"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token constant"},"ACCOUNT_STATE_SPACE"),n("span",{class:"token punctuation"},";"),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` @@ -986,4 +986,4 @@ primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Some = {:?} Pubkey = {:?}"'),n("span",{class:"token punctuation"},","),s(" toption"),n("span",{class:"token number"},".0"),n("span",{class:"token punctuation"},","),s(" pkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"\u8CC7\u6599",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CC7\u6599","aria-hidden":"true"},"#"),s(" \u8CC7\u6599")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},fn=s("Python Borsh"),gn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),wn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},hn=s("Solana CLI Program Template2");function Sn(vn,Tn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[f,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[g]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[T]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[z]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[x]),_:1})]),_:1}),C,n("p",null,[E,n("a",B,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[M]),_:1})]),_:1}),N,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[U]),_:1})]),_:1}),K,G,D,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),j,H,Y,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[W]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[fn,a(c)])]),n("li",null,[n("a",gn,[_n,a(c)])]),n("li",null,[n("a",wn,[hn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"\u8CC7\u6599",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CC7\u6599","aria-hidden":"true"},"#"),s(" \u8CC7\u6599")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},fn=s("Python Borsh"),gn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),wn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},hn=s("Solana CLI Program Template2");function Sn(vn,Tn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[f,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[g]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[w]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[h]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[T]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[z]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[C]),_:1})]),_:1}),x,n("p",null,[E,n("a",B,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[M]),_:1})]),_:1}),N,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[U]),_:1})]),_:1}),K,G,D,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),j,H,Y,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[W]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[fn,a(c)])]),n("li",null,[n("a",gn,[_n,a(c)])]),n("li",null,[n("a",wn,[hn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; diff --git a/docs/.vuepress/dist/assets/serialization.html.a93f580e.js b/docs/.vuepress/dist/assets/serialization.html.c14aec9f.js similarity index 99% rename from docs/.vuepress/dist/assets/serialization.html.a93f580e.js rename to docs/.vuepress/dist/assets/serialization.html.c14aec9f.js index 64e3ecc67..162a16263 100644 --- a/docs/.vuepress/dist/assets/serialization.html.a93f580e.js +++ b/docs/.vuepress/dist/assets/serialization.html.c14aec9f.js @@ -1,4 +1,4 @@ -import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.07ce7a66.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serialisieren von Daten

    Wenn wir von Serialisierung sprechen, meinen wir sowohl die Serialisierung von Daten als auch die Deserialisierung von Daten.

    Die Serialisierung kommt an einigen Stellen im Lebenszyklus des Solana-Programms und der Programmkonten ins Spiel:

    1. Serialisieren von Befehlsdaten an den Client
    2. Deserialisieren von Befehlsdaten im Programm
    3. Serialisieren von Kontodaten im Programm
    4. Kontodaten auf dem Client deserialisieren

    Es ist wichtig, dass die oben genannten Aktionen alle durch denselben Serialisierungsansatz unterst\xFCtzt werden. Das enthaltene Snippets demonstrieren die Serialisierung mit Borsh.

    Die Beispiele im Rest dieses Dokuments sind Ausz\xFCge aus der Solana CLI Program Template

    Einrichten der Borsh-Serialisierung

    Bibliotheken f\xFCr Borsh m\xFCssen f\xFCr das Rust-Programm, den Rust-Client, den Node- und/oder den Python-Client eingerichtet werden.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` +import{_ as u,r as l,o as r,c as i,b as a,w as t,a as n,F as k,e as p,d as s}from"./app.d411e3b3.js";var b="/assets/ser1.ceec0bad.png",m="/assets/ser2.38d4ca5b.png",d="/assets/ser3.7cdd43c8.png";const y={},g=p('

    Serialisieren von Daten

    Wenn wir von Serialisierung sprechen, meinen wir sowohl die Serialisierung von Daten als auch die Deserialisierung von Daten.

    Die Serialisierung kommt an einigen Stellen im Lebenszyklus des Solana-Programms und der Programmkonten ins Spiel:

    1. Serialisieren von Befehlsdaten an den Client
    2. Deserialisieren von Befehlsdaten im Programm
    3. Serialisieren von Kontodaten im Programm
    4. Kontodaten auf dem Client deserialisieren

    Es ist wichtig, dass die oben genannten Aktionen alle durch denselben Serialisierungsansatz unterst\xFCtzt werden. Das enthaltene Snippets demonstrieren die Serialisierung mit Borsh.

    Die Beispiele im Rest dieses Dokuments sind Ausz\xFCge aus der Solana CLI Program Template

    Einrichten der Borsh-Serialisierung

    Bibliotheken f\xFCr Borsh m\xFCssen f\xFCr das Rust-Programm, den Rust-Client, den Node- und/oder den Python-Client eingerichtet werden.

    ',8),f=n("div",{class:"language-toml ext-toml line-numbers-mode"},[n("pre",{class:"language-toml"},[n("code",null,[n("span",{class:"token punctuation"},"["),n("span",{class:"token table class-name"},"package"),n("span",{class:"token punctuation"},"]"),s(` `),n("span",{class:"token key property"},"name"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"solana-cli-template-program-bpf"'),s(` `),n("span",{class:"token key property"},"version"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"0.1.0"'),s(` `),n("span",{class:"token key property"},"edition"),s(),n("span",{class:"token punctuation"},"="),s(),n("span",{class:"token string"},'"2018"'),s(` @@ -329,7 +329,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"map_err"),n("span",{class:"token punctuation"},"("),n("span",{class:"token closure-params"},[n("span",{class:"token closure-punctuation punctuation"},"|"),s("err"),n("span",{class:"token closure-punctuation punctuation"},"|")]),s(),n("span",{class:"token macro property"},"format!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"error: send transaction: {}"'),n("span",{class:"token punctuation"},","),s(" err"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},")"),n("span",{class:"token operator"},"?"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token class-name"},"Ok"),n("span",{class:"token punctuation"},"("),s("signature"),n("span",{class:"token punctuation"},")"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"so-deserialisieren-sie-befehlsdaten-im-programm",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-deserialisieren-sie-befehlsdaten-im-programm","aria-hidden":"true"},"#"),s(" So deserialisieren Sie Befehlsdaten im Programm")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),E=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br")])],-1),P=n("h2",{id:"so-deserialisieren-sie-befehlsdaten-im-programm",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-deserialisieren-sie-befehlsdaten-im-programm","aria-hidden":"true"},"#"),s(" So deserialisieren Sie Befehlsdaten im Programm")],-1),A=n("img",{src:m,alt:"Deserialize Instruction Data"},null,-1),C=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! instruction Contains the main ProgramInstruction enum"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("borsh"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"BorshDeserialize"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token namespace"},[s("solana_program"),n("span",{class:"token punctuation"},"::"),s("program_error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"ProgramError"),n("span",{class:"token punctuation"},","),s(` @@ -378,7 +378,7 @@ payload_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),C=p('

    So serialisieren Sie Kontodaten im Programm

    Account Data Serialization

    Der Datenblock des Programmkontos (aus dem Beispielrepo) ist wie folgt aufgebaut

    Byte 0Bytes 1-4Restbyte bis 1019
    Initialisiertes FlagL\xE4nge der serialisierten BTreeMapBTreeMap (wo Schl\xFCsselwertpaare gespeichert werden)

    Pack

    ',5),B=s("Ein Wort zur Eigenschaft "),x={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s("."),O=p("

    Die Pack-Eigenschaft erleichtert das Ausblenden der Details der Kontodatenserialisierung/-deserialisierung von Ihrer Kernprogramm-Anweisungsverarbeitung. Anstatt also alles zu serialisieren/deserialisieren Melden Sie sich im Programmverarbeitungscode an, und kapselt die Details hinter (3) Funktionen:

    1. unpack_unchecked - Erm\xF6glicht Ihnen, ein Konto zu deserialisieren, ohne zu pr\xFCfen, ob es initialisiert wurde. Dies ist n\xFCtzlich, wenn Sie die Initialisierungsfunktion tats\xE4chlich bearbeiten (Variantenindex 0)
    2. unpack \u2013 Ruft Ihre Pack-Implementierung von unpack_from_slice auf und pr\xFCft, ob das Konto initialisiert wurde.
    3. pack \u2013 Ruft Ihre Pack-Implementierung von pack_into_slice auf

    Hier ist die Implementierung der Pack-Eigenschaft f\xFCr unser Beispielprogramm. Darauf folgt das eigentliche Verarbeitung der Kontodaten mit Borsh.

    ",3),D=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br")])],-1),E=p('

    So serialisieren Sie Kontodaten im Programm

    Account Data Serialization

    Der Datenblock des Programmkontos (aus dem Beispielrepo) ist wie folgt aufgebaut

    Byte 0Bytes 1-4Restbyte bis 1019
    Initialisiertes FlagL\xE4nge der serialisierten BTreeMapBTreeMap (wo Schl\xFCsselwertpaare gespeichert werden)

    Pack

    ',5),B=s("Ein Wort zur Eigenschaft "),x={href:"https://github.com/solana-labs/solana/blob/22a18a68e3ee68ae013d647e62e12128433d7230/sdk/program/src/program_pack.rs",target:"_blank",rel:"noopener noreferrer"},I=s("Pack"),R=s("."),O=p("

    Die Pack-Eigenschaft erleichtert das Ausblenden der Details der Kontodatenserialisierung/-deserialisierung von Ihrer Kernprogramm-Anweisungsverarbeitung. Anstatt also alles zu serialisieren/deserialisieren Melden Sie sich im Programmverarbeitungscode an, und kapselt die Details hinter (3) Funktionen:

    1. unpack_unchecked - Erm\xF6glicht Ihnen, ein Konto zu deserialisieren, ohne zu pr\xFCfen, ob es initialisiert wurde. Dies ist n\xFCtzlich, wenn Sie die Initialisierungsfunktion tats\xE4chlich bearbeiten (Variantenindex 0)
    2. unpack \u2013 Ruft Ihre Pack-Implementierung von unpack_from_slice auf und pr\xFCft, ob das Konto initialisiert wurde.
    3. pack \u2013 Ruft Ihre Pack-Implementierung von pack_into_slice auf

    Hier ist die Implementierung der Pack-Eigenschaft f\xFCr unser Beispielprogramm. Darauf folgt das eigentliche Verarbeitung der Kontodaten mit Borsh.

    ",3),D=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token comment"},"//! @brief account_state manages account data"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token keyword"},"crate"),n("span",{class:"token module-declaration namespace"},[n("span",{class:"token punctuation"},"::"),s("error"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token class-name"},"SampleError"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token keyword"},"use"),s(),n("span",{class:"token namespace"},[s("sol_template_shared"),n("span",{class:"token punctuation"},"::")]),n("span",{class:"token constant"},"ACCOUNT_STATE_SPACE"),n("span",{class:"token punctuation"},";"),s(` @@ -733,7 +733,7 @@ account_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span", `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token function"},"entry"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br"),n("span",{class:"line-number"},"43"),n("br"),n("span",{class:"line-number"},"44"),n("br"),n("span",{class:"line-number"},"45"),n("br"),n("span",{class:"line-number"},"46"),n("br"),n("span",{class:"line-number"},"47"),n("br"),n("span",{class:"line-number"},"48"),n("br"),n("span",{class:"line-number"},"49"),n("br"),n("span",{class:"line-number"},"50"),n("br"),n("span",{class:"line-number"},"51"),n("br"),n("span",{class:"line-number"},"52"),n("br"),n("span",{class:"line-number"},"53"),n("br"),n("span",{class:"line-number"},"54"),n("br"),n("span",{class:"line-number"},"55"),n("br"),n("span",{class:"line-number"},"56"),n("br"),n("span",{class:"line-number"},"57"),n("br"),n("span",{class:"line-number"},"58"),n("br"),n("span",{class:"line-number"},"59"),n("br"),n("span",{class:"line-number"},"60"),n("br"),n("span",{class:"line-number"},"61"),n("br"),n("span",{class:"line-number"},"62"),n("br"),n("span",{class:"line-number"},"63"),n("br"),n("span",{class:"line-number"},"64"),n("br"),n("span",{class:"line-number"},"65"),n("br"),n("span",{class:"line-number"},"66"),n("br"),n("span",{class:"line-number"},"67"),n("br"),n("span",{class:"line-number"},"68"),n("br"),n("span",{class:"line-number"},"69"),n("br"),n("span",{class:"line-number"},"70"),n("br"),n("span",{class:"line-number"},"71"),n("br")])],-1),sn=n("div",{class:"language-python ext-py line-numbers-mode"},[n("pre",{class:"language-python"},[n("code",null,[n("span",{class:"token keyword"},"from"),s(" borsh_construct "),n("span",{class:"token keyword"},"import"),s(" U8"),n("span",{class:"token punctuation"},","),s(" U16"),n("span",{class:"token punctuation"},","),s(" U32"),n("span",{class:"token punctuation"},","),s(" CStruct"),n("span",{class:"token punctuation"},","),s(" String"),n("span",{class:"token punctuation"},","),s(` HashMap `),n("span",{class:"token comment"},"# Schema to deserialize various types"),s(` primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span",{class:"token punctuation"},"("),s(` @@ -986,4 +986,4 @@ primitive_schema `),n("span",{class:"token operator"},"="),s(" CStruct"),n("span `),n("span",{class:"token macro property"},"println!"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"Some = {:?} Pubkey = {:?}"'),n("span",{class:"token punctuation"},","),s(" toption"),n("span",{class:"token number"},".0"),n("span",{class:"token punctuation"},","),s(" pkey"),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"}"),s(` `),n("span",{class:"token punctuation"},"}"),s(` -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"ressourcen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ressourcen","aria-hidden":"true"},"#"),s(" Ressourcen")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},gn=s("Python Borsh"),fn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),hn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},wn=s("Solana CLI Program Template2");function Sn(vn,zn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[g,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[f]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[h]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[w]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[z]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[T]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[E]),_:1})]),_:1}),C,n("p",null,[B,n("a",x,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[D]),_:1})]),_:1}),M,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[N]),_:1})]),_:1}),K,U,G,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),W,j,H,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[Y]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[gn,a(c)])]),n("li",null,[n("a",fn,[_n,a(c)])]),n("li",null,[n("a",hn,[wn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br"),n("span",{class:"line-number"},"17"),n("br"),n("span",{class:"line-number"},"18"),n("br"),n("span",{class:"line-number"},"19"),n("br"),n("span",{class:"line-number"},"20"),n("br"),n("span",{class:"line-number"},"21"),n("br"),n("span",{class:"line-number"},"22"),n("br"),n("span",{class:"line-number"},"23"),n("br"),n("span",{class:"line-number"},"24"),n("br"),n("span",{class:"line-number"},"25"),n("br"),n("span",{class:"line-number"},"26"),n("br"),n("span",{class:"line-number"},"27"),n("br"),n("span",{class:"line-number"},"28"),n("br"),n("span",{class:"line-number"},"29"),n("br"),n("span",{class:"line-number"},"30"),n("br"),n("span",{class:"line-number"},"31"),n("br"),n("span",{class:"line-number"},"32"),n("br"),n("span",{class:"line-number"},"33"),n("br"),n("span",{class:"line-number"},"34"),n("br"),n("span",{class:"line-number"},"35"),n("br"),n("span",{class:"line-number"},"36"),n("br"),n("span",{class:"line-number"},"37"),n("br"),n("span",{class:"line-number"},"38"),n("br"),n("span",{class:"line-number"},"39"),n("br"),n("span",{class:"line-number"},"40"),n("br"),n("span",{class:"line-number"},"41"),n("br"),n("span",{class:"line-number"},"42"),n("br")])],-1),ln=n("h2",{id:"ressourcen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ressourcen","aria-hidden":"true"},"#"),s(" Ressourcen")],-1),un={href:"https://borsh.io/",target:"_blank",rel:"noopener noreferrer"},rn=s("Borsh Specification"),kn={href:"https://github.com/near/borsh-rs",target:"_blank",rel:"noopener noreferrer"},bn=s("Rust Borsh"),mn={href:"https://github.com/near/borsh-js",target:"_blank",rel:"noopener noreferrer"},dn=s("TS/JS Borsh"),yn={href:"https://github.com/near/borsh-construct-py",target:"_blank",rel:"noopener noreferrer"},gn=s("Python Borsh"),fn={href:"https://near.github.io/borsh-construct-py/",target:"_blank",rel:"noopener noreferrer"},_n=s("Python Borsh Documentation"),hn={href:"https://github.com/hashblock/solana-cli-program-template",target:"_blank",rel:"noopener noreferrer"},wn=s("Solana CLI Program Template2");function Sn(vn,zn){const e=l("CodeGroupItem"),o=l("CodeGroup"),c=l("ExternalLinkIcon");return r(),i(k,null,[g,a(o,null,{default:t(()=>[a(e,{title:"Program"},{default:t(()=>[f]),_:1}),a(e,{title:"Rust Client",active:""},{default:t(()=>[_]),_:1}),a(e,{title:"Node Client",active:""},{default:t(()=>[h]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[w]),_:1})]),_:1}),S,a(o,null,{default:t(()=>[a(e,{title:"TS Client",active:""},{default:t(()=>[v]),_:1}),a(e,{title:"Python Client",active:""},{default:t(()=>[z]),_:1}),a(e,{title:"Rust Client"},{default:t(()=>[T]),_:1})]),_:1}),P,A,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[C]),_:1})]),_:1}),E,n("p",null,[B,n("a",x,[I,a(c)]),R]),O,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[D]),_:1})]),_:1}),M,a(o,null,{default:t(()=>[a(e,{title:"Rust Program"},{default:t(()=>[N]),_:1})]),_:1}),K,U,G,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[F]),_:1})]),_:1}),V,a(o,null,{default:t(()=>[a(e,{title:"Rust"},{default:t(()=>[L]),_:1})]),_:1}),W,j,H,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[q]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[Y]),_:1}),a(e,{title:"Rust"},{default:t(()=>[X]),_:1})]),_:1}),Z,J,Q,$,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[nn]),_:1}),a(e,{title:"Python",active:""},{default:t(()=>[sn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[an]),_:1})]),_:1}),tn,en,on,a(o,null,{default:t(()=>[a(e,{title:"TS",active:""},{default:t(()=>[cn]),_:1}),a(e,{title:"Rust"},{default:t(()=>[pn]),_:1})]),_:1}),ln,n("ul",null,[n("li",null,[n("a",un,[rn,a(c)])]),n("li",null,[n("a",kn,[bn,a(c)])]),n("li",null,[n("a",mn,[dn,a(c)])]),n("li",null,[n("a",yn,[gn,a(c)])]),n("li",null,[n("a",fn,[_n,a(c)])]),n("li",null,[n("a",hn,[wn,a(c)])])])],64)}var Pn=u(y,[["render",Sn]]);export{Pn as default}; diff --git a/docs/.vuepress/dist/assets/staking.html.122e3dd7.js b/docs/.vuepress/dist/assets/staking.html.04132c3e.js similarity index 99% rename from docs/.vuepress/dist/assets/staking.html.122e3dd7.js rename to docs/.vuepress/dist/assets/staking.html.04132c3e.js index 61ff8fd3a..caf69ebe0 100644 --- a/docs/.vuepress/dist/assets/staking.html.122e3dd7.js +++ b/docs/.vuepress/dist/assets/staking.html.04132c3e.js @@ -1,4 +1,4 @@ -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},w=n("h1",{id:"\u30B9\u30C6\u30FC\u30AD\u30F3\u30AF\u3099",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30B9\u30C6\u30FC\u30AD\u30F3\u30AF\u3099","aria-hidden":"true"},"#"),s(" \u30B9\u30C6\u30FC\u30AD\u30F3\u30B0")],-1),g=n("h2",{id:"\u73FE\u5728\u306E\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u3092\u53D6\u5F97",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u73FE\u5728\u306E\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u3092\u53D6\u5F97","aria-hidden":"true"},"#"),s(" \u73FE\u5728\u306E\u30D0\u30EA\u30C7\u30FC\u30BF\u3092\u53D6\u5F97")],-1),y=n("p",null,"SOL\u3092\u30B9\u30C6\u30FC\u30AF\u3057\u3066\u3001\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306E\u5B89\u5168\u3092\u78BA\u4FDD\u3059\u308B\u305F\u3081\u306E\u5831\u916C\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30B9\u30C6\u30FC\u30AF\u3059\u308B\u306B\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u51E6\u7406\u3059\u308B\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306BSOL\u3092\u59D4\u4EFB\u3057\u307E\u3059\u3002",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},w=n("h1",{id:"\u30B9\u30C6\u30FC\u30AD\u30F3\u30AF\u3099",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u30B9\u30C6\u30FC\u30AD\u30F3\u30AF\u3099","aria-hidden":"true"},"#"),s(" \u30B9\u30C6\u30FC\u30AD\u30F3\u30B0")],-1),g=n("h2",{id:"\u73FE\u5728\u306E\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u3092\u53D6\u5F97",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u73FE\u5728\u306E\u30CF\u3099\u30EA\u30C6\u3099\u30FC\u30BF\u3092\u53D6\u5F97","aria-hidden":"true"},"#"),s(" \u73FE\u5728\u306E\u30D0\u30EA\u30C7\u30FC\u30BF\u3092\u53D6\u5F97")],-1),y=n("p",null,"SOL\u3092\u30B9\u30C6\u30FC\u30AF\u3057\u3066\u3001\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306E\u5B89\u5168\u3092\u78BA\u4FDD\u3059\u308B\u305F\u3081\u306E\u5831\u916C\u3092\u5F97\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u30B9\u30C6\u30FC\u30AF\u3059\u308B\u306B\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u51E6\u7406\u3059\u308B\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306BSOL\u3092\u59D4\u4EFB\u3057\u307E\u3059\u3002",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(` `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(` `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(` diff --git a/docs/.vuepress/dist/assets/staking.html.bbc62dff.js b/docs/.vuepress/dist/assets/staking.html.153d21d5.js similarity index 99% rename from docs/.vuepress/dist/assets/staking.html.bbc62dff.js rename to docs/.vuepress/dist/assets/staking.html.153d21d5.js index 0096a81cb..77a5705bb 100644 --- a/docs/.vuepress/dist/assets/staking.html.bbc62dff.js +++ b/docs/.vuepress/dist/assets/staking.html.153d21d5.js @@ -1,4 +1,4 @@ -import{_ as l,r as o,o as u,c as i,a,b as s,w as c,F as r,e,d as n}from"./app.07ce7a66.js";const k={},b=e(`

    Staking (Stake Etme)

    Get Current Validators (Ge\xE7erli Validator\u2019lar\u0131 Getirme)

    SOL'u stake edebilir ve a\u011F\u0131n g\xFCvenli\u011Fini sa\u011Flamaya yard\u0131mc\u0131 oldu\u011Fumuz i\xE7in \xF6d\xFCller kazanabiliriz. Stake etmek i\xE7in, SOL'u s\u0131rayla i\u015Flemleri i\u015Fleyen validator\u2019lara devrederiz.

    import { clusterApiUrl, Connection } from "@solana/web3.js";
    +import{_ as l,r as o,o as u,c as i,a,b as s,w as c,F as r,e,d as n}from"./app.d411e3b3.js";const k={},b=e(`

    Staking (Stake Etme)

    Get Current Validators (Ge\xE7erli Validator\u2019lar\u0131 Getirme)

    SOL'u stake edebilir ve a\u011F\u0131n g\xFCvenli\u011Fini sa\u011Flamaya yard\u0131mc\u0131 oldu\u011Fumuz i\xE7in \xF6d\xFCller kazanabiliriz. Stake etmek i\xE7in, SOL'u s\u0131rayla i\u015Flemleri i\u015Fleyen validator\u2019lara devrederiz.

    import { clusterApiUrl, Connection } from "@solana/web3.js";
     
     (async () => {
       const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    diff --git a/docs/.vuepress/dist/assets/staking.html.4f958a15.js b/docs/.vuepress/dist/assets/staking.html.35f01019.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.4f958a15.js
    rename to docs/.vuepress/dist/assets/staking.html.35f01019.js
    index fe322a8b2..b21f37692 100644
    --- a/docs/.vuepress/dist/assets/staking.html.4f958a15.js
    +++ b/docs/.vuepress/dist/assets/staking.html.35f01019.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"pagtataya",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagtataya","aria-hidden":"true"},"#"),s(" Pagtataya")],-1),w=n("h2",{id:"kumuha-ng-mga-kasalukuyang-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#kumuha-ng-mga-kasalukuyang-validator","aria-hidden":"true"},"#"),s(" Kumuha ng Mga Kasalukuyang Validator")],-1),y=n("p",null,"Maaari nating i-stake ang SOL at makakuha ng mga reward para sa pagtulong sa pag-secure ng network. Para i-stake, itinatalaga namin ang SOL sa mga validator na nagpoproseso naman ng mga transaksyon.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"pagtataya",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pagtataya","aria-hidden":"true"},"#"),s(" Pagtataya")],-1),w=n("h2",{id:"kumuha-ng-mga-kasalukuyang-validator",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#kumuha-ng-mga-kasalukuyang-validator","aria-hidden":"true"},"#"),s(" Kumuha ng Mga Kasalukuyang Validator")],-1),y=n("p",null,"Maaari nating i-stake ang SOL at makakuha ng mga reward para sa pagtulong sa pag-secure ng network. Para i-stake, itinatalaga namin ang SOL sa mga validator na nagpoproseso naman ng mga transaksyon.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.a5ae14b2.js b/docs/.vuepress/dist/assets/staking.html.42ce08fa.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.a5ae14b2.js
    rename to docs/.vuepress/dist/assets/staking.html.42ce08fa.js
    index 4fb10c6da..0b8fb0a2e 100644
    --- a/docs/.vuepress/dist/assets/staking.html.a5ae14b2.js
    +++ b/docs/.vuepress/dist/assets/staking.html.42ce08fa.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as c,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"\u8CEA\u62BC",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CEA\u62BC","aria-hidden":"true"},"#"),s(" \u8CEA\u62BC")],-1),w=n("h2",{id:"\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668","aria-hidden":"true"},"#"),s(" \u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668")],-1),y=n("p",null,"\u6211\u5011\u53EF\u4EE5\u8CEA\u62BC SOL \u4E26\u901A\u904E\u5E6B\u52A9\u4FDD\u8B77\u7DB2\u7D61\u4F86\u7372\u5F97\u734E\u52F5\u3002\u8981\u9032\u884C\u8CEA\u62BC\uFF0C\u6211\u5011\u5C07 SOL \u59D4\u8A17\u7D66\u9A57\u8B49\u5668\uFF0C\u800C\u9A57\u8B49\u5668\u5247\u8655\u7406\u4EA4\u6613\u3002",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as c,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"\u8CEA\u62BC",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8CEA\u62BC","aria-hidden":"true"},"#"),s(" \u8CEA\u62BC")],-1),w=n("h2",{id:"\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668","aria-hidden":"true"},"#"),s(" \u7372\u53D6\u7576\u524D\u9A57\u8B49\u5668")],-1),y=n("p",null,"\u6211\u5011\u53EF\u4EE5\u8CEA\u62BC SOL \u4E26\u901A\u904E\u5E6B\u52A9\u4FDD\u8B77\u7DB2\u7D61\u4F86\u7372\u5F97\u734E\u52F5\u3002\u8981\u9032\u884C\u8CEA\u62BC\uFF0C\u6211\u5011\u5C07 SOL \u59D4\u8A17\u7D66\u9A57\u8B49\u5668\uFF0C\u800C\u9A57\u8B49\u5668\u5247\u8655\u7406\u4EA4\u6613\u3002",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.8f95d604.js b/docs/.vuepress/dist/assets/staking.html.4592916e.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.8f95d604.js
    rename to docs/.vuepress/dist/assets/staking.html.4592916e.js
    index 28a37a989..28547d30b 100644
    --- a/docs/.vuepress/dist/assets/staking.html.8f95d604.js
    +++ b/docs/.vuepress/dist/assets/staking.html.4592916e.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"obtenir-les-validateurs-actuels",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtenir-les-validateurs-actuels","aria-hidden":"true"},"#"),s(" Obtenir les Validateurs Actuels")],-1),y=n("p",null,"Il est possible de staker des SOL et d'obtenir des r\xE9compenses en aidant \xE0 s\xE9curiser le r\xE9seau. Pour staker, nous d\xE9l\xE9guons les SOL \xE0 des validateurs qui, \xE0 leur tour, traitent les transactions.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"obtenir-les-validateurs-actuels",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtenir-les-validateurs-actuels","aria-hidden":"true"},"#"),s(" Obtenir les Validateurs Actuels")],-1),y=n("p",null,"Il est possible de staker des SOL et d'obtenir des r\xE9compenses en aidant \xE0 s\xE9curiser le r\xE9seau. Pour staker, nous d\xE9l\xE9guons les SOL \xE0 des validateurs qui, \xE0 leur tour, traitent les transactions.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.f374e09a.js b/docs/.vuepress/dist/assets/staking.html.4daf843b.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.f374e09a.js
    rename to docs/.vuepress/dist/assets/staking.html.4daf843b.js
    index 6525a58dd..d4932add6 100644
    --- a/docs/.vuepress/dist/assets/staking.html.f374e09a.js
    +++ b/docs/.vuepress/dist/assets/staking.html.4daf843b.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as c,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"\u8D28\u62BC",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D28\u62BC","aria-hidden":"true"},"#"),s(" \u8D28\u62BC")],-1),w=n("h2",{id:"\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668","aria-hidden":"true"},"#"),s(" \u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668")],-1),y=n("p",null,"\u6211\u4EEC\u53EF\u4EE5\u8D28\u62BC SOL \u5E76\u901A\u8FC7\u5E2E\u52A9\u4FDD\u62A4\u7F51\u7EDC\u6765\u83B7\u5F97\u5956\u52B1\u3002\u8981\u8FDB\u884C\u8D28\u62BC\uFF0C\u6211\u4EEC\u5C06 SOL \u59D4\u6258\u7ED9\u9A8C\u8BC1\u5668\uFF0C\u800C\u9A8C\u8BC1\u5668\u5219\u5904\u7406\u4EA4\u6613\u3002",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as c,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"\u8D28\u62BC",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u8D28\u62BC","aria-hidden":"true"},"#"),s(" \u8D28\u62BC")],-1),w=n("h2",{id:"\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668","aria-hidden":"true"},"#"),s(" \u83B7\u53D6\u5F53\u524D\u9A8C\u8BC1\u5668")],-1),y=n("p",null,"\u6211\u4EEC\u53EF\u4EE5\u8D28\u62BC SOL \u5E76\u901A\u8FC7\u5E2E\u52A9\u4FDD\u62A4\u7F51\u7EDC\u6765\u83B7\u5F97\u5956\u52B1\u3002\u8981\u8FDB\u884C\u8D28\u62BC\uFF0C\u6211\u4EEC\u5C06 SOL \u59D4\u6258\u7ED9\u9A8C\u8BC1\u5668\uFF0C\u800C\u9A8C\u8BC1\u5668\u5219\u5904\u7406\u4EA4\u6613\u3002",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.48d1bd77.js b/docs/.vuepress/dist/assets/staking.html.4f2175bc.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.48d1bd77.js
    rename to docs/.vuepress/dist/assets/staking.html.4f2175bc.js
    index 34ff5e51a..d91f86fc3 100644
    --- a/docs/.vuepress/dist/assets/staking.html.48d1bd77.js
    +++ b/docs/.vuepress/dist/assets/staking.html.4f2175bc.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as c,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"get-current-validators",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-current-validators","aria-hidden":"true"},"#"),s(" Get Current Validators")],-1),y=n("p",null,"We can stake SOL and earn rewards for helping secure the network. To stake, we delegate SOL to validators who in turn process transactions.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as c,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"get-current-validators",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-current-validators","aria-hidden":"true"},"#"),s(" Get Current Validators")],-1),y=n("p",null,"We can stake SOL and earn rewards for helping secure the network. To stake, we delegate SOL to validators who in turn process transactions.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.04e151a8.js b/docs/.vuepress/dist/assets/staking.html.631b26d4.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.04e151a8.js
    rename to docs/.vuepress/dist/assets/staking.html.631b26d4.js
    index 6ebc6e6d0..83f5341c5 100644
    --- a/docs/.vuepress/dist/assets/staking.html.04e151a8.js
    +++ b/docs/.vuepress/dist/assets/staking.html.631b26d4.js
    @@ -1,4 +1,4 @@
    -import{_ as l,r as o,o as u,c as i,a as s,b as a,w as c,F as r,e as p,d as n}from"./app.07ce7a66.js";const k={},b=p(`

    Staking

    Mendapatkan Validators

    Kita bisa stake SOL dan mendapatkan rewards dari membantu menjaga keamanan network. Untuk melakukan staking, kita mendelegasi SOL kepada para validator yang selanjutnya memproses transaksi.

    import { clusterApiUrl, Connection } from "@solana/web3.js";
    +import{_ as l,r as o,o as u,c as i,a as s,b as a,w as c,F as r,e as p,d as n}from"./app.d411e3b3.js";const k={},b=p(`

    Staking

    Mendapatkan Validators

    Kita bisa stake SOL dan mendapatkan rewards dari membantu menjaga keamanan network. Untuk melakukan staking, kita mendelegasi SOL kepada para validator yang selanjutnya memproses transaksi.

    import { clusterApiUrl, Connection } from "@solana/web3.js";
     
     (async () => {
       const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    diff --git a/docs/.vuepress/dist/assets/staking.html.0fd3c3b6.js b/docs/.vuepress/dist/assets/staking.html.91c6a606.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.0fd3c3b6.js
    rename to docs/.vuepress/dist/assets/staking.html.91c6a606.js
    index 4fed8b860..57f9537d2 100644
    --- a/docs/.vuepress/dist/assets/staking.html.0fd3c3b6.js
    +++ b/docs/.vuepress/dist/assets/staking.html.91c6a606.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},w=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),g=n("h2",{id:"\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-validators-\u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-validators-\u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19","aria-hidden":"true"},"#"),s(" \u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Validators \u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19")],-1),y=n("p",null,"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 stake SOL \u0E41\u0E25\u0E30\u0E23\u0E31\u0E1A rewards \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E0A\u0E48\u0E27\u0E22\u0E43\u0E2B\u0E49 network \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E1B\u0E25\u0E2D\u0E14\u0E20\u0E31\u0E22\u0E21\u0E32\u0E01\u0E02\u0E36\u0E49\u0E19 \u0E43\u0E19\u0E01\u0E32\u0E23 stake \u0E40\u0E23\u0E32\u0E08\u0E30 delegate SOL \u0E44\u0E1B\u0E17\u0E35\u0E48 validators \u0E17\u0E35\u0E48\u0E21\u0E35\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transactions",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},w=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),g=n("h2",{id:"\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-validators-\u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25-validators-\u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19","aria-hidden":"true"},"#"),s(" \u0E2B\u0E32\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 Validators \u0E43\u0E19\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19")],-1),y=n("p",null,"\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 stake SOL \u0E41\u0E25\u0E30\u0E23\u0E31\u0E1A rewards \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E0A\u0E48\u0E27\u0E22\u0E43\u0E2B\u0E49 network \u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E1B\u0E25\u0E2D\u0E14\u0E20\u0E31\u0E22\u0E21\u0E32\u0E01\u0E02\u0E36\u0E49\u0E19 \u0E43\u0E19\u0E01\u0E32\u0E23 stake \u0E40\u0E23\u0E32\u0E08\u0E30 delegate SOL \u0E44\u0E1B\u0E17\u0E35\u0E48 validators \u0E17\u0E35\u0E48\u0E21\u0E35\u0E2B\u0E19\u0E49\u0E32\u0E17\u0E35\u0E48\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transactions",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.79740434.js b/docs/.vuepress/dist/assets/staking.html.9cd0f2f1.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.79740434.js
    rename to docs/.vuepress/dist/assets/staking.html.9cd0f2f1.js
    index 64f817ef4..269c03c20 100644
    --- a/docs/.vuepress/dist/assets/staking.html.79740434.js
    +++ b/docs/.vuepress/dist/assets/staking.html.9cd0f2f1.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"obter-validadores-atuais",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obter-validadores-atuais","aria-hidden":"true"},"#"),s(" Obter Validadores Atuais")],-1),y=n("p",null,"Podemos fazer staking de SOL e ganhar recompensas por ajudar a proteger a rede. Para fazer staking, delegamos SOL a validadores que, por sua vez, processam transa\xE7\xF5es.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"obter-validadores-atuais",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obter-validadores-atuais","aria-hidden":"true"},"#"),s(" Obter Validadores Atuais")],-1),y=n("p",null,"Podemos fazer staking de SOL e ganhar recompensas por ajudar a proteger a rede. Para fazer staking, delegamos SOL a validadores que, por sua vez, processam transa\xE7\xF5es.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.6485c86f.js b/docs/.vuepress/dist/assets/staking.html.9cf17bbb.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.6485c86f.js
    rename to docs/.vuepress/dist/assets/staking.html.9cf17bbb.js
    index f4256dbe3..5350ed5f6 100644
    --- a/docs/.vuepress/dist/assets/staking.html.6485c86f.js
    +++ b/docs/.vuepress/dist/assets/staking.html.9cf17bbb.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"obtener-los-validadores-actuales",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtener-los-validadores-actuales","aria-hidden":"true"},"#"),s(" Obtener los validadores actuales")],-1),y=n("p",null,"Podemos hacer stake de SOL y ganar recompensas por ayudar a asegurar la red. Para hacer stake, delegamos SOL a validadores que a su vez procesan transacciones.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"obtener-los-validadores-actuales",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#obtener-los-validadores-actuales","aria-hidden":"true"},"#"),s(" Obtener los validadores actuales")],-1),y=n("p",null,"Podemos hacer stake de SOL y ganar recompensas por ayudar a asegurar la red. Para hacer stake, delegamos SOL a validadores que a su vez procesan transacciones.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.9a3a894a.js b/docs/.vuepress/dist/assets/staking.html.bb8a6029.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.9a3a894a.js
    rename to docs/.vuepress/dist/assets/staking.html.bb8a6029.js
    index dd515617d..0f7799086 100644
    --- a/docs/.vuepress/dist/assets/staking.html.9a3a894a.js
    +++ b/docs/.vuepress/dist/assets/staking.html.bb8a6029.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},w=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),g=n("h2",{id:"get-current-validators",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-current-validators","aria-hidden":"true"},"#"),s(" Get Current Validators")],-1),y=n("p",null,"\uC6B0\uB9AC\uB294 \uB124\uD2B8\uC6CC\uD06C\uB97C \uC548\uC815\uC801\uC73C\uB85C \uD655\uBCF4\uD558\uB294 \uAC83\uC744 \uB3D5\uAE30 \uC704\uD574 SOL\uC744 \uC2A4\uD14C\uC774\uD0B9\uD560 \uC218 \uC788\uACE0 \uBCF4\uC131\uC744 \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC2A4\uD14C\uC774\uD0B9\uC744 \uC704\uD574\uC11C \uC6B0\uB9AC\uB294 \uCC28\uB840\uB85C transaction\uB4E4\uC744 \uCC98\uB9AC\uD558\uB294 validator\uB4E4\uC5D0\uAC8C SOL\uC744 \uC704\uC784\uD574\uC57C \uD569\uB2C8\uB2E4.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},w=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),g=n("h2",{id:"get-current-validators",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#get-current-validators","aria-hidden":"true"},"#"),s(" Get Current Validators")],-1),y=n("p",null,"\uC6B0\uB9AC\uB294 \uB124\uD2B8\uC6CC\uD06C\uB97C \uC548\uC815\uC801\uC73C\uB85C \uD655\uBCF4\uD558\uB294 \uAC83\uC744 \uB3D5\uAE30 \uC704\uD574 SOL\uC744 \uC2A4\uD14C\uC774\uD0B9\uD560 \uC218 \uC788\uACE0 \uBCF4\uC131\uC744 \uC5BB\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uC2A4\uD14C\uC774\uD0B9\uC744 \uC704\uD574\uC11C \uC6B0\uB9AC\uB294 \uCC28\uB840\uB85C transaction\uB4E4\uC744 \uCC98\uB9AC\uD558\uB294 validator\uB4E4\uC5D0\uAC8C SOL\uC744 \uC704\uC784\uD574\uC57C \uD569\uB2C8\uB2E4.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.59211856.js b/docs/.vuepress/dist/assets/staking.html.e3f01f71.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.59211856.js
    rename to docs/.vuepress/dist/assets/staking.html.e3f01f71.js
    index 28498a087..0edeeff90 100644
    --- a/docs/.vuepress/dist/assets/staking.html.59211856.js
    +++ b/docs/.vuepress/dist/assets/staking.html.e3f01f71.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"truy-van-danh-sach-validators-hien-tai",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#truy-van-danh-sach-validators-hien-tai","aria-hidden":"true"},"#"),s(" Truy v\u1EA5n danh s\xE1ch Validators hi\u1EC7n t\u1EA1i")],-1),y=n("p",null,"Ch\xFAng ta c\xF3 th\u1EC3 stake SOL v\xE0 ki\u1EBFm ph\u1EA7n th\u01B0\u1EDFng cho vi\u1EC7c n\xE2ng cao an to\xE0n m\u1EA1ng l\u01B0\u1EDBi. \u0110\u1EC3 stake, b\u1EA1n ph\u1EA3i u\u1EF7 quy\u1EC1n SOL c\xF3 c\xE1c validators ng\u01B0\u1EDDi s\u1EBD th\u1EF1c hi\u1EC7n vi\u1EC7c x\u1EED l\xFD c\xE1c giao d\u1ECBch.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),w=n("h2",{id:"truy-van-danh-sach-validators-hien-tai",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#truy-van-danh-sach-validators-hien-tai","aria-hidden":"true"},"#"),s(" Truy v\u1EA5n danh s\xE1ch Validators hi\u1EC7n t\u1EA1i")],-1),y=n("p",null,"Ch\xFAng ta c\xF3 th\u1EC3 stake SOL v\xE0 ki\u1EBFm ph\u1EA7n th\u01B0\u1EDFng cho vi\u1EC7c n\xE2ng cao an to\xE0n m\u1EA1ng l\u01B0\u1EDBi. \u0110\u1EC3 stake, b\u1EA1n ph\u1EA3i u\u1EF7 quy\u1EC1n SOL c\xF3 c\xE1c validators ng\u01B0\u1EDDi s\u1EBD th\u1EF1c hi\u1EC7n vi\u1EC7c x\u1EED l\xFD c\xE1c giao d\u1ECBch.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/staking.html.420a515f.js b/docs/.vuepress/dist/assets/staking.html.f1bc25a4.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/staking.html.420a515f.js
    rename to docs/.vuepress/dist/assets/staking.html.f1bc25a4.js
    index 4bd16726c..cfbeadbaf 100644
    --- a/docs/.vuepress/dist/assets/staking.html.420a515f.js
    +++ b/docs/.vuepress/dist/assets/staking.html.f1bc25a4.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.07ce7a66.js";const d={},w=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),g=n("h2",{id:"holen-sie-sich-aktuelle-validatoren",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#holen-sie-sich-aktuelle-validatoren","aria-hidden":"true"},"#"),s(" Holen Sie sich aktuelle Validatoren")],-1),y=n("p",null,"Wir k\xF6nnen SOL einsetzen und Belohnungen verdienen, wenn wir helfen, das Netzwerk zu sichern. Zum Abstecken delegieren wir SOL an Validatoren, die wiederum Transaktionen verarbeiten.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
    +import{_ as r,r as e,o as k,c as b,b as t,w as a,a as n,F as m,d as s}from"./app.d411e3b3.js";const d={},w=n("h1",{id:"staking",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#staking","aria-hidden":"true"},"#"),s(" Staking")],-1),g=n("h2",{id:"holen-sie-sich-aktuelle-validatoren",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#holen-sie-sich-aktuelle-validatoren","aria-hidden":"true"},"#"),s(" Holen Sie sich aktuelle Validatoren")],-1),y=n("p",null,"Wir k\xF6nnen SOL einsetzen und Belohnungen verdienen, wenn wir helfen, das Netzwerk zu sichern. Zum Abstecken delegieren wir SOL an Validatoren, die wiederum Transaktionen verarbeiten.",-1),h=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(" clusterApiUrl"),n("span",{class:"token punctuation"},","),s(" Connection "),n("span",{class:"token punctuation"},"}"),s(),n("span",{class:"token keyword"},"from"),s(),n("span",{class:"token string"},'"@solana/web3.js"'),n("span",{class:"token punctuation"},";"),s(`
     
     `),n("span",{class:"token punctuation"},"("),n("span",{class:"token keyword"},"async"),s(),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),s(),n("span",{class:"token operator"},"=>"),s(),n("span",{class:"token punctuation"},"{"),s(`
       `),n("span",{class:"token keyword"},"const"),s(" connection "),n("span",{class:"token operator"},"="),s(),n("span",{class:"token keyword"},"new"),s(),n("span",{class:"token class-name"},"Connection"),n("span",{class:"token punctuation"},"("),n("span",{class:"token function"},"clusterApiUrl"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'"devnet"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},","),s(),n("span",{class:"token string"},'"confirmed"'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    diff --git a/docs/.vuepress/dist/assets/store-sol-in-pda.html.c79c00ec.js b/docs/.vuepress/dist/assets/store-sol-in-pda.html.149b88b0.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/store-sol-in-pda.html.c79c00ec.js
    rename to docs/.vuepress/dist/assets/store-sol-in-pda.html.149b88b0.js
    index 20a4912f0..ac7168b7a 100644
    --- a/docs/.vuepress/dist/assets/store-sol-in-pda.html.c79c00ec.js
    +++ b/docs/.vuepress/dist/assets/store-sol-in-pda.html.149b88b0.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as s,e as t}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"stockage-de-sol-dans-des-pdas-pour-recompenser-les-joueurs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#stockage-de-sol-dans-des-pdas-pour-recompenser-les-joueurs","aria-hidden":"true"},"#"),s(" Stockage de SOL dans des PDAs pour r\xE9compenser les joueurs")],-1),k=n("p",null,"Guide Vid\xE9o:",-1),m=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/gILXyWvXu7M",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),b=n("p",null,"Version Live. (utilisez le devnet)",-1),d=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventureTwo/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
    +import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as s,e as t}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"stockage-de-sol-dans-des-pdas-pour-recompenser-les-joueurs",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#stockage-de-sol-dans-des-pdas-pour-recompenser-les-joueurs","aria-hidden":"true"},"#"),s(" Stockage de SOL dans des PDAs pour r\xE9compenser les joueurs")],-1),k=n("p",null,"Guide Vid\xE9o:",-1),m=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/gILXyWvXu7M",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),b=n("p",null,"Version Live. (utilisez le devnet)",-1),d=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventureTwo/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
     `,-1),g=t('

    Programme Anchor Tiny Adventure - Deuxi\xE8me Partie

    Dans ce tutoriel, nous allons recr\xE9er le jeu Tiny Adventure et introduire un coffre qui contient une r\xE9compense de 0,1 SOL. Le coffre "appara\xEEtra" \xE0 un endroit pr\xE9cis, et lorsque le joueur l'atteindra, il recevra la r\xE9compense. L'objectif de ce programme est de montrer comment stocker des SOL dans un compte de programme et le distribuer aux joueurs

    Le programme Tiny Adventure Two se compose de trois instructions :

    • initialize_level_one - Cette instruction initialise deux comptes sur la cha\xEEne : l'un pour stocker la position du joueur et l'autre pour conserver la r\xE9compense en SOL qui repr\xE9sente le "coffre \xE0 r\xE9compenses".
    • reset_level_and_spawn_chest - Cette instruction remet la position du joueur \xE0 z\xE9ro et fait r\xE9appara\xEEtre un coffre \xE0 r\xE9compense en transf\xE9rant des SOL depuis le portefeuille de l'utilisateur invoquant l'instruction vers le compte du coffre \xE0 r\xE9compense.
    • move_right - Cette instruction permet au joueur de se d\xE9placer vers la droite et de collecter les SOL dans le coffre \xE0 r\xE9compense une fois qu'il a atteint une position sp\xE9cifique.
    ',4),y=s("Dans les sections suivantes, nous vous guiderons pas \xE0 pas dans l'\xE9laboration du programme. Vous pouvez trouver le code source complet, qui peut \xEAtre d\xE9ploy\xE9 directement depuis votre navigateur en utilisant le Solana Playground, \xE0 ce lien : "),f={href:"https://beta.solpg.io/tutorials/tiny-adventure-two",target:"_blank",rel:"noopener noreferrer"},_=s("Ouvrir Dans Playground"),h=s("."),w=n("h3",{id:"pour-commencer",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pour-commencer","aria-hidden":"true"},"#"),s(" Pour commencer")],-1),v=n("p",null,"Pour commencer \xE0 cr\xE9er le jeu Tiny Adventure, suivez les \xE9tapes suivantes :",-1),q=s("Visitez le "),A={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},S=s("Solana Playground"),x=s(" et cr\xE9ez un nouveau projet Anchor. Si vous \xEAtes nouveau sur Solana Playground, vous devrez \xE9galement cr\xE9er un portefeuille Playground."),L=t(`

    Apr\xE8s avoir cr\xE9\xE9 un nouveau projet, remplacez le code par d\xE9faut par le code ci-dessous :

    use anchor_lang::prelude::*;
     use anchor_lang::solana_program::native_token::LAMPORTS_PER_SOL;
     use anchor_lang::system_program;
    diff --git a/docs/.vuepress/dist/assets/store-sol-in-pda.html.11610e9c.js b/docs/.vuepress/dist/assets/store-sol-in-pda.html.85b3fbd8.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/store-sol-in-pda.html.11610e9c.js
    rename to docs/.vuepress/dist/assets/store-sol-in-pda.html.85b3fbd8.js
    index cf1500dfa..f8fb85cfd 100644
    --- a/docs/.vuepress/dist/assets/store-sol-in-pda.html.11610e9c.js
    +++ b/docs/.vuepress/dist/assets/store-sol-in-pda.html.85b3fbd8.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as a,e as t}from"./app.07ce7a66.js";const i={},r=n("h1",{id:"pag-iimbak-ng-sol-sa-mga-pda-para-sa-mga-gantimpala-sa-laro",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pag-iimbak-ng-sol-sa-mga-pda-para-sa-mga-gantimpala-sa-laro","aria-hidden":"true"},"#"),a(" Pag-iimbak ng SOL sa mga PDA para sa Mga Gantimpala sa Laro")],-1),k=n("p",null,"Walkthrough ng Video:",-1),m=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/gILXyWvXu7M",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),b=n("p",null,"Live na Bersyon. (gamitin ang devnet)",-1),g=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventureTwo/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
    +import{_ as e,r as o,o as c,c as l,a as n,b as p,F as u,d as a,e as t}from"./app.d411e3b3.js";const i={},r=n("h1",{id:"pag-iimbak-ng-sol-sa-mga-pda-para-sa-mga-gantimpala-sa-laro",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#pag-iimbak-ng-sol-sa-mga-pda-para-sa-mga-gantimpala-sa-laro","aria-hidden":"true"},"#"),a(" Pag-iimbak ng SOL sa mga PDA para sa Mga Gantimpala sa Laro")],-1),k=n("p",null,"Walkthrough ng Video:",-1),m=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/gILXyWvXu7M",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),b=n("p",null,"Live na Bersyon. (gamitin ang devnet)",-1),g=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventureTwo/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
     `,-1),d=t('

    Tiny Adventure Anchor Program - Ikalawang Bahagi

    Sa tutorial na ito, bubuuin namin ang larong Tiny Adventure at magpapakilala ng chest na may reward na 0.1 SOL. Ang dibdib ay "spawn" sa isang partikular na posisyon, at kapag naabot ng manlalaro ang posisyon na iyon, makakatanggap sila ng gantimpala. Ang layunin ng programang ito ay ipakita kung paano mag-imbak ng SOL sa loob ng isang account ng programa at ipamahagi ito sa mga manlalaro.

    Ang Tiny Adventure Two Program ay binubuo ng 3 instruction:

    • initialize_level_one - Ang instruction na ito ay nagpapasimula ng dalawang on-chain na account: isa para sa pag-record ng posisyon ng player at isa pa para sa paghawak ng SOL reward na kumakatawan sa "reward chest".
    • reset_level_and_spawn_chest - Nire-reset ng instruction na ito ang posisyon ng player sa zero at "re-respawn" ang isang reward chest sa pamamagitan ng paglilipat ng SOL mula sa user na gumagamit ng instruction sa reward chest account.
    • move_right - Ang pagtuturo na ito ay nagbibigay-daan sa manlalaro na ilipat ang kanilang posisyon sa kanan at kolektahin ang SOL sa reward chest kapag naabot na nila ang isang partikular na posisyon.
    ',4),y=a("Sa mga sumusunod na seksyon, gagabayan ka namin sa pagbuo ng programa nang sunud-sunod. Mahahanap mo ang kumpletong source code, na maaaring direktang i-deploy mula sa iyong browser gamit ang Solana Playground, sa link na ito: "),h={href:"https://beta.solpg.io/tutorials/tiny-adventure-two",target:"_blank",rel:"noopener noreferrer"},w=a("Open In Playground"),_=a("."),f=n("h3",{id:"nagsisimula",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#nagsisimula","aria-hidden":"true"},"#"),a(" Nagsisimula")],-1),v=n("p",null,"Upang simulan ang pagbuo ng larong Tiny Adventure, sundin ang mga hakbang na ito:",-1),A=a("Bisitahin ang "),q={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},S=a("Solana Playground"),P=a(" at gumawa ng bagong Anchor project. Kung bago ka sa Solana Playground, kakailanganin mo ring gumawa ng Playground Wallet."),x=t(`

    Pagkatapos gumawa ng bagong proyekto, palitan ang default na starter code ng code sa ibaba:

    use anchor_lang::prelude::*;
     use anchor_lang::solana_program::native_token::LAMPORTS_PER_SOL;
     use anchor_lang::system_program;
    diff --git a/docs/.vuepress/dist/assets/store-sol-in-pda.html.e4ee6008.js b/docs/.vuepress/dist/assets/store-sol-in-pda.html.b6c6b1ad.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/store-sol-in-pda.html.e4ee6008.js
    rename to docs/.vuepress/dist/assets/store-sol-in-pda.html.b6c6b1ad.js
    index 84b279d31..61299fd4b 100644
    --- a/docs/.vuepress/dist/assets/store-sol-in-pda.html.e4ee6008.js
    +++ b/docs/.vuepress/dist/assets/store-sol-in-pda.html.b6c6b1ad.js
    @@ -1,4 +1,4 @@
    -import{_ as e,r as o,o as c,c as l,a as n,b as t,F as u,d as s,e as p}from"./app.07ce7a66.js";const r={},i=n("h1",{id:"storing-sol-in-pdas-for-game-rewards",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#storing-sol-in-pdas-for-game-rewards","aria-hidden":"true"},"#"),s(" Storing SOL in PDAs for Game Rewards")],-1),k=n("p",null,"Video Walkthrough:",-1),m=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/gILXyWvXu7M",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),b=n("p",null,"Live Version. (use devnet)",-1),d=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventureTwo/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
    +import{_ as e,r as o,o as c,c as l,a as n,b as t,F as u,d as s,e as p}from"./app.d411e3b3.js";const r={},i=n("h1",{id:"storing-sol-in-pdas-for-game-rewards",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#storing-sol-in-pdas-for-game-rewards","aria-hidden":"true"},"#"),s(" Storing SOL in PDAs for Game Rewards")],-1),k=n("p",null,"Video Walkthrough:",-1),m=n("div",{class:"video-block"},[n("iframe",{width:"320",height:"200",src:"https://www.youtube.com/embed/gILXyWvXu7M",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:""})],-1),b=n("p",null,"Live Version. (use devnet)",-1),d=n("iframe",{height:"400",scrolling:"no",title:"OZXQWp",src:"https://solplay.de/TinyAdventureTwo/index.html",frameborder:"no",allowtransparency:"true",allowfullscreen:"true",style:{width:"80%"}},`
     `,-1),h=p('

    Tiny Adventure Anchor Program - Part Two

    In this tutorial, we will rebuild the Tiny Adventure game and introduce a chest with a reward of 0.1 SOL. The chest will "spawn" at a specific position, and when the player reaches that position, they will receive the reward. The goal of this program is to demonstrate how to store SOL within a program account and distribute it to players.

    The Tiny Adventure Two Program consists of 3 instructions:

    • initialize_level_one - This instruction initializes two on-chain accounts: one for recording the player's position and another for holding the SOL reward that represents the \u201Creward chest\u201D.
    • reset_level_and_spawn_chest - This instruction resets the player's position to zero and "respawns" a reward chest by transferring SOL from the user invoking the instruction to the reward chest account.
    • move_right - This instruction allows the player to move their position to the right and collect the SOL in the reward chest once they reach a specific position.
    ',4),g=s("In the following sections, we will guide you through building the program step by step. You can find the complete source code, which can be deployed directly from your browser using the Solana Playground, at this link: "),y={href:"https://beta.solpg.io/tutorials/tiny-adventure-two",target:"_blank",rel:"noopener noreferrer"},w=s("Open In Playground"),f=s("."),_=n("h3",{id:"getting-started",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#getting-started","aria-hidden":"true"},"#"),s(" Getting Started")],-1),v=n("p",null,"To start building the Tiny Adventure game, follow these steps:",-1),A=s("Visit the "),q={href:"https://beta.solpg.io/",target:"_blank",rel:"noopener noreferrer"},S=s("Solana Playground"),x=s(" and create a new Anchor project. If you're new to Solana Playground, you'll also need to create a Playground Wallet."),L=p(`

    After creating a new project, replace the default starter code with the code below:

    use anchor_lang::prelude::*;
     use anchor_lang::solana_program::native_token::LAMPORTS_PER_SOL;
     use anchor_lang::system_program;
    diff --git a/docs/.vuepress/dist/assets/token.html.12804e59.js b/docs/.vuepress/dist/assets/token.html.0c03dc96.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.12804e59.js
    rename to docs/.vuepress/dist/assets/token.html.0c03dc96.js
    index 4a7375e31..ee947c5f8 100644
    --- a/docs/.vuepress/dist/assets/token.html.12804e59.js
    +++ b/docs/.vuepress/dist/assets/token.html.0c03dc96.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"\xBFque-necesito-para-comenzar-a-trabajar-con-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\xBFque-necesito-para-comenzar-a-trabajar-con-spl-tokens","aria-hidden":"true"},"#"),s(" \xBFQu\xE9 necesito para comenzar a trabajar con SPL-Tokens?")],-1),f=n("p",null,"Cada vez que interact\xFAas con tokens en Solana, en realidad est\xE1s interactuando con el token el programa (SPL) Token de Solana, o el est\xE1ndar SPL-Token. El est\xE1ndar SPL-Token requiere una librer\xEDa espec\xEDfica para ser utilizado, la cual puedes encontrar a continuaci\xF3n en funci\xF3n de tu lenguaje.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"\xBFque-necesito-para-comenzar-a-trabajar-con-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\xBFque-necesito-para-comenzar-a-trabajar-con-spl-tokens","aria-hidden":"true"},"#"),s(" \xBFQu\xE9 necesito para comenzar a trabajar con SPL-Tokens?")],-1),f=n("p",null,"Cada vez que interact\xFAas con tokens en Solana, en realidad est\xE1s interactuando con el token el programa (SPL) Token de Solana, o el est\xE1ndar SPL-Token. El est\xE1ndar SPL-Token requiere una librer\xEDa espec\xEDfica para ser utilizado, la cual puedes encontrar a continuaci\xF3n en funci\xF3n de tu lenguaje.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"\xBFcomo-crear-un-nuevo-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\xBFcomo-crear-un-nuevo-token","aria-hidden":"true"},"#"),s(" \xBFC\xF3mo crear un nuevo token?")],-1),h=n("p",null,'La creaci\xF3n de tokens se realiza creando lo que se llama una cuenta "mint". Esta cuenta "mint" se usa luego para acu\xF1ar (o crear y enviar) tokens a una cuenta de token y tambi\xE9n para crear el suministro inicial.',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.ea1f1398.js b/docs/.vuepress/dist/assets/token.html.24577b71.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.ea1f1398.js
    rename to docs/.vuepress/dist/assets/token.html.24577b71.js
    index 519a21cba..0ca4b95ce 100644
    --- a/docs/.vuepress/dist/assets/token.html.ea1f1398.js
    +++ b/docs/.vuepress/dist/assets/token.html.24577b71.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"apa-yang-saya-perlukan-untuk-memulai-dengan-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#apa-yang-saya-perlukan-untuk-memulai-dengan-spl-tokens","aria-hidden":"true"},"#"),s(" Apa yang saya perlukan untuk memulai dengan SPL-Tokens?")],-1),g=n("p",null,"Setiap kali anda berinteraksi dengan tokens di Solana, anda sebenarnya berinteraksi dengan Solana Program Library Token, atau SPL-Token standard. SPL-Token standard mensyaratkan sebuah library spesifik untuk digunakan, yang anda dapat temukan dibawah ini berdasarkan bahasa anda.",-1),f=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"apa-yang-saya-perlukan-untuk-memulai-dengan-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#apa-yang-saya-perlukan-untuk-memulai-dengan-spl-tokens","aria-hidden":"true"},"#"),s(" Apa yang saya perlukan untuk memulai dengan SPL-Tokens?")],-1),g=n("p",null,"Setiap kali anda berinteraksi dengan tokens di Solana, anda sebenarnya berinteraksi dengan Solana Program Library Token, atau SPL-Token standard. SPL-Token standard mensyaratkan sebuah library spesifik untuk digunakan, yang anda dapat temukan dibawah ini berdasarkan bahasa anda.",-1),f=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("h2",{id:"bagaimana-cara-untuk-membuat-sebuah-token-baru",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#bagaimana-cara-untuk-membuat-sebuah-token-baru","aria-hidden":"true"},"#"),s(" Bagaimana cara untuk membuat sebuah Token baru")],-1),h=n("p",null,'Membuat token-token didapat dengan menciptakan apa yang disebut dengan sebuah "akun mint". Akun mint ini nantinya akan digunakan untuk me-mint token-token ke sebuah akun token dan membuat supply awal.',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.edf00ffd.js b/docs/.vuepress/dist/assets/token.html.2c73b698.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.edf00ffd.js
    rename to docs/.vuepress/dist/assets/token.html.2c73b698.js
    index a16121388..d6544923e 100644
    --- a/docs/.vuepress/dist/assets/token.html.edf00ffd.js
    +++ b/docs/.vuepress/dist/assets/token.html.2c73b698.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u4EE3\u5E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u4EE3\u5E01","aria-hidden":"true"},"#"),s(" \u4EE3\u5E01")],-1),y=n("h2",{id:"\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528spl\u4EE3\u5E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528spl\u4EE3\u5E01","aria-hidden":"true"},"#"),s(" \u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528SPL\u4EE3\u5E01\uFF1F")],-1),f=n("p",null,"\u6BCF\u5F53\u4F60\u5728Solana\u4E0A\u4E0E\u4EE3\u5E01\u8FDB\u884C\u4EA4\u4E92\u65F6\uFF0C\u5B9E\u9645\u4E0A\u4F60\u6B63\u5728\u4E0ESolana\u7A0B\u5E8F\u5E93\u4EE3\u5E01\uFF08SPL-Token\uFF09\u6216SPL\u4EE3\u5E01\u6807\u51C6\u4EA4\u4E92\u3002SPL\u4EE3\u5E01\u6807\u51C6\u9700\u8981\u4F7F\u7528\u7279\u5B9A\u7684\u5E93\uFF0C\u4F60\u53EF\u4EE5\u6839\u636E\u4F60\u4F7F\u7528\u7684\u7F16\u7A0B\u8BED\u8A00\u5728\u4E0B\u9762\u627E\u5230\u76F8\u5E94\u7684\u5E93\u3002",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u4EE3\u5E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u4EE3\u5E01","aria-hidden":"true"},"#"),s(" \u4EE3\u5E01")],-1),y=n("h2",{id:"\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528spl\u4EE3\u5E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528spl\u4EE3\u5E01","aria-hidden":"true"},"#"),s(" \u6211\u9700\u8981\u4EC0\u4E48\u624D\u80FD\u5F00\u59CB\u4F7F\u7528SPL\u4EE3\u5E01\uFF1F")],-1),f=n("p",null,"\u6BCF\u5F53\u4F60\u5728Solana\u4E0A\u4E0E\u4EE3\u5E01\u8FDB\u884C\u4EA4\u4E92\u65F6\uFF0C\u5B9E\u9645\u4E0A\u4F60\u6B63\u5728\u4E0ESolana\u7A0B\u5E8F\u5E93\u4EE3\u5E01\uFF08SPL-Token\uFF09\u6216SPL\u4EE3\u5E01\u6807\u51C6\u4EA4\u4E92\u3002SPL\u4EE3\u5E01\u6807\u51C6\u9700\u8981\u4F7F\u7528\u7279\u5B9A\u7684\u5E93\uFF0C\u4F60\u53EF\u4EE5\u6839\u636E\u4F60\u4F7F\u7528\u7684\u7F16\u7A0B\u8BED\u8A00\u5728\u4E0B\u9762\u627E\u5230\u76F8\u5E94\u7684\u5E93\u3002",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u4EE3\u5E01")],-1),h=n("p",null,"\u521B\u5EFA\u4EE3\u5E01\u662F\u901A\u8FC7\u521B\u5EFA\u6240\u8C13\u7684\u201C\u94F8\u5E01\u8D26\u6237\u201D\u6765\u5B8C\u6210\u7684\u3002\u8FD9\u4E2A\u94F8\u5E01\u8D26\u6237\u968F\u540E\u7528\u4E8E\u5411\u7528\u6237\u7684\u4EE3\u5E01\u8D26\u6237\u94F8\u9020\u4EE3\u5E01\u3002",-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.cb53fbdc.js b/docs/.vuepress/dist/assets/token.html.5e6409cb.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.cb53fbdc.js
    rename to docs/.vuepress/dist/assets/token.html.5e6409cb.js
    index a90f88beb..7aafa7781 100644
    --- a/docs/.vuepress/dist/assets/token.html.cb53fbdc.js
    +++ b/docs/.vuepress/dist/assets/token.html.5e6409cb.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens","aria-hidden":"true"},"#"),s(" T\xF4i n\xEAn c\u1EA7n g\xEC \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi SPL-Tokens?")],-1),f=n("p",null,"M\u1ED7i khi b\u1EA1n t\u01B0\u01A1ng t\xE1c v\u1EDBi token tr\xEAn Solana, b\u1EA1n th\u1EF1c ch\u1EA5t \u0111ang t\u01B0\u01A1ng t\xE1c v\u1EDBi Solana Program Library Token, g\u1ECDi t\u1EAFt l\xE0 SPL-Token Standard. Chu\u1EA9n SPL-Token y\xEAu c\u1EA7u m\u1ED9t th\u01B0 vi\u1EC7n \u0111\u1EB7c th\xF9 \u0111\u1EC3 s\u1EED d\u1EE5ng v\xE0 b\u1EA1n c\xF3 th\u1EC3 t\xECm th\u1EA5y b\xEAn d\u01B0\u1EDBi tu\u1EF3 v\xE0o ng\xF4n ng\u1EEF l\u1EADp tr\xECnh c\u1EE7a b\u1EA1n.",-1),g=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens","aria-hidden":"true"},"#"),s(" T\xF4i n\xEAn c\u1EA7n g\xEC \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi SPL-Tokens?")],-1),f=n("p",null,"M\u1ED7i khi b\u1EA1n t\u01B0\u01A1ng t\xE1c v\u1EDBi token tr\xEAn Solana, b\u1EA1n th\u1EF1c ch\u1EA5t \u0111ang t\u01B0\u01A1ng t\xE1c v\u1EDBi Solana Program Library Token, g\u1ECDi t\u1EAFt l\xE0 SPL-Token Standard. Chu\u1EA9n SPL-Token y\xEAu c\u1EA7u m\u1ED9t th\u01B0 vi\u1EC7n \u0111\u1EB7c th\xF9 \u0111\u1EC3 s\u1EED d\u1EE5ng v\xE0 b\u1EA1n c\xF3 th\u1EC3 t\xECm th\u1EA5y b\xEAn d\u01B0\u1EDBi tu\u1EF3 v\xE0o ng\xF4n ng\u1EEF l\u1EADp tr\xECnh c\u1EE7a b\u1EA1n.",-1),g=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),w=n("h2",{id:"lam-the-nao-\u0111e-tao-mot-token-moi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-tao-mot-token-moi","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token m\u1EDBi")],-1),h=n("p",null,'T\u1EA1o m\u1EDBi token c\xF3 th\u1EC3 th\u1EF1c hi\u1EC7n b\u1EB1ng c\xE1ch t\u1EA1o m\u1ED9t "mint account". Account n\xE0y s\u1EBD \u0111\u01B0\u1EE3c s\u1EED d\u1EE5ng l\u01B0u \u0111\xFAc token cho token account v\xE0 ghi nh\u1EDB t\u1ED5ng cung cung kh\u1EDFi t\u1EA1o.',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    @@ -296,7 +296,7 @@ import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}fro
     `)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br"),n("span",{class:"line-number"},"4"),n("br"),n("span",{class:"line-number"},"5"),n("br"),n("span",{class:"line-number"},"6"),n("br"),n("span",{class:"line-number"},"7"),n("br"),n("span",{class:"line-number"},"8"),n("br"),n("span",{class:"line-number"},"9"),n("br"),n("span",{class:"line-number"},"10"),n("br"),n("span",{class:"line-number"},"11"),n("br"),n("span",{class:"line-number"},"12"),n("br"),n("span",{class:"line-number"},"13"),n("br"),n("span",{class:"line-number"},"14"),n("br"),n("span",{class:"line-number"},"15"),n("br"),n("span",{class:"line-number"},"16"),n("br")])],-1),Y=n("div",{class:"language-rust ext-rs line-numbers-mode"},[n("pre",{class:"language-rust"},[n("code",null,[n("span",{class:"token keyword"},"let"),s(" balance "),n("span",{class:"token operator"},"="),s(` connection
             `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"get_token_account_balance"),n("span",{class:"token punctuation"},"("),n("span",{class:"token operator"},"&"),s("token_account"),n("span",{class:"token punctuation"},")"),s(`
             `),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"unwrap"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),s(`
    -`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),q=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"TIP"),n("p",null,"M\u1ED9t token account ch\u1EC9 c\xF3 th\u1EC3 ch\u1EE9a m\u1ED9t lo\u1EA1i mint duy nh\u1EA5t. Khi b\u1EA1n khai b\xE1o token account, b\u1EA1n c\u0169ng ph\u1EA3i ch\u1EC9 r\xF5 l\u1EA1i mint.")],-1),Q=n("h2",{id:"lam-the-nao-\u0111e-duc-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-duc-token","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 d\xFAc token")],-1),E=n("p",null,"Khi b\u1EA1n \u0111\xFAc token, b\u1EA1n t\u0103ng s\u1ED1 l\u01B0\u1EE3ng t\u1ED5ng cung v\xE0 chuy\u1EC3n s\u1ED1 l\u01B0\u1EE3c token m\u1EDBi cho token account mong mu\u1ED1n.",-1),B=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
    +`)])]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br"),n("span",{class:"line-number"},"2"),n("br"),n("span",{class:"line-number"},"3"),n("br")])],-1),q=n("div",{class:"custom-container tip"},[n("p",{class:"custom-container-title"},"TIP"),n("p",null,"M\u1ED9t token account ch\u1EC9 c\xF3 th\u1EC3 ch\u1EE9a m\u1ED9t lo\u1EA1i mint duy nh\u1EA5t. Khi b\u1EA1n khai b\xE1o token account, b\u1EA1n c\u0169ng ph\u1EA3i ch\u1EC9 r\xF5 l\u1EA1i mint.")],-1),Q=n("h2",{id:"lam-the-nao-\u0111e-\u0111uc-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#lam-the-nao-\u0111e-\u0111uc-token","aria-hidden":"true"},"#"),s(" L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xFAc token")],-1),E=n("p",null,"Khi b\u1EA1n \u0111\xFAc token, b\u1EA1n t\u0103ng s\u1ED1 l\u01B0\u1EE3ng t\u1ED5ng cung v\xE0 chuy\u1EC3n s\u1ED1 l\u01B0\u1EE3c token m\u1EDBi cho token account mong mu\u1ED1n.",-1),B=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
       PublicKey`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.1da2f0eb.js b/docs/.vuepress/dist/assets/token.html.65520f24.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.1da2f0eb.js
    rename to docs/.vuepress/dist/assets/token.html.65520f24.js
    index 7609737bb..cab5baabc 100644
    --- a/docs/.vuepress/dist/assets/token.html.1da2f0eb.js
    +++ b/docs/.vuepress/dist/assets/token.html.65520f24.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"what-do-i-need-to-get-started-with-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#what-do-i-need-to-get-started-with-spl-tokens","aria-hidden":"true"},"#"),s(" What do I need to get started with SPL-Tokens?")],-1),w=n("p",null,"Solana\uC5D0\uC11C \uB2F9\uC2E0\uC774 Token\uB4E4\uACFC \uD1B5\uC2E0\uD560 \uB54C, \uB2F9\uC2E0\uC740 \uC2E4\uC81C\uB85C\uB294 SPL-Token standard \uB77C\uACE0\uB3C4 \uD558\uB294 Solana Program Library Token\uACFC \uD1B5\uC2E0\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. SPL-Token standard\uB97C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574\uC11C\uB294 \uD2B9\uC815 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC544\uB798\uC5D0\uC11C \uC5B8\uC5B4\uC5D0 \uB530\uB77C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),f=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"what-do-i-need-to-get-started-with-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#what-do-i-need-to-get-started-with-spl-tokens","aria-hidden":"true"},"#"),s(" What do I need to get started with SPL-Tokens?")],-1),w=n("p",null,"Solana\uC5D0\uC11C \uB2F9\uC2E0\uC774 Token\uB4E4\uACFC \uD1B5\uC2E0\uD560 \uB54C, \uB2F9\uC2E0\uC740 \uC2E4\uC81C\uB85C\uB294 SPL-Token standard \uB77C\uACE0\uB3C4 \uD558\uB294 Solana Program Library Token\uACFC \uD1B5\uC2E0\uD558\uB294 \uAC83\uC785\uB2C8\uB2E4. SPL-Token standard\uB97C \uC0AC\uC6A9\uD558\uAE30 \uC704\uD574\uC11C\uB294 \uD2B9\uC815 \uB77C\uC774\uBE0C\uB7EC\uB9AC\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC544\uB798\uC5D0\uC11C \uC5B8\uC5B4\uC5D0 \uB530\uB77C \uCC3E\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.",-1),f=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"how-to-create-a-new-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-new-token","aria-hidden":"true"},"#"),s(" How to create a new Token")],-1),h=n("p",null,'Token\uC744 \uC0DD\uC131\uD558\uB294 \uAC83\uC740 "mint account"\uB77C\uACE0 \uBD88\uB9AC\uB294 \uAC83\uC744 \uC0DD\uC131\uD558\uB294 \uAC83\uC73C\uB85C \uC774\uB904\uC9D1\uB2C8\uB2E4. \uC774 mint Account\uB294 \uB098\uC911\uC5D0 \uC0AC\uC6A9\uC790\uC758 token Account\uC5D0 token\uB4E4\uC744 mint \uD560 \uB54C \uC0AC\uC6A9\uB429\uB2C8\uB2E4.',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.e135cbcd.js b/docs/.vuepress/dist/assets/token.html.85b24b07.js
    similarity index 53%
    rename from docs/.vuepress/dist/assets/token.html.e135cbcd.js
    rename to docs/.vuepress/dist/assets/token.html.85b24b07.js
    index 329e5cef6..7adb900f9 100644
    --- a/docs/.vuepress/dist/assets/token.html.e135cbcd.js
    +++ b/docs/.vuepress/dist/assets/token.html.85b24b07.js
    @@ -1 +1 @@
    -const t={key:"v-26036e04",path:"/vi/references/token.html",title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens",lang:"vi-VN",frontmatter:{title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u c\xE1c s\u1EED d\u1EE5ng, chuy\u1EC3n v\xE0 h\u01A1n th\u1EBF n\u1EEFa v\u1EDBi tokens tr\xEAn Solana"}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u c\xE1c s\u1EED d\u1EE5ng, chuy\u1EC3n v\xE0 h\u01A1n th\u1EBF n\u1EEFa v\u1EDBi tokens tr\xEAn Solana"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"T\xF4i n\xEAn c\u1EA7n g\xEC \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi SPL-Tokens?",slug:"toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token m\u1EDBi",slug:"lam-the-nao-\u0111e-tao-mot-token-moi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc truy v\u1EA5n token mint",slug:"lam-the-nao-\u0111e-\u0111oc-truy-van-token-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token account",slug:"lam-the-nao-\u0111e-tao-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n token acount",slug:"lam-the-nao-\u0111e-truy-van-token-acount",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n s\u1ED1 d\u01B0 c\u1EE7a token account",slug:"lam-the-nao-\u0111e-truy-van-so-du-cua-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 d\xFAc token",slug:"lam-the-nao-\u0111e-duc-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n token",slug:"lam-the-nao-\u0111e-chuyen-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ED1t token",slug:"lam-the-nao-\u0111e-\u0111ot-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xF3ng m\u1ED9t token account",slug:"lam-the-nao-\u0111e-\u0111ong-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thi\u1EBFt l\u1EADp ch\u1EE7 s\u1EDF h\u1EEFu cho token account v\xE0 mint",slug:"lam-the-nao-\u0111e-thiet-lap-chu-so-huu-cho-token-account-va-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 u\u1EF7 quy\u1EC1n cho m\u1ED9t token \u0111\u1EA1i di\u1EC7n (delegate)",slug:"lam-the-nao-\u0111e-uy-quyen-cho-mot-token-\u0111ai-dien-delegate",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thu h\u1ED3i m\u1ED9t token \u0111\u1EA1i di\u1EC7n",slug:"lam-the-nao-\u0111e-thu-hoi-mot-token-\u0111ai-dien",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 qu\u1EA3n l\xFD wrapped SOL",slug:"lam-the-nao-\u0111e-quan-ly-wrapped-sol",children:[{level:3,title:"T\u1EA1o token account",slug:"tao-token-account",children:[]},{level:3,title:"Th\xEAm s\u1ED1 d\u01B0",slug:"them-so-du",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n t\u1EA5t c\u1EA3 token account c\u1EE7a m\u1ED9t Ch\u1EE7",slug:"lam-the-nao-\u0111e-truy-van-tat-ca-token-account-cua-mot-chu",children:[]}],git:{updatedTime:1658783638e3,contributors:[{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/references/token.md"};export{t as data};
    +const t={key:"v-26036e04",path:"/vi/references/token.html",title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens",lang:"vi-VN",frontmatter:{title:"T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | T\u01B0\u01A1ng t\xE1c v\u1EDBi Tokens"}],["meta",{name:"description",content:"T\xECm hi\u1EC3u c\xE1c s\u1EED d\u1EE5ng, chuy\u1EC3n v\xE0 h\u01A1n th\u1EBF n\u1EEFa v\u1EDBi tokens tr\xEAn Solana"}],["meta",{name:"og:description",content:"T\xECm hi\u1EC3u c\xE1c s\u1EED d\u1EE5ng, chuy\u1EC3n v\xE0 h\u01A1n th\u1EBF n\u1EEFa v\u1EDBi tokens tr\xEAn Solana"}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"T\xF4i n\xEAn c\u1EA7n g\xEC \u0111\u1EC3 b\u1EAFt \u0111\u1EA7u v\u1EDBi SPL-Tokens?",slug:"toi-nen-can-gi-\u0111e-bat-\u0111au-voi-spl-tokens",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token m\u1EDBi",slug:"lam-the-nao-\u0111e-tao-mot-token-moi",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ECDc truy v\u1EA5n token mint",slug:"lam-the-nao-\u0111e-\u0111oc-truy-van-token-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 t\u1EA1o m\u1ED9t token account",slug:"lam-the-nao-\u0111e-tao-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n token acount",slug:"lam-the-nao-\u0111e-truy-van-token-acount",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n s\u1ED1 d\u01B0 c\u1EE7a token account",slug:"lam-the-nao-\u0111e-truy-van-so-du-cua-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xFAc token",slug:"lam-the-nao-\u0111e-\u0111uc-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 chuy\u1EC3n token",slug:"lam-the-nao-\u0111e-chuyen-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\u1ED1t token",slug:"lam-the-nao-\u0111e-\u0111ot-token",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 \u0111\xF3ng m\u1ED9t token account",slug:"lam-the-nao-\u0111e-\u0111ong-mot-token-account",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thi\u1EBFt l\u1EADp ch\u1EE7 s\u1EDF h\u1EEFu cho token account v\xE0 mint",slug:"lam-the-nao-\u0111e-thiet-lap-chu-so-huu-cho-token-account-va-mint",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 u\u1EF7 quy\u1EC1n cho m\u1ED9t token \u0111\u1EA1i di\u1EC7n (delegate)",slug:"lam-the-nao-\u0111e-uy-quyen-cho-mot-token-\u0111ai-dien-delegate",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 thu h\u1ED3i m\u1ED9t token \u0111\u1EA1i di\u1EC7n",slug:"lam-the-nao-\u0111e-thu-hoi-mot-token-\u0111ai-dien",children:[]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 qu\u1EA3n l\xFD wrapped SOL",slug:"lam-the-nao-\u0111e-quan-ly-wrapped-sol",children:[{level:3,title:"T\u1EA1o token account",slug:"tao-token-account",children:[]},{level:3,title:"Th\xEAm s\u1ED1 d\u01B0",slug:"them-so-du",children:[]}]},{level:2,title:"L\xE0m th\u1EBF n\xE0o \u0111\u1EC3 truy v\u1EA5n t\u1EA5t c\u1EA3 token account c\u1EE7a m\u1ED9t Ch\u1EE7",slug:"lam-the-nao-\u0111e-truy-van-tat-ca-token-account-cua-mot-chu",children:[]}],git:{updatedTime:1714582408e3,contributors:[{name:"lainhathoang",email:"nhathoang8c01@gmail.com",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/references/token.md"};export{t as data};
    diff --git a/docs/.vuepress/dist/assets/token.html.87c9f9ba.js b/docs/.vuepress/dist/assets/token.html.8bed60f6.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.87c9f9ba.js
    rename to docs/.vuepress/dist/assets/token.html.8bed60f6.js
    index 5da34675b..35b275d51 100644
    --- a/docs/.vuepress/dist/assets/token.html.87c9f9ba.js
    +++ b/docs/.vuepress/dist/assets/token.html.8bed60f6.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as c,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"zeichen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#zeichen","aria-hidden":"true"},"#"),s(" Zeichen")],-1),y=n("h2",{id:"was-benotige-ich-um-mit-spl-tokens-zu-beginnen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#was-benotige-ich-um-mit-spl-tokens-zu-beginnen","aria-hidden":"true"},"#"),s(" Was ben\xF6tige ich, um mit SPL-Tokens zu beginnen?")],-1),f=n("p",null,"Jedes Mal, wenn Sie mit Token auf Solana interagieren, tun Sie es tats\xE4chlich Interaktion mit dem Solana Program Library Token oder SPL-Token Standard. Der SPL-Token-Standard erfordert dazu eine bestimmte Bibliothek zu verwenden, die Sie unten basierend auf Ihrer Sprache finden.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as c,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"zeichen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#zeichen","aria-hidden":"true"},"#"),s(" Zeichen")],-1),y=n("h2",{id:"was-benotige-ich-um-mit-spl-tokens-zu-beginnen",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#was-benotige-ich-um-mit-spl-tokens-zu-beginnen","aria-hidden":"true"},"#"),s(" Was ben\xF6tige ich, um mit SPL-Tokens zu beginnen?")],-1),f=n("p",null,"Jedes Mal, wenn Sie mit Token auf Solana interagieren, tun Sie es tats\xE4chlich Interaktion mit dem Solana Program Library Token oder SPL-Token Standard. Der SPL-Token-Standard erfordert dazu eine bestimmte Bibliothek zu verwenden, die Sie unten basierend auf Ihrer Sprache finden.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"so-erstellen-sie-ein-neues-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#so-erstellen-sie-ein-neues-token","aria-hidden":"true"},"#"),s(" So erstellen Sie ein neues Token")],-1),h=n("p",null,"Das Erstellen von Token erfolgt durch Erstellen eines sogenannten \u201EMint-Kontos\u201C. Dieses Mint-Konto wird sp\xE4ter verwendet, um Token auf das Token-Konto eines Benutzers zu pr\xE4gen.",-1),K=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.858f2429.js b/docs/.vuepress/dist/assets/token.html.a75a9504.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.858f2429.js
    rename to docs/.vuepress/dist/assets/token.html.a75a9504.js
    index 9f418d74d..c1c534d26 100644
    --- a/docs/.vuepress/dist/assets/token.html.858f2429.js
    +++ b/docs/.vuepress/dist/assets/token.html.a75a9504.js
    @@ -1,4 +1,4 @@
    -import{_ as n,e as s}from"./app.07ce7a66.js";const a={},e=s(`

    Interacting with Tokens (Token\u2019lar ile Etkile\u015Fim)

    What do I need to get started with SPL-Tokens? (SPL Token\u2019lar\u0131 kullanmaya ba\u015Flamak i\xE7in neye ihtiyac\u0131m\u0131z var?)

    Solana'da Token\u2019larla her etkile\u015Fimde bulundu\u011Funuzda, asl\u0131nda Solana Program Kitapl\u0131\u011F\u0131 Token\u2019\u0131 veya SPL-Token standard\u0131 ile etkile\u015Fime girersiniz. SPL-Token standard\u0131, programlama dilinize g\xF6re a\u015Fa\u011F\u0131da bulabilece\u011Finiz belirli bir kitapl\u0131\u011F\u0131n kullan\u0131lmas\u0131n\u0131 gerektirir.

    "@solana/spl-token": "^0.2.0"
    +import{_ as n,e as s}from"./app.d411e3b3.js";const a={},e=s(`

    Interacting with Tokens (Token\u2019lar ile Etkile\u015Fim)

    What do I need to get started with SPL-Tokens? (SPL Token\u2019lar\u0131 kullanmaya ba\u015Flamak i\xE7in neye ihtiyac\u0131m\u0131z var?)

    Solana'da Token\u2019larla her etkile\u015Fimde bulundu\u011Funuzda, asl\u0131nda Solana Program Kitapl\u0131\u011F\u0131 Token\u2019\u0131 veya SPL-Token standard\u0131 ile etkile\u015Fime girersiniz. SPL-Token standard\u0131, programlama dilinize g\xF6re a\u015Fa\u011F\u0131da bulabilece\u011Finiz belirli bir kitapl\u0131\u011F\u0131n kullan\u0131lmas\u0131n\u0131 gerektirir.

    "@solana/spl-token": "^0.2.0"
     

    How to create a new Token (Yeni bir Token olu\u015Fturma)

    Token olu\u015Fturma, "mint account" ad\u0131 verilen account olu\u015Fturularak yap\u0131l\u0131r. Bu mint account daha sonra bir kullan\u0131c\u0131n\u0131n token account'\u0131na token basmak i\xE7in kullan\u0131l\u0131r.

    // 1) use build-in function
     let mintPubkey = await createMint(
       connection, // conneciton
    diff --git a/docs/.vuepress/dist/assets/token.html.0e5aea93.js b/docs/.vuepress/dist/assets/token.html.ab898bc4.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.0e5aea93.js
    rename to docs/.vuepress/dist/assets/token.html.ab898bc4.js
    index 8088cadd6..f9e78ed5a 100644
    --- a/docs/.vuepress/dist/assets/token.html.0e5aea93.js
    +++ b/docs/.vuepress/dist/assets/token.html.ab898bc4.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"spl-tokens-\u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304B\u3099\u5FC5\u8981\u3066\u3099\u3059\u304B",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#spl-tokens-\u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304B\u3099\u5FC5\u8981\u3066\u3099\u3059\u304B","aria-hidden":"true"},"#"),s(" SPL-Tokens \u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304C\u5FC5\u8981\u3067\u3059\u304B\uFF1F")],-1),f=n("p",null,"\u6BCE\u56DESolana\u3067\u30C8\u30FC\u30AF\u30F3\u3092\u64CD\u4F5C\u3059\u308B\u305F\u3073\u306B\u3001\u5B9F\u969B\u306BSolana Program Library Token\u3001\u307E\u305F\u306F SPL-Token\u6A19\u6E96\u3068\u5BFE\u8A71\u3057\u3066\u3044\u307E\u3059\u3002SPL-Token \u6A19\u6E96\u3067\u306F\u3001\u7279\u5B9A\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u8A00\u8A9E\u306B\u57FA\u3065\u3044\u3066\u4EE5\u4E0B\u3067\u898B\u3064\u3051\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"spl-tokens-\u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304B\u3099\u5FC5\u8981\u3066\u3099\u3059\u304B",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#spl-tokens-\u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304B\u3099\u5FC5\u8981\u3066\u3099\u3059\u304B","aria-hidden":"true"},"#"),s(" SPL-Tokens \u3092\u59CB\u3081\u308B\u306B\u306F\u4F55\u304C\u5FC5\u8981\u3067\u3059\u304B\uFF1F")],-1),f=n("p",null,"\u6BCE\u56DESolana\u3067\u30C8\u30FC\u30AF\u30F3\u3092\u64CD\u4F5C\u3059\u308B\u305F\u3073\u306B\u3001\u5B9F\u969B\u306BSolana Program Library Token\u3001\u307E\u305F\u306F SPL-Token\u6A19\u6E96\u3068\u5BFE\u8A71\u3057\u3066\u3044\u307E\u3059\u3002SPL-Token \u6A19\u6E96\u3067\u306F\u3001\u7279\u5B9A\u306E\u30E9\u30A4\u30D6\u30E9\u30EA\u3092\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u3001\u8A00\u8A9E\u306B\u57FA\u3065\u3044\u3066\u4EE5\u4E0B\u3067\u898B\u3064\u3051\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"\u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5","aria-hidden":"true"},"#"),s(" \u65B0\u3057\u3044\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u65B9\u6CD5")],-1),h=n("p",null,"\u30C8\u30FC\u30AF\u30F3\u306E\u4F5C\u6210\u306F\u3001\u3044\u308F\u3086\u308B\u300Cmint\u30A2\u30AB\u30A6\u30F3\u30C8\u300D\u3092\u4F5C\u6210\u3059\u308B\u3053\u3068\u306B\u3088\u3063\u3066\u884C\u308F\u308C\u307E\u3059\u3002\u3053\u306Emint\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u5F8C\u3067\u30E6\u30FC\u30B6\u30FC\u306E\u30C8\u30FC\u30AF\u30F3\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u30C8\u30FC\u30AF\u30F3\u3092\u4F5C\u6210\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002",-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.5b1ae1a2.js b/docs/.vuepress/dist/assets/token.html.b0c306ef.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.5b1ae1a2.js
    rename to docs/.vuepress/dist/assets/token.html.b0c306ef.js
    index 08ffada7c..1c71b6748 100644
    --- a/docs/.vuepress/dist/assets/token.html.5b1ae1a2.js
    +++ b/docs/.vuepress/dist/assets/token.html.b0c306ef.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"ano-ang-kailangan-ko-para-makapagsimula-sa-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ano-ang-kailangan-ko-para-makapagsimula-sa-spl-tokens","aria-hidden":"true"},"#"),s(" Ano ang kailangan ko para makapagsimula sa SPL-Tokens?")],-1),g=n("p",null,"Sa tuwing nakikipag-ugnayan ka sa mga token sa Solana, ikaw talaga nakikipag-ugnayan sa Solana Program Library Token, o SPL-Token pamantayan. Ang pamantayan ng SPL-Token ay nangangailangan ng isang partikular na library upang gamitin, na makikita mo sa ibaba batay sa iyong wika.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"ano-ang-kailangan-ko-para-makapagsimula-sa-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#ano-ang-kailangan-ko-para-makapagsimula-sa-spl-tokens","aria-hidden":"true"},"#"),s(" Ano ang kailangan ko para makapagsimula sa SPL-Tokens?")],-1),g=n("p",null,"Sa tuwing nakikipag-ugnayan ka sa mga token sa Solana, ikaw talaga nakikipag-ugnayan sa Solana Program Library Token, o SPL-Token pamantayan. Ang pamantayan ng SPL-Token ay nangangailangan ng isang partikular na library upang gamitin, na makikita mo sa ibaba batay sa iyong wika.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),f=n("h2",{id:"paano-gumawa-ng-bagong-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#paano-gumawa-ng-bagong-token","aria-hidden":"true"},"#"),s(" Paano gumawa ng bagong Token")],-1),h=n("p",null,'Ang paggawa ng mga token ay ginagawa sa pamamagitan ng paggawa ng tinatawag na "mint account". Ang mint account na ito ay ginamit sa ibang pagkakataon upang mag-mint ng mga token sa token account ng isang user.',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.de032bea.js b/docs/.vuepress/dist/assets/token.html.d6b6721b.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.de032bea.js
    rename to docs/.vuepress/dist/assets/token.html.d6b6721b.js
    index bf8be1560..398a6fd4f 100644
    --- a/docs/.vuepress/dist/assets/token.html.de032bea.js
    +++ b/docs/.vuepress/dist/assets/token.html.d6b6721b.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-spl-tokens","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 SPL-Tokens?")],-1),f=n("p",null,"\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E01\u0E31\u0E1A tokens \u0E1A\u0E19 Solana \u0E08\u0E23\u0E34\u0E07\u0E46 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E01\u0E31\u0E1A Solana Program Library Token \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E15\u0E23\u0E10\u0E32\u0E19 SPL-Token standard \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 library \u0E40\u0E09\u0E1E\u0E32\u0E30 \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2B\u0E32\u0E44\u0E14\u0E49\u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49\u0E15\u0E32\u0E21\u0E20\u0E32\u0E29\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E19\u0E43\u0E08",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19-spl-tokens","aria-hidden":"true"},"#"),s(" \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E39\u0E49\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E08\u0E30\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 SPL-Tokens?")],-1),f=n("p",null,"\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E01\u0E31\u0E1A tokens \u0E1A\u0E19 Solana \u0E08\u0E23\u0E34\u0E07\u0E46 \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E01\u0E31\u0E1A Solana Program Library Token \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E15\u0E23\u0E10\u0E32\u0E19 SPL-Token standard \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 library \u0E40\u0E09\u0E1E\u0E32\u0E30 \u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2B\u0E32\u0E44\u0E14\u0E49\u0E02\u0E49\u0E32\u0E07\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49\u0E15\u0E32\u0E21\u0E20\u0E32\u0E29\u0E32\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E2A\u0E19\u0E43\u0E08",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-token-\u0E43\u0E2B\u0E21\u0E48",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07-token-\u0E43\u0E2B\u0E21\u0E48","aria-hidden":"true"},"#"),s(" \u0E27\u0E34\u0E18\u0E35\u0E2A\u0E23\u0E49\u0E32\u0E07 Token \u0E43\u0E2B\u0E21\u0E48")],-1),h=n("p",null,'\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 token \u0E17\u0E33\u0E44\u0E14\u0E49\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E23\u0E49\u0E32\u0E07 "mint account" \u0E0B\u0E36\u0E48\u0E07 mint account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E16\u0E39\u0E01\u0E19\u0E33\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23 mint token \u0E44\u0E1B\u0E17\u0E35\u0E48 token account \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E43\u0E19\u0E20\u0E32\u0E22\u0E2B\u0E25\u0E31\u0E07',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.c555b525.js b/docs/.vuepress/dist/assets/token.html.e07b1965.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.c555b525.js
    rename to docs/.vuepress/dist/assets/token.html.e07b1965.js
    index 676121359..64a7208ca 100644
    --- a/docs/.vuepress/dist/assets/token.html.c555b525.js
    +++ b/docs/.vuepress/dist/assets/token.html.e07b1965.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as c,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"jeton",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#jeton","aria-hidden":"true"},"#"),s(" Jeton")],-1),y=n("h2",{id:"de-quoi-ai-je-besoin-pour-commencer-avec-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#de-quoi-ai-je-besoin-pour-commencer-avec-spl-tokens","aria-hidden":"true"},"#"),s(" De quoi ai-je besoin pour commencer avec SPL-Tokens ?")],-1),f=n("p",null,"Chaque fois que vous interagissez avec des jetons sur Solana, vous interagissez en fait avec la Biblioth\xE8que du Programme Solana (SPL) de Jeton, ou norme SPL-Token. La norme SPL-Token n\xE9cessite l'utilisation d'une biblioth\xE8que sp\xE9cifique, que vous trouverez ci-dessous en fonction de votre langage de programmation.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as c,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"jeton",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#jeton","aria-hidden":"true"},"#"),s(" Jeton")],-1),y=n("h2",{id:"de-quoi-ai-je-besoin-pour-commencer-avec-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#de-quoi-ai-je-besoin-pour-commencer-avec-spl-tokens","aria-hidden":"true"},"#"),s(" De quoi ai-je besoin pour commencer avec SPL-Tokens ?")],-1),f=n("p",null,"Chaque fois que vous interagissez avec des jetons sur Solana, vous interagissez en fait avec la Biblioth\xE8que du Programme Solana (SPL) de Jeton, ou norme SPL-Token. La norme SPL-Token n\xE9cessite l'utilisation d'une biblioth\xE8que sp\xE9cifique, que vous trouverez ci-dessous en fonction de votre langage de programmation.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"comment-creer-un-nouveau-jeton",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#comment-creer-un-nouveau-jeton","aria-hidden":"true"},"#"),s(" Comment cr\xE9er un nouveau Jeton")],-1),h=n("p",null,`La cr\xE9ation de jetons se fait par la cr\xE9ation de ce que l'on appelle un "compte de cr\xE9ation" (mint account). Ce compte de cr\xE9ation est ensuite utilis\xE9 pour cr\xE9er des jetons sur le compte de jetons d'un utilisateur.`,-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.495dbb1a.js b/docs/.vuepress/dist/assets/token.html.e914f7d1.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.495dbb1a.js
    rename to docs/.vuepress/dist/assets/token.html.e914f7d1.js
    index af9a2048e..fe168fdc3 100644
    --- a/docs/.vuepress/dist/assets/token.html.495dbb1a.js
    +++ b/docs/.vuepress/dist/assets/token.html.e914f7d1.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"\u4EE3\u5E63",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u4EE3\u5E63","aria-hidden":"true"},"#"),s(" \u4EE3\u5E63")],-1),y=n("h2",{id:"\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528spl\u4EE3\u5E63",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528spl\u4EE3\u5E63","aria-hidden":"true"},"#"),s(" \u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528SPL\u4EE3\u5E63\uFF1F")],-1),f=n("p",null,"\u6BCF\u7576\u4F60\u5728Solana\u4E0A\u8207\u4EE3\u5E63\u9032\u884C\u4EA4\u4E92\u6642\uFF0C\u5BE6\u969B\u4E0A\u4F60\u6B63\u5728\u8207Solana\u7A0B\u5E8F\u5EAB\u4EE3\u5E63\uFF08SPL-Token\uFF09\u6216SPL\u4EE3\u5E63\u6A19\u6E96\u4EA4\u4E92\u3002SPL\u4EE3\u5E63\u6A19\u6E96\u9700\u8981\u4F7F\u7528\u7279\u5B9A\u7684\u5EAB\uFF0C\u4F60\u53EF\u4EE5\u6839\u64DA\u4F60\u4F7F\u7528\u7684\u7DE8\u7A0B\u8A9E\u8A00\u5728\u4E0B\u9762\u627E\u5230\u76F8\u61C9\u7684\u5EAB\u3002",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"\u4EE3\u5E63",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u4EE3\u5E63","aria-hidden":"true"},"#"),s(" \u4EE3\u5E63")],-1),y=n("h2",{id:"\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528spl\u4EE3\u5E63",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528spl\u4EE3\u5E63","aria-hidden":"true"},"#"),s(" \u6211\u9700\u8981\u4EC0\u9EBC\u624D\u80FD\u958B\u59CB\u4F7F\u7528SPL\u4EE3\u5E63\uFF1F")],-1),f=n("p",null,"\u6BCF\u7576\u4F60\u5728Solana\u4E0A\u8207\u4EE3\u5E63\u9032\u884C\u4EA4\u4E92\u6642\uFF0C\u5BE6\u969B\u4E0A\u4F60\u6B63\u5728\u8207Solana\u7A0B\u5E8F\u5EAB\u4EE3\u5E63\uFF08SPL-Token\uFF09\u6216SPL\u4EE3\u5E63\u6A19\u6E96\u4EA4\u4E92\u3002SPL\u4EE3\u5E63\u6A19\u6E96\u9700\u8981\u4F7F\u7528\u7279\u5B9A\u7684\u5EAB\uFF0C\u4F60\u53EF\u4EE5\u6839\u64DA\u4F60\u4F7F\u7528\u7684\u7DE8\u7A0B\u8A9E\u8A00\u5728\u4E0B\u9762\u627E\u5230\u76F8\u61C9\u7684\u5EAB\u3002",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#\u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63","aria-hidden":"true"},"#"),s(" \u5982\u4F55\u5275\u5EFA\u4E00\u500B\u65B0\u7684\u4EE3\u5E63")],-1),h=n("p",null,"\u5275\u5EFA\u4EE3\u5E63\u662F\u901A\u904E\u5275\u5EFA\u6240\u8B02\u7684\u201C\u9444\u5E63\u8CEC\u6236\u201D\u4F86\u5B8C\u6210\u7684\u3002\u9019\u500B\u9444\u5E63\u8CEC\u6236\u96A8\u5F8C\u7528\u65BC\u5411\u7528\u6236\u7684\u4EE3\u5E63\u8CEC\u6236\u9444\u9020\u4EE3\u5E63\u3002",-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.77adbbb4.js b/docs/.vuepress/dist/assets/token.html.f94d11f9.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.77adbbb4.js
    rename to docs/.vuepress/dist/assets/token.html.f94d11f9.js
    index 04e23617d..183ebe1b5 100644
    --- a/docs/.vuepress/dist/assets/token.html.77adbbb4.js
    +++ b/docs/.vuepress/dist/assets/token.html.f94d11f9.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"what-do-i-need-to-get-started-with-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#what-do-i-need-to-get-started-with-spl-tokens","aria-hidden":"true"},"#"),s(" What do I need to get started with SPL-Tokens?")],-1),w=n("p",null,"Every time you interact with tokens on Solana, you are actually interacting with the Solana Program Library Token, or SPL-Token standard. The SPL-Token standard requires a specific library to be used, which you can find below based on your language.",-1),f=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as o,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#token","aria-hidden":"true"},"#"),s(" Token")],-1),y=n("h2",{id:"what-do-i-need-to-get-started-with-spl-tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#what-do-i-need-to-get-started-with-spl-tokens","aria-hidden":"true"},"#"),s(" What do I need to get started with SPL-Tokens?")],-1),w=n("p",null,"Every time you interact with tokens on Solana, you are actually interacting with the Solana Program Library Token, or SPL-Token standard. The SPL-Token standard requires a specific library to be used, which you can find below based on your language.",-1),f=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"how-to-create-a-new-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#how-to-create-a-new-token","aria-hidden":"true"},"#"),s(" How to create a new Token")],-1),h=n("p",null,`Creating tokens is done by creating what is called a "mint account". This mint account is later used to mint tokens to a user's token account.`,-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/token.html.b6c1e5ff.js b/docs/.vuepress/dist/assets/token.html.ff5cac15.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/token.html.b6c1e5ff.js
    rename to docs/.vuepress/dist/assets/token.html.ff5cac15.js
    index e6ef48b50..fc428c90f 100644
    --- a/docs/.vuepress/dist/assets/token.html.b6c1e5ff.js
    +++ b/docs/.vuepress/dist/assets/token.html.ff5cac15.js
    @@ -1,4 +1,4 @@
    -import{_ as u,r as c,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.07ce7a66.js";const m={},d=n("h1",{id:"tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#tokens","aria-hidden":"true"},"#"),s(" Tokens")],-1),y=n("h2",{id:"o-que-eu-preciso-para-comecar-com-tokens-spl",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#o-que-eu-preciso-para-comecar-com-tokens-spl","aria-hidden":"true"},"#"),s(" O que eu preciso para come\xE7ar com Tokens SPL?")],-1),f=n("p",null,"Toda vez que voc\xEA interage com tokens na Solana, na verdade est\xE1 interagindo com o padr\xE3o de Token SPL (SPL-Token, ou Solana Program Library Token). O padr\xE3o de Token SPL requer o uso de uma biblioteca espec\xEDfica, que voc\xEA pode encontrar abaixo com base na sua linguagem.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
    +import{_ as u,r as c,o as i,c as r,b as t,w as a,F as k,a as n,d as s,e as b}from"./app.d411e3b3.js";const m={},d=n("h1",{id:"tokens",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#tokens","aria-hidden":"true"},"#"),s(" Tokens")],-1),y=n("h2",{id:"o-que-eu-preciso-para-comecar-com-tokens-spl",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#o-que-eu-preciso-para-comecar-com-tokens-spl","aria-hidden":"true"},"#"),s(" O que eu preciso para come\xE7ar com Tokens SPL?")],-1),f=n("p",null,"Toda vez que voc\xEA interage com tokens na Solana, na verdade est\xE1 interagindo com o padr\xE3o de Token SPL (SPL-Token, ou Solana Program Library Token). O padr\xE3o de Token SPL requer o uso de uma biblioteca espec\xEDfica, que voc\xEA pode encontrar abaixo com base na sua linguagem.",-1),w=n("div",{class:"language-text ext-text line-numbers-mode"},[n("pre",{class:"language-text"},[n("code",null,`"@solana/spl-token": "^0.2.0"
     `)]),n("div",{class:"line-numbers","aria-hidden":"true"},[n("span",{class:"line-number"},"1"),n("br")])],-1),g=n("h2",{id:"como-criar-um-novo-token",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#como-criar-um-novo-token","aria-hidden":"true"},"#"),s(" Como criar um novo Token")],-1),h=n("p",null,'A cria\xE7\xE3o de tokens \xE9 feita atrav\xE9s da cria\xE7\xE3o do que \xE9 chamado de "conta de cunhagem" (mint account). Essa conta de cunhagem \xE9 usada posteriormente para cunhar tokens para a conta de tokens do usu\xE1rio.',-1),A=n("div",{class:"language-typescript ext-ts line-numbers-mode"},[n("pre",{class:"language-typescript"},[n("code",null,[n("span",{class:"token keyword"},"import"),s(),n("span",{class:"token punctuation"},"{"),s(`
       clusterApiUrl`),n("span",{class:"token punctuation"},","),s(`
       Connection`),n("span",{class:"token punctuation"},","),s(`
    diff --git a/docs/.vuepress/dist/assets/transactions.html.e6d9a389.js b/docs/.vuepress/dist/assets/transactions.html.0c0860dc.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/transactions.html.e6d9a389.js
    rename to docs/.vuepress/dist/assets/transactions.html.0c0860dc.js
    index e88787020..a12d33ccd 100644
    --- a/docs/.vuepress/dist/assets/transactions.html.e6d9a389.js
    +++ b/docs/.vuepress/dist/assets/transactions.html.0c0860dc.js
    @@ -1 +1 @@
    -import{_ as r,r as o,o as i,c as l,a as e,b as t,w as c,F as u,d as s,e as d}from"./app.07ce7a66.js";const p={},m=e("h1",{id:"transactions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),s(" Transactions")],-1),h=s("Les clients peuvent invoquer des "),_=s("programmes"),f=s(" en soumettant une transaction \xE0 un cluster. Une seule transaction peut comprendre plusieurs instructions, chacune ciblant son propre programme. Lorsqu'une transaction est soumise, Le "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=s("Runtime"),q=s(" de Solana va traiter ses instructions dans l'ordre et de mani\xE8re atomique. Si le traitement d'au moins une instruction \xE9choue, c'est l'ensemble de la transaction qui \xE9chouera."),v=d('

    Faits

    Fiche d'Information

    • Les instructions sont l'unit\xE9 de base du fonctionnement de Solana
    • Chaque instruction contient :
      • Le program_id du programme vis\xE9
      • Un tableau de tous les accounts (comptes) dans lesquels il a l'intention de lire ou d'\xE9crire
      • Un tableau d'octets instruction_data qui est sp\xE9cifique au programme vis\xE9
    • Plusieurs instructions peuvent \xEAtre regroup\xE9es en une seule transaction
    • Chaque transaction contient :
      • Un tableau de tous les accounts (comptes) dans lesquels il a l'intention de lire ou d'\xE9crire
      • Une ou plusieurs instructions
      • Un blockhash (hash de blocs) r\xE9cent
      • Une ou plusieurs signatures
    • Les instructions sont trait\xE9es dans l'ordre et de mani\xE8re atomique
    • Si le traitement d'au moins une instruction \xE9choue, c'est l'ensemble de la transaction qui \xE9chouera.
    • Les transactions sont limit\xE9es \xE0 1232 octets

    Examen plus approfondi

    Le Runtime de Solana n\xE9cessite que les instructions et les transactions sp\xE9cifient une liste de tous les comptes dans lesquels elles ont l'intention de lire ou d'\xE9crire. En exigeant ces comptes \xE0 l'avance, le runtime est capable de parall\xE9liser l'ex\xE9cution de toutes les transactions.

    Lorsqu'une transaction est soumise \xE0 un cluster, le runtime traite ses instructions dans l'ordre et de mani\xE8re atomique. Pour chaque instruction, le programme utilis\xE9 interpr\xE8te le tableau de donn\xE9es et op\xE8re sur les comptes sp\xE9cifi\xE9s. Le programme retournera soit un message de succ\xE8s, soit un code d'erreur. Si une erreur est retourn\xE9e, l'ensemble de la transaction \xE9choue instantan\xE9ment.

    Toute transaction visant \xE0 d\xE9biter un compte ou \xE0 modifier ses donn\xE9es n\xE9cessite la signature de son propri\xE9taire. Tout compte qui sera modifi\xE9 sera marqu\xE9 comme writable. Un compte peut \xEAtre cr\xE9dit\xE9 sans l'autorisation de son propri\xE9taire \xE0 condition que le payeur des frais de transaction couvre les frais de rente et les frais de transaction n\xE9cessaires.

    ',6),k=s("Avant d'\xEAtre soumises, toutes les transactions doivent faire r\xE9f\xE9rence \xE0 un "),x={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},L=s("hash de blocs r\xE9cent"),S=s(". Le hash de blocs r\xE9cent est utilis\xE9 pour \xE9viter les doublons et \xE9liminer les transactions obsol\xE8tes. L'\xE2ge maximal que peut avoir le hash de blocs d'une transaction est de 150 blocs ou environ 1 minute et 19 secondes au moment o\xF9 nous \xE9crivons ces lignes."),y=e("h3",{id:"frais",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#frais","aria-hidden":"true"},"#"),s(" Frais")],-1),T=e("p",null,"Le r\xE9seau Solana per\xE7oit deux types de frais :",-1),U={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},C=s("Les frais de transaction"),F=s(" pour propager les transactions sur la blockchain (aka \u201Cfrais de gas\u201D ou \u201Cgas fees\u201D)"),w={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},A=s("Les frais de rente"),E=s(" pour le stockage des donn\xE9es sur la blockchain"),R=e("p",null,[s("Dans Solana, les frais de transaction sont d\xE9terministes : il n'existe pas de concept de march\xE9 des frais dans lequel les utilisateurs peuvent payer des frais plus \xE9lev\xE9s pour augmenter leurs chances d'\xEAtre inclus dans le bloc suivant. Au moment o\xF9 nous \xE9crivons ces lignes, les frais de transaction sont d\xE9termin\xE9s uniquement par le nombre de signatures requises (i.e. "),e("code",null,"lamports_per_signature"),s("), et non par la quantit\xE9 de ressources utilis\xE9es. Cela est d\xFB au fait qu'il existe actuellement une limite maximale de 1232 bytes pour toutes les transactions.")],-1),B=e("p",null,[s("Toutes les transactions n\xE9cessitent qu'il y ait au moins un compte "),e("code",null,"writable"),s(" (accessible en \xE9criture) pour signer la transaction. Une fois soumise, le compte signataire accessible en \xE9criture qui est s\xE9rialis\xE9 en premier sera le payeur des frais. Ce compte paiera le co\xFBt de la transaction, que celle-ci r\xE9ussisse ou \xE9choue. Si le payeur des frais ne dispose pas d'un solde suffisant pour payer les frais de transaction, la transaction sera abandonn\xE9e.")],-1),I=e("p",null,"Au moment o\xF9 nous \xE9crivons ces lignes, 50 % de tous les frais de transaction sont per\xE7us par le validateur qui produit le bloc, tandis que les 50 % restants sont br\xFBl\xE9s. Ce m\xE9canisme a pour but d'inciter les validateurs \xE0 traiter le plus grand nombre possible de transactions pendant les cr\xE9neaux qui leur sont attribu\xE9s dans le calendrier des leaders.",-1),N=e("h2",{id:"autres-ressources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#autres-ressources","aria-hidden":"true"},"#"),s(" Autres Ressources")],-1),V={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},j=s("Documentation officielle"),D={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},J=s("Structure des Transactions"),P={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},H=s("Frais de transactions par Justin Starry"),M={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},z=s("Une Introduction \xE0 la Blockchain Solana par Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=s("Traitement des Transactions par Jito Labs"),O={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Q=s("Les Transactions sur Solana en profondeur par Alex Miller");function W(X,Y){const a=o("RouterLink"),n=o("ExternalLinkIcon");return i(),l(u,null,[m,e("p",null,[h,t(a,{to:"/fr/core-concepts/programs.html"},{default:c(()=>[_]),_:1}),f,e("a",b,[g,t(n)]),q]),v,e("p",null,[k,e("a",x,[L,t(n)]),S]),y,T,e("ul",null,[e("li",null,[e("a",U,[C,t(n)]),F]),e("li",null,[e("a",w,[A,t(n)]),E])]),R,B,I,N,e("ul",null,[e("li",null,[e("a",V,[j,t(n)])]),e("li",null,[e("a",D,[J,t(n)])]),e("li",null,[e("a",P,[H,t(n)])]),e("li",null,[e("a",M,[z,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",O,[Q,t(n)])])])],64)}var $=r(p,[["render",W]]);export{$ as default}; +import{_ as r,r as o,o as i,c as l,a as e,b as t,w as c,F as u,d as s,e as d}from"./app.d411e3b3.js";const p={},m=e("h1",{id:"transactions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),s(" Transactions")],-1),h=s("Les clients peuvent invoquer des "),_=s("programmes"),f=s(" en soumettant une transaction \xE0 un cluster. Une seule transaction peut comprendre plusieurs instructions, chacune ciblant son propre programme. Lorsqu'une transaction est soumise, Le "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=s("Runtime"),q=s(" de Solana va traiter ses instructions dans l'ordre et de mani\xE8re atomique. Si le traitement d'au moins une instruction \xE9choue, c'est l'ensemble de la transaction qui \xE9chouera."),v=d('

    Faits

    Fiche d'Information

    • Les instructions sont l'unit\xE9 de base du fonctionnement de Solana
    • Chaque instruction contient :
      • Le program_id du programme vis\xE9
      • Un tableau de tous les accounts (comptes) dans lesquels il a l'intention de lire ou d'\xE9crire
      • Un tableau d'octets instruction_data qui est sp\xE9cifique au programme vis\xE9
    • Plusieurs instructions peuvent \xEAtre regroup\xE9es en une seule transaction
    • Chaque transaction contient :
      • Un tableau de tous les accounts (comptes) dans lesquels il a l'intention de lire ou d'\xE9crire
      • Une ou plusieurs instructions
      • Un blockhash (hash de blocs) r\xE9cent
      • Une ou plusieurs signatures
    • Les instructions sont trait\xE9es dans l'ordre et de mani\xE8re atomique
    • Si le traitement d'au moins une instruction \xE9choue, c'est l'ensemble de la transaction qui \xE9chouera.
    • Les transactions sont limit\xE9es \xE0 1232 octets

    Examen plus approfondi

    Le Runtime de Solana n\xE9cessite que les instructions et les transactions sp\xE9cifient une liste de tous les comptes dans lesquels elles ont l'intention de lire ou d'\xE9crire. En exigeant ces comptes \xE0 l'avance, le runtime est capable de parall\xE9liser l'ex\xE9cution de toutes les transactions.

    Lorsqu'une transaction est soumise \xE0 un cluster, le runtime traite ses instructions dans l'ordre et de mani\xE8re atomique. Pour chaque instruction, le programme utilis\xE9 interpr\xE8te le tableau de donn\xE9es et op\xE8re sur les comptes sp\xE9cifi\xE9s. Le programme retournera soit un message de succ\xE8s, soit un code d'erreur. Si une erreur est retourn\xE9e, l'ensemble de la transaction \xE9choue instantan\xE9ment.

    Toute transaction visant \xE0 d\xE9biter un compte ou \xE0 modifier ses donn\xE9es n\xE9cessite la signature de son propri\xE9taire. Tout compte qui sera modifi\xE9 sera marqu\xE9 comme writable. Un compte peut \xEAtre cr\xE9dit\xE9 sans l'autorisation de son propri\xE9taire \xE0 condition que le payeur des frais de transaction couvre les frais de rente et les frais de transaction n\xE9cessaires.

    ',6),k=s("Avant d'\xEAtre soumises, toutes les transactions doivent faire r\xE9f\xE9rence \xE0 un "),x={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},L=s("hash de blocs r\xE9cent"),S=s(". Le hash de blocs r\xE9cent est utilis\xE9 pour \xE9viter les doublons et \xE9liminer les transactions obsol\xE8tes. L'\xE2ge maximal que peut avoir le hash de blocs d'une transaction est de 150 blocs ou environ 1 minute et 19 secondes au moment o\xF9 nous \xE9crivons ces lignes."),y=e("h3",{id:"frais",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#frais","aria-hidden":"true"},"#"),s(" Frais")],-1),T=e("p",null,"Le r\xE9seau Solana per\xE7oit deux types de frais :",-1),U={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},C=s("Les frais de transaction"),F=s(" pour propager les transactions sur la blockchain (aka \u201Cfrais de gas\u201D ou \u201Cgas fees\u201D)"),w={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},A=s("Les frais de rente"),E=s(" pour le stockage des donn\xE9es sur la blockchain"),R=e("p",null,[s("Dans Solana, les frais de transaction sont d\xE9terministes : il n'existe pas de concept de march\xE9 des frais dans lequel les utilisateurs peuvent payer des frais plus \xE9lev\xE9s pour augmenter leurs chances d'\xEAtre inclus dans le bloc suivant. Au moment o\xF9 nous \xE9crivons ces lignes, les frais de transaction sont d\xE9termin\xE9s uniquement par le nombre de signatures requises (i.e. "),e("code",null,"lamports_per_signature"),s("), et non par la quantit\xE9 de ressources utilis\xE9es. Cela est d\xFB au fait qu'il existe actuellement une limite maximale de 1232 bytes pour toutes les transactions.")],-1),B=e("p",null,[s("Toutes les transactions n\xE9cessitent qu'il y ait au moins un compte "),e("code",null,"writable"),s(" (accessible en \xE9criture) pour signer la transaction. Une fois soumise, le compte signataire accessible en \xE9criture qui est s\xE9rialis\xE9 en premier sera le payeur des frais. Ce compte paiera le co\xFBt de la transaction, que celle-ci r\xE9ussisse ou \xE9choue. Si le payeur des frais ne dispose pas d'un solde suffisant pour payer les frais de transaction, la transaction sera abandonn\xE9e.")],-1),I=e("p",null,"Au moment o\xF9 nous \xE9crivons ces lignes, 50 % de tous les frais de transaction sont per\xE7us par le validateur qui produit le bloc, tandis que les 50 % restants sont br\xFBl\xE9s. Ce m\xE9canisme a pour but d'inciter les validateurs \xE0 traiter le plus grand nombre possible de transactions pendant les cr\xE9neaux qui leur sont attribu\xE9s dans le calendrier des leaders.",-1),N=e("h2",{id:"autres-ressources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#autres-ressources","aria-hidden":"true"},"#"),s(" Autres Ressources")],-1),V={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},j=s("Documentation officielle"),D={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},J=s("Structure des Transactions"),P={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},H=s("Frais de transactions par Justin Starry"),M={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},z=s("Une Introduction \xE0 la Blockchain Solana par Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=s("Traitement des Transactions par Jito Labs"),O={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Q=s("Les Transactions sur Solana en profondeur par Alex Miller");function W(X,Y){const a=o("RouterLink"),n=o("ExternalLinkIcon");return i(),l(u,null,[m,e("p",null,[h,t(a,{to:"/fr/core-concepts/programs.html"},{default:c(()=>[_]),_:1}),f,e("a",b,[g,t(n)]),q]),v,e("p",null,[k,e("a",x,[L,t(n)]),S]),y,T,e("ul",null,[e("li",null,[e("a",U,[C,t(n)]),F]),e("li",null,[e("a",w,[A,t(n)]),E])]),R,B,I,N,e("ul",null,[e("li",null,[e("a",V,[j,t(n)])]),e("li",null,[e("a",D,[J,t(n)])]),e("li",null,[e("a",P,[H,t(n)])]),e("li",null,[e("a",M,[z,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",O,[Q,t(n)])])])],64)}var $=r(p,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.f5f36a28.js b/docs/.vuepress/dist/assets/transactions.html.110ef9af.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.f5f36a28.js rename to docs/.vuepress/dist/assets/transactions.html.110ef9af.js index 52ca64572..7225f47d3 100644 --- a/docs/.vuepress/dist/assets/transactions.html.f5f36a28.js +++ b/docs/.vuepress/dist/assets/transactions.html.110ef9af.js @@ -1 +1 @@ -import{_ as i,r as a,o as l,c,a as e,b as t,w as d,F as _,d as o,e as s}from"./app.07ce7a66.js";const h={},p=e("h1",{id:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3","aria-hidden":"true"},"#"),o(" \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3")],-1),u=o("\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u30AF\u30E9\u30B9\u30BF\u30FC\u306B\u9001\u4FE1\u3059\u308B\u3053\u3068\u3067 "),m=o("programs"),b=o(" \u3092\u547C\u3073\u51FA\u305B\u307E\u3059\u3002"),f=e("br",null,null,-1),g=o(" 1 \u3064\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u8907\u6570\u306EInstructions(\u547D\u4EE4)\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u3001\u305D\u308C\u305E\u308C\u304C\u72EC\u81EA\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u5BFE\u8C61\u3068\u3057\u3066\u3044\u307E\u3059\u3002 \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u9001\u4FE1\u3055\u308C\u308B\u3068\u3001Solana "),k={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},x=o("Runtime"),S=o(" \u306F \u305D\u306E\u547D\u4EE4\u3092\u9806\u756A\u306B\u304B\u3064\u3001\u30A2\u30C8\u30DF\u30C3\u30AF\u306B\u51E6\u7406\u3057\u307E\u3059\u3002"),v=e("br",null,null,-1),y=o(" \u3064\u307E\u308A\u3001\u4E00\u90E8\u306E\u547D\u4EE4\u304C\u5931\u6557\u3059\u308B\u3068\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304C\u5931\u6557\u3068\u3057\u3066\u51E6\u7406\u3055\u308C\u307E\u3059\u3002"),T=s('

    \u6982\u8981

    Fact Sheet

    • Instructions(\u547D\u4EE4) \u306F\u3001Solana \u306E\u6700\u3082\u57FA\u672C\u7684\u306A\u64CD\u4F5C\u5358\u4F4D\u3067\u3059\u3002
    • \u305D\u308C\u305E\u308C\u306E\u547D\u4EE4\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u542B\u307E\u308C\u307E\u3059\u3002:
      • \u76EE\u7684\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E program_id
      • \u8AAD\u66F8\u3092\u884C\u3046\u4E88\u5B9A\u306E\u3059\u3079\u3066\u306E accounts \u3092\u683C\u7D0D\u3059\u308B\u914D\u5217
      • \u76EE\u7684\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u56FA\u6709\u306E instruction_data \u30D0\u30A4\u30C8\u914D\u5217
    • \u8907\u6570\u306E\u547D\u4EE4\u3092 1 \u3064\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u307E\u3068\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
    • \u305D\u308C\u305E\u308C\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u542B\u307E\u308C\u307E\u3059\u3002:
      • \u8AAD\u66F8\u3092\u884C\u3046\u4E88\u5B9A\u306E\u3059\u3079\u3066\u306E accounts \u3092\u683C\u7D0D\u3059\u308B\u914D\u5217
      • 1 \u3064\u4EE5\u4E0A\u306E instructions(\u547D\u4EE4)
      • \u6700\u8FD1\u306E blockhash
      • 1 \u3064\u4EE5\u4E0A\u306E signatures(\u7F72\u540D)
    • \u547D\u4EE4\u306F\u9806\u756A\u306B\u3001\u304B\u3064\u30A2\u30C8\u30DF\u30C3\u30AF\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002
    • \u4E00\u90E8\u306E\u547D\u4EE4\u304C\u5931\u6557\u3059\u308B\u3068\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304C\u5931\u6557\u3068\u3057\u3066\u51E6\u7406\u3055\u308C\u307E\u3059\u3002
    • \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306F 1232 \u30D0\u30A4\u30C8\u306B\u5236\u9650\u3055\u308C\u3066\u3044\u307E\u3059\u3002

    \u8A73\u7D30

    Solana\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u306F\u3001\u547D\u4EE4\u3084\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3067\u8AAD\u307F\u66F8\u304D\u3092\u884C\u3046\u4E88\u5B9A\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3059\u3079\u3066\u306E\u30EA\u30B9\u30C8\u304C\u660E\u793A\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
    \u3053\u308C\u306B\u3088\u308A\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u4E26\u5217\u5B9F\u884C\u304C\u53EF\u80FD\u306B\u306A\u308A\u307E\u3059\u3002

    \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u30AF\u30E9\u30B9\u30BF\u30FC\u306B\u9001\u4FE1\u3055\u308C\u308B\u3068\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u305D\u306E\u547D\u4EE4\u3092\u9806\u756A\u306B\u30A2\u30C8\u30DF\u30C3\u30AF\u306B\u51E6\u7406\u3057\u307E\u3059\u3002 \u547D\u4EE4\u3054\u3068\u306B\u3001\u53D7\u4FE1\u5074\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u30C7\u30FC\u30BF\u914D\u5217\u3092\u89E3\u91C8\u3057\u3001\u6307\u5B9A\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u64CD\u4F5C\u3057\u307E\u3059\u3002
    \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u6B63\u5E38\u7D42\u4E86\u3059\u308B\u304B\u3001\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\u3092\u8FD4\u3057\u3001\u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304C\u3059\u3050\u306B\u5931\u6557\u3057\u307E\u3059\u3002

    \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u5F15\u304D\u843D\u3068\u3057\u307E\u305F\u306F\u305D\u306E\u30C7\u30FC\u30BF\u306E\u5909\u66F4\u3092\u76EE\u7684\u3068\u3059\u308B\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u3001 \u30A2\u30AB\u30A6\u30F3\u30C8\u6240\u6709\u8005\u306E\u306E\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002 \u5909\u66F4\u3055\u308C\u308B\u3059\u3079\u3066\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F writable\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3055\u308C\u307E\u3059\u3002
    \u53D6\u5F15\u624B\u6570\u6599\u306E\u652F\u6255\u8005\u304C\u5FC5\u8981\u306Arent\u3068\u53D6\u5F15\u624B\u6570\u6599\u3092\u8CC4\u3046\u3053\u3068\u304C\u3067\u304D\u308C\u3070\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u6240\u6709\u8005\u306E\u8A31\u53EF\u306A\u304F\u5165\u91D1\u3059\u308B\u3053\u3068\u304C\u53EF\u80FD\u3067\u3059\u3002

    ',6),w=o("\u9001\u4FE1\u3059\u308B\u524D\u306B\u3001\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306F "),F={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},I=o("\u6700\u8FD1\u306Eblockhash"),L=o("\u3092\u78BA\u8A8D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002blockhash\u306F\u91CD\u8907\u3092\u9632\u304E\u3001\u53E4\u3044\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u6392\u9664\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u30D6\u30ED\u30C3\u30AF\u30CF\u30C3\u30B7\u30E5\u306E\u6700\u5927\u7D4C\u904E\u6642\u9593\u306F 150 \u30D6\u30ED\u30C3\u30AF\u3001\u3064\u307E\u308A\u7D04 1 \u5206 19 \u79D2\u3067\u3059\u3002"),N=e("h3",{id:"\u624B\u6570\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u624B\u6570\u6599","aria-hidden":"true"},"#"),o(" \u624B\u6570\u6599")],-1),R=e("p",null,"Solana \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306F 2 \u7A2E\u985E\u306E\u6599\u91D1\u3092\u5FB4\u53CE\u3057\u307E\u3059:",-1),V=o("\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u4F1D\u64AD\u3059\u308B\u305F\u3081\u306E"),j={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},B=o("Transaction fees"),E=o("(\u5225\u540D\u300C\u30AC\u30B9\u6599\u91D1\u300D)"),A=o("\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30C7\u30FC\u30BF\u4FDD\u5B58\u306E\u305F\u3081\u306E"),C={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},D=o("Rent fees"),J=s('

    Solana \u3067\u306F\u3001\u53D6\u5F15\u624B\u6570\u6599\u306F\u6C7A\u5B9A\u8AD6\u7684\u3067\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u304C\u6B21\u306E\u30D6\u30ED\u30C3\u30AF\u306B\u542B\u307E\u308C\u308B\u53EF\u80FD\u6027\u3092\u9AD8\u3081\u308B\u305F\u3081\u306B\u3001\u3088\u308A\u9AD8\u3044\u624B\u6570\u6599\u3092\u652F\u6255\u3046\u3053\u3068\u304C\u3067\u304D\u308B\u624B\u6570\u6599\u5E02\u5834\u306E\u6982\u5FF5\u306F\u3042\u308A\u307E\u305B\u3093\u3002
    \u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u6599\u91D1\u306F\u3001\u4F7F\u7528\u3055\u308C\u308B\u30EA\u30BD\u30FC\u30B9\u306E\u91CF\u3067\u306F\u306A\u304F\u3001\u5FC5\u8981\u306A\u7F72\u540D\u306E\u6570 (\u3064\u307E\u308A\u3001lamports_per_signature) \u306B\u3088\u3063\u3066\u306E\u307F\u6C7A\u5B9A\u3055\u308C\u307E\u3059\u3002 \u3053\u308C\u306F\u3001\u73FE\u5728\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B 1232 \u30D0\u30A4\u30C8\u306E\u53B3\u3057\u3044\u5236\u9650\u304C\u3042\u308B\u305F\u3081\u3067\u3059\u3002

    \u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u7F72\u540D\u3059\u308B\u305F\u3081\u306E writable \u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5C11\u306A\u304F\u3068\u3082 1 \u3064\u5FC5\u8981\u3067\u3059\u3002 \u9001\u4FE1\u3055\u308C\u308B\u3068\u3001\u6700\u521D\u306B\u30B7\u30EA\u30A2\u30EB\u5316\u3055\u308C\u305F writable \u306A\u7F72\u540D\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6599\u91D1\u306E\u652F\u6255\u3044\u8005\u306B\u306A\u308A\u307E\u3059\u3002
    \u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u6210\u529F\u307E\u305F\u306F\u5931\u6557\u306B\u95A2\u4FC2\u306A\u304F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u8CBB\u7528\u3092\u652F\u6255\u3044\u307E\u3059\u3002 \u624B\u6570\u6599\u306E\u652F\u6255\u8005\u304C\u53D6\u5F15\u624B\u6570\u6599\u3092\u652F\u6255\u3046\u306E\u306B\u5341\u5206\u306A\u6B8B\u9AD8\u3092\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\u3001\u53D6\u5F15\u306F\u4E2D\u6B62\u3055\u308C\u307E\u3059\u3002

    \u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u306F\u3001\u3059\u3079\u3066\u306E\u53D6\u5F15\u624B\u6570\u6599\u306E 50% \u304C\u30D6\u30ED\u30C3\u30AF\u3092\u751F\u6210\u3059\u308B\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u3088\u3063\u3066\u53CE\u96C6\u3055\u308C\u3001\u6B8B\u308A\u306E 50% \u306F\u30D0\u30FC\u30F3\u3055\u308C\u307E\u3059\u3002
    \u3053\u306E\u69CB\u9020\u306B\u3088\u308A\u3001\u30EA\u30FC\u30C0\u30FC\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u306Eslot\u4E2D\u306B\u3067\u304D\u308B\u3060\u3051\u591A\u304F\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u51E6\u7406\u3059\u308B\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u30A4\u30F3\u30BB\u30F3\u30C6\u30A3\u30D6\u3092\u4E0E\u3048\u308B\u3088\u3046\u6A5F\u80FD\u3057\u307E\u3059\u3002

    \u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599

    ',4),H={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},M=o("Official Documentation"),O={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},P=o("Transaction Structure"),q={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},z=o("Transaction Fees by Justin Starry"),G={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},K=o("An Introduction to Solana by Hana"),Q={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},U=o("Transaction Processing by Jito Labs"),W={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},X=o("Solana Transaction in Depth by Alex Miller");function Y(Z,$){const r=a("RouterLink"),n=a("ExternalLinkIcon");return l(),c(_,null,[p,e("p",null,[u,t(r,{to:"/ja/core-concepts/programs.html"},{default:d(()=>[m]),_:1}),b,f,g,e("a",k,[x,t(n)]),S,v,y]),T,e("p",null,[w,e("a",F,[I,t(n)]),L]),N,R,e("ul",null,[e("li",null,[V,e("a",j,[B,t(n)]),E]),e("li",null,[A,e("a",C,[D,t(n)])])]),J,e("ul",null,[e("li",null,[e("a",H,[M,t(n)])]),e("li",null,[e("a",O,[P,t(n)])]),e("li",null,[e("a",q,[z,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",Q,[U,t(n)])]),e("li",null,[e("a",W,[X,t(n)])])])],64)}var oe=i(h,[["render",Y]]);export{oe as default}; +import{_ as i,r as a,o as l,c,a as e,b as t,w as d,F as _,d as o,e as s}from"./app.d411e3b3.js";const h={},p=e("h1",{id:"\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u30C8\u30E9\u30F3\u30B5\u3099\u30AF\u30B7\u30E7\u30F3","aria-hidden":"true"},"#"),o(" \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3")],-1),u=o("\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u30AF\u30E9\u30B9\u30BF\u30FC\u306B\u9001\u4FE1\u3059\u308B\u3053\u3068\u3067 "),m=o("programs"),b=o(" \u3092\u547C\u3073\u51FA\u305B\u307E\u3059\u3002"),f=e("br",null,null,-1),g=o(" 1 \u3064\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u8907\u6570\u306EInstructions(\u547D\u4EE4)\u3092\u542B\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u3001\u305D\u308C\u305E\u308C\u304C\u72EC\u81EA\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u3092\u5BFE\u8C61\u3068\u3057\u3066\u3044\u307E\u3059\u3002 \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u9001\u4FE1\u3055\u308C\u308B\u3068\u3001Solana "),k={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},x=o("Runtime"),S=o(" \u306F \u305D\u306E\u547D\u4EE4\u3092\u9806\u756A\u306B\u304B\u3064\u3001\u30A2\u30C8\u30DF\u30C3\u30AF\u306B\u51E6\u7406\u3057\u307E\u3059\u3002"),v=e("br",null,null,-1),y=o(" \u3064\u307E\u308A\u3001\u4E00\u90E8\u306E\u547D\u4EE4\u304C\u5931\u6557\u3059\u308B\u3068\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304C\u5931\u6557\u3068\u3057\u3066\u51E6\u7406\u3055\u308C\u307E\u3059\u3002"),T=s('

    \u6982\u8981

    Fact Sheet

    • Instructions(\u547D\u4EE4) \u306F\u3001Solana \u306E\u6700\u3082\u57FA\u672C\u7684\u306A\u64CD\u4F5C\u5358\u4F4D\u3067\u3059\u3002
    • \u305D\u308C\u305E\u308C\u306E\u547D\u4EE4\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u542B\u307E\u308C\u307E\u3059\u3002:
      • \u76EE\u7684\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306E program_id
      • \u8AAD\u66F8\u3092\u884C\u3046\u4E88\u5B9A\u306E\u3059\u3079\u3066\u306E accounts \u3092\u683C\u7D0D\u3059\u308B\u914D\u5217
      • \u76EE\u7684\u306E\u30D7\u30ED\u30B0\u30E9\u30E0\u306B\u56FA\u6709\u306E instruction_data \u30D0\u30A4\u30C8\u914D\u5217
    • \u8907\u6570\u306E\u547D\u4EE4\u3092 1 \u3064\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u307E\u3068\u3081\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002
    • \u305D\u308C\u305E\u308C\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u542B\u307E\u308C\u307E\u3059\u3002:
      • \u8AAD\u66F8\u3092\u884C\u3046\u4E88\u5B9A\u306E\u3059\u3079\u3066\u306E accounts \u3092\u683C\u7D0D\u3059\u308B\u914D\u5217
      • 1 \u3064\u4EE5\u4E0A\u306E instructions(\u547D\u4EE4)
      • \u6700\u8FD1\u306E blockhash
      • 1 \u3064\u4EE5\u4E0A\u306E signatures(\u7F72\u540D)
    • \u547D\u4EE4\u306F\u9806\u756A\u306B\u3001\u304B\u3064\u30A2\u30C8\u30DF\u30C3\u30AF\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002
    • \u4E00\u90E8\u306E\u547D\u4EE4\u304C\u5931\u6557\u3059\u308B\u3068\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304C\u5931\u6557\u3068\u3057\u3066\u51E6\u7406\u3055\u308C\u307E\u3059\u3002
    • \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306F 1232 \u30D0\u30A4\u30C8\u306B\u5236\u9650\u3055\u308C\u3066\u3044\u307E\u3059\u3002

    \u8A73\u7D30

    Solana\u30E9\u30F3\u30BF\u30A4\u30E0\u3067\u306F\u3001\u547D\u4EE4\u3084\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3067\u8AAD\u307F\u66F8\u304D\u3092\u884C\u3046\u4E88\u5B9A\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3059\u3079\u3066\u306E\u30EA\u30B9\u30C8\u304C\u660E\u793A\u3055\u308C\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
    \u3053\u308C\u306B\u3088\u308A\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u4E26\u5217\u5B9F\u884C\u304C\u53EF\u80FD\u306B\u306A\u308A\u307E\u3059\u3002

    \u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u304C\u30AF\u30E9\u30B9\u30BF\u30FC\u306B\u9001\u4FE1\u3055\u308C\u308B\u3068\u3001\u30E9\u30F3\u30BF\u30A4\u30E0\u306F\u305D\u306E\u547D\u4EE4\u3092\u9806\u756A\u306B\u30A2\u30C8\u30DF\u30C3\u30AF\u306B\u51E6\u7406\u3057\u307E\u3059\u3002 \u547D\u4EE4\u3054\u3068\u306B\u3001\u53D7\u4FE1\u5074\u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u30C7\u30FC\u30BF\u914D\u5217\u3092\u89E3\u91C8\u3057\u3001\u6307\u5B9A\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u64CD\u4F5C\u3057\u307E\u3059\u3002
    \u30D7\u30ED\u30B0\u30E9\u30E0\u306F\u6B63\u5E38\u7D42\u4E86\u3059\u308B\u304B\u3001\u30A8\u30E9\u30FC\u30B3\u30FC\u30C9\u3092\u8FD4\u3057\u3001\u30A8\u30E9\u30FC\u304C\u8FD4\u3055\u308C\u305F\u5834\u5408\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u5168\u4F53\u304C\u3059\u3050\u306B\u5931\u6557\u3057\u307E\u3059\u3002

    \u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u5F15\u304D\u843D\u3068\u3057\u307E\u305F\u306F\u305D\u306E\u30C7\u30FC\u30BF\u306E\u5909\u66F4\u3092\u76EE\u7684\u3068\u3059\u308B\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u3001 \u30A2\u30AB\u30A6\u30F3\u30C8\u6240\u6709\u8005\u306E\u306E\u7F72\u540D\u304C\u5FC5\u8981\u3067\u3059\u3002 \u5909\u66F4\u3055\u308C\u308B\u3059\u3079\u3066\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F writable\u3068\u3057\u3066\u30DE\u30FC\u30AF\u3055\u308C\u307E\u3059\u3002
    \u53D6\u5F15\u624B\u6570\u6599\u306E\u652F\u6255\u8005\u304C\u5FC5\u8981\u306Arent\u3068\u53D6\u5F15\u624B\u6570\u6599\u3092\u8CC4\u3046\u3053\u3068\u304C\u3067\u304D\u308C\u3070\u3001\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u6240\u6709\u8005\u306E\u8A31\u53EF\u306A\u304F\u5165\u91D1\u3059\u308B\u3053\u3068\u304C\u53EF\u80FD\u3067\u3059\u3002

    ',6),w=o("\u9001\u4FE1\u3059\u308B\u524D\u306B\u3001\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306F "),F={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},I=o("\u6700\u8FD1\u306Eblockhash"),L=o("\u3092\u78BA\u8A8D\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002blockhash\u306F\u91CD\u8907\u3092\u9632\u304E\u3001\u53E4\u3044\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u6392\u9664\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u30D6\u30ED\u30C3\u30AF\u30CF\u30C3\u30B7\u30E5\u306E\u6700\u5927\u7D4C\u904E\u6642\u9593\u306F 150 \u30D6\u30ED\u30C3\u30AF\u3001\u3064\u307E\u308A\u7D04 1 \u5206 19 \u79D2\u3067\u3059\u3002"),N=e("h3",{id:"\u624B\u6570\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u624B\u6570\u6599","aria-hidden":"true"},"#"),o(" \u624B\u6570\u6599")],-1),R=e("p",null,"Solana \u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u306F 2 \u7A2E\u985E\u306E\u6599\u91D1\u3092\u5FB4\u53CE\u3057\u307E\u3059:",-1),V=o("\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u4F1D\u64AD\u3059\u308B\u305F\u3081\u306E"),j={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},B=o("Transaction fees"),E=o("(\u5225\u540D\u300C\u30AC\u30B9\u6599\u91D1\u300D)"),A=o("\u30AA\u30F3\u30C1\u30A7\u30FC\u30F3\u30C7\u30FC\u30BF\u4FDD\u5B58\u306E\u305F\u3081\u306E"),C={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},D=o("Rent fees"),J=s('

    Solana \u3067\u306F\u3001\u53D6\u5F15\u624B\u6570\u6599\u306F\u6C7A\u5B9A\u8AD6\u7684\u3067\u3059\u3002\u30E6\u30FC\u30B6\u30FC\u304C\u6B21\u306E\u30D6\u30ED\u30C3\u30AF\u306B\u542B\u307E\u308C\u308B\u53EF\u80FD\u6027\u3092\u9AD8\u3081\u308B\u305F\u3081\u306B\u3001\u3088\u308A\u9AD8\u3044\u624B\u6570\u6599\u3092\u652F\u6255\u3046\u3053\u3068\u304C\u3067\u304D\u308B\u624B\u6570\u6599\u5E02\u5834\u306E\u6982\u5FF5\u306F\u3042\u308A\u307E\u305B\u3093\u3002
    \u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u6599\u91D1\u306F\u3001\u4F7F\u7528\u3055\u308C\u308B\u30EA\u30BD\u30FC\u30B9\u306E\u91CF\u3067\u306F\u306A\u304F\u3001\u5FC5\u8981\u306A\u7F72\u540D\u306E\u6570 (\u3064\u307E\u308A\u3001lamports_per_signature) \u306B\u3088\u3063\u3066\u306E\u307F\u6C7A\u5B9A\u3055\u308C\u307E\u3059\u3002 \u3053\u308C\u306F\u3001\u73FE\u5728\u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B 1232 \u30D0\u30A4\u30C8\u306E\u53B3\u3057\u3044\u5236\u9650\u304C\u3042\u308B\u305F\u3081\u3067\u3059\u3002

    \u3059\u3079\u3066\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306B\u7F72\u540D\u3059\u308B\u305F\u3081\u306E writable \u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u5C11\u306A\u304F\u3068\u3082 1 \u3064\u5FC5\u8981\u3067\u3059\u3002 \u9001\u4FE1\u3055\u308C\u308B\u3068\u3001\u6700\u521D\u306B\u30B7\u30EA\u30A2\u30EB\u5316\u3055\u308C\u305F writable \u306A\u7F72\u540D\u8005\u30A2\u30AB\u30A6\u30F3\u30C8\u304C\u6599\u91D1\u306E\u652F\u6255\u3044\u8005\u306B\u306A\u308A\u307E\u3059\u3002
    \u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u6210\u529F\u307E\u305F\u306F\u5931\u6557\u306B\u95A2\u4FC2\u306A\u304F\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u306E\u8CBB\u7528\u3092\u652F\u6255\u3044\u307E\u3059\u3002 \u624B\u6570\u6599\u306E\u652F\u6255\u8005\u304C\u53D6\u5F15\u624B\u6570\u6599\u3092\u652F\u6255\u3046\u306E\u306B\u5341\u5206\u306A\u6B8B\u9AD8\u3092\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\u3001\u53D6\u5F15\u306F\u4E2D\u6B62\u3055\u308C\u307E\u3059\u3002

    \u3053\u306E\u8A18\u4E8B\u306E\u57F7\u7B46\u6642\u70B9\u3067\u306F\u3001\u3059\u3079\u3066\u306E\u53D6\u5F15\u624B\u6570\u6599\u306E 50% \u304C\u30D6\u30ED\u30C3\u30AF\u3092\u751F\u6210\u3059\u308B\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u3088\u3063\u3066\u53CE\u96C6\u3055\u308C\u3001\u6B8B\u308A\u306E 50% \u306F\u30D0\u30FC\u30F3\u3055\u308C\u307E\u3059\u3002
    \u3053\u306E\u69CB\u9020\u306B\u3088\u308A\u3001\u30EA\u30FC\u30C0\u30FC\u30B9\u30B1\u30B8\u30E5\u30FC\u30EB\u306Eslot\u4E2D\u306B\u3067\u304D\u308B\u3060\u3051\u591A\u304F\u306E\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u3092\u51E6\u7406\u3059\u308B\u30D0\u30EA\u30C7\u30FC\u30BF\u30FC\u306B\u30A4\u30F3\u30BB\u30F3\u30C6\u30A3\u30D6\u3092\u4E0E\u3048\u308B\u3088\u3046\u6A5F\u80FD\u3057\u307E\u3059\u3002

    \u305D\u306E\u4ED6\u53C2\u8003\u8CC7\u6599

    ',4),H={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},M=o("Official Documentation"),O={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},P=o("Transaction Structure"),q={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},z=o("Transaction Fees by Justin Starry"),G={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},K=o("An Introduction to Solana by Hana"),Q={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},U=o("Transaction Processing by Jito Labs"),W={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},X=o("Solana Transaction in Depth by Alex Miller");function Y(Z,$){const r=a("RouterLink"),n=a("ExternalLinkIcon");return l(),c(_,null,[p,e("p",null,[u,t(r,{to:"/ja/core-concepts/programs.html"},{default:d(()=>[m]),_:1}),b,f,g,e("a",k,[x,t(n)]),S,v,y]),T,e("p",null,[w,e("a",F,[I,t(n)]),L]),N,R,e("ul",null,[e("li",null,[V,e("a",j,[B,t(n)]),E]),e("li",null,[A,e("a",C,[D,t(n)])])]),J,e("ul",null,[e("li",null,[e("a",H,[M,t(n)])]),e("li",null,[e("a",O,[P,t(n)])]),e("li",null,[e("a",q,[z,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",Q,[U,t(n)])]),e("li",null,[e("a",W,[X,t(n)])])])],64)}var oe=i(h,[["render",Y]]);export{oe as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.46bc8b92.js b/docs/.vuepress/dist/assets/transactions.html.11b26fdb.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.46bc8b92.js rename to docs/.vuepress/dist/assets/transactions.html.11b26fdb.js index cd9f3fb46..f8c274083 100644 --- a/docs/.vuepress/dist/assets/transactions.html.46bc8b92.js +++ b/docs/.vuepress/dist/assets/transactions.html.11b26fdb.js @@ -1 +1 @@ -import{_ as s,r as i,o,c as l,a as e,b as r,w as d,F as h,d as n,e as c}from"./app.07ce7a66.js";const u={},g=e("h1",{id:"transaktionen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transaktionen","aria-hidden":"true"},"#"),n(" Transaktionen")],-1),m=n("Clients k\xF6nnen "),_=n("Programme"),b=n(" durch Senden einer Transaktion an einen Cluster aufrufen. Eine einzelne Transaktion kann mehrere Answeisungen beinhalten - jedes zielt auf sein eigenes Programm ab. Wenn eine Transaktion \xFCbermittelt wird, verarbeitet der Solana "),k={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},f=n("Runtime"),p=n(" seine Anweisungen der Reihe nach und atomar. Wenn ein Teil einer Anweisung fehlschl\xE4gt, schl\xE4gt die gesamte Transaktion fehl."),z=c('

    Fakten

    Fact Sheet

    • Anweisungen sind die grundlegendste operative Einheit auf Solana
    • Jede Anweisung enth\xE4lt:
    • Die program_id des beabsichtigten Programms
      • Ein Array aller Accounts, von denen gelesen oder in die geschrieben werden soll
      • Ein "instruction_data"-Byte-Array, das f\xFCr das vorgesehene Programm spezifisch ist
    • Mehrere Anweisungen k\xF6nnen zu einer einzigen Transaktion geb\xFCndelt werden
    • Jede Transaktion enth\xE4lt:
      • Ein Array aller Accounts, von denen gelesen oder in die geschrieben werden soll
      • Eine oder mehrere Anweisungen
      • Ein neuer Blockhash
      • Eine oder mehrere \u201ESignaturen\u201C.
    • Anweisungen werden der Reihe nach und atomar verarbeitet
    • Wenn ein Teil einer Anweisung fehlschl\xE4gt, schl\xE4gt die gesamte Transaktion fehl.
    • Transaktionen sind auf 1232 Bytes begrenzt

    Deep Dive

    Die Solana-Laufzeit erfordert sowohl Anweisungen als auch Transaktionen, um eine Liste aller Accounts anzugeben, von denen sie lesen oder in die sie schreiben m\xF6chten. Indem diese Accounts im Voraus angefordert werden, ist die Laufzeit in der Lage, die Ausf\xFChrung \xFCber alle Transaktionen hinweg zu parallelisieren.

    Wenn eine Transaktion an einen Cluster \xFCbermittelt wird, verarbeitet die Laufzeitumgebung ihre Anweisungen der Reihe nach und atomar. F\xFCr jede Anweisung interpretiert das empfangende Programm sein Datenarray und verarbeitet seine angegebenen Accounts. Das Programm kehrt entweder erfolgreich oder mit einem Fehlercode zur\xFCck. Wenn ein Fehler zur\xFCckgegeben wird, schl\xE4gt die gesamte Transaktion sofort fehl.

    Jede Transaktion, die darauf abzielt, ein Konto zu belasten oder seine Daten zu \xE4ndern, erfordert die Unterschrift seines Kontoinhabers. Jedes Konto, das ge\xE4ndert wird, wird als \u201Ebeschreibbar\u201C markiert. Ein Konto kann ohne Zustimmung des Inhabers gutgeschrieben werden, solange der Zahler der Transaktionsgeb\xFChr die erforderlichen Mieten und Transaktionsgeb\xFChren tr\xE4gt.

    ',6),w=n("Vor der \xDCbermittlung, m\xFCssen alle Transaktionen auf einen "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},T=n("aktuellen blockhash"),A=n(" verweisen. Der Blockhash wird verwendet, um Duplizierungen zu verhindern und veraltete Transaktionen zu beseitigen. Das maximale Alter des Blockhashs einer Transaktion betr\xE4gt 150 Bl\xF6cke oder etwa 1 Minute 19 Sekunden zum Zeitpunkt des Schreibens dieses Artikels."),D=e("h3",{id:"gebuhren",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#gebuhren","aria-hidden":"true"},"#"),n(" Geb\xFChren")],-1),E=e("p",null,"Das Solana-Netzwerk erhebt zwei Arten von Geb\xFChren:",-1),S={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},x=n("Transaktionsgeb\xFChren"),B=n(" zur Verbreitung der Transaktion (auch bekannt als \u201EGasgeb\xFChren\u201C)"),L={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},y=n("Mietgeb\xFChren"),K=n(" zum Speichern von Daten in der Kette"),F=e("p",null,"In Solana sind Transaktionsgeb\xFChren deterministisch: Es gibt kein Konzept f\xFCr einen Geb\xFChrenmarkt, auf dem Benutzer h\xF6here Geb\xFChren zahlen k\xF6nnen, um ihre Chancen zu erh\xF6hen, in den n\xE4chsten Block aufgenommen zu werden. Zum Zeitpunkt der Erstellung dieses Artikels werden die Transaktionsgeb\xFChren nur durch die Anzahl der erforderlichen Unterschriften (d. h. \u201Elamports_per_signature\u201C) bestimmt, nicht durch die Menge der verwendeten Ressourcen. Dies liegt daran, dass derzeit f\xFCr alle Transaktionen eine feste Obergrenze von 1232 Bytes gilt.",-1),G=e("p",null,"Alle Transaktionen erfordern mindestens ein \u201Ebeschreibbares\u201C Konto, um die Transaktion zu signieren. Nach der \xDCbermittlung ist das zuerst serialisierte Konto des beschreibbaren Unterzeichners der Geb\xFChrenzahler. Dieses Konto zahlt f\xFCr die Kosten der Transaktion, unabh\xE4ngig davon, ob die Transaktion erfolgreich ist oder fehlschl\xE4gt. Wenn der Geb\xFChrenzahler nicht \xFCber ein ausreichendes Guthaben verf\xFCgt, um die Transaktionsgeb\xFChr zu bezahlen, wird die Transaktion abgebrochen.",-1),R=e("p",null,"Zum Zeitpunkt der Erstellung dieses Artikels werden 50 % aller Transaktionsgeb\xFChren von dem Validator eingezogen, der den Block produziert, w\xE4hrend die restlichen 50 % verbrannt werden. Diese Struktur dient dazu, die Pr\xFCfer dazu anzuregen, so viele Transaktionen wie m\xF6glich w\xE4hrend ihrer Slots im Leader-Zeitplan zu verarbeiten.",-1),V=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),n(" Other Resources")],-1),Z={href:"https://docs.solana.com/developing/programming-model/Transaktionen",target:"_blank",rel:"noopener noreferrer"},P=n("Offizielle Dokumentation"),C={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},J=n("Transaktionsstruktur"),M={href:"https://jstarry.notion.site/transactions-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},N=n("Transaktionsgeb\xFChren von Justin Starry"),W={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},I=n("Eine Einf\xFChhrung in Solana von Hana"),j={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},O=n("Transaktionsverarbeitung von Jito Labs"),U={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},q=n("Solana-Transaktion im Detail von Alex Miller");function H(Q,X){const a=i("RouterLink"),t=i("ExternalLinkIcon");return o(),l(h,null,[g,e("p",null,[m,r(a,{to:"/de/core-concepts/programs.html"},{default:d(()=>[_]),_:1}),b,e("a",k,[f,r(t)]),p]),z,e("p",null,[w,e("a",v,[T,r(t)]),A]),D,E,e("ul",null,[e("li",null,[e("a",S,[x,r(t)]),B]),e("li",null,[e("a",L,[y,r(t)]),K])]),F,G,R,V,e("ul",null,[e("li",null,[e("a",Z,[P,r(t)])]),e("li",null,[e("a",C,[J,r(t)])]),e("li",null,[e("a",M,[N,r(t)])]),e("li",null,[e("a",W,[I,r(t)])]),e("li",null,[e("a",j,[O,r(t)])]),e("li",null,[e("a",U,[q,r(t)])])])],64)}var $=s(u,[["render",H]]);export{$ as default}; +import{_ as s,r as i,o,c as l,a as e,b as r,w as d,F as h,d as n,e as c}from"./app.d411e3b3.js";const u={},g=e("h1",{id:"transaktionen",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transaktionen","aria-hidden":"true"},"#"),n(" Transaktionen")],-1),m=n("Clients k\xF6nnen "),_=n("Programme"),b=n(" durch Senden einer Transaktion an einen Cluster aufrufen. Eine einzelne Transaktion kann mehrere Answeisungen beinhalten - jedes zielt auf sein eigenes Programm ab. Wenn eine Transaktion \xFCbermittelt wird, verarbeitet der Solana "),k={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},f=n("Runtime"),p=n(" seine Anweisungen der Reihe nach und atomar. Wenn ein Teil einer Anweisung fehlschl\xE4gt, schl\xE4gt die gesamte Transaktion fehl."),z=c('

    Fakten

    Fact Sheet

    • Anweisungen sind die grundlegendste operative Einheit auf Solana
    • Jede Anweisung enth\xE4lt:
    • Die program_id des beabsichtigten Programms
      • Ein Array aller Accounts, von denen gelesen oder in die geschrieben werden soll
      • Ein "instruction_data"-Byte-Array, das f\xFCr das vorgesehene Programm spezifisch ist
    • Mehrere Anweisungen k\xF6nnen zu einer einzigen Transaktion geb\xFCndelt werden
    • Jede Transaktion enth\xE4lt:
      • Ein Array aller Accounts, von denen gelesen oder in die geschrieben werden soll
      • Eine oder mehrere Anweisungen
      • Ein neuer Blockhash
      • Eine oder mehrere \u201ESignaturen\u201C.
    • Anweisungen werden der Reihe nach und atomar verarbeitet
    • Wenn ein Teil einer Anweisung fehlschl\xE4gt, schl\xE4gt die gesamte Transaktion fehl.
    • Transaktionen sind auf 1232 Bytes begrenzt

    Deep Dive

    Die Solana-Laufzeit erfordert sowohl Anweisungen als auch Transaktionen, um eine Liste aller Accounts anzugeben, von denen sie lesen oder in die sie schreiben m\xF6chten. Indem diese Accounts im Voraus angefordert werden, ist die Laufzeit in der Lage, die Ausf\xFChrung \xFCber alle Transaktionen hinweg zu parallelisieren.

    Wenn eine Transaktion an einen Cluster \xFCbermittelt wird, verarbeitet die Laufzeitumgebung ihre Anweisungen der Reihe nach und atomar. F\xFCr jede Anweisung interpretiert das empfangende Programm sein Datenarray und verarbeitet seine angegebenen Accounts. Das Programm kehrt entweder erfolgreich oder mit einem Fehlercode zur\xFCck. Wenn ein Fehler zur\xFCckgegeben wird, schl\xE4gt die gesamte Transaktion sofort fehl.

    Jede Transaktion, die darauf abzielt, ein Konto zu belasten oder seine Daten zu \xE4ndern, erfordert die Unterschrift seines Kontoinhabers. Jedes Konto, das ge\xE4ndert wird, wird als \u201Ebeschreibbar\u201C markiert. Ein Konto kann ohne Zustimmung des Inhabers gutgeschrieben werden, solange der Zahler der Transaktionsgeb\xFChr die erforderlichen Mieten und Transaktionsgeb\xFChren tr\xE4gt.

    ',6),w=n("Vor der \xDCbermittlung, m\xFCssen alle Transaktionen auf einen "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},T=n("aktuellen blockhash"),A=n(" verweisen. Der Blockhash wird verwendet, um Duplizierungen zu verhindern und veraltete Transaktionen zu beseitigen. Das maximale Alter des Blockhashs einer Transaktion betr\xE4gt 150 Bl\xF6cke oder etwa 1 Minute 19 Sekunden zum Zeitpunkt des Schreibens dieses Artikels."),D=e("h3",{id:"gebuhren",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#gebuhren","aria-hidden":"true"},"#"),n(" Geb\xFChren")],-1),E=e("p",null,"Das Solana-Netzwerk erhebt zwei Arten von Geb\xFChren:",-1),S={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},x=n("Transaktionsgeb\xFChren"),B=n(" zur Verbreitung der Transaktion (auch bekannt als \u201EGasgeb\xFChren\u201C)"),L={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},y=n("Mietgeb\xFChren"),K=n(" zum Speichern von Daten in der Kette"),F=e("p",null,"In Solana sind Transaktionsgeb\xFChren deterministisch: Es gibt kein Konzept f\xFCr einen Geb\xFChrenmarkt, auf dem Benutzer h\xF6here Geb\xFChren zahlen k\xF6nnen, um ihre Chancen zu erh\xF6hen, in den n\xE4chsten Block aufgenommen zu werden. Zum Zeitpunkt der Erstellung dieses Artikels werden die Transaktionsgeb\xFChren nur durch die Anzahl der erforderlichen Unterschriften (d. h. \u201Elamports_per_signature\u201C) bestimmt, nicht durch die Menge der verwendeten Ressourcen. Dies liegt daran, dass derzeit f\xFCr alle Transaktionen eine feste Obergrenze von 1232 Bytes gilt.",-1),G=e("p",null,"Alle Transaktionen erfordern mindestens ein \u201Ebeschreibbares\u201C Konto, um die Transaktion zu signieren. Nach der \xDCbermittlung ist das zuerst serialisierte Konto des beschreibbaren Unterzeichners der Geb\xFChrenzahler. Dieses Konto zahlt f\xFCr die Kosten der Transaktion, unabh\xE4ngig davon, ob die Transaktion erfolgreich ist oder fehlschl\xE4gt. Wenn der Geb\xFChrenzahler nicht \xFCber ein ausreichendes Guthaben verf\xFCgt, um die Transaktionsgeb\xFChr zu bezahlen, wird die Transaktion abgebrochen.",-1),R=e("p",null,"Zum Zeitpunkt der Erstellung dieses Artikels werden 50 % aller Transaktionsgeb\xFChren von dem Validator eingezogen, der den Block produziert, w\xE4hrend die restlichen 50 % verbrannt werden. Diese Struktur dient dazu, die Pr\xFCfer dazu anzuregen, so viele Transaktionen wie m\xF6glich w\xE4hrend ihrer Slots im Leader-Zeitplan zu verarbeiten.",-1),V=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),n(" Other Resources")],-1),Z={href:"https://docs.solana.com/developing/programming-model/Transaktionen",target:"_blank",rel:"noopener noreferrer"},P=n("Offizielle Dokumentation"),C={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},J=n("Transaktionsstruktur"),M={href:"https://jstarry.notion.site/transactions-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},N=n("Transaktionsgeb\xFChren von Justin Starry"),W={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},I=n("Eine Einf\xFChhrung in Solana von Hana"),j={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},O=n("Transaktionsverarbeitung von Jito Labs"),U={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},q=n("Solana-Transaktion im Detail von Alex Miller");function H(Q,X){const a=i("RouterLink"),t=i("ExternalLinkIcon");return o(),l(h,null,[g,e("p",null,[m,r(a,{to:"/de/core-concepts/programs.html"},{default:d(()=>[_]),_:1}),b,e("a",k,[f,r(t)]),p]),z,e("p",null,[w,e("a",v,[T,r(t)]),A]),D,E,e("ul",null,[e("li",null,[e("a",S,[x,r(t)]),B]),e("li",null,[e("a",L,[y,r(t)]),K])]),F,G,R,V,e("ul",null,[e("li",null,[e("a",Z,[P,r(t)])]),e("li",null,[e("a",C,[J,r(t)])]),e("li",null,[e("a",M,[N,r(t)])]),e("li",null,[e("a",W,[I,r(t)])]),e("li",null,[e("a",j,[O,r(t)])]),e("li",null,[e("a",U,[q,r(t)])])])],64)}var $=s(u,[["render",H]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.93abdb49.js b/docs/.vuepress/dist/assets/transactions.html.147b8767.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.93abdb49.js rename to docs/.vuepress/dist/assets/transactions.html.147b8767.js index 042a82445..d0dc2db7f 100644 --- a/docs/.vuepress/dist/assets/transactions.html.93abdb49.js +++ b/docs/.vuepress/dist/assets/transactions.html.147b8767.js @@ -1 +1 @@ -import{_ as s,r as a,o as c,c as i,a as n,b as t,w as l,F as d,d as o,e as h}from"./app.07ce7a66.js";const _={},u=n("h1",{id:"transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),o(" Transactions")],-1),p=o("Client\uB4E4\uC740 Cluster\uC5D0 Transaction\uC744 \uBCF4\uB0C4\uC73C\uB85C\uC368 "),m=o("programs"),f=o("\uB4E4\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4. \uD558\uB098\uC758 Transaction\uC740 \uAC01\uC790\uC758 Program\uC744 \uB300\uC0C1\uC73C\uB85C \uD558\uB294 \uB2E4\uC218\uC758 Instruction\uB4E4\uC744 \uD3EC\uD568\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. Transaction\uC774 \uBCF4\uB0B4\uC84C\uC744 \uB54C, Solana "),T={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=o("Runtime"),b=o("\uC740 Transaction\uC758 Instruction\uB4E4\uC744 \uC21C\uC11C\uB300\uB85C \uCC98\uB9AC\uD560 \uAC83\uC785\uB2C8\uB2E4. \uB9CC\uC57D \uD55C Instruction\uC758 \uC5B4\uB5A4 \uBD80\uBD84\uC774\uB77C\uB3C4 \uC2E4\uD328\uD55C\uB2E4\uBA74, \uC804\uCCB4 Transaction\uC740 \uC2E4\uD328\uD560 \uAC83\uC785\uB2C8\uB2E4."),k=h('

    Facts

    Fact Sheet

    • Instruction\uC740 Solana\uC5D0\uC11C \uAC00\uC7A5 \uAE30\uBCF8\uC801\uC778 \uC5F0\uC0B0 \uB2E8\uC704\uC785\uB2C8\uB2E4.
    • \uAC01 Instruction\uC740 \uC544\uB798 \uB0B4\uC6A9\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4:
      • \uB300\uC0C1 Program\uC758 program_id
      • \uC77D\uAC70\uB098 \uC4F8\uB824\uACE0 \uD558\uB294 \uBAA8\uB4E0 accounts\uB97C \uB2F4\uC740 \uD558\uB098\uC758 Array
      • \uB300\uC0C1 Program\uC5D0 \uBA85\uC2DC\uB41C byte array \uD615\uD0DC\uC758 instruction_data
    • \uB2E4\uC218\uC758 Instruction\uB4E4\uC740 \uD558\uB098\uC758 Transaction\uC73C\uB85C \uBB36\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
    • \uAC01 Transaction\uC740 \uC544\uB798 \uB0B4\uC6A9\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4:
      • \uC77D\uAC70\uB098 \uC4F8\uB824\uACE0 \uD558\uB294 \uBAA8\uB4E0 accounts\uB97C \uB2F4\uC740 \uD558\uB098\uC758 Array
      • \uD558\uB098 \uC774\uC0C1\uC758 instructions
      • \uCD5C\uADFC blockhash
      • \uD558\uB098 \uC774\uC0C1\uC758 signatures
    • Instruction\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCC98\uB9AC\uB41C\uB2E4.
    • \uB9CC\uC57D Instuction\uC758 \uD55C \uBD80\uBD84\uC774\uB77C\uB3C4 \uC2E4\uD328\uD55C\uB2E4\uBA74, \uC804\uCCB4 Transaction\uC740 \uC2E4\uD328\uD55C\uB2E4.
    • Transaction\uC740 1232 \uBC14\uC774\uD2B8\uB85C \uC81C\uD55C\uB41C\uB2E4.

    Deep Dive

    Solana Runtime\uC740 Instruction\uACFC Transaction \uB458 \uBAA8\uB450\uC5D0\uAC8C \uC77D\uAC70\uB098 \uC4F8 \uBAA8\uB4E0 Account\uC758 \uBAA9\uB85D\uC744 \uBA85\uC2DC\uD558\uB3C4\uB85D \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC0AC\uC804\uC5D0 Account\uB4E4\uC758 \uBAA9\uB85D\uC744 \uC694\uAD6C\uD568\uC73C\uB85C\uC368, Runtime\uC740 \uBAA8\uB4E0 Transaction\uB4E4\uC744 \uBCD1\uB82C\uB85C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    \uD55C Transaction\uC774 Cluster\uB85C \uBCF4\uB0B4\uC9C0\uBA74, Runtime\uC740 \uC774 Transaction\uC758 Instruction\uB4E4\uC744 \uC21C\uCC28\uB85C \uCC98\uB9AC\uD560 \uAC83\uC785\uB2C8\uB2E4. \uAC01 Instruction\uC744 \uBC1B\uB294 Program\uC740 Instruction\uC758 \uB370\uC774\uD130\uB97C \uD574\uC11D\uD558\uACE0 \uBA85\uC2DC\uB41C Account\uB4E4\uC744 \uB3D9\uC791\uC2DC\uD0AC \uAC83\uC785\uB2C8\uB2E4. Program\uC740 \uC131\uACF5\uC744 \uBC18\uD658\uD560 \uC218\uB3C4 \uC788\uACE0 \uC5D0\uB7EC \uCF54\uB4DC\uB97C \uBC18\uD658\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uC5D0\uB7EC\uAC00 \uBC18\uD658\uB418\uBA74, Transaction\uC740 \uC989\uC2DC \uC2E4\uD328\uD560 \uAC83\uC785\uB2C8\uB2E4.

    Account\uC758 \uB370\uC774\uD130\uB97C \uBCC0\uACBD\uD558\uAC70\uB098 \uCD9C\uAE08\uD558\uB824\uACE0 \uD558\uB294 Transaction\uC5D0\uB294 \uD574\uB2F9 Account \uC18C\uC720\uC790\uC758 \uC11C\uBA85\uC774 \uC694\uAD6C\uB429\uB2C8\uB2E4. \uBCC0\uACBD\uB420 Account\uB294 wriable \uD45C\uC2DC\uB429\uB2C8\uB2E4. Transaction \uC694\uAE08 \uC9C0\uBD88\uC790\uAC00 \uD544\uC694\uD55C rent\uC640 Transaction \uC694\uAE08\uC744 \uC9C0\uBD88\uD55C\uB2E4\uBA74, Account\uC5D0 \uC785\uAE08\uD558\uB294 \uB370\uC5D0\uB294 \uC18C\uC720\uC790\uC758 \uC11C\uBA85\uC774 \uD544\uC694\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.

    ',6),I=o("\uBAA8\uB4E0 Transaction\uB4E4\uC740 \uC804\uC1A1 \uC804\uC5D0 "),A={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},x=o("recent blockhash"),v=o("\uB97C \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4. Blockhash\uB294 \uC911\uBCF5\uC744 \uBC29\uC9C0\uD558\uACE0 \uC624\uB798\uB41C Transaction\uC744 \uC81C\uAC70\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. Transaction Blockhash\uB294 \uCD5C\uB300 150 blocks\uAE4C\uC9C0, \uD639\uC740 \uCD5C\uB300 1\uBD84 19\uCD08\uAE4C\uC9C0 \uD5C8\uC6A9\uB429\uB2C8\uB2E4."),y=n("h3",{id:"fees",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fees","aria-hidden":"true"},"#"),o(" Fees")],-1),S=n("p",null,"Solana \uB124\uD2B8\uC6CC\uD06C\uB294 \uB450 \uC885\uB958\uC758 \uC694\uAE08\uC744 \uAC77\uC2B5\uB2C8\uB2E4.",-1),R=o("Transaction \uC804\uD30C\uB97C \uC704\uD55C "),B={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},F=o("Transaction fees"),P=o(" (\u201Dgas fees\u201D \uB77C\uACE0 \uC54C\uB824\uC9C4)"),V=o("On-chain\uC5D0 \uB370\uC774\uD130 \uC800\uC7A5\uC744 \uC704\uD55C "),w={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},C=o("Rent fees"),L=n("p",null,[o("Solana\uC758 Transaction fees\uC5D0\uB294 \uC0AC\uC6A9\uC790\uB4E4\uC774 \uB2E4\uC74C block\uC5D0 \uD3EC\uD568\uB420 \uAE30\uD68C\uB97C \uC99D\uAC00\uC2DC\uD0A4\uAE30 \uC704\uD574 \uB354 \uB192\uC740 \uC694\uAE08\uC744 \uC9C0\uBD88\uD560 \uC218 \uC788\uB294 fee market \uAC1C\uB150\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uAE00\uC744 \uC4F0\uB294 \uC2DC\uC810\uC5D0, Transaction fees\uB294 \uC0AC\uC6A9\uB418\uB294 \uC790\uC6D0\uC758 \uC591\uC5D0 \uC758\uD574\uC11C\uAC00 \uC544\uB2C8\uB77C \uC624\uC9C1 \uC694\uAD6C\uB41C \uC11C\uBA85\uB4E4(i.e. "),n("code",null,"lamports_per_signature"),o(")\uC758 \uAC1C\uC218\uC5D0 \uC758\uD574 \uACB0\uC815\uB429\uB2C8\uB2E4. \uC774\uAC83\uC740 \uD604\uC7AC \uBAA8\uB4E0 Transaction\uB4E4\uC5D0 \uB300\uD55C 1232 \uBC14\uC774\uD2B8\uC758 \uC5C4\uACA9\uD55C \uD55C\uB3C4\uAC00 \uC874\uC7AC\uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.")],-1),D=n("p",null,[o("\uBAA8\uB4E0 Transaction\uC740 Transaction\uC5D0 \uC11C\uBA85\uD558\uAE30 \uC704\uD574 \uCD5C\uC18C \uD558\uB098\uC758 "),n("code",null,"writable"),o(" Account\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC804\uC1A1\uB420 \uB54C, \uCC98\uC74C \uC9C1\uB825\uD654\uB41C \uC218\uC815 \uAC00\uB2A5\uD55C \uC11C\uBA85\uC790 Account\uAC00 \uC694\uAE08 \uC9C0\uBD88\uC790\uAC00 \uB420 \uAC83\uC785\uB2C8\uB2E4. \uC774 Account\uB294 Transaction\uC774 \uC131\uACF5\uD558\uB294\uC9C0 \uC2E4\uD328\uD558\uB294\uC9C0\uC640 \uC0C1\uAD00\uC5C6\uC774 Transaction\uC5D0 \uB300\uD55C \uBE44\uC6A9\uC744 \uC9C0\uBD88\uD569\uB2C8\uB2E4. \uB9CC\uC57D \uC694\uAE08 \uC9C0\uBD88\uC790\uAC00 Transaction \uC694\uAE08\uC744 \uC9C0\uBD88\uD558\uAE30 \uC704\uD55C \uCDA9\uBD84\uD55C Balance\uB97C \uAC16\uACE0 \uC788\uC9C0 \uC54A\uB2E4\uBA74, \uC774 Transaction\uC740 \uAC70\uC808\uB429\uB2C8\uB2E4.")],-1),N=n("p",null,"\uC774 \uAE00\uC744 \uC791\uC131\uD558\uB294 \uC2DC\uC810\uC5D0\uB294, \uBAA8\uB4E0 Transaction \uC694\uAE08\uC758 50 \uD37C\uC13C\uD2B8\uB294 Block\uC744 \uC0DD\uC0B0\uD558\uB294 Validator\uAC00 \uAC00\uC838\uAC00\uACE0, \uB098\uBA38\uC9C0 50 \uD37C\uC13C\uD2B8\uB294 \uC18C\uBA78\uB429\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAD6C\uC870\uB294 Validator\uB4E4\uC774 \uAC00\uB2A5\uD55C \uB9CE\uC740 Transaction\uB4E4\uC744 \uCC98\uB9AC\uD558\uB3C4\uB85D \uBCF4\uC0C1\uD558\uAE30 \uC704\uD568\uC785\uB2C8\uB2E4.",-1),E=n("h2",{id:"other-resources",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),o(" Other Resources")],-1),O={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},j=o("Official Documentation"),J={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},H=o("Transaction Structure"),M={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},q=o("Transaction Fees by Justin Starry"),z={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},G=o("An Introduction to Solana by Hana"),K={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},Q=o("Transaction Processing by Jito Labs"),U={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},W=o("Solana Transaction in Depth by Alex Miller");function X(Y,Z){const r=a("RouterLink"),e=a("ExternalLinkIcon");return c(),i(d,null,[u,n("p",null,[p,t(r,{to:"/kr/core-concepts/programs.html"},{default:l(()=>[m]),_:1}),f,n("a",T,[g,t(e)]),b]),k,n("p",null,[I,n("a",A,[x,t(e)]),v]),y,S,n("ul",null,[n("li",null,[R,n("a",B,[F,t(e)]),P]),n("li",null,[V,n("a",w,[C,t(e)])])]),L,D,N,E,n("ul",null,[n("li",null,[n("a",O,[j,t(e)])]),n("li",null,[n("a",J,[H,t(e)])]),n("li",null,[n("a",M,[q,t(e)])]),n("li",null,[n("a",z,[G,t(e)])]),n("li",null,[n("a",K,[Q,t(e)])]),n("li",null,[n("a",U,[W,t(e)])])])],64)}var nn=s(_,[["render",X]]);export{nn as default}; +import{_ as s,r as a,o as c,c as i,a as n,b as t,w as l,F as d,d as o,e as h}from"./app.d411e3b3.js";const _={},u=n("h1",{id:"transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),o(" Transactions")],-1),p=o("Client\uB4E4\uC740 Cluster\uC5D0 Transaction\uC744 \uBCF4\uB0C4\uC73C\uB85C\uC368 "),m=o("programs"),f=o("\uB4E4\uC744 \uD638\uCD9C\uD569\uB2C8\uB2E4. \uD558\uB098\uC758 Transaction\uC740 \uAC01\uC790\uC758 Program\uC744 \uB300\uC0C1\uC73C\uB85C \uD558\uB294 \uB2E4\uC218\uC758 Instruction\uB4E4\uC744 \uD3EC\uD568\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. Transaction\uC774 \uBCF4\uB0B4\uC84C\uC744 \uB54C, Solana "),T={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=o("Runtime"),b=o("\uC740 Transaction\uC758 Instruction\uB4E4\uC744 \uC21C\uC11C\uB300\uB85C \uCC98\uB9AC\uD560 \uAC83\uC785\uB2C8\uB2E4. \uB9CC\uC57D \uD55C Instruction\uC758 \uC5B4\uB5A4 \uBD80\uBD84\uC774\uB77C\uB3C4 \uC2E4\uD328\uD55C\uB2E4\uBA74, \uC804\uCCB4 Transaction\uC740 \uC2E4\uD328\uD560 \uAC83\uC785\uB2C8\uB2E4."),k=h('

    Facts

    Fact Sheet

    • Instruction\uC740 Solana\uC5D0\uC11C \uAC00\uC7A5 \uAE30\uBCF8\uC801\uC778 \uC5F0\uC0B0 \uB2E8\uC704\uC785\uB2C8\uB2E4.
    • \uAC01 Instruction\uC740 \uC544\uB798 \uB0B4\uC6A9\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4:
      • \uB300\uC0C1 Program\uC758 program_id
      • \uC77D\uAC70\uB098 \uC4F8\uB824\uACE0 \uD558\uB294 \uBAA8\uB4E0 accounts\uB97C \uB2F4\uC740 \uD558\uB098\uC758 Array
      • \uB300\uC0C1 Program\uC5D0 \uBA85\uC2DC\uB41C byte array \uD615\uD0DC\uC758 instruction_data
    • \uB2E4\uC218\uC758 Instruction\uB4E4\uC740 \uD558\uB098\uC758 Transaction\uC73C\uB85C \uBB36\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.
    • \uAC01 Transaction\uC740 \uC544\uB798 \uB0B4\uC6A9\uC744 \uD3EC\uD568\uD569\uB2C8\uB2E4:
      • \uC77D\uAC70\uB098 \uC4F8\uB824\uACE0 \uD558\uB294 \uBAA8\uB4E0 accounts\uB97C \uB2F4\uC740 \uD558\uB098\uC758 Array
      • \uD558\uB098 \uC774\uC0C1\uC758 instructions
      • \uCD5C\uADFC blockhash
      • \uD558\uB098 \uC774\uC0C1\uC758 signatures
    • Instruction\uB4E4\uC740 \uC21C\uC11C\uB300\uB85C \uCC98\uB9AC\uB41C\uB2E4.
    • \uB9CC\uC57D Instuction\uC758 \uD55C \uBD80\uBD84\uC774\uB77C\uB3C4 \uC2E4\uD328\uD55C\uB2E4\uBA74, \uC804\uCCB4 Transaction\uC740 \uC2E4\uD328\uD55C\uB2E4.
    • Transaction\uC740 1232 \uBC14\uC774\uD2B8\uB85C \uC81C\uD55C\uB41C\uB2E4.

    Deep Dive

    Solana Runtime\uC740 Instruction\uACFC Transaction \uB458 \uBAA8\uB450\uC5D0\uAC8C \uC77D\uAC70\uB098 \uC4F8 \uBAA8\uB4E0 Account\uC758 \uBAA9\uB85D\uC744 \uBA85\uC2DC\uD558\uB3C4\uB85D \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC0AC\uC804\uC5D0 Account\uB4E4\uC758 \uBAA9\uB85D\uC744 \uC694\uAD6C\uD568\uC73C\uB85C\uC368, Runtime\uC740 \uBAA8\uB4E0 Transaction\uB4E4\uC744 \uBCD1\uB82C\uB85C \uC2E4\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.

    \uD55C Transaction\uC774 Cluster\uB85C \uBCF4\uB0B4\uC9C0\uBA74, Runtime\uC740 \uC774 Transaction\uC758 Instruction\uB4E4\uC744 \uC21C\uCC28\uB85C \uCC98\uB9AC\uD560 \uAC83\uC785\uB2C8\uB2E4. \uAC01 Instruction\uC744 \uBC1B\uB294 Program\uC740 Instruction\uC758 \uB370\uC774\uD130\uB97C \uD574\uC11D\uD558\uACE0 \uBA85\uC2DC\uB41C Account\uB4E4\uC744 \uB3D9\uC791\uC2DC\uD0AC \uAC83\uC785\uB2C8\uB2E4. Program\uC740 \uC131\uACF5\uC744 \uBC18\uD658\uD560 \uC218\uB3C4 \uC788\uACE0 \uC5D0\uB7EC \uCF54\uB4DC\uB97C \uBC18\uD658\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4. \uB9CC\uC57D \uC5D0\uB7EC\uAC00 \uBC18\uD658\uB418\uBA74, Transaction\uC740 \uC989\uC2DC \uC2E4\uD328\uD560 \uAC83\uC785\uB2C8\uB2E4.

    Account\uC758 \uB370\uC774\uD130\uB97C \uBCC0\uACBD\uD558\uAC70\uB098 \uCD9C\uAE08\uD558\uB824\uACE0 \uD558\uB294 Transaction\uC5D0\uB294 \uD574\uB2F9 Account \uC18C\uC720\uC790\uC758 \uC11C\uBA85\uC774 \uC694\uAD6C\uB429\uB2C8\uB2E4. \uBCC0\uACBD\uB420 Account\uB294 wriable \uD45C\uC2DC\uB429\uB2C8\uB2E4. Transaction \uC694\uAE08 \uC9C0\uBD88\uC790\uAC00 \uD544\uC694\uD55C rent\uC640 Transaction \uC694\uAE08\uC744 \uC9C0\uBD88\uD55C\uB2E4\uBA74, Account\uC5D0 \uC785\uAE08\uD558\uB294 \uB370\uC5D0\uB294 \uC18C\uC720\uC790\uC758 \uC11C\uBA85\uC774 \uD544\uC694\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.

    ',6),I=o("\uBAA8\uB4E0 Transaction\uB4E4\uC740 \uC804\uC1A1 \uC804\uC5D0 "),A={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},x=o("recent blockhash"),v=o("\uB97C \uCC38\uC870\uD574\uC57C \uD569\uB2C8\uB2E4. Blockhash\uB294 \uC911\uBCF5\uC744 \uBC29\uC9C0\uD558\uACE0 \uC624\uB798\uB41C Transaction\uC744 \uC81C\uAC70\uD558\uAE30 \uC704\uD574 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. Transaction Blockhash\uB294 \uCD5C\uB300 150 blocks\uAE4C\uC9C0, \uD639\uC740 \uCD5C\uB300 1\uBD84 19\uCD08\uAE4C\uC9C0 \uD5C8\uC6A9\uB429\uB2C8\uB2E4."),y=n("h3",{id:"fees",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#fees","aria-hidden":"true"},"#"),o(" Fees")],-1),S=n("p",null,"Solana \uB124\uD2B8\uC6CC\uD06C\uB294 \uB450 \uC885\uB958\uC758 \uC694\uAE08\uC744 \uAC77\uC2B5\uB2C8\uB2E4.",-1),R=o("Transaction \uC804\uD30C\uB97C \uC704\uD55C "),B={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},F=o("Transaction fees"),P=o(" (\u201Dgas fees\u201D \uB77C\uACE0 \uC54C\uB824\uC9C4)"),V=o("On-chain\uC5D0 \uB370\uC774\uD130 \uC800\uC7A5\uC744 \uC704\uD55C "),w={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},C=o("Rent fees"),L=n("p",null,[o("Solana\uC758 Transaction fees\uC5D0\uB294 \uC0AC\uC6A9\uC790\uB4E4\uC774 \uB2E4\uC74C block\uC5D0 \uD3EC\uD568\uB420 \uAE30\uD68C\uB97C \uC99D\uAC00\uC2DC\uD0A4\uAE30 \uC704\uD574 \uB354 \uB192\uC740 \uC694\uAE08\uC744 \uC9C0\uBD88\uD560 \uC218 \uC788\uB294 fee market \uAC1C\uB150\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uAE00\uC744 \uC4F0\uB294 \uC2DC\uC810\uC5D0, Transaction fees\uB294 \uC0AC\uC6A9\uB418\uB294 \uC790\uC6D0\uC758 \uC591\uC5D0 \uC758\uD574\uC11C\uAC00 \uC544\uB2C8\uB77C \uC624\uC9C1 \uC694\uAD6C\uB41C \uC11C\uBA85\uB4E4(i.e. "),n("code",null,"lamports_per_signature"),o(")\uC758 \uAC1C\uC218\uC5D0 \uC758\uD574 \uACB0\uC815\uB429\uB2C8\uB2E4. \uC774\uAC83\uC740 \uD604\uC7AC \uBAA8\uB4E0 Transaction\uB4E4\uC5D0 \uB300\uD55C 1232 \uBC14\uC774\uD2B8\uC758 \uC5C4\uACA9\uD55C \uD55C\uB3C4\uAC00 \uC874\uC7AC\uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4.")],-1),D=n("p",null,[o("\uBAA8\uB4E0 Transaction\uC740 Transaction\uC5D0 \uC11C\uBA85\uD558\uAE30 \uC704\uD574 \uCD5C\uC18C \uD558\uB098\uC758 "),n("code",null,"writable"),o(" Account\uB97C \uC694\uAD6C\uD569\uB2C8\uB2E4. \uC804\uC1A1\uB420 \uB54C, \uCC98\uC74C \uC9C1\uB825\uD654\uB41C \uC218\uC815 \uAC00\uB2A5\uD55C \uC11C\uBA85\uC790 Account\uAC00 \uC694\uAE08 \uC9C0\uBD88\uC790\uAC00 \uB420 \uAC83\uC785\uB2C8\uB2E4. \uC774 Account\uB294 Transaction\uC774 \uC131\uACF5\uD558\uB294\uC9C0 \uC2E4\uD328\uD558\uB294\uC9C0\uC640 \uC0C1\uAD00\uC5C6\uC774 Transaction\uC5D0 \uB300\uD55C \uBE44\uC6A9\uC744 \uC9C0\uBD88\uD569\uB2C8\uB2E4. \uB9CC\uC57D \uC694\uAE08 \uC9C0\uBD88\uC790\uAC00 Transaction \uC694\uAE08\uC744 \uC9C0\uBD88\uD558\uAE30 \uC704\uD55C \uCDA9\uBD84\uD55C Balance\uB97C \uAC16\uACE0 \uC788\uC9C0 \uC54A\uB2E4\uBA74, \uC774 Transaction\uC740 \uAC70\uC808\uB429\uB2C8\uB2E4.")],-1),N=n("p",null,"\uC774 \uAE00\uC744 \uC791\uC131\uD558\uB294 \uC2DC\uC810\uC5D0\uB294, \uBAA8\uB4E0 Transaction \uC694\uAE08\uC758 50 \uD37C\uC13C\uD2B8\uB294 Block\uC744 \uC0DD\uC0B0\uD558\uB294 Validator\uAC00 \uAC00\uC838\uAC00\uACE0, \uB098\uBA38\uC9C0 50 \uD37C\uC13C\uD2B8\uB294 \uC18C\uBA78\uB429\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAD6C\uC870\uB294 Validator\uB4E4\uC774 \uAC00\uB2A5\uD55C \uB9CE\uC740 Transaction\uB4E4\uC744 \uCC98\uB9AC\uD558\uB3C4\uB85D \uBCF4\uC0C1\uD558\uAE30 \uC704\uD568\uC785\uB2C8\uB2E4.",-1),E=n("h2",{id:"other-resources",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),o(" Other Resources")],-1),O={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},j=o("Official Documentation"),J={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},H=o("Transaction Structure"),M={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},q=o("Transaction Fees by Justin Starry"),z={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},G=o("An Introduction to Solana by Hana"),K={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},Q=o("Transaction Processing by Jito Labs"),U={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},W=o("Solana Transaction in Depth by Alex Miller");function X(Y,Z){const r=a("RouterLink"),e=a("ExternalLinkIcon");return c(),i(d,null,[u,n("p",null,[p,t(r,{to:"/kr/core-concepts/programs.html"},{default:l(()=>[m]),_:1}),f,n("a",T,[g,t(e)]),b]),k,n("p",null,[I,n("a",A,[x,t(e)]),v]),y,S,n("ul",null,[n("li",null,[R,n("a",B,[F,t(e)]),P]),n("li",null,[V,n("a",w,[C,t(e)])])]),L,D,N,E,n("ul",null,[n("li",null,[n("a",O,[j,t(e)])]),n("li",null,[n("a",J,[H,t(e)])]),n("li",null,[n("a",M,[q,t(e)])]),n("li",null,[n("a",z,[G,t(e)])]),n("li",null,[n("a",K,[Q,t(e)])]),n("li",null,[n("a",U,[W,t(e)])])])],64)}var nn=s(_,[["render",X]]);export{nn as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.1cb6f901.js b/docs/.vuepress/dist/assets/transactions.html.15106f80.js similarity index 98% rename from docs/.vuepress/dist/assets/transactions.html.1cb6f901.js rename to docs/.vuepress/dist/assets/transactions.html.15106f80.js index 19bcbff87..57654756f 100644 --- a/docs/.vuepress/dist/assets/transactions.html.1cb6f901.js +++ b/docs/.vuepress/dist/assets/transactions.html.15106f80.js @@ -1 +1 @@ -import{_ as r,r as i,o as e,c as s,a as n,b as c,w as l,F as u,d as t,e as a}from"./app.07ce7a66.js";const d={},g=n("h1",{id:"transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),t(" Transactions")],-1),_=t("Ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 g\u1ECDi "),p=t("Program"),m=t(" b\u1EB1ng c\xE1ch t\u1EA1o v\xE0 g\u1EEDi m\u1ED9t Transaction \u0111\u1EBFn m\u1EA1ng l\u01B0\u1EDBi Solana. M\u1ED9t Transaction c\xF3 th\u1EC3 ch\u1EE9a nhi\u1EC1u instruction b\xEAn trong, v\xE0 m\u1ED7i instruction c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi c\xE1c Program kh\xE1c nhau. Khi m\u1ED9t Transaction \u0111\u01B0\u1EE3c g\u1EEDi \u0111i, "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},k=t("Solana Runtime"),T=t(" s\u1EBD x\u1EED l\xFD c\xE1c instruction b\xEAn trong Transaction theo th\u1EE9 t\u1EF1 v\xE0 tu\u1EA7n t\u1EF1. N\u1EBFu c\xF3 b\u1EA5t k\u1EF3 instruction n\xE0o x\u1EA3y ra l\u1ED7i, to\xE0n b\u1ED9 Transaction s\u1EBD \u0111\u01B0\u1EE3c xem l\xE0 l\u1ED7i."),v=a('

    C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

    Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

    • C\xE1c instruction l\xE0 nh\u1EEFng \u0111\u01A1n v\u1ECB th\u1EF1c thi nh\u1ECF nh\u1EA5t tr\xEAn Solana
    • M\u1ED7i instruction s\u1EBD ch\u1EE9a:
      • program_id c\u1EE7a Program m\u1EE5c ti\xEAu
      • M\u1ED9t m\u1EA3ng t\u1EA5t c\u1EA3 accounts m\xE0 instruction mu\u1ED1n \u0111\u1ECDc ho\u1EB7c ghi
      • M\u1ED9t m\u1EA3ng byte instruction_data cung c\u1EA5p d\u1EEF li\u1EC7u \u0111\u1EA7u v\xE0o c\u1EE5 th\u1EC3 cho Program
    • Nhi\u1EC1u instruction c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c \u0111\xF3ng g\xF3i trong m\u1ED9t Transaction duy nh\u1EA5t
    • M\u1ED7i Transaction c\xF3 th\u1EC3 ch\u1EE9a:
      • M\u1ED9t m\u1EA3ng t\u1EA5t c\u1EA3 accounts m\xE0 Transaction mu\u1ED1n \u0111\u1ECDc ho\u1EB7c ghi
      • M\u1ED9t ho\u1EB7c nhi\u1EC1u instructions
      • blockhash hi\u1EC7n t\u1EA1i
      • M\u1ED9t ho\u1EB7c nhi\u1EC1u signatures
    • C\xE1c instruction s\u1EBD \u0111\u01B0\u1EE3c th\u1EF1c thi tu\u1EA7n t\u1EF1 v\xE0 theo th\u1EE9 t\u1EF1 trong Transaction
    • N\u1EBFu c\xF3 b\u1EA5t k\u1EF3 instruction n\xE0o x\u1EA3y ra l\u1ED7i, to\xE0n b\u1ED9 giao d\u1ECBch s\u1EBD \u0111\u01B0\u1EE3c xem l\xE0 l\u1ED7i
    • Transaction c\xF3 gi\u1EDBi h\u1EA1n dung l\u01B0\u1EE3ng l\xE0 1232 bytes

    Chi ti\u1EBFt

    Solana Runtime y\xEAu c\u1EA7u instruction v\xE0 Transaction ph\u1EA3i khai b\xE1o m\u1ED9t danh s\xE1ch t\u1EA5t c\u1EA3 c\xE1c Account m\xE0 ch\xFAng c\u1EA7n \u0111\u1ECDc ho\u1EB7c ghi d\u1EEF li\u1EC7u. B\u1EB1ng c\xE1ch y\xEAu c\u1EA7u nh\u1EEFng Account n\xE0y tr\u01B0\u1EDBc, Solana Runtime c\xF3 th\u1EC3 song song ho\xE1 qu\xE1 tr\xECnh th\u1EF1c thi xuy\xEAn su\u1ED1t t\u1EA5t c\u1EA3 c\xE1c Transaction.

    Khi m\u1ED9t Transaction \u0111\u01B0\u1EE3c g\u1EEDi v\xE0o m\u1EA1ng l\u01B0\u1EDBi, Solana Runtime s\u1EBD x\u1EED l\xFD c\xE1c instructions c\u1EE7a n\xF3 tu\u1EA7n t\u1EF1 t\u1EEBng instruction m\u1ED9t theo th\u1EE9 t\u1EF1 khai b\xE1o b\xEAn trong Transaction. V\u1EDBi m\u1ED7i instruction, Program \u0111\u01B0\u1EE3c truy v\u1EA5n s\u1EBD l\u1EA5y d\u1EEF li\u1EC7u t\u1EEB instruction v\xE0 th\u1EF1c thi tr\xEAn c\xE1c Account t\u01B0\u01A1ng \u1EE9ng trong instruction \u0111\xF3. Program ho\u1EB7c l\xE0 tr\u1EA3 v\u1EC1 k\u1EBFt qu\u1EA3 th\xE0nh c\xF4ng, ho\u1EB7c l\xE0 v\u1EDBi k\u1EBFt qu\u1EA3 l\u1ED7i v\u1EDBi m\xE3 l\u1ED7i t\u01B0\u01A1ng \u1EE9ng. V\u1EDBi b\u1EA5t k\u1EF3 l\u1ED7i n\xE0o \u0111\u01B0\u1EE3c tr\u1EA3 ra, to\xE0n b\u1ED9 Transaction s\u1EBD k\u1EBFt th\xFAc v\u1EDBi l\u1ED7i ngay l\u1EADp t\u1EE9c.

    B\u1EA5t k\u1EF3 Transaction n\xE0o m\xE0 thay \u0111\u1ED5i d\u1EEF li\u1EC7u c\u1EE7a Account hay r\xFAt lamports ra t\u1EEB Account th\xEC \u0111\u1EC1u c\u1EA7n y\xEAu c\u1EA7u ch\u1EEF k\xFD c\u1EE7a owner trong Account. B\u1EA5t k\u1EF3 Account n\xE0o khi c\u1EA7n \u0111\u01B0\u1EE3c s\u1EEDa \u0111\u1ED5i \u0111\u1EC1u ph\u1EA3i \u0111\xE1nh d\u1EA5u l\xE0 writable trong instruction t\u01B0\u01A1ng \u1EE9ng. M\u1ED9t Account c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c n\u1EA1p th\xEAm lamports m\xE0 kh\xF4ng c\u1EA7n xin ph\xE9p, ch\u1EC9 c\u1EA7n ng\u01B0\u1EDDi tr\u1EA3 ph\xED cho Transaction \u0111\u1EE7 kh\u1EA3 n\u0103ng chi tr\u1EA3 ph\xED thu\xEA v\xE0 ph\xED giao d\u1ECBch.

    ',6),f=t("Tr\u01B0\u1EDBc khi g\u1EEDi \u0111i, t\u1EA5t c\u1EA3 c\xE1c Transaction ph\u1EA3i tham chi\u1EBFu "),y={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},x=t("Blockhash"),A=t(" m\u1EDBi nh\u1EA5t. Blockhash \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 ch\u1ED1ng tr\xF9ng l\u1EB7p v\xE0 lo\u1EA1i b\u1ECF c\xE1c giao d\u1ECBch qu\xE1 h\u1EA1n. Th\u1EDDi h\u1EA1n t\u1ED1i \u0111a cho m\u1ED9t Transaction l\xE0 kh\xF4ng qu\xE1 150 blocks so v\u1EDBi Blockhash \u0111\u01B0\u1EE3c ghi, v\xE0 kho\u1EA3ng ch\u1EEBng 1 ph\xFAt 19 gi\xE2y theo \u01B0\u1EDBc t\xEDnh t\u1EA1i th\u1EDDi \u0111i\u1EC3m cu\u1ED1n s\xE1ch \u0111\u01B0\u1EE3c vi\u1EBFt."),S=n("h3",{id:"phi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#phi","aria-hidden":"true"},"#"),t(" Ph\xED")],-1),M=n("p",null,"M\u1EA1ng Solana s\u1EBD thu 2 lo\u1EA1i ph\xED:",-1),B={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},N=t("Ph\xED giao d\u1ECBch"),P=t(" cho vi\u1EC7c lan truy\u1EC1n Transaction (Hay th\u01B0\u1EDDng \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 ph\xED gas \u1EDF c\xE1c blockchain kh\xE1c)"),V={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},w=t("Ph\xED thu\xEA"),C=t(" v\xF9ng nh\u1EDB d\u1EEF li\u1EC7u cho Account"),q=a('

    Tr\xEAn Solana, ph\xED giao d\u1ECBch th\u01B0\u1EDDng b\u1EA5t bi\u1EBFn, ngh\u0129a l\xE0 kh\xF4ng c\xF3 kh\xE1i ni\u1EC7m v\u1EC1 \u0111\xE1nh ph\xED theo th\u1ECB tr\u01B0\u1EDDng n\u01A1i m\xE0 ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 tr\u1EA3 ph\xED cao h\u01A1n m\u1EB7t b\u1EB1ng \u0111\u1EC3 t\u0103ng c\u01A1 h\u1ED9i \u0111\u01B0\u1EE3c \u01B0u ti\xEAn th\u1EF1c thi Transaction tr\u01B0\u1EDBc. T\u1EA1i th\u1EDDi \u0111i\u1EC3m t\xE1c gi\u1EA3 vi\u1EBFt, ph\xED giao d\u1ECBch \u0111\u01B0\u1EE3c x\xE1c \u0111\u1ECBnh b\u1EB1ng s\u1ED1 l\u01B0\u1EE3ng ch\u1EEF k\xFD b\xEAn trong Transaction (c\u1EE5 th\u1EC3 l\xE0 lamports_per_signature), v\xE0 kh\xF4ng ph\u1EA3i b\u1EB1ng s\u1ED1 b\u01B0\u1EDBc t\xEDnh to\xE1n cho Transaction \u0111\xF3. \u0110i\u1EC1u \u0111\xF3 \u0111\u01B0\u1EE3c l\xFD gi\u1EA3i b\u1EDFi v\xEC lu\xF4n c\xF3 m\u1ED9t gi\u1EDBi h\u1EA1n tr\u1EA7n l\xE0 1232 bytes cho m\u1ECDi Transaction.

    T\u1EA5t c\u1EA3 Transaction y\xEAu c\u1EA7u \xEDt nh\u1EA5t m\u1ED9t Account l\xE0 writable \u0111\u1EC3 k\xFD Transaction \u0111\xF3. M\u1ED9t khi \u0111\u01B0\u1EE3c g\u1EEDi, Account tr\u1EA3 ph\xED v\u1EDBi nh\xE3n writable v\xE0 sigher s\u1EBD \u0111\u01B0\u1EE3c tu\u1EA7n t\u1EF1 ho\xE1 tr\u01B0\u1EDBc ti\xEAn. Account n\xE0y s\u1EBD chi tr\u1EA3 c\xE1c chi ph\xED ph\xE1t sinh c\u1EE7a Transaction cho d\xF9 Transaction th\xE0nh c\xF4ng hay th\u1EA5t b\u1EA1i. N\u1EBFu Account tr\u1EA3 ph\xED kh\xF4ng \u0111\u1EE7 s\u1ED1 d\u01B0 \u0111\u1EC3 tr\u1EA3 ph\xED giao d\u1ECBch, Transaction s\u1EBD b\u1ECB b\u1ECF qua.

    T\u1EA1i th\u1EDDi \u0111i\u1EC3m \u0111\u01B0\u1EE3c vi\u1EBFt, 50% ph\xED giao d\u1ECBch s\u1EBD \u0111\u01B0\u1EE3c th\u01B0\u1EDFng cho Validator \u0111\u1EC3 sinh ra block, trong khi 50% c\xF2n l\u1EA1i s\u1EBD \u0111\u01B0\u1EE3c \u0111\u1ED1t. B\u1EB1ng c\u01A1 c\u1EA5u nh\u01B0 v\u1EADy, Validator \u0111\u01B0\u1EE3c khuy\u1EBFn kh\xEDch ph\u1EA3i x\u1EED l\xFD c\xE0ng nhi\u1EC1u Transaction c\xE0ng t\u1ED1t trong th\u1EDDi h\u1EA1n \u0111\u01B0\u1EE3c \u0111\u1EC1 c\u1EED.

    C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c

    ',4),R={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},L=t("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),F={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},E=t("Transaction Structure"),I={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},j=t("Transaction Fees by Justin Starry"),H={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},J=t("An Introduction to Solana by Hana"),K={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},D=t("Transaction Processing by Jito Labs"),z={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},G=t("Solana Transaction in Depth by Alex Miller");function O(Q,U){const h=i("RouterLink"),o=i("ExternalLinkIcon");return e(),s(u,null,[g,n("p",null,[_,c(h,{to:"/vi/core-concepts/programs.html"},{default:l(()=>[p]),_:1}),m,n("a",b,[k,c(o)]),T]),v,n("p",null,[f,n("a",y,[x,c(o)]),A]),S,M,n("ul",null,[n("li",null,[n("a",B,[N,c(o)]),P]),n("li",null,[n("a",V,[w,c(o)]),C])]),q,n("ul",null,[n("li",null,[n("a",R,[L,c(o)])]),n("li",null,[n("a",F,[E,c(o)])]),n("li",null,[n("a",I,[j,c(o)])]),n("li",null,[n("a",H,[J,c(o)])]),n("li",null,[n("a",K,[D,c(o)])]),n("li",null,[n("a",z,[G,c(o)])])])],64)}var X=r(d,[["render",O]]);export{X as default}; +import{_ as r,r as i,o as e,c as s,a as n,b as c,w as l,F as u,d as t,e as a}from"./app.d411e3b3.js";const d={},g=n("h1",{id:"transactions",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),t(" Transactions")],-1),_=t("Ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 g\u1ECDi "),p=t("Program"),m=t(" b\u1EB1ng c\xE1ch t\u1EA1o v\xE0 g\u1EEDi m\u1ED9t Transaction \u0111\u1EBFn m\u1EA1ng l\u01B0\u1EDBi Solana. M\u1ED9t Transaction c\xF3 th\u1EC3 ch\u1EE9a nhi\u1EC1u instruction b\xEAn trong, v\xE0 m\u1ED7i instruction c\xF3 th\u1EC3 t\u01B0\u01A1ng t\xE1c v\u1EDBi c\xE1c Program kh\xE1c nhau. Khi m\u1ED9t Transaction \u0111\u01B0\u1EE3c g\u1EEDi \u0111i, "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},k=t("Solana Runtime"),T=t(" s\u1EBD x\u1EED l\xFD c\xE1c instruction b\xEAn trong Transaction theo th\u1EE9 t\u1EF1 v\xE0 tu\u1EA7n t\u1EF1. N\u1EBFu c\xF3 b\u1EA5t k\u1EF3 instruction n\xE0o x\u1EA3y ra l\u1ED7i, to\xE0n b\u1ED9 Transaction s\u1EBD \u0111\u01B0\u1EE3c xem l\xE0 l\u1ED7i."),v=a('

    C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

    Nh\u1EEFng \u0111i\u1EC1u c\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt

    • C\xE1c instruction l\xE0 nh\u1EEFng \u0111\u01A1n v\u1ECB th\u1EF1c thi nh\u1ECF nh\u1EA5t tr\xEAn Solana
    • M\u1ED7i instruction s\u1EBD ch\u1EE9a:
      • program_id c\u1EE7a Program m\u1EE5c ti\xEAu
      • M\u1ED9t m\u1EA3ng t\u1EA5t c\u1EA3 accounts m\xE0 instruction mu\u1ED1n \u0111\u1ECDc ho\u1EB7c ghi
      • M\u1ED9t m\u1EA3ng byte instruction_data cung c\u1EA5p d\u1EEF li\u1EC7u \u0111\u1EA7u v\xE0o c\u1EE5 th\u1EC3 cho Program
    • Nhi\u1EC1u instruction c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c \u0111\xF3ng g\xF3i trong m\u1ED9t Transaction duy nh\u1EA5t
    • M\u1ED7i Transaction c\xF3 th\u1EC3 ch\u1EE9a:
      • M\u1ED9t m\u1EA3ng t\u1EA5t c\u1EA3 accounts m\xE0 Transaction mu\u1ED1n \u0111\u1ECDc ho\u1EB7c ghi
      • M\u1ED9t ho\u1EB7c nhi\u1EC1u instructions
      • blockhash hi\u1EC7n t\u1EA1i
      • M\u1ED9t ho\u1EB7c nhi\u1EC1u signatures
    • C\xE1c instruction s\u1EBD \u0111\u01B0\u1EE3c th\u1EF1c thi tu\u1EA7n t\u1EF1 v\xE0 theo th\u1EE9 t\u1EF1 trong Transaction
    • N\u1EBFu c\xF3 b\u1EA5t k\u1EF3 instruction n\xE0o x\u1EA3y ra l\u1ED7i, to\xE0n b\u1ED9 giao d\u1ECBch s\u1EBD \u0111\u01B0\u1EE3c xem l\xE0 l\u1ED7i
    • Transaction c\xF3 gi\u1EDBi h\u1EA1n dung l\u01B0\u1EE3ng l\xE0 1232 bytes

    Chi ti\u1EBFt

    Solana Runtime y\xEAu c\u1EA7u instruction v\xE0 Transaction ph\u1EA3i khai b\xE1o m\u1ED9t danh s\xE1ch t\u1EA5t c\u1EA3 c\xE1c Account m\xE0 ch\xFAng c\u1EA7n \u0111\u1ECDc ho\u1EB7c ghi d\u1EEF li\u1EC7u. B\u1EB1ng c\xE1ch y\xEAu c\u1EA7u nh\u1EEFng Account n\xE0y tr\u01B0\u1EDBc, Solana Runtime c\xF3 th\u1EC3 song song ho\xE1 qu\xE1 tr\xECnh th\u1EF1c thi xuy\xEAn su\u1ED1t t\u1EA5t c\u1EA3 c\xE1c Transaction.

    Khi m\u1ED9t Transaction \u0111\u01B0\u1EE3c g\u1EEDi v\xE0o m\u1EA1ng l\u01B0\u1EDBi, Solana Runtime s\u1EBD x\u1EED l\xFD c\xE1c instructions c\u1EE7a n\xF3 tu\u1EA7n t\u1EF1 t\u1EEBng instruction m\u1ED9t theo th\u1EE9 t\u1EF1 khai b\xE1o b\xEAn trong Transaction. V\u1EDBi m\u1ED7i instruction, Program \u0111\u01B0\u1EE3c truy v\u1EA5n s\u1EBD l\u1EA5y d\u1EEF li\u1EC7u t\u1EEB instruction v\xE0 th\u1EF1c thi tr\xEAn c\xE1c Account t\u01B0\u01A1ng \u1EE9ng trong instruction \u0111\xF3. Program ho\u1EB7c l\xE0 tr\u1EA3 v\u1EC1 k\u1EBFt qu\u1EA3 th\xE0nh c\xF4ng, ho\u1EB7c l\xE0 v\u1EDBi k\u1EBFt qu\u1EA3 l\u1ED7i v\u1EDBi m\xE3 l\u1ED7i t\u01B0\u01A1ng \u1EE9ng. V\u1EDBi b\u1EA5t k\u1EF3 l\u1ED7i n\xE0o \u0111\u01B0\u1EE3c tr\u1EA3 ra, to\xE0n b\u1ED9 Transaction s\u1EBD k\u1EBFt th\xFAc v\u1EDBi l\u1ED7i ngay l\u1EADp t\u1EE9c.

    B\u1EA5t k\u1EF3 Transaction n\xE0o m\xE0 thay \u0111\u1ED5i d\u1EEF li\u1EC7u c\u1EE7a Account hay r\xFAt lamports ra t\u1EEB Account th\xEC \u0111\u1EC1u c\u1EA7n y\xEAu c\u1EA7u ch\u1EEF k\xFD c\u1EE7a owner trong Account. B\u1EA5t k\u1EF3 Account n\xE0o khi c\u1EA7n \u0111\u01B0\u1EE3c s\u1EEDa \u0111\u1ED5i \u0111\u1EC1u ph\u1EA3i \u0111\xE1nh d\u1EA5u l\xE0 writable trong instruction t\u01B0\u01A1ng \u1EE9ng. M\u1ED9t Account c\xF3 th\u1EC3 \u0111\u01B0\u1EE3c n\u1EA1p th\xEAm lamports m\xE0 kh\xF4ng c\u1EA7n xin ph\xE9p, ch\u1EC9 c\u1EA7n ng\u01B0\u1EDDi tr\u1EA3 ph\xED cho Transaction \u0111\u1EE7 kh\u1EA3 n\u0103ng chi tr\u1EA3 ph\xED thu\xEA v\xE0 ph\xED giao d\u1ECBch.

    ',6),f=t("Tr\u01B0\u1EDBc khi g\u1EEDi \u0111i, t\u1EA5t c\u1EA3 c\xE1c Transaction ph\u1EA3i tham chi\u1EBFu "),y={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},x=t("Blockhash"),A=t(" m\u1EDBi nh\u1EA5t. Blockhash \u0111\u01B0\u1EE3c d\xF9ng \u0111\u1EC3 ch\u1ED1ng tr\xF9ng l\u1EB7p v\xE0 lo\u1EA1i b\u1ECF c\xE1c giao d\u1ECBch qu\xE1 h\u1EA1n. Th\u1EDDi h\u1EA1n t\u1ED1i \u0111a cho m\u1ED9t Transaction l\xE0 kh\xF4ng qu\xE1 150 blocks so v\u1EDBi Blockhash \u0111\u01B0\u1EE3c ghi, v\xE0 kho\u1EA3ng ch\u1EEBng 1 ph\xFAt 19 gi\xE2y theo \u01B0\u1EDBc t\xEDnh t\u1EA1i th\u1EDDi \u0111i\u1EC3m cu\u1ED1n s\xE1ch \u0111\u01B0\u1EE3c vi\u1EBFt."),S=n("h3",{id:"phi",tabindex:"-1"},[n("a",{class:"header-anchor",href:"#phi","aria-hidden":"true"},"#"),t(" Ph\xED")],-1),M=n("p",null,"M\u1EA1ng Solana s\u1EBD thu 2 lo\u1EA1i ph\xED:",-1),B={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},N=t("Ph\xED giao d\u1ECBch"),P=t(" cho vi\u1EC7c lan truy\u1EC1n Transaction (Hay th\u01B0\u1EDDng \u0111\u01B0\u1EE3c g\u1ECDi l\xE0 ph\xED gas \u1EDF c\xE1c blockchain kh\xE1c)"),V={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},w=t("Ph\xED thu\xEA"),C=t(" v\xF9ng nh\u1EDB d\u1EEF li\u1EC7u cho Account"),q=a('

    Tr\xEAn Solana, ph\xED giao d\u1ECBch th\u01B0\u1EDDng b\u1EA5t bi\u1EBFn, ngh\u0129a l\xE0 kh\xF4ng c\xF3 kh\xE1i ni\u1EC7m v\u1EC1 \u0111\xE1nh ph\xED theo th\u1ECB tr\u01B0\u1EDDng n\u01A1i m\xE0 ng\u01B0\u1EDDi d\xF9ng c\xF3 th\u1EC3 tr\u1EA3 ph\xED cao h\u01A1n m\u1EB7t b\u1EB1ng \u0111\u1EC3 t\u0103ng c\u01A1 h\u1ED9i \u0111\u01B0\u1EE3c \u01B0u ti\xEAn th\u1EF1c thi Transaction tr\u01B0\u1EDBc. T\u1EA1i th\u1EDDi \u0111i\u1EC3m t\xE1c gi\u1EA3 vi\u1EBFt, ph\xED giao d\u1ECBch \u0111\u01B0\u1EE3c x\xE1c \u0111\u1ECBnh b\u1EB1ng s\u1ED1 l\u01B0\u1EE3ng ch\u1EEF k\xFD b\xEAn trong Transaction (c\u1EE5 th\u1EC3 l\xE0 lamports_per_signature), v\xE0 kh\xF4ng ph\u1EA3i b\u1EB1ng s\u1ED1 b\u01B0\u1EDBc t\xEDnh to\xE1n cho Transaction \u0111\xF3. \u0110i\u1EC1u \u0111\xF3 \u0111\u01B0\u1EE3c l\xFD gi\u1EA3i b\u1EDFi v\xEC lu\xF4n c\xF3 m\u1ED9t gi\u1EDBi h\u1EA1n tr\u1EA7n l\xE0 1232 bytes cho m\u1ECDi Transaction.

    T\u1EA5t c\u1EA3 Transaction y\xEAu c\u1EA7u \xEDt nh\u1EA5t m\u1ED9t Account l\xE0 writable \u0111\u1EC3 k\xFD Transaction \u0111\xF3. M\u1ED9t khi \u0111\u01B0\u1EE3c g\u1EEDi, Account tr\u1EA3 ph\xED v\u1EDBi nh\xE3n writable v\xE0 signer s\u1EBD \u0111\u01B0\u1EE3c tu\u1EA7n t\u1EF1 ho\xE1 tr\u01B0\u1EDBc ti\xEAn. Account n\xE0y s\u1EBD chi tr\u1EA3 c\xE1c chi ph\xED ph\xE1t sinh c\u1EE7a Transaction cho d\xF9 Transaction th\xE0nh c\xF4ng hay th\u1EA5t b\u1EA1i. N\u1EBFu Account tr\u1EA3 ph\xED kh\xF4ng \u0111\u1EE7 s\u1ED1 d\u01B0 \u0111\u1EC3 tr\u1EA3 ph\xED giao d\u1ECBch, Transaction s\u1EBD b\u1ECB b\u1ECF qua.

    T\u1EA1i th\u1EDDi \u0111i\u1EC3m \u0111\u01B0\u1EE3c vi\u1EBFt, 50% ph\xED giao d\u1ECBch s\u1EBD \u0111\u01B0\u1EE3c th\u01B0\u1EDFng cho Validator \u0111\u1EC3 sinh ra block, trong khi 50% c\xF2n l\u1EA1i s\u1EBD \u0111\u01B0\u1EE3c \u0111\u1ED1t. B\u1EB1ng c\u01A1 c\u1EA5u nh\u01B0 v\u1EADy, Validator \u0111\u01B0\u1EE3c khuy\u1EBFn kh\xEDch ph\u1EA3i x\u1EED l\xFD c\xE0ng nhi\u1EC1u Transaction c\xE0ng t\u1ED1t trong th\u1EDDi h\u1EA1n \u0111\u01B0\u1EE3c \u0111\u1EC1 c\u1EED.

    C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c

    ',4),R={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},L=t("T\xE0i li\u1EC7u ch\xEDnh th\u1ED1ng"),F={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},E=t("Transaction Structure"),I={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},j=t("Transaction Fees by Justin Starry"),H={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},J=t("An Introduction to Solana by Hana"),K={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},D=t("Transaction Processing by Jito Labs"),z={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},G=t("Solana Transaction in Depth by Alex Miller");function O(Q,U){const h=i("RouterLink"),o=i("ExternalLinkIcon");return e(),s(u,null,[g,n("p",null,[_,c(h,{to:"/vi/core-concepts/programs.html"},{default:l(()=>[p]),_:1}),m,n("a",b,[k,c(o)]),T]),v,n("p",null,[f,n("a",y,[x,c(o)]),A]),S,M,n("ul",null,[n("li",null,[n("a",B,[N,c(o)]),P]),n("li",null,[n("a",V,[w,c(o)]),C])]),q,n("ul",null,[n("li",null,[n("a",R,[L,c(o)])]),n("li",null,[n("a",F,[E,c(o)])]),n("li",null,[n("a",I,[j,c(o)])]),n("li",null,[n("a",H,[J,c(o)])]),n("li",null,[n("a",K,[D,c(o)])]),n("li",null,[n("a",z,[G,c(o)])])])],64)}var X=r(d,[["render",O]]);export{X as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.73b8d7c4.js b/docs/.vuepress/dist/assets/transactions.html.2469ccae.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.73b8d7c4.js rename to docs/.vuepress/dist/assets/transactions.html.2469ccae.js index 9ce53d5cb..3c152368b 100644 --- a/docs/.vuepress/dist/assets/transactions.html.73b8d7c4.js +++ b/docs/.vuepress/dist/assets/transactions.html.2469ccae.js @@ -1 +1 @@ -import{_ as o,r as t,o as l,c as u,a,b as e,w as d,F as k,d as n,e as s}from"./app.07ce7a66.js";const m={},c=a("h1",{id:"transaksi",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#transaksi","aria-hidden":"true"},"#"),n(" Transaksi")],-1),h=n("Klien dapat menjalankan "),p=n("programs"),g=n(" dengan mengirimkan sebuah transaksi ke cluster. Sebuah transaksi tunggal dapat berisikan berbagai macam instruksi terhadap masing-masing program. Ketika sebuah transaksi dikirimkan, Solana "),_={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=n("Runtime"),y=n(" akan menjalankan setiap instruksi sesuai dengan urutan dan secara "),f=a("code",null,"atomic",-1),S=n(". Jika ada instruksi yang gagal, maka keseluruhan transaksi akan gagal."),v=s('

    Fakta-Fakta

    Fakta

    • Dalam Solana, instruksi adalah unit operasional yang paling dasar
    • Setiap instruksi mengandung:
      • program_id program yang ingin dijalankan
      • Kumpulan semua accounts yang ingin di baca atau di tulis
      • Sebuah instruction_data byte array yang spesifik terhadap suatu program tertentu
    • Beberapa instruksi dapat disatukan dalam sebuah transaksi
    • Setiap transaksi mengandung:
      • Kumpulan semua accounts yang ingin di baca atau di tulis
      • Satu atau lebih instructions
      • blockhash terkini
      • Satu atau lebih signatures
    • Instruksi secara berurutan dan bersifatatomic
    • Jika ada instruksi yang gagal, maka seluruh transaksi akan gagal.
    • Transaksi dibatasi sampai dengan 1232 bytes

    Lebih Dalam

    Solana Runtime membutuhkan instruksi dan transaksi untuk menentukan kumpulan akun yang akan dibaca dan ditulis. Dengan mempersiapkan akun terlebih dahulu, runtime dapat menjalankan eksekusinya terhadap semua transaksi bersamaan.

    Ketika sebutah transaksi dikirimkan ke cluster, runtime akan memproses setiap instruksi sesuai urutan dan atomic. Program yang menerima instruksi akan menginterpretasi kumpulan data dan menjalankannya di akun yang ditentukan. Program akan berhasil menjalankan instruksi atau gagal karena adanya error. Jika ada ditemukannya error, maka keseluruhan transaksi akan gagal.

    Setiap transaksi yang bertujuan untuk meng-debet suatu akun atau mengubah data, memerlukan verifikasi dari si pemilik akun. Setiap akun yang akan dimodifikasi akan ditandai dengan writable. Sebuah akun dapat dikreditkan tanpa persetujuan pemiliknya asalkan biaya transaksi dibayarkan menutupi biaya yang dibutuhkan untuk rent dan biaya transaksi itu sendiri.

    ',6),j=n("Sebelum pengiriman, semua transaksi harus mengacu kepada sebuah "),x={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},w=n("blockhash terbaru"),B=n(". "),T=a("em",null,"Blockhash",-1),F=n(" digunakan untuk mencegah duplikasi dan menghapus transaksi gagal. Batas waktu sebuah "),J=a("em",null,"blockhash",-1),D=n(" transaksi adalah sekitar 1 menit 19 detik atau 150 blocks saat ini ditulis."),K=a("h3",{id:"biaya",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#biaya","aria-hidden":"true"},"#"),n(" Biaya")],-1),L=a("p",null,"Jaringan Solana mengambil dua jenis biaya:",-1),P={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},I=a("em",null,"Biaya Transaksi",-1),N=n(" untuk menjalankan transaksi (atau biasa disebut \u201Cgas fees\u201D)"),R={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},V=a("em",null,"Biaya Sewa",-1),A=n(" untuk menyimpan data on-chain"),E=s('

    Di Solana, Biaya Transaksi itu determistik: tidak ada konsep dimana pengguna dapat membayar lebih demi meningkatkan kesempatan untuk dimasukkan ke block berikutnya. Pada waktu penulisan, biaya transaksi hanya ditentukan oleh jumlah verifikasi yang dibutuhkan (seperti lamports_per_signature), bukan dari jumlah sumber daya yang digunakan. Hal ini dikarenakan adanya batas maksimal 1232 bytes untuk semua transaksi.

    Semua transaksi membutuhkan setidaknya sebuah akun writable untuk memverifikasi transaksi. Ketika transaksi sudah dikirim, akun writable pemverifikasi yang di-serialisasi pertama harus membayar biaya transaksi. Akun ini akan membayar biaya dari transaksi tanpa mempedulikan transaksinya berhasil atau gagal. Jika pihak pembayar tidak memiliki saldo yang cukup, maka transaksi akan dihentikan.

    Pada waktu penulisan, 50% dari semua transaction fee dibayarkan kepada validator yang membuat block dan sisa setengahnya hangus. Struktur ini berguna untuk mendorong validator memproses transaksi sebanyak mungkin.

    Sumber lainnya

    ',4),C={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},H=n("Official Documentation"),M={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},O=n("Transaction Structure"),q={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},z=n("Transaction Fees by Justin Starry"),G={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},Q=n("An Introduction to Solana by Hana"),U={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},W=n("Transaction Processing by Jito Labs"),X={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Y=n("Solana Transaction in Depth by Alex Miller");function Z($,aa){const r=t("RouterLink"),i=t("ExternalLinkIcon");return l(),u(k,null,[c,a("p",null,[h,e(r,{to:"/id/core-concepts/programs.html"},{default:d(()=>[p]),_:1}),g,a("a",_,[b,e(i)]),y,f,S]),v,a("p",null,[j,a("a",x,[w,e(i)]),B,T,F,J,D]),K,L,a("ul",null,[a("li",null,[a("a",P,[I,e(i)]),N]),a("li",null,[a("a",R,[V,e(i)]),A])]),E,a("ul",null,[a("li",null,[a("a",C,[H,e(i)])]),a("li",null,[a("a",M,[O,e(i)])]),a("li",null,[a("a",q,[z,e(i)])]),a("li",null,[a("a",G,[Q,e(i)])]),a("li",null,[a("a",U,[W,e(i)])]),a("li",null,[a("a",X,[Y,e(i)])])])],64)}var ea=o(m,[["render",Z]]);export{ea as default}; +import{_ as o,r as t,o as l,c as u,a,b as e,w as d,F as k,d as n,e as s}from"./app.d411e3b3.js";const m={},c=a("h1",{id:"transaksi",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#transaksi","aria-hidden":"true"},"#"),n(" Transaksi")],-1),h=n("Klien dapat menjalankan "),p=n("programs"),g=n(" dengan mengirimkan sebuah transaksi ke cluster. Sebuah transaksi tunggal dapat berisikan berbagai macam instruksi terhadap masing-masing program. Ketika sebuah transaksi dikirimkan, Solana "),_={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=n("Runtime"),y=n(" akan menjalankan setiap instruksi sesuai dengan urutan dan secara "),f=a("code",null,"atomic",-1),S=n(". Jika ada instruksi yang gagal, maka keseluruhan transaksi akan gagal."),v=s('

    Fakta-Fakta

    Fakta

    • Dalam Solana, instruksi adalah unit operasional yang paling dasar
    • Setiap instruksi mengandung:
      • program_id program yang ingin dijalankan
      • Kumpulan semua accounts yang ingin di baca atau di tulis
      • Sebuah instruction_data byte array yang spesifik terhadap suatu program tertentu
    • Beberapa instruksi dapat disatukan dalam sebuah transaksi
    • Setiap transaksi mengandung:
      • Kumpulan semua accounts yang ingin di baca atau di tulis
      • Satu atau lebih instructions
      • blockhash terkini
      • Satu atau lebih signatures
    • Instruksi secara berurutan dan bersifatatomic
    • Jika ada instruksi yang gagal, maka seluruh transaksi akan gagal.
    • Transaksi dibatasi sampai dengan 1232 bytes

    Lebih Dalam

    Solana Runtime membutuhkan instruksi dan transaksi untuk menentukan kumpulan akun yang akan dibaca dan ditulis. Dengan mempersiapkan akun terlebih dahulu, runtime dapat menjalankan eksekusinya terhadap semua transaksi bersamaan.

    Ketika sebutah transaksi dikirimkan ke cluster, runtime akan memproses setiap instruksi sesuai urutan dan atomic. Program yang menerima instruksi akan menginterpretasi kumpulan data dan menjalankannya di akun yang ditentukan. Program akan berhasil menjalankan instruksi atau gagal karena adanya error. Jika ada ditemukannya error, maka keseluruhan transaksi akan gagal.

    Setiap transaksi yang bertujuan untuk meng-debet suatu akun atau mengubah data, memerlukan verifikasi dari si pemilik akun. Setiap akun yang akan dimodifikasi akan ditandai dengan writable. Sebuah akun dapat dikreditkan tanpa persetujuan pemiliknya asalkan biaya transaksi dibayarkan menutupi biaya yang dibutuhkan untuk rent dan biaya transaksi itu sendiri.

    ',6),j=n("Sebelum pengiriman, semua transaksi harus mengacu kepada sebuah "),x={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},w=n("blockhash terbaru"),B=n(". "),T=a("em",null,"Blockhash",-1),F=n(" digunakan untuk mencegah duplikasi dan menghapus transaksi gagal. Batas waktu sebuah "),J=a("em",null,"blockhash",-1),D=n(" transaksi adalah sekitar 1 menit 19 detik atau 150 blocks saat ini ditulis."),K=a("h3",{id:"biaya",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#biaya","aria-hidden":"true"},"#"),n(" Biaya")],-1),L=a("p",null,"Jaringan Solana mengambil dua jenis biaya:",-1),P={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},I=a("em",null,"Biaya Transaksi",-1),N=n(" untuk menjalankan transaksi (atau biasa disebut \u201Cgas fees\u201D)"),R={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},V=a("em",null,"Biaya Sewa",-1),A=n(" untuk menyimpan data on-chain"),E=s('

    Di Solana, Biaya Transaksi itu determistik: tidak ada konsep dimana pengguna dapat membayar lebih demi meningkatkan kesempatan untuk dimasukkan ke block berikutnya. Pada waktu penulisan, biaya transaksi hanya ditentukan oleh jumlah verifikasi yang dibutuhkan (seperti lamports_per_signature), bukan dari jumlah sumber daya yang digunakan. Hal ini dikarenakan adanya batas maksimal 1232 bytes untuk semua transaksi.

    Semua transaksi membutuhkan setidaknya sebuah akun writable untuk memverifikasi transaksi. Ketika transaksi sudah dikirim, akun writable pemverifikasi yang di-serialisasi pertama harus membayar biaya transaksi. Akun ini akan membayar biaya dari transaksi tanpa mempedulikan transaksinya berhasil atau gagal. Jika pihak pembayar tidak memiliki saldo yang cukup, maka transaksi akan dihentikan.

    Pada waktu penulisan, 50% dari semua transaction fee dibayarkan kepada validator yang membuat block dan sisa setengahnya hangus. Struktur ini berguna untuk mendorong validator memproses transaksi sebanyak mungkin.

    Sumber lainnya

    ',4),C={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},H=n("Official Documentation"),M={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},O=n("Transaction Structure"),q={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},z=n("Transaction Fees by Justin Starry"),G={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},Q=n("An Introduction to Solana by Hana"),U={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},W=n("Transaction Processing by Jito Labs"),X={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Y=n("Solana Transaction in Depth by Alex Miller");function Z($,aa){const r=t("RouterLink"),i=t("ExternalLinkIcon");return l(),u(k,null,[c,a("p",null,[h,e(r,{to:"/id/core-concepts/programs.html"},{default:d(()=>[p]),_:1}),g,a("a",_,[b,e(i)]),y,f,S]),v,a("p",null,[j,a("a",x,[w,e(i)]),B,T,F,J,D]),K,L,a("ul",null,[a("li",null,[a("a",P,[I,e(i)]),N]),a("li",null,[a("a",R,[V,e(i)]),A])]),E,a("ul",null,[a("li",null,[a("a",C,[H,e(i)])]),a("li",null,[a("a",M,[O,e(i)])]),a("li",null,[a("a",q,[z,e(i)])]),a("li",null,[a("a",G,[Q,e(i)])]),a("li",null,[a("a",U,[W,e(i)])]),a("li",null,[a("a",X,[Y,e(i)])])])],64)}var ea=o(m,[["render",Z]]);export{ea as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.0168eb8a.js b/docs/.vuepress/dist/assets/transactions.html.27adc8a8.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.0168eb8a.js rename to docs/.vuepress/dist/assets/transactions.html.27adc8a8.js index 44ec81c63..901b0a27f 100644 --- a/docs/.vuepress/dist/assets/transactions.html.0168eb8a.js +++ b/docs/.vuepress/dist/assets/transactions.html.27adc8a8.js @@ -1 +1 @@ -import{_ as l,r as n,o,c as s,a as e,b as r,w as c,F as d,d as a,e as m}from"./app.07ce7a66.js";const h={},k=e("h1",{id:"transactions-islemler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transactions-islemler","aria-hidden":"true"},"#"),a(" Transactions (\u0130\u015Flemler)")],-1),u=a("Client\u2019lar, bir cluster\u2019a bir transaction (i\u015Flem) g\xF6ndererek "),b=a("programlar\u0131"),_=a(" \xE7a\u011F\u0131rabilir. Tek bir i\u015Flem, her biri kendi program\u0131n\u0131 hedefleyen birden fazla talimat i\xE7erebilir. Bir i\u015Flem g\xF6nderildi\u011Finde, Solana "),y={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},p=a("Runtime"),g=a(" talimatlar\u0131n\u0131 s\u0131rayla ve atomik olarak i\u015Fleyecektir. Bir talimat\u0131n herhangi bir k\u0131sm\u0131 ba\u015Far\u0131s\u0131z olursa, t\xFCm i\u015Flem ba\u015Far\u0131s\u0131z olur."),f=m('

    Facts (\xD6zet Bilgiler)

    Bilgi Tablosu

    • Instruction\u2019lar(talimatlar) Solana'daki en temel operasyonel birimdir.
    • Her instruction \u015Funlar\u0131 i\xE7erir:
      • Ama\xE7lanan program\u0131n program_id'si
      • Okumak veya yazmak istedi\u011Fi t\xFCm account\u2019lar\u0131n array\u2019i
      • Ama\xE7lanan programa \xF6zel bir instruction_data byte array\u2019i
    • Birden fazla talimat tek bir transaction\u2019da(i\u015Flemde) toplanabilir.
    • Her i\u015Flem \u015Funlar\u0131 i\xE7erir:
      • Okumak veya yazmak istedi\u011Fi t\xFCm account\u2019lar\u0131n array\u2019i
      • Bir veya daha fazla instruction
      • Yak\u0131n zamanda bir blockhash
      • Bir veya daha fazla signature(imza)
    • Instruction\u2019lar s\u0131rayla ve atomik olarak i\u015Flenir.
    • Bir instruction\u2019\u0131n herhangi bir k\u0131sm\u0131 ba\u015Far\u0131s\u0131z olursa, transaction\u2019\u0131n tamam\u0131 ba\u015Far\u0131s\u0131z olur.
    • Transaction\u2019lar 1232 bayt ile s\u0131n\u0131rl\u0131d\u0131r.

    Deep Dive (Derinlemesine Bak\u0131\u015F)

    Solana Runtime, okumak veya yazmak istedikleri t\xFCm account\u2019lar\u0131n bir listesini belirtmek i\xE7in hem instructions hem de transactions gerektirir. Bu account\u2019lar\u0131 \xF6nceden talep ederek, \xE7al\u0131\u015Fma zaman\u0131 t\xFCm transaction\u2019larda y\xFCr\xFCtmeyi paralel hale getirebilir.

    Bir transaction bir k\xFCmeye g\xF6nderildi\u011Finde, \xE7al\u0131\u015Fma zaman\u0131 instruction\u2019lar\u0131n\u0131 s\u0131rayla ve atomik olarak i\u015Fleyecektir. Her talimat i\xE7in, al\u0131c\u0131 program kendi veri dizisini yorumlayacak ve belirtilen account\u2019lar\u0131 \xFCzerinde \xE7al\u0131\u015Facakt\u0131r. Program ya ba\u015Far\u0131l\u0131 bir \u015Fekilde ya da bir hata koduyla d\xF6necektir. Bir hata d\xF6nd\xFCr\xFCl\xFCrse, t\xFCm i\u015Flem hemen ba\u015Far\u0131s\u0131z olur.

    Bir account\u2019\u0131 bor\xE7land\u0131rmay\u0131 veya verilerini de\u011Fi\u015Ftirmeyi ama\xE7layan herhangi bir transaction, account sahibinin imzas\u0131n\u0131 gerektirir. De\u011Fi\u015Ftirilecek herhangi bir account writable(yaz\u0131labilir) olarak i\u015Faretlenir. Transaction \xFCcretini \xF6deyen ki\u015Fi, gerekli rent ve transaction \xFCcretlerini kar\u015F\u0131lad\u0131\u011F\u0131 s\xFCrece, sahibinin izni olmadan bir account\u2019a kredi verilebilir.

    G\xF6nderilmeden \xF6nce, t\xFCm transaction\u2019lar son bir blockhash\u2019e referans vermelidir. Blockhash, tekrarlar\u0131 \xF6nlemek ve eski transaction\u2019lar\u0131 ortadan kald\u0131rmak i\xE7in kullan\u0131l\u0131r. Bir i\u015Flemin blockhash\u2019inin maksimum ya\u015F\u0131 150 blok veya bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 zaman itibariyle yakla\u015F\u0131k ~1 dakika 19 saniyedir.

    Fees (\xDCcretler)

    Solana a\u011F\u0131 iki t\xFCr \xFCcret toplar:

    ',10),z=a("Yay\u0131lan i\u015Flemler i\xE7in "),v={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},B=a("transaction \xFCcreti"),x=a(' ("gaz \xFCcretleri" olarak da bilinir)'),T=a("Zincir \xFCzerinde veri depolamak i\xE7in "),S={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},D=a("rent \xFCcreti"),w=e("p",null,[a("Solana'da i\u015Flem \xFCcretleri belirlidir: Kullan\u0131c\u0131lar\u0131n bir sonraki blo\u011Fa dahil olma \u015Fanslar\u0131n\u0131 art\u0131rmak i\xE7in daha y\xFCksek \xFCcretler \xF6deyebilecekleri bir \xFCcret piyasas\u0131 kavram\u0131 yoktur. Bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 tarihte, i\u015Flem \xFCcretleri kullan\u0131lan kaynak miktar\u0131na g\xF6re de\u011Fil, yaln\u0131zca gereken imza say\u0131s\u0131na ("),e("code",null,"lamports_per_signature"),a(") g\xF6re belirlenir. Bunun nedeni, \u015Fu anda t\xFCm i\u015Flemlerde 1232 baytl\u0131k bir sabit s\u0131n\u0131r bulunmas\u0131d\u0131r.")],-1),F=e("p",null,"T\xFCm i\u015Flemler, i\u015Flemi imzalamak i\xE7in en az bir writable account(yaz\u0131labilir hesap) gerektirir. G\xF6nderildikten sonra, ilk olarak seri hale getirilen writable signer account \xFCcreti \xF6deyen ki\u015Fi olacakt\u0131r. Bu account, i\u015Flemin ba\u015Far\u0131l\u0131 veya ba\u015Far\u0131s\u0131z olmas\u0131na bak\u0131lmaks\u0131z\u0131n i\u015Flem maliyetini \xF6deyecektir. \xDCcret \xF6deyen ki\u015Finin i\u015Flem \xFCcretini \xF6demek i\xE7in yeterli bakiyesi yoksa i\u015Flem d\xFC\u015Fer.",-1),I=e("p",null,"Bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 s\u0131rada, t\xFCm i\u015Flem \xFCcretlerinin %50'si blo\u011Fu \xFCreten validator(do\u011Frulay\u0131c\u0131) taraf\u0131ndan al\u0131n\u0131rken, kalan %50'si yak\u0131l\u0131r(burn). Bu yap\u0131, validator\u2019leri leader program\u0131 s\u0131ras\u0131nda m\xFCmk\xFCn oldu\u011Funca \xE7ok i\u015Flemi i\u015Flemeye te\u015Fvik etmek i\xE7in \xE7al\u0131\u015F\u0131r.",-1),L=e("h2",{id:"other-resources-diger-kaynaklar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources-diger-kaynaklar","aria-hidden":"true"},"#"),a(" Other Resources (Di\u011Fer Kaynaklar)")],-1),R={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},A=a("Official Documentation"),H={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},N=a("Transaction Structure"),O={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},V=a("Transaction Fees by Justin Starry"),C={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},E=a("An Introduction to Solana by Hana"),j={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},G=a("Transaction Processing by Jito Labs"),J={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},K=a("Solana Transaction in Depth by Alex Miller");function P(Y,M){const t=n("RouterLink"),i=n("ExternalLinkIcon");return o(),s(d,null,[k,e("p",null,[u,r(t,{to:"/tr/core-concepts/programs.html"},{default:c(()=>[b]),_:1}),_,e("a",y,[p,r(i)]),g]),f,e("ul",null,[e("li",null,[z,e("a",v,[B,r(i)]),x]),e("li",null,[T,e("a",S,[D,r(i)])])]),w,F,I,L,e("ul",null,[e("li",null,[e("a",R,[A,r(i)])]),e("li",null,[e("a",H,[N,r(i)])]),e("li",null,[e("a",O,[V,r(i)])]),e("li",null,[e("a",C,[E,r(i)])]),e("li",null,[e("a",j,[G,r(i)])]),e("li",null,[e("a",J,[K,r(i)])])])],64)}var q=l(h,[["render",P]]);export{q as default}; +import{_ as l,r as n,o,c as s,a as e,b as r,w as c,F as d,d as a,e as m}from"./app.d411e3b3.js";const h={},k=e("h1",{id:"transactions-islemler",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transactions-islemler","aria-hidden":"true"},"#"),a(" Transactions (\u0130\u015Flemler)")],-1),u=a("Client\u2019lar, bir cluster\u2019a bir transaction (i\u015Flem) g\xF6ndererek "),b=a("programlar\u0131"),_=a(" \xE7a\u011F\u0131rabilir. Tek bir i\u015Flem, her biri kendi program\u0131n\u0131 hedefleyen birden fazla talimat i\xE7erebilir. Bir i\u015Flem g\xF6nderildi\u011Finde, Solana "),y={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},p=a("Runtime"),g=a(" talimatlar\u0131n\u0131 s\u0131rayla ve atomik olarak i\u015Fleyecektir. Bir talimat\u0131n herhangi bir k\u0131sm\u0131 ba\u015Far\u0131s\u0131z olursa, t\xFCm i\u015Flem ba\u015Far\u0131s\u0131z olur."),f=m('

    Facts (\xD6zet Bilgiler)

    Bilgi Tablosu

    • Instruction\u2019lar(talimatlar) Solana'daki en temel operasyonel birimdir.
    • Her instruction \u015Funlar\u0131 i\xE7erir:
      • Ama\xE7lanan program\u0131n program_id'si
      • Okumak veya yazmak istedi\u011Fi t\xFCm account\u2019lar\u0131n array\u2019i
      • Ama\xE7lanan programa \xF6zel bir instruction_data byte array\u2019i
    • Birden fazla talimat tek bir transaction\u2019da(i\u015Flemde) toplanabilir.
    • Her i\u015Flem \u015Funlar\u0131 i\xE7erir:
      • Okumak veya yazmak istedi\u011Fi t\xFCm account\u2019lar\u0131n array\u2019i
      • Bir veya daha fazla instruction
      • Yak\u0131n zamanda bir blockhash
      • Bir veya daha fazla signature(imza)
    • Instruction\u2019lar s\u0131rayla ve atomik olarak i\u015Flenir.
    • Bir instruction\u2019\u0131n herhangi bir k\u0131sm\u0131 ba\u015Far\u0131s\u0131z olursa, transaction\u2019\u0131n tamam\u0131 ba\u015Far\u0131s\u0131z olur.
    • Transaction\u2019lar 1232 bayt ile s\u0131n\u0131rl\u0131d\u0131r.

    Deep Dive (Derinlemesine Bak\u0131\u015F)

    Solana Runtime, okumak veya yazmak istedikleri t\xFCm account\u2019lar\u0131n bir listesini belirtmek i\xE7in hem instructions hem de transactions gerektirir. Bu account\u2019lar\u0131 \xF6nceden talep ederek, \xE7al\u0131\u015Fma zaman\u0131 t\xFCm transaction\u2019larda y\xFCr\xFCtmeyi paralel hale getirebilir.

    Bir transaction bir k\xFCmeye g\xF6nderildi\u011Finde, \xE7al\u0131\u015Fma zaman\u0131 instruction\u2019lar\u0131n\u0131 s\u0131rayla ve atomik olarak i\u015Fleyecektir. Her talimat i\xE7in, al\u0131c\u0131 program kendi veri dizisini yorumlayacak ve belirtilen account\u2019lar\u0131 \xFCzerinde \xE7al\u0131\u015Facakt\u0131r. Program ya ba\u015Far\u0131l\u0131 bir \u015Fekilde ya da bir hata koduyla d\xF6necektir. Bir hata d\xF6nd\xFCr\xFCl\xFCrse, t\xFCm i\u015Flem hemen ba\u015Far\u0131s\u0131z olur.

    Bir account\u2019\u0131 bor\xE7land\u0131rmay\u0131 veya verilerini de\u011Fi\u015Ftirmeyi ama\xE7layan herhangi bir transaction, account sahibinin imzas\u0131n\u0131 gerektirir. De\u011Fi\u015Ftirilecek herhangi bir account writable(yaz\u0131labilir) olarak i\u015Faretlenir. Transaction \xFCcretini \xF6deyen ki\u015Fi, gerekli rent ve transaction \xFCcretlerini kar\u015F\u0131lad\u0131\u011F\u0131 s\xFCrece, sahibinin izni olmadan bir account\u2019a kredi verilebilir.

    G\xF6nderilmeden \xF6nce, t\xFCm transaction\u2019lar son bir blockhash\u2019e referans vermelidir. Blockhash, tekrarlar\u0131 \xF6nlemek ve eski transaction\u2019lar\u0131 ortadan kald\u0131rmak i\xE7in kullan\u0131l\u0131r. Bir i\u015Flemin blockhash\u2019inin maksimum ya\u015F\u0131 150 blok veya bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 zaman itibariyle yakla\u015F\u0131k ~1 dakika 19 saniyedir.

    Fees (\xDCcretler)

    Solana a\u011F\u0131 iki t\xFCr \xFCcret toplar:

    ',10),z=a("Yay\u0131lan i\u015Flemler i\xE7in "),v={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},B=a("transaction \xFCcreti"),x=a(' ("gaz \xFCcretleri" olarak da bilinir)'),T=a("Zincir \xFCzerinde veri depolamak i\xE7in "),S={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},D=a("rent \xFCcreti"),w=e("p",null,[a("Solana'da i\u015Flem \xFCcretleri belirlidir: Kullan\u0131c\u0131lar\u0131n bir sonraki blo\u011Fa dahil olma \u015Fanslar\u0131n\u0131 art\u0131rmak i\xE7in daha y\xFCksek \xFCcretler \xF6deyebilecekleri bir \xFCcret piyasas\u0131 kavram\u0131 yoktur. Bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 tarihte, i\u015Flem \xFCcretleri kullan\u0131lan kaynak miktar\u0131na g\xF6re de\u011Fil, yaln\u0131zca gereken imza say\u0131s\u0131na ("),e("code",null,"lamports_per_signature"),a(") g\xF6re belirlenir. Bunun nedeni, \u015Fu anda t\xFCm i\u015Flemlerde 1232 baytl\u0131k bir sabit s\u0131n\u0131r bulunmas\u0131d\u0131r.")],-1),F=e("p",null,"T\xFCm i\u015Flemler, i\u015Flemi imzalamak i\xE7in en az bir writable account(yaz\u0131labilir hesap) gerektirir. G\xF6nderildikten sonra, ilk olarak seri hale getirilen writable signer account \xFCcreti \xF6deyen ki\u015Fi olacakt\u0131r. Bu account, i\u015Flemin ba\u015Far\u0131l\u0131 veya ba\u015Far\u0131s\u0131z olmas\u0131na bak\u0131lmaks\u0131z\u0131n i\u015Flem maliyetini \xF6deyecektir. \xDCcret \xF6deyen ki\u015Finin i\u015Flem \xFCcretini \xF6demek i\xE7in yeterli bakiyesi yoksa i\u015Flem d\xFC\u015Fer.",-1),I=e("p",null,"Bu yaz\u0131n\u0131n yaz\u0131ld\u0131\u011F\u0131 s\u0131rada, t\xFCm i\u015Flem \xFCcretlerinin %50'si blo\u011Fu \xFCreten validator(do\u011Frulay\u0131c\u0131) taraf\u0131ndan al\u0131n\u0131rken, kalan %50'si yak\u0131l\u0131r(burn). Bu yap\u0131, validator\u2019leri leader program\u0131 s\u0131ras\u0131nda m\xFCmk\xFCn oldu\u011Funca \xE7ok i\u015Flemi i\u015Flemeye te\u015Fvik etmek i\xE7in \xE7al\u0131\u015F\u0131r.",-1),L=e("h2",{id:"other-resources-diger-kaynaklar",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources-diger-kaynaklar","aria-hidden":"true"},"#"),a(" Other Resources (Di\u011Fer Kaynaklar)")],-1),R={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},A=a("Official Documentation"),H={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},N=a("Transaction Structure"),O={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},V=a("Transaction Fees by Justin Starry"),C={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},E=a("An Introduction to Solana by Hana"),j={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},G=a("Transaction Processing by Jito Labs"),J={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},K=a("Solana Transaction in Depth by Alex Miller");function P(Y,M){const t=n("RouterLink"),i=n("ExternalLinkIcon");return o(),s(d,null,[k,e("p",null,[u,r(t,{to:"/tr/core-concepts/programs.html"},{default:c(()=>[b]),_:1}),_,e("a",y,[p,r(i)]),g]),f,e("ul",null,[e("li",null,[z,e("a",v,[B,r(i)]),x]),e("li",null,[T,e("a",S,[D,r(i)])])]),w,F,I,L,e("ul",null,[e("li",null,[e("a",R,[A,r(i)])]),e("li",null,[e("a",H,[N,r(i)])]),e("li",null,[e("a",O,[V,r(i)])]),e("li",null,[e("a",C,[E,r(i)])]),e("li",null,[e("a",j,[G,r(i)])]),e("li",null,[e("a",J,[K,r(i)])])])],64)}var q=l(h,[["render",P]]);export{q as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.0b44a37d.js b/docs/.vuepress/dist/assets/transactions.html.63dbd664.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.0b44a37d.js rename to docs/.vuepress/dist/assets/transactions.html.63dbd664.js index 4f42192a5..87bedcaca 100644 --- a/docs/.vuepress/dist/assets/transactions.html.0b44a37d.js +++ b/docs/.vuepress/dist/assets/transactions.html.63dbd664.js @@ -1 +1 @@ -import{_ as t,r as s,o as i,c,a as e,b as n,w as l,F as d,d as a,e as u}from"./app.07ce7a66.js";const p={},m=e("h1",{id:"transacciones",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transacciones","aria-hidden":"true"},"#"),a(" Transacciones")],-1),h=a("Los clientes pueden invocar "),_=a("programas"),f=a(" enviando una transacci\xF3n a un cluster. Una transacci\xF3n puede incluir m\xFAltiples instrucciones, cada una de ellas apuntando a un programa diferente. Cuando una transacci\xF3n es enviada, el "),g={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=a("Runtime"),v=a(" de Solana procesar\xE1 sus instrucciones en orden y de forma at\xF3mica. Si una parte de la transacci\xF3n falla, toda la transacci\xF3n fallar\xE1."),q=u('

    Hechos

    Hoja de hechos

    • Las instrucciones son la unidad de operaci\xF3n m\xE1s b\xE1sica en Solana
    • Cada instrucci\xF3n contiene:
      • El program_id (id del programa) del programa al que apunta
      • Un arreglo de todas accounts (cuentas) donde va a leer o escribir
      • Un instruction_data (datos de la instrucci\xF3n) que es un byte array para el programa espec\xEDfico
    • Varias instrucciones pueden estar contenidas en una Transacci\xF3n
    • Cada transacci\xF3n consiste de:
      • Un arreglo de todas accounts (cuentas) donde va a leer o escribir
      • Una o m\xE1s instructions (instrucciones)
      • Un blockhash (hash de bloque) reciente
      • Una o m\xE1s signatures (firmas)
    • Las instrucciones son procesadas en orden y de forma at\xF3mica
    • Si una parte de la transacci\xF3n falla, toda la transacci\xF3n fallar\xE1
    • Las transacciones est\xE1n limitadas a un m\xE1ximo de 1232 bytes

    Un vistazo m\xE1s profundo

    El Runtime de Solana requiere tanto de instrucciones como de transacciones para especificar una lista de todas las cuentas de las que va a leer o escribir. Al requerir estas cuentas por adelantado, el Runtime de Solana es capaz de paralelizar la ejecuci\xF3n en todas las transacciones.

    Cuando se env\xEDa una transacci\xF3n a un cl\xFAster, el Runtime de Solana procesar\xE1 sus instrucciones en orden y de forma at\xF3mica. Para cada instrucci\xF3n, el programa al que se invoca interpretar\xE1 el arreglo de datos y operar\xE1 en las cuentas especificadas. El programa retornar\xE1 con \xE9xito o un c\xF3digo de error. Si se devuelve un error, toda la transacci\xF3n fallar\xE1 inmediatamente.

    Toda transacci\xF3n que debite de una cuenta o modique sus datos requiere la firma del titular de la cuenta. Cualquier cuenta que se modificar\xE1 ser\xE1 marcada como writable. Una cuenta puede recibir fondos sin el permiso del titular siempre que el pagador del cargo (fee) cubra la renta y las tarifas de transacci\xF3n.

    ',6),k=a("Antes de enviar una transacci\xF3n se debe enviar un "),x={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=a("hash de bloque reciente"),y=a(". El hash de bloque reciente es usado para prevenir duplicados y eliminar transacciones obsoletas. El tiempo m\xE1ximo del hash de bloque reciente de una transacci\xF3n es de 150 bloques, o aproximadamente ~1 minuto 19 segundos al momento de escribir este art\xEDculo."),E=e("h3",{id:"cargos-fees",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cargos-fees","aria-hidden":"true"},"#"),a(" Cargos (fees)")],-1),C=e("p",null,"La red de Solana colecta 2 tipos de cargos:",-1),L={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},U=a("Cargo por transacci\xF3n"),z=a(" para propagar las transacciones (aka \u201Cgas fees\u201D)"),R={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},T=a("Cargo por renta"),w=a(" por almacenar datos en la blockchain"),A=e("p",null,[a("En Solana, los cargos son deterministas: no existe el concepto de un mercado de cargos en el que los usuarios puedan pagar tarifas m\xE1s altas para aumentar sus posibilidades de ser incluidos en el siguiente bloque. Al momento de redactar este documento, las tarifas de transacci\xF3n est\xE1n determinadas \xFAnicamente por la cantidad de firmas requeridas (es decir, "),e("code",null,"lamports_per_signature"),a("), no por la cantidad de recursos utilizados. Esto se debe a que actualmente existe un l\xEDmite m\xE1ximo de 1232 bytes en todas las transacciones.")],-1),V=e("p",null,[a("Todas las transacciones requieren al menos una cuenta sea "),e("code",null,"writable"),a(" (escribible) para firmar la transacci\xF3n. Una vez enviada, la cuenta del firmante que se serializa primero ser\xE1 el pagador del cargo (fee). Esta cuenta pagar\xE1 el costo de la transacci\xF3n sin importar si la transacci\xF3n tiene \xE9xito o falla. Si el pagador del cargo no tiene saldo suficiente para pagar la tarifa de transacci\xF3n, la transacci\xF3n se cancelar\xE1.")],-1),j=e("p",null,"Al momento de escribir este art\xEDculo, el validador que produce el bloque cobra el 50% de todas las tarifas de transacci\xF3n, mientras que el 50% restante se quema. Esta estructura funciona para incentivar a los validadores a procesar tantas transacciones como sea posible durante sus espacios en el programa l\xEDder.",-1),N=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),a(" Other Resources")],-1),B={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},F=a("Documentaci\xF3n oficial"),H={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},I=a("Estructura de una transacci\xF3n"),J={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},P=a("Cargos de una transacci\xF3n por Justin Starry"),D={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},M=a("Introducci\xF3n a Solana por Hana"),O={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},G=a("Procesamiento de una transacci\xF3n por Jito Labs"),K={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Q=a("Transacci\xF3n en Solana en detalle por Alex Miller");function W(X,Y){const r=s("RouterLink"),o=s("ExternalLinkIcon");return i(),c(d,null,[m,e("p",null,[h,n(r,{to:"/es/core-concepts/programs.html"},{default:l(()=>[_]),_:1}),f,e("a",g,[b,n(o)]),v]),q,e("p",null,[k,e("a",x,[S,n(o)]),y]),E,C,e("ul",null,[e("li",null,[e("a",L,[U,n(o)]),z]),e("li",null,[e("a",R,[T,n(o)]),w])]),A,V,j,N,e("ul",null,[e("li",null,[e("a",B,[F,n(o)])]),e("li",null,[e("a",H,[I,n(o)])]),e("li",null,[e("a",J,[P,n(o)])]),e("li",null,[e("a",D,[M,n(o)])]),e("li",null,[e("a",O,[G,n(o)])]),e("li",null,[e("a",K,[Q,n(o)])])])],64)}var $=t(p,[["render",W]]);export{$ as default}; +import{_ as t,r as s,o as i,c,a as e,b as n,w as l,F as d,d as a,e as u}from"./app.d411e3b3.js";const p={},m=e("h1",{id:"transacciones",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transacciones","aria-hidden":"true"},"#"),a(" Transacciones")],-1),h=a("Los clientes pueden invocar "),_=a("programas"),f=a(" enviando una transacci\xF3n a un cluster. Una transacci\xF3n puede incluir m\xFAltiples instrucciones, cada una de ellas apuntando a un programa diferente. Cuando una transacci\xF3n es enviada, el "),g={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=a("Runtime"),v=a(" de Solana procesar\xE1 sus instrucciones en orden y de forma at\xF3mica. Si una parte de la transacci\xF3n falla, toda la transacci\xF3n fallar\xE1."),q=u('

    Hechos

    Hoja de hechos

    • Las instrucciones son la unidad de operaci\xF3n m\xE1s b\xE1sica en Solana
    • Cada instrucci\xF3n contiene:
      • El program_id (id del programa) del programa al que apunta
      • Un arreglo de todas accounts (cuentas) donde va a leer o escribir
      • Un instruction_data (datos de la instrucci\xF3n) que es un byte array para el programa espec\xEDfico
    • Varias instrucciones pueden estar contenidas en una Transacci\xF3n
    • Cada transacci\xF3n consiste de:
      • Un arreglo de todas accounts (cuentas) donde va a leer o escribir
      • Una o m\xE1s instructions (instrucciones)
      • Un blockhash (hash de bloque) reciente
      • Una o m\xE1s signatures (firmas)
    • Las instrucciones son procesadas en orden y de forma at\xF3mica
    • Si una parte de la transacci\xF3n falla, toda la transacci\xF3n fallar\xE1
    • Las transacciones est\xE1n limitadas a un m\xE1ximo de 1232 bytes

    Un vistazo m\xE1s profundo

    El Runtime de Solana requiere tanto de instrucciones como de transacciones para especificar una lista de todas las cuentas de las que va a leer o escribir. Al requerir estas cuentas por adelantado, el Runtime de Solana es capaz de paralelizar la ejecuci\xF3n en todas las transacciones.

    Cuando se env\xEDa una transacci\xF3n a un cl\xFAster, el Runtime de Solana procesar\xE1 sus instrucciones en orden y de forma at\xF3mica. Para cada instrucci\xF3n, el programa al que se invoca interpretar\xE1 el arreglo de datos y operar\xE1 en las cuentas especificadas. El programa retornar\xE1 con \xE9xito o un c\xF3digo de error. Si se devuelve un error, toda la transacci\xF3n fallar\xE1 inmediatamente.

    Toda transacci\xF3n que debite de una cuenta o modique sus datos requiere la firma del titular de la cuenta. Cualquier cuenta que se modificar\xE1 ser\xE1 marcada como writable. Una cuenta puede recibir fondos sin el permiso del titular siempre que el pagador del cargo (fee) cubra la renta y las tarifas de transacci\xF3n.

    ',6),k=a("Antes de enviar una transacci\xF3n se debe enviar un "),x={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=a("hash de bloque reciente"),y=a(". El hash de bloque reciente es usado para prevenir duplicados y eliminar transacciones obsoletas. El tiempo m\xE1ximo del hash de bloque reciente de una transacci\xF3n es de 150 bloques, o aproximadamente ~1 minuto 19 segundos al momento de escribir este art\xEDculo."),E=e("h3",{id:"cargos-fees",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#cargos-fees","aria-hidden":"true"},"#"),a(" Cargos (fees)")],-1),C=e("p",null,"La red de Solana colecta 2 tipos de cargos:",-1),L={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},U=a("Cargo por transacci\xF3n"),z=a(" para propagar las transacciones (aka \u201Cgas fees\u201D)"),R={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},T=a("Cargo por renta"),w=a(" por almacenar datos en la blockchain"),A=e("p",null,[a("En Solana, los cargos son deterministas: no existe el concepto de un mercado de cargos en el que los usuarios puedan pagar tarifas m\xE1s altas para aumentar sus posibilidades de ser incluidos en el siguiente bloque. Al momento de redactar este documento, las tarifas de transacci\xF3n est\xE1n determinadas \xFAnicamente por la cantidad de firmas requeridas (es decir, "),e("code",null,"lamports_per_signature"),a("), no por la cantidad de recursos utilizados. Esto se debe a que actualmente existe un l\xEDmite m\xE1ximo de 1232 bytes en todas las transacciones.")],-1),V=e("p",null,[a("Todas las transacciones requieren al menos una cuenta sea "),e("code",null,"writable"),a(" (escribible) para firmar la transacci\xF3n. Una vez enviada, la cuenta del firmante que se serializa primero ser\xE1 el pagador del cargo (fee). Esta cuenta pagar\xE1 el costo de la transacci\xF3n sin importar si la transacci\xF3n tiene \xE9xito o falla. Si el pagador del cargo no tiene saldo suficiente para pagar la tarifa de transacci\xF3n, la transacci\xF3n se cancelar\xE1.")],-1),j=e("p",null,"Al momento de escribir este art\xEDculo, el validador que produce el bloque cobra el 50% de todas las tarifas de transacci\xF3n, mientras que el 50% restante se quema. Esta estructura funciona para incentivar a los validadores a procesar tantas transacciones como sea posible durante sus espacios en el programa l\xEDder.",-1),N=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),a(" Other Resources")],-1),B={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},F=a("Documentaci\xF3n oficial"),H={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},I=a("Estructura de una transacci\xF3n"),J={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},P=a("Cargos de una transacci\xF3n por Justin Starry"),D={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},M=a("Introducci\xF3n a Solana por Hana"),O={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},G=a("Procesamiento de una transacci\xF3n por Jito Labs"),K={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Q=a("Transacci\xF3n en Solana en detalle por Alex Miller");function W(X,Y){const r=s("RouterLink"),o=s("ExternalLinkIcon");return i(),c(d,null,[m,e("p",null,[h,n(r,{to:"/es/core-concepts/programs.html"},{default:l(()=>[_]),_:1}),f,e("a",g,[b,n(o)]),v]),q,e("p",null,[k,e("a",x,[S,n(o)]),y]),E,C,e("ul",null,[e("li",null,[e("a",L,[U,n(o)]),z]),e("li",null,[e("a",R,[T,n(o)]),w])]),A,V,j,N,e("ul",null,[e("li",null,[e("a",B,[F,n(o)])]),e("li",null,[e("a",H,[I,n(o)])]),e("li",null,[e("a",J,[P,n(o)])]),e("li",null,[e("a",D,[M,n(o)])]),e("li",null,[e("a",O,[G,n(o)])]),e("li",null,[e("a",K,[Q,n(o)])])])],64)}var $=t(p,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.999eb3d9.js b/docs/.vuepress/dist/assets/transactions.html.68be7740.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.999eb3d9.js rename to docs/.vuepress/dist/assets/transactions.html.68be7740.js index 0ba483034..de2469da5 100644 --- a/docs/.vuepress/dist/assets/transactions.html.999eb3d9.js +++ b/docs/.vuepress/dist/assets/transactions.html.68be7740.js @@ -1 +1 @@ -import{_ as r,r as a,o as i,c,a as t,b as n,w as l,F as d,d as e,e as h}from"./app.07ce7a66.js";const _={},u=t("h1",{id:"transactions",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),e(" Transactions")],-1),p=e("Clients \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 invoke "),m=e("programs"),f=e(" \u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E48\u0E07 (submitting) transaction \u0E44\u0E1B\u0E17\u0E35\u0E48 cluster. transaction \u0E08\u0E30\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22 instructions, \u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E2D\u0E31\u0E19\u0E08\u0E30\u0E21\u0E35\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22\u0E44\u0E1B\u0E17\u0E35\u0E48 program \u0E02\u0E2D\u0E07\u0E15\u0E31\u0E27\u0E40\u0E2D\u0E07. \u0E40\u0E21\u0E37\u0E48\u0E2D transaction submit \u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27, Solana "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=e("Runtime"),k=e(" \u0E08\u0E30 process instructions \u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E19\u0E23\u0E30\u0E14\u0E31\u0E1A atomic. \u0E16\u0E49\u0E32\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E44\u0E2B\u0E19\u0E02\u0E2D\u0E07 instruction \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27 (fail), \u0E17\u0E31\u0E49\u0E07 transaction \u0E08\u0E30 fail \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14."),y=h('

    \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49

    Fact Sheet

    • Instructions \u0E04\u0E37\u0E2D\u0E2B\u0E19\u0E48\u0E27\u0E22\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1E\u0E37\u0E49\u0E19\u0E10\u0E32\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14\u0E02\u0E2D\u0E07 Solana
    • \u0E41\u0E15\u0E48\u0E25\u0E30 instruction \u0E08\u0E30\u0E21\u0E35:
      • program_id \u0E02\u0E2D\u0E07 program
      • \u0E0A\u0E38\u0E14\u0E02\u0E2D\u0E07 accounts \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E48\u0E32\u0E19 (read) \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 (write)
      • instruction_data byte array \u0E17\u0E35\u0E48\u0E08\u0E33\u0E40\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E32\u0E30\u0E08\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E1A\u0E30 program
    • \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E2A\u0E48\u0E40 instructions \u0E44\u0E14\u0E49\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E15\u0E31\u0E27 \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07 transaction
    • \u0E41\u0E15\u0E48\u0E25\u0E30 transaction \u0E08\u0E30\u0E21\u0E35:
      • \u0E0A\u0E38\u0E14\u0E02\u0E2D\u0E07 accounts \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E48\u0E32\u0E19 (read) \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 (write)
      • instructions \u0E2B\u0E19\u0E36\u0E48\u0E07\u0E15\u0E31\u0E27 \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32
      • blockhash \u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14 (recent)
      • signatures \u0E2B\u0E19\u0E36\u0E48\u0E07\u0E15\u0E31\u0E27 \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32
    • Instructions \u0E08\u0E30 process instructions \u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E19\u0E23\u0E30\u0E14\u0E31\u0E1A atomic
    • \u0E16\u0E49\u0E32\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E44\u0E2B\u0E19\u0E02\u0E2D\u0E07 instruction \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27 (fail), \u0E17\u0E31\u0E49\u0E07 transaction \u0E08\u0E30 fail \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14
    • \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 Transactions \u0E08\u0E33\u0E01\u0E31\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 1232 bytes

    \u0E25\u0E07\u0E25\u0E36\u0E01

    Solana Runtime \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49\u0E17\u0E31\u0E49\u0E07 instructions \u0E41\u0E25\u0E30 transactions \u0E23\u0E30\u0E1A\u0E38 accounts \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E08\u0E30\u0E2D\u0E48\u0E32\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 \u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 accounts \u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 runtime \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E07\u0E32\u0E19\u0E02\u0E19\u0E32\u0E19\u0E01\u0E31\u0E19 (parallelize execution) \u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07 transactions.

    \u0E40\u0E21\u0E37\u0E48\u0E2D transaction \u0E16\u0E39\u0E01 submit \u0E44\u0E1B\u0E17\u0E35\u0E48 cluster \u0E41\u0E25\u0E49\u0E27, \u0E15\u0E31\u0E27 runtime \u0E08\u0E30 process instructions \u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E19\u0E23\u0E30\u0E14\u0E31\u0E1A atomic. \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E25\u0E30 instruction, program \u0E17\u0E35\u0E48\u0E23\u0E31\u0E1A\u0E44\u0E1B\u0E08\u0E30\u0E41\u0E1B\u0E25 (interpret) data array \u0E41\u0E25\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1A\u0E19 accounts \u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49. program \u0E08\u0E30\u0E2A\u0E48\u0E07\u0E1C\u0E25\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E2B\u0E23\u0E37\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 (error code) \u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32. \u0E16\u0E49\u0E32\u0E2A\u0E48\u0E07 error \u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32 \u0E17\u0E31\u0E49\u0E07 transaction \u0E08\u0E30 fail \u0E17\u0E31\u0E19\u0E17\u0E35.

    transaction \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E01\u0E32\u0E23\u0E16\u0E2D\u0E19\u0E40\u0E07\u0E34\u0E19 (debit) \u0E08\u0E32\u0E01 account \u0E2B\u0E23\u0E37\u0E2D\u0E08\u0E30\u0E41\u0E01\u0E49\u0E44\u0E02 data \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 signature \u0E02\u0E2D\u0E07\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E19\u0E31\u0E49\u0E19\u0E2A\u0E48\u0E07\u0E21\u0E32\u0E14\u0E49\u0E27\u0E22. account \u0E44\u0E2B\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19\u0E44\u0E14\u0E49 \u0E08\u0E30\u0E16\u0E39\u0E01\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 writable. account \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E31\u0E1A\u0E40\u0E07\u0E34\u0E19 (credited) \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15\u0E08\u0E32\u0E01\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 \u0E17\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49\u0E04\u0E19\u0E08\u0E48\u0E32\u0E22 (payer)\u0E44\u0E14\u0E49\u0E08\u0E48\u0E32\u0E22\u0E04\u0E23\u0E2D\u0E1A\u0E04\u0E25\u0E38\u0E21\u0E04\u0E48\u0E32 rent \u0E41\u0E25\u0E30 transaction fees \u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27.

    ',6),x=e("\u0E01\u0E48\u0E2D\u0E19\u0E01\u0E32\u0E23 submission, \u0E17\u0E38\u0E01 transactions \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E49\u0E32\u0E07\u0E44\u0E1B\u0E17\u0E35\u0E48 "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=e("recent blockhash"),T=e(". \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 blockhash \u0E08\u0E30\u0E43\u0E0A\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1B\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E48\u0E07 transactions \u0E0B\u0E49\u0E33 \u0E41\u0E25\u0E30 transactions \u0E17\u0E35\u0E48\u0E40\u0E01\u0E48\u0E32\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14\u0E02\u0E2D\u0E07 transaction's blockhash \u0E04\u0E37\u0E2D 150 blocks, \u0E2B\u0E23\u0E37\u0E2D\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 ~1 \u0E19\u0E32\u0E17\u0E35 19 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35 \u0E43\u0E19\u0E40\u0E27\u0E25\u0E32\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E19\u0E35\u0E49."),w=t("h3",{id:"\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21-fees",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21-fees","aria-hidden":"true"},"#"),e(" \u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21 (Fees)")],-1),F=t("p",null,"Solana \u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A fee 2 \u0E41\u0E1A\u0E1A:",-1),I={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},L=e("Transaction fees"),R=e(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E17\u0E33 transactions (\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 \u201Cgas fees\u201D)"),N={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},V=e("Rent fees"),B=e(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E40\u0E01\u0E47\u0E1A data on-chain"),C=t("p",null,[e("\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Solana, transaction fees \u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 deterministic (\u0E17\u0E38\u0E01\u0E40\u0E2B\u0E15\u0E38\u0E01\u0E32\u0E23\u0E13\u0E4C\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19 \u0E21\u0E35\u0E1B\u0E31\u0E08\u0E08\u0E31\u0E22\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E2A\u0E21\u0E1A\u0E39\u0E23\u0E13\u0E4C): \u0E08\u0E30\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35 fee market \u0E17\u0E35\u0E48\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49 \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 \u0E08\u0E48\u0E32\u0E22 fees \u0E2A\u0E39\u0E07\u0E01\u0E27\u0E48\u0E32\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E2D\u0E01\u0E32\u0E2A\u0E43\u0E19\u0E01\u0E32\u0E23\u0E16\u0E39\u0E01\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25\u0E43\u0E19 block \u0E16\u0E31\u0E14\u0E44\u0E1B\u0E43\u0E19\u0E40\u0E27\u0E25\u0E32\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E19\u0E35\u0E49, transaction fees \u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A\u0E15\u0E32\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 signatures \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49 ("),t("code",null,"lamports_per_signature"),e("), \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E32\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19 resources \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E44\u0E1B \u0E17\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E1E\u0E23\u0E32\u0E30\u0E21\u0E35 hard cap 1232 bytes \u0E43\u0E19\u0E17\u0E38\u0E01\u0E46 transactions \u0E2D\u0E22\u0E39\u0E48.")],-1),E=t("p",null,[e("\u0E17\u0E38\u0E01\u0E46 transactions \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "),t("code",null,"writable"),e(" account \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E07\u0E15\u0E31\u0E27\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A sign transaction. \u0E40\u0E21\u0E37\u0E48\u0E2D submitted \u0E41\u0E25\u0E49\u0E27 writable signer account \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01 serialized \u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 fee payer \u0E41\u0E25\u0E30 account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E08\u0E48\u0E32\u0E22\u0E04\u0E48\u0E32 transaction \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E2A\u0E19\u0E43\u0E08\u0E27\u0E48\u0E32 transaction \u0E08\u0E30\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48. \u0E16\u0E49\u0E32 fee payer \u0E44\u0E21\u0E48\u0E21\u0E35 balance \u0E1E\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E48\u0E32\u0E22 transaction fee \u0E44\u0E14\u0E49 transaction \u0E01\u0E47\u0E08\u0E30\u0E16\u0E39\u0E01\u0E17\u0E34\u0E49\u0E07\u0E44\u0E1B (dropped).")],-1),j=t("p",null,"\u0E43\u0E19\u0E40\u0E27\u0E25\u0E32\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E19\u0E35\u0E49, 50% \u0E02\u0E2D\u0E07\u0E17\u0E38\u0E01 transaction fees \u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E1B\u0E42\u0E14\u0E22 validator \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E2A\u0E23\u0E49\u0E32\u0E07 block, \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48 50% \u0E17\u0E35\u0E48\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E1C\u0E32\u0E17\u0E34\u0E49\u0E07 (burn). \u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49\u0E21\u0E35\u0E02\u0E36\u0E49\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E23\u0E07\u0E08\u0E39\u0E07\u0E43\u0E08\u0E43\u0E2B\u0E49 validators \u0E1B\u0E23\u0E30\u0E21\u0E27\u0E13\u0E1C\u0E25 transactions \u0E43\u0E2B\u0E49\u0E21\u0E32\u0E01\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14\u0E40\u0E17\u0E48\u0E32\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E1B\u0E44\u0E14\u0E49\u0E43\u0E19\u0E0A\u0E48\u0E27\u0E07 slots \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33 (leader)",-1),z=t("h2",{id:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19","aria-hidden":"true"},"#"),e(" \u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19")],-1),A={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},D=e("Official Documentation"),J={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},H=e("Transaction Structure"),M={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},O=e("Transaction Fees by Justin Starry"),P={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},q=e("An Introduction to Solana by Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=e("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=e("Solana Transaction in Depth by Alex Miller");function W(X,Y){const s=a("RouterLink"),o=a("ExternalLinkIcon");return i(),c(d,null,[u,t("p",null,[p,n(s,{to:"/th/core-concepts/programs.html"},{default:l(()=>[m]),_:1}),f,t("a",b,[g,n(o)]),k]),y,t("p",null,[x,t("a",v,[S,n(o)]),T]),w,F,t("ul",null,[t("li",null,[t("a",I,[L,n(o)]),R]),t("li",null,[t("a",N,[V,n(o)]),B])]),C,E,j,z,t("ul",null,[t("li",null,[t("a",A,[D,n(o)])]),t("li",null,[t("a",J,[H,n(o)])]),t("li",null,[t("a",M,[O,n(o)])]),t("li",null,[t("a",P,[q,n(o)])]),t("li",null,[t("a",G,[K,n(o)])]),t("li",null,[t("a",Q,[U,n(o)])])])],64)}var $=r(_,[["render",W]]);export{$ as default}; +import{_ as r,r as a,o as i,c,a as t,b as n,w as l,F as d,d as e,e as h}from"./app.d411e3b3.js";const _={},u=t("h1",{id:"transactions",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),e(" Transactions")],-1),p=e("Clients \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 invoke "),m=e("programs"),f=e(" \u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E2A\u0E48\u0E07 (submitting) transaction \u0E44\u0E1B\u0E17\u0E35\u0E48 cluster. transaction \u0E08\u0E30\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22 instructions, \u0E42\u0E14\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E2D\u0E31\u0E19\u0E08\u0E30\u0E21\u0E35\u0E40\u0E1B\u0E49\u0E32\u0E2B\u0E21\u0E32\u0E22\u0E44\u0E1B\u0E17\u0E35\u0E48 program \u0E02\u0E2D\u0E07\u0E15\u0E31\u0E27\u0E40\u0E2D\u0E07. \u0E40\u0E21\u0E37\u0E48\u0E2D transaction submit \u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27, Solana "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=e("Runtime"),k=e(" \u0E08\u0E30 process instructions \u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E19\u0E23\u0E30\u0E14\u0E31\u0E1A atomic. \u0E16\u0E49\u0E32\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E44\u0E2B\u0E19\u0E02\u0E2D\u0E07 instruction \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27 (fail), \u0E17\u0E31\u0E49\u0E07 transaction \u0E08\u0E30 fail \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14."),y=h('

    \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49

    Fact Sheet

    • Instructions \u0E04\u0E37\u0E2D\u0E2B\u0E19\u0E48\u0E27\u0E22\u0E01\u0E32\u0E23\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1E\u0E37\u0E49\u0E19\u0E10\u0E32\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14\u0E02\u0E2D\u0E07 Solana
    • \u0E41\u0E15\u0E48\u0E25\u0E30 instruction \u0E08\u0E30\u0E21\u0E35:
      • program_id \u0E02\u0E2D\u0E07 program
      • \u0E0A\u0E38\u0E14\u0E02\u0E2D\u0E07 accounts \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E48\u0E32\u0E19 (read) \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 (write)
      • instruction_data byte array \u0E17\u0E35\u0E48\u0E08\u0E33\u0E40\u0E1E\u0E32\u0E30\u0E40\u0E08\u0E32\u0E30\u0E08\u0E07\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E1A\u0E30 program
    • \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E2A\u0E48\u0E40 instructions \u0E44\u0E14\u0E49\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E15\u0E31\u0E27 \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07 transaction
    • \u0E41\u0E15\u0E48\u0E25\u0E30 transaction \u0E08\u0E30\u0E21\u0E35:
      • \u0E0A\u0E38\u0E14\u0E02\u0E2D\u0E07 accounts \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E48\u0E32\u0E19 (read) \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 (write)
      • instructions \u0E2B\u0E19\u0E36\u0E48\u0E07\u0E15\u0E31\u0E27 \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32
      • blockhash \u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14 (recent)
      • signatures \u0E2B\u0E19\u0E36\u0E48\u0E07\u0E15\u0E31\u0E27 \u0E2B\u0E23\u0E37\u0E2D\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32
    • Instructions \u0E08\u0E30 process instructions \u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E19\u0E23\u0E30\u0E14\u0E31\u0E1A atomic
    • \u0E16\u0E49\u0E32\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E44\u0E2B\u0E19\u0E02\u0E2D\u0E07 instruction \u0E25\u0E49\u0E21\u0E40\u0E2B\u0E25\u0E27 (fail), \u0E17\u0E31\u0E49\u0E07 transaction \u0E08\u0E30 fail \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14
    • \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 Transactions \u0E08\u0E33\u0E01\u0E31\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 1232 bytes

    \u0E25\u0E07\u0E25\u0E36\u0E01

    Solana Runtime \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2B\u0E49\u0E17\u0E31\u0E49\u0E07 instructions \u0E41\u0E25\u0E30 transactions \u0E23\u0E30\u0E1A\u0E38 accounts \u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14\u0E17\u0E35\u0E48\u0E08\u0E30\u0E2D\u0E48\u0E32\u0E19 \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E02\u0E35\u0E22\u0E19 \u0E01\u0E32\u0E23\u0E17\u0E35\u0E48\u0E40\u0E23\u0E32\u0E40\u0E15\u0E23\u0E35\u0E22\u0E21 accounts \u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49 runtime \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E17\u0E33\u0E07\u0E32\u0E19\u0E02\u0E19\u0E32\u0E19\u0E01\u0E31\u0E19 (parallelize execution) \u0E44\u0E14\u0E49\u0E17\u0E31\u0E49\u0E07 transactions.

    \u0E40\u0E21\u0E37\u0E48\u0E2D transaction \u0E16\u0E39\u0E01 submit \u0E44\u0E1B\u0E17\u0E35\u0E48 cluster \u0E41\u0E25\u0E49\u0E27, \u0E15\u0E31\u0E27 runtime \u0E08\u0E30 process instructions \u0E15\u0E32\u0E21\u0E25\u0E33\u0E14\u0E31\u0E1A \u0E41\u0E25\u0E30\u0E17\u0E33\u0E43\u0E19\u0E23\u0E30\u0E14\u0E31\u0E1A atomic. \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E41\u0E15\u0E48\u0E25\u0E30 instruction, program \u0E17\u0E35\u0E48\u0E23\u0E31\u0E1A\u0E44\u0E1B\u0E08\u0E30\u0E41\u0E1B\u0E25 (interpret) data array \u0E41\u0E25\u0E30\u0E17\u0E33\u0E07\u0E32\u0E19\u0E1A\u0E19 accounts \u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49. program \u0E08\u0E30\u0E2A\u0E48\u0E07\u0E1C\u0E25\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08 \u0E2B\u0E23\u0E37\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E1C\u0E34\u0E14\u0E1E\u0E25\u0E32\u0E14 (error code) \u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32. \u0E16\u0E49\u0E32\u0E2A\u0E48\u0E07 error \u0E01\u0E25\u0E31\u0E1A\u0E21\u0E32 \u0E17\u0E31\u0E49\u0E07 transaction \u0E08\u0E30 fail \u0E17\u0E31\u0E19\u0E17\u0E35.

    transaction \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E01\u0E32\u0E23\u0E16\u0E2D\u0E19\u0E40\u0E07\u0E34\u0E19 (debit) \u0E08\u0E32\u0E01 account \u0E2B\u0E23\u0E37\u0E2D\u0E08\u0E30\u0E41\u0E01\u0E49\u0E44\u0E02 data \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 signature \u0E02\u0E2D\u0E07\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 account \u0E19\u0E31\u0E49\u0E19\u0E2A\u0E48\u0E07\u0E21\u0E32\u0E14\u0E49\u0E27\u0E22. account \u0E44\u0E2B\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19\u0E44\u0E14\u0E49 \u0E08\u0E30\u0E16\u0E39\u0E01\u0E23\u0E30\u0E1A\u0E38\u0E44\u0E27\u0E49\u0E27\u0E48\u0E32 writable. account \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E31\u0E1A\u0E40\u0E07\u0E34\u0E19 (credited) \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15\u0E08\u0E32\u0E01\u0E40\u0E08\u0E49\u0E32\u0E02\u0E2D\u0E07 \u0E17\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49\u0E04\u0E19\u0E08\u0E48\u0E32\u0E22 (payer)\u0E44\u0E14\u0E49\u0E08\u0E48\u0E32\u0E22\u0E04\u0E23\u0E2D\u0E1A\u0E04\u0E25\u0E38\u0E21\u0E04\u0E48\u0E32 rent \u0E41\u0E25\u0E30 transaction fees \u0E44\u0E1B\u0E41\u0E25\u0E49\u0E27.

    ',6),x=e("\u0E01\u0E48\u0E2D\u0E19\u0E01\u0E32\u0E23 submission, \u0E17\u0E38\u0E01 transactions \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E2D\u0E49\u0E32\u0E07\u0E44\u0E1B\u0E17\u0E35\u0E48 "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=e("recent blockhash"),T=e(". \u0E42\u0E14\u0E22\u0E17\u0E35\u0E48 blockhash \u0E08\u0E30\u0E43\u0E0A\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1B\u0E49\u0E2D\u0E07\u0E01\u0E31\u0E19\u0E01\u0E32\u0E23\u0E2A\u0E48\u0E07 transactions \u0E0B\u0E49\u0E33 \u0E41\u0E25\u0E30 transactions \u0E17\u0E35\u0E48\u0E40\u0E01\u0E48\u0E32\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14\u0E02\u0E2D\u0E07 transaction's blockhash \u0E04\u0E37\u0E2D 150 blocks, \u0E2B\u0E23\u0E37\u0E2D\u0E1B\u0E23\u0E30\u0E21\u0E32\u0E13 ~1 \u0E19\u0E32\u0E17\u0E35 19 \u0E27\u0E34\u0E19\u0E32\u0E17\u0E35 \u0E43\u0E19\u0E40\u0E27\u0E25\u0E32\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E19\u0E35\u0E49."),w=t("h3",{id:"\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21-fees",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21-fees","aria-hidden":"true"},"#"),e(" \u0E04\u0E48\u0E32\u0E18\u0E23\u0E23\u0E21\u0E40\u0E19\u0E35\u0E22\u0E21 (Fees)")],-1),F=t("p",null,"Solana \u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A fee 2 \u0E41\u0E1A\u0E1A:",-1),I={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},L=e("Transaction fees"),R=e(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E17\u0E33 transactions (\u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E35\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 \u201Cgas fees\u201D)"),N={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},V=e("Rent fees"),B=e(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E40\u0E01\u0E47\u0E1A data on-chain"),C=t("p",null,[e("\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A Solana, transaction fees \u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 deterministic (\u0E17\u0E38\u0E01\u0E40\u0E2B\u0E15\u0E38\u0E01\u0E32\u0E23\u0E13\u0E4C\u0E17\u0E35\u0E48\u0E40\u0E01\u0E34\u0E14\u0E02\u0E36\u0E49\u0E19 \u0E21\u0E35\u0E1B\u0E31\u0E08\u0E08\u0E31\u0E22\u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E2A\u0E21\u0E1A\u0E39\u0E23\u0E13\u0E4C): \u0E08\u0E30\u0E22\u0E31\u0E07\u0E44\u0E21\u0E48\u0E21\u0E35 fee market \u0E17\u0E35\u0E48\u0E1C\u0E39\u0E49\u0E43\u0E0A\u0E49 \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16 \u0E08\u0E48\u0E32\u0E22 fees \u0E2A\u0E39\u0E07\u0E01\u0E27\u0E48\u0E32\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E2D\u0E01\u0E32\u0E2A\u0E43\u0E19\u0E01\u0E32\u0E23\u0E16\u0E39\u0E01\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25\u0E43\u0E19 block \u0E16\u0E31\u0E14\u0E44\u0E1B\u0E43\u0E19\u0E40\u0E27\u0E25\u0E32\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E19\u0E35\u0E49, transaction fees \u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A\u0E15\u0E32\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 signatures \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E0A\u0E49 ("),t("code",null,"lamports_per_signature"),e("), \u0E44\u0E21\u0E48\u0E43\u0E0A\u0E48\u0E15\u0E32\u0E21\u0E08\u0E33\u0E19\u0E27\u0E19 resources \u0E17\u0E35\u0E48\u0E43\u0E0A\u0E49\u0E44\u0E1B \u0E17\u0E31\u0E49\u0E07\u0E19\u0E35\u0E49\u0E40\u0E1B\u0E47\u0E19\u0E40\u0E1E\u0E23\u0E32\u0E30\u0E21\u0E35 hard cap 1232 bytes \u0E43\u0E19\u0E17\u0E38\u0E01\u0E46 transactions \u0E2D\u0E22\u0E39\u0E48.")],-1),E=t("p",null,[e("\u0E17\u0E38\u0E01\u0E46 transactions \u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "),t("code",null,"writable"),e(" account \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22\u0E2B\u0E19\u0E36\u0E07\u0E15\u0E31\u0E27\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A sign transaction. \u0E40\u0E21\u0E37\u0E48\u0E2D submitted \u0E41\u0E25\u0E49\u0E27 writable signer account \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01 serialized \u0E40\u0E1B\u0E47\u0E19\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19 fee payer \u0E41\u0E25\u0E30 account \u0E19\u0E35\u0E49\u0E08\u0E30\u0E08\u0E48\u0E32\u0E22\u0E04\u0E48\u0E32 transaction \u0E42\u0E14\u0E22\u0E44\u0E21\u0E48\u0E2A\u0E19\u0E43\u0E08\u0E27\u0E48\u0E32 transaction \u0E08\u0E30\u0E2A\u0E33\u0E40\u0E23\u0E47\u0E08\u0E2B\u0E23\u0E37\u0E2D\u0E44\u0E21\u0E48. \u0E16\u0E49\u0E32 fee payer \u0E44\u0E21\u0E48\u0E21\u0E35 balance \u0E1E\u0E2D\u0E17\u0E35\u0E48\u0E08\u0E30\u0E08\u0E48\u0E32\u0E22 transaction fee \u0E44\u0E14\u0E49 transaction \u0E01\u0E47\u0E08\u0E30\u0E16\u0E39\u0E01\u0E17\u0E34\u0E49\u0E07\u0E44\u0E1B (dropped).")],-1),j=t("p",null,"\u0E43\u0E19\u0E40\u0E27\u0E25\u0E32\u0E15\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19\u0E19\u0E35\u0E49, 50% \u0E02\u0E2D\u0E07\u0E17\u0E38\u0E01 transaction fees \u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E1B\u0E42\u0E14\u0E22 validator \u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E19\u0E2A\u0E23\u0E49\u0E32\u0E07 block, \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48 50% \u0E17\u0E35\u0E48\u0E40\u0E2B\u0E25\u0E37\u0E2D\u0E08\u0E30\u0E16\u0E39\u0E01\u0E40\u0E1C\u0E32\u0E17\u0E34\u0E49\u0E07 (burn). \u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E1A\u0E1A\u0E19\u0E35\u0E49\u0E21\u0E35\u0E02\u0E36\u0E49\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E1B\u0E47\u0E19\u0E41\u0E23\u0E07\u0E08\u0E39\u0E07\u0E43\u0E08\u0E43\u0E2B\u0E49 validators \u0E1B\u0E23\u0E30\u0E21\u0E27\u0E13\u0E1C\u0E25 transactions \u0E43\u0E2B\u0E49\u0E21\u0E32\u0E01\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14\u0E40\u0E17\u0E48\u0E32\u0E17\u0E35\u0E48\u0E08\u0E30\u0E40\u0E1B\u0E47\u0E19\u0E44\u0E1B\u0E44\u0E14\u0E49\u0E43\u0E19\u0E0A\u0E48\u0E27\u0E07 slots \u0E43\u0E19\u0E02\u0E13\u0E30\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E1C\u0E39\u0E49\u0E19\u0E33 (leader)",-1),z=t("h2",{id:"\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19","aria-hidden":"true"},"#"),e(" \u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E2D\u0E37\u0E48\u0E19")],-1),A={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},D=e("Official Documentation"),J={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},H=e("Transaction Structure"),M={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},O=e("Transaction Fees by Justin Starry"),P={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},q=e("An Introduction to Solana by Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=e("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=e("Solana Transaction in Depth by Alex Miller");function W(X,Y){const s=a("RouterLink"),o=a("ExternalLinkIcon");return i(),c(d,null,[u,t("p",null,[p,n(s,{to:"/th/core-concepts/programs.html"},{default:l(()=>[m]),_:1}),f,t("a",b,[g,n(o)]),k]),y,t("p",null,[x,t("a",v,[S,n(o)]),T]),w,F,t("ul",null,[t("li",null,[t("a",I,[L,n(o)]),R]),t("li",null,[t("a",N,[V,n(o)]),B])]),C,E,j,z,t("ul",null,[t("li",null,[t("a",A,[D,n(o)])]),t("li",null,[t("a",J,[H,n(o)])]),t("li",null,[t("a",M,[O,n(o)])]),t("li",null,[t("a",P,[q,n(o)])]),t("li",null,[t("a",G,[K,n(o)])]),t("li",null,[t("a",Q,[U,n(o)])])])],64)}var $=r(_,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.bc7f0379.js b/docs/.vuepress/dist/assets/transactions.html.a50662e6.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.bc7f0379.js rename to docs/.vuepress/dist/assets/transactions.html.a50662e6.js index 40cccda8a..7d3341721 100644 --- a/docs/.vuepress/dist/assets/transactions.html.bc7f0379.js +++ b/docs/.vuepress/dist/assets/transactions.html.a50662e6.js @@ -1 +1 @@ -import{_ as n,r,o as i,c as d,a,b as o,w as c,F as l,d as e,e as u}from"./app.07ce7a66.js";const m={},p=a("h1",{id:"transacoes",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#transacoes","aria-hidden":"true"},"#"),e(" Transa\xE7\xF5es")],-1),h=e("Os clientes podem invocar "),_=e("programas"),f=e(" enviando uma transa\xE7\xE3o para um cluster. Uma \xFAnica transa\xE7\xE3o pode incluir v\xE1rias instru\xE7\xF5es, cada uma visando seu pr\xF3prio programa. Quando uma transa\xE7\xE3o \xE9 enviada, o "),g={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=e("Tempo de Execu\xE7\xE3o (Runtime)"),x=e(" da Solana processar\xE1 suas instru\xE7\xF5es em ordem e atomicamente. Se qualquer parte de uma instru\xE7\xE3o falhar, toda a transa\xE7\xE3o falhar\xE1."),v=u('

    Fatos

    Ficha Informativa

    • As instru\xE7\xF5es s\xE3o as unidades operacionais mais b\xE1sicas na Solana
    • Cada instru\xE7\xE3o cont\xE9m:
      • O identificador do programa (program_id) desejado
      • Uma lista de todas as contas (accounts) que pretende ler ou escrever
      • Um array de bytes com os dados da instru\xE7\xE3o (instruction_data), espec\xEDfico para o programa desejado
    • M\xFAltiplas instru\xE7\xF5es podem ser agrupadas em uma \xFAnica transa\xE7\xE3o
    • Cada transa\xE7\xE3o cont\xE9m:
      • Uma lista de todas as contas (accounts) que pretende ler ou escrever
      • Uma ou mais instru\xE7\xF5es (instructions)
      • Um hash recente de bloco (blockhash)
      • Uma ou mais assinaturas (signatures)
    • As instru\xE7\xF5es s\xE3o processadas de forma ordenada e at\xF4mica
    • Se qualquer parte de uma instru\xE7\xE3o falhar, a transa\xE7\xE3o inteira falha
    • As transa\xE7\xF5es s\xE3o limitadas a 1232 bytes

    Mergulho Profundo

    O tempo de execu\xE7\xE3o da Solana exige que tanto as instru\xE7\xF5es quanto as transa\xE7\xF5es especifiquem uma lista de todas as contas que pretendem ler ou escrever. Ao exigir essas contas com anteced\xEAncia, o tempo de execu\xE7\xE3o \xE9 capaz de executar em paralelo todas as transa\xE7\xF5es.

    Quando uma transa\xE7\xE3o \xE9 enviada para um cluster, o tempo de execu\xE7\xE3o processa suas instru\xE7\xF5es em ordem e atomicamente. Para cada instru\xE7\xE3o, o programa receptor interpretar\xE1 seu array de dados e operar\xE1 em suas contas especificadas. O programa retornar\xE1 com sucesso ou com um c\xF3digo de erro. Se ocorrer um erro, a transa\xE7\xE3o inteira falhar\xE1 imediatamente.

    Qualquer transa\xE7\xE3o que tenha como objetivo debitar uma conta ou modificar seus dados requer a assinatura do titular da conta. Qualquer conta que ser\xE1 modificada \xE9 marcada como writable (grav\xE1vel). Uma conta pode ser creditada sem a permiss\xE3o do titular, desde que o pagador da taxa de transa\xE7\xE3o cubra o aluguel e as taxas de transa\xE7\xE3o necess\xE1rias.

    ',6),q=e("Antes da submiss\xE3o, todas as transa\xE7\xF5es devem referenciar um "),k={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=e("hash de bloco recente"),T=e(". O hash de bloco \xE9 usado para evitar duplicidades e eliminar transa\xE7\xF5es obsoletas. A idade m\xE1xima do hash de bloco de uma transa\xE7\xE3o \xE9 de 150 blocos, ou cerca de ~1 minuto e 19 segundos a partir do momento em que esta mensagem est\xE1 sendo escrita."),A=a("h3",{id:"taxas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#taxas","aria-hidden":"true"},"#"),e(" Taxas")],-1),U=a("p",null,"A rede Solana recolhe dois tipos de taxas:",-1),y={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},j=e("Taxas de Transa\xE7\xE3o"),E=e(' para a propaga\xE7\xE3o de transa\xE7\xF5es (ou seja, "taxas de g\xE1s")'),N={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},O=e("Taxas de Aluguel"),F=e(" para o armazenamento de dados na cadeia"),w=a("p",null,[e("Na Solana, as taxas de transa\xE7\xE3o s\xE3o determin\xEDsticas: n\xE3o h\xE1 conceito de mercado de taxas em que os usu\xE1rios possam pagar taxas mais altas para aumentar suas chances de serem inclu\xEDdos no pr\xF3ximo bloco. No momento em que este texto foi escrito, as taxas de transa\xE7\xE3o s\xE3o determinadas apenas pelo n\xFAmero de assinaturas necess\xE1rias (ou seja, "),a("code",null,"lamports_per_signature"),e("), n\xE3o pelo uso de recursos. Isso ocorre porque atualmente h\xE1 um limite r\xEDgido de 1232 bytes em todas as transa\xE7\xF5es.")],-1),z=a("p",null,[e("Todas as transa\xE7\xF5es requerem pelo menos uma conta grav\xE1vel ("),a("code",null,"writable"),e(") para assinar a transa\xE7\xE3o. Uma vez enviada, a conta de signat\xE1rio grav\xE1vel que \xE9 serializada primeiro ser\xE1 a pagadora da taxa. Esta conta pagar\xE1 o custo da transa\xE7\xE3o, independentemente de a transa\xE7\xE3o ter sucesso ou falhar. Se o pagador da taxa n\xE3o tiver um saldo suficiente para pagar a taxa de transa\xE7\xE3o, a transa\xE7\xE3o ser\xE1 descartada.")],-1),I=a("p",null,"No momento em que este texto foi escrito, 50% de todas as taxas de transa\xE7\xE3o s\xE3o coletadas pelo validador que produz o bloco, enquanto os 50% restantes s\xE3o queimados. Essa estrutura funciona para incentivar os validadores a processar o maior n\xFAmero poss\xEDvel de transa\xE7\xF5es durante seus slots no cronograma do l\xEDder.",-1),L=a("h2",{id:"outros-recursos",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#outros-recursos","aria-hidden":"true"},"#"),e(" Outros Recursos")],-1),C={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},P=e("Documenta\xE7\xE3o Oficial"),Q={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},R=e("Estrutura da Transa\xE7\xE3o"),V={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},B=e("Transaction Fees (Taxas de transa\xE7\xE3o), por Justin Starry"),M={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},D=e("An Introduction to Solana (Uma introdu\xE7\xE3o \xE0 Solana), por Hana"),J={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},H=e("Transaction Processing (Processamento da transa\xE7\xE3o), por Jito Labs"),G={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},K=e("Solana Transaction in Depth (Transa\xE7\xE3o da Solana em profundidade), por Alex Miller");function W(X,Y){const t=r("RouterLink"),s=r("ExternalLinkIcon");return i(),d(l,null,[p,a("p",null,[h,o(t,{to:"/pt/core-concepts/programs.html"},{default:c(()=>[_]),_:1}),f,a("a",g,[b,o(s)]),x]),v,a("p",null,[q,a("a",k,[S,o(s)]),T]),A,U,a("ul",null,[a("li",null,[a("a",y,[j,o(s)]),E]),a("li",null,[a("a",N,[O,o(s)]),F])]),w,z,I,L,a("ul",null,[a("li",null,[a("a",C,[P,o(s)])]),a("li",null,[a("a",Q,[R,o(s)])]),a("li",null,[a("a",V,[B,o(s)])]),a("li",null,[a("a",M,[D,o(s)])]),a("li",null,[a("a",J,[H,o(s)])]),a("li",null,[a("a",G,[K,o(s)])])])],64)}var $=n(m,[["render",W]]);export{$ as default}; +import{_ as n,r,o as i,c as d,a,b as o,w as c,F as l,d as e,e as u}from"./app.d411e3b3.js";const m={},p=a("h1",{id:"transacoes",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#transacoes","aria-hidden":"true"},"#"),e(" Transa\xE7\xF5es")],-1),h=e("Os clientes podem invocar "),_=e("programas"),f=e(" enviando uma transa\xE7\xE3o para um cluster. Uma \xFAnica transa\xE7\xE3o pode incluir v\xE1rias instru\xE7\xF5es, cada uma visando seu pr\xF3prio programa. Quando uma transa\xE7\xE3o \xE9 enviada, o "),g={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=e("Tempo de Execu\xE7\xE3o (Runtime)"),x=e(" da Solana processar\xE1 suas instru\xE7\xF5es em ordem e atomicamente. Se qualquer parte de uma instru\xE7\xE3o falhar, toda a transa\xE7\xE3o falhar\xE1."),v=u('

    Fatos

    Ficha Informativa

    • As instru\xE7\xF5es s\xE3o as unidades operacionais mais b\xE1sicas na Solana
    • Cada instru\xE7\xE3o cont\xE9m:
      • O identificador do programa (program_id) desejado
      • Uma lista de todas as contas (accounts) que pretende ler ou escrever
      • Um array de bytes com os dados da instru\xE7\xE3o (instruction_data), espec\xEDfico para o programa desejado
    • M\xFAltiplas instru\xE7\xF5es podem ser agrupadas em uma \xFAnica transa\xE7\xE3o
    • Cada transa\xE7\xE3o cont\xE9m:
      • Uma lista de todas as contas (accounts) que pretende ler ou escrever
      • Uma ou mais instru\xE7\xF5es (instructions)
      • Um hash recente de bloco (blockhash)
      • Uma ou mais assinaturas (signatures)
    • As instru\xE7\xF5es s\xE3o processadas de forma ordenada e at\xF4mica
    • Se qualquer parte de uma instru\xE7\xE3o falhar, a transa\xE7\xE3o inteira falha
    • As transa\xE7\xF5es s\xE3o limitadas a 1232 bytes

    Mergulho Profundo

    O tempo de execu\xE7\xE3o da Solana exige que tanto as instru\xE7\xF5es quanto as transa\xE7\xF5es especifiquem uma lista de todas as contas que pretendem ler ou escrever. Ao exigir essas contas com anteced\xEAncia, o tempo de execu\xE7\xE3o \xE9 capaz de executar em paralelo todas as transa\xE7\xF5es.

    Quando uma transa\xE7\xE3o \xE9 enviada para um cluster, o tempo de execu\xE7\xE3o processa suas instru\xE7\xF5es em ordem e atomicamente. Para cada instru\xE7\xE3o, o programa receptor interpretar\xE1 seu array de dados e operar\xE1 em suas contas especificadas. O programa retornar\xE1 com sucesso ou com um c\xF3digo de erro. Se ocorrer um erro, a transa\xE7\xE3o inteira falhar\xE1 imediatamente.

    Qualquer transa\xE7\xE3o que tenha como objetivo debitar uma conta ou modificar seus dados requer a assinatura do titular da conta. Qualquer conta que ser\xE1 modificada \xE9 marcada como writable (grav\xE1vel). Uma conta pode ser creditada sem a permiss\xE3o do titular, desde que o pagador da taxa de transa\xE7\xE3o cubra o aluguel e as taxas de transa\xE7\xE3o necess\xE1rias.

    ',6),q=e("Antes da submiss\xE3o, todas as transa\xE7\xF5es devem referenciar um "),k={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=e("hash de bloco recente"),T=e(". O hash de bloco \xE9 usado para evitar duplicidades e eliminar transa\xE7\xF5es obsoletas. A idade m\xE1xima do hash de bloco de uma transa\xE7\xE3o \xE9 de 150 blocos, ou cerca de ~1 minuto e 19 segundos a partir do momento em que esta mensagem est\xE1 sendo escrita."),A=a("h3",{id:"taxas",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#taxas","aria-hidden":"true"},"#"),e(" Taxas")],-1),U=a("p",null,"A rede Solana recolhe dois tipos de taxas:",-1),y={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},j=e("Taxas de Transa\xE7\xE3o"),E=e(' para a propaga\xE7\xE3o de transa\xE7\xF5es (ou seja, "taxas de g\xE1s")'),N={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},O=e("Taxas de Aluguel"),F=e(" para o armazenamento de dados na cadeia"),w=a("p",null,[e("Na Solana, as taxas de transa\xE7\xE3o s\xE3o determin\xEDsticas: n\xE3o h\xE1 conceito de mercado de taxas em que os usu\xE1rios possam pagar taxas mais altas para aumentar suas chances de serem inclu\xEDdos no pr\xF3ximo bloco. No momento em que este texto foi escrito, as taxas de transa\xE7\xE3o s\xE3o determinadas apenas pelo n\xFAmero de assinaturas necess\xE1rias (ou seja, "),a("code",null,"lamports_per_signature"),e("), n\xE3o pelo uso de recursos. Isso ocorre porque atualmente h\xE1 um limite r\xEDgido de 1232 bytes em todas as transa\xE7\xF5es.")],-1),z=a("p",null,[e("Todas as transa\xE7\xF5es requerem pelo menos uma conta grav\xE1vel ("),a("code",null,"writable"),e(") para assinar a transa\xE7\xE3o. Uma vez enviada, a conta de signat\xE1rio grav\xE1vel que \xE9 serializada primeiro ser\xE1 a pagadora da taxa. Esta conta pagar\xE1 o custo da transa\xE7\xE3o, independentemente de a transa\xE7\xE3o ter sucesso ou falhar. Se o pagador da taxa n\xE3o tiver um saldo suficiente para pagar a taxa de transa\xE7\xE3o, a transa\xE7\xE3o ser\xE1 descartada.")],-1),I=a("p",null,"No momento em que este texto foi escrito, 50% de todas as taxas de transa\xE7\xE3o s\xE3o coletadas pelo validador que produz o bloco, enquanto os 50% restantes s\xE3o queimados. Essa estrutura funciona para incentivar os validadores a processar o maior n\xFAmero poss\xEDvel de transa\xE7\xF5es durante seus slots no cronograma do l\xEDder.",-1),L=a("h2",{id:"outros-recursos",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#outros-recursos","aria-hidden":"true"},"#"),e(" Outros Recursos")],-1),C={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},P=e("Documenta\xE7\xE3o Oficial"),Q={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},R=e("Estrutura da Transa\xE7\xE3o"),V={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},B=e("Transaction Fees (Taxas de transa\xE7\xE3o), por Justin Starry"),M={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},D=e("An Introduction to Solana (Uma introdu\xE7\xE3o \xE0 Solana), por Hana"),J={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},H=e("Transaction Processing (Processamento da transa\xE7\xE3o), por Jito Labs"),G={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},K=e("Solana Transaction in Depth (Transa\xE7\xE3o da Solana em profundidade), por Alex Miller");function W(X,Y){const t=r("RouterLink"),s=r("ExternalLinkIcon");return i(),d(l,null,[p,a("p",null,[h,o(t,{to:"/pt/core-concepts/programs.html"},{default:c(()=>[_]),_:1}),f,a("a",g,[b,o(s)]),x]),v,a("p",null,[q,a("a",k,[S,o(s)]),T]),A,U,a("ul",null,[a("li",null,[a("a",y,[j,o(s)]),E]),a("li",null,[a("a",N,[O,o(s)]),F])]),w,z,I,L,a("ul",null,[a("li",null,[a("a",C,[P,o(s)])]),a("li",null,[a("a",Q,[R,o(s)])]),a("li",null,[a("a",V,[B,o(s)])]),a("li",null,[a("a",M,[D,o(s)])]),a("li",null,[a("a",J,[H,o(s)])]),a("li",null,[a("a",G,[K,o(s)])])])],64)}var $=n(m,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.b7388dfe.js b/docs/.vuepress/dist/assets/transactions.html.c46b5241.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.b7388dfe.js rename to docs/.vuepress/dist/assets/transactions.html.c46b5241.js index 8050a9d45..683f2d641 100644 --- a/docs/.vuepress/dist/assets/transactions.html.b7388dfe.js +++ b/docs/.vuepress/dist/assets/transactions.html.c46b5241.js @@ -1 +1 @@ -import{_ as g,r as s,o as e,c as r,a,b as t,w as l,F as c,d as n,e as u}from"./app.07ce7a66.js";const d={},m=a("h1",{id:"transactions",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),n(" Transactions")],-1),h=n("Maaaring mag-invoke ang mga kliyente ng "),p=n("programs"),y=n(" sa pamamagitan ng pagsusumite ng transaksyon sa isang cluster. Ang isang transaksyon ay maaaring magsama ng maraming instruction, ang bawat isa ay nagta-target ng sarili nitong programa. Kapag naisumite ang isang transaksyon, ipoproseso ng Solana "),k={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=n("Runtime"),_=n(" ang mga instruction na ito sa pagkakasunud-sunod at atomically. Kung nabigo ang anumang bahagi ng isang pagtuturo, mabibigo ang buong transaksyon."),f=u('

    Facts

    Fact Sheet

    • Ang mga instruction ay ang pinakapangunahing yunit ng pagpapatakbo sa Solana
    • Ang bawat instruction ay naglalaman ng:
      • Ang program_id ng nilalayon na programa
      • Isang hanay ng lahat ng account na nilalayon nitong basahin o sulatan
      • Isang instruction_data byte array na partikular sa nilalayon na programa
    • Maramihang mga instruction ay maaaring isama sa isang solong transaksyon
    • Ang bawat transaksyon ay naglalaman ng:
      • Isang hanay ng lahat ng account na nilalayon nitong basahin o sulatan
      • Isa o higit pang 'mga instruction'
      • Isang kamakailang blockhash
      • Isa o higit pang pirma
    • Ang mga instruction ay pinoproseso sa pagkakasunud-sunod at atomically
    • Kung nabigo ang anumang bahagi ng isang pagtuturo, mabibigo ang buong transaksyon.
    • Limitado ang mga transaksyon sa 1232 bytes

    Deep Dive

    Ang Solana Runtime ay nangangailangan ng parehong mga instruction at mga transaksyon upang tukuyin ang isang listahan ng lahat ng mga account na nilayon nilang basahin o sulatan. Sa pamamagitan ng pag-aatas sa mga account na ito nang maaga, ang runtime ay nagagawang iparallelize ang pagpapatupad sa lahat ng mga transaksyon.

    Kapag isinumite ang isang transaksyon sa isang cluster, ipoproseso ng runtime ang mga instruction na ito sa pagkakasunud-sunod at atomically. Para sa bawat pagtuturo, bibigyang-kahulugan ng tatanggap na programa ang array ng data nito at gagana sa mga tinukoy nitong account. Matagumpay na babalik ang program o may error code. Kung ang isang error ay ibinalik, ang buong transaksyon ay mabibigo kaagad.

    Ang anumang transaksyon na naglalayong i-debit ang isang account o baguhin ang data nito ay nangangailangan ng lagda ng may hawak ng account nito. Ang anumang account na babaguhin ay minarkahan bilang writable. Maaaring ma-kredito ang isang account nang walang pahintulot ng may-ari hangga't sinasaklaw ng nagbabayad ng transaction fee ang kinakailangang renta at mga bayarin sa transaksyon.

    ',6),w=n("Bago isumite, ang lahat ng transaksyon ay dapat sumangguni sa isang "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=n("recent blockhash"),x=n(". Ginagamit ang blockhash upang maiwasan ang mga duplikasyon at alisin ang mga lipas na transaksyon. Ang maximum na edad ng blockhash ng isang transaksyon ay 150 block, o humigit-kumulang ~1 minuto 19 segundo mula sa oras ng pagsulat na ito."),A=a("h3",{id:"fees",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fees","aria-hidden":"true"},"#"),n(" Fees")],-1),I=a("p",null,"Nangongolekta ang network ng Solana ng dalawang uri ng mga bayarin:",-1),F={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},K=n("Mga bayarin sa transaksyon"),M=n(' para sa pagpapalaganap ng mga transaksyon (aka "mga bayarin sa gas")'),T={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},L=n("Mga bayarin sa renta"),B=n(" para sa pag-iimbak ng data on-chain"),N=a("p",null,[n("Sa Solana, ang mga bayarin sa transaksyon ay deterministiko: walang konsepto ng isang market ng bayad kung saan ang mga user ay maaaring magbayad ng mas mataas na mga bayarin upang mapataas ang kanilang mga pagkakataong mapabilang sa susunod na block. Sa oras ng pagsulat na ito, ang mga bayarin sa transaksyon ay tinutukoy lamang sa pamamagitan ng bilang ng mga kinakailangang lagda (ibig sabihin, "),a("code",null,"lamports_per_signature"),n("), hindi sa dami ng mga mapagkukunang ginamit. Ito ay dahil kasalukuyang may hard cap na 1232 bytes sa lahat ng transaksyon.")],-1),R=a("p",null,[n("Ang lahat ng mga transaksyon ay nangangailangan ng hindi bababa sa isang "),a("code",null,"writable"),n(" na account upang lagdaan ang transaksyon. Kapag naisumite na, ang nasusulat na signer account na unang naka-serialize ang magiging nagbabayad ng bayad. Babayaran ng account na ito ang halaga ng transaksyon hindi alintana kung magtagumpay o mabigo ang transaksyon. Kung ang nagbabayad ng bayad ay walang sapat na balanse upang bayaran ang bayad sa transaksyon, ang transaksyon ay ibababa.")],-1),D=a("p",null,"Sa oras ng pagsulat na ito, 50% ng lahat ng bayarin sa transaksyon ay kinokolekta ng validator na gumagawa ng block, habang ang natitirang 50% ay sinusunog. Gumagana ang istrukturang ito upang mahikayat ang mga validator na iproseso ang pinakamaraming transaksyon hangga't maaari sa kanilang mga puwang sa iskedyul ng pinuno.",-1),V=a("h2",{id:"other-resources",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),n(" Other Resources")],-1),E={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},j=n("Official Documentation"),z={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},C=n("Transaction Structure"),G={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},J=n("Transaction Fees by Justin Starry"),O={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},P=n("An Introduction to Solana by Hana"),H={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},q=n("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=n("Solana Transaction in Depth by Alex Miller");function W(X,Y){const i=s("RouterLink"),o=s("ExternalLinkIcon");return e(),r(c,null,[m,a("p",null,[h,t(i,{to:"/fil/core-concepts/programs.html"},{default:l(()=>[p]),_:1}),y,a("a",k,[b,t(o)]),_]),f,a("p",null,[w,a("a",v,[S,t(o)]),x]),A,I,a("ul",null,[a("li",null,[a("a",F,[K,t(o)]),M]),a("li",null,[a("a",T,[L,t(o)]),B])]),N,R,D,V,a("ul",null,[a("li",null,[a("a",E,[j,t(o)])]),a("li",null,[a("a",z,[C,t(o)])]),a("li",null,[a("a",G,[J,t(o)])]),a("li",null,[a("a",O,[P,t(o)])]),a("li",null,[a("a",H,[q,t(o)])]),a("li",null,[a("a",Q,[U,t(o)])])])],64)}var $=g(d,[["render",W]]);export{$ as default}; +import{_ as g,r as s,o as e,c as r,a,b as t,w as l,F as c,d as n,e as u}from"./app.d411e3b3.js";const d={},m=a("h1",{id:"transactions",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),n(" Transactions")],-1),h=n("Maaaring mag-invoke ang mga kliyente ng "),p=n("programs"),y=n(" sa pamamagitan ng pagsusumite ng transaksyon sa isang cluster. Ang isang transaksyon ay maaaring magsama ng maraming instruction, ang bawat isa ay nagta-target ng sarili nitong programa. Kapag naisumite ang isang transaksyon, ipoproseso ng Solana "),k={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},b=n("Runtime"),_=n(" ang mga instruction na ito sa pagkakasunud-sunod at atomically. Kung nabigo ang anumang bahagi ng isang pagtuturo, mabibigo ang buong transaksyon."),f=u('

    Facts

    Fact Sheet

    • Ang mga instruction ay ang pinakapangunahing yunit ng pagpapatakbo sa Solana
    • Ang bawat instruction ay naglalaman ng:
      • Ang program_id ng nilalayon na programa
      • Isang hanay ng lahat ng account na nilalayon nitong basahin o sulatan
      • Isang instruction_data byte array na partikular sa nilalayon na programa
    • Maramihang mga instruction ay maaaring isama sa isang solong transaksyon
    • Ang bawat transaksyon ay naglalaman ng:
      • Isang hanay ng lahat ng account na nilalayon nitong basahin o sulatan
      • Isa o higit pang 'mga instruction'
      • Isang kamakailang blockhash
      • Isa o higit pang pirma
    • Ang mga instruction ay pinoproseso sa pagkakasunud-sunod at atomically
    • Kung nabigo ang anumang bahagi ng isang pagtuturo, mabibigo ang buong transaksyon.
    • Limitado ang mga transaksyon sa 1232 bytes

    Deep Dive

    Ang Solana Runtime ay nangangailangan ng parehong mga instruction at mga transaksyon upang tukuyin ang isang listahan ng lahat ng mga account na nilayon nilang basahin o sulatan. Sa pamamagitan ng pag-aatas sa mga account na ito nang maaga, ang runtime ay nagagawang iparallelize ang pagpapatupad sa lahat ng mga transaksyon.

    Kapag isinumite ang isang transaksyon sa isang cluster, ipoproseso ng runtime ang mga instruction na ito sa pagkakasunud-sunod at atomically. Para sa bawat pagtuturo, bibigyang-kahulugan ng tatanggap na programa ang array ng data nito at gagana sa mga tinukoy nitong account. Matagumpay na babalik ang program o may error code. Kung ang isang error ay ibinalik, ang buong transaksyon ay mabibigo kaagad.

    Ang anumang transaksyon na naglalayong i-debit ang isang account o baguhin ang data nito ay nangangailangan ng lagda ng may hawak ng account nito. Ang anumang account na babaguhin ay minarkahan bilang writable. Maaaring ma-kredito ang isang account nang walang pahintulot ng may-ari hangga't sinasaklaw ng nagbabayad ng transaction fee ang kinakailangang renta at mga bayarin sa transaksyon.

    ',6),w=n("Bago isumite, ang lahat ng transaksyon ay dapat sumangguni sa isang "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},S=n("recent blockhash"),x=n(". Ginagamit ang blockhash upang maiwasan ang mga duplikasyon at alisin ang mga lipas na transaksyon. Ang maximum na edad ng blockhash ng isang transaksyon ay 150 block, o humigit-kumulang ~1 minuto 19 segundo mula sa oras ng pagsulat na ito."),A=a("h3",{id:"fees",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#fees","aria-hidden":"true"},"#"),n(" Fees")],-1),I=a("p",null,"Nangongolekta ang network ng Solana ng dalawang uri ng mga bayarin:",-1),F={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},K=n("Mga bayarin sa transaksyon"),M=n(' para sa pagpapalaganap ng mga transaksyon (aka "mga bayarin sa gas")'),T={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},L=n("Mga bayarin sa renta"),B=n(" para sa pag-iimbak ng data on-chain"),N=a("p",null,[n("Sa Solana, ang mga bayarin sa transaksyon ay deterministiko: walang konsepto ng isang market ng bayad kung saan ang mga user ay maaaring magbayad ng mas mataas na mga bayarin upang mapataas ang kanilang mga pagkakataong mapabilang sa susunod na block. Sa oras ng pagsulat na ito, ang mga bayarin sa transaksyon ay tinutukoy lamang sa pamamagitan ng bilang ng mga kinakailangang lagda (ibig sabihin, "),a("code",null,"lamports_per_signature"),n("), hindi sa dami ng mga mapagkukunang ginamit. Ito ay dahil kasalukuyang may hard cap na 1232 bytes sa lahat ng transaksyon.")],-1),R=a("p",null,[n("Ang lahat ng mga transaksyon ay nangangailangan ng hindi bababa sa isang "),a("code",null,"writable"),n(" na account upang lagdaan ang transaksyon. Kapag naisumite na, ang nasusulat na signer account na unang naka-serialize ang magiging nagbabayad ng bayad. Babayaran ng account na ito ang halaga ng transaksyon hindi alintana kung magtagumpay o mabigo ang transaksyon. Kung ang nagbabayad ng bayad ay walang sapat na balanse upang bayaran ang bayad sa transaksyon, ang transaksyon ay ibababa.")],-1),D=a("p",null,"Sa oras ng pagsulat na ito, 50% ng lahat ng bayarin sa transaksyon ay kinokolekta ng validator na gumagawa ng block, habang ang natitirang 50% ay sinusunog. Gumagana ang istrukturang ito upang mahikayat ang mga validator na iproseso ang pinakamaraming transaksyon hangga't maaari sa kanilang mga puwang sa iskedyul ng pinuno.",-1),V=a("h2",{id:"other-resources",tabindex:"-1"},[a("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),n(" Other Resources")],-1),E={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},j=n("Official Documentation"),z={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},C=n("Transaction Structure"),G={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},J=n("Transaction Fees by Justin Starry"),O={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},P=n("An Introduction to Solana by Hana"),H={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},q=n("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=n("Solana Transaction in Depth by Alex Miller");function W(X,Y){const i=s("RouterLink"),o=s("ExternalLinkIcon");return e(),r(c,null,[m,a("p",null,[h,t(i,{to:"/fil/core-concepts/programs.html"},{default:l(()=>[p]),_:1}),y,a("a",k,[b,t(o)]),_]),f,a("p",null,[w,a("a",v,[S,t(o)]),x]),A,I,a("ul",null,[a("li",null,[a("a",F,[K,t(o)]),M]),a("li",null,[a("a",T,[L,t(o)]),B])]),N,R,D,V,a("ul",null,[a("li",null,[a("a",E,[j,t(o)])]),a("li",null,[a("a",z,[C,t(o)])]),a("li",null,[a("a",G,[J,t(o)])]),a("li",null,[a("a",O,[P,t(o)])]),a("li",null,[a("a",H,[q,t(o)])]),a("li",null,[a("a",Q,[U,t(o)])])])],64)}var $=g(d,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.48ea2bf1.js b/docs/.vuepress/dist/assets/transactions.html.d4e068d2.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.48ea2bf1.js rename to docs/.vuepress/dist/assets/transactions.html.d4e068d2.js index 20dcaf963..0a247794b 100644 --- a/docs/.vuepress/dist/assets/transactions.html.48ea2bf1.js +++ b/docs/.vuepress/dist/assets/transactions.html.d4e068d2.js @@ -1 +1 @@ -import{_ as r,r as a,o as i,c,a as e,b as n,w as l,F as d,d as t,e as h}from"./app.07ce7a66.js";const u={},f=e("h1",{id:"transactions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),t(" Transactions")],-1),_=t("Clients can invoke "),p=t("programs"),m=t(" by submitting a transaction to a cluster. A single transaction can include multiple instructions, each targeting its own program. When a transaction is submitted, the Solana "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=t("Runtime"),y=t(" will process its instructions in order and atomically. If any part of an instruction fails, the entire transaction will fail."),k=h('

    Facts

    Fact Sheet

    • Instructions are the most basic operational unit on Solana
    • Each instruction contains:
      • The program_id of the intended program
      • An array of all accounts it intends to read from or write to
      • An instruction_data byte array that is specific to the intended program
    • Multiple instructions can be bundled into a single transaction
    • Each transaction contains:
      • An array of all accounts it intends to read from or write to
      • One or more instructions
      • A recent blockhash
      • One or more signatures
    • Instructions are processed in order and atomically
    • If any part of an instruction fails, the entire transaction fails.
    • Transactions are limited to 1232 bytes

    Deep Dive

    The Solana Runtime requires both instructions and transactions to specify a list of all accounts they intended to read from or write to. By requiring these accounts in advance, the runtime is able to parallelize execution across all transactions.

    When a transaction is submitted to a cluster, the runtime will process its instructions in order and atomically. For each instruction, the receiving program will interpret its data array and operate on its specified accounts. The program will either return successfully or with an error code. If an error is returned, the entire transaction will fail immediately.

    Any transaction that aims to debit an account or modify its data requires the signature of its account holder. Any account that will be modified is marked as writable. An account can be credited without the holder\u2019s permission so long as the transaction fee payer covers the necessary rent and transaction fees.

    ',6),w=t("Before submission, all transactions must reference a "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},T=t("recent blockhash"),x=t(". The blockhash is used to prevent duplications and eliminate stale transactions. The max age of a transaction's blockhash is 150 blocks, or about ~1 minute 19 seconds as of the time of this writing."),A=e("h3",{id:"fees",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fees","aria-hidden":"true"},"#"),t(" Fees")],-1),S=e("p",null,"The Solana network collects two types of fees:",-1),I={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},F=t("Transaction fees"),R=t(" for propagating transactions (aka \u201Cgas fees\u201D)"),q={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},B=t("Rent fees"),E=t(" for storing data on-chain"),L=e("p",null,[t("In Solana, transaction fees are deterministic: there is no concept of a fee market in which users can pay higher fees to increase their chances of being included in the next block. At the time of this writing, transaction fees are determined only by the number of signatures required (i.e. "),e("code",null,"lamports_per_signature"),t("), not by the amount of resources used. This is because there is currently a hard cap of 1232 bytes on all transactions.")],-1),O=e("p",null,[t("All transactions require at least one "),e("code",null,"writable"),t(" account to sign the transaction. Once submitted, the writable signer account that is serialized first will be the fee payer. This account will pay for the cost of the transaction regardless of whether the transaction succeeds or fails. If the fee payer does not have a sufficient balance to pay the transaction fee, the transaction will be dropped.")],-1),D=e("p",null,"At the time of this writing, 50% of all transaction fees are collected by the validator that produces the block, while the remaining 50% are burned. This structure works to incentivize validators to process as many transactions as possible during their slots in the leader schedule.",-1),N=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),t(" Other Resources")],-1),V={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},z=t("Official Documentation"),C={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},j=t("Transaction Structure"),J={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},M=t("Transaction Fees by Justin Starry"),W={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},H=t("An Introduction to Solana by Hana"),P={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},G=t("Transaction Processing by Jito Labs"),K={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Q=t("Solana Transaction in Depth by Alex Miller");function U(X,Y){const s=a("RouterLink"),o=a("ExternalLinkIcon");return i(),c(d,null,[f,e("p",null,[_,n(s,{to:"/core-concepts/programs.html"},{default:l(()=>[p]),_:1}),m,e("a",b,[g,n(o)]),y]),k,e("p",null,[w,e("a",v,[T,n(o)]),x]),A,S,e("ul",null,[e("li",null,[e("a",I,[F,n(o)]),R]),e("li",null,[e("a",q,[B,n(o)]),E])]),L,O,D,N,e("ul",null,[e("li",null,[e("a",V,[z,n(o)])]),e("li",null,[e("a",C,[j,n(o)])]),e("li",null,[e("a",J,[M,n(o)])]),e("li",null,[e("a",W,[H,n(o)])]),e("li",null,[e("a",P,[G,n(o)])]),e("li",null,[e("a",K,[Q,n(o)])])])],64)}var $=r(u,[["render",U]]);export{$ as default}; +import{_ as r,r as a,o as i,c,a as e,b as n,w as l,F as d,d as t,e as h}from"./app.d411e3b3.js";const u={},f=e("h1",{id:"transactions",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#transactions","aria-hidden":"true"},"#"),t(" Transactions")],-1),_=t("Clients can invoke "),p=t("programs"),m=t(" by submitting a transaction to a cluster. A single transaction can include multiple instructions, each targeting its own program. When a transaction is submitted, the Solana "),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=t("Runtime"),y=t(" will process its instructions in order and atomically. If any part of an instruction fails, the entire transaction will fail."),k=h('

    Facts

    Fact Sheet

    • Instructions are the most basic operational unit on Solana
    • Each instruction contains:
      • The program_id of the intended program
      • An array of all accounts it intends to read from or write to
      • An instruction_data byte array that is specific to the intended program
    • Multiple instructions can be bundled into a single transaction
    • Each transaction contains:
      • An array of all accounts it intends to read from or write to
      • One or more instructions
      • A recent blockhash
      • One or more signatures
    • Instructions are processed in order and atomically
    • If any part of an instruction fails, the entire transaction fails.
    • Transactions are limited to 1232 bytes

    Deep Dive

    The Solana Runtime requires both instructions and transactions to specify a list of all accounts they intended to read from or write to. By requiring these accounts in advance, the runtime is able to parallelize execution across all transactions.

    When a transaction is submitted to a cluster, the runtime will process its instructions in order and atomically. For each instruction, the receiving program will interpret its data array and operate on its specified accounts. The program will either return successfully or with an error code. If an error is returned, the entire transaction will fail immediately.

    Any transaction that aims to debit an account or modify its data requires the signature of its account holder. Any account that will be modified is marked as writable. An account can be credited without the holder\u2019s permission so long as the transaction fee payer covers the necessary rent and transaction fees.

    ',6),w=t("Before submission, all transactions must reference a "),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},T=t("recent blockhash"),x=t(". The blockhash is used to prevent duplications and eliminate stale transactions. The max age of a transaction's blockhash is 150 blocks, or about ~1 minute 19 seconds as of the time of this writing."),A=e("h3",{id:"fees",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#fees","aria-hidden":"true"},"#"),t(" Fees")],-1),S=e("p",null,"The Solana network collects two types of fees:",-1),I={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},F=t("Transaction fees"),R=t(" for propagating transactions (aka \u201Cgas fees\u201D)"),q={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},B=t("Rent fees"),E=t(" for storing data on-chain"),L=e("p",null,[t("In Solana, transaction fees are deterministic: there is no concept of a fee market in which users can pay higher fees to increase their chances of being included in the next block. At the time of this writing, transaction fees are determined only by the number of signatures required (i.e. "),e("code",null,"lamports_per_signature"),t("), not by the amount of resources used. This is because there is currently a hard cap of 1232 bytes on all transactions.")],-1),O=e("p",null,[t("All transactions require at least one "),e("code",null,"writable"),t(" account to sign the transaction. Once submitted, the writable signer account that is serialized first will be the fee payer. This account will pay for the cost of the transaction regardless of whether the transaction succeeds or fails. If the fee payer does not have a sufficient balance to pay the transaction fee, the transaction will be dropped.")],-1),D=e("p",null,"At the time of this writing, 50% of all transaction fees are collected by the validator that produces the block, while the remaining 50% are burned. This structure works to incentivize validators to process as many transactions as possible during their slots in the leader schedule.",-1),N=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),t(" Other Resources")],-1),V={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},z=t("Official Documentation"),C={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},j=t("Transaction Structure"),J={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},M=t("Transaction Fees by Justin Starry"),W={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},H=t("An Introduction to Solana by Hana"),P={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},G=t("Transaction Processing by Jito Labs"),K={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},Q=t("Solana Transaction in Depth by Alex Miller");function U(X,Y){const s=a("RouterLink"),o=a("ExternalLinkIcon");return i(),c(d,null,[f,e("p",null,[_,n(s,{to:"/core-concepts/programs.html"},{default:l(()=>[p]),_:1}),m,e("a",b,[g,n(o)]),y]),k,e("p",null,[w,e("a",v,[T,n(o)]),x]),A,S,e("ul",null,[e("li",null,[e("a",I,[F,n(o)]),R]),e("li",null,[e("a",q,[B,n(o)]),E])]),L,O,D,N,e("ul",null,[e("li",null,[e("a",V,[z,n(o)])]),e("li",null,[e("a",C,[j,n(o)])]),e("li",null,[e("a",J,[M,n(o)])]),e("li",null,[e("a",W,[H,n(o)])]),e("li",null,[e("a",P,[G,n(o)])]),e("li",null,[e("a",K,[Q,n(o)])])])],64)}var $=r(u,[["render",U]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.f33ee4e9.js b/docs/.vuepress/dist/assets/transactions.html.eadd37e3.js similarity index 90% rename from docs/.vuepress/dist/assets/transactions.html.f33ee4e9.js rename to docs/.vuepress/dist/assets/transactions.html.eadd37e3.js index ce153cdf0..30bbd48d2 100644 --- a/docs/.vuepress/dist/assets/transactions.html.f33ee4e9.js +++ b/docs/.vuepress/dist/assets/transactions.html.eadd37e3.js @@ -1 +1 @@ -const t={key:"v-55f1b6eb",path:"/vi/core-concepts/transactions.html",title:"Transactions",lang:"vi-VN",frontmatter:{title:"Transactions",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | Transactions"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | Transactions"}],["meta",{name:"description",content:"Transaction l\xE0 t\u1EADp h\u1EE3p nhi\u1EC1u \u0111\u01A1n v\u1ECB th\u1EF1c thi tr\xEAn Solana. Chi ti\u1EBFt v\u1EC1 Transaction v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:description",content:"Transaction l\xE0 t\u1EADp h\u1EE3p nhi\u1EC1u \u0111\u01A1n v\u1ECB th\u1EF1c thi tr\xEAn Solana. Chi ti\u1EBFt v\u1EC1 Transaction v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"Ph\xED",slug:"phi",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],git:{updatedTime:1677551527e3,contributors:[{name:"Tr\u1EA7n Minh Quang",email:"quangtmps12135@fpt.edu.vn",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/core-concepts/transactions.md"};export{t as data}; +const t={key:"v-55f1b6eb",path:"/vi/core-concepts/transactions.html",title:"Transactions",lang:"vi-VN",frontmatter:{title:"Transactions",head:[["meta",{name:"title",content:"To\xE0n t\u1EADp Solana | Transactions"}],["meta",{name:"og:title",content:"To\xE0n t\u1EADp Solana | Transactions"}],["meta",{name:"description",content:"Transaction l\xE0 t\u1EADp h\u1EE3p nhi\u1EC1u \u0111\u01A1n v\u1ECB th\u1EF1c thi tr\xEAn Solana. Chi ti\u1EBFt v\u1EC1 Transaction v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:description",content:"Transaction l\xE0 t\u1EADp h\u1EE3p nhi\u1EC1u \u0111\u01A1n v\u1ECB th\u1EF1c thi tr\xEAn Solana. Chi ti\u1EBFt v\u1EC1 Transaction v\xE0 c\xE1c kh\xE1i ni\u1EC7m c\u01A1n b\u1EA3n kh\xE1c trong To\xE0n t\u1EADp Solana."}],["meta",{name:"og:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"og:image:alt",content:"Solana splash card"}],["meta",{name:"twitter:card",content:"summary"}],["meta",{name:"twitter:site",content:"@solanacookbook"}],["meta",{name:"twitter:image",content:"https://solanacookbook.com/cookbook-sharing-card.png"}],["meta",{name:"robots",content:"index,follow,noodp"}],["meta",{name:"googlebot",content:"index,follow"}]],footer:"MIT Licensed"},excerpt:"",headers:[{level:2,title:"C\xF3 th\u1EC3 b\u1EA1n ch\u01B0a bi\u1EBFt",slug:"co-the-ban-chua-biet",children:[]},{level:2,title:"Chi ti\u1EBFt",slug:"chi-tiet",children:[{level:3,title:"Ph\xED",slug:"phi",children:[]}]},{level:2,title:"C\xE1c ngu\u1ED3n t\xE0i li\u1EC7u kh\xE1c",slug:"cac-nguon-tai-lieu-khac",children:[]}],git:{updatedTime:1714582408e3,contributors:[{name:"Tr\u1EA7n Minh Quang",email:"quangtmps12135@fpt.edu.vn",commits:1},{name:"lainhathoang",email:"nhathoang8c01@gmail.com",commits:1},{name:"tuphan-dn",email:"71456318+tuphan-dn@users.noreply.github.com",commits:1}]},filePathRelative:"vi/core-concepts/transactions.md"};export{t as data}; diff --git a/docs/.vuepress/dist/assets/transactions.html.a1a988c9.js b/docs/.vuepress/dist/assets/transactions.html.f177146a.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.a1a988c9.js rename to docs/.vuepress/dist/assets/transactions.html.f177146a.js index 08749aef8..ea5d6bdf7 100644 --- a/docs/.vuepress/dist/assets/transactions.html.a1a988c9.js +++ b/docs/.vuepress/dist/assets/transactions.html.f177146a.js @@ -1 +1 @@ -import{_ as r,r as a,o as l,c as i,a as e,b as t,w as c,F as d,d as o,e as h}from"./app.07ce7a66.js";const _={},p=e("h1",{id:"\u4EA4\u6613",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u4EA4\u6613","aria-hidden":"true"},"#"),o(" \u4EA4\u6613")],-1),u=o("\u5BA2\u6237\u7AEF\u53EF\u4EE5\u901A\u8FC7\u5411\u4E00\u4E2A\u96C6\u7FA4\u63D0\u4EA4\u4EA4\u6613\u6765\u8C03\u7528"),m=o("\u7A0B\u5E8F"),f=o("\u3002\u4E00\u4E2A\u4EA4\u6613\u53EF\u4EE5\u5305\u542B\u591A\u4E2A\u6307\u4EE4\uFF0C\u6BCF\u4E2A\u6307\u4EE4\u53EF\u4EE5\u9488\u5BF9\u4E0D\u540C\u7684\u7A0B\u5E8F\u3002 \u4EA4\u6613\u63D0\u4EA4\u65F6\uFF0CSolana"),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=o("\u8FD0\u884C\u5E93"),k=o("\u4F1A\u81EA\u52A8\u7684\u6309\u987A\u5E8F\u5904\u7406\u8FD9\u4E9B\u6307\u4EE4\u3002 \u5982\u679C\u67D0\u4E00\u4E2A\u6307\u4EE4\u4E2D\u7684\u4EFB\u4F55\u4E00\u4E2A\u90E8\u5206\u5931\u8D25\uFF0C\u6574\u4E2A\u4EA4\u6613\u5C31\u4F1A\u5931\u8D25\u3002"),x=h('

    \u6982\u8FF0

    \u8981\u70B9

    • \u6307\u4EE4\u662FSolana\u4E0A\u6700\u57FA\u672C\u7684\u64CD\u4F5C\u5355\u5143
    • \u6BCF\u4E2A\u6307\u4EE4\u90FD\u5305\u542B\uFF1A
      • program_id\uFF1A\u6240\u9488\u5BF9\u7684\u7A0B\u5E8F\u7684id
      • accounts\uFF1A\u9700\u8981\u8BFB\u6216\u5199\u7684\u5168\u90E8\u8D26\u6237\u7EC4\u6210\u7684\u6570\u7EC4
      • instruction_data\uFF1A\u5411\u6307\u5B9A\u7A0B\u5E8F\u6240\u4F20\u8F93\u7684\u6570\u636E\u7684\u5B57\u8282\u7801
    • \u591A\u4E2A\u6307\u4EE4\u53EF\u4EE5\u88AB\u6253\u5305\u8FDB\u5165\u540C\u4E00\u4E2A\u4EA4\u6613\u5F53\u4E2D
    • \u6BCF\u4E2A\u4EA4\u6613\u90FD\u5305\u542B\uFF1A
      • instructions\uFF1A\u4E00\u4E2A\u6216\u591A\u4E2A\u6307\u4EE4
      • blockhash\uFF1A\u6700\u65B0\u7684\u5757\u54C8\u5E0C\u503C
      • signatures\uFF1A\u4E00\u4E2A\u6216\u591A\u4E2A\u7B7E\u540D
    • \u6307\u4EE4\u4F1A\u88AB\u81EA\u52A8\u7684\u6309\u987A\u5E8F\u6267\u884C
    • \u5982\u679C\u4E00\u4E2A\u6307\u4EE4\u7684\u4EFB\u4F55\u4E00\u90E8\u5206\u5931\u8D25\uFF0C\u6574\u4E2A\u4EA4\u6613\u5C31\u4F1A\u5931\u8D25
    • \u4EA4\u6613\u7684\u5927\u5C0F\u9650\u5236\u57281232\u5B57\u8282\u4EE5\u5185

    \u6DF1\u5165

    \u5728Solana\u8FD0\u884C\u5E93\u4E2D\uFF0C\u6307\u4EE4\u548C\u4EA4\u6613\u90FD\u9700\u8981\u5148\u6307\u5B9A\u5168\u90E8\u9700\u8981\u8BFB\u5199\u8BBF\u95EE\u7684\u8D26\u6237\u5217\u8868\u3002 \u901A\u8FC7\u4E8B\u5148\u6307\u5B9A\u8D26\u6237\u5217\u8868\uFF0C\u8FD0\u884C\u5E93\u53EF\u4EE5\u5BF9\u4EA4\u6613\u7684\u6267\u884C\u505A\u5E76\u884C\u5316\u5904\u7406\u3002

    \u5F53\u4EA4\u6613\u88AB\u63D0\u4EA4\u5230\u96C6\u7FA4\u65F6\uFF0C\u8FD0\u884C\u5E93\u4F1A\u81EA\u52A8\u7684\u6309\u7167\u987A\u5E8F\u5904\u7406\u8FD9\u4E9B\u6307\u4EE4\u3002\u5BF9\u4E8E\u6BCF\u4E2A\u6307\u4EE4\uFF0C\u63A5\u6536\u8FD9\u4E2A\u6307\u4EE4\u7684\u7A0B\u5E8F\u4F1A\u89E3\u6790\u6307\u4EE4\u4E2D\u7684\u6570\u636E\u5B57\u6BB5\uFF0C\u5728\u6307\u5B9A\u7684\u8D26\u6237\u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002 \u7A0B\u5E8F\u8981\u4E48\u6267\u884C\u6210\u529F\uFF0C\u8981\u4E48\u4F1A\u8FD4\u56DE\u4E00\u4E2A\u9519\u8BEF\u7801\u3002\u5982\u679C\u8FD4\u56DE\u4E86\u4E00\u4E2A\u9519\u8BEF\u7801\uFF0C\u6574\u4E2A\u4EA4\u6613\u90FD\u4F1A\u7ACB\u5373\u5931\u8D25\u3002

    \u4EFB\u4F55\u4EA4\u6613\uFF0C\u53EA\u8981\u9488\u5BF9\u4E00\u4E2A\u8D26\u6237\u6263\u9664SOL\uFF0C\u6216\u8005\u4FEE\u6539\u5176\u4E2D\u7684\u6570\u636E\uFF0C\u90FD\u9700\u8981\u8FD9\u4E2A\u8D26\u6237\u62E5\u6709\u8005\u7684\u7B7E\u540D\u3002 \u5728\u4EA4\u6613\u4E2D\uFF0C\u4F1A\u88AB\u4FEE\u6539\u7684\u8D26\u6237\u90FD\u4F1A\u88AB\u6807\u8BB0\u4E3Awritable\uFF08\u53EF\u5199\uFF09\u3002 \u5F53\u4EA4\u6613\u7684\u4ED8\u8D39\u8005\u652F\u4ED8\u4E86\u8DB3\u591F\u7684\u79DF\u91D1\u548C\u4EA4\u6613\u8D39\u7528\u65F6\uFF0C\u4E00\u4E2A\u8D26\u6237\u53EF\u4EE5\u88AB\u5B58\u5165SOL\u800C\u4E0D\u7528\u8FD9\u4E2A\u8D26\u6237\u62E5\u6709\u8005\u7684\u8BB8\u53EF\u3002

    ',6),S=o("\u63D0\u4EA4\u4E4B\u524D\uFF0C\u6BCF\u4E2A\u4EA4\u6613\u9700\u8981\u5F15\u7528\u4E00\u4E2A"),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},y=o("recent blockhash\uFF08\u6700\u65B0\u5757\u54C8\u5E0C\uFF09"),L=o("\u3002 \u5757\u54C8\u5E0C\u88AB\u7528\u4E8E\u53BB\u91CD\uFF0C\u4EE5\u53CA\u79FB\u9664\u8FC7\u671F\u4EA4\u6613\u3002\u4E00\u4E2A\u5757\u54C8\u5E0C\u7684\u6700\u5927\u5BFF\u547D\u662F150\u4E2A\u533A\u5757\uFF0C\u6210\u6587\u65F6\u8FD9\u4E2A\u65F6\u95F4\u5927\u7EA6\u662F1\u5206\u949F19\u79D2\u3002"),w=e("h3",{id:"\u8D39\u7528",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8D39\u7528","aria-hidden":"true"},"#"),o(" \u8D39\u7528")],-1),T=e("p",null,"Solana\u7F51\u7EDC\u6536\u53D6\u4E24\u79CD\u8D39\u7528\uFF1A",-1),F={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},N=o("\u4EA4\u6613\u8D39"),V=o("\uFF0C\u7528\u4E8E\u5411\u7F51\u7EDC\u5E7F\u64AD\u6D88\u606F\uFF08\u4EA6\u5373gas\u8D39\uFF09"),B={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},E=o("\u79DF\u91D1"),I=o("\uFF0C\u7528\u4E8E\u5411\u533A\u5757\u94FE\u4E0A\u5B58\u50A8\u6570\u636E"),O=e("p",null,[o("\u5728Solana\u4E2D\uFF0C\u4EA4\u6613\u8D39\u662F\u786E\u5B9A\u7684\u3002\u5E76\u6CA1\u6709\u8D39\u7387\u7ADE\u4EF7\u7684\u6982\u5FF5\uFF0C\u7528\u6237\u65E0\u6CD5\u901A\u8FC7\u589E\u52A0\u4EA4\u6613\u8D39\u7684\u65B9\u5F0F\u589E\u52A0\u81EA\u5DF1\u7684\u4EA4\u6613\u88AB\u6253\u5305\u8FDB\u4E0B\u4E00\u4E2A\u533A\u5757\u7684\u6982\u7387\u3002 \u5728\u6210\u6587\u65F6\uFF0C\u4EA4\u6613\u8D39\u53EA\u4E0E\u4EA4\u6613\u6240\u9700\u7684\u7B7E\u540D\u6570\u91CF\u76F8\u5173\uFF08\u53C2\u89C1"),e("code",null,"lamports_per_signature"),o("\uFF09\uFF0C\u4E0E\u4EA4\u6613\u6240\u4F7F\u7528\u7684\u8D44\u6E90\u65E0\u5173\u3002 \u8FD9\u662F\u56E0\u4E3A\u76EE\u524D\u6240\u6709\u4EA4\u6613\u90FD\u6709\u4E00\u4E2A\u4E25\u683C\u76841232\u5B57\u8282\u7684\u9650\u5236\u3002")],-1),R=e("p",null,[o("\u6BCF\u4E2A\u4EA4\u6613\u90FD\u9700\u8981\u81F3\u5C11\u6709\u4E00\u4E2A"),e("code",null,"writable"),o("\uFF08\u53EF\u5199\uFF09\u7684\u8D26\u6237\uFF0C\u7528\u4E8E\u4E3A\u4EA4\u6613\u7B7E\u540D\u3002\u8FD9\u4E2A\u8D26\u6237\u65E0\u8BBA\u4EA4\u6613\u6210\u529F\u4E0E\u5426\u90FD\u9700\u8981\u4E3A\u4EA4\u6613\u6210\u672C\u4ED8\u8D39\u3002 \u5982\u679C\u4ED8\u8D39\u8005\u6CA1\u6709\u8DB3\u591F\u4E3A\u4EA4\u6613\u4ED8\u8D39\u7684\u4F59\u989D\uFF0C\u8FD9\u4E2A\u4EA4\u6613\u5C31\u4F1A\u88AB\u4E22\u5F03\u3002")],-1),j=e("p",null,"\u6210\u6587\u65F6\uFF0C50%\u7684\u4EA4\u6613\u8D39\u88AB\u51FA\u5757\u7684\u9A8C\u8BC1\u8282\u70B9\u6536\u53D6\uFF0C\u5269\u4E0B\u768450%\u88AB\u71C3\u70E7\u6389\u3002\u8FD9\u6837\u7684\u7ED3\u6784\u4F1A\u6FC0\u52B1\u9A8C\u8BC1\u8282\u70B9\u5728leader schedule\uFF08\u9886\u5BFC\u65F6\u95F4\u8868\uFF09\u89C4\u5B9A\u7684\u5C5E\u4E8E\u81EA\u5DF1\u7684slot\uFF08\u63D2\u69FD\uFF09\u4E2D\u5904\u7406\u5C3D\u53EF\u80FD\u591A\u7684\u4EA4\u6613\u3002",-1),A=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),o(" Other Resources")],-1),C={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},J=o("\u5B98\u65B9\u6587\u6863"),z={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},D=o("\u4EA4\u6613\u7684\u7ED3\u6784"),H={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},M=o("Transaction Fees by Justin Starry"),P={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},q=o("An Introduction to Solana by Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=o("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=o("Solana Transaction in Depth by Alex Miller");function W(X,Y){const s=a("RouterLink"),n=a("ExternalLinkIcon");return l(),i(d,null,[p,e("p",null,[u,t(s,{to:"/zh/core-concepts/programs.html"},{default:c(()=>[m]),_:1}),f,e("a",b,[g,t(n)]),k]),x,e("p",null,[S,e("a",v,[y,t(n)]),L]),w,T,e("ul",null,[e("li",null,[e("a",F,[N,t(n)]),V]),e("li",null,[e("a",B,[E,t(n)]),I])]),O,R,j,A,e("ul",null,[e("li",null,[e("a",C,[J,t(n)])]),e("li",null,[e("a",z,[D,t(n)])]),e("li",null,[e("a",H,[M,t(n)])]),e("li",null,[e("a",P,[q,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",Q,[U,t(n)])])])],64)}var $=r(_,[["render",W]]);export{$ as default}; +import{_ as r,r as a,o as l,c as i,a as e,b as t,w as c,F as d,d as o,e as h}from"./app.d411e3b3.js";const _={},p=e("h1",{id:"\u4EA4\u6613",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u4EA4\u6613","aria-hidden":"true"},"#"),o(" \u4EA4\u6613")],-1),u=o("\u5BA2\u6237\u7AEF\u53EF\u4EE5\u901A\u8FC7\u5411\u4E00\u4E2A\u96C6\u7FA4\u63D0\u4EA4\u4EA4\u6613\u6765\u8C03\u7528"),m=o("\u7A0B\u5E8F"),f=o("\u3002\u4E00\u4E2A\u4EA4\u6613\u53EF\u4EE5\u5305\u542B\u591A\u4E2A\u6307\u4EE4\uFF0C\u6BCF\u4E2A\u6307\u4EE4\u53EF\u4EE5\u9488\u5BF9\u4E0D\u540C\u7684\u7A0B\u5E8F\u3002 \u4EA4\u6613\u63D0\u4EA4\u65F6\uFF0CSolana"),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=o("\u8FD0\u884C\u5E93"),k=o("\u4F1A\u81EA\u52A8\u7684\u6309\u987A\u5E8F\u5904\u7406\u8FD9\u4E9B\u6307\u4EE4\u3002 \u5982\u679C\u67D0\u4E00\u4E2A\u6307\u4EE4\u4E2D\u7684\u4EFB\u4F55\u4E00\u4E2A\u90E8\u5206\u5931\u8D25\uFF0C\u6574\u4E2A\u4EA4\u6613\u5C31\u4F1A\u5931\u8D25\u3002"),x=h('

    \u6982\u8FF0

    \u8981\u70B9

    • \u6307\u4EE4\u662FSolana\u4E0A\u6700\u57FA\u672C\u7684\u64CD\u4F5C\u5355\u5143
    • \u6BCF\u4E2A\u6307\u4EE4\u90FD\u5305\u542B\uFF1A
      • program_id\uFF1A\u6240\u9488\u5BF9\u7684\u7A0B\u5E8F\u7684id
      • accounts\uFF1A\u9700\u8981\u8BFB\u6216\u5199\u7684\u5168\u90E8\u8D26\u6237\u7EC4\u6210\u7684\u6570\u7EC4
      • instruction_data\uFF1A\u5411\u6307\u5B9A\u7A0B\u5E8F\u6240\u4F20\u8F93\u7684\u6570\u636E\u7684\u5B57\u8282\u7801
    • \u591A\u4E2A\u6307\u4EE4\u53EF\u4EE5\u88AB\u6253\u5305\u8FDB\u5165\u540C\u4E00\u4E2A\u4EA4\u6613\u5F53\u4E2D
    • \u6BCF\u4E2A\u4EA4\u6613\u90FD\u5305\u542B\uFF1A
      • instructions\uFF1A\u4E00\u4E2A\u6216\u591A\u4E2A\u6307\u4EE4
      • blockhash\uFF1A\u6700\u65B0\u7684\u5757\u54C8\u5E0C\u503C
      • signatures\uFF1A\u4E00\u4E2A\u6216\u591A\u4E2A\u7B7E\u540D
    • \u6307\u4EE4\u4F1A\u88AB\u81EA\u52A8\u7684\u6309\u987A\u5E8F\u6267\u884C
    • \u5982\u679C\u4E00\u4E2A\u6307\u4EE4\u7684\u4EFB\u4F55\u4E00\u90E8\u5206\u5931\u8D25\uFF0C\u6574\u4E2A\u4EA4\u6613\u5C31\u4F1A\u5931\u8D25
    • \u4EA4\u6613\u7684\u5927\u5C0F\u9650\u5236\u57281232\u5B57\u8282\u4EE5\u5185

    \u6DF1\u5165

    \u5728Solana\u8FD0\u884C\u5E93\u4E2D\uFF0C\u6307\u4EE4\u548C\u4EA4\u6613\u90FD\u9700\u8981\u5148\u6307\u5B9A\u5168\u90E8\u9700\u8981\u8BFB\u5199\u8BBF\u95EE\u7684\u8D26\u6237\u5217\u8868\u3002 \u901A\u8FC7\u4E8B\u5148\u6307\u5B9A\u8D26\u6237\u5217\u8868\uFF0C\u8FD0\u884C\u5E93\u53EF\u4EE5\u5BF9\u4EA4\u6613\u7684\u6267\u884C\u505A\u5E76\u884C\u5316\u5904\u7406\u3002

    \u5F53\u4EA4\u6613\u88AB\u63D0\u4EA4\u5230\u96C6\u7FA4\u65F6\uFF0C\u8FD0\u884C\u5E93\u4F1A\u81EA\u52A8\u7684\u6309\u7167\u987A\u5E8F\u5904\u7406\u8FD9\u4E9B\u6307\u4EE4\u3002\u5BF9\u4E8E\u6BCF\u4E2A\u6307\u4EE4\uFF0C\u63A5\u6536\u8FD9\u4E2A\u6307\u4EE4\u7684\u7A0B\u5E8F\u4F1A\u89E3\u6790\u6307\u4EE4\u4E2D\u7684\u6570\u636E\u5B57\u6BB5\uFF0C\u5728\u6307\u5B9A\u7684\u8D26\u6237\u4E0A\u8FDB\u884C\u64CD\u4F5C\u3002 \u7A0B\u5E8F\u8981\u4E48\u6267\u884C\u6210\u529F\uFF0C\u8981\u4E48\u4F1A\u8FD4\u56DE\u4E00\u4E2A\u9519\u8BEF\u7801\u3002\u5982\u679C\u8FD4\u56DE\u4E86\u4E00\u4E2A\u9519\u8BEF\u7801\uFF0C\u6574\u4E2A\u4EA4\u6613\u90FD\u4F1A\u7ACB\u5373\u5931\u8D25\u3002

    \u4EFB\u4F55\u4EA4\u6613\uFF0C\u53EA\u8981\u9488\u5BF9\u4E00\u4E2A\u8D26\u6237\u6263\u9664SOL\uFF0C\u6216\u8005\u4FEE\u6539\u5176\u4E2D\u7684\u6570\u636E\uFF0C\u90FD\u9700\u8981\u8FD9\u4E2A\u8D26\u6237\u62E5\u6709\u8005\u7684\u7B7E\u540D\u3002 \u5728\u4EA4\u6613\u4E2D\uFF0C\u4F1A\u88AB\u4FEE\u6539\u7684\u8D26\u6237\u90FD\u4F1A\u88AB\u6807\u8BB0\u4E3Awritable\uFF08\u53EF\u5199\uFF09\u3002 \u5F53\u4EA4\u6613\u7684\u4ED8\u8D39\u8005\u652F\u4ED8\u4E86\u8DB3\u591F\u7684\u79DF\u91D1\u548C\u4EA4\u6613\u8D39\u7528\u65F6\uFF0C\u4E00\u4E2A\u8D26\u6237\u53EF\u4EE5\u88AB\u5B58\u5165SOL\u800C\u4E0D\u7528\u8FD9\u4E2A\u8D26\u6237\u62E5\u6709\u8005\u7684\u8BB8\u53EF\u3002

    ',6),S=o("\u63D0\u4EA4\u4E4B\u524D\uFF0C\u6BCF\u4E2A\u4EA4\u6613\u9700\u8981\u5F15\u7528\u4E00\u4E2A"),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},y=o("recent blockhash\uFF08\u6700\u65B0\u5757\u54C8\u5E0C\uFF09"),L=o("\u3002 \u5757\u54C8\u5E0C\u88AB\u7528\u4E8E\u53BB\u91CD\uFF0C\u4EE5\u53CA\u79FB\u9664\u8FC7\u671F\u4EA4\u6613\u3002\u4E00\u4E2A\u5757\u54C8\u5E0C\u7684\u6700\u5927\u5BFF\u547D\u662F150\u4E2A\u533A\u5757\uFF0C\u6210\u6587\u65F6\u8FD9\u4E2A\u65F6\u95F4\u5927\u7EA6\u662F1\u5206\u949F19\u79D2\u3002"),w=e("h3",{id:"\u8D39\u7528",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8D39\u7528","aria-hidden":"true"},"#"),o(" \u8D39\u7528")],-1),T=e("p",null,"Solana\u7F51\u7EDC\u6536\u53D6\u4E24\u79CD\u8D39\u7528\uFF1A",-1),F={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},N=o("\u4EA4\u6613\u8D39"),V=o("\uFF0C\u7528\u4E8E\u5411\u7F51\u7EDC\u5E7F\u64AD\u6D88\u606F\uFF08\u4EA6\u5373gas\u8D39\uFF09"),B={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},E=o("\u79DF\u91D1"),I=o("\uFF0C\u7528\u4E8E\u5411\u533A\u5757\u94FE\u4E0A\u5B58\u50A8\u6570\u636E"),O=e("p",null,[o("\u5728Solana\u4E2D\uFF0C\u4EA4\u6613\u8D39\u662F\u786E\u5B9A\u7684\u3002\u5E76\u6CA1\u6709\u8D39\u7387\u7ADE\u4EF7\u7684\u6982\u5FF5\uFF0C\u7528\u6237\u65E0\u6CD5\u901A\u8FC7\u589E\u52A0\u4EA4\u6613\u8D39\u7684\u65B9\u5F0F\u589E\u52A0\u81EA\u5DF1\u7684\u4EA4\u6613\u88AB\u6253\u5305\u8FDB\u4E0B\u4E00\u4E2A\u533A\u5757\u7684\u6982\u7387\u3002 \u5728\u6210\u6587\u65F6\uFF0C\u4EA4\u6613\u8D39\u53EA\u4E0E\u4EA4\u6613\u6240\u9700\u7684\u7B7E\u540D\u6570\u91CF\u76F8\u5173\uFF08\u53C2\u89C1"),e("code",null,"lamports_per_signature"),o("\uFF09\uFF0C\u4E0E\u4EA4\u6613\u6240\u4F7F\u7528\u7684\u8D44\u6E90\u65E0\u5173\u3002 \u8FD9\u662F\u56E0\u4E3A\u76EE\u524D\u6240\u6709\u4EA4\u6613\u90FD\u6709\u4E00\u4E2A\u4E25\u683C\u76841232\u5B57\u8282\u7684\u9650\u5236\u3002")],-1),R=e("p",null,[o("\u6BCF\u4E2A\u4EA4\u6613\u90FD\u9700\u8981\u81F3\u5C11\u6709\u4E00\u4E2A"),e("code",null,"writable"),o("\uFF08\u53EF\u5199\uFF09\u7684\u8D26\u6237\uFF0C\u7528\u4E8E\u4E3A\u4EA4\u6613\u7B7E\u540D\u3002\u8FD9\u4E2A\u8D26\u6237\u65E0\u8BBA\u4EA4\u6613\u6210\u529F\u4E0E\u5426\u90FD\u9700\u8981\u4E3A\u4EA4\u6613\u6210\u672C\u4ED8\u8D39\u3002 \u5982\u679C\u4ED8\u8D39\u8005\u6CA1\u6709\u8DB3\u591F\u4E3A\u4EA4\u6613\u4ED8\u8D39\u7684\u4F59\u989D\uFF0C\u8FD9\u4E2A\u4EA4\u6613\u5C31\u4F1A\u88AB\u4E22\u5F03\u3002")],-1),j=e("p",null,"\u6210\u6587\u65F6\uFF0C50%\u7684\u4EA4\u6613\u8D39\u88AB\u51FA\u5757\u7684\u9A8C\u8BC1\u8282\u70B9\u6536\u53D6\uFF0C\u5269\u4E0B\u768450%\u88AB\u71C3\u70E7\u6389\u3002\u8FD9\u6837\u7684\u7ED3\u6784\u4F1A\u6FC0\u52B1\u9A8C\u8BC1\u8282\u70B9\u5728leader schedule\uFF08\u9886\u5BFC\u65F6\u95F4\u8868\uFF09\u89C4\u5B9A\u7684\u5C5E\u4E8E\u81EA\u5DF1\u7684slot\uFF08\u63D2\u69FD\uFF09\u4E2D\u5904\u7406\u5C3D\u53EF\u80FD\u591A\u7684\u4EA4\u6613\u3002",-1),A=e("h2",{id:"other-resources",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#other-resources","aria-hidden":"true"},"#"),o(" Other Resources")],-1),C={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},J=o("\u5B98\u65B9\u6587\u6863"),z={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},D=o("\u4EA4\u6613\u7684\u7ED3\u6784"),H={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},M=o("Transaction Fees by Justin Starry"),P={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},q=o("An Introduction to Solana by Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=o("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=o("Solana Transaction in Depth by Alex Miller");function W(X,Y){const s=a("RouterLink"),n=a("ExternalLinkIcon");return l(),i(d,null,[p,e("p",null,[u,t(s,{to:"/zh/core-concepts/programs.html"},{default:c(()=>[m]),_:1}),f,e("a",b,[g,t(n)]),k]),x,e("p",null,[S,e("a",v,[y,t(n)]),L]),w,T,e("ul",null,[e("li",null,[e("a",F,[N,t(n)]),V]),e("li",null,[e("a",B,[E,t(n)]),I])]),O,R,j,A,e("ul",null,[e("li",null,[e("a",C,[J,t(n)])]),e("li",null,[e("a",z,[D,t(n)])]),e("li",null,[e("a",H,[M,t(n)])]),e("li",null,[e("a",P,[q,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",Q,[U,t(n)])])])],64)}var $=r(_,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/transactions.html.5f4184a8.js b/docs/.vuepress/dist/assets/transactions.html.f2c9858d.js similarity index 99% rename from docs/.vuepress/dist/assets/transactions.html.5f4184a8.js rename to docs/.vuepress/dist/assets/transactions.html.f2c9858d.js index e63449124..e0e09fac7 100644 --- a/docs/.vuepress/dist/assets/transactions.html.5f4184a8.js +++ b/docs/.vuepress/dist/assets/transactions.html.f2c9858d.js @@ -1 +1 @@ -import{_ as r,r as a,o as l,c as i,a as e,b as t,w as c,F as d,d as o,e as _}from"./app.07ce7a66.js";const h={},p=e("h1",{id:"\u4EA4\u6613",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u4EA4\u6613","aria-hidden":"true"},"#"),o(" \u4EA4\u6613")],-1),u=o("\u5BA2\u6236\u7AEF\u53EF\u4EE5\u901A\u904E\u5411\u4E00\u500B\u96C6\u7FA3\u63D0\u4EA4\u4EA4\u6613\u4F86\u8ABF\u7528"),m=o("\u7A0B\u5E8F"),f=o("\u3002\u4E00\u500B\u4EA4\u6613\u53EF\u4EE5\u5305\u542B\u591A\u500B\u6307\u4EE4\uFF0C\u6BCF\u500B\u6307\u4EE4\u53EF\u4EE5\u91DD\u5C0D\u4E0D\u540C\u7684\u7A0B\u5E8F\u3002 \u4EA4\u6613\u63D0\u4EA4\u6642\uFF0CSolana"),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=o("\u904B\u884C\u5EAB"),k=o("\u6703\u81EA\u52D5\u7684\u6309\u9806\u5E8F\u8655\u7406\u9019\u4E9B\u6307\u4EE4\u3002 \u5982\u679C\u67D0\u4E00\u500B\u6307\u4EE4\u4E2D\u7684\u4EFB\u4F55\u4E00\u500B\u90E8\u5206\u5931\u6557\uFF0C\u6574\u500B\u4EA4\u6613\u5C31\u6703\u5931\u6557\u3002"),x=_('

    \u6982\u8FF0

    \u8981\u9EDE

    • \u6307\u4EE4\u662FSolana\u4E0A\u6700\u57FA\u672C\u7684\u64CD\u4F5C\u55AE\u5143
    • \u6BCF\u500B\u6307\u4EE4\u90FD\u5305\u542B\uFF1A
      • program_id\uFF1A\u6240\u91DD\u5C0D\u7684\u7A0B\u5E8F\u7684id
      • accounts\uFF1A\u9700\u8981\u8B80\u6216\u5BEB\u7684\u5168\u90E8\u8CEC\u6236\u7D44\u6210\u7684\u6578\u7D44
      • instruction_data\uFF1A\u5411\u6307\u5B9A\u7A0B\u5E8F\u6240\u50B3\u8F38\u7684\u6578\u64DA\u7684\u5B57\u7BC0\u78BC
    • \u591A\u500B\u6307\u4EE4\u53EF\u4EE5\u88AB\u6253\u5305\u9032\u5165\u540C\u4E00\u500B\u4EA4\u6613\u7576\u4E2D
    • \u6BCF\u500B\u4EA4\u6613\u90FD\u5305\u542B\uFF1A
      • instructions\uFF1A\u4E00\u500B\u6216\u591A\u500B\u6307\u4EE4
      • blockhash\uFF1A\u6700\u65B0\u7684\u584A\u54C8\u5E0C\u503C
      • signatures\uFF1A\u4E00\u500B\u6216\u591A\u500B\u7C3D\u540D
    • \u6307\u4EE4\u6703\u88AB\u81EA\u52D5\u7684\u6309\u9806\u5E8F\u57F7\u884C
    • \u5982\u679C\u4E00\u500B\u6307\u4EE4\u7684\u4EFB\u4F55\u4E00\u90E8\u5206\u5931\u6557\uFF0C\u6574\u500B\u4EA4\u6613\u5C31\u6703\u5931\u6557
    • \u4EA4\u6613\u7684\u5927\u5C0F\u9650\u5236\u57281232\u5B57\u7BC0\u4EE5\u5167

    \u6DF1\u5165

    \u5728Solana\u904B\u884C\u5EAB\u4E2D\uFF0C\u6307\u4EE4\u548C\u4EA4\u6613\u90FD\u9700\u8981\u5148\u6307\u5B9A\u5168\u90E8\u9700\u8981\u8B80\u5BEB\u8A2A\u554F\u7684\u8CEC\u6236\u5217\u8868\u3002 \u901A\u904E\u4E8B\u5148\u6307\u5B9A\u8CEC\u6236\u5217\u8868\uFF0C\u904B\u884C\u5EAB\u53EF\u4EE5\u5C0D\u4EA4\u6613\u7684\u57F7\u884C\u505A\u4E26\u884C\u5316\u8655\u7406\u3002

    \u7576\u4EA4\u6613\u88AB\u63D0\u4EA4\u5230\u96C6\u7FA3\u6642\uFF0C\u904B\u884C\u5EAB\u6703\u81EA\u52D5\u7684\u6309\u7167\u9806\u5E8F\u8655\u7406\u9019\u4E9B\u6307\u4EE4\u3002\u5C0D\u65BC\u6BCF\u500B\u6307\u4EE4\uFF0C\u63A5\u6536\u9019\u500B\u6307\u4EE4\u7684\u7A0B\u5E8F\u6703\u89E3\u6790\u6307\u4EE4\u4E2D\u7684\u6578\u64DA\u5B57\u6BB5\uFF0C\u5728\u6307\u5B9A\u7684\u8CEC\u6236\u4E0A\u9032\u884C\u64CD\u4F5C\u3002 \u7A0B\u5E8F\u8981\u9EBC\u57F7\u884C\u6210\u529F\uFF0C\u8981\u9EBC\u6703\u8FD4\u56DE\u4E00\u500B\u932F\u8AA4\u78BC\u3002\u5982\u679C\u8FD4\u56DE\u4E86\u4E00\u500B\u932F\u8AA4\u78BC\uFF0C\u6574\u500B\u4EA4\u6613\u90FD\u6703\u7ACB\u5373\u5931\u6557\u3002

    \u4EFB\u4F55\u4EA4\u6613\uFF0C\u53EA\u8981\u91DD\u5C0D\u4E00\u500B\u8CEC\u6236\u6263\u9664SOL\uFF0C\u6216\u8005\u4FEE\u6539\u5176\u4E2D\u7684\u6578\u64DA\uFF0C\u90FD\u9700\u8981\u9019\u500B\u8CEC\u6236\u64C1\u6709\u8005\u7684\u7C3D\u540D\u3002 \u5728\u4EA4\u6613\u4E2D\uFF0C\u6703\u88AB\u4FEE\u6539\u7684\u8CEC\u6236\u90FD\u6703\u88AB\u6A19\u8A18\u7232writable\uFF08\u53EF\u5BEB\uFF09\u3002 \u7576\u4EA4\u6613\u7684\u4ED8\u8CBB\u8005\u652F\u4ED8\u4E86\u8DB3\u5920\u7684\u79DF\u91D1\u548C\u4EA4\u6613\u8CBB\u7528\u6642\uFF0C\u4E00\u500B\u8CEC\u6236\u53EF\u4EE5\u88AB\u5B58\u5165SOL\u800C\u4E0D\u7528\u9019\u500B\u8CEC\u6236\u64C1\u6709\u8005\u7684\u8A31\u53EF\u3002

    ',6),S=o("\u63D0\u4EA4\u4E4B\u524D\uFF0C\u6BCF\u500B\u4EA4\u6613\u9700\u8981\u5F15\u7528\u4E00\u500B"),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},y=o("recent blockhash\uFF08\u6700\u65B0\u584A\u54C8\u5E0C\uFF09"),L=o("\u3002 \u584A\u54C8\u5E0C\u88AB\u7528\u65BC\u53BB\u91CD\uFF0C\u4EE5\u53CA\u79FB\u9664\u904E\u671F\u4EA4\u6613\u3002\u4E00\u500B\u584A\u54C8\u5E0C\u7684\u6700\u5927\u58FD\u547D\u662F150\u500B\u5340\u584A\uFF0C\u6210\u6587\u6642\u9019\u500B\u6642\u9593\u5927\u7D04\u662F1\u5206\u941819\u79D2\u3002"),w=e("h3",{id:"\u8CBB\u7528",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8CBB\u7528","aria-hidden":"true"},"#"),o(" \u8CBB\u7528")],-1),T=e("p",null,"Solana\u7DB2\u7D61\u6536\u53D6\u5169\u7A2E\u8CBB\u7528\uFF1A",-1),F={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},N=o("\u4EA4\u6613\u8CBB"),V=o("\uFF0C\u7528\u65BC\u5411\u7DB2\u7D61\u5EE3\u64AD\u6D88\u606F\uFF08\u4EA6\u5373gas\u8CBB\uFF09"),B={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},E=o("\u79DF\u91D1"),I=o("\uFF0C\u7528\u65BC\u5411\u5340\u584A\u93C8\u4E0A\u5B58\u5132\u6578\u64DA"),j=e("p",null,[o("\u5728Solana\u4E2D\uFF0C\u4EA4\u6613\u8CBB\u662F\u78BA\u5B9A\u7684\u3002\u4E26\u6C92\u6709\u8CBB\u7387\u7AF6\u50F9\u7684\u6982\u5FF5\uFF0C\u7528\u6236\u7121\u6CD5\u901A\u904E\u589E\u52A0\u4EA4\u6613\u8CBB\u7684\u65B9\u5F0F\u589E\u52A0\u81EA\u5DF1\u7684\u4EA4\u6613\u88AB\u6253\u5305\u9032\u4E0B\u4E00\u500B\u5340\u584A\u7684\u6982\u7387\u3002 \u5728\u6210\u6587\u6642\uFF0C\u4EA4\u6613\u8CBB\u53EA\u8207\u4EA4\u6613\u6240\u9700\u7684\u7C3D\u540D\u6578\u91CF\u76F8\u95DC\uFF08\u53C3\u898B"),e("code",null,"lamports_per_signature"),o("\uFF09\uFF0C\u8207\u4EA4\u6613\u6240\u4F7F\u7528\u7684\u8CC7\u6E90\u7121\u95DC\u3002 \u9019\u662F\u56E0\u7232\u76EE\u524D\u6240\u6709\u4EA4\u6613\u90FD\u6709\u4E00\u500B\u56B4\u683C\u76841232\u5B57\u7BC0\u7684\u9650\u5236\u3002")],-1),A=e("p",null,[o("\u6BCF\u500B\u4EA4\u6613\u90FD\u9700\u8981\u81F3\u5C11\u6709\u4E00\u500B"),e("code",null,"writable"),o("\uFF08\u53EF\u5BEB\uFF09\u7684\u8CEC\u6236\uFF0C\u7528\u65BC\u7232\u4EA4\u6613\u7C3D\u540D\u3002\u9019\u500B\u8CEC\u6236\u7121\u8AD6\u4EA4\u6613\u6210\u529F\u8207\u5426\u90FD\u9700\u8981\u7232\u4EA4\u6613\u6210\u672C\u4ED8\u8CBB\u3002 \u5982\u679C\u4ED8\u8CBB\u8005\u6C92\u6709\u8DB3\u5920\u7232\u4EA4\u6613\u4ED8\u8CBB\u7684\u9918\u984D\uFF0C\u9019\u500B\u4EA4\u6613\u5C31\u6703\u88AB\u4E1F\u68C4\u3002")],-1),C=e("p",null,"\u6210\u6587\u6642\uFF0C50%\u7684\u4EA4\u6613\u8CBB\u88AB\u51FA\u584A\u7684\u9A57\u8B49\u7BC0\u9EDE\u6536\u53D6\uFF0C\u5269\u4E0B\u768450%\u88AB\u71C3\u71D2\u6389\u3002\u9019\u6A23\u7684\u7D50\u69CB\u6703\u6FC0\u52F5\u9A57\u8B49\u7BC0\u9EDE\u5728leader schedule\uFF08\u9818\u5C0E\u6642\u9593\u8868\uFF09\u898F\u5B9A\u7684\u5C6C\u65BC\u81EA\u5DF1\u7684slot\uFF08\u63D2\u69FD\uFF09\u4E2D\u8655\u7406\u5118\u53EF\u80FD\u591A\u7684\u4EA4\u6613\u3002",-1),J=e("h2",{id:"\u5176\u4ED6\u8CC7\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u5176\u4ED6\u8CC7\u6599","aria-hidden":"true"},"#"),o(" \u5176\u4ED6\u8CC7\u6599")],-1),O={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},R=o("\u5B98\u65B9\u6587\u6A94"),z={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},D=o("\u4EA4\u6613\u7684\u7D50\u69CB"),H={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},M=o("Transaction Fees by Justin Starry"),P={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},q=o("An Introduction to Solana by Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=o("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=o("Solana Transaction in Depth by Alex Miller");function W(X,Y){const s=a("RouterLink"),n=a("ExternalLinkIcon");return l(),i(d,null,[p,e("p",null,[u,t(s,{to:"/zh_t/core-concepts/programs.html"},{default:c(()=>[m]),_:1}),f,e("a",b,[g,t(n)]),k]),x,e("p",null,[S,e("a",v,[y,t(n)]),L]),w,T,e("ul",null,[e("li",null,[e("a",F,[N,t(n)]),V]),e("li",null,[e("a",B,[E,t(n)]),I])]),j,A,C,J,e("ul",null,[e("li",null,[e("a",O,[R,t(n)])]),e("li",null,[e("a",z,[D,t(n)])]),e("li",null,[e("a",H,[M,t(n)])]),e("li",null,[e("a",P,[q,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",Q,[U,t(n)])])])],64)}var $=r(h,[["render",W]]);export{$ as default}; +import{_ as r,r as a,o as l,c as i,a as e,b as t,w as c,F as d,d as o,e as _}from"./app.d411e3b3.js";const h={},p=e("h1",{id:"\u4EA4\u6613",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u4EA4\u6613","aria-hidden":"true"},"#"),o(" \u4EA4\u6613")],-1),u=o("\u5BA2\u6236\u7AEF\u53EF\u4EE5\u901A\u904E\u5411\u4E00\u500B\u96C6\u7FA3\u63D0\u4EA4\u4EA4\u6613\u4F86\u8ABF\u7528"),m=o("\u7A0B\u5E8F"),f=o("\u3002\u4E00\u500B\u4EA4\u6613\u53EF\u4EE5\u5305\u542B\u591A\u500B\u6307\u4EE4\uFF0C\u6BCF\u500B\u6307\u4EE4\u53EF\u4EE5\u91DD\u5C0D\u4E0D\u540C\u7684\u7A0B\u5E8F\u3002 \u4EA4\u6613\u63D0\u4EA4\u6642\uFF0CSolana"),b={href:"https://docs.solana.com/developing/programming-model/runtime",target:"_blank",rel:"noopener noreferrer"},g=o("\u904B\u884C\u5EAB"),k=o("\u6703\u81EA\u52D5\u7684\u6309\u9806\u5E8F\u8655\u7406\u9019\u4E9B\u6307\u4EE4\u3002 \u5982\u679C\u67D0\u4E00\u500B\u6307\u4EE4\u4E2D\u7684\u4EFB\u4F55\u4E00\u500B\u90E8\u5206\u5931\u6557\uFF0C\u6574\u500B\u4EA4\u6613\u5C31\u6703\u5931\u6557\u3002"),x=_('

    \u6982\u8FF0

    \u8981\u9EDE

    • \u6307\u4EE4\u662FSolana\u4E0A\u6700\u57FA\u672C\u7684\u64CD\u4F5C\u55AE\u5143
    • \u6BCF\u500B\u6307\u4EE4\u90FD\u5305\u542B\uFF1A
      • program_id\uFF1A\u6240\u91DD\u5C0D\u7684\u7A0B\u5E8F\u7684id
      • accounts\uFF1A\u9700\u8981\u8B80\u6216\u5BEB\u7684\u5168\u90E8\u8CEC\u6236\u7D44\u6210\u7684\u6578\u7D44
      • instruction_data\uFF1A\u5411\u6307\u5B9A\u7A0B\u5E8F\u6240\u50B3\u8F38\u7684\u6578\u64DA\u7684\u5B57\u7BC0\u78BC
    • \u591A\u500B\u6307\u4EE4\u53EF\u4EE5\u88AB\u6253\u5305\u9032\u5165\u540C\u4E00\u500B\u4EA4\u6613\u7576\u4E2D
    • \u6BCF\u500B\u4EA4\u6613\u90FD\u5305\u542B\uFF1A
      • instructions\uFF1A\u4E00\u500B\u6216\u591A\u500B\u6307\u4EE4
      • blockhash\uFF1A\u6700\u65B0\u7684\u584A\u54C8\u5E0C\u503C
      • signatures\uFF1A\u4E00\u500B\u6216\u591A\u500B\u7C3D\u540D
    • \u6307\u4EE4\u6703\u88AB\u81EA\u52D5\u7684\u6309\u9806\u5E8F\u57F7\u884C
    • \u5982\u679C\u4E00\u500B\u6307\u4EE4\u7684\u4EFB\u4F55\u4E00\u90E8\u5206\u5931\u6557\uFF0C\u6574\u500B\u4EA4\u6613\u5C31\u6703\u5931\u6557
    • \u4EA4\u6613\u7684\u5927\u5C0F\u9650\u5236\u57281232\u5B57\u7BC0\u4EE5\u5167

    \u6DF1\u5165

    \u5728Solana\u904B\u884C\u5EAB\u4E2D\uFF0C\u6307\u4EE4\u548C\u4EA4\u6613\u90FD\u9700\u8981\u5148\u6307\u5B9A\u5168\u90E8\u9700\u8981\u8B80\u5BEB\u8A2A\u554F\u7684\u8CEC\u6236\u5217\u8868\u3002 \u901A\u904E\u4E8B\u5148\u6307\u5B9A\u8CEC\u6236\u5217\u8868\uFF0C\u904B\u884C\u5EAB\u53EF\u4EE5\u5C0D\u4EA4\u6613\u7684\u57F7\u884C\u505A\u4E26\u884C\u5316\u8655\u7406\u3002

    \u7576\u4EA4\u6613\u88AB\u63D0\u4EA4\u5230\u96C6\u7FA3\u6642\uFF0C\u904B\u884C\u5EAB\u6703\u81EA\u52D5\u7684\u6309\u7167\u9806\u5E8F\u8655\u7406\u9019\u4E9B\u6307\u4EE4\u3002\u5C0D\u65BC\u6BCF\u500B\u6307\u4EE4\uFF0C\u63A5\u6536\u9019\u500B\u6307\u4EE4\u7684\u7A0B\u5E8F\u6703\u89E3\u6790\u6307\u4EE4\u4E2D\u7684\u6578\u64DA\u5B57\u6BB5\uFF0C\u5728\u6307\u5B9A\u7684\u8CEC\u6236\u4E0A\u9032\u884C\u64CD\u4F5C\u3002 \u7A0B\u5E8F\u8981\u9EBC\u57F7\u884C\u6210\u529F\uFF0C\u8981\u9EBC\u6703\u8FD4\u56DE\u4E00\u500B\u932F\u8AA4\u78BC\u3002\u5982\u679C\u8FD4\u56DE\u4E86\u4E00\u500B\u932F\u8AA4\u78BC\uFF0C\u6574\u500B\u4EA4\u6613\u90FD\u6703\u7ACB\u5373\u5931\u6557\u3002

    \u4EFB\u4F55\u4EA4\u6613\uFF0C\u53EA\u8981\u91DD\u5C0D\u4E00\u500B\u8CEC\u6236\u6263\u9664SOL\uFF0C\u6216\u8005\u4FEE\u6539\u5176\u4E2D\u7684\u6578\u64DA\uFF0C\u90FD\u9700\u8981\u9019\u500B\u8CEC\u6236\u64C1\u6709\u8005\u7684\u7C3D\u540D\u3002 \u5728\u4EA4\u6613\u4E2D\uFF0C\u6703\u88AB\u4FEE\u6539\u7684\u8CEC\u6236\u90FD\u6703\u88AB\u6A19\u8A18\u7232writable\uFF08\u53EF\u5BEB\uFF09\u3002 \u7576\u4EA4\u6613\u7684\u4ED8\u8CBB\u8005\u652F\u4ED8\u4E86\u8DB3\u5920\u7684\u79DF\u91D1\u548C\u4EA4\u6613\u8CBB\u7528\u6642\uFF0C\u4E00\u500B\u8CEC\u6236\u53EF\u4EE5\u88AB\u5B58\u5165SOL\u800C\u4E0D\u7528\u9019\u500B\u8CEC\u6236\u64C1\u6709\u8005\u7684\u8A31\u53EF\u3002

    ',6),S=o("\u63D0\u4EA4\u4E4B\u524D\uFF0C\u6BCF\u500B\u4EA4\u6613\u9700\u8981\u5F15\u7528\u4E00\u500B"),v={href:"https://docs.solana.com/developing/programming-model/transactions#recent-blockhash",target:"_blank",rel:"noopener noreferrer"},y=o("recent blockhash\uFF08\u6700\u65B0\u584A\u54C8\u5E0C\uFF09"),L=o("\u3002 \u584A\u54C8\u5E0C\u88AB\u7528\u65BC\u53BB\u91CD\uFF0C\u4EE5\u53CA\u79FB\u9664\u904E\u671F\u4EA4\u6613\u3002\u4E00\u500B\u584A\u54C8\u5E0C\u7684\u6700\u5927\u58FD\u547D\u662F150\u500B\u5340\u584A\uFF0C\u6210\u6587\u6642\u9019\u500B\u6642\u9593\u5927\u7D04\u662F1\u5206\u941819\u79D2\u3002"),w=e("h3",{id:"\u8CBB\u7528",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u8CBB\u7528","aria-hidden":"true"},"#"),o(" \u8CBB\u7528")],-1),T=e("p",null,"Solana\u7DB2\u7D61\u6536\u53D6\u5169\u7A2E\u8CBB\u7528\uFF1A",-1),F={href:"https://docs.solana.com/transaction_fees",target:"_blank",rel:"noopener noreferrer"},N=o("\u4EA4\u6613\u8CBB"),V=o("\uFF0C\u7528\u65BC\u5411\u7DB2\u7D61\u5EE3\u64AD\u6D88\u606F\uFF08\u4EA6\u5373gas\u8CBB\uFF09"),B={href:"https://docs.solana.com/developing/programming-model/accounts#rent",target:"_blank",rel:"noopener noreferrer"},E=o("\u79DF\u91D1"),I=o("\uFF0C\u7528\u65BC\u5411\u5340\u584A\u93C8\u4E0A\u5B58\u5132\u6578\u64DA"),j=e("p",null,[o("\u5728Solana\u4E2D\uFF0C\u4EA4\u6613\u8CBB\u662F\u78BA\u5B9A\u7684\u3002\u4E26\u6C92\u6709\u8CBB\u7387\u7AF6\u50F9\u7684\u6982\u5FF5\uFF0C\u7528\u6236\u7121\u6CD5\u901A\u904E\u589E\u52A0\u4EA4\u6613\u8CBB\u7684\u65B9\u5F0F\u589E\u52A0\u81EA\u5DF1\u7684\u4EA4\u6613\u88AB\u6253\u5305\u9032\u4E0B\u4E00\u500B\u5340\u584A\u7684\u6982\u7387\u3002 \u5728\u6210\u6587\u6642\uFF0C\u4EA4\u6613\u8CBB\u53EA\u8207\u4EA4\u6613\u6240\u9700\u7684\u7C3D\u540D\u6578\u91CF\u76F8\u95DC\uFF08\u53C3\u898B"),e("code",null,"lamports_per_signature"),o("\uFF09\uFF0C\u8207\u4EA4\u6613\u6240\u4F7F\u7528\u7684\u8CC7\u6E90\u7121\u95DC\u3002 \u9019\u662F\u56E0\u7232\u76EE\u524D\u6240\u6709\u4EA4\u6613\u90FD\u6709\u4E00\u500B\u56B4\u683C\u76841232\u5B57\u7BC0\u7684\u9650\u5236\u3002")],-1),A=e("p",null,[o("\u6BCF\u500B\u4EA4\u6613\u90FD\u9700\u8981\u81F3\u5C11\u6709\u4E00\u500B"),e("code",null,"writable"),o("\uFF08\u53EF\u5BEB\uFF09\u7684\u8CEC\u6236\uFF0C\u7528\u65BC\u7232\u4EA4\u6613\u7C3D\u540D\u3002\u9019\u500B\u8CEC\u6236\u7121\u8AD6\u4EA4\u6613\u6210\u529F\u8207\u5426\u90FD\u9700\u8981\u7232\u4EA4\u6613\u6210\u672C\u4ED8\u8CBB\u3002 \u5982\u679C\u4ED8\u8CBB\u8005\u6C92\u6709\u8DB3\u5920\u7232\u4EA4\u6613\u4ED8\u8CBB\u7684\u9918\u984D\uFF0C\u9019\u500B\u4EA4\u6613\u5C31\u6703\u88AB\u4E1F\u68C4\u3002")],-1),C=e("p",null,"\u6210\u6587\u6642\uFF0C50%\u7684\u4EA4\u6613\u8CBB\u88AB\u51FA\u584A\u7684\u9A57\u8B49\u7BC0\u9EDE\u6536\u53D6\uFF0C\u5269\u4E0B\u768450%\u88AB\u71C3\u71D2\u6389\u3002\u9019\u6A23\u7684\u7D50\u69CB\u6703\u6FC0\u52F5\u9A57\u8B49\u7BC0\u9EDE\u5728leader schedule\uFF08\u9818\u5C0E\u6642\u9593\u8868\uFF09\u898F\u5B9A\u7684\u5C6C\u65BC\u81EA\u5DF1\u7684slot\uFF08\u63D2\u69FD\uFF09\u4E2D\u8655\u7406\u5118\u53EF\u80FD\u591A\u7684\u4EA4\u6613\u3002",-1),J=e("h2",{id:"\u5176\u4ED6\u8CC7\u6599",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#\u5176\u4ED6\u8CC7\u6599","aria-hidden":"true"},"#"),o(" \u5176\u4ED6\u8CC7\u6599")],-1),O={href:"https://docs.solana.com/developing/programming-model/transactions",target:"_blank",rel:"noopener noreferrer"},R=o("\u5B98\u65B9\u6587\u6A94"),z={href:"https://solana.wiki/docs/solidity-guide/transactions/#solana-transaction-structure",target:"_blank",rel:"noopener noreferrer"},D=o("\u4EA4\u6613\u7684\u7D50\u69CB"),H={href:"https://jstarry.notion.site/Transaction-Fees-f09387e6a8d84287aa16a34ecb58e239",target:"_blank",rel:"noopener noreferrer"},M=o("Transaction Fees by Justin Starry"),P={href:"https://2501babe.github.io/posts/solana101.html",target:"_blank",rel:"noopener noreferrer"},q=o("An Introduction to Solana by Hana"),G={href:"https://jito-labs.medium.com/solana-validator-101-transaction-processing-90bcdc271143",target:"_blank",rel:"noopener noreferrer"},K=o("Transaction Processing by Jito Labs"),Q={href:"https://medium.com/@asmiller1989/solana-transactions-in-depth-1f7f7fe06ac2",target:"_blank",rel:"noopener noreferrer"},U=o("Solana Transaction in Depth by Alex Miller");function W(X,Y){const s=a("RouterLink"),n=a("ExternalLinkIcon");return l(),i(d,null,[p,e("p",null,[u,t(s,{to:"/zh_t/core-concepts/programs.html"},{default:c(()=>[m]),_:1}),f,e("a",b,[g,t(n)]),k]),x,e("p",null,[S,e("a",v,[y,t(n)]),L]),w,T,e("ul",null,[e("li",null,[e("a",F,[N,t(n)]),V]),e("li",null,[e("a",B,[E,t(n)]),I])]),j,A,C,J,e("ul",null,[e("li",null,[e("a",O,[R,t(n)])]),e("li",null,[e("a",z,[D,t(n)])]),e("li",null,[e("a",H,[M,t(n)])]),e("li",null,[e("a",P,[q,t(n)])]),e("li",null,[e("a",G,[K,t(n)])]),e("li",null,[e("a",Q,[U,t(n)])])])],64)}var $=r(h,[["render",W]]);export{$ as default}; diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.8ea1a104.js b/docs/.vuepress/dist/assets/versioned-transactions.html.097cf02b.js similarity index 99% rename from docs/.vuepress/dist/assets/versioned-transactions.html.8ea1a104.js rename to docs/.vuepress/dist/assets/versioned-transactions.html.097cf02b.js index 7847108fc..135dae6a9 100644 --- a/docs/.vuepress/dist/assets/versioned-transactions.html.8ea1a104.js +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.097cf02b.js @@ -1,4 +1,4 @@ -import{_ as o,r,o as p,c as l,a as s,b as e,F as c,e as t,d as a}from"./app.07ce7a66.js";var i="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",_="/assets/compat_array_of_account_addresses.7792e5c7.png",m="/assets/compact_array_of_ixs.6281d70b.png",g="/assets/issues_with_legacy_txs.5766db66.png",b="/assets/luts.96a8a310.png",k="/assets/lut_format.060d6be2.png",f="/assets/messagev0.c089b240.png",v="/assets/compact_array_of_luts.9175e491.png",y="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},w=t('

    \u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)

    Solana\u6700\u8FD1\u53D1\u5E03\u4E86\u7248\u672C\u5316\u4EA4\u6613\u3002\u63D0\u8BAE\u7684\u66F4\u6539\u5982\u4E0B\uFF1A

    1. \u5F15\u5165\u4E00\u4E2A\u65B0\u7684\u7A0B\u5E8F\uFF0C\u7528\u4E8E\u7BA1\u7406\u94FE\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    2. \u6DFB\u52A0\u4E00\u79CD\u65B0\u7684\u4EA4\u6613\u683C\u5F0F\uFF0C\u53EF\u4EE5\u5229\u7528\u94FE\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    \u7EFC\u8FF0

    \u4E8B\u5B9E\u8868

    -\u4F20\u7EDF\u4EA4\u6613\u5B58\u5728\u4E00\u4E2A\u4E3B\u8981\u95EE\u9898\uFF1A\u6700\u5927\u5141\u8BB8\u7684\u5927\u5C0F\u4E3A1232\u5B57\u8282\uFF0C\u56E0\u6B64\u539F\u5B50\u4EA4\u6613\u4E2D\u53EF\u4EE5\u5BB9\u7EB3\u7684\u8D26\u6237\u6570\u91CF\u4E3A35\u4E2A\u5730\u5740\u3002

    • \u5730\u5740\u67E5\u627E\u8868\uFF08LUTs\uFF09\uFF1A\u4E00\u65E6\u8D26\u6237\u5B58\u50A8\u5728\u8BE5\u8868\u4E2D\uFF0C\u53EF\u4EE5\u4F7F\u75281\u5B57\u8282\u7684u8\u7D22\u5F15\uFF0C\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8BE5\u8868\u7684\u5730\u5740\u3002
    • \u53EF\u4EE5\u4F7F\u7528solana/web3.js\u7684createLookupTable()\u6784\u5EFA\u4E00\u4E2A\u65B0\u7684\u67E5\u627E\u8868\uFF0C\u5E76\u786E\u5B9A\u5176\u5730\u5740\u3002
    • \u4E00\u65E6\u521B\u5EFA\u4E86LUT\uFF0C\u53EF\u4EE5\u8FDB\u884C\u6269\u5C55\uFF0C\u5373\u53EF\u4EE5\u5C06\u8D26\u6237\u8FFD\u52A0\u5230\u8868\u4E2D\u3002
    • \u7248\u672C\u5316\u4EA4\u6613\uFF1A\u9700\u8981\u4FEE\u6539\u4F20\u7EDF\u4EA4\u6613\u7684\u7ED3\u6784\u4EE5\u6574\u5408LUTs\u3002
    • \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u5934\u90E8\u7684\u7B2C\u4E00\u4E2A\u5B57\u8282\u4E2D\u4FDD\u7559\u4E86\u4E00\u4E2A\u672A\u4F7F\u7528\u7684\u6700\u9AD8\u4F4D\uFF0C\u53EF\u4EE5\u7528\u6765\u663E\u5F0F\u58F0\u660E\u4EA4\u6613\u7684\u7248\u672C\u3002

    \u6211\u4EEC\u5C06\u66F4\u8BE6\u7EC6\u5730\u8BA8\u8BBA\u4E0A\u8FF0\u5F15\u5165\u7684\u66F4\u6539\u4EE5\u53CA\u5B83\u4EEC\u5BF9\u5F00\u53D1\u4EBA\u5458\u7684\u610F\u4E49\u3002\u7136\u800C\uFF0C\u4E3A\u4E86\u66F4\u597D\u5730\u7406\u89E3\u8FD9\u4E9B\u66F4\u6539\uFF0C\u6211\u4EEC\u9996\u5148\u9700\u8981\u4E86\u89E3\u5E38\u89C4\uFF08\u6216\u4F20\u7EDF\uFF09\u4EA4\u6613\u7684\u7ED3\u6784\u3002

    \u4F20\u7EDF\u4EA4\u6613\uFF08Legacy Transactions\uFF09

    ',7),q=a("Solana\u7F51\u7EDC\u4F7F\u7528\u6700\u5927\u4E8B\u52A1\u5355\u5143\uFF08MTU\uFF09\u5927\u5C0F\u4E3A1280\u5B57\u8282\uFF0C\u9075\u5FAA"),T={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},V=a("IPv6 MTU"),L=a(" \u7684\u5927\u5C0F\u7EA6\u675F\uFF0C\u4EE5\u786E\u4FDD\u901F\u5EA6\u548C\u53EF\u9760\u6027\u3002\u8FD9\u6837\u7559\u4E0B\u4E861232\u5B57\u8282\u7684\u6570\u636E\u7A7A\u95F4\uFF0C\u7528\u4E8E\u5B58\u50A8\u5E8F\u5217\u5316\u7684\u4EA4\u6613\u7B49\u6570\u636E\u3002"),S=s("p",null,"\u4E00\u4E2A\u4EA4\u6613\u7531\u4EE5\u4E0B\u7EC4\u6210\uFF1A",-1),C=a("\u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u7B7E\u540D\uFF0C\u5176\u4E2D\u6BCF\u4E2A\u7B7E\u540D\u662F\u4E00\u4E2A64\u5B57\u8282\u7684"),A={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},U=a("ed25519"),j=a("\u7B7E\u540D\u3002"),B=s("li",null,"\u4E00\u4E2A\uFF08\u4F20\u7EDF\u7684\uFF09\u6D88\u606F\u3002",-1),I=s("p",null,[s("img",{src:i,alt:"Transaction Format"})],-1),M={class:"custom-container tip"},N=s("p",{class:"custom-container-title"},"Compact-Array format",-1),P=s("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),E={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},H=a("Compact-u16"),R=s("li",null,"Followed by each array item",-1),W=s("p",null,[s("img",{src:d,alt:"Compact array format"})],-1),D=t('

    \u4F20\u7EDF\u6D88\u606F

    \u4F20\u7EDF\u6D88\u606F\u5305\u542B\u4EE5\u4E0B\u7EC4\u4EF6\uFF1A

    1. \u4E00\u4E2A\u5934\u90E8\uFF08header\uFF09\u3002
    2. \u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u8D26\u6237\u5730\u5740\uFF0C\u6BCF\u4E2A\u8D26\u6237\u5730\u5740\u5360\u752832\u5B57\u8282\u3002
    3. \u4E00\u4E2A\u6700\u8FD1\u7684\u533A\u5757\u54C8\u5E0C\uFF08recent blockhash\uFF09\uFF1A
      • \u4E00\u4E2A32\u5B57\u8282\u7684SHA-256\u54C8\u5E0C\uFF0C\u7528\u4E8E\u6307\u793A\u4E0A\u6B21\u89C2\u5BDF\u5230\u7684\u8D26\u672C\u72B6\u6001\u3002\u5982\u679C\u4E00\u4E2A\u533A\u5757\u54C8\u5E0C\u592A\u65E7\uFF0C\u9A8C\u8BC1\u8282\u70B9\u5C06\u62D2\u7EDD\u5B83\u3002
    4. \u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u6307\u4EE4

    Legacy Message

    \u5934\u90E8

    \u6D88\u606F\u5934\u90E8\u662F3\u5B57\u8282\u957F\uFF0C\u5305\u542B3\u4E2Au8\u6574\u6570\uFF1A

    1. \u6240\u9700\u7B7E\u540D\u6570\u91CF\uFF1ASolana\u8FD0\u884C\u65F6\u4F1A\u5C06\u6B64\u6570\u5B57\u4E0E\u4EA4\u6613\u4E2D\u7D27\u51D1\u6570\u7EC4\u7B7E\u540D\u7684\u957F\u5EA6\u8FDB\u884C\u9A8C\u8BC1\u3002
    2. \u9700\u8981\u7B7E\u540D\u7684\u53EA\u8BFB\u8D26\u6237\u5730\u5740\u6570\u91CF\u3002
    3. \u4E0D\u9700\u8981\u7B7E\u540D\u7684\u53EA\u8BFB\u8D26\u6237\u5730\u5740\u6570\u91CF\u3002

    Message Header

    \u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4

    \u8FD9\u4E2A\u7D27\u51D1\u6570\u7EC4\u4EE5\u7D27\u51D1\u7684u16\u7F16\u7801\u7684\u8D26\u6237\u5730\u5740\u6570\u91CF\u5F00\u59CB\uFF0C\u7136\u540E\u662F\uFF1A

    1. \u9700\u8981\u7B7E\u540D\u7684\u8D26\u6237\u5730\u5740\uFF1A\u9996\u5148\u5217\u51FA\u8BF7\u6C42\u8BFB\u53D6\u548C\u5199\u5165\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\uFF0C\u7136\u540E\u662F\u8BF7\u6C42\u53EA\u8BFB\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\u3002
    2. \u4E0D\u9700\u8981\u7B7E\u540D\u7684\u8D26\u6237\u5730\u5740\uFF1A\u4E0E\u4E0A\u8FF0\u76F8\u540C\uFF0C\u9996\u5148\u5217\u51FA\u8BF7\u6C42\u8BFB\u53D6\u548C\u5199\u5165\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\uFF0C\u7136\u540E\u662F\u8BF7\u6C42\u53EA\u8BFB\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\u3002

    Compact array of account addresses

    \u7D27\u51D1\u6307\u4EE4\u6570\u7EC4

    \u5C31\u50CF\u8D26\u6237\u5730\u5740\u6570\u7EC4\u4E00\u6837\uFF0C\u8FD9\u4E2A\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4\u4EE5\u7D27\u51D1\u7684u16\u7F16\u7801\u7684\u6307\u4EE4\u6570\u91CF\u5F00\u59CB\uFF0C\u7136\u540E\u662F\u4E00\u4E2A\u6307\u4EE4\u6570\u7EC4\u3002\u6570\u7EC4\u4E2D\u7684\u6BCF\u4E2A\u6307\u4EE4\u5177\u6709\u4EE5\u4E0B\u7EC4\u4EF6\uFF1A

    1. \u7A0B\u5E8FID\uFF1A\u7528\u4E8E\u6807\u8BC6\u5C06\u5904\u7406\u8BE5\u6307\u4EE4\u7684\u94FE\u4E0A\u7A0B\u5E8F\u3002\u5B83\u8868\u793A\u4E3A\u6D88\u606F\u4E2D\u8D26\u6237\u5730\u5740\u7D27\u51D1\u6570\u7EC4\u7684\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    2. \u8D26\u6237\u5730\u5740\u7D22\u5F15\u7684\u7D27\u51D1\u6570\u7EC4\uFF1A\u6307\u5411\u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4\u4E2D\u9700\u8981\u7B7E\u540D\u7684\u4E00\u90E8\u5206\u8D26\u6237\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    3. \u4E0D\u900F\u660E\u7684u8\u6570\u636E\u7684\u7D27\u51D1\u6570\u7EC4\uFF1A\u4E00\u4E2A\u901A\u7528\u7684\u5B57\u8282\u6570\u7EC4\uFF0C\u4E0E\u524D\u9762\u63D0\u5230\u7684\u7A0B\u5E8FID\u76F8\u5173\u3002\u8BE5\u6570\u636E\u6570\u7EC4\u6307\u5B9A\u4E86\u7A0B\u5E8F\u5E94\u6267\u884C\u7684\u4EFB\u4F55\u64CD\u4F5C\u4EE5\u53CA\u8D26\u6237\u53EF\u80FD\u4E0D\u5305\u542B\u7684\u4EFB\u4F55\u9644\u52A0\u4FE1\u606F\u3002

    Compact array of Instructions

    \u4F20\u7EDF\u4EA4\u6613\u7684\u95EE\u9898

    \u4E0A\u8FF0\u4EA4\u6613\u6A21\u578B\u5B58\u5728\u7684\u95EE\u9898\u662F\u4EC0\u4E48?

    \u4EA4\u6613\u7684\u6700\u5927\u5927\u5C0F\u4EE5\u53CA\u56E0\u6B64\u80FD\u591F\u5728\u5355\u4E2A\u539F\u5B50\u4EA4\u6613\u4E2D\u5BB9\u7EB3\u7684\u8D26\u6237\u6570\u91CF\u3002

    \u5982\u524D\u6240\u8FF0\uFF0C\u4EA4\u6613\u7684\u6700\u5927\u5141\u8BB8\u5927\u5C0F\u4E3A1232\u5B57\u8282\u3002\u4E00\u4E2A\u8D26\u6237\u5730\u5740\u7684\u5927\u5C0F\u4E3A32\u5B57\u8282\u3002\u56E0\u6B64\uFF0C\u8003\u8651\u5230\u4E00\u4E9B\u7528\u4E8E\u5934\u90E8\u3001\u7B7E\u540D\u548C\u5176\u4ED6\u5143\u6570\u636E\u7684\u7A7A\u95F4\uFF0C\u4E00\u4E2A\u4EA4\u6613\u6700\u591A\u53EA\u80FD\u5B58\u50A835\u4E2A\u8D26\u6237\u3002

    Issue with legacy transactions

    \u8FD9\u662F\u4E00\u4E2A\u95EE\u9898\uFF0C\u56E0\u4E3A\u6709\u51E0\u79CD\u60C5\u51B5\u4E0B\uFF0C\u5F00\u53D1\u4EBA\u5458\u9700\u8981\u5728\u5355\u4E2A\u4EA4\u6613\u4E2D\u5305\u542B\u6570\u767E\u4E2A\u65E0\u9700\u7B7E\u540D\u7684\u8D26\u6237\u3002\u4F46\u662F\uFF0C\u4F20\u7EDF\u4EA4\u6613\u6A21\u578B\u76EE\u524D\u65E0\u6CD5\u5B9E\u73B0\u8FD9\u4E00\u70B9\u3002\u76EE\u524D\u4F7F\u7528\u7684\u89E3\u51B3\u65B9\u6848\u662F\u5728\u94FE\u4E0A\u4E34\u65F6\u5B58\u50A8\u72B6\u6001\uFF0C\u5E76\u5728\u7A0D\u540E\u7684\u4EA4\u6613\u4E2D\u4F7F\u7528\u3002\u4F46\u662F\uFF0C\u5F53\u591A\u4E2A\u7A0B\u5E8F\u9700\u8981\u7EC4\u5408\u5728\u5355\u4E2A\u4EA4\u6613\u4E2D\u65F6\uFF0C\u8FD9\u79CD\u89E3\u51B3\u65B9\u6CD5\u5C31\u4E0D\u9002\u7528\u4E86\u3002\u6BCF\u4E2A\u7A0B\u5E8F\u90FD\u9700\u8981\u591A\u4E2A\u8D26\u6237\u4F5C\u4E3A\u8F93\u5165\uFF0C\u56E0\u6B64\u6211\u4EEC\u9677\u5165\u4E86\u4E0E\u4E4B\u524D\u76F8\u540C\u7684\u95EE\u9898\u3002

    \u8FD9\u5C31\u662F\u5F15\u5165**\u5730\u5740\u67E5\u627E\u8868\uFF08Address Lookup Tables\uFF0CLUT\uFF09**\u7684\u539F\u56E0\u3002

    \u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)

    \u5730\u5740\u67E5\u627E\u8868\u7684\u7406\u5FF5\u662F\u5728\u94FE\u4E0A\u4F7F\u7528\u8868\u683C\uFF08\u6570\u7EC4\uFF09\u7684\u6570\u636E\u7ED3\u6784\u5B58\u50A8\u8D26\u6237\u5730\u5740\u3002\u4E00\u65E6\u8D26\u6237\u5B58\u50A8\u5728\u8BE5\u8868\u4E2D\uFF0C\u53EF\u4EE5\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8BE5\u8868\u7684\u5730\u5740\u3002\u4E3A\u4E86\u6307\u5411\u8868\u4E2D\u7684\u5355\u4E2A\u8D26\u6237\uFF0C\u9700\u8981\u4F7F\u7528\u4E00\u4E2A\u5B57\u8282\u7684u8\u7D22\u5F15\u3002

    LUTs

    \u8FD9\u6837\u505A\u53EF\u4EE5\u8282\u7701\u7A7A\u95F4\uFF0C\u56E0\u4E3A\u5730\u5740\u4E0D\u518D\u9700\u8981\u5B58\u50A8\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u3002\u5B83\u4EEC\u53EA\u9700\u8981\u4EE5\u6570\u7EC4\u5F62\u5F0F\u7684\u8868\u683C\u4E2D\u7684\u7D22\u5F15\u8FDB\u884C\u5F15\u7528\u3002\u8FD9\u4F7F\u5F97\u6709\u53EF\u80FD\u5F15\u7528256\u4E2A\u8D26\u6237\uFF0C\u56E0\u4E3A\u8D26\u6237\u4F7F\u7528u8\u7D22\u5F15\u8FDB\u884C\u5F15\u7528\u3002

    \u5F53\u521D\u59CB\u5316\u5730\u5740\u67E5\u627E\u8868\u6216\u5411\u8868\u4E2D\u6DFB\u52A0\u65B0\u5730\u5740\u65F6\uFF0C\u9700\u8981\u4F7F\u5730\u5740\u67E5\u627E\u8868\u514D\u9664\u79DF\u91D1\u3002\u5730\u5740\u53EF\u4EE5\u901A\u8FC7\u94FE\u4E0A\u7F13\u51B2\u533A\u6216\u76F4\u63A5\u901A\u8FC7Extension\u6307\u4EE4\u5C06\u5176\u8FFD\u52A0\u5230\u8868\u683C\u4E2D\u3002\u6B64\u5916\uFF0C\u5730\u5740\u67E5\u627E\u8868\u8FD8\u53EF\u4EE5\u5B58\u50A8\u76F8\u5173\u7684\u5143\u6570\u636E\uFF0C\u540E\u9762\u662F\u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u8D26\u6237\u3002\u4E0B\u9762\u662F\u4E00\u4E2A\u5178\u578B\u5730\u5740\u67E5\u627E\u8868\u7684\u7ED3\u6784\uFF1A

    LUT Format

    \u5730\u5740\u67E5\u627E\u8868\u7684\u4E00\u4E2A\u91CD\u8981\u7F3A\u70B9\u662F\uFF0C\u5728\u4EA4\u6613\u5904\u7406\u8FC7\u7A0B\u4E2D\uFF0C\u7531\u4E8E\u5730\u5740\u67E5\u627E\u9700\u8981\u989D\u5916\u7684\u5F00\u9500\uFF0C\u901A\u5E38\u4F1A\u5BFC\u81F4\u4EA4\u6613\u7684\u6210\u672C\u8F83\u9AD8\u3002

    \u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0

    \u4F20\u7EDF\u4EA4\u6613\u7684\u7ED3\u6784\u9700\u8981\u4FEE\u6539\u4EE5\u5305\u542B\u5730\u5740\u8868\u67E5\u627E\u3002\u8FD9\u4E9B\u66F4\u6539\u4E0D\u5E94\u7834\u574FSolana\u4E0A\u7684\u4EA4\u6613\u5904\u7406\uFF0C\u4E5F\u4E0D\u5E94\u5BF9\u88AB\u8C03\u7528\u7684\u7A0B\u5E8F\u7684\u683C\u5F0F\u4EA7\u751F\u4EFB\u4F55\u66F4\u6539\u3002

    \u4E3A\u4E86\u786E\u4FDD\u4E0A\u8FF0\u60C5\u51B5\uFF0C\u91CD\u8981\u7684\u662F\u660E\u786E\u6307\u51FA\u4EA4\u6613\u7C7B\u578B\uFF1Alegacy\uFF08\u4F20\u7EDF\uFF09\u6216versioned\uFF08\u7248\u672C\u5316\uFF09\u3002\u6211\u4EEC\u5982\u4F55\u5728\u4EA4\u6613\u4E2D\u5305\u542B\u8FD9\u4E9B\u4FE1\u606F\u5462\uFF1F

    \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u6D88\u606F\u5934\u90E8\u7684num_required_signatures\u5B57\u6BB5\u7684\u7B2C\u4E00\u4E2A\u5B57\u8282\u4E2D\u7559\u4E0B\u4E86\u4E00\u4E2A\u672A\u4F7F\u7528\u7684\u4E0A\u4F4D\u6BD4\u7279\u3002\u73B0\u5728\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u6BD4\u7279\u4F4D\u6765\u660E\u786E\u58F0\u660E\u6211\u4EEC\u7684\u4EA4\u6613\u7248\u672C\u3002

    pub enum VersionedMessage {
    +import{_ as o,r,o as p,c as l,a as s,b as e,F as c,e as t,d as a}from"./app.d411e3b3.js";var i="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",_="/assets/compat_array_of_account_addresses.7792e5c7.png",m="/assets/compact_array_of_ixs.6281d70b.png",g="/assets/issues_with_legacy_txs.5766db66.png",b="/assets/luts.96a8a310.png",k="/assets/lut_format.060d6be2.png",f="/assets/messagev0.c089b240.png",v="/assets/compact_array_of_luts.9175e491.png",y="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},w=t('

    \u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)

    Solana\u6700\u8FD1\u53D1\u5E03\u4E86\u7248\u672C\u5316\u4EA4\u6613\u3002\u63D0\u8BAE\u7684\u66F4\u6539\u5982\u4E0B\uFF1A

    1. \u5F15\u5165\u4E00\u4E2A\u65B0\u7684\u7A0B\u5E8F\uFF0C\u7528\u4E8E\u7BA1\u7406\u94FE\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    2. \u6DFB\u52A0\u4E00\u79CD\u65B0\u7684\u4EA4\u6613\u683C\u5F0F\uFF0C\u53EF\u4EE5\u5229\u7528\u94FE\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    \u7EFC\u8FF0

    \u4E8B\u5B9E\u8868

    -\u4F20\u7EDF\u4EA4\u6613\u5B58\u5728\u4E00\u4E2A\u4E3B\u8981\u95EE\u9898\uFF1A\u6700\u5927\u5141\u8BB8\u7684\u5927\u5C0F\u4E3A1232\u5B57\u8282\uFF0C\u56E0\u6B64\u539F\u5B50\u4EA4\u6613\u4E2D\u53EF\u4EE5\u5BB9\u7EB3\u7684\u8D26\u6237\u6570\u91CF\u4E3A35\u4E2A\u5730\u5740\u3002

    • \u5730\u5740\u67E5\u627E\u8868\uFF08LUTs\uFF09\uFF1A\u4E00\u65E6\u8D26\u6237\u5B58\u50A8\u5728\u8BE5\u8868\u4E2D\uFF0C\u53EF\u4EE5\u4F7F\u75281\u5B57\u8282\u7684u8\u7D22\u5F15\uFF0C\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8BE5\u8868\u7684\u5730\u5740\u3002
    • \u53EF\u4EE5\u4F7F\u7528solana/web3.js\u7684createLookupTable()\u6784\u5EFA\u4E00\u4E2A\u65B0\u7684\u67E5\u627E\u8868\uFF0C\u5E76\u786E\u5B9A\u5176\u5730\u5740\u3002
    • \u4E00\u65E6\u521B\u5EFA\u4E86LUT\uFF0C\u53EF\u4EE5\u8FDB\u884C\u6269\u5C55\uFF0C\u5373\u53EF\u4EE5\u5C06\u8D26\u6237\u8FFD\u52A0\u5230\u8868\u4E2D\u3002
    • \u7248\u672C\u5316\u4EA4\u6613\uFF1A\u9700\u8981\u4FEE\u6539\u4F20\u7EDF\u4EA4\u6613\u7684\u7ED3\u6784\u4EE5\u6574\u5408LUTs\u3002
    • \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u5934\u90E8\u7684\u7B2C\u4E00\u4E2A\u5B57\u8282\u4E2D\u4FDD\u7559\u4E86\u4E00\u4E2A\u672A\u4F7F\u7528\u7684\u6700\u9AD8\u4F4D\uFF0C\u53EF\u4EE5\u7528\u6765\u663E\u5F0F\u58F0\u660E\u4EA4\u6613\u7684\u7248\u672C\u3002

    \u6211\u4EEC\u5C06\u66F4\u8BE6\u7EC6\u5730\u8BA8\u8BBA\u4E0A\u8FF0\u5F15\u5165\u7684\u66F4\u6539\u4EE5\u53CA\u5B83\u4EEC\u5BF9\u5F00\u53D1\u4EBA\u5458\u7684\u610F\u4E49\u3002\u7136\u800C\uFF0C\u4E3A\u4E86\u66F4\u597D\u5730\u7406\u89E3\u8FD9\u4E9B\u66F4\u6539\uFF0C\u6211\u4EEC\u9996\u5148\u9700\u8981\u4E86\u89E3\u5E38\u89C4\uFF08\u6216\u4F20\u7EDF\uFF09\u4EA4\u6613\u7684\u7ED3\u6784\u3002

    \u4F20\u7EDF\u4EA4\u6613\uFF08Legacy Transactions\uFF09

    ',7),q=a("Solana\u7F51\u7EDC\u4F7F\u7528\u6700\u5927\u4E8B\u52A1\u5355\u5143\uFF08MTU\uFF09\u5927\u5C0F\u4E3A1280\u5B57\u8282\uFF0C\u9075\u5FAA"),T={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},V=a("IPv6 MTU"),L=a(" \u7684\u5927\u5C0F\u7EA6\u675F\uFF0C\u4EE5\u786E\u4FDD\u901F\u5EA6\u548C\u53EF\u9760\u6027\u3002\u8FD9\u6837\u7559\u4E0B\u4E861232\u5B57\u8282\u7684\u6570\u636E\u7A7A\u95F4\uFF0C\u7528\u4E8E\u5B58\u50A8\u5E8F\u5217\u5316\u7684\u4EA4\u6613\u7B49\u6570\u636E\u3002"),S=s("p",null,"\u4E00\u4E2A\u4EA4\u6613\u7531\u4EE5\u4E0B\u7EC4\u6210\uFF1A",-1),C=a("\u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u7B7E\u540D\uFF0C\u5176\u4E2D\u6BCF\u4E2A\u7B7E\u540D\u662F\u4E00\u4E2A64\u5B57\u8282\u7684"),A={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},U=a("ed25519"),j=a("\u7B7E\u540D\u3002"),B=s("li",null,"\u4E00\u4E2A\uFF08\u4F20\u7EDF\u7684\uFF09\u6D88\u606F\u3002",-1),I=s("p",null,[s("img",{src:i,alt:"Transaction Format"})],-1),M={class:"custom-container tip"},N=s("p",{class:"custom-container-title"},"Compact-Array format",-1),P=s("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),E={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},H=a("Compact-u16"),R=s("li",null,"Followed by each array item",-1),W=s("p",null,[s("img",{src:d,alt:"Compact array format"})],-1),D=t('

    \u4F20\u7EDF\u6D88\u606F

    \u4F20\u7EDF\u6D88\u606F\u5305\u542B\u4EE5\u4E0B\u7EC4\u4EF6\uFF1A

    1. \u4E00\u4E2A\u5934\u90E8\uFF08header\uFF09\u3002
    2. \u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u8D26\u6237\u5730\u5740\uFF0C\u6BCF\u4E2A\u8D26\u6237\u5730\u5740\u5360\u752832\u5B57\u8282\u3002
    3. \u4E00\u4E2A\u6700\u8FD1\u7684\u533A\u5757\u54C8\u5E0C\uFF08recent blockhash\uFF09\uFF1A
      • \u4E00\u4E2A32\u5B57\u8282\u7684SHA-256\u54C8\u5E0C\uFF0C\u7528\u4E8E\u6307\u793A\u4E0A\u6B21\u89C2\u5BDF\u5230\u7684\u8D26\u672C\u72B6\u6001\u3002\u5982\u679C\u4E00\u4E2A\u533A\u5757\u54C8\u5E0C\u592A\u65E7\uFF0C\u9A8C\u8BC1\u8282\u70B9\u5C06\u62D2\u7EDD\u5B83\u3002
    4. \u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u6307\u4EE4

    Legacy Message

    \u5934\u90E8

    \u6D88\u606F\u5934\u90E8\u662F3\u5B57\u8282\u957F\uFF0C\u5305\u542B3\u4E2Au8\u6574\u6570\uFF1A

    1. \u6240\u9700\u7B7E\u540D\u6570\u91CF\uFF1ASolana\u8FD0\u884C\u65F6\u4F1A\u5C06\u6B64\u6570\u5B57\u4E0E\u4EA4\u6613\u4E2D\u7D27\u51D1\u6570\u7EC4\u7B7E\u540D\u7684\u957F\u5EA6\u8FDB\u884C\u9A8C\u8BC1\u3002
    2. \u9700\u8981\u7B7E\u540D\u7684\u53EA\u8BFB\u8D26\u6237\u5730\u5740\u6570\u91CF\u3002
    3. \u4E0D\u9700\u8981\u7B7E\u540D\u7684\u53EA\u8BFB\u8D26\u6237\u5730\u5740\u6570\u91CF\u3002

    Message Header

    \u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4

    \u8FD9\u4E2A\u7D27\u51D1\u6570\u7EC4\u4EE5\u7D27\u51D1\u7684u16\u7F16\u7801\u7684\u8D26\u6237\u5730\u5740\u6570\u91CF\u5F00\u59CB\uFF0C\u7136\u540E\u662F\uFF1A

    1. \u9700\u8981\u7B7E\u540D\u7684\u8D26\u6237\u5730\u5740\uFF1A\u9996\u5148\u5217\u51FA\u8BF7\u6C42\u8BFB\u53D6\u548C\u5199\u5165\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\uFF0C\u7136\u540E\u662F\u8BF7\u6C42\u53EA\u8BFB\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\u3002
    2. \u4E0D\u9700\u8981\u7B7E\u540D\u7684\u8D26\u6237\u5730\u5740\uFF1A\u4E0E\u4E0A\u8FF0\u76F8\u540C\uFF0C\u9996\u5148\u5217\u51FA\u8BF7\u6C42\u8BFB\u53D6\u548C\u5199\u5165\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\uFF0C\u7136\u540E\u662F\u8BF7\u6C42\u53EA\u8BFB\u8BBF\u95EE\u6743\u9650\u7684\u5730\u5740\u3002

    Compact array of account addresses

    \u7D27\u51D1\u6307\u4EE4\u6570\u7EC4

    \u5C31\u50CF\u8D26\u6237\u5730\u5740\u6570\u7EC4\u4E00\u6837\uFF0C\u8FD9\u4E2A\u7D27\u51D1\u6307\u4EE4\u6570\u7EC4\u4EE5\u7D27\u51D1\u7684u16\u7F16\u7801\u7684\u6307\u4EE4\u6570\u91CF\u5F00\u59CB\uFF0C\u7136\u540E\u662F\u4E00\u4E2A\u6307\u4EE4\u6570\u7EC4\u3002\u6570\u7EC4\u4E2D\u7684\u6BCF\u4E2A\u6307\u4EE4\u5177\u6709\u4EE5\u4E0B\u7EC4\u4EF6\uFF1A

    1. \u7A0B\u5E8FID\uFF1A\u7528\u4E8E\u6807\u8BC6\u5C06\u5904\u7406\u8BE5\u6307\u4EE4\u7684\u94FE\u4E0A\u7A0B\u5E8F\u3002\u5B83\u8868\u793A\u4E3A\u6D88\u606F\u4E2D\u8D26\u6237\u5730\u5740\u7D27\u51D1\u6570\u7EC4\u7684\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    2. \u8D26\u6237\u5730\u5740\u7D22\u5F15\u7684\u7D27\u51D1\u6570\u7EC4\uFF1A\u6307\u5411\u7D27\u51D1\u8D26\u6237\u5730\u5740\u6570\u7EC4\u4E2D\u9700\u8981\u7B7E\u540D\u7684\u4E00\u90E8\u5206\u8D26\u6237\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    3. \u4E0D\u900F\u660E\u7684u8\u6570\u636E\u7684\u7D27\u51D1\u6570\u7EC4\uFF1A\u4E00\u4E2A\u901A\u7528\u7684\u5B57\u8282\u6570\u7EC4\uFF0C\u4E0E\u524D\u9762\u63D0\u5230\u7684\u7A0B\u5E8FID\u76F8\u5173\u3002\u8BE5\u6570\u636E\u6570\u7EC4\u6307\u5B9A\u4E86\u7A0B\u5E8F\u5E94\u6267\u884C\u7684\u4EFB\u4F55\u64CD\u4F5C\u4EE5\u53CA\u8D26\u6237\u53EF\u80FD\u4E0D\u5305\u542B\u7684\u4EFB\u4F55\u9644\u52A0\u4FE1\u606F\u3002

    Compact array of Instructions

    \u4F20\u7EDF\u4EA4\u6613\u7684\u95EE\u9898

    \u4E0A\u8FF0\u4EA4\u6613\u6A21\u578B\u5B58\u5728\u7684\u95EE\u9898\u662F\u4EC0\u4E48?

    \u4EA4\u6613\u7684\u6700\u5927\u5927\u5C0F\u4EE5\u53CA\u56E0\u6B64\u80FD\u591F\u5728\u5355\u4E2A\u539F\u5B50\u4EA4\u6613\u4E2D\u5BB9\u7EB3\u7684\u8D26\u6237\u6570\u91CF\u3002

    \u5982\u524D\u6240\u8FF0\uFF0C\u4EA4\u6613\u7684\u6700\u5927\u5141\u8BB8\u5927\u5C0F\u4E3A1232\u5B57\u8282\u3002\u4E00\u4E2A\u8D26\u6237\u5730\u5740\u7684\u5927\u5C0F\u4E3A32\u5B57\u8282\u3002\u56E0\u6B64\uFF0C\u8003\u8651\u5230\u4E00\u4E9B\u7528\u4E8E\u5934\u90E8\u3001\u7B7E\u540D\u548C\u5176\u4ED6\u5143\u6570\u636E\u7684\u7A7A\u95F4\uFF0C\u4E00\u4E2A\u4EA4\u6613\u6700\u591A\u53EA\u80FD\u5B58\u50A835\u4E2A\u8D26\u6237\u3002

    Issue with legacy transactions

    \u8FD9\u662F\u4E00\u4E2A\u95EE\u9898\uFF0C\u56E0\u4E3A\u6709\u51E0\u79CD\u60C5\u51B5\u4E0B\uFF0C\u5F00\u53D1\u4EBA\u5458\u9700\u8981\u5728\u5355\u4E2A\u4EA4\u6613\u4E2D\u5305\u542B\u6570\u767E\u4E2A\u65E0\u9700\u7B7E\u540D\u7684\u8D26\u6237\u3002\u4F46\u662F\uFF0C\u4F20\u7EDF\u4EA4\u6613\u6A21\u578B\u76EE\u524D\u65E0\u6CD5\u5B9E\u73B0\u8FD9\u4E00\u70B9\u3002\u76EE\u524D\u4F7F\u7528\u7684\u89E3\u51B3\u65B9\u6848\u662F\u5728\u94FE\u4E0A\u4E34\u65F6\u5B58\u50A8\u72B6\u6001\uFF0C\u5E76\u5728\u7A0D\u540E\u7684\u4EA4\u6613\u4E2D\u4F7F\u7528\u3002\u4F46\u662F\uFF0C\u5F53\u591A\u4E2A\u7A0B\u5E8F\u9700\u8981\u7EC4\u5408\u5728\u5355\u4E2A\u4EA4\u6613\u4E2D\u65F6\uFF0C\u8FD9\u79CD\u89E3\u51B3\u65B9\u6CD5\u5C31\u4E0D\u9002\u7528\u4E86\u3002\u6BCF\u4E2A\u7A0B\u5E8F\u90FD\u9700\u8981\u591A\u4E2A\u8D26\u6237\u4F5C\u4E3A\u8F93\u5165\uFF0C\u56E0\u6B64\u6211\u4EEC\u9677\u5165\u4E86\u4E0E\u4E4B\u524D\u76F8\u540C\u7684\u95EE\u9898\u3002

    \u8FD9\u5C31\u662F\u5F15\u5165**\u5730\u5740\u67E5\u627E\u8868\uFF08Address Lookup Tables\uFF0CLUT\uFF09**\u7684\u539F\u56E0\u3002

    \u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)

    \u5730\u5740\u67E5\u627E\u8868\u7684\u7406\u5FF5\u662F\u5728\u94FE\u4E0A\u4F7F\u7528\u8868\u683C\uFF08\u6570\u7EC4\uFF09\u7684\u6570\u636E\u7ED3\u6784\u5B58\u50A8\u8D26\u6237\u5730\u5740\u3002\u4E00\u65E6\u8D26\u6237\u5B58\u50A8\u5728\u8BE5\u8868\u4E2D\uFF0C\u53EF\u4EE5\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8BE5\u8868\u7684\u5730\u5740\u3002\u4E3A\u4E86\u6307\u5411\u8868\u4E2D\u7684\u5355\u4E2A\u8D26\u6237\uFF0C\u9700\u8981\u4F7F\u7528\u4E00\u4E2A\u5B57\u8282\u7684u8\u7D22\u5F15\u3002

    LUTs

    \u8FD9\u6837\u505A\u53EF\u4EE5\u8282\u7701\u7A7A\u95F4\uFF0C\u56E0\u4E3A\u5730\u5740\u4E0D\u518D\u9700\u8981\u5B58\u50A8\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u3002\u5B83\u4EEC\u53EA\u9700\u8981\u4EE5\u6570\u7EC4\u5F62\u5F0F\u7684\u8868\u683C\u4E2D\u7684\u7D22\u5F15\u8FDB\u884C\u5F15\u7528\u3002\u8FD9\u4F7F\u5F97\u6709\u53EF\u80FD\u5F15\u7528256\u4E2A\u8D26\u6237\uFF0C\u56E0\u4E3A\u8D26\u6237\u4F7F\u7528u8\u7D22\u5F15\u8FDB\u884C\u5F15\u7528\u3002

    \u5F53\u521D\u59CB\u5316\u5730\u5740\u67E5\u627E\u8868\u6216\u5411\u8868\u4E2D\u6DFB\u52A0\u65B0\u5730\u5740\u65F6\uFF0C\u9700\u8981\u4F7F\u5730\u5740\u67E5\u627E\u8868\u514D\u9664\u79DF\u91D1\u3002\u5730\u5740\u53EF\u4EE5\u901A\u8FC7\u94FE\u4E0A\u7F13\u51B2\u533A\u6216\u76F4\u63A5\u901A\u8FC7Extension\u6307\u4EE4\u5C06\u5176\u8FFD\u52A0\u5230\u8868\u683C\u4E2D\u3002\u6B64\u5916\uFF0C\u5730\u5740\u67E5\u627E\u8868\u8FD8\u53EF\u4EE5\u5B58\u50A8\u76F8\u5173\u7684\u5143\u6570\u636E\uFF0C\u540E\u9762\u662F\u4E00\u4E2A\u7D27\u51D1\u6570\u7EC4\u7684\u8D26\u6237\u3002\u4E0B\u9762\u662F\u4E00\u4E2A\u5178\u578B\u5730\u5740\u67E5\u627E\u8868\u7684\u7ED3\u6784\uFF1A

    LUT Format

    \u5730\u5740\u67E5\u627E\u8868\u7684\u4E00\u4E2A\u91CD\u8981\u7F3A\u70B9\u662F\uFF0C\u5728\u4EA4\u6613\u5904\u7406\u8FC7\u7A0B\u4E2D\uFF0C\u7531\u4E8E\u5730\u5740\u67E5\u627E\u9700\u8981\u989D\u5916\u7684\u5F00\u9500\uFF0C\u901A\u5E38\u4F1A\u5BFC\u81F4\u4EA4\u6613\u7684\u6210\u672C\u8F83\u9AD8\u3002

    \u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0

    \u4F20\u7EDF\u4EA4\u6613\u7684\u7ED3\u6784\u9700\u8981\u4FEE\u6539\u4EE5\u5305\u542B\u5730\u5740\u8868\u67E5\u627E\u3002\u8FD9\u4E9B\u66F4\u6539\u4E0D\u5E94\u7834\u574FSolana\u4E0A\u7684\u4EA4\u6613\u5904\u7406\uFF0C\u4E5F\u4E0D\u5E94\u5BF9\u88AB\u8C03\u7528\u7684\u7A0B\u5E8F\u7684\u683C\u5F0F\u4EA7\u751F\u4EFB\u4F55\u66F4\u6539\u3002

    \u4E3A\u4E86\u786E\u4FDD\u4E0A\u8FF0\u60C5\u51B5\uFF0C\u91CD\u8981\u7684\u662F\u660E\u786E\u6307\u51FA\u4EA4\u6613\u7C7B\u578B\uFF1Alegacy\uFF08\u4F20\u7EDF\uFF09\u6216versioned\uFF08\u7248\u672C\u5316\uFF09\u3002\u6211\u4EEC\u5982\u4F55\u5728\u4EA4\u6613\u4E2D\u5305\u542B\u8FD9\u4E9B\u4FE1\u606F\u5462\uFF1F

    \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u6D88\u606F\u5934\u90E8\u7684num_required_signatures\u5B57\u6BB5\u7684\u7B2C\u4E00\u4E2A\u5B57\u8282\u4E2D\u7559\u4E0B\u4E86\u4E00\u4E2A\u672A\u4F7F\u7528\u7684\u4E0A\u4F4D\u6BD4\u7279\u3002\u73B0\u5728\uFF0C\u6211\u4EEC\u53EF\u4EE5\u4F7F\u7528\u8FD9\u4E2A\u6BD4\u7279\u4F4D\u6765\u660E\u786E\u58F0\u660E\u6211\u4EEC\u7684\u4EA4\u6613\u7248\u672C\u3002

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.1e1e264b.js b/docs/.vuepress/dist/assets/versioned-transactions.html.19d40b0d.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.1e1e264b.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.19d40b0d.js
    index 57cff0e2b..77f130824 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.1e1e264b.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.19d40b0d.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r,o as i,c,a as e,b as n,F as l,e as t,d as a}from"./app.07ce7a66.js";var d="/assets/tx_format.1023848a.png",p="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",m="/assets/compat_array_of_account_addresses.7792e5c7.png",g="/assets/compact_array_of_ixs.6281d70b.png",b="/assets/issues_with_legacy_txs.5766db66.png",f="/assets/luts.96a8a310.png",y="/assets/lut_format.060d6be2.png",_="/assets/messagev0.c089b240.png",k="/assets/compact_array_of_luts.9175e491.png",w="/assets/new_compact_array_of_ixs.54090dc5.png";const v={},T=t('

    Versioned Transactions

    Solana recently released Versioned Transactions. The proposed changes are as follows:

    1. Introduce a new program which manages on-chain address lookup tables

    2. Add a new transaction format which can make use of on-chain address lookup tables

    Facts

    Fact Sheet

    • Legacy transactions have a major issue: Maximum allowed size of 1232 bytes, and hence the number of accounts that can fit in an atomic transaction: 35 addresses.
    • Address Lookup Tables (LUTs): Once accounts are stored in this table, the address of the table can be referenced in a transaction message using 1-byte u8 indices.
    • solana/web3.js's createLookupTable() can be used to construct a new lookup table, as well as determine its address.
    • Once an LUT is created, it can be extended, ie., accounts can be appended to the table.
    • Versioned Transactions: The structure of legacy transaction needs to be modified to incorporate LUTs
    • Before versioning was introduced, txs left an unused upper bit in the first byte of their headers, which can be used to explicitly declare the version of txs

    We'll talk more about the above introduced changes and what they mean for developers. To understand the changes better, however, we need to first understand the anatomy of a regular (or legacy) transaction.

    Legacy Transaction

    ',7),x=a("The Solana network uses a maximum transactional unit (MTU) size of 1280 bytes, adherent to the "),q={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},A=a("IPv6 MTU"),L=a(" size constraints to ensure speed and reliability. This leaves "),V=e("strong",null,"1232 bytes",-1),C=a(" for packet data like serialised transactions."),S=e("p",null,"A transaction is comprised of:",-1),U=a("A compact array of signatures, where each signature is a 64 byte "),I={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},M=a("ed25519"),j=a("."),W=e("li",null,"A (legacy) message",-1),B=e("p",null,[e("img",{src:d,alt:"Transaction Format"})],-1),H={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Compact-Array format",-1),R=e("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),N={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},E=a("Compact-u16"),z=e("li",null,"Followed by each array item",-1),O=e("p",null,[e("img",{src:p,alt:"Compact array format"})],-1),D=t('

    Legacy Message

    A Legacy Message has the following components:

    1. A header
    2. A compact-array of account addresses, where each account address takes 32 bytes
    3. A recent blockhash
    • a 32-byte SHA-256 hash used to indicate when ledger was last observed. If a blockhash is too old, validators reject it.
    1. A compact-array of Instructions

    Legacy Message

    The message header is 3 bytes in length and contains 3 u8 integers:

    1. The number of required signatures: the Solana runtime verifies this number with the length of the compact array of signatures in the transaction.
    2. The number of read-only account addresses that require signatures.
    3. The number of read-only account addresses that do not require signatures.

    Message Header

    Compact-array of account addresses

    This compact array starts with a compact-u16 encoding of the number of account addresses, followed by:

    1. Account addresses that require signatures: The addresses that request read and write access are listed first, followed by the ones that request for read-only access
    2. Account addresses that do not require signatures: Same as above, the addresses that request read and write access are listed first, followed by the ones that request for read-only access

    Compact array of account addresses

    Compact array of instructions

    Much like the array of account addresses, this compact array starts with a compact-u16 encoding of the number of instructions, followed by an array of instructions. Each instruction in the array has the following components:

    1. Program ID: identifies an on-chain program that will process the instruction. This is represented as a u8 index to an address in the compact array of account addresses inside the message.
    2. Compact array of account address indexes: u8 indexes to a subset of account addresses in the compact array of account addresses, that require signatures.
    3. Compact array of opaque u8 data: a general purpose byte array that is specific to the program ID mentioned before. This array of data specifies any operations that the program should perform and any additional information that the accounts might not contain.

    Compact array of Instructions

    Issues with Legacy Transactions

    What is the issue with the above Transaction model?

    The max size of a transaction, and hence the number of accounts that can fit in a single atomic transaction.

    As discussed earlier, the maximum allowed size of a transaction is 1232 bytes. The size of an account address is 32 bytes. Thus, a transaction can at the very best store 35 accounts, taking into account some space for headers, signatures and other metadata.

    Issue with legacy transactions

    This is problematic as there are several cases where developers need to include 100s of signature-free accounts in a single transaction. This is currently not possible with the legacy transaction model. The solution currently being used is to temporarily store state on-chain and consume it later in transactions. This workaround does not work when multiple programs need to be composed in a single transaction. Each program requires multiple accounts as input and hence we fall into the same problem as before.

    This is where Address Lookup Tables (LUT) are introduced.

    Address Lookup Tables (LUT)

    The idea behind Address Lookup Tables is to store account addresses in a table-like (array) data structure on-chain. Once accounts are stored in this table, the address of the table can be referenced in a transaction message. To point to an individual account within the table, a 1-byte u8 index is needed.

    LUTs

    This opens up space as addresses need not be stored inside the transaction message anymore. They only need to be referenced in the form of an index within the array like table. This leads to a possibility of referencing 2^8=256 accounts, as accounts are referenced using a u8 index.

    LUTs need to be rent-exempt when initialised or whenever a new address is added to the table. Addresses can be added to this table either by an on-chain buffer, or by directly appending them to the table through the Extension instruction. Furthermore, LUTs can store associated metadata followed by a compact-array of accounts. Below you can see the structure of a typical Address Lookup Table.

    LUT Format

    One important pitfall of LUTs is that since address lookups require extra overhead during transaction processing, they usually incur higher costs for a transaction.

    Versioned Transactions: TransactionV0

    The structure of legacy transaction needs to be modified to incorporate address table lookups. These changes should not break transaction processing on Solana, nor should they indicate any format changes to the invoked programs.

    To ensure the above, it is important to explicitly mention the transaction type: legacy or versioned. How do we include this information in a transaction?

    Before versioning was introduced, transactions left an unused upper bit in the first byte of their message headers: num_required_signatures. We can now use this bit to explicitly declare the version of our transactions.

    pub enum VersionedMessage {
    +import{_ as o,r,o as i,c,a as e,b as n,F as l,e as t,d as a}from"./app.d411e3b3.js";var d="/assets/tx_format.1023848a.png",p="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",m="/assets/compat_array_of_account_addresses.7792e5c7.png",g="/assets/compact_array_of_ixs.6281d70b.png",b="/assets/issues_with_legacy_txs.5766db66.png",f="/assets/luts.96a8a310.png",y="/assets/lut_format.060d6be2.png",_="/assets/messagev0.c089b240.png",k="/assets/compact_array_of_luts.9175e491.png",w="/assets/new_compact_array_of_ixs.54090dc5.png";const v={},T=t('

    Versioned Transactions

    Solana recently released Versioned Transactions. The proposed changes are as follows:

    1. Introduce a new program which manages on-chain address lookup tables

    2. Add a new transaction format which can make use of on-chain address lookup tables

    Facts

    Fact Sheet

    • Legacy transactions have a major issue: Maximum allowed size of 1232 bytes, and hence the number of accounts that can fit in an atomic transaction: 35 addresses.
    • Address Lookup Tables (LUTs): Once accounts are stored in this table, the address of the table can be referenced in a transaction message using 1-byte u8 indices.
    • solana/web3.js's createLookupTable() can be used to construct a new lookup table, as well as determine its address.
    • Once an LUT is created, it can be extended, ie., accounts can be appended to the table.
    • Versioned Transactions: The structure of legacy transaction needs to be modified to incorporate LUTs
    • Before versioning was introduced, txs left an unused upper bit in the first byte of their headers, which can be used to explicitly declare the version of txs

    We'll talk more about the above introduced changes and what they mean for developers. To understand the changes better, however, we need to first understand the anatomy of a regular (or legacy) transaction.

    Legacy Transaction

    ',7),x=a("The Solana network uses a maximum transactional unit (MTU) size of 1280 bytes, adherent to the "),q={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},A=a("IPv6 MTU"),L=a(" size constraints to ensure speed and reliability. This leaves "),V=e("strong",null,"1232 bytes",-1),C=a(" for packet data like serialised transactions."),S=e("p",null,"A transaction is comprised of:",-1),U=a("A compact array of signatures, where each signature is a 64 byte "),I={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},M=a("ed25519"),j=a("."),W=e("li",null,"A (legacy) message",-1),B=e("p",null,[e("img",{src:d,alt:"Transaction Format"})],-1),H={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Compact-Array format",-1),R=e("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),N={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},E=a("Compact-u16"),z=e("li",null,"Followed by each array item",-1),O=e("p",null,[e("img",{src:p,alt:"Compact array format"})],-1),D=t('

    Legacy Message

    A Legacy Message has the following components:

    1. A header
    2. A compact-array of account addresses, where each account address takes 32 bytes
    3. A recent blockhash
    • a 32-byte SHA-256 hash used to indicate when ledger was last observed. If a blockhash is too old, validators reject it.
    1. A compact-array of Instructions

    Legacy Message

    The message header is 3 bytes in length and contains 3 u8 integers:

    1. The number of required signatures: the Solana runtime verifies this number with the length of the compact array of signatures in the transaction.
    2. The number of read-only account addresses that require signatures.
    3. The number of read-only account addresses that do not require signatures.

    Message Header

    Compact-array of account addresses

    This compact array starts with a compact-u16 encoding of the number of account addresses, followed by:

    1. Account addresses that require signatures: The addresses that request read and write access are listed first, followed by the ones that request for read-only access
    2. Account addresses that do not require signatures: Same as above, the addresses that request read and write access are listed first, followed by the ones that request for read-only access

    Compact array of account addresses

    Compact array of instructions

    Much like the array of account addresses, this compact array starts with a compact-u16 encoding of the number of instructions, followed by an array of instructions. Each instruction in the array has the following components:

    1. Program ID: identifies an on-chain program that will process the instruction. This is represented as a u8 index to an address in the compact array of account addresses inside the message.
    2. Compact array of account address indexes: u8 indexes to a subset of account addresses in the compact array of account addresses, that require signatures.
    3. Compact array of opaque u8 data: a general purpose byte array that is specific to the program ID mentioned before. This array of data specifies any operations that the program should perform and any additional information that the accounts might not contain.

    Compact array of Instructions

    Issues with Legacy Transactions

    What is the issue with the above Transaction model?

    The max size of a transaction, and hence the number of accounts that can fit in a single atomic transaction.

    As discussed earlier, the maximum allowed size of a transaction is 1232 bytes. The size of an account address is 32 bytes. Thus, a transaction can at the very best store 35 accounts, taking into account some space for headers, signatures and other metadata.

    Issue with legacy transactions

    This is problematic as there are several cases where developers need to include 100s of signature-free accounts in a single transaction. This is currently not possible with the legacy transaction model. The solution currently being used is to temporarily store state on-chain and consume it later in transactions. This workaround does not work when multiple programs need to be composed in a single transaction. Each program requires multiple accounts as input and hence we fall into the same problem as before.

    This is where Address Lookup Tables (LUT) are introduced.

    Address Lookup Tables (LUT)

    The idea behind Address Lookup Tables is to store account addresses in a table-like (array) data structure on-chain. Once accounts are stored in this table, the address of the table can be referenced in a transaction message. To point to an individual account within the table, a 1-byte u8 index is needed.

    LUTs

    This opens up space as addresses need not be stored inside the transaction message anymore. They only need to be referenced in the form of an index within the array like table. This leads to a possibility of referencing 2^8=256 accounts, as accounts are referenced using a u8 index.

    LUTs need to be rent-exempt when initialised or whenever a new address is added to the table. Addresses can be added to this table either by an on-chain buffer, or by directly appending them to the table through the Extension instruction. Furthermore, LUTs can store associated metadata followed by a compact-array of accounts. Below you can see the structure of a typical Address Lookup Table.

    LUT Format

    One important pitfall of LUTs is that since address lookups require extra overhead during transaction processing, they usually incur higher costs for a transaction.

    Versioned Transactions: TransactionV0

    The structure of legacy transaction needs to be modified to incorporate address table lookups. These changes should not break transaction processing on Solana, nor should they indicate any format changes to the invoked programs.

    To ensure the above, it is important to explicitly mention the transaction type: legacy or versioned. How do we include this information in a transaction?

    Before versioning was introduced, transactions left an unused upper bit in the first byte of their message headers: num_required_signatures. We can now use this bit to explicitly declare the version of our transactions.

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.7972f188.js b/docs/.vuepress/dist/assets/versioned-transactions.html.2c16ab97.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.7972f188.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.2c16ab97.js
    index 3870b2f45..7a5daee79 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.7972f188.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.2c16ab97.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r as e,o as i,c as r,a,b as t,F as l,e as g,d as n}from"./app.07ce7a66.js";var p="/assets/tx_format.1023848a.png",c="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",d="/assets/message_header.8eb7d589.png",m="/assets/compat_array_of_account_addresses.7792e5c7.png",h="/assets/compact_array_of_ixs.6281d70b.png",y="/assets/issues_with_legacy_txs.5766db66.png",k="/assets/luts.96a8a310.png",b="/assets/lut_format.060d6be2.png",_="/assets/messagev0.c089b240.png",f="/assets/compact_array_of_luts.9175e491.png",x="/assets/new_compact_array_of_ixs.54090dc5.png";const w={},v=g('

    Mga Bersyon na Transaksyon

    Inilabas kamakailan ni Solana ang Mga Bersyon na Transaksyon. Ang mga iminungkahing pagbabago ay ang mga sumusunod:

    1. Magpakilala ng bagong programa na namamahala sa mga talahanayan ng paghahanap ng on-chain na address

    2. Magdagdag ng bagong format ng transaksyon na maaaring gumamit ng on-chain na mga talahanayan ng paghahanap ng address

    Facts

    Fact Sheet

    • May malaking isyu ang mga legacy na transaksyon: Maximum na pinapayagang laki na 1232 bytes, at samakatuwid ang bilang ng mga account na maaaring magkasya sa isang atomic na transaksyon: 35 na address.
    • Address Lookup Tables (LUTs): Kapag naimbak na ang mga account sa talahanayang ito, ang address ng talahanayan ay maaaring i-reference sa isang mensahe ng transaksyon gamit ang 1-byte u8 na mga indeks.
    • Maaaring gamitin ang solana/web3.js na createLookupTable() upang bumuo ng bagong lookup table, pati na rin matukoy ang address nito.
    • Kapag nalikha ang isang LUT, maaari itong palawigin, ibig sabihin, ang mga account ay maaaring idagdag sa talahanayan.
    • Mga Bersyon na Transaksyon: Ang istraktura ng legacy na transaksyon ay kailangang baguhin upang maisama ang mga LUT
    • Bago ipinakilala ang bersyon, nag-iwan ng hindi nagamit na upper bit ang mga tx sa unang byte ng kanilang mga header, na maaaring magamit upang tahasang ideklara ang bersyon ng txs

    Pag-uusapan pa natin ang tungkol sa mga ipinakilalang pagbabago sa itaas at kung ano ang ibig sabihin ng mga ito para sa mga developer. Upang mas maunawaan ang mga pagbabago, gayunpaman, kailangan muna nating maunawaan ang anatomy ng isang regular (o legacy) na transaksyon.

    Legacy na Transaksyon

    ',7),T=n("Gumagamit ang Solana network ng maximum transactional unit (MTU) na laki na 1280 bytes, na sumusunod sa mga hadlang sa laki ng "),A={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},q=n("IPv6 MTU"),M=n(" upang matiyak ang bilis at pagiging maaasahan. Nag-iiwan ito ng "),L=a("strong",null,"1232 bytes",-1),C=n(" para sa packet data tulad ng mga serialized na transaksyon."),I=a("p",null,"Ang isang transaksyon ay binubuo ng:",-1),V=n("Isang compact na hanay ng mga lagda, kung saan ang bawat lagda ay isang 64 byte "),U={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},S=n("ed25519"),B=n("."),K=a("li",null,"Isang (legacy) na mensahe",-1),N=a("p",null,[a("img",{src:p,alt:"Transaction Format"})],-1),P={class:"custom-container tip"},j=a("p",{class:"custom-container-title"},"Compact-Array format",-1),H=a("p",null,"Ang isang compact array ay isang array na naka-serialize upang magkaroon ng mga sumusunod na bahagi:",-1),R=n("Isang haba ng array sa isang multi-byte na encoding na tinatawag na "),F={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},D=n("Compact-u16"),E=a("li",null,"Sinusundan ng bawat array item",-1),G=a("p",null,[a("img",{src:c,alt:"Compact array format"})],-1),W=g('

    Legacy Message

    Ang isang Legacy na Mensahe ay may mga sumusunod na bahagi:

    1. Isang header
    2. Isang compact-array ng mga address ng account, kung saan ang bawat address ng account ay tumatagal ng 32 byte
    3. Isang kamakailang blockhash
      • isang 32-byte na SHA-256 hash na ginamit upang ipahiwatig kung kailan huling naobserbahan ang ledger. Kung ang isang blockhash ay masyadong luma, tinatanggihan ito ng mga validator.
    4. Isang compact-array ng Mga Instruction

    Legacy Message

    Ang header ng mensahe ay 3 byte ang haba at naglalaman ng 3 u8 integer:

    1. Ang bilang ng mga kinakailangang lagda: ang Solana runtime ay nagpapatunay sa numerong ito sa haba ng compact array ng mga lagda sa transaksyon.
    2. Ang bilang ng mga read-only na address ng account na nangangailangan ng mga lagda.
    3. Ang bilang ng mga read-only na address ng account na hindi nangangailangan ng mga lagda.

    Message Header

    Compact-array ng mga address ng account

    Nagsisimula ang compact array na ito sa isang compact-u16 encoding ng bilang ng mga address ng account, na sinusundan ng:

    1. Mga address ng account na nangangailangan ng mga lagda: Ang mga address na humihiling ng read at write access ay unang nakalista, na sinusundan ng mga address na humihiling ng read-only na access
    2. Mga address ng account na hindi nangangailangan ng mga lagda: Katulad ng nasa itaas, unang nakalista ang mga address na humihiling ng read at write access, na sinusundan ng mga humihiling ng read-only na access

    Compact array of account addresses

    Compact na hanay ng mga instruction

    Katulad ng hanay ng mga address ng account, ang compact array na ito ay nagsisimula sa isang compact-u16 encoding ng bilang ng mga instruction, na sinusundan ng hanay ng mga instruction. Ang bawat pagtuturo sa array ay may mga sumusunod na bahagi:

    1. Program ID: kinikilala ang isang on-chain program na magpoproseso ng pagtuturo. Ito ay kinakatawan bilang u8 index sa isang address sa compact na hanay ng mga address ng account sa loob ng mensahe.
    2. Compact na hanay ng mga index ng address ng account: Ang u8 ay nag-i-index sa isang subset ng mga address ng account sa compact na hanay ng mga address ng account, na nangangailangan ng mga lagda.
    3. Compact array ng opaque u8 data: isang general purpose byte array na partikular sa program ID na nabanggit dati. Ang hanay ng data na ito ay tumutukoy sa anumang mga operasyon na dapat gawin ng program at anumang karagdagang impormasyon na maaaring hindi naglalaman ng mga account.

    Compact array of Instructions

    Mga Isyu sa Mga Legacy na Transaksyon

    Ano ang isyu sa modelo ng Transaksyon sa itaas?

    Ang maximum na laki ng isang transaksyon, at samakatuwid ang bilang ng mga account na maaaring magkasya sa isang atomic na transaksyon.

    Gaya ng tinalakay kanina, ang maximum na pinapayagang laki ng isang transaksyon ay 1232 bytes. Ang laki ng isang account address ay 32 bytes. Kaya, ang isang transaksyon ay maaaring mag-imbak ng 35 account sa pinakamagandang tindahan, na isinasaalang-alang ang ilang espasyo para sa mga header, lagda at iba pang metadata.

    Issue with legacy transactions

    Ito ay may problema dahil may ilang mga kaso kung saan ang mga developer ay kailangang magsama ng 100s ng signature-free account sa isang transaksyon. Kasalukuyang hindi ito posible sa legacy na modelo ng transaksyon. Ang solusyon na kasalukuyang ginagamit ay pansamantalang mag-imbak ng estado on-chain at gamitin ito sa ibang pagkakataon sa mga transaksyon. Hindi gumagana ang workaround na ito kapag maraming program ang kailangang buuin sa isang transaksyon. Ang bawat programa ay nangangailangan ng maramihang mga account bilang input at samakatuwid ay nahuhulog tayo sa parehong problema tulad ng dati.

    Dito ipinakilala ang Address Lookup Tables (LUT).

    Address Lookup Tables (LUT)

    Ang ideya sa likod ng Address Lookup Tables ay ang pag-imbak ng mga address ng account sa isang tulad ng talahanayan (array) na istraktura ng data na on-chain. Kapag naimbak na ang mga account sa talahanayang ito, maaaring i-reference ang address ng talahanayan sa isang mensahe ng transaksyon. Upang tumuro sa isang indibidwal na account sa loob ng talahanayan, kailangan ng 1-byte na u8 index.

    LUTs

    Nagbubukas ito ng espasyo dahil hindi na kailangang itago ang mga address sa loob ng mensahe ng transaksyon. Kailangan lamang na i-reference ang mga ito sa anyo ng isang index sa loob ng array tulad ng talahanayan. Ito ay humahantong sa posibilidad ng pagtukoy sa 2^8=256 na account, dahil ang mga account ay nire-reference gamit ang u8 index.

    Kailangang maging rent-exempt ang mga LUT kapag nasimulan o kapag may idinagdag na bagong address sa talahanayan. Maaaring idagdag ang mga address sa talahanayang ito sa pamamagitan ng isang on-chain buffer, o sa pamamagitan ng direktang pagdaragdag sa mga ito sa talahanayan sa pamamagitan ng pagtuturo ng Extension. Higit pa rito, maaaring mag-imbak ang mga LUT ng nauugnay na metadata na sinusundan ng isang compact-array ng mga account. Sa ibaba makikita mo ang istraktura ng isang tipikal na Address Lookup Table.

    LUT Format

    Ang isang mahalagang patibong ng mga LUT ay dahil ang mga paghahanap ng address ay nangangailangan ng dagdag na overhead sa panahon ng pagproseso ng transaksyon, kadalasang nagkakaroon sila ng mas mataas na gastos para sa isang transaksyon.

    Mga Bersyon na Transaksyon: TransaksyonV0

    Kailangang baguhin ang istruktura ng legacy na transaksyon upang maisama ang mga paghahanap sa talahanayan ng address. Hindi dapat masira ng mga pagbabagong ito ang pagpoproseso ng transaksyon sa Solana, at hindi rin dapat magpahiwatig ang mga ito ng anumang mga pagbabago sa format sa mga ini-invoke na programa.

    Upang matiyak ang nasa itaas, mahalagang tahasang banggitin ang uri ng transaksyon: legacy o versioned. Paano namin isasama ang impormasyong ito sa isang transaksyon?

    Bago ipinakilala ang bersyon, ang mga transaksyon ay nag-iwan ng hindi nagamit na upper bit sa unang byte ng kanilang mga header ng mensahe: num_required_signatures. Magagamit na namin ngayon ang bit na ito para tahasang ideklara ang bersyon ng aming mga transaksyon.

    pub enum VersionedMessage {
    +import{_ as o,r as e,o as i,c as r,a,b as t,F as l,e as g,d as n}from"./app.d411e3b3.js";var p="/assets/tx_format.1023848a.png",c="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",d="/assets/message_header.8eb7d589.png",m="/assets/compat_array_of_account_addresses.7792e5c7.png",h="/assets/compact_array_of_ixs.6281d70b.png",y="/assets/issues_with_legacy_txs.5766db66.png",k="/assets/luts.96a8a310.png",b="/assets/lut_format.060d6be2.png",_="/assets/messagev0.c089b240.png",f="/assets/compact_array_of_luts.9175e491.png",x="/assets/new_compact_array_of_ixs.54090dc5.png";const w={},v=g('

    Mga Bersyon na Transaksyon

    Inilabas kamakailan ni Solana ang Mga Bersyon na Transaksyon. Ang mga iminungkahing pagbabago ay ang mga sumusunod:

    1. Magpakilala ng bagong programa na namamahala sa mga talahanayan ng paghahanap ng on-chain na address

    2. Magdagdag ng bagong format ng transaksyon na maaaring gumamit ng on-chain na mga talahanayan ng paghahanap ng address

    Facts

    Fact Sheet

    • May malaking isyu ang mga legacy na transaksyon: Maximum na pinapayagang laki na 1232 bytes, at samakatuwid ang bilang ng mga account na maaaring magkasya sa isang atomic na transaksyon: 35 na address.
    • Address Lookup Tables (LUTs): Kapag naimbak na ang mga account sa talahanayang ito, ang address ng talahanayan ay maaaring i-reference sa isang mensahe ng transaksyon gamit ang 1-byte u8 na mga indeks.
    • Maaaring gamitin ang solana/web3.js na createLookupTable() upang bumuo ng bagong lookup table, pati na rin matukoy ang address nito.
    • Kapag nalikha ang isang LUT, maaari itong palawigin, ibig sabihin, ang mga account ay maaaring idagdag sa talahanayan.
    • Mga Bersyon na Transaksyon: Ang istraktura ng legacy na transaksyon ay kailangang baguhin upang maisama ang mga LUT
    • Bago ipinakilala ang bersyon, nag-iwan ng hindi nagamit na upper bit ang mga tx sa unang byte ng kanilang mga header, na maaaring magamit upang tahasang ideklara ang bersyon ng txs

    Pag-uusapan pa natin ang tungkol sa mga ipinakilalang pagbabago sa itaas at kung ano ang ibig sabihin ng mga ito para sa mga developer. Upang mas maunawaan ang mga pagbabago, gayunpaman, kailangan muna nating maunawaan ang anatomy ng isang regular (o legacy) na transaksyon.

    Legacy na Transaksyon

    ',7),T=n("Gumagamit ang Solana network ng maximum transactional unit (MTU) na laki na 1280 bytes, na sumusunod sa mga hadlang sa laki ng "),A={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},q=n("IPv6 MTU"),M=n(" upang matiyak ang bilis at pagiging maaasahan. Nag-iiwan ito ng "),L=a("strong",null,"1232 bytes",-1),C=n(" para sa packet data tulad ng mga serialized na transaksyon."),I=a("p",null,"Ang isang transaksyon ay binubuo ng:",-1),V=n("Isang compact na hanay ng mga lagda, kung saan ang bawat lagda ay isang 64 byte "),U={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},S=n("ed25519"),B=n("."),K=a("li",null,"Isang (legacy) na mensahe",-1),N=a("p",null,[a("img",{src:p,alt:"Transaction Format"})],-1),P={class:"custom-container tip"},j=a("p",{class:"custom-container-title"},"Compact-Array format",-1),H=a("p",null,"Ang isang compact array ay isang array na naka-serialize upang magkaroon ng mga sumusunod na bahagi:",-1),R=n("Isang haba ng array sa isang multi-byte na encoding na tinatawag na "),F={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},D=n("Compact-u16"),E=a("li",null,"Sinusundan ng bawat array item",-1),G=a("p",null,[a("img",{src:c,alt:"Compact array format"})],-1),W=g('

    Legacy Message

    Ang isang Legacy na Mensahe ay may mga sumusunod na bahagi:

    1. Isang header
    2. Isang compact-array ng mga address ng account, kung saan ang bawat address ng account ay tumatagal ng 32 byte
    3. Isang kamakailang blockhash
      • isang 32-byte na SHA-256 hash na ginamit upang ipahiwatig kung kailan huling naobserbahan ang ledger. Kung ang isang blockhash ay masyadong luma, tinatanggihan ito ng mga validator.
    4. Isang compact-array ng Mga Instruction

    Legacy Message

    Ang header ng mensahe ay 3 byte ang haba at naglalaman ng 3 u8 integer:

    1. Ang bilang ng mga kinakailangang lagda: ang Solana runtime ay nagpapatunay sa numerong ito sa haba ng compact array ng mga lagda sa transaksyon.
    2. Ang bilang ng mga read-only na address ng account na nangangailangan ng mga lagda.
    3. Ang bilang ng mga read-only na address ng account na hindi nangangailangan ng mga lagda.

    Message Header

    Compact-array ng mga address ng account

    Nagsisimula ang compact array na ito sa isang compact-u16 encoding ng bilang ng mga address ng account, na sinusundan ng:

    1. Mga address ng account na nangangailangan ng mga lagda: Ang mga address na humihiling ng read at write access ay unang nakalista, na sinusundan ng mga address na humihiling ng read-only na access
    2. Mga address ng account na hindi nangangailangan ng mga lagda: Katulad ng nasa itaas, unang nakalista ang mga address na humihiling ng read at write access, na sinusundan ng mga humihiling ng read-only na access

    Compact array of account addresses

    Compact na hanay ng mga instruction

    Katulad ng hanay ng mga address ng account, ang compact array na ito ay nagsisimula sa isang compact-u16 encoding ng bilang ng mga instruction, na sinusundan ng hanay ng mga instruction. Ang bawat pagtuturo sa array ay may mga sumusunod na bahagi:

    1. Program ID: kinikilala ang isang on-chain program na magpoproseso ng pagtuturo. Ito ay kinakatawan bilang u8 index sa isang address sa compact na hanay ng mga address ng account sa loob ng mensahe.
    2. Compact na hanay ng mga index ng address ng account: Ang u8 ay nag-i-index sa isang subset ng mga address ng account sa compact na hanay ng mga address ng account, na nangangailangan ng mga lagda.
    3. Compact array ng opaque u8 data: isang general purpose byte array na partikular sa program ID na nabanggit dati. Ang hanay ng data na ito ay tumutukoy sa anumang mga operasyon na dapat gawin ng program at anumang karagdagang impormasyon na maaaring hindi naglalaman ng mga account.

    Compact array of Instructions

    Mga Isyu sa Mga Legacy na Transaksyon

    Ano ang isyu sa modelo ng Transaksyon sa itaas?

    Ang maximum na laki ng isang transaksyon, at samakatuwid ang bilang ng mga account na maaaring magkasya sa isang atomic na transaksyon.

    Gaya ng tinalakay kanina, ang maximum na pinapayagang laki ng isang transaksyon ay 1232 bytes. Ang laki ng isang account address ay 32 bytes. Kaya, ang isang transaksyon ay maaaring mag-imbak ng 35 account sa pinakamagandang tindahan, na isinasaalang-alang ang ilang espasyo para sa mga header, lagda at iba pang metadata.

    Issue with legacy transactions

    Ito ay may problema dahil may ilang mga kaso kung saan ang mga developer ay kailangang magsama ng 100s ng signature-free account sa isang transaksyon. Kasalukuyang hindi ito posible sa legacy na modelo ng transaksyon. Ang solusyon na kasalukuyang ginagamit ay pansamantalang mag-imbak ng estado on-chain at gamitin ito sa ibang pagkakataon sa mga transaksyon. Hindi gumagana ang workaround na ito kapag maraming program ang kailangang buuin sa isang transaksyon. Ang bawat programa ay nangangailangan ng maramihang mga account bilang input at samakatuwid ay nahuhulog tayo sa parehong problema tulad ng dati.

    Dito ipinakilala ang Address Lookup Tables (LUT).

    Address Lookup Tables (LUT)

    Ang ideya sa likod ng Address Lookup Tables ay ang pag-imbak ng mga address ng account sa isang tulad ng talahanayan (array) na istraktura ng data na on-chain. Kapag naimbak na ang mga account sa talahanayang ito, maaaring i-reference ang address ng talahanayan sa isang mensahe ng transaksyon. Upang tumuro sa isang indibidwal na account sa loob ng talahanayan, kailangan ng 1-byte na u8 index.

    LUTs

    Nagbubukas ito ng espasyo dahil hindi na kailangang itago ang mga address sa loob ng mensahe ng transaksyon. Kailangan lamang na i-reference ang mga ito sa anyo ng isang index sa loob ng array tulad ng talahanayan. Ito ay humahantong sa posibilidad ng pagtukoy sa 2^8=256 na account, dahil ang mga account ay nire-reference gamit ang u8 index.

    Kailangang maging rent-exempt ang mga LUT kapag nasimulan o kapag may idinagdag na bagong address sa talahanayan. Maaaring idagdag ang mga address sa talahanayang ito sa pamamagitan ng isang on-chain buffer, o sa pamamagitan ng direktang pagdaragdag sa mga ito sa talahanayan sa pamamagitan ng pagtuturo ng Extension. Higit pa rito, maaaring mag-imbak ang mga LUT ng nauugnay na metadata na sinusundan ng isang compact-array ng mga account. Sa ibaba makikita mo ang istraktura ng isang tipikal na Address Lookup Table.

    LUT Format

    Ang isang mahalagang patibong ng mga LUT ay dahil ang mga paghahanap ng address ay nangangailangan ng dagdag na overhead sa panahon ng pagproseso ng transaksyon, kadalasang nagkakaroon sila ng mas mataas na gastos para sa isang transaksyon.

    Mga Bersyon na Transaksyon: TransaksyonV0

    Kailangang baguhin ang istruktura ng legacy na transaksyon upang maisama ang mga paghahanap sa talahanayan ng address. Hindi dapat masira ng mga pagbabagong ito ang pagpoproseso ng transaksyon sa Solana, at hindi rin dapat magpahiwatig ang mga ito ng anumang mga pagbabago sa format sa mga ini-invoke na programa.

    Upang matiyak ang nasa itaas, mahalagang tahasang banggitin ang uri ng transaksyon: legacy o versioned. Paano namin isasama ang impormasyong ito sa isang transaksyon?

    Bago ipinakilala ang bersyon, ang mga transaksyon ay nag-iwan ng hindi nagamit na upper bit sa unang byte ng kanilang mga header ng mensahe: num_required_signatures. Magagamit na namin ngayon ang bit na ito para tahasang ideklara ang bersyon ng aming mga transaksyon.

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.1e457979.js b/docs/.vuepress/dist/assets/versioned-transactions.html.374bd78b.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.1e457979.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.374bd78b.js
    index 9fe8d18dc..f2065bc11 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.1e457979.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.374bd78b.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r,o as p,c as l,a as s,b as e,F as c,e as t,d as a}from"./app.07ce7a66.js";var i="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",_="/assets/compat_array_of_account_addresses.7792e5c7.png",m="/assets/compact_array_of_ixs.6281d70b.png",g="/assets/issues_with_legacy_txs.5766db66.png",b="/assets/luts.96a8a310.png",k="/assets/lut_format.060d6be2.png",f="/assets/messagev0.c089b240.png",v="/assets/compact_array_of_luts.9175e491.png",y="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},w=t('

    \u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)

    Solana\u6700\u8FD1\u767C\u4F48\u4E86\u7248\u672C\u5316\u4EA4\u6613\u3002\u63D0\u8B70\u7684\u66F4\u6539\u5982\u4E0B\uFF1A

    1. \u5F15\u5165\u4E00\u500B\u65B0\u7684\u7A0B\u5E8F\uFF0C\u7528\u65BC\u7BA1\u7406\u93C8\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    2. \u6DFB\u52A0\u4E00\u7A2E\u65B0\u7684\u4EA4\u6613\u683C\u5F0F\uFF0C\u53EF\u4EE5\u5229\u7528\u93C8\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    \u7D9C\u8FF0

    \u4E8B\u5BE6\u8868

    -\u50B3\u7D71\u4EA4\u6613\u5B58\u5728\u4E00\u500B\u4E3B\u8981\u554F\u984C\uFF1A\u6700\u5927\u5141\u8A31\u7684\u5927\u5C0F\u72321232\u5B57\u7BC0\uFF0C\u56E0\u6B64\u539F\u5B50\u4EA4\u6613\u4E2D\u53EF\u4EE5\u5BB9\u7D0D\u7684\u8CEC\u6236\u6578\u91CF\u723235\u500B\u5730\u5740\u3002

    • \u5730\u5740\u67E5\u627E\u8868\uFF08LUTs\uFF09\uFF1A\u4E00\u65E6\u8CEC\u6236\u5B58\u5132\u5728\u8A72\u8868\u4E2D\uFF0C\u53EF\u4EE5\u4F7F\u75281\u5B57\u7BC0\u7684u8\u7D22\u5F15\uFF0C\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8A72\u8868\u7684\u5730\u5740\u3002
    • \u53EF\u4EE5\u4F7F\u7528solana/web3.js\u7684createLookupTable()\u69CB\u5EFA\u4E00\u500B\u65B0\u7684\u67E5\u627E\u8868\uFF0C\u4E26\u78BA\u5B9A\u5176\u5730\u5740\u3002
    • \u4E00\u65E6\u5275\u5EFA\u4E86LUT\uFF0C\u53EF\u4EE5\u9032\u884C\u64F4\u5C55\uFF0C\u5373\u53EF\u4EE5\u5C07\u8CEC\u6236\u8FFD\u52A0\u5230\u8868\u4E2D\u3002
    • \u7248\u672C\u5316\u4EA4\u6613\uFF1A\u9700\u8981\u4FEE\u6539\u50B3\u7D71\u4EA4\u6613\u7684\u7D50\u69CB\u4EE5\u6574\u5408LUTs\u3002
    • \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u982D\u90E8\u7684\u7B2C\u4E00\u500B\u5B57\u7BC0\u4E2D\u4FDD\u7559\u4E86\u4E00\u500B\u672A\u4F7F\u7528\u7684\u6700\u9AD8\u4F4D\uFF0C\u53EF\u4EE5\u7528\u4F86\u986F\u5F0F\u8072\u660E\u4EA4\u6613\u7684\u7248\u672C\u3002

    \u6211\u5011\u5C07\u66F4\u8A73\u7D30\u5730\u8A0E\u8AD6\u4E0A\u8FF0\u5F15\u5165\u7684\u66F4\u6539\u4EE5\u53CA\u5B83\u5011\u5C0D\u958B\u767C\u4EBA\u54E1\u7684\u610F\u7FA9\u3002\u7136\u800C\uFF0C\u7232\u4E86\u66F4\u597D\u5730\u7406\u89E3\u9019\u4E9B\u66F4\u6539\uFF0C\u6211\u5011\u9996\u5148\u9700\u8981\u4E86\u89E3\u5E38\u898F\uFF08\u6216\u50B3\u7D71\uFF09\u4EA4\u6613\u7684\u7D50\u69CB\u3002

    \u50B3\u7D71\u4EA4\u6613\uFF08Legacy Transactions\uFF09

    ',7),q=a("Solana\u7DB2\u7D61\u4F7F\u7528\u6700\u5927\u4E8B\u52D9\u55AE\u5143\uFF08MTU\uFF09\u5927\u5C0F\u72321280\u5B57\u7BC0\uFF0C\u9075\u5FAA"),T={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},V=a("IPv6 MTU"),L=a(" \u7684\u5927\u5C0F\u7D04\u675F\uFF0C\u4EE5\u78BA\u4FDD\u901F\u5EA6\u548C\u53EF\u9760\u6027\u3002\u9019\u6A23\u7559\u4E0B\u4E861232\u5B57\u7BC0\u7684\u6578\u64DA\u7A7A\u9593\uFF0C\u7528\u65BC\u5B58\u5132\u5E8F\u5217\u5316\u7684\u4EA4\u6613\u7B49\u6578\u64DA\u3002"),S=s("p",null,"\u4E00\u500B\u4EA4\u6613\u7531\u4EE5\u4E0B\u7D44\u6210\uFF1A",-1),C=a("\u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u7C3D\u540D\uFF0C\u5176\u4E2D\u6BCF\u500B\u7C3D\u540D\u662F\u4E00\u500B64\u5B57\u7BC0\u7684"),A={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},U=a("ed25519"),j=a("\u7C3D\u540D\u3002"),B=s("li",null,"\u4E00\u500B\uFF08\u50B3\u7D71\u7684\uFF09\u6D88\u606F\u3002",-1),I=s("p",null,[s("img",{src:i,alt:"Transaction Format"})],-1),M={class:"custom-container tip"},N=s("p",{class:"custom-container-title"},"Compact-Array format",-1),P=s("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),E={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},H=a("Compact-u16"),R=s("li",null,"Followed by each array item",-1),W=s("p",null,[s("img",{src:d,alt:"Compact array format"})],-1),D=t('

    \u50B3\u7D71\u6D88\u606F

    \u50B3\u7D71\u6D88\u606F\u5305\u542B\u4EE5\u4E0B\u7D44\u4EF6\uFF1A

    1. \u4E00\u500B\u982D\u90E8\uFF08header\uFF09\u3002
    2. \u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u8CEC\u6236\u5730\u5740\uFF0C\u6BCF\u500B\u8CEC\u6236\u5730\u5740\u4F54\u752832\u5B57\u7BC0\u3002
    3. \u4E00\u500B\u6700\u8FD1\u7684\u5340\u584A\u54C8\u5E0C\uFF08recent blockhash\uFF09\uFF1A
      • \u4E00\u500B32\u5B57\u7BC0\u7684SHA-256\u54C8\u5E0C\uFF0C\u7528\u65BC\u6307\u793A\u4E0A\u6B21\u89C0\u5BDF\u5230\u7684\u8CEC\u672C\u72C0\u614B\u3002\u5982\u679C\u4E00\u500B\u5340\u584A\u54C8\u5E0C\u592A\u820A\uFF0C\u9A57\u8B49\u7BC0\u9EDE\u5C07\u62D2\u7D55\u5B83\u3002
    4. \u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u6307\u4EE4

    Legacy Message

    \u982D\u90E8

    \u6D88\u606F\u982D\u90E8\u662F3\u5B57\u7BC0\u9577\uFF0C\u5305\u542B3\u500Bu8\u6574\u6578\uFF1A

    1. \u6240\u9700\u7C3D\u540D\u6578\u91CF\uFF1ASolana\u904B\u884C\u6642\u6703\u5C07\u6B64\u6578\u5B57\u8207\u4EA4\u6613\u4E2D\u7DCA\u6E4A\u6578\u7D44\u7C3D\u540D\u7684\u9577\u5EA6\u9032\u884C\u9A57\u8B49\u3002
    2. \u9700\u8981\u7C3D\u540D\u7684\u53EA\u8B80\u8CEC\u6236\u5730\u5740\u6578\u91CF\u3002
    3. \u4E0D\u9700\u8981\u7C3D\u540D\u7684\u53EA\u8B80\u8CEC\u6236\u5730\u5740\u6578\u91CF\u3002

    Message Header

    \u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44

    \u9019\u500B\u7DCA\u6E4A\u6578\u7D44\u4EE5\u7DCA\u6E4A\u7684u16\u7DE8\u78BC\u7684\u8CEC\u6236\u5730\u5740\u6578\u91CF\u958B\u59CB\uFF0C\u7136\u5F8C\u662F\uFF1A

    1. \u9700\u8981\u7C3D\u540D\u7684\u8CEC\u6236\u5730\u5740\uFF1A\u9996\u5148\u5217\u51FA\u8ACB\u6C42\u8B80\u53D6\u548C\u5BEB\u5165\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\uFF0C\u7136\u5F8C\u662F\u8ACB\u6C42\u53EA\u8B80\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\u3002
    2. \u4E0D\u9700\u8981\u7C3D\u540D\u7684\u8CEC\u6236\u5730\u5740\uFF1A\u8207\u4E0A\u8FF0\u76F8\u540C\uFF0C\u9996\u5148\u5217\u51FA\u8ACB\u6C42\u8B80\u53D6\u548C\u5BEB\u5165\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\uFF0C\u7136\u5F8C\u662F\u8ACB\u6C42\u53EA\u8B80\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\u3002

    Compact array of account addresses

    \u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44

    \u5C31\u50CF\u8CEC\u6236\u5730\u5740\u6578\u7D44\u4E00\u6A23\uFF0C\u9019\u500B\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44\u4EE5\u7DCA\u6E4A\u7684u16\u7DE8\u78BC\u7684\u6307\u4EE4\u6578\u91CF\u958B\u59CB\uFF0C\u7136\u5F8C\u662F\u4E00\u500B\u6307\u4EE4\u6578\u7D44\u3002\u6578\u7D44\u4E2D\u7684\u6BCF\u500B\u6307\u4EE4\u5177\u6709\u4EE5\u4E0B\u7D44\u4EF6\uFF1A

    1. \u7A0B\u5E8FID\uFF1A\u7528\u65BC\u6A19\u8B58\u5C07\u8655\u7406\u8A72\u6307\u4EE4\u7684\u93C8\u4E0A\u7A0B\u5E8F\u3002\u5B83\u8868\u793A\u7232\u6D88\u606F\u4E2D\u8CEC\u6236\u5730\u5740\u7DCA\u6E4A\u6578\u7D44\u7684\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    2. \u8CEC\u6236\u5730\u5740\u7D22\u5F15\u7684\u7DCA\u6E4A\u6578\u7D44\uFF1A\u6307\u5411\u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44\u4E2D\u9700\u8981\u7C3D\u540D\u7684\u4E00\u90E8\u5206\u8CEC\u6236\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    3. \u4E0D\u900F\u660E\u7684u8\u6578\u64DA\u7684\u7DCA\u6E4A\u6578\u7D44\uFF1A\u4E00\u500B\u901A\u7528\u7684\u5B57\u7BC0\u6578\u7D44\uFF0C\u8207\u524D\u9762\u63D0\u5230\u7684\u7A0B\u5E8FID\u76F8\u95DC\u3002\u8A72\u6578\u64DA\u6578\u7D44\u6307\u5B9A\u4E86\u7A0B\u5E8F\u61C9\u57F7\u884C\u7684\u4EFB\u4F55\u64CD\u4F5C\u4EE5\u53CA\u8CEC\u6236\u53EF\u80FD\u4E0D\u5305\u542B\u7684\u4EFB\u4F55\u9644\u52A0\u4FE1\u606F\u3002

    Compact array of Instructions

    \u50B3\u7D71\u4EA4\u6613\u7684\u554F\u984C

    \u4E0A\u8FF0\u4EA4\u6613\u6A21\u578B\u5B58\u5728\u7684\u554F\u984C\u662F\u4EC0\u9EBC?

    \u4EA4\u6613\u7684\u6700\u5927\u5927\u5C0F\u4EE5\u53CA\u56E0\u6B64\u80FD\u5920\u5728\u55AE\u500B\u539F\u5B50\u4EA4\u6613\u4E2D\u5BB9\u7D0D\u7684\u8CEC\u6236\u6578\u91CF\u3002

    \u5982\u524D\u6240\u8FF0\uFF0C\u4EA4\u6613\u7684\u6700\u5927\u5141\u8A31\u5927\u5C0F\u72321232\u5B57\u7BC0\u3002\u4E00\u500B\u8CEC\u6236\u5730\u5740\u7684\u5927\u5C0F\u723232\u5B57\u7BC0\u3002\u56E0\u6B64\uFF0C\u8003\u616E\u5230\u4E00\u4E9B\u7528\u65BC\u982D\u90E8\u3001\u7C3D\u540D\u548C\u5176\u4ED6\u5143\u6578\u64DA\u7684\u7A7A\u9593\uFF0C\u4E00\u500B\u4EA4\u6613\u6700\u591A\u96BB\u80FD\u5B58\u513235\u500B\u8CEC\u6236\u3002

    Issue with legacy transactions

    \u9019\u662F\u4E00\u500B\u554F\u984C\uFF0C\u56E0\u7232\u6709\u5E7E\u7A2E\u60C5\u6CC1\u4E0B\uFF0C\u958B\u767C\u4EBA\u54E1\u9700\u8981\u5728\u55AE\u500B\u4EA4\u6613\u4E2D\u5305\u542B\u6578\u767E\u500B\u7121\u9700\u7C3D\u540D\u7684\u8CEC\u6236\u3002\u4F46\u662F\uFF0C\u50B3\u7D71\u4EA4\u6613\u6A21\u578B\u76EE\u524D\u7121\u6CD5\u5BE6\u73FE\u9019\u4E00\u9EDE\u3002\u76EE\u524D\u4F7F\u7528\u7684\u89E3\u6C7A\u65B9\u6848\u662F\u5728\u93C8\u4E0A\u81E8\u6642\u5B58\u5132\u72C0\u614B\uFF0C\u4E26\u5728\u7A0D\u5F8C\u7684\u4EA4\u6613\u4E2D\u4F7F\u7528\u3002\u4F46\u662F\uFF0C\u7576\u591A\u500B\u7A0B\u5E8F\u9700\u8981\u7D44\u5408\u5728\u55AE\u500B\u4EA4\u6613\u4E2D\u6642\uFF0C\u9019\u7A2E\u89E3\u6C7A\u65B9\u6CD5\u5C31\u4E0D\u9069\u7528\u4E86\u3002\u6BCF\u500B\u7A0B\u5E8F\u90FD\u9700\u8981\u591A\u500B\u8CEC\u6236\u4F5C\u7232\u8F38\u5165\uFF0C\u56E0\u6B64\u6211\u5011\u9677\u5165\u4E86\u8207\u4E4B\u524D\u76F8\u540C\u7684\u554F\u984C\u3002

    \u9019\u5C31\u662F\u5F15\u5165**\u5730\u5740\u67E5\u627E\u8868\uFF08Address Lookup Tables\uFF0CLUT\uFF09**\u7684\u539F\u56E0\u3002

    \u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)

    \u5730\u5740\u67E5\u627E\u8868\u7684\u7406\u5FF5\u662F\u5728\u93C8\u4E0A\u4F7F\u7528\u8868\u683C\uFF08\u6578\u7D44\uFF09\u7684\u6578\u64DA\u7D50\u69CB\u5B58\u5132\u8CEC\u6236\u5730\u5740\u3002\u4E00\u65E6\u8CEC\u6236\u5B58\u5132\u5728\u8A72\u8868\u4E2D\uFF0C\u53EF\u4EE5\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8A72\u8868\u7684\u5730\u5740\u3002\u7232\u4E86\u6307\u5411\u8868\u4E2D\u7684\u55AE\u500B\u8CEC\u6236\uFF0C\u9700\u8981\u4F7F\u7528\u4E00\u500B\u5B57\u7BC0\u7684u8\u7D22\u5F15\u3002

    LUTs

    \u9019\u6A23\u505A\u53EF\u4EE5\u7BC0\u7701\u7A7A\u9593\uFF0C\u56E0\u7232\u5730\u5740\u4E0D\u518D\u9700\u8981\u5B58\u5132\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u3002\u5B83\u5011\u53EA\u9700\u8981\u4EE5\u6578\u7D44\u5F62\u5F0F\u7684\u8868\u683C\u4E2D\u7684\u7D22\u5F15\u9032\u884C\u5F15\u7528\u3002\u9019\u4F7F\u5F97\u6709\u53EF\u80FD\u5F15\u7528256\u500B\u8CEC\u6236\uFF0C\u56E0\u7232\u8CEC\u6236\u4F7F\u7528u8\u7D22\u5F15\u9032\u884C\u5F15\u7528\u3002

    \u7576\u521D\u59CB\u5316\u5730\u5740\u67E5\u627E\u8868\u6216\u5411\u8868\u4E2D\u6DFB\u52A0\u65B0\u5730\u5740\u6642\uFF0C\u9700\u8981\u4F7F\u5730\u5740\u67E5\u627E\u8868\u514D\u9664\u79DF\u91D1\u3002\u5730\u5740\u53EF\u4EE5\u901A\u904E\u93C8\u4E0A\u7DE9\u885D\u5340\u6216\u76F4\u63A5\u901A\u904EExtension\u6307\u4EE4\u5C07\u5176\u8FFD\u52A0\u5230\u8868\u683C\u4E2D\u3002\u6B64\u5916\uFF0C\u5730\u5740\u67E5\u627E\u8868\u9084\u53EF\u4EE5\u5B58\u5132\u76F8\u95DC\u7684\u5143\u6578\u64DA\uFF0C\u5F8C\u9762\u662F\u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u8CEC\u6236\u3002\u4E0B\u9762\u662F\u4E00\u500B\u5178\u578B\u5730\u5740\u67E5\u627E\u8868\u7684\u7D50\u69CB\uFF1A

    LUT Format

    \u5730\u5740\u67E5\u627E\u8868\u7684\u4E00\u500B\u91CD\u8981\u7F3A\u9EDE\u662F\uFF0C\u5728\u4EA4\u6613\u8655\u7406\u904E\u7A0B\u4E2D\uFF0C\u7531\u65BC\u5730\u5740\u67E5\u627E\u9700\u8981\u984D\u5916\u7684\u958B\u92B7\uFF0C\u901A\u5E38\u6703\u5C0E\u81F4\u4EA4\u6613\u7684\u6210\u672C\u8F03\u9AD8\u3002

    \u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0

    \u50B3\u7D71\u4EA4\u6613\u7684\u7D50\u69CB\u9700\u8981\u4FEE\u6539\u4EE5\u5305\u542B\u5730\u5740\u8868\u67E5\u627E\u3002\u9019\u4E9B\u66F4\u6539\u4E0D\u61C9\u7834\u58DESolana\u4E0A\u7684\u4EA4\u6613\u8655\u7406\uFF0C\u4E5F\u4E0D\u61C9\u5C0D\u88AB\u8ABF\u7528\u7684\u7A0B\u5E8F\u7684\u683C\u5F0F\u7522\u751F\u4EFB\u4F55\u66F4\u6539\u3002

    \u7232\u4E86\u78BA\u4FDD\u4E0A\u8FF0\u60C5\u6CC1\uFF0C\u91CD\u8981\u7684\u662F\u660E\u78BA\u6307\u51FA\u4EA4\u6613\u985E\u578B\uFF1Alegacy\uFF08\u50B3\u7D71\uFF09\u6216versioned\uFF08\u7248\u672C\u5316\uFF09\u3002\u6211\u5011\u5982\u4F55\u5728\u4EA4\u6613\u4E2D\u5305\u542B\u9019\u4E9B\u4FE1\u606F\u5462\uFF1F

    \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u6D88\u606F\u982D\u90E8\u7684num_required_signatures\u5B57\u6BB5\u7684\u7B2C\u4E00\u500B\u5B57\u7BC0\u4E2D\u7559\u4E0B\u4E86\u4E00\u500B\u672A\u4F7F\u7528\u7684\u4E0A\u4F4D\u6BD4\u7279\u3002\u73FE\u5728\uFF0C\u6211\u5011\u53EF\u4EE5\u4F7F\u7528\u9019\u500B\u6BD4\u7279\u4F4D\u4F86\u660E\u78BA\u8072\u660E\u6211\u5011\u7684\u4EA4\u6613\u7248\u672C\u3002

    pub enum VersionedMessage {
    +import{_ as o,r,o as p,c as l,a as s,b as e,F as c,e as t,d as a}from"./app.d411e3b3.js";var i="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",_="/assets/compat_array_of_account_addresses.7792e5c7.png",m="/assets/compact_array_of_ixs.6281d70b.png",g="/assets/issues_with_legacy_txs.5766db66.png",b="/assets/luts.96a8a310.png",k="/assets/lut_format.060d6be2.png",f="/assets/messagev0.c089b240.png",v="/assets/compact_array_of_luts.9175e491.png",y="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},w=t('

    \u7248\u672C\u5316\u4EA4\u6613 (Versioned Transactions)

    Solana\u6700\u8FD1\u767C\u4F48\u4E86\u7248\u672C\u5316\u4EA4\u6613\u3002\u63D0\u8B70\u7684\u66F4\u6539\u5982\u4E0B\uFF1A

    1. \u5F15\u5165\u4E00\u500B\u65B0\u7684\u7A0B\u5E8F\uFF0C\u7528\u65BC\u7BA1\u7406\u93C8\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    2. \u6DFB\u52A0\u4E00\u7A2E\u65B0\u7684\u4EA4\u6613\u683C\u5F0F\uFF0C\u53EF\u4EE5\u5229\u7528\u93C8\u4E0A\u5730\u5740\u67E5\u627E\u8868\u3002

    \u7D9C\u8FF0

    \u4E8B\u5BE6\u8868

    -\u50B3\u7D71\u4EA4\u6613\u5B58\u5728\u4E00\u500B\u4E3B\u8981\u554F\u984C\uFF1A\u6700\u5927\u5141\u8A31\u7684\u5927\u5C0F\u72321232\u5B57\u7BC0\uFF0C\u56E0\u6B64\u539F\u5B50\u4EA4\u6613\u4E2D\u53EF\u4EE5\u5BB9\u7D0D\u7684\u8CEC\u6236\u6578\u91CF\u723235\u500B\u5730\u5740\u3002

    • \u5730\u5740\u67E5\u627E\u8868\uFF08LUTs\uFF09\uFF1A\u4E00\u65E6\u8CEC\u6236\u5B58\u5132\u5728\u8A72\u8868\u4E2D\uFF0C\u53EF\u4EE5\u4F7F\u75281\u5B57\u7BC0\u7684u8\u7D22\u5F15\uFF0C\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8A72\u8868\u7684\u5730\u5740\u3002
    • \u53EF\u4EE5\u4F7F\u7528solana/web3.js\u7684createLookupTable()\u69CB\u5EFA\u4E00\u500B\u65B0\u7684\u67E5\u627E\u8868\uFF0C\u4E26\u78BA\u5B9A\u5176\u5730\u5740\u3002
    • \u4E00\u65E6\u5275\u5EFA\u4E86LUT\uFF0C\u53EF\u4EE5\u9032\u884C\u64F4\u5C55\uFF0C\u5373\u53EF\u4EE5\u5C07\u8CEC\u6236\u8FFD\u52A0\u5230\u8868\u4E2D\u3002
    • \u7248\u672C\u5316\u4EA4\u6613\uFF1A\u9700\u8981\u4FEE\u6539\u50B3\u7D71\u4EA4\u6613\u7684\u7D50\u69CB\u4EE5\u6574\u5408LUTs\u3002
    • \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u982D\u90E8\u7684\u7B2C\u4E00\u500B\u5B57\u7BC0\u4E2D\u4FDD\u7559\u4E86\u4E00\u500B\u672A\u4F7F\u7528\u7684\u6700\u9AD8\u4F4D\uFF0C\u53EF\u4EE5\u7528\u4F86\u986F\u5F0F\u8072\u660E\u4EA4\u6613\u7684\u7248\u672C\u3002

    \u6211\u5011\u5C07\u66F4\u8A73\u7D30\u5730\u8A0E\u8AD6\u4E0A\u8FF0\u5F15\u5165\u7684\u66F4\u6539\u4EE5\u53CA\u5B83\u5011\u5C0D\u958B\u767C\u4EBA\u54E1\u7684\u610F\u7FA9\u3002\u7136\u800C\uFF0C\u7232\u4E86\u66F4\u597D\u5730\u7406\u89E3\u9019\u4E9B\u66F4\u6539\uFF0C\u6211\u5011\u9996\u5148\u9700\u8981\u4E86\u89E3\u5E38\u898F\uFF08\u6216\u50B3\u7D71\uFF09\u4EA4\u6613\u7684\u7D50\u69CB\u3002

    \u50B3\u7D71\u4EA4\u6613\uFF08Legacy Transactions\uFF09

    ',7),q=a("Solana\u7DB2\u7D61\u4F7F\u7528\u6700\u5927\u4E8B\u52D9\u55AE\u5143\uFF08MTU\uFF09\u5927\u5C0F\u72321280\u5B57\u7BC0\uFF0C\u9075\u5FAA"),T={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},V=a("IPv6 MTU"),L=a(" \u7684\u5927\u5C0F\u7D04\u675F\uFF0C\u4EE5\u78BA\u4FDD\u901F\u5EA6\u548C\u53EF\u9760\u6027\u3002\u9019\u6A23\u7559\u4E0B\u4E861232\u5B57\u7BC0\u7684\u6578\u64DA\u7A7A\u9593\uFF0C\u7528\u65BC\u5B58\u5132\u5E8F\u5217\u5316\u7684\u4EA4\u6613\u7B49\u6578\u64DA\u3002"),S=s("p",null,"\u4E00\u500B\u4EA4\u6613\u7531\u4EE5\u4E0B\u7D44\u6210\uFF1A",-1),C=a("\u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u7C3D\u540D\uFF0C\u5176\u4E2D\u6BCF\u500B\u7C3D\u540D\u662F\u4E00\u500B64\u5B57\u7BC0\u7684"),A={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},U=a("ed25519"),j=a("\u7C3D\u540D\u3002"),B=s("li",null,"\u4E00\u500B\uFF08\u50B3\u7D71\u7684\uFF09\u6D88\u606F\u3002",-1),I=s("p",null,[s("img",{src:i,alt:"Transaction Format"})],-1),M={class:"custom-container tip"},N=s("p",{class:"custom-container-title"},"Compact-Array format",-1),P=s("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),E={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},H=a("Compact-u16"),R=s("li",null,"Followed by each array item",-1),W=s("p",null,[s("img",{src:d,alt:"Compact array format"})],-1),D=t('

    \u50B3\u7D71\u6D88\u606F

    \u50B3\u7D71\u6D88\u606F\u5305\u542B\u4EE5\u4E0B\u7D44\u4EF6\uFF1A

    1. \u4E00\u500B\u982D\u90E8\uFF08header\uFF09\u3002
    2. \u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u8CEC\u6236\u5730\u5740\uFF0C\u6BCF\u500B\u8CEC\u6236\u5730\u5740\u4F54\u752832\u5B57\u7BC0\u3002
    3. \u4E00\u500B\u6700\u8FD1\u7684\u5340\u584A\u54C8\u5E0C\uFF08recent blockhash\uFF09\uFF1A
      • \u4E00\u500B32\u5B57\u7BC0\u7684SHA-256\u54C8\u5E0C\uFF0C\u7528\u65BC\u6307\u793A\u4E0A\u6B21\u89C0\u5BDF\u5230\u7684\u8CEC\u672C\u72C0\u614B\u3002\u5982\u679C\u4E00\u500B\u5340\u584A\u54C8\u5E0C\u592A\u820A\uFF0C\u9A57\u8B49\u7BC0\u9EDE\u5C07\u62D2\u7D55\u5B83\u3002
    4. \u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u6307\u4EE4

    Legacy Message

    \u982D\u90E8

    \u6D88\u606F\u982D\u90E8\u662F3\u5B57\u7BC0\u9577\uFF0C\u5305\u542B3\u500Bu8\u6574\u6578\uFF1A

    1. \u6240\u9700\u7C3D\u540D\u6578\u91CF\uFF1ASolana\u904B\u884C\u6642\u6703\u5C07\u6B64\u6578\u5B57\u8207\u4EA4\u6613\u4E2D\u7DCA\u6E4A\u6578\u7D44\u7C3D\u540D\u7684\u9577\u5EA6\u9032\u884C\u9A57\u8B49\u3002
    2. \u9700\u8981\u7C3D\u540D\u7684\u53EA\u8B80\u8CEC\u6236\u5730\u5740\u6578\u91CF\u3002
    3. \u4E0D\u9700\u8981\u7C3D\u540D\u7684\u53EA\u8B80\u8CEC\u6236\u5730\u5740\u6578\u91CF\u3002

    Message Header

    \u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44

    \u9019\u500B\u7DCA\u6E4A\u6578\u7D44\u4EE5\u7DCA\u6E4A\u7684u16\u7DE8\u78BC\u7684\u8CEC\u6236\u5730\u5740\u6578\u91CF\u958B\u59CB\uFF0C\u7136\u5F8C\u662F\uFF1A

    1. \u9700\u8981\u7C3D\u540D\u7684\u8CEC\u6236\u5730\u5740\uFF1A\u9996\u5148\u5217\u51FA\u8ACB\u6C42\u8B80\u53D6\u548C\u5BEB\u5165\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\uFF0C\u7136\u5F8C\u662F\u8ACB\u6C42\u53EA\u8B80\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\u3002
    2. \u4E0D\u9700\u8981\u7C3D\u540D\u7684\u8CEC\u6236\u5730\u5740\uFF1A\u8207\u4E0A\u8FF0\u76F8\u540C\uFF0C\u9996\u5148\u5217\u51FA\u8ACB\u6C42\u8B80\u53D6\u548C\u5BEB\u5165\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\uFF0C\u7136\u5F8C\u662F\u8ACB\u6C42\u53EA\u8B80\u8A2A\u554F\u6B0A\u9650\u7684\u5730\u5740\u3002

    Compact array of account addresses

    \u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44

    \u5C31\u50CF\u8CEC\u6236\u5730\u5740\u6578\u7D44\u4E00\u6A23\uFF0C\u9019\u500B\u7DCA\u6E4A\u6307\u4EE4\u6578\u7D44\u4EE5\u7DCA\u6E4A\u7684u16\u7DE8\u78BC\u7684\u6307\u4EE4\u6578\u91CF\u958B\u59CB\uFF0C\u7136\u5F8C\u662F\u4E00\u500B\u6307\u4EE4\u6578\u7D44\u3002\u6578\u7D44\u4E2D\u7684\u6BCF\u500B\u6307\u4EE4\u5177\u6709\u4EE5\u4E0B\u7D44\u4EF6\uFF1A

    1. \u7A0B\u5E8FID\uFF1A\u7528\u65BC\u6A19\u8B58\u5C07\u8655\u7406\u8A72\u6307\u4EE4\u7684\u93C8\u4E0A\u7A0B\u5E8F\u3002\u5B83\u8868\u793A\u7232\u6D88\u606F\u4E2D\u8CEC\u6236\u5730\u5740\u7DCA\u6E4A\u6578\u7D44\u7684\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    2. \u8CEC\u6236\u5730\u5740\u7D22\u5F15\u7684\u7DCA\u6E4A\u6578\u7D44\uFF1A\u6307\u5411\u7DCA\u6E4A\u8CEC\u6236\u5730\u5740\u6578\u7D44\u4E2D\u9700\u8981\u7C3D\u540D\u7684\u4E00\u90E8\u5206\u8CEC\u6236\u5730\u5740\u7684u8\u7D22\u5F15\u3002
    3. \u4E0D\u900F\u660E\u7684u8\u6578\u64DA\u7684\u7DCA\u6E4A\u6578\u7D44\uFF1A\u4E00\u500B\u901A\u7528\u7684\u5B57\u7BC0\u6578\u7D44\uFF0C\u8207\u524D\u9762\u63D0\u5230\u7684\u7A0B\u5E8FID\u76F8\u95DC\u3002\u8A72\u6578\u64DA\u6578\u7D44\u6307\u5B9A\u4E86\u7A0B\u5E8F\u61C9\u57F7\u884C\u7684\u4EFB\u4F55\u64CD\u4F5C\u4EE5\u53CA\u8CEC\u6236\u53EF\u80FD\u4E0D\u5305\u542B\u7684\u4EFB\u4F55\u9644\u52A0\u4FE1\u606F\u3002

    Compact array of Instructions

    \u50B3\u7D71\u4EA4\u6613\u7684\u554F\u984C

    \u4E0A\u8FF0\u4EA4\u6613\u6A21\u578B\u5B58\u5728\u7684\u554F\u984C\u662F\u4EC0\u9EBC?

    \u4EA4\u6613\u7684\u6700\u5927\u5927\u5C0F\u4EE5\u53CA\u56E0\u6B64\u80FD\u5920\u5728\u55AE\u500B\u539F\u5B50\u4EA4\u6613\u4E2D\u5BB9\u7D0D\u7684\u8CEC\u6236\u6578\u91CF\u3002

    \u5982\u524D\u6240\u8FF0\uFF0C\u4EA4\u6613\u7684\u6700\u5927\u5141\u8A31\u5927\u5C0F\u72321232\u5B57\u7BC0\u3002\u4E00\u500B\u8CEC\u6236\u5730\u5740\u7684\u5927\u5C0F\u723232\u5B57\u7BC0\u3002\u56E0\u6B64\uFF0C\u8003\u616E\u5230\u4E00\u4E9B\u7528\u65BC\u982D\u90E8\u3001\u7C3D\u540D\u548C\u5176\u4ED6\u5143\u6578\u64DA\u7684\u7A7A\u9593\uFF0C\u4E00\u500B\u4EA4\u6613\u6700\u591A\u96BB\u80FD\u5B58\u513235\u500B\u8CEC\u6236\u3002

    Issue with legacy transactions

    \u9019\u662F\u4E00\u500B\u554F\u984C\uFF0C\u56E0\u7232\u6709\u5E7E\u7A2E\u60C5\u6CC1\u4E0B\uFF0C\u958B\u767C\u4EBA\u54E1\u9700\u8981\u5728\u55AE\u500B\u4EA4\u6613\u4E2D\u5305\u542B\u6578\u767E\u500B\u7121\u9700\u7C3D\u540D\u7684\u8CEC\u6236\u3002\u4F46\u662F\uFF0C\u50B3\u7D71\u4EA4\u6613\u6A21\u578B\u76EE\u524D\u7121\u6CD5\u5BE6\u73FE\u9019\u4E00\u9EDE\u3002\u76EE\u524D\u4F7F\u7528\u7684\u89E3\u6C7A\u65B9\u6848\u662F\u5728\u93C8\u4E0A\u81E8\u6642\u5B58\u5132\u72C0\u614B\uFF0C\u4E26\u5728\u7A0D\u5F8C\u7684\u4EA4\u6613\u4E2D\u4F7F\u7528\u3002\u4F46\u662F\uFF0C\u7576\u591A\u500B\u7A0B\u5E8F\u9700\u8981\u7D44\u5408\u5728\u55AE\u500B\u4EA4\u6613\u4E2D\u6642\uFF0C\u9019\u7A2E\u89E3\u6C7A\u65B9\u6CD5\u5C31\u4E0D\u9069\u7528\u4E86\u3002\u6BCF\u500B\u7A0B\u5E8F\u90FD\u9700\u8981\u591A\u500B\u8CEC\u6236\u4F5C\u7232\u8F38\u5165\uFF0C\u56E0\u6B64\u6211\u5011\u9677\u5165\u4E86\u8207\u4E4B\u524D\u76F8\u540C\u7684\u554F\u984C\u3002

    \u9019\u5C31\u662F\u5F15\u5165**\u5730\u5740\u67E5\u627E\u8868\uFF08Address Lookup Tables\uFF0CLUT\uFF09**\u7684\u539F\u56E0\u3002

    \u5730\u5740\u67E5\u627E\u8868(Address Lookeup Tables)

    \u5730\u5740\u67E5\u627E\u8868\u7684\u7406\u5FF5\u662F\u5728\u93C8\u4E0A\u4F7F\u7528\u8868\u683C\uFF08\u6578\u7D44\uFF09\u7684\u6578\u64DA\u7D50\u69CB\u5B58\u5132\u8CEC\u6236\u5730\u5740\u3002\u4E00\u65E6\u8CEC\u6236\u5B58\u5132\u5728\u8A72\u8868\u4E2D\uFF0C\u53EF\u4EE5\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u5F15\u7528\u8A72\u8868\u7684\u5730\u5740\u3002\u7232\u4E86\u6307\u5411\u8868\u4E2D\u7684\u55AE\u500B\u8CEC\u6236\uFF0C\u9700\u8981\u4F7F\u7528\u4E00\u500B\u5B57\u7BC0\u7684u8\u7D22\u5F15\u3002

    LUTs

    \u9019\u6A23\u505A\u53EF\u4EE5\u7BC0\u7701\u7A7A\u9593\uFF0C\u56E0\u7232\u5730\u5740\u4E0D\u518D\u9700\u8981\u5B58\u5132\u5728\u4EA4\u6613\u6D88\u606F\u4E2D\u3002\u5B83\u5011\u53EA\u9700\u8981\u4EE5\u6578\u7D44\u5F62\u5F0F\u7684\u8868\u683C\u4E2D\u7684\u7D22\u5F15\u9032\u884C\u5F15\u7528\u3002\u9019\u4F7F\u5F97\u6709\u53EF\u80FD\u5F15\u7528256\u500B\u8CEC\u6236\uFF0C\u56E0\u7232\u8CEC\u6236\u4F7F\u7528u8\u7D22\u5F15\u9032\u884C\u5F15\u7528\u3002

    \u7576\u521D\u59CB\u5316\u5730\u5740\u67E5\u627E\u8868\u6216\u5411\u8868\u4E2D\u6DFB\u52A0\u65B0\u5730\u5740\u6642\uFF0C\u9700\u8981\u4F7F\u5730\u5740\u67E5\u627E\u8868\u514D\u9664\u79DF\u91D1\u3002\u5730\u5740\u53EF\u4EE5\u901A\u904E\u93C8\u4E0A\u7DE9\u885D\u5340\u6216\u76F4\u63A5\u901A\u904EExtension\u6307\u4EE4\u5C07\u5176\u8FFD\u52A0\u5230\u8868\u683C\u4E2D\u3002\u6B64\u5916\uFF0C\u5730\u5740\u67E5\u627E\u8868\u9084\u53EF\u4EE5\u5B58\u5132\u76F8\u95DC\u7684\u5143\u6578\u64DA\uFF0C\u5F8C\u9762\u662F\u4E00\u500B\u7DCA\u6E4A\u6578\u7D44\u7684\u8CEC\u6236\u3002\u4E0B\u9762\u662F\u4E00\u500B\u5178\u578B\u5730\u5740\u67E5\u627E\u8868\u7684\u7D50\u69CB\uFF1A

    LUT Format

    \u5730\u5740\u67E5\u627E\u8868\u7684\u4E00\u500B\u91CD\u8981\u7F3A\u9EDE\u662F\uFF0C\u5728\u4EA4\u6613\u8655\u7406\u904E\u7A0B\u4E2D\uFF0C\u7531\u65BC\u5730\u5740\u67E5\u627E\u9700\u8981\u984D\u5916\u7684\u958B\u92B7\uFF0C\u901A\u5E38\u6703\u5C0E\u81F4\u4EA4\u6613\u7684\u6210\u672C\u8F03\u9AD8\u3002

    \u7248\u672C\u5316\u4EA4\u6613\uFF1A TransactionV0

    \u50B3\u7D71\u4EA4\u6613\u7684\u7D50\u69CB\u9700\u8981\u4FEE\u6539\u4EE5\u5305\u542B\u5730\u5740\u8868\u67E5\u627E\u3002\u9019\u4E9B\u66F4\u6539\u4E0D\u61C9\u7834\u58DESolana\u4E0A\u7684\u4EA4\u6613\u8655\u7406\uFF0C\u4E5F\u4E0D\u61C9\u5C0D\u88AB\u8ABF\u7528\u7684\u7A0B\u5E8F\u7684\u683C\u5F0F\u7522\u751F\u4EFB\u4F55\u66F4\u6539\u3002

    \u7232\u4E86\u78BA\u4FDD\u4E0A\u8FF0\u60C5\u6CC1\uFF0C\u91CD\u8981\u7684\u662F\u660E\u78BA\u6307\u51FA\u4EA4\u6613\u985E\u578B\uFF1Alegacy\uFF08\u50B3\u7D71\uFF09\u6216versioned\uFF08\u7248\u672C\u5316\uFF09\u3002\u6211\u5011\u5982\u4F55\u5728\u4EA4\u6613\u4E2D\u5305\u542B\u9019\u4E9B\u4FE1\u606F\u5462\uFF1F

    \u5728\u5F15\u5165\u7248\u672C\u5316\u4E4B\u524D\uFF0C\u4EA4\u6613\u5728\u5176\u6D88\u606F\u982D\u90E8\u7684num_required_signatures\u5B57\u6BB5\u7684\u7B2C\u4E00\u500B\u5B57\u7BC0\u4E2D\u7559\u4E0B\u4E86\u4E00\u500B\u672A\u4F7F\u7528\u7684\u4E0A\u4F4D\u6BD4\u7279\u3002\u73FE\u5728\uFF0C\u6211\u5011\u53EF\u4EE5\u4F7F\u7528\u9019\u500B\u6BD4\u7279\u4F4D\u4F86\u660E\u78BA\u8072\u660E\u6211\u5011\u7684\u4EA4\u6613\u7248\u672C\u3002

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.dd6b2982.js b/docs/.vuepress/dist/assets/versioned-transactions.html.78847d3c.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.dd6b2982.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.78847d3c.js
    index fe79cf769..a5ba50597 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.dd6b2982.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.78847d3c.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r,o as i,c as l,a as e,b as a,F as c,e as t,d as s}from"./app.07ce7a66.js";var u="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",p="/assets/legacy_message.09ab30b7.png",m="/assets/message_header.8eb7d589.png",b="/assets/compat_array_of_account_addresses.7792e5c7.png",h="/assets/compact_array_of_ixs.6281d70b.png",g="/assets/issues_with_legacy_txs.5766db66.png",_="/assets/luts.96a8a310.png",v="/assets/lut_format.060d6be2.png",f="/assets/messagev0.c089b240.png",k="/assets/compact_array_of_luts.9175e491.png",q="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},T=t('

    Transactions Versionn\xE9es

    Solana a r\xE9cemment sorti les Transactions Versionn\xE9es. Les changements propos\xE9s sont les suivants :

    1. Introduction d'un nouveau programme qui g\xE8re les tables de consultation d'adresses sur la cha\xEEne

    2. Ajout d'un nouveau format de transaction qui peut utiliser les tables de consultation d'adresses sur la cha\xEEne

    Faits

    Fiche d'Information

    • Les transactions h\xE9rit\xE9es ont un probl\xE8me majeur : La taille maximale autoris\xE9e est de 1232 octets ce qui fait que le nombre de comptes qui peuvent tenir dans une transaction atomique est de maximum 35 adresses.
    • Tables de Consultation d'Adresses (Address Lookup Tables, LUTs): Une fois que les comptes sont stock\xE9s dans cette table, l'adresse de la table peut \xEAtre r\xE9f\xE9renc\xE9e dans un message de transaction utilisant des indices u8 de 1 octet.
    • createLookupTable() de solana/web3.js peut \xEAtre utilis\xE9 pour construire une nouvelle table de consultation, ainsi que pour d\xE9terminer son adresse.
    • Une fois qu'une Table de Consultation d'Adresses est cr\xE9\xE9e, elle peut \xEAtre \xE9tendue, c'est-\xE0-dire que des comptes peuvent \xEAtre ajout\xE9s \xE0 la table.
    • Transactions Versionn\xE9es : La structure des transactions h\xE9rit\xE9es doit \xEAtre modifi\xE9e pour int\xE9grer les Tables de Consultation d'Adresses
    • Avant l'introduction du versionnage, les transactions avaient un bit sup\xE9rieur inutilis\xE9 dans le premier octet de leur en-t\xEAte. Celui-ci peut \xEAtre utilis\xE9 pour d\xE9clarer explicitement la version des transactions.

    Nous parlerons plus en d\xE9tail des changements introduits ci-dessus et de ce qu'ils signifient pour les d\xE9veloppeurs. Toutefois, pour mieux comprendre les changements, nous devons d'abord comprendre l'anatomie d'une transaction classique (ou h\xE9rit\xE9e).

    Transaction H\xE9rit\xE9e

    ',7),C=s("Le r\xE9seau Solana utilise une taille d'unit\xE9 transactionnelle maximale (MTU) de 1280 octets, conform\xE9ment aux contraintes de taille de l'"),L={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},y=s("IPv6 MTU"),V=s(" afin de garantir la vitesse et la fiabilit\xE9. Cela laisse "),w=e("strong",null,"1232 octets",-1),A=s(" pour les paquets de donn\xE9es comme les transactions s\xE9rialis\xE9es."),U=e("p",null,"Une transaction est compos\xE9e de :",-1),j=s("Un tableau compact de signatures, o\xF9 chaque signature est un "),S={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},I=s("ed25519"),N=s(" de 64 octets."),M=e("li",null,"Un message (h\xE9rit\xE9)",-1),P=e("p",null,[e("img",{src:u,alt:"Transaction Format"})],-1),B={class:"custom-container tip"},H=e("p",{class:"custom-container-title"},"Le format Tableau Compact",-1),E=e("p",null,"Un tableau compact est un tableau s\xE9rialis\xE9 de mani\xE8re \xE0 avoir les composants suivants :",-1),F=s("Une taille de tableau dans un encodage multi-octet appel\xE9 "),R={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},z=s("Compact-u16"),W=e("li",null,"Suivi de chaque \xE9l\xE9ment du tableau",-1),D=e("p",null,[e("img",{src:d,alt:"Compact array format"})],-1),K=t('

    Message H\xE9rit\xE9

    Un message h\xE9rit\xE9 comporte les \xE9l\xE9ments suivants :

    1. Un en-t\xEAte
    2. Un tableau compact d'adresses de comptes, o\xF9 chaque adresse de compte occupe 32 octets
    3. Un hash de bloc r\xE9cent
    • un hachage SHA-256 de 32 octets utilis\xE9 pour indiquer quand le registre a \xE9t\xE9 observ\xE9 pour la derni\xE8re fois. Si un hash de bloc est trop vieux, les validateurs le rejettent.
    1. Un tableau compact d'instructions

    Legacy Message

    En-t\xEAte

    L'en-t\xEAte du message a une taille de 3 octets et contient 3 entiers u8 :

    1. Le nombre de signatures requises : le runtime de Solana v\xE9rifie ce nombre avec la taille du tableau compact des signatures de la transaction.
    2. Le nombre d'adresses de comptes en lecture seule qui n\xE9cessitent une signature.
    3. Le nombre d'adresses de comptes en lecture seule qui ne n\xE9cessitent pas de signature.

    Message Header

    Tableau compact d'adresses de comptes

    Ce tableau compact commence par un encodage compact-u16 du nombre d'adresses de comptes, suivi par :

    1. Adresses de compte n\xE9cessitant une signature: Les adresses qui demandent un acc\xE8s en lecture et en \xE9criture sont list\xE9es en premier, suivies de celles qui demandent un acc\xE8s en lecture seule
    2. Adresses de comptes qui ne n\xE9cessitent pas de signature: Comme ci-dessus, les adresses qui demandent un acc\xE8s en lecture et en \xE9criture sont list\xE9es en premier, suivies de celles qui demandent un acc\xE8s en lecture seule

    Compact array of account addresses

    Tableau compact d'instructions

    Tout comme le tableau d'adresses de comptes, ce tableau compact commence par un encodage compact-u16 du nombre d'instructions, suivi d'un tableau d'instructions. Chaque instruction du tableau comporte les \xE9l\xE9ments suivants :

    1. Identifiant du programme: identifie un programme on-chain qui traitera l'instruction. Il est repr\xE9sent\xE9 par un index u8 vers une adresse dans le tableau compact d'adresses de comptes dans le message.
    2. Tableau compact d'index d'adresses de compte: index u8 vers un sous-ensemble d'adresses de comptes dans le tableau compact des adresses de comptes qui n\xE9cessitent une signature.
    3. Tableau compact de donn\xE9es opaques u8: un tableau d'octets d'usage g\xE9n\xE9ral qui est sp\xE9cifique \xE0 l'identifiant du programme mentionn\xE9 pr\xE9c\xE9demment. Ce tableau de donn\xE9es sp\xE9cifie toutes les op\xE9rations que le programme doit effectuer et toute information suppl\xE9mentaire que les comptes pourraient ne pas contenir.

    Compact array of Instructions

    Probl\xE8mes li\xE9s aux Transactions H\xE9rit\xE9es

    Quel est le probl\xE8me avec le mod\xE8le de transaction ci-dessus ?

    La taille maximale d'une transaction, et donc le nombre de comptes qui peuvent tenir dans une seule transaction atomique.

    Comme nous l'avons vu pr\xE9c\xE9demment, la taille maximale autoris\xE9e pour une transaction est de 1232 octets. La taille d'une adresse de compte est de 32 octets. Ainsi, une transaction peut au mieux stocker 35 comptes, en tenant compte d'un certain espace pour les en-t\xEAtes, les signatures et autres m\xE9tadonn\xE9es.

    Issue with legacy transactions

    Cela pose probl\xE8me car il existe plusieurs cas o\xF9 les d\xE9veloppeurs doivent inclure des centaines de comptes sans signature dans une seule transaction. Cela n'est actuellement pas possible avec le mod\xE8le de transaction h\xE9rit\xE9e. La solution actuellement utilis\xE9e consiste \xE0 stocker temporairement l'\xE9tat sur la cha\xEEne et \xE0 le r\xE9utiliser ult\xE9rieurement dans des transactions. Cette solution de fortune ne fonctionne pas lorsque plusieurs programmes doivent \xEAtre compos\xE9s en une seule transaction. Chaque programme n\xE9cessite plusieurs comptes en entr\xE9e et nous tombons donc dans le m\xEAme probl\xE8me que pr\xE9c\xE9demment.

    C'est l\xE0 que les Tables de Consultation d'Adresses (LUT) sont utilis\xE9es.

    Tables de Consultation d'Adresses (LUT)

    L'id\xE9e derri\xE8re les Tables de Consultation d'Adresses est de stocker les adresses de comptes dans une structure de donn\xE9es de type table (tableau) sur la cha\xEEne. Une fois que les comptes sont stock\xE9s dans cette table, l'adresse de la table peut \xEAtre r\xE9f\xE9renc\xE9e dans un message de transaction. Pour pointer vers un compte en particulier dans la table, un index u8 de 1 octet est n\xE9cessaire.

    LUTs

    Cela permet de gagner de l'espace car les adresses ne doivent plus \xEAtre stock\xE9es dans le message de transaction. Ils doivent seulement \xEAtre r\xE9f\xE9renc\xE9s sous la forme d'un index dans le tableau. Cela conduit \xE0 la possibilit\xE9 de r\xE9f\xE9rencer 2^8=256 comptes, car les comptes sont r\xE9f\xE9renc\xE9s en utilisant un index u8.

    Les Tables de Consultation d'Adresses doivent \xEAtre exemptes de rente lors de leur initialisation ou chaque fois qu'une nouvelle adresse est ajout\xE9e \xE0 la table. Les adresses peuvent \xEAtre ajout\xE9es \xE0 cette table soit par un buffer on-chain, soit en les ajoutant directement \xE0 la table par l'instruction Extension. De plus, les Tables de Consultation d'Adresses peuvent stocker les m\xE9tadonn\xE9es associ\xE9es suivies d'un tableau compact de comptes. Vous pouvez voir ci-dessous la structure d'une Table de Consultation d'Adresses standard.

    LUT Format

    L'un des principaux inconv\xE9nients des Tables de Consultation d'Adresses est que, comme les recherches d'adresses n\xE9cessitent une charge suppl\xE9mentaire pendant le traitement des transactions, elles entra\xEEnent g\xE9n\xE9ralement des co\xFBts plus \xE9lev\xE9s pour une transaction.

    Transactions Versionn\xE9es : TransactionV0

    La structure des transactions h\xE9rit\xE9es doit \xEAtre modifi\xE9e pour int\xE9grer les consultations de la table d'adresses. Ces changements ne doivent pas perturber le traitement des transactions sur Solana, et ne doivent pas provoquer de changement de format des programmes invoqu\xE9s.

    Pour garantir cela, il est important de mentionner explicitement le type de transaction : legacy or versioned. Comment inclure ces informations dans une transaction ?

    Avant l'introduction du versionnage, les transactions avaient un bit sup\xE9rieur inutilis\xE9 dans le premier octet de leur en-t\xEAte : num_required_signatures. Nous pouvons maintenant utiliser ce bit pour d\xE9clarer explicitement la version de nos transactions.

    pub enum VersionedMessage {
    +import{_ as o,r,o as i,c as l,a as e,b as a,F as c,e as t,d as s}from"./app.d411e3b3.js";var u="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",p="/assets/legacy_message.09ab30b7.png",m="/assets/message_header.8eb7d589.png",b="/assets/compat_array_of_account_addresses.7792e5c7.png",h="/assets/compact_array_of_ixs.6281d70b.png",g="/assets/issues_with_legacy_txs.5766db66.png",_="/assets/luts.96a8a310.png",v="/assets/lut_format.060d6be2.png",f="/assets/messagev0.c089b240.png",k="/assets/compact_array_of_luts.9175e491.png",q="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},T=t('

    Transactions Versionn\xE9es

    Solana a r\xE9cemment sorti les Transactions Versionn\xE9es. Les changements propos\xE9s sont les suivants :

    1. Introduction d'un nouveau programme qui g\xE8re les tables de consultation d'adresses sur la cha\xEEne

    2. Ajout d'un nouveau format de transaction qui peut utiliser les tables de consultation d'adresses sur la cha\xEEne

    Faits

    Fiche d'Information

    • Les transactions h\xE9rit\xE9es ont un probl\xE8me majeur : La taille maximale autoris\xE9e est de 1232 octets ce qui fait que le nombre de comptes qui peuvent tenir dans une transaction atomique est de maximum 35 adresses.
    • Tables de Consultation d'Adresses (Address Lookup Tables, LUTs): Une fois que les comptes sont stock\xE9s dans cette table, l'adresse de la table peut \xEAtre r\xE9f\xE9renc\xE9e dans un message de transaction utilisant des indices u8 de 1 octet.
    • createLookupTable() de solana/web3.js peut \xEAtre utilis\xE9 pour construire une nouvelle table de consultation, ainsi que pour d\xE9terminer son adresse.
    • Une fois qu'une Table de Consultation d'Adresses est cr\xE9\xE9e, elle peut \xEAtre \xE9tendue, c'est-\xE0-dire que des comptes peuvent \xEAtre ajout\xE9s \xE0 la table.
    • Transactions Versionn\xE9es : La structure des transactions h\xE9rit\xE9es doit \xEAtre modifi\xE9e pour int\xE9grer les Tables de Consultation d'Adresses
    • Avant l'introduction du versionnage, les transactions avaient un bit sup\xE9rieur inutilis\xE9 dans le premier octet de leur en-t\xEAte. Celui-ci peut \xEAtre utilis\xE9 pour d\xE9clarer explicitement la version des transactions.

    Nous parlerons plus en d\xE9tail des changements introduits ci-dessus et de ce qu'ils signifient pour les d\xE9veloppeurs. Toutefois, pour mieux comprendre les changements, nous devons d'abord comprendre l'anatomie d'une transaction classique (ou h\xE9rit\xE9e).

    Transaction H\xE9rit\xE9e

    ',7),C=s("Le r\xE9seau Solana utilise une taille d'unit\xE9 transactionnelle maximale (MTU) de 1280 octets, conform\xE9ment aux contraintes de taille de l'"),L={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},y=s("IPv6 MTU"),V=s(" afin de garantir la vitesse et la fiabilit\xE9. Cela laisse "),w=e("strong",null,"1232 octets",-1),A=s(" pour les paquets de donn\xE9es comme les transactions s\xE9rialis\xE9es."),U=e("p",null,"Une transaction est compos\xE9e de :",-1),j=s("Un tableau compact de signatures, o\xF9 chaque signature est un "),S={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},I=s("ed25519"),N=s(" de 64 octets."),M=e("li",null,"Un message (h\xE9rit\xE9)",-1),P=e("p",null,[e("img",{src:u,alt:"Transaction Format"})],-1),B={class:"custom-container tip"},H=e("p",{class:"custom-container-title"},"Le format Tableau Compact",-1),E=e("p",null,"Un tableau compact est un tableau s\xE9rialis\xE9 de mani\xE8re \xE0 avoir les composants suivants :",-1),F=s("Une taille de tableau dans un encodage multi-octet appel\xE9 "),R={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},z=s("Compact-u16"),W=e("li",null,"Suivi de chaque \xE9l\xE9ment du tableau",-1),D=e("p",null,[e("img",{src:d,alt:"Compact array format"})],-1),K=t('

    Message H\xE9rit\xE9

    Un message h\xE9rit\xE9 comporte les \xE9l\xE9ments suivants :

    1. Un en-t\xEAte
    2. Un tableau compact d'adresses de comptes, o\xF9 chaque adresse de compte occupe 32 octets
    3. Un hash de bloc r\xE9cent
    • un hachage SHA-256 de 32 octets utilis\xE9 pour indiquer quand le registre a \xE9t\xE9 observ\xE9 pour la derni\xE8re fois. Si un hash de bloc est trop vieux, les validateurs le rejettent.
    1. Un tableau compact d'instructions

    Legacy Message

    En-t\xEAte

    L'en-t\xEAte du message a une taille de 3 octets et contient 3 entiers u8 :

    1. Le nombre de signatures requises : le runtime de Solana v\xE9rifie ce nombre avec la taille du tableau compact des signatures de la transaction.
    2. Le nombre d'adresses de comptes en lecture seule qui n\xE9cessitent une signature.
    3. Le nombre d'adresses de comptes en lecture seule qui ne n\xE9cessitent pas de signature.

    Message Header

    Tableau compact d'adresses de comptes

    Ce tableau compact commence par un encodage compact-u16 du nombre d'adresses de comptes, suivi par :

    1. Adresses de compte n\xE9cessitant une signature: Les adresses qui demandent un acc\xE8s en lecture et en \xE9criture sont list\xE9es en premier, suivies de celles qui demandent un acc\xE8s en lecture seule
    2. Adresses de comptes qui ne n\xE9cessitent pas de signature: Comme ci-dessus, les adresses qui demandent un acc\xE8s en lecture et en \xE9criture sont list\xE9es en premier, suivies de celles qui demandent un acc\xE8s en lecture seule

    Compact array of account addresses

    Tableau compact d'instructions

    Tout comme le tableau d'adresses de comptes, ce tableau compact commence par un encodage compact-u16 du nombre d'instructions, suivi d'un tableau d'instructions. Chaque instruction du tableau comporte les \xE9l\xE9ments suivants :

    1. Identifiant du programme: identifie un programme on-chain qui traitera l'instruction. Il est repr\xE9sent\xE9 par un index u8 vers une adresse dans le tableau compact d'adresses de comptes dans le message.
    2. Tableau compact d'index d'adresses de compte: index u8 vers un sous-ensemble d'adresses de comptes dans le tableau compact des adresses de comptes qui n\xE9cessitent une signature.
    3. Tableau compact de donn\xE9es opaques u8: un tableau d'octets d'usage g\xE9n\xE9ral qui est sp\xE9cifique \xE0 l'identifiant du programme mentionn\xE9 pr\xE9c\xE9demment. Ce tableau de donn\xE9es sp\xE9cifie toutes les op\xE9rations que le programme doit effectuer et toute information suppl\xE9mentaire que les comptes pourraient ne pas contenir.

    Compact array of Instructions

    Probl\xE8mes li\xE9s aux Transactions H\xE9rit\xE9es

    Quel est le probl\xE8me avec le mod\xE8le de transaction ci-dessus ?

    La taille maximale d'une transaction, et donc le nombre de comptes qui peuvent tenir dans une seule transaction atomique.

    Comme nous l'avons vu pr\xE9c\xE9demment, la taille maximale autoris\xE9e pour une transaction est de 1232 octets. La taille d'une adresse de compte est de 32 octets. Ainsi, une transaction peut au mieux stocker 35 comptes, en tenant compte d'un certain espace pour les en-t\xEAtes, les signatures et autres m\xE9tadonn\xE9es.

    Issue with legacy transactions

    Cela pose probl\xE8me car il existe plusieurs cas o\xF9 les d\xE9veloppeurs doivent inclure des centaines de comptes sans signature dans une seule transaction. Cela n'est actuellement pas possible avec le mod\xE8le de transaction h\xE9rit\xE9e. La solution actuellement utilis\xE9e consiste \xE0 stocker temporairement l'\xE9tat sur la cha\xEEne et \xE0 le r\xE9utiliser ult\xE9rieurement dans des transactions. Cette solution de fortune ne fonctionne pas lorsque plusieurs programmes doivent \xEAtre compos\xE9s en une seule transaction. Chaque programme n\xE9cessite plusieurs comptes en entr\xE9e et nous tombons donc dans le m\xEAme probl\xE8me que pr\xE9c\xE9demment.

    C'est l\xE0 que les Tables de Consultation d'Adresses (LUT) sont utilis\xE9es.

    Tables de Consultation d'Adresses (LUT)

    L'id\xE9e derri\xE8re les Tables de Consultation d'Adresses est de stocker les adresses de comptes dans une structure de donn\xE9es de type table (tableau) sur la cha\xEEne. Une fois que les comptes sont stock\xE9s dans cette table, l'adresse de la table peut \xEAtre r\xE9f\xE9renc\xE9e dans un message de transaction. Pour pointer vers un compte en particulier dans la table, un index u8 de 1 octet est n\xE9cessaire.

    LUTs

    Cela permet de gagner de l'espace car les adresses ne doivent plus \xEAtre stock\xE9es dans le message de transaction. Ils doivent seulement \xEAtre r\xE9f\xE9renc\xE9s sous la forme d'un index dans le tableau. Cela conduit \xE0 la possibilit\xE9 de r\xE9f\xE9rencer 2^8=256 comptes, car les comptes sont r\xE9f\xE9renc\xE9s en utilisant un index u8.

    Les Tables de Consultation d'Adresses doivent \xEAtre exemptes de rente lors de leur initialisation ou chaque fois qu'une nouvelle adresse est ajout\xE9e \xE0 la table. Les adresses peuvent \xEAtre ajout\xE9es \xE0 cette table soit par un buffer on-chain, soit en les ajoutant directement \xE0 la table par l'instruction Extension. De plus, les Tables de Consultation d'Adresses peuvent stocker les m\xE9tadonn\xE9es associ\xE9es suivies d'un tableau compact de comptes. Vous pouvez voir ci-dessous la structure d'une Table de Consultation d'Adresses standard.

    LUT Format

    L'un des principaux inconv\xE9nients des Tables de Consultation d'Adresses est que, comme les recherches d'adresses n\xE9cessitent une charge suppl\xE9mentaire pendant le traitement des transactions, elles entra\xEEnent g\xE9n\xE9ralement des co\xFBts plus \xE9lev\xE9s pour une transaction.

    Transactions Versionn\xE9es : TransactionV0

    La structure des transactions h\xE9rit\xE9es doit \xEAtre modifi\xE9e pour int\xE9grer les consultations de la table d'adresses. Ces changements ne doivent pas perturber le traitement des transactions sur Solana, et ne doivent pas provoquer de changement de format des programmes invoqu\xE9s.

    Pour garantir cela, il est important de mentionner explicitement le type de transaction : legacy or versioned. Comment inclure ces informations dans une transaction ?

    Avant l'introduction du versionnage, les transactions avaient un bit sup\xE9rieur inutilis\xE9 dans le premier octet de leur en-t\xEAte : num_required_signatures. Nous pouvons maintenant utiliser ce bit pour d\xE9clarer explicitement la version de nos transactions.

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.5b1ec8d4.js b/docs/.vuepress/dist/assets/versioned-transactions.html.9a3f546a.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.5b1ec8d4.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.9a3f546a.js
    index 57cff0e2b..77f130824 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.5b1ec8d4.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.9a3f546a.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r,o as i,c,a as e,b as n,F as l,e as t,d as a}from"./app.07ce7a66.js";var d="/assets/tx_format.1023848a.png",p="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",m="/assets/compat_array_of_account_addresses.7792e5c7.png",g="/assets/compact_array_of_ixs.6281d70b.png",b="/assets/issues_with_legacy_txs.5766db66.png",f="/assets/luts.96a8a310.png",y="/assets/lut_format.060d6be2.png",_="/assets/messagev0.c089b240.png",k="/assets/compact_array_of_luts.9175e491.png",w="/assets/new_compact_array_of_ixs.54090dc5.png";const v={},T=t('

    Versioned Transactions

    Solana recently released Versioned Transactions. The proposed changes are as follows:

    1. Introduce a new program which manages on-chain address lookup tables

    2. Add a new transaction format which can make use of on-chain address lookup tables

    Facts

    Fact Sheet

    • Legacy transactions have a major issue: Maximum allowed size of 1232 bytes, and hence the number of accounts that can fit in an atomic transaction: 35 addresses.
    • Address Lookup Tables (LUTs): Once accounts are stored in this table, the address of the table can be referenced in a transaction message using 1-byte u8 indices.
    • solana/web3.js's createLookupTable() can be used to construct a new lookup table, as well as determine its address.
    • Once an LUT is created, it can be extended, ie., accounts can be appended to the table.
    • Versioned Transactions: The structure of legacy transaction needs to be modified to incorporate LUTs
    • Before versioning was introduced, txs left an unused upper bit in the first byte of their headers, which can be used to explicitly declare the version of txs

    We'll talk more about the above introduced changes and what they mean for developers. To understand the changes better, however, we need to first understand the anatomy of a regular (or legacy) transaction.

    Legacy Transaction

    ',7),x=a("The Solana network uses a maximum transactional unit (MTU) size of 1280 bytes, adherent to the "),q={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},A=a("IPv6 MTU"),L=a(" size constraints to ensure speed and reliability. This leaves "),V=e("strong",null,"1232 bytes",-1),C=a(" for packet data like serialised transactions."),S=e("p",null,"A transaction is comprised of:",-1),U=a("A compact array of signatures, where each signature is a 64 byte "),I={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},M=a("ed25519"),j=a("."),W=e("li",null,"A (legacy) message",-1),B=e("p",null,[e("img",{src:d,alt:"Transaction Format"})],-1),H={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Compact-Array format",-1),R=e("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),N={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},E=a("Compact-u16"),z=e("li",null,"Followed by each array item",-1),O=e("p",null,[e("img",{src:p,alt:"Compact array format"})],-1),D=t('

    Legacy Message

    A Legacy Message has the following components:

    1. A header
    2. A compact-array of account addresses, where each account address takes 32 bytes
    3. A recent blockhash
    • a 32-byte SHA-256 hash used to indicate when ledger was last observed. If a blockhash is too old, validators reject it.
    1. A compact-array of Instructions

    Legacy Message

    The message header is 3 bytes in length and contains 3 u8 integers:

    1. The number of required signatures: the Solana runtime verifies this number with the length of the compact array of signatures in the transaction.
    2. The number of read-only account addresses that require signatures.
    3. The number of read-only account addresses that do not require signatures.

    Message Header

    Compact-array of account addresses

    This compact array starts with a compact-u16 encoding of the number of account addresses, followed by:

    1. Account addresses that require signatures: The addresses that request read and write access are listed first, followed by the ones that request for read-only access
    2. Account addresses that do not require signatures: Same as above, the addresses that request read and write access are listed first, followed by the ones that request for read-only access

    Compact array of account addresses

    Compact array of instructions

    Much like the array of account addresses, this compact array starts with a compact-u16 encoding of the number of instructions, followed by an array of instructions. Each instruction in the array has the following components:

    1. Program ID: identifies an on-chain program that will process the instruction. This is represented as a u8 index to an address in the compact array of account addresses inside the message.
    2. Compact array of account address indexes: u8 indexes to a subset of account addresses in the compact array of account addresses, that require signatures.
    3. Compact array of opaque u8 data: a general purpose byte array that is specific to the program ID mentioned before. This array of data specifies any operations that the program should perform and any additional information that the accounts might not contain.

    Compact array of Instructions

    Issues with Legacy Transactions

    What is the issue with the above Transaction model?

    The max size of a transaction, and hence the number of accounts that can fit in a single atomic transaction.

    As discussed earlier, the maximum allowed size of a transaction is 1232 bytes. The size of an account address is 32 bytes. Thus, a transaction can at the very best store 35 accounts, taking into account some space for headers, signatures and other metadata.

    Issue with legacy transactions

    This is problematic as there are several cases where developers need to include 100s of signature-free accounts in a single transaction. This is currently not possible with the legacy transaction model. The solution currently being used is to temporarily store state on-chain and consume it later in transactions. This workaround does not work when multiple programs need to be composed in a single transaction. Each program requires multiple accounts as input and hence we fall into the same problem as before.

    This is where Address Lookup Tables (LUT) are introduced.

    Address Lookup Tables (LUT)

    The idea behind Address Lookup Tables is to store account addresses in a table-like (array) data structure on-chain. Once accounts are stored in this table, the address of the table can be referenced in a transaction message. To point to an individual account within the table, a 1-byte u8 index is needed.

    LUTs

    This opens up space as addresses need not be stored inside the transaction message anymore. They only need to be referenced in the form of an index within the array like table. This leads to a possibility of referencing 2^8=256 accounts, as accounts are referenced using a u8 index.

    LUTs need to be rent-exempt when initialised or whenever a new address is added to the table. Addresses can be added to this table either by an on-chain buffer, or by directly appending them to the table through the Extension instruction. Furthermore, LUTs can store associated metadata followed by a compact-array of accounts. Below you can see the structure of a typical Address Lookup Table.

    LUT Format

    One important pitfall of LUTs is that since address lookups require extra overhead during transaction processing, they usually incur higher costs for a transaction.

    Versioned Transactions: TransactionV0

    The structure of legacy transaction needs to be modified to incorporate address table lookups. These changes should not break transaction processing on Solana, nor should they indicate any format changes to the invoked programs.

    To ensure the above, it is important to explicitly mention the transaction type: legacy or versioned. How do we include this information in a transaction?

    Before versioning was introduced, transactions left an unused upper bit in the first byte of their message headers: num_required_signatures. We can now use this bit to explicitly declare the version of our transactions.

    pub enum VersionedMessage {
    +import{_ as o,r,o as i,c,a as e,b as n,F as l,e as t,d as a}from"./app.d411e3b3.js";var d="/assets/tx_format.1023848a.png",p="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",h="/assets/message_header.8eb7d589.png",m="/assets/compat_array_of_account_addresses.7792e5c7.png",g="/assets/compact_array_of_ixs.6281d70b.png",b="/assets/issues_with_legacy_txs.5766db66.png",f="/assets/luts.96a8a310.png",y="/assets/lut_format.060d6be2.png",_="/assets/messagev0.c089b240.png",k="/assets/compact_array_of_luts.9175e491.png",w="/assets/new_compact_array_of_ixs.54090dc5.png";const v={},T=t('

    Versioned Transactions

    Solana recently released Versioned Transactions. The proposed changes are as follows:

    1. Introduce a new program which manages on-chain address lookup tables

    2. Add a new transaction format which can make use of on-chain address lookup tables

    Facts

    Fact Sheet

    • Legacy transactions have a major issue: Maximum allowed size of 1232 bytes, and hence the number of accounts that can fit in an atomic transaction: 35 addresses.
    • Address Lookup Tables (LUTs): Once accounts are stored in this table, the address of the table can be referenced in a transaction message using 1-byte u8 indices.
    • solana/web3.js's createLookupTable() can be used to construct a new lookup table, as well as determine its address.
    • Once an LUT is created, it can be extended, ie., accounts can be appended to the table.
    • Versioned Transactions: The structure of legacy transaction needs to be modified to incorporate LUTs
    • Before versioning was introduced, txs left an unused upper bit in the first byte of their headers, which can be used to explicitly declare the version of txs

    We'll talk more about the above introduced changes and what they mean for developers. To understand the changes better, however, we need to first understand the anatomy of a regular (or legacy) transaction.

    Legacy Transaction

    ',7),x=a("The Solana network uses a maximum transactional unit (MTU) size of 1280 bytes, adherent to the "),q={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},A=a("IPv6 MTU"),L=a(" size constraints to ensure speed and reliability. This leaves "),V=e("strong",null,"1232 bytes",-1),C=a(" for packet data like serialised transactions."),S=e("p",null,"A transaction is comprised of:",-1),U=a("A compact array of signatures, where each signature is a 64 byte "),I={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},M=a("ed25519"),j=a("."),W=e("li",null,"A (legacy) message",-1),B=e("p",null,[e("img",{src:d,alt:"Transaction Format"})],-1),H={class:"custom-container tip"},P=e("p",{class:"custom-container-title"},"Compact-Array format",-1),R=e("p",null,"A compact array is an array serialised to have the following components:",-1),F=a("An array length in a multi-byte encoding called "),N={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},E=a("Compact-u16"),z=e("li",null,"Followed by each array item",-1),O=e("p",null,[e("img",{src:p,alt:"Compact array format"})],-1),D=t('

    Legacy Message

    A Legacy Message has the following components:

    1. A header
    2. A compact-array of account addresses, where each account address takes 32 bytes
    3. A recent blockhash
    • a 32-byte SHA-256 hash used to indicate when ledger was last observed. If a blockhash is too old, validators reject it.
    1. A compact-array of Instructions

    Legacy Message

    The message header is 3 bytes in length and contains 3 u8 integers:

    1. The number of required signatures: the Solana runtime verifies this number with the length of the compact array of signatures in the transaction.
    2. The number of read-only account addresses that require signatures.
    3. The number of read-only account addresses that do not require signatures.

    Message Header

    Compact-array of account addresses

    This compact array starts with a compact-u16 encoding of the number of account addresses, followed by:

    1. Account addresses that require signatures: The addresses that request read and write access are listed first, followed by the ones that request for read-only access
    2. Account addresses that do not require signatures: Same as above, the addresses that request read and write access are listed first, followed by the ones that request for read-only access

    Compact array of account addresses

    Compact array of instructions

    Much like the array of account addresses, this compact array starts with a compact-u16 encoding of the number of instructions, followed by an array of instructions. Each instruction in the array has the following components:

    1. Program ID: identifies an on-chain program that will process the instruction. This is represented as a u8 index to an address in the compact array of account addresses inside the message.
    2. Compact array of account address indexes: u8 indexes to a subset of account addresses in the compact array of account addresses, that require signatures.
    3. Compact array of opaque u8 data: a general purpose byte array that is specific to the program ID mentioned before. This array of data specifies any operations that the program should perform and any additional information that the accounts might not contain.

    Compact array of Instructions

    Issues with Legacy Transactions

    What is the issue with the above Transaction model?

    The max size of a transaction, and hence the number of accounts that can fit in a single atomic transaction.

    As discussed earlier, the maximum allowed size of a transaction is 1232 bytes. The size of an account address is 32 bytes. Thus, a transaction can at the very best store 35 accounts, taking into account some space for headers, signatures and other metadata.

    Issue with legacy transactions

    This is problematic as there are several cases where developers need to include 100s of signature-free accounts in a single transaction. This is currently not possible with the legacy transaction model. The solution currently being used is to temporarily store state on-chain and consume it later in transactions. This workaround does not work when multiple programs need to be composed in a single transaction. Each program requires multiple accounts as input and hence we fall into the same problem as before.

    This is where Address Lookup Tables (LUT) are introduced.

    Address Lookup Tables (LUT)

    The idea behind Address Lookup Tables is to store account addresses in a table-like (array) data structure on-chain. Once accounts are stored in this table, the address of the table can be referenced in a transaction message. To point to an individual account within the table, a 1-byte u8 index is needed.

    LUTs

    This opens up space as addresses need not be stored inside the transaction message anymore. They only need to be referenced in the form of an index within the array like table. This leads to a possibility of referencing 2^8=256 accounts, as accounts are referenced using a u8 index.

    LUTs need to be rent-exempt when initialised or whenever a new address is added to the table. Addresses can be added to this table either by an on-chain buffer, or by directly appending them to the table through the Extension instruction. Furthermore, LUTs can store associated metadata followed by a compact-array of accounts. Below you can see the structure of a typical Address Lookup Table.

    LUT Format

    One important pitfall of LUTs is that since address lookups require extra overhead during transaction processing, they usually incur higher costs for a transaction.

    Versioned Transactions: TransactionV0

    The structure of legacy transaction needs to be modified to incorporate address table lookups. These changes should not break transaction processing on Solana, nor should they indicate any format changes to the invoked programs.

    To ensure the above, it is important to explicitly mention the transaction type: legacy or versioned. How do we include this information in a transaction?

    Before versioning was introduced, transactions left an unused upper bit in the first byte of their message headers: num_required_signatures. We can now use this bit to explicitly declare the version of our transactions.

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.7131c1ef.js b/docs/.vuepress/dist/assets/versioned-transactions.html.a1a0086a.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.7131c1ef.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.a1a0086a.js
    index 75745c80b..fa906de3a 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.7131c1ef.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.a1a0086a.js
    @@ -1,4 +1,4 @@
    -import{_ as o,r,o as c,c as i,a,b as e,F as p,e as t,d as s}from"./app.07ce7a66.js";var l="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",m="/assets/message_header.8eb7d589.png",h="/assets/compat_array_of_account_addresses.7792e5c7.png",g="/assets/compact_array_of_ixs.6281d70b.png",b="/assets/issues_with_legacy_txs.5766db66.png",_="/assets/luts.96a8a310.png",k="/assets/lut_format.060d6be2.png",y="/assets/messagev0.c089b240.png",f="/assets/compact_array_of_luts.9175e491.png",v="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},T=t('

    Versioned Transactions

    Solana \u0E40\u0E1E\u0E34\u0E48\u0E07\u0E08\u0E30\u0E1B\u0E25\u0E48\u0E2D\u0E22 Versioned Transactions \u0E2D\u0E2D\u0E01\u0E21\u0E32\u0E42\u0E14\u0E22\u0E21\u0E35\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E44\u0E1B\u0E01\u0E47\u0E04\u0E37\u0E2D:

    1. \u0E21\u0E35 program \u0E17\u0E35\u0E48\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23 on-chain address lookup tables

    2. \u0E21\u0E35 transaction \u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E43\u0E2B\u0E21\u0E48\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 on-chain address lookup tables \u0E44\u0E14\u0E49

    Facts (\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49)

    Fact Sheet

    • Transaction \u0E41\u0E1A\u0E1A\u0E40\u0E01\u0E48\u0E32\u0E08\u0E30\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E2D\u0E22\u0E39\u0E48: \u0E02\u0E19\u0E32\u0E14\u0E08\u0E33\u0E01\u0E31\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 1232 bytes, \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19 accounts \u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E08\u0E31\u0E14\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E14\u0E49\u0E43\u0E19 atomic transaction \u0E04\u0E37\u0E2D: 35 addresses.
    • Address Lookup Tables (LUTs): \u0E40\u0E21\u0E37\u0E48\u0E2D accounts \u0E16\u0E39\u0E01\u0E08\u0E31\u0E14\u0E40\u0E01\u0E47\u0E1A\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E19\u0E35\u0E49 \u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E2D\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E43\u0E19 transaction message \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49\u0E14\u0E31\u0E0A\u0E19\u0E35(index) u8 \u0E02\u0E19\u0E32\u0E14 1 \u0E44\u0E1A\u0E15\u0E4C
    • createLookupTable() \u0E43\u0E19 solana/web3.js \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E41\u0E25\u0E30\u0E2B\u0E32\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E2D\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E44\u0E14\u0E49
    • \u0E40\u0E21\u0E37\u0E48\u0E2D LUT \u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27 \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E02\u0E22\u0E32\u0E22\u0E44\u0E14\u0E49 \u0E01\u0E25\u0E48\u0E32\u0E27\u0E04\u0E37\u0E2D\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E44\u0E14\u0E49
    • Versioned Transactions: \u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E2D\u0E07\u0E18\u0E38\u0E23\u0E01\u0E23\u0E23\u0E21\u0E40\u0E01\u0E48\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E16\u0E39\u0E01\u0E1B\u0E23\u0E31\u0E1A\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E23\u0E27\u0E21 LUTs \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B
    • \u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E21\u0E35\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E21\u0E32\u0E43\u0E0A\u0E49 version \u0E43\u0E2B\u0E21\u0E48\u0E19\u0E35\u0E49 \u0E43\u0E19 Transactions \u0E08\u0E30\u0E21\u0E35 bit \u0E1A\u0E19\u0E2A\u0E38\u0E14\u0E02\u0E2D\u0E07 byte \u0E41\u0E23\u0E01\u0E43\u0E19 header \u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2D\u0E32\u0E21\u0E32\u0E43\u0E0A\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E23\u0E30\u0E1A\u0E38 version \u0E02\u0E2D\u0E07 Transactions \u0E44\u0E14\u0E49

    \u0E40\u0E23\u0E32\u0E08\u0E30\u0E1E\u0E39\u0E14\u0E16\u0E36\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 \u0E41\u0E25\u0E30 developers \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E21\u0E32\u0E01\u0E02\u0E36\u0E49\u0E19 \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21 \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 (anatomy)\u200B\u0E02\u0E2D\u0E07 transaction \u0E1B\u0E01\u0E15\u0E34 (\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E01\u0E48\u0E32) \u0E01\u0E48\u0E2D\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19

    Legacy Transaction

    ',7),q=s("The Solana network \u0E43\u0E0A\u0E49\u0E02\u0E19\u0E32\u0E14 maximum transactional unit (MTU) \u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 1280 bytes, \u0E15\u0E32\u0E21\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 "),w={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},L=s("IPv6 MTU"),C=s(" \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E40\u0E23\u0E47\u0E27 \u0E41\u0E25\u0E30\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E16\u0E37\u0E2D\u0E44\u0E14\u0E49 \u0E0B\u0E36\u0E48\u0E07\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E25\u0E37\u0E2D "),V=a("strong",null,"1232 bytes",-1),A=s(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A packet data \u0E40\u0E0A\u0E48\u0E19 serialised transactions."),S=a("p",null,"Transaction \u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22:",-1),U=s("Array \u0E02\u0E2D\u0E07 signatures, \u0E15\u0E31\u0E27\u0E25\u0E30 64 byte \u0E43\u0E19\u0E41\u0E1A\u0E1A "),M={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},j=s("ed25519"),I=s("."),B=a("li",null,"Message (\u0E41\u0E1A\u0E1A\u0E40\u0E01\u0E48\u0E32)",-1),P=a("p",null,[a("img",{src:l,alt:"Transaction Format"})],-1),H={class:"custom-container tip"},N=a("p",{class:"custom-container-title"},"Compact-Array format",-1),R=a("p",null,"Compact array \u0E04\u0E37\u0E2D array \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01 serialised \u0E15\u0E32\u0E21\u0E19\u0E35\u0E49:",-1),F=s("\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27 Array \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A multi-byte encoding \u0E17\u0E35\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 "),W={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},D=s("Compact-u16"),E=a("li",null,"\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07 array item",-1),K=a("p",null,[a("img",{src:d,alt:"Compact array format"})],-1),G=t('

    Legacy Message

    Legacy Message \u0E41\u0E1A\u0E1A\u0E40\u0E01\u0E48\u0E32\u0E08\u0E30\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E19\u0E35\u0E49:

    1. \u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E31\u0E27\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07 (header)
    2. compact-array \u0E02\u0E2D\u0E07 account addresses, \u0E17\u0E35\u0E48\u0E41\u0E15\u0E48\u0E25\u0E30 account address \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 32 bytes
    3. blockhash \u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14 (recent blockhash)
    • \u0E04\u0E37\u0E2D 32-byte SHA-256 hash \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E1A\u0E2D\u0E01\u0E40\u0E27\u0E25\u0E32\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E17\u0E35\u0E48\u0E25\u0E47\u0E2D\u0E04\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E16\u0E39\u0E01\u0E15\u0E23\u0E27\u0E08\u0E1E\u0E1A \u0E16\u0E49\u0E32 blockhash \u0E40\u0E01\u0E48\u0E32\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B validator \u0E08\u0E30\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18.
    1. compact-array \u0E02\u0E2D\u0E07 Instructions

    Legacy Message

    \u0E2B\u0E31\u0E27\u0E02\u0E2D\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21 (message header) \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 3 bytes \u0E41\u0E25\u0E30\u0E21\u0E35 u8 integers 3 \u0E15\u0E31\u0E27:

    1. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E25\u0E32\u0E22\u0E40\u0E0B\u0E47\u0E19\u0E17\u0E35\u0E48\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19 (required signatures): Solana runtime \u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E08\u0E33\u0E19\u0E27\u0E19\u0E19\u0E35\u0E49\u0E01\u0E31\u0E1A\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E02\u0E2D\u0E07 compact array \u0E02\u0E2D\u0E07 signatures \u0E43\u0E19 transaction.
    2. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 (read-only account addresses) \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures
    3. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 (read-only account addresses) \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures

    Message Header

    Compact-array \u0E02\u0E2D\u0E07 account addresses

    Compact array \u0E19\u0E35\u0E49\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E23\u0E2B\u0E31\u0E2A\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 account addresses \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 Compact-u16 \u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22:

    1. Account addresses \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures: \u0E41\u0E2A\u0E14\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19 \u0E41\u0E25\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27
    2. Account addresses \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures: \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E02\u0E49\u0E32\u0E07\u0E1A\u0E19\u0E04\u0E37\u0E2D \u0E41\u0E2A\u0E14\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19 \u0E41\u0E25\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27

    Compact array \u0E02\u0E2D\u0E07 account addresses

    Compact array \u0E02\u0E2D\u0E07 instructions

    \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E1A compact array \u0E02\u0E2D\u0E07 account addresses, compact array \u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23 encode \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 instructions \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 Compact-u16 \u0E41\u0E25\u0E49\u0E27\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22 array \u0E02\u0E2D\u0E07 instructions \u0E41\u0E15\u0E48\u0E25\u0E30\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E14\u0E31\u0E07\u0E19\u0E35\u0E49:

    1. Program ID: \u0E23\u0E30\u0E1A\u0E38\u0E42\u0E1B\u0E23\u0E41\u0E01\u0E23\u0E21 on-chain \u0E17\u0E35\u0E48\u0E08\u0E30\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 instruction \u0E19\u0E35\u0E49 \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E41\u0E17\u0E19\u0E14\u0E49\u0E27\u0E22 index \u0E02\u0E2D\u0E07 u8 \u0E43\u0E19 compact array \u0E02\u0E2D\u0E07 account addresses \u0E20\u0E32\u0E22\u0E43\u0E19 message.
    2. Compact array \u0E02\u0E2D\u0E07 account address indexes: u8 indexes \u0E02\u0E2D\u0E07 account addresses \u0E43\u0E19 compact array \u0E02\u0E2D\u0E07 account addresses \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures.
    3. Compact array \u0E02\u0E2D\u0E07 opaque u8 data: array \u0E02\u0E2D\u0E07 byte \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A program ID \u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E1E\u0E39\u0E14\u0E16\u0E36\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49. array \u0E02\u0E2D\u0E07 data \u0E19\u0E35\u0E49\u0E08\u0E30\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E42\u0E1B\u0E23\u0E41\u0E01\u0E23\u0E21\u0E04\u0E27\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21\u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E17\u0E35\u0E48\u0E2D\u0E32\u0E08\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1A\u0E2D\u0E01\u0E44\u0E27\u0E49\u0E43\u0E19 account.

    Compact array \u0E02\u0E2D\u0E07 Instructions

    \u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07 Legacy Transactions

    \u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E43\u0E19 Legacy Transactions \u0E04\u0E37\u0E2D\u0E2D\u0E30\u0E44\u0E23?

    \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 transaction \u0E0B\u0E36\u0E48\u0E07\u0E2B\u0E21\u0E32\u0E22\u0E16\u0E36\u0E07\u0E08\u0E33\u0E19\u0E27\u0E19\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E43\u0E19 atomic transaction \u0E44\u0E14\u0E49.

    \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 Transaction \u0E17\u0E35\u0E48\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14\u0E04\u0E37\u0E2D 1232 bytes. \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 account address \u0E04\u0E37\u0E2D 32 bytes. \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19 transaction \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E01\u0E47\u0E1A accounts \u0E44\u0E14\u0E49\u0E21\u0E32\u0E01\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14 35 accounts \u0E42\u0E14\u0E22\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A headers signatures \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 metadata \u0E14\u0E49\u0E27\u0E22.

    \u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07 legacy transactions

    \u0E19\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E1E\u0E23\u0E32\u0E30\u0E21\u0E35\u0E01\u0E23\u0E13\u0E35\u0E2B\u0E25\u0E32\u0E22\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 developers \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2A\u0E48 100 signature-free accounts \u0E43\u0E19 transaction \u0E40\u0E14\u0E35\u0E22\u0E27. \u0E0B\u0E36\u0E48\u0E07 legacy transaction \u0E40\u0E14\u0E34\u0E21\u0E19\u0E31\u0E49\u0E19\u0E08\u0E30\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49. \u0E27\u0E34\u0E18\u0E35\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E25\u0E31\u0E07\u0E16\u0E39\u0E01\u0E19\u0E33\u0E21\u0E32\u0E43\u0E0A\u0E49\u0E04\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A\u0E2A\u0E16\u0E32\u0E19\u0E30 (state) \u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27 on-chain \u0E41\u0E25\u0E30\u0E19\u0E33\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E43\u0E19 transactions \u0E17\u0E35\u0E2B\u0E25\u0E31\u0E07. \u0E0B\u0E36\u0E48\u0E07 workaround \u0E19\u0E35\u0E49\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E27\u0E25\u0E32\u0E43\u0E0A\u0E49 multiple programs \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07 compose \u0E43\u0E19 transaction \u0E40\u0E14\u0E35\u0E22\u0E27. \u0E0B\u0E36\u0E48\u0E07\u0E41\u0E15\u0E48\u0E25\u0E30 program \u0E01\u0E47\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 accounts \u0E2B\u0E25\u0E32\u0E22\u0E15\u0E31\u0E27\u0E40\u0E1B\u0E47\u0E19 input \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E40\u0E08\u0E2D\u0E01\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E40\u0E14\u0E34\u0E21\u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E40\u0E08\u0E2D\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E14\u0E35.

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E41\u0E01\u0E49\u0E44\u0E02\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E19\u0E35\u0E49\u0E08\u0E36\u0E07\u0E21\u0E35\u0E01\u0E32\u0E23\u0E19\u0E33\u0E40\u0E2A\u0E19\u0E2D Address Lookup Tables (LUT) \u0E02\u0E36\u0E49\u0E19\u0E21\u0E32

    Address Lookup Tables (LUT)

    \u0E41\u0E19\u0E27\u0E04\u0E34\u0E14\u0E02\u0E2D\u0E07 Address Lookup Tables \u0E04\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A account addresses \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A table-like (array) data structure \u0E1A\u0E19 on-chain. \u0E2B\u0E25\u0E31\u0E07\u0E08\u0E32\u0E01\u0E17\u0E35\u0E48 accounts \u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E19\u0E35\u0E49\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E16\u0E36\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E2D\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E19\u0E31\u0E49\u0E19\u0E43\u0E19 transaction message \u0E44\u0E14\u0E49 \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 1-byte u8 \u0E40\u0E1B\u0E47\u0E19 index \u0E0A\u0E35\u0E49\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E15\u0E48\u0E25\u0E30 account.

    LUTs

    \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E41\u0E1A\u0E1A\u0E19\u0E31\u0E49\u0E19\u0E40\u0E23\u0E32\u0E40\u0E25\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E01\u0E47\u0E1A addresses \u0E43\u0E19 transaction message \u0E2D\u0E35\u0E01\u0E15\u0E48\u0E2D\u0E44\u0E1B \u0E40\u0E23\u0E32\u0E41\u0E04\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A u8 \u0E44\u0E27\u0E49\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07 index \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E14\u0E49\u0E21\u0E32\u0E01\u0E16\u0E36\u0E07 2^8=256 accounts

    LUTs \u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33 rent-exempt \u0E40\u0E27\u0E25\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49 (initialised) \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48 address \u0E43\u0E2B\u0E21\u0E48\u0E16\u0E39\u0E01\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07. Addresses \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 on-chain buffer \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E1C\u0E48\u0E32\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 Extension \u0E43\u0E19 instruction. \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E19\u0E35\u0E49 LUTs \u0E22\u0E31\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E01\u0E47\u0E1A metadata \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22 compact-array \u0E02\u0E2D\u0E07 accounts \u0E44\u0E14\u0E49 \u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E2D\u0E07 Address Lookup Table \u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B

    LUT Format

    \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E27\u0E31\u0E07\u0E02\u0E2D\u0E07 LUTs \u0E04\u0E37\u0E2D\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01 address lookups \u0E08\u0E30\u0E21\u0E35 overhead \u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transaction, \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E04\u0E48\u0E32 fee \u0E2A\u0E39\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E32\u0E21\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22

    Versioned Transactions: TransactionV0

    \u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E2D\u0E07 legacy transaction \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E31\u0E1A\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49 address table lookups \u0E44\u0E14\u0E49. \u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E04\u0E27\u0E23\u0E44\u0E1B\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transaction \u0E1A\u0E19 Solana \u0E1E\u0E31\u0E07, \u0E41\u0E25\u0E30\u0E01\u0E47\u0E44\u0E21\u0E48\u0E04\u0E27\u0E23\u0E44\u0E1B\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E23\u0E35\u0E22\u0E01 program \u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E34\u0E21\u0E14\u0E49\u0E27\u0E22

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E27\u0E48\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E30\u0E44\u0E23\u0E1E\u0E31\u0E07 \u0E40\u0E23\u0E32\u0E08\u0E36\u0E07\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E19\u0E34\u0E14\u0E02\u0E2D\u0E07 transaction \u0E44\u0E27\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19\u0E27\u0E48\u0E32\u0E21\u0E31\u0E19\u0E40\u0E1B\u0E47\u0E19 legacy \u0E2B\u0E23\u0E37\u0E2D versioned. \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E2A\u0E48 version \u0E44\u0E1B\u0E15\u0E23\u0E07\u0E44\u0E2B\u0E19\u0E02\u0E2D\u0E07 transaction \u0E14\u0E35\u0E25\u0E48\u0E30?

    \u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 transactions \u0E08\u0E30\u0E40\u0E2B\u0E25\u0E37\u0E2D upper bit \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 byte \u0E41\u0E23\u0E01\u0E02\u0E2D\u0E07 message headers: num_required_signatures. \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49 bit \u0E19\u0E35\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28 version \u0E02\u0E2D\u0E07 transactions \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49.

    pub enum VersionedMessage {
    +import{_ as o,r,o as c,c as i,a,b as e,F as p,e as t,d as s}from"./app.d411e3b3.js";var l="/assets/tx_format.1023848a.png",d="/assets/compact_array_format.6984243f.png",u="/assets/legacy_message.09ab30b7.png",m="/assets/message_header.8eb7d589.png",h="/assets/compat_array_of_account_addresses.7792e5c7.png",g="/assets/compact_array_of_ixs.6281d70b.png",b="/assets/issues_with_legacy_txs.5766db66.png",_="/assets/luts.96a8a310.png",k="/assets/lut_format.060d6be2.png",y="/assets/messagev0.c089b240.png",f="/assets/compact_array_of_luts.9175e491.png",v="/assets/new_compact_array_of_ixs.54090dc5.png";const x={},T=t('

    Versioned Transactions

    Solana \u0E40\u0E1E\u0E34\u0E48\u0E07\u0E08\u0E30\u0E1B\u0E25\u0E48\u0E2D\u0E22 Versioned Transactions \u0E2D\u0E2D\u0E01\u0E21\u0E32\u0E42\u0E14\u0E22\u0E21\u0E35\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E44\u0E1B\u0E01\u0E47\u0E04\u0E37\u0E2D:

    1. \u0E21\u0E35 program \u0E17\u0E35\u0E48\u0E40\u0E2D\u0E32\u0E44\u0E27\u0E49\u0E08\u0E31\u0E14\u0E01\u0E32\u0E23 on-chain address lookup tables

    2. \u0E21\u0E35 transaction \u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E43\u0E2B\u0E21\u0E48\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19 on-chain address lookup tables \u0E44\u0E14\u0E49

    Facts (\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E19\u0E48\u0E32\u0E23\u0E39\u0E49)

    Fact Sheet

    • Transaction \u0E41\u0E1A\u0E1A\u0E40\u0E01\u0E48\u0E32\u0E08\u0E30\u0E21\u0E35\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E2D\u0E22\u0E39\u0E48: \u0E02\u0E19\u0E32\u0E14\u0E08\u0E33\u0E01\u0E31\u0E14\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 1232 bytes, \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19 accounts \u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E08\u0E31\u0E14\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E14\u0E49\u0E43\u0E19 atomic transaction \u0E04\u0E37\u0E2D: 35 addresses.
    • Address Lookup Tables (LUTs): \u0E40\u0E21\u0E37\u0E48\u0E2D accounts \u0E16\u0E39\u0E01\u0E08\u0E31\u0E14\u0E40\u0E01\u0E47\u0E1A\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E19\u0E35\u0E49 \u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E2D\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E43\u0E19 transaction message \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49\u0E14\u0E31\u0E0A\u0E19\u0E35(index) u8 \u0E02\u0E19\u0E32\u0E14 1 \u0E44\u0E1A\u0E15\u0E4C
    • createLookupTable() \u0E43\u0E19 solana/web3.js \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E04\u0E49\u0E19\u0E2B\u0E32\u0E43\u0E2B\u0E21\u0E48\u0E44\u0E14\u0E49 \u0E41\u0E25\u0E30\u0E2B\u0E32\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E2D\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E44\u0E14\u0E49
    • \u0E40\u0E21\u0E37\u0E48\u0E2D LUT \u0E16\u0E39\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E41\u0E25\u0E49\u0E27 \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E02\u0E22\u0E32\u0E22\u0E44\u0E14\u0E49 \u0E01\u0E25\u0E48\u0E32\u0E27\u0E04\u0E37\u0E2D\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E44\u0E14\u0E49
    • Versioned Transactions: \u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E2D\u0E07\u0E18\u0E38\u0E23\u0E01\u0E23\u0E23\u0E21\u0E40\u0E01\u0E48\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E16\u0E39\u0E01\u0E1B\u0E23\u0E31\u0E1A\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E23\u0E27\u0E21 LUTs \u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B
    • \u0E01\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E08\u0E30\u0E21\u0E35\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E21\u0E32\u0E43\u0E0A\u0E49 version \u0E43\u0E2B\u0E21\u0E48\u0E19\u0E35\u0E49 \u0E43\u0E19 Transactions \u0E08\u0E30\u0E21\u0E35 bit \u0E1A\u0E19\u0E2A\u0E38\u0E14\u0E02\u0E2D\u0E07 byte \u0E41\u0E23\u0E01\u0E43\u0E19 header \u0E17\u0E35\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E2D\u0E32\u0E21\u0E32\u0E43\u0E0A\u0E49\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E19\u0E01\u0E32\u0E23\u0E23\u0E30\u0E1A\u0E38 version \u0E02\u0E2D\u0E07 Transactions \u0E44\u0E14\u0E49

    \u0E40\u0E23\u0E32\u0E08\u0E30\u0E1E\u0E39\u0E14\u0E16\u0E36\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07 \u0E41\u0E25\u0E30 developers \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E2D\u0E30\u0E44\u0E23\u0E1A\u0E49\u0E32\u0E07\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E25\u0E30\u0E40\u0E2D\u0E35\u0E22\u0E14\u0E21\u0E32\u0E01\u0E02\u0E36\u0E49\u0E19 \u0E2D\u0E22\u0E48\u0E32\u0E07\u0E44\u0E23\u0E01\u0E47\u0E15\u0E32\u0E21 \u0E40\u0E23\u0E32\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07 (anatomy)\u200B\u0E02\u0E2D\u0E07 transaction \u0E1B\u0E01\u0E15\u0E34 (\u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E01\u0E48\u0E32) \u0E01\u0E48\u0E2D\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E40\u0E02\u0E49\u0E32\u0E43\u0E08\u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E44\u0E14\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19

    Legacy Transaction

    ',7),q=s("The Solana network \u0E43\u0E0A\u0E49\u0E02\u0E19\u0E32\u0E14 maximum transactional unit (MTU) \u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 1280 bytes, \u0E15\u0E32\u0E21\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 "),w={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},L=s("IPv6 MTU"),C=s(" \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E21\u0E35\u0E04\u0E27\u0E32\u0E21\u0E40\u0E23\u0E47\u0E27 \u0E41\u0E25\u0E30\u0E40\u0E0A\u0E37\u0E48\u0E2D\u0E16\u0E37\u0E2D\u0E44\u0E14\u0E49 \u0E0B\u0E36\u0E48\u0E07\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E2B\u0E25\u0E37\u0E2D "),V=a("strong",null,"1232 bytes",-1),A=s(" \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A packet data \u0E40\u0E0A\u0E48\u0E19 serialised transactions."),S=a("p",null,"Transaction \u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22:",-1),U=s("Array \u0E02\u0E2D\u0E07 signatures, \u0E15\u0E31\u0E27\u0E25\u0E30 64 byte \u0E43\u0E19\u0E41\u0E1A\u0E1A "),M={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},j=s("ed25519"),I=s("."),B=a("li",null,"Message (\u0E41\u0E1A\u0E1A\u0E40\u0E01\u0E48\u0E32)",-1),P=a("p",null,[a("img",{src:l,alt:"Transaction Format"})],-1),H={class:"custom-container tip"},N=a("p",{class:"custom-container-title"},"Compact-Array format",-1),R=a("p",null,"Compact array \u0E04\u0E37\u0E2D array \u0E17\u0E35\u0E48\u0E16\u0E39\u0E01 serialised \u0E15\u0E32\u0E21\u0E19\u0E35\u0E49:",-1),F=s("\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27 Array \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A multi-byte encoding \u0E17\u0E35\u0E48\u0E40\u0E23\u0E35\u0E22\u0E01\u0E27\u0E48\u0E32 "),W={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},D=s("Compact-u16"),E=a("li",null,"\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E41\u0E15\u0E48\u0E25\u0E30\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07 array item",-1),K=a("p",null,[a("img",{src:d,alt:"Compact array format"})],-1),G=t('

    Legacy Message

    Legacy Message \u0E41\u0E1A\u0E1A\u0E40\u0E01\u0E48\u0E32\u0E08\u0E30\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E14\u0E49\u0E27\u0E22\u0E2A\u0E48\u0E27\u0E19\u0E15\u0E48\u0E2D\u0E44\u0E1B\u0E19\u0E35\u0E49:

    1. \u0E2A\u0E48\u0E27\u0E19\u0E2B\u0E31\u0E27\u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07 (header)
    2. compact-array \u0E02\u0E2D\u0E07 account addresses, \u0E17\u0E35\u0E48\u0E41\u0E15\u0E48\u0E25\u0E30 account address \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 32 bytes
    3. blockhash \u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14 (recent blockhash)
    • \u0E04\u0E37\u0E2D 32-byte SHA-256 hash \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E1A\u0E2D\u0E01\u0E40\u0E27\u0E25\u0E32\u0E25\u0E48\u0E32\u0E2A\u0E38\u0E14\u0E17\u0E35\u0E48\u0E25\u0E47\u0E2D\u0E04\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E16\u0E39\u0E01\u0E15\u0E23\u0E27\u0E08\u0E1E\u0E1A \u0E16\u0E49\u0E32 blockhash \u0E40\u0E01\u0E48\u0E32\u0E40\u0E01\u0E34\u0E19\u0E44\u0E1B validator \u0E08\u0E30\u0E1B\u0E0F\u0E34\u0E40\u0E2A\u0E18.
    1. compact-array \u0E02\u0E2D\u0E07 Instructions

    Legacy Message

    \u0E2B\u0E31\u0E27\u0E02\u0E2D\u0E07\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21 (message header) \u0E08\u0E30\u0E21\u0E35\u0E02\u0E19\u0E32\u0E14 3 bytes \u0E41\u0E25\u0E30\u0E21\u0E35 u8 integers 3 \u0E15\u0E31\u0E27:

    1. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E25\u0E32\u0E22\u0E40\u0E0B\u0E47\u0E19\u0E17\u0E35\u0E48\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19 (required signatures): Solana runtime \u0E08\u0E30\u0E15\u0E23\u0E27\u0E08\u0E2A\u0E2D\u0E1A\u0E08\u0E33\u0E19\u0E27\u0E19\u0E19\u0E35\u0E49\u0E01\u0E31\u0E1A\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E02\u0E2D\u0E07 compact array \u0E02\u0E2D\u0E07 signatures \u0E43\u0E19 transaction.
    2. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 (read-only account addresses) \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures
    3. \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27 (read-only account addresses) \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures

    Message Header

    Compact-array \u0E02\u0E2D\u0E07 account addresses

    Compact array \u0E19\u0E35\u0E49\u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23\u0E40\u0E02\u0E49\u0E32\u0E23\u0E2B\u0E31\u0E2A\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 account addresses \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 Compact-u16 \u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22:

    1. Account addresses \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures: \u0E41\u0E2A\u0E14\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19 \u0E41\u0E25\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27
    2. Account addresses \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures: \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E02\u0E49\u0E32\u0E07\u0E1A\u0E19\u0E04\u0E37\u0E2D \u0E41\u0E2A\u0E14\u0E07\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23\u0E02\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E2A\u0E34\u0E17\u0E18\u0E34\u0E4C\u0E01\u0E32\u0E23\u0E2D\u0E48\u0E32\u0E19 \u0E41\u0E25\u0E30\u0E40\u0E02\u0E35\u0E22\u0E19\u0E01\u0E48\u0E2D\u0E19 \u0E41\u0E25\u0E49\u0E27\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22\u0E2D\u0E48\u0E32\u0E19\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E40\u0E14\u0E35\u0E22\u0E27

    Compact array \u0E02\u0E2D\u0E07 account addresses

    Compact array \u0E02\u0E2D\u0E07 instructions

    \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E01\u0E31\u0E1A compact array \u0E02\u0E2D\u0E07 account addresses, compact array \u0E08\u0E30\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22\u0E01\u0E32\u0E23 encode \u0E08\u0E33\u0E19\u0E27\u0E19\u0E02\u0E2D\u0E07 instructions \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 Compact-u16 \u0E41\u0E25\u0E49\u0E27\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22 array \u0E02\u0E2D\u0E07 instructions \u0E41\u0E15\u0E48\u0E25\u0E30\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E21\u0E35\u0E2A\u0E48\u0E27\u0E19\u0E1B\u0E23\u0E30\u0E01\u0E2D\u0E1A\u0E14\u0E31\u0E07\u0E19\u0E35\u0E49:

    1. Program ID: \u0E23\u0E30\u0E1A\u0E38\u0E42\u0E1B\u0E23\u0E41\u0E01\u0E23\u0E21 on-chain \u0E17\u0E35\u0E48\u0E08\u0E30\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 instruction \u0E19\u0E35\u0E49 \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E41\u0E17\u0E19\u0E14\u0E49\u0E27\u0E22 index \u0E02\u0E2D\u0E07 u8 \u0E43\u0E19 compact array \u0E02\u0E2D\u0E07 account addresses \u0E20\u0E32\u0E22\u0E43\u0E19 message.
    2. Compact array \u0E02\u0E2D\u0E07 account address indexes: u8 indexes \u0E02\u0E2D\u0E07 account addresses \u0E43\u0E19 compact array \u0E02\u0E2D\u0E07 account addresses \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 signatures.
    3. Compact array \u0E02\u0E2D\u0E07 opaque u8 data: array \u0E02\u0E2D\u0E07 byte \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E43\u0E0A\u0E49\u0E07\u0E32\u0E19\u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A program ID \u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E1E\u0E39\u0E14\u0E16\u0E36\u0E07\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49. array \u0E02\u0E2D\u0E07 data \u0E19\u0E35\u0E49\u0E08\u0E30\u0E23\u0E30\u0E1A\u0E38\u0E2A\u0E34\u0E48\u0E07\u0E17\u0E35\u0E48\u0E42\u0E1B\u0E23\u0E41\u0E01\u0E23\u0E21\u0E04\u0E27\u0E23\u0E14\u0E33\u0E40\u0E19\u0E34\u0E19\u0E01\u0E32\u0E23 \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E15\u0E34\u0E21\u0E2D\u0E37\u0E48\u0E19\u0E46 \u0E17\u0E35\u0E48\u0E2D\u0E32\u0E08\u0E44\u0E21\u0E48\u0E21\u0E35\u0E1A\u0E2D\u0E01\u0E44\u0E27\u0E49\u0E43\u0E19 account.

    Compact array \u0E02\u0E2D\u0E07 Instructions

    \u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07 Legacy Transactions

    \u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E43\u0E19 Legacy Transactions \u0E04\u0E37\u0E2D\u0E2D\u0E30\u0E44\u0E23?

    \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 transaction \u0E0B\u0E36\u0E48\u0E07\u0E2B\u0E21\u0E32\u0E22\u0E16\u0E36\u0E07\u0E08\u0E33\u0E19\u0E27\u0E19\u0E1A\u0E31\u0E0D\u0E0A\u0E35\u0E17\u0E35\u0E48\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E44\u0E14\u0E49\u0E43\u0E19 atomic transaction \u0E44\u0E14\u0E49.

    \u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22\u0E44\u0E27\u0E49\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 Transaction \u0E17\u0E35\u0E48\u0E2D\u0E19\u0E38\u0E0D\u0E32\u0E15\u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14\u0E04\u0E37\u0E2D 1232 bytes. \u0E02\u0E19\u0E32\u0E14\u0E02\u0E2D\u0E07 account address \u0E04\u0E37\u0E2D 32 bytes. \u0E14\u0E31\u0E07\u0E19\u0E31\u0E49\u0E19 transaction \u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E01\u0E47\u0E1A accounts \u0E44\u0E14\u0E49\u0E21\u0E32\u0E01\u0E17\u0E35\u0E48\u0E2A\u0E38\u0E14 35 accounts \u0E42\u0E14\u0E22\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A headers signatures \u0E41\u0E25\u0E30\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 metadata \u0E14\u0E49\u0E27\u0E22.

    \u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E02\u0E2D\u0E07 legacy transactions

    \u0E19\u0E35\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E40\u0E1E\u0E23\u0E32\u0E30\u0E21\u0E35\u0E01\u0E23\u0E13\u0E35\u0E2B\u0E25\u0E32\u0E22\u0E01\u0E23\u0E13\u0E35\u0E17\u0E35\u0E48 developers \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E43\u0E2A\u0E48 100 signature-free accounts \u0E43\u0E19 transaction \u0E40\u0E14\u0E35\u0E22\u0E27. \u0E0B\u0E36\u0E48\u0E07 legacy transaction \u0E40\u0E14\u0E34\u0E21\u0E19\u0E31\u0E49\u0E19\u0E08\u0E30\u0E44\u0E21\u0E48\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E23\u0E2D\u0E07\u0E23\u0E31\u0E1A\u0E44\u0E14\u0E49. \u0E27\u0E34\u0E18\u0E35\u0E01\u0E32\u0E23\u0E41\u0E01\u0E49\u0E44\u0E02\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E25\u0E31\u0E07\u0E16\u0E39\u0E01\u0E19\u0E33\u0E21\u0E32\u0E43\u0E0A\u0E49\u0E04\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A\u0E2A\u0E16\u0E32\u0E19\u0E30 (state) \u0E0A\u0E31\u0E48\u0E27\u0E04\u0E23\u0E32\u0E27 on-chain \u0E41\u0E25\u0E30\u0E19\u0E33\u0E44\u0E1B\u0E43\u0E0A\u0E49\u0E43\u0E19 transactions \u0E17\u0E35\u0E2B\u0E25\u0E31\u0E07. \u0E0B\u0E36\u0E48\u0E07 workaround \u0E19\u0E35\u0E49\u0E08\u0E30\u0E43\u0E0A\u0E49\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E40\u0E27\u0E25\u0E32\u0E43\u0E0A\u0E49 multiple programs \u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07 compose \u0E43\u0E19 transaction \u0E40\u0E14\u0E35\u0E22\u0E27. \u0E0B\u0E36\u0E48\u0E07\u0E41\u0E15\u0E48\u0E25\u0E30 program \u0E01\u0E47\u0E08\u0E30\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23 accounts \u0E2B\u0E25\u0E32\u0E22\u0E15\u0E31\u0E27\u0E40\u0E1B\u0E47\u0E19 input \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E40\u0E08\u0E2D\u0E01\u0E31\u0E1A\u0E02\u0E49\u0E2D\u0E08\u0E33\u0E01\u0E31\u0E14\u0E40\u0E14\u0E34\u0E21\u0E17\u0E35\u0E48\u0E40\u0E04\u0E22\u0E40\u0E08\u0E2D\u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E2D\u0E22\u0E39\u0E48\u0E14\u0E35.

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E41\u0E01\u0E49\u0E44\u0E02\u0E1B\u0E31\u0E0D\u0E2B\u0E32\u0E19\u0E35\u0E49\u0E08\u0E36\u0E07\u0E21\u0E35\u0E01\u0E32\u0E23\u0E19\u0E33\u0E40\u0E2A\u0E19\u0E2D Address Lookup Tables (LUT) \u0E02\u0E36\u0E49\u0E19\u0E21\u0E32

    Address Lookup Tables (LUT)

    \u0E41\u0E19\u0E27\u0E04\u0E34\u0E14\u0E02\u0E2D\u0E07 Address Lookup Tables \u0E04\u0E37\u0E2D\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A account addresses \u0E43\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A table-like (array) data structure \u0E1A\u0E19 on-chain. \u0E2B\u0E25\u0E31\u0E07\u0E08\u0E32\u0E01\u0E17\u0E35\u0E48 accounts \u0E16\u0E39\u0E01\u0E40\u0E01\u0E47\u0E1A\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E19\u0E35\u0E49\u0E41\u0E25\u0E49\u0E27 \u0E40\u0E23\u0E32\u0E08\u0E30\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07\u0E16\u0E36\u0E07\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E02\u0E2D\u0E07\u0E15\u0E32\u0E23\u0E32\u0E07\u0E19\u0E31\u0E49\u0E19\u0E43\u0E19 transaction message \u0E44\u0E14\u0E49 \u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 1-byte u8 \u0E40\u0E1B\u0E47\u0E19 index \u0E0A\u0E35\u0E49\u0E44\u0E1B\u0E17\u0E35\u0E48\u0E41\u0E15\u0E48\u0E25\u0E30 account.

    LUTs

    \u0E40\u0E1E\u0E23\u0E32\u0E30\u0E41\u0E1A\u0E1A\u0E19\u0E31\u0E49\u0E19\u0E40\u0E23\u0E32\u0E40\u0E25\u0E22\u0E44\u0E21\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E40\u0E01\u0E47\u0E1A addresses \u0E43\u0E19 transaction message \u0E2D\u0E35\u0E01\u0E15\u0E48\u0E2D\u0E44\u0E1B \u0E40\u0E23\u0E32\u0E41\u0E04\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E40\u0E01\u0E47\u0E1A u8 \u0E44\u0E27\u0E49\u0E2D\u0E49\u0E32\u0E07\u0E2D\u0E34\u0E07 index \u0E17\u0E33\u0E43\u0E2B\u0E49\u0E40\u0E23\u0E32\u0E08\u0E30\u0E40\u0E01\u0E47\u0E1A\u0E44\u0E14\u0E49\u0E21\u0E32\u0E01\u0E16\u0E36\u0E07 2^8=256 accounts

    LUTs \u0E15\u0E49\u0E2D\u0E07\u0E17\u0E33 rent-exempt \u0E40\u0E27\u0E25\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E43\u0E0A\u0E49 (initialised) \u0E2B\u0E23\u0E37\u0E2D\u0E17\u0E38\u0E01\u0E04\u0E23\u0E31\u0E49\u0E07\u0E17\u0E35\u0E48 address \u0E43\u0E2B\u0E21\u0E48\u0E16\u0E39\u0E01\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E40\u0E02\u0E49\u0E32\u0E44\u0E1B\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07. Addresses \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E44\u0E14\u0E49\u0E42\u0E14\u0E22\u0E43\u0E0A\u0E49 on-chain buffer \u0E2B\u0E23\u0E37\u0E2D\u0E40\u0E1E\u0E34\u0E48\u0E21\u0E42\u0E14\u0E22\u0E15\u0E23\u0E07\u0E43\u0E19\u0E15\u0E32\u0E23\u0E32\u0E07\u0E1C\u0E48\u0E32\u0E19\u0E04\u0E33\u0E2A\u0E31\u0E48\u0E07 Extension \u0E43\u0E19 instruction. \u0E19\u0E2D\u0E01\u0E08\u0E32\u0E01\u0E19\u0E35\u0E49 LUTs \u0E22\u0E31\u0E07\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E01\u0E47\u0E1A metadata \u0E17\u0E35\u0E48\u0E40\u0E01\u0E35\u0E48\u0E22\u0E27\u0E02\u0E49\u0E2D\u0E07\u0E15\u0E32\u0E21\u0E14\u0E49\u0E27\u0E22 compact-array \u0E02\u0E2D\u0E07 accounts \u0E44\u0E14\u0E49 \u0E14\u0E49\u0E32\u0E19\u0E25\u0E48\u0E32\u0E07\u0E19\u0E35\u0E49\u0E04\u0E37\u0E2D\u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E2D\u0E07 Address Lookup Table \u0E17\u0E31\u0E48\u0E27\u0E44\u0E1B

    LUT Format

    \u0E40\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E17\u0E35\u0E48\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E27\u0E31\u0E07\u0E02\u0E2D\u0E07 LUTs \u0E04\u0E37\u0E2D\u0E40\u0E19\u0E37\u0E48\u0E2D\u0E07\u0E08\u0E32\u0E01 address lookups \u0E08\u0E30\u0E21\u0E35 overhead \u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transaction, \u0E0B\u0E36\u0E48\u0E07\u0E08\u0E30\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E04\u0E48\u0E32 fee \u0E2A\u0E39\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E32\u0E21\u0E44\u0E1B\u0E14\u0E49\u0E27\u0E22

    Versioned Transactions: TransactionV0

    \u0E42\u0E04\u0E23\u0E07\u0E2A\u0E23\u0E49\u0E32\u0E07\u0E02\u0E2D\u0E07 legacy transaction \u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E31\u0E1A\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E43\u0E0A\u0E49 address table lookups \u0E44\u0E14\u0E49. \u0E01\u0E32\u0E23\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E41\u0E1B\u0E25\u0E07\u0E40\u0E2B\u0E25\u0E48\u0E32\u0E19\u0E35\u0E49\u0E44\u0E21\u0E48\u0E04\u0E27\u0E23\u0E44\u0E1B\u0E17\u0E33\u0E43\u0E2B\u0E49\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E21\u0E27\u0E25\u0E1C\u0E25 transaction \u0E1A\u0E19 Solana \u0E1E\u0E31\u0E07, \u0E41\u0E25\u0E30\u0E01\u0E47\u0E44\u0E21\u0E48\u0E04\u0E27\u0E23\u0E44\u0E1B\u0E40\u0E1B\u0E25\u0E35\u0E48\u0E22\u0E19\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E01\u0E32\u0E23\u0E40\u0E23\u0E35\u0E22\u0E01 program \u0E41\u0E1A\u0E1A\u0E40\u0E14\u0E34\u0E21\u0E14\u0E49\u0E27\u0E22

    \u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E43\u0E2B\u0E49\u0E21\u0E31\u0E48\u0E19\u0E43\u0E08\u0E27\u0E48\u0E32\u0E08\u0E30\u0E44\u0E21\u0E48\u0E21\u0E35\u0E2D\u0E30\u0E44\u0E23\u0E1E\u0E31\u0E07 \u0E40\u0E23\u0E32\u0E08\u0E36\u0E07\u0E08\u0E33\u0E40\u0E1B\u0E47\u0E19\u0E15\u0E49\u0E2D\u0E07\u0E23\u0E30\u0E1A\u0E38\u0E0A\u0E19\u0E34\u0E14\u0E02\u0E2D\u0E07 transaction \u0E44\u0E27\u0E49\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E0A\u0E31\u0E14\u0E40\u0E08\u0E19\u0E27\u0E48\u0E32\u0E21\u0E31\u0E19\u0E40\u0E1B\u0E47\u0E19 legacy \u0E2B\u0E23\u0E37\u0E2D versioned. \u0E41\u0E25\u0E49\u0E27\u0E40\u0E23\u0E32\u0E08\u0E30\u0E43\u0E2A\u0E48 version \u0E44\u0E1B\u0E15\u0E23\u0E07\u0E44\u0E2B\u0E19\u0E02\u0E2D\u0E07 transaction \u0E14\u0E35\u0E25\u0E48\u0E30?

    \u0E01\u0E48\u0E2D\u0E19\u0E2B\u0E19\u0E49\u0E32\u0E19\u0E35\u0E49 transactions \u0E08\u0E30\u0E40\u0E2B\u0E25\u0E37\u0E2D upper bit \u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E44\u0E14\u0E49\u0E43\u0E0A\u0E49\u0E2D\u0E22\u0E39\u0E48\u0E17\u0E35\u0E48 byte \u0E41\u0E23\u0E01\u0E02\u0E2D\u0E07 message headers: num_required_signatures. \u0E40\u0E23\u0E32\u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E43\u0E0A\u0E49 bit \u0E19\u0E35\u0E49\u0E43\u0E19\u0E01\u0E32\u0E23\u0E1B\u0E23\u0E30\u0E01\u0E32\u0E28 version \u0E02\u0E2D\u0E07 transactions \u0E02\u0E2D\u0E07\u0E40\u0E23\u0E32\u0E44\u0E14\u0E49.

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/assets/versioned-transactions.html.20e4c983.js b/docs/.vuepress/dist/assets/versioned-transactions.html.ee26ba8c.js
    similarity index 99%
    rename from docs/.vuepress/dist/assets/versioned-transactions.html.20e4c983.js
    rename to docs/.vuepress/dist/assets/versioned-transactions.html.ee26ba8c.js
    index ffe12b72d..c85a4f355 100644
    --- a/docs/.vuepress/dist/assets/versioned-transactions.html.20e4c983.js
    +++ b/docs/.vuepress/dist/assets/versioned-transactions.html.ee26ba8c.js
    @@ -1,4 +1,4 @@
    -import{_ as r,r as t,o as i,c as d,a,b as o,F as c,e as n,d as e}from"./app.07ce7a66.js";var p="/assets/tx_format.1023848a.png",l="/assets/compact_array_format.6984243f.png",m="/assets/legacy_message.09ab30b7.png",u="/assets/message_header.8eb7d589.png",g="/assets/compat_array_of_account_addresses.7792e5c7.png",b="/assets/compact_array_of_ixs.6281d70b.png",h="/assets/issues_with_legacy_txs.5766db66.png",_="/assets/luts.96a8a310.png",v="/assets/lut_format.060d6be2.png",q="/assets/messagev0.c089b240.png",y="/assets/compact_array_of_luts.9175e491.png",f="/assets/new_compact_array_of_ixs.54090dc5.png";const k={},x=n('

    Transa\xE7\xF5es Versionadas

    A Solana lan\xE7ou recentemente as "Transa\xE7\xF5es Versionadas". As mudan\xE7as propostas s\xE3o as seguintes:

    1. Introdu\xE7\xE3o de um novo programa que gerencia tabelas de pesquisa de endere\xE7os na cadeia

    2. Adi\xE7\xE3o de um novo formato de transa\xE7\xE3o que pode utilizar as tabelas de pesquisa de endere\xE7os na cadeia

    Fatos

    Ficha Informativa

    • As Transa\xE7\xF5es legadas (legacy) da Solana t\xEAm um problema importante: o tamanho m\xE1ximo permitido \xE9 de 1232 bytes, o que limita o n\xFAmero de contas que podem ser inclu\xEDdas em uma transa\xE7\xE3o at\xF4mica a 35 endere\xE7os.
    • As Tabelas de Pesquisa de Endere\xE7os (Address Lookup Tables, ou LUTs): Depois que as contas s\xE3o armazenadas em uma tabela LUT, o endere\xE7o da tabela pode ser referenciado em uma mensagem de transa\xE7\xE3o usando \xEDndices u8 de 1 byte.
    • A fun\xE7\xE3o createLookupTable() do solana/web3.js pode ser usada para construir uma nova tabela de pesquisa, bem como determinar seu endere\xE7o.
    • Uma vez criada uma LUT, ela pode ser estendida, ou seja, contas podem ser adicionadas \xE0 tabela.
    • As Transa\xE7\xF5es Versionadas mudam a estrutura das transa\xE7\xF5es legadas para incorporar as LUTs.
    • Antes da introdu\xE7\xE3o do versionamento, as transa\xE7\xF5es deixavam um bit superior n\xE3o utilizado no primeiro byte de seus cabe\xE7alhos, que agora pode ser usado para declarar explicitamente a vers\xE3o das transa\xE7\xF5es.

    Vamos falar mais sobre as mudan\xE7as introduzidas acima e o que elas significam para os desenvolvedores. No entanto, para entender melhor as mudan\xE7as, precisamos primeiro entender a anatomia de uma transa\xE7\xE3o regular (ou legada).

    Transa\xE7\xE3o Legada

    ',7),T=e("A rede Solana usa um tamanho m\xE1ximo de unidade transacional (MTU) de 1280 bytes, em conformidade com as restri\xE7\xF5es de tamanho do "),A={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},V=e("MTU IPv6"),z=e(" para garantir velocidade e confiabilidade. Isso deixa "),U=a("strong",null,"1232 bytes",-1),L=e(" para dados do pacote, como transa\xE7\xF5es serializadas."),w=a("p",null,"Uma transa\xE7\xE3o \xE9 composta por:",-1),C=e("Um array compacto de assinaturas, onde cada assinatura \xE9 um "),S={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},j=e("ed25519"),E=e(" de 64 bytes"),P=a("li",null,"Uma mensagem (legada)",-1),I=a("p",null,[a("img",{src:p,alt:"Formato da Transa\xE7\xE3o"})],-1),M={class:"custom-container tip"},O=a("p",{class:"custom-container-title"},"Formato de Array Compacto",-1),B=a("p",null,"Um array compacto \xE9 um array serializado que tem os seguintes componentes:",-1),F=e("O comprimento do array em uma codifica\xE7\xE3o de v\xE1rios bytes chamada "),N={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},D=e("Compact-u16"),R=a("li",null,"Seguido de cada item do array",-1),H=a("p",null,[a("img",{src:l,alt:"Formato do Array Compacto"})],-1),W=n('

    Mensagem Legada

    Uma Mensagem Legada tem os seguintes componentes:

    1. Um cabe\xE7alho
    2. Um array compacto de endere\xE7os de conta, onde cada endere\xE7o de conta ocupa 32 bytes
    3. Um hash de bloco recente
    • um hash SHA-256 de 32 bytes usado para indicar quando o livro-raz\xE3o foi visitado pela \xFAltima vez. Se um hash de bloco for muito antigo, os validadores o rejeitar\xE3o.
    1. Um array compacto de instru\xE7\xF5es

    Mensagem Legada

    Cabe\xE7alho

    O cabe\xE7alho da mensagem tem 3 bytes de comprimento e cont\xE9m 3 inteiros u8:

    1. O n\xFAmero de assinaturas necess\xE1rias: o tempo de execu\xE7\xE3o da Solana verifica este n\xFAmero com o comprimento do array compacto de assinaturas na transa\xE7\xE3o.
    2. O n\xFAmero de endere\xE7os de contas somente leitura que exigem assinaturas.
    3. O n\xFAmero de endere\xE7os de contas somente leitura que n\xE3o exigem assinaturas.

    Cabe\xE7alho da Mensagem

    Array compacto de endere\xE7os de conta

    Este array compacto come\xE7a com uma codifica\xE7\xE3o compact-u16 do n\xFAmero de endere\xE7os de conta, seguido por:

    1. Endere\xE7os de conta que exigem assinaturas: os endere\xE7os que solicitam acesso de leitura e grava\xE7\xE3o s\xE3o listados primeiro, seguidos pelos que solicitam acesso somente de leitura
    2. Endere\xE7os de conta que n\xE3o exigem assinaturas: mesmo que acima, os endere\xE7os que solicitam acesso de leitura e grava\xE7\xE3o s\xE3o listados primeiro, seguidos pelos que solicitam acesso somente de leitura

    Array compacto de endere\xE7os de conta

    Array compacto de instru\xE7\xF5es

    Assim como o array de endere\xE7os de conta, este array compacto come\xE7a com uma codifica\xE7\xE3o compact-u16 do n\xFAmero de instru\xE7\xF5es, seguido por um array de instru\xE7\xF5es. Cada instru\xE7\xE3o no array tem os seguintes componentes:

    1. ID do programa: identifica um programa na cadeia que processar\xE1 a instru\xE7\xE3o. Isso \xE9 representado como um \xEDndice u8 para um endere\xE7o no array compacto de endere\xE7os de conta dentro da mensagem.
    2. Array compacto de \xEDndices de endere\xE7os de conta: \xEDndices u8 para um subconjunto de endere\xE7os de conta no array compacto de endere\xE7os de conta, que exigem assinaturas.
    3. Array compacto de dados u8 opacos: um array de bytes de prop\xF3sito geral que \xE9 espec\xEDfico para o ID do programa mencionado anteriormente. Este array de dados especifica quaisquer opera\xE7\xF5es que o programa deve realizar e qualquer informa\xE7\xE3o adicional que as contas podem n\xE3o conter.

    Array compacto de instru\xE7\xF5es

    Problemas com as Transa\xE7\xF5es Legadas

    Qual \xE9 o problema com o modelo de transa\xE7\xE3o acima?

    O tamanho m\xE1ximo de uma transa\xE7\xE3o, e consequentemente o n\xFAmero de contas que podem caber em uma \xFAnica transa\xE7\xE3o at\xF4mica.

    Como discutido anteriormente, o tamanho m\xE1ximo permitido de uma transa\xE7\xE3o \xE9 de 1232 bytes. O tamanho de um endere\xE7o de conta \xE9 de 32 bytes. Assim, uma transa\xE7\xE3o pode no m\xE1ximo armazenar 35 contas, levando em considera\xE7\xE3o algum espa\xE7o para cabe\xE7alhos, assinaturas e outros metadados.

    Problemas com as Transa\xE7\xF5es Legadas

    Isso \xE9 problem\xE1tico, j\xE1 que h\xE1 v\xE1rios casos em que os desenvolvedores precisam incluir centenas de contas sem assinatura em uma \xFAnica transa\xE7\xE3o. Isso atualmente n\xE3o \xE9 poss\xEDvel com o modelo de transa\xE7\xE3o legada. A solu\xE7\xE3o atualmente utilizada \xE9 armazenar temporariamente o estado na cadeia e consumi-lo posteriormente em transa\xE7\xF5es. Essa solu\xE7\xE3o alternativa n\xE3o funciona quando v\xE1rios programas precisam ser compostos em uma \xFAnica transa\xE7\xE3o. Cada programa requer v\xE1rias contas como entrada e, portanto, ca\xEDmos no mesmo problema de antes.

    \xC9 aqui que as Tabelas de Pesquisa de Endere\xE7os (LUT) s\xE3o introduzidas.

    Tabelas de Pesquisa de Endere\xE7os (LUT)

    A ideia por tr\xE1s das Tabelas de Pesquisa de Endere\xE7os \xE9 armazenar endere\xE7os de contas em uma estrutura de dados em forma de tabela (array) na cadeia. Uma vez que as contas s\xE3o armazenadas nesta tabela, o endere\xE7o da tabela pode ser referenciado em uma mensagem de transa\xE7\xE3o. Para apontar para uma conta individual dentro da tabela, \xE9 necess\xE1rio um \xEDndice u8 de 1 byte.

    LUTs

    Isso libera espa\xE7o, j\xE1 que os endere\xE7os n\xE3o precisam mais ser armazenados dentro da mensagem da transa\xE7\xE3o. Eles apenas precisam ser referenciados na forma de um \xEDndice dentro da tabela em forma de array. Isso leva a uma possibilidade de referenciar 2^8=256 contas, j\xE1 que as contas s\xE3o referenciadas usando um \xEDndice u8.

    As LUTs precisam estar isentas de aluguel ao serem inicializadas ou sempre que um novo endere\xE7o \xE9 adicionado \xE0 tabela. Os endere\xE7os podem ser adicionados a essa tabela por meio de um buffer na cadeia, ou diretamente anexando-os \xE0 tabela por meio da instru\xE7\xE3o Extension. Al\xE9m disso, as LUTs podem armazenar metadados associados seguidos por um array compacto de contas. Abaixo, voc\xEA pode ver a estrutura de uma t\xEDpica Tabela de Pesquisa de Endere\xE7os.

    LUT Format

    Uma ponto de aten\xE7\xE3o importante das LUTs \xE9 que, como as pesquisas de endere\xE7o exigem sobrecarga extra durante o processamento da transa\xE7\xE3o, elas geralmente incorrem em custos mais altos para uma transa\xE7\xE3o.

    Transa\xE7\xF5es Versionadas: Transa\xE7\xE3o V0 (TransactionV0)

    A estrutura da transa\xE7\xE3o legada precisa ser modificada para incorporar as pesquisas de tabela de endere\xE7os. Essas mudan\xE7as n\xE3o devem quebrar o processamento de transa\xE7\xF5es na Solana, nem indicar quaisquer mudan\xE7as de formato para os programas invocados.

    Para garantir o que foi descrito acima, \xE9 importante mencionar explicitamente o tipo de transa\xE7\xE3o: legacy ou versioned. Como inclu\xEDmos essas informa\xE7\xF5es em uma transa\xE7\xE3o?

    Antes da introdu\xE7\xE3o ao versionamento, as transa\xE7\xF5es deixavam um bit superior n\xE3o utilizado nos cabe\xE7alhos de mensagem: num_required_signatures. Agora podemos usar esse bit para declarar explicitamente a vers\xE3o de nossas transa\xE7\xF5es.

    pub enum VersionedMessage {
    +import{_ as r,r as t,o as i,c as d,a,b as o,F as c,e as n,d as e}from"./app.d411e3b3.js";var p="/assets/tx_format.1023848a.png",l="/assets/compact_array_format.6984243f.png",m="/assets/legacy_message.09ab30b7.png",u="/assets/message_header.8eb7d589.png",g="/assets/compat_array_of_account_addresses.7792e5c7.png",b="/assets/compact_array_of_ixs.6281d70b.png",h="/assets/issues_with_legacy_txs.5766db66.png",_="/assets/luts.96a8a310.png",v="/assets/lut_format.060d6be2.png",q="/assets/messagev0.c089b240.png",y="/assets/compact_array_of_luts.9175e491.png",f="/assets/new_compact_array_of_ixs.54090dc5.png";const k={},x=n('

    Transa\xE7\xF5es Versionadas

    A Solana lan\xE7ou recentemente as "Transa\xE7\xF5es Versionadas". As mudan\xE7as propostas s\xE3o as seguintes:

    1. Introdu\xE7\xE3o de um novo programa que gerencia tabelas de pesquisa de endere\xE7os na cadeia

    2. Adi\xE7\xE3o de um novo formato de transa\xE7\xE3o que pode utilizar as tabelas de pesquisa de endere\xE7os na cadeia

    Fatos

    Ficha Informativa

    • As Transa\xE7\xF5es legadas (legacy) da Solana t\xEAm um problema importante: o tamanho m\xE1ximo permitido \xE9 de 1232 bytes, o que limita o n\xFAmero de contas que podem ser inclu\xEDdas em uma transa\xE7\xE3o at\xF4mica a 35 endere\xE7os.
    • As Tabelas de Pesquisa de Endere\xE7os (Address Lookup Tables, ou LUTs): Depois que as contas s\xE3o armazenadas em uma tabela LUT, o endere\xE7o da tabela pode ser referenciado em uma mensagem de transa\xE7\xE3o usando \xEDndices u8 de 1 byte.
    • A fun\xE7\xE3o createLookupTable() do solana/web3.js pode ser usada para construir uma nova tabela de pesquisa, bem como determinar seu endere\xE7o.
    • Uma vez criada uma LUT, ela pode ser estendida, ou seja, contas podem ser adicionadas \xE0 tabela.
    • As Transa\xE7\xF5es Versionadas mudam a estrutura das transa\xE7\xF5es legadas para incorporar as LUTs.
    • Antes da introdu\xE7\xE3o do versionamento, as transa\xE7\xF5es deixavam um bit superior n\xE3o utilizado no primeiro byte de seus cabe\xE7alhos, que agora pode ser usado para declarar explicitamente a vers\xE3o das transa\xE7\xF5es.

    Vamos falar mais sobre as mudan\xE7as introduzidas acima e o que elas significam para os desenvolvedores. No entanto, para entender melhor as mudan\xE7as, precisamos primeiro entender a anatomia de uma transa\xE7\xE3o regular (ou legada).

    Transa\xE7\xE3o Legada

    ',7),T=e("A rede Solana usa um tamanho m\xE1ximo de unidade transacional (MTU) de 1280 bytes, em conformidade com as restri\xE7\xF5es de tamanho do "),A={href:"https://en.wikipedia.org/wiki/IPv6_packet",target:"_blank",rel:"noopener noreferrer"},V=e("MTU IPv6"),z=e(" para garantir velocidade e confiabilidade. Isso deixa "),U=a("strong",null,"1232 bytes",-1),L=e(" para dados do pacote, como transa\xE7\xF5es serializadas."),w=a("p",null,"Uma transa\xE7\xE3o \xE9 composta por:",-1),C=e("Um array compacto de assinaturas, onde cada assinatura \xE9 um "),S={href:"https://ed25519.cr.yp.to/",target:"_blank",rel:"noopener noreferrer"},j=e("ed25519"),E=e(" de 64 bytes"),P=a("li",null,"Uma mensagem (legada)",-1),I=a("p",null,[a("img",{src:p,alt:"Formato da Transa\xE7\xE3o"})],-1),M={class:"custom-container tip"},O=a("p",{class:"custom-container-title"},"Formato de Array Compacto",-1),B=a("p",null,"Um array compacto \xE9 um array serializado que tem os seguintes componentes:",-1),F=e("O comprimento do array em uma codifica\xE7\xE3o de v\xE1rios bytes chamada "),N={href:"https://beta.docs.solana.com/developing/programming-model/transactions#compact-u16-format",target:"_blank",rel:"noopener noreferrer"},D=e("Compact-u16"),R=a("li",null,"Seguido de cada item do array",-1),H=a("p",null,[a("img",{src:l,alt:"Formato do Array Compacto"})],-1),W=n('

    Mensagem Legada

    Uma Mensagem Legada tem os seguintes componentes:

    1. Um cabe\xE7alho
    2. Um array compacto de endere\xE7os de conta, onde cada endere\xE7o de conta ocupa 32 bytes
    3. Um hash de bloco recente
    • um hash SHA-256 de 32 bytes usado para indicar quando o livro-raz\xE3o foi visitado pela \xFAltima vez. Se um hash de bloco for muito antigo, os validadores o rejeitar\xE3o.
    1. Um array compacto de instru\xE7\xF5es

    Mensagem Legada

    Cabe\xE7alho

    O cabe\xE7alho da mensagem tem 3 bytes de comprimento e cont\xE9m 3 inteiros u8:

    1. O n\xFAmero de assinaturas necess\xE1rias: o tempo de execu\xE7\xE3o da Solana verifica este n\xFAmero com o comprimento do array compacto de assinaturas na transa\xE7\xE3o.
    2. O n\xFAmero de endere\xE7os de contas somente leitura que exigem assinaturas.
    3. O n\xFAmero de endere\xE7os de contas somente leitura que n\xE3o exigem assinaturas.

    Cabe\xE7alho da Mensagem

    Array compacto de endere\xE7os de conta

    Este array compacto come\xE7a com uma codifica\xE7\xE3o compact-u16 do n\xFAmero de endere\xE7os de conta, seguido por:

    1. Endere\xE7os de conta que exigem assinaturas: os endere\xE7os que solicitam acesso de leitura e grava\xE7\xE3o s\xE3o listados primeiro, seguidos pelos que solicitam acesso somente de leitura
    2. Endere\xE7os de conta que n\xE3o exigem assinaturas: mesmo que acima, os endere\xE7os que solicitam acesso de leitura e grava\xE7\xE3o s\xE3o listados primeiro, seguidos pelos que solicitam acesso somente de leitura

    Array compacto de endere\xE7os de conta

    Array compacto de instru\xE7\xF5es

    Assim como o array de endere\xE7os de conta, este array compacto come\xE7a com uma codifica\xE7\xE3o compact-u16 do n\xFAmero de instru\xE7\xF5es, seguido por um array de instru\xE7\xF5es. Cada instru\xE7\xE3o no array tem os seguintes componentes:

    1. ID do programa: identifica um programa na cadeia que processar\xE1 a instru\xE7\xE3o. Isso \xE9 representado como um \xEDndice u8 para um endere\xE7o no array compacto de endere\xE7os de conta dentro da mensagem.
    2. Array compacto de \xEDndices de endere\xE7os de conta: \xEDndices u8 para um subconjunto de endere\xE7os de conta no array compacto de endere\xE7os de conta, que exigem assinaturas.
    3. Array compacto de dados u8 opacos: um array de bytes de prop\xF3sito geral que \xE9 espec\xEDfico para o ID do programa mencionado anteriormente. Este array de dados especifica quaisquer opera\xE7\xF5es que o programa deve realizar e qualquer informa\xE7\xE3o adicional que as contas podem n\xE3o conter.

    Array compacto de instru\xE7\xF5es

    Problemas com as Transa\xE7\xF5es Legadas

    Qual \xE9 o problema com o modelo de transa\xE7\xE3o acima?

    O tamanho m\xE1ximo de uma transa\xE7\xE3o, e consequentemente o n\xFAmero de contas que podem caber em uma \xFAnica transa\xE7\xE3o at\xF4mica.

    Como discutido anteriormente, o tamanho m\xE1ximo permitido de uma transa\xE7\xE3o \xE9 de 1232 bytes. O tamanho de um endere\xE7o de conta \xE9 de 32 bytes. Assim, uma transa\xE7\xE3o pode no m\xE1ximo armazenar 35 contas, levando em considera\xE7\xE3o algum espa\xE7o para cabe\xE7alhos, assinaturas e outros metadados.

    Problemas com as Transa\xE7\xF5es Legadas

    Isso \xE9 problem\xE1tico, j\xE1 que h\xE1 v\xE1rios casos em que os desenvolvedores precisam incluir centenas de contas sem assinatura em uma \xFAnica transa\xE7\xE3o. Isso atualmente n\xE3o \xE9 poss\xEDvel com o modelo de transa\xE7\xE3o legada. A solu\xE7\xE3o atualmente utilizada \xE9 armazenar temporariamente o estado na cadeia e consumi-lo posteriormente em transa\xE7\xF5es. Essa solu\xE7\xE3o alternativa n\xE3o funciona quando v\xE1rios programas precisam ser compostos em uma \xFAnica transa\xE7\xE3o. Cada programa requer v\xE1rias contas como entrada e, portanto, ca\xEDmos no mesmo problema de antes.

    \xC9 aqui que as Tabelas de Pesquisa de Endere\xE7os (LUT) s\xE3o introduzidas.

    Tabelas de Pesquisa de Endere\xE7os (LUT)

    A ideia por tr\xE1s das Tabelas de Pesquisa de Endere\xE7os \xE9 armazenar endere\xE7os de contas em uma estrutura de dados em forma de tabela (array) na cadeia. Uma vez que as contas s\xE3o armazenadas nesta tabela, o endere\xE7o da tabela pode ser referenciado em uma mensagem de transa\xE7\xE3o. Para apontar para uma conta individual dentro da tabela, \xE9 necess\xE1rio um \xEDndice u8 de 1 byte.

    LUTs

    Isso libera espa\xE7o, j\xE1 que os endere\xE7os n\xE3o precisam mais ser armazenados dentro da mensagem da transa\xE7\xE3o. Eles apenas precisam ser referenciados na forma de um \xEDndice dentro da tabela em forma de array. Isso leva a uma possibilidade de referenciar 2^8=256 contas, j\xE1 que as contas s\xE3o referenciadas usando um \xEDndice u8.

    As LUTs precisam estar isentas de aluguel ao serem inicializadas ou sempre que um novo endere\xE7o \xE9 adicionado \xE0 tabela. Os endere\xE7os podem ser adicionados a essa tabela por meio de um buffer na cadeia, ou diretamente anexando-os \xE0 tabela por meio da instru\xE7\xE3o Extension. Al\xE9m disso, as LUTs podem armazenar metadados associados seguidos por um array compacto de contas. Abaixo, voc\xEA pode ver a estrutura de uma t\xEDpica Tabela de Pesquisa de Endere\xE7os.

    LUT Format

    Uma ponto de aten\xE7\xE3o importante das LUTs \xE9 que, como as pesquisas de endere\xE7o exigem sobrecarga extra durante o processamento da transa\xE7\xE3o, elas geralmente incorrem em custos mais altos para uma transa\xE7\xE3o.

    Transa\xE7\xF5es Versionadas: Transa\xE7\xE3o V0 (TransactionV0)

    A estrutura da transa\xE7\xE3o legada precisa ser modificada para incorporar as pesquisas de tabela de endere\xE7os. Essas mudan\xE7as n\xE3o devem quebrar o processamento de transa\xE7\xF5es na Solana, nem indicar quaisquer mudan\xE7as de formato para os programas invocados.

    Para garantir o que foi descrito acima, \xE9 importante mencionar explicitamente o tipo de transa\xE7\xE3o: legacy ou versioned. Como inclu\xEDmos essas informa\xE7\xF5es em uma transa\xE7\xE3o?

    Antes da introdu\xE7\xE3o ao versionamento, as transa\xE7\xF5es deixavam um bit superior n\xE3o utilizado nos cabe\xE7alhos de mensagem: num_required_signatures. Agora podemos usar esse bit para declarar explicitamente a vers\xE3o de nossas transa\xE7\xF5es.

    pub enum VersionedMessage {
         Legacy(Message),
         V0(v0::Message),
     }
    diff --git a/docs/.vuepress/dist/core-concepts/accounts.html b/docs/.vuepress/dist/core-concepts/accounts.html
    index 18a376fb6..b411732c6 100644
    --- a/docs/.vuepress/dist/core-concepts/accounts.html
    +++ b/docs/.vuepress/dist/core-concepts/accounts.html
    @@ -23,11 +23,11 @@
     			}
         
         Accounts | Solana Cookbook
    -    
    +    
         
       
       
         

    Accounts

    Accounts within Solana are used to store state. They are an essential building block for developing on Solana.

    Facts

    Fact Sheet

    • Accounts are used to store data
    • Each account has a unique address
    • Accounts have a max size of 10MB (10 Mega Bytes)
    • PDA accounts have a max size of 10KB (10 Kilo Bytes)
    • PDA accounts can be used to sign on behalf of a program
    • Accounts size are fixed at creation time, but can be adjusted using reallocopen in new window
    • Account data storage is paid with rent
    • Default account owner is the System Program

    Deep Dive

    Account Model

    There are 3 kinds of accounts on Solana:

    • Data accounts store data
    • Program accounts store executable programs
    • Native accounts that indicate native programs on Solana such as System, Stake, and Vote

    Within data accounts, there are 2 types:

    • System owned accounts
    • PDA (Program Derived Address) accounts

    Each account has an address (usually a public key) and an owner (address of a program account). The full field list an account stores is found below.

    FieldDescription
    lamportsThe number of lamports owned by this account
    ownerThe program owner of this account
    executableWhether this account can process instructions
    dataThe raw data byte array stored by this account
    rent_epochThe next epoch that this account will owe rent

    There are a few important ownership rules:

    • Only a data account's owner can modify its data and debit lamports
    • Anyone is allowed to credit lamports to a data account
    • The owner of an account may assign a new owner if the account's data is zeroed out

    Program accounts do not store state.

    For example, if you have a counter program that lets you increment a counter, you must create two accounts, one account to store the program's code, and one to store the counter.

    To prevent an account from being deleted, you must pay rent.

    Rent

    Storing data on accounts costs SOL to maintain, and it is funded by what is called rent. If you maintain a minimum balance equivalent to 2 years of rent payments in an account, your account will be exempt from paying rent. You can retrieve rent by closing the account and sending the lamports back to your wallet.

    Rent is paid during two different timings:

    1. When referenced by a transaction
    2. Once an epoch

    A percentage of rent collected by accounts is destroyed, while the rest is distributed to vote accounts at the end of every slot.

    If the account does not have enough to pay rent, the account will be deallocated and the data removed.

    It is also important to note that new accounts must be rent exempt.

    Other Resources

    Credit

    This core concept is credited to Pencilflip. Follow him on Twitteropen in new window.

    Last Updated:
    Contributors: Jacob CG, Ashwin Prasad, Ayush, Hector Bardales, dtlehrer, mwrites
    - + diff --git a/docs/.vuepress/dist/core-concepts/cpi.html b/docs/.vuepress/dist/core-concepts/cpi.html index 8613d349c..15f5a87cb 100644 --- a/docs/.vuepress/dist/core-concepts/cpi.html +++ b/docs/.vuepress/dist/core-concepts/cpi.html @@ -23,7 +23,7 @@ } Cross Program Invocations (CPIs) | Solana Cookbook - + @@ -92,6 +92,6 @@ account_three.clone(), ];

    While this section has provided a high-level overview of CPIs, more detailed explanations, examples, and walkthroughs can be found in the linked resources below.

    Other Resources

    Last Updated:
    Contributors: John
    - + diff --git a/docs/.vuepress/dist/core-concepts/pdas.html b/docs/.vuepress/dist/core-concepts/pdas.html index 27f070682..832df1ee6 100644 --- a/docs/.vuepress/dist/core-concepts/pdas.html +++ b/docs/.vuepress/dist/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) | Solana Cookbook - +

    Program Derived Addresses (PDAs)

    Program Derived Addresses (PDAs) are home to accounts that are designed to be controlled by a specific program. With PDAs, programs can programmatically sign for certain addresses without needing a private key. PDAs serve as the foundation for Cross-Program Invocationopen in new window, which allows Solana apps to be composable with one another.

    Facts

    Fact Sheet

    • PDAs are 32 byte strings that look like public keys, but don’t have corresponding private keys
    • findProgramAddress will deterministically derive a PDA from a programId and seeds (collection of bytes)
    • A bump (one byte) is used to push a potential PDA off the ed25519 elliptic curve
    • Programs can sign for their PDAs by providing the seeds and bump to invoke_signedopen in new window
    • A PDA can only be signed by the program from which it was derived
    • In addition to allowing for programs to sign for different instructions, PDAs also provide a hashmap-like interface for indexing accounts

    Deep Dive

    PDAs are an essential building block for developing programs on Solana. With PDAs, programs can sign for accounts while guaranteeing that no external user could also generate a valid signature for the same account. In addition to signing for accounts, certain programs can also modify accounts held at their PDAs.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs

    To understand the concept behind PDAs, it may be helpful to consider that PDAs are not technically created, but rather found. PDAs are generated from a combination of seeds (such as the string “vote_account”) and a program id. This combination of seeds and program id is then run through a sha256 hash function to see whether or not they generate a public key that lies on the ed25519 elliptic curve.

    In running our program id and seeds through a hash function, there is a ~50% chance that we actually end up with a valid public key that does lie on the elliptic curve. In this case, we simply add something to fudge our input a little bit and try again. The technical term for this fudge factor is a bump. In Solana, we start with bump = 255 and simply iterate down through bump = 254, bump = 253, etc. until we get an address that is not on the elliptic curve. This may seem rudimentary, but once found it gives us a deterministic way of deriving the same PDA over and over again.

    PDA on the ellipitic curve

    Interacting with PDAs

    When a PDA is generated, findProgramAddress will return both the address and the bump used to kick the address off of the elliptic curve. Armed with this bump, a program can then sign for any instruction that requires its PDA. In order to sign, programs should pass the instruction, the list of accounts, and the seeds and bump used to derive the PDA to invoke_signed. In addition to signing for instructions, PDAs must also sign for their own creation via invoke_signed.

    When building with PDAs, it is common to store the bump seedopen in new window in the account data itself. This allows developers to easily validate a PDA without having to pass in the bump as an instruction argument.

    Other Resources

    Last Updated:
    Contributors: Brian Friel, Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/core-concepts/programs.html b/docs/.vuepress/dist/core-concepts/programs.html index d00434151..30f6c0b38 100644 --- a/docs/.vuepress/dist/core-concepts/programs.html +++ b/docs/.vuepress/dist/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programs | Solana Cookbook - +

    Programs

    Any developer can write and deploy programs to the Solana blockchain. Programs (known as smart contracts on other protocols) serve as the foundation for on-chain activity, powering anything from DeFi and NFTs to Social Media and Gaming.

    Facts

    Fact Sheet

    • Programs process instructions from both end users and other programs
    • All programs are stateless: any data they interact with is stored in separate accounts that are passed in via instructions
    • Programs themselves are stored in accounts marked as executable
    • All programs are owned by the BPF Loaderopen in new window and executed by the Solana Runtimeopen in new window
    • Developers most commonly write programs in Rust or C++, but can choose any language that targets the LLVMopen in new window's BPFopen in new window backend
    • All programs have a single entry point where instruction processing takes place (i.e. process_instruction); parameters always include:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Deep Dive

    Unlike most other blockchains, Solana completely separates code from data. All data that programs interact with are stored in separate accounts and passed in as references via instructions. This model allows for a single generic program to operate across various accounts without requiring additional deployments. Common examples of this pattern are seen across the Native and SPL Programs.

    Native Programs & The Solana Program Library (SPL)

    Solana comes equipped with a number of programs that serve as core building blocks for on-chain interactions. These programs are divided into Native Programsopen in new window and Solana Program Library (SPL) Programsopen in new window.

    Native Programs provide the base functionality that is required to operate validators. Among these programs, the most well known is the System Programopen in new window which is responsible for administering new accounts and transferring SOL between two parties.

    SPL Programs support a number of on-chain activities, including creating, swapping, and lending tokens, as well as generating stake pools and maintaining an on-chain name service. The SPL Token Programopen in new window can be invoked directly via the CLI, while others like the Associated Token Account Programopen in new window are usually composed with custom programs.

    Writing Programs

    Programs are most commonly developed with Rust or C++, but can be developed with any language that targets the LLVM’s BPF backend. Recent initiatives by Neon Labsopen in new window and Solangopen in new window enable EVMopen in new window compatibility and allow developers to write programs in Solidity.

    Most Rust-based programs adhere to the following architecture:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors

    Recently, Anchoropen in new window has emerged as a popular framework for developing programs. Anchor is an opinionated framework, akin to Ruby on Rails, that reduces boilerplate and streamlines the (de)serialization process for Rust-based development.

    Programs are usually developed and tested against Localhost and Devnet environments before being deployed to Testnet or Mainnet. Solana supports the following environments:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Once deployed to an environment, clients can interact with on-chain programs via RPC connectionsopen in new window to the respective cluster.

    Deploying Programs

    Developers can deploy their programs via the CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    When a program is deployed, it is compiled to an ELF shared objectopen in new window (containing BPF bytecode) and uploaded to the Solana cluster. Programs live in accounts (much like everything else on Solana), except these accounts are marked as executable and assigned to the BPF Loader. The address of this account is referred to as the program_id and is used to reference the program in all future transactions.

    Solana supports multiple BPF Loaders, with the latest being the Upgradable BPF Loaderopen in new window. The BPF Loader is responsible for administering the program’s account and making it available to clients via the program_id. All programs have a single entry point where instruction processing takes place (i.e. process_instruction) and parameters always include:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Once invoked, programs are executed by the Solana Runtime.

    Other Resources

    Last Updated:
    Contributors: Brian Friel, Ayush, Leon, Rishabh Kumar Bahukhandi, dtlehrer, soyboy
    - + diff --git a/docs/.vuepress/dist/core-concepts/transactions.html b/docs/.vuepress/dist/core-concepts/transactions.html index 516eea299..60adf95e6 100644 --- a/docs/.vuepress/dist/core-concepts/transactions.html +++ b/docs/.vuepress/dist/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions | Solana Cookbook - +

    Transactions

    Clients can invoke programs by submitting a transaction to a cluster. A single transaction can include multiple instructions, each targeting its own program. When a transaction is submitted, the Solana Runtimeopen in new window will process its instructions in order and atomically. If any part of an instruction fails, the entire transaction will fail.

    Facts

    Fact Sheet

    • Instructions are the most basic operational unit on Solana
    • Each instruction contains:
      • The program_id of the intended program
      • An array of all accounts it intends to read from or write to
      • An instruction_data byte array that is specific to the intended program
    • Multiple instructions can be bundled into a single transaction
    • Each transaction contains:
      • An array of all accounts it intends to read from or write to
      • One or more instructions
      • A recent blockhash
      • One or more signatures
    • Instructions are processed in order and atomically
    • If any part of an instruction fails, the entire transaction fails.
    • Transactions are limited to 1232 bytes

    Deep Dive

    The Solana Runtime requires both instructions and transactions to specify a list of all accounts they intended to read from or write to. By requiring these accounts in advance, the runtime is able to parallelize execution across all transactions.

    When a transaction is submitted to a cluster, the runtime will process its instructions in order and atomically. For each instruction, the receiving program will interpret its data array and operate on its specified accounts. The program will either return successfully or with an error code. If an error is returned, the entire transaction will fail immediately.

    Any transaction that aims to debit an account or modify its data requires the signature of its account holder. Any account that will be modified is marked as writable. An account can be credited without the holder’s permission so long as the transaction fee payer covers the necessary rent and transaction fees.

    Before submission, all transactions must reference a recent blockhashopen in new window. The blockhash is used to prevent duplications and eliminate stale transactions. The max age of a transaction's blockhash is 150 blocks, or about ~1 minute 19 seconds as of the time of this writing.

    Fees

    The Solana network collects two types of fees:

    In Solana, transaction fees are deterministic: there is no concept of a fee market in which users can pay higher fees to increase their chances of being included in the next block. At the time of this writing, transaction fees are determined only by the number of signatures required (i.e. lamports_per_signature), not by the amount of resources used. This is because there is currently a hard cap of 1232 bytes on all transactions.

    All transactions require at least one writable account to sign the transaction. Once submitted, the writable signer account that is serialized first will be the fee payer. This account will pay for the cost of the transaction regardless of whether the transaction succeeds or fails. If the fee payer does not have a sufficient balance to pay the transaction fee, the transaction will be dropped.

    At the time of this writing, 50% of all transaction fees are collected by the validator that produces the block, while the remaining 50% are burned. This structure works to incentivize validators to process as many transactions as possible during their slots in the leader schedule.

    Other Resources

    Last Updated:
    Contributors: Ayush, Brian Friel
    - + diff --git a/docs/.vuepress/dist/de/core-concepts/accounts.html b/docs/.vuepress/dist/de/core-concepts/accounts.html index 1df7696fd..8d8526e66 100644 --- a/docs/.vuepress/dist/de/core-concepts/accounts.html +++ b/docs/.vuepress/dist/de/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Accounts | Solana Cookbook - +

    Accounts

    Accounts innerhalb von Solana werden zum Speichern des Zustands verwendet. Sie sind ein wesentlicher Baustein für die Entwicklung auf Solana.

    Fakten

    Fact Sheet

    • Accounts werden genutzt um Daten zu speichern
    • Jedes Konto hat eine eindeutige (einmalig vorhandene) Adresse
    • Accounts haben eine maximale Größe von 10MB (10 Mega Bytes)
    • PDA Accounts haben eine maximale Größe von 10KB (10 Kilo Bytes)
    • PDA Accounts können verwendet werden, um im Namen eines Programms zu signieren
    • Accountgrößen sind bei erstellung festgelegt, können aber mit reallocopen in new window angepasst werden
    • Für Accountsdatenspeicher wird "Miete" gezahlt (in SOL)
    • Der Standard-Accounts-Besitzer ist das Systemprogramm

    Deep Dive

    Accounts Model

    Auf Solana gibt es 3 Arten von Accounts:

    • Daten Accounts speichern Daten
    • Program Accounts speichern ausführbare Programme
    • Native Accounts die native Programme auf Solana angeben (wie z.B. System, Stake, und Vote )

    Es gibt 2 Arten von Daten Accounts:

    • Systemeigene Accounts
    • PDA-Accounts (Program Derived Address).

    Jedes Konto hat eine Adresse (normalerweise einen öffentlichen Schlüssel) und einen Besitzer (Adresse eines Programmkontos). Die vollständige Feldliste speichert ein Konto ist unten zu finden.

    FeldBeschreibung
    lamportsDie Anzahl der Lamports im Besitz dieses Kontos
    ownerDer Programmbesitzer dieses Kontos
    executableOb dieses Konto Anweisungen verarbeiten kann
    dataDas Rohdaten-Byte-Array, das von diesem Konto gespeichert wird
    rent_epochDie nächste Epoche, in der dieses Konto Miete schuldet

    Es gibt ein paar wichtige Eigentumsregeln:

    • Nur der Besitzer eines Datenkontos kann seine Daten ändern und Lamports belasten
    • Jeder darf Lamports auf ein Datenkonto gutschreiben
    • Der Inhaber eines Kontos kann einen neuen Inhaber zuweisen, wenn die Daten des Kontos auf Null gesetzt werden

    ProgrammAccounts speichern keinen Status.

    Wenn Du beispielsweise ein Zählerprogramm hast, mit dem Du einen Zähler erhöhen kannst, musst Du zwei Accounts erstellen - ein Konto zum Speichern des Programmcodes und eines zum Speichern der Zähler.

    Um zu verhindern, dass ein Konto gelöscht wird, müssen Sie Miete zahlen.

    Miete

    Daten auf Accounts zu speichern kostet SOL - diese Zahlung wird Miete genannt. Wenn du eine Mindesteinzahlung von 2 Jahren Miete tätigst, wird dein Account von zukünftiger Miete befreit. Du kannst vorausgezahlte Miete durch schließen von Accounts zurück in deine Wallet bekommen.

    Die Miete wird zu zwei verschiedenen Zeitpunkten gezahlt:

    1. Wenn es von einer Transaktion referenziert wird
    2. Einmal pro Epoche

    Ein Teil der über Accounts eingezogenen Miete wird vernichtet, während der Rest verteilt wird Accounts am Ende jedes Slots zu bestimmen.

    Reicht das Konto nicht aus, um die Miete zu zahlen, wird das Konto aufgelöst und die Daten ENTFERNT.

    Wichtig ist auch zu beachten, dass NeuAccounts mietfrei sein müssen.

    Andere Ressourcen

    Credit

    Dieses Kernkonzept wird Pencilflip zugeschrieben. Folgt ihm auf Twitteropen in new window.

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/core-concepts/pdas.html b/docs/.vuepress/dist/de/core-concepts/pdas.html index bc1952f40..eef4137ae 100644 --- a/docs/.vuepress/dist/de/core-concepts/pdas.html +++ b/docs/.vuepress/dist/de/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Programmabgeleitete Adressen (PDAs) | Solana Cookbook - +

    Programm-eigene-Adressen (PDAs)

    Program-eigene-Adressen (PDAs) sind das zu Hause von Accounts die dazu designed sind, um von einem bestimmten Programm kontrolliert bzw. gesteuert zu werden. Mit PDAs können Programme programmgesteuert für bestimmte Adressen signieren, ohne einen privaten Schlüssel zu benötigen. PDAs dienen als Grundlage für Cross-Program Invocationopen in new window, wodurch Solana-Apps miteinander kombinierbar sind.

    Fakten

    Fact Sheet

    • PDAs sind 32-Byte-Strings, die wie öffentliche Schlüssel aussehen, aber keine entsprechenden privaten Schlüssel haben
    • findProgramAddress wird einen PDA deterministisch aus einer programId und Seeds (Sammlung von Bytes) ableiten
    • Ein Bump (ein Byte) wird verwendet, um einen potenziellen PDA von der elliptischen Kurve ed25519 zu schieben
    • Programme können für ihre PDAs signieren, indem sie die Seeds und Bump bereitstellen invoke_signedopen in new window
    • Ein PDA kann nur von dem Programm signiert werden, von dem es abgeleitet wurde
    • PDAs ermöglichen es Programmen nicht nur, verschiedene Anweisungen zu signieren, sondern bieten auch eine Hashmap-ähnliche Schnittstelle um Accounts zu indexieren

    Deep Dive

    PDAs sind ein wesentlicher Baustein für die Entwicklung von Programmen auf Solana. Mit PDAs können Programme für Accounts signieren und gleichzeitig sicherstellen, dass kein externer Benutzer auch eine gültige Signatur für dasselbe Konto erstellen kann. Zusätzlich zum Signieren von Accounts können bestimmte Programme auch Accounts ändern, die auf ihren PDAs geführt werden.

    Accounts matrix

    Bildausschnit von Pencilflip

    Generating PDAs

    Um das Konzept hinter PDAs zu verstehen, kann es hilfreich sein zu bedenken, dass PDAs nicht technisch erstellt, sondern eher gefunden werden. PDAs werden aus einer Kombination von Seeds (z. B. der Zeichenfolge „vote_account““) und einer Programm-ID generiert. Diese Kombination aus Seeds und Programm-ID wird dann durch eine sha256-Hash-Funktion geleitet, um zu sehen, ob sie einen öffentlichen Schlüssel generieren, der auf der elliptischen Kurve ed25519 liegt.

    PDA on the ellipitic curve

    Interaktion mit PDAs

    Wenn ein PDA generiert wird, gibt findProgramAddress sowohl die Adresse als auch den Bump zurück, der verwendet wird, um die Adresse aus der elliptischen Kurve zu entfernen. Mit diesem Bump bewaffnet, kann ein Programm dann für jede Anweisung, die seinen PDA erfordert, signieren. Um zu signieren, sollten Programme die Anweisung, die Liste der Accounts und die Seeds und Bump, die verwendet werden, um den PDA abzuleiten, an „invoke_signed“ übergeben. Zusätzlich zum Signieren von Anweisungen müssen PDAs auch für ihre eigene Erstellung über "invoke_signed" signieren.

    Beim Bauen mit PDAs ist es üblich, den Bump Seed in den Kontodaten selbst zu speichernopen in new window. Auf diese Weise können Entwickler einen PDA einfach validieren, ohne den Bump als Anweisungsargument übergeben zu müssen.having to pass in the bump as an instruction argument.

    Andere Quellen

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/core-concepts/programs.html b/docs/.vuepress/dist/de/core-concepts/programs.html index 24d4e737d..79cff710c 100644 --- a/docs/.vuepress/dist/de/core-concepts/programs.html +++ b/docs/.vuepress/dist/de/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programme | Solana Cookbook - +

    Programme

    Jeder Entwickler kann Programme für die Solana-Blockchain schreiben und bereitstellen. Das Programm (in anderen Protokollen als Smart Contracts bekannt) dient als Grundlage für On-Chain-Aktivitäten und treibt alles an, von DeFi und NFTs bis hin zu Social Media und Gaming.

    Facts

    Fact Sheet

    • Programme verarbeiten Aneweisungen sowohl von Endbenutzern als auch von anderen Programmen
    • Alle Programme sind zustandslos (stateless): Alle Daten, mit denen sie interagieren, werden in separaten Konten gespeichert, die über Anweisungen gegeben werden.
    • Programme selbst werden in Konten gespeichert, die als "ausführbar" gekennzeichnet sind
    • Alle Programme gehören dem BPF Loaderopen in new window und werden von der Solana Runtimeopen in new window ausgeführt
    • Entwickler schreiben am häufigsten Programme in Rust oder C++, können aber jede Sprache wählen, die auf das LLVMopen in new window's BPFopen in new window Backend abziehlt
    • Alle Programme haben einen einzigen Einstiegspunkt, an dem die Befehlsverarbeitung stattfindet (i.e. process_instruction); Parameter beinhalten immer:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Deep Dive

    Im Gegensatz zu den meisten anderen Blockchains trennt Solana Code vollständig von Daten. Alle Daten, mit denen Programme interagieren, werden in separaten Konten gespeichert und als Referenzen über Anweisungen weitergegeben. Dieses Modell ermöglicht es, dass ein einziges generisches Programm über verschiedene Konten läuft, ohne dass zusätzliche Bereitstellungen (Deployments) erforderlich sind. Übliche Beispiele für dieses Muster finden sich in den Native- und SPL-Programmen.

    Native Programme & Die Solana Programm Bibliothek (SPL - Solana Program Library)

    Solana ist mit einer Reihe von Programmen ausgestattet, die als Kernbausteine ​​für On-Chain-Interaktionen dienen. Diese Programme sind unterteilt in Native Programmeopen in new window und Solana Programm (SPL) Bibliothekenopen in new window.

    Native Programme stellen die Basisfunktionalität bereit, die für den Betrieb von Validatoren erforderlich ist. Unter diesen Programmen ist das bekannteste das System Programmopen in new window, welches für die Verwaltung neuer Konten und die Übertragung von SOL zwischen zwei Parteien verantwortlich ist.

    SPL-Programme unterstützen eine Reihe von On-Chain-Aktivitäten, darunter das Erstellen, Tauschen und Verleihen von Token sowie die Generierung von Stake-Pools und die Aufrechterhaltung eines On-Chain-Namensdienstes. Das SPL Token Programopen in new window an direkt über die CLI aufgerufen werden, während andere wie das verbundene Token-Kontoprogrammopen in new window werden normalerweise mit benutzerdefinierten Programmen zusammengestellt.

    Writing Programs

    Programme werden am häufigsten mit Rust oder C++ entwickelt, können aber mit jeder Sprache entwickelt werden, die auf das BPF-Backend des LLVM abzielt. Jüngste Initiativen von Neon Labsopen in new window und Solangopen in new window ermöglichen jedoch EVMopen in new window Kompatibilität und ermöglichen es Entwicklern, Programme in Solidity zu schreiben.

    Die meisten Rust-basierten Programme halten sich an die folgende Architektur:

    DateiBeschreibung
    lib.rsModule registrieren
    entrypoint.rsEinstieg ins Programm
    instruction.rsProgramm-API, (De-)Serialisierung von Befehlsdaten
    processor.rsProgrammlogik
    state.rsProgrammobjekte, (De-)Serialisierungszustand
    error.rsProgrammspezifische Fehler

    Kürzlich hat sich Anchoropen in new window zu einem beliebten Framework für die Entwicklung von Programmen entwickelt. Anchor ist ein rechthaberisches Framework, ähnlich wie Ruby on Rails, das Boilerplates reduziert und den (De-)Serialisierungsprozess für die Rust-basierte Entwicklung rationalisiert.

    Programme werden normalerweise entwickelt und in Localhost- und Devnet-Umgebungen getestet, bevor sie auf Testnet oder Mainnet bereitgestellt werden. Solana unterstützt die folgenden Umgebungen:

    Cluster-UmgebungRPC Verbindungs URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Nach der Bereitstellung in einer Umgebung können Clients mit On-Chain-Programmen über RPC Verbindungenopen in new window mit dem jeweiligen Cluster interagieren.

    Bereitstellen von Programmen

    Entwickler können ihre Programme über die CLIopen in new window bereitstellen:

    solana program deploy <PROGRAM_FILEPATH>
     

    Wenn ein Programm bereitgestellt wird, wird es zu einem ELF shared objectopen in new window kompiliert und in den Solana-Cluster hochgeladen. Programme befinden sich in Konten (ähnlich wie alles andere auf Solana), außer dass diese Konten als „ausführbar“ markiert und dem BPF Loader zugewiesen sind. Die Adresse dieses Kontos wird als „program_id“ bezeichnet und wird verwendet, um bei allen zukünftigen Transaktionen auf das Programm zu verweisen.

    Solana unterstützt mehrere BPF Loader, wobei der neueste der aktualisierbare BPF Laderopen in new window. Der BPF Loader ist dafür verantwortlich, das Konto des Programms zu verwalten und es den Clients über die „program_id“ zur Verfügung zu stellen. Alle Programme haben einen einzigen Einstiegspunkt, an dem die Befehlsverarbeitung stattfindet (d. h. „process_instruction“), und die Parameter beinhalten immer:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Einmal aufgerufen, werden Programme von der Solana-Laufzeit ausgeführt.

    Weitere Quellen

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/core-concepts/transactions.html b/docs/.vuepress/dist/de/core-concepts/transactions.html index a7b06a348..4c92b0fa0 100644 --- a/docs/.vuepress/dist/de/core-concepts/transactions.html +++ b/docs/.vuepress/dist/de/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transaktionen | Solana Cookbook - +

    Transaktionen

    Clients können Programme durch Senden einer Transaktion an einen Cluster aufrufen. Eine einzelne Transaktion kann mehrere Answeisungen beinhalten - jedes zielt auf sein eigenes Programm ab. Wenn eine Transaktion übermittelt wird, verarbeitet der Solana Runtimeopen in new window seine Anweisungen der Reihe nach und atomar. Wenn ein Teil einer Anweisung fehlschlägt, schlägt die gesamte Transaktion fehl.

    Fakten

    Fact Sheet

    • Anweisungen sind die grundlegendste operative Einheit auf Solana
    • Jede Anweisung enthält:
    • Die program_id des beabsichtigten Programms
      • Ein Array aller Accounts, von denen gelesen oder in die geschrieben werden soll
      • Ein "instruction_data"-Byte-Array, das für das vorgesehene Programm spezifisch ist
    • Mehrere Anweisungen können zu einer einzigen Transaktion gebündelt werden
    • Jede Transaktion enthält:
      • Ein Array aller Accounts, von denen gelesen oder in die geschrieben werden soll
      • Eine oder mehrere Anweisungen
      • Ein neuer Blockhash
      • Eine oder mehrere „Signaturen“.
    • Anweisungen werden der Reihe nach und atomar verarbeitet
    • Wenn ein Teil einer Anweisung fehlschlägt, schlägt die gesamte Transaktion fehl.
    • Transaktionen sind auf 1232 Bytes begrenzt

    Deep Dive

    Die Solana-Laufzeit erfordert sowohl Anweisungen als auch Transaktionen, um eine Liste aller Accounts anzugeben, von denen sie lesen oder in die sie schreiben möchten. Indem diese Accounts im Voraus angefordert werden, ist die Laufzeit in der Lage, die Ausführung über alle Transaktionen hinweg zu parallelisieren.

    Wenn eine Transaktion an einen Cluster übermittelt wird, verarbeitet die Laufzeitumgebung ihre Anweisungen der Reihe nach und atomar. Für jede Anweisung interpretiert das empfangende Programm sein Datenarray und verarbeitet seine angegebenen Accounts. Das Programm kehrt entweder erfolgreich oder mit einem Fehlercode zurück. Wenn ein Fehler zurückgegeben wird, schlägt die gesamte Transaktion sofort fehl.

    Jede Transaktion, die darauf abzielt, ein Konto zu belasten oder seine Daten zu ändern, erfordert die Unterschrift seines Kontoinhabers. Jedes Konto, das geändert wird, wird als „beschreibbar“ markiert. Ein Konto kann ohne Zustimmung des Inhabers gutgeschrieben werden, solange der Zahler der Transaktionsgebühr die erforderlichen Mieten und Transaktionsgebühren trägt.

    Vor der Übermittlung, müssen alle Transaktionen auf einen aktuellen blockhashopen in new window verweisen. Der Blockhash wird verwendet, um Duplizierungen zu verhindern und veraltete Transaktionen zu beseitigen. Das maximale Alter des Blockhashs einer Transaktion beträgt 150 Blöcke oder etwa 1 Minute 19 Sekunden zum Zeitpunkt des Schreibens dieses Artikels.

    Gebühren

    Das Solana-Netzwerk erhebt zwei Arten von Gebühren:

    In Solana sind Transaktionsgebühren deterministisch: Es gibt kein Konzept für einen Gebührenmarkt, auf dem Benutzer höhere Gebühren zahlen können, um ihre Chancen zu erhöhen, in den nächsten Block aufgenommen zu werden. Zum Zeitpunkt der Erstellung dieses Artikels werden die Transaktionsgebühren nur durch die Anzahl der erforderlichen Unterschriften (d. h. „lamports_per_signature“) bestimmt, nicht durch die Menge der verwendeten Ressourcen. Dies liegt daran, dass derzeit für alle Transaktionen eine feste Obergrenze von 1232 Bytes gilt.

    Alle Transaktionen erfordern mindestens ein „beschreibbares“ Konto, um die Transaktion zu signieren. Nach der Übermittlung ist das zuerst serialisierte Konto des beschreibbaren Unterzeichners der Gebührenzahler. Dieses Konto zahlt für die Kosten der Transaktion, unabhängig davon, ob die Transaktion erfolgreich ist oder fehlschlägt. Wenn der Gebührenzahler nicht über ein ausreichendes Guthaben verfügt, um die Transaktionsgebühr zu bezahlen, wird die Transaktion abgebrochen.

    Zum Zeitpunkt der Erstellung dieses Artikels werden 50 % aller Transaktionsgebühren von dem Validator eingezogen, der den Block produziert, während die restlichen 50 % verbrannt werden. Diese Struktur dient dazu, die Prüfer dazu anzuregen, so viele Transaktionen wie möglich während ihrer Slots im Leader-Zeitplan zu verarbeiten.

    Other Resources

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/getting-started/installation.html b/docs/.vuepress/dist/de/getting-started/installation.html index 290c5a578..65dbf7c9a 100644 --- a/docs/.vuepress/dist/de/getting-started/installation.html +++ b/docs/.vuepress/dist/de/getting-started/installation.html @@ -23,12 +23,12 @@ } Installation | Solana Cookbook - + -

    Installieren von Web3.js

    Es gibt einige Bibliotheken, die Sie verwenden können, um mit Javascript oder Typoskript auf Solana zu beginnen.

    Web3.js

    @solana/web3.jsopen in new window ist eine Bibliothek mit vielen grundlegenden Solana-Tools zum Interagieren, Senden von Transaktionen und Lesen aus der Blockchain.

    Sie können Folgendes installieren:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Installieren von Web3.js

    Es gibt einige Bibliotheken, die Sie verwenden können, um mit Javascript oder Typoskript auf Solana zu beginnen.

    Web3.js

    @solana/web3.jsopen in new window ist eine Bibliothek mit vielen grundlegenden Solana-Tools zum Interagieren, Senden von Transaktionen und Lesen aus der Blockchain.

    Sie können Folgendes installieren:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Aus Quelle erstellen

    Wenn Sie die vorgefertigten Binärdateien nicht verwenden können oder es vorziehen, sie selbst zu erstellen von der Quelle, navigieren Sie zu https://github.com/solana-labs/solana/releases/latestopen in new window, und laden Sie das Quellcode-Archiv (source code) herunter. Extrahieren Sie den Code und erstellen Sie die Binärdateien mit:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Sie können dann den folgenden Befehl ausführen, um das gleiche Ergebnis wie mit vorgefertigte Binärdateien zu erhalten:

    solana-install init
    -
    Last Updated:
    Contributors: nyk
    - +
    Last Updated:
    Contributors: Steven Luscher, nyk
    + diff --git a/docs/.vuepress/dist/de/guides/account-maps.html b/docs/.vuepress/dist/de/guides/account-maps.html index 4f3eae336..76b2ebba3 100644 --- a/docs/.vuepress/dist/de/guides/account-maps.html +++ b/docs/.vuepress/dist/de/guides/account-maps.html @@ -23,7 +23,7 @@ } Kontozuordnungen | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/guides/data-migration.html b/docs/.vuepress/dist/de/guides/data-migration.html index c0c338507..98b40a240 100644 --- a/docs/.vuepress/dist/de/guides/data-migration.html +++ b/docs/.vuepress/dist/de/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrieren von Programmdatenkonten | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    Nach dem Erstellen und Senden einer Anweisung: VersionProgramInstruction::SetString(String) haben wir nun das folgende 'aktualisierte' Kontodatenlayout

    Program Account v2

    Resources

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/guides/debugging-solana-programs.html b/docs/.vuepress/dist/de/guides/debugging-solana-programs.html index 5ecbff2d9..178c01846 100644 --- a/docs/.vuepress/dist/de/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/de/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debuggen von Solana-Programmen | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Das Debuggen hier ermöglicht es Ihnen, die im test body verwendeten Funktionen und Methoden zu debuggen, wird aber kein Haltepunkt in Ihrem Programm.

    Die Knie der Biene, oder?

    Testen lokaler Validator-Knoten von Client-Apps

    Schließlich können Sie einen lokalen Validierungsknoten starten und Ihr Programm und alle Konten mit dem solana-test-validator laden von der Kommandozeile.

    Mit dieser Methode, wirst du eine client application oder Rust benutzen Bei diesem Ansatz benötigen Sie eine Client-Anwendung, die entweder in Rust RcpClient oder in JavaScript or Typescript clients verwendet wird.

    Siehe solana-test-validator --help für weitere Details und Optionen. Für das Beispielprogramm hier ist Vanilla Setup:

    1. Öffnen Sie ein Terminal im Repo-Ordner
    2. Führen Sie solana config set -ul aus, um die Konfiguration so einzustellen, dass sie auf lokal zeigt
    3. Führen Sie „solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so“ aus
    4. Öffnen Sie ein anderes Terminal und führen Sie „solana logs“ aus, um den Log-Streamer zu starten
    5. Sie können dann Ihr Client-Programm ausführen und die Programmausgabe in dem Terminal beobachten, in dem Sie den Log-Streamer gestartet haben

    Nun, das ist der Schlafanzug der Katze YO!

    Ressourcen

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/guides/feature-parity-testing.html b/docs/.vuepress/dist/de/guides/feature-parity-testing.html index 578ea627b..3d334c041 100644 --- a/docs/.vuepress/dist/de/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/de/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Funktionsparitätstest | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Fröhliches testen!

    Ressourcen

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/guides/get-program-accounts.html b/docs/.vuepress/dist/de/guides/get-program-accounts.html index a77c29d45..3f19cc164 100644 --- a/docs/.vuepress/dist/de/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/de/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Programmkonten Abfragen | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    Durch die Kombination aller drei Parameter (dataSlice, dataSize und memcmp) können wir den Umfang unserer Abfrage begrenzen und effizient nur die Daten zurückgeben, an denen wir interessiert sind.

    Other Resources

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/guides/retrying-transactions.html b/docs/.vuepress/dist/de/guides/retrying-transactions.html index 741cda6d5..374f59086 100644 --- a/docs/.vuepress/dist/de/guides/retrying-transactions.html +++ b/docs/.vuepress/dist/de/guides/retrying-transactions.html @@ -23,7 +23,7 @@ } Transaktionen Wiederholen | Solana Cookbook - + @@ -89,6 +89,6 @@ blockheight = await connection.getBlockHeight(); }

    Bei der Abfrage über getLatestBlockhash sollten Anwendungen ihre beabsichtigte Commitmentopen in new window-Ebene angeben. Indem sie ihr Commitment auf „bestätigt“ (abgestimmt) oder „abgeschlossen“ (~30 Blöcke nach „bestätigt“) setzen, kann eine Anwendung vermeiden, einen Blockhash von einem Minority Fork abzufragen.

    Wenn eine Anwendung Zugriff auf RPC-Knoten hinter einem Load Balancer hat, kann sie ihre Arbeitslast auch auf bestimmte Knoten aufteilen. RPC-Knoten, die datenintensive Anfragen wie getProgramAccounts bedienen, neigen möglicherweise dazu, ins Hintertreffen zu geraten, und können auch für die Weiterleitung von Transaktionen ungeeignet sein. Für Anwendungen, die zeitkritische Transaktionen verarbeiten, kann es ratsam sein, dedizierte Knoten zu haben, die nur "sendTransaction" verarbeiten.

    Die Kosten für das Überspringen des Preflights

    Standardmäßig führt "sendTransaction" drei Preflight-Prüfungen durch, bevor eine Transaktion übermittelt wird. Insbesondere wird sendTransaction:

    • Überprüfen, ob alle Unterschriften gültig sind
    • Überprüfen, ob der referenzierte Blockhash innerhalb der letzten 150 Blöcke liegt
    • Die Transaktion mit dem durch "preflightCommitment" angegebenen Bankfach simulieren

    Für den Fall, dass eine dieser drei Preflight-Prüfungen fehlschlägt, wird sendTransaction einen Fehler auslösen, bevor die Transaktion übermittelt wird. Preflight-Prüfungen können oft den Unterschied zwischen dem Verlust einer Transaktion und der ordnungsgemäßen Behandlung eines Fehlers durch einen Client ausmachen. Um sicherzustellen, dass diese häufigen Fehler berücksichtigt werden, wird empfohlen, dass Entwickler skipPreflight auf false setzen.

    Wann Transaktionen neu signiert werden müssen

    Trotz aller Wiederholungsversuche kann es vorkommen, dass ein Kunde eine Transaktion erneut signieren muss. Bevor Sie eine Transaktion neu signieren, ist es sehr wichtig sicherzustellen, dass der Blockhash der ursprünglichen Transaktion abgelaufen ist. Wenn der anfängliche Blockhash noch gültig ist, ist es möglich, dass beide Transaktionen vom Netzwerk akzeptiert werden. Für einen Endbenutzer würde dies so aussehen, als ob er dieselbe Transaktion unbeabsichtigt zweimal gesendet hätte.

    In Solana kann eine verworfene Transaktion sicher verworfen werden, sobald der Blockhash, auf den sie verweist, älter ist als die von „getLatestBlockhash“ empfangene „lastValidBlockHeight“. Entwickler sollten diese lastValidBlockHeight im Auge behalten, indem sie getEpochInfoopen in new window abfragen und mit blockHeight in der Antwort vergleichen. Sobald ein Blockhash für ungültig erklärt wurde, können Clients mit einem neu abgefragten Blockhash erneut signieren.

    Danksagungen

    Vielen Dank an Trent Nelson, Jacob Creechopen in new window, White Tiger, Le Yafo, Buffaluopen in new window und Jito Labsopen in new window für ihre Bewertung und ihr Feedback.

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/guides/serialization.html b/docs/.vuepress/dist/de/guides/serialization.html index e8407b75a..374f2e991 100644 --- a/docs/.vuepress/dist/de/guides/serialization.html +++ b/docs/.vuepress/dist/de/guides/serialization.html @@ -23,7 +23,7 @@ } Serialisieren von Daten | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Ressourcen

    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/index.html b/docs/.vuepress/dist/de/index.html index 29216c979..d3790eda1 100644 --- a/docs/.vuepress/dist/de/index.html +++ b/docs/.vuepress/dist/de/index.html @@ -23,11 +23,11 @@ } Kochen mit Solana | Solana Cookbook - +

    Kochen mit Solana

    Das Solana Cookbook ist eine Ressource für Entwickler, die die wesentlichen Konzepte und Referenzen zum Entwickeln von Anwendungen auf Solana bietet. Jedes Konzept und Referenz wird sich auf bestimmte Aspekte von Solana Development konzentrieren, und zeitgleich zusätzliche Details und Beispiele zur Verwendung bereitstellt.

    Beitragen

    Das Kochbuch ist so gestaltet, dass es für neue Solana-Entwickler einfach ist zum Ökosystem beizutragen. Selbst wenn du nichts weißt, ist etwas dem Solana Kochbuch beizutragen, eine gute Lernquelle!

    Entdecke alle offenen Probleme "Issues" hieropen in new window. Beitragsrichtlinien hieropen in new window. Wenn dir etwas im Kochbuch fehlt, erstelle bitte ein neues Problem "Issue".

    Wie man das Kochbuch liest

    Das Solana Kochbuch ist in verschiedene Sektionen aufgeteilt - alle abgestimmt auf ein anderes Ziel.

    SektionBeschreibung
    Kern-PrinzipienBausteine ​​von Solana, die für die Entwicklung gut zu wissen sind
    FührerLeitfäden in Hääpchengröße zu verschiedenen Tools zum Entwickeln
    VerweiseVerweise auf häufig benötigte Codeausschnitte
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/accounts.html b/docs/.vuepress/dist/de/references/accounts.html index 0f7b4a168..91d8556fc 100644 --- a/docs/.vuepress/dist/de/references/accounts.html +++ b/docs/.vuepress/dist/de/references/accounts.html @@ -23,7 +23,7 @@ } Accounts | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    If you want to get a token balance, you will need to know the address of token account. For more information, see Token References

    Last Updated:
    Contributors: Partially Sorted, nyk
    - + diff --git a/docs/.vuepress/dist/de/references/basic-transactions.html b/docs/.vuepress/dist/de/references/basic-transactions.html index 616ae8078..aa2631ccc 100644 --- a/docs/.vuepress/dist/de/references/basic-transactions.html +++ b/docs/.vuepress/dist/de/references/basic-transactions.html @@ -23,7 +23,7 @@ } Transaktionen versenden | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/keypairs-and-wallets.html b/docs/.vuepress/dist/de/references/keypairs-and-wallets.html index b90427693..a27c45f36 100644 --- a/docs/.vuepress/dist/de/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/de/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs and Wallets | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     

    2.BIP44 (mehrere Wallets, auch HD-Wallets genannt)

    Sie können mehrere Wallets aus einem einzigen Seed erstellen – auch bekannt als „hierarchische deterministische Wallets“ oder HD-Wallets:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Führen Sie den folgenden Befehl aus, um die erforderlichen Abhängigkeiten zu installieren:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Führen Sie den folgenden Befehl aus, um die erforderlichen Abhängigkeiten zu installieren:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Das Paket Svelte Wallet Adapteropen in new window ermöglicht es, einen Svelte Store ($walletStore) hinzuzufügen, auf den unter allen JS-, TS- oder/und Svelte-Dateien zugegriffen werden kann innerhalb eines Projekts, das mit Svelte Template oder SvelteKit erstellt wurde. Unter Verwendung der Repo-Referenz hieropen in new window können Sie den Adapter für SSR oder verwenden SPA. Das UI-Paket enthält eine <WalletMultiButton />-Komponente, mit der Benutzer eine Brieftasche auswählen können, um sich damit zu verbinden.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Partially Sorted, nyk
    - +
    Last Updated:
    Contributors: Partially Sorted, Steven Luscher, nyk
    + diff --git a/docs/.vuepress/dist/de/references/local-development.html b/docs/.vuepress/dist/de/references/local-development.html index 7ccf12f49..5b327ae89 100644 --- a/docs/.vuepress/dist/de/references/local-development.html +++ b/docs/.vuepress/dist/de/references/local-development.html @@ -23,7 +23,7 @@ } Local Development | Solana Cookbook - + @@ -361,6 +361,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Partially Sorted, nyk
    - + diff --git a/docs/.vuepress/dist/de/references/name-service.html b/docs/.vuepress/dist/de/references/name-service.html index 53045677e..bd2aa67bf 100644 --- a/docs/.vuepress/dist/de/references/name-service.html +++ b/docs/.vuepress/dist/de/references/name-service.html @@ -23,7 +23,7 @@ } Name Service | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/nfts.html b/docs/.vuepress/dist/de/references/nfts.html index 73381cd0e..1d71d54e3 100644 --- a/docs/.vuepress/dist/de/references/nfts.html +++ b/docs/.vuepress/dist/de/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/offline-transactions.html b/docs/.vuepress/dist/de/references/offline-transactions.html index 165b534de..5ac676d73 100644 --- a/docs/.vuepress/dist/de/references/offline-transactions.html +++ b/docs/.vuepress/dist/de/references/offline-transactions.html @@ -23,7 +23,7 @@ } Senden von Offline-Transaktionen | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/programs.html b/docs/.vuepress/dist/de/references/programs.html index 2c72f99cf..a9d0f5932 100644 --- a/docs/.vuepress/dist/de/references/programs.html +++ b/docs/.vuepress/dist/de/references/programs.html @@ -23,7 +23,7 @@ } Programme schreiben | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    Der entsprechende clientseitige Code sieht wie folgt aus

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    Der entsprechende clientseitige Code sieht wie folgt aus

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/staking.html b/docs/.vuepress/dist/de/references/staking.html index eff80b36a..59f410fbb 100644 --- a/docs/.vuepress/dist/de/references/staking.html +++ b/docs/.vuepress/dist/de/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/de/references/token.html b/docs/.vuepress/dist/de/references/token.html index bbcf7a173..6ae17d2cd 100644 --- a/docs/.vuepress/dist/de/references/token.html +++ b/docs/.vuepress/dist/de/references/token.html @@ -23,7 +23,7 @@ } Interaktion mit Tokens | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: nyk
    - + diff --git a/docs/.vuepress/dist/es/core-concepts/accounts.html b/docs/.vuepress/dist/es/core-concepts/accounts.html index 3c0b9507b..cf1ed60ad 100644 --- a/docs/.vuepress/dist/es/core-concepts/accounts.html +++ b/docs/.vuepress/dist/es/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Cuentas | Solana Cookbook - +

    Cuentas

    Las Cuentas en Solana son usadas para almacenar el estado. Son una pieza fundamental en el desarrollo de programas en Solana.

    Hechos

    Lista de hechos

    • Las cuentas son usadas para almacenar estado
    • Cada cuenta tiene una dirección única
    • Las cuentas tienen un tamaño máximo de 10MB (10 Mega Bytes)
    • Las cuentas de direcciones derivadas de programa (PDA) tienen un tamaño máximo de 10KB (10 Kilo Bytes)
    • Las cuentas de direcciones derivadas de programa (PDA) pueden ser usadas para firmar a nombre de un programa
    • Los tamaños de las cuentas son definidos al momento de la creación, pero pueden ser ajustados usando reallocopen in new window
    • El almacenamiento de datos en una cuenta es pagado con la renta
    • El dueño por defecto de una cuenta es el programa del sistema (System Program)

    Un vistazo más profundo

    El modelo de una cuenta

    Hay 3 tipos de cuentas en Solana:

    • Cuentas de datos para almacenar datos
    • Cuentas de programas para almacenar programas ejecutables
    • Cuentas nativas para los programas nativos de Solana como System, Stake, y Vote

    En las cuentas de datos hay 2 tipos:

    • Cuentas de propiedad del sistema (System owned accounts)
    • Cuentas de direcciones derivadas de programa o PDA (Program Derived Address)

    Cada cuenta tiene una dirección (usualmente una llave pública) y un dueño (dirección de la cuenta del programa). La lista completa de los campos que tiene una cuenta se encuentra a continuación.

    FieldDescription
    lamportsEl número de lamports que tiene la cuenta
    ownerEl programa dueño de esa cuenta
    executableIndica si la cuenta procesa transacciones
    dataEl array de bytes de datos que tiene la cuenta
    rent_epochLa siguiente época que esta cuenta deberá renta

    Hay algunos reglas importantes de propiedad de la cuenta:

    • Solo el dueño de la cuenta de datos puede modificar sus datos y debitar lamports
    • Cualquier puede enviar lamports a una cuenta de datos
    • El duseño de la cuenta puede asignar un nuevo dueño si la cuenta no tiene datos

    Las cuentas de programa no almacenan datos.

    Por ejemplo, si existiera un programa que cuenta que permite incrementar el contador, debes crear 2 cuentas, una para almacenar el código del programa (ejecutable) y otra para almacenar el contador (no ejecutable).

    Para evitar que las cuentas sean elmininadas se debe pagar renta.

    Renta

    Almacenar datos en las cuentas cuesta SOL para mantenerlas y es pagado a través de las rentas. Si mantienes un balance mínimo equivalente a 2 años de renta en la cuenta, la cuenta no tendrá que pagar renta, como un depósito de garantía. Luego puedes obtener de vuelta el valor de la renta al cerrar la cuenta y enviar los lamports hacia tu wallet.

    La renta es pagada en dos momentos:

    1. Cuando es iniciado por una transacción
    2. Una vez por época (cantidad de slots)

    Un porcentaje de las rentas es eliminado y el resto es distribuido para votar al final de cada slot.

    Si la cuenta no tiene suficiente renta para pagar, la cuenta será eliminada junto con sus datos.

    Otros recursos

    Creditos

    El concepto de cuentas es gracias a Pencilflip. Pueden seguir a Penciflip en Twitteropen in new window.

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/core-concepts/pdas.html b/docs/.vuepress/dist/es/core-concepts/pdas.html index 4e51e43ec..a5cbb5e68 100644 --- a/docs/.vuepress/dist/es/core-concepts/pdas.html +++ b/docs/.vuepress/dist/es/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Direcciones derivadas de programa (PDAs) | Solana Cookbook - +

    Direcciones derivadas de programa (PDAs)

    Direcciones derivadas de programa (PDAs) son cuentas diseñadas específicamente para ser controladas por programas. Con PDAs, los programas puede firmar para ciertas direcciones sin la necesidad de una llave privada. PDAs sirven como la base para la Invocación entre programasopen in new window, que permite la composición entre apps de Solana.

    Hechos

    Hola de hechos

    • PDAs son cadenas de 32 bytes que lucen como llaves públicas pero no tienen una llave privada relacionada
    • findProgramAddress deriva de forma determinista un PDA de un programId y unas semillas (colección de bytes)
    • Un bump (un byte) es usado para empujar a un potencial PDA fuera de la curva elíptica ed25519
    • Los programas pueden firmar por sus PDAs usando sus seeds y bump invoke_signedopen in new window
    • Un PDA solo puede ser firmado por el programa del cual ha sido derivada
    • Además de permitir a los programas firmar diferentes instrucciones, PDAs también brindan una interfaz tipo hashmap para indexar cuentas

    Un vistazo más profundo

    Los PDA son un componente esencial para desarrollar programas en Solana. Con las PDA, los programas pueden firmar cuentas mientras garantizan que ningún usuario externo pueda generar una firma válida para la misma. Además de firmar cuentas, ciertos programas también pueden modificar cuentas en sus PDA.

    Accounts matrix

    Image courtesy of Pencilflip

    Generando PDAs

    Para entender el concepto detrás de las PDA, puede ser útil considerar que las PDA no se crean técnicamente, sino que se encuentran. Los PDA se generan a partir de una combinación de semillas (como la cadena “vote_account”) y un id de programa. Esta combinación de semillas y de un id de programa luego se ejecuta a través de una función hash sha256 para ver si generan o no una clave pública que se encuentra en la curva elíptica ed25519.

    Al ejecutar el id del programa y las semillas de nuestro programa a través de una función hash, hay una probabilidad de ~50% de que en realidad terminemos con una clave pública válida que se encuentre en la curva elíptica. En este caso, simplemente agregamos algo para modificar un poco nuestra entrada y lo intentamos de nuevo. El término técnico para este algo es un bump. En Solana, comenzamos con bump = 255 y simplemente iteramos hacia abajo, bump = 254, bump = 253, etc. hasta que obtengamos una dirección que no esté en la curva elíptica. Esto puede parecer rudimentario, pero una vez encontrado nos da una forma determinista de derivar el mismo PDA una y otra vez.

    PDA en la curva elíptica

    Interactuando con PDAs

    Cuando un PDA es generado, findProgramAddress retorna la dirección y el bump usado para sacar la dirección fuera de la curva elíptica. Con el bump, un programa puede firmar por cualquier transacción que requiera el PDA. Para firmar, los programas deben pasar la instrucción, la lista de las cuentas, las semillas y el bump usado para derivar el PDA a la función invoke_signed. Además de firmar para instrucciones, PDAs también deben firmar su propia creación con invoke_signed.

    Cuando se crean PDAs, es común guardar el bump y los seedsopen in new window en los datos de la misma cuenta. Esto permite a los desarrolladores validar fácilmente un PDA sin tener que enviar el bump como argumento en la instrucción.

    Other Resources

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/core-concepts/programs.html b/docs/.vuepress/dist/es/core-concepts/programs.html index 0a1f9f71a..e8e6de8e9 100644 --- a/docs/.vuepress/dist/es/core-concepts/programs.html +++ b/docs/.vuepress/dist/es/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programas | Solana Cookbook - +

    Programas

    Cualquier desarrollador puede escribir e implementar programas en la cadena de bloques de Solana. Los programas (conocidos como contratos inteligentes en otros protocolos) sirven como base para la actividad dentro de la cadena de bloques, potenciando desde DeFi y NFTs hasta redes sociales y juegos.

    Hechos

    Hoja de hechos

    • Los programas procesan instrucciones de otros programas y de usuarios finales
    • Todos los programas son stateless (sin estado): Los datos con los que interactúan son almacenados en cuentas que son enviadas al programa en instrucciones
    • Los mismos programas son almacenadas en cuentas marcadas como executable (ejecutables)
    • El dueño de todos los programas es BPF Loaderopen in new window y es ejectuado por el Runtime de Solanaopen in new window
    • Los programadores comunmente utilizan Rust y C++ para escribir programas, pero pueden elegir cualquier lenguaje que compile con el backend de BPFopen in new window para LLVMopen in new window
    • Todos los programas tienen un punto único de entrada donde se procesan las instrucciones (i.e. process_instruction); los parámetros siempre incluyen:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Un vistazo más profundo

    A diferencia de la mayoría de cadenas de bloques, Solana separa completamente el código de los datos. Todos los datos con los que interactúan los programas se almacenan en cuentas separadas y se envían a través de instrucciones. Este modelo permite que un único programa genérico funcione en varias cuentas sin necesidad de implementaciones adicionales. Se ven ejemplos comunes de este patrón en los programas nativos y SPL.

    Programas nativos & La librería de Programas de Solana (SPL)

    Solana viene equipado con programas que sirven como bloques de construcción para interactuar con la cadena de bloques. Estos programas están dividos en Programas nativosopen in new window y Programas de la librería de programas (SPL)open in new window.

    Los programas nativos brindan la funcionalidad base que es requerida para operar validadores. Entre estos programas el más conocido es el Programa del sistema (System Program)open in new window que es responsable de administrar las cuentas y transferir SOL.

    Los programas de la librería de programas soportan otras actividades dentro de la cadena de bloques como crear tokens, intercambiarlos, prestar tokens, así como generar pools de staking y mantener el servicio de nombres dentro de la cadena de bloques. El Programa de Token (SPL Token Program)open in new window puede ser invocado directamente desde el CLI (Command Line Interface), mientras que otros como el Programa de cuentas asociadas a token (Associated Token Account Program)open in new window son usados dentro de otros programas.

    Escribiendo programas

    Los Programas están escritos comunmente en Rust o C++, pero pueden ser desarrollado con cualquier lenguaje que compile al backend BPF de LLVM. Iniciativas recientes de Neon Labsopen in new window y Solangopen in new window habilitan la compatibilidad con EVMopen in new window para permitir a desarrolladores escribir programas con Solidity.

    La mayoría de programas de Rust siguen la siguiente arquitectura:

    ArcguviDescripción
    lib.rsRegistro de módulos
    entrypoint.rsPunto de entrada para el programa
    instruction.rsAPI del programa, deserializa las instrucciones
    processor.rsLógica del programa
    state.rsObjetos del programa, deserializa el estado
    error.rsErrores específicos del programa

    Recientemente, Anchoropen in new window se ha convertido en el framework más popular para desarrollar programas. Anchor es un framework que reduce el boilerplate y facilita la deserialización para los programas desarrollados en Rust.

    Los programas normalmente son desarrollados y testeados en los entornos Localhost y Devnet antes de ser desplegados a Testnet y Mainnet. Solana soporta los siguientes entornos:

    Entorno del clusterURL de conexión RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Una vez desplegado a un entorno, los clientes pueden interactuar con el programa dentro de la cadena de bloques utilizando Conexiones RPCopen in new window apuntando al cluster correspondiente.

    Desplegando Programas

    Los desarrolladores pueden desplegar sus programas utilizando el CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    Cuando un programa es desplegado, es compilado a un ELF shared objectopen in new window (conteniendo el bytecode de BPF) y subido al cluster de Solana. Los Programas viven en cuentas (como casi todo en Solana), con la excepción de aquellas marcadas como executable y asignadas al BPF Loader. La dirección del programa desplegada se llama program_id y es usada para llamar al programa.

    Solana soporta múltiples BPF Loaders, siendo el último el Upgradable BPF Loaderopen in new window. El BPF Loader es responsable de administrar las cuentas del programa y hacerlas accesibles a los clientes a través del program_id. Todos los programas tienen un único punto de entrada donde se procesan las instrucciones (i.e. process_instruction) y los parámetros siempre incluyen:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Una vez llamado, los Programas son ejecutados por el Runtime de Solana.

    Other Resources

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/core-concepts/transactions.html b/docs/.vuepress/dist/es/core-concepts/transactions.html index ad97c62e0..09368f4ea 100644 --- a/docs/.vuepress/dist/es/core-concepts/transactions.html +++ b/docs/.vuepress/dist/es/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transacciones | Solana Cookbook - +

    Transacciones

    Los clientes pueden invocar programas enviando una transacción a un cluster. Una transacción puede incluir múltiples instrucciones, cada una de ellas apuntando a un programa diferente. Cuando una transacción es enviada, el Runtimeopen in new window de Solana procesará sus instrucciones en orden y de forma atómica. Si una parte de la transacción falla, toda la transacción fallará.

    Hechos

    Hoja de hechos

    • Las instrucciones son la unidad de operación más básica en Solana
    • Cada instrucción contiene:
      • El program_id (id del programa) del programa al que apunta
      • Un arreglo de todas accounts (cuentas) donde va a leer o escribir
      • Un instruction_data (datos de la instrucción) que es un byte array para el programa específico
    • Varias instrucciones pueden estar contenidas en una Transacción
    • Cada transacción consiste de:
      • Un arreglo de todas accounts (cuentas) donde va a leer o escribir
      • Una o más instructions (instrucciones)
      • Un blockhash (hash de bloque) reciente
      • Una o más signatures (firmas)
    • Las instrucciones son procesadas en orden y de forma atómica
    • Si una parte de la transacción falla, toda la transacción fallará
    • Las transacciones están limitadas a un máximo de 1232 bytes

    Un vistazo más profundo

    El Runtime de Solana requiere tanto de instrucciones como de transacciones para especificar una lista de todas las cuentas de las que va a leer o escribir. Al requerir estas cuentas por adelantado, el Runtime de Solana es capaz de paralelizar la ejecución en todas las transacciones.

    Cuando se envía una transacción a un clúster, el Runtime de Solana procesará sus instrucciones en orden y de forma atómica. Para cada instrucción, el programa al que se invoca interpretará el arreglo de datos y operará en las cuentas especificadas. El programa retornará con éxito o un código de error. Si se devuelve un error, toda la transacción fallará inmediatamente.

    Toda transacción que debite de una cuenta o modique sus datos requiere la firma del titular de la cuenta. Cualquier cuenta que se modificará será marcada como writable. Una cuenta puede recibir fondos sin el permiso del titular siempre que el pagador del cargo (fee) cubra la renta y las tarifas de transacción.

    Antes de enviar una transacción se debe enviar un hash de bloque recienteopen in new window. El hash de bloque reciente es usado para prevenir duplicados y eliminar transacciones obsoletas. El tiempo máximo del hash de bloque reciente de una transacción es de 150 bloques, o aproximadamente ~1 minuto 19 segundos al momento de escribir este artículo.

    Cargos (fees)

    La red de Solana colecta 2 tipos de cargos:

    En Solana, los cargos son deterministas: no existe el concepto de un mercado de cargos en el que los usuarios puedan pagar tarifas más altas para aumentar sus posibilidades de ser incluidos en el siguiente bloque. Al momento de redactar este documento, las tarifas de transacción están determinadas únicamente por la cantidad de firmas requeridas (es decir, lamports_per_signature), no por la cantidad de recursos utilizados. Esto se debe a que actualmente existe un límite máximo de 1232 bytes en todas las transacciones.

    Todas las transacciones requieren al menos una cuenta sea writable (escribible) para firmar la transacción. Una vez enviada, la cuenta del firmante que se serializa primero será el pagador del cargo (fee). Esta cuenta pagará el costo de la transacción sin importar si la transacción tiene éxito o falla. Si el pagador del cargo no tiene saldo suficiente para pagar la tarifa de transacción, la transacción se cancelará.

    Al momento de escribir este artículo, el validador que produce el bloque cobra el 50% de todas las tarifas de transacción, mientras que el 50% restante se quema. Esta estructura funciona para incentivar a los validadores a procesar tantas transacciones como sea posible durante sus espacios en el programa líder.

    Other Resources

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/getting-started/installation.html b/docs/.vuepress/dist/es/getting-started/installation.html index 4f22ad653..2778f96bd 100644 --- a/docs/.vuepress/dist/es/getting-started/installation.html +++ b/docs/.vuepress/dist/es/getting-started/installation.html @@ -23,12 +23,12 @@ } Instalación | Solana Cookbook - + -

    Instalación de Web3.js

    Hay pocas librerías que necesitas para empezar con JavaScript o TypeScript en Solana.

    Web3.js

    @solana/web3.jsopen in new window es una librería que tiene todas las herramientas básicas para interactuar con Solana, enviar transacciones, y leer desde la blockchain.

    Lo puedes instalar con algunos de los siguientes comandos:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Instalación de Web3.js

    Hay pocas librerías que necesitas para empezar con JavaScript o TypeScript en Solana.

    Web3.js

    @solana/web3.jsopen in new window es una librería que tiene todas las herramientas básicas para interactuar con Solana, enviar transacciones, y leer desde la blockchain.

    Lo puedes instalar con algunos de los siguientes comandos:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Compilación desde el Código Fuente

    Sino pudiste usar los binarios pre-armados o prefieres compilarlos desde el código fuente navega a https://github.com/solana-labs/solana/releases/latestopen in new window y descarga el archivo de código fuente. Extrae el código y compila los binarios con:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Puedes ejecutar el siguiente comando para obtener el mismo resultado que con los binarios pre-armados.

    solana-install init
    -
    Last Updated:
    Contributors: Marco Ordonez, Leonardo Galante
    - +
    Last Updated:
    Contributors: Marco Ordonez, Leonardo Galante, Steven Luscher
    + diff --git a/docs/.vuepress/dist/es/guides/account-maps.html b/docs/.vuepress/dist/es/guides/account-maps.html index 3a76c0ef7..e3af539af 100644 --- a/docs/.vuepress/dist/es/guides/account-maps.html +++ b/docs/.vuepress/dist/es/guides/account-maps.html @@ -23,7 +23,7 @@ } Cómo usar Map en cuentas | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/guides/data-migration.html b/docs/.vuepress/dist/es/guides/data-migration.html index e77d938df..f8c5da3a5 100644 --- a/docs/.vuepress/dist/es/guides/data-migration.html +++ b/docs/.vuepress/dist/es/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrando cuentas de datos de programas | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    Después de crear y enviar una instrucción: VersionProgramInstruction::SetString(String) ahora tenemos el siguiente diseño de datos de cuenta 'actualizado'

    Program Account v2

    Resources

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/guides/debugging-solana-programs.html b/docs/.vuepress/dist/es/guides/debugging-solana-programs.html index 47273777b..e0ef5e15d 100644 --- a/docs/.vuepress/dist/es/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/es/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Depurando Programas en Solana | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    La depuración aquí le permitirá depurar las funciones y los métodos utilizados en el cuerpo de prueba, pero no un punto de interrupción en su programa.

    Pruebas de nodos de validadores locales desde aplicaciones cliente

    Por último, puede iniciar un nodo de validación local y cargar su programa y cualquier cuenta usando solana-test-validator desde la línea de comandos.

    En este enfoque, necesitará una aplicación cliente usando Rust RcpClient o en Clientes JavaScript o Typescript

    Consulte solana-test-validator --help para obtener más detalles y opciones. Para el programa de ejemplo aquí está la configuración:

    1. Abra una terminal en la carpeta repo
    2. Ejecute solana config set -ul para configurar la configuración para que apunte a local
    3. Ejecute solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Abra otra terminal y ejecute solana logs para iniciar el transmisor de registros
    5. Luego puede ejecutar su programa cliente y observar la salida del programa en la terminal donde inició el transmisor de registros.

    Recursos

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    Librería JavaScript/Typescriptopen in new window

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/guides/feature-parity-testing.html b/docs/.vuepress/dist/es/guides/feature-parity-testing.html index 6064e1b21..51675b9ba 100644 --- a/docs/.vuepress/dist/es/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/es/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Prueba de paridad de características | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Happy Testing!

    Recursos

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/guides/get-program-accounts.html b/docs/.vuepress/dist/es/guides/get-program-accounts.html index ffbb05ee5..fb9c1b798 100644 --- a/docs/.vuepress/dist/es/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/es/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Obtener cuentas de programa | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    Al combinar los tres parámetros (dataSlice, dataSize y memcmp) podemos limitar el alcance de nuestra consulta y devolver de manera eficiente solo los datos que nos interesan.

    Otros recursos

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/guides/serialization.html b/docs/.vuepress/dist/es/guides/serialization.html index de441264c..c1d4d2d57 100644 --- a/docs/.vuepress/dist/es/guides/serialization.html +++ b/docs/.vuepress/dist/es/guides/serialization.html @@ -23,7 +23,7 @@ } Serializando datos | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Recursos

    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/index.html b/docs/.vuepress/dist/es/index.html index 91cfee900..151d1abf6 100644 --- a/docs/.vuepress/dist/es/index.html +++ b/docs/.vuepress/dist/es/index.html @@ -23,11 +23,11 @@ } Libro de recetas de Solana | Solana Cookbook - +

    Libro de recetas de Solana

    Solana Cookbook es un recurso para desarrolladores. Brinda conceptos esenciales y referencias para desarrollar aplicaciones en Solana. Cada concepto y referencia se enfocará en aspectos específicos del desarrollo en Solana brindando detalles adicionales y ejemplos de uso.

    Contribuyendo

    Solana Cookbook esta diseñado de tal forma que hace fácil que nuevos desarrolladores de Solana puedan contribuir. Incluso si no sabes cómo hacer algo ¡contribuir al Cookbook es una gran manera de aprender!

    Revisa todos los issues abiertos acáopen in new window. Las guías de contribución acáopen in new window. Si encuentras que el Cookbook le falta una sugerencia, por favor agrega un issue.

    Como Leer el Cookbook

    El Cookbok de Solana esta dividido en diferentes secciones, cada una con un objetivo diferente.

    seccióndescripción
    Conceptos BaseLos fundamentos de Solana que son buenos conocer para desarrollar
    GuíasPequeñas guías sobre diferentes herramientas para desarrollar
    ReferenciasReferencias a snippets de código comunmente necesarios
    Last Updated:
    Contributors: Marco Ordonez, Leonardo Galante
    - + diff --git a/docs/.vuepress/dist/es/references/accounts.html b/docs/.vuepress/dist/es/references/accounts.html index 15dfd7947..790ce365c 100644 --- a/docs/.vuepress/dist/es/references/accounts.html +++ b/docs/.vuepress/dist/es/references/accounts.html @@ -23,7 +23,7 @@ } Cuentas | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    Si deseas obtener el saldo de un token, deberás conocer la dirección de la cuenta de token. Para obtener más información, consulte Referencias de tokens

    Last Updated:
    Contributors: Marco Ordonez, Partially Sorted
    - + diff --git a/docs/.vuepress/dist/es/references/basic-transactions.html b/docs/.vuepress/dist/es/references/basic-transactions.html index be60cd55e..b2f99ab2a 100644 --- a/docs/.vuepress/dist/es/references/basic-transactions.html +++ b/docs/.vuepress/dist/es/references/basic-transactions.html @@ -23,7 +23,7 @@ } Enviando transacciones | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/references/keypairs-and-wallets.html b/docs/.vuepress/dist/es/references/keypairs-and-wallets.html index 965eaf0f9..00b0c90c4 100644 --- a/docs/.vuepress/dist/es/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/es/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Pares de llaves y billeteras | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (varios wallets, también conocido como HD wallets)

    Puede crear varias carteras a partir de una sola semilla, también conocidas como "carteras deterministas jerárquicas" o carteras HD:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Ejecute el siguiente comando para instalar las dependencias requeridas:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Ejecute el siguiente comando para instalar las dependencias requeridas:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    El paquete Svelte Wallet Adapteropen in new window permite agregar una tienda Svelte ($walletStore) accesible entre todos los archivos JS, TS y/o Svelte dentro de un proyecto realizado con Svelte Template o SvelteKit. Usando la referencia del repositorio aquíopen in new window puede usar el adaptador para SSR o SPA. El paquete de la interfaz de usuario contiene un componente <WalletMultiButton /> que permite a los usuarios seleccionar una billetera para conectar a ella.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Marco Ordonez, Partially Sorted
    - +
    Last Updated:
    Contributors: Marco Ordonez, Partially Sorted, Steven Luscher
    + diff --git a/docs/.vuepress/dist/es/references/local-development.html b/docs/.vuepress/dist/es/references/local-development.html index 8a3471ac0..106bfdf9a 100644 --- a/docs/.vuepress/dist/es/references/local-development.html +++ b/docs/.vuepress/dist/es/references/local-development.html @@ -23,7 +23,7 @@ } Desarrollo en entorno local | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Marco Ordonez, Partially Sorted
    - + diff --git a/docs/.vuepress/dist/es/references/name-service.html b/docs/.vuepress/dist/es/references/name-service.html index 31596553e..e6e48ce6a 100644 --- a/docs/.vuepress/dist/es/references/name-service.html +++ b/docs/.vuepress/dist/es/references/name-service.html @@ -23,7 +23,7 @@ } Servicio de nombres | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/references/nfts.html b/docs/.vuepress/dist/es/references/nfts.html index f1367df39..a091d62ee 100644 --- a/docs/.vuepress/dist/es/references/nfts.html +++ b/docs/.vuepress/dist/es/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -559,6 +559,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/references/offline-transactions.html b/docs/.vuepress/dist/es/references/offline-transactions.html index 804ad2869..04c15b52c 100644 --- a/docs/.vuepress/dist/es/references/offline-transactions.html +++ b/docs/.vuepress/dist/es/references/offline-transactions.html @@ -23,7 +23,7 @@ } Enviando transacciones offline | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/references/programs.html b/docs/.vuepress/dist/es/references/programs.html index 260c5239f..fd5e9886e 100644 --- a/docs/.vuepress/dist/es/references/programs.html +++ b/docs/.vuepress/dist/es/references/programs.html @@ -23,7 +23,7 @@ } Escribiendo Programas | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    El código del lado del cliente se verá de la siguiente manera:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    El código del lado del cliente se verá de la siguiente manera:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/references/staking.html b/docs/.vuepress/dist/es/references/staking.html index 4e4d51d5c..a4870c011 100644 --- a/docs/.vuepress/dist/es/references/staking.html +++ b/docs/.vuepress/dist/es/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/es/references/token.html b/docs/.vuepress/dist/es/references/token.html index afeed50f7..72af49373 100644 --- a/docs/.vuepress/dist/es/references/token.html +++ b/docs/.vuepress/dist/es/references/token.html @@ -23,7 +23,7 @@ } Interactuando con tokens | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: Marco Ordonez
    - + diff --git a/docs/.vuepress/dist/fil/core-concepts/accounts.html b/docs/.vuepress/dist/fil/core-concepts/accounts.html index bc4b26af9..e8aef9c07 100644 --- a/docs/.vuepress/dist/fil/core-concepts/accounts.html +++ b/docs/.vuepress/dist/fil/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Accounts | Solana Cookbook - +

    Accounts

    Ang mga account sa loob ng Solana ay ginagamit upang mag-imbak ng estado. Mahalaga sila building block para sa pagbuo sa Solana.

    Facts

    Fact Sheet

    • Ang mga account ay ginagamit upang mag-imbak ng data
    • Ang bawat account ay may natatanging address
    • Ang mga account ay may maximum na laki na 10MB (10 Mega Bytes)
    • Ang mga PDA account ay may max na laki na 10KB (10 Kilo Bytes)
    • Maaaring gamitin ang mga PDA account para mag-sign sa ngalan ng isang programa
    • Ang laki ng mga account ay naayos sa oras ng paggawa, ngunit maaaring isaayos gamit ang reallocopen in new window
    • Ang imbakan ng data ng account ay binabayaran ng upa
    • Default na may-ari ng account ay ang System Program

    Deep Dive

    Account Model

    Mayroong 3 uri ng mga account sa Solana:

    • Nag-iimbak ng data ang mga data account
    • Nag-iimbak ang mga program account ng mga executable na programa
    • Mga katutubong account na nagsasaad ng mga katutubong programa sa Solana gaya ng System, Stake, at Vote

    Sa loob ng mga data account, mayroong 2 uri:

    • Mga account na pagmamay-ari ng system
    • Mga PDA (Program Derived Address) account

    Ang bawat account ay may address (karaniwang pampublikong susi) at may-ari (address ng isang program account). Ang buong field ay naglilista ng isang account store ay matatagpuan sa ibaba.

    FieldDescription
    lamportsThe number of lamports owned by this account
    ownerThe program owner of this account
    executableWhether this account can process instructions
    dataThe raw data byte array stored by this account
    rent_epochThe next epoch that this account will owe rent

    Mayroong ilang mahahalagang tuntunin sa pagmamay-ari:

    • Tanging ang may-ari ng data account ang makakapagbago ng data at mga debit na lampor nito
    • Sinuman ay pinahihintulutan na i-credit ang mga lampor sa isang data account
    • Ang may-ari ng isang account ay maaaring magtalaga ng bagong may-ari kung ang data ng account ay na-zero out

    Ang mga account ng programa ay hindi nag-iimbak ng estado.

    Halimbawa, kung mayroon kang counter program na hinahayaan kang dagdagan ang isang counter, ikaw dapat gumawa ng dalawang account, isang account para mag-imbak ng code ng program, at isa para mag-imbak ang counter.

    Upang maiwasang matanggal ang isang account, dapat kang magbayad ng upa.

    Rent

    Ang pag-iimbak ng data sa mga account ay nagkakahalaga ng SOL upang mapanatili, at ito ay pinondohan ng tinatawag na upa. Kung nagpapanatili ka ng isang minimum na balanse na katumbas ng 2 taon ng mga pagbabayad sa upa sa isang account, ang iyong account ay magiging exempt sa pagbabayad ng upa. Maaari mong kunin ang upa sa pamamagitan ng pagsasara ang account at ibabalik ang mga lamport sa iyong wallet.

    Binabayaran ang upa sa dalawang magkaibang timing:

    1. Kapag tinukoy ng isang transaksyon
    2. Sa sandaling panahon

    Ang isang porsyento ng upa na nakolekta ng mga account ay nawasak, habang ang iba ay ipinamamahagi para bumoto ng mga account sa dulo ng bawat slot.

    Kung ang account ay walang sapat na pambayad ng renta, ang account ay ipagkakaloob at ang data inalis.

    Mahalaga ring tandaan na ang mga bagong account ay dapat na walang bayad sa pagrenta.

    Other Resources

    Credit

    Ang pangunahing konsepto na ito ay kredito sa Pencilflip. Follow him on Twitteropen in new window.

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/core-concepts/cpi.html b/docs/.vuepress/dist/fil/core-concepts/cpi.html index 3065cb40a..5cb08de8a 100644 --- a/docs/.vuepress/dist/fil/core-concepts/cpi.html +++ b/docs/.vuepress/dist/fil/core-concepts/cpi.html @@ -23,7 +23,7 @@ } Cross Program Invocations (CPIs) | Solana Cookbook - + @@ -92,6 +92,6 @@ account_three.clone(), ];

    Bagama't ang seksyong ito ay nagbigay ng mataas na antas na pangkalahatang-ideya ng mga CPI, ang mga mas detalyadong paliwanag, halimbawa, at walkthrough ay makikita sa mga naka-link na mapagkukunan sa ibaba.

    Other Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/core-concepts/pdas.html b/docs/.vuepress/dist/fil/core-concepts/pdas.html index 26c8f5eac..fdaa56bbb 100644 --- a/docs/.vuepress/dist/fil/core-concepts/pdas.html +++ b/docs/.vuepress/dist/fil/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) | Solana Cookbook - +

    Program Derived Addresses (PDAs)

    Ang Program Derived Addresses (Mga PDA) ay tahanan ng mga account na idinisenyo upang kontrolin ng isang partikular na programa. Sa mga PDA, ang mga programa ay maaaring mag-sign program para sa ilang partikular na address nang hindi nangangailangan ng pribadong key. Ang mga PDA ay nagsisilbing pundasyon para sa Cross-Program Invocationopen in new window, na nagbibigay-daan sa mga Solana app na maging composable sa isa't isa.

    Facts

    Fact Sheet

    • Ang mga PDA ay 32 byte string na mukhang mga pampublikong key, ngunit walang kaukulang pribadong key
    • Ang findProgramAddress ay tiyak na kukuha ng PDA mula sa isang programId at mga buto (koleksyon ng mga byte)
    • Isang bump (isang byte) ang ginagamit upang itulak ang isang potensyal na PDA mula sa ed25519 elliptic curve
    • Maaaring mag-sign ang mga program para sa kanilang mga PDA sa pamamagitan ng pagbibigay ng mga buto at bump sa invoke_signedopen in new window
    • Ang isang PDA ay maaari lamang pirmahan ng programa kung saan ito hinango
    • Bilang karagdagan sa pagpapahintulot sa mga programa na mag-sign para sa iba't ibang mga instruction, ang mga PDA ay nagbibigay din ng isang interface na parang hashmap para sa mga indexing account

    Deep Dive

    Ang mga PDA ay isang mahalagang building block para sa pagbuo ng mga programa sa Solana. Sa mga PDA, maaaring mag-sign ang mga program para sa mga account habang ginagarantiyahan na walang external na user ang makakabuo din ng wastong lagda para sa parehong account. Bilang karagdagan sa pag-sign para sa mga account, maaari ding baguhin ng ilang programa ang mga account na hawak sa kanilang mga PDA.

    Accounts matrix

    Larawan ng kagandahang-loob ni Pencilflip

    Generating PDAs

    Upang maunawaan ang konsepto sa likod ng mga PDA, maaaring makatulong na isaalang-alang na ang mga PDA ay hindi teknikal na nilikha, ngunit sa halip ay natagpuan. Ang mga PDA ay nabuo mula sa kumbinasyon ng mga buto (gaya ng string “vote_account”) at isang program id. Ang kumbinasyong ito ng mga buto at program id ay pinapatakbo sa pamamagitan ng sha256 hash function upang makita kung bumubuo sila ng pampublikong key na nasa ed25519 elliptic curve o hindi.

    Sa pagpapatakbo ng aming program id at seeds sa pamamagitan ng hash function, mayroong ~50% na pagkakataon na talagang magkakaroon kami ng wastong pampublikong key na nasa elliptic curve. Sa kasong ito, nagdaragdag lang kami ng isang bagay upang i-fudge ang aming input nang kaunti at subukang muli. Ang teknikal na termino para sa fudge factor na ito ay isang bump. Sa Solana, magsisimula tayo sa bump = 255 at umulit lang pababa sa bump = 254, bump = 253, atbp. hanggang sa makakuha tayo ng address na wala sa elliptic curve. Ito ay maaaring mukhang pasimula, ngunit kapag nahanap na ito ay nagbibigay sa amin ng isang tiyak na paraan ng pagkuha ng parehong PDA nang paulit-ulit.

    PDA on the ellipitic curve

    Interacting with PDAs

    When a PDA is generated, findProgramAddress will return both the address and Kapag nabuo ang isang PDA, ibabalik ng findProgramAddress ang address at ang bump na ginamit upang maalis ang address sa elliptic curve. Gamit ang bump na ito, ang isang program ay maaaring mag-sign para sa anumang pagtuturo na nangangailangan ng PDA nito. Upang makapirma, dapat na ipasa ng mga programa ang pagtuturo, ang listahan ng mga account, at ang mga buto at bump na ginamit upang gawing invoke_signed ang PDA. Bilang karagdagan sa pag-sign para sa mga instruction, dapat ding pumirma ang mga PDA para sa sarili nilang paggawa sa pamamagitan ng invoke_signed.

    Kapag nagtatayo gamit ang mga PDA, karaniwan nang imbakin ang bump seedopen in new window sa mismong data ng account. Nagbibigay-daan ito sa mga developer na madaling ma-validate ang isang PDA nang hindi kinakailangang pumasa sa bump bilang argumento ng pagtuturo.

    Other Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/core-concepts/programs.html b/docs/.vuepress/dist/fil/core-concepts/programs.html index d78e334d8..7f9f3ebd0 100644 --- a/docs/.vuepress/dist/fil/core-concepts/programs.html +++ b/docs/.vuepress/dist/fil/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programs | Solana Cookbook - +

    Programs

    Ang sinumang developer ay maaaring magsulat at mag-deploy ng mga programa sa Solana blockchain. Ang mga programa (kilala bilang mga matalinong kontrata sa iba pang mga protocol) ay nagsisilbing pundasyon para sa on-chain na aktibidad, na nagpapagana ng anuman mula sa DeFi at NFT hanggang sa Social Media at Gaming.

    Facts

    Fact Sheet

    • Pinoproseso ng mga program ang mga transaksyon mula sa parehong mga end user at iba pang mga program
    • Ang lahat ng mga programa ay stateless: anumang data na nakipag-ugnayan sa kanila ay nakaimbak sa magkahiwalay na accounts na ipinapasa sa pamamagitan ng mga instructions
    • Ang mga program mismo ay nakaimbak sa mga account na minarkahan bilang mapapatupad
    • Lahat ng mga programa ay pagmamay-ari ng BPF Loaderopen in new window at isinasagawa ng Solana Runtimeopen in new window
    • Ang mga developer ay karaniwang nagsusulat ng mga programa sa Rust o C++, ngunit maaaring pumili ng anumang wika na nagta-target ng LLVMopen in new window ng BPFopen in new window backend
    • Lahat ng mga programa ay may iisang entry point kung saan nagaganap ang pagpoproseso ng pagtuturo (i.e. process_instruction); palaging kasama sa mga parameter ang:
      • program_id: pubkey
      • account: array,
      • instruction_data: byte array

    Deep Dive

    Hindi tulad ng karamihan sa iba pang mga blockchain, ganap na pinaghihiwalay ng Solana ang code mula sa data. Ang lahat ng data kung saan nakikipag-ugnayan ang mga programa ay iniimbak sa magkahiwalay na mga account at ipinapasa bilang mga sanggunian sa pamamagitan ng mga instruction. Ang modelong ito ay nagbibigay-daan para sa isang generic na programa na gumana sa iba't ibang mga account nang hindi nangangailangan ng mga karagdagang deployment. Ang mga karaniwang halimbawa ng pattern na ito ay makikita sa buong Native at SPL Programs.

    Native Programs & The Solana Program Library (SPL)

    Ang Solana ay nilagyan ng ilang mga programa na nagsisilbing pangunahing mga bloke para sa mga on-chain na pakikipag-ugnayan. Ang mga programang ito ay nahahati sa Mga Native na Programopen in new window at Mga Programa ng Solana Program Library (SPL)open in new window.

    Ibinibigay ng Native Programs ang base functionality na kinakailangan para magpatakbo ng mga validator. Sa mga programang ito, ang pinakakilala ay ang System Programopen in new window na responsable sa pangangasiwa ng mga bagong account at paglilipat ng SOL sa pagitan ng dalawang partido .

    Sinusuportahan ng SPL Programs ang ilang mga on-chain na aktibidad, kabilang ang paggawa, pagpapalit, at pagpapahiram ng mga token, pati na rin ang pagbuo ng mga stake pool at pagpapanatili ng on-chain name service. Ang SPL Token Programopen in new window ay maaaring direktang gamitin sa pamamagitan ng CLI, habang ang iba ay tulad ng Associated Token Account Programopen in new window ay karaniwang binubuo ng mga pasadyang programa.

    Writing Programs

    Ang mga programa ay pinakakaraniwang binuo gamit ang Rust o C++, ngunit maaaring mabuo sa anumang wika na nagta-target sa backend ng BPF ng LLVM. Pinapagana ng mga kamakailang inisyatiba ng Neon Labsopen in new window at Solangopen in new window ang EVMopen in new window compatibility at payagan ang mga developer na magsulat ng mga program sa Solidity.

    Karamihan sa mga programang nakabatay sa kalawang ay sumusunod sa sumusunod na arkitektura:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors

    Kamakailan, ang Anchoropen in new window ay lumitaw bilang isang sikat na framework para sa pagbuo ng mga programa. Ang Anchor ay isang opinionated framework, na katulad ng Ruby on Rails, na binabawasan ang boilerplate at pinapa-streamline ang (de)serialization na proseso para sa Rust-based na development.

    Karaniwang binuo at sinusubok ang mga programa laban sa mga environment ng Localhost at Devnet bago i-deploy sa Testnet o Mainnet. Sinusuportahan ng Solana ang mga sumusunod na environment:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Kapag na-deploy na sa isang environment, maaaring makipag-ugnayan ang mga kliyente sa mga on-chain na program sa pamamagitan ng RPC connectionsopen in new window sa kaukulang cluster.

    Deploying Programs

    Maaaring i-deploy ng mga developer ang kanilang mga programa sa pamamagitan ng CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    Kapag na-deploy ang isang program, iko-compile ito sa isang ELF shared objectopen in new window (containing BPF bytecode) at ia-upload sa Solana cluster. Ang mga programa ay nakatira sa mga account (katulad ng lahat ng iba pa sa Solana), maliban sa mga account na ito ay minarkahan bilang executable at itinalaga sa BPF Loader. Ang address ng account na ito ay tinutukoy bilang program_id at ginagamit upang i-reference ang program sa lahat ng mga transaksyon sa hinaharap.

    Sinusuportahan ng Solana ang maraming BPF Loader, na ang pinakabago ay ang Upgradable BPF Loaderopen in new window. Ang BPF Loader ay may pananagutan sa pangangasiwa sa account ng programa at gawin itong available sa mga kliyente sa pamamagitan ng program_id. Ang lahat ng mga programa ay may iisang entry point kung saan nagaganap ang pagpoproseso ng pagtuturo (ibig sabihin, process_instruction) at palaging kasama sa mga parameter ang:

    • program_id: pubkey
    • account: array,
    • instruction_data: byte array

    Kapag na-invoke, ang mga programa ay isinasagawa ng Solana Runtime.

    Other Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/core-concepts/transactions.html b/docs/.vuepress/dist/fil/core-concepts/transactions.html index ab19bb8b7..8de00245c 100644 --- a/docs/.vuepress/dist/fil/core-concepts/transactions.html +++ b/docs/.vuepress/dist/fil/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions | Solana Cookbook - +

    Transactions

    Maaaring mag-invoke ang mga kliyente ng programs sa pamamagitan ng pagsusumite ng transaksyon sa isang cluster. Ang isang transaksyon ay maaaring magsama ng maraming instruction, ang bawat isa ay nagta-target ng sarili nitong programa. Kapag naisumite ang isang transaksyon, ipoproseso ng Solana Runtimeopen in new window ang mga instruction na ito sa pagkakasunud-sunod at atomically. Kung nabigo ang anumang bahagi ng isang pagtuturo, mabibigo ang buong transaksyon.

    Facts

    Fact Sheet

    • Ang mga instruction ay ang pinakapangunahing yunit ng pagpapatakbo sa Solana
    • Ang bawat instruction ay naglalaman ng:
      • Ang program_id ng nilalayon na programa
      • Isang hanay ng lahat ng account na nilalayon nitong basahin o sulatan
      • Isang instruction_data byte array na partikular sa nilalayon na programa
    • Maramihang mga instruction ay maaaring isama sa isang solong transaksyon
    • Ang bawat transaksyon ay naglalaman ng:
      • Isang hanay ng lahat ng account na nilalayon nitong basahin o sulatan
      • Isa o higit pang 'mga instruction'
      • Isang kamakailang blockhash
      • Isa o higit pang pirma
    • Ang mga instruction ay pinoproseso sa pagkakasunud-sunod at atomically
    • Kung nabigo ang anumang bahagi ng isang pagtuturo, mabibigo ang buong transaksyon.
    • Limitado ang mga transaksyon sa 1232 bytes

    Deep Dive

    Ang Solana Runtime ay nangangailangan ng parehong mga instruction at mga transaksyon upang tukuyin ang isang listahan ng lahat ng mga account na nilayon nilang basahin o sulatan. Sa pamamagitan ng pag-aatas sa mga account na ito nang maaga, ang runtime ay nagagawang iparallelize ang pagpapatupad sa lahat ng mga transaksyon.

    Kapag isinumite ang isang transaksyon sa isang cluster, ipoproseso ng runtime ang mga instruction na ito sa pagkakasunud-sunod at atomically. Para sa bawat pagtuturo, bibigyang-kahulugan ng tatanggap na programa ang array ng data nito at gagana sa mga tinukoy nitong account. Matagumpay na babalik ang program o may error code. Kung ang isang error ay ibinalik, ang buong transaksyon ay mabibigo kaagad.

    Ang anumang transaksyon na naglalayong i-debit ang isang account o baguhin ang data nito ay nangangailangan ng lagda ng may hawak ng account nito. Ang anumang account na babaguhin ay minarkahan bilang writable. Maaaring ma-kredito ang isang account nang walang pahintulot ng may-ari hangga't sinasaklaw ng nagbabayad ng transaction fee ang kinakailangang renta at mga bayarin sa transaksyon.

    Bago isumite, ang lahat ng transaksyon ay dapat sumangguni sa isang recent blockhashopen in new window. Ginagamit ang blockhash upang maiwasan ang mga duplikasyon at alisin ang mga lipas na transaksyon. Ang maximum na edad ng blockhash ng isang transaksyon ay 150 block, o humigit-kumulang ~1 minuto 19 segundo mula sa oras ng pagsulat na ito.

    Fees

    Nangongolekta ang network ng Solana ng dalawang uri ng mga bayarin:

    Sa Solana, ang mga bayarin sa transaksyon ay deterministiko: walang konsepto ng isang market ng bayad kung saan ang mga user ay maaaring magbayad ng mas mataas na mga bayarin upang mapataas ang kanilang mga pagkakataong mapabilang sa susunod na block. Sa oras ng pagsulat na ito, ang mga bayarin sa transaksyon ay tinutukoy lamang sa pamamagitan ng bilang ng mga kinakailangang lagda (ibig sabihin, lamports_per_signature), hindi sa dami ng mga mapagkukunang ginamit. Ito ay dahil kasalukuyang may hard cap na 1232 bytes sa lahat ng transaksyon.

    Ang lahat ng mga transaksyon ay nangangailangan ng hindi bababa sa isang writable na account upang lagdaan ang transaksyon. Kapag naisumite na, ang nasusulat na signer account na unang naka-serialize ang magiging nagbabayad ng bayad. Babayaran ng account na ito ang halaga ng transaksyon hindi alintana kung magtagumpay o mabigo ang transaksyon. Kung ang nagbabayad ng bayad ay walang sapat na balanse upang bayaran ang bayad sa transaksyon, ang transaksyon ay ibababa.

    Sa oras ng pagsulat na ito, 50% ng lahat ng bayarin sa transaksyon ay kinokolekta ng validator na gumagawa ng block, habang ang natitirang 50% ay sinusunog. Gumagana ang istrukturang ito upang mahikayat ang mga validator na iproseso ang pinakamaraming transaksyon hangga't maaari sa kanilang mga puwang sa iskedyul ng pinuno.

    Other Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/auto-approve.html b/docs/.vuepress/dist/fil/gaming/auto-approve.html index 8df471feb..badf1db42 100644 --- a/docs/.vuepress/dist/fil/gaming/auto-approve.html +++ b/docs/.vuepress/dist/fil/gaming/auto-approve.html @@ -23,11 +23,11 @@ } How to auto approve transactions | Solana Cookbook - +

    WIP - This is a work in progress

    Paano awtomatikong aprubahan ang transaksyon para sa mabilis na paglalaro at mahusay na ux

    Upang magkaroon ng tuluy-tuloy na paglalaro para sa mga on-chain na laro, kapaki-pakinabang na magkaroon ng wallet na awtomatikong aprubahan.

    1. Nag-aalok ang Solflare wallet ng auto-approve functionality na may burner wallet, ngunit nililimitahan nito ang iyong mga manlalaro sa isang wallet lang.

    Burner Auto Approve Walletsopen in new window

    1. Ang isa pang paraan para gawin ito ay ang gumawa ng key pair sa iyong laro at hayaan ang manlalaro na maglipat ng ilang sol sa wallet na iyon at pagkatapos ay gamitin ito upang magbayad para sa mga bayarin sa transaksyon. Ang problema lang dito ay kailangan mong pangasiwaan ang seguridad para sa wallet na ito at ang mga manlalaro ay kailangang magkaroon ng access sa kanilang seed phrase.

    Halimbawa ng Source Codeopen in new window
    Halimbawa ng Laroopen in new window

    1. Maaari mong bayaran ang mga bayarin sa iyong sarili, sa pamamagitan ng paggawa at pagpirma sa mga transaksyon sa backend at makipag-ugnayan dito sa pamamagitan ng isang API. Para doon magpadala ka ng mga parameter sa iyong backend at lagdaan ang transaksyon doon at magpadala ng kumpirmasyon sa kliyente sa sandaling tapos na ito.

    2. May protocol na tinatawag na @gumisfunn at naglabas sila ng feature na tinatawag na session keys. Ang Session Keys ay mga ephemeral key na may pinong saklaw ng programa/pagtuturo para sa tiered na pag-access sa iyong mga programang @solana. Nagbibigay-daan ang mga ito sa mga user na makipag-ugnayan sa mga app sa ilalim ng mga partikular na parameter tulad ng tagal, max na mga token, dami ng mga post o anumang iba pang function na partikular sa isang app. Linkopen in new window

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/distribution.html b/docs/.vuepress/dist/fil/gaming/distribution.html index 0d5cf6eaf..ee206fcf4 100644 --- a/docs/.vuepress/dist/fil/gaming/distribution.html +++ b/docs/.vuepress/dist/fil/gaming/distribution.html @@ -23,11 +23,11 @@ } Distribution | Solana Cookbook - +

    Pamamahagi

    Ang pamamahagi ng iyong laro ay lubos na nakadepende sa platform na iyong ginagamit. Sa Solana, may mga game SDK na maaari mong buuin para sa IOS, Android, Web at Native Windows o Mac. Gamit ang Unity SDK maaari mo ring ikonekta ang Nintendo Switch o XBox sa Solana ayon sa teorya. Maraming mga kumpanya ng laro ang umiikot sa isang mobile first approach dahil napakaraming tao ang may mga mobile phone sa mundo. Ang mobile ay may sarili nitong mga komplikasyon, kaya dapat mong piliin kung ano ang pinakaangkop sa iyong laro.

    Ang Solana ay may natatanging kalamangan sa iba pang mga blockchain platform dahil sa pag-aalok nito ng isang crypto-native na mobile phone, na pinangalanang Saga, na nilagyan ng isang makabagong dApps store. Ang tindahang ito ay nagbibigay-daan sa pamamahagi ng mga larong crypto nang walang mga limitasyong ipinataw ng mga kumbensyonal na tindahan ng app gaya ng Google o Apple.

    Mga Platform sa Pag-publish

    Mga platform kung saan maaari mong i-host ang iyong mga laro

    PlatformDescription
    Fractalopen in new windowA game publishing platform that supports Solana and Ethereum. They also have their own wallet and account handling and there is an SDK for high scores and tournaments.
    Elixiropen in new windowPlatform for web3 games that also offers a PC launcher
    Self HostingJust host your game yourself. For example using Vercelopen in new window which can be easily setup so that a new version get deployed as soon as you push to your repository. Other options are github pagesopen in new window or Google Firebaseopen in new window
    Solana mobile DApp Storeopen in new windowThe Solana alternative to Google Play and the Apple App Store. A crypto first variant of a dApp store, which is open source free for everyone to use.
    Apple App Storeopen in new windowThe Apple app store has a high reach and is trusted by its customers. The entrance barrier for crypto games is high though. The rules are very strict for everything that tries to circumvent the fees that Apple takes for in app purchases. A soon as an NFT provides benefits for the player for example Apple requires you for example to have them purchased via their in app purchase system.
    Google Play Storeopen in new windowGoogle is much more crypto friendly and games with NFTs and wallet deep links for example have had a track record of being approved for the official play store.
    xNFT Backpackopen in new windowBackpack is a Solana wallet which allows you to release apps as xNFTs. They appear in the users wallet as soon as they purchase them as applications. The Unity SDK has a xNFT export and any other web app can be published as xNFT as well.
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/energy-system.html b/docs/.vuepress/dist/fil/gaming/energy-system.html index 8283cac97..4d7352ee8 100644 --- a/docs/.vuepress/dist/fil/gaming/energy-system.html +++ b/docs/.vuepress/dist/fil/gaming/energy-system.html @@ -23,7 +23,7 @@ } Energy System | Solana Cookbook - + @@ -177,6 +177,6 @@ </div>)}

    Sa pamamagitan nito maaari ka na ngayong bumuo ng anumang larong nakabatay sa enerhiya at kahit na ang isang tao ay bumuo ng isang bot para sa laro ang pinakamaraming magagawa niya ay maglaro nang mahusay, na marahil ay mas madaling makamit kapag naglalaro nang normal depende sa lohika ng iyong laro.

    Ang larong ito ay nagiging mas mahusay kapag isinama sa halimbawa ng Token at talagang nag-drop ka ng ilang spl token sa mga manlalaro.

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/game-examples.html b/docs/.vuepress/dist/fil/gaming/game-examples.html index 135df27c8..967c3c275 100644 --- a/docs/.vuepress/dist/fil/gaming/game-examples.html +++ b/docs/.vuepress/dist/fil/gaming/game-examples.html @@ -23,11 +23,11 @@ } Learn By Example | Solana Cookbook - +

    Open source Solana laro upang sanggunian para sa pag-aaral

    Makipag-ugnayan sa Anchor Program mula sa Unity

    Isang simpleng halimbawa ng paglipat ng player pakaliwa at kanan gamit ang Anchor framework at Unity SD

    Videoopen in new window

    Live Versionopen in new window

    Playgroundopen in new window

    Unity Clientopen in new window

    Pag-save ng Sol sa isang PDA

    Alamin kung paano i-save ang sol sa isang PDA seed vault at ipadala ito pabalik sa isang player. Ang backend ay nakasulat sa Anchor at ang frontend ay gumagamit ng Unity SDK

    Videoopen in new window

    Live Versionopen in new window

    Sourceopen in new window

    Sa chain matchmaking

    Isang multiplayer match three game na gumagamit ng NFT stats para sa character stats sa laro at may kawili-wiling onchain matchmaking system.

    Live Versionopen in new window

    Sourceopen in new window

    Gumamit ng mga Solana Pay Qr code para makontrol ang isang laro

    Hilahang lubid Isang multiplayer na laro kung saan pinapalitan ang isang account sa pamamagitan ng Solana Pay qr code na maaaring maging player na may maraming tao sa isang malaking screen. Backend Anchor at ang frontend ay Js React at Next13.

    Tutorialopen in new window

    Exampleopen in new window

    Sourceopen in new window

    Itago ang estado ng laro mula sa iba pang mga manlalaro

    Bato papel gunting

    Isang laro kung saan nakatago ang data sa chain sa pamamagitan ng pag-save ng hash sa client hanggang sa maihayag. SPL Token bilang presyo para sa nanalo.

    Sourceopen in new window

    Isa pang halimbawang isinumite para sa grizzlython na nag-e-encrypt ng mga entry at ipinapadala ito sa susunod na manlalaro na may karagdagang pag-encrypt:

    Sourceopen in new window

    Paano bumuo ng isang round based na multiplayer na laro

    Tic Tac toe Isang simpleng larong multiplayer na nakasulat sa Anchor

    Tutorialopen in new window

    Sourceopen in new window

    Sa Chain Chess

    Chess Kumpleto sa chain playable chess game na nakasulat sa Anchor. Magpadala sa isang tao ng link para magsimula ng laro. Naghahanap ng mga kontribyutor.

    Live Versionopen in new window

    Sourceopen in new window

    Larong Multiplayer gamit ang sistema ng pagboto

    Sistema ng pagboto ng Pokemon Isang laro kung saan sama-samang bumoto ang mga tao sa mga galaw sa isang game boy game. Ang bawat galaw ay naitala at ang bawat galaw ay maaaring i-minted bilang isang NFT.

    Live Versionopen in new window

    Sourceopen in new window

    Halimbawa ng sistema ng sangkap ng entity

    Ang Kyoudai Clash ay isang on chain realtime Gamit ang jump crypto Arc frameworkopen in new window na isang on chain entity component system para sa Solana.

    xNFT Versionopen in new window

    Sourceopen in new window

    Pakikipagsapalaran sa pagpatay ng mga halimaw at pagkakaroon ng xp

    Ang Lumia online ay isang pagsusumite ng hackathon at isang magandang sanggunian para sa isang maliit na laro ng pakikipagsapalaran.

    xNFT Versionopen in new window

    Sourceopen in new window

    Real-time na pvp sa chain game

    SolHunter

    Real-time na Solana Battle Royal Game. Gamit ang Anchor program, UnitySDK, subscription sa WebSocket account. Maaaring i-spawn ng mga manlalaro ang kanilang mga character na kinakatawan bilang isa sa kanilang mga NFT sa isang grid at lumipat sa paligid. Kung ang isang manlalaro ay tumama sa isa pang manlalaro o dibdib ay kinokolekta niya ang Sol nito. Ang grid ay ipinatupad bilang isang dalawang dimensional na array kung saan ang bawat tile ay nagse-save ng wallet key ng mga manlalaro at ang NFT public key. Exampleopen in new window

    Sourceopen in new window

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/game-sdks.html b/docs/.vuepress/dist/fil/gaming/game-sdks.html index bd72ffc93..f2d86f320 100644 --- a/docs/.vuepress/dist/fil/gaming/game-sdks.html +++ b/docs/.vuepress/dist/fil/gaming/game-sdks.html @@ -23,12 +23,12 @@ } Solana Gaming SDKs | Solana Cookbook - +

    Unity SDK

    Ang unity game engine ay kilala sa beginner friendly approach at cross platform support kabilang ang WebGL, ios at android. Bumuo nang isang beses i-export sa lahat ng dako. Ang Solana Unity SDK ay may kasamang NFT support, mga transaksyon, RPC function, Phantom Deep lLinks, WebGL connector, WebSocket connection support, mobile wallet-adapter at anchor client code generation.

    Docsopen in new window
    Verified Unity Asset Store Listingopen in new window
    Example Gamesopen in new window

    Unreal SDK

    Ang Unreal engine ay kilala sa magagandang visual at node based scripting framework. Ang Solana sdk ay orihinal na binuo ng koponan ng Star Atlas.

    Star Atlas Unreal SDKopen in new window
    Tutorialopen in new window

    Flutter

    Ang Flutter ay isang open source na framework ng Google para sa pagbuo ng maganda, natively compiled, multi-platform na mga application mula sa isang codebase.

    Source Codeopen in new window

    Next.js/React + Anchor

    Isa sa pinakamadaling paraan upang bumuo sa Solana ay ang paggamit ng Web3js Javascript framework kasama ng Solana Anchor frameworks. Para sa mas kumplikadong mga laro, inirerekumenda ko ang paggamit ng GameEngine tulad ng Unity o Unreal. Ang pinakamabilis na paraan upang i-set up ito ay:

    npx create-solana-dapp your-app
     

    Ito ay bubuo ng isang mahusay na panimulang application na may suporta sa wallet-adapter. Ang isang benepisyo ng paggamit ng Next.js ay maaari mong gamitin ang parehong code sa backend at sa frontend, na nagpapabilis sa pag-develop.

    Web3Jsopen in new window
    Solana Cookbookopen in new window

    Python

    Ang Python ay isang madaling matutunang programming language na kadalasang ginagamit sa AI programming. Mayroong isang balangkas na tinatawag na Seahorse na hinahayaan kang bumuo ng mga matalinong kontrata sa Python.

    Anchor Playground Exampleopen in new window
    Source and Docsopen in new window

    Native C#

    Ang orihinal na port ng Web3js sa C#. Ito ay may kasamang grupo ng mga functionality tulad ng mga transaksyon, RPC function at anchor client code generation.

    Source and Docsopen in new window

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/hello-world.html b/docs/.vuepress/dist/fil/gaming/hello-world.html index 151bb1021..68ebbcd0e 100644 --- a/docs/.vuepress/dist/fil/gaming/hello-world.html +++ b/docs/.vuepress/dist/fil/gaming/hello-world.html @@ -23,7 +23,7 @@ } Hello World example | Solana Cookbook - + @@ -303,6 +303,6 @@ Player position is: 1 ....o....

    Binabati kita! Matagumpay mong nagawa, na-deploy, at nagamit ang larong Tiny Adventure mula sa kliyente. Upang higit pang mailarawan ang mga posibilidad, tingnan ang demoopen in new window na ito na nagpapakita kung paano makipag-ugnayan sa programang Tiny Adventure sa pamamagitan ng Next.js frontend.

    Where to Go from Here

    Saan Pupunta Mula Dito

    Nang kumpleto na ang pangunahing laro, ipamalas ang iyong pagkamalikhain at magsanay sa pagbuo nang nakapag-iisa sa pamamagitan ng pagpapatupad ng sarili mong mga ideya para pagyamanin ang karanasan sa laro. Narito ang ilang mungkahi:

    1. Baguhin ang mga in-game na teksto upang lumikha ng isang nakakaintriga na kuwento. Anyayahan ang isang kaibigan na maglaro sa pamamagitan ng iyong custom na salaysay at obserbahan ang mga on-chain na transaksyon habang nangyayari ang mga ito!
    2. Magdagdag ng chest na nagbibigay ng reward sa mga manlalaro ng Sol Rewards o hayaan ang player na mangolekta ng mga barya Makipag-ugnayan sa mga token habang sumusulong sila sa laro .
    3. Gumawa ng grid na nagbibigay-daan sa player na lumipat pataas, pababa, kaliwa, at kanan, at magpakilala ng maraming manlalaro para sa isang mas dynamic na karanasan.

    Sa susunod na yugto, Tiny Adventure Two, matututunan natin kung paano mag-imbak ng SOL sa programa at ipamahagi ito sa mga manlalaro bilang mga reward.

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/interact-with-tokens.html b/docs/.vuepress/dist/fil/gaming/interact-with-tokens.html index 23f52dbb2..165e13649 100644 --- a/docs/.vuepress/dist/fil/gaming/interact-with-tokens.html +++ b/docs/.vuepress/dist/fil/gaming/interact-with-tokens.html @@ -23,7 +23,7 @@ } How interact with tokens in programs | Solana Cookbook - + @@ -689,6 +689,6 @@ Player Token Balance: 0 Player Health: 100
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/intro.html b/docs/.vuepress/dist/fil/gaming/intro.html index f8bf44649..7019f3063 100644 --- a/docs/.vuepress/dist/fil/gaming/intro.html +++ b/docs/.vuepress/dist/fil/gaming/intro.html @@ -23,11 +23,11 @@ } Introduction to Gaming on Solana | Solana Cookbook - +

    Panimula sa paglalaro sa Solana

    Mabilis na lumalawak ang gaming space sa Solana ecosystem. Ang pagsasama sa Solana ay maaaring magbigay ng maraming benepisyo para sa mga laro, tulad ng pagbibigay-daan sa mga manlalaro na pagmamay-ari at ipagpalit ang kanilang mga asset sa pamamagitan ng mga NFT sa mga laro, pagbuo ng isang tunay na in-game na ekonomiya, paglikha ng mga composable na program ng laro, at pagpayag sa mga manlalaro na makipagkumpitensya para sa mahahalagang asset.

    Ang Solana ay sadyang binuo para sa mga laro, kasama ang 400ms block time nito at napakabilis ng kidlat na mga kumpirmasyon na ginagawa itong isang real-time na database na libre para sa lahat. Ito ay perpekto para sa mga genre tulad ng mga laro ng diskarte, mga tagabuo ng lungsod, mga larong nakabatay sa turn, at higit pa.

    Gayunpaman, hindi lahat ay kailangang ilagay sa blockchain. Ang mas maliliit na pagsasama gamit ang mga NFT na kumakatawan sa mga item ng laro, halimbawa, ay madaling magawa. Napakamura ng mga bayarin sa transaksyon, at maraming tool at SDK ang available para simulan ang pagbuo ngayon. Maaari mong buuin ang iyong laro sa Javascriptopen in new window at Canvas, [Flutter](https://github.com/espresso-cash/espresso -cash-public), o gumamit ng isa sa mga Solana Game SDK para sa dalawang pinakamalaking engine ng laro - UnitySDK, UnrealSDKopen in new window, at higit pa Mga SDK ng Laro.

    Mayroong ilang mga paraan upang isama ang Solana sa iyong laro:

    1. Bigyan ang mga manlalaro ng digital collectible para sa mga in-game na item o gamitin ang mga ito bilang mga character. Tingnan ang Nfts sa mga laro
    2. Gumamit ng mga token para sa mga in-app na pagbili o micro-payment sa laro. Tingnan ang gumamit ng mga token
    3. Gamitin ang wallet ng player para patotohanan sila sa laro. Sign message
    4. Magpatakbo ng mga tournament at magbayad ng mga crypto reward sa iyong mga manlalaro.
    5. Buuin ang laro na ganap na on-chain upang gantimpalaan ang iyong mga manlalaro sa bawat hakbang na kanilang gagawin. Magsimula sa Hello world

    Sa lahat ng mga benepisyong ito, ang Solana ay mabilis na nagiging go-to platform para sa mga developer ng laro. Magsimula ngayon!

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/nfts-in-games.html b/docs/.vuepress/dist/fil/gaming/nfts-in-games.html index 7378048c8..3ad18d347 100644 --- a/docs/.vuepress/dist/fil/gaming/nfts-in-games.html +++ b/docs/.vuepress/dist/fil/gaming/nfts-in-games.html @@ -23,7 +23,7 @@ } Gaming with NFTs | Solana Cookbook - + @@ -90,6 +90,6 @@ let data = await asset.accessorData(0); // fetches BoxTextured0.bin let image: Image = await asset.imageData.get(0) // fetches CesiumLogoFlat.png

    I-customize ang mga NFT gamit ang mga item at katangian (Mga patak ng ulan na bota)

    Gamit ang Raindrops Boots programopen in new window maaari kang magkaroon ng adventure character na nagmamay-ari ng espada at helmet. Kapag ang Character NFT ay ibebenta sa isang pamilihan, ang iba pang mga NFT na pagmamay-ari nito ay ibebenta rin.

    Paano lumikha ng isang koleksyon ng NFT

    Karamihan sa mga NFT sa Solana ay sumusunod sa pamantayan ng Metaplex. Ang Metaplex ay isang kumpanyang nangangalaga sa pinaka ginagamit na pamantayan ng NFT sa Solana. Ang pinakakaraniwang paraan upang lumikha ng isang koleksyon ng NFT ay ang lumikha ng isang metaplex candy machine na nagbibigay-daan sa user na mag-mint ng mga pares ng metadata at mga imahe.

    Metaplex Docsopen in new window

    Mag-set up ng candy machine nang sunud-sunodopen in new window

    NFTs

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/porting-anchor-to-unity.html b/docs/.vuepress/dist/fil/gaming/porting-anchor-to-unity.html index f1a8ff2db..b99f0e8f9 100644 --- a/docs/.vuepress/dist/fil/gaming/porting-anchor-to-unity.html +++ b/docs/.vuepress/dist/fil/gaming/porting-anchor-to-unity.html @@ -23,7 +23,7 @@ } Port Anchor to Unity | Solana Cookbook - + @@ -58,6 +58,6 @@ true, Commitment.Confirmed); }
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/saving-game-state.html b/docs/.vuepress/dist/fil/gaming/saving-game-state.html index 6c35dfea8..47d54d932 100644 --- a/docs/.vuepress/dist/fil/gaming/saving-game-state.html +++ b/docs/.vuepress/dist/fil/gaming/saving-game-state.html @@ -23,7 +23,7 @@ } Saving game state | Solana Cookbook - + @@ -104,6 +104,6 @@ const txSig = await sendTransaction(tx, connection); await connection.confirmTransaction(txSig, "confirmed");

    Kung paano aktwal na buuin ang sistema ng enerhiya na ito maaari mong matutunan dito: Pagbuo ng sistema ng Enerhiya

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/gaming/store-sol-in-pda.html b/docs/.vuepress/dist/fil/gaming/store-sol-in-pda.html index 26e77a38f..6e004834b 100644 --- a/docs/.vuepress/dist/fil/gaming/store-sol-in-pda.html +++ b/docs/.vuepress/dist/fil/gaming/store-sol-in-pda.html @@ -23,7 +23,7 @@ } Storing SOL in a PDA | Solana Cookbook - + @@ -495,6 +495,6 @@ .........\o/💎 ...........\o/

    Magaling! Matagumpay kang nakagawa, na-deploy, at nakipag-ugnayan sa Tiny Adventure Two mula sa panig ng kliyente. Nagsama ka ng bagong feature na nagbibigay-daan sa mga manlalaro na mangolekta ng mga reward sa pamamagitan ng pag-abot sa dibdib sa dulo ng level. Bukod dito, natutunan mo kung paano maglipat ng SOL sa loob ng isang Anchor program gamit ang mga cross-program invocations at sa pamamagitan ng direktang pagbabago ng mga lampor sa mga account.

    Huwag mag-atubiling magpatuloy sa pagbuo nang nakapag-iisa at pahusayin ang laro gamit ang mga karagdagang feature tulad ng mga bagong level o alternatibong reward!

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/getting-started/installation.html b/docs/.vuepress/dist/fil/getting-started/installation.html index f6affa813..b71cb6bde 100644 --- a/docs/.vuepress/dist/fil/getting-started/installation.html +++ b/docs/.vuepress/dist/fil/getting-started/installation.html @@ -23,12 +23,12 @@ } Installation | Solana Cookbook - + -

    I-install ang Web3.js

    Mayroong ilang mga library na magagamit mo upang makapagsimula sa javascript o typescript sa Solana.

    Web3.js

    Ang @solana/web3.jsopen in new window ay isang library na mayroong maraming pangunahing tool sa Solana para makipag-ugnayan, magpadala ng mga transaksyon, at magbasa mula sa blockchain.

    Maaari mong i-install gamit ang sumusunod:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    I-install ang Web3.js

    Mayroong ilang mga library na magagamit mo upang makapagsimula sa javascript o typescript sa Solana.

    Web3.js

    Ang @solana/web3.jsopen in new window ay isang library na mayroong maraming pangunahing tool sa Solana para makipag-ugnayan, magpadala ng mga transaksyon, at magbasa mula sa blockchain.

    Maaari mong i-install gamit ang sumusunod:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Bumuo Mula sa Source

    Kung hindi mo magagamit ang mga prebuilt na binary o mas gusto mong itayo ito sa iyong sarili mula sa pinagmulan, mag-navigate sa https://github.com/solana-labs/solana/releases/latestopen in new window, at i-download ang Source Code archive. I-extract ang code at buuin ang binary na may:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Maaari mong patakbuhin ang sumusunod na command upang makuha ang parehong resulta tulad ng sa prebuilt na binary:

    solana-install init
    -
    Last Updated:
    Contributors: mh
    - +
    Last Updated:
    Contributors: Steven Luscher, mh
    + diff --git a/docs/.vuepress/dist/fil/guides/account-maps.html b/docs/.vuepress/dist/fil/guides/account-maps.html index 19944b074..91c57d949 100644 --- a/docs/.vuepress/dist/fil/guides/account-maps.html +++ b/docs/.vuepress/dist/fil/guides/account-maps.html @@ -23,7 +23,7 @@ } Account Maps | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/guides/data-migration.html b/docs/.vuepress/dist/fil/guides/data-migration.html index 36b80d8f3..28a16ddd8 100644 --- a/docs/.vuepress/dist/fil/guides/data-migration.html +++ b/docs/.vuepress/dist/fil/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrating Program Data Accounts | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    Pagkatapos bumuo at magsumite ng instruction: VersionProgramInstruction::SetString(String) mayroon na kaming sumusunod na 'na-upgrade' na layout ng data ng account

    Program Account v2

    Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/guides/debugging-solana-programs.html b/docs/.vuepress/dist/fil/guides/debugging-solana-programs.html index dab48c261..77a7e5eaa 100644 --- a/docs/.vuepress/dist/fil/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/fil/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debugging Solana Programs | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Ang pag-debug dito ay magbibigay-daan sa iyong i-debug ang mga function at pamamaraan na ginamit sa test body ngunit gagawin hindi breakpoint sa iyong programa.

    The bee's knees eh?

    Lokal na Validator Node Testing mula sa Client Apps

    Panghuli, maaari kang magsimula ng isang lokal na validating node at i-load ang iyong program at anumang mga account gamit ang solana-test-validator mula sa command line.

    Sa diskarteng ito, kakailanganin mo ng client application gamit ang Rust RcpClient o sa JavaScript o Typescript client

    Tingnan ang solana-test-validator --help para sa higit pang mga detalye at opsyon. Para sa halimbawang programa narito ang pag-setup ng vanilla:

    1. Magbukas ng terminal sa repo folder
    2. Patakbuhin ang solana config set -ul upang itakda ang configuration upang tumuro sa lokal
    3. Patakbuhin ang solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Magbukas ng isa pang terminal at patakbuhin ang solana logs upang simulan ang log streamer
    5. Pagkatapos ay maaari mong patakbuhin ang iyong programa ng kliyente at obserbahan ang output ng programa sa terminal kung saan mo sinimulan ang log streamer

    Now that is the cat's pajamas YO!

    Resources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/guides/feature-parity-testing.html b/docs/.vuepress/dist/fil/guides/feature-parity-testing.html index 939ef2d79..d721ec9b5 100644 --- a/docs/.vuepress/dist/fil/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/fil/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Feature Parity Testing | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Happy Testing!

    Resources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/guides/get-program-accounts.html b/docs/.vuepress/dist/fil/guides/get-program-accounts.html index 10ffc6355..e6f5604f7 100644 --- a/docs/.vuepress/dist/fil/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/fil/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Get Program Accounts | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    Sa pamamagitan ng pagsasama-sama ng lahat ng tatlong parameter (dataSlice, dataSize, at memcmp) maaari nating limitahan ang saklaw ng aming query at mahusay na ibalik lamang ang data kung saan kami interesado.

    Other Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/guides/serialization.html b/docs/.vuepress/dist/fil/guides/serialization.html index b258bb558..368117637 100644 --- a/docs/.vuepress/dist/fil/guides/serialization.html +++ b/docs/.vuepress/dist/fil/guides/serialization.html @@ -23,7 +23,7 @@ } Serializing Data | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Resources

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/guides/versioned-transactions.html b/docs/.vuepress/dist/fil/guides/versioned-transactions.html index 8e4a15c64..1635ba972 100644 --- a/docs/.vuepress/dist/fil/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/fil/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } Versioned Transactions | Solana Cookbook - + @@ -55,6 +55,6 @@ }, );

    Other Resources

    References

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/index.html b/docs/.vuepress/dist/fil/index.html index 9ba14f660..7d5b3491b 100644 --- a/docs/.vuepress/dist/fil/index.html +++ b/docs/.vuepress/dist/fil/index.html @@ -23,11 +23,11 @@ } Cooking with Solana | Solana Cookbook - +

    Cooking with Solana

    Ang Solana Cookbook ay isang mapagkukunan ng developer na nagbibigay ng mahahalagang konsepto at sanggunian para sa pagbuo ng mga aplikasyon sa Solana. Ang bawat konsepto at pagtutuunan ng sanggunian ang mga tiyak na aspeto ng Solana pag-unlad habang nagbibigay ng karagdagang mga detalye at paggamit mga halimbawa.

    Paano mag-ambag

    Ang Cookbook ay idinisenyo sa paraang nagpapadali para sa bagong mga developer ng Solana na mag-aambag. Kahit ikaw hindi alam kung paano gumawa ng isang bagay, nag-aambag sa Ang cookbook ay isang mahusay na paraan upang matuto!

    Tingnan ang lahat ng bukas na isyu ditoopen in new window. Mga alituntunin sa kontribusyon ditoopen in new window. Kung nalaman mong walang mungkahi ang cookbook, mangyaring magdagdag ng isyu.

    How to Read the Cookbook

    Ang Solana Cookbook ay nahahati sa iba't ibang mga seksyon, ang bawat isa ay naglalayong sa ibang layunin.

    SectionDescription
    Mga pangunahing konseptoBuilding blocks ng Solana na magandang malaman para sa pag-gawa
    Mga gabaySnack-sized na mga gabay tungkol sa iba't ibang kasangkapan para sa pag-gawa
    Mga sanggunianMga sanggunian sa mga karaniwang kinakailangang snippet ng code
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/accounts.html b/docs/.vuepress/dist/fil/references/accounts.html index 704f53c0d..2b0d64e3a 100644 --- a/docs/.vuepress/dist/fil/references/accounts.html +++ b/docs/.vuepress/dist/fil/references/accounts.html @@ -23,7 +23,7 @@ } Accounts | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    Kung gusto mong makakuha ng balanse ng token, kakailanganin mong malaman ang address ng token account. Para sa higit pang impormasyon, tingnan ang Token References

    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/basic-transactions.html b/docs/.vuepress/dist/fil/references/basic-transactions.html index e712bd56c..8ffacdb8b 100644 --- a/docs/.vuepress/dist/fil/references/basic-transactions.html +++ b/docs/.vuepress/dist/fil/references/basic-transactions.html @@ -23,7 +23,7 @@ } Sending Transactions | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/keypairs-and-wallets.html b/docs/.vuepress/dist/fil/references/keypairs-and-wallets.html index da9d0ddce..3c787f074 100644 --- a/docs/.vuepress/dist/fil/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/fil/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs and Wallets | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (maraming wallet, kilala rin na HD wallet)

    Maaari kang gumawa ng maraming wallet mula sa iisang binhi - kilala rin bilang 'Hierarchical Deterministic wallet' o HD wallet:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Patakbuhin ang sumusunod na command upang i-install ang mga kinakailangang dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Patakbuhin ang sumusunod na command upang i-install ang mga kinakailangang dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Ang Svelte Wallet Adapteropen in new window package ay nagbibigay-daan upang magdagdag ng Svelte Store ($walletStore) na maa-access sa lahat ng JS, TS o/at Svelte file sa loob ng isang proyektong ginawa gamit ang Svelte Template o SvelteKit. Gamit ang repo reference ditoopen in new window maaari mong gamitin ang adapter para sa SSR o SPA. Ang UI package ay naglalaman ng <WalletMultiButton /> component upang payagan ang mga user na pumili ng wallet para kumonekta dito.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: mh
    - +
    Last Updated:
    Contributors: Steven Luscher, mh
    + diff --git a/docs/.vuepress/dist/fil/references/local-development.html b/docs/.vuepress/dist/fil/references/local-development.html index b5b07d9cc..f558db385 100644 --- a/docs/.vuepress/dist/fil/references/local-development.html +++ b/docs/.vuepress/dist/fil/references/local-development.html @@ -23,7 +23,7 @@ } Local Development | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/name-service.html b/docs/.vuepress/dist/fil/references/name-service.html index 8c2b7374d..464623cd7 100644 --- a/docs/.vuepress/dist/fil/references/name-service.html +++ b/docs/.vuepress/dist/fil/references/name-service.html @@ -23,7 +23,7 @@ } Name Service | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/nfts.html b/docs/.vuepress/dist/fil/references/nfts.html index 259fce0e1..0180f2f31 100644 --- a/docs/.vuepress/dist/fil/references/nfts.html +++ b/docs/.vuepress/dist/fil/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/offline-transactions.html b/docs/.vuepress/dist/fil/references/offline-transactions.html index 87fc38e65..8f0d855d4 100644 --- a/docs/.vuepress/dist/fil/references/offline-transactions.html +++ b/docs/.vuepress/dist/fil/references/offline-transactions.html @@ -23,7 +23,7 @@ } Sending Offline Transactions | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/programs.html b/docs/.vuepress/dist/fil/references/programs.html index 29e628c4a..b0471e36d 100644 --- a/docs/.vuepress/dist/fil/references/programs.html +++ b/docs/.vuepress/dist/fil/references/programs.html @@ -23,7 +23,7 @@ } Writing Programs | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    Ang kaukulang client side code ay magiging ganito ang hitsura

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    Ang kaukulang client side code ay magiging ganito ang hitsura

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/staking.html b/docs/.vuepress/dist/fil/references/staking.html index ce9a47586..256b2b6ac 100644 --- a/docs/.vuepress/dist/fil/references/staking.html +++ b/docs/.vuepress/dist/fil/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fil/references/token.html b/docs/.vuepress/dist/fil/references/token.html index 2ad5706de..80d924f8f 100644 --- a/docs/.vuepress/dist/fil/references/token.html +++ b/docs/.vuepress/dist/fil/references/token.html @@ -23,7 +23,7 @@ } Interacting with Tokens | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: mh
    - + diff --git a/docs/.vuepress/dist/fr/core-concepts/accounts.html b/docs/.vuepress/dist/fr/core-concepts/accounts.html index ff19cc6ba..c05f65610 100644 --- a/docs/.vuepress/dist/fr/core-concepts/accounts.html +++ b/docs/.vuepress/dist/fr/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Comptes | Solana Cookbook - +

    Comptes

    Les comptes dans Solana sont utilisés pour stocker des états. Ils constituent un élément essentiel pour le développement sur Solana.

    Faits

    Fiche d'Information

    • Les comptes sont utilisés pour stocker des données
    • Chaque compte a une adresse unique
    • Les comptes ont une taille maximale de 10MB (10 Mega Bytes)
    • Les comptes des adresses dérivées d'un programme (PDA) ont une taille maximale de 10KB (10 Kilo Bytes)
    • Les comptes des adresses dérivées d'un programme (PDA) peuvent être utilisés pour signer au nom d'un programme
    • La taille des comptes est fixée au moment de leur création, mais elle peut être ajustée en utilisant la fonctionnalité reallocopen in new window
    • Le stockage des données sur un compte est payé par une rente
    • Le propriétaire par défaut d'un compte est le programme système (System Program)

    Examen plus approfondi

    Le modèle d'un compte

    Il existe 3 types de comptes sur Solana :

    • Les comptes de données pour le stockage des données
    • Les comptes de programmes pour le stockage des programmes exécutables
    • Les comptes natifs pour les programmes natifs de Solana tels que System, Stake, et Vote

    Il existe deux types de comptes de données :

    • Les comptes appartenant au système
    • Les comptes PDA (adresse dérivée du programme)

    Chaque compte a une adresse (généralement une clé publique) et un propriétaire (adresse d'un compte de programme). La liste complète des champs qu'un compte stocke est énuméré ci-dessous.

    ChampsDescription
    lamportsLe nombre de lamports appartenant à ce compte
    ownerLe programme propriétaire de ce compte
    executableIndique si ce compte peut traiter des instructions
    dataLe tableau d'octets de données brutes stocké par ce compte
    rent_epochLa prochaine époque à laquelle ce compte doit payer une rente

    Il existe quelques règles importantes concernant la propriété des comptes :

    • Seul le propriétaire d'un compte de données peut modifier ses données et débiter les lamports
    • Tout le monde est autorisé à envoyer des lamports sur un compte de données
    • Le propriétaire d'un compte peut désigner un nouveau propriétaire si les données de celui-ci sont mises à zéro

    Les comptes de programme ne stockent pas d'état.

    Par exemple, si vous avez un programme de comptage qui permet d'incrémenter un compteur, vous devez créer deux comptes, un compte pour stocker le code du programme, et un autre pour stocker le compteur.

    Pour éviter qu'un compte soit supprimé, vous devez payer une rente.

    Rente

    Le stockage des données sur les comptes coûte des SOL, et il est financé par ce qu'on appelle une rente. Si vous maintenez un solde minimum équivalent à deux années de rente sur un compte, celui-ci sera exempté du paiement de cette rente. Vous pouvez récupérer la rente en fermant le compte et en renvoyant les lamports dans votre portefeuille.

    La rente est payée à deux moments différents :

    1. Lorsqu'il est référencé par une transaction
    2. Une fois par époque

    Un pourcentage des rentes collectées par les comptes est détruit, tandis que le reste est distribué aux comptes de vote à la fin de chaque slot.

    Si le compte ne dispose pas d'assez d'argent pour payer la rente, le compte sera supprimé ainsi que ses données.

    Il est également important de noter que les nouveaux comptes doivent être exempts de rente.

    Autres Ressources

    Crédit

    Ce concept de base est attribué à Pencilflip. Suivez-le sur Twitteropen in new window.

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/core-concepts/cpi.html b/docs/.vuepress/dist/fr/core-concepts/cpi.html index c6dbb6b7e..23691632b 100644 --- a/docs/.vuepress/dist/fr/core-concepts/cpi.html +++ b/docs/.vuepress/dist/fr/core-concepts/cpi.html @@ -23,7 +23,7 @@ } Invocations de Programme Croisé (CPIs) | Solana Cookbook - + @@ -92,6 +92,6 @@ account_three.clone(), ];

    Bien que cette section ait fourni une vue d'ensemble des CPI, des explications plus détaillées, des exemples et des guides peuvent être trouvés dans les ressources ci-dessous.

    Autres Ressources

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/core-concepts/pdas.html b/docs/.vuepress/dist/fr/core-concepts/pdas.html index 95836cabe..8ec6b67f5 100644 --- a/docs/.vuepress/dist/fr/core-concepts/pdas.html +++ b/docs/.vuepress/dist/fr/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Adresses dérivées de programmes (PDAs) | Solana Cookbook - +

    Adresses dérivées de programmes (PDAs)

    Les adresses dérivées de programmes (PDA) sont des comptes qui sont conçus pour être contrôlés par un programme spécifique. Avec les PDAs, les programmes peuvent signer, de manière programmée, pour certaines adresses sans avoir besoin d'une clé privée. Les PDAs servent de base à l'invocation inter-programmesopen in new window, qui permet aux applications de Solana d'être composables les unes avec les autres.

    Faits

    Fiche d'Information

    • Les PDAs sont des chaînes de caractères de 32 bytes qui ressemblent à des clés publiques, mais qui n'ont pas de clés privées correspondantes
    • findProgramAddress dérivera de manière déterministe un PDA à partir d'un programId et de seeds (collection de bytes)
    • Un bump (un byte) est utilisé pour déplacer un PDA potentiel hors de la courbe elliptique ed25519
    • Les programmes peuvent signer pour leurs PDAs en fournissant les seeds et le bump à l'invoke_signedopen in new window
    • Un PDA ne peut être signé que par le programme dont il est dérivé
    • En plus de permettre aux programmes de signer pour différentes instructions, les PDAs fournissent aussi une interface de type hashmap pour les indexing accounts

    Examen plus approfondi

    Les PDAs sont un élément essentiel pour le développement de programmes sur Solana. Avec les PDAs, les programmes peuvent signer pour des comptes tout en garantissant qu'aucun utilisateur externe ne pourrait également générer une signature valide pour le même compte. En plus de la signature des comptes, certains programmes peuvent également modifier les comptes détenus par leurs PDAs.

    Accounts matrix

    Image courtesy of Pencilflip

    Génération des PDAs

    Pour comprendre le concept des PDAs, il peut être utile de considérer que les PDAs ne sont pas techniquement créés, mais plutôt trouvés. Les PDAs sont générés à partir d'une combinaison de seeds (telles que la chaîne “vote_account”) et d'un identifiant de programme. Cette combinaison de seeds et d'identifiant de programme est ensuite exécutée par une fonction de hachage sha256 pour voir si elle génère ou non une clé publique qui se trouve sur la courbe elliptique ed25519.

    En faisant passer notre identifiant de programme et nos seeds à travers une fonction de hachage, il y a environ 50 % de chances que nous obtenions une clé publique valide qui se trouve sur la courbe elliptique. Dans ce cas, nous ajoutons simplement quelque chose pour modifier un peu notre entrée et nous réessayons. Le terme technique pour le quelque chose que nous rajoutons est un "bump". Dans Solana, nous commençons par bump = 255 et itérons simplement en soustrayant 1 à chaque fois, nous utilisons ainsi bump = 254, bump = 253, etc. jusqu'à ce que nous obtenions une adresse qui n'est pas sur la courbe elliptique. Cela peut sembler rudimentaire, mais une fois trouvé, cela nous donne un moyen déterministe de dériver le même PDA encore et encore.

    Le PDA sur la courbe elliptique

    Interaction avec les PDAs

    Quand un PDA est généré, findProgramAddress retournera à la fois l'adresse et le bump utilisé pour déplacer celle-ci hors de la courbe elliptique. Avec ce bump, un programme peut alors signer pour toute instruction qui requiert son PDA. Afin de signer, les programmes doivent passer l'instruction, la liste des comptes, ainsi que les seeds et le bump utilisés pour dériver le PDA à invoke_signed. En plus de signer pour les instructions, les PDAs doivent également signer leur propre création avec invoke_signed.

    Lors de la création de PDAs, il est courant de stocker le bump et les seedsopen in new window dans les données du compte lui-même. Cela permet ainsi aux développeurs de valider facilement un PDA sans avoir à transmettre en argument de l'instruction le bump.

    Autres Ressources

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/core-concepts/programs.html b/docs/.vuepress/dist/fr/core-concepts/programs.html index 57d0d93ae..79c34a962 100644 --- a/docs/.vuepress/dist/fr/core-concepts/programs.html +++ b/docs/.vuepress/dist/fr/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programmes | Solana Cookbook - +

    Programmes

    N'importe quel développeur peut écrire et déployer des programmes sur la blockchain Solana. Les programmes (connus sous le nom de contrats intelligents sur d'autres protocoles) servent de base à l'activité sur la blockchain, permettant tout, partant de la DeFi et des NFTs jusqu'aux médias sociaux tout en passant par les jeux.

    Faits

    Fiche d'Information

    • Les programmes traitent les instructions des utilisateurs finaux mais aussi d'autres programmes
    • Tous les programmes sont stateless (sans état): toutes les données avec lesquelles ils interagissent sont stockées dans des comptes séparés qui sont transmis par des instructions.
    • Les programmes eux-mêmes sont stockés dans des comptes marqués comme executable
    • Tous les programmes appartiennent au BPF Loaderopen in new window et sont exécutés par le Solana Runtimeopen in new window
    • Les développeurs écrivent le plus souvent des programmes en Rust ou en C++, mais ils peuvent choisir n'importe quel langage qui cible le backend BPFopen in new window de LLVMopen in new window
    • Tous les programmes ont un point d'entrée unique où le traitement des instructions a lieu (i.e. process_instruction); et dont les paramètres incluent toujours:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Examen plus approfondi

    Contrairement à la plupart des autres blockchains, Solana sépare complètement le code des données. Toutes les données avec lesquelles les programmes interagissent sont stockées dans des comptes séparés et sont transmises, en tant que références, via des instructions. Ce modèle permet à un seul programme générique de fonctionner sur plusieurs comptes sans nécessiter de déploiements supplémentaires. Des exemples communs de ce modèle sont observés dans les programmes natifs et les programmes SPL.

    Programmes Natifs & La Bibliothèque des Programmes de Solana (SPL)

    Solana est équipé d'un certain nombre de programmes qui servent d'éléments de base pour les interactions sur la blockchain. Ces programmes sont divisés en Programmes Natifsopen in new window et en Programmes de la Bibliothèque des Programmes de Solana (SPL)open in new window.

    Les Programmes Natifs fournissent les fonctions de base nécessaires au fonctionnement des validateurs. Parmi ces programmes, le plus connu est le Programme Système (System Program)open in new window qui est responsable de l'administration des nouveaux comptes et de transférer des SOL entre deux parties.

    Les programmes de la Bibliothèque des Programmes de Solana (SPL) prennent en charge d'autres activités au sein de la blockchain, telles que, par exemple, la création de jetons, l'échange de jetons ainsi ou encore le prêt de jetons, ainsi que la création de pools de staking et le maintien on-chain du service de noms de domaine. Le Programme de Jeton SPL (SPL Token Program)open in new window peut être invoqué directement via l'interface CLI, tandis que d'autres, comme le Programme de Compte de Jeton Associé (Associated Token Account Program)open in new window sont généralement utilisés par d'autres programmes.

    Ecrire des programmes

    Les programmes sont le plus souvent développés avec Rust ou C++, mais peuvent être développés avec n'importe quel langage qui cible le backend BPF de LLVM. Les initiatives récentes de Neon Labsopen in new window et Solangopen in new window permettent la compatibilité EVMopen in new window et permettent donc aux développeurs d'écrire des programmes en Solidity.

    La plupart des programmes Rust suivent l'architecture suivante :

    FichierDescription
    lib.rsRegistre des modules
    entrypoint.rsPoint d'entrée du programme
    instruction.rsAPI du programme, (dé)sérialisation des instructions
    processor.rsLogique du programme
    state.rsObjets du programme, (dé)sérialisation des états
    error.rsErreurs spécifiques au programme

    Récemment, Anchoropen in new window est devenu le framework le plus populaire pour le développement de programmes. Anchor est un framework, semblable à Ruby on Rails, qui réduit le boilerplate (code passe-partout) et facilite la (dé)sérialisation pour les programmes développés en Rust.

    Les programmes sont généralement développés et testés dans les environnements appelés Localhost et Devnet avant d'être déployés sur le Testnet ou le Mainnet. Solana supporte les environnements suivants :

    Environnement du clusterURL de Connexion RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Une fois déployés dans un environnement, les clients peuvent interagir avec les programmes de la blockchain via les Connexions RPCopen in new window du cluster correspondant.

    Déployer des programmes

    Les développeurs peuvent déployer leurs programmes via le CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    Lorsqu'un programme est déployé, il est compilé en un objet partagé ELF (ELF shared object)open in new window (contenant le bytecode du BPF) et téléchargé sur le cluster Solana. Les programmes vivent dans des comptes (comme à peu près tout ce qui se trouve sur Solana), sauf que ceux-ci sont marqués comme executable et assigné au BPF Loader. L'adresse de ce compte est appelée program_id et est utilisée pour référencer le programme dans toutes les transactions futures.

    Solana supporte plusieurs BPF Loaders, dont le dernier en date est le Upgradable BPF Loaderopen in new window. Le BPF Loader est chargé de gérer les comptes du programme et de les rendre accessibles aux clients via le program_id. Tous les programmes ont un point d'entrée unique où le traitement des instructions a lieu (i.e. process_instruction) et dont les paramètres incluent toujours:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Une fois invoqués, les programmes sont exécutés par le Runtime de Solana.

    Autres Ressources

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/core-concepts/transactions.html b/docs/.vuepress/dist/fr/core-concepts/transactions.html index 3af424d77..6a5360c1a 100644 --- a/docs/.vuepress/dist/fr/core-concepts/transactions.html +++ b/docs/.vuepress/dist/fr/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions | Solana Cookbook - +

    Transactions

    Les clients peuvent invoquer des programmes en soumettant une transaction à un cluster. Une seule transaction peut comprendre plusieurs instructions, chacune ciblant son propre programme. Lorsqu'une transaction est soumise, Le Runtimeopen in new window de Solana va traiter ses instructions dans l'ordre et de manière atomique. Si le traitement d'au moins une instruction échoue, c'est l'ensemble de la transaction qui échouera.

    Faits

    Fiche d'Information

    • Les instructions sont l'unité de base du fonctionnement de Solana
    • Chaque instruction contient :
      • Le program_id du programme visé
      • Un tableau de tous les accounts (comptes) dans lesquels il a l'intention de lire ou d'écrire
      • Un tableau d'octets instruction_data qui est spécifique au programme visé
    • Plusieurs instructions peuvent être regroupées en une seule transaction
    • Chaque transaction contient :
      • Un tableau de tous les accounts (comptes) dans lesquels il a l'intention de lire ou d'écrire
      • Une ou plusieurs instructions
      • Un blockhash (hash de blocs) récent
      • Une ou plusieurs signatures
    • Les instructions sont traitées dans l'ordre et de manière atomique
    • Si le traitement d'au moins une instruction échoue, c'est l'ensemble de la transaction qui échouera.
    • Les transactions sont limitées à 1232 octets

    Examen plus approfondi

    Le Runtime de Solana nécessite que les instructions et les transactions spécifient une liste de tous les comptes dans lesquels elles ont l'intention de lire ou d'écrire. En exigeant ces comptes à l'avance, le runtime est capable de paralléliser l'exécution de toutes les transactions.

    Lorsqu'une transaction est soumise à un cluster, le runtime traite ses instructions dans l'ordre et de manière atomique. Pour chaque instruction, le programme utilisé interprète le tableau de données et opère sur les comptes spécifiés. Le programme retournera soit un message de succès, soit un code d'erreur. Si une erreur est retournée, l'ensemble de la transaction échoue instantanément.

    Toute transaction visant à débiter un compte ou à modifier ses données nécessite la signature de son propriétaire. Tout compte qui sera modifié sera marqué comme writable. Un compte peut être crédité sans l'autorisation de son propriétaire à condition que le payeur des frais de transaction couvre les frais de rente et les frais de transaction nécessaires.

    Avant d'être soumises, toutes les transactions doivent faire référence à un hash de blocs récentopen in new window. Le hash de blocs récent est utilisé pour éviter les doublons et éliminer les transactions obsolètes. L'âge maximal que peut avoir le hash de blocs d'une transaction est de 150 blocs ou environ 1 minute et 19 secondes au moment où nous écrivons ces lignes.

    Frais

    Le réseau Solana perçoit deux types de frais :

    Dans Solana, les frais de transaction sont déterministes : il n'existe pas de concept de marché des frais dans lequel les utilisateurs peuvent payer des frais plus élevés pour augmenter leurs chances d'être inclus dans le bloc suivant. Au moment où nous écrivons ces lignes, les frais de transaction sont déterminés uniquement par le nombre de signatures requises (i.e. lamports_per_signature), et non par la quantité de ressources utilisées. Cela est dû au fait qu'il existe actuellement une limite maximale de 1232 bytes pour toutes les transactions.

    Toutes les transactions nécessitent qu'il y ait au moins un compte writable (accessible en écriture) pour signer la transaction. Une fois soumise, le compte signataire accessible en écriture qui est sérialisé en premier sera le payeur des frais. Ce compte paiera le coût de la transaction, que celle-ci réussisse ou échoue. Si le payeur des frais ne dispose pas d'un solde suffisant pour payer les frais de transaction, la transaction sera abandonnée.

    Au moment où nous écrivons ces lignes, 50 % de tous les frais de transaction sont perçus par le validateur qui produit le bloc, tandis que les 50 % restants sont brûlés. Ce mécanisme a pour but d'inciter les validateurs à traiter le plus grand nombre possible de transactions pendant les créneaux qui leur sont attribués dans le calendrier des leaders.

    Autres Ressources

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/auto-approve.html b/docs/.vuepress/dist/fr/gaming/auto-approve.html index 2faa6718c..962d0110b 100644 --- a/docs/.vuepress/dist/fr/gaming/auto-approve.html +++ b/docs/.vuepress/dist/fr/gaming/auto-approve.html @@ -23,11 +23,11 @@ } How to auto approve transactions | Solana Cookbook - +

    WIP - This is a work in progress

    How to auto approve transaction for fast game play and great ux

    To have a fluid game play for on-chain games it is beneficial to have an auto approve wallet.

    1. Solflare wallet offers auto-approve functionality with burner wallets, but this limits your players to only one wallet.

    Burner Auto Approve Walletsopen in new window

    1. Another way to do it is to create a key pair in your game and let the player transfer some sol to that wallet and then use it to pay for transaction fees. Only problem with this is that you need to handle the security for this wallet and the players would need to have access to their seed phrase.

    Example Source Codeopen in new window
    Example Gameopen in new window

    1. You can pay the fees yourself, by creating and signing the transactions in the backend and interact with it via an API. For that you send parameters to your backend and sign the transaction there and send a confirmation to the client as soon as it is done.

    2. There is a protocol called @gumisfunn and they released a feature called session keys. Session Keys are ephemeral keys with fine-grained program/instruction scoping for tiered access in your @solana programs. They allow users to interact with apps under particular parameters like duration, max tokens, amount of posts or any other function specific to an app. Linkopen in new window

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/distribution.html b/docs/.vuepress/dist/fr/gaming/distribution.html index 1504a8429..4eada8193 100644 --- a/docs/.vuepress/dist/fr/gaming/distribution.html +++ b/docs/.vuepress/dist/fr/gaming/distribution.html @@ -23,11 +23,11 @@ } Distribution | Solana Cookbook - +

    Distribution

    La distribution de votre jeu dépend fortement de la plateforme que vous utilisez. Avec Solana, il existe des SDK de jeux que vous pouvez créer pour IOS, Android, Web, Windows ou Mac. En utilisant le SDK Unity, vous pourriez même, en théorie, connecter une Nintendo Switch ou une Xbox à Solana. De nombreuses sociétés de jeux adoptent une stratégie axée sur le mobile puisque de nombreuses personnes possèdent un téléphone portable dans le monde. Développer sur mobile s'accompagne toutefois de ses propres complications, c'est pourquoi vous devez choisir ce qui convient le mieux pour votre jeu.

    Solana a une longueur d'avance sur les autres blockchains grâce à son téléphone portable crypto-natif, appelé Saga, qui est équipé d'un dApps Store innovant. Celui-ci permet la distribution de jeux crypto sans les limitations imposées par les app stores traditionnels tels que Google ou Apple.

    Plateformes de publication

    Plateformes où vous pouvez héberger vos jeux

    PlateformeDescription
    Fractalopen in new windowUne plateforme de publication de jeux qui prend en charge Solana et Ethereum. Ils disposent également de leur propre portefeuille et de leur propre gestion de compte, ainsi que d'un SDK qui permet de gérer les meilleurs scores et les tournois.
    Elixiropen in new windowPlateforme de jeux web3 offrant également un launcher pour PC
    Auto-hébergementHébergez vous-même votre jeu. Par exemple en utilisant Vercelopen in new window qui peut être facilement configuré pour qu'une nouvelle version soit déployée dès que vous l'envoyez à votre répertoire GitHub. D'autres options sont les pages GitHubopen in new window ou Google Firebaseopen in new window
    DApp Store de Solana mobileopen in new windowL'alternative Solana à Google Play et à l'App Store d'Apple. Une première version crypto d'un dApp store, open source et libre d'utilisation par tous.
    App Store d'Appleopen in new windowL'App Store d'Apple a une grande portée et jouit de la confiance de ses clients. La barrière d'entrée pour les jeux crypto est toutefois élevée. Les règles sont très strictes pour tout ce qui tente de contourner les frais prélevés par Apple pour les achats d'applications. Par exemple, dès qu'un NFT offre des avantages au joueur, Apple exige que vous l'achetiez via son système d'achat d'applications.
    Google Play Storeopen in new windowGoogle est beaucoup plus favorable aux cryptomonnaies et aux jeux intégrant, par exemple, des NFT et des Deep Links vers des portefeuilles. Ainsi des jeux ont déjà été approuvés par le Play Store.
    xNFT Backpackopen in new windowBackpack est un portefeuille Solana qui vous permet de publier des applications sous forme de xNFTs. Ils apparaissent dans le portefeuille des utilisateurs dès qu'ils les achètent en tant qu'applications. Le SDK Unity possède un export vers xNFT et toute autre application web peut être également publiée en xNFT.
    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/energy-system.html b/docs/.vuepress/dist/fr/gaming/energy-system.html index bae9aeec7..a7b2cc570 100644 --- a/docs/.vuepress/dist/fr/gaming/energy-system.html +++ b/docs/.vuepress/dist/fr/gaming/energy-system.html @@ -23,7 +23,7 @@ } Système d'Energie | Solana Cookbook - + @@ -177,6 +177,6 @@ </div>)}

    Avec cela, vous pouvez maintenant construire n'importe quel jeu basé sur un système d'énergie. Même si quelqu'un construit un bot pour le jeu, le mieux qu'il puisse faire est de jouer de manière optimale. Selon la logique de votre jeu, cela peut même être plus simple à atteindre en jouant normalement.

    Ce jeu devient encore meilleur lorsqu'il est combiné avec le chapitre Interagir avec des jetons et que vous distribuez des jetons aux joueurs.

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/game-examples.html b/docs/.vuepress/dist/fr/gaming/game-examples.html index f5f78edf5..a3dc843ae 100644 --- a/docs/.vuepress/dist/fr/gaming/game-examples.html +++ b/docs/.vuepress/dist/fr/gaming/game-examples.html @@ -23,11 +23,11 @@ } Apprendre par l'exemple | Solana Cookbook - +

    Jeux Solana open source à consulter pour l'apprentissage

    Interagir avec un programme Anchor depuis Unity

    Un exemple simple de déplacement d'un joueur de gauche à droite en utilisant le framework Anchor et le SDK Unity

    Vidéoopen in new window

    Version Liveopen in new window

    Playgroundopen in new window

    Client Unityopen in new window

    Stocker des SOL dans un PDA

    Apprenez à stocker des SOL dans un PDA qui sert de coffre-fort et à les renvoyer à un joueur. Le backend est écrit en Anchor et le frontend utilise le SDK Unity.

    Vidéoopen in new window

    Version Liveopen in new window

    Sourceopen in new window

    Matchmaking on-chain

    Un jeu de puzzle multijoueur qui utilise les stats d'un NFT pour les stats du personnage dans le jeu et dispose d'un système de matchmaking on-chain intéressant.

    Version Liveopen in new window

    Sourceopen in new window

    Utiliser les QR codes de Solana Pay pour contrôler un jeu

    Tug of war, jeu multijoueur où un compte est modifié via des QR codes de Solana Pay et qui peut être joué à plusieurs sur un grand écran. Le backend est écrit en Anchor et le frontend est en React JS et Next13.

    Tutorielopen in new window

    Exempleopen in new window

    Sourceopen in new window

    Cacher l'état du jeu aux autres joueurs

    Pierre feuille ciseaux, jeu où les données stockées sur la chaîne sont cachées en enregistrant un hash dans le client jusqu'à ce qu'elles soient révélées. Des jetons SPL en guise de récompense pour le gagnant.

    Sourceopen in new window

    Un autre exemple soumis à grizzlython qui chiffre les entrées et les envoie au joueur suivant avec un chiffrement supplémentaire :

    Sourceopen in new window

    Comment construire un jeu multijoueur au tour par tour

    Tic Tac toe, jeu multijoueur simple écrit en Anchor

    Tutorielopen in new window

    Sourceopen in new window

    Jeu d'échecs on-chain

    Jeu d'échecs, jeu d'échecs complet jouable on-chain écrit en Anchor. Envoyer à quelqu'un un lien pour commencer une partie. A la recherche de contributeurs.

    Version Liveopen in new window

    Sourceopen in new window

    Jeu multijoueurs utilisant un système de vote

    Pokémon avec un système de vote, jeu où les gens votent collectivement sur les mouvements à réaliser dans un jeu de Game Boy. Chaque mouvement est stocké et peut être mint en tant que NFT.

    Version Liveopen in new window

    Sourceopen in new window

    Exemple de système de composants d'entité

    Kyoudai Clash est un jeu en temps réel on-chain qui utilise le framework Arcopen in new window de jump crypto qui est un système de composants d'entités on-chain pour Solana.

    Version xNFTopen in new window

    Sourceopen in new window

    Jeu d'aventure avec la mort de monstres et l'obtention de points d'expérience

    Lumia online a été soumis dans le cadre d'un hackthon et constitue une belle référence pour un petit jeu d'aventure.

    Version xNFTopen in new window

    Sourceopen in new window

    Jeu PvP en temps réel on-chain

    SolHunter, jeu de bataille royale sur Solana en temps réel. Il utilise un programme Anchor, le SDK Unity et une souscription WebSocket à un compte. Dans ce jeu, les joueurs peuvent faire apparaître leurs personnages représentés par l'un de leurs NFT sur une grille et se déplacer. Si un joueur touche un autre joueur ou un coffre, il récupère ses SOL. La grille est représentée par un tableau à deux dimensions dans lequel chaque case stocke la clé publique du portefeuille du joueur et la clé publique du NFT.

    Exempleopen in new window

    Sourceopen in new window

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/game-sdks.html b/docs/.vuepress/dist/fr/gaming/game-sdks.html index 3befaceb0..079f9c14b 100644 --- a/docs/.vuepress/dist/fr/gaming/game-sdks.html +++ b/docs/.vuepress/dist/fr/gaming/game-sdks.html @@ -23,12 +23,12 @@ } SDKs pour le gaming sur Solana | Solana Cookbook - +

    SDK Unity

    Le moteur de jeu Unity est connu pour son utilisation adaptée aux débutants et sa prise en charge de plusieurs plateformes, notamment WebGL, IOS et Android. Il vous permet ainsi de créez une seule fois et d'exportez partout. Le SDK Unity pour Solana inclut le support des NFTs, les transactions, les fonctions RPC, les Deep Links de Phantom, le connecteur WebGL, le support de connexion WebSocket, l'adaptateur de portemonnaie mobile et la génération de code Anchor.

    Documentationsopen in new window
    Liste vérifiée de l'Asset Store de Unityopen in new window
    Exemples de jeuxopen in new window

    SDK Unreal

    Unreal engine est connu pour ses superbes visuels et son framework de script basé sur les nœuds. Le SDK Solana a été construit à l'origine par l'équipe de Star Atlas.

    SDK Unreal de Star Atlasopen in new window
    Tutorielopen in new window

    Flutter

    Flutter est un framework open source de Google qui permet de créer des applications multiplateformes compilées nativement à partir d'une seule base de code.

    Code Sourceopen in new window

    Next.js/React + Anchor

    L'une des façons les plus simples de construire sur Solana est d'utiliser le framework Javascript Web3js en combinaison avec le framework Anchor. Pour des jeux plus complexes, il serait cependant préférable d'utiliser un moteur de jeu comme Unity ou Unreal. La façon la plus rapide de le configurer est la suivante :

    npx create-solana-dapp your-app
     

    Cela permettra de créer une excellente application de départ avec le support de portefeuille. L'un des avantages de l'utilisation de Next.js est que vous pouvez utiliser le même code dans le backend et dans le frontend, ce qui accélère le développement.

    Web3Jsopen in new window
    Solana Cookbookopen in new window

    Python

    Python est un langage de programmation facile à apprendre qui est souvent utilisé dans la programmation de l'intelligence artificielle. Il existe un framework appelé Seahorse qui vous permet de construire des contrats intelligents en Python.

    Exemple Anchor Playgroundopen in new window
    Source et Documentationsopen in new window

    C# natif

    Le premier portage de Web3js en C#. Il inclut un grand nombre de fonctionnalités telles que les transactions, les fonctions RPC et la génération de code Anchor.

    Source et Documentationsopen in new window

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/hello-world.html b/docs/.vuepress/dist/fr/gaming/hello-world.html index c8d6c7f96..c28373bff 100644 --- a/docs/.vuepress/dist/fr/gaming/hello-world.html +++ b/docs/.vuepress/dist/fr/gaming/hello-world.html @@ -23,7 +23,7 @@ } Exemple Hello World | Solana Cookbook - + @@ -303,6 +303,6 @@ Player position is: 1 ....o....

    Félicitations ! Vous avez réussi à créer, déployer et invoquer le jeu Tiny Adventure à partir du client. Pour mieux comprendre, regardez cette [démo] (https://nextjs-tiny-adventure.vercel.app/) qui montre comment interagir avec le programme Tiny Adventure par le biais d'un frontend Next.js.

    Que faire à partir de maintenant ?

    Une fois le jeu de base terminé, libérez votre créativité et exercez-vous à construire de manière indépendante en mettant en œuvre vos propres idées pour enrichir l'expérience de jeu. Voici quelques suggestions :

    1. Modifier les textes du jeu pour créer une histoire intrigante, inviter un ami à jouer à votre récit personnalisé et observer les transactions de la chaîne au fur et à mesure qu'elles se déroulent !
    2. Ajouter un coffre qui récompense les joueurs avec des récompenses en SOL ou laisser le joueur collecter des pièces (cf. Interagir avec des jetons) au fur et à mesure qu'il progresse dans le jeu.
    3. Créer une grille qui permette au joueur de se déplacer vers le haut, le bas, la gauche et la droite, et introduiser plusieurs joueurs pour une expérience plus dynamique.

    Dans le prochain chapitre, Tiny Adventure Two, nous apprendrons à stocker des SOL dans le programme et à en distribuer aux joueurs sous forme de récompenses.

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/interact-with-tokens.html b/docs/.vuepress/dist/fr/gaming/interact-with-tokens.html index 500d5bde4..ca30a6f65 100644 --- a/docs/.vuepress/dist/fr/gaming/interact-with-tokens.html +++ b/docs/.vuepress/dist/fr/gaming/interact-with-tokens.html @@ -23,7 +23,7 @@ } Comment interagir avec des jetons dans des programmes | Solana Cookbook - + @@ -689,6 +689,6 @@ Player Token Balance: 0 Player Health: 100
    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/intro.html b/docs/.vuepress/dist/fr/gaming/intro.html index 3c3e5a3bd..b1a6659bc 100644 --- a/docs/.vuepress/dist/fr/gaming/intro.html +++ b/docs/.vuepress/dist/fr/gaming/intro.html @@ -23,11 +23,11 @@ } Introduction au gaming sur Solana | Solana Cookbook - +

    Introduction au gaming sur Solana

    Le secteur du gaming dans l'écosystème Solana se développe rapidement. L'utilisation de Solana peut apporter de nombreux avantages aux jeux, tels que la possibilité pour les joueurs de posséder et d'échanger leurs actifs via des NFT dans les jeux, de construire une véritable économie in-game, de créer des programmes de jeu composables et de permettre aux joueurs de se disputer des actifs de grande valeur.

    Solana est conçu pour les jeux. En effet, avec un temps de bloc de 400 ms et des confirmations rapides comme l'éclair, Solana est une base de données en temps réel gratuite pour tous. Elle est ainsi parfaite pour les jeux de stratégie, les jeux de construction de villes, les jeux en tour par tour et bien d'autres encore.

    Cependant, il n'est pas nécessaire de tout mettre sur la blockchain. Des intégrations plus petites utilisant des NFT qui représentent des éléments de jeu, par exemple, peuvent être facilement réalisées. Les frais de transaction sont extrêmement bas et de nombreux outils et SDK sont disponibles pour commencer à développer dès aujourd'hui. Vous pouvez créer votre jeu en Javascriptopen in new window et Canvas, Flutteropen in new window, ou utiliser l'un des SDK pour jeu sur Solana disponible pour les deux plus grands moteurs de jeu - UnitySDK, UnrealSDKopen in new window et plus encore Game SDKs.

    Il existe plusieurs façons d'intégrer Solana dans votre jeu :

    1. Offrir aux joueurs des objets numériques à collectionner en guise d'items de jeu ou les utiliser en tant que personnages. Consultez Nfts dans les jeux
    2. Utiliser des jetons pour des achats in-app ou des micro-paiements dans le jeu. Consultez utiliser des jetons
    3. Utiliser le portefeuille du joueur pour l'authentifier dans le jeu. Consultez Signer un message
    4. Organiser des tournois et distribuer des récompenses en crypto à vos joueurs.
    5. Développer le jeu entièrement sur la chaîne pour récompenser vos joueurs à chaque étape qu'ils accomplissent. Commencez par Hello world

    Grâce à tous ces avantages, Solana devient rapidement la plateforme de référence pour les développeurs de jeux. Commencez dès aujourd'hui !

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/nfts-in-games.html b/docs/.vuepress/dist/fr/gaming/nfts-in-games.html index 52effd177..5a3d74357 100644 --- a/docs/.vuepress/dist/fr/gaming/nfts-in-games.html +++ b/docs/.vuepress/dist/fr/gaming/nfts-in-games.html @@ -23,7 +23,7 @@ } Gaming avec des NFTs | Solana Cookbook - + @@ -90,6 +90,6 @@ let data = await asset.accessorData(0); // fetches BoxTextured0.bin let image: Image = await asset.imageData.get(0) // fetches CesiumLogoFlat.png

    Personnaliser des NFTs avec des items et des traits (Raindrops boots)

    Avec le programme Raindrops Bootsopen in new window vous pouvez avoir un personnage de jeu d'aventure qui possède une épée et un casque. Lorsque le NFT du personnage est vendu sur une place de marché, les autres NFTs qu'il possède sont également vendus.

    Comment créer une collection NFT

    Les NFTs sur Solana suivent pour la plupart la norme de Metaplex. Metaplex est une entreprise qui s'occupe de la norme NFT la plus utilisée sur Solana. La manière la plus courante de créer une collection NFT consiste à créer une candy machine avec Metaplex. Celle-ci permet à l'utilisateur de mint des paires de métadonnées et d'images prédéfinies.

    Documentations de Metaplexopen in new window

    Configuration d'une candy machine, étape par étapeopen in new window

    NFTs

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/porting-anchor-to-unity.html b/docs/.vuepress/dist/fr/gaming/porting-anchor-to-unity.html index 3c2fc886f..1cc973587 100644 --- a/docs/.vuepress/dist/fr/gaming/porting-anchor-to-unity.html +++ b/docs/.vuepress/dist/fr/gaming/porting-anchor-to-unity.html @@ -23,7 +23,7 @@ } Portage d'Anchor vers Unity | Solana Cookbook - + @@ -58,6 +58,6 @@ true, Commitment.Confirmed); }
    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/saving-game-state.html b/docs/.vuepress/dist/fr/gaming/saving-game-state.html index 7c5141902..8a5b105dc 100644 --- a/docs/.vuepress/dist/fr/gaming/saving-game-state.html +++ b/docs/.vuepress/dist/fr/gaming/saving-game-state.html @@ -23,7 +23,7 @@ } Sauvegarder l'état d'un jeu | Solana Cookbook - + @@ -104,6 +104,6 @@ const txSig = await sendTransaction(tx, connection); await connection.confirmTransaction(txSig, "confirmed");

    Pour savoir comment construire ce mécanisme d'énergie, veuillez consulter le chapitre suivant : Construire un système d'énergie

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/gaming/store-sol-in-pda.html b/docs/.vuepress/dist/fr/gaming/store-sol-in-pda.html index f67784a60..e500b1c24 100644 --- a/docs/.vuepress/dist/fr/gaming/store-sol-in-pda.html +++ b/docs/.vuepress/dist/fr/gaming/store-sol-in-pda.html @@ -23,7 +23,7 @@ } Stockage de SOL dans un PDA | Solana Cookbook - + @@ -495,6 +495,6 @@ .........\o/💎 ...........\o/

    Bravo ! Vous avez réussi à créer, déployer et interagir avec Tiny Adventure Two du côté client. Vous avez intégré une nouvelle fonctionnalité qui permet aux joueurs d'obtenir des récompenses en atteignant le coffre situé à la fin du niveau. De plus, vous avez appris à transférer des SOL à l'intérieur d'un programme Anchor en utilisant des Invocation de Programme Croisée et en modifiant directement les lamports dans les comptes.

    N'hésitez pas à continuer à construire de manière indépendante et à améliorer le jeu avec des fonctionnalités supplémentaires telles que de nouveaux niveaux ou des récompenses alternatives !

    Last Updated:
    Contributors: La Loutre
    - + diff --git a/docs/.vuepress/dist/fr/getting-started/installation.html b/docs/.vuepress/dist/fr/getting-started/installation.html index 5c0347f06..35b03fb42 100644 --- a/docs/.vuepress/dist/fr/getting-started/installation.html +++ b/docs/.vuepress/dist/fr/getting-started/installation.html @@ -23,12 +23,12 @@ } Installation | Solana Cookbook - + -

    Installer Web3.js

    Il existe quelques bibliothèques que vous pouvez utiliser pour démarrer avec javascript ou typescript sur Solana.

    Web3.js

    @solana/web3.jsopen in new window est une bibliothèque qui contient une grande partie des outils de base de Solana pour interagir, envoyer des transactions et lire la blockchain.

    Vous pouvez l'installer avec l'une des commandes suivantes :

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Installer Web3.js

    Il existe quelques bibliothèques que vous pouvez utiliser pour démarrer avec javascript ou typescript sur Solana.

    Web3.js

    @solana/web3.jsopen in new window est une bibliothèque qui contient une grande partie des outils de base de Solana pour interagir, envoyer des transactions et lire la blockchain.

    Vous pouvez l'installer avec l'une des commandes suivantes :

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Compiler à partir du code source

    Si vous ne pouvez pas utiliser les fichiers binaires pré-construits ou que vous préférez le construire vous-même à partir du code source, rendez-vous sur https://github.com/solana-labs/solana/releases/latestopen in new window, et téléchargez l'archive Source Code. Extrayez le code et compilez les fichiers binaires avec la commande suivante :

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Vous pouvez alors lancer la commande suivante pour obtenir le même résultat qu'avec les fichiers binaires préconstruits :

    solana-install init
    -
    Last Updated:
    Contributors: cryptoloutre
    - +
    Last Updated:
    Contributors: cryptoloutre, Steven Luscher
    + diff --git a/docs/.vuepress/dist/fr/guides/account-maps.html b/docs/.vuepress/dist/fr/guides/account-maps.html index 38b830e64..fb5b5c200 100644 --- a/docs/.vuepress/dist/fr/guides/account-maps.html +++ b/docs/.vuepress/dist/fr/guides/account-maps.html @@ -23,7 +23,7 @@ } Maps de Comptes | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/guides/data-migration.html b/docs/.vuepress/dist/fr/guides/data-migration.html index 9b4b60445..5db116dd6 100644 --- a/docs/.vuepress/dist/fr/guides/data-migration.html +++ b/docs/.vuepress/dist/fr/guides/data-migration.html @@ -23,7 +23,7 @@ } Migration des Comptes de Données de Programmes | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    Après avoir construit et soumis une instruction : VersionProgramInstruction::SetString(String) nous avons maintenant la structure de données de compte "mise à jour" suivante

    Program Account v2

    Ressources

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/guides/debugging-solana-programs.html b/docs/.vuepress/dist/fr/guides/debugging-solana-programs.html index 933eeaa9e..3caffc72e 100644 --- a/docs/.vuepress/dist/fr/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/fr/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Débogage des Programmes Solana | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Le débogage ici vous permettra de déboguer les fonctions et méthodes utilisées dans le test body mais ne fera pas de point d'arrêt dans votre programme.

    Test avec un Nœud de Validation Local à partir des Applications Clients

    Enfin, vous pouvez démarrer un nœud de validation local et charger votre programme et tous les comptes en utilisant le solana-test-validator depuis la ligne de commande.

    Dans cette approche, vous aurez besoin d'une application client, soit en utilisant Rust RcpClient ou en utilisant les clients JavaScript ou Typescript

    Voir solana-test-validator --help pour plus de détails et d'options. Pour le programme d'exemple, voici la configuration :

    1. Ouvrez un terminal dans le dossier repo
    2. Exécutez solana config set -ul pour définir la configuration pour pointer vers le local
    3. Exécutez solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Ouvrez un autre terminal et lancez solana logs pour démarrer le flux des logs
    5. Vous pouvez alors exécuter votre programme client et observer la sortie du programme dans le terminal où vous avez démarré le flux de logs

    Ressources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    Bibliothèque JavaScript/Typescriptopen in new window

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/guides/feature-parity-testing.html b/docs/.vuepress/dist/fr/guides/feature-parity-testing.html index 2484b1365..d3585a6c1 100644 --- a/docs/.vuepress/dist/fr/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/fr/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Test de Conformité des Fonctionnalités | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Bon test !

    Ressources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/guides/get-program-accounts.html b/docs/.vuepress/dist/fr/guides/get-program-accounts.html index b9d2bb108..ddb07a49b 100644 --- a/docs/.vuepress/dist/fr/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/fr/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Obtenir les comptes d'un programme | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    En combinant ces trois paramètres (dataSlice, dataSize, et memcmp), nous pouvons limiter la portée de notre requête et ne renvoyer efficacement que les données qui nous intéressent.

    Autres Ressources

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/guides/serialization.html b/docs/.vuepress/dist/fr/guides/serialization.html index 2f4d6b8fe..799704d01 100644 --- a/docs/.vuepress/dist/fr/guides/serialization.html +++ b/docs/.vuepress/dist/fr/guides/serialization.html @@ -23,7 +23,7 @@ } Sérialisation des données | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Ressources

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/guides/versioned-transactions.html b/docs/.vuepress/dist/fr/guides/versioned-transactions.html index 72edd4e5b..efd36bfdc 100644 --- a/docs/.vuepress/dist/fr/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/fr/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } Transactions Versionnées | Solana Cookbook - + @@ -55,6 +55,6 @@ }, );

    Autres Ressources

    Références

    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/index.html b/docs/.vuepress/dist/fr/index.html index 33bea5d08..b1ef6e9fe 100644 --- a/docs/.vuepress/dist/fr/index.html +++ b/docs/.vuepress/dist/fr/index.html @@ -23,11 +23,11 @@ } Solana Cookbook | Solana Cookbook - +

    Solana Cookbook

    Solana Cookbook une ressource pour les développeurs qui fournit les concepts et références essentiels pour créer des applications sur Solana. Chaque concept et référence vont se concentrer sur des aspects spécifiques du développement de Solana tout en fournissant des détails supplémentaires et des exemples d'utilisation.

    Contribution

    Solana Cookbook est conçu de manière à permettre aux nouveaux développeurs de Solana de contribuer facilement. Même si vous ne savez pas comment faire quelque chose, contribuer au Cookbook est un excellent moyen d'apprendre !

    Consultez toutes les questions ouvertes iciopen in new window. Lignes directrices pour les contributions iciopen in new window. Si vous trouvez qu'il manque une suggestion dans le Cookbook, veuillez ajouter une question.

    Comment lire le Cookbook

    Le Solana Cookbook est divisé en différentes sections, chacune visant un objectif différent.

    SectionDescription
    Concepts FondamentauxLes éléments de base de Solana qu'il est bon de connaître pour le développement
    GuidesPetits guides sur les différents outils de développement
    RéférencesRéférences aux extraits de code les plus couramment utilisés
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/accounts.html b/docs/.vuepress/dist/fr/references/accounts.html index a707d31d4..e293b0b5e 100644 --- a/docs/.vuepress/dist/fr/references/accounts.html +++ b/docs/.vuepress/dist/fr/references/accounts.html @@ -23,7 +23,7 @@ } Comptes | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    Si vous voulez obtenir un solde de jetons, vous devez connaître l'adresse du compte de jetons. Pour plus d'informations, voir Références des Jetons

    Last Updated:
    Contributors: Partially Sorted, cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/basic-transactions.html b/docs/.vuepress/dist/fr/references/basic-transactions.html index 910ec0ed7..5e5c1f395 100644 --- a/docs/.vuepress/dist/fr/references/basic-transactions.html +++ b/docs/.vuepress/dist/fr/references/basic-transactions.html @@ -23,7 +23,7 @@ } Envoyer des Transactions | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/keypairs-and-wallets.html b/docs/.vuepress/dist/fr/references/keypairs-and-wallets.html index af4a2a7a4..c1fe0c59c 100644 --- a/docs/.vuepress/dist/fr/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/fr/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Paires de Clés et Portefeuilles | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (portefeuilles multiples, également appelés HD wallets)

    Vous pouvez créer plusieurs portefeuilles à partir d'une seule seed, également appelés "Portefeuilles Déterministes Hiérarchiques" ou portefeuilles HD :

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Exécutez la commande suivante pour installer les dépendances requises :

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Exécutez la commande suivante pour installer les dépendances requises :

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Le package Svelte Wallet Adapteropen in new window package permet d'ajouter un Store Svelte ($walletStore) accessible parmi tous les fichiers JS, TS et/ou Svelte à l'intérieur d'un projet réalisé avec Svelte Template ou SvelteKit. En utilisant le répertoire de référence iciopen in new window vous pouvez utiliser l'adaptateur pour SSR ou SPA. Le package UI contient un composant <WalletMultiButton /> pour permettre aux utilisateurs de sélectionner un portefeuille et de s'y connecter.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Partially Sorted, cryptoloutre
    - +
    Last Updated:
    Contributors: Partially Sorted, Steven Luscher, cryptoloutre
    + diff --git a/docs/.vuepress/dist/fr/references/local-development.html b/docs/.vuepress/dist/fr/references/local-development.html index dc1a68570..a9119d099 100644 --- a/docs/.vuepress/dist/fr/references/local-development.html +++ b/docs/.vuepress/dist/fr/references/local-development.html @@ -23,7 +23,7 @@ } Développement Local | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Partially Sorted, cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/name-service.html b/docs/.vuepress/dist/fr/references/name-service.html index dc78fec8f..0763eb1aa 100644 --- a/docs/.vuepress/dist/fr/references/name-service.html +++ b/docs/.vuepress/dist/fr/references/name-service.html @@ -23,7 +23,7 @@ } Service de Noms | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/nfts.html b/docs/.vuepress/dist/fr/references/nfts.html index 33d336371..e955f2eed 100644 --- a/docs/.vuepress/dist/fr/references/nfts.html +++ b/docs/.vuepress/dist/fr/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -559,6 +559,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/offline-transactions.html b/docs/.vuepress/dist/fr/references/offline-transactions.html index 078f12d80..c9ba4aa9d 100644 --- a/docs/.vuepress/dist/fr/references/offline-transactions.html +++ b/docs/.vuepress/dist/fr/references/offline-transactions.html @@ -23,7 +23,7 @@ } Envoi de transactions hors connexion | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/programs.html b/docs/.vuepress/dist/fr/references/programs.html index 585a1d7fe..247de364c 100644 --- a/docs/.vuepress/dist/fr/references/programs.html +++ b/docs/.vuepress/dist/fr/references/programs.html @@ -23,7 +23,7 @@ } Écrire des Programmes | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    Le code côté client correspondant sera le suivant

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    Le code côté client correspondant sera le suivant

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/staking.html b/docs/.vuepress/dist/fr/references/staking.html index a5afd057f..a58aa730e 100644 --- a/docs/.vuepress/dist/fr/references/staking.html +++ b/docs/.vuepress/dist/fr/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/fr/references/token.html b/docs/.vuepress/dist/fr/references/token.html index 49053e643..ebbea743f 100644 --- a/docs/.vuepress/dist/fr/references/token.html +++ b/docs/.vuepress/dist/fr/references/token.html @@ -23,7 +23,7 @@ } Interaction avec les Jetons | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: cryptoloutre
    - + diff --git a/docs/.vuepress/dist/gaming/auto-approve.html b/docs/.vuepress/dist/gaming/auto-approve.html index 7c9226483..e97c7d561 100644 --- a/docs/.vuepress/dist/gaming/auto-approve.html +++ b/docs/.vuepress/dist/gaming/auto-approve.html @@ -23,11 +23,11 @@ } How to auto approve transactions | Solana Cookbook - +

    WIP - This is a work in progress

    How to auto approve transaction for fast game play and great ux

    To have a fluid game play for on-chain games it is beneficial to have an auto approve wallet.

    1. Solflare wallet offers auto-approve functionality with burner wallets, but this limits your players to only one wallet.

    Burner Auto Approve Walletsopen in new window

    1. Another way to do it is to create a key pair in your game and let the player transfer some sol to that wallet and then use it to pay for transaction fees. Only problem with this is that you need to handle the security for this wallet and the players would need to have access to their seed phrase.

    Example Source Codeopen in new window
    Example Gameopen in new window

    1. You can pay the fees yourself, by creating and signing the transactions in the backend and interact with it via an API. For that you send parameters to your backend and sign the transaction there and send a confirmation to the client as soon as it is done.

    2. There is a protocol called @gumisfunn and they released a feature called session keys. Session Keys are ephemeral keys with fine-grained program/instruction scoping for tiered access in your @solana programs. They allow users to interact with apps under particular parameters like duration, max tokens, amount of posts or any other function specific to an app. Linkopen in new window

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/distribution.html b/docs/.vuepress/dist/gaming/distribution.html index 854d3d287..a7923b7e7 100644 --- a/docs/.vuepress/dist/gaming/distribution.html +++ b/docs/.vuepress/dist/gaming/distribution.html @@ -23,11 +23,11 @@ } Distribution | Solana Cookbook - +

    Distribution

    Distribution of your game depends highly on the platform you are using. With Solana, there are game SDKs you can build for IOS, Android, Web and Native Windows or Mac. Using the Unity SDK you could even connect Nintendo Switch or XBox to Solana theoretically. Many game companies are pivoting to a mobile first approach because there are so many people with mobile phones in the world. Mobile comes with its own complications though, so you should pick what fits best to your game.

    Solana has a distinct edge over other blockchain platforms due to its offering of a crypto-native mobile phone, named Saga, that comes equipped with an innovative dApps store. This store enables the distribution of crypto games without the limitations imposed by conventional app stores such as Google or Apple.

    Publishing Platforms

    Platforms where you can host your games

    PlatformDescription
    Fractalopen in new windowA game publishing platform that supports Solana and Ethereum. They also have their own wallet and account handling and there is an SDK for high scores and tournaments.
    Elixiropen in new windowPlatform for web3 games that also offers a PC launcher
    Self HostingJust host your game yourself. For example using Vercelopen in new window which can be easily setup so that a new version get deployed as soon as you push to your repository. Other options are github pagesopen in new window or Google Firebaseopen in new window
    Solana mobile DApp Storeopen in new windowThe Solana alternative to Google Play and the Apple App Store. A crypto first variant of a dApp store, which is open source free for everyone to use.
    Apple App Storeopen in new windowThe Apple app store has a high reach and is trusted by its customers. The entrance barrier for crypto games is high though. The rules are very strict for everything that tries to circumvent the fees that Apple takes for in app purchases. A soon as an NFT provides benefits for the player for example Apple requires you for example to have them purchased via their in app purchase system.
    Google Play Storeopen in new windowGoogle is much more crypto friendly and games with NFTs and wallet deep links for example have had a track record of being approved for the official play store.
    xNFT Backpackopen in new windowBackpack is a Solana wallet which allows you to release apps as xNFTs. They appear in the users wallet as soon as they purchase them as applications. The Unity SDK has a xNFT export and any other web app can be published as xNFT as well.
    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/energy-system.html b/docs/.vuepress/dist/gaming/energy-system.html index c1235b95e..5f8409b60 100644 --- a/docs/.vuepress/dist/gaming/energy-system.html +++ b/docs/.vuepress/dist/gaming/energy-system.html @@ -23,7 +23,7 @@ } Energy System | Solana Cookbook - + @@ -177,6 +177,6 @@ </div>)}

    With this you can now build any energy based game and even if someone builds a bot for the game the most he can do is play optimally, which maybe even easier to achieve when playing normally depending on the logic of your game.

    This game becomes even better when combined with the Token example and you actually drop some spl token to the players.

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/game-examples.html b/docs/.vuepress/dist/gaming/game-examples.html index 3518e95d1..322a19e1d 100644 --- a/docs/.vuepress/dist/gaming/game-examples.html +++ b/docs/.vuepress/dist/gaming/game-examples.html @@ -23,11 +23,11 @@ } Learn By Example | Solana Cookbook - +

    Open source Solana games to reference for learning

    Interact with Anchor Program from Unity

    A simple example moving a player left and right using Anchor framework and Unity SD

    Videoopen in new window

    Live Versionopen in new window

    Playgroundopen in new window

    Unity Clientopen in new window

    Saving Sol in a PDA

    Learn how to save sol in a PDA seed vault and send it back to a player. Backend is written in Anchor and the frontend is using the Unity SDK

    Videoopen in new window

    Live Versionopen in new window

    Sourceopen in new window

    On chain matchmaking

    A multiplayer match three game which uses NFT stats for the character stats in the game and has an interesting onchain matchmaking system.

    Live Versionopen in new window

    Sourceopen in new window

    Use Solana Pay Qr codes to control a game

    Tug of war A multiplayer game where an account is changed via Solana Pay qr codes which can be player with many people on a big screen. Backend Anchor and the frontend is Js React and Next13.

    Tutorialopen in new window

    Exampleopen in new window

    Sourceopen in new window

    Hide game state from other players

    Stone paper scissors

    A game where on chain data is hidden by saving a hash in the client until reveal. SPL Tokens as price for the winner.

    Sourceopen in new window

    Another example submitted for grizzlython which encrypts entries and send it to the next player with an additional encryption:

    Sourceopen in new window

    How to build a round based multiplayer game

    Tic Tac toe A simple multiplayer game written in Anchor

    Tutorialopen in new window

    Sourceopen in new window

    On Chain Chess

    Chess Complete on chain playable chess game written in Anchor. Send someone a link to start a game. Looking for contributors.

    Live Versionopen in new window

    Sourceopen in new window

    Multiplayer Game using voting system

    Pokemon voting system A game where collectively people vote on moves in a game boy game. Every move is recorded and each move can be minted as an NFTs.

    Live Versionopen in new window

    Sourceopen in new window

    Entity component system example

    Kyoudai Clash is an on chain realtime Using the jump crypto Arc frameworkopen in new window which is an on chain entity component system for Solana.

    xNFT Versionopen in new window

    Sourceopen in new window

    Adventure killing monsters and gaining xp

    Lumia online was a hackthon submission and is a nice reference for a little adventure game.

    xNFT Versionopen in new window

    Sourceopen in new window

    Real-time pvp on chain game

    SolHunter

    Real-time Solana Battle Royal Game. Using Anchor program, UnitySDK, WebSocket account subscription. Players can spawn their characters represented as one of their NFTs on a grid and move around. If a player hits another player or chest he collect its Sol. The grid is implemented as a two dimensional array where every tile saves the players wallet key and the NFT public key.

    Exampleopen in new window

    Sourceopen in new window

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/game-sdks.html b/docs/.vuepress/dist/gaming/game-sdks.html index 523df0a87..d1a617b7c 100644 --- a/docs/.vuepress/dist/gaming/game-sdks.html +++ b/docs/.vuepress/dist/gaming/game-sdks.html @@ -23,12 +23,12 @@ } Solana Gaming SDKs | Solana Cookbook - +

    Unity SDK

    The unity game engine is known for its beginner friendly approach and cross platform support including WebGL, ios and android. Build once export everywhere. The Solana Unity SDK comes with NFT support, transactions, RPC functions, Phantom Deep lLinks, WebGL connector, WebSocket connection support, mobile wallet-adapter and anchor client code generation.

    Docsopen in new window
    Verified Unity Asset Store Listingopen in new window
    Example Gamesopen in new window

    Unreal SDK

    Unreal engine is known for its great visuals and node based scripting framework. The Solana sdk was originally build by the team of Star Atlas.

    Star Atlas Unreal SDKopen in new window
    Tutorialopen in new window

    Flutter

    Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase.

    Source Codeopen in new window

    Next.js/React + Anchor

    One of the easiest way to build on Solana is using the Web3js Javascript framework in combination with the Solana Anchor frameworks. For more complex games I would recommend using a GameEngine like Unity or Unreal though. The fastest way to set it up is:

    npx create-solana-dapp your-app
     

    This will generate a great starting application with wallet-adapter support. A benefit of using Next.js is that you can use the same code in the backend and in the frontend, speeding up development.

    Web3Jsopen in new window
    Solana Cookbookopen in new window

    Python

    Python is an easy to learn programming language which is often used in AI programming. There is a framework called Seahorse which lets you build smart contracts in Python. Seahorse is built on top of the Solana Anchor framework. It converts Python code into Rust which Anchor can then use. Seahorse is currently in beta.

    Anchor Playground Exampleopen in new window
    Github Repoopen in new window
    Documentationopen in new window

    Native C#

    The original port of Web3js to C#. It comes with a bunch of functionality like transactions, RPC functions and anchor client code generation.

    Source and Docsopen in new window

    Last Updated:
    Contributors: Jonas Hahn, Lostin
    - + diff --git a/docs/.vuepress/dist/gaming/hello-world.html b/docs/.vuepress/dist/gaming/hello-world.html index aa286cbbb..73dc12691 100644 --- a/docs/.vuepress/dist/gaming/hello-world.html +++ b/docs/.vuepress/dist/gaming/hello-world.html @@ -23,7 +23,7 @@ } Hello World example | Solana Cookbook - + @@ -303,6 +303,6 @@ Player position is: 1 ....o....

    Congratulations! You have successfully built, deployed, and invoked the Tiny Adventure game from the client. To further illustrate the possibilities, check out this demoopen in new window that demonstrates how to interact with the Tiny Adventure program through a Next.js frontend.

    Where to Go from Here

    With the basic game complete, unleash your creativity and practice building independently by implementing your own ideas to enrich the game experience. Here are a few suggestions:

    1. Modify the in-game texts to create an intriguing story. Invite a friend to play through your custom narrative and observe the on-chain transactions as they unfold!
    2. Add a chest that rewards players with Sol Rewards or let the player collect coins Interact with tokens as they progress through the game.
    3. Create a grid that allows the player to move up, down, left, and right, and introduce multiple players for a more dynamic experience.

    In the next installment, Tiny Adventure Two, we'll learn how to store SOL in the program and distribute it to players as rewards.

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/interact-with-tokens.html b/docs/.vuepress/dist/gaming/interact-with-tokens.html index 982021778..1dccc1a5a 100644 --- a/docs/.vuepress/dist/gaming/interact-with-tokens.html +++ b/docs/.vuepress/dist/gaming/interact-with-tokens.html @@ -23,7 +23,7 @@ } How interact with tokens in programs | Solana Cookbook - + @@ -689,6 +689,6 @@ Player Token Balance: 0 Player Health: 100
    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/intro.html b/docs/.vuepress/dist/gaming/intro.html index 972543bba..f1bd9f1eb 100644 --- a/docs/.vuepress/dist/gaming/intro.html +++ b/docs/.vuepress/dist/gaming/intro.html @@ -23,11 +23,11 @@ } Introduction to Gaming on Solana | Solana Cookbook - +

    Intro into gaming on Solana

    The gaming space in the Solana ecosystem is expanding rapidly. Integrating with Solana can provide numerous benefits for games, such as enabling players to own and trade their assets via NFTs in games, building a real in-game economy, creating composable game programs, and allowing players to compete for valuable assets.

    Solana is purpose-built for games, with its 400ms block time and lightning-fast confirmations making it a real-time database that's free for all. It's perfect for genres like strategy games, city builders, turn-based games, and more.

    However, not everything needs to be put on the blockchain. Smaller integrations using NFTs that represent game items, for example, can be easily done. Transaction fees are extremely cheap, and there are many tools and SDKs available to start building today. You can build your game in Javascriptopen in new window and Canvas, Flutteropen in new window, or use one of the Solana Game SDKs for the two biggest game engines - UnitySDK, UnrealSDKopen in new window, and more Game SDKs.

    There are several ways to integrate Solana into your game:

    1. Give players digital collectibles for in-game items or use them as characters. Check out Nfts in games
    2. Use tokens for in-app purchases or micro-payments in the game. See use tokens
    3. Use the player's wallet to authenticate them in the game. Sign message
    4. Run tournaments and pay out crypto rewards to your players.
    5. Develop the game entirely on-chain to reward your players in every step they take. Start with Hello world

    With all these benefits, Solana is quickly becoming the go-to platform for game developers. Get started today!

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/nfts-in-games.html b/docs/.vuepress/dist/gaming/nfts-in-games.html index 9baebc79c..2a76d58ca 100644 --- a/docs/.vuepress/dist/gaming/nfts-in-games.html +++ b/docs/.vuepress/dist/gaming/nfts-in-games.html @@ -23,7 +23,7 @@ } Gaming with NFTs | Solana Cookbook - + @@ -90,6 +90,6 @@ let data = await asset.accessorData(0); // fetches BoxTextured0.bin let image: Image = await asset.imageData.get(0) // fetches CesiumLogoFlat.png

    Customize NFTs with items and traits (Raindrops boots)

    With the Raindrops Boots programopen in new window you can have an adventure character which owns a sword and a helmet. When the Character NFT would be sold on a market place the other NFTs it owns would be sold as well.

    How to create an NFT collection

    NFTs on Solana mostly follow the Metaplex standard. Metaplex is a company which takes care of the NFT most used standard on Solana. The most common way to create an NFT collection is to create a metaplex candy machine which lets the user mint predefined pairs of metadata and images.

    Metaplex Docsopen in new window

    Setup a candy machine step by stepopen in new window

    NFTs

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/porting-anchor-to-unity.html b/docs/.vuepress/dist/gaming/porting-anchor-to-unity.html index 3893f117d..3b2f2d591 100644 --- a/docs/.vuepress/dist/gaming/porting-anchor-to-unity.html +++ b/docs/.vuepress/dist/gaming/porting-anchor-to-unity.html @@ -23,7 +23,7 @@ } Port Anchor to Unity | Solana Cookbook - + @@ -58,6 +58,6 @@ true, Commitment.Confirmed); }
    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/saving-game-state.html b/docs/.vuepress/dist/gaming/saving-game-state.html index 8b51fc5bc..d6f5029b4 100644 --- a/docs/.vuepress/dist/gaming/saving-game-state.html +++ b/docs/.vuepress/dist/gaming/saving-game-state.html @@ -23,7 +23,7 @@ } Saving game state | Solana Cookbook - + @@ -104,6 +104,6 @@ const txSig = await sendTransaction(tx, connection); await connection.confirmTransaction(txSig, "confirmed");

    How to actually build this energy system you can learn here: Building an Energy system

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/gaming/store-sol-in-pda.html b/docs/.vuepress/dist/gaming/store-sol-in-pda.html index 52134acc8..1e118b3da 100644 --- a/docs/.vuepress/dist/gaming/store-sol-in-pda.html +++ b/docs/.vuepress/dist/gaming/store-sol-in-pda.html @@ -23,7 +23,7 @@ } Storing SOL in a PDA | Solana Cookbook - + @@ -495,6 +495,6 @@ .........\o/💎 ...........\o/

    Well done! You have successfully created, deployed, and interacted with Tiny Adventure Two from the client side. You've incorporated a new feature that allows players to collect rewards by reaching the chest at the end of the level. Moreover, you've learned how to transfer SOL within an Anchor program using cross-program invocations and by directly modifying lamports in accounts.

    Feel free to continue building independently and enhance the game with additional features like new levels or alternative rewards!

    Last Updated:
    Contributors: Jonas Hahn
    - + diff --git a/docs/.vuepress/dist/getting-started/installation.html b/docs/.vuepress/dist/getting-started/installation.html index db8a0366a..f0a44ba98 100644 --- a/docs/.vuepress/dist/getting-started/installation.html +++ b/docs/.vuepress/dist/getting-started/installation.html @@ -23,12 +23,12 @@ } Installation | Solana Cookbook - + -

    Install Web3.js

    There are a few libraries that you can use to get started with javascript or typescript on Solana.

    Web3.js

    @solana/web3.jsopen in new window is a library that has a lot of the basic Solana tools to interact, send transactions, and read from the blockchain.

    You can install with the following:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Install Web3.js

    There are a few libraries that you can use to get started with javascript or typescript on Solana.

    Web3.js

    @solana/web3.jsopen in new window is a library that has a lot of the basic Solana tools to interact, send transactions, and read from the blockchain.

    You can install with the following:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -71,7 +71,7 @@
     

    Build From Source

    If you are unable to use the prebuilt binaries or prefer to build it yourself from source, navigate to https://github.com/solana-labs/solana/releases/latestopen in new window, and download the Source Code archive. Extract the code and build the binaries with:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    You can then run the following command to obtain the same result as with prebuilt binaries:

    solana-install init
    -
    Last Updated:
    Contributors: mayben, Brian Friel, Hipo, Jacob CG, Jacob Creech, Ayush, Lukmon Abdulsalam, Silvestre Vivo, Thomas H, dtlehrer, Jonas Hahn
    - +
    Last Updated:
    Contributors: mayben, Ayush, Brian Friel, Hipo, Jacob CG, Jacob Creech, Jonas Hahn, Lukmon Abdulsalam, Silvestre Vivo, Steven Luscher, Thomas H, dtlehrer
    + diff --git a/docs/.vuepress/dist/guides/account-maps.html b/docs/.vuepress/dist/guides/account-maps.html index c005d9a23..b09e1a717 100644 --- a/docs/.vuepress/dist/guides/account-maps.html +++ b/docs/.vuepress/dist/guides/account-maps.html @@ -23,7 +23,7 @@ } Account Maps | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: Sayantan Karmakar, Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/guides/data-migration.html b/docs/.vuepress/dist/guides/data-migration.html index 1ca98d027..8f0115c00 100644 --- a/docs/.vuepress/dist/guides/data-migration.html +++ b/docs/.vuepress/dist/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrating Program Data Accounts | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    After building and submitting an instruction: VersionProgramInstruction::SetString(String) we now have the following 'upgraded' account data layout

    Program Account v2

    Resources

    Last Updated:
    Contributors: Frank V. Castellucci, Jacob Creech
    - + diff --git a/docs/.vuepress/dist/guides/debugging-solana-programs.html b/docs/.vuepress/dist/guides/debugging-solana-programs.html index d52056361..78d5ba69f 100644 --- a/docs/.vuepress/dist/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debugging Solana Programs | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Debugging here will allow you to debug the functions and methods used in the test body but will not breakpoint in your program.

    The bee's knees eh?

    Local Validator Node Testing from Client Apps

    Lastly, you can start a local validating node and load your program and any accounts using the solana-test-validator from the command line.

    In this approach, you will need a client application either using Rust RcpClient or in JavaScript or Typescript clients

    See solana-test-validator --help for more details and options. For the example program here is vanilla setup:

    1. Open a terminal in the repo folder
    2. Run solana config set -ul to set the configuration to point to local
    3. Run solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Open another terminal and run solana logs to start the log streamer
    5. You can then run your client program and observe program output in the terminal where you started the log streamer

    Now that is the cat's pajamas YO!

    Resources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: Frank V. Castellucci, Frank V. Castellucci
    - + diff --git a/docs/.vuepress/dist/guides/feature-parity-testing.html b/docs/.vuepress/dist/guides/feature-parity-testing.html index cfc585c17..146277f34 100644 --- a/docs/.vuepress/dist/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Feature Parity Testing | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Happy Testing!

    Resources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: Frank V. Castellucci, Frank V. Castellucci, Jacob Creech, kirill lykov
    - + diff --git a/docs/.vuepress/dist/guides/get-program-accounts.html b/docs/.vuepress/dist/guides/get-program-accounts.html index 34ce09e0a..fe2b9f86a 100644 --- a/docs/.vuepress/dist/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Get Program Accounts | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    By combining all three parameters (dataSlice, dataSize, and memcmp) we can limit the scope of our query and efficiently return only the data we’re interested in.

    Other Resources

    Last Updated:
    Contributors: Jacob Creech, Todsaporn Banjerdkit, Jacob Creech, abacus-x
    - + diff --git a/docs/.vuepress/dist/guides/serialization.html b/docs/.vuepress/dist/guides/serialization.html index 700b376bc..700696480 100644 --- a/docs/.vuepress/dist/guides/serialization.html +++ b/docs/.vuepress/dist/guides/serialization.html @@ -23,7 +23,7 @@ } Serializing Data | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Resources

    Last Updated:
    Contributors: Frank V. Castellucci, Jacob Creech, Jacob Creech, Kevin Heavey, abacus-x, akangaziz
    - + diff --git a/docs/.vuepress/dist/guides/versioned-transactions.html b/docs/.vuepress/dist/guides/versioned-transactions.html index 30945cf9e..2121cd797 100644 --- a/docs/.vuepress/dist/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } Versioned Transactions | Solana Cookbook - + @@ -55,6 +55,6 @@ }, );

    Other Resources

    References

    Last Updated:
    Contributors: Anvit
    - + diff --git a/docs/.vuepress/dist/id/core-concepts/accounts.html b/docs/.vuepress/dist/id/core-concepts/accounts.html index bee9fe928..43491236e 100644 --- a/docs/.vuepress/dist/id/core-concepts/accounts.html +++ b/docs/.vuepress/dist/id/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Akun | Buku Panduan Solana - +

    Akun

    Akun-akun di dalam solana digunakan untuk menyimpan status. Akun-akun itu adalah blok yang sangat penting dalam pengembangan di Solana.

    Fakta-Fakta

    Fakta

    • Akun-akun digunakan untuk menyimpan data
    • Setiap akun memiliki alamat unik
    • Akun-akun memiliki ukuran maksimal yaitu 10MB (10 Mega Bytes)
    • Akun-akun PDA memiliki ukuran maksimal yaitu 10KB (10 Kilo Bytes)
    • Akun-akun PDA bisa digunakan untuk menandatangani atas nama program
    • Ukuran akun-akun sudah ditetapkan pada waktu pembuatan, tapi bisa dilakukan penyesuaian menggunakan reallocopen in new window
    • Penyimpanan data akun dibayarkan dengan sewa
    • Pemilik akun bawaan adalah Program Sistem

    Lebih Dalam

    Model Akun

    Ada 3 macam akun di Solana :

    • Data akun penyimpan data
    • Akun program menyimpan program yang dapat dieksekusi
    • Akun Bawaan (native) yang menunjukkan program bawaan di solana seperti Sistem, Stake, dan Vote

    Dalam data akun, ada 2 jenis yaitu:

    • Akun-akun yang dimiliki sistem
    • Akun PDA (Program Derived Address)

    Setiap akun memiliki sebuah alamat (biasanya disebut public key) dan seorang pemilik (alamat dari akun program). Daftar lengkap tipe apa saja yang disimpan oleh akun dapat ditemukan di bawah ini.

    TipeDeskripsi
    lamportsJumlah lamports yang dimiliki oleh akun ini
    ownerPemilik program akun ini
    executableApakah akun ini bisa untuk memproses intruksi
    dataArray byte data mentah yang disimpan oleh akun ini
    rent_epochDi epoch berikutnya, akun ini akan berutang sewa

    Berikut ini beberapa aturan penting kepemilikan :

    • Hanya pemilik data akun yang bisa mengubah datanya dan data lamports
    • Siapapun diizinkan untuk mengkreditkan lamports ke data akun
    • Pemilik akun dapat menetapkan pemilik baru jika data akun tidak ada

    Akun program tidak menyimpan status.

    Sebagai contoh, jika anda memiliki program penghitung yang memungkinkan anda menambah penghitung, anda harus membuat dua akun, satu akun untuk menyimpan kode program, dan satu untuk menyimpan konter.

    Untuk mencegah sebuah akun dihapus, anda harus membayar sewa.

    Menyewa

    Menyimpan data pada akun membutuhkan biaya berupa SOL untuk pemeliharaan, dan itu didanai oleh apa yang disebut dengan sewa. Jika anda menyediakan biaya pemeliharaan minimum yang setara untuk 2 tahun pembayaran sewa di akun, akun anda akan dibebaskan dari pembayaran sewa. Anda bisa mengambil sewa dengan menutup akun dan mengirimkan lamports kembali ke wallet anda.

    Sewa dibayarkan selama dua waktu yang berbeda:

    1. Ketika dirujuk oleh suatu transaksi
    2. Sekali dalam satu masa epoch

    Persentase sewa yang dikumpulkan oleh akun-akun akan dihancurkan, sementara sisanya didistribusikan untuk memilih akun di akhir setiap slot.

    Jika akun tidak punya saldo yang cukup untuk membayar seewa, akun akan dibatalkan alokasinya dan datanya akan dihapus.

    Sumber Lainnya

    Credit

    Konsep dasar ini dikreditkan ke Pencilflip. Follow him on Twitteropen in new window.

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/core-concepts/pdas.html b/docs/.vuepress/dist/id/core-concepts/pdas.html index 4858b45d2..aea435439 100644 --- a/docs/.vuepress/dist/id/core-concepts/pdas.html +++ b/docs/.vuepress/dist/id/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) | Buku Panduan Solana - +

    Program Derived Addresses (PDA)

    Program Derived Addresses (PDA) adalah tempat seperti rumah untuk akun-akun yang di desain untuk dikendalikan oleh suatu program tertentu. Dengan PDA, program bisa memverifikasi alamat tertentu secara terprogram tanpa membutuhkan private key. PDA berfungsi sebagai fondasi untuk Cross-Program Invocationopen in new window, yang memungkinkan aplikasi Solana dapat disusun satu sama lain.

    Fakta-Fakta

    Fakta

    • PDA adalah string 32 byte yang mirip seperti public key, namun tidak memiliki private key
    • findProgramAddress akan menurunkan sebuah PDA dari programld dan seeds (kumpulan byte) secara deterministik
    • Satu byte (bump) digunakan untuk mendorong sebuah potential PDA dari ed25519 elliptic curve
    • Program bisa memverifikasi PDA-nya dengan menyediakan seeds dan bump untuk invoke_signedopen in new window
    • Sebuah PDA hanya bisa diverifikasi oleh program asalnya
    • Selain untuk mengizinkan program diverifikasi dengan instruksi lain, PDA juga menyediakan antarmuka (interface) seperti hashmap untuk Mengindeks Akun

    Lebih Dalam

    PDA adalah bahan penting untuk mengembangkan program di Solana. Dengan PDA, program-program dapat memverifikasi akun sambil menjamin tidak ada pengguna dari luar yang bisa memverifikasi akun yang sama. Selain memverifikasi akun, program tertentu juga dapat memodifikasi akun dalam PDA masing-masing.

    Accounts matrix

    Image courtesy of Pencilflip

    Membuat PDA

    Untuk memahami konsep PDA, akan sangat membantu untuk memandang PDA sebagai sesuatu yang “ditemukan” dan bukan “diciptakan”. PDA dihasilkan dari kombinasi seeds (seperti string “vote_account”) dan sebuah program id. Kombinasi seeds ini kemudian dijalankan melalui sebuah fungsi sha256 hash untuk melihat bahwa mereka menghasilkan sebuah public key yang berdasarkan pada ed25519 elliptic curve atau tidak.

    Dalam menjalankan program id dan seeds dengan sebuah fungsi hash, ada 50% kemungkinan menghasilkan sebuah public key yang valid namun tidak tepat di kurva ekliptik. Dalam kasus ini, yang dapat dilakukan adalah menambahkan sesuatu (fudge) untuk mendorong input dan uji coba ulang. Istilah teknis dari fudge ini adalah bump. Dalam Solana, dimulai dengan bump = 255 dan secara perlahan turunkan nilainya bump = 254, bump = 253 dan seterusnya. Sampai kita mendapatkan alamat (address) yang tidak ada di elliptic curve. Cara ini memang belum sempurna, namun ketika membuahkan hasil, ini memberikan kita cara deterministik untuk menurunkan PDA yang sama berulang kali.

    PDA on the ellipitic curve

    Berinteraksi dengan PDAs

    Ketika sebuah PDA dihasilkan, findProgramAddress akan mengembalikan alamat dan juga bump yang digunakan untuk mengeluarkannya dari elliptic curve. Dilengkapi dengan bump ini, sebuah program dapat memverifikasi instruksi apapun yang dibutuhkan oleh PDA tersebut. Untuk memverifikasi, program harus meloloskan instruksi, sejumlah akun, dan seeds yang digunakan untuk menurunkan PDA ke invoke_signed. Selain memverifikasi instruksi, PDA juga harus memverifikasi hasilnya via invoke_signed.

    Ketika pembuatan dangan PDA, sangatlah umum untuk menyimpan bump seedopen in new window di data akun tersebut. Hal ini mengizinkan pada developer untuk memvalidasi sebuah PDA tanpa harus melewati bump sebagai argumen instruksi.

    Sumber lainnya

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/core-concepts/programs.html b/docs/.vuepress/dist/id/core-concepts/programs.html index 8ec63c34f..5e51a61bf 100644 --- a/docs/.vuepress/dist/id/core-concepts/programs.html +++ b/docs/.vuepress/dist/id/core-concepts/programs.html @@ -23,12 +23,12 @@ } Program | Buku Panduan Solana - +

    Program

    Setiap developer bisa menulis dan memasukan programnya ke Solana Blockchain. Program (diketahui sebagai smart contracts di protokol lain) berfungsi sebagai dasar untuk aktivitas on-chain, mendukung apa pun mulai dari DeFi dan NFT hingga ke Media Sosial dan Game.

    Fakta-Fakta

    Fakta

    • Program Memproses instruksi dari pengguna akhir dan program lain
    • Semua program adalah stateless / tidak memiliki status: semua data apa pun yang berinteraksi dengannya disimpan di Akun terpisah yang diteruskan melalui intruksi
    • Program itu sendiri disimpan dalam akun yang ditandai sebagai 'executable'
    • Semua program merupakan milik BPF Loaderopen in new window dan dieksekusi oleh Solana Runtimeopen in new window
    • Pengembang paling sering menulis program dalam bahasa Rust atau C++, tetapi bisa memilih bahasa lain yang menargetkan LLVMopen in new window's BPFopen in new window backend
    • Semua program memiliki satu titik masuk dimana pemrosessan instruksi berlangsung (i.e. process_instruction); parameternya selalu meliputi:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Lebih Dalam

    Tidak seperti kebanyakan blockchain lainnya, Solana benar-benar memisahkan kode dari data. Semua data yang berinteraksi dengan program disimpan dalam akun terpisah dan diteruskan sebagai referensi via instruksi. Model ini memungkinkan satu program generik untuk beroperasi di berbagai akun tanpa memerlukan penerapan tambahan. Contoh umum dari pola ini terlihat di seluruh program bawaan (Native) dan Program SPL.

    Native Program & Solana Program Library (SPL)

    Solana dilengkapi dengan sejumlah program yang berfungsi sebagai blok bangunan inti untuk interaksi dalam on-chain. Program ini dibagi menjadi Native Programsopen in new window dan Solana Program Library (SPL) Programsopen in new window.

    Program bawaan (native) menyediakan fungsionalitas dasar yang yang diperlukan untuk mengoperasikan validator. Di antara program-program ini, yang paling terkenal adalah System Programopen in new window yang bertanggung jawab untuk mengelola akun baru dan mentransfer SOL antara dua belah pihak.

    Program SPL mendukung sejumlah aktivitas on-chain, termasuk membuat, menukar, dan meminjamkan token, serta membuat Stake Pools dan memelihara layanan nama (name service) sebuah on-chain. SPL Token Programopen in new window dapat dipanggil langsung melalui CLI, sementara yang lain seperti Associated Token Account Programopen in new window biasanya dibuat dengan program khusus.

    Program paling sering dikembangkan dengan bahasa Rust atau C++, tetapi bisa juga dikembangkan dengan berbagai bahasa yang menargetkan backend BPF LLVM. Inisiatif terbaru oleh Neon Labsopen in new window dan Solangopen in new window mengaktifkan EVMopen in new window kompatibilitas dan memungkinkan para pengembang untuk menulis program dalam Solidity.

    Sebagian besar program berbasis Rust mengikuti arsitektur berikut:

    FileDeskripsi
    lib.rsMendaftarkan modul
    entrypoint.rsTitik masuk ke program
    instruction.rsProgram API, deserialisasi data instruksi
    processor.rsLogika program
    state.rsObjek program, status deserialisasi
    error.rsKesalahan (error) khusus program

    Baru-baru ini, Anchoropen in new window telah muncul sebagai framework yang populer untuk mengembangkan program. Anchor adalah sebuah framework, mirip dengan Ruby on Rails, yang mengurangi boilerplate dan mempermudah proses deserialisasi untuk pengembangan berbasis Rust.

    Program pada umumnya dikembangkan dan diuji di localhost dan devnet sebelum di deploy ke testnet atau mainnet. Solana mendukung environment berikut:

    Kluster EnvironmentURL Koneksi RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhostport bawaan: 8899 (contoh http://localhost:8899, http://192.168.1.88:8899)

    Setelah di deploy ke environment, klien dapat berinteraksi dengan program on-chain melalui RPC connectionsopen in new window ke masing-masing kluster.

    Deploy Program

    Pengembang dapat men-deploy program mereka melalui CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    Ketika program telah di deploy, program tersebut dikompilasi ke ELF shared objectopen in new window (berisi BPF bytecode) dan diunggah ke kluster Solana. Program berjalan di akun (seperti semua yang lain di Solana), kecuali akun-akun itu telah ditandai sebagai executable dan ditugaskan ke BPF loader. Alamat akun ini disebut sebagai program_id dan digunakan untuk merujuk program dalam semua transaksi.

    Solana mendukung beberapa BPF Loaders, dengan yang terbaru adalah Upgradable BPF Loaderopen in new window. BPF Loader bertanggung jawab untuk mengelola akun program dan membuatnya tersedia untuk klien melalui program_id. Semua program mempunyai satu titik masuk dimana semua pemrosesan instruksi berlangsung (i.e. process_instruction) dan parameternya selalu menyertakan :

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Setelah dipanggil, program akan dijalankan oleh Solana Runtime.

    Sumber Lainnya

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/core-concepts/transactions.html b/docs/.vuepress/dist/id/core-concepts/transactions.html index a171bb5fe..396db84db 100644 --- a/docs/.vuepress/dist/id/core-concepts/transactions.html +++ b/docs/.vuepress/dist/id/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transaksi | Buku Panduan Solana - +

    Transaksi

    Klien dapat menjalankan programs dengan mengirimkan sebuah transaksi ke cluster. Sebuah transaksi tunggal dapat berisikan berbagai macam instruksi terhadap masing-masing program. Ketika sebuah transaksi dikirimkan, Solana Runtimeopen in new window akan menjalankan setiap instruksi sesuai dengan urutan dan secara atomic. Jika ada instruksi yang gagal, maka keseluruhan transaksi akan gagal.

    Fakta-Fakta

    Fakta

    • Dalam Solana, instruksi adalah unit operasional yang paling dasar
    • Setiap instruksi mengandung:
      • program_id program yang ingin dijalankan
      • Kumpulan semua accounts yang ingin di baca atau di tulis
      • Sebuah instruction_data byte array yang spesifik terhadap suatu program tertentu
    • Beberapa instruksi dapat disatukan dalam sebuah transaksi
    • Setiap transaksi mengandung:
      • Kumpulan semua accounts yang ingin di baca atau di tulis
      • Satu atau lebih instructions
      • blockhash terkini
      • Satu atau lebih signatures
    • Instruksi secara berurutan dan bersifatatomic
    • Jika ada instruksi yang gagal, maka seluruh transaksi akan gagal.
    • Transaksi dibatasi sampai dengan 1232 bytes

    Lebih Dalam

    Solana Runtime membutuhkan instruksi dan transaksi untuk menentukan kumpulan akun yang akan dibaca dan ditulis. Dengan mempersiapkan akun terlebih dahulu, runtime dapat menjalankan eksekusinya terhadap semua transaksi bersamaan.

    Ketika sebutah transaksi dikirimkan ke cluster, runtime akan memproses setiap instruksi sesuai urutan dan atomic. Program yang menerima instruksi akan menginterpretasi kumpulan data dan menjalankannya di akun yang ditentukan. Program akan berhasil menjalankan instruksi atau gagal karena adanya error. Jika ada ditemukannya error, maka keseluruhan transaksi akan gagal.

    Setiap transaksi yang bertujuan untuk meng-debet suatu akun atau mengubah data, memerlukan verifikasi dari si pemilik akun. Setiap akun yang akan dimodifikasi akan ditandai dengan writable. Sebuah akun dapat dikreditkan tanpa persetujuan pemiliknya asalkan biaya transaksi dibayarkan menutupi biaya yang dibutuhkan untuk rent dan biaya transaksi itu sendiri.

    Sebelum pengiriman, semua transaksi harus mengacu kepada sebuah blockhash terbaruopen in new window. Blockhash digunakan untuk mencegah duplikasi dan menghapus transaksi gagal. Batas waktu sebuah blockhash transaksi adalah sekitar 1 menit 19 detik atau 150 blocks saat ini ditulis.

    Biaya

    Jaringan Solana mengambil dua jenis biaya:

    Di Solana, Biaya Transaksi itu determistik: tidak ada konsep dimana pengguna dapat membayar lebih demi meningkatkan kesempatan untuk dimasukkan ke block berikutnya. Pada waktu penulisan, biaya transaksi hanya ditentukan oleh jumlah verifikasi yang dibutuhkan (seperti lamports_per_signature), bukan dari jumlah sumber daya yang digunakan. Hal ini dikarenakan adanya batas maksimal 1232 bytes untuk semua transaksi.

    Semua transaksi membutuhkan setidaknya sebuah akun writable untuk memverifikasi transaksi. Ketika transaksi sudah dikirim, akun writable pemverifikasi yang di-serialisasi pertama harus membayar biaya transaksi. Akun ini akan membayar biaya dari transaksi tanpa mempedulikan transaksinya berhasil atau gagal. Jika pihak pembayar tidak memiliki saldo yang cukup, maka transaksi akan dihentikan.

    Pada waktu penulisan, 50% dari semua transaction fee dibayarkan kepada validator yang membuat block dan sisa setengahnya hangus. Struktur ini berguna untuk mendorong validator memproses transaksi sebanyak mungkin.

    Sumber lainnya

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/getting-started/installation.html b/docs/.vuepress/dist/id/getting-started/installation.html index cf07e3f96..a7afafb13 100644 --- a/docs/.vuepress/dist/id/getting-started/installation.html +++ b/docs/.vuepress/dist/id/getting-started/installation.html @@ -23,12 +23,12 @@ } Instalasi | Buku Panduan Solana - + -

    Unduh Web3.js

    Ada beberapa libraries yang bisa anda gunakan, dimulai dengan javascript atau typescript di Solana.

    Web3.js

    @solana/web3.jsopen in new window adalah library yang mempunyai banyak fungsi dasar di Solana untuk interaksi, mengirim transaksi, dan membaca dari blockchain.

    Anda bisa melakukan instalasi library ini dengan cara berikut :

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Unduh Web3.js

    Ada beberapa libraries yang bisa anda gunakan, dimulai dengan javascript atau typescript di Solana.

    Web3.js

    @solana/web3.jsopen in new window adalah library yang mempunyai banyak fungsi dasar di Solana untuk interaksi, mengirim transaksi, dan membaca dari blockchain.

    Anda bisa melakukan instalasi library ini dengan cara berikut :

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Membangun dari Source

    Jika anda tidak bisa menggunakan binari yang dibangun sebelumnya atau lebih memilih untuk membangun sendiri dari source code, bisa anda lihat di link berikut https://github.com/solana-labs/solana/releases/latestopen in new window, dan unduh arsip Source Code. Extrak kode dan bangun binari dengan :

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Kemudian Anda bisa menjalankan perintah berikut untuk mendapatkan hasil yang sama seperti dengan binari bawaan:

    solana-install init
    -
    Last Updated:
    Contributors: akangaziz
    - +
    Last Updated:
    Contributors: Steven Luscher, akangaziz
    + diff --git a/docs/.vuepress/dist/id/guides/account-maps.html b/docs/.vuepress/dist/id/guides/account-maps.html index ef94bf1a6..719321560 100644 --- a/docs/.vuepress/dist/id/guides/account-maps.html +++ b/docs/.vuepress/dist/id/guides/account-maps.html @@ -23,7 +23,7 @@ } Peta Akun | Buku Panduan Solana - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/guides/data-migration.html b/docs/.vuepress/dist/id/guides/data-migration.html index e2fb200b3..6247a51bd 100644 --- a/docs/.vuepress/dist/id/guides/data-migration.html +++ b/docs/.vuepress/dist/id/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrasi Akun Data Program | Buku Panduan Solana - + @@ -676,6 +676,6 @@ } }

    Setelah membuat dan mengirimkan instruksi: VersionProgramInstruction::SetString(String) sekarang kita memiliki layout dari data akun yang telah di 'upgrade' berikut

    Program Account v2

    Resource

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/guides/debugging-solana-programs.html b/docs/.vuepress/dist/id/guides/debugging-solana-programs.html index 8f649b9f0..631951be1 100644 --- a/docs/.vuepress/dist/id/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/id/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debug Program Solana | Buku Panduan Solana - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Debug di sini akan memungkinkan Anda untuk men-debug fungsi dan metode yang digunakan di test body tetapi tidak akan menyebabkan breakpoint dalam program Anda.

    Seperti Lutut lebah, ya?

    Uji Node Validator Lokal dari Aplikasi Klien

    Terakhir, Anda dapat memulai node validasi lokal dan memuat program Anda dan akun apa pun menggunakan solana-test-validator dari CLI.

    Dalam pendekatan ini, Anda akan memerlukan aplikasi klien baik menggunakan Rust RcpClient atau di Klien JavaScript atau TypeScript

    Lihat solana-test-validator --help untuk detail dan opsi lebih lanjut. Untuk contoh program di sini adalah pengaturan dasar:

    1. Buka terminal di folder repo
    2. Jalankan solana config set -ul untuk mengatur konfigurasi agar mengarah ke lokal
    3. Jalankan solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Buka terminal lain dan jalankan solana logs untuk memulai streamer log
    5. Anda kemudian dapat menjalankan program klien Anda dan mengamati keluaran program di terminal tempat Anda memulai log streamer

    Nah itu seperti piyama kucing YO!

    Resources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/guides/feature-parity-testing.html b/docs/.vuepress/dist/id/guides/feature-parity-testing.html index 5c4104302..61a5ef1f0 100644 --- a/docs/.vuepress/dist/id/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/id/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Pengujian Paritas Fitur | Buku Panduan Solana - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Selamat menguji!

    Resources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/guides/get-program-accounts.html b/docs/.vuepress/dist/id/guides/get-program-accounts.html index 4cdc8e180..088fe32d6 100644 --- a/docs/.vuepress/dist/id/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/id/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Mendapatkan Akun Program | Buku Panduan Solana - + @@ -442,6 +442,6 @@ # "id": 1 # }

    Dengan menggabungkan ketiga parameter (dataSlice, dataSize, dan memcmp), kita dapat membatasi batasan query kita dan hanya mengambil data yang kita perlukan secara efisien.

    Resource lainnya

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/guides/serialization.html b/docs/.vuepress/dist/id/guides/serialization.html index 4152dbbf3..539ffbc68 100644 --- a/docs/.vuepress/dist/id/guides/serialization.html +++ b/docs/.vuepress/dist/id/guides/serialization.html @@ -23,7 +23,7 @@ } Serialisasi Data | Buku Panduan Solana - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Resource

    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/index.html b/docs/.vuepress/dist/id/index.html index 10f98f4c4..6d11d3559 100644 --- a/docs/.vuepress/dist/id/index.html +++ b/docs/.vuepress/dist/id/index.html @@ -23,11 +23,11 @@ } Buku Panduan Solana | Buku Panduan Solana - +

    Menggunakan buku panduan Solana

    Buku panduan Solana adalah sumber daya pengembang yang memberikan konsep penting dan referensi untuk membangun aplikasi di Solana. Setiap konsep dan referensi akan fokus kepada aspek spesifik pada bidang pengembangan Solana sekaligus memberikan detail-detail dan contoh cara penggunaannya.

    Cara untuk berkontribusi

    Buku panduan Solana dirancang dengan cara yang bertujuan untuk memudahkan pengembang solana yang baru untuk berkontribusi. Bahkan jika anda ingin tahu cara untuk melakukan sesuatu, berkontribusi pada buku panduan Solana adalah cara yang baik untuk belajar.

    Cek link berikut untuk lihat semua issue yang masih aktifhereopen in new window. Pedoman untuk berkontribusi hereopen in new window. Jika kamu menemukan saran yang tidak ada di buku panduan, tolong untuk menambahkan laporan isu terkait.

    Cara untuk membaca Buku Panduan

    Buku Panduan Solana dibagi menjadi beberapa bagian yang berbeda, masing-masing ditujukan untuk tujuan yang berbeda.

    SectionDescription
    Konsep UtamaMembangun blocks Solana yang bagus untuk diketahui untuk pengembangan
    PanduanPanduan detail tentang beragam tools yang berbeda untuk pengembangan
    ReferensiReferensi untuk cuplikan kode yang umum dibutuhkan untuk pengembangan
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/accounts.html b/docs/.vuepress/dist/id/references/accounts.html index 5c89fd549..1d2840107 100644 --- a/docs/.vuepress/dist/id/references/accounts.html +++ b/docs/.vuepress/dist/id/references/accounts.html @@ -23,7 +23,7 @@ } Akun | Buku Panduan Solana - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    Jika kita mau mendapatkan token balance, kita harus mengetahui alamat dari sebuah token akun. Untuk info lebih lanjut, lihat Token References

    Last Updated:
    Contributors: Partially Sorted, akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/basic-transactions.html b/docs/.vuepress/dist/id/references/basic-transactions.html index 484093f6b..b2ce5bb37 100644 --- a/docs/.vuepress/dist/id/references/basic-transactions.html +++ b/docs/.vuepress/dist/id/references/basic-transactions.html @@ -23,7 +23,7 @@ } Mengirim Transaksi | Buku Panduan Solana - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/keypairs-and-wallets.html b/docs/.vuepress/dist/id/references/keypairs-and-wallets.html index e2227bb25..69cc44724 100644 --- a/docs/.vuepress/dist/id/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/id/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs & Wallets | Buku Panduan Solana - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (multiple wallets, also known HD wallets)

    You can make multiple wallets from a single seed - also known as 'Hierarchical Deterministic wallets' or HD wallets:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Run command berikut ini untuk menginstall dependencies yang dibutuhkan:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Run command berikut ini untuk menginstall dependencies yang dibutuhkan:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new window package dapat menambahkan sebuah Svelte Store($walletStore) yang dapat diakses oleh semua JS, TS dan/atau Svelte files di dalam sebuah project yang telah dikerjakan dengan Svelte Template atau SvelteKit. Menggunakan repo reference iniopen in new window anda dapat mengunakan adapter untuk SSR atau SPA. UI package mempunyai sebuah <WalletMultiButton /> component untuk membantu user untuk memilih wallet yang terkoneksi dengannya.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Partially Sorted, akangaziz
    - +
    Last Updated:
    Contributors: Partially Sorted, Steven Luscher, akangaziz
    + diff --git a/docs/.vuepress/dist/id/references/local-development.html b/docs/.vuepress/dist/id/references/local-development.html index 8de27b7ec..e9c96addd 100644 --- a/docs/.vuepress/dist/id/references/local-development.html +++ b/docs/.vuepress/dist/id/references/local-development.html @@ -23,7 +23,7 @@ } Development Lokal | Buku Panduan Solana - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Partially Sorted, akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/name-service.html b/docs/.vuepress/dist/id/references/name-service.html index ec9897875..50afe8d3f 100644 --- a/docs/.vuepress/dist/id/references/name-service.html +++ b/docs/.vuepress/dist/id/references/name-service.html @@ -23,7 +23,7 @@ } Name Service | Buku Panduan Solana - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/nfts.html b/docs/.vuepress/dist/id/references/nfts.html index 3ee224c2e..fe5f2c6fe 100644 --- a/docs/.vuepress/dist/id/references/nfts.html +++ b/docs/.vuepress/dist/id/references/nfts.html @@ -23,7 +23,7 @@ } NFT | Buku Panduan Solana - + @@ -559,6 +559,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/offline-transactions.html b/docs/.vuepress/dist/id/references/offline-transactions.html index 5604bd32a..540395b77 100644 --- a/docs/.vuepress/dist/id/references/offline-transactions.html +++ b/docs/.vuepress/dist/id/references/offline-transactions.html @@ -23,7 +23,7 @@ } Mengirim Transaksi Offline | Buku Panduan Solana - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/programs.html b/docs/.vuepress/dist/id/references/programs.html index 3b3d78a12..64de2ab2d 100644 --- a/docs/.vuepress/dist/id/references/programs.html +++ b/docs/.vuepress/dist/id/references/programs.html @@ -23,7 +23,7 @@ } Menulis Program | Buku Panduan Solana - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    Code di client side akan terlihat seperti ini

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    Code di client side akan terlihat seperti ini

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/staking.html b/docs/.vuepress/dist/id/references/staking.html index 2cd25ad4b..291cf4f49 100644 --- a/docs/.vuepress/dist/id/references/staking.html +++ b/docs/.vuepress/dist/id/references/staking.html @@ -23,7 +23,7 @@ } Staking | Buku Panduan Solana - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/id/references/token.html b/docs/.vuepress/dist/id/references/token.html index 66b5aab77..d853b5590 100644 --- a/docs/.vuepress/dist/id/references/token.html +++ b/docs/.vuepress/dist/id/references/token.html @@ -23,7 +23,7 @@ } Interaksi dengan Token | Buku Panduan Solana - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: akangaziz
    - + diff --git a/docs/.vuepress/dist/index.html b/docs/.vuepress/dist/index.html index c39470b84..1a2c14705 100644 --- a/docs/.vuepress/dist/index.html +++ b/docs/.vuepress/dist/index.html @@ -23,11 +23,11 @@ } Cooking with Solana | Solana Cookbook - +

    Cooking with Solana

    The Solana Cookbook is a developer resource that provides the essential concepts and references for building applications on Solana. Each concept and reference will focus on specific aspects of Solana development while providing additional details and usage examples.

    Contributing

    The Cookbook is designed in a way that makes it easy for new Solana developers to contribute. Even if you don't know how to do something, contributing to the cookbook is a great way to learn!

    Check out all open issues hereopen in new window. Contribution guidelines hereopen in new window. If you find the cookbook is missing a suggestion, please add an issue.

    How to Read the Cookbook

    The Solana Cookbook is split into different sections, each aimed at a different goal.

    SectionDescription
    Core ConceptsBuilding blocks of Solana that are good to know for development
    GuidesSnack-sized guides about different tools for development
    ReferencesReferences to commonly needed code snippets
    Last Updated:
    Contributors: Jacob CG, Jacob Creech, Brian Friel, dtlehrer
    - + diff --git a/docs/.vuepress/dist/ja/core-concepts/accounts.html b/docs/.vuepress/dist/ja/core-concepts/accounts.html index 2187c3cdf..4fc8a6824 100644 --- a/docs/.vuepress/dist/ja/core-concepts/accounts.html +++ b/docs/.vuepress/dist/ja/core-concepts/accounts.html @@ -23,11 +23,11 @@ } アカウント | Solana Cookbook - +

    アカウント

    Solanaにおけるアカウントは状態の保存に利用される、Solana開発における必要不可欠な構成要素です。

    概要

    Fact Sheet

    • アカウントはデータの保存に使用されます。
    • それぞれのアカウントは一位のアドレスを持ちます。
    • アカウントが保持できるデータの最大容量は10MB (10 Mega Bytes)です。
    • PDAアカウントが保持できるデータの最大容量は10KB (10 Kilo Bytes)です。
    • PDA アカウントはプログラムに代わり、署名の実行に使用できます。
    • アカウントのサイズは作成時に固定されますが、reallocopen in new windowを使用して変更可能です。
    • アカウントのデータストレージに対し、rent(家賃)が支払われます。
    • デフォルトのアカウント所有者はシステムプログラムです。

    詳細

    アカウントモデル

    Solanaには三種類のアカウントがあります。:

    • 「データアカウント」はデータの保存を行います。
    • 「プログラムアカウント」は実行可能プログラムの保存を行います。
    • 「ネイティブアカウント」は、System、Stake、VoteなどのSolanaのネイティブプログラムを意味します。

    データアカウントには、さらに二種類のアカウントがあります。:

    • システムが所有するアカウント
    • PDA (プログラム派生アドレス/Program Derived Address) アカウント

    各アカウントは、アドレス(通常は公開鍵)と所有者(プログラムアカウントのアドレス)を持ちます。 アカウントが保存するすべてのフィールドを下記のリストに示します。

    フィールド名説明
    lamportsこのアカウントが所有するlamportsの数
    ownerこのアカウントを所有するプログラムオーナー
    executable支持された処理を処理可能かどうか
    dataこのアカウントによって保存された生データのバイト配列
    rent_epochこのアカウントが家賃を支払う次のepoch

    所有に関していくつかの重要な規則があります。:

    • データ アカウントの所有者のみがそのデータを変更し、ランポートを引き落とすことができます。
    • データアカウントへのlamportsの入金は誰でも可能です。
    • アカウントのデータがゼロになっている場合、アカウントの所有者は新しい所有者を割り当てることができます。

    プログラム アカウントは状態を保存しません。

    たとえば、counterという数値をインクリメントするカウンタプログラムの場合、 カウントアップを実行するプログラムを格納するプログラムアカウントと、counterの数値を保存するデータアカウントの 2 つのアカウントを作成する必要があります。

    アカウントが削除されないようにするためには、家賃(rent)を払い続ける必要があります。

    rent(家賃)

    データアカウントにデータを保存し続けるためにはSOLの支払いが必要となり、 これはrent(家賃)と呼ばれるものにより賄われることになります。 口座に2年分の家賃の支払いに相当する最低残高を維持している場合、あなたのwalletは家賃の支払いが免除されます。 rentは、アカウントを閉鎖しlamportsをwalletに送り返すことで回収できます。

    rentは次の二つのタイミングで支払われます。:

    1. トランザクションに参照されたとき
    2. epochごと

    アカウントにより収集された割合のrentが破棄され、残りは各slotの最後に投票アカウントに分配がされます。

    アカウントが家賃を支払うのに十分な残高を持たない場合、アカウントの割り当ては解除されデータが削除されます。

    新しいアカウントは家賃の支払いが免除されることにも注意が必要です。

    その他参考資料

    Credit

    Pencilflipの功績によりこのページは作成されました。Twitterをフォローopen in new window.

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/core-concepts/cpi.html b/docs/.vuepress/dist/ja/core-concepts/cpi.html index 93e460759..c67898083 100644 --- a/docs/.vuepress/dist/ja/core-concepts/cpi.html +++ b/docs/.vuepress/dist/ja/core-concepts/cpi.html @@ -23,7 +23,7 @@ } プログラム間呼び出し(CPI) | Solana Cookbook - + @@ -92,6 +92,6 @@ account_three.clone(), ];

    このセクションではCPIの概要を説明しましたが、より詳細な説明、例、チュートリアルについては、以下のリンク先のリソースを参照してください。

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/core-concepts/pdas.html b/docs/.vuepress/dist/ja/core-concepts/pdas.html index 0f7a8539f..2dea2a47e 100644 --- a/docs/.vuepress/dist/ja/core-concepts/pdas.html +++ b/docs/.vuepress/dist/ja/core-concepts/pdas.html @@ -23,11 +23,11 @@ } プログラム派生アドレス(PDA) | Solana Cookbook - +

    プログラム派生アドレス(PDAs)

    プログラム派生アドレス(Program Derived Addresses/PDAs)は、特定のプログラムによって制御されるように設計されたアカウントのホームです。 PDA を使用すると、プログラムは秘密鍵を必要とせずに特定のアドレスにプログラムで署名できます。 PDAは、Solanaアプリを互いに構成可能にするCross-Program Invocationopen in new windowの基盤として機能します。

    Facts

    Fact Sheet

    • PDAは公開鍵のように見える32byteの文字列ですが、対応する秘密鍵はありません。
    • findProgramAddress は、programId とシード (byteのコレクション) から決定論的に PDA を導出します。
    • bump (1 byte) 潜在的な PDA を ed25519 楕円曲線から押し出すために使用されます。
    • プログラムinvoke_signedopen in new window にシードとバンプを提供することでPDAに署名できます。
    • PDAは派生元のプログラムによってのみ署名できます。
    • プログラムがさまざまな命令に署名できるようにするだけでなく、PDAはindexing accountsのためのハッシュマップのようなインターフェイスも提供します。

    詳細

    PDAは、Solanaでプログラムを開発するための不可欠な構成要素です。
    PDAを使用すると、外部ユーザーが同じアカウントに対して有効な署名を生成できないことを保証しつつ、プログラムはアカウントに署名できます。
    加えて、特定のプログラムは、PDA に保持されているアカウントを変更することもできます。

    Accounts matrix

    Image courtesy of Pencilflip

    PDA の生成

    PDAの背後にある概念を理解するには、PDA は技術的に作成されるのではなく、発見されるものであると考えると役立つ場合があります。
    PDA は、シード (“vote_account”文字列など) とプログラムIDの組み合わせから生成されます。
    次に、シードとプログラム ID のこの組み合わせを sha256 ハッシュ関数に渡し、ed25519楕円曲線上にある公開鍵が生成されるかどうかを確認します。

    これにより、最大50%の確率で楕円曲線上に存在する有効な公開鍵が実際に取得できます。その場合は、入力値に調整を加え再度実行します。
    この追加の調整を技術用語ではbumpと言います。Solanaでは、bump値は255で始まり、 楕円曲線に存在しないアドレスが取得できるまで bump = 254, bump = 253...と値を1ずつ下げて繰り返します。 これは初歩的なことのように思えるかもしれませんが、一度見つかれば、同じPDAは決定論的な方法により何度も導出が可能です。

    PDA on the ellipitic curve

    PDAと対話する

    PDA が生成されると、findProgramAddress 楕円曲線からアドレスをはじき出すために使用されるbumpとアドレスの両方を返却します。 このbumpを備えたプログラムは、PDA を必要とする命令にsignできます。 署名するために、プログラムは命令、アカウントのリスト、PDA の派生に使用されるシードとbumpを invoke_signed に渡す必要があります。 命令に対する署名に加えて、PDAはinvoke_signedを介して自身の生成に対しても署名する必要があります。

    PDAを備えたビルドの際には、bump seedをアカウントデータ自体に保存するopen in new windowのが一般的です。 これにより、開発者はbumpを命令の引数として渡すことなく、PDAを簡単に検証できます。

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/core-concepts/programs.html b/docs/.vuepress/dist/ja/core-concepts/programs.html index ca82cce36..687986a5f 100644 --- a/docs/.vuepress/dist/ja/core-concepts/programs.html +++ b/docs/.vuepress/dist/ja/core-concepts/programs.html @@ -23,12 +23,12 @@ } プログラム | Solana Cookbook - +

    プログラム

    開発者は誰でもプログラムを作成してSolanaブロックチェーンにデプロイできます。 プログラム(他のプロトコルではスマートコントラクトとして知られることが多い)は、 オンチェーンアクティビティの基盤として機能し、DeFi や NFT、ソーシャルメディアやゲームに至るまで、あらゆるものを強化します。

    概要

    Fact Sheet

    • プログラムは、エンドユーザーからと、他のプログラムからの instructions の両方を処理します。
    • すべてのプログラムはステートレスです。プログラムがやり取りするすべてのデータは、命令を介して渡される個別の accounts に保存されます。
    • プログラム自体は、executableとしてマークされたアカウントに保存されます
    • すべてのプログラムは BPF Loaderopen in new window によって所有され、Solana Runtimeopen in new window によって実行されます。
    • 開発者は、Rust または C++ でプログラムを作成するのが最も一般的ですが、LLVMopen in new windowBPFopen in new window バックエンドを対象とする任意の言語を選択できます。
    • すべてのプログラムには、命令処理が行われる単一のエントリ ポイント (つまり、process_instruction) があります。パラメータには常に以下が含まれます。
      • program_id: pubkey(公開鍵)
      • accounts: array (配列)
      • instruction_data: byte array(バイト配列)

    詳細

    他のほとんどのブロックチェーンとは異なり、Solanaはコードとデータを完全に分離します。 プログラムがやり取りするすべてのデータは個別のアカウントに保存され、instructionsを介して参照として渡されます。 このモデルは、追加のデプロイを必要とせずに1つの汎用プログラムをさまざまなアカウントで動作させることを可能にします。 このパターンの一般的な例は、Native Programsと SPL(The Solana Program Library)で見られます。

    Native Programs & The Solana Program Library (SPL)

    Solana には、オンチェーンインタラクションの中核の構成要素として機能する多数のプログラムが搭載されています。 これらのプログラムは、 Native Programsopen in new windowSolana Program Library (SPL) Programsopen in new windowに分けられます。

    ネイティブプログラムは、バリデータの操作に必要な基本機能を提供します。 これらのプログラムの中で最もよく知られているのは、新しいアカウントの管理と2者間での SOLの転送を担当する System Programopen in new window です。

    SPL プログラムは、トークンの作成、交換、貸付、ステークプールの生成、オンチェーンネームサービスの維持など、多くのオンチェーン アクティビティをサポートします。 SPL Token Programopen in new windowCLI 経由で直接呼び出すことができますが、 Associated Token Account Programopen in new window は通常、カスタム プログラムで構成されています。

    プログラミング

    プログラムはRustまたはC++で開発されるのが最も一般的ですが、LLVMのBPFバックエンドをターゲットとする任意の言語で開発できます。 Neon Labsopen in new windowSolangopen in new window 最近の取り組みにより、 EVMopen in new windowとの互換性が実現し、開発者がSolidityでプログラムを書けるようになりました。

    ほとんどの Rust ベースのプログラムは、次のアーキテクチャに準拠しています。:

    ファイル名説明
    lib.rsモジュールの登録
    entrypoint.rsプログラムへのエントリポイント
    instruction.rsプログラム API、命令データのシリアライズ、デシリアライズ
    processor.rsプログラムロジック
    state.rsプログラムオブジェクト、シリアライズ、デシリアライズのステータス
    error.rsプログラム固有のエラー

    近年は、Anchoropen in new window が人気の開発フレームワークとして登場しています。 Anchor は、Ruby on Rails に似た独自のフレームワークであり、定型文を削減し、Rust ベースの開発の (デ) シリアル化プロセスを合理化します。

    プログラムは通常、Testnet または Mainnet にデプロイされる前に、Localhost および Devnet 環境に対して開発およびテストされます。 Solana は以下の環境をサポートしています:

    クラスタ環境RPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    各環境にデプロイ後、クライアントはそれぞれのクラスターへの RPC接続open in new window を介してオンチェーンプログラムと対話が可能です。

    デプロイ

    開発者は CLIopen in new window経由でプログラムをデプロイ可能です。:

    solana program deploy <PROGRAM_FILEPATH>
     

    プログラムがデプロイされると、ELF shared objectopen in new window (BPF バイトコードを含む) にコンパイルされ、Solana クラスターにアップロードされます。 プログラムは (Solana の他のすべてと同様に) アカウントに存在しますが、これらのアカウントは executable としてマークされ、BPF Loaderに割り当てられます。 このアカウントのアドレスは program_id と呼ばれ、今後のすべてのトランザクションでプログラムを参照するために使用されます。

    Solana は複数の BPF ローダーをサポートしており、最新のものは Upgradable BPF Loaderopen in new windowです。 BPF Loaderはプログラムアカウントを管理し、program_id を介してクライアントが利用できるようにする責務を負います。 すべてのプログラムには、命令処理が行われる単一のエントリ ポイント (process_instruction) があり、パラメータには常に次のものが含まれます。:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    呼び出されると、プログラムは Solana ランタイムによって実行されます。

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/core-concepts/transactions.html b/docs/.vuepress/dist/ja/core-concepts/transactions.html index a27624e98..9e084c4f2 100644 --- a/docs/.vuepress/dist/ja/core-concepts/transactions.html +++ b/docs/.vuepress/dist/ja/core-concepts/transactions.html @@ -23,11 +23,11 @@ } トランザクション | Solana Cookbook - +

    トランザクション

    クライアントは、トランザクションをクラスターに送信することで programs を呼び出せます。
    1 つのトランザクションに複数のInstructions(命令)を含めることができ、それぞれが独自のプログラムを対象としています。 トランザクションが送信されると、Solana Runtimeopen in new window は その命令を順番にかつ、アトミックに処理します。
    つまり、一部の命令が失敗すると、トランザクション全体が失敗として処理されます。

    概要

    Fact Sheet

    • Instructions(命令) は、Solana の最も基本的な操作単位です。
    • それぞれの命令には次のものが含まれます。:
      • 目的のプログラムの program_id
      • 読書を行う予定のすべての accounts を格納する配列
      • 目的のプログラムに固有の instruction_data バイト配列
    • 複数の命令を 1 つのトランザクションにまとめることができます。
    • それぞれのトランザクションには次のものが含まれます。:
      • 読書を行う予定のすべての accounts を格納する配列
      • 1 つ以上の instructions(命令)
      • 最近の blockhash
      • 1 つ以上の signatures(署名)
    • 命令は順番に、かつアトミックに処理されます。
    • 一部の命令が失敗すると、トランザクション全体が失敗として処理されます。
    • トランザクションは 1232 バイトに制限されています。

    詳細

    Solanaランタイムでは、命令やトランザクションで読み書きを行う予定のアカウントすべてのリストが明示されている必要があります。
    これにより、ランタイムはすべてのトランザクションの並列実行が可能になります。

    トランザクションがクラスターに送信されると、ランタイムはその命令を順番にアトミックに処理します。 命令ごとに、受信側プログラムはデータ配列を解釈し、指定されたアカウントを操作します。
    プログラムは正常終了するか、エラーコードを返し、エラーが返された場合、トランザクション全体がすぐに失敗します。

    アカウントの引き落としまたはそのデータの変更を目的とするトランザクションには、 アカウント所有者のの署名が必要です。 変更されるすべてのアカウントは writableとしてマークされます。
    取引手数料の支払者が必要なrentと取引手数料を賄うことができれば、アカウントは所有者の許可なく入金することが可能です。

    送信する前に、すべてのトランザクションは 最近のblockhashopen in new windowを確認する必要があります。blockhashは重複を防ぎ、古いトランザクションを排除するために使用されます。この記事の執筆時点で、トランザクションのブロックハッシュの最大経過時間は 150 ブロック、つまり約 1 分 19 秒です。

    手数料

    Solana ネットワークは 2 種類の料金を徴収します:

    Solana では、取引手数料は決定論的です。ユーザーが次のブロックに含まれる可能性を高めるために、より高い手数料を支払うことができる手数料市場の概念はありません。
    この記事の執筆時点では、トランザクション料金は、使用されるリソースの量ではなく、必要な署名の数 (つまり、lamports_per_signature) によってのみ決定されます。 これは、現在すべてのトランザクションに 1232 バイトの厳しい制限があるためです。

    すべてのトランザクションには、トランザクションに署名するための writable なアカウントが少なくとも 1 つ必要です。 送信されると、最初にシリアル化された writable な署名者アカウントが料金の支払い者になります。
    このアカウントは、トランザクションの成功または失敗に関係なく、トランザクションの費用を支払います。 手数料の支払者が取引手数料を支払うのに十分な残高を持っていない場合、取引は中止されます。

    この記事の執筆時点では、すべての取引手数料の 50% がブロックを生成するバリデーターによって収集され、残りの 50% はバーンされます。
    この構造により、リーダースケジュールのslot中にできるだけ多くのトランザクションを処理するバリデーターにインセンティブを与えるよう機能します。

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/getting-started/installation.html b/docs/.vuepress/dist/ja/getting-started/installation.html index bebdfad54..e0062565f 100644 --- a/docs/.vuepress/dist/ja/getting-started/installation.html +++ b/docs/.vuepress/dist/ja/getting-started/installation.html @@ -23,12 +23,12 @@ } インストール | Solana Cookbook - + -

    Install Web3.js

    下記のjavascript や typescript のライブラリを用いてSolanaと対話が可能です。

    Web3.js

    @solana/web3.jsopen in new window は、 トランザクションの送信、対話、ブロックチェーンの読み取りといったSolanaの基本的なツールを多数備えたライブラリです。

    下記に従いインストールが可能です。:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Install Web3.js

    下記のjavascript や typescript のライブラリを用いてSolanaと対話が可能です。

    Web3.js

    @solana/web3.jsopen in new window は、 トランザクションの送信、対話、ブロックチェーンの読み取りといったSolanaの基本的なツールを多数備えたライブラリです。

    下記に従いインストールが可能です。:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Build From Source

    ビルド済みのバイナリを使用できない場合や、ソースから自分でビルドしたい場合は、 ここopen in new windowに移動し、Source Codeアーカイブをダウンロードしてください。 解凍後、次のコマンドでビルドします。

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    次のコマンドを実行して、ビルド済みバイナリと同じ結果を得ることができます。:

    solana-install init
    -
    Last Updated:
    Contributors: PokoPoko2ry
    - +
    Last Updated:
    Contributors: PokoPoko2ry, Steven Luscher
    + diff --git a/docs/.vuepress/dist/ja/guides/account-maps.html b/docs/.vuepress/dist/ja/guides/account-maps.html index d9f66eeee..79716c0f8 100644 --- a/docs/.vuepress/dist/ja/guides/account-maps.html +++ b/docs/.vuepress/dist/ja/guides/account-maps.html @@ -23,7 +23,7 @@ } アカウントマップ | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/guides/data-migration.html b/docs/.vuepress/dist/ja/guides/data-migration.html index 9ab54ad00..37ab6a710 100644 --- a/docs/.vuepress/dist/ja/guides/data-migration.html +++ b/docs/.vuepress/dist/ja/guides/data-migration.html @@ -23,7 +23,7 @@ } プログラム データ アカウントの移行 | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    VersionProgramInstruction::SetString(String)命令を作成して送信することで、次の「アップグレードされた」アカウント データ レイアウトができました。

    Program Account v2

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/guides/debugging-solana-programs.html b/docs/.vuepress/dist/ja/guides/debugging-solana-programs.html index fdd9448b3..78ef5bc62 100644 --- a/docs/.vuepress/dist/ja/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/ja/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Solanaプログラムのデバッグ | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    ここでデバッグすると、**テスト本体**で使用されている関数とメソッドをデバッグできますが、プログラムのブレークポイントはできません。

    The bee's knees eh?

    Local Validator Node Testing from Client Apps

    最後に、ローカルの検証ノードを開始し、コマンドラインからsolana-test-validatorを使用してプログラムとアカウントをロードできます。

    このアプローチでは、Rust RcpClientを使用するか、 JavaScript または Typescript clientsでクライアント アプリケーションが必要になります。

    詳細とオプションについては、solana-test-validator --help を参照してください。サンプルプログラムの場合、ここにバニラのセットアップがあります:

    1. repoフォルダーでターミナルを開きます。
    2. solana config set -ulを実行して、構成がローカルを指すように設定します。
    3. solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.soを実行します。
    4. 別のターミナルを開き、solana logs を実行してログ ストリーマーを開始します。
    5. その後、クライアント プログラムを実行し、ログ ストリーマーを開始したターミナルでプログラムの出力を確認できます。

    Now that is the cat's pajamas YO!

    その他参考資料

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/guides/feature-parity-testing.html b/docs/.vuepress/dist/ja/guides/feature-parity-testing.html index fd8f0af0a..2e0714f0b 100644 --- a/docs/.vuepress/dist/ja/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/ja/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } 機能パリティテスト | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Happy Testing!

    その他参考資料

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/guides/get-program-accounts.html b/docs/.vuepress/dist/ja/guides/get-program-accounts.html index 1ea1192b3..71444cedc 100644 --- a/docs/.vuepress/dist/ja/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/ja/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } プログラムアカウントの取得 | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    dataSlicedataSizememcmpの三つのパラメータをすべて組み合わせることで、クエリの範囲を制限し関心のあるデータのみを効率的に返すことができます。

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/guides/serialization.html b/docs/.vuepress/dist/ja/guides/serialization.html index 3a64cff0f..b7305d197 100644 --- a/docs/.vuepress/dist/ja/guides/serialization.html +++ b/docs/.vuepress/dist/ja/guides/serialization.html @@ -23,7 +23,7 @@ } データのシリアライゼーション | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    その他参考資料

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/guides/versioned-transactions.html b/docs/.vuepress/dist/ja/guides/versioned-transactions.html index 30fc15e46..8be3a8833 100644 --- a/docs/.vuepress/dist/ja/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/ja/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } Versioned Transactions | Solana Cookbook - + @@ -55,6 +55,6 @@ }, );

    Other Resources

    References

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/index.html b/docs/.vuepress/dist/ja/index.html index 86d90dcab..0dd12ef6e 100644 --- a/docs/.vuepress/dist/ja/index.html +++ b/docs/.vuepress/dist/ja/index.html @@ -23,11 +23,11 @@ } Cooking with Solana | Solana Cookbook - +

    Cooking with Solana

    「Solana Cookbook」はsolanaでアプリケーションを構築するうえで欠かせない基本的なコンセプトを解説する 開発者向けのリファレンスガイドです。 各コンセプトとリファレンスは、詳細な解説と例を用いてsolanaの開発における特有の側面に焦点を当てています。

    コントリビューション

    Cookbookは、Solana開発の初心者でも気軽にコンリビュートできるよう設計されています。
    何かわからないことがあったとしても、Cookbookへのコントリビューションは学習の大きな手助けとなるはずです!

    Solana Cookbookにおいて未解決、未報告の問題がある場合は、まずissueの追加をお願いいたします。 issueはこちらopen in new window。 コントリビューションガイドラインはこちらopen in new window

    Cookbookの読み方

    Solana Cookbook ではそれぞれの目的に応じ下記の章に分けて解説しています。

    概要
    コアコンセプト開発において役立つSolanaの構成要素
    ガイド各開発ツールの簡単な紹介
    リファレンス普遍的なコードスニペット
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/accounts.html b/docs/.vuepress/dist/ja/references/accounts.html index 1f3d44512..978526a19 100644 --- a/docs/.vuepress/dist/ja/references/accounts.html +++ b/docs/.vuepress/dist/ja/references/accounts.html @@ -23,7 +23,7 @@ } アカウント | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    トークンの残高を取得したい場合は、トークンアカウントのアドレスを知る必要があります。詳細については、Token Referencesを参照してください。

    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/basic-transactions.html b/docs/.vuepress/dist/ja/references/basic-transactions.html index bc1ec6241..50abdb306 100644 --- a/docs/.vuepress/dist/ja/references/basic-transactions.html +++ b/docs/.vuepress/dist/ja/references/basic-transactions.html @@ -23,7 +23,7 @@ } トランザクションの送信 | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/keypairs-and-wallets.html b/docs/.vuepress/dist/ja/references/keypairs-and-wallets.html index d05943f9a..1bcc807fe 100644 --- a/docs/.vuepress/dist/ja/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/ja/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } キーペアとウォレット | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (複数のウォレット、別名 HDウォレット)

    単一のシードから複数のウォレットを作成できます。これは、「階層的決定論的ウォレット」または HD ウォレットとも呼ばれます。:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    次のコマンドを実行して、必要な依存関係をインストールします:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    次のコマンドを実行して、必要な依存関係をインストールします:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new windowパッケージを使うことにより、Svelte TemplateまたはSvelteKitで作成されたプロジェクト内のすべてのJS、TS、Svelte ファイル間でアクセス可能な Svelteストア($walletStore) を追加できます。こちらopen in new windowのリポジトリを参照の上、SSR または SPA 用のアダプターを使用できます。UI パッケージには、ユーザーがウォレットを選択して接続できるようにする <WalletMultiButton /> コンポーネントが含まれています。

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: PokoPoko2ry
    - +
    Last Updated:
    Contributors: PokoPoko2ry, Steven Luscher
    + diff --git a/docs/.vuepress/dist/ja/references/local-development.html b/docs/.vuepress/dist/ja/references/local-development.html index f5f4d90f2..125f8719d 100644 --- a/docs/.vuepress/dist/ja/references/local-development.html +++ b/docs/.vuepress/dist/ja/references/local-development.html @@ -23,7 +23,7 @@ } ローカル開発 | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/name-service.html b/docs/.vuepress/dist/ja/references/name-service.html index a2c57560b..82477726b 100644 --- a/docs/.vuepress/dist/ja/references/name-service.html +++ b/docs/.vuepress/dist/ja/references/name-service.html @@ -23,7 +23,7 @@ } ネームサービス | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/nfts.html b/docs/.vuepress/dist/ja/references/nfts.html index 80efe264c..f5d535d8c 100644 --- a/docs/.vuepress/dist/ja/references/nfts.html +++ b/docs/.vuepress/dist/ja/references/nfts.html @@ -23,7 +23,7 @@ } NFT | Solana Cookbook - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/offline-transactions.html b/docs/.vuepress/dist/ja/references/offline-transactions.html index 88028795e..5cd78b839 100644 --- a/docs/.vuepress/dist/ja/references/offline-transactions.html +++ b/docs/.vuepress/dist/ja/references/offline-transactions.html @@ -23,7 +23,7 @@ } オフライントランザクションの送信 | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/programs.html b/docs/.vuepress/dist/ja/references/programs.html index 42b349968..400ebcd0c 100644 --- a/docs/.vuepress/dist/ja/references/programs.html +++ b/docs/.vuepress/dist/ja/references/programs.html @@ -23,7 +23,7 @@ } プログラムの作成 | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    それぞれのクライアント側のコードは次のようになります

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    それぞれのクライアント側のコードは次のようになります

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/staking.html b/docs/.vuepress/dist/ja/references/staking.html index 638c5f8bb..01abbb8bb 100644 --- a/docs/.vuepress/dist/ja/references/staking.html +++ b/docs/.vuepress/dist/ja/references/staking.html @@ -23,7 +23,7 @@ } ステーキング | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/ja/references/token.html b/docs/.vuepress/dist/ja/references/token.html index b25d739e5..0ba073d30 100644 --- a/docs/.vuepress/dist/ja/references/token.html +++ b/docs/.vuepress/dist/ja/references/token.html @@ -23,7 +23,7 @@ } トークンアカウントとの対話 | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: PokoPoko2ry
    - + diff --git a/docs/.vuepress/dist/kr/core-concepts/accounts.html b/docs/.vuepress/dist/kr/core-concepts/accounts.html index f404682ba..984c1896a 100644 --- a/docs/.vuepress/dist/kr/core-concepts/accounts.html +++ b/docs/.vuepress/dist/kr/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Accounts | Solana Cookbook - +

    Accounts

    Solana에서 Account는 상태를 저장하기 위해 사용됩니다.
    Account는 Solana에서 개발을 위한 가장 필수적인 구성 요소입니다.

    Facts

    Fact Sheet

    • Account는 데이터를 저장하기 위해 사용됩니다.
    • 각 Account는 유일한 address를 갖고 있습니다.
    • Account는 10MB의 최대 크기를 가집니다.
    • PDA Account는 10KB의 최대 크기를 가집니다.
    • PDA Account는 Program을 대신해 서명하기 위해 사용될 수 있습니다.
    • Account 크기는 생성 시점에 고정됩니다. 하지만 reallocopen in new window을 사용해서 조정될 수 있습니다.
    • Account 데이터 저장은 rent라는 비용이 발생합니다.
    • 기본적으로 Account의 소유자는 System Program입니다.

    Deep Dive

    Account Model

    솔라나에는 3가지 종류의 Accounts가 있습니다:

    • Data Account는 데이터를 저장합니다.
    • Program Account는 실행 가능한 프로그램들을 저장합니다.
    • Native Account는 솔라나에 있는 System, Stake, Vote 같은 Native 프로그램입니다.

    Data Account에는 2가지 타입이 있습니다:

    • System이 소유한 Account
    • PDA (Program Derived Address) Account

    각 Account는 주소(보통 public key)와 소유자(프로그램 Account의 주소)를 갖고 있습니다.
    한 Account가 저장하는 전체 필드 리스트는 아래와 같습니다.

    FieldDescription
    lamportsAccount가 소유하고 있는 lamport의 개수
    ownerAccount를 소유하고 있는 Program
    executableAccount가 Instruction들을 처리할 수 있는지 여부
    dataAccount가 저장한 byte array 원본 데이터
    rent_epochAccount가 rent를 할 다음 epoch

    ownership에 대한 중요한 몇 가지 규칙이 있습니다.:

    • Data Account의 소유자만 오직 이 Account의 데이터를 수정할 수 있고, lamports를 인출할 수 있습니다.
    • 누구나 Data Account에 lamports들을 입금할 수 있습니다.
    • Account의 소유자는 이 Account의 데이터가 비어있다면 새로운 소유자에게 이 Account를 할당할 수 있습니다.

    Program Account는 상태를 저장하지 않습니다.

    예를 들어, 만약 counter를 증가시킬 수 있는 counter program을 가지고 있다면, 두 개의 Account를 생성해야 합니다.
    하나는 Program의 Code를 저장하는 Account이고, 다른 하나는 counter 데이터를 저장하는 Account입니다.

    Account가 삭제되는 것을 막기 위해서는 rent를 지불해야 합니다.

    Rent

    Account에 데이터를 저장하는 것은 메인넷에 SOL 비용을 발생시키고, rent라고 불리는 것에 의해 걷어집니다.
    만약 한 Account에 2년 치의 rent 지불과 동등한 balance를 유지한다면, Account는 rent를 지불하는 것이 면제됩니다.
    Account 사용을 마치면 rent를 되찾을 수 있고 lamports를 지갑에 보낼 수 있습니다.

    Rent는 두 가지 타이밍에 지불됩니다:

    1. Transaction에 의해 참조될 때
    2. 매 epoch 마다

    A percentage of rent collected by accounts is destroyed, while the rest is distributed to vote accounts at the end of every slot.

    만약 Account가 rent를 지불하기 위한 충분한 lamports를 갖고 있지 않다면, Account는 할당 해제되며 데이터는 지워집니다.

    새로운 Account들은 rent 면제되도록 하는 것이 중요합니다.

    Other Resources

    Credit

    This core concept is credited to Pencilflip. Follow him on Twitteropen in new window.

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/core-concepts/pdas.html b/docs/.vuepress/dist/kr/core-concepts/pdas.html index af82efd37..e34a9a523 100644 --- a/docs/.vuepress/dist/kr/core-concepts/pdas.html +++ b/docs/.vuepress/dist/kr/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) | Solana Cookbook - +

    Program Derived Addresses (PDAs)

    Program Derived Addresses (PDAs)는 특정 Program에 의해 작동되도록 설계된 Account들입니다. Program들은 PDA들을 통해 Private Key 없이 특정 Addresse에 대해 서명할 수 있습니다. PDA는 Solana App이 다른 App들과 함께 구성될 수 있도록 하는 Cross-Program Invocationopen in new window를 위한 기반으로써의 기능을 합니다.

    Facts

    Fact Sheet

    • PDAs are 32 byte strings that look like public keys, but don’t have corresponding private keys
    • PDA는 Public Key 처럼 보이는 32 byte의 String 이지만, 대응되는 Private Key는 없습니다.
    • findProgramAddress는 programId와 seeds(collection of bytes) 값으로부터 정확한 PDA를 조회할 것입니다.
    • bump (one byte) 는 ed25519 타원 곡선에서 잠재적인 PDA를 밀어내는 데 사용됩니다.
    • Program은 seeds와 bump 값을 invoke_signedopen in new window에 제공해서 PDA들에 서명할 수 있습니다.
    • PDA는 자신을 만든 Program에 의해서만 서명될 수 있습니다.
    • PDA는 Program이 다른 Instruction들에 서명하도록 하는 것 뿐만 아니라, indexing accounts를 위한 hashmap과 같은 interface 또한 제공합니다.

    Deep Dive

    PDA는 Solana에서 Program들을 개발하기 위한 필수적인 구성 요소입니다. Program들은 PDA들을 가지고 Account들에 서명할 수 있고, 다른 사용자들이 같은 Account에 유효한 서명을 만들 수 없다는 것을 보장합니다. 어떤 Program들은 Account들에 서명하는 것과 더불어 그들의 PDA들에 의해 만들어진 Account들을 수정할 수도 있습니다.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs

    PDA에 대한 개념을 이해하기 위해서, PDA는 기술적으로 창조된 것이 아니라 발견된 것이라고 생각하는 것이 좀 더 도움이 될 수 있습니다. PDA들은 seed (문자열 “vote_account”와 같은)들과 Program ID의 조합으로 만들어집니다. 그러고 나서, 이 seed들과 Program ID의 조합은 ed25519 타원 곡선 상에서 Public Key를 만들어내는지 여부를 확인하기 위해 sha256 해시 함수로 보내집니다.

    Program ID와 seeds를 해시 함수로 돌리는 동안, 타원 곡선상에 있는 유효한 Public Key를 50% 확률로 발견합니다. 이런 경우, 우리는 input 값들을 조금 다르게 하기 위해 단순히 어떤 값을 추가합니다. 이 작업을 위해 추가하는 것의 기술적인 용어는 bump입니다. 솔라나에서 bump 값은 255로 시작해서 bum=254, bump=253, etc... 와 같이 타원 곡선 상에 존재하지 않는 Address를 얻을 때까지 단순하게 값을 하나씩 내리며 반복합니다. 이것은 초보적으로 보일지 모르지만, 일단 한번 발견되면 확실히 우리는 같은 PDA를 계속해서 얻을 수 있습니다.

    PDA on the ellipitic curve

    Interacting with PDAs

    PDA가 생성됐을 때, findProgramAddress는 Address를 타원 곡선 밖으로 보내기 위해 사용되도록 Address와 bump 값을 반환할 것입니다. 이 bump 값으로 무장한 Program은 PDA를 요구하는 어떤 Instruction에도 sign할 수 있습니다. 서명을 위해 Program들은 Instruction들과 Account들의 목록 그리고 invoked_signed하기 위해 PDA를 얻기 위한 seeds와 bump값들을 보내야 합니다. PDA들은 Instuction에 서명하는 것과 더불어 invoke_signed를 통해 자신의 생성을 위한 서명도 해야 합니다.

    PDA들을 만들 때, Account Data 자체적으로 store the bump seedopen in new window 하는 것은 흔한 방법입니다. 이것은 개발자들이 bump를 Instruction 인자로써 전송하지 않고 쉽게 PDA를 검증하도록 해줍니다.

    Other Resources

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/core-concepts/programs.html b/docs/.vuepress/dist/kr/core-concepts/programs.html index 9931bc663..7c6b2b319 100644 --- a/docs/.vuepress/dist/kr/core-concepts/programs.html +++ b/docs/.vuepress/dist/kr/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programs | Solana Cookbook - +

    Programs

    어떤 개발자든 Solana 블록체인에 Program을 작성하고 배포할 수 있습니다. Program(다른 프로토콜들에서 smart contract로 알려진)들은 DeFi, NFTs부터 소셜 미디어와 게임까지 모든 것을 가능하게 하는 on-chain 활동을 위한 기반 역할을 수행합니다.

    Facts

    Fact Sheet

    • Program은 사용자나 다른 Program으로부터 받은 instructions을 처리합니다.
    • 모든 Program들은 상태를 보존하지 않습니다. 즉, Program들이 사용하는 모든 데이터는 Instruction들을 거쳐 분리된 Account들로 보내집니다.
    • Program 그 자체는 executable 표시된 Account에 저장됩니다.
    • 모든 Program은 BPF Loaderopen in new window에 의해 소유되고 Solana Runtimeopen in new window에 의해 실행됩니다.
    • 개발자들은 보통 Rust나 C++로 Program을 작성합니다. 하지만, LLVMopen in new windowBPFopen in new window backend로 빌드되는 어떤 언어도 선택 가능합니다.
    • 모든 Program은 Instruction 처리가 일어나는 단일 entry point를 갖고 있습니다.(i.e. process_instructio);
      아래는 항상 포함되는 파라미터들입니다.
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Deep Dive

    대부분의 다른 블록체인들과 다르게, Solana는 데이터와 코드를 완벽하게 분리합니다. Program이 상호 작용하는 모든 데이터들은 분리된 Account들에 저장되며, Instruction들을 거쳐 호출됩니다. 이러한 모델은 단일 Generic Program이 추가적인 배포 없이 다양한 Account들을 거쳐 동작하는 것을 가능하게 합니다. 이러한 패턴의 흔한 예는 Native와 SPL Program 들에서 볼 수 있습니다.

    Native Programs & The Solana Program Library (SPL)

    Solana는 on-chain 상호 작용을 위해 행식 구성 요소로써 기능하는 다수의 Program들을 갖고 있습니다. 이 Program들은 Native Programopen in new window들과 Solana Program Library (SPL) Programopen in new window들로 나뉩니다.

    Native Program들은 validator들을 운영하기 위해 요구되는 기반 기능을 제공합니다. 이 Program들 중에 가장 잘 알려진 것이 System Programopen in new window입니다. System Program은 새로운 Account들을 관리하는 것과 두 집단 사이에서 SOL을 전송하는 것을 책임집니다.

    SLP Program은 토큰 생성, 교환, 대여하는 것에 더해 stake pool을 발생시키고, on-chain name service를 유지하는 것 포함해 다수의 on-chain 활동을 지원합니다. SPL Token Programopen in new window들은 CLI를 거쳐 직접 호출될 수 있습니다. 반면에 Associated Token Account Programopen in new window 같은 다른 것들은 보통 Custom Program들로 구성됩니다.

    Writing Programs

    Program들은 보통 Rust와 C++로 개발됩니다. 하지만, LLVM의 BPF backend로 빌드되는 어떤 언어로도 개발 가능합니다. Neon Labsopen in new windowSolangopen in new window은 최근 EVMopen in new window 호환을 가능하게 하고 개발자들이 Program을 Solidity에서 작성할 수 있게 하는 시도를 하고 있습니다.

    대부분의 Rust 기반 Program들은 아래와 같은 아키텍처를 사용합니다.:

    FileDescription
    lib.rsRegistering modules
    entrypoint.rsEntrypoint to the program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors

    최근에는, Anchoropen in new window가 Program을 개발하기 위한 프레임워크로 뜨고 있습니다. Anchor는 boilerplate를 줄이고 (de)serialization 처리를 간소화하는 Ruby on Rails와 비슷한 Rust 기반 프레임워크입니다.

    Program들은 보통 Testnet과 Mainnet에 배포되기 전에 Localhost와 Devnet 환경에서 개발되고 테스트됩니다. Solana는 아래 환경들을 지원합니다.

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    일단 환경에 배포되고 나면, Client들은 각각의 Cluster로의 RPC 연결을 통해 On-chain Program들과 상호작용 할 수 있습니다.

    Deploying Programs

    개발자들은 다음과 같이 CLIopen in new window를 통해 Program을 배포할 수 있습니다.

    solana program deploy <PROGRAM_FILEPATH>
     

    Program이 배포될 때, ELF shared objectopen in new window(BPF bytecode를 포함하는)로 컴파일되고 Solana Cluster로 업로드됩니다. Program들은 그들의 Account가 execuable 표시되고 BPF Loader에 할당될 때를 제외하고 Account 안에 존재합니다. 이 Account의 주소는 program_id로써 모든 Transaction에서 Program을 참조하기 위해 사용됩니다.

    Solana는 최근 Upgradable BPF Loaderopen in new window를 포함해 multiple BPF Loader를 지원합니다. BPF Loader는 Program의 Account를 관리하는데 Client들이 program_id를 통해 이것을 가능하게 만들 책임이 있습니다. 모든 Program들은 Instruction에 대한 처리가 일어나는 하나의 Entry Point를 갖고 있습니다. (i.e. process_instruction)
    아래는 항상 포함되는 파라미터들입니다.

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    일단 호출되고 나면, Program들은 Solana Runtime에 의해 실행됩니다.

    Other Resources

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/core-concepts/transactions.html b/docs/.vuepress/dist/kr/core-concepts/transactions.html index 0cb710dbb..5664702d0 100644 --- a/docs/.vuepress/dist/kr/core-concepts/transactions.html +++ b/docs/.vuepress/dist/kr/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions | Solana Cookbook - +

    Transactions

    Client들은 Cluster에 Transaction을 보냄으로써 programs들을 호출합니다. 하나의 Transaction은 각자의 Program을 대상으로 하는 다수의 Instruction들을 포함할 수 있습니다. Transaction이 보내졌을 때, Solana Runtimeopen in new window은 Transaction의 Instruction들을 순서대로 처리할 것입니다. 만약 한 Instruction의 어떤 부분이라도 실패한다면, 전체 Transaction은 실패할 것입니다.

    Facts

    Fact Sheet

    • Instruction은 Solana에서 가장 기본적인 연산 단위입니다.
    • 각 Instruction은 아래 내용을 포함합니다:
      • 대상 Program의 program_id
      • 읽거나 쓸려고 하는 모든 accounts를 담은 하나의 Array
      • 대상 Program에 명시된 byte array 형태의 instruction_data
    • 다수의 Instruction들은 하나의 Transaction으로 묶일 수 있습니다.
    • 각 Transaction은 아래 내용을 포함합니다:
      • 읽거나 쓸려고 하는 모든 accounts를 담은 하나의 Array
      • 하나 이상의 instructions
      • 최근 blockhash
      • 하나 이상의 signatures
    • Instruction들은 순서대로 처리된다.
    • 만약 Instuction의 한 부분이라도 실패한다면, 전체 Transaction은 실패한다.
    • Transaction은 1232 바이트로 제한된다.

    Deep Dive

    Solana Runtime은 Instruction과 Transaction 둘 모두에게 읽거나 쓸 모든 Account의 목록을 명시하도록 요구합니다. 사전에 Account들의 목록을 요구함으로써, Runtime은 모든 Transaction들을 병렬로 실행할 수 있습니다.

    한 Transaction이 Cluster로 보내지면, Runtime은 이 Transaction의 Instruction들을 순차로 처리할 것입니다. 각 Instruction을 받는 Program은 Instruction의 데이터를 해석하고 명시된 Account들을 동작시킬 것입니다. Program은 성공을 반환할 수도 있고 에러 코드를 반환할 수도 있습니다. 만약 에러가 반환되면, Transaction은 즉시 실패할 것입니다.

    Account의 데이터를 변경하거나 출금하려고 하는 Transaction에는 해당 Account 소유자의 서명이 요구됩니다. 변경될 Account는 wriable 표시됩니다. Transaction 요금 지불자가 필요한 rent와 Transaction 요금을 지불한다면, Account에 입금하는 데에는 소유자의 서명이 필요하지 않습니다.

    모든 Transaction들은 전송 전에 recent blockhashopen in new window를 참조해야 합니다. Blockhash는 중복을 방지하고 오래된 Transaction을 제거하기 위해 사용됩니다. Transaction Blockhash는 최대 150 blocks까지, 혹은 최대 1분 19초까지 허용됩니다.

    Fees

    Solana 네트워크는 두 종류의 요금을 걷습니다.

    Solana의 Transaction fees에는 사용자들이 다음 block에 포함될 기회를 증가시키기 위해 더 높은 요금을 지불할 수 있는 fee market 개념이 없습니다. 이 글을 쓰는 시점에, Transaction fees는 사용되는 자원의 양에 의해서가 아니라 오직 요구된 서명들(i.e. lamports_per_signature)의 개수에 의해 결정됩니다. 이것은 현재 모든 Transaction들에 대한 1232 바이트의 엄격한 한도가 존재하기 때문입니다.

    모든 Transaction은 Transaction에 서명하기 위해 최소 하나의 writable Account를 요구합니다. 전송될 때, 처음 직력화된 수정 가능한 서명자 Account가 요금 지불자가 될 것입니다. 이 Account는 Transaction이 성공하는지 실패하는지와 상관없이 Transaction에 대한 비용을 지불합니다. 만약 요금 지불자가 Transaction 요금을 지불하기 위한 충분한 Balance를 갖고 있지 않다면, 이 Transaction은 거절됩니다.

    이 글을 작성하는 시점에는, 모든 Transaction 요금의 50 퍼센트는 Block을 생산하는 Validator가 가져가고, 나머지 50 퍼센트는 소멸됩니다. 이러한 구조는 Validator들이 가능한 많은 Transaction들을 처리하도록 보상하기 위함입니다.

    Other Resources

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/getting-started/installation.html b/docs/.vuepress/dist/kr/getting-started/installation.html index 47e588529..22748e0ca 100644 --- a/docs/.vuepress/dist/kr/getting-started/installation.html +++ b/docs/.vuepress/dist/kr/getting-started/installation.html @@ -23,12 +23,12 @@ } Installation | Solana Cookbook - + -

    Install Web3.js

    Solana에는 javascript와 typescript로 시작하기 위해 사용할 수 있는 몇 가지 라이브러리들이 있습니다.

    Web3.js

    @solana/web3.jsopen in new window는 통신하고, Transaction들을 보내고, Blockchain으로부터 읽기 위한 기본적인 Solana 도구들이 많이 있는 라이브러리 입니다.

    아래와 같이 설치할 수 있습니다.

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Install Web3.js

    Solana에는 javascript와 typescript로 시작하기 위해 사용할 수 있는 몇 가지 라이브러리들이 있습니다.

    Web3.js

    @solana/web3.jsopen in new window는 통신하고, Transaction들을 보내고, Blockchain으로부터 읽기 위한 기본적인 Solana 도구들이 많이 있는 라이브러리 입니다.

    아래와 같이 설치할 수 있습니다.

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Build From Source

    만약 당신이 빌드된 바이너리를 사용할 수 없거나 스스로 소스코드를 빌드하고 싶다면, https://github.com/solana-labs/solana/releases/latestopen in new window 여기로 이동해 Source Code 압축 파일을 다운로드하세요. 코드를 추출해서 아래 명령어를 이용해 빌드하세요:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    그러고 나서 아래 명령어를 실행하면 빌드된 바이너리를 이용한 것과 같은 결과를 얻을 수 있습니다:

    solana-install init
    -
    Last Updated:
    Contributors: TaeGit
    - +
    Last Updated:
    Contributors: Steven Luscher, TaeGit
    + diff --git a/docs/.vuepress/dist/kr/guides/account-maps.html b/docs/.vuepress/dist/kr/guides/account-maps.html index 722723b84..7be49e45b 100644 --- a/docs/.vuepress/dist/kr/guides/account-maps.html +++ b/docs/.vuepress/dist/kr/guides/account-maps.html @@ -23,7 +23,7 @@ } Account Maps | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/guides/data-migration.html b/docs/.vuepress/dist/kr/guides/data-migration.html index 3875dba55..b63067164 100644 --- a/docs/.vuepress/dist/kr/guides/data-migration.html +++ b/docs/.vuepress/dist/kr/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrating Program Data Accounts | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    VersionProgramInstruction::SetString(String)이라는 Instruction을 빌드하고 제출한 후, 이제 우리는 아래의 '업그레이드된' Account Data 구조를 갖습니다.

    Program Account v2

    Resources

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/guides/debugging-solana-programs.html b/docs/.vuepress/dist/kr/guides/debugging-solana-programs.html index 74ee4fc00..1e83ca2b1 100644 --- a/docs/.vuepress/dist/kr/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/kr/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debugging Solana Programs | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    디버깅하는것은 당신이 test body 에서 사용되는 함수와 메소드들을 디버그하도록 해줄것 이지만 breakpoint는 동작하지 않을 것입니다.

    Local Validator Node Testing from Client Apps

    마지막으로, 당신은 comman line의 solana-test-validator를 사용해 local validating node를 실행할 수 있고 당신의 프로그램과 Account들을 로드할 수 있습니다.

    여기에서 당신은 Rust의 RcpClient를 사용하거나 JavaScript or Typescript clients에 있는 client application이 필요할 것입니다.

    solana-test-validator --help를 사용하면 더 자세한 내용과 옵션들을 볼 수 있습니다. 예제 프로그램을 위한 단계는 여기있습니다:

    1. 프로젝트 경로에서 터미널을 엽니다.
    2. local로 설정하기 위해 solana config set -ul을 실행합니다.
    3. solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so을 실행합니다.
    4. 또 다른 터미널을 열고 log streamer를 시작하기 위해 solana logs를 실행합니다.
    5. 당신은 이제 Client Program을 실행할 수 있고 프로그램 결과를 log streamer를 실행한 터미널에서 확인할 수 있습니다.

    Resources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/guides/feature-parity-testing.html b/docs/.vuepress/dist/kr/guides/feature-parity-testing.html index 054ef6115..375bee461 100644 --- a/docs/.vuepress/dist/kr/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/kr/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Feature Parity Testing | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Happy Testing!

    Resources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: Steven Luscher, TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/guides/get-program-accounts.html b/docs/.vuepress/dist/kr/guides/get-program-accounts.html index a180de342..ec1658920 100644 --- a/docs/.vuepress/dist/kr/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/kr/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Get Program Accounts | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    세 가지 파라미터(dataSlice, dataSize, and memcmp)들을 조합함으로써 우리는 질의할 영역을 제한할 수 있고 우리가 관심 있는 데이터만 효과적으로 리턴할 수 있습니다.

    Other Resources

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/guides/serialization.html b/docs/.vuepress/dist/kr/guides/serialization.html index ba0901404..ecd3d49bc 100644 --- a/docs/.vuepress/dist/kr/guides/serialization.html +++ b/docs/.vuepress/dist/kr/guides/serialization.html @@ -23,7 +23,7 @@ } Serializing Data | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Resources

    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/index.html b/docs/.vuepress/dist/kr/index.html index 351da80ac..97f1fba3a 100644 --- a/docs/.vuepress/dist/kr/index.html +++ b/docs/.vuepress/dist/kr/index.html @@ -23,11 +23,11 @@ } Cooking with Solana | Solana Cookbook - +

    Cooking with Solana

    Solana Cookbook은 Solana 앱을 만들기 위한 필수적인 개념들과 자료들을 제공하는 개발자 문서입니다. 각 개념과 참고 자료는 추가 상세한 내용들과 사용 예를 제공하며 Solana 개발 측면에 초점을 둡니다.

    Contributing

    Cookbook은 새로운 Solana 개발자들이 기여하기 쉬운 방향으로 설계되었습니다. 만약 무엇을 어떻게 해야 할지 모르겠다면 솔라나를 배우기 위해 이 Cookbook에 기여해보세요!.

    모든 열린 이슈는 여기open in new window, Contribution 가이드는 여기open in new window에서 확인할 수 있습니다. 만약, Cookbook이 제안을 놓치고 있다면, 부디 이슈를 추가해주세요.

    How to Read the Cookbook

    Solana Cookbook은 각각 다른 목적의 섹션들로 나뉘어있습니다.

    섹션설명
    Core Concepts개발을 위해 알기 좋은 Solana의 기본 구성 요소들
    Guides개발 방법들에 대한 간단한 가이드들
    References흔히 사용되는 코드들에 대한 자료
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/accounts.html b/docs/.vuepress/dist/kr/references/accounts.html index 5ef28ceb4..b1302ac3c 100644 --- a/docs/.vuepress/dist/kr/references/accounts.html +++ b/docs/.vuepress/dist/kr/references/accounts.html @@ -23,7 +23,7 @@ } Accounts | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    만약 Token balance를 얻고 싶다면 당신은 Token Account의 address를 알 필요가 있습니다. 더 자세한 정보는 Token References를 참조하세요.

    Last Updated:
    Contributors: Partially Sorted, TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/basic-transactions.html b/docs/.vuepress/dist/kr/references/basic-transactions.html index 8a49da329..912b52753 100644 --- a/docs/.vuepress/dist/kr/references/basic-transactions.html +++ b/docs/.vuepress/dist/kr/references/basic-transactions.html @@ -23,7 +23,7 @@ } Sending Transactions | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/keypairs-and-wallets.html b/docs/.vuepress/dist/kr/references/keypairs-and-wallets.html index a5f1700bb..d963a1cae 100644 --- a/docs/.vuepress/dist/kr/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/kr/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs and Wallets | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (HD 지갑으로도 알려진 다중 지갑)

    당신은 하나의 seed로부터 다중 지갑을 만들 수 있습니다. - 'Hierarchical Deterministic wallets' or HD wallets으로도 알려진:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    요구되는 의존성들을 설치하기 위해 아래의 명령어를 실행하세요:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    요구되는 의존성들을 설치하기 위해 아래의 명령어를 실행하세요:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new window 패키지는 프로젝트 내의 모든 JS, TS 또는/그리고 Svelte 파일들에서 접근할 수 있는 Svelte Store ($walletStore)을 추가할 수 있게 해 줍니다. 여기open in new window 있는 레퍼런스를 사용해서 당신은 SSR 또는 SPA를 위한 어댑터를 사용할 수 있습니다. UI 패키지는 <WalletMultiButton /> 컴포넌트를 포함하고 있고 이것은 사용자들이 연결할 지갑을 선택할 수 있게 해 줍니다.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Partially Sorted, TaeGit
    - +
    Last Updated:
    Contributors: Partially Sorted, Steven Luscher, TaeGit
    + diff --git a/docs/.vuepress/dist/kr/references/local-development.html b/docs/.vuepress/dist/kr/references/local-development.html index f6aa463e3..7cddd93bd 100644 --- a/docs/.vuepress/dist/kr/references/local-development.html +++ b/docs/.vuepress/dist/kr/references/local-development.html @@ -23,7 +23,7 @@ } Local Development | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Partially Sorted, TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/name-service.html b/docs/.vuepress/dist/kr/references/name-service.html index 8e3b53e19..41c99ec6e 100644 --- a/docs/.vuepress/dist/kr/references/name-service.html +++ b/docs/.vuepress/dist/kr/references/name-service.html @@ -23,7 +23,7 @@ } Name Service | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/nfts.html b/docs/.vuepress/dist/kr/references/nfts.html index f390a4f66..ef5830e4a 100644 --- a/docs/.vuepress/dist/kr/references/nfts.html +++ b/docs/.vuepress/dist/kr/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -559,6 +559,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/offline-transactions.html b/docs/.vuepress/dist/kr/references/offline-transactions.html index 39fe5a11d..f4c4a2727 100644 --- a/docs/.vuepress/dist/kr/references/offline-transactions.html +++ b/docs/.vuepress/dist/kr/references/offline-transactions.html @@ -23,7 +23,7 @@ } Sending Offline Transactions | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: GGULBAE, TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/programs.html b/docs/.vuepress/dist/kr/references/programs.html index 45c207e24..2b6471ca2 100644 --- a/docs/.vuepress/dist/kr/references/programs.html +++ b/docs/.vuepress/dist/kr/references/programs.html @@ -23,7 +23,7 @@ } Writing Programs | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    Client 사이드 코드는 아래처럼 보일 것입니다.

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    Client 사이드 코드는 아래처럼 보일 것입니다.

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/staking.html b/docs/.vuepress/dist/kr/references/staking.html index 66bcc6ad1..e2a7690a7 100644 --- a/docs/.vuepress/dist/kr/references/staking.html +++ b/docs/.vuepress/dist/kr/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/kr/references/token.html b/docs/.vuepress/dist/kr/references/token.html index 8b34b9817..de68acf67 100644 --- a/docs/.vuepress/dist/kr/references/token.html +++ b/docs/.vuepress/dist/kr/references/token.html @@ -23,7 +23,7 @@ } Interacting with Tokens | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: TaeGit
    - + diff --git a/docs/.vuepress/dist/pt/core-concepts/accounts.html b/docs/.vuepress/dist/pt/core-concepts/accounts.html index 4401d0ac4..8829f99f3 100644 --- a/docs/.vuepress/dist/pt/core-concepts/accounts.html +++ b/docs/.vuepress/dist/pt/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Contas | Solana Cookbook - +

    Contas

    As contas do ecossistema Solana são usadas para armazenar estado. Elas são um bloco de construção essencial para o desenvolvimento na Solana.

    Fatos

    Ficha Informativa

    • As contas são usadas para armazenar dados
    • Cada conta tem um endereço único
    • As contas têm um tamanho máximo de 10 MB (10 Megabytes)
    • As contas PDA (Program Derived Address, ou Endereço Derivado de Programa) têm um tamanho máximo de 10 KB (10 Kilobytes)
    • As contas PDA podem ser usadas para assinar em nome de um programa
    • O tamanho das contas é fixo no momento da criação, mas pode ser ajustado usando o reallocopen in new window
    • O armazenamento de dados da conta é pago com aluguel
    • O proprietário padrão da conta é o Programa do Sistema (System Program)

    Mergulho Profundo

    Modelo de Conta

    Existem 3 tipos de contas na Solana:

    • Contas de dados armazenam dados
    • Contas de programas armazenam programas executáveis
    • Contas nativas que indicam programas nativos na Solana, como o System, Stake e Vote

    Dentro das contas de dados, existem 2 tipos:

    • Contas de propriedade do sistema
    • Contas PDA

    Cada conta possui um endereço (geralmente uma chave pública) e um proprietário (endereço de uma conta de programa). A lista completa de campos que uma conta armazena está abaixo.

    CampoDescrição
    lamportsO número de lamports (unidade de medida de valor na rede Solana) possuídos por esta conta.
    ownerO proprietário do programa desta conta
    executableSe esta conta pode processar instruções
    dataO array de bytes de dados brutos armazenados por esta conta
    rent_epochA próxima época em que esta conta terá que pagar aluguel

    Existem algumas regras de propriedade importantes:

    • Somente o proprietário de uma conta de dados pode modificar seus dados e debitar lamports
    • Qualquer pessoa pode creditar lamports a uma conta de dados
    • O proprietário de uma conta pode atribuir um novo proprietário se os dados da conta estiverem zerados

    Contas de programa não armazenam estado.

    Por exemplo, se você tiver um programa de contador que permita incrementar um contador, você deve criar duas contas, uma conta para armazenar o código do programa e outra para armazenar o contador.

    Para evitar que uma conta seja excluída, você deve pagar aluguel.

    Aluguel

    A manutenção do armazenamento de dados em contas custa SOL e é pago pelo que é chamado de aluguel. Se você mantiver um saldo mínimo equivalente a 2 anos de pagamentos de aluguel em uma conta, sua conta ficará isenta de pagar aluguel. Você pode recuperar o aluguel fechando a conta e enviando os lamports de volta para sua carteira.

    O aluguel é pago em dois momentos diferentes:

    1. Quando referenciado por uma transação
    2. Uma vez por época

    Uma porcentagem do aluguel coletado pelas contas é destruída, enquanto o restante é distribuído para contas de voto no final de cada slot.

    Se a conta não tiver o suficiente para pagar o aluguel, a conta será desalocada e os dados removidos.

    Também é importante observar que novas contas devem adotar a isenção de aluguel.

    Outros Recursos

    Créditos

    Este conceito principal é creditado ao Pencilflip. Siga ele no Twitteropen in new window.

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/core-concepts/cpi.html b/docs/.vuepress/dist/pt/core-concepts/cpi.html index 3f4d28c73..34ea3e48b 100644 --- a/docs/.vuepress/dist/pt/core-concepts/cpi.html +++ b/docs/.vuepress/dist/pt/core-concepts/cpi.html @@ -23,7 +23,7 @@ } Invocações de Programas Cruzados (CPIs) | Solana Cookbook - + @@ -92,6 +92,6 @@ account_three.clone(), ];

    Embora esta seção tenha fornecido uma visão geral de alto nível das CPIs, explicações mais detalhadas, exemplos e tutoriais podem ser encontrados nos recursos vinculados abaixo.

    Outros Recursos

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/core-concepts/pdas.html b/docs/.vuepress/dist/pt/core-concepts/pdas.html index 88557e3ac..5e8287854 100644 --- a/docs/.vuepress/dist/pt/core-concepts/pdas.html +++ b/docs/.vuepress/dist/pt/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Endereços Derivados de Programa (PDAs) | Solana Cookbook - +

    Endereços Derivados de Programa (PDAs)

    Os Endereços Derivados de Programa (PDAs) abrigam contas que são projetadas para serem controladas por um programa específico. Com os PDAs, os programas podem assinar programaticamente para determinados endereços sem precisar de uma chave privada. Os PDAs servem como base para a Invocação de Programas Cruzados (CPI)open in new window, que permite que os aplicativos da Solana sejam componíveis uns com os outros.

    Fatos

    Ficha Informativa

    • Os PDAs são strings de 32 bytes que se parecem com chaves públicas, mas não possuem chaves privadas correspondentes
    • A função findProgramAddress é usada para derivar de forma determinística um PDA a partir de um programId e sementes (coleção de bytes)
    • Um bump (um byte) é usado para afastar potenciais PDAs da curva elíptica ed25519
    • Programas podem assinar seus PDAs fornecendo as sementes e o bump para a função invoke_signedopen in new window
    • Um PDA só pode ser assinado pelo programa do qual foi derivado
    • Além de permitir que programas assinem diferentes instruções, os PDAs também fornecem uma interface similar a um hashmap para indexar contas

    Mergulho Profundo

    Os PDAs são blocos de construção essenciais para o desenvolvimento de programas na Solana. Com os PDAs, os programas podem assinar contas garantindo que nenhum usuário externo possa gerar uma assinatura válida para a mesma conta. Além de assinar as contas, certos programas também podem modificar as contas mantidas em seus PDAs.

    Matriz de Contas

    Imagem cortesia de Pencilflip

    Gerando PDAs

    Para entender o conceito por trás dos PDAs, pode ser útil considerar que os PDAs não são tecnicamente criados, mas sim encontrados. Os PDAs são gerados a partir de uma combinação de sementes (como a string "vote_account") e um ID de programa. Essa combinação de sementes e ID de programa é então executada através de uma função hash sha256 para verificar se é gerada uma chave pública que está na curva elíptica ed25519.

    Ao executar nosso ID de programa e sementes através de uma função hash, há uma chance de ~50% de que acabaremos com uma chave pública válida que está na curva elíptica. Nesse caso, simplesmente adicionamos algo para ajustar nossa entrada um pouco e tentamos novamente. O termo técnico para esse fator de ajuste é um bump. Na Solana, começamos com bump = 255 e simplesmente iteramos para baixo através de bump = 254, bump = 253, etc. até obtermos um endereço que não esteja na curva elíptica. Isso pode parecer rudimentar, mas uma vez encontrado, nos dá uma maneira determinística de derivar o mesmo PDA repetidamente.

    O PDA na curva elíptica

    Interagindo com PDAs

    Quando um PDA é gerado, findProgramAddress retornará tanto o endereço quanto o bump usado para remover o endereço da curva elíptica. Com esse bump, um programa pode assinar qualquer instrução que requer o PDA. Para assinar, os programas devem passar a instrução, a lista de contas e as sementes e o bump usados para derivar o PDA para invoke_signed. Além de assinar as instruções, os PDAs também devem assinar a própria criação através de invoke_signed.

    Ao construir com PDAs, é comum armazenar a semente do bumpopen in new window nos dados da conta em si. Isso permite que os desenvolvedores validem facilmente um PDA sem precisar passar o bump como um argumento de instrução.

    Outros recursos:

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/core-concepts/programs.html b/docs/.vuepress/dist/pt/core-concepts/programs.html index 755e81217..ef1cae48c 100644 --- a/docs/.vuepress/dist/pt/core-concepts/programs.html +++ b/docs/.vuepress/dist/pt/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programas | Solana Cookbook - +

    Programas

    Qualquer desenvolvedor pode escrever e implantar programas na blockchain Solana. Programas (conhecidos como contratos inteligentes em outros protocolos) servem como a base para atividades na cadeia, alimentando desde DeFi e NFTs até mídia social e jogos.

    Fatos

    Ficha Informativa

    • Programas processam instruções tanto de usuários finais quanto de outros programas
    • Todos os programas são sem estado (stateless): todos os dados com os quais eles interagem são armazenados em contas separadas que são transmitidas por meio de instruções
    • Os programas em si são armazenados em contas marcadas como executable (executáveis)
    • Todos os programas são de propriedade do BPF Loaderopen in new window executados pelo Solana Runtimeopen in new window
    • Os desenvolvedores geralmente escrevem programas em Rust ou C++, mas podem escolher qualquer linguagem que compile para o backend BPFopen in new window do LLVMopen in new window
    • Todos os programas têm um único ponto de entrada onde ocorre o processamento de instruções (ou seja, process_instruction); os parâmetros sempre incluem:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Mergulho Profundo

    Ao contrário da maioria das outras blockchains, a Solana separa completamente o código dos dados. Todos os dados com os quais os programas interagem são armazenados em contas separadas e passados como referências por meio de instruções. Esse modelo permite que um único programa genérico opere em várias contas sem exigir implantações adicionais. Exemplos comuns desse padrão são vistos nos programas Nativos e nos programas SPL.

    Programas Nativos & Biblioteca de Programas da Solana (Solana Program Library, ou SPL)

    A Solana vem equipada com vários programas que servem como blocos de construção principais para interações na cadeia. Esses programas são divididos em Programas Nativosopen in new window e Programas da Biblioteca de Programas da Solana (SPL)open in new window.

    Os Programas Nativos fornecem a funcionalidade-base que é necessária para operar validadores. Entre esses programas, o mais conhecido é o Programa do Sistema (System Program)open in new window, que é responsável por administrar novas contas e transferir SOL entre duas partes.

    Os Programas SPL suportam várias atividades na cadeia, incluindo criação, troca e empréstimo de tokens, além de gerar pools de staking e manter um serviço de nome na cadeia (Solana Name Service, ou SNS). O Programa de Tokens SPL (SPL Token Program)open in new window pode ser invocado diretamente via CLI, enquanto outros, como o Programa de Conta de Tokens Associada (Associated Token Account Program)open in new window são normalmente compostos por programas personalizados.

    Escrevendo Programas

    Os programas são mais comumente desenvolvidos com Rust ou C++, mas podem ser desenvolvidos com qualquer linguagem que compile para o backend BPF do LLVM. Iniciativas recentes da Neon Labsopen in new window e da Solangopen in new window possibilitam a compatibilidade com a EVMopen in new window e permitem que os desenvolvedores escrevam programas em Solidity.

    A maioria dos programas baseados em Rust adere à seguinte arquitetura:

    ArquivoDescrição
    lib.rsRegistro de módulos
    entrypoint.rsPonto de entrada para o programa
    instruction.rsAPI do programa, desserializa dados de instrução
    processor.rsLógica do programa
    state.rsObjetos de programa, desserializa o estado
    error.rsErros específicos do programa

    Recentemente, o Anchoropen in new window surgiu como um framework popular para o desenvolvimento de programas. O Anchor é um framework opinativo, semelhante ao Ruby on Rails, que reduz o boilerplate e simplifica o processo de desserialização para o desenvolvimento em Rust.

    Os programas são geralmente desenvolvidos e testados no Localhost e na Devnet (Rede de Desenvolvimento) antes de serem implantados na Testnet (Rede de Testes) ou na Mainnet (Rede Principal). A Solana suporta os seguintes ambientes:

    Ambiente de ClusterURL de Conexão RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostPorta padrão: 8899 (exemplos: http://localhost:8899, http://192.168.1.88:8899)

    Depois de implantados em um ambiente, os clientes podem interagir com programas na cadeia por meio de conexões RPCopen in new window com o respectivo cluster.

    Implantando Programas

    Os desenvolvedores podem implantar seus programas por meio da CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    Quando um programa é implantado, ele é compilado em um objeto compartilhado ELFopen in new window (contendo o bytecode BPF) e carregado no cluster Solana. Os programas residem em contas (assim como tudo na Solana), exceto que essas contas são marcadas como executable e atribuídas ao BPF Loader. O endereço desta conta é referido como program_id e é usado para referenciar o programa em todas as transações futuras.

    A Solana suporta vários BPF Loaders, sendo o mais recente o Upgradable BPF Loaderopen in new window. O BPF Loader é responsável por administrar as contas do programa e disponibilizá-las aos clientes por meio do program_id. Todos os programas têm um único ponto de entrada onde o processamento de instruções ocorre (ou seja, process_instruction) e os parâmetros sempre incluem:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Uma vez chamados, os Programas são executados pelo tempo de execução (Solana Runtime).

    Outros Recursos

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/core-concepts/transactions.html b/docs/.vuepress/dist/pt/core-concepts/transactions.html index 18773d9bd..f1327f54a 100644 --- a/docs/.vuepress/dist/pt/core-concepts/transactions.html +++ b/docs/.vuepress/dist/pt/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transações | Solana Cookbook - +

    Transações

    Os clientes podem invocar programas enviando uma transação para um cluster. Uma única transação pode incluir várias instruções, cada uma visando seu próprio programa. Quando uma transação é enviada, o Tempo de Execução (Runtime)open in new window da Solana processará suas instruções em ordem e atomicamente. Se qualquer parte de uma instrução falhar, toda a transação falhará.

    Fatos

    Ficha Informativa

    • As instruções são as unidades operacionais mais básicas na Solana
    • Cada instrução contém:
      • O identificador do programa (program_id) desejado
      • Uma lista de todas as contas (accounts) que pretende ler ou escrever
      • Um array de bytes com os dados da instrução (instruction_data), específico para o programa desejado
    • Múltiplas instruções podem ser agrupadas em uma única transação
    • Cada transação contém:
      • Uma lista de todas as contas (accounts) que pretende ler ou escrever
      • Uma ou mais instruções (instructions)
      • Um hash recente de bloco (blockhash)
      • Uma ou mais assinaturas (signatures)
    • As instruções são processadas de forma ordenada e atômica
    • Se qualquer parte de uma instrução falhar, a transação inteira falha
    • As transações são limitadas a 1232 bytes

    Mergulho Profundo

    O tempo de execução da Solana exige que tanto as instruções quanto as transações especifiquem uma lista de todas as contas que pretendem ler ou escrever. Ao exigir essas contas com antecedência, o tempo de execução é capaz de executar em paralelo todas as transações.

    Quando uma transação é enviada para um cluster, o tempo de execução processa suas instruções em ordem e atomicamente. Para cada instrução, o programa receptor interpretará seu array de dados e operará em suas contas especificadas. O programa retornará com sucesso ou com um código de erro. Se ocorrer um erro, a transação inteira falhará imediatamente.

    Qualquer transação que tenha como objetivo debitar uma conta ou modificar seus dados requer a assinatura do titular da conta. Qualquer conta que será modificada é marcada como writable (gravável). Uma conta pode ser creditada sem a permissão do titular, desde que o pagador da taxa de transação cubra o aluguel e as taxas de transação necessárias.

    Antes da submissão, todas as transações devem referenciar um hash de bloco recenteopen in new window. O hash de bloco é usado para evitar duplicidades e eliminar transações obsoletas. A idade máxima do hash de bloco de uma transação é de 150 blocos, ou cerca de ~1 minuto e 19 segundos a partir do momento em que esta mensagem está sendo escrita.

    Taxas

    A rede Solana recolhe dois tipos de taxas:

    Na Solana, as taxas de transação são determinísticas: não há conceito de mercado de taxas em que os usuários possam pagar taxas mais altas para aumentar suas chances de serem incluídos no próximo bloco. No momento em que este texto foi escrito, as taxas de transação são determinadas apenas pelo número de assinaturas necessárias (ou seja, lamports_per_signature), não pelo uso de recursos. Isso ocorre porque atualmente há um limite rígido de 1232 bytes em todas as transações.

    Todas as transações requerem pelo menos uma conta gravável (writable) para assinar a transação. Uma vez enviada, a conta de signatário gravável que é serializada primeiro será a pagadora da taxa. Esta conta pagará o custo da transação, independentemente de a transação ter sucesso ou falhar. Se o pagador da taxa não tiver um saldo suficiente para pagar a taxa de transação, a transação será descartada.

    No momento em que este texto foi escrito, 50% de todas as taxas de transação são coletadas pelo validador que produz o bloco, enquanto os 50% restantes são queimados. Essa estrutura funciona para incentivar os validadores a processar o maior número possível de transações durante seus slots no cronograma do líder.

    Outros Recursos

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/getting-started/installation.html b/docs/.vuepress/dist/pt/getting-started/installation.html index b2e945d2c..2d2b32689 100644 --- a/docs/.vuepress/dist/pt/getting-started/installation.html +++ b/docs/.vuepress/dist/pt/getting-started/installation.html @@ -23,12 +23,12 @@ } Instalação | Solana Cookbook - + -

    Instale o Web3.js

    Existem algumas bibliotecas que você pode usar para começar com JavaScript ou TypeScript na Solana.

    Web3.js

    @solana/web3.jsopen in new window é uma biblioteca que contém muitas das ferramentas básicas da Solana para interagir, enviar transações e ler dados da blockchain.

    Você pode instalar esta biblioteca com o seguinte comando:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Instale o Web3.js

    Existem algumas bibliotecas que você pode usar para começar com JavaScript ou TypeScript na Solana.

    Web3.js

    @solana/web3.jsopen in new window é uma biblioteca que contém muitas das ferramentas básicas da Solana para interagir, enviar transações e ler dados da blockchain.

    Você pode instalar esta biblioteca com o seguinte comando:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Desenvolvimento (não minificado) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Compilação a Partir do Código-Fonte

    Se você não conseguir usar os binários pré-compilados ou preferir compilá-los do zero, navegue até https://github.com/solana-labs/solana/releases/latestopen in new window e baixe o arquivo de código-fonte. Extraia o código e compile os binários com:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Você pode então executar o seguinte comando para obter o mesmo resultado dos binários pré-compilados:

    solana-install init
    -
    Last Updated:
    Contributors: Daniel Cukier
    - +
    Last Updated:
    Contributors: Daniel Cukier, Steven Luscher
    + diff --git a/docs/.vuepress/dist/pt/guides/account-maps.html b/docs/.vuepress/dist/pt/guides/account-maps.html index 345909567..0fb31ba53 100644 --- a/docs/.vuepress/dist/pt/guides/account-maps.html +++ b/docs/.vuepress/dist/pt/guides/account-maps.html @@ -23,7 +23,7 @@ } Mapeamentos de Conta | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/guides/data-migration.html b/docs/.vuepress/dist/pt/guides/data-migration.html index c8c7f315c..ba9b95dfd 100644 --- a/docs/.vuepress/dist/pt/guides/data-migration.html +++ b/docs/.vuepress/dist/pt/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrando Contas de Dados do Programa | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    Depois de construir e enviar uma instrução VersionProgramInstruction::SetString(String), agora temos o seguinte layout de dados de conta 'atualizado':

    Program Account v2

    Recursos

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/guides/debugging-solana-programs.html b/docs/.vuepress/dist/pt/guides/debugging-solana-programs.html index a45b462ed..e2ec96a78 100644 --- a/docs/.vuepress/dist/pt/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/pt/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Depurando Programas da Solana | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    A depuração aqui permitirá que você depure as funções e métodos usados no corpo do teste, mas não permitirá que você insira pontos de interrupção em seu programa.

    Muito legal, né?

    Teste de Nó Validador Local a partir de Aplicativos Cliente

    Por fim, você pode iniciar um nó validador local e carregar seu programa e todas as contas usando o solana-test-validator a partir da linha de comando.

    Nessa abordagem, você precisará de um aplicativo cliente usando o RcpClient do Rust ou em clientes JavaScript ou Typescript.

    Consulte solana-test-validator --help para obter mais detalhes e opções. Para o programa exemplo, aqui está a configuração padrão:

    1. Abra um terminal na pasta do repositório
    2. Execute solana config set -ul para definir a configuração para apontar para 'local'
    3. Execute solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Abra outro terminal e execute solana logs para iniciar o registro de logs
    5. Você pode então executar seu programa cliente e observar a saída do programa no terminal onde você iniciou o registro de logs

    UAU! Isso é demais!

    Recursos

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    Biblioteca JavaScript/Typescriptopen in new window

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/guides/feature-parity-testing.html b/docs/.vuepress/dist/pt/guides/feature-parity-testing.html index 6b446035a..31b5b2b7b 100644 --- a/docs/.vuepress/dist/pt/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/pt/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Teste de Paridade de Recursos | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Feliz codificação!

    Recursos

    scfsdopen in new window

    Mecanismo scfsopen in new window

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/guides/get-program-accounts.html b/docs/.vuepress/dist/pt/guides/get-program-accounts.html index bfa4899ad..48bbada40 100644 --- a/docs/.vuepress/dist/pt/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/pt/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Obter Contas do Programa | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    Ao combinar os três parâmetros (dataSlice, dataSize, e memcmp), podemos limitar o escopo da nossa consulta e retornar eficientemente apenas os dados que nos interessam.

    Outros recursos

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/guides/serialization.html b/docs/.vuepress/dist/pt/guides/serialization.html index 9ee2ef523..943277a13 100644 --- a/docs/.vuepress/dist/pt/guides/serialization.html +++ b/docs/.vuepress/dist/pt/guides/serialization.html @@ -23,7 +23,7 @@ } Serializando Dados | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Resources

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/guides/versioned-transactions.html b/docs/.vuepress/dist/pt/guides/versioned-transactions.html index 5d96cc02a..a3f2367c3 100644 --- a/docs/.vuepress/dist/pt/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/pt/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } Transações Versionadas | Solana Cookbook - + @@ -55,6 +55,6 @@ }, );

    Outros recursos

    Referências

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/index.html b/docs/.vuepress/dist/pt/index.html index 6b5ef501b..bab40a770 100644 --- a/docs/.vuepress/dist/pt/index.html +++ b/docs/.vuepress/dist/pt/index.html @@ -23,11 +23,11 @@ } Cozinhando com a Solana | Solana Cookbook - +

    Cozinhando com a Solana

    O Livro de Receitas da Solana (Solana Cookbook) é um recurso para desenvolvedores que fornece os conceitos e referências essenciais para construir aplicativos na Solana. Cada conceito e referência se concentra em aspectos específicos do desenvolvimento na Solana, fornecendo detalhes adicionais e exemplos de uso.

    Contribuindo

    O Livro de Receitas da Solana foi desenvolvido para facilitar a contribuição de novos desenvolvedores para o ecossistema Solana. Mesmo que você não saiba fazer algo, contribuir com o livro de receitas é uma ótima maneira de aprender!

    Confira todos os problemas em aberto aquiopen in new window. Orientações de contribuição aquiopen in new window. Se você perceber que falta alguma coisa no livro de receitas, adicione um problema.

    Como Ler o Livro de Receitas

    O Livro de Receitas da Solana é dividido em diferentes seções, cada uma com um objetivo diferente.

    SeçãoDescrição
    Conceitos PrincipaisBlocos de construção da Solana que são bons de conhecer para o desenvolvimento
    GuiasGuias concisos sobre diferentes ferramentas para desenvolvimento
    ReferênciasReferências a trechos de código comumente necessários
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/accounts.html b/docs/.vuepress/dist/pt/references/accounts.html index 77ac5383c..188a74558 100644 --- a/docs/.vuepress/dist/pt/references/accounts.html +++ b/docs/.vuepress/dist/pt/references/accounts.html @@ -23,7 +23,7 @@ } Contas | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    Se você quiser obter um saldo de tokens, precisará conhecer o endereço da conta de tokens. Para mais informações, consulte Referências de Tokens.

    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/basic-transactions.html b/docs/.vuepress/dist/pt/references/basic-transactions.html index afcc5c3f0..788b2dde5 100644 --- a/docs/.vuepress/dist/pt/references/basic-transactions.html +++ b/docs/.vuepress/dist/pt/references/basic-transactions.html @@ -23,7 +23,7 @@ } Enviando Transações | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/keypairs-and-wallets.html b/docs/.vuepress/dist/pt/references/keypairs-and-wallets.html index 5d36eb90c..70bdcc8b4 100644 --- a/docs/.vuepress/dist/pt/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/pt/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Pares de Chaves e Carteiras | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (múltiplas carteiras, também conhecidas como carteiras HD)

    Você pode criar várias carteiras a partir de uma única semente - também conhecidas como "carteiras determinísticas hierárquicas" ou carteiras HD:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Execute o seguinte comando para instalar as dependências necessárias:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Execute o seguinte comando para instalar as dependências necessárias:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    O pacote Svelte Wallet Adapteropen in new window permite adicionar uma Loja Svelte ($walletStore) acessível em todos os arquivos JS, TS ou Svelte dentro de um projeto feito com Svelte Template ou SvelteKit. Usando a referência do repositório aquiopen in new window, você pode usar o adaptador para SSR ou SPA. O pacote da interface do usuário contém um componente <WalletMultiButton /> para permitir que os usuários selecionem uma carteira para se conectar a ela.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Daniel Cukier
    - +
    Last Updated:
    Contributors: Daniel Cukier, Steven Luscher
    + diff --git a/docs/.vuepress/dist/pt/references/local-development.html b/docs/.vuepress/dist/pt/references/local-development.html index d7abd74f8..066cad746 100644 --- a/docs/.vuepress/dist/pt/references/local-development.html +++ b/docs/.vuepress/dist/pt/references/local-development.html @@ -23,7 +23,7 @@ } Desenvolvimento Local | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/name-service.html b/docs/.vuepress/dist/pt/references/name-service.html index aac9b5792..e20cca236 100644 --- a/docs/.vuepress/dist/pt/references/name-service.html +++ b/docs/.vuepress/dist/pt/references/name-service.html @@ -23,7 +23,7 @@ } Serviço de Nomes | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/nfts.html b/docs/.vuepress/dist/pt/references/nfts.html index 1e7d4f6a3..f32afa649 100644 --- a/docs/.vuepress/dist/pt/references/nfts.html +++ b/docs/.vuepress/dist/pt/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/offline-transactions.html b/docs/.vuepress/dist/pt/references/offline-transactions.html index cd5195d2c..8528bbd0f 100644 --- a/docs/.vuepress/dist/pt/references/offline-transactions.html +++ b/docs/.vuepress/dist/pt/references/offline-transactions.html @@ -23,7 +23,7 @@ } Enviando Transações Offline | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/programs.html b/docs/.vuepress/dist/pt/references/programs.html index 13db6f47f..9efb28e89 100644 --- a/docs/.vuepress/dist/pt/references/programs.html +++ b/docs/.vuepress/dist/pt/references/programs.html @@ -23,7 +23,7 @@ } Escrevendo Programas | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    O código do lado do cliente correspondente ficará assim:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    O código do lado do cliente correspondente ficará assim:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/staking.html b/docs/.vuepress/dist/pt/references/staking.html index 5434c2830..e9f4e58bd 100644 --- a/docs/.vuepress/dist/pt/references/staking.html +++ b/docs/.vuepress/dist/pt/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/pt/references/token.html b/docs/.vuepress/dist/pt/references/token.html index b713ffdd0..86736ea1f 100644 --- a/docs/.vuepress/dist/pt/references/token.html +++ b/docs/.vuepress/dist/pt/references/token.html @@ -23,7 +23,7 @@ } Interagindo com Tokens | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: Daniel Cukier
    - + diff --git a/docs/.vuepress/dist/references/accounts.html b/docs/.vuepress/dist/references/accounts.html index 389a3c246..6926e9ee6 100644 --- a/docs/.vuepress/dist/references/accounts.html +++ b/docs/.vuepress/dist/references/accounts.html @@ -23,7 +23,7 @@ } Accounts | Solana Cookbook - + @@ -1178,6 +1178,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    If you want to get a token balance, you will need to know the address of token account. For more information, see Token References

    Last Updated:
    Contributors: Aleksandar Georgiev, Jacob Creech, Jacob Creech, Partially Sorted, Robin
    - + diff --git a/docs/.vuepress/dist/references/basic-transactions.html b/docs/.vuepress/dist/references/basic-transactions.html index f8212db83..4ee561253 100644 --- a/docs/.vuepress/dist/references/basic-transactions.html +++ b/docs/.vuepress/dist/references/basic-transactions.html @@ -23,7 +23,7 @@ } Sending Transactions | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: Jacob Creech, Brian Long, Frank V. Castellucci, Jacob Creech, Marc Jaramillo, dtlehrer
    - + diff --git a/docs/.vuepress/dist/references/keypairs-and-wallets.html b/docs/.vuepress/dist/references/keypairs-and-wallets.html index bff2bfe50..b70076aec 100644 --- a/docs/.vuepress/dist/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs and Wallets | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (multiple wallets, also known HD wallets)

    You can make multiple wallets from a single seed - also known as 'Hierarchical Deterministic wallets' or HD wallets:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -388,27 +401,29 @@
       const keypair = Keypair.fromSeed(derivePath(path, seed.toString("hex")).key);
       console.log(`${path} => ${keypair.publicKey.toBase58()}`);
     }
    -
    from solana.keypair import Keypair
    +
    from solders.keypair import Keypair
     from mnemonic import Mnemonic
    -from hdkey import HDKey
     
     mnemo = Mnemonic("english")
    -seed = mnemo.to_seed("neither lonely flavor argue grass remind eye tag avocado spot unusual intact")
    +mnemonic_phrase = "pill tomorrow foster begin walnut borrow virtual kick shift mutual shoe scatter"
    +seed = mnemo.to_seed(mnemonic_phrase)
     
    -hd = HDKey.from_master_seed(seed)
    +keypairs = []
     for i in range(10):
    -    path = f"m/44'/501'/{i}'/0'"
    -    keypair = Keypair.from_bytes(hd.derive(path).private_key)
    -    print(f"{path} => {keypair.public_key()}")
    -
    solana-keygen recover 'prompt:?key=0/0'
    +    derivation_path = f"m/44'/501'/{i}'/0'"
    +    keypair = Keypair.from_seed_and_derivation_path(seed, derivation_path)
    +    keypairs.append(keypair)
    +    print(f"Keypair {i + 1} with Public Key: {keypair.pubkey()}")
    +
    solana-keygen recover 'prompt:?key=0/0'
     

    How to generate a vanity address

    Vanity publickeys, or custom addresses are keys that have start with specific characters. For example, a person may want a publickey to start with "elv1s", or maybe even "cook". These can help other people remember who the key belongs to, making the key more easily identifiable.

    Note: The more characters in your vanity address, the longer it will take.

    WARNING

    You should just use the CLI for this task. The Python and TypeScript examples are for illustrative purposes and are much slower than the CLI.

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     
    @@ -502,7 +517,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Run the following command to install the required dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Run the following command to install the required dependencies:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    The Svelte Wallet Adapteropen in new window package allows to add a Svelte Store ($walletStore) accessible among all the JS, TS or/and Svelte files inside a project done with Svelte Template or SvelteKit. Using the repo reference hereopen in new window you can be able to use the adapter for SSR or SPA. The UI package contains a <WalletMultiButton /> component to allow users to select a wallet to connect to it.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -694,7 +709,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Jacob Creech, Dhruv Varshney, Jacob Creech, Kevin Heavey, Mike MacCana, Partially Sorted, Silvestre Vivo, Stella Wang, AndyNft, dboures
    - +
    Last Updated:
    Contributors: Jacob Creech, AndyNft, Dhruv Varshney, Jacob Creech, Kevin Heavey, Mike MacCana, Partially Sorted, Silvestre Vivo, Stella Wang, Steven Luscher, dboures
    + diff --git a/docs/.vuepress/dist/references/local-development.html b/docs/.vuepress/dist/references/local-development.html index 347bd7ebc..3c1f8e5d6 100644 --- a/docs/.vuepress/dist/references/local-development.html +++ b/docs/.vuepress/dist/references/local-development.html @@ -23,7 +23,7 @@ } Local Development | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Jacob Creech, AndyNft, Braden Keith, Jacob Creech, Partially Sorted, dtlehrer, man0s
    - + diff --git a/docs/.vuepress/dist/references/name-service.html b/docs/.vuepress/dist/references/name-service.html index 5d940e94f..b4446f536 100644 --- a/docs/.vuepress/dist/references/name-service.html +++ b/docs/.vuepress/dist/references/name-service.html @@ -23,7 +23,7 @@ } Name Service | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: Jacob Creech, dtlehrer
    - + diff --git a/docs/.vuepress/dist/references/nfts.html b/docs/.vuepress/dist/references/nfts.html index 98e58f1e3..3100a4e5d 100644 --- a/docs/.vuepress/dist/references/nfts.html +++ b/docs/.vuepress/dist/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Solana Cookbook - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: Jacob Creech, Jacob Creech, Deep Mehta, Loris Leiva, Mike Arpaia, Mukesh
    - + diff --git a/docs/.vuepress/dist/references/offline-transactions.html b/docs/.vuepress/dist/references/offline-transactions.html index 12f6b2b30..10b1c3e68 100644 --- a/docs/.vuepress/dist/references/offline-transactions.html +++ b/docs/.vuepress/dist/references/offline-transactions.html @@ -23,7 +23,7 @@ } Sending Offline Transactions | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: Callum McIntyre, Jacob Creech, Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/references/programs.html b/docs/.vuepress/dist/references/programs.html index 3a5940ebb..d43c74cf6 100644 --- a/docs/.vuepress/dist/references/programs.html +++ b/docs/.vuepress/dist/references/programs.html @@ -23,7 +23,7 @@ } Writing Programs | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    The respective client side code will look as follows

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    The respective client side code will look as follows

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -

    How to create a PDA

    A Program Derived Address is simply an account owned by the program, but has no private key. Instead it's signature is obtained by a set of seeds and a bump (a nonce which makes sure it's off curve). "Generating" a Program Address is different from "creating" it. One can generate a PDA using Pubkey::find_program_address. Creating a PDA essentially means to initialize the address with space and set the state to it. A normal Keypair account can be created outside of our program and then fed to initialize it's state. Unfortunately, for PDAs, it has to be created on chain, due to the nature of not being able to sign on behalf of itself. Hence we use invoke_signed to pass the seeds of the PDA, along with the funding account's signature which results in account creation of a PDA.

    Press </> button to view full source
    use borsh::{BorshDeserialize, BorshSerialize};
    -use solana_program::{
    -    account_info::{next_account_info, AccountInfo},
    -    entrypoint,
    -    entrypoint::ProgramResult,
    -    program::invoke_signed,
    -    program_error::ProgramError,
    -    pubkey::Pubkey,
    -    rent::Rent,
    -    system_instruction,
    -    sysvar::Sysvar,
    -};
    -
    -entrypoint!(process_instruction);
    -
    -#[derive(BorshSerialize, BorshDeserialize, Debug)]
    -pub struct HelloState {
    -    is_initialized: bool,
    -}
    -
    -// Accounts required
    -/// 1. [signer, writable] Funding account
    -/// 2. [writable] PDA account
    -/// 3. [] System Program
    -pub fn process_instruction(
    -    program_id: &Pubkey,
    -    accounts: &[AccountInfo],
    -    instruction_data: &[u8],
    -) -> ProgramResult {
    -    const ACCOUNT_DATA_LEN: usize = 1;
    -
    -    let accounts_iter = &mut accounts.iter();
    -    // Getting required accounts
    -    let funding_account = next_account_info(accounts_iter)?;
    -    let pda_account = next_account_info(accounts_iter)?;
    -    let system_program = next_account_info(accounts_iter)?;
    -
    -    // Getting PDA Bump from instruction data
    -    let (pda_bump, _) = instruction_data
    -        .split_first()
    -        .ok_or(ProgramError::InvalidInstructionData)?;
    -
    -    // Checking if passed PDA and expected PDA are equal
    -    let signers_seeds: &[&[u8]; 3] = &[
    -        b"customaddress",
    -        &funding_account.key.to_bytes(),
    -        &[*pda_bump],
    -    ];
    -    let pda = Pubkey::create_program_address(signers_seeds, program_id)?;
    -
    -    if pda.ne(&pda_account.key) {
    -        return Err(ProgramError::InvalidAccountData);
    -    }
    -
    -    // Assessing required lamports and creating transaction instruction
    -    let lamports_required = Rent::get()?.minimum_balance(ACCOUNT_DATA_LEN);
    -    let create_pda_account_ix = system_instruction::create_account(
    -        &funding_account.key,
    -        &pda_account.key,
    -        lamports_required,
    -        ACCOUNT_DATA_LEN.try_into().unwrap(),
    -        &program_id,
    -    );
    -    // Invoking the instruction but with PDAs as additional signer
    -    invoke_signed(
    -        &create_pda_account_ix,
    -        &[
    -            funding_account.clone(),
    -            pda_account.clone(),
    -            system_program.clone(),
    -        ],
    -        &[signers_seeds],
    -    )?;
    -
    -    // Setting state for PDA
    -    let mut pda_account_state = HelloState::try_from_slice(&pda_account.data.borrow())?;
    -    pda_account_state.is_initialized = true;
    -    pda_account_state.serialize(&mut &mut pda_account.data.borrow_mut()[..])?;
    -
    -    Ok(())
    -}
    -

    How to create a PDA

    A Program Derived Address is simply an account owned by the program, but has no private key. Instead it's signature is obtained by a set of seeds and a bump (a nonce which makes sure it's off curve). "Generating" a Program Address is different from "creating" it. One can generate a PDA using Pubkey::find_program_address. Creating a PDA essentially means to initialize the address with space and set the state to it. A normal Keypair account can be created outside of our program and then fed to initialize it's state. Unfortunately, for PDAs, it has to be created on chain, due to the nature of not being able to sign on behalf of itself. Hence we use invoke_signed to pass the seeds of the PDA, along with the funding account's signature which results in account creation of a PDA.

    Press </> button to view full source
    File not found
    Last Updated:
    Contributors: Jacob Creech, Jacob Creech, Sergey Kaunov, migui3230
    - +
    Last Updated:
    Contributors: Jacob Creech, Ayush, Jacob Creech, Sergey Kaunov, migui3230
    + diff --git a/docs/.vuepress/dist/references/staking.html b/docs/.vuepress/dist/references/staking.html index 86709d3df..70adfeb23 100644 --- a/docs/.vuepress/dist/references/staking.html +++ b/docs/.vuepress/dist/references/staking.html @@ -23,7 +23,7 @@ } Staking | Solana Cookbook - + @@ -767,6 +767,6 @@ // total stake amount console.log(`Stake amount for this wallet in lamports: ${totalStakeBalance}`);
    Last Updated:
    Contributors: Jacob Creech, shivam
    - + diff --git a/docs/.vuepress/dist/references/token.html b/docs/.vuepress/dist/references/token.html index 5bce41f62..d812fc771 100644 --- a/docs/.vuepress/dist/references/token.html +++ b/docs/.vuepress/dist/references/token.html @@ -23,7 +23,7 @@ } Interacting with Tokens | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: Jacob Creech, Jacob Creech, Mike MacCana, Yihau Chen
    - + diff --git a/docs/.vuepress/dist/th/core-concepts/accounts.html b/docs/.vuepress/dist/th/core-concepts/accounts.html index 31c957306..09241a6f6 100644 --- a/docs/.vuepress/dist/th/core-concepts/accounts.html +++ b/docs/.vuepress/dist/th/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Accounts | คู่มือ Solana - +

    Accounts

    Accounts ใน Solana จะเอาไว้เก็บ state และเป็นส่วนสำคัญในการพัฒนาบน Solana.

    เรื่องน่ารู้

    Fact Sheet

    • Accounts เอาไว้เก็บข้อมูล (data)
    • แต่ละ account มี address ที่ไม่ซ้ำกัน
    • Accounts มีขนาดได้ไม่เกิน 10MB (10 Mega Bytes)
    • PDA accounts มีขนาดได้ไม่เกิน 10KB (10 Kilo Bytes)
    • PDA accounts สามารถใช้ sign แทน program ได้
    • ขนาดของ Accounts จะถูกกำหนดตั้งแต่ตอนสร้าง แต่สามารถเปลี่ยนได้ทีหลังด้วยการ reallocopen in new window
    • พื้นที่เก็บ data ใน Account ต้องจ่ายยค่าเช่า (rent)
    • เจ้าของ account ตาม default คือ System Program

    ลงลึก

    Account Model

    accounts บน Solana จะมี 3 แบบ:

    • Data accounts เอาไว้เก็บ data
    • Program accounts เอาไว้เก็บ executable programs
    • Native accounts คือพวก native programs บน Solana เช่น System, Stake, และ Vote

    data accounts มี 2 ประเภท:

    • accounts ที่มี System เป็นเจ้าของ
    • PDA (Program Derived Address) accounts

    แต่ละ account จะมี address (ก็คือ public key) และมี owner (address ของ program account). โดย account จะมี field ตามด้านล่างนี้

    Fieldคำอธิบาย
    lamportsจำนวน lamports ที่ account มีอยู่
    ownerprogram ที่เป็นเจ้าของ account นี้
    executableaccount นี้สามารถประมวลผล instructions ได้หรือไม่
    dataข้อมูลดิบเป็น byte array ที่เก็บอยู่ใน account นี้
    rent_epochepoch ถัดไปที่ account นี้จะเป็นหนี้ค่าเช่า rent

    กฏที่สำคัญเกี่ยวกับ ownership:

    • เฉพาะเจ้าของ data account ที่สามารถแก้ไขข้อมูลของตัวเองได้ และถอน lamports ออกมาได้
    • ทุกคนสามารถฝาก lamports เข้า data account ได้
    • เจ้าของ account สามารถโอนเปลี่ยนเจ้าของใหม่ได้ ถ้า data ใน account ไม่มีแล้ว (zeroed out)

    Program accounts ไม่เก็บ state.

    ตัวอย่างเช่น ถ้าเรามี counter program ที่ให้เราเพิ่มจำนวน counter ได้, เราต้องสร้าง 2 accounts โดยที่ account แรกจะเอาไว้เก็บ code ของ program และอีกอันเอาไว้เก็บจำนวน counter

    คุณต้องจ่าย Rent (ค่าเช่า) เพื่อป้องกัน account จากการถูกลบ

    Rent (ค่าเช่า)

    การเก็บข้อมูลบน account จะเสีย SOL ในการดูแล และมันจะถูกจ่ายโดยเรียกว่า rent (ค่าเช่า) ถ้าคุณจ่ายทิ้งไว้ให้ครอบคลุมขั้นต่ำ 2 ปี คุณก็จะได้รับการยกเว้นค่าเช่า (rent exempt) และคุณยังสามารถเอา lamports คืนได้ด้วยการปิด (close) account และส่ง lamports คืนสู่ wallet

    Rent จะถูกจ่ายเมื่อ 2 เหตุการณ์นี้เกิดขึ้น:

    1. เมื่อถูกอ้างอิงด้วย transaction
    2. เมื่อจบรอบ epoch

    จำนวน % ของ rent ที่ถูกเก็บจาก accounts จะถูกทำลาย ในขณะที่จำนวนที่เหลือจะถูกแจกจ่ายไปให้ vote account เมื่อจบรอบของทุก slot

    ถ้า account ไม่มี lamports เพียงพอที่จะจ่าย rent จะทำให้ account ถูกจัดสรรคืน deallocated และข้อมูลก็จะหายไป

    และเราต้องจำไว้ด้วยว่า account ใหม่จะต้องจ่ายค่า rent exempt สำรองไว้เพื่อยกเว้นค่าเช่าเสมอ

    แหล่งข้อมูลอื่น

    Credit

    หลักการนี้เป็น credit ของ Pencilflip. ติดตามเค้าได้ทาง Twitteropen in new window.

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/core-concepts/pdas.html b/docs/.vuepress/dist/th/core-concepts/pdas.html index d0e7cea79..d6ea52742 100644 --- a/docs/.vuepress/dist/th/core-concepts/pdas.html +++ b/docs/.vuepress/dist/th/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) | คู่มือ Solana - +

    Program Derived Addresses (PDAs)

    Program Derived Addresses (PDAs) คือสิ่งที่เชื่อมโยงกับ accounts ที่ออกแบบมาให้ถูกควบคุมโดย program ที่ระบุไว้. ถ้ามี PDAs ตัว programs ก็จะสามารถ sign ได้ด้วย program (programmatically sign) สำหรับ addresses ที่เจาะจงไว้โดยไม่ต้องใช้ private key. PDAs มีไว้เพื่อทำ CPI Cross-Program Invocationopen in new window, โดยจะอนุญาต Solana apps ให้สามารถ ใช้งานร่วมกัน (composable) ​กับ program อื่นๆ ได้.

    เรื่องน่ารู้

    Fact Sheet

    • PDAs คือ 32 byte strings ที่ดูเหมือน public keys, แต่จะไม่มี private keys
    • findProgramAddress จะสามารถสืบทอด(derive) แบบ deterministic เป็น PDA จาก programId และ seeds (ชุดของ bytes)
    • bump (1 byte) จะเอาไว้เพิ่มโอกาสที่ PDA จะหลุดจาก ed25519 elliptic curve
    • Programs สามารถ sign ให้ PDAs ได้ด้วยการเตรียม seeds และ bump ไว้เพื่อใช้ในการ invoke_signedopen in new window
    • PDA สามารถ sign ด้วย program ที่มัน derived มาเท่านั้น
    • ในการที่จะทำให้ programs สามารถ sign ใน instructions ที่ต่างกัน, PDAs จะต้องเตรียม interface คล้ายๆ hashmap สำหรับ indexing accounts

    ลงลึก

    PDAs คือส่วนสำคัญในการพัฒนา programs บน Solana. ถ้ามี PDAs, programs ก็จะสามารถ sign แทน accounts ในขณะที่รับประกันได้ว่าจะไม่มี user อื่นมาสร้าง signature ที่เหมือนกันได้. นอกจากที่จะ sign แทน account ได้แล้ว บาง programs ยังสามารถเปลี่ยนแปลง accounts ที่มันถือ PDAs ไว้ได้ด้วย

    Accounts matrix

    Image courtesy of Pencilflip

    การสร้าง PDAs

    เพื่อที่จะเข้าใจหลักการเบื้องหลัง PDAs, เราอาจจะต้องเข้าใจก่อนว่า PDAs จริงๆ แล้วไม่ได้ถูกสร้างขึ้นมาแต่เป็นการค้นหาจนเจอ. PDAs เกิดจากการผสม seeds (เช่น “vote_account”) และ program id. การผสมกันของ seeds และ program id จะ run ผ่าน sha256 hash function เพื่อดูว่า public key นั้นตกอยู่บน ed25519 elliptic curve หรือไม่.

    ในการ run program id และ seeds ผ่าน hash function จะมีความเป็นไปได้ประมาณ ~50% ที่จะได้ valid public key ที่ตกอยู่บน elliptic curve. ในกรณีนี้ จะเพิ่มอะไรบางอย่างเพื่อแกล้ง (fudge) ให้ input ขยับไปนิดหน่อยแล้วก็ลองใหม่อีกครั้ง. ศัพท์ทางเทคนิคของการ fudge นี้ก็คือ bump. ใน Solana, เราจะเริ่มด้วย bump = 255 และค่อยๆ ลดลงเป็น bump = 254, bump = 253, เรื่อยๆ จนเราได้ address ที่ไม่อยู่บน elliptic curve. นี่อาจจะฟังดูง่ายๆ แต่เมื่อมันเจอ address มันก็จะเป็นวิธีในแบบ deterministic ที่จะสามารถ derive PDA เดิมออกมาได้.

    PDA on the ellipitic curve

    ใช้งาน PDAs

    เมื่อ PDA ถูกสร้างมาแล้ว, findProgramAddress จะคืน address และ bump ที่ใช้เตะ address ออกจาก elliptic curve. ถ้ามี bump นี้, program ก็จะสามารถ sign instruction ใดๆที่ต้องการ PDA. ในการที่จะ sign, ตัว programs ต้องส่ง instruction, list ของ accounts, และ seeds กับ bump ที่ใช้ derive ตัว PDA ไป invoke_signed. นอกจากนี้ในการ sign สำหรับ instructions, PDAs จะต้อง sign ผ่าน invoke_signed ด้วย.

    เมื่อจะใช้ PDAs, มันเป็นเรื่องปกติที่จะต้อง เก็บ bump seedopen in new window ไว้ใน account data นั้นๆ ด้วย. มันจะทำให้นักพัฒนาสามารถตรวจสอบ PDA ได้ง่ายขึ้นโดยไม่ต้องส่ง bump มาใน instruction argument.

    แหล่งข้อมูลอื่น

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/core-concepts/programs.html b/docs/.vuepress/dist/th/core-concepts/programs.html index a1d4030a4..47dc678db 100644 --- a/docs/.vuepress/dist/th/core-concepts/programs.html +++ b/docs/.vuepress/dist/th/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programs | คู่มือ Solana - +

    Programs

    นักพัฒนาสามารถเขียน และปล่อย (deploy) programs บน Solana blockchain. Programs (ซึ่งก็คือ smart contracts บน protocols อื่นๆ) เป็นส่วนรากฐานของการทำงาน on-chain, ทำได้ทุกอย่างตั้งแต่ DeFi และ NFTs จนไปถึง Social Media และ Gaming.

    เรื่องน่ารู้

    Fact Sheet

    • Programs ประมวลผล instructions ทั้งที่มาจาก end users และมาจาก programs อื่นๆ
    • ทุกๆ programs จะเป็น stateless: และ data ที่มันทำงานด้วยจะถูกเก็บแยกไว้ที่ accounts ที่ส่งผ่านมาทาง instructions
    • Programs จะถูกเก็บใน accounts ที่ระบุไว้ว่า executable
    • ทุกๆ programs จะมีเจ้าของคือ BPF Loaderopen in new window และจะถูกดำเนินการ (executed) โดย Solana Runtimeopen in new window
    • นักพัฒนาจะเขียน programs ด้วยภาษา Rust หรือ C++, แต่ก็สามารถเลือกภาษาใดๆ ก็ได้ที่ target LLVMopen in new window's BPFopen in new window ได้
    • ทุกๆ programs จะมีทางเข้า (entry point) ทางเดียว ซึ่งเป็นที่ที่ instruction จะถูกดำเนินการ(process_instruction); parameters จะต้องมีสิ่งเหล่านี้เสมอ:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    ลงลึก

    Solana ไม่เหมือน blockchains อื่นๆ ตรงที่เราจะแยก code กับ data ออกจากกัน ทุกๆ data ที่ programs จะใช้จะถูกเก็บไว้ใน account อีกตัวแยกกัน และ programs จะรับเป็นชุดข้อมูลอ้างอิง (references) ไปถึง account เหล่านั้นผ่านรูปแบบชุดคำสั่ง (instructions) การทำแบบนี้จะทำให้ program สามารถทำงานข้าม หรือเรียกใช้ accounts ต่างๆ โดยไม่ต้อง deploy ใหม่ ตัวอย่างรูปแบบ (pattern) เหล่านี้สามารถเห็นได้ในทั้ง Native และ SPL Programs

    Native Programs และ The Solana Program Library (SPL)

    Solana มาพร้อมกับ programs หลายตัวที่ใช้สำหรับการทำงาน on-chain. โดยที่ programs จะแบ่งเป็น Native Programsopen in new window และ Solana Program Library (SPL) Programsopen in new window.

    Native Programs มีไว้สำหรับการทำงานของ validators โดยตัวที่รู้จักกันมากคือ System Programopen in new window ที่จะคอยรับผิดชอบดูแล accounts ใหม่ และส่ง(transfer) SOL ไปมา.

    SPL Programs มีไว้ทำงาน on-chain หลายอย่าง, ทั้งสร้าง (creating), สลับ (swapping), และเช่า (lending) โทเคน (tokens), และยังมีไว้สร้าง stake pools และดูแล on-chain name service อีกด้วย โดย SPL Token Programopen in new window จะสามารถเรียกใช้ (invoke) ได้โดยตรงผ่าน CLI, ในขณะที่ Associated Token Account Programopen in new window จะถูกประกอบขึ้นมาด้วย programs ที่ทำขึ้นมาเอง.

    เขียน Programs

    Programs ส่วนใหญ่จะเขียนด้วย Rust หรือ C++, แต่ก็สามารถเลือกภาษาใดๆ ก็ได้ที่ target LLVM’s BPF ได้ นอกจากนี้จากความร่วมมือของ Neon Labsopen in new window และ Solangopen in new window ทำให้สามารถสนับสนุน EVMopen in new window ซึ่งทำให้นักพัฒนาสามารถเขียน programs ด้วย Solidity ได้.

    programs ที่เขียนด้วย Rust จะยึดโครงสร้างนี้:

    ไฟล์ (File)คำอธิบาย
    lib.rsลงทะเบียน modules
    entrypoint.rsทางเข้า (Entrypoint) ของ program
    instruction.rsProgram API, (de)serializing instruction data
    processor.rsProgram logic
    state.rsProgram objects, (de)serializing state
    error.rsProgram-specific errors

    ในตอนนี้, Anchoropen in new window เป็น framework ที่นิยมสำหรับพัฒนา programs. Anchor คือ framework ที่มีแนวทางชัดเจน (opinionated), คล้ายกับ Ruby on Rails ที่ลดการเขียนอะไรซ้ำๆ และช่วยให้การแกะ (de)serialization สะดวกขึ้นสำหรับการพัฒนาด้วย Rust.

    Programs ปกติแล้วจะถูกพัฒนา (dev) และทดสอบ(test) บนสิ่งแวดล้อม(environments) Localhost และ Devnet ก่อนที่จะ deploy ไปบน Testnet หรือ Mainnet. Solana จะสนับสนุน environments ต่อไปนี้:

    Cluster EnvironmentRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    เมื่อ deployed ไปบน environment แล้วผู้ใช้ (clients) จะสามารถใช้งาน on-chain programs ผ่าน RPC connectionsopen in new window ไปที่ cluster ตามที่เลือกไว้.

    Deploying Programs

    นักพัฒนาสามารถ deploy programs ผ่าน CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    เมื่อ program ถูก deploy ไปแล้ว, มันจะถูกแปลง (compile) เป็น ELF shared objectopen in new window (ประกอบไปด้วย BPF bytecode) และถูก upload ไปที่ Solana cluster. Programs จะอยู่ใน accounts (บน Solana ทุกอย่างอยุ่ใน accounts), ต่างตรงที่ accounts นี้จะมีสถานะ executable และถูกมอบหมายให้ BPF Loader. ที่อยู่ (address) ของ account เหล่านี้จะถูกเรียกว่า program_id และจะเอาไว้อ้างอิงในการทำ transactions ต่อไป.

    Solana สนับสนุน BPF Loaders หลายแบบ, เช่น Upgradable BPF Loaderopen in new window. The BPF Loader จะรับผิดชอบดูแล program’s account และทำให้ clients ใช้ได้ผ่าน program_id. ทุก programs มี entry point ทางเดียว และเป็นที่ประมวลผล instruction (process_instruction) และ parameters ที่จะต้องมีเสมอคือ:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    เมื่อเกิดการเรียกใช้ (invoke) programs มันจะถูกดำเนินการ (execute) โดย Solana Runtime.

    แหล่งข้อมูลอื่น

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/core-concepts/transactions.html b/docs/.vuepress/dist/th/core-concepts/transactions.html index 34255f56b..dcbef5995 100644 --- a/docs/.vuepress/dist/th/core-concepts/transactions.html +++ b/docs/.vuepress/dist/th/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions | คู่มือ Solana - +

    Transactions

    Clients สามารถ invoke programs ด้วยการส่ง (submitting) transaction ไปที่ cluster. transaction จะประกอบไปด้วย instructions, โดยแต่ละอันจะมีเป้าหมายไปที่ program ของตัวเอง. เมื่อ transaction submit ไปแล้ว, Solana Runtimeopen in new window จะ process instructions ตามลำดับ และทำในระดับ atomic. ถ้ามีส่วนไหนของ instruction ล้มเหลว (fail), ทั้ง transaction จะ fail ทั้งหมด.

    เรื่องน่ารู้

    Fact Sheet

    • Instructions คือหน่วยการทำงานพื้นฐานที่สุดของ Solana
    • แต่ละ instruction จะมี:
      • program_id ของ program
      • ชุดของ accounts ทั้งหมดที่ต้องอ่าน (read) หรือเขียน (write)
      • instruction_data byte array ที่จำเพาะเจาะจงสำหรับแต่บะ program
    • สามารถใส่เ instructions ได้มากกว่าหนึ่งตัว เข้าไปในหนึ่ง transaction
    • แต่ละ transaction จะมี:
      • ชุดของ accounts ทั้งหมดที่ต้องอ่าน (read) หรือเขียน (write)
      • instructions หนึ่งตัว หรือมากกว่า
      • blockhash ล่าสุด (recent)
      • signatures หนึ่งตัว หรือมากกว่า
    • Instructions จะ process instructions ตามลำดับ และทำในระดับ atomic
    • ถ้ามีส่วนไหนของ instruction ล้มเหลว (fail), ทั้ง transaction จะ fail ทั้งหมด
    • ขนาดของ Transactions จำกัดอยู่ที่ 1232 bytes

    ลงลึก

    Solana Runtime ต้องการให้ทั้ง instructions และ transactions ระบุ accounts ทั้งหมดที่จะอ่าน หรือเขียน การที่เราเตรียม accounts ไว้ก่อนแบบนี้จะทำให้ runtime สามารถทำงานขนานกัน (parallelize execution) ได้ทั้ง transactions.

    เมื่อ transaction ถูก submit ไปที่ cluster แล้ว, ตัว runtime จะ process instructions ตามลำดับ และทำในระดับ atomic. สำหรับแต่ละ instruction, program ที่รับไปจะแปล (interpret) data array และทำงานบน accounts ที่กำหนดไว้. program จะส่งผลสำเร็จ หรือความผิดพลาด (error code) กลับมา. ถ้าส่ง error กลับมา ทั้ง transaction จะ fail ทันที.

    transaction ที่เป็นการถอนเงิน (debit) จาก account หรือจะแก้ไข data จะต้องมี signature ของเจ้าของ account นั้นส่งมาด้วย. account ไหนที่สามารถเขียนได้ จะถูกระบุไว้ว่า writable. account สามารถรับเงิน (credited) โดยไม่ต้องได้รับอนุญาตจากเจ้าของ ทั้งนี้คนจ่าย (payer)ได้จ่ายครอบคลุมค่า rent และ transaction fees ไปแล้ว.

    ก่อนการ submission, ทุก transactions จะต้องอ้างไปที่ recent blockhashopen in new window. โดยที่ blockhash จะใช้ในการป้องกันการส่ง transactions ซ้ำ และ transactions ที่เก่าเกินไป. จำนวนสูงสุดของ transaction's blockhash คือ 150 blocks, หรือประมาณ ~1 นาที 19 วินาที ในเวลาตอนที่เขียนนี้.

    ค่าธรรมเนียม (Fees)

    Solana จะเก็บ fee 2 แบบ:

    สำหรับ Solana, transaction fees จะเป็น deterministic (ทุกเหตุการณ์ที่เกิดขึ้น มีปัจจัยที่สามารถกำหนดได้โดยสมบูรณ์): จะยังไม่มี fee market ที่ผู้ใช้ สามารถ จ่าย fees สูงกว่าเพื่อเพิ่มโอกาสในการถูกประมวลผลใน block ถัดไปในเวลาตอนที่เขียนนี้, transaction fees จะเก็บตามจำนวนของ signatures ที่ต้องการใช้ (lamports_per_signature), ไม่ใช่ตามจำนวน resources ที่ใช้ไป ทั้งนี้เป็นเพราะมี hard cap 1232 bytes ในทุกๆ transactions อยู่.

    ทุกๆ transactions จะต้องมี writable account อย่างน้อยหนึงตัวสำหรับ sign transaction. เมื่อ submitted แล้ว writable signer account ที่ถูก serialized เป็นตัวแรกจะเป็น fee payer และ account นี้จะจ่ายค่า transaction โดยไม่สนใจว่า transaction จะสำเร็จหรือไม่. ถ้า fee payer ไม่มี balance พอที่จะจ่าย transaction fee ได้ transaction ก็จะถูกทิ้งไป (dropped).

    ในเวลาตอนที่เขียนนี้, 50% ของทุก transaction fees จะถูกเก็บไปโดย validator ที่เป็นคนสร้าง block, ในขณะที่ 50% ที่เหลือจะถูกเผาทิ้ง (burn). โครงสร้างแบบนี้มีขึ้นเพื่อเป็นแรงจูงใจให้ validators ประมวณผล transactions ให้มากที่สุดเท่าที่จะเป็นไปได้ในช่วง slots ในขณะที่เป็นผู้นำ (leader)

    แหล่งข้อมูลอื่น

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/getting-started/installation.html b/docs/.vuepress/dist/th/getting-started/installation.html index 3310bf861..9421b019b 100644 --- a/docs/.vuepress/dist/th/getting-started/installation.html +++ b/docs/.vuepress/dist/th/getting-started/installation.html @@ -23,12 +23,12 @@ } การติดตั้ง | คู่มือ Solana - + -

    ติดตั้ง Web3.js

    จะมี libraries บางตัวที่คุณสามารถใช้มันเริ่มเขียน javascript หรือ typescript บน Solana.

    Web3.js

    @solana/web3.jsopen in new window คือ library ที่มีเครื่องมือพื้นฐานมากมายสำหรับการทำงานเบื้องต้น, ส่ง transactions, หรือเอาไว้อ่านข้อมูลจาก blockchain.

    คุณสามาถติดตั้งได้ตามนี้:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    ติดตั้ง Web3.js

    จะมี libraries บางตัวที่คุณสามารถใช้มันเริ่มเขียน javascript หรือ typescript บน Solana.

    Web3.js

    @solana/web3.jsopen in new window คือ library ที่มีเครื่องมือพื้นฐานมากมายสำหรับการทำงานเบื้องต้น, ส่ง transactions, หรือเอาไว้อ่านข้อมูลจาก blockchain.

    คุณสามาถติดตั้งได้ตามนี้:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Build From Source

    ถ้าคุณไม่สามารถใช้ prebuilt binaries หรืออยากจะ build เองให้ไปที่ https://github.com/solana-labs/solana/releases/latestopen in new window, และโหลด Source Code archive. แตก code ออกมา และ build binaries ด้วยคำสั่ง:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    คุณสามารถ run คำสั่งด้านล่างเพื่อให้ได้ผลแบบเดียวกับ prebuilt binaries:

    solana-install init
    -
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - +
    Last Updated:
    Contributors: Steven Luscher, Todsaporn Banjerdkit
    + diff --git a/docs/.vuepress/dist/th/guides/account-maps.html b/docs/.vuepress/dist/th/guides/account-maps.html index 1b07e8cf8..cef950a79 100644 --- a/docs/.vuepress/dist/th/guides/account-maps.html +++ b/docs/.vuepress/dist/th/guides/account-maps.html @@ -23,7 +23,7 @@ } Account Maps | คู่มือ Solana - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/guides/data-migration.html b/docs/.vuepress/dist/th/guides/data-migration.html index 58b761640..3c69f61eb 100644 --- a/docs/.vuepress/dist/th/guides/data-migration.html +++ b/docs/.vuepress/dist/th/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrating Program Data Accounts | คู่มือ Solana - + @@ -676,6 +676,6 @@ } }

    หลัวจาก build และ submit instruction แล้ว: VersionProgramInstruction::SetString(String) ตอนนี้เราจะมี 'upgraded' account data layout ตามภาพ

    Program Account v2

    Resources

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/guides/debugging-solana-programs.html b/docs/.vuepress/dist/th/guides/debugging-solana-programs.html index b18e7cf6a..1d2683a8b 100644 --- a/docs/.vuepress/dist/th/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/th/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debugging Solana Programs | คู่มือ Solana - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    การ Debugging แบบนี้จะทำให้เราสามารถ debug functions และ methods ใน test body ได้แต่จะไม่มี breakpoint ใน program.

    มันเจ๋งมากใช่มั้ยล่ะ?

    Local Validator Node Testing from Client Apps

    และสุดท้ายเราสามารถเปิด local validating node และ load program ของเรา และ accounts ใดๆ เข้าไปโดยใช้ solana-test-validator จาก command line.

    จะทำวิธีนี้ได้เราจะต้องใช้ client application โดยใช้ Rust RcpClient หรือใช้ JavaScript or Typescript clients

    ลอง solana-test-validator --help สำหรับรายละเอียดเพิ่มเติม และตัวเลือกอื่นๆ สำหรับ program ตัวอย่างด้านล่างนี่คือขั้นตอนติดตั้ง:

    1. เปิด terminal ใน repo folder
    2. Run solana config set -ul เพื่อตั้งค่าตัวเลือกให้ชี้ไปที่ local
    3. Run solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. เปิด terminal และ run solana logs เพื่อเปิด log streamer
    5. เราสามารถ run client program ของเรา และดู program output ใน terminal ที่เราเปิด log streamer ไว้

    นี่มันดีมากเลยนะ!

    Resources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/guides/feature-parity-testing.html b/docs/.vuepress/dist/th/guides/feature-parity-testing.html index 8fa8ee913..3383d474b 100644 --- a/docs/.vuepress/dist/th/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/th/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Feature Parity Testing | คู่มือ Solana - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    ทดสอบกันให้สนุกนะ!

    Resources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/guides/get-program-accounts.html b/docs/.vuepress/dist/th/guides/get-program-accounts.html index e36553c22..5e6744fde 100644 --- a/docs/.vuepress/dist/th/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/th/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Get Program Accounts | คู่มือ Solana - + @@ -442,6 +442,6 @@ # "id": 1 # }

    โดนการที่เราผสม 3 parameters (dataSlice, dataSize, และ memcmp) เราก็จะสามารถจำกัดการค้นหาให้มีประสิทธิภาพ และส่งค่ากลับมาเฉพาะที่เราต้องการได้

    แหล่งข้อมูลอื่น

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/guides/serialization.html b/docs/.vuepress/dist/th/guides/serialization.html index 9b891975c..db129a75b 100644 --- a/docs/.vuepress/dist/th/guides/serialization.html +++ b/docs/.vuepress/dist/th/guides/serialization.html @@ -23,7 +23,7 @@ } Serializing Data | คู่มือ Solana - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Resources

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/guides/versioned-transactions.html b/docs/.vuepress/dist/th/guides/versioned-transactions.html index ae8b2f54f..405efbb3d 100644 --- a/docs/.vuepress/dist/th/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/th/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } Versioned Transactions | คู่มือ Solana - + @@ -55,6 +55,6 @@ }, );

    แหล่งข้อมูลอื่นๆ

    อ้างอิง

    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/index.html b/docs/.vuepress/dist/th/index.html index 34d07f6a0..3481f323a 100644 --- a/docs/.vuepress/dist/th/index.html +++ b/docs/.vuepress/dist/th/index.html @@ -23,11 +23,11 @@ } Cooking กับ Solana | คู่มือ Solana - +

    Cooking กับ Solana

    คู่มือ Solana คือแหล่งข้อมูลสำหรับนักพัฒนา ที่จะให้แนวความคิดหลักๆ และข้อมูลอ้างอิงสำหรับสร้าง applications บน Solana โดยแต่ละแนวความคิด และข้อมูลอ้างอิงจะเน้นในแต่ละมุมมองของการพัฒนา Solana โดยจะให้รายละเอียดเพิ่มเติม รวมไปถึงตัวอย่างการใช้งานอีกด้วย

    ร่วมกันเขียน

    คู่มือนี้ออกแบบมาให้ง่ายสำหรับนักพัฒนา Solana ที่จะร่วมกันเขียน ถึงแม้ว่าคุณจะยังไม่รู้ว่าจะทำอะไรยังไง การเริ่มจากช่วยกันเขียนก็เป็นการเริ่มต้นที่ดีนะ!

    ลองดู issues ที่เปิดอยู่ ที่นี่open in new window. แนวทางการช่วยกัน ที่นี่open in new window. ถ้าคุณเจอว่าคู่มือเราขาดอะไรไป ก็เปิด issue ได้เลย

    วิธีอ่านคู่มือ

    คู่มือ Solana แบ่งเป็นหลายส่วน โดยแต่ละส่วนจะเน้นคนละเป้าหมายกัน

    ส่วนคำอธิบาย
    แนวความคิดหลักสร้างความรู้ที่ควรจะรู้สำหรับการพัฒนาบน Solana
    แนวทางแนวทางของแต่ละเครื่องมือสำหรับการพัฒนา
    อ้างอิงส่วนอ้างอิงที่มักจะมี code สั้นๆ อยู่ด้วย
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/accounts.html b/docs/.vuepress/dist/th/references/accounts.html index 8c7fcfb60..4ee570592 100644 --- a/docs/.vuepress/dist/th/references/accounts.html +++ b/docs/.vuepress/dist/th/references/accounts.html @@ -23,7 +23,7 @@ } Accounts | คู่มือ Solana - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    ถ้าเราต้องการเรียกดู token balance เราต้องรู้ address ของ token account นั้นๆ สำหรับรายเอียดเพิ่มเติมไปดูได้ที่ Token References

    Last Updated:
    Contributors: Partially Sorted, Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/basic-transactions.html b/docs/.vuepress/dist/th/references/basic-transactions.html index 5f4795c83..411e1cd72 100644 --- a/docs/.vuepress/dist/th/references/basic-transactions.html +++ b/docs/.vuepress/dist/th/references/basic-transactions.html @@ -23,7 +23,7 @@ } Sending Transactions | คู่มือ Solana - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/keypairs-and-wallets.html b/docs/.vuepress/dist/th/references/keypairs-and-wallets.html index 80c8081c2..508683f59 100644 --- a/docs/.vuepress/dist/th/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/th/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs และ Wallets | คู่มือ Solana - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (สร้างหลาย wallets หรือที่เรียกว่า HD wallets)

    เราสามารถสร้างหลาย wallets จาก seed เดียวหรือที่เราเรียกว่า 'Hierarchical Deterministic wallets' หรือ HD wallets:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Run คำสั่งข้างล่างเพื่อติดตั้ง dependencies ที่ต้องใช้:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Run คำสั่งข้างล่างเพื่อติดตั้ง dependencies ที่ต้องใช้:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new window package จะทำให้เราสามารถเพิ่ม Svelte Store ($walletStore) ที่เข้าถึงได้ทั้ง JS, TS และ/หรือ Svelte files ใน project ที่สร้างด้วย Svelte Template หรือ SvelteKit. โดยใช้ repo ที่นี่open in new window เราสามารถที่จะใช้ adapter สำหรับ SSR หรือ SPA. ส่วน UI package จะมี <WalletMultiButton /> component เพื่อให้ผู้ใช้สามารถเลือกและเชื่อมต่อ wallet ได้

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: Partially Sorted, Todsaporn Banjerdkit
    - +
    Last Updated:
    Contributors: Partially Sorted, Steven Luscher, Todsaporn Banjerdkit
    + diff --git a/docs/.vuepress/dist/th/references/local-development.html b/docs/.vuepress/dist/th/references/local-development.html index 2568a4fd2..26e8308ca 100644 --- a/docs/.vuepress/dist/th/references/local-development.html +++ b/docs/.vuepress/dist/th/references/local-development.html @@ -23,7 +23,7 @@ } Local Development | คู่มือ Solana - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Partially Sorted, Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/name-service.html b/docs/.vuepress/dist/th/references/name-service.html index 6ccea6298..97f0b055e 100644 --- a/docs/.vuepress/dist/th/references/name-service.html +++ b/docs/.vuepress/dist/th/references/name-service.html @@ -23,7 +23,7 @@ } Name Service | คู่มือ Solana - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/nfts.html b/docs/.vuepress/dist/th/references/nfts.html index b56972299..a37517cf7 100644 --- a/docs/.vuepress/dist/th/references/nfts.html +++ b/docs/.vuepress/dist/th/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | คู่มือ Solana - + @@ -559,6 +559,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/offline-transactions.html b/docs/.vuepress/dist/th/references/offline-transactions.html index 31853aa27..1cd87a621 100644 --- a/docs/.vuepress/dist/th/references/offline-transactions.html +++ b/docs/.vuepress/dist/th/references/offline-transactions.html @@ -23,7 +23,7 @@ } Sending Offline Transactions | คู่มือ Solana - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/programs.html b/docs/.vuepress/dist/th/references/programs.html index 5f5ef71a0..8b96a2b30 100644 --- a/docs/.vuepress/dist/th/references/programs.html +++ b/docs/.vuepress/dist/th/references/programs.html @@ -23,7 +23,7 @@ } เขียน Programs | คู่มือ Solana - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    ฝั่ง client จะมี code ดังนี้

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    ฝั่ง client จะมี code ดังนี้

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/staking.html b/docs/.vuepress/dist/th/references/staking.html index e4c4adc09..b5bbd006d 100644 --- a/docs/.vuepress/dist/th/references/staking.html +++ b/docs/.vuepress/dist/th/references/staking.html @@ -23,7 +23,7 @@ } Staking | คู่มือ Solana - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/th/references/token.html b/docs/.vuepress/dist/th/references/token.html index 523e92cee..751ecf0b8 100644 --- a/docs/.vuepress/dist/th/references/token.html +++ b/docs/.vuepress/dist/th/references/token.html @@ -23,7 +23,7 @@ } การใช้งาน Tokens | คู่มือ Solana - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: Todsaporn Banjerdkit
    - + diff --git a/docs/.vuepress/dist/tr/core-concepts/accounts.html b/docs/.vuepress/dist/tr/core-concepts/accounts.html index 4f4dedafa..4cd677d48 100644 --- a/docs/.vuepress/dist/tr/core-concepts/accounts.html +++ b/docs/.vuepress/dist/tr/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Accounts (Account’lar) | Solana Cookbook - +

    Accounts (Account’lar)

    Solana içindeki account’lar (hesaplar), durumu saklamak için kullanılır. Account, Solana'da gelişme yapmak için önemli bir yapı taşıdır.

    Facts (Özet Bilgiler)

    Bilgi tablosu

    • Account’lar veri depolamak için kullanılır.
    • Her account'ın benzersiz bir adresi vardır.
    • Account’ların maksimum boyutu 10 MB (10 Mega Bayt)’dır.
    • PDA account'larının maksimum boyutu 10 KB (10 Kilo Bayt)’dır.
    • PDA account'ları, bir program adına imzalamak için kullanılabilir.
    • Account boyutu oluşturma sırasında sabitlenir, ancak realloc kullanılarak ayarlanabilir.
    • Account veri depolaması rent ile ödenir.
    • Varsayılan account sahibi Sistem Programıdır.

    Deep Dive (Derinlemesine Bakış)

    Account Model (Account Modeli)

    Solana'da 3 çeşit account vardır:

    • Veri account'ları, verileri depolar.
    • Program account'ları, executable programları depolar.
    • System, Stake ve Vote gibi yerel programları gösteren yerel account'lar bulunur.

    Veri account'larının 2 türü bulunur:

    • Sisteme ait account'lar
    • PDA (Program Derived Address/Programdan Türetilmiş Adres) account'ları

    Her account'ın bir adresi (genellikle bir public key) ve bir sahibi (bir program account'ının adresi) vardır. Bir account'ın depoladığı tam alan listesi aşağıda bulunur.

    AlanAçıklaması
    lamportsHesaba ait "lamport" sayısı
    ownerAccount sahibi
    executableHesabın talimatları işleyip işleyemeyeceği bilgisi
    dataAccount tarafından depolanan ham veri byte array
    rent_epochBu account'ın rent borcu olacağı bir sonraki epoch

    Birkaç önemli sahiplik kuralı vardır:

    • Yalnızca bir data account'ının sahibi, lamports verilerini ve borç bilgisini değiştirebilir.
    • Herhangi birinin bir data account'ına Lamports kredisi vermesine izin verilir.
    • Hesabın verileri sıfırlanırsa, bir account'ın sahibi yeni bir sahip atayabilir.
    • Program account'ları durumu saklamaz.

    Örneğin, bir sayacı artırmanıza izin veren bir sayaç programınız varsa, biri program kodunu depolamak için diğeri de sayacı depolamak için iki account oluşturmanız gerekir.

    Bir account'ın silinmesini önlemek için rent ödemeniz gerekir.

    Rent

    Hesaplarda veri depolamanın bakımı SOL gerektirir ve rent(kira) ile finanse edilir. Bir account'ta en az 2 yıllık rent ödemesine eşdeğer bir bakiyeniz varsa, account'ınız rent ödemekten muaf tutulacaktır. Hesabı kapatarak ve Lamport'ları cüzdanınıza geri göndererek rent’i geri alabilirsiniz.

    Rent iki farklı zamanlamada ödenir:

    1. Bir işlem tarafından referans alındığında
    2. Her bir epoch(döngü)’da

    Hesaplar tarafından toplanan rent’in belirli bir bölümü yok edilirken geri kalanı her slotun sonunda vote account'larına dağıtılır.

    Hesabın rent ödemesi için yeterli olmaması durumunda, account serbest bırakılır ve veriler silinir.

    Yeni account'ların rent ödemesinden muaf olması gerektiğini de belirtmek önemlidir.

    Other Resources (Diğer Kaynaklar)

    Referans

    Bu bilgiler Pencilflip tarafından yazıldı, kendisini Twitteropen in new window’dan takip edebilirsiniz.

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/core-concepts/pdas.html b/docs/.vuepress/dist/tr/core-concepts/pdas.html index d4e4d6ed2..2618f0748 100644 --- a/docs/.vuepress/dist/tr/core-concepts/pdas.html +++ b/docs/.vuepress/dist/tr/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) (Programdan Türetilmiş Adresler) | Solana Cookbook - +

    Program Derived Addresses (PDAs) (Programdan Türetilmiş Adresler)

    Program Derived Addresses (Programdan Türetilmiş Adresler, PDA’lar), belirli bir program tarafından kontrol edilmek üzere tasarlanmış account'lara ev sahipliği yapar. PDA'lar ile programlar, private key’e ihtiyaç duymadan belirli adresleri programlı olarak imzalayabilir. PDA'lar, Solana uygulamalarının birbirleriyle birleştirilebilir olmasını sağlayan Cross-Program Invocationopen in new window’ın(programlar arası çağırma) temeli olarak hizmet eder.

    Facts (Özet Bilgiler)

    Bilgi Tablosu

    • PDA'lar, public key’lere benzeyen ancak karşılık gelen private key’e sahip olmayan 32 byte’lık array’lerdir.
    • findProgramAddress, bir programId ve seed’lerden (bayt koleksiyonu) deterministik olarak bir PDA türetecektir.
    • Potansiyel bir PDA'yı ed25519 eliptik eğriden çıkarmak için bir bump (bir bayt) kullanılır.
    • Programlar, seed’ler invoke_signedopen in new window ile kendi PDA'ları için imzalama yapabilir.
    • Bir PDA yalnızca türetildiği program tarafından imzalanabilir.
    • Programların farklı talimatları imzalamasına izin vermenin yanı sıra, PDA'lar ayrıca Account'ları indekslemek için hashmap benzeri bir arayüz sağlar.

    Deep Dive (Derinlemesine Bakış)

    PDA'lar, Solana'da programlar geliştirmek için temel bir yapı taşıdır. PDA'lar sayesinde programlar, hiçbir harici kullanıcının aynı Account için geçerli bir imza oluşturamayacağını garanti ederken Account’ları imzalayabilir. Hesapları imzalamaya ek olarak, belirli programlar kendi PDA'larında tutulan account'ları da değiştirebilir.

    Accounts matrix

    Image courtesy of Pencilflip

    Generating PDAs (PDA’lar Oluşturma)

    PDA'ların arkasındaki kavramı anlamak için, PDA'ların teknik olarak yaratılmadığını, daha çok bulunduğunu düşünmek faydalı olabilir. PDA'lar, seed ("vote_account" string’i gibi) ve bir program kimliği kombinasyonundan oluşturulur. Bu seed ve program kimliği kombinasyonu daha sonra, ed25519 eliptik eğri üzerinde yer alan bir public key oluşturup oluşturmadıklarını görmek için bir sha256 hash fonksiyonu aracılığıyla çalıştırılır.

    Program kimliğimizi ve seed’leri bir hash fonksiyonu aracılığıyla çalıştırırken, eliptik eğri üzerinde yer alan geçerli bir public key ile karşılaşma şansımız ~%50'dir. Bu durumda, girdimizi biraz geçiştirmek için bir şeyler ekleriz ve tekrar deneriz. Bu fudge faktör için teknik terim bump’tır. Solana'da, bump = 255 ile başlıyoruz ve eliptik eğride olmayan bir adres elde edene kadar, bump = 254, bump = 253, vb. ile aşağı doğru yineliyoruz. Bu ilkel görünebilir, ancak bir kez bulunduğunda bize aynı PDA'yı tekrar tekrar türetmenin deterministik bir yolunu sunar.

    PDA Curve

    Interacting with PDAs (PDA’lar ile Etkileşim)

    Bir PDA oluşturulduğunda, findProgramAddress hem adresi hem de adresi eliptik eğriden çıkarmak için kullanılan bump’ı döndürür. Bu bump ile donanmış bir program, daha sonra PDA'sını gerektiren herhangi bir talimat için imzalayabilir. İmzalamak için, programların talimatı, account listesini ve PDA'yı invoke_signed olarak türetmek için kullanılan seed ve bump’ı geçmesi gerekir. Talimatları imzalamaya ek olarak, PDA'lar invoke_signed aracılığıyla kendi yaratımları için de imzalamalıdır.

    PDA'larla oluştururken, bump seed account verilerinin kendisinde saklamak yaygındır. Bu, geliştiricilerin, bir talimat argümanı olarak bump’tan geçmek zorunda kalmadan bir PDA'yı kolayca doğrulamasını sağlar.

    Other Resources (Diğer Kaynaklar)

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/core-concepts/programs.html b/docs/.vuepress/dist/tr/core-concepts/programs.html index 22dcd5005..6315ccc2d 100644 --- a/docs/.vuepress/dist/tr/core-concepts/programs.html +++ b/docs/.vuepress/dist/tr/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programs (Programlar) | Solana Cookbook - +

    Programs (Programlar)

    Facts (Özet Bilgiler)

    Bilgi Tablosu

    • Programlar, hem son kullanıcılardan hem de diğer programlardan gelen talimatları işler.
    • Tüm programlar stateless’dır(durumsuzdur): etkileşime girdikleri tüm veriler, talimatlar yoluyla iletilen ayrı account'larda saklanır.
    • Programlar executable (yürütülebilir) olarak işaretlenmiş account'larda saklanır.
    • Tüm programlar BPF Loaderopen in new window'a aittir ve Solana Runtimeopen in new window tarafından yürütülür.
    • Geliştiriciler en yaygın olarak Rust veya C++'da programlar yazarlar, ancak LLVMopen in new window'nin BPFopen in new window arka ucunu hedefleyen herhangi bir dili seçebilirler.
    • Tüm programların, talimat işlemenin gerçekleştiği tek bir giriş noktası vardır. (process_instruction); parametreler her zaman şunları içerir:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Deep Dive (Derinlemesine Bakış)

    Diğer birçok blockchainden farklı olarak Solana, kodu verilerden tamamen ayırır. Programların etkileşimde bulunduğu tüm veriler ayrı account'larda saklanır ve talimatlar aracılığıyla referans olarak iletilir. Bu model, tek bir genel programın ek dağıtımlar gerektirmeden çeşitli account'larda çalışmasına izin verir. Bu kalıbın yaygın örnekleri, Native(yerel) ve SPL Programlarında görülür.

    Native Program’lar & Solana Program Library (SPL)

    Solana, on-chain etkileşimler için temel yapı taşları olarak hizmet eden bir dizi programla donatılmış olarak gelir. Bu programlar Native Programlar ve Solana Program Library (SPL) Programları olarak ikiye ayrılır.

    Native Program’lar, validator’leri çalıştırmak için gereken temel işlevleri sağlar. Bu programlar arasında en çok bilineni, yeni account’ların yönetilmesinden ve iki taraf arasında SOL transferinden sorumlu olan Sistem Programıdır.

    SPL Programları, token oluşturma, takas etme ve ödünç vermenin yanı sıra stake pool (hisse havuzu) oluşturma ve on-chain name service dahil olmak üzere bir dizi on-chain etkinliği destekler. SPL Token Programı doğrudan CLI aracılığıyla çağrılabilirken, Associated Token Account Programopen in new window gibi diğerleri genellikle özel programlardan oluşur.

    Writing Programs (Program Yazma)

    Programlar en yaygın olarak Rust veya C++ ile geliştirilir, ancak LLVM'nin BPF arka ucunu hedefleyen herhangi bir dille geliştirilebilir. Neon Labsopen in new window ve Solangopen in new window'ın son girişimleri, EVMopen in new window uyumluluğunu mümkün kılar ve geliştiricilerin Solidity'de programlar yazmasına olanak tanır.

    Rust tabanlı programların çoğu aşağıdaki mimariye uyar:

    DosyaAçıklama
    lib.rsModüllerin kaydedilmesi
    entrypoint.rsPrograma başlangıç
    instruction.rsProgram API'si, komut verilerini (de)serialize etme
    processor.rsProgram mantığının bulunduğu bölüm
    state.rsProgram nesneleri, durumu (de) serialize etme
    error.rsPrograma özgü hatalar

    Son zamanlarda, Anchoropen in new window program geliştirmek için popüler bir framework olarak ortaya çıkmıştır. Anchor, Ruby on Rails'e benzeyen, Rust tabanlı geliştirme için (de)serialization sürecini kolaylaştıran, üzerinde düşünülmüş bir frameworktür.

    Programlar genellikle Testnet veya Mainnet'e dağıtılmadan önce Localhost ve Devnet geliştirilir ve test edilir. Solana aşağıdaki ortamları destekler:

    Cluster EnvironmenRPC Connection URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostDefault port: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Bir ortamda deploy edildikten sonra Client’lar ilgili cluster'la olan RPC bağlantılarıopen in new window aracılığıyla on-chain programlarla etkileşime girebilir.

    Deploying Programs (Programları Çalıştırma)

    Geliştiriciler programlarını CLIopen in new window aracılığıyla çalıştırabilir:

    solana program deploy <PROGRAM_FILEPATH>
     

    Bir program çalıştığında, bir ELFopen in new window shared object’e (BPF bayt kodu içeren) derlenir ve Solana cluster’a yüklenir. Programlar account’larda yaşar (Solana'daki diğer her şey gibi), ancak bu account'lar executable olarak işaretlenir ve BPF Loader’a atanır. Bu account’ın adresi program_id olarak adlandırılır ve gelecekteki tüm işlemlerde programa başvurmak için kullanılır.

    Solana, Upgradable BPF Loader da dahil olmak üzere birden fazla BPF Loader’ı destekler. BPF Loader, programın account’ını yönetmekten ve program_id aracılığıyla client’lara (client’lara) sunmaktan sorumludur. Tüm programlarda instruction işlemenin gerçekleştiği tek bir giriş noktası vardır (proses_instruction) ve parametreler her zaman şunları içerir:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Çağrıldıklarında programlar Solana Runtime tarafından yürütülür.

    Other Resources (Diğer Kaynaklar)

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/core-concepts/transactions.html b/docs/.vuepress/dist/tr/core-concepts/transactions.html index 27e66c113..4d5dc0a37 100644 --- a/docs/.vuepress/dist/tr/core-concepts/transactions.html +++ b/docs/.vuepress/dist/tr/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions (İşlemler) | Solana Cookbook - +

    Transactions (İşlemler)

    Client’lar, bir cluster’a bir transaction (işlem) göndererek programları çağırabilir. Tek bir işlem, her biri kendi programını hedefleyen birden fazla talimat içerebilir. Bir işlem gönderildiğinde, Solana Runtimeopen in new window talimatlarını sırayla ve atomik olarak işleyecektir. Bir talimatın herhangi bir kısmı başarısız olursa, tüm işlem başarısız olur.

    Facts (Özet Bilgiler)

    Bilgi Tablosu

    • Instruction’lar(talimatlar) Solana'daki en temel operasyonel birimdir.
    • Her instruction şunları içerir:
      • Amaçlanan programın program_id'si
      • Okumak veya yazmak istediği tüm account’ların array’i
      • Amaçlanan programa özel bir instruction_data byte array’i
    • Birden fazla talimat tek bir transaction’da(işlemde) toplanabilir.
    • Her işlem şunları içerir:
      • Okumak veya yazmak istediği tüm account’ların array’i
      • Bir veya daha fazla instruction
      • Yakın zamanda bir blockhash
      • Bir veya daha fazla signature(imza)
    • Instruction’lar sırayla ve atomik olarak işlenir.
    • Bir instruction’ın herhangi bir kısmı başarısız olursa, transaction’ın tamamı başarısız olur.
    • Transaction’lar 1232 bayt ile sınırlıdır.

    Deep Dive (Derinlemesine Bakış)

    Solana Runtime, okumak veya yazmak istedikleri tüm account’ların bir listesini belirtmek için hem instructions hem de transactions gerektirir. Bu account’ları önceden talep ederek, çalışma zamanı tüm transaction’larda yürütmeyi paralel hale getirebilir.

    Bir transaction bir kümeye gönderildiğinde, çalışma zamanı instruction’larını sırayla ve atomik olarak işleyecektir. Her talimat için, alıcı program kendi veri dizisini yorumlayacak ve belirtilen account’ları üzerinde çalışacaktır. Program ya başarılı bir şekilde ya da bir hata koduyla dönecektir. Bir hata döndürülürse, tüm işlem hemen başarısız olur.

    Bir account’ı borçlandırmayı veya verilerini değiştirmeyi amaçlayan herhangi bir transaction, account sahibinin imzasını gerektirir. Değiştirilecek herhangi bir account writable(yazılabilir) olarak işaretlenir. Transaction ücretini ödeyen kişi, gerekli rent ve transaction ücretlerini karşıladığı sürece, sahibinin izni olmadan bir account’a kredi verilebilir.

    Gönderilmeden önce, tüm transaction’lar son bir blockhash’e referans vermelidir. Blockhash, tekrarları önlemek ve eski transaction’ları ortadan kaldırmak için kullanılır. Bir işlemin blockhash’inin maksimum yaşı 150 blok veya bu yazının yazıldığı zaman itibariyle yaklaşık ~1 dakika 19 saniyedir.

    Fees (Ücretler)

    Solana ağı iki tür ücret toplar:

    Solana'da işlem ücretleri belirlidir: Kullanıcıların bir sonraki bloğa dahil olma şanslarını artırmak için daha yüksek ücretler ödeyebilecekleri bir ücret piyasası kavramı yoktur. Bu yazının yazıldığı tarihte, işlem ücretleri kullanılan kaynak miktarına göre değil, yalnızca gereken imza sayısına (lamports_per_signature) göre belirlenir. Bunun nedeni, şu anda tüm işlemlerde 1232 baytlık bir sabit sınır bulunmasıdır.

    Tüm işlemler, işlemi imzalamak için en az bir writable account(yazılabilir hesap) gerektirir. Gönderildikten sonra, ilk olarak seri hale getirilen writable signer account ücreti ödeyen kişi olacaktır. Bu account, işlemin başarılı veya başarısız olmasına bakılmaksızın işlem maliyetini ödeyecektir. Ücret ödeyen kişinin işlem ücretini ödemek için yeterli bakiyesi yoksa işlem düşer.

    Bu yazının yazıldığı sırada, tüm işlem ücretlerinin %50'si bloğu üreten validator(doğrulayıcı) tarafından alınırken, kalan %50'si yakılır(burn). Bu yapı, validator’leri leader programı sırasında mümkün olduğunca çok işlemi işlemeye teşvik etmek için çalışır.

    Other Resources (Diğer Kaynaklar)

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/getting-started/installation.html b/docs/.vuepress/dist/tr/getting-started/installation.html index 46640a64e..7da050dc7 100644 --- a/docs/.vuepress/dist/tr/getting-started/installation.html +++ b/docs/.vuepress/dist/tr/getting-started/installation.html @@ -23,12 +23,12 @@ } Installation | Solana Cookbook - + -

    Install Web3.js (Web3.js Kurulumu)

    Solana'da Javascript veya TypeScript kullanmaya başlamak için birkaç kütüphane bulunur.

    Web3.js

    @solana/web3.jsopen in new window etkileşim kurmak, işlem göndermek ve blok zincirinden bilgi okumak için birçok temel Solana aracına sahip bir kütüphanedir.

    Aşağıdaki kod satırı ile bu kütüphaneyi kurabilirsiniz:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Install Web3.js (Web3.js Kurulumu)

    Solana'da Javascript veya TypeScript kullanmaya başlamak için birkaç kütüphane bulunur.

    Web3.js

    @solana/web3.jsopen in new window etkileşim kurmak, işlem göndermek ve blok zincirinden bilgi okumak için birçok temel Solana aracına sahip bir kütüphanedir.

    Aşağıdaki kod satırı ile bu kütüphaneyi kurabilirsiniz:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Build From Source (Kaynaktan Derleme)

    Önceden oluşturulmuş binary dosyalarını kullanamıyorsanız veya kaynaktan kendiniz oluşturmayı tercih ediyorsanız, https://github.com/solana-labs/solana/releases/latestopen in new window adresine gidin ve kaynak kodu arşivini indirin. Kodu ayıklayın ve binary dosyaları şununla oluşturun:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Daha sonra, önceden oluşturulmuş binary dosyalarla aynı sonucu elde etmek için aşağıdaki komutu çalıştırabilirsiniz:

    solana-install init
    -
    Last Updated:
    Contributors: Jacob Creech, rbeyzas
    - +
    Last Updated:
    Contributors: Jacob Creech, Steven Luscher, rbeyzas
    + diff --git a/docs/.vuepress/dist/tr/guides/account-maps.html b/docs/.vuepress/dist/tr/guides/account-maps.html index 820abfd10..4b6b333e1 100644 --- a/docs/.vuepress/dist/tr/guides/account-maps.html +++ b/docs/.vuepress/dist/tr/guides/account-maps.html @@ -23,7 +23,7 @@ } Account Maps (Hesap Haritaları) | Solana Cookbook - + @@ -260,6 +260,6 @@ tx.add(insertCAIx);
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/guides/data-migration.html b/docs/.vuepress/dist/tr/guides/data-migration.html index 5e53c6213..8ba2eb92a 100644 --- a/docs/.vuepress/dist/tr/guides/data-migration.html +++ b/docs/.vuepress/dist/tr/guides/data-migration.html @@ -23,7 +23,7 @@ } Migrating a Programs Data Accounts (Programların Data Account’larını Taşıma) | Solana Cookbook - + @@ -93,6 +93,6 @@ } }

    Bir talimat oluşturup gönderdikten sonra: VersionProgramInstruction::SetString(String) artık aşağıdaki 'yükseltilmiş' account veri düzenine sahibiz.

    Program Account v2

    Resources

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/guides/debugging-solana-programs.html b/docs/.vuepress/dist/tr/guides/debugging-solana-programs.html index 9b70acfe7..23f6c2f2b 100644 --- a/docs/.vuepress/dist/tr/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/tr/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Debugging Solana Programs (Solana Programlarında Hata Ayıklama) | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Burada hata ayıklama, test gövdesinde kullanılan işlevler ve yöntemlerde hata ayıklamanıza izin verir ancak programınızda kesme noktası oluşturmaz.

    Mükemmel değil mi?

    Local Validator Node Testing from Client Apps (Client Uygulamalarında Yerel Validator Node Testi)

    Son olarak, yerel bir validator node’u başlatabilir ve komut satırından solana-test-validator kullanarak programınızı ve tüm account'larınızı yükleyebilirsiniz.

    Bu yaklaşımda, ya Rust RcpClient kullanan ya da JavaScript veya TypeScript client'larında bir client uygulamasına ihtiyacınız olacak.

    Daha fazla ayrıntı ve seçenek için solana-test-validator --help bölümüne JavaScript veya Typescript clients’larına bakın. Örnek program için kurulum burada:

    1. Repo klasöründe bir terminal açın
    2. Yapılandırmayı yerele işaret edecek şekilde ayarlamak için solana config set -ul komutunu çalıştırın
    3. solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so'yu çalıştırın
    4. Başka bir terminal açın ve günlük aktarıcıyı başlatmak için solana logs’u çalıştırın
    5. Daha sonra client programınızı çalıştırabilir ve günlük aktarıcıyı başlattığınız terminalde program çıktısını gözlemleyebilirsiniz.

    Resources

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/guides/feature-parity-testing.html b/docs/.vuepress/dist/tr/guides/feature-parity-testing.html index 0bee8edae..a446aae8a 100644 --- a/docs/.vuepress/dist/tr/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/tr/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Feature Parity Testing (Özellik Parite Testi) | Solana Cookbook - + @@ -182,6 +182,6 @@ assert!(txn.is_ok()); }

    Mutlu Testler!

    Resources

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/guides/get-program-accounts.html b/docs/.vuepress/dist/tr/guides/get-program-accounts.html index 8c0f8696d..e1f99e660 100644 --- a/docs/.vuepress/dist/tr/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/tr/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Get Program Accounts | Solana Cookbook - + @@ -152,6 +152,6 @@ */ })();

    Üç parametrenin tümünü (dataSlice, dataSize, ve memcmp) birleştirerek sorgumuzun kapsamını sınırlayabilir ve yalnızca ilgilendiğimiz verileri verimli bir şekilde döndürebiliriz.

    Other Resources

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/guides/serialization.html b/docs/.vuepress/dist/tr/guides/serialization.html index c84592a3b..b8d1af0ff 100644 --- a/docs/.vuepress/dist/tr/guides/serialization.html +++ b/docs/.vuepress/dist/tr/guides/serialization.html @@ -23,7 +23,7 @@ } Serializing Data (Serileştirme) | Solana Cookbook - + @@ -653,6 +653,6 @@ // Test without PublicKey entry();

    Resources

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/index.html b/docs/.vuepress/dist/tr/index.html index 93fcf0bcd..0f194e2dc 100644 --- a/docs/.vuepress/dist/tr/index.html +++ b/docs/.vuepress/dist/tr/index.html @@ -23,11 +23,11 @@ } Solana Cookbook | Solana Cookbook - +

    Solana Cookbook

    Solana Cookbook, Solana'da uygulamalar oluşturmak için temel kavramları ve referansları sağlayan bir geliştirici kaynağıdır. Her kavram ve referans, ek ayrıntılar ve kullanım örnekleri sağlarken Solana kullanarak geliştirme yapmanın belirli yönlerine odaklanacaktır.

    Contributing (Nasıl Katkı Verebilirsiniz?)

    Solana Cookbook, yeni Solana geliştiricilerinin katkıda bulunmasını kolaylaştıracak şekilde tasarlanmıştır. Bir şeyi nasıl yapacağınızı bilmiyor olsanız bile, Solana Cookbook’a katkıda bulunmak öğrenmenin harika bir yoludur!

    Tüm açık konulara buradanopen in new window göz atabilir, katkı yönergelerine buradanopen in new window ulaşabilirsiniz. Solana Cookbook’da bir önerinin eksik olduğunu fark ederseniz, lütfen yeni bir issue oluşturun.

    How to Read the Cookbook (Cookbook Nasıl Okunur?)

    Solana Cookbook, her biri farklı bir amaca yönelik farklı bölümlere ayrılmıştır.

    BölümAçıklama
    Temel KavramlarSolana’da geliştirme yapmak için bilinmesi tavsiye edilen Solana yapı taşları
    RehberGeliştirme yapmak için çeşitli araçlar hakkında hap bilgileri içeren kılavuzlar
    ReferanslarYaygın olarak ihtiyaç duyulan kod parçaları için referanslar
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/accounts.html b/docs/.vuepress/dist/tr/references/accounts.html index adf639aae..84c181daf 100644 --- a/docs/.vuepress/dist/tr/references/accounts.html +++ b/docs/.vuepress/dist/tr/references/accounts.html @@ -23,7 +23,7 @@ } Accounts (Account’lar) | Solana Cookbook - + @@ -269,6 +269,6 @@

    How to get account balance (Account bakiyesi getirme)

    console.log(`${(await connection.getBalance(wallet)) / LAMPORTS_PER_SOL} SOL`);
     
     

    İPUCU

    Bir token bakiyesi almak istiyorsanız, token account'ının adresini bilmeniz gerekir. Daha fazla bilgi için bkz. Token Referansları

    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/basic-transactions.html b/docs/.vuepress/dist/tr/references/basic-transactions.html index e934ba456..a03cafa08 100644 --- a/docs/.vuepress/dist/tr/references/basic-transactions.html +++ b/docs/.vuepress/dist/tr/references/basic-transactions.html @@ -23,7 +23,7 @@ } Sending Transactions(İşlem Gönderimi) | Solana Cookbook - + @@ -111,6 +111,6 @@ [ 4] Program ComputeBudget111111111111111111111111111111 invoke [1] [ 5] Program ComputeBudget111111111111111111111111111111 success
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/keypairs-and-wallets.html b/docs/.vuepress/dist/tr/references/keypairs-and-wallets.html index 3ec731c84..b7a0ff544 100644 --- a/docs/.vuepress/dist/tr/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/tr/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Keypairs and Wallets | Solana Cookbook - + @@ -109,7 +109,7 @@ <template> <wallet-multi-button></wallet-multi-button> </template> -

    Svelte

    Gerekli bağımlılıkları yüklemek için aşağıdaki komutu çalıştırın:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Gerekli bağımlılıkları yüklemek için aşağıdaki komutu çalıştırın:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new window paketi, Svelte Template veya SvelteKit ile yapılan bir proje içindeki tüm JS, TS ve/veya Svelte dosyaları arasında erişilebilir bir Svelte Mağazası ($walletStore) eklemeye olanak tanır. Buradaopen in new windowki repo referansını kullanarak adaptörü SSR veya SPA için kullanabilirsiniz. Kullanıcı arabirimi paketi, kullanıcıların kendisine bağlanacak bir cüzdan seçmesine olanak tanıyan bir <WalletMultiButton /> bileşeni içerir.

    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import { WalletMultiButton } from "@svelte-on-solana/wallet-adapter-ui";
    @@ -119,7 +119,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: rbeyzas
    - +
    Last Updated:
    Contributors: Steven Luscher, rbeyzas
    + diff --git a/docs/.vuepress/dist/tr/references/local-development.html b/docs/.vuepress/dist/tr/references/local-development.html index ca2210ae0..eccd26f4e 100644 --- a/docs/.vuepress/dist/tr/references/local-development.html +++ b/docs/.vuepress/dist/tr/references/local-development.html @@ -23,7 +23,7 @@ } Local Development (Yerel Geliştirme) | Solana Cookbook - + @@ -59,6 +59,6 @@

    Yerel ağınıza yükleme, doğrulayıcıyı başlatırken programın dosya ve hedef adresini (yerel kümede) ileterek yapılır:

    solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
     
     
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/name-service.html b/docs/.vuepress/dist/tr/references/name-service.html index ba9092fbc..a407808cc 100644 --- a/docs/.vuepress/dist/tr/references/name-service.html +++ b/docs/.vuepress/dist/tr/references/name-service.html @@ -23,7 +23,7 @@ } Name Service (Name Servisi) | Solana Cookbook - + @@ -120,6 +120,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: GGULBAE, rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/nfts.html b/docs/.vuepress/dist/tr/references/nfts.html index 6a1422e49..00c694621 100644 --- a/docs/.vuepress/dist/tr/references/nfts.html +++ b/docs/.vuepress/dist/tr/references/nfts.html @@ -23,7 +23,7 @@ } Non Fungible Tokens (NFTs) | Solana Cookbook - + @@ -135,6 +135,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/offline-transactions.html b/docs/.vuepress/dist/tr/references/offline-transactions.html index ede4cf229..b6277ebe0 100644 --- a/docs/.vuepress/dist/tr/references/offline-transactions.html +++ b/docs/.vuepress/dist/tr/references/offline-transactions.html @@ -23,7 +23,7 @@ } Offline Transaction (Çevrimdışı işlem) | Solana Cookbook - + @@ -128,6 +128,6 @@ console.log(`txhash: ${await connection.sendRawTransaction(tx.serialize())}`);
    Last Updated:
    Contributors: Steven Luscher, rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/programs.html b/docs/.vuepress/dist/tr/references/programs.html index 15a2aedac..289ef66e6 100644 --- a/docs/.vuepress/dist/tr/references/programs.html +++ b/docs/.vuepress/dist/tr/references/programs.html @@ -23,7 +23,7 @@ } Writing Programs (Programları Yazma) | Solana Cookbook - + @@ -430,6 +430,6 @@ }
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/staking.html b/docs/.vuepress/dist/tr/references/staking.html index 27942315b..be187f174 100644 --- a/docs/.vuepress/dist/tr/references/staking.html +++ b/docs/.vuepress/dist/tr/references/staking.html @@ -23,7 +23,7 @@ } Staking (Stake Etme) | Solana Cookbook - + @@ -197,6 +197,6 @@ console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: rbeyzas
    - + diff --git a/docs/.vuepress/dist/tr/references/token.html b/docs/.vuepress/dist/tr/references/token.html index d69161e08..c3ca96213 100644 --- a/docs/.vuepress/dist/tr/references/token.html +++ b/docs/.vuepress/dist/tr/references/token.html @@ -23,7 +23,7 @@ } Interacting with Tokens (Token’lar ile Etkileşim) | Solana Cookbook - + @@ -322,6 +322,6 @@ mint: mint, });
    Last Updated:
    Contributors: Shaivik Semwal, rbeyzas
    - + diff --git a/docs/.vuepress/dist/vi/core-concepts/accounts.html b/docs/.vuepress/dist/vi/core-concepts/accounts.html index 0cb1f9db2..588fc86e1 100644 --- a/docs/.vuepress/dist/vi/core-concepts/accounts.html +++ b/docs/.vuepress/dist/vi/core-concepts/accounts.html @@ -23,11 +23,11 @@ } Accounts | Toàn tập Solana - +

    Account

    Account trong lập trình Solana được hiểu như một vùng nhớ để lưu dữ liệu. Chúng là một khối cơ sở trong quá trình phát triển ứng dụng trên Solana.

    Có thể bạn chưa biết

    Những điều có thể bạn chưa biết

    • Account đươc dùng để lưu trữ dữ liệu
    • Mỗi Account sẽ có một địa chỉ duy nhất
    • Account có kích thước tối đa là 10MB (10 Mega Bytes)
    • PDA Account có kích thước tối đa là 10KB (10 Kilo Bytes)
    • PDA Account có thể dùng để ký đại diện cho một program
    • Kích thước Account được cố định tại thời điểm khởi tạo, nhưng vẫn có thể điều chỉnh bằng reallocopen in new window
    • Vùng nhớ dữ liệu được cấp phát cho Account phải được thuê bằng cách trả phí
    • Account owner trong trường hợp mặc định sẽ là System Program

    Chi tiết

    Cấu trúc Account

    Có 3 kiểu Account trên Solana:

    • Data Accounts dùng để lưu trữ dữ liệu
    • Program Accounts dùng để lưu chương trình thực thi
    • Native Accounts ám chỉ native programs trên Solana như là System, Stake, và Vote

    Kiểu Data Account lại có 2 kiểu con:

    • Account được sở hữu bởi System
    • PDA (Program Derived Address) Accounts

    Mỗi Account lại có một địa chỉ (thường là public key - khoá công khai) và một owner (địa chỉ của một Program Account). Đầy đủ các trường của một Account được trình bày ở bảng dưới.

    TrườngMô tả
    lamportsSố lượng lamports thuộc sở hữu bởi Account đó
    ownerĐịa chỉ Program Account đang kiếm soát Account đó
    executableAccount này có thể thực thi các instructions hay không?
    dataDữ liệu thô dưới dạng các bytes được lưu trữ trong Account
    rent_epochKỳ hạn thuê vùng nhớ tiếp theo cho Account

    Có một vài quy tắc quan trọng về quyền sở hữu:

    • Chỉ owner mới được chỉnh sửa cũng như rút số lamports từ một Data Account
    • Bất kỳ ai cũng được phép nạp lamports vào một Data Account
    • Owner của một Account có thể được gán cho một owner mới khi và chỉ khi vùng nhớ của Account đó được hoàn trả

    Program Accounts không được lưu state.

    Ví dụ, nếu bạn có một chương trình đếm trên một Program Account và cho phép tăng bộ đếm lên sau mỗi lần tương tác, bạn phải tạo tối thiểu 2 Account. Trong đó, một cho Program Account để lưu code thực thi, và một cho Data Account để lưu dữ liệu bộ đếm.

    Để tránh việc một Account bị xoá, bạn phải trả chi phí để thuê vùng nhớ cho Account đó.

    Thuê

    Lưu trữ dữ liệu vào Account và duy trì Account đó sẽ phát sinh chi phí SOL. Chi phí này được gọi là chi phí thuê. Nếu chi phí thuê được duy trì ở mức tối thiểu là 2 năm cho Account đó, thì bạn sẽ được miễn phí lưu trữ. Bạn cũng có thể thu hồi lại phí cọc bằng cách đóng Account. Số lamports cọc sẽ được hoàn trả về địa chỉ ví của bạn.

    Chi phí thuê được tính toán và chi trả ở 2 thời điểm khác nhau:

    1. Khi có bất kỳ giao dịch nào có tham chiếu đến Account đó.
    2. Định kỳ mỗi epoch.

    Một phần của chi phí thuê thu được sẽ được tiêu huỷ, trong khi phần còn lại sẽ được phân chia cho các Vote Account sau mỗi slot.

    Nếu một Account không đủ cọc để chi trả phí thuê, Account đó sẽ bị thu hồi và toàn bộ dữ liệu sẽ bị xoá.

    Các nguồn tài liệu khác

    Lời cảm ơn

    Khái niệm căn bản này được đóng góp của Pencilflip. Theo dõi anh ấy trên Twitteropen in new window.

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/core-concepts/pdas.html b/docs/.vuepress/dist/vi/core-concepts/pdas.html index 2ab0956dd..416d7df64 100644 --- a/docs/.vuepress/dist/vi/core-concepts/pdas.html +++ b/docs/.vuepress/dist/vi/core-concepts/pdas.html @@ -23,11 +23,11 @@ } Program Derived Addresses (PDAs) | Toàn tập Solana - +

    Program Derived Addresses (PDAs)

    Program Derived Addresses (hay còn gọi vắn tắt là PDA) là những Account được thiết kế cho các Program có thể kiểm soát. Với PDA, Program có thể lập trình được chữ ký cho một số địa chỉ cụ thể mà không cần khoá riêng tư - private key. PDA là cơ sở để hiện thực Cross-Program Invocationopen in new window, trong đó Solana cho phép các Program có thể tương tác cũng như kết hợp với nhau để tạo nên một hệ thống phức tạp hơn.

    Có thể bạn chưa biết

    Những điều có thể bạn chưa biết

    • PDA là một chuỗi 32 byte tương tự khoá công khai - public keys, nhưng lại không tồn tại khoá riêng tư tương ứng
    • findProgramAddress được dùng để suy ra một PDA từ thông tin program_idseeds (một tập hợp các bytes)
    • Một bump (có giá trị 1 byte) được dùng để tạo ra một PDA khả dĩ nằm ngoài đường cong ellipitic ed25519.
    • Program có thể tạo ra chữ ký cho PDA bằng cách cung cấp seedsbump cho hàm invoke_signedopen in new window
    • Một PDA chỉ có thể được ký bởi Program mà nó được suy ra.
    • Ngoài việc cho phép Program có thể ký lên các instruction, PDA cũng cung cấp một interface giống với hashmap dành cho việc đánh chỉ số Account

    Chi tiết

    PDA là một khối cơ sở cho việc lập trình trên Solana. Với PDA, Program có thể ký cho nhiều Account trong khi đảm bảo rằng không tồn tại người dùng nào có thể giả mạo chữ ký cho cùng Account đó. Ngoài việc tạo ra chữ ký, Program cũng có thể chỉnh sửa Account được sở hữu bởi PDA của nó.

    Accounts matrix

    Hình ảnh được cho phép bời Pencilflip

    Cách sinh PDA

    Để hiểu được khái niệm đằng sau PDA, là cần thiết để làm rõ rằng PDA không phải được "tạo ra" mà là "tìm ra". PDA được sinh ra từ quá trình kết hợp giữa seeds (ví dụ như chuỗi ký tự “vote_account”) và program_id. Việc kết hợp này được cho qua một hàm băm - sha256 - để thử xem giá trị tạo ra có phải là một khoá công khai nằm ngoài đường cong ellipitic ed25519 hay không.

    Quá trình thử này sẽ có xác suất 50/50. Nghĩa là sẽ có 50% cơ hội quá trình sinh ra một khoá công khai nằm trên đường cong ellipitic ed25519. Trong trường hợp đó, chúng ta đơn giản chỉ cần thêm một vài bit vào đầu vào để thử lại. Những bit được thêm vào trong thuật ngữ kỹ thuật được gọi là bump. Trong Solana, chúng ta bắt đầu với bump = 255 và tiếp tục giảm xuống 254, 253 cứ thể cho đến khi tìm được địa chỉ PDA không nằm trên đường cong ellipitic. Việc này có vẻ thô sơ, nhưng thực ra nó lại cho chúng ta một phương pháp bất biến để suy ra PDA cho các lần thử khác nhau, miễn là cùng một giá trị đầu vào.

    PDA on the ellipitic curve

    Tương tác với PDAs

    Khi một PDA được sinh ra, findProgramAddress sẽ trả về hai giá trị là địa chỉ của PDA và bump dùng để đảm bảo PDA này ngoài đường cong ellipitic. Với giá trị bump này, Program có thể ký lên bất kỳ instruction nào có chứa PDA của nó về sau. Để ký, Program phải truyền cho instruction một danh sách các Account, các seedsbump dùng để suy ra PDA vào hàm invoke_signed. Ngoài việc ký lên instruction, PDA còn ký cho việc tạo ra chính bản thân nó thông qua hàm invoke_signed.

    Khi phát triển ứng dụng với PDA, thường thì bạn sẽ phải lưu bumpopen in new window trong dữ liệu Account. Điều này cho phép lập trình viên có thể kiểm tra PDA mà không cần truyền bump vào dữ liệu đầu vào của instruction.

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/core-concepts/programs.html b/docs/.vuepress/dist/vi/core-concepts/programs.html index e763b37b6..d08c9864d 100644 --- a/docs/.vuepress/dist/vi/core-concepts/programs.html +++ b/docs/.vuepress/dist/vi/core-concepts/programs.html @@ -23,12 +23,12 @@ } Programs | Toàn tập Solana - +

    Program

    Bất kỳ lập trình viên nào đều có thể viết và triển khai một chương trình trên Solana. Program (hay được biết đến với tên gọi là Smart Contract trên các blockchain khác) sẽ là nền tảng cho các hoạt động on-chain; thứ giúp tạo nên đa số các hình thái từ DeFi, NFTs cho đến Mạng xã hội và Trò chơi.

    Có thể bạn chưa biết

    Những điều có thể bạn chưa biết

    • Program sẽ xử lý các instruction từ người dùng và các Program khác
    • Tất cả các Program đều là stateless: mọi dữ liệu mà Program tương tác đều được lưu trên những Account tách biệt và được lan truyền thông qua các instruction
    • Bản thân Program được lưu bên trong những Account được đánh dấu là executable
    • Tất cả Program được sở hữu bởi BPF Loaderopen in new window và được thực thi bởi Solana Runtimeopen in new window
    • Hầu hết các lập trình viên đều phát triển Program bằng Rust hoặc C++, nhưng bạn vẫn có thể lựa chọn bất kỳ ngôn ngữ lập trình mà có hỗ trợ BPFopen in new window của LLVMopen in new window
    • Mọi Program chỉ có duy nhất một điểm truy cập, nơi mà các instruction được xử lý (cụ thể là process_instruction); các tham số đầu vào luôn bao gồm:
      • program_id: pubkey
      • accounts: array,
      • instruction_data: byte array

    Chi tiết

    Không giống như hấu hết các blockchain khác, Solana tách bạch giữa code và dữ liệu. Tất cả dữ liệu mà chương trình cần tương tác sẽ được lưu ở các Account tách biệt và được lan truyền thông dưới dạng tham chiếu thông qua các instruction. Mô hình này cho phép một chương trình chung có thể hoạt động trên nhiều kiểu Account khác nhau mà không cần tái cơ cấu lại chương trình. Một ví dụ hay gặp của mô hình này là Native Programs và SPL Programs.

    Native Programs & Solana Program Library (SPL) Programs

    Solana được trang bị sẵn một số Program nền tảng và được dùng để xây dựng các tương tác on-chain. Những Program này thường được chia thành Native Programsopen in new windowSolana Program Library (SPL) Programsopen in new window.

    Native Programs cung cấp các chức năng cơ sở và cần thiết để vận hành các validators. Trong các Program này, chương trình được biết đến rộng rãi nhất là System Programopen in new window. System Program chịu trách nhiệm cho việc cấp phát Account mới, cũng như chuyển SOL giữa các Account khác nhau.

    SPL Programs hỗ trợ một số các hoạt động on-chain bao gồm tạo tokens, trao đổi tokens, cho vay tokens, cũng như tạo stake pools, và duy trì name service. SPL Token Programopen in new window có thể được gọi trực tiếp thông qua Solana CLI, hoặc bằng cách khác hơn như là Associated Token Account Programopen in new window. Associated Token Account Program thường được kết hợp với các chương trình tuỳ chỉnh để gọi đến SPL Token Program hơn là gọi độc lập.

    Viết một Program

    Program hầu như được phát triển dựa trên Rust hoặc C++. Tuy nhiên bạn vẫn có thể phát triển bằng bất kỳ ngôn ngữ nào miễn là hỗ trợ BPF của LLVM. Hiện tại, lập trình viên cũng có thể chuyển đổi smart contract trên EVM được viết bằng Solidity thông qua dự án được khởi xướng bởi Neon Labsopen in new windowSolangopen in new window.

    Đa số các Program dự trên Rust đều bám sát kiến trúc sau:

    TệpMô tả
    lib.rsĐăng ký các modules
    entrypoint.rsĐiểm truy cập của Program
    instruction.rsProgram API, tuần tự và phi tuần tự hoá dữ liệu đầu vào
    processor.rsLogic của Program
    state.rsCác đối tượng của Program, tuần tự và phi tuần tự hoá trạng thái
    error.rsĐịnh nghĩa lỗi của Program

    Hiện tại, Anchoropen in new window đang nổi lên như là một framework phổ biến giúp phát triển Program nhanh chóng hơn. Anchor được lấy cảm hứng nhiều từ Ruby on Rails nhằm giảm thiểu các mẫu code lặp lại, đồng thời chuẩn hoá việc tuần tự và phi tuần tự hoá dữ liệu trong quá trình phát triển bằng Rust.

    Program thường được phát triển và kiểm thử trên môi trường localhost và devnet trước khi được triển khai trên testnet hoặc mainnet. Solana hỗ trợ các môi trường sau:

    Cụm môi trườngĐường dẫn kết nối RPC
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    LocalhostPort mặc định: 8899 (e.g. http://localhost:8899, http://192.168.1.88:8899)

    Sau khi triển khai lên một môi trường cụ thể, người dùng có thể tương tác với các Program trên on-chain thông qua kết nối RPCopen in new window tương ứng.

    Triển khai Program

    Lập trình viên có thể triển khai Program của họ thông qua CLIopen in new window:

    solana program deploy <PROGRAM_FILEPATH>
     

    Khi một Program được triển khai, nó sẽ được biên dịch thành một ELF shared objectopen in new window (có chứa BPF bytecode) và được tải lên mạng Solana. Program được lưu trữ trong Account (giống như hấu hết mọi thứ trên Solana), ngoại trừ việc được đánh dấu là executableowner được gán cho BPF Loader. Địa chỉ của Account này sẽ được gọi là program_id và được sử dụng nhưng là tham chiếu cho Program trong các giao dịch ở tương lai.

    Solana hỗ trợ đa dạng các BPF Loader với phiên bản mới nhất là Upgradable BPF Loaderopen in new window. BPF Loader chịu trách nhiệm cho việc điều hành các Account của Program và cho phép người dùng tương tác bằng program_id. Tất cả Program chỉ có một điểm truy cập duy nhất, nơi mà các instruction sẽ được ghi nhận và xử lý (cụ thể là process_instruction) với các tham số bao gồm:

    • program_id: pubkey
    • accounts: array,
    • instruction_data: byte array

    Mỗi khi được gọi, Program sẽ được thực thi bởi Solana Runtime.

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/core-concepts/transactions.html b/docs/.vuepress/dist/vi/core-concepts/transactions.html index cca1eb50c..b66de259e 100644 --- a/docs/.vuepress/dist/vi/core-concepts/transactions.html +++ b/docs/.vuepress/dist/vi/core-concepts/transactions.html @@ -23,11 +23,11 @@ } Transactions | Toàn tập Solana - + -

    Transactions

    Người dùng có thể gọi Program bằng cách tạo và gửi một Transaction đến mạng lưới Solana. Một Transaction có thể chứa nhiều instruction bên trong, và mỗi instruction có thể tương tác với các Program khác nhau. Khi một Transaction được gửi đi, Solana Runtimeopen in new window sẽ xử lý các instruction bên trong Transaction theo thứ tự và tuần tự. Nếu có bất kỳ instruction nào xảy ra lỗi, toàn bộ Transaction sẽ được xem là lỗi.

    Có thể bạn chưa biết

    Những điều có thể bạn chưa biết

    • Các instruction là những đơn vị thực thi nhỏ nhất trên Solana
    • Mỗi instruction sẽ chứa:
      • program_id của Program mục tiêu
      • Một mảng tất cả accounts mà instruction muốn đọc hoặc ghi
      • Một mảng byte instruction_data cung cấp dữ liệu đầu vào cụ thể cho Program
    • Nhiều instruction có thể được đóng gói trong một Transaction duy nhất
    • Mỗi Transaction có thể chứa:
      • Một mảng tất cả accounts mà Transaction muốn đọc hoặc ghi
      • Một hoặc nhiều instructions
      • blockhash hiện tại
      • Một hoặc nhiều signatures
    • Các instruction sẽ được thực thi tuần tự và theo thứ tự trong Transaction
    • Nếu có bất kỳ instruction nào xảy ra lỗi, toàn bộ giao dịch sẽ được xem là lỗi
    • Transaction có giới hạn dung lượng là 1232 bytes

    Chi tiết

    Solana Runtime yêu cầu instruction và Transaction phải khai báo một danh sách tất cả các Account mà chúng cần đọc hoặc ghi dữ liệu. Bằng cách yêu cầu những Account này trước, Solana Runtime có thể song song hoá quá trình thực thi xuyên suốt tất cả các Transaction.

    Khi một Transaction được gửi vào mạng lưới, Solana Runtime sẽ xử lý các instructions của nó tuần tự từng instruction một theo thứ tự khai báo bên trong Transaction. Với mỗi instruction, Program được truy vấn sẽ lấy dữ liệu từ instruction và thực thi trên các Account tương ứng trong instruction đó. Program hoặc là trả về kết quả thành công, hoặc là với kết quả lỗi với mã lỗi tương ứng. Với bất kỳ lỗi nào được trả ra, toàn bộ Transaction sẽ kết thúc với lỗi ngay lập tức.

    Bất kỳ Transaction nào mà thay đổi dữ liệu của Account hay rút lamports ra từ Account thì đều cần yêu cầu chữ ký của owner trong Account. Bất kỳ Account nào khi cần được sửa đổi đều phải đánh dấu là writable trong instruction tương ứng. Một Account có thể được nạp thêm lamports mà không cần xin phép, chỉ cần người trả phí cho Transaction đủ khả năng chi trả phí thuê và phí giao dịch.

    Trước khi gửi đi, tất cả các Transaction phải tham chiếu Blockhashopen in new window mới nhất. Blockhash được dùng để chống trùng lặp và loại bỏ các giao dịch quá hạn. Thời hạn tối đa cho một Transaction là không quá 150 blocks so với Blockhash được ghi, và khoảng chừng 1 phút 19 giây theo ước tính tại thời điểm cuốn sách được viết.

    Phí

    Mạng Solana sẽ thu 2 loại phí:

    Trên Solana, phí giao dịch thường bất biến, nghĩa là không có khái niệm về đánh phí theo thị trường nơi mà người dùng có thể trả phí cao hơn mặt bằng để tăng cơ hội được ưu tiên thực thi Transaction trước. Tại thời điểm tác giả viết, phí giao dịch được xác định bằng số lượng chữ ký bên trong Transaction (cụ thể là lamports_per_signature), và không phải bằng số bước tính toán cho Transaction đó. Điều đó được lý giải bởi vì luôn có một giới hạn trần là 1232 bytes cho mọi Transaction.

    Tất cả Transaction yêu cầu ít nhất một Account là writable để ký Transaction đó. Một khi được gửi, Account trả phí với nhãn writablesigher sẽ được tuần tự hoá trước tiên. Account này sẽ chi trả các chi phí phát sinh của Transaction cho dù Transaction thành công hay thất bại. Nếu Account trả phí không đủ số dư để trả phí giao dịch, Transaction sẽ bị bỏ qua.

    Tại thời điểm được viết, 50% phí giao dịch sẽ được thưởng cho Validator để sinh ra block, trong khi 50% còn lại sẽ được đốt. Bằng cơ cấu như vậy, Validator được khuyến khích phải xử lý càng nhiều Transaction càng tốt trong thời hạn được đề cử.

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - +

    Transactions

    Người dùng có thể gọi Program bằng cách tạo và gửi một Transaction đến mạng lưới Solana. Một Transaction có thể chứa nhiều instruction bên trong, và mỗi instruction có thể tương tác với các Program khác nhau. Khi một Transaction được gửi đi, Solana Runtimeopen in new window sẽ xử lý các instruction bên trong Transaction theo thứ tự và tuần tự. Nếu có bất kỳ instruction nào xảy ra lỗi, toàn bộ Transaction sẽ được xem là lỗi.

    Có thể bạn chưa biết

    Những điều có thể bạn chưa biết

    • Các instruction là những đơn vị thực thi nhỏ nhất trên Solana
    • Mỗi instruction sẽ chứa:
      • program_id của Program mục tiêu
      • Một mảng tất cả accounts mà instruction muốn đọc hoặc ghi
      • Một mảng byte instruction_data cung cấp dữ liệu đầu vào cụ thể cho Program
    • Nhiều instruction có thể được đóng gói trong một Transaction duy nhất
    • Mỗi Transaction có thể chứa:
      • Một mảng tất cả accounts mà Transaction muốn đọc hoặc ghi
      • Một hoặc nhiều instructions
      • blockhash hiện tại
      • Một hoặc nhiều signatures
    • Các instruction sẽ được thực thi tuần tự và theo thứ tự trong Transaction
    • Nếu có bất kỳ instruction nào xảy ra lỗi, toàn bộ giao dịch sẽ được xem là lỗi
    • Transaction có giới hạn dung lượng là 1232 bytes

    Chi tiết

    Solana Runtime yêu cầu instruction và Transaction phải khai báo một danh sách tất cả các Account mà chúng cần đọc hoặc ghi dữ liệu. Bằng cách yêu cầu những Account này trước, Solana Runtime có thể song song hoá quá trình thực thi xuyên suốt tất cả các Transaction.

    Khi một Transaction được gửi vào mạng lưới, Solana Runtime sẽ xử lý các instructions của nó tuần tự từng instruction một theo thứ tự khai báo bên trong Transaction. Với mỗi instruction, Program được truy vấn sẽ lấy dữ liệu từ instruction và thực thi trên các Account tương ứng trong instruction đó. Program hoặc là trả về kết quả thành công, hoặc là với kết quả lỗi với mã lỗi tương ứng. Với bất kỳ lỗi nào được trả ra, toàn bộ Transaction sẽ kết thúc với lỗi ngay lập tức.

    Bất kỳ Transaction nào mà thay đổi dữ liệu của Account hay rút lamports ra từ Account thì đều cần yêu cầu chữ ký của owner trong Account. Bất kỳ Account nào khi cần được sửa đổi đều phải đánh dấu là writable trong instruction tương ứng. Một Account có thể được nạp thêm lamports mà không cần xin phép, chỉ cần người trả phí cho Transaction đủ khả năng chi trả phí thuê và phí giao dịch.

    Trước khi gửi đi, tất cả các Transaction phải tham chiếu Blockhashopen in new window mới nhất. Blockhash được dùng để chống trùng lặp và loại bỏ các giao dịch quá hạn. Thời hạn tối đa cho một Transaction là không quá 150 blocks so với Blockhash được ghi, và khoảng chừng 1 phút 19 giây theo ước tính tại thời điểm cuốn sách được viết.

    Phí

    Mạng Solana sẽ thu 2 loại phí:

    Trên Solana, phí giao dịch thường bất biến, nghĩa là không có khái niệm về đánh phí theo thị trường nơi mà người dùng có thể trả phí cao hơn mặt bằng để tăng cơ hội được ưu tiên thực thi Transaction trước. Tại thời điểm tác giả viết, phí giao dịch được xác định bằng số lượng chữ ký bên trong Transaction (cụ thể là lamports_per_signature), và không phải bằng số bước tính toán cho Transaction đó. Điều đó được lý giải bởi vì luôn có một giới hạn trần là 1232 bytes cho mọi Transaction.

    Tất cả Transaction yêu cầu ít nhất một Account là writable để ký Transaction đó. Một khi được gửi, Account trả phí với nhãn writablesigner sẽ được tuần tự hoá trước tiên. Account này sẽ chi trả các chi phí phát sinh của Transaction cho dù Transaction thành công hay thất bại. Nếu Account trả phí không đủ số dư để trả phí giao dịch, Transaction sẽ bị bỏ qua.

    Tại thời điểm được viết, 50% phí giao dịch sẽ được thưởng cho Validator để sinh ra block, trong khi 50% còn lại sẽ được đốt. Bằng cơ cấu như vậy, Validator được khuyến khích phải xử lý càng nhiều Transaction càng tốt trong thời hạn được đề cử.

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, lainhathoang, tuphan-dn
    + diff --git a/docs/.vuepress/dist/vi/getting-started/installation.html b/docs/.vuepress/dist/vi/getting-started/installation.html index 4485bda03..eac0f90d6 100644 --- a/docs/.vuepress/dist/vi/getting-started/installation.html +++ b/docs/.vuepress/dist/vi/getting-started/installation.html @@ -23,12 +23,12 @@ } Cài đặt | Toàn tập Solana - + -

    Cài đặt Web3.js

    Có rất nhiều thư viện Javascript hoặc Typescript bạn có thể dùng để tương tác với Solana.

    Web3.js

    @solana/web3.jsopen in new window là một thư viện phổ biến và hỗ trợ nhiều công cụ thiết yếu cho việc lập trình trên Solana. Ví dụ như đọc dữ liệu từ blockchain, kí giao dịch, gửi giao dịch.

    Bạn có thể cài đặt thông qua các bước sau:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    Cài đặt Web3.js

    Có rất nhiều thư viện Javascript hoặc Typescript bạn có thể dùng để tương tác với Solana.

    Web3.js

    @solana/web3.jsopen in new window là một thư viện phổ biến và hỗ trợ nhiều công cụ thiết yếu cho việc lập trình trên Solana. Ví dụ như đọc dữ liệu từ blockchain, kí giao dịch, gửi giao dịch.

    Bạn có thể cài đặt thông qua các bước sau:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    Biên dịch từ mã nguồn

    Nếu bạn không thể sử dụng bản biên dịch sẵn binaries, hoặc muốn biên dịch thủ công từ mã nguồn, vui lòng truy cập https://github.com/solana-labs/solana/releases/latestopen in new window, và tải tệp nến của Source Code. Giải nén và biên dịch binaries bằng câu lệnh:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    Sau đó, bạn phải chạy lệnh bên dưới để đặt được kết quả giống với bản binaries biên dịch sẵn:

    solana-install init
    -
    Last Updated:
    Contributors: tuphan-dn
    - +
    Last Updated:
    Contributors: tuphan-dn, Steven Luscher
    + diff --git a/docs/.vuepress/dist/vi/guides/account-maps.html b/docs/.vuepress/dist/vi/guides/account-maps.html index e88368e43..e2503ef33 100644 --- a/docs/.vuepress/dist/vi/guides/account-maps.html +++ b/docs/.vuepress/dist/vi/guides/account-maps.html @@ -23,11 +23,11 @@ } Account Maps | Toàn tập Solana - + -

    Account Maps

    Map là một kiểu cấu trúc thường dùng trong lập trình và bao gồm một key tương ứng với một value. Cặp key-value có thể là bất kỳ kiểu dữ liệu nào trong đó key như là chìa khoá định danh dữ liệu được lưu trong value. Do đó, với mỗi key, chũng ta có thể thêm, xoá, cập nhật dữ liệu vào value một cách hiệu quả.

    Mô hình Account trong Solana, như đã biết, yêu cầu dữ liệu của Program và các trạng thái của nó phải được lưu ở những Account riêng biệt. Những Account này có một địa chỉ định danh tương ứng và mô hình đó rất giống với map! Tìm hiểu thêm về mô hình Account trong Solana tại đâyopen in new window.

    Như vậy, dễ hiểu khi mà ta lưu values vào những Account tách biệt và dùng key để truy vấn dữ liệu trong values. Tuy nhiên, điều này lại gây ra một số vấn đề như là:

    • Những địa chỉ đề cập hầu hết không phải là một keys lý tưởng, khi mà bạn cần phải ghi nhớ tất cả chúng để truy vấn các dữ liệu tương ứng.

    • Những địa chỉ đề cập bên trên được tham chiếu bằng khoá công khai của những Keypairs (cặp khoá) khác nhau, trong đó khoá công khai bắt buộc phải có khoá riêng tư tương ứng. Khoá riêng tư lại cần thiết để ký các chỉ thị và lại bắt buộc chúng ta phải lưu ở một nơi nào đó, điều mà thật sự không được khuyến khích trong thực tiễn.

    Điếu đó dẫn đến rất nhiều vấn đề cho lập trình viên muốn hiện thực Map trực tiếp vào Program trên Solana. Giờ hãy quan sát một vài cách để giải quyết vấn đề trên.

    Tìm PDA

    PDA là viết tắt Program Derived Addressopen in new window. Chúng là những địa chỉ được tìm thấy thông qua tập hợp gồm seedsprogram_id.

    Điểm đặc biệt của PDA là chúng không tồn tại khoá riêng tư tương ứng. Điều này bởi vì những địa chỉ này không nằm trên đường cong ED25519. Vì vậy, duy nhất Program sinh ra PDA mới có thể ký lên các chỉ thị cho các PDA đó bằng seeds. Tìm hiểu thêm tại đâyopen in new window.

    Sau khi đã nắm được khái niệm PDA, chúng ta có thể sử dụng để tạo kiểu Map! Hãy lấy ví dụ một Blog Program để hiểu rõ hơn cách sử dụng.

    Trong Blog Program, chúng ta muốn mỗi User sẽ có một trang Blog. Bài blog có thể có nhiều Posts. Cụ thể hơn, mỗi User sẽ map đến một trang Blog. Nhiều bài Posts sẽ được map về một trang Blog.

    User sẽ có kết nối 1:1 với Blog trong khi Blog sẽ có kết nối 1:N với Posts.

    Với 1:1, chúng ta mong mốn địa chỉ của trang blog có thể được suy ra độc nhất từ địa chỉ người dùng. Cơ chế này sẽ giúp chúng ta lấy được dữ liệu của blog khi biết được địa chỉ chử sở hữu blog đó. Hiển nhiên, seeds cho Blog phải chứa địa chỉ chủ sở hữu, và có thể thêm một tiền tố như "blog" để giúp chú thích.

    Với 1:N, chúng ta mong muốn địa chỉ mỗi bài post sẽ được suy ra từ không chỉ địa chỉ trang blog mà còn từ cách thành tố khác giúp tạo ra N địa chỉ bài post trong một trang blog. Trong ví dụ bên dưới, mỗi địa chỉ bài post được suy ra bằng địa chỉ trang blog, một thành tố phụ - slug - để định danh cho mỗi bài post, và tiền tố "post" để chú thích.

    Code mẫu được viết như sau:

    Press </> button to view full source
    use anchor_lang::prelude::*;
    +    

    Account Maps

    Map là một kiểu cấu trúc thường dùng trong lập trình và bao gồm một key tương ứng với một value. Cặp key-value có thể là bất kỳ kiểu dữ liệu nào trong đó key như là chìa khoá định danh dữ liệu được lưu trong value. Do đó, với mỗi key, chũng ta có thể thêm, xoá, cập nhật dữ liệu vào value một cách hiệu quả.

    Mô hình Account trong Solana, như đã biết, yêu cầu dữ liệu của Program và các trạng thái của nó phải được lưu ở những Account riêng biệt. Những Account này có một địa chỉ định danh tương ứng và mô hình đó rất giống với map! Tìm hiểu thêm về mô hình Account trong Solana tại đâyopen in new window.

    Như vậy, dễ hiểu khi mà ta lưu values vào những Account tách biệt và dùng key để truy vấn dữ liệu trong values. Tuy nhiên, điều này lại gây ra một số vấn đề như là:

    • Những địa chỉ đề cập hầu hết không phải là một keys lý tưởng, khi mà bạn cần phải ghi nhớ tất cả chúng để truy vấn các dữ liệu tương ứng.

    • Những địa chỉ đề cập bên trên được tham chiếu bằng khoá công khai của những Keypairs (cặp khoá) khác nhau, trong đó khoá công khai bắt buộc phải có khoá riêng tư tương ứng. Khoá riêng tư lại cần thiết để ký các chỉ thị và lại bắt buộc chúng ta phải lưu ở một nơi nào đó, điều mà thật sự không được khuyến khích trong thực tiễn.

    Điều đó dẫn đến rất nhiều vấn đề cho lập trình viên muốn hiện thực Map trực tiếp vào Program trên Solana. Giờ hãy quan sát một vài cách để giải quyết vấn đề trên.

    Tìm PDA

    PDA là viết tắt Program Derived Addressopen in new window. Chúng là những địa chỉ được tìm thấy thông qua tập hợp gồm seedsprogram_id.

    Điểm đặc biệt của PDA là chúng không tồn tại khoá riêng tư tương ứng. Điều này bởi vì những địa chỉ này không nằm trên đường cong ED25519. Vì vậy, duy nhất Program sinh ra PDA mới có thể ký lên các chỉ thị cho các PDA đó bằng seeds. Tìm hiểu thêm tại đâyopen in new window.

    Sau khi đã nắm được khái niệm PDA, chúng ta có thể sử dụng để tạo kiểu Map! Hãy lấy ví dụ một Blog Program để hiểu rõ hơn cách sử dụng.

    Trong Blog Program, chúng ta muốn mỗi User sẽ có một trang Blog. Bài blog có thể có nhiều Posts. Cụ thể hơn, mỗi User sẽ map đến một trang Blog. Nhiều bài Posts sẽ được map về một trang Blog.

    User sẽ có kết nối 1:1 với Blog trong khi Blog sẽ có kết nối 1:N với Posts.

    Với 1:1, chúng ta mong mốn địa chỉ của trang blog có thể được suy ra độc nhất từ địa chỉ người dùng. Cơ chế này sẽ giúp chúng ta lấy được dữ liệu của blog khi biết được địa chỉ chử sở hữu blog đó. Hiển nhiên, seeds cho Blog phải chứa địa chỉ chủ sở hữu, và có thể thêm một tiền tố như "blog" để giúp chú thích.

    Với 1:N, chúng ta mong muốn địa chỉ mỗi bài post sẽ được suy ra từ không chỉ địa chỉ trang blog mà còn từ cách thành tố khác giúp tạo ra N địa chỉ bài post trong một trang blog. Trong ví dụ bên dưới, mỗi địa chỉ bài post được suy ra bằng địa chỉ trang blog, một thành tố phụ - slug - để định danh cho mỗi bài post, và tiền tố "post" để chú thích.

    Code mẫu được viết như sau:

    Press </> button to view full source
    use anchor_lang::prelude::*;
     
     declare_id!("2vD2HBhLnkcYcKxnxLjFYXokHdcsgJnyEXGnSpAX376e");
     
    @@ -1135,7 +1135,7 @@
     tx.add(insertABIx);
     tx.add(insertBCIx);
     tx.add(insertCAIx);
    -
    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - +
    Last Updated:
    Contributors: Trần Minh Quang, lainhathoang, tuphan-dn
    + diff --git a/docs/.vuepress/dist/vi/guides/data-migration.html b/docs/.vuepress/dist/vi/guides/data-migration.html index d32a5d40f..db9f6c8f2 100644 --- a/docs/.vuepress/dist/vi/guides/data-migration.html +++ b/docs/.vuepress/dist/vi/guides/data-migration.html @@ -23,7 +23,7 @@ } Nâng cấp dữ liệu cho Program Account | Toàn tập Solana - + @@ -676,6 +676,6 @@ } }

    Sau khi xây dựng và áp dụng chỉ thị VersionProgramInstruction::SetString(String), chúng ta sẽ thấy dữ liệu Account được cập nhật sẽ được sắp xếp như sau:

    Program Account v2

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/guides/debugging-solana-programs.html b/docs/.vuepress/dist/vi/guides/debugging-solana-programs.html index 0240d2bab..3d03994b5 100644 --- a/docs/.vuepress/dist/vi/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/vi/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } Soát lỗi chương trình trên Solana | Toàn tập Solana - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    Soát lỗi ở đây sẽ cho phép bạn dò được các hàm, phương thức đã sử dụng trong nội dung bài kiểm thử ngoại trừ các điểm dừng được đánh dấu trong chương trình.

    Điều này có vẻ lời hơi phiền nhỉ!

    Kiểm thử bằng nốt Local Validator trên ứng dụng người dùng

    Cuối cùng, bạn có thể khởi chạy một nốt local validator và tải lên Program của bạn cũng như bất kỳ Account bằng câu của solana-test-validator.

    Bằng cách này, bạn sẽ cần một ứng dụng người dùng, hoặc là bằng Rust với RcpClient, hoặc là bằng ứng dụng JavaScript/Typescript

    Chạy solana-test-validator --help để hiểu thêm về các chi tiết cũng như tham số truyền vào. Ví dụ bên dưới là một cài đặt đơn giản nhất:

    1. Mở cửa sổ lệnh tại vị trí thử mục gốc của dự án
    2. Chạy solana config set -ul để trỏ cài đặt về môi trường địa phương
    3. Chạy solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. Mở một cửa sổ lệnh khác và chạysolana logs để bắt đầu theo dõi kết quả trả ra.
    5. Bạn có thể chạy ứng dụng người sau đó và quan sát kết quả đầu ra chửa chương trình bằng cửa sổ lệnh được khởi chạy ở bước 4

    Giờ đây bạn đã thành thạo mọi thứ rồi đấy!

    Các nguồn tài liệu khác

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/guides/feature-parity-testing.html b/docs/.vuepress/dist/vi/guides/feature-parity-testing.html index 9280edced..fcc851232 100644 --- a/docs/.vuepress/dist/vi/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/vi/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } Đề xuất Kiểm thử Parity | Toàn tập Solana - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    Chúc bạn có thời gian kiểm thử vui vẻ!

    Các nguồn tài liệu khác

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/guides/get-program-accounts.html b/docs/.vuepress/dist/vi/guides/get-program-accounts.html index 1929c787d..80c9096b4 100644 --- a/docs/.vuepress/dist/vi/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/vi/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } Đọc dữ liệu Program Account | Toàn tập Solana - + @@ -441,7 +441,7 @@ # ], # "id": 1 # } -

    Vời việc kết hợp giữ 3 tham số (dataSlice, dataSize, và memcmp), chúng ta có thể giới hạn phạm vi truy vấn một cách hiệu quả với chỉ các kết quả trả về mà chúng ta quan tâm.

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - +

    Với việc kết hợp giữ 3 tham số (dataSlice, dataSize, và memcmp), chúng ta có thể giới hạn phạm vi truy vấn một cách hiệu quả với chỉ các kết quả trả về mà chúng ta quan tâm.

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, lainhathoang, tuphan-dn
    + diff --git a/docs/.vuepress/dist/vi/guides/serialization.html b/docs/.vuepress/dist/vi/guides/serialization.html index 21e12a197..7b93a066e 100644 --- a/docs/.vuepress/dist/vi/guides/serialization.html +++ b/docs/.vuepress/dist/vi/guides/serialization.html @@ -23,7 +23,7 @@ } Tuần tự hoá dữ liệu | Toàn tập Solana - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    Các nguồn tài liệu khác

    Last Updated:
    Contributors: Trần Minh Quang, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/index.html b/docs/.vuepress/dist/vi/index.html index c5e3662b9..6ff857034 100644 --- a/docs/.vuepress/dist/vi/index.html +++ b/docs/.vuepress/dist/vi/index.html @@ -23,11 +23,11 @@ } Nhập môn Solana | Toàn tập Solana - +

    Nhập môn Solana

    Cuốn sách Toàn tập Solana là một tài liệu lập trình hướng đến việc cung cấp nhưng khái niệm căn bản và tài liệu tham khảo cho quá trình xây dựng ứng dụng trên Solana. Mỗi khái niệm hoặc tài liệu tham khảo không những tập trung vào những khía cạnh cụ thể trên Solana, mà còn cung cấp các chi tiết giảng giải cũng như ví dụ mẫu cho lập trình viên.

    Đóng góp

    Toàn tập Solana được thiết kế sao cho các lập trình viên mới trên Solana cũng có thể dễ dàng tham gia đóng góp và xây dựng. Ngay cả khi bạn chưa có ý tưởng nào cho các sản phẩm cá nhân hoặc tổ chức của bạn, tham gia góp ý cũng là một cách rất hay để bạn có thể trau dồi.

    Xem qua tất cả các đóng góp tại đâyopen in new window. Cách thức góp ý được trình bày tại đâyopen in new window. Nếu bạn cảm thấy Toàn tập Solana đang thiếu sót ở bất kỳ điểm nào, vui lòng tạo mới một góp ý thông qua các đường dẫn bên trên.

    Cấu trúc của Toàn tập Solana

    Toàn tập Solana được chia thành các mục cụ thể, và ở mỗi mục sẽ trình bày, giải thích các mục tiêu khác nhau.

    MụcMục tiêu
    Khái niệm căn bảnXây dựng các khối cơ sở của Solana cần thiết cho quá trình phát triển ứng dụng
    Hướng dẫnCác hướng dẫn nhanh về bộ công cụ hữu ích cho quá trình phát triển ứng dụng
    Tham khảoCác mẫu code thường gặp trong quá trình phát triển ứng dụng

    Lời của dịch giả

    Phiên bản Tiếng Việt của Toàn tập Solana được dịch lại từ phiên bản Tiếng Anh - Solana Cookbookopen in new window bởi Sentre Protocolopen in new window. Vì đây là một tài liệu kỹ thuật nên để đảm bảo tính nhất quán, một số thuật ngữ chuyên ngành sẽ được giữ nguyên và không được dịch sang các từ thay thế ở Tiếng Việt. Ngoài ra, một số hình minh hoạ có thể được cập nhật chậm và vẫn phải dùng hình ảnh gốc ở bản Tiếng Anh. Hi vọng bạn đọc thông cảm và có thời gian học tập vui vẻ. Chúc cộng đồng Solana Việt Nam ngày càng phát triển về chất và lượng.

    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/accounts.html b/docs/.vuepress/dist/vi/references/accounts.html index d86f39959..5df9e42bc 100644 --- a/docs/.vuepress/dist/vi/references/accounts.html +++ b/docs/.vuepress/dist/vi/references/accounts.html @@ -23,7 +23,7 @@ } Accounts | Toàn tập Solana - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    Nếu bạn muốn đọc số dư token, bạn sẽ cần biết địa chỉ của token account. Tham khảo Token References để hiểu rõ.

    Last Updated:
    Contributors: Partially Sorted, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/basic-transactions.html b/docs/.vuepress/dist/vi/references/basic-transactions.html index 8db6d132d..575bb5cf4 100644 --- a/docs/.vuepress/dist/vi/references/basic-transactions.html +++ b/docs/.vuepress/dist/vi/references/basic-transactions.html @@ -23,7 +23,7 @@ } Gửi Transaction | Toàn tập Solana - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/keypairs-and-wallets.html b/docs/.vuepress/dist/vi/references/keypairs-and-wallets.html index 132a13f9c..bbc892f8a 100644 --- a/docs/.vuepress/dist/vi/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/vi/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } Cặp khoá và Ví | Toàn tập Solana - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    use solana_sdk::signature::{Keypair};
     
     fn main() {
    @@ -152,10 +158,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -281,8 +287,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    use solana_sdk::pubkey::{Pubkey};
     use std::str::FromStr;
    @@ -307,7 +316,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 - nhiều ví, thường được biết đến với tên gọi ví HD (Hierarchical Deterministic - Phân quyền Tất định)

    Bạn có thể tạo nhiều ví từ một seed đơn và được gọi là ví HD:

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -454,7 +467,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    Chạy đoạn mã sau đây để cài các thư viện cần thiết:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    Chạy đoạn mã sau đây để cài các thư viện cần thiết:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Gói Svelte Wallet Adapteropen in new window cho phép thêm một Svelte Store ($walletStore) có khả năng truy xuất từ các tập tin JS, TS or/and Svelte bên trong dự án được tạo từ Svelte Template hoặc SvelteKit. Sử dụng mã nguồn tham khảo tại đâyopen in new window bạn có thể sử dụng bộ tiếp hợp cho SSR và cả SPA. Gói giao diện người dùng có chứa một thành phần là <WalletMultiButton />, nó cho phép người dùng có thể chọn và tạo kết nối đến ví.

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -646,7 +659,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: tuphan-dn, Partially Sorted
    - +
    Last Updated:
    Contributors: tuphan-dn, Partially Sorted, Steven Luscher
    + diff --git a/docs/.vuepress/dist/vi/references/local-development.html b/docs/.vuepress/dist/vi/references/local-development.html index 28385b1a5..cd1858926 100644 --- a/docs/.vuepress/dist/vi/references/local-development.html +++ b/docs/.vuepress/dist/vi/references/local-development.html @@ -23,7 +23,7 @@ } Lập trình ở Local | Toàn tập Solana - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: Partially Sorted, tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/name-service.html b/docs/.vuepress/dist/vi/references/name-service.html index 1185cb2a2..ef39a3443 100644 --- a/docs/.vuepress/dist/vi/references/name-service.html +++ b/docs/.vuepress/dist/vi/references/name-service.html @@ -23,7 +23,7 @@ } Dịch vụ tên miền | Toàn tập Solana - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/nfts.html b/docs/.vuepress/dist/vi/references/nfts.html index 886861378..a0c99e97f 100644 --- a/docs/.vuepress/dist/vi/references/nfts.html +++ b/docs/.vuepress/dist/vi/references/nfts.html @@ -23,7 +23,7 @@ } NFTs | Toàn tập Solana - + @@ -559,6 +559,6 @@ console.log(allNFTs);
    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/offline-transactions.html b/docs/.vuepress/dist/vi/references/offline-transactions.html index c033e1547..153514705 100644 --- a/docs/.vuepress/dist/vi/references/offline-transactions.html +++ b/docs/.vuepress/dist/vi/references/offline-transactions.html @@ -23,7 +23,7 @@ } Gửi Transactions Ngoại tuyến | Toàn tập Solana - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/programs.html b/docs/.vuepress/dist/vi/references/programs.html index c7334e189..54d4570c0 100644 --- a/docs/.vuepress/dist/vi/references/programs.html +++ b/docs/.vuepress/dist/vi/references/programs.html @@ -23,7 +23,7 @@ } Xây dựng Programs | Toàn tập Solana - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    Tương tự code ở phía người dùng sẽ giống như sau:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    Tương tự code ở phía người dùng sẽ giống như sau:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/staking.html b/docs/.vuepress/dist/vi/references/staking.html index a3f122214..130f2d542 100644 --- a/docs/.vuepress/dist/vi/references/staking.html +++ b/docs/.vuepress/dist/vi/references/staking.html @@ -23,7 +23,7 @@ } Staking | Toàn tập Solana - + @@ -641,6 +641,6 @@ stakeBalance = await connection.getBalance(stakeAccount.publicKey); console.log(`Stake account balance: ${stakeBalance / LAMPORTS_PER_SOL} SOL`);
    Last Updated:
    Contributors: tuphan-dn
    - + diff --git a/docs/.vuepress/dist/vi/references/token.html b/docs/.vuepress/dist/vi/references/token.html index 3c1030814..f7ecb73ec 100644 --- a/docs/.vuepress/dist/vi/references/token.html +++ b/docs/.vuepress/dist/vi/references/token.html @@ -23,11 +23,11 @@ } Tương tác với Tokens | Toàn tập Solana - + -

    Token

    Tôi nên cần gì để bắt đầu với SPL-Tokens?

    Mỗi khi bạn tương tác với token trên Solana, bạn thực chất đang tương tác với Solana Program Library Token, gọi tắt là SPL-Token Standard. Chuẩn SPL-Token yêu cầu một thư viện đặc thù để sử dụng và bạn có thể tìm thấy bên dưới tuỳ vào ngôn ngữ lập trình của bạn.

    "@solana/spl-token": "^0.2.0"
    +    

    Token

    Tôi nên cần gì để bắt đầu với SPL-Tokens?

    Mỗi khi bạn tương tác với token trên Solana, bạn thực chất đang tương tác với Solana Program Library Token, gọi tắt là SPL-Token Standard. Chuẩn SPL-Token yêu cầu một thư viện đặc thù để sử dụng và bạn có thể tìm thấy bên dưới tuỳ vào ngôn ngữ lập trình của bạn.

    "@solana/spl-token": "^0.2.0"
     

    Làm thế nào để tạo một token mới

    Tạo mới token có thể thực hiện bằng cách tạo một "mint account". Account này sẽ được sử dụng lưu đúc token cho token account và ghi nhớ tổng cung cung khởi tạo.

    Press </> button to view full source
    import {
       clusterApiUrl,
       Connection,
    @@ -325,7 +325,7 @@
     

    TIP

    Một token account chỉ có thể chứa một loại mint duy nhất. Khi bạn khai báo token account, bạn cũng phải chỉ rõ lại mint.

    Làm thế nào để dúc token

    Khi bạn đúc token, bạn tăng số lượng tổng cung và chuyển số lược token mới cho token account mong muốn.

    Press </> button to view full source
    import {
    +

    TIP

    Một token account chỉ có thể chứa một loại mint duy nhất. Khi bạn khai báo token account, bạn cũng phải chỉ rõ lại mint.

    Làm thế nào để đúc token

    Khi bạn đúc token, bạn tăng số lượng tổng cung và chuyển số lược token mới cho token account mong muốn.

    Press </> button to view full source
    import {
       clusterApiUrl,
       Connection,
       PublicKey,
    @@ -1272,7 +1272,7 @@
     
    Last Updated:
    Contributors: tuphan-dn
    - +
    Last Updated:
    Contributors: lainhathoang, tuphan-dn
    + diff --git a/docs/.vuepress/dist/zh/core-concepts/accounts.html b/docs/.vuepress/dist/zh/core-concepts/accounts.html index 9454ce2a3..78dbf1eb9 100644 --- a/docs/.vuepress/dist/zh/core-concepts/accounts.html +++ b/docs/.vuepress/dist/zh/core-concepts/accounts.html @@ -23,11 +23,11 @@ } 账户 | Solana秘籍 - +

    账户

    在Solana中,账户是用来存储状态的。账户是Solana开发中非常重要的构成要素。

    综述

    要点

    • 账户是用来存放数据的
    • 每个账户都有一个独一无二的地址
    • 每个账户大小不能超过10MB
    • 程序派生账户大小不能超过10KB
    • 程序派生账户可以用其对应程序进行签名
    • 账户大小是静态的
    • 账户数据存储需要付租金
    • 默认的账户所有者是"系统程序"

    深入

    账户模型

    在Solana中有三类账户:

    • 数据账户,用来存储数据
    • 程序账户,用来存储可执行程序
    • 原生账户,指Solana上的原生程序,例如"System","Stake",以及"Vote"。

    数据账户又分为两类:

    • 系统所有账户
    • 程序派生账户(PDA)

    每个账户都有一个地址(一般情况下是一个公钥)以及一个所有者(程序账户的地址)。 下面详细列出一个账户存储的完整字段列表。

    字段描述
    lamports这个账户拥有的lamport(兰波特)数量
    owner这个账户的所有者程序
    executable这个账户成是否可以处理指令
    data这个账户存储的数据的字节码
    rent_epoch下一个需要付租金的epoch(代)

    关于所有权,有几条重要的规则:

    • 只有账户的所有者才能改变账户中的数据,提取lamport
    • 任何人都可以向数据账户中存入lamport
    • 当账户中的数据被抹除之后,账户的所有者可以指定新的所有者

    程序账户不储存状态。

    例如,假设有一个计数程序,这个程序用来为一个计数器加数,你需要创建两个账户,一个用于存储程序的代码, 另一个用于存储计数器本身。

    为了避免账户被删除,必须付租金。

    租金

    在账户中存储数据需要花费SOL来维持,这部分花费的SOL被称作租金。如果你在一个账户中存入大于两年租金的SOL, 这个账户就可以被豁免付租。租金可以通过关闭账户的方式来取回。lamport会被返还回你的钱包。

    租金在这两个不同的时间点被支取:

    1. 被一个交易引用的时候
    2. epoch更迭时

    收取的租金,一定百分比会被销毁,另一部分会在每个slot(插槽)结束时被分配给投票账户。

    当一个账户没有足够的余额支付租金时,这个账户会被释放,数据会被清除。

    其他资料

    致谢

    这些核心概念来源于Pencilflip. 在Twitter上关注他open in new window.

    Last Updated:
    Contributors: Hipo
    - + diff --git a/docs/.vuepress/dist/zh/core-concepts/pdas.html b/docs/.vuepress/dist/zh/core-concepts/pdas.html index 1016d96e6..81b2d75ef 100644 --- a/docs/.vuepress/dist/zh/core-concepts/pdas.html +++ b/docs/.vuepress/dist/zh/core-concepts/pdas.html @@ -23,11 +23,11 @@ } 程序派生账户 (PDA) | Solana秘籍 - +

    程序派生账户(PDA)

    程序派生账户(PDA)是为了让特定程序可以控制一些账户而设计出来的。使用PDA,程序可以通过编程方法为一些地址进行签名,而不一定用到私钥。 PDA是Cross-Program Invocation(跨程序调用)open in new window的基础, 这个功能让Solana的app可以跟其他app进行组合。

    综述

    要点

    • PDA是长度为32的字节串,看起来和公钥很像,但是并没有与之对应的私钥
    • findProgramAddress可以针对一个programId(程序id)和seeds(种子)唯一确定的生成一个PDA。这里的seeds(种子)是一组指定的字节串
    • 一个跳跃(一个字节)用于将候选PDA推离ed25519椭圆曲线
    • 程序通过传入种子和跳跃参数,调用invoke_signedopen in new window为PDA进行签名
    • PDA只能被用来派生出这个地址的程序所签名
    • 除了允许程序为不同的instruction签名之外,PDA还提供了一个像哈希表一样的接口,用于建立账户索引

    深入

    PDA是Solana程序开发的重要构成要素。有了PDA,程序可以为账户签名,同时保证没有外部用户能够产生针对同一个账户的有效签名。 除了为账户签名外,一些程序还可以修改自己派生出来的PDA里的数据。

    Accounts matrix

    图片来源:Pencilflip

    生成PDA

    为了更好的理解PDA的概念,可以认为PDA从技术角度讲并不是创建出来的,而是找到的。PDA由一组种子(例如字符串"vote_account")以及程序id生成。 这组种子和程序id接下来会放到sha256哈希函数中执行一遍,检查他们产生的公钥是否落在ed25519椭圆曲线上。

    在程序id和种子上运行哈希函数时,有大约50%的概率会得到在一个落在椭圆曲线上有效的公钥。这种情况下,我们需要向输入当中加点扰动,略微改变输入,再进行重试。 这个扰动的技术名称叫bump(跳跃)。在Solana中,我们一开始指定bump = 255,然后向下迭代bump,到254,253等等。知道我们能够找到一个不在椭圆曲线上的地址为止。 这个看起来简陋的办法可以让我们每次生成PDA的时候都能够得到唯一确定的结果。

    落在椭圆曲线上的PDA

    与PDA交互

    生成PDA的时候,findProgramAddress会把得到的地址和用来将PDA碰撞出椭圆曲线所用的bump都返回出来。 有了这个bump,程序就可以对任何需要这个PDA地址的指令进行签名。签名时,程序调用invoke_signed函数,传入指令,账户列表,以及用于生成PDA的种子和bump。 除了为指令签名之外,PDA在他自己通过invoke_signed函数被创建时,也需要签名。

    在使用PDA编写程序时,经常会将这个bump存储在这个账户本身的数据当中open in new window。 这种机制可以让开发者轻易的对PDA进行验证,而不用重新在指令参数当中传入这个值。

    Other Resources

    Last Updated:
    Contributors: Hipo
    - + diff --git a/docs/.vuepress/dist/zh/core-concepts/programs.html b/docs/.vuepress/dist/zh/core-concepts/programs.html index 85b952cb2..c3a4fdabe 100644 --- a/docs/.vuepress/dist/zh/core-concepts/programs.html +++ b/docs/.vuepress/dist/zh/core-concepts/programs.html @@ -23,12 +23,12 @@ } 程序 | Solana秘籍 - +

    程序

    任何开发者都可以在Solana链上编写以及部署程序。Solana程序(在其他链上叫做智能合约),是所有链上活动的基础。 链上的一切活动,从去中心化金融(DeFi),到非同质化代币(NFT),再到社交媒体,链上游戏,都由Solana程序所驱动。

    综述

    要点

    • 程序可以处理来自用户和其他程序的指令
    • 所有的程序都是无状态的:所有的和程序交互的数据都是存储在独立的账户中。执行时,这些账户借由指令传入程序
    • 程序本身存储在标记为executable(可执行)的账户中。
    • 任何程序的所有者都是BPF Loaderopen in new window and executed by the Solana Runtimeopen in new window
    • 开发者通常使用Rust或C++来编写程序,也可以采用任何其他可以编译为LLVMopen in new windowBPFopen in new window后端的语言
    • 所有的程序都有一个单独的入口点,指令的执行就是从这里开始的(亦即process_instruction)。参数须包括:
      • program_id: pubkey (公钥)
      • accounts: array (数组)
      • instruction_data: byte array (字节数组)

    深入

    与其他链不同,Solana将代码与数据完全分开。 程序需要访问的全部数据都存储在独立的账户中,在指令中这些账户需要以引用的方式传入。 这种模式使得一个通用的程序可以在不同的账户上运行,而不用为此额外部署程序。 这种模式的例子很常见,包括了"原生程序"以及"SPL程序"等。

    原生程序和Solana程序库(SPL)

    Solana自带一系列程序,这些程序是链上交互的核心构成要素。 这些程序分为原生程序open in new windowSolana程序库(SPL程序)open in new window

    原生程序提供了运行验证节点(validator)所需的功能。原生程序中最广为人知的是System Programopen in new window。 这个程序负责管理建立新账户以及在两个账户之间转账SOL。

    SPL程序定义了一系列的链上活动,其中包括针对代币的创建,交换,借贷,以及创建质押池,维护链上域名解析服务等。 SPL Token Program(SPL代币程序)open in new window可以直接在命令行调用,其他的一些,如 Associated Token Account Program(关联代币账户程序)open in new window, 则常被用于编写其他定制程序。

    编写程序

    编写Solana程序常用的是Rust和C++,但是也可以使用其他可以编译为LLVM的BPF后端的语言。 最近Neon Labsopen in new windowSolangopen in new window发起了一个项目, 旨在建立Solana的EVMopen in new window兼容性,进而让开发者可以使用Solidity编写程序。

    大部分Rust编写的程序遵循以下架构:

    文件描述
    lib.rs注册模块
    entrypoint.rs程序的入口点
    instruction.rs程序的API, 对指令的数据进行序列化与反序列化
    processor.rs程序的业务逻辑
    state.rs程序对象,对状态进行反序列化
    error.rs程序中制定的错误

    最近,Anchoropen in new window逐渐成为了一个广受欢迎的Solana程序开发框架。 Anchor是一个有态度的框架,与Ruby on Rails相似,这个框架旨在减少模式化的代码,将Rust开发流程中的序列化与反序列化过程流水线化。

    在部署到Testnet(测试网)和Mainnet(主网)之前,程序在开发和测试阶段经常使用Localhost和Devnet(开发网)环境。 Solana支持以下的几个环境:

    集群环境RPC连接URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhost默认端口:8899(例如,http://localhost:8899,http://192.168.1.88:8899)

    部署到一个环境之后,客户端就可以通过对应集群的RPC连接open in new window与链上程序进行交互。

    部署程序

    开发者可以使用命令行open in new window部署程序:

    solana program deploy <PROGRAM_FILEPATH>
     

    部署程序的时候,程序会被编译为包含BPF字节码的ELF共享对象open in new window,并上传到Solana集群上。 和Solana上其他的任何东西一样,程序储存在账户当中。唯一的特殊之处是,这些账户标记为executable(可执行),并且其所有者是"BPF Loader(BPF加载器)"。 这个账户的地址被称为program_id,在后面的一切交易当中,用于指代这个程序。

    Solana支持多种BPF加载器,最新的是Upgradable BPF Loaderopen in new window。 BPF加载器负责管理程序账户,让客户端可以通过其program_id对程序进行访问。每个程序都只有一个入口点,这里对指令进行处理。这里的参数须包括:

    • program_id: pubkey(公钥)
    • accounts: array(数组)
    • instruction_data: byte array(字节数组)

    当程序被调用时,会在Solana运行库中被执行。

    其他资料

    Last Updated:
    Contributors: Hipo, 胡本
    - + diff --git a/docs/.vuepress/dist/zh/core-concepts/transactions.html b/docs/.vuepress/dist/zh/core-concepts/transactions.html index 1ac0edbeb..07595e8ad 100644 --- a/docs/.vuepress/dist/zh/core-concepts/transactions.html +++ b/docs/.vuepress/dist/zh/core-concepts/transactions.html @@ -23,11 +23,11 @@ } 交易 | Solana秘籍 - +

    交易

    客户端可以通过向一个集群提交交易来调用程序。一个交易可以包含多个指令,每个指令可以针对不同的程序。 交易提交时,Solana运行库open in new window会自动的按顺序处理这些指令。 如果某一个指令中的任何一个部分失败,整个交易就会失败。

    概述

    要点

    • 指令是Solana上最基本的操作单元
    • 每个指令都包含:
      • program_id:所针对的程序的id
      • accounts:需要读或写的全部账户组成的数组
      • instruction_data:向指定程序所传输的数据的字节码
    • 多个指令可以被打包进入同一个交易当中
    • 每个交易都包含:
      • instructions:一个或多个指令
      • blockhash:最新的块哈希值
      • signatures:一个或多个签名
    • 指令会被自动的按顺序执行
    • 如果一个指令的任何一部分失败,整个交易就会失败
    • 交易的大小限制在1232字节以内

    深入

    在Solana运行库中,指令和交易都需要先指定全部需要读写访问的账户列表。 通过事先指定账户列表,运行库可以对交易的执行做并行化处理。

    当交易被提交到集群时,运行库会自动的按照顺序处理这些指令。对于每个指令,接收这个指令的程序会解析指令中的数据字段,在指定的账户上进行操作。 程序要么执行成功,要么会返回一个错误码。如果返回了一个错误码,整个交易都会立即失败。

    任何交易,只要针对一个账户扣除SOL,或者修改其中的数据,都需要这个账户拥有者的签名。 在交易中,会被修改的账户都会被标记为writable(可写)。 当交易的付费者支付了足够的租金和交易费用时,一个账户可以被存入SOL而不用这个账户拥有者的许可。

    提交之前,每个交易需要引用一个recent blockhash(最新块哈希)open in new window。 块哈希被用于去重,以及移除过期交易。一个块哈希的最大寿命是150个区块,成文时这个时间大约是1分钟19秒。

    费用

    Solana网络收取两种费用:

    在Solana中,交易费是确定的。并没有费率竞价的概念,用户无法通过增加交易费的方式增加自己的交易被打包进下一个区块的概率。 在成文时,交易费只与交易所需的签名数量相关(参见lamports_per_signature),与交易所使用的资源无关。 这是因为目前所有交易都有一个严格的1232字节的限制。

    每个交易都需要至少有一个writable(可写)的账户,用于为交易签名。这个账户无论交易成功与否都需要为交易成本付费。 如果付费者没有足够为交易付费的余额,这个交易就会被丢弃。

    成文时,50%的交易费被出块的验证节点收取,剩下的50%被燃烧掉。这样的结构会激励验证节点在leader schedule(领导时间表)规定的属于自己的slot(插槽)中处理尽可能多的交易。

    Other Resources

    Last Updated:
    Contributors: Hipo
    - + diff --git a/docs/.vuepress/dist/zh/getting-started/installation.html b/docs/.vuepress/dist/zh/getting-started/installation.html index af38e78aa..76eec9a54 100644 --- a/docs/.vuepress/dist/zh/getting-started/installation.html +++ b/docs/.vuepress/dist/zh/getting-started/installation.html @@ -23,12 +23,12 @@ } 安装 | Solana秘籍 - + -

    安装Web3.js

    用JavaScript或者TypeScript进行Solana编程时,你会用到下面的几个库。

    Web3.js

    @solana/web3.jsopen in new window 这个库提供了很多用于与Solana交互,发送交易,从区块链上读取数据等操作的基础功能。

    可以用以下命令安装:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    安装Web3.js

    用JavaScript或者TypeScript进行Solana编程时,你会用到下面的几个库。

    Web3.js

    @solana/web3.jsopen in new window 这个库提供了很多用于与Solana交互,发送交易,从区块链上读取数据等操作的基础功能。

    可以用以下命令安装:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    从源码编译

    如果你不能使用预编译的二进制文件,或者希望自己从源码进行编译,可以访问 https://github.com/solana-labs/solana/releases/latestopen in new window, 下载Source Code压缩包。解压代码,用以下命令编译二进制文件:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    然后运行以下命令,可以和预编译二进制文件获得一样的结果:

    solana-install init
    -
    Last Updated:
    Contributors: Hipo
    - +
    Last Updated:
    Contributors: Hipo, Steven Luscher
    + diff --git a/docs/.vuepress/dist/zh/guides/account-maps.html b/docs/.vuepress/dist/zh/guides/account-maps.html index d7d4d2080..d17f70a4c 100644 --- a/docs/.vuepress/dist/zh/guides/account-maps.html +++ b/docs/.vuepress/dist/zh/guides/account-maps.html @@ -23,7 +23,7 @@ } 账户映射 | Solana秘籍 - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/guides/data-migration.html b/docs/.vuepress/dist/zh/guides/data-migration.html index d4129a0c4..a2a83b6c4 100644 --- a/docs/.vuepress/dist/zh/guides/data-migration.html +++ b/docs/.vuepress/dist/zh/guides/data-migration.html @@ -23,7 +23,7 @@ } 迁移程序的数据账户 | Solana秘籍 - + @@ -676,6 +676,6 @@ } }

    在构建并提交指令VersionProgramInstruction::SetString(String)后,我们现在有了以下 "升级" 的账户数据布局。

    Program Account v2

    资料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/guides/debugging-solana-programs.html b/docs/.vuepress/dist/zh/guides/debugging-solana-programs.html index 502c4e2be..fabea95fb 100644 --- a/docs/.vuepress/dist/zh/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/zh/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } 调试 Solana 程序 | Solana秘籍 - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    在这里进行调试将允许你调试测试主体中使用的函数和方法,但不会在你的程序中设置断点。

    非常出色,不是吗?

    从客户端应用程序进行本地验证节点测试

    最后,你可以从命令行启动一个本地验证节点,并使用solana-test-validator加载你的程序和任何账户。

    在这种方法中,你需要一个客户端应用程序,可以使用Rust的 RcpClient,也可以使用 JavaScript or Typescript clients的客户端。

    有关更多详细信息和选项,请参阅solana-test-validator --help。对于这个示例程序,以下是基本设置:

    1. 在存储库文件夹中打开一个终端
    2. 运行solana config set -ul命令,将配置设置为指向本地
    3. 运行solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. 打开另一个终端并运行solana logs以启动日志流
    5. 然后,你可以运行客户端程序,并在您启动日志流的终端中观察程序输出

    那可真是太棒了!

    资料

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/guides/feature-parity-testing.html b/docs/.vuepress/dist/zh/guides/feature-parity-testing.html index 0be479f84..b5054a8ee 100644 --- a/docs/.vuepress/dist/zh/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/zh/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } 功能相等测试 | Solana秘籍 - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    愉快的测试!

    资料

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/guides/get-program-accounts.html b/docs/.vuepress/dist/zh/guides/get-program-accounts.html index 1371ecb2b..8feea89ee 100644 --- a/docs/.vuepress/dist/zh/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/zh/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } 获取程序帐户 | Solana秘籍 - + @@ -442,6 +442,6 @@ # "id": 1 # }

    通过组合这三个参数(dataSlicedataSizememcmp),我们可以限制查询的范围,并高效地返回我们想要的数据。

    其他资料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/guides/serialization.html b/docs/.vuepress/dist/zh/guides/serialization.html index 1e54c3ced..d1c9d998e 100644 --- a/docs/.vuepress/dist/zh/guides/serialization.html +++ b/docs/.vuepress/dist/zh/guides/serialization.html @@ -23,7 +23,7 @@ } 序列数据 | Solana秘籍 - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    资料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/guides/versioned-transactions.html b/docs/.vuepress/dist/zh/guides/versioned-transactions.html index e62ede178..02a57d8d0 100644 --- a/docs/.vuepress/dist/zh/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/zh/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } 版本化交易 (Versioned Transactions) | Solana秘籍 - + @@ -55,6 +55,6 @@ }, );

    其他资料

    参考资料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/index.html b/docs/.vuepress/dist/zh/index.html index 056eb0c25..652f568cf 100644 --- a/docs/.vuepress/dist/zh/index.html +++ b/docs/.vuepress/dist/zh/index.html @@ -23,11 +23,11 @@ } Solana秘籍 | Solana秘籍 - +

    Solana秘籍

    《Solana秘籍》力图为你提供在Solana公链上编写去中心化应用所需的核心概念、 参考。 每个概念和参考都会聚焦于Solana开发中的某个具体方面,同时提供额外的技术细节以及用例。

    贡献代码

    Solana秘籍的设计力图让新的Solana开发者也能容易的贡献代码。 即使你还不太了解如何做项目,贡献代码也是一个很好的学习过程!

    这里open in new window 可以查看所有待解决的issue。

    如果你觉得还有其他哪些建议,可以新建一个issue.

    如何阅读Solana秘籍

    Solana秘籍分为不同的章节。每个章节都有不同的目标。

    章节描述
    核心概念Solana的基础元素。开发者最好能了解这些内容。
    指南关于开发中所能用到的工具的简要介绍。
    参考常用的代码片段参考
    Last Updated:
    Contributors: Hipo, Jacob Creech
    - + diff --git a/docs/.vuepress/dist/zh/references/accounts.html b/docs/.vuepress/dist/zh/references/accounts.html index 639cd1dcc..24a2e9637 100644 --- a/docs/.vuepress/dist/zh/references/accounts.html +++ b/docs/.vuepress/dist/zh/references/accounts.html @@ -23,7 +23,7 @@ } 账户 | Solana秘籍 - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    ::: 贴士 如果你想获取代币余额,你需要知道代币账户的地址。如果像了解更多信息,请参考 Token References :::

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/basic-transactions.html b/docs/.vuepress/dist/zh/references/basic-transactions.html index ab6f325cd..4c0cb3c0a 100644 --- a/docs/.vuepress/dist/zh/references/basic-transactions.html +++ b/docs/.vuepress/dist/zh/references/basic-transactions.html @@ -23,7 +23,7 @@ } 发送交易 | Solana秘籍 - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/keypairs-and-wallets.html b/docs/.vuepress/dist/zh/references/keypairs-and-wallets.html index d6bbd79f7..4408f73f4 100644 --- a/docs/.vuepress/dist/zh/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/zh/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } 密钥对和钱包 | Solana秘籍 - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (多个钱包,也叫HD钱包)

    你可以从一个单一种子生成多个钱包,也被称为“分层确定性钱包”或HD钱包。

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    运行以下命令来安装所需的依赖项:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    运行以下命令来安装所需的依赖项:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new window 包允许我们在使用Svelte模板或SvelteKit创建的项目中,在所有JS、TS或/和Svelte文件之间添加一个可访问的Svelte Store($walletStore)。使用 此处open in new window 的存储库引用,您可以在SSR或SPA中使用适配器。UI包含一个<WalletMultiButton />组件,允许用户选择一个钱包并连接到它。

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: lillianrf
    - +
    Last Updated:
    Contributors: Steven Luscher, lillianrf
    + diff --git a/docs/.vuepress/dist/zh/references/local-development.html b/docs/.vuepress/dist/zh/references/local-development.html index febfffafe..31910693f 100644 --- a/docs/.vuepress/dist/zh/references/local-development.html +++ b/docs/.vuepress/dist/zh/references/local-development.html @@ -23,7 +23,7 @@ } 本地开发 | Solana秘籍 - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/name-service.html b/docs/.vuepress/dist/zh/references/name-service.html index 1de8287b1..f08a6738f 100644 --- a/docs/.vuepress/dist/zh/references/name-service.html +++ b/docs/.vuepress/dist/zh/references/name-service.html @@ -23,7 +23,7 @@ } 命名服务 | Solana秘籍 - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/nfts.html b/docs/.vuepress/dist/zh/references/nfts.html index 7b9f1fa4c..53ec20c37 100644 --- a/docs/.vuepress/dist/zh/references/nfts.html +++ b/docs/.vuepress/dist/zh/references/nfts.html @@ -23,7 +23,7 @@ } 非同质化代币 (NFTs) | Solana秘籍 - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/offline-transactions.html b/docs/.vuepress/dist/zh/references/offline-transactions.html index 641acebff..9a75a568e 100644 --- a/docs/.vuepress/dist/zh/references/offline-transactions.html +++ b/docs/.vuepress/dist/zh/references/offline-transactions.html @@ -23,7 +23,7 @@ } 发送离线交易 | Solana秘籍 - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/programs.html b/docs/.vuepress/dist/zh/references/programs.html index 9508dab26..f4b90e297 100644 --- a/docs/.vuepress/dist/zh/references/programs.html +++ b/docs/.vuepress/dist/zh/references/programs.html @@ -23,7 +23,7 @@ } 编写程序 | Solana秘籍 - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    对应的客户端代码如下所示:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    对应的客户端代码如下所示:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/staking.html b/docs/.vuepress/dist/zh/references/staking.html index b2e81d650..4106dd2f0 100644 --- a/docs/.vuepress/dist/zh/references/staking.html +++ b/docs/.vuepress/dist/zh/references/staking.html @@ -23,7 +23,7 @@ } 质押 | Solana秘籍 - + @@ -767,6 +767,6 @@ // total stake amount console.log(`Stake amount for this wallet in lamports: ${totalStakeBalance}`);
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh/references/token.html b/docs/.vuepress/dist/zh/references/token.html index 0d97ddafd..2f0423ecf 100644 --- a/docs/.vuepress/dist/zh/references/token.html +++ b/docs/.vuepress/dist/zh/references/token.html @@ -23,7 +23,7 @@ } 与代币互动 | Solana秘籍 - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/core-concepts/accounts.html b/docs/.vuepress/dist/zh_t/core-concepts/accounts.html index 4b8be9c46..cc45e3798 100644 --- a/docs/.vuepress/dist/zh_t/core-concepts/accounts.html +++ b/docs/.vuepress/dist/zh_t/core-concepts/accounts.html @@ -23,11 +23,11 @@ } 賬戶 | Solana Cookbook - +

    賬戶

    在Solana中,賬戶是用來存儲狀態的。賬戶是Solana開發中非常重要的構成要素。

    綜述

    要點

    • 賬戶是用來存放數據的
    • 每個賬戶都有一個獨一無二的地址
    • 每個賬戶大小不能超過10MB
    • 程序派生賬戶大小不能超過10KB
    • 程序派生賬戶可以用其對應程序進行簽名
    • 賬戶大小是靜態的
    • 賬戶數據存儲需要付租金
    • 默認的賬戶所有者是"系統程序"

    深入

    賬戶模型

    在Solana中有三類賬戶:

    • 數據賬戶,用來存儲數據
    • 程序賬戶,用來存儲可執行程序
    • 原生賬戶,指Solana上的原生程序,例如"System","Stake",以及"Vote"。

    數據賬戶又分爲兩類:

    • 系統所有賬戶
    • 程序派生賬戶(PDA)

    每個賬戶都有一個地址(一般情況下是一個公鑰)以及一個所有者(程序賬戶的地址)。 下面詳細列出一個賬戶存儲的完整字段列表。

    字段描述
    lamports這個賬戶擁有的lamport(蘭波特)數量
    owner這個賬戶的所有者程序
    executable這個賬戶成是否可以處理指令
    data這個賬戶存儲的數據的字節碼
    rent_epoch下一個需要付租金的epoch(代)

    關於所有權,有幾條重要的規則:

    • 只有賬戶的所有者才能改變賬戶中的數據,提取lamport
    • 任何人都可以向數據賬戶中存入lamport
    • 當賬戶中的數據被抹除之後,賬戶的所有者可以指定新的所有者

    程序賬戶不儲存狀態。

    例如,假設有一個計數程序,這個程序用來爲一個計數器加數,你需要創建兩個賬戶,一個用於存儲程序的代碼, 另一個用於存儲計數器本身。

    爲了避免賬戶被刪除,必須付租金。

    租金

    在賬戶中存儲數據需要花費SOL來維持,這部分花費的SOL被稱作租金。如果你在一個賬戶中存入大於兩年租金的SOL, 這個賬戶就可以被豁免付租。租金可以通過關閉賬戶的方式來取回。lamport會被返還回你的錢包。

    租金在這兩個不同的時間點被支取:

    1. 被一個交易引用的時候
    2. epoch更迭時

    收取的租金,一定百分比會被銷燬,另一部分會在每個slot(插槽)結束時被分配給投票賬戶。

    當一個賬戶沒有足夠的餘額支付租金時,這個賬戶會被釋放,數據會被清除。

    其他資料

    致謝

    這些核心概念來源於Pencilflip. 在Twitter上關注他open in new window.

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/core-concepts/pdas.html b/docs/.vuepress/dist/zh_t/core-concepts/pdas.html index 1db6660b9..32c5200ec 100644 --- a/docs/.vuepress/dist/zh_t/core-concepts/pdas.html +++ b/docs/.vuepress/dist/zh_t/core-concepts/pdas.html @@ -23,11 +23,11 @@ } 程序派生賬戶 (PDA) | Solana Cookbook - +

    程序派生賬戶(PDA)

    程序派生賬戶(PDA)是爲了讓特定程序可以控制一些賬戶而設計出來的。使用PDA,程序可以通過編程方法爲一些地址進行簽名,而不一定用到私鑰。 PDA是Cross-Program Invocation(跨程序調用)open in new window的基礎, 這個功能讓Solana的app可以跟其他app進行組合。

    綜述

    要點

    • PDA是長度爲32的字節串,看起來和公鑰很像,但是並沒有與之對應的私鑰
    • findProgramAddress可以針對一個programId(程序id)和seeds(種子)唯一確定的生成一個PDA。這裏的seeds(種子)是一組指定的字節串
    • 一個跳躍(一個字節)用於將候選PDA推離ed25519橢圓曲線
    • 程序通過傳入種子和跳躍參數,調用invoke_signedopen in new window爲PDA進行簽名
    • PDA只能被用來派生出這個地址的程序所簽名
    • 除了允許程序爲不同的instruction簽名之外,PDA還提供了一個像哈希表一樣的接口,用於建立賬戶索引

    深入

    PDA是Solana程序開發的重要構成要素。有了PDA,程序可以爲賬戶簽名,同時保證沒有外部用戶能夠產生針對同一個賬戶的有效簽名。 除了爲賬戶簽名外,一些程序還可以修改自己派生出來的PDA裏的數據。

    Accounts matrix

    图片来源:Pencilflip

    生成PDA

    爲了更好的理解PDA的概念,可以認爲PDA從技術角度講並不是創建出來的,而是找到的。PDA由一組種子(例如字符串"vote_account")以及程序id生成。 這組種子和程序id接下來會放到sha256哈希函數中執行一遍,檢查他們產生的公鑰是否落在ed25519橢圓曲線上。

    在程序id和種子上運行哈希函數時,有大約50%的概率會得到在一個落在橢圓曲線上有效的公鑰。這種情況下,我們需要向輸入當中加點擾動,略微改變輸入,再進行重試。 這個擾動的技術名稱叫bump(跳躍)。在Solana中,我們一開始指定bump = 255,然後向下迭代bump,到254,253等等。知道我們能夠找到一個不在橢圓曲線上的地址爲止。 這個看起來簡陋的辦法可以讓我們每次生成PDA的時候都能夠得到唯一確定的結果。

    落在橢圓曲線上的PDA

    與PDA交互

    生成PDA的時候,findProgramAddress會把得到的地址和用來將PDA碰撞出橢圓曲線所用的bump都返回出來。 有了這個bump,程序就可以對任何需要這個PDA地址的指令進行簽名。簽名時,程序調用invoke_signed函數,傳入指令,賬戶列表,以及用於生成PDA的種子和bump。 除了爲指令簽名之外,PDA在他自己通過invoke_signed函數被創建時,也需要簽名。

    在使用PDA編寫程序時,經常會將這個bump存儲在這個賬戶本身的數據當中open in new window。 這種機制可以讓開發者輕易的對PDA進行驗證,而不用重新在指令參數當中傳入這個值。

    其他資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/core-concepts/programs.html b/docs/.vuepress/dist/zh_t/core-concepts/programs.html index 1ae6d9d4e..377a86d9e 100644 --- a/docs/.vuepress/dist/zh_t/core-concepts/programs.html +++ b/docs/.vuepress/dist/zh_t/core-concepts/programs.html @@ -23,12 +23,12 @@ } 程序 | Solana Cookbook - +

    程序

    任何開發者都可以在Solana鏈上編寫以及部署程序。Solana程序(在其他鏈上叫做智能合約),是所有鏈上活動的基礎。 鏈上的一切活動,從去中心化金融(DeFi),到非同質化代幣(NFT),再到社交媒體,鏈上游戲,都由Solana程序所驅動。

    綜述

    要點

    • 程序可以處理來自用戶和其他程序的指令
    • 所有的程序都是無狀態的:所有的和程序交互的數據都是存儲在獨立的賬戶中。執行時,這些賬戶藉由指令傳入程序
    • 程序本身存儲在標記爲executable(可執行)的賬戶中。
    • 任何程序的所有者都是BPF Loaderopen in new window and executed by the Solana Runtimeopen in new window
    • 開發者通常使用Rust或C++來編寫程序,也可以採用任何其他可以編譯爲LLVMopen in new windowBPFopen in new window後端的語言
    • 所有的程序都有一個單獨的入口點,指令的執行就是從這裏開始的(亦即process_instruction)。參數須包括:
      • program_id: pubkey (公鑰)
      • accounts: array (數組)
      • instruction_data: byte array (字節數組)

    深入

    與其他鏈不同,Solana將代碼與數據完全分開。 程序需要訪問的全部數據都存儲在獨立的賬戶中,在指令中這些賬戶需要以引用的方式傳入。 這種模式使得一個通用的程序可以在不同的賬戶上運行,而不用爲此額外部署程序。 這種模式的例子很常見,包括了"原生程序"以及"SPL程序"等。

    原生程序和Solana程序庫(SPL)

    Solana自帶一系列程序,這些程序是鏈上交互的核心構成要素。 這些程序分爲原生程序open in new windowSolana程序庫(SPL程序)open in new window

    原生程序提供了運行驗證節點(validator)所需的功能。原生程序中最廣爲人知的是System Programopen in new window。 這個程序負責管理建立新賬戶以及在兩個賬戶之間轉賬SOL。

    SPL程序定義了一系列的鏈上活動,其中包括針對代幣的創建,交換,借貸,以及創建質押池,維護鏈上域名解析服務等。 SPL Token Program(SPL代幣程序)open in new window可以直接在命令行調用,其他的一些,如 Associated Token Account Program(關聯代幣賬戶程序)open in new window, 則常被用於編寫其他定製程序。

    編寫程序

    編寫Solana程序常用的是Rust和C++,但是也可以使用其他可以編譯爲LLVM的BPF後端的語言。 最近Neon Labsopen in new windowSolangopen in new window發起了一個項目, 旨在建立Solana的EVMopen in new window兼容性,進而讓開發者可以使用Solidity編寫程序。

    大部分Rust編寫的程序遵循以下架構:

    文件描述
    lib.rs註冊模塊
    entrypoint.rs程序的入口點
    instruction.rs程序的API, 對指令的數據進行序列化與反序列化
    processor.rs程序的業務邏輯
    state.rs程序對象,對狀態進行反序列化
    error.rs程序中制定的錯誤

    最近,Anchoropen in new window逐漸成爲了一個廣受歡迎的Solana程序開發框架。 Anchor是一個有態度的框架,與Ruby on Rails相似,這個框架旨在減少模式化的代碼,將Rust開發流程中的序列化與反序列化過程流水線化。

    在部署到Testnet(測試網)和Mainnet(主網)之前,程序在開發和測試階段經常使用Localhost和Devnet(開發網)環境。 Solana支持以下的幾個環境:

    集羣環境RPC連接URL
    Mainnet-betahttps://api.mainnet-beta.solana.com
    Testnethttps://api.testnet.solana.com
    Devnethttps://api.devnet.solana.com
    Localhost默認端口:8899(例如,http://localhost:8899,http://192.168.1.88:8899)

    部署到一個環境之後,客戶端就可以通過對應集羣的RPC連接open in new window與鏈上程序進行交互。

    部署程序

    開發者可以使用命令行open in new window部署程序:

    solana program deploy <PROGRAM_FILEPATH>
     

    部署程序的時候,程序會被編譯爲包含BPF字節碼的ELF共享對象open in new window,並上傳到Solana集羣上。 和Solana上其他的任何東西一樣,程序儲存在賬戶當中。唯一的特殊之處是,這些賬戶標記爲executable(可執行),並且其所有者是"BPF Loader(BPF加載器)"。 這個賬戶的地址被稱爲program_id,在後面的一切交易當中,用於指代這個程序。

    Solana支持多種BPF加載器,最新的是Upgradable BPF Loaderopen in new window。 BPF加載器負責管理程序賬戶,讓客戶端可以通過其program_id對程序進行訪問。每個程序都只有一個入口點,這裏對指令進行處理。這裏的參數須包括:

    • program_id: pubkey(公鑰)
    • accounts: array(數組)
    • instruction_data: byte array(字節數組)

    當程序被調用時,會在Solana運行庫中被執行。

    其他資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/core-concepts/transactions.html b/docs/.vuepress/dist/zh_t/core-concepts/transactions.html index abf18937c..cf4d0e723 100644 --- a/docs/.vuepress/dist/zh_t/core-concepts/transactions.html +++ b/docs/.vuepress/dist/zh_t/core-concepts/transactions.html @@ -23,11 +23,11 @@ } 交易 | Solana Cookbook - +

    交易

    客戶端可以通過向一個集羣提交交易來調用程序。一個交易可以包含多個指令,每個指令可以針對不同的程序。 交易提交時,Solana運行庫open in new window會自動的按順序處理這些指令。 如果某一個指令中的任何一個部分失敗,整個交易就會失敗。

    概述

    要點

    • 指令是Solana上最基本的操作單元
    • 每個指令都包含:
      • program_id:所針對的程序的id
      • accounts:需要讀或寫的全部賬戶組成的數組
      • instruction_data:向指定程序所傳輸的數據的字節碼
    • 多個指令可以被打包進入同一個交易當中
    • 每個交易都包含:
      • instructions:一個或多個指令
      • blockhash:最新的塊哈希值
      • signatures:一個或多個簽名
    • 指令會被自動的按順序執行
    • 如果一個指令的任何一部分失敗,整個交易就會失敗
    • 交易的大小限制在1232字節以內

    深入

    在Solana運行庫中,指令和交易都需要先指定全部需要讀寫訪問的賬戶列表。 通過事先指定賬戶列表,運行庫可以對交易的執行做並行化處理。

    當交易被提交到集羣時,運行庫會自動的按照順序處理這些指令。對於每個指令,接收這個指令的程序會解析指令中的數據字段,在指定的賬戶上進行操作。 程序要麼執行成功,要麼會返回一個錯誤碼。如果返回了一個錯誤碼,整個交易都會立即失敗。

    任何交易,只要針對一個賬戶扣除SOL,或者修改其中的數據,都需要這個賬戶擁有者的簽名。 在交易中,會被修改的賬戶都會被標記爲writable(可寫)。 當交易的付費者支付了足夠的租金和交易費用時,一個賬戶可以被存入SOL而不用這個賬戶擁有者的許可。

    提交之前,每個交易需要引用一個recent blockhash(最新塊哈希)open in new window。 塊哈希被用於去重,以及移除過期交易。一個塊哈希的最大壽命是150個區塊,成文時這個時間大約是1分鐘19秒。

    費用

    Solana網絡收取兩種費用:

    在Solana中,交易費是確定的。並沒有費率競價的概念,用戶無法通過增加交易費的方式增加自己的交易被打包進下一個區塊的概率。 在成文時,交易費只與交易所需的簽名數量相關(參見lamports_per_signature),與交易所使用的資源無關。 這是因爲目前所有交易都有一個嚴格的1232字節的限制。

    每個交易都需要至少有一個writable(可寫)的賬戶,用於爲交易簽名。這個賬戶無論交易成功與否都需要爲交易成本付費。 如果付費者沒有足夠爲交易付費的餘額,這個交易就會被丟棄。

    成文時,50%的交易費被出塊的驗證節點收取,剩下的50%被燃燒掉。這樣的結構會激勵驗證節點在leader schedule(領導時間表)規定的屬於自己的slot(插槽)中處理儘可能多的交易。

    其他資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/getting-started/installation.html b/docs/.vuepress/dist/zh_t/getting-started/installation.html index fc618ae48..a7e976b06 100644 --- a/docs/.vuepress/dist/zh_t/getting-started/installation.html +++ b/docs/.vuepress/dist/zh_t/getting-started/installation.html @@ -23,12 +23,12 @@ } 安裝 | Solana Cookbook - + -

    安裝Web3.js

    用JavaScript或者TypeScript進行Solana編程時,你會用到下面的幾個庫。

    Web3.js

    @solana/web3.jsopen in new window 這個庫提供了很多用於與Solana交互,發送交易,從區塊鏈上讀取數據等操作的基礎功能。

    可以用以下命令安裝:

    yarn add @solana/web3.js
    -
    npm install --save @solana/web3.js
    +    

    安裝Web3.js

    用JavaScript或者TypeScript進行Solana編程時,你會用到下面的幾個庫。

    Web3.js

    @solana/web3.jsopen in new window 這個庫提供了很多用於與Solana交互,發送交易,從區塊鏈上讀取數據等操作的基礎功能。

    可以用以下命令安裝:

    yarn add @solana/web3.js@1
    +
    npm install --save @solana/web3.js@1
     
    <!-- Development (un-minified) -->
     <script src="https://unpkg.com/@solana/web3.js@latest/lib/index.iife.js"></script>
     
    @@ -70,7 +70,7 @@
     

    從源碼編譯

    如果你不能使用預編譯的二進制文件,或者希望自己從源碼進行編譯,可以訪問 https://github.com/solana-labs/solana/releases/latestopen in new window, 下載Source Code壓縮包。解壓代碼,用以下命令編譯二進制文件:

    ./scripts/cargo-install-all.sh .
     export PATH=$PWD/bin:$PATH
     

    然後運行以下命令,可以和預編譯二進制文件獲得一樣的結果:

    solana-install init
    -
    Last Updated:
    Contributors: lillianrf
    - +
    Last Updated:
    Contributors: Steven Luscher, lillianrf
    + diff --git a/docs/.vuepress/dist/zh_t/guides/account-maps.html b/docs/.vuepress/dist/zh_t/guides/account-maps.html index 5dec4d6dd..b3f400687 100644 --- a/docs/.vuepress/dist/zh_t/guides/account-maps.html +++ b/docs/.vuepress/dist/zh_t/guides/account-maps.html @@ -23,7 +23,7 @@ } 賬戶映射 | Solana Cookbook - + @@ -1136,6 +1136,6 @@ tx.add(insertBCIx); tx.add(insertCAIx);
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/guides/data-migration.html b/docs/.vuepress/dist/zh_t/guides/data-migration.html index 281748bce..3e02a4983 100644 --- a/docs/.vuepress/dist/zh_t/guides/data-migration.html +++ b/docs/.vuepress/dist/zh_t/guides/data-migration.html @@ -23,7 +23,7 @@ } 遷移程序的數據賬戶 | Solana Cookbook - + @@ -676,6 +676,6 @@ } }

    在構建並提交指令VersionProgramInstruction::SetString(String)後,我們現在有了以下 "升級" 的賬戶數據佈局。

    Program Account v2

    資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/guides/debugging-solana-programs.html b/docs/.vuepress/dist/zh_t/guides/debugging-solana-programs.html index bef55a7b9..82e59c46a 100644 --- a/docs/.vuepress/dist/zh_t/guides/debugging-solana-programs.html +++ b/docs/.vuepress/dist/zh_t/guides/debugging-solana-programs.html @@ -23,7 +23,7 @@ } 調試 Solana 程序 | Solana Cookbook - + @@ -48,6 +48,6 @@ test test_validator_transaction ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 6.40s

    在這裏進行調試將允許你調試測試主體中使用的函數和方法,但不會在你的程序中設置斷點。

    非常出色,不是嗎?

    從客戶端應用程序進行本地驗證節點測試

    最後,你可以從命令行啓動一個本地驗證節點,並使用solana-test-validator加載你的程序和任何賬戶。

    在這種方法中,你需要一個客戶端應用程序,可以使用Rust的 RcpClient,也可以使用 JavaScript or Typescript clients的客戶端。

    有關更多詳細信息和選項,請參閱solana-test-validator --help。對於這個示例程序,以下是基本設置:

    1. 在存儲庫文件夾中打開一個終端
    2. 運行solana config set -ul命令,將配置設置爲指向本地
    3. 運行solana-test-validator --bpf-program target/deploy/bpf_program_template-keypair.json target/deploy/bpf_program_template.so
    4. 打開另一個終端並運行solana logs以啓動日誌流
    5. 然後,你可以運行客戶端程序,並在您啓動日誌流的終端中觀察程序輸出

    那可真是太棒了!

    資料

    solana-program-bpf-templateopen in new window

    RcpClientopen in new window

    JavaScript/Typescript Libraryopen in new window

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/guides/feature-parity-testing.html b/docs/.vuepress/dist/zh_t/guides/feature-parity-testing.html index 77c063bc3..f5cfe4d74 100644 --- a/docs/.vuepress/dist/zh_t/guides/feature-parity-testing.html +++ b/docs/.vuepress/dist/zh_t/guides/feature-parity-testing.html @@ -23,7 +23,7 @@ } 功能相等測試 | Solana Cookbook - + @@ -302,6 +302,6 @@ assert!(txn.is_ok()); }

    愉快的測試!

    資料

    scfsdopen in new window

    gadget-scfsopen in new window

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/guides/get-program-accounts.html b/docs/.vuepress/dist/zh_t/guides/get-program-accounts.html index 22b3509ca..d2957fe45 100644 --- a/docs/.vuepress/dist/zh_t/guides/get-program-accounts.html +++ b/docs/.vuepress/dist/zh_t/guides/get-program-accounts.html @@ -23,7 +23,7 @@ } 獲取程序帳戶 | Solana Cookbook - + @@ -442,6 +442,6 @@ # "id": 1 # }

    通過組合這三個參數(dataSlicedataSizememcmp),我們可以限制查詢的範圍,並高效地返回我們想要的數據。

    其他資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/guides/serialization.html b/docs/.vuepress/dist/zh_t/guides/serialization.html index 0822ae534..6d9859ce6 100644 --- a/docs/.vuepress/dist/zh_t/guides/serialization.html +++ b/docs/.vuepress/dist/zh_t/guides/serialization.html @@ -23,7 +23,7 @@ } 序列數據 | Solana Cookbook - + @@ -762,7 +762,7 @@ } entry(); -
    from borsh_construct import U8, U16, U32, String, HashMap
    +
    from borsh_construct import U8, U16, U32, CStruct, String, HashMap
     
     # Schema to deserialize various types
     primitive_schema = CStruct(
    @@ -1016,6 +1016,6 @@
         }
     }
     

    資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/guides/versioned-transactions.html b/docs/.vuepress/dist/zh_t/guides/versioned-transactions.html index 0f8733e8c..50b724eb5 100644 --- a/docs/.vuepress/dist/zh_t/guides/versioned-transactions.html +++ b/docs/.vuepress/dist/zh_t/guides/versioned-transactions.html @@ -23,7 +23,7 @@ } 版本化交易 (Versioned Transactions) | Solana Cookbook - + @@ -55,6 +55,6 @@ }, );

    其他資料

    參考資料

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/index.html b/docs/.vuepress/dist/zh_t/index.html index d7556eacd..790563a5c 100644 --- a/docs/.vuepress/dist/zh_t/index.html +++ b/docs/.vuepress/dist/zh_t/index.html @@ -23,11 +23,11 @@ } Solana祕籍 | Solana Cookbook - +

    Solana祕籍

    《Solana祕籍》力圖爲你提供在Solana公鏈上編寫去中心化應用所需的核心概念、 參考。 每個概念和參考都會聚焦於Solana開發中的某個具體方面,同時提供額外的技術細節以及用例。

    貢獻代碼

    Solana祕籍的設計力圖讓新的Solana開發者也能容易的貢獻代碼。 即使你還不太瞭解如何做項目,貢獻代碼也是一個很好的學習過程!

    這裏open in new window 可以查看所有待解決的issue。

    如果你覺得還有其他哪些建議,可以新建一個issue.

    如何閱讀Solana祕籍

    Solana祕籍分爲不同的章節。每個章節都有不同的目標。

    章節描述
    核心概念Solana的基礎元素。開發者最好能瞭解這些內容。
    指南關於開發中所能用到的工具的簡要介紹。
    參考常用的代碼片段參考
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/accounts.html b/docs/.vuepress/dist/zh_t/references/accounts.html index 213febf30..067d3faa4 100644 --- a/docs/.vuepress/dist/zh_t/references/accounts.html +++ b/docs/.vuepress/dist/zh_t/references/accounts.html @@ -23,7 +23,7 @@ } 賬戶 | Solana Cookbook - + @@ -1075,6 +1075,6 @@ uint64_t balance = connection.get_balance(public_key).unwrap();

    TIP

    如果你想獲取代幣餘額,你需要知道代幣賬戶的地址。如果像瞭解更多信息,請參考 Token References

    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/basic-transactions.html b/docs/.vuepress/dist/zh_t/references/basic-transactions.html index 8ec789c31..04b0da3f3 100644 --- a/docs/.vuepress/dist/zh_t/references/basic-transactions.html +++ b/docs/.vuepress/dist/zh_t/references/basic-transactions.html @@ -23,7 +23,7 @@ } 發送交易 | Solana Cookbook - + @@ -97,8 +97,9 @@ lamports=1_000_000) )) -client.send_transaction(transaction, sender) -
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/keypairs-and-wallets.html b/docs/.vuepress/dist/zh_t/references/keypairs-and-wallets.html index 73a7862eb..5d72cc7e0 100644 --- a/docs/.vuepress/dist/zh_t/references/keypairs-and-wallets.html +++ b/docs/.vuepress/dist/zh_t/references/keypairs-and-wallets.html @@ -23,7 +23,7 @@ } 密鑰對和錢包 | Solana Cookbook - + @@ -34,9 +34,15 @@ })();
    from solders.keypair import Keypair
    +import based58
     
     keypair = Keypair()
    -
    // clang++ generate_keypair.cpp -o generate_keypair -std=c++17 -lssl -lcrypto -lsodium
     
     #include "solana.hpp"
    @@ -167,10 +173,10 @@
     
    from solders.keypair import Keypair
     
     b58_string = "5MaiiCavjCmn9Hs1o3eznqDEhRwxo7pXiAYez7keQUviUkauRiTMD8DrESdrNjN8zd9mTmVhRvBJeg5vhyvgrAhG"
    -keypair = Keypair.from_string(b58_string)
    +keypair = Keypair.from_base58_string(b58_string)
     print("Created Keypair with Public Key: {}".format(keypair.pubkey()))
     
    use solana_sdk::signature::{Keypair, Signer};
     
     fn main() {
    @@ -296,8 +302,11 @@
     off_curve_address = Pubkey.from_string('4BJXYkfvg37zEmBbsacZjeQDpTNx91KppxFJxRqrz48e') # Valid public key
     print(off_curve_address.is_on_curve()) # Not on the ed25519 curve, therefore not suitable for users
     
    -error_pubkey = Pubkey.from_string("testPubkey"); # Is not a valid public key
    -
    #include <iostream>
     #include <solana_sdk.h>
    @@ -335,7 +344,8 @@
     
     mnemo = Mnemonic("english")
     words = mnemo.generate(strength=256)
    -
    solana-keygen new
     
    solana-keygen recover
    +
    solana-keygen recover
     
    1. BIP44 (多個錢包,也叫HD錢包)

    你可以從一個單一種子生成多個錢包,也被稱爲“分層確定性錢包”或HD錢包。

    Press </> button to view full source
    import { Keypair } from "@solana/web3.js";
     import { HDKey } from "micro-ed25519-hdkey";
    @@ -482,7 +495,7 @@
     signature = keypair.sign_message(message)
     verify_sign = signature.verify(keypair.pubkey(), message)
     
    -print(verify_sign) # bool
    +print(verify_sign) # True
     

    Svelte

    運行以下命令來安裝所需的依賴項:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js
    +

    Svelte

    運行以下命令來安裝所需的依賴項:

    npm install @svelte-on-solana/wallet-adapter-core @svelte-on-solana/wallet-adapter-ui @solana/wallet-adapter-base @solana/wallet-adapter-wallets @solana/web3.js@1
     

    Svelte Wallet Adapteropen in new window 包允许我们在使用Svelte模板或SvelteKit创建的项目中,在所有JS、TS或/和Svelte文件之间添加一个可访问的Svelte Store($walletStore)。使用 此处open in new window 的存储库引用,您可以在SSR或SPA中使用适配器。UI包含一个<WalletMultiButton />组件,允许用户选择一个钱包并连接到它。

    Press </> button to view full source
    <script>
       import { walletStore } from "@svelte-on-solana/wallet-adapter-core";
       import {
    @@ -674,7 +687,7 @@
     successfully connected! {:else}
     <WalletMultiButton />
     {/if}
    -
    Last Updated:
    Contributors: lillianrf
    - +
    Last Updated:
    Contributors: Steven Luscher, lillianrf
    + diff --git a/docs/.vuepress/dist/zh_t/references/local-development.html b/docs/.vuepress/dist/zh_t/references/local-development.html index 3886a115d..cbab82db5 100644 --- a/docs/.vuepress/dist/zh_t/references/local-development.html +++ b/docs/.vuepress/dist/zh_t/references/local-development.html @@ -23,7 +23,7 @@ } 本地開發 | Solana Cookbook - + @@ -352,6 +352,6 @@ solana-test-validator --bpf-program 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin serum_dex_v3.so --reset
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/name-service.html b/docs/.vuepress/dist/zh_t/references/name-service.html index 789a2cca4..684e03445 100644 --- a/docs/.vuepress/dist/zh_t/references/name-service.html +++ b/docs/.vuepress/dist/zh_t/references/name-service.html @@ -23,7 +23,7 @@ } 命名服務 | Solana Cookbook - + @@ -260,6 +260,6 @@ const registry = await getTwitterRegistry(connection, handle);
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/nfts.html b/docs/.vuepress/dist/zh_t/references/nfts.html index 54a20c35e..83e0ad144 100644 --- a/docs/.vuepress/dist/zh_t/references/nfts.html +++ b/docs/.vuepress/dist/zh_t/references/nfts.html @@ -23,7 +23,7 @@ } 非同質化代幣 (NFTs) | Solana Cookbook - + @@ -838,6 +838,6 @@ // newOwner: new PublicKey("some-other-public-key"); });
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/offline-transactions.html b/docs/.vuepress/dist/zh_t/references/offline-transactions.html index 7f975b06e..cccfb2bda 100644 --- a/docs/.vuepress/dist/zh_t/references/offline-transactions.html +++ b/docs/.vuepress/dist/zh_t/references/offline-transactions.html @@ -23,7 +23,7 @@ } 發送離線交易 | Solana Cookbook - + @@ -288,11 +288,12 @@ NONCE_ACCOUNT_LENGTH, SystemProgram, LAMPORTS_PER_SOL, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { // Setup our connection and wallet - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); const feePayer = Keypair.generate(); // Fund our wallet with 1 SOL @@ -326,10 +327,13 @@ ); console.log( - `txhash: ${await connection.sendTransaction(tx, [feePayer, nonceAccount])}` + `txhash: ${await sendAndConfirmTransaction(connection, tx, [ + feePayer, + nonceAccount, + ])}` ); })(); -
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/programs.html b/docs/.vuepress/dist/zh_t/references/programs.html index 38f8a70c2..62f414afa 100644 --- a/docs/.vuepress/dist/zh_t/references/programs.html +++ b/docs/.vuepress/dist/zh_t/references/programs.html @@ -23,7 +23,7 @@ } 編寫程序 | Solana Cookbook - + @@ -273,19 +273,29 @@ SystemProgram, Transaction, TransactionInstruction, -} from "@solana/web3.js"; + sendAndConfirmTransaction, +} from '@solana/web3.js'; (async () => { const programId = new PublicKey( - "4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk" + '4ZEdbCtb5UyCSiAMHV5eSHfyjq3QwbG3yXb6oHD7RYjk' ); - const connection = new Connection(clusterApiUrl("devnet"), "confirmed"); + const connection = new Connection(clusterApiUrl('devnet'), 'confirmed'); + const latestBlockHash = await connection.getLatestBlockhash(); // Airdropping 1 SOL const feePayer = Keypair.generate(); await connection.confirmTransaction( - await connection.requestAirdrop(feePayer.publicKey, LAMPORTS_PER_SOL) + { + blockhash: latestBlockHash.blockhash, + lastValidBlockHeight: latestBlockHash.lastValidBlockHeight, + signature: await connection.requestAirdrop( + feePayer.publicKey, + LAMPORTS_PER_SOL + ), + }, + 'confirmed' ); // Hello state account @@ -324,14 +334,14 @@ const transaction = new Transaction(); transaction.add(allocateHelloAccountIx, initIx); - const txHash = await connection.sendTransaction(transaction, [ + const txHash = await sendAndConfirmTransaction(connection, transaction, [ feePayer, helloAccount, ]); console.log(`Transaction succeeded. TxHash: ${txHash}`); })(); -

    對應的客戶端代碼如下所示:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from "@solana/web3.js";
    -import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from "@solana/web3.js";
    -import { Transaction, TransactionInstruction } from "@solana/web3.js";
    +

    對應的客戶端代碼如下所示:

    Press </> button to view full source
    import { clusterApiUrl, Connection, Keypair } from '@solana/web3.js';
    +import { LAMPORTS_PER_SOL, PublicKey, SystemProgram } from '@solana/web3.js';
    +import {
    +  Transaction,
    +  TransactionInstruction,
    +  sendAndConfirmTransaction,
    +} from '@solana/web3.js';
     
    -import * as BN from "bn.js";
    +import * as BN from 'bn.js';
     
     // Users
     const PAYER_KEYPAIR = Keypair.generate();
     const GENERAL_STATE_KEYPAIR = Keypair.generate();
     
     const ACCOUNT_SPACE_BUFFER = Buffer.from(
    -  Uint8Array.of(...new BN(100).toArray("le", 8))
    +  Uint8Array.of(...new BN(100).toArray('le', 8))
     );
     
     (async () => {
    -  const connection = new Connection(clusterApiUrl("devnet"), "confirmed");
    +  const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');
    +  const latestBlockHash = await connection.getLatestBlockhash();
       const programId = new PublicKey(
    -    "DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ"
    +    'DkuQ5wsndkzXfgqDB6Lgf4sDjBi4gkLSak1dM5Mn2RuQ'
       );
     
    -  // Airdropping some SOL
    +  // Airdropping 1 SOL
    +  const feePayer = Keypair.generate();
       await connection.confirmTransaction(
    -    await connection.requestAirdrop(PAYER_KEYPAIR.publicKey, LAMPORTS_PER_SOL)
    +    {
    +      blockhash: latestBlockHash.blockhash,
    +      lastValidBlockHeight: latestBlockHash.lastValidBlockHeight,
    +      signature: await connection.requestAirdrop(
    +        feePayer.publicKey,
    +        LAMPORTS_PER_SOL
    +      ),
    +    },
    +    'confirmed'
       );
     
       // Our program's CPI instruction (create_account)
    @@ -987,14 +1011,14 @@
       // Adding up all the above instructions
       transaction.add(createAccountIx);
     
    -  const txHash = await connection.sendTransaction(transaction, [
    +  const txHash = await sendAndConfirmTransaction(connection, transaction, [
         PAYER_KEYPAIR,
         GENERAL_STATE_KEYPAIR,
       ]);
     
       console.log(`Create Account CPI Success: ${txHash}`);
     })();
    -
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/staking.html b/docs/.vuepress/dist/zh_t/references/staking.html index de48fb4da..0242f1ce5 100644 --- a/docs/.vuepress/dist/zh_t/references/staking.html +++ b/docs/.vuepress/dist/zh_t/references/staking.html @@ -23,7 +23,7 @@ } 質押 | Solana Cookbook - + @@ -767,6 +767,6 @@ // total stake amount console.log(`Stake amount for this wallet in lamports: ${totalStakeBalance}`);
    Last Updated:
    Contributors: lillianrf
    - + diff --git a/docs/.vuepress/dist/zh_t/references/token.html b/docs/.vuepress/dist/zh_t/references/token.html index 5cf5f7651..515ced484 100644 --- a/docs/.vuepress/dist/zh_t/references/token.html +++ b/docs/.vuepress/dist/zh_t/references/token.html @@ -23,7 +23,7 @@ } 與代幣互動 | Solana Cookbook - + @@ -1273,6 +1273,6 @@ mint: mint, });
    Last Updated:
    Contributors: lillianrf
    - +