@ocap/client 1.27.14 → 1.27.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@ocap/client [4 Dec 2025 at 16:30]</title>
6
+ <title>@ocap/client [15 Dec 2025 at 12:24]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX9zdNgag5w7rRqA44Lzw0hr1WqES36dFliSJFlh2rXIae3FFcDDgKdxrUIDePr8jGcSClV1u7A9xeN0ModY/pHMxmR1EzRh8TJiwqsHmKW0l4FCEZI+jHio+JdPPE9qwQtTRxku2D8sIeRL2LnxWSllANCQGOIiqVHAz2ye2JR0DcH+HoxDkaADLjgxjKQ+AwCX/g0+DNgdG0ukYCONAe+dbc2IAc6fwt1ARoDSezNHxV2Cmzwv3O6lDMV55edBGwGK9n1+x2F8EDfAGCxug8MhpsMEcTEAWf3rx2vZhe/LAmtIn/6apE6PN0ULKgywD9mmdxbmFl3OvD5AS5fW5zLbv/YHmcsBTjf/afDz3MaZTVCfAP9z6/Bw6ycv8EUBWJIn9zYcoAWWlW9+OzO3vkTy8H+RANLmdrpOuYWdZYEXpo+TlCJrW5EARb7fF+bWdqf3hhyZI1nWJQHgznErZhbjoEsWqi8dQNoE294aldzFurwSABL2XXMf9+H1VQGke9exw5P/AnA5Pv5ngMul7LOvO922iwACu8WkCwLCafvM4CeWPxfA8lNHcWZSoi8EwMAIciKX2Z4SWCMAa3snCZ/G4EA8D6CMLNFsGQhkkz/gQNEBbPCbWsxGUpYVu3z8IyNAknwJkfPMEhLyrdi5RTyUVACkw4GSFRNWJNEW+fgPGwHD8/JxnRuLabN4CGNRkAE23na2+VmEAUmrYymSGjMAYqH84YUIyzgzs3XC7gNgH36Vcc4zKY9o9fgPBXUAiHHwVboBHGLiX6Zcjp1f2wu4tvzZKo0ecPnDtQYDQvJXaBeNzce45Fp28ZQLrEZVuFqgBwOalArKXnW1UzlnSusQKJqKYNuz4tOnI6sZG4zanpemv+7ySU2jbA9h6uhcgpfy6G2PahirDZ6zvq6zDduMVFTKvzw8wgyEdelwY9in3XkEPs3osJuwRQ4qTkfzifndg9Gfc4pdsu82+tTnHZTBa2EAMrqr2t43pguc8tNm7JQVQ2S0ukj2d22dhXYP0/veWtwKrCkNoNimAN5+Xr/oLrxswKbVJjteWrX7eR63o4j9q0GxnaBdWgGA5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
8
8
 
9
9
  <script>
@@ -8,33 +8,9 @@ OCAP Client は、さまざまな JavaScript 環境や特定のユースケー
8
8
 
9
9
  以下の図は、異なるクライアント実装間の関係を示しています。
10
10
 
11
- ```d2
12
- direction: down
13
-
14
- GraphQLClientBase: {
15
- label: "GraphQLClientBase\n(コア機能)"
16
- shape: rectangle
17
- }
18
-
19
- GraphQLClient: {
20
- label: "GraphQLClient\n(フルクライアント + ヘルパー)"
21
- shape: rectangle
22
- }
23
-
24
- GraphqlClientLite: {
25
- label: "GraphqlClientLite\n(ブラウザ向け最適化)"
26
- shape: rectangle
27
- }
28
-
29
- NativeGraphqlClient: {
30
- label: "NativeGraphqlClient\n(Node.js向け最適化)"
31
- shape: rectangle
32
- }
33
-
34
- GraphQLClientBase -> GraphQLClient: "継承"
35
- GraphQLClientBase -> GraphqlClientLite: "継承"
36
- GraphQLClient -> NativeGraphqlClient: "継承"
37
- ```
11
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
12
+ ![Client Architecture](assets/diagram/core-concepts-client-architecture-01.jpg)
13
+ <!-- DIAGRAM_IMAGE_END -->
38
14
 
39
15
  ## クライアント実装
40
16
 
@@ -8,33 +8,9 @@ All client variations are built upon a common base, `GraphQLClientBase`, which p
8
8
 
9
9
  The following diagram illustrates the relationship between the different client implementations:
10
10
 
11
- ```d2
12
- direction: down
13
-
14
- GraphQLClientBase: {
15
- label: "GraphQLClientBase\n(Core Functionality)"
16
- shape: rectangle
17
- }
18
-
19
- GraphQLClient: {
20
- label: "GraphQLClient\n(Full Client + Helpers)"
21
- shape: rectangle
22
- }
23
-
24
- GraphqlClientLite: {
25
- label: "GraphqlClientLite\n(Browser-Optimized)"
26
- shape: rectangle
27
- }
28
-
29
- NativeGraphqlClient: {
30
- label: "NativeGraphqlClient\n(Node.js-Optimized)"
31
- shape: rectangle
32
- }
33
-
34
- GraphQLClientBase -> GraphQLClient: "Extends"
35
- GraphQLClientBase -> GraphqlClientLite: "Extends"
36
- GraphQLClient -> NativeGraphqlClient: "Extends"
37
- ```
11
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
12
+ ![Client Architecture](assets/diagram/core-concepts-client-architecture-01.jpg)
13
+ <!-- DIAGRAM_IMAGE_END -->
38
14
 
39
15
  ## Client Implementations
40
16
 
@@ -8,33 +8,9 @@ OCAP 用戶端採用模組化架構設計,以滿足不同 JavaScript 環境和
8
8
 
9
9
  下圖說明了不同用戶端實作之間的關係:
10
10
 
11
- ```d2
12
- direction: down
13
-
14
- GraphQLClientBase: {
15
- label: "GraphQLClientBase\n(核心功能)"
16
- shape: rectangle
17
- }
18
-
19
- GraphQLClient: {
20
- label: "GraphQLClient\n(完整用戶端 + 輔助工具)"
21
- shape: rectangle
22
- }
23
-
24
- GraphqlClientLite: {
25
- label: "GraphqlClientLite\n(瀏覽器最佳化)"
26
- shape: rectangle
27
- }
28
-
29
- NativeGraphqlClient: {
30
- label: "NativeGraphqlClient\n(Node.js 最佳化)"
31
- shape: rectangle
32
- }
33
-
34
- GraphQLClientBase -> GraphQLClient: "擴充"
35
- GraphQLClientBase -> GraphqlClientLite: "擴充"
36
- GraphQLClient -> NativeGraphqlClient: "擴充"
37
- ```
11
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
12
+ ![Client Architecture](assets/diagram/core-concepts-client-architecture-01.jpg)
13
+ <!-- DIAGRAM_IMAGE_END -->
38
14
 
39
15
  ## 用戶端實作
40
16
 
@@ -8,33 +8,9 @@ OCAP 客户端采用模块化架构设计,以满足不同 JavaScript 环境和
8
8
 
9
9
  下图说明了不同客户端实现之间的关系:
10
10
 
11
- ```d2
12
- direction: down
13
-
14
- GraphQLClientBase: {
15
- label: "GraphQLClientBase\n(核心功能)"
16
- shape: rectangle
17
- }
18
-
19
- GraphQLClient: {
20
- label: "GraphQLClient\n(完整客户端 + 辅助方法)"
21
- shape: rectangle
22
- }
23
-
24
- GraphqlClientLite: {
25
- label: "GraphqlClientLite\n(浏览器优化)"
26
- shape: rectangle
27
- }
28
-
29
- NativeGraphqlClient: {
30
- label: "NativeGraphqlClient\n(Node.js 优化)"
31
- shape: rectangle
32
- }
33
-
34
- GraphQLClientBase -> GraphQLClient: "扩展"
35
- GraphQLClientBase -> GraphqlClientLite: "扩展"
36
- GraphQLClient -> NativeGraphqlClient: "扩展"
37
- ```
11
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
12
+ ![Client Architecture](assets/diagram/core-concepts-client-architecture-01.jpg)
13
+ <!-- DIAGRAM_IMAGE_END -->
38
14
 
39
15
  ## 客户端实现
40
16
 
@@ -22,36 +22,9 @@
22
22
 
23
23
  以下の図は、トランザクションの開始から実行までのガス代行支払いの全フローを示しています:
24
24
 
25
- ```d2 ガス代行支払いのワークフロー icon=mdi:gas-station
26
- direction: down
27
-
28
- User-App: {
29
- label: "ユーザーのアプリケーション"
30
- shape: rectangle
31
- }
32
-
33
- Gas-Payer-Wallet: {
34
- label: "ガス支払い者ウォレット\n(アプリバックエンドのウォレット)"
35
- shape: cylinder
36
- }
37
-
38
- OCAP-Client: {
39
- label: "OCAPクライアントインスタンス"
40
- }
41
-
42
- Blockchain-Node: {
43
- label: "ブロックチェーンノード"
44
- shape: rectangle
45
- }
46
-
47
- User-App -> OCAP-Client: "1. ユーザーがトランザクションを開始"
48
- OCAP-Client -> OCAP-Client: "2. ユーザーのウォレットで\nTxを準備・署名"
49
- Gas-Payer-Wallet -> OCAP-Client: "3. ガス代行支払いのためTxハッシュに署名"
50
- OCAP-Client -> Blockchain-Node: "4. Tx + ガス支払い者ヘッダーを送信"
51
- Blockchain-Node -> Blockchain-Node: "5. 両方の署名を検証"
52
- Blockchain-Node: "6. トランザクションを実行"
53
- Blockchain-Node -> Gas-Payer-Wallet: "7. ガス料金を差し引く"
54
- ```
25
+ <!-- DIAGRAM_IMAGE_START:sequence:4:3 -->
26
+ ![Gas Payment](assets/diagram/core-concepts-gas-payment-01.jpg)
27
+ <!-- DIAGRAM_IMAGE_END -->
55
28
 
56
29
  ## 使用例
57
30
 
@@ -22,36 +22,9 @@ If both signatures are valid, the transaction is executed under the user's autho
22
22
 
23
23
  The following diagram illustrates the entire gas payment flow from transaction initiation to execution:
24
24
 
25
- ```d2 The Gas Payment Workflow icon=mdi:gas-station
26
- direction: down
27
-
28
- User-App: {
29
- label: "User's Application"
30
- shape: rectangle
31
- }
32
-
33
- Gas-Payer-Wallet: {
34
- label: "Gas Payer Wallet\n(App Backend's Wallet)"
35
- shape: cylinder
36
- }
37
-
38
- OCAP-Client: {
39
- label: "OCAP Client Instance"
40
- }
41
-
42
- Blockchain-Node: {
43
- label: "Blockchain Node"
44
- shape: rectangle
45
- }
46
-
47
- User-App -> OCAP-Client: "1. User initiates transaction"
48
- OCAP-Client -> OCAP-Client: "2. Prepare & sign Tx with\nuser's wallet"
49
- Gas-Payer-Wallet -> OCAP-Client: "3. Sign Tx hash for gas"
50
- OCAP-Client -> Blockchain-Node: "4. Send Tx + Gas Payer headers"
51
- Blockchain-Node -> Blockchain-Node: "5. Verify both signatures"
52
- Blockchain-Node: "6. Execute transaction"
53
- Blockchain-Node -> Gas-Payer-Wallet: "7. Deduct gas fee"
54
- ```
25
+ <!-- DIAGRAM_IMAGE_START:sequence:4:3 -->
26
+ ![Gas Payment](assets/diagram/core-concepts-gas-payment-01.jpg)
27
+ <!-- DIAGRAM_IMAGE_END -->
55
28
 
56
29
  ## Usage Example
57
30
 
@@ -22,36 +22,9 @@ Gas 支付機制是透過標準的 HTTP 標頭來實現的。當您在客戶端
22
22
 
23
23
  下圖說明了從交易發起到執行的整個 Gas 支付流程:
24
24
 
25
- ```d2 Gas 支付工作流程 icon=mdi:gas-station
26
- direction: down
27
-
28
- User-App: {
29
- label: "使用者應用程式"
30
- shape: rectangle
31
- }
32
-
33
- Gas-Payer-Wallet: {
34
- label: "Gas 支付者錢包\n(應用程式後端錢包)"
35
- shape: cylinder
36
- }
37
-
38
- OCAP-Client: {
39
- label: "OCAP Client 實例"
40
- }
41
-
42
- Blockchain-Node: {
43
- label: "區塊鏈節點"
44
- shape: rectangle
45
- }
46
-
47
- User-App -> OCAP-Client: "1. 使用者發起交易"
48
- OCAP-Client -> OCAP-Client: "2. 使用使用者錢包準備並簽署交易"
49
- Gas-Payer-Wallet -> OCAP-Client: "3. 簽署交易雜湊值以支付 Gas"
50
- OCAP-Client -> Blockchain-Node: "4. 發送交易 + Gas 支付者標頭"
51
- Blockchain-Node -> Blockchain-Node: "5. 驗證雙方簽名"
52
- Blockchain-Node: "6. 執行交易"
53
- Blockchain-Node -> Gas-Payer-Wallet: "7. 扣除 Gas 費用"
54
- ```
25
+ <!-- DIAGRAM_IMAGE_START:sequence:4:3 -->
26
+ ![Gas Payment](assets/diagram/core-concepts-gas-payment-01.jpg)
27
+ <!-- DIAGRAM_IMAGE_END -->
55
28
 
56
29
  ## 使用範例
57
30
 
@@ -22,36 +22,9 @@ Gas 费支付机制通过标准的 HTTP 标头实现。当您在客户端实例
22
22
 
23
23
  下图说明了从交易发起 Gas 费支付到执行的完整流程:
24
24
 
25
- ```d2 Gas 费支付工作流程 icon=mdi:gas-station
26
- direction: down
27
-
28
- User-App: {
29
- label: "用户应用"
30
- shape: rectangle
31
- }
32
-
33
- Gas-Payer-Wallet: {
34
- label: "Gas 费支付方钱包\n(应用后端钱包)"
35
- shape: cylinder
36
- }
37
-
38
- OCAP-Client: {
39
- label: "OCAP 客户端实例"
40
- }
41
-
42
- Blockchain-Node: {
43
- label: "区块链节点"
44
- shape: rectangle
45
- }
46
-
47
- User-App -> OCAP-Client: "1. 用户发起交易"
48
- OCAP-Client -> OCAP-Client: "2. 使用用户钱包\n准备并签署交易"
49
- Gas-Payer-Wallet -> OCAP-Client: "3. 为 Gas 费签署交易哈希"
50
- OCAP-Client -> Blockchain-Node: "4. 发送交易及 Gas 费支付方标头"
51
- Blockchain-Node -> Blockchain-Node: "5. 验证双方签名"
52
- Blockchain-Node: "6. 执行交易"
53
- Blockchain-Node -> Gas-Payer-Wallet: "7. 扣除 Gas 费"
54
- ```
25
+ <!-- DIAGRAM_IMAGE_START:sequence:4:3 -->
26
+ ![Gas Payment](assets/diagram/core-concepts-gas-payment-01.jpg)
27
+ <!-- DIAGRAM_IMAGE_END -->
55
28
 
56
29
  ## 使用示例
57
30
 
@@ -10,67 +10,9 @@ OCAP Client は柔軟なメソッドセットを提供しており、最大限
10
10
 
11
11
  以下の図は、準備からブロックチェーンへの最終的な送信までのトランザクションの完全な流れを示しています。
12
12
 
13
- ```d2 Transaction Lifecycle Diagram
14
- direction: down
15
-
16
- Start: {
17
- label: "1. Itxの準備"
18
- shape: oval
19
- }
20
-
21
- Encode-Tx: {
22
- label: "2. トランザクションのエンコード\n(encode<Type>Tx)"
23
- shape: rectangle
24
- }
25
-
26
- Sign-Tx: {
27
- label: "3. トランザクションの署名"
28
- shape: diamond
29
- }
30
-
31
- Single-Sign: {
32
- label: "単一署名\n(sign<Type>Tx)"
33
- shape: rectangle
34
- }
35
-
36
- Multi-Sign-Flow: {
37
- label: "複数署名"
38
- shape: rectangle
39
-
40
- Multi-Sign-1: {
41
- label: "署名者1\n(multiSign<Type>Tx)"
42
- }
43
-
44
- Multi-Sign-2: {
45
- label: "署名者2\n(multiSign<Type>Tx)"
46
- }
47
-
48
- Multi-Sign-N: {
49
- label: "..."
50
- }
51
-
52
- Multi-Sign-1 -> Multi-Sign-2: "署名済みTXを渡す"
53
- Multi-Sign-2 -> Multi-Sign-N: "署名済みTXを渡す"
54
- }
55
-
56
- Send-Tx: {
57
- label: "4. トランザクションの送信\n(send<Type>Tx)"
58
- shape: rectangle
59
- }
60
-
61
- End: {
62
- label: "トランザクションハッシュ"
63
- shape: oval
64
- }
65
-
66
- Start -> Encode-Tx
67
- Encode-Tx -> Sign-Tx
68
- Sign-Tx -> Single-Sign: "単一署名者"
69
- Sign-Tx -> Multi-Sign-Flow: "複数署名者"
70
- Single-Sign -> Send-Tx
71
- Multi-Sign-Flow -> Send-Tx
72
- Send-Tx -> End
73
- ```
13
+ <!-- DIAGRAM_IMAGE_START:flowchart:4:3 -->
14
+ ![Transaction Lifecycle](assets/diagram/core-concepts-transaction-lifecycle-01.jpg)
15
+ <!-- DIAGRAM_IMAGE_END -->
74
16
 
75
17
  ## ステージ1: 準備(`itx`の作成)
76
18
 
@@ -10,67 +10,9 @@ This guide breaks down each stage and illustrates both single-signature and mult
10
10
 
11
11
  The following diagram illustrates the complete journey of a transaction from preparation to its final submission to the blockchain.
12
12
 
13
- ```d2 Transaction Lifecycle Diagram
14
- direction: down
15
-
16
- Start: {
17
- label: "1. Prepare Itx"
18
- shape: oval
19
- }
20
-
21
- Encode-Tx: {
22
- label: "2. Encode Transaction\n(encode<Type>Tx)"
23
- shape: rectangle
24
- }
25
-
26
- Sign-Tx: {
27
- label: "3. Sign Transaction"
28
- shape: diamond
29
- }
30
-
31
- Single-Sign: {
32
- label: "Single Signature\n(sign<Type>Tx)"
33
- shape: rectangle
34
- }
35
-
36
- Multi-Sign-Flow: {
37
- label: "Multi-Signature"
38
- shape: rectangle
39
-
40
- Multi-Sign-1: {
41
- label: "Signer 1\n(multiSign<Type>Tx)"
42
- }
43
-
44
- Multi-Sign-2: {
45
- label: "Signer 2\n(multiSign<Type>Tx)"
46
- }
47
-
48
- Multi-Sign-N: {
49
- label: "..."
50
- }
51
-
52
- Multi-Sign-1 -> Multi-Sign-2: "Pass signed TX"
53
- Multi-Sign-2 -> Multi-Sign-N: "Pass signed TX"
54
- }
55
-
56
- Send-Tx: {
57
- label: "4. Send Transaction\n(send<Type>Tx)"
58
- shape: rectangle
59
- }
60
-
61
- End: {
62
- label: "Transaction Hash"
63
- shape: oval
64
- }
65
-
66
- Start -> Encode-Tx
67
- Encode-Tx -> Sign-Tx
68
- Sign-Tx -> Single-Sign: "Single Signer"
69
- Sign-Tx -> Multi-Sign-Flow: "Multiple Signers"
70
- Single-Sign -> Send-Tx
71
- Multi-Sign-Flow -> Send-Tx
72
- Send-Tx -> End
73
- ```
13
+ <!-- DIAGRAM_IMAGE_START:flowchart:4:3 -->
14
+ ![Transaction Lifecycle](assets/diagram/core-concepts-transaction-lifecycle-01.jpg)
15
+ <!-- DIAGRAM_IMAGE_END -->
74
16
 
75
17
  ## Stage 1: Preparation (Creating the `itx`)
76
18
 
@@ -10,67 +10,9 @@ OCAP 用戶端提供了一套彈性的方法,讓您可以為了最大程度的
10
10
 
11
11
  下圖說明了一筆交易從準備到最終提交至區塊鏈的完整過程。
12
12
 
13
- ```d2 交易生命週期圖
14
- direction: down
15
-
16
- Start: {
17
- label: "1. 準備 Itx"
18
- shape: oval
19
- }
20
-
21
- Encode-Tx: {
22
- label: "2. 編碼交易\n(encode<Type>Tx)"
23
- shape: rectangle
24
- }
25
-
26
- Sign-Tx: {
27
- label: "3. 簽署交易"
28
- shape: diamond
29
- }
30
-
31
- Single-Sign: {
32
- label: "單一簽章\n(sign<Type>Tx)"
33
- shape: rectangle
34
- }
35
-
36
- Multi-Sign-Flow: {
37
- label: "多重簽章"
38
- shape: rectangle
39
-
40
- Multi-Sign-1: {
41
- label: "簽署人 1\n(multiSign<Type>Tx)"
42
- }
43
-
44
- Multi-Sign-2: {
45
- label: "簽署人 2\n(multiSign<Type>Tx)"
46
- }
47
-
48
- Multi-Sign-N: {
49
- label: "..."
50
- }
51
-
52
- Multi-Sign-1 -> Multi-Sign-2: "傳遞已簽署的 TX"
53
- Multi-Sign-2 -> Multi-Sign-N: "傳遞已簽署的 TX"
54
- }
55
-
56
- Send-Tx: {
57
- label: "4. 發送交易\n(send<Type>Tx)"
58
- shape: rectangle
59
- }
60
-
61
- End: {
62
- label: "交易雜湊值"
63
- shape: oval
64
- }
65
-
66
- Start -> Encode-Tx
67
- Encode-Tx -> Sign-Tx
68
- Sign-Tx -> Single-Sign: "單一簽署人"
69
- Sign-Tx -> Multi-Sign-Flow: "多個簽署人"
70
- Single-Sign -> Send-Tx
71
- Multi-Sign-Flow -> Send-Tx
72
- Send-Tx -> End
73
- ```
13
+ <!-- DIAGRAM_IMAGE_START:flowchart:4:3 -->
14
+ ![Transaction Lifecycle](assets/diagram/core-concepts-transaction-lifecycle-01.jpg)
15
+ <!-- DIAGRAM_IMAGE_END -->
74
16
 
75
17
  ## 階段 1:準備 (創建 `itx`)
76
18
 
@@ -10,67 +10,9 @@ OCAP 客户端提供了一套灵活的方法,允许您单独执行这些步骤
10
10
 
11
11
  下图展示了一笔交易从准备到最终提交至区块链的完整过程。
12
12
 
13
- ```d2 交易生命周期图
14
- direction: down
15
-
16
- Start: {
17
- label: "1. 准备 Itx"
18
- shape: oval
19
- }
20
-
21
- Encode-Tx: {
22
- label: "2. 编码交易\n(encode<Type>Tx)"
23
- shape: rectangle
24
- }
25
-
26
- Sign-Tx: {
27
- label: "3. 交易签名"
28
- shape: diamond
29
- }
30
-
31
- Single-Sign: {
32
- label: "单签名\n(sign<Type>Tx)"
33
- shape: rectangle
34
- }
35
-
36
- Multi-Sign-Flow: {
37
- label: "多签名"
38
- shape: rectangle
39
-
40
- Multi-Sign-1: {
41
- label: "签名者 1\n(multiSign<Type>Tx)"
42
- }
43
-
44
- Multi-Sign-2: {
45
- label: "签名者 2\n(multiSign<Type>Tx)"
46
- }
47
-
48
- Multi-Sign-N: {
49
- label: "..."
50
- }
51
-
52
- Multi-Sign-1 -> Multi-Sign-2: "传递已签名的交易"
53
- Multi-Sign-2 -> Multi-Sign-N: "传递已签名的交易"
54
- }
55
-
56
- Send-Tx: {
57
- label: "4. 发送交易\n(send<Type>Tx)"
58
- shape: rectangle
59
- }
60
-
61
- End: {
62
- label: "交易哈希"
63
- shape: oval
64
- }
65
-
66
- Start -> Encode-Tx
67
- Encode-Tx -> Sign-Tx
68
- Sign-Tx -> Single-Sign: "单个签名者"
69
- Sign-Tx -> Multi-Sign-Flow: "多个签名者"
70
- Single-Sign -> Send-Tx
71
- Multi-Sign-Flow -> Send-Tx
72
- Send-Tx -> End
73
- ```
13
+ <!-- DIAGRAM_IMAGE_START:flowchart:4:3 -->
14
+ ![Transaction Lifecycle](assets/diagram/core-concepts-transaction-lifecycle-01.jpg)
15
+ <!-- DIAGRAM_IMAGE_END -->
74
16
 
75
17
  ## 阶段 1:准备(创建 `itx`)
76
18
 
@@ -4,29 +4,9 @@ OCAP Clientは、アプリケーションをOCAPベースのブロックチェ
4
4
 
5
5
  その中核となるのは、トランザクションのエンコーディングや署名の複雑さを抽象化することで、ブロックチェーンとの対話を簡素化することです。HTTP/Sを介したブロックチェーンノードとのすべての通信にGraphQL APIを使用しており、チェーンデータのクエリやトランザクションの送信が容易になります。
6
6
 
7
- ```d2 クライアントアーキテクチャ概要 icon=mdi:graphql
8
- direction: down
9
-
10
- your-app: {
11
- label: "あなたのアプリケーション\n(Node.js またはブラウザ)"
12
- shape: rectangle
13
- }
14
-
15
- ocap-client: {
16
- label: "@ocap/client"
17
- shape: rectangle
18
- style.fill: "#f0f9ff"
19
- }
20
-
21
- ocap-node: {
22
- label: "OCAP ブロックチェーンノード"
23
- shape: cylinder
24
- }
25
-
26
- your-app -> ocap-client: "高レベル API コール\n(例: transfer(), createAsset())"
27
- ocap-client -> ocap-node: "GraphQL クエリ/ミューテーション (HTTP/S)\nイベントサブスクリプション (WebSocket)"
28
-
29
- ```
7
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
8
+ ![Overview](assets/diagram/overview-01.jpg)
9
+ <!-- DIAGRAM_IMAGE_END -->
30
10
 
31
11
  ### 主な機能
32
12
 
package/docs/overview.md CHANGED
@@ -4,29 +4,9 @@ The OCAP Client is a powerful and versatile JavaScript library designed to conne
4
4
 
5
5
  At its core, the client simplifies blockchain interaction by abstracting away the complexities of transaction encoding and signing. It uses a GraphQL API for all communication with the blockchain node over HTTP/S, making it easy to query chain data and submit transactions.
6
6
 
7
- ```d2 Client Architecture Overview icon=mdi:graphql
8
- direction: down
9
-
10
- your-app: {
11
- label: "Your Application\n(Node.js or Browser)"
12
- shape: rectangle
13
- }
14
-
15
- ocap-client: {
16
- label: "@ocap/client"
17
- shape: rectangle
18
- style.fill: "#f0f9ff"
19
- }
20
-
21
- ocap-node: {
22
- label: "OCAP Blockchain Node"
23
- shape: cylinder
24
- }
25
-
26
- your-app -> ocap-client: "High-level API Calls\n(e.g., transfer(), createAsset())"
27
- ocap-client -> ocap-node: "GraphQL Queries/Mutations (HTTP/S)\nEvent Subscriptions (WebSocket)"
28
-
29
- ```
7
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
8
+ ![Overview](assets/diagram/overview-01.jpg)
9
+ <!-- DIAGRAM_IMAGE_END -->
30
10
 
31
11
  ### Key Features
32
12
 
@@ -4,29 +4,9 @@ OCAP Client 是一個功能強大且多功能的 JavaScript 函式庫,旨在
4
4
 
5
5
  其核心在於,此客戶端透過抽象化交易編碼和簽署的複雜性,簡化了區塊鏈的互動。它使用 GraphQL API 透過 HTTP/S 與區塊鏈節點進行所有通訊,使得查詢鏈上資料和提交交易變得容易。
6
6
 
7
- ```d2 Client Architecture Overview icon=mdi:graphql
8
- direction: down
9
-
10
- your-app: {
11
- label: "您的應用程式\n(Node.js 或瀏覽器)"
12
- shape: rectangle
13
- }
14
-
15
- ocap-client: {
16
- label: "@ocap/client"
17
- shape: rectangle
18
- style.fill: "#f0f9ff"
19
- }
20
-
21
- ocap-node: {
22
- label: "OCAP 區塊鏈節點"
23
- shape: cylinder
24
- }
25
-
26
- your-app -> ocap-client: "高階 API 呼叫\n(例如,transfer(), createAsset())"
27
- ocap-client -> ocap-node: "GraphQL 查詢/變更 (HTTP/S)\n事件訂閱 (WebSocket)"
28
-
29
- ```
7
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
8
+ ![Overview](assets/diagram/overview-01.jpg)
9
+ <!-- DIAGRAM_IMAGE_END -->
30
10
 
31
11
  ### 主要功能
32
12
 
@@ -4,29 +4,9 @@ OCAP Client 是一个功能强大且通用的 JavaScript 库,旨在将您的
4
4
 
5
5
  该客户端的核心功能是通过抽象交易编码和签名的复杂性来简化区块链交互。它使用 GraphQL API 通过 HTTP/S 与区块链节点进行所有通信,使得查询链上数据和提交交易变得简单。
6
6
 
7
- ```d2 客户端架构概述 icon=mdi:graphql
8
- direction: down
9
-
10
- your-app: {
11
- label: "你的应用程序\n(Node.js 或浏览器)"
12
- shape: rectangle
13
- }
14
-
15
- ocap-client: {
16
- label: "@ocap/client"
17
- shape: rectangle
18
- style.fill: "#f0f9ff"
19
- }
20
-
21
- ocap-node: {
22
- label: "OCAP 区块链节点"
23
- shape: cylinder
24
- }
25
-
26
- your-app -> ocap-client: "高阶 API 调用\n(例如 transfer(), createAsset())"
27
- ocap-client -> ocap-node: "GraphQL 查询/变更 (HTTP/S)\n事件订阅 (WebSocket)"
28
-
29
- ```
7
+ <!-- DIAGRAM_IMAGE_START:architecture:4:3 -->
8
+ ![Overview](assets/diagram/overview-01.jpg)
9
+ <!-- DIAGRAM_IMAGE_END -->
30
10
 
31
11
  ### 主要功能
32
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocap/client",
3
- "version": "1.27.14",
3
+ "version": "1.27.15",
4
4
  "description": "graphql client to read/write data on arcblock blockchain",
5
5
  "keywords": [
6
6
  "graphql",
@@ -40,17 +40,17 @@
40
40
  "react-app-polyfill": "^1.0.6",
41
41
  "readable-stream": "3.6.0",
42
42
  "wolfy87-eventemitter": "^5.2.9",
43
- "@arcblock/did": "1.27.14",
44
- "@arcblock/jwt": "1.27.14",
45
- "@arcblock/ws": "1.27.14",
46
- "@ocap/asset": "1.27.14",
47
- "@arcblock/did-util": "1.27.14",
48
- "@ocap/mcrypto": "1.27.14",
49
- "@ocap/message": "1.27.14",
50
- "@ocap/proto": "1.27.14",
51
- "@ocap/tx-util": "1.27.14",
52
- "@ocap/util": "1.27.14",
53
- "@ocap/wallet": "1.27.14"
43
+ "@arcblock/did": "1.27.15",
44
+ "@arcblock/did-util": "1.27.15",
45
+ "@arcblock/jwt": "1.27.15",
46
+ "@arcblock/ws": "1.27.15",
47
+ "@ocap/asset": "1.27.15",
48
+ "@ocap/mcrypto": "1.27.15",
49
+ "@ocap/message": "1.27.15",
50
+ "@ocap/proto": "1.27.15",
51
+ "@ocap/tx-util": "1.27.15",
52
+ "@ocap/util": "1.27.15",
53
+ "@ocap/wallet": "1.27.15"
54
54
  },
55
55
  "devDependencies": {
56
56
  "babel-cli": "^6.26.0",
@@ -71,8 +71,8 @@
71
71
  "webpack": "^5.94.0",
72
72
  "webpack-bundle-analyzer": "^4.10.2",
73
73
  "webpack-cli": "^5.1.4",
74
- "@ocap/e2e-test": "1.27.14",
75
- "@ocap/tx-protocols": "1.27.14"
74
+ "@ocap/e2e-test": "1.27.15",
75
+ "@ocap/tx-protocols": "1.27.15"
76
76
  },
77
77
  "remarkConfig": {
78
78
  "plugins": [