@ocap/sdk 1.18.94 → 1.18.96

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 +92 -71
  2. package/package.json +11 -11
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="jest" />
3
- import { LiteralUnion } from 'type-fest';
3
+ import type { LiteralUnion } from 'type-fest';
4
4
  import rightPad from 'lodash/padEnd';
5
5
  import leftPad from 'lodash/padStart';
6
6
  import BN from 'bn.js';
@@ -426,139 +426,103 @@ declare interface OcapSDK {
426
426
  sendAccountMigrateTx(
427
427
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.AccountMigrateTx>>,
428
428
  extra?: any
429
- ): Promise<GraphQLClient.ResponseSendTx>;
429
+ ): Promise<string>;
430
430
  sendAcquireAssetV2Tx(
431
431
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.AcquireAssetV2Tx>>,
432
432
  extra?: any
433
- ): Promise<GraphQLClient.ResponseSendTx>;
433
+ ): Promise<string>;
434
434
  sendAcquireAssetV3Tx(
435
435
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.AcquireAssetV3Tx>>,
436
436
  extra?: any
437
- ): Promise<GraphQLClient.ResponseSendTx>;
437
+ ): Promise<string>;
438
438
  sendClaimBlockRewardTx(
439
439
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ClaimBlockRewardTx>>,
440
440
  extra?: any
441
- ): Promise<GraphQLClient.ResponseSendTx>;
442
- sendClaimStakeTx(
443
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ClaimStakeTx>>,
444
- extra?: any
445
- ): Promise<GraphQLClient.ResponseSendTx>;
441
+ ): Promise<string>;
442
+ sendClaimStakeTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ClaimStakeTx>>, extra?: any): Promise<string>;
446
443
  sendCloseRollupTx(
447
444
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.CloseRollupTx>>,
448
445
  extra?: any
449
- ): Promise<GraphQLClient.ResponseSendTx>;
446
+ ): Promise<string>;
450
447
  sendConsumeAssetTx(
451
448
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ConsumeAssetTx>>,
452
449
  extra?: any
453
- ): Promise<GraphQLClient.ResponseSendTx>;
450
+ ): Promise<string>;
454
451
  sendCreateAssetTx(
455
452
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.CreateAssetTx>>,
456
453
  extra?: any
457
- ): Promise<GraphQLClient.ResponseSendTx>;
454
+ ): Promise<string>;
458
455
  sendCreateFactoryTx(
459
456
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.CreateFactoryTx>>,
460
457
  extra?: any
461
- ): Promise<GraphQLClient.ResponseSendTx>;
458
+ ): Promise<string>;
462
459
  sendCreateRollupBlockTx(
463
460
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.CreateRollupBlockTx>>,
464
461
  extra?: any
465
- ): Promise<GraphQLClient.ResponseSendTx>;
462
+ ): Promise<string>;
466
463
  sendCreateRollupTx(
467
464
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.CreateRollupTx>>,
468
465
  extra?: any
469
- ): Promise<GraphQLClient.ResponseSendTx>;
466
+ ): Promise<string>;
470
467
  sendCreateTokenTx(
471
468
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.CreateTokenTx>>,
472
469
  extra?: any
473
- ): Promise<GraphQLClient.ResponseSendTx>;
474
- sendDeclareTx(
475
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.DeclareTx>>,
476
- extra?: any
477
- ): Promise<GraphQLClient.ResponseSendTx>;
478
- sendDelegateTx(
479
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.DelegateTx>>,
480
- extra?: any
481
- ): Promise<GraphQLClient.ResponseSendTx>;
470
+ ): Promise<string>;
471
+ sendDeclareTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.DeclareTx>>, extra?: any): Promise<string>;
472
+ sendDelegateTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.DelegateTx>>, extra?: any): Promise<string>;
482
473
  sendDepositTokenV2Tx(
483
474
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.DepositTokenV2Tx>>,
484
475
  extra?: any
485
- ): Promise<GraphQLClient.ResponseSendTx>;
486
- sendExchangeTx(
487
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ExchangeTx>>,
488
- extra?: any
489
- ): Promise<GraphQLClient.ResponseSendTx>;
490
- sendExchangeV2Tx(
491
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ExchangeV2Tx>>,
492
- extra?: any
493
- ): Promise<GraphQLClient.ResponseSendTx>;
494
- sendJoinRollupTx(
495
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.JoinRollupTx>>,
496
- extra?: any
497
- ): Promise<GraphQLClient.ResponseSendTx>;
476
+ ): Promise<string>;
477
+ sendExchangeTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ExchangeTx>>, extra?: any): Promise<string>;
478
+ sendExchangeV2Tx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ExchangeV2Tx>>, extra?: any): Promise<string>;
479
+ sendJoinRollupTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.JoinRollupTx>>, extra?: any): Promise<string>;
498
480
  sendLeaveRollupTx(
499
481
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.LeaveRollupTx>>,
500
482
  extra?: any
501
- ): Promise<GraphQLClient.ResponseSendTx>;
483
+ ): Promise<string>;
502
484
  sendMigrateRollupTx(
503
485
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.MigrateRollupTx>>,
504
486
  extra?: any
505
- ): Promise<GraphQLClient.ResponseSendTx>;
506
- sendMintAssetTx(
507
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.MintAssetTx>>,
508
- extra?: any
509
- ): Promise<GraphQLClient.ResponseSendTx>;
487
+ ): Promise<string>;
488
+ sendMintAssetTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.MintAssetTx>>, extra?: any): Promise<string>;
510
489
  sendPauseRollupTx(
511
490
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.PauseRollupTx>>,
512
491
  extra?: any
513
- ): Promise<GraphQLClient.ResponseSendTx>;
492
+ ): Promise<string>;
514
493
  sendResumeRollupTx(
515
494
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.ResumeRollupTx>>,
516
495
  extra?: any
517
- ): Promise<GraphQLClient.ResponseSendTx>;
496
+ ): Promise<string>;
518
497
  sendRevokeDelegateTx(
519
498
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.RevokeDelegateTx>>,
520
499
  extra?: any
521
- ): Promise<GraphQLClient.ResponseSendTx>;
500
+ ): Promise<string>;
522
501
  sendRevokeStakeTx(
523
502
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.RevokeStakeTx>>,
524
503
  extra?: any
525
- ): Promise<GraphQLClient.ResponseSendTx>;
526
- sendSlashStakeTx(
527
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.SlashStakeTx>>,
528
- extra?: any
529
- ): Promise<GraphQLClient.ResponseSendTx>;
530
- sendStakeTx(
531
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.StakeTx>>,
532
- extra?: any
533
- ): Promise<GraphQLClient.ResponseSendTx>;
534
- sendTransferTx(
535
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.TransferTx>>,
536
- extra?: any
537
- ): Promise<GraphQLClient.ResponseSendTx>;
538
- sendTransferV2Tx(
539
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.TransferV2Tx>>,
540
- extra?: any
541
- ): Promise<GraphQLClient.ResponseSendTx>;
542
- sendTransferV3Tx(
543
- param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.TransferV3Tx>>,
544
- extra?: any
545
- ): Promise<GraphQLClient.ResponseSendTx>;
504
+ ): Promise<string>;
505
+ sendSlashStakeTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.SlashStakeTx>>, extra?: any): Promise<string>;
506
+ sendStakeTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.StakeTx>>, extra?: any): Promise<string>;
507
+ sendTransferTx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.TransferTx>>, extra?: any): Promise<string>;
508
+ sendTransferV2Tx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.TransferV2Tx>>, extra?: any): Promise<string>;
509
+ sendTransferV3Tx(param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.TransferV3Tx>>, extra?: any): Promise<string>;
546
510
  sendUpdateAssetTx(
547
511
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.UpdateAssetTx>>,
548
512
  extra?: any
549
- ): Promise<GraphQLClient.ResponseSendTx>;
513
+ ): Promise<string>;
550
514
  sendUpdateRollupTx(
551
515
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.UpdateRollupTx>>,
552
516
  extra?: any
553
- ): Promise<GraphQLClient.ResponseSendTx>;
517
+ ): Promise<string>;
554
518
  sendUpgradeNodeTx(
555
519
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.UpgradeNodeTx>>,
556
520
  extra?: any
557
- ): Promise<GraphQLClient.ResponseSendTx>;
521
+ ): Promise<string>;
558
522
  sendWithdrawTokenV2Tx(
559
523
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.WithdrawTokenV2Tx>>,
560
524
  extra?: any
561
- ): Promise<GraphQLClient.ResponseSendTx>;
525
+ ): Promise<string>;
562
526
  encodeAccountMigrateTx(
563
527
  param: GraphQLClient.TxParam<PartialDeep<GraphQLClient.AccountMigrateTx>>
564
528
  ): Promise<GraphQLClient.EncodeTxResult>;
@@ -888,6 +852,9 @@ declare interface OcapSDK {
888
852
  listRollupValidators(
889
853
  params: PartialDeep<GraphQLClient.ListRollupValidatorsParams>
890
854
  ): Promise<GraphQLClient.GraphQLClient.ResponseListRollupValidators>;
855
+ listDelegations(
856
+ params: PartialDeep<GraphQLClient.ListDelegationsParams>
857
+ ): Promise<GraphQLClient.GraphQLClient.ResponseListDelegations>;
891
858
  search(params: PartialDeep<GraphQLClient.SearchParams>): Promise<GraphQLClient.GraphQLClient.ResponseSearch>;
892
859
  estimateGas(
893
860
  params: PartialDeep<GraphQLClient.EstimateGasParams>
@@ -1199,6 +1166,13 @@ declare namespace GraphQLClient {
1199
1166
  numInvalidTxsFilter: GraphQLClient.RangeFilterInput;
1200
1167
  }
1201
1168
 
1169
+ interface RequestListDelegationsInput {
1170
+ paging: GraphQLClient.PageInput;
1171
+ from: string;
1172
+ to: string;
1173
+ timeFilter: GraphQLClient.TimeFilterInput;
1174
+ }
1175
+
1202
1176
  interface RequestListFactoriesInput {
1203
1177
  paging: GraphQLClient.PageInput;
1204
1178
  ownerAddress: string;
@@ -1417,6 +1391,11 @@ declare namespace GraphQLClient {
1417
1391
  lastSettlement: string;
1418
1392
  }
1419
1393
 
1394
+ interface AssetLimit {
1395
+ address: string[];
1396
+ to: string[];
1397
+ }
1398
+
1420
1399
  interface AssetState {
1421
1400
  address: string;
1422
1401
  owner: string;
@@ -1644,9 +1623,15 @@ declare namespace GraphQLClient {
1644
1623
  typeUrls: string[];
1645
1624
  }
1646
1625
 
1626
+ interface DelegateLimit {
1627
+ tokens: GraphQLClient.TokenLimit[];
1628
+ assets: GraphQLClient.AssetLimit[];
1629
+ }
1630
+
1647
1631
  interface DelegateOp {
1648
1632
  typeUrl: string;
1649
1633
  rules: string[];
1634
+ limit: GraphQLClient.DelegateLimit;
1650
1635
  }
1651
1636
 
1652
1637
  interface DelegateOpState {
@@ -1655,6 +1640,7 @@ declare namespace GraphQLClient {
1655
1640
  numTxsDelta: number;
1656
1641
  balance: string;
1657
1642
  balanceDelta: string;
1643
+ limit: GraphQLClient.DelegateLimit;
1658
1644
  }
1659
1645
 
1660
1646
  interface DelegateState {
@@ -1839,6 +1825,21 @@ declare namespace GraphQLClient {
1839
1825
  numInvalidTxs: string;
1840
1826
  }
1841
1827
 
1828
+ interface IndexedDelegationState {
1829
+ address: string;
1830
+ from: string;
1831
+ to: string;
1832
+ genesisTime: string;
1833
+ renaissanceTime: string;
1834
+ ops: GraphQLClient.IndexedDelegationState_OpsEntry[];
1835
+ data: GraphQLClient.Any;
1836
+ }
1837
+
1838
+ interface IndexedDelegationState_OpsEntry {
1839
+ key: string;
1840
+ value: GraphQLClient.DelegateOpState;
1841
+ }
1842
+
1842
1843
  interface IndexedFactoryInput {
1843
1844
  value: string;
1844
1845
  tokens: GraphQLClient.IndexedTokenInput[];
@@ -2266,6 +2267,12 @@ declare namespace GraphQLClient {
2266
2267
  blocks: GraphQLClient.IndexedBlock[];
2267
2268
  }
2268
2269
 
2270
+ interface ResponseListDelegations {
2271
+ code: string;
2272
+ page: GraphQLClient.PageInfo;
2273
+ delegations: GraphQLClient.IndexedDelegationState[];
2274
+ }
2275
+
2269
2276
  interface ResponseListFactories {
2270
2277
  code: string;
2271
2278
  page: GraphQLClient.PageInfo;
@@ -2472,6 +2479,13 @@ declare namespace GraphQLClient {
2472
2479
  value: string;
2473
2480
  }
2474
2481
 
2482
+ interface TokenLimit {
2483
+ address: string;
2484
+ value: string;
2485
+ delta: string;
2486
+ to: string[];
2487
+ }
2488
+
2475
2489
  interface TokenState {
2476
2490
  address: string;
2477
2491
  issuer: string;
@@ -2861,6 +2875,13 @@ declare namespace GraphQLClient {
2861
2875
  rollupAddress: string;
2862
2876
  }
2863
2877
 
2878
+ interface ListDelegationsParams {
2879
+ from: string;
2880
+ to: string;
2881
+ paging: GraphQLClient.PageInput;
2882
+ timeFilter: GraphQLClient.TimeFilterInput;
2883
+ }
2884
+
2864
2885
  interface SearchParams {
2865
2886
  paging: GraphQLClient.PageInput;
2866
2887
  keyword: 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.18.94",
4
+ "version": "1.18.96",
5
5
  "author": {
6
6
  "name": "wangshijun",
7
7
  "email": "shijun@arcblock.io",
@@ -11,18 +11,18 @@
11
11
  "wangshijun <shijun@arcblock.io> (https://github.com/wangshijun)"
12
12
  ],
13
13
  "bugs": {
14
- "url": "https://github.com/ArcBlock/asset-chain/issues",
14
+ "url": "https://github.com/ArcBlock/blockchain/issues",
15
15
  "email": "shijun@arcblock.io"
16
16
  },
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@arcblock/did-util": "1.18.94",
22
- "@ocap/client": "1.18.94",
23
- "@ocap/message": "1.18.94",
24
- "@ocap/util": "1.18.94",
25
- "@ocap/wallet": "1.18.94",
21
+ "@arcblock/did-util": "1.18.96",
22
+ "@ocap/client": "1.18.96",
23
+ "@ocap/message": "1.18.96",
24
+ "@ocap/util": "1.18.96",
25
+ "@ocap/wallet": "1.18.96",
26
26
  "buffer": "6.0.3",
27
27
  "debug": "^4.3.4",
28
28
  "react-app-polyfill": "^1.0.6",
@@ -45,12 +45,12 @@
45
45
  "preset-github",
46
46
  [
47
47
  {
48
- "repository": "ArcBlock/asset-chain"
48
+ "repository": "ArcBlock/blockchain"
49
49
  }
50
50
  ]
51
51
  ]
52
52
  },
53
- "homepage": "https://github.com/ArcBlock/asset-chain/tree/master/core/forge-sdk",
53
+ "homepage": "https://github.com/ArcBlock/blockchain/tree/master/core/forge-sdk",
54
54
  "keywords": [
55
55
  "blockchain",
56
56
  "arcblock",
@@ -67,7 +67,7 @@
67
67
  ],
68
68
  "repository": {
69
69
  "type": "git",
70
- "url": "https://github.com/ArcBlock/asset-chain/tree/master/core/forge-sdk"
70
+ "url": "https://github.com/ArcBlock/blockchain/tree/master/core/forge-sdk"
71
71
  },
72
72
  "scripts": {
73
73
  "lint": "eslint lib *.js tests",
@@ -82,5 +82,5 @@
82
82
  "test": "jest --forceExit --detectOpenHandles",
83
83
  "coverage": "yarn test -- --coverage"
84
84
  },
85
- "gitHead": "6e23a66fb0adcd1359e21b4fde180860b4c305b3"
85
+ "gitHead": "aa29013a8114a39db09e0e787ab1e1bd94fcb453"
86
86
  }