@ocap/sdk 1.13.17 → 1.13.21
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 +18 -14
- package/index.d.ts +26 -3
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -6,16 +6,18 @@
|
|
|
6
6
|
|
|
7
7
|
> Forge Javascript SDK packages all in one
|
|
8
8
|
|
|
9
|
+
|
|
9
10
|
## Table of Contents
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
* [Install](#install)
|
|
13
|
+
* [Usage](#usage)
|
|
14
|
+
* [ES5(commonjs)](#es5commonjs)
|
|
15
|
+
* [ES6](#es6)
|
|
16
|
+
* [Util](#util)
|
|
17
|
+
* [Wallet](#wallet)
|
|
18
|
+
* [Message](#message)
|
|
19
|
+
* [Packages Included](#packages-included)
|
|
20
|
+
|
|
19
21
|
|
|
20
22
|
## Install
|
|
21
23
|
|
|
@@ -25,6 +27,7 @@ npm i @ocap/sdk
|
|
|
25
27
|
yarn add @ocap/sdk
|
|
26
28
|
```
|
|
27
29
|
|
|
30
|
+
|
|
28
31
|
## Usage
|
|
29
32
|
|
|
30
33
|
### ES5(commonjs)
|
|
@@ -103,11 +106,12 @@ const message = OcapSDK.Message.createMessage('Transaction', {
|
|
|
103
106
|
console.log(message);
|
|
104
107
|
```
|
|
105
108
|
|
|
109
|
+
|
|
106
110
|
## Packages Included
|
|
107
111
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
* [graphql-client](https://www.npmjs.com/package/@ocap/client), available after `OcapSDK.connect`
|
|
113
|
+
* [grpc-client](https://www.npmjs.com/package/@ocap/grpc-client), available after `OcapSDK.connect`
|
|
114
|
+
* [forge-util](https://www.npmjs.com/package/@ocap/util), available on `OcapSDK.Util`
|
|
115
|
+
* [did-util](https://www.npmjs.com/package/@arcblock/did-util), available on `OcapSDK.Util`
|
|
116
|
+
* [forge-wallet](https://www.npmjs.com/package/@ocap/wallet), available on `OcapSDK.Wallet`
|
|
117
|
+
* [forge-message](https://www.npmjs.com/package/@ocap/message), available on `OcapSDK.Message`
|
package/index.d.ts
CHANGED
|
@@ -780,7 +780,6 @@ declare interface OcapSDK {
|
|
|
780
780
|
signWithdrawTokenV2Tx(
|
|
781
781
|
param: GraphQLClient.TxParam<GraphQLClient.WithdrawTokenV2Tx>
|
|
782
782
|
): Promise<GraphQLClient.Transaction>;
|
|
783
|
-
multiSignExchangeTx(param: GraphQLClient.TxParam<GraphQLClient.ExchangeTx>): Promise<GraphQLClient.Transaction>;
|
|
784
783
|
multiSignExchangeV2Tx(param: GraphQLClient.TxParam<GraphQLClient.ExchangeV2Tx>): Promise<GraphQLClient.Transaction>;
|
|
785
784
|
multiSignTransferV3Tx(param: GraphQLClient.TxParam<GraphQLClient.TransferV3Tx>): Promise<GraphQLClient.Transaction>;
|
|
786
785
|
multiSignAcquireAssetV3Tx(
|
|
@@ -869,6 +868,7 @@ declare interface OcapSDK {
|
|
|
869
868
|
listRollupBlocks(
|
|
870
869
|
params: GraphQLClient.ListRollupBlocksParams
|
|
871
870
|
): GraphQLClient.QueryResult<GraphQLClient.ResponseListRollupBlocks>;
|
|
871
|
+
search(params: GraphQLClient.SearchParams): GraphQLClient.QueryResult<GraphQLClient.ResponseSearch>;
|
|
872
872
|
sendTx(params: GraphQLClient.SendTxParams): GraphQLClient.QueryResult<GraphQLClient.ResponseSendTx>;
|
|
873
873
|
unsubscribe(params: GraphQLClient.UnsubscribeParams): GraphQLClient.QueryResult<GraphQLClient.ResponseUnsubscribe>;
|
|
874
874
|
subscribe(params: GraphQLClient.SubscribeParams): GraphQLClient.SubscriptionResult<GraphQLClient.ResponseSubscribe>;
|
|
@@ -1137,6 +1137,8 @@ declare namespace GraphQLClient {
|
|
|
1137
1137
|
|
|
1138
1138
|
export interface RequestListRollupBlocksInput {}
|
|
1139
1139
|
|
|
1140
|
+
export interface RequestListRollupsInput {}
|
|
1141
|
+
|
|
1140
1142
|
export interface RequestListStakesInput {}
|
|
1141
1143
|
|
|
1142
1144
|
export interface RequestListSwapInput {}
|
|
@@ -1147,6 +1149,8 @@ declare namespace GraphQLClient {
|
|
|
1147
1149
|
|
|
1148
1150
|
export interface RequestListTransactionsInput {}
|
|
1149
1151
|
|
|
1152
|
+
export interface RequestSearchInput {}
|
|
1153
|
+
|
|
1150
1154
|
export interface RequestSendTxInput {}
|
|
1151
1155
|
|
|
1152
1156
|
export interface RequestSubscribeInput {}
|
|
@@ -1817,7 +1821,6 @@ declare namespace GraphQLClient {
|
|
|
1817
1821
|
decimal: number;
|
|
1818
1822
|
unit: string;
|
|
1819
1823
|
symbol: string;
|
|
1820
|
-
key: string;
|
|
1821
1824
|
}
|
|
1822
1825
|
|
|
1823
1826
|
export interface IndexedTokenState {
|
|
@@ -2153,6 +2156,12 @@ declare namespace GraphQLClient {
|
|
|
2153
2156
|
transactions: Array<null>;
|
|
2154
2157
|
}
|
|
2155
2158
|
|
|
2159
|
+
export interface ResponseSearch {
|
|
2160
|
+
code: string;
|
|
2161
|
+
page: GraphQLClient.PageInfo;
|
|
2162
|
+
results: Array<null>;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2156
2165
|
export interface ResponseSendTx {
|
|
2157
2166
|
code: string;
|
|
2158
2167
|
hash: string;
|
|
@@ -2366,6 +2375,11 @@ declare namespace GraphQLClient {
|
|
|
2366
2375
|
endpoint: string;
|
|
2367
2376
|
}
|
|
2368
2377
|
|
|
2378
|
+
export interface SearchResult {
|
|
2379
|
+
type: string;
|
|
2380
|
+
id: string;
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2369
2383
|
export interface StakeConfig {
|
|
2370
2384
|
timeoutGeneral: number;
|
|
2371
2385
|
timeoutStakeForNode: number;
|
|
@@ -2813,6 +2827,7 @@ declare namespace GraphQLClient {
|
|
|
2813
2827
|
tokenFilter: undefined;
|
|
2814
2828
|
assetFilter: undefined;
|
|
2815
2829
|
accountFilter: undefined;
|
|
2830
|
+
txFilter: undefined;
|
|
2816
2831
|
}
|
|
2817
2832
|
|
|
2818
2833
|
export interface ListTokensParams {
|
|
@@ -2839,6 +2854,8 @@ declare namespace GraphQLClient {
|
|
|
2839
2854
|
|
|
2840
2855
|
export interface ListStakesParams {
|
|
2841
2856
|
addressFilter: undefined;
|
|
2857
|
+
assetFilter: undefined;
|
|
2858
|
+
timeFilter: undefined;
|
|
2842
2859
|
paging: undefined;
|
|
2843
2860
|
}
|
|
2844
2861
|
|
|
@@ -2850,6 +2867,8 @@ declare namespace GraphQLClient {
|
|
|
2850
2867
|
|
|
2851
2868
|
export interface ListRollupsParams {
|
|
2852
2869
|
paging: undefined;
|
|
2870
|
+
tokenAddress: string;
|
|
2871
|
+
erc20TokenAddress: string;
|
|
2853
2872
|
}
|
|
2854
2873
|
|
|
2855
2874
|
export interface GetRollupBlockParams {
|
|
@@ -2862,12 +2881,16 @@ declare namespace GraphQLClient {
|
|
|
2862
2881
|
paging: undefined;
|
|
2863
2882
|
rollupAddress: string;
|
|
2864
2883
|
tokenAddress: string;
|
|
2865
|
-
erc20TokenAddress: string;
|
|
2866
2884
|
proposer: string;
|
|
2867
2885
|
validatorFilter: undefined;
|
|
2868
2886
|
txFilter: undefined;
|
|
2869
2887
|
}
|
|
2870
2888
|
|
|
2889
|
+
export interface SearchParams {
|
|
2890
|
+
paging: undefined;
|
|
2891
|
+
keyword: string;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2871
2894
|
export interface SendTxParams {
|
|
2872
2895
|
commit: boolean;
|
|
2873
2896
|
token: string;
|
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.13.
|
|
4
|
+
"version": "1.13.21",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "wangshijun",
|
|
7
7
|
"email": "shijun@arcblock.io",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@arcblock/did-util": "1.13.
|
|
19
|
-
"@ocap/client": "1.13.
|
|
20
|
-
"@ocap/message": "1.13.
|
|
21
|
-
"@ocap/util": "1.13.
|
|
22
|
-
"@ocap/wallet": "1.13.
|
|
18
|
+
"@arcblock/did-util": "1.13.21",
|
|
19
|
+
"@ocap/client": "1.13.21",
|
|
20
|
+
"@ocap/message": "1.13.21",
|
|
21
|
+
"@ocap/util": "1.13.21",
|
|
22
|
+
"@ocap/wallet": "1.13.21",
|
|
23
23
|
"debug": "^4.3.2",
|
|
24
24
|
"react-app-polyfill": "^1.0.1"
|
|
25
25
|
},
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"test": "node tools/jest.js",
|
|
79
79
|
"coverage": "yarn test -- --coverage"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "68b40f724a4aa8a0f6f6ad978957ed97119685d0"
|
|
82
82
|
}
|