From 666a92450412234bd5d3d0a40032593bd865f67d Mon Sep 17 00:00:00 2001 From: Favour Kelvin Date: Mon, 1 Dec 2025 23:18:22 +0000 Subject: [PATCH 1/6] fix(wallet): update simple opcode and internal message diagrams --- .../images/wallets/internal_message_dark.svg | 3 ++ .../images/wallets/internal_message_light.svg | 3 ++ .../images/wallets/simple_opcode_dark.svg | 3 ++ .../images/wallets/simple_opcode_light.svg | 3 ++ standard/wallets/v4.mdx | 30 +++++-------------- standard/wallets/v5-api.mdx | 23 ++++---------- 6 files changed, 25 insertions(+), 40 deletions(-) create mode 100644 resources/images/wallets/internal_message_dark.svg create mode 100644 resources/images/wallets/internal_message_light.svg create mode 100644 resources/images/wallets/simple_opcode_dark.svg create mode 100644 resources/images/wallets/simple_opcode_light.svg diff --git a/resources/images/wallets/internal_message_dark.svg b/resources/images/wallets/internal_message_dark.svg new file mode 100644 index 000000000..b5acd9d71 --- /dev/null +++ b/resources/images/wallets/internal_message_dark.svg @@ -0,0 +1,3 @@ + + +
internal_extension
(#6578746e)
internal_extension...
V4 Wallet Contract (Sender)
V4 Wallet Cont...


User
User...
V5 Wallet Contract
(Receiver)
V5 Wallet Cont...
Execute Actions on V5 wallet
Execute Actio...
V4 Wallet Contract (Sender)
V4 Wallet Cont...


User
User...
V5 Wallet Contract
(Receiver)
V5 Wallet Cont...
internal_signed
(#7369e74)
internal_signed...
Execute Actions on V5 wallet
Execute Actio...
\ No newline at end of file diff --git a/resources/images/wallets/internal_message_light.svg b/resources/images/wallets/internal_message_light.svg new file mode 100644 index 000000000..b5acd9d71 --- /dev/null +++ b/resources/images/wallets/internal_message_light.svg @@ -0,0 +1,3 @@ + + +
internal_extension
(#6578746e)
internal_extension...
V4 Wallet Contract (Sender)
V4 Wallet Cont...


User
User...
V5 Wallet Contract
(Receiver)
V5 Wallet Cont...
Execute Actions on V5 wallet
Execute Actio...
V4 Wallet Contract (Sender)
V4 Wallet Cont...


User
User...
V5 Wallet Contract
(Receiver)
V5 Wallet Cont...
internal_signed
(#7369e74)
internal_signed...
Execute Actions on V5 wallet
Execute Actio...
\ No newline at end of file diff --git a/resources/images/wallets/simple_opcode_dark.svg b/resources/images/wallets/simple_opcode_dark.svg new file mode 100644 index 000000000..4c2683478 --- /dev/null +++ b/resources/images/wallets/simple_opcode_dark.svg @@ -0,0 +1,3 @@ + + +
Verify signature,
extract body slice 
Verify signature,...
Read opcode = 0x0
Read opcode = 0x0
Loop over message
entries
Loop over message...
Inbound External Message (signed)
Inbound External Message (signed)
send_raw_message
mode: 8 bits
^Cell: Message 1 
send_raw_message...
Message Entry 2
Message Entry 2
Message Entry 3
Message Entry 3
Internal OutMsgs (HashmapE)
Internal OutMsgs (HashmapE)
Message Entry 1
Message Entry 1
Message Entry 4
Message Entry 4
send_raw_message
mode: 8 bits
^Cell: Message 2
send_raw_message...
send_raw_message
mode: 8 bits
^Cell: Message 3
send_raw_message...
send_raw_message
mode: 8 bits
^Cell: Message 4
send_raw_message...
\ No newline at end of file diff --git a/resources/images/wallets/simple_opcode_light.svg b/resources/images/wallets/simple_opcode_light.svg new file mode 100644 index 000000000..4c2683478 --- /dev/null +++ b/resources/images/wallets/simple_opcode_light.svg @@ -0,0 +1,3 @@ + + +
Verify signature,
extract body slice 
Verify signature,...
Read opcode = 0x0
Read opcode = 0x0
Loop over message
entries
Loop over message...
Inbound External Message (signed)
Inbound External Message (signed)
send_raw_message
mode: 8 bits
^Cell: Message 1 
send_raw_message...
Message Entry 2
Message Entry 2
Message Entry 3
Message Entry 3
Internal OutMsgs (HashmapE)
Internal OutMsgs (HashmapE)
Message Entry 1
Message Entry 1
Message Entry 4
Message Entry 4
send_raw_message
mode: 8 bits
^Cell: Message 2
send_raw_message...
send_raw_message
mode: 8 bits
^Cell: Message 3
send_raw_message...
send_raw_message
mode: 8 bits
^Cell: Message 4
send_raw_message...
\ No newline at end of file diff --git a/standard/wallets/v4.mdx b/standard/wallets/v4.mdx index 9ffc03672..0e3e2fb22 100644 --- a/standard/wallets/v4.mdx +++ b/standard/wallets/v4.mdx @@ -4,6 +4,7 @@ sidebarTitle: "V4" --- import { Aside } from '/snippets/aside.jsx'; +import { Image } from '/snippets/image.jsx'; This version retains all the functionality of the previous versions and introduces plugins. @@ -105,28 +106,11 @@ Next, let's explore the types of messages: The simple send operation processes a chain of messages, where each message contains a mode and a reference to the actual message cell: -```mermaid -graph TB - A["External Message Body"] --> B["opcode = 0x0"] - B --> C["Message Chain Processing"] - - C --> D["Message 1"] - D --> E["mode: 8 bits"] - D --> F["^Cell: Message 1"] - - C --> G["Message 2"] - G --> H["mode: 8 bits"] - G --> I["^Cell: Message 2"] - - C --> J["..."] - J --> K["Up to 4 messages total"] - - style A fill:#e1f5fe - style E fill:#fff3e0 - style F fill:#f3e5f5 - style H fill:#fff3e0 - style I fill:#f3e5f5 -``` +Shard pattern **Processing logic:** @@ -216,4 +200,4 @@ Wallet V4 provides standard functionality through the `0x0` opcode, similar to p 1. `int get_public_key()` returns current stored public key. 1. `int get_subwallet_id()` returns current subwallet ID. 1. `int is_plugin_installed(int wc, int addr_hash)` checks if plugin with defined workchain\_id and address hash is installed. Returns `-1` (true) if the plugin is installed, `0` (false) if not installed. -1. `tuple get_plugin_list()` returns list of plugins. +1. `tuple get_plugin_list()` returns list of plugins. \ No newline at end of file diff --git a/standard/wallets/v5-api.mdx b/standard/wallets/v5-api.mdx index 317f4acaf..ec852efa6 100644 --- a/standard/wallets/v5-api.mdx +++ b/standard/wallets/v5-api.mdx @@ -4,6 +4,7 @@ sidebarTitle: "How to interact" --- import { Aside } from "/snippets/aside.jsx"; +import { Image } from '/snippets/image.jsx'; This article provides overview of wallet V5 public interfaces, how to interact with them and serialize used data structures. @@ -461,24 +462,12 @@ You can send this BoC to the network in any convenient way, e.g. with API provid These two types of messages are internal messages, meaning that they need to come from another contract. However strange that may sound, the easiest way to send internal message from another contract is to ask another wallet contract to send internal message to our wallet contract with body that will contain our constructed message. -```mermaid -graph LR - A["👤 User"] --> B["📱 V4 Wallet Contract
(Sender)"] - - B -->|"Internal message with body:
🔐 internal_signed (#73696e74)
or
🔧 internal_extension (#6578746e)"| C["🏦 V5 Wallet Contract
(Receiver)"] +Shard pattern - C --> D["⚡ Execute Actions
on V5 wallet"] - - classDef user fill:#e3f2fd,stroke:#1976d2,stroke-width:2px - classDef v4wallet fill:#fff3e0,stroke:#f57c00,stroke-width:2px - classDef v5wallet fill:#e8f5e8,stroke:#388e3c,stroke-width:2px - classDef action fill:#ffebee,stroke:#d32f2f,stroke-width:2px - - class A user - class B v4wallet - class C v5wallet - class D action -``` For simplicity, we will use wallet V4 contract with existing client serialization library that will take care of all low level stuff. From 9975886eb139f6d3d354d94cb2bcbf9fea2215d5 Mon Sep 17 00:00:00 2001 From: Favour Kelvin Date: Mon, 1 Dec 2025 23:20:43 +0000 Subject: [PATCH 2/6] chore: add image alt description --- standard/wallets/v4.mdx | 2 +- standard/wallets/v5-api.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/standard/wallets/v4.mdx b/standard/wallets/v4.mdx index 0e3e2fb22..0766dbe61 100644 --- a/standard/wallets/v4.mdx +++ b/standard/wallets/v4.mdx @@ -109,7 +109,7 @@ The simple send operation processes a chain of messages, where each message cont Shard pattern **Processing logic:** diff --git a/standard/wallets/v5-api.mdx b/standard/wallets/v5-api.mdx index ec852efa6..5bf42f39c 100644 --- a/standard/wallets/v5-api.mdx +++ b/standard/wallets/v5-api.mdx @@ -465,7 +465,7 @@ These two types of messages are internal messages, meaning that they need to com Shard pattern From 512f55ddc2ba24694d488154e50daed349871912 Mon Sep 17 00:00:00 2001 From: Favour Kelvin Date: Mon, 1 Dec 2025 23:40:14 +0000 Subject: [PATCH 3/6] chore: update the alt description --- standard/wallets/v4.mdx | 2 +- standard/wallets/v5-api.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/standard/wallets/v4.mdx b/standard/wallets/v4.mdx index 0766dbe61..4286539c1 100644 --- a/standard/wallets/v4.mdx +++ b/standard/wallets/v4.mdx @@ -109,7 +109,7 @@ The simple send operation processes a chain of messages, where each message cont Simple send opcode diagram **Processing logic:** diff --git a/standard/wallets/v5-api.mdx b/standard/wallets/v5-api.mdx index 5bf42f39c..96eb4c617 100644 --- a/standard/wallets/v5-api.mdx +++ b/standard/wallets/v5-api.mdx @@ -465,7 +465,7 @@ These two types of messages are internal messages, meaning that they need to com Internal Message From 4e175ae4e04ca0b23c293d5e5bda578d778b2b96 Mon Sep 17 00:00:00 2001 From: Favour Kelvin Date: Tue, 2 Dec 2025 02:54:34 +0000 Subject: [PATCH 4/6] fix: failing checks --- package-lock.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/package-lock.json b/package-lock.json index 1a37f651a..92428fe43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1498,6 +1498,17 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/@mintlify/cli/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@mintlify/common": { "version": "1.0.619", "resolved": "https://registry.npmjs.org/@mintlify/common/-/common-1.0.619.tgz", From 8897426902742442d89ab3747e8abce99aa0b957 Mon Sep 17 00:00:00 2001 From: Favour Kelvin Date: Tue, 2 Dec 2025 03:08:08 +0000 Subject: [PATCH 5/6] fix: fix failing formatting errors --- standard/wallets/v4.mdx | 2 +- standard/wallets/v5-api.mdx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/standard/wallets/v4.mdx b/standard/wallets/v4.mdx index 4286539c1..8cde85290 100644 --- a/standard/wallets/v4.mdx +++ b/standard/wallets/v4.mdx @@ -200,4 +200,4 @@ Wallet V4 provides standard functionality through the `0x0` opcode, similar to p 1. `int get_public_key()` returns current stored public key. 1. `int get_subwallet_id()` returns current subwallet ID. 1. `int is_plugin_installed(int wc, int addr_hash)` checks if plugin with defined workchain\_id and address hash is installed. Returns `-1` (true) if the plugin is installed, `0` (false) if not installed. -1. `tuple get_plugin_list()` returns list of plugins. \ No newline at end of file +1. `tuple get_plugin_list()` returns list of plugins. diff --git a/standard/wallets/v5-api.mdx b/standard/wallets/v5-api.mdx index 96eb4c617..dc9f55c84 100644 --- a/standard/wallets/v5-api.mdx +++ b/standard/wallets/v5-api.mdx @@ -464,11 +464,10 @@ These two types of messages are internal messages, meaning that they need to com Internal message flow - For simplicity, we will use wallet V4 contract with existing client serialization library that will take care of all low level stuff. ```ts expandable From 99945b793e7ca4073f1eb5db7b2f1e1781595001 Mon Sep 17 00:00:00 2001 From: Favour Kelvin Date: Tue, 2 Dec 2025 04:20:40 +0000 Subject: [PATCH 6/6] chore: fix failing formatting errors --- standard/wallets/v4.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standard/wallets/v4.mdx b/standard/wallets/v4.mdx index 8cde85290..4941363fd 100644 --- a/standard/wallets/v4.mdx +++ b/standard/wallets/v4.mdx @@ -109,7 +109,7 @@ The simple send operation processes a chain of messages, where each message cont Simple send message chain **Processing logic:**