@ocap/client 1.27.14 → 1.27.16
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/base.js +1 -1
- package/dist/browser.d.ts +1 -0
- package/dist/bundle.js +1 -1
- package/dist/report.html +2 -2
- package/dist/schema/graphql.json +10 -0
- package/dist/schema/graphql.txt +2 -2
- package/dist/types.js +4 -1
- package/dist/types.js.map +1 -1
- package/docs/QUERIES.md +2 -1
- package/docs/README.md +4 -1
- package/docs/assets/diagram/core-concepts-client-architecture-01.jpg +0 -0
- package/docs/assets/diagram/core-concepts-gas-payment-01.jpg +0 -0
- package/docs/assets/diagram/core-concepts-transaction-lifecycle-01.jpg +0 -0
- package/docs/assets/diagram/overview-01.jpg +0 -0
- package/docs/core-concepts-client-architecture.ja.md +3 -27
- package/docs/core-concepts-client-architecture.md +3 -27
- package/docs/core-concepts-client-architecture.zh-TW.md +3 -27
- package/docs/core-concepts-client-architecture.zh.md +3 -27
- package/docs/core-concepts-gas-payment.ja.md +3 -30
- package/docs/core-concepts-gas-payment.md +3 -30
- package/docs/core-concepts-gas-payment.zh-TW.md +3 -30
- package/docs/core-concepts-gas-payment.zh.md +3 -30
- package/docs/core-concepts-transaction-lifecycle.ja.md +3 -61
- package/docs/core-concepts-transaction-lifecycle.md +3 -61
- package/docs/core-concepts-transaction-lifecycle.zh-TW.md +3 -61
- package/docs/core-concepts-transaction-lifecycle.zh.md +3 -61
- package/docs/overview.ja.md +3 -23
- package/docs/overview.md +3 -23
- package/docs/overview.zh-TW.md +3 -23
- package/docs/overview.zh.md +3 -23
- package/lib/base.js +1 -1
- package/lib/node.d.ts +1 -0
- package/lib/schema/graphql.json +10 -0
- package/lib/schema/graphql.txt +2 -2
- package/lib/types.js +4 -1
- package/lib/types.js.map +1 -1
- package/package.json +14 -14
package/docs/QUERIES.md
CHANGED
|
@@ -2244,12 +2244,13 @@ No arguments
|
|
|
2244
2244
|
* **stakeFilter**, optional, null
|
|
2245
2245
|
* **delegationFilter**, optional, null
|
|
2246
2246
|
* **tokenFactoryFilter**, optional, null
|
|
2247
|
+
* **includeData**, optional, null
|
|
2247
2248
|
|
|
2248
2249
|
#### Result Format
|
|
2249
2250
|
|
|
2250
2251
|
```graphql
|
|
2251
2252
|
{
|
|
2252
|
-
listTransactions {
|
|
2253
|
+
listTransactions(includeData: true) {
|
|
2253
2254
|
code
|
|
2254
2255
|
page {
|
|
2255
2256
|
cursor
|
package/docs/README.md
CHANGED
|
@@ -6218,7 +6218,9 @@ Structure of GraphQLClient.ListTransactionsParams
|
|
|
6218
6218
|
Checkout the following snippet for the format of ListTransactionsParams:
|
|
6219
6219
|
|
|
6220
6220
|
```json
|
|
6221
|
-
{
|
|
6221
|
+
{
|
|
6222
|
+
"includeData": true
|
|
6223
|
+
}
|
|
6222
6224
|
```
|
|
6223
6225
|
|
|
6224
6226
|
**Kind**: static typedef of [`GraphQLClient`](#GraphQLClient)\
|
|
@@ -6240,6 +6242,7 @@ Checkout the following snippet for the format of ListTransactionsParams:
|
|
|
6240
6242
|
| ...stakeFilter | [`StakeFilterInput`](#GraphQLClient.StakeFilterInput) |
|
|
6241
6243
|
| ...delegationFilter | [`DelegationFilterInput`](#GraphQLClient.DelegationFilterInput) |
|
|
6242
6244
|
| ...tokenFactoryFilter | [`TokenFactoryFilterInput`](#GraphQLClient.TokenFactoryFilterInput) |
|
|
6245
|
+
| includeData | `boolean` |
|
|
6243
6246
|
|
|
6244
6247
|
### GraphQLClient.ListTokensParams : `object`
|
|
6245
6248
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -8,33 +8,9 @@ OCAP Client は、さまざまな JavaScript 環境や特定のユースケー
|
|
|
8
8
|
|
|
9
9
|
以下の図は、異なるクライアント実装間の関係を示しています。
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+

|
|
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
|
-
|
|
12
|
-
|
|
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
|
+

|
|
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
|
-
|
|
12
|
-
|
|
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
|
+

|
|
13
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
38
14
|
|
|
39
15
|
## 用戶端實作
|
|
40
16
|
|
|
@@ -8,33 +8,9 @@ OCAP 客户端采用模块化架构设计,以满足不同 JavaScript 环境和
|
|
|
8
8
|
|
|
9
9
|
下图说明了不同客户端实现之间的关系:
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
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
|
+

|
|
13
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
38
14
|
|
|
39
15
|
## 客户端实现
|
|
40
16
|
|
|
@@ -22,36 +22,9 @@
|
|
|
22
22
|
|
|
23
23
|
以下の図は、トランザクションの開始から実行までのガス代行支払いの全フローを示しています:
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+

|
|
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
|
-
|
|
26
|
-
|
|
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
|
+

|
|
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
|
-
|
|
26
|
-
|
|
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
|
+

|
|
27
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
55
28
|
|
|
56
29
|
## 使用範例
|
|
57
30
|
|
|
@@ -22,36 +22,9 @@ Gas 费支付机制通过标准的 HTTP 标头实现。当您在客户端实例
|
|
|
22
22
|
|
|
23
23
|
下图说明了从交易发起 Gas 费支付到执行的完整流程:
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
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
|
+

|
|
27
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
55
28
|
|
|
56
29
|
## 使用示例
|
|
57
30
|
|
|
@@ -10,67 +10,9 @@ OCAP Client は柔軟なメソッドセットを提供しており、最大限
|
|
|
10
10
|
|
|
11
11
|
以下の図は、準備からブロックチェーンへの最終的な送信までのトランザクションの完全な流れを示しています。
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+

|
|
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
|
-
|
|
14
|
-
|
|
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
|
+

|
|
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
|
-
|
|
14
|
-
|
|
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
|
+

|
|
15
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
74
16
|
|
|
75
17
|
## 階段 1:準備 (創建 `itx`)
|
|
76
18
|
|
|
@@ -10,67 +10,9 @@ OCAP 客户端提供了一套灵活的方法,允许您单独执行这些步骤
|
|
|
10
10
|
|
|
11
11
|
下图展示了一笔交易从准备到最终提交至区块链的完整过程。
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+

|
|
15
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
74
16
|
|
|
75
17
|
## 阶段 1:准备(创建 `itx`)
|
|
76
18
|
|
package/docs/overview.ja.md
CHANGED
|
@@ -4,29 +4,9 @@ OCAP Clientは、アプリケーションをOCAPベースのブロックチェ
|
|
|
4
4
|
|
|
5
5
|
その中核となるのは、トランザクションのエンコーディングや署名の複雑さを抽象化することで、ブロックチェーンとの対話を簡素化することです。HTTP/Sを介したブロックチェーンノードとのすべての通信にGraphQL APIを使用しており、チェーンデータのクエリやトランザクションの送信が容易になります。
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
+

|
|
9
|
+
<!-- DIAGRAM_IMAGE_END -->
|
|
30
10
|
|
|
31
11
|
### 主な機能
|
|
32
12
|
|