@ocap/sdk 1.18.165 → 1.19.0
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/index.d.ts +73 -1
- package/package.json +8 -8
package/index.d.ts
CHANGED
|
@@ -267,7 +267,7 @@ export interface WalletObject<T extends BytesType = string> {
|
|
|
267
267
|
sign(data: BytesType, hashBeforeSign?: boolean, encoding?: 'buffer'): Buffer;
|
|
268
268
|
sign(data: BytesType, hashBeforeSign?: boolean, encoding?: 'Uint8Array'): Uint8Array;
|
|
269
269
|
sign(data: BytesType, hashBeforeSign?: boolean, encoding?: EncodingType): BytesType;
|
|
270
|
-
verify(data: BytesType, signature: BytesType, hashBeforeVerify?: boolean): boolean
|
|
270
|
+
verify(data: BytesType, signature: BytesType, hashBeforeVerify?: boolean, extra?: any): Promise<boolean>;
|
|
271
271
|
ethHash(data: string): string;
|
|
272
272
|
ethSign(data: string, hashBeforeSign?: boolean): string;
|
|
273
273
|
ethVerify(data: string, signature: string, hashBeforeVerify?: boolean): boolean;
|
|
@@ -841,6 +841,12 @@ declare interface OcapSDK {
|
|
|
841
841
|
): Promise<GraphQLClient.ResponseListDelegations>;
|
|
842
842
|
search(params: PartialDeep<GraphQLClient.SearchParams>): Promise<GraphQLClient.ResponseSearch>;
|
|
843
843
|
estimateGas(params: PartialDeep<GraphQLClient.EstimateGasParams>): Promise<GraphQLClient.ResponseEstimateGas>;
|
|
844
|
+
listTokenFlows(
|
|
845
|
+
params: PartialDeep<GraphQLClient.ListTokenFlowsParams>
|
|
846
|
+
): Promise<GraphQLClient.ResponseListTokenFlows>;
|
|
847
|
+
verifyAccountRisk(
|
|
848
|
+
params: PartialDeep<GraphQLClient.VerifyAccountRiskParams>
|
|
849
|
+
): Promise<GraphQLClient.ResponseVerifyAccountRisk>;
|
|
844
850
|
sendTx(params: PartialDeep<GraphQLClient.SendTxParams>): Promise<GraphQLClient.ResponseSendTx>;
|
|
845
851
|
}
|
|
846
852
|
|
|
@@ -1008,6 +1014,11 @@ declare namespace GraphQLClient {
|
|
|
1008
1014
|
TIMEOUT,
|
|
1009
1015
|
}
|
|
1010
1016
|
|
|
1017
|
+
enum TokenFlowDirection {
|
|
1018
|
+
IN,
|
|
1019
|
+
OUT,
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1011
1022
|
enum UpgradeAction {
|
|
1012
1023
|
VERIFY,
|
|
1013
1024
|
BACKUP,
|
|
@@ -1195,6 +1206,14 @@ declare namespace GraphQLClient {
|
|
|
1195
1206
|
assetFilter: GraphQLClient.AssetFilterInput;
|
|
1196
1207
|
}
|
|
1197
1208
|
|
|
1209
|
+
interface RequestListTokenFlowsInput {
|
|
1210
|
+
paging: GraphQLClient.PageInput;
|
|
1211
|
+
accountAddress: string;
|
|
1212
|
+
tokenAddress: string;
|
|
1213
|
+
depth: number;
|
|
1214
|
+
direction: GraphQLClient.TokenFlowDirection;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1198
1217
|
interface RequestListTokensInput {
|
|
1199
1218
|
paging: GraphQLClient.PageInput;
|
|
1200
1219
|
issuerAddress: string;
|
|
@@ -1233,6 +1252,12 @@ declare namespace GraphQLClient {
|
|
|
1233
1252
|
wallet: GraphQLClient.WalletInfoInput;
|
|
1234
1253
|
token: string;
|
|
1235
1254
|
commit: boolean;
|
|
1255
|
+
extra: string;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
interface RequestVerifyAccountRiskInput {
|
|
1259
|
+
accountAddress: string;
|
|
1260
|
+
tokenAddress: string;
|
|
1236
1261
|
}
|
|
1237
1262
|
|
|
1238
1263
|
interface RollupFilterInput {
|
|
@@ -1966,6 +1991,13 @@ declare namespace GraphQLClient {
|
|
|
1966
1991
|
data: GraphQLClient.Any;
|
|
1967
1992
|
}
|
|
1968
1993
|
|
|
1994
|
+
interface IndexedTokenFlow {
|
|
1995
|
+
value: string;
|
|
1996
|
+
hash: string;
|
|
1997
|
+
from: string;
|
|
1998
|
+
to: string;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
1969
2001
|
interface IndexedTokenInput {
|
|
1970
2002
|
address: string;
|
|
1971
2003
|
value: string;
|
|
@@ -2303,6 +2335,12 @@ declare namespace GraphQLClient {
|
|
|
2303
2335
|
stakes: GraphQLClient.IndexedStakeState[];
|
|
2304
2336
|
}
|
|
2305
2337
|
|
|
2338
|
+
interface ResponseListTokenFlows {
|
|
2339
|
+
code: string;
|
|
2340
|
+
page: GraphQLClient.PageInfo;
|
|
2341
|
+
data: GraphQLClient.IndexedTokenFlow[];
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2306
2344
|
interface ResponseListTokens {
|
|
2307
2345
|
code: string;
|
|
2308
2346
|
page: GraphQLClient.PageInfo;
|
|
@@ -2332,6 +2370,11 @@ declare namespace GraphQLClient {
|
|
|
2332
2370
|
hash: string;
|
|
2333
2371
|
}
|
|
2334
2372
|
|
|
2373
|
+
interface ResponseVerifyAccountRisk {
|
|
2374
|
+
code: string;
|
|
2375
|
+
data: GraphQLClient.VerifyAccountRiskResult;
|
|
2376
|
+
}
|
|
2377
|
+
|
|
2335
2378
|
interface ResumeRollupTx {
|
|
2336
2379
|
rollup: string;
|
|
2337
2380
|
data: GraphQLClient.Any;
|
|
@@ -2704,6 +2747,21 @@ declare namespace GraphQLClient {
|
|
|
2704
2747
|
txGas: string[];
|
|
2705
2748
|
}
|
|
2706
2749
|
|
|
2750
|
+
interface VerifyAccountRiskResult {
|
|
2751
|
+
isRisky: boolean;
|
|
2752
|
+
reason: string;
|
|
2753
|
+
data: GraphQLClient.VerifyAccountRiskResult_BalanceRisky;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
interface VerifyAccountRiskResult_BalanceRisky {
|
|
2757
|
+
address: string;
|
|
2758
|
+
balance: string;
|
|
2759
|
+
transferIn: string;
|
|
2760
|
+
transferOut: string;
|
|
2761
|
+
accountCount: number;
|
|
2762
|
+
txCount: number;
|
|
2763
|
+
}
|
|
2764
|
+
|
|
2707
2765
|
interface Version {
|
|
2708
2766
|
block: number;
|
|
2709
2767
|
app: number;
|
|
@@ -2910,11 +2968,25 @@ declare namespace GraphQLClient {
|
|
|
2910
2968
|
tx: string;
|
|
2911
2969
|
}
|
|
2912
2970
|
|
|
2971
|
+
interface ListTokenFlowsParams {
|
|
2972
|
+
accountAddress: string;
|
|
2973
|
+
tokenAddress: string;
|
|
2974
|
+
paging: GraphQLClient.PageInput;
|
|
2975
|
+
depth: number;
|
|
2976
|
+
direction: GraphQLClient.TokenFlowDirection;
|
|
2977
|
+
}
|
|
2978
|
+
|
|
2979
|
+
interface VerifyAccountRiskParams {
|
|
2980
|
+
accountAddress: string;
|
|
2981
|
+
tokenAddress: string;
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2913
2984
|
interface SendTxParams {
|
|
2914
2985
|
commit: boolean;
|
|
2915
2986
|
token: string;
|
|
2916
2987
|
tx: string;
|
|
2917
2988
|
wallet: string;
|
|
2989
|
+
extra: string;
|
|
2918
2990
|
}
|
|
2919
2991
|
}
|
|
2920
2992
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ocap/sdk",
|
|
3
3
|
"description": "Forge javascript SDK packages all-in-one",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.19.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@arcblock/did-util": "1.
|
|
22
|
-
"@ocap/client": "1.
|
|
23
|
-
"@ocap/message": "1.
|
|
24
|
-
"@ocap/util": "1.
|
|
25
|
-
"@ocap/wallet": "1.
|
|
21
|
+
"@arcblock/did-util": "1.19.0",
|
|
22
|
+
"@ocap/client": "1.19.0",
|
|
23
|
+
"@ocap/message": "1.19.0",
|
|
24
|
+
"@ocap/util": "1.19.0",
|
|
25
|
+
"@ocap/wallet": "1.19.0",
|
|
26
26
|
"buffer": "6.0.3",
|
|
27
27
|
"debug": "^4.3.6",
|
|
28
28
|
"react-app-polyfill": "^1.0.6",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"jest": "^29.7.0",
|
|
34
34
|
"jsdoc-to-markdown": "^7.1.1",
|
|
35
35
|
"node-polyfill-webpack-plugin": "^4.0.0",
|
|
36
|
-
"prettier": "^
|
|
36
|
+
"prettier": "^3.3.2",
|
|
37
37
|
"remark-cli": "^10.0.1",
|
|
38
38
|
"remark-preset-github": "^4.0.4",
|
|
39
39
|
"webpack": "^5.94.0",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"test": "jest --forceExit --detectOpenHandles",
|
|
83
83
|
"coverage": "npm run test -- --coverage"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "1b6fac03988fb18507c8ef4c21de282762005f87"
|
|
86
86
|
}
|