@ocap/sdk 1.13.54 → 1.13.58

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.
Files changed (2) hide show
  1. package/index.d.ts +63 -11
  2. package/package.json +9 -9
package/index.d.ts CHANGED
@@ -652,6 +652,7 @@ declare interface OcapSDK {
652
652
  sendAcquireAssetV3Tx(
653
653
  param: GraphQLClient.TxParam<GraphQLClient.AcquireAssetV3Tx>
654
654
  ): Promise<GraphQLClient.ResponseSendTx>;
655
+ sendClaimStakeTx(param: GraphQLClient.TxParam<GraphQLClient.ClaimStakeTx>): Promise<GraphQLClient.ResponseSendTx>;
655
656
  sendCreateAssetTx(param: GraphQLClient.TxParam<GraphQLClient.CreateAssetTx>): Promise<GraphQLClient.ResponseSendTx>;
656
657
  sendCreateFactoryTx(
657
658
  param: GraphQLClient.TxParam<GraphQLClient.CreateFactoryTx>
@@ -697,6 +698,7 @@ declare interface OcapSDK {
697
698
  encodeAcquireAssetV3Tx(
698
699
  param: GraphQLClient.TxParam<GraphQLClient.AcquireAssetV3Tx>
699
700
  ): Promise<GraphQLClient.EncodeTxResult>;
701
+ encodeClaimStakeTx(param: GraphQLClient.TxParam<GraphQLClient.ClaimStakeTx>): Promise<GraphQLClient.EncodeTxResult>;
700
702
  encodeCreateAssetTx(param: GraphQLClient.TxParam<GraphQLClient.CreateAssetTx>): Promise<GraphQLClient.EncodeTxResult>;
701
703
  encodeCreateFactoryTx(
702
704
  param: GraphQLClient.TxParam<GraphQLClient.CreateFactoryTx>
@@ -746,6 +748,7 @@ declare interface OcapSDK {
746
748
  signAcquireAssetV3Tx(
747
749
  param: GraphQLClient.TxParam<GraphQLClient.AcquireAssetV3Tx>
748
750
  ): Promise<GraphQLClient.Transaction>;
751
+ signClaimStakeTx(param: GraphQLClient.TxParam<GraphQLClient.ClaimStakeTx>): Promise<GraphQLClient.Transaction>;
749
752
  signCreateAssetTx(param: GraphQLClient.TxParam<GraphQLClient.CreateAssetTx>): Promise<GraphQLClient.Transaction>;
750
753
  signCreateFactoryTx(param: GraphQLClient.TxParam<GraphQLClient.CreateFactoryTx>): Promise<GraphQLClient.Transaction>;
751
754
  signCreateRollupBlockTx(
@@ -812,6 +815,9 @@ declare interface OcapSDK {
812
815
  getTokenState(
813
816
  params: GraphQLClient.GetTokenStateParams
814
817
  ): GraphQLClient.QueryResult<GraphQLClient.ResponseGetTokenState>;
818
+ getEvidenceState(
819
+ params: GraphQLClient.GetEvidenceStateParams
820
+ ): GraphQLClient.QueryResult<GraphQLClient.ResponseGetEvidenceState>;
815
821
  getSwapState(params: GraphQLClient.GetSwapStateParams): GraphQLClient.QueryResult<GraphQLClient.ResponseGetSwapState>;
816
822
  getForgeState(
817
823
  params: GraphQLClient.GetForgeStateParams
@@ -1123,6 +1129,8 @@ declare namespace GraphQLClient {
1123
1129
 
1124
1130
  export interface RequestGetConfigInput {}
1125
1131
 
1132
+ export interface RequestGetEvidenceStateInput {}
1133
+
1126
1134
  export interface RequestGetRollupBlockInput {}
1127
1135
 
1128
1136
  export interface RequestGetStateInput {}
@@ -1385,6 +1393,12 @@ declare namespace GraphQLClient {
1385
1393
  fifo: boolean;
1386
1394
  }
1387
1395
 
1396
+ export interface ClaimStakeTx {
1397
+ address: string;
1398
+ evidence: GraphQLClient.Evidence;
1399
+ data: GraphQLClient.Any;
1400
+ }
1401
+
1388
1402
  export interface ConsensusParams {
1389
1403
  maxBytes: string;
1390
1404
  maxGas: string;
@@ -1437,7 +1451,7 @@ declare namespace GraphQLClient {
1437
1451
  height: number;
1438
1452
  merkleRoot: string;
1439
1453
  previousHash: string;
1440
- txHash: string;
1454
+ txsHash: string;
1441
1455
  txs: Array<null>;
1442
1456
  proposer: string;
1443
1457
  signatures: Array<null>;
@@ -1448,7 +1462,6 @@ declare namespace GraphQLClient {
1448
1462
  export interface CreateRollupTx {
1449
1463
  address: string;
1450
1464
  tokenAddress: string;
1451
- erc20TokenAddress: string;
1452
1465
  contractAddress: string;
1453
1466
  seedValidators: Array<null>;
1454
1467
  minStakeAmount: string;
@@ -1463,7 +1476,7 @@ declare namespace GraphQLClient {
1463
1476
  foreignChainId: string;
1464
1477
  depositFeeRate: number;
1465
1478
  withdrawFeeRate: number;
1466
- proposerFeeShare: number;
1479
+ publisherFeeShare: number;
1467
1480
  minDepositAmount: string;
1468
1481
  minWithdrawAmount: string;
1469
1482
  maxDepositAmount: string;
@@ -1473,6 +1486,7 @@ declare namespace GraphQLClient {
1473
1486
  minWithdrawFee: string;
1474
1487
  maxWithdrawFee: string;
1475
1488
  paused: boolean;
1489
+ leaveWaitingPeriod: number;
1476
1490
  data: GraphQLClient.Any;
1477
1491
  }
1478
1492
 
@@ -1485,7 +1499,8 @@ declare namespace GraphQLClient {
1485
1499
  icon: string;
1486
1500
  totalSupply: string;
1487
1501
  address: string;
1488
- erc20ContractAddress: string;
1502
+ initialSupply: string;
1503
+ foreignToken: GraphQLClient.ForeignToken;
1489
1504
  data: GraphQLClient.Any;
1490
1505
  }
1491
1506
 
@@ -1556,6 +1571,12 @@ declare namespace GraphQLClient {
1556
1571
  hash: string;
1557
1572
  }
1558
1573
 
1574
+ export interface EvidenceState {
1575
+ hash: string;
1576
+ data: string;
1577
+ context: GraphQLClient.StateContext;
1578
+ }
1579
+
1559
1580
  export interface ExchangeInfo {
1560
1581
  value: string;
1561
1582
  assets: Array<null>;
@@ -1583,6 +1604,14 @@ declare namespace GraphQLClient {
1583
1604
  data: GraphQLClient.Any;
1584
1605
  }
1585
1606
 
1607
+ export interface ForeignToken {
1608
+ type: string;
1609
+ contractAddress: string;
1610
+ chainType: string;
1611
+ chainName: string;
1612
+ chainId: number;
1613
+ }
1614
+
1586
1615
  export interface ForgeState {
1587
1616
  address: string;
1588
1617
  consensus: GraphQLClient.ConsensusParams;
@@ -1748,14 +1777,14 @@ declare namespace GraphQLClient {
1748
1777
  height: number;
1749
1778
  merkleRoot: string;
1750
1779
  previousHash: string;
1751
- txHash: string;
1780
+ txsHash: string;
1752
1781
  txs: Array<null>;
1753
1782
  proposer: string;
1754
1783
  signatures: Array<null>;
1755
1784
  genesisTime: string;
1756
1785
  renaissanceTime: string;
1757
1786
  rollup: string;
1758
- blockReward: string;
1787
+ rewardAmount: string;
1759
1788
  mintedAmount: string;
1760
1789
  burnedAmount: string;
1761
1790
  tokenInfo: GraphQLClient.IndexedTokenInput;
@@ -1784,7 +1813,7 @@ declare namespace GraphQLClient {
1784
1813
  issuer: string;
1785
1814
  depositFeeRate: number;
1786
1815
  withdrawFeeRate: number;
1787
- proposerFeeShare: number;
1816
+ publisherFeeShare: number;
1788
1817
  minDepositAmount: string;
1789
1818
  minWithdrawAmount: string;
1790
1819
  blockHeight: number;
@@ -1799,6 +1828,8 @@ declare namespace GraphQLClient {
1799
1828
  minWithdrawFee: string;
1800
1829
  maxWithdrawFee: string;
1801
1830
  paused: boolean;
1831
+ foreignToken: GraphQLClient.ForeignToken;
1832
+ leaveWaitingPeriod: number;
1802
1833
  data: GraphQLClient.Any;
1803
1834
  }
1804
1835
 
@@ -1832,6 +1863,9 @@ declare namespace GraphQLClient {
1832
1863
  genesisTime: string;
1833
1864
  renaissanceTime: string;
1834
1865
  message: string;
1866
+ revokeWaitingPeriod: number;
1867
+ revokedTokens: Array<null>;
1868
+ revokedAssets: Array<null>;
1835
1869
  data: GraphQLClient.Any;
1836
1870
  }
1837
1871
 
@@ -1856,6 +1890,7 @@ declare namespace GraphQLClient {
1856
1890
  genesisTime: string;
1857
1891
  renaissanceTime: string;
1858
1892
  erc20ContractAddress: string;
1893
+ foreignToken: GraphQLClient.ForeignToken;
1859
1894
  data: GraphQLClient.Any;
1860
1895
  }
1861
1896
 
@@ -2018,6 +2053,11 @@ declare namespace GraphQLClient {
2018
2053
  state: GraphQLClient.DelegateState;
2019
2054
  }
2020
2055
 
2056
+ export interface ResponseGetEvidenceState {
2057
+ code: string;
2058
+ state: GraphQLClient.EvidenceState;
2059
+ }
2060
+
2021
2061
  export interface ResponseGetFactoryState {
2022
2062
  code: string;
2023
2063
  state: GraphQLClient.AssetFactoryState;
@@ -2195,12 +2235,12 @@ declare namespace GraphQLClient {
2195
2235
  height: number;
2196
2236
  merkleRoot: string;
2197
2237
  previousHash: string;
2198
- txHash: string;
2238
+ txsHash: string;
2199
2239
  txs: Array<null>;
2200
2240
  proposer: string;
2201
2241
  signatures: Array<null>;
2202
2242
  rollup: string;
2203
- blockReward: string;
2243
+ rewardAmount: string;
2204
2244
  mintedAmount: string;
2205
2245
  burnedAmount: string;
2206
2246
  context: GraphQLClient.StateContext;
@@ -2227,7 +2267,7 @@ declare namespace GraphQLClient {
2227
2267
  issuer: string;
2228
2268
  depositFeeRate: number;
2229
2269
  withdrawFeeRate: number;
2230
- proposerFeeShare: number;
2270
+ publisherFeeShare: number;
2231
2271
  minDepositAmount: string;
2232
2272
  minWithdrawAmount: string;
2233
2273
  blockHeight: number;
@@ -2242,6 +2282,8 @@ declare namespace GraphQLClient {
2242
2282
  minWithdrawFee: string;
2243
2283
  maxWithdrawFee: string;
2244
2284
  paused: boolean;
2285
+ foreignToken: GraphQLClient.ForeignToken;
2286
+ leaveWaitingPeriod: number;
2245
2287
  context: GraphQLClient.StateContext;
2246
2288
  data: GraphQLClient.Any;
2247
2289
  }
@@ -2278,6 +2320,9 @@ declare namespace GraphQLClient {
2278
2320
  assets: Array<null>;
2279
2321
  revocable: boolean;
2280
2322
  message: string;
2323
+ revokeWaitingPeriod: number;
2324
+ revokedTokens: Array<null>;
2325
+ revokedAssets: Array<null>;
2281
2326
  context: GraphQLClient.StateContext;
2282
2327
  data: GraphQLClient.Any;
2283
2328
  }
@@ -2294,6 +2339,7 @@ declare namespace GraphQLClient {
2294
2339
  inputs: Array<null>;
2295
2340
  locked: boolean;
2296
2341
  message: string;
2342
+ revokeWaitingPeriod: number;
2297
2343
  data: GraphQLClient.Any;
2298
2344
  }
2299
2345
 
@@ -2356,6 +2402,7 @@ declare namespace GraphQLClient {
2356
2402
  icon: string;
2357
2403
  totalSupply: string;
2358
2404
  erc20ContractAddress: string;
2405
+ foreignToken: GraphQLClient.ForeignToken;
2359
2406
  context: GraphQLClient.StateContext;
2360
2407
  data: GraphQLClient.Any;
2361
2408
  }
@@ -2466,7 +2513,7 @@ declare namespace GraphQLClient {
2466
2513
  minBlockConfirmation: number;
2467
2514
  depositFeeRate: number;
2468
2515
  withdrawFeeRate: number;
2469
- proposerFeeShare: number;
2516
+ publisherFeeShare: number;
2470
2517
  minDepositAmount: string;
2471
2518
  minWithdrawAmount: string;
2472
2519
  maxDepositAmount: string;
@@ -2572,6 +2619,10 @@ declare namespace GraphQLClient {
2572
2619
  address: string;
2573
2620
  }
2574
2621
 
2622
+ export interface GetEvidenceStateParams {
2623
+ hash: string;
2624
+ }
2625
+
2575
2626
  export interface GetSwapStateParams {
2576
2627
  address: string;
2577
2628
  height: string;
@@ -2704,6 +2755,7 @@ declare namespace GraphQLClient {
2704
2755
  paging: undefined;
2705
2756
  tokenAddress: string;
2706
2757
  erc20TokenAddress: string;
2758
+ foreignTokenAddress: string;
2707
2759
  }
2708
2760
 
2709
2761
  export interface GetRollupBlockParams {
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.54",
4
+ "version": "1.13.58",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",
@@ -15,17 +15,17 @@
15
15
  "access": "public"
16
16
  },
17
17
  "dependencies": {
18
- "@arcblock/did-util": "1.13.54",
19
- "@ocap/client": "1.13.54",
20
- "@ocap/message": "1.13.54",
21
- "@ocap/util": "1.13.54",
22
- "@ocap/wallet": "1.13.54",
18
+ "@arcblock/did-util": "1.13.58",
19
+ "@ocap/client": "1.13.58",
20
+ "@ocap/message": "1.13.58",
21
+ "@ocap/util": "1.13.58",
22
+ "@ocap/wallet": "1.13.58",
23
23
  "debug": "^4.3.2",
24
24
  "react-app-polyfill": "^1.0.1"
25
25
  },
26
26
  "devDependencies": {
27
27
  "inspectpack": "^4.2.1",
28
- "jest": "^26.6.3",
28
+ "jest": "^27.3.1",
29
29
  "jsdoc-to-markdown": "^5.0.0",
30
30
  "prettier": "^2.3.2",
31
31
  "remark-cli": "^5.0.0",
@@ -75,8 +75,8 @@
75
75
  "gen-docs": "jsdoc2md lib/sdk.js > docs/README.md",
76
76
  "format-docs": "remark . -o",
77
77
  "gen-dts": "bash ./tools/gen-dts.sh index && rm -f *.*-E && prettier --write *.d.ts",
78
- "test": "node tools/jest.js",
78
+ "test": "jest --forceExit --detectOpenHandles",
79
79
  "coverage": "yarn test -- --coverage"
80
80
  },
81
- "gitHead": "c750431bf0eabf263f65a69c05b6fdc3343eba33"
81
+ "gitHead": "5eabfe8405725ee0193f76a9f7cd895d8c763e52"
82
82
  }