@ocap/client 1.25.3 → 1.25.4
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/README.md +76 -80
- package/dist/report.html +1 -1
- package/docs/_sidebar.md +22 -0
- package/docs/api-reference-client-methods.md +229 -0
- package/docs/api-reference-client-methods.zh.md +229 -0
- package/docs/api-reference-data-types.md +482 -0
- package/docs/api-reference-data-types.zh.md +482 -0
- package/docs/api-reference-low-level-api.md +228 -0
- package/docs/api-reference-low-level-api.zh.md +228 -0
- package/docs/api-reference-query-mutation-methods.md +814 -0
- package/docs/api-reference-query-mutation-methods.zh.md +814 -0
- package/docs/api-reference-transaction-helpers.md +649 -0
- package/docs/api-reference-transaction-helpers.zh.md +649 -0
- package/docs/api-reference.md +23 -0
- package/docs/api-reference.zh.md +23 -0
- package/docs/core-concepts-client-architecture.md +102 -0
- package/docs/core-concepts-client-architecture.zh.md +102 -0
- package/docs/core-concepts-event-subscriptions.md +123 -0
- package/docs/core-concepts-event-subscriptions.zh.md +123 -0
- package/docs/core-concepts-gas-payment.md +111 -0
- package/docs/core-concepts-gas-payment.zh.md +111 -0
- package/docs/core-concepts-transaction-lifecycle.md +183 -0
- package/docs/core-concepts-transaction-lifecycle.zh.md +183 -0
- package/docs/core-concepts.md +22 -0
- package/docs/core-concepts.zh.md +22 -0
- package/docs/getting-started-basic-usage.md +87 -0
- package/docs/getting-started-basic-usage.zh.md +87 -0
- package/docs/getting-started-installation.md +60 -0
- package/docs/getting-started-installation.zh.md +60 -0
- package/docs/getting-started.md +16 -0
- package/docs/getting-started.zh.md +16 -0
- package/docs/how-to-guides-delegate-permissions.md +167 -0
- package/docs/how-to-guides-delegate-permissions.zh.md +167 -0
- package/docs/how-to-guides-manage-accounts.md +73 -0
- package/docs/how-to-guides-manage-accounts.zh.md +73 -0
- package/docs/how-to-guides-manage-assets.md +255 -0
- package/docs/how-to-guides-manage-assets.zh.md +255 -0
- package/docs/how-to-guides-manage-tokens.md +179 -0
- package/docs/how-to-guides-manage-tokens.zh.md +179 -0
- package/docs/how-to-guides-stake-tokens-and-assets.md +205 -0
- package/docs/how-to-guides-stake-tokens-and-assets.zh.md +205 -0
- package/docs/how-to-guides-transfer-tokens-and-nfts.md +179 -0
- package/docs/how-to-guides-transfer-tokens-and-nfts.zh.md +179 -0
- package/docs/how-to-guides.md +27 -0
- package/docs/how-to-guides.zh.md +27 -0
- package/docs/overview.md +70 -0
- package/docs/overview.zh.md +70 -0
- package/package.json +14 -14
|
@@ -0,0 +1,814 @@
|
|
|
1
|
+
# Query & Mutation Methods
|
|
2
|
+
|
|
3
|
+
The OCAP Client interacts with the blockchain through GraphQL. Methods are categorized into two main types:
|
|
4
|
+
|
|
5
|
+
* **Queries**: These are read-only operations used to fetch data from the blockchain, such as retrieving the state of an account, listing transactions, or getting general chain information. They do not alter the state of the chain.
|
|
6
|
+
* **Mutations**: These are write operations that modify the state of the blockchain. Sending a transaction is the primary example of a mutation.
|
|
7
|
+
|
|
8
|
+
This section provides a complete reference for all available query and mutation methods provided by the client.
|
|
9
|
+
|
|
10
|
+
## Query Methods
|
|
11
|
+
|
|
12
|
+
Queries are used to retrieve data from the blockchain. Here is a complete list of all available query methods.
|
|
13
|
+
|
|
14
|
+
### `getAccountState`
|
|
15
|
+
|
|
16
|
+
Retrieves the current state of a specific account, including its balance, nonce, and other details.
|
|
17
|
+
|
|
18
|
+
**Parameters**
|
|
19
|
+
|
|
20
|
+
<x-field-group>
|
|
21
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the account to query."></x-field>
|
|
22
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="Query the state at a specific block height."></x-field>
|
|
23
|
+
<x-field data-name="keys" data-type="string[]" data-required="false" data-desc="Specific fields to retrieve."></x-field>
|
|
24
|
+
<x-field data-name="traceMigration" data-type="boolean" data-required="false" data-desc="If true, traces the account's migration history."></x-field>
|
|
25
|
+
</x-field-group>
|
|
26
|
+
|
|
27
|
+
**Returns**
|
|
28
|
+
|
|
29
|
+
<x-field data-name="ResponseGetAccountState" data-type="object" data-desc="An object containing the response code and the account state.">
|
|
30
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response (e.g., 'OK')."></x-field>
|
|
31
|
+
<x-field data-name="state" data-type="AccountState" data-desc="The detailed state of the account."></x-field>
|
|
32
|
+
</x-field>
|
|
33
|
+
|
|
34
|
+
### `getAssetState`
|
|
35
|
+
|
|
36
|
+
Retrieves the current state of a specific asset (NFT).
|
|
37
|
+
|
|
38
|
+
**Parameters**
|
|
39
|
+
|
|
40
|
+
<x-field-group>
|
|
41
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the asset to query."></x-field>
|
|
42
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="Query the state at a specific block height."></x-field>
|
|
43
|
+
<x-field data-name="keys" data-type="string[]" data-required="false" data-desc="Specific fields to retrieve."></x-field>
|
|
44
|
+
</x-field-group>
|
|
45
|
+
|
|
46
|
+
**Returns**
|
|
47
|
+
|
|
48
|
+
<x-field data-name="ResponseGetAssetState" data-type="object" data-desc="An object containing the response code and the asset state.">
|
|
49
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
50
|
+
<x-field data-name="state" data-type="AssetState" data-desc="The detailed state of the asset."></x-field>
|
|
51
|
+
</x-field>
|
|
52
|
+
|
|
53
|
+
### `getFactoryState`
|
|
54
|
+
|
|
55
|
+
Fetches the state of a specific asset factory.
|
|
56
|
+
|
|
57
|
+
**Parameters**
|
|
58
|
+
|
|
59
|
+
<x-field-group>
|
|
60
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the factory to query."></x-field>
|
|
61
|
+
</x-field-group>
|
|
62
|
+
|
|
63
|
+
**Returns**
|
|
64
|
+
|
|
65
|
+
<x-field data-name="ResponseGetFactoryState" data-type="object" data-desc="An object containing the response code and the factory state.">
|
|
66
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
67
|
+
<x-field data-name="state" data-type="AssetFactoryState" data-desc="The detailed state of the asset factory."></x-field>
|
|
68
|
+
</x-field>
|
|
69
|
+
|
|
70
|
+
### `getDelegateState`
|
|
71
|
+
|
|
72
|
+
Retrieves the state of a delegation relationship.
|
|
73
|
+
|
|
74
|
+
**Parameters**
|
|
75
|
+
|
|
76
|
+
<x-field-group>
|
|
77
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the delegation to query."></x-field>
|
|
78
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="Query the state at a specific block height."></x-field>
|
|
79
|
+
<x-field data-name="keys" data-type="string[]" data-required="false" data-desc="Specific fields to retrieve."></x-field>
|
|
80
|
+
</x-field-group>
|
|
81
|
+
|
|
82
|
+
**Returns**
|
|
83
|
+
|
|
84
|
+
<x-field data-name="ResponseGetDelegateState" data-type="object" data-desc="An object containing the response code and the delegation state.">
|
|
85
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
86
|
+
<x-field data-name="state" data-type="DelegateState" data-desc="The detailed state of the delegation."></x-field>
|
|
87
|
+
</x-field>
|
|
88
|
+
|
|
89
|
+
### `getTokenState`
|
|
90
|
+
|
|
91
|
+
Fetches the state of a specific fungible token.
|
|
92
|
+
|
|
93
|
+
**Parameters**
|
|
94
|
+
|
|
95
|
+
<x-field-group>
|
|
96
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the token to query."></x-field>
|
|
97
|
+
</x-field-group>
|
|
98
|
+
|
|
99
|
+
**Returns**
|
|
100
|
+
|
|
101
|
+
<x-field data-name="ResponseGetTokenState" data-type="object" data-desc="An object containing the response code and the token state.">
|
|
102
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
103
|
+
<x-field data-name="state" data-type="TokenState" data-desc="The detailed state of the token."></x-field>
|
|
104
|
+
</x-field>
|
|
105
|
+
|
|
106
|
+
### `getEvidenceState`
|
|
107
|
+
|
|
108
|
+
Retrieves an evidence record by its hash.
|
|
109
|
+
|
|
110
|
+
**Parameters**
|
|
111
|
+
|
|
112
|
+
<x-field-group>
|
|
113
|
+
<x-field data-name="hash" data-type="string" data-required="true" data-desc="The hash of the evidence to retrieve."></x-field>
|
|
114
|
+
</x-field-group>
|
|
115
|
+
|
|
116
|
+
**Returns**
|
|
117
|
+
|
|
118
|
+
<x-field data-name="ResponseGetEvidenceState" data-type="object" data-desc="An object containing the response code and the evidence state.">
|
|
119
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
120
|
+
<x-field data-name="state" data-type="EvidenceState" data-desc="The detailed state of the evidence."></x-field>
|
|
121
|
+
</x-field>
|
|
122
|
+
|
|
123
|
+
### `getForgeState`
|
|
124
|
+
|
|
125
|
+
Fetches the overall configuration and state of the OCAP blockchain.
|
|
126
|
+
|
|
127
|
+
**Parameters**
|
|
128
|
+
|
|
129
|
+
<x-field-group>
|
|
130
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="Query the state at a specific block height."></x-field>
|
|
131
|
+
<x-field data-name="keys" data-type="string[]" data-required="false" data-desc="Specific fields to retrieve."></x-field>
|
|
132
|
+
</x-field-group>
|
|
133
|
+
|
|
134
|
+
**Returns**
|
|
135
|
+
|
|
136
|
+
<x-field data-name="ResponseGetForgeState" data-type="object" data-desc="An object containing the response code and the chain state.">
|
|
137
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
138
|
+
<x-field data-name="state" data-type="ForgeState" data-desc="The detailed state of the OCAP chain."></x-field>
|
|
139
|
+
</x-field>
|
|
140
|
+
|
|
141
|
+
### `getTokenFactoryState`
|
|
142
|
+
|
|
143
|
+
Retrieves the state of a specific token factory.
|
|
144
|
+
|
|
145
|
+
**Parameters**
|
|
146
|
+
|
|
147
|
+
<x-field-group>
|
|
148
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the token factory to query."></x-field>
|
|
149
|
+
</x-field-group>
|
|
150
|
+
|
|
151
|
+
**Returns**
|
|
152
|
+
|
|
153
|
+
<x-field data-name="ResponseGetTokenFactoryState" data-type="object" data-desc="An object containing the response code and the token factory state.">
|
|
154
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
155
|
+
<x-field data-name="state" data-type="TokenFactoryState" data-desc="The detailed state of the token factory."></x-field>
|
|
156
|
+
</x-field>
|
|
157
|
+
|
|
158
|
+
### `getTx`
|
|
159
|
+
|
|
160
|
+
Fetches a single transaction by its hash.
|
|
161
|
+
|
|
162
|
+
**Parameters**
|
|
163
|
+
|
|
164
|
+
<x-field-group>
|
|
165
|
+
<x-field data-name="hash" data-type="string" data-required="true" data-desc="The hash of the transaction to retrieve."></x-field>
|
|
166
|
+
</x-field-group>
|
|
167
|
+
|
|
168
|
+
**Returns**
|
|
169
|
+
|
|
170
|
+
<x-field data-name="ResponseGetTx" data-type="object" data-desc="An object containing the response code and transaction details.">
|
|
171
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
172
|
+
<x-field data-name="info" data-type="TransactionInfo" data-desc="The detailed information of the transaction."></x-field>
|
|
173
|
+
</x-field>
|
|
174
|
+
|
|
175
|
+
### `getBlock`
|
|
176
|
+
|
|
177
|
+
Retrieves a single block by its height.
|
|
178
|
+
|
|
179
|
+
**Parameters**
|
|
180
|
+
|
|
181
|
+
<x-field-group>
|
|
182
|
+
<x-field data-name="height" data-type="string" data-required="true" data-desc="The height of the block to retrieve."></x-field>
|
|
183
|
+
</x-field-group>
|
|
184
|
+
|
|
185
|
+
**Returns**
|
|
186
|
+
|
|
187
|
+
<x-field data-name="ResponseGetBlock" data-type="object" data-desc="An object containing the response code and block details.">
|
|
188
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
189
|
+
<x-field data-name="block" data-type="BlockInfo" data-desc="The detailed information of the block."></x-field>
|
|
190
|
+
</x-field>
|
|
191
|
+
|
|
192
|
+
### `getBlocks`
|
|
193
|
+
|
|
194
|
+
Retrieves a list of blocks, with optional filters.
|
|
195
|
+
|
|
196
|
+
**Parameters**
|
|
197
|
+
|
|
198
|
+
<x-field-group>
|
|
199
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
200
|
+
<x-field data-name="heightFilter" data-type="RangeFilterInput" data-required="false" data-desc="Filter blocks by a height range."></x-field>
|
|
201
|
+
<x-field data-name="emptyExcluded" data-type="boolean" data-required="false" data-desc="If true, blocks with no transactions are excluded."></x-field>
|
|
202
|
+
</x-field-group>
|
|
203
|
+
|
|
204
|
+
**Returns**
|
|
205
|
+
|
|
206
|
+
<x-field data-name="ResponseGetBlocks" data-type="object" data-desc="An object containing pagination info and a list of blocks.">
|
|
207
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
208
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
209
|
+
<x-field data-name="blocks" data-type="BlockInfoSimple[]" data-desc="An array of simplified block objects."></x-field>
|
|
210
|
+
</x-field>
|
|
211
|
+
|
|
212
|
+
### `getUnconfirmedTxs`
|
|
213
|
+
|
|
214
|
+
Fetches transactions that are in the mempool but not yet confirmed.
|
|
215
|
+
|
|
216
|
+
**Parameters**
|
|
217
|
+
|
|
218
|
+
<x-field-group>
|
|
219
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
220
|
+
</x-field-group>
|
|
221
|
+
|
|
222
|
+
**Returns**
|
|
223
|
+
|
|
224
|
+
<x-field data-name="ResponseGetUnconfirmedTxs" data-type="object" data-desc="An object containing pagination info and a list of unconfirmed transactions.">
|
|
225
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
226
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
227
|
+
<x-field data-name="unconfirmedTxs" data-type="UnconfirmedTxs" data-desc="Details of unconfirmed transactions."></x-field>
|
|
228
|
+
</x-field>
|
|
229
|
+
|
|
230
|
+
### `getChainInfo`
|
|
231
|
+
|
|
232
|
+
Retrieves general information about the blockchain.
|
|
233
|
+
|
|
234
|
+
**Parameters**
|
|
235
|
+
|
|
236
|
+
This method does not take any parameters.
|
|
237
|
+
|
|
238
|
+
**Returns**
|
|
239
|
+
|
|
240
|
+
<x-field data-name="ResponseGetChainInfo" data-type="object" data-desc="An object containing the response code and chain information.">
|
|
241
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
242
|
+
<x-field data-name="info" data-type="ChainInfo" data-desc="The detailed information of the chain."></x-field>
|
|
243
|
+
</x-field>
|
|
244
|
+
|
|
245
|
+
### `getConfig`
|
|
246
|
+
|
|
247
|
+
Fetches the node's configuration.
|
|
248
|
+
|
|
249
|
+
**Parameters**
|
|
250
|
+
|
|
251
|
+
<x-field-group>
|
|
252
|
+
<x-field data-name="parsed" data-type="boolean" data-required="false" data-desc="If true, returns the parsed configuration."></x-field>
|
|
253
|
+
</x-field-group>
|
|
254
|
+
|
|
255
|
+
**Returns**
|
|
256
|
+
|
|
257
|
+
<x-field data-name="ResponseGetConfig" data-type="object" data-desc="An object containing the response code and the configuration.">
|
|
258
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
259
|
+
<x-field data-name="config" data-type="string" data-desc="The node's configuration as a string."></x-field>
|
|
260
|
+
</x-field>
|
|
261
|
+
|
|
262
|
+
### `getNetInfo`
|
|
263
|
+
|
|
264
|
+
Retrieves network information, including connected peers.
|
|
265
|
+
|
|
266
|
+
**Parameters**
|
|
267
|
+
|
|
268
|
+
This method does not take any parameters.
|
|
269
|
+
|
|
270
|
+
**Returns**
|
|
271
|
+
|
|
272
|
+
<x-field data-name="ResponseGetNetInfo" data-type="object" data-desc="An object containing the response code and network information.">
|
|
273
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
274
|
+
<x-field data-name="netInfo" data-type="NetInfo" data-desc="Detailed network information."></x-field>
|
|
275
|
+
</x-field>
|
|
276
|
+
|
|
277
|
+
### `getNodeInfo`
|
|
278
|
+
|
|
279
|
+
Retrieves information about the specific node being queried.
|
|
280
|
+
|
|
281
|
+
**Parameters**
|
|
282
|
+
|
|
283
|
+
This method does not take any parameters.
|
|
284
|
+
|
|
285
|
+
**Returns**
|
|
286
|
+
|
|
287
|
+
<x-field data-name="ResponseGetNodeInfo" data-type="object" data-desc="An object containing the response code and node information.">
|
|
288
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
289
|
+
<x-field data-name="info" data-type="NodeInfo" data-desc="Detailed information about the node."></x-field>
|
|
290
|
+
</x-field>
|
|
291
|
+
|
|
292
|
+
### `getValidatorsInfo`
|
|
293
|
+
|
|
294
|
+
Fetches information about the current set of validators.
|
|
295
|
+
|
|
296
|
+
**Parameters**
|
|
297
|
+
|
|
298
|
+
This method does not take any parameters.
|
|
299
|
+
|
|
300
|
+
**Returns**
|
|
301
|
+
|
|
302
|
+
<x-field data-name="ResponseGetValidatorsInfo" data-type="object" data-desc="An object containing the response code and validators information.">
|
|
303
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
304
|
+
<x-field data-name="validatorsInfo" data-type="ValidatorsInfo" data-desc="Detailed information about the validators."></x-field>
|
|
305
|
+
</x-field>
|
|
306
|
+
|
|
307
|
+
### `getForgeStats`
|
|
308
|
+
|
|
309
|
+
Retrieves various statistics about the blockchain's activity.
|
|
310
|
+
|
|
311
|
+
**Parameters**
|
|
312
|
+
|
|
313
|
+
This method does not take any parameters.
|
|
314
|
+
|
|
315
|
+
**Returns**
|
|
316
|
+
|
|
317
|
+
<x-field data-name="ResponseGetForgeStats" data-type="object" data-desc="An object containing the response code and chain statistics.">
|
|
318
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
319
|
+
<x-field data-name="forgeStats" data-type="ForgeStats" data-desc="Various statistics about the OCAP chain."></x-field>
|
|
320
|
+
</x-field>
|
|
321
|
+
|
|
322
|
+
### `listAssetTransactions`
|
|
323
|
+
|
|
324
|
+
Lists all transactions related to a specific asset.
|
|
325
|
+
|
|
326
|
+
**Parameters**
|
|
327
|
+
|
|
328
|
+
<x-field-group>
|
|
329
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the asset."></x-field>
|
|
330
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
331
|
+
</x-field-group>
|
|
332
|
+
|
|
333
|
+
**Returns**
|
|
334
|
+
|
|
335
|
+
<x-field data-name="ResponseListAssetTransactions" data-type="object" data-desc="An object containing pagination info and a list of transactions.">
|
|
336
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
337
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
338
|
+
<x-field data-name="transactions" data-type="IndexedTransaction[]" data-desc="An array of transaction objects."></x-field>
|
|
339
|
+
</x-field>
|
|
340
|
+
|
|
341
|
+
### `listAssets`
|
|
342
|
+
|
|
343
|
+
Lists all assets, with filters for owner or factory.
|
|
344
|
+
|
|
345
|
+
**Parameters**
|
|
346
|
+
|
|
347
|
+
<x-field-group>
|
|
348
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
349
|
+
<x-field data-name="ownerAddress" data-type="string" data-required="false" data-desc="Filter assets by the owner's address."></x-field>
|
|
350
|
+
<x-field data-name="factoryAddress" data-type="string" data-required="false" data-desc="Filter assets by the factory's address."></x-field>
|
|
351
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter assets by a time range."></x-field>
|
|
352
|
+
</x-field-group>
|
|
353
|
+
|
|
354
|
+
**Returns**
|
|
355
|
+
|
|
356
|
+
<x-field data-name="ResponseListAssets" data-type="object" data-desc="An object containing pagination info and a list of assets.">
|
|
357
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
358
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
359
|
+
<x-field data-name="assets" data-type="IndexedAssetState[]" data-desc="An array of asset state objects."></x-field>
|
|
360
|
+
</x-field>
|
|
361
|
+
|
|
362
|
+
### `listBlocks`
|
|
363
|
+
|
|
364
|
+
Lists blocks with various filtering options.
|
|
365
|
+
|
|
366
|
+
**Parameters**
|
|
367
|
+
|
|
368
|
+
<x-field-group>
|
|
369
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
370
|
+
<x-field data-name="proposer" data-type="string" data-required="false" data-desc="Filter blocks by the proposer's address."></x-field>
|
|
371
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter blocks by a time range."></x-field>
|
|
372
|
+
<x-field data-name="heightFilter" data-type="RangeFilterInput" data-required="false" data-desc="Filter blocks by a height range."></x-field>
|
|
373
|
+
<x-field data-name="numTxsFilter" data-type="RangeFilterInput" data-required="false" data-desc="Filter blocks by the number of transactions."></x-field>
|
|
374
|
+
<x-field data-name="numInvalidTxsFilter" data-type="RangeFilterInput" data-required="false" data-desc="Filter blocks by the number of invalid transactions."></x-field>
|
|
375
|
+
</x-field-group>
|
|
376
|
+
|
|
377
|
+
**Returns**
|
|
378
|
+
|
|
379
|
+
<x-field data-name="ResponseListBlocks" data-type="object" data-desc="An object containing pagination info and a list of blocks.">
|
|
380
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
381
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
382
|
+
<x-field data-name="blocks" data-type="IndexedBlock[]" data-desc="An array of block objects."></x-field>
|
|
383
|
+
</x-field>
|
|
384
|
+
|
|
385
|
+
### `listTopAccounts`
|
|
386
|
+
|
|
387
|
+
Lists accounts with the highest balance of a specific token.
|
|
388
|
+
|
|
389
|
+
**Parameters**
|
|
390
|
+
|
|
391
|
+
<x-field-group>
|
|
392
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
393
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="false" data-desc="The address of the token. If not provided, it defaults to the native token."></x-field>
|
|
394
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter accounts by a time range."></x-field>
|
|
395
|
+
</x-field-group>
|
|
396
|
+
|
|
397
|
+
**Returns**
|
|
398
|
+
|
|
399
|
+
<x-field data-name="ResponseListTopAccounts" data-type="object" data-desc="An object containing pagination info and a list of top accounts.">
|
|
400
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
401
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
402
|
+
<x-field data-name="accounts" data-type="IndexedAccountState[]" data-desc="An array of account state objects."></x-field>
|
|
403
|
+
</x-field>
|
|
404
|
+
|
|
405
|
+
### `listTransactions`
|
|
406
|
+
|
|
407
|
+
A powerful method to list transactions with a wide range of filters.
|
|
408
|
+
|
|
409
|
+
**Parameters**
|
|
410
|
+
|
|
411
|
+
<x-field-group>
|
|
412
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
413
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter transactions by a time range."></x-field>
|
|
414
|
+
<x-field data-name="addressFilter" data-type="AddressFilterInput" data-required="false" data-desc="Filter transactions by sender or receiver address."></x-field>
|
|
415
|
+
<x-field data-name="typeFilter" data-type="TypeFilterInput" data-required="false" data-desc="Filter by transaction type."></x-field>
|
|
416
|
+
<x-field data-name="validityFilter" data-type="ValidityFilterInput" data-required="false" data-desc="Filter by transaction validity."></x-field>
|
|
417
|
+
<x-field data-name="factoryFilter" data-type="FactoryFilterInput" data-required="false" data-desc="Filter by factory address."></x-field>
|
|
418
|
+
<x-field data-name="tokenFilter" data-type="TokenFilterInput" data-required="false" data-desc="Filter by token address."></x-field>
|
|
419
|
+
<x-field data-name="assetFilter" data-type="AssetFilterInput" data-required="false" data-desc="Filter by asset address."></x-field>
|
|
420
|
+
<x-field data-name="accountFilter" data-type="AccountFilterInput" data-required="false" data-desc="Filter by account address."></x-field>
|
|
421
|
+
<x-field data-name="txFilter" data-type="TxFilterInput" data-required="false" data-desc="Filter by transaction hash."></x-field>
|
|
422
|
+
<x-field data-name="rollupFilter" data-type="RollupFilterInput" data-required="false" data-desc="Filter by rollup address."></x-field>
|
|
423
|
+
<x-field data-name="stakeFilter" data-type="StakeFilterInput" data-required="false" data-desc="Filter by stake address."></x-field>
|
|
424
|
+
<x-field data-name="delegationFilter" data-type="DelegationFilterInput" data-required="false" data-desc="Filter by delegation address."></x-field>
|
|
425
|
+
<x-field data-name="tokenFactoryFilter" data-type="TokenFactoryFilterInput" data-required="false" data-desc="Filter by token factory address."></x-field>
|
|
426
|
+
</x-field-group>
|
|
427
|
+
|
|
428
|
+
**Returns**
|
|
429
|
+
|
|
430
|
+
<x-field data-name="ResponseListTransactions" data-type="object" data-desc="An object containing pagination info and a list of transactions.">
|
|
431
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
432
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
433
|
+
<x-field data-name="transactions" data-type="IndexedTransaction[]" data-desc="An array of transaction objects."></x-field>
|
|
434
|
+
</x-field>
|
|
435
|
+
|
|
436
|
+
### `listTokens`
|
|
437
|
+
|
|
438
|
+
Lists all fungible tokens on the chain.
|
|
439
|
+
|
|
440
|
+
**Parameters**
|
|
441
|
+
|
|
442
|
+
<x-field-group>
|
|
443
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
444
|
+
<x-field data-name="issuerAddress" data-type="string" data-required="false" data-desc="Filter tokens by the issuer's address."></x-field>
|
|
445
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter tokens by a time range."></x-field>
|
|
446
|
+
</x-field-group>
|
|
447
|
+
|
|
448
|
+
**Returns**
|
|
449
|
+
|
|
450
|
+
<x-field data-name="ResponseListTokens" data-type="object" data-desc="An object containing pagination info and a list of tokens.">
|
|
451
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
452
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
453
|
+
<x-field data-name="tokens" data-type="IndexedTokenState[]" data-desc="An array of token state objects."></x-field>
|
|
454
|
+
</x-field>
|
|
455
|
+
|
|
456
|
+
### `listFactories`
|
|
457
|
+
|
|
458
|
+
Lists all asset factories on the chain.
|
|
459
|
+
|
|
460
|
+
**Parameters**
|
|
461
|
+
|
|
462
|
+
<x-field-group>
|
|
463
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
464
|
+
<x-field data-name="ownerAddress" data-type="string" data-required="false" data-desc="Filter factories by the owner's address."></x-field>
|
|
465
|
+
<x-field data-name="addressList" data-type="string[]" data-required="false" data-desc="A list of factory addresses to query."></x-field>
|
|
466
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter factories by a time range."></x-field>
|
|
467
|
+
</x-field-group>
|
|
468
|
+
|
|
469
|
+
**Returns**
|
|
470
|
+
|
|
471
|
+
<x-field data-name="ResponseListFactories" data-type="object" data-desc="An object containing pagination info and a list of factories.">
|
|
472
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
473
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
474
|
+
<x-field data-name="factories" data-type="IndexedFactoryState[]" data-desc="An array of factory state objects."></x-field>
|
|
475
|
+
</x-field>
|
|
476
|
+
|
|
477
|
+
### `getAccountTokens`
|
|
478
|
+
|
|
479
|
+
Retrieves the token balances for a specific account.
|
|
480
|
+
|
|
481
|
+
**Parameters**
|
|
482
|
+
|
|
483
|
+
<x-field-group>
|
|
484
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the account."></x-field>
|
|
485
|
+
<x-field data-name="token" data-type="string" data-required="false" data-desc="Specific token address to query."></x-field>
|
|
486
|
+
</x-field-group>
|
|
487
|
+
|
|
488
|
+
**Returns**
|
|
489
|
+
|
|
490
|
+
<x-field data-name="ResponseGetAccountTokens" data-type="object" data-desc="An object containing the response code and a list of account tokens.">
|
|
491
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
492
|
+
<x-field data-name="tokens" data-type="AccountToken[]" data-desc="An array of token balance objects."></x-field>
|
|
493
|
+
</x-field>
|
|
494
|
+
|
|
495
|
+
### `getStakeState`
|
|
496
|
+
|
|
497
|
+
Fetches the state of a specific stake.
|
|
498
|
+
|
|
499
|
+
**Parameters**
|
|
500
|
+
|
|
501
|
+
<x-field-group>
|
|
502
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the stake to query."></x-field>
|
|
503
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="Query the state at a specific block height."></x-field>
|
|
504
|
+
<x-field data-name="keys" data-type="string[]" data-required="false" data-desc="Specific fields to retrieve."></x-field>
|
|
505
|
+
</x-field-group>
|
|
506
|
+
|
|
507
|
+
**Returns**
|
|
508
|
+
|
|
509
|
+
<x-field data-name="ResponseGetStakeState" data-type="object" data-desc="An object containing the response code and the stake state.">
|
|
510
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
511
|
+
<x-field data-name="state" data-type="StakeState" data-desc="The detailed state of the stake."></x-field>
|
|
512
|
+
</x-field>
|
|
513
|
+
|
|
514
|
+
### `listStakes`
|
|
515
|
+
|
|
516
|
+
Lists all stake records, with optional filters.
|
|
517
|
+
|
|
518
|
+
**Parameters**
|
|
519
|
+
|
|
520
|
+
<x-field-group>
|
|
521
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
522
|
+
<x-field data-name="addressFilter" data-type="AddressFilterInput" data-required="false" data-desc="Filter stakes by sender or receiver address."></x-field>
|
|
523
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter stakes by a time range."></x-field>
|
|
524
|
+
<x-field data-name="assetFilter" data-type="AssetFilterInput" data-required="false" data-desc="Filter stakes by asset address."></x-field>
|
|
525
|
+
</x-field-group>
|
|
526
|
+
|
|
527
|
+
**Returns**
|
|
528
|
+
|
|
529
|
+
<x-field data-name="ResponseListStakes" data-type="object" data-desc="An object containing pagination info and a list of stakes.">
|
|
530
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
531
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
532
|
+
<x-field data-name="stakes" data-type="IndexedStakeState[]" data-desc="An array of stake state objects."></x-field>
|
|
533
|
+
</x-field>
|
|
534
|
+
|
|
535
|
+
### `getRollupState`
|
|
536
|
+
|
|
537
|
+
Retrieves the state of a specific rollup.
|
|
538
|
+
|
|
539
|
+
**Parameters**
|
|
540
|
+
|
|
541
|
+
<x-field-group>
|
|
542
|
+
<x-field data-name="address" data-type="string" data-required="true" data-desc="The address of the rollup to query."></x-field>
|
|
543
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="Query the state at a specific block height."></x-field>
|
|
544
|
+
<x-field data-name="keys" data-type="string[]" data-required="false" data-desc="Specific fields to retrieve."></x-field>
|
|
545
|
+
</x-field-group>
|
|
546
|
+
|
|
547
|
+
**Returns**
|
|
548
|
+
|
|
549
|
+
<x-field data-name="ResponseGetRollupState" data-type="object" data-desc="An object containing the response code and the rollup state.">
|
|
550
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
551
|
+
<x-field data-name="state" data-type="RollupState" data-desc="The detailed state of the rollup."></x-field>
|
|
552
|
+
</x-field>
|
|
553
|
+
|
|
554
|
+
### `listRollups`
|
|
555
|
+
|
|
556
|
+
Lists all rollups on the chain.
|
|
557
|
+
|
|
558
|
+
**Parameters**
|
|
559
|
+
|
|
560
|
+
<x-field-group>
|
|
561
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
562
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="false" data-desc="Filter rollups by token address."></x-field>
|
|
563
|
+
<x-field data-name="foreignTokenAddress" data-type="string" data-required="false" data-desc="Filter rollups by foreign token address."></x-field>
|
|
564
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter rollups by a time range."></x-field>
|
|
565
|
+
</x-field-group>
|
|
566
|
+
|
|
567
|
+
**Returns**
|
|
568
|
+
|
|
569
|
+
<x-field data-name="ResponseListRollups" data-type="object" data-desc="An object containing pagination info and a list of rollups.">
|
|
570
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
571
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
572
|
+
<x-field data-name="rollups" data-type="IndexedRollupState[]" data-desc="An array of rollup state objects."></x-field>
|
|
573
|
+
</x-field>
|
|
574
|
+
|
|
575
|
+
### `getRollupBlock`
|
|
576
|
+
|
|
577
|
+
Fetches a specific block from a rollup sidechain.
|
|
578
|
+
|
|
579
|
+
**Parameters**
|
|
580
|
+
|
|
581
|
+
<x-field-group>
|
|
582
|
+
<x-field data-name="hash" data-type="string" data-required="false" data-desc="The hash of the rollup block."></x-field>
|
|
583
|
+
<x-field data-name="height" data-type="string" data-required="false" data-desc="The height of the rollup block."></x-field>
|
|
584
|
+
<x-field data-name="rollupAddress" data-type="string" data-required="true" data-desc="The address of the rollup."></x-field>
|
|
585
|
+
</x-field-group>
|
|
586
|
+
|
|
587
|
+
**Returns**
|
|
588
|
+
|
|
589
|
+
<x-field data-name="ResponseGetRollupBlock" data-type="object" data-desc="An object containing the response code and the rollup block.">
|
|
590
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
591
|
+
<x-field data-name="block" data-type="RollupBlock" data-desc="The detailed information of the rollup block."></x-field>
|
|
592
|
+
</x-field>
|
|
593
|
+
|
|
594
|
+
### `listRollupBlocks`
|
|
595
|
+
|
|
596
|
+
Lists blocks from a rollup sidechain.
|
|
597
|
+
|
|
598
|
+
**Parameters**
|
|
599
|
+
|
|
600
|
+
<x-field-group>
|
|
601
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
602
|
+
<x-field data-name="rollupAddress" data-type="string" data-required="true" data-desc="The address of the rollup."></x-field>
|
|
603
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="false" data-desc="Filter by token address."></x-field>
|
|
604
|
+
<x-field data-name="proposer" data-type="string" data-required="false" data-desc="Filter by proposer address."></x-field>
|
|
605
|
+
<x-field data-name="validatorFilter" data-type="ValidatorFilterInput" data-required="false" data-desc="Filter by validator."></x-field>
|
|
606
|
+
<x-field data-name="txFilter" data-type="TxFilterInput" data-required="false" data-desc="Filter by transaction hash."></x-field>
|
|
607
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter by time range."></x-field>
|
|
608
|
+
</x-field-group>
|
|
609
|
+
|
|
610
|
+
**Returns**
|
|
611
|
+
|
|
612
|
+
<x-field data-name="ResponseListRollupBlocks" data-type="object" data-desc="An object containing pagination info and a list of rollup blocks.">
|
|
613
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
614
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
615
|
+
<x-field data-name="blocks" data-type="IndexedRollupBlock[]" data-desc="An array of rollup block objects."></x-field>
|
|
616
|
+
</x-field>
|
|
617
|
+
|
|
618
|
+
### `listRollupValidators`
|
|
619
|
+
|
|
620
|
+
Lists the validators for a specific rollup.
|
|
621
|
+
|
|
622
|
+
**Parameters**
|
|
623
|
+
|
|
624
|
+
<x-field-group>
|
|
625
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
626
|
+
<x-field data-name="rollupAddress" data-type="string" data-required="true" data-desc="The address of the rollup."></x-field>
|
|
627
|
+
</x-field-group>
|
|
628
|
+
|
|
629
|
+
**Returns**
|
|
630
|
+
|
|
631
|
+
<x-field data-name="ResponseListRollupValidators" data-type="object" data-desc="An object containing pagination info and a list of rollup validators.">
|
|
632
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
633
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
634
|
+
<x-field data-name="validators" data-type="IndexedRollupValidator[]" data-desc="An array of rollup validator objects."></x-field>
|
|
635
|
+
</x-field>
|
|
636
|
+
|
|
637
|
+
### `listDelegations`
|
|
638
|
+
|
|
639
|
+
Lists all delegation records.
|
|
640
|
+
|
|
641
|
+
**Parameters**
|
|
642
|
+
|
|
643
|
+
<x-field-group>
|
|
644
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
645
|
+
<x-field data-name="from" data-type="string" data-required="false" data-desc="Filter by the delegator's address."></x-field>
|
|
646
|
+
<x-field data-name="to" data-type="string" data-required="false" data-desc="Filter by the delegatee's address."></x-field>
|
|
647
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter by time range."></x-field>
|
|
648
|
+
</x-field-group>
|
|
649
|
+
|
|
650
|
+
**Returns**
|
|
651
|
+
|
|
652
|
+
<x-field data-name="ResponseListDelegations" data-type="object" data-desc="An object containing pagination info and a list of delegations.">
|
|
653
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
654
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
655
|
+
<x-field data-name="delegations" data-type="IndexedDelegationState[]" data-desc="An array of delegation state objects."></x-field>
|
|
656
|
+
</x-field>
|
|
657
|
+
|
|
658
|
+
### `search`
|
|
659
|
+
|
|
660
|
+
Performs a keyword search for accounts, assets, or transactions.
|
|
661
|
+
|
|
662
|
+
**Parameters**
|
|
663
|
+
|
|
664
|
+
<x-field-group>
|
|
665
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
666
|
+
<x-field data-name="keyword" data-type="string" data-required="true" data-desc="The keyword to search for."></x-field>
|
|
667
|
+
</x-field-group>
|
|
668
|
+
|
|
669
|
+
**Returns**
|
|
670
|
+
|
|
671
|
+
<x-field data-name="ResponseSearch" data-type="object" data-desc="An object containing pagination info and search results.">
|
|
672
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
673
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
674
|
+
<x-field data-name="results" data-type="SearchResult[]" data-desc="An array of search result objects."></x-field>
|
|
675
|
+
</x-field>
|
|
676
|
+
|
|
677
|
+
### `estimateGas`
|
|
678
|
+
|
|
679
|
+
Estimates the gas required for a transaction.
|
|
680
|
+
|
|
681
|
+
**Parameters**
|
|
682
|
+
|
|
683
|
+
<x-field-group>
|
|
684
|
+
<x-field data-name="typeUrl" data-type="string" data-required="true" data-desc="The type URL of the transaction."></x-field>
|
|
685
|
+
<x-field data-name="tx" data-type="string" data-required="true" data-desc="The encoded transaction string."></x-field>
|
|
686
|
+
</x-field-group>
|
|
687
|
+
|
|
688
|
+
**Returns**
|
|
689
|
+
|
|
690
|
+
<x-field data-name="ResponseEstimateGas" data-type="object" data-desc="An object containing the response code and the gas estimate.">
|
|
691
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
692
|
+
<x-field data-name="estimate" data-type="GasEstimate" data-desc="The estimated gas."></x-field>
|
|
693
|
+
</x-field>
|
|
694
|
+
|
|
695
|
+
### `listTokenFlows`
|
|
696
|
+
|
|
697
|
+
Traces the flow of tokens between accounts.
|
|
698
|
+
|
|
699
|
+
**Parameters**
|
|
700
|
+
|
|
701
|
+
<x-field-group>
|
|
702
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
703
|
+
<x-field data-name="accountAddress" data-type="string" data-required="true" data-desc="The address of the account to trace."></x-field>
|
|
704
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="false" data-desc="The address of the token to trace."></x-field>
|
|
705
|
+
<x-field data-name="depth" data-type="number" data-required="false" data-desc="The depth of the trace."></x-field>
|
|
706
|
+
<x-field data-name="direction" data-type="TokenFlowDirection" data-required="false" data-desc="The direction of the flow (IN or OUT)."></x-field>
|
|
707
|
+
</x-field-group>
|
|
708
|
+
|
|
709
|
+
**Returns**
|
|
710
|
+
|
|
711
|
+
<x-field data-name="ResponseListTokenFlows" data-type="object" data-desc="An object containing pagination info and token flow data.">
|
|
712
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
713
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
714
|
+
<x-field data-name="data" data-type="IndexedTokenFlow[]" data-desc="An array of token flow objects."></x-field>
|
|
715
|
+
</x-field>
|
|
716
|
+
|
|
717
|
+
### `verifyAccountRisk`
|
|
718
|
+
|
|
719
|
+
Assesses the risk profile of a given account.
|
|
720
|
+
|
|
721
|
+
**Parameters**
|
|
722
|
+
|
|
723
|
+
<x-field-group>
|
|
724
|
+
<x-field data-name="accountAddress" data-type="string" data-required="true" data-desc="The address of the account to verify."></x-field>
|
|
725
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="false" data-desc="The address of the token for context."></x-field>
|
|
726
|
+
</x-field-group>
|
|
727
|
+
|
|
728
|
+
**Returns**
|
|
729
|
+
|
|
730
|
+
<x-field data-name="ResponseVerifyAccountRisk" data-type="object" data-desc="An object containing the response code and the risk verification result.">
|
|
731
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
732
|
+
<x-field data-name="data" data-type="VerifyAccountRiskResult" data-desc="The result of the risk verification."></x-field>
|
|
733
|
+
</x-field>
|
|
734
|
+
|
|
735
|
+
### `getTokenDistribution`
|
|
736
|
+
|
|
737
|
+
Retrieves the distribution statistics for a given token.
|
|
738
|
+
|
|
739
|
+
**Parameters**
|
|
740
|
+
|
|
741
|
+
<x-field-group>
|
|
742
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="true" data-desc="The address of the token."></x-field>
|
|
743
|
+
</x-field-group>
|
|
744
|
+
|
|
745
|
+
**Returns**
|
|
746
|
+
|
|
747
|
+
<x-field data-name="ResponseGetTokenDistribution" data-type="object" data-desc="An object containing the response code and token distribution data.">
|
|
748
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
749
|
+
<x-field data-name="data" data-type="TokenDistribution" data-desc="The token distribution statistics."></x-field>
|
|
750
|
+
</x-field>
|
|
751
|
+
|
|
752
|
+
### `listTokenFactories`
|
|
753
|
+
|
|
754
|
+
Lists all token factories on the chain.
|
|
755
|
+
|
|
756
|
+
**Parameters**
|
|
757
|
+
|
|
758
|
+
<x-field-group>
|
|
759
|
+
<x-field data-name="paging" data-type="PageInput" data-required="false" data-desc="Pagination settings."></x-field>
|
|
760
|
+
<x-field data-name="tokenAddress" data-type="string" data-required="false" data-desc="Filter by token address."></x-field>
|
|
761
|
+
<x-field data-name="reserveAddress" data-type="string" data-required="false" data-desc="Filter by reserve token address."></x-field>
|
|
762
|
+
<x-field data-name="owner" data-type="string" data-required="false" data-desc="Filter by owner address."></x-field>
|
|
763
|
+
<x-field data-name="timeFilter" data-type="TimeFilterInput" data-required="false" data-desc="Filter by time range."></x-field>
|
|
764
|
+
</x-field-group>
|
|
765
|
+
|
|
766
|
+
**Returns**
|
|
767
|
+
|
|
768
|
+
<x-field data-name="ResponseListTokenFactories" data-type="object" data-desc="An object containing pagination info and a list of token factories.">
|
|
769
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
770
|
+
<x-field data-name="page" data-type="PageInfo" data-desc="Pagination information."></x-field>
|
|
771
|
+
<x-field data-name="tokenFactories" data-type="IndexedTokenFactoryState[]" data-desc="An array of token factory state objects."></x-field>
|
|
772
|
+
</x-field>
|
|
773
|
+
|
|
774
|
+
## Mutation Methods
|
|
775
|
+
|
|
776
|
+
Mutations are used to send transactions that modify the state of the blockchain.
|
|
777
|
+
|
|
778
|
+
### `sendTx`
|
|
779
|
+
|
|
780
|
+
Broadcasts a pre-signed transaction to the network. This is the fundamental method for all write operations. For creating and signing transactions, see the [High-level API](./api-reference-transaction-helpers.md) and [Transaction Lifecycle](./core-concepts-transaction-lifecycle.md) guides.
|
|
781
|
+
|
|
782
|
+
**Parameters**
|
|
783
|
+
|
|
784
|
+
<x-field-group>
|
|
785
|
+
<x-field data-name="tx" data-type="string" data-required="true" data-desc="The encoded transaction string."></x-field>
|
|
786
|
+
<x-field data-name="wallet" data-type="object" data-required="true" data-desc="The wallet object used for signing."></x-field>
|
|
787
|
+
<x-field data-name="token" data-type="string" data-required="false" data-desc="Authentication token, if required."></x-field>
|
|
788
|
+
<x-field data-name="commit" data-type="boolean" data-required="false" data-default="true" data-desc="If true, waits for the transaction to be committed to a block."></x-field>
|
|
789
|
+
<x-field data-name="extra" data-type="string" data-required="false" data-desc="Extra data to be included."></x-field>
|
|
790
|
+
</x-field-group>
|
|
791
|
+
|
|
792
|
+
**Returns**
|
|
793
|
+
|
|
794
|
+
<x-field data-name="ResponseSendTx" data-type="object" data-desc="An object containing the response code and the transaction hash.">
|
|
795
|
+
<x-field data-name="code" data-type="string" data-desc="The status code of the response."></x-field>
|
|
796
|
+
<x-field data-name="hash" data-type="string" data-desc="The hash of the submitted transaction."></x-field>
|
|
797
|
+
</x-field>
|
|
798
|
+
|
|
799
|
+
**Example**
|
|
800
|
+
|
|
801
|
+
```javascript icon=logos:javascript
|
|
802
|
+
// This example assumes `signedTx` is a properly encoded and signed transaction string.
|
|
803
|
+
// See other guides for how to create it.
|
|
804
|
+
|
|
805
|
+
const signedTx = '...';
|
|
806
|
+
const wallet = { ... }; // The wallet that signed the transaction
|
|
807
|
+
|
|
808
|
+
try {
|
|
809
|
+
const { hash } = await client.sendTx({ tx: signedTx, wallet });
|
|
810
|
+
console.log('Transaction sent successfully! Hash:', hash);
|
|
811
|
+
} catch (error) {
|
|
812
|
+
console.error('Failed to send transaction:', error);
|
|
813
|
+
}
|
|
814
|
+
```
|