@ritbit/v4-client-js 1.3.17 → 2.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ritbit/v4-client-js",
3
- "version": "1.3.17",
3
+ "version": "2.0.0",
4
4
  "description": "General client library for the new dYdX system (v4 decentralized)",
5
5
  "main": "build/cjs/src/index.js",
6
6
  "module": "build/esm/src/index.js",
@@ -38,6 +38,9 @@
38
38
  "type": "git",
39
39
  "url": "git+https://github.com/ritbit/v4-clients.git"
40
40
  },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
41
44
  "author": "RITBIT Trading",
42
45
  "license": "AGPL-3.0",
43
46
  "bugs": {
@@ -15,7 +15,7 @@ if [ $? -eq 0 ]; then
15
15
  git tag v4-client-js@${VERSION}
16
16
  git push --tags
17
17
 
18
- npm publish --access=public
18
+ npm publish
19
19
  else
20
20
  echo "skipping publish, package $NAME@$VERSION already published"
21
21
  fi
@@ -1,12 +1,12 @@
1
1
  /* eslint-disable comma-dangle */
2
2
  /* eslint-disable @typescript-eslint/quotes */
3
3
  import { EncodeObject, Registry } from '@cosmjs/proto-signing';
4
- import { MsgWithdrawDelegatorReward } from 'cosmjs-types/cosmos/distribution/v1beta1/tx';
5
- import { MsgSubmitProposal } from 'cosmjs-types/cosmos/gov/v1/tx';
4
+ import { MsgWithdrawDelegatorReward } from '@ritbit/v4-proto/src/codegen/cosmos/distribution/v1beta1/tx';
5
+ import { MsgSubmitProposal } from '@ritbit/v4-proto/src/codegen/cosmos/gov/v1/tx';
6
6
  import {
7
7
  MsgDelegate,
8
8
  MsgUndelegate,
9
- } from 'cosmjs-types/cosmos/staking/v1beta1/tx';
9
+ } from '@ritbit/v4-proto/src/codegen/cosmos/staking/v1beta1/tx';
10
10
  import { MsgAddAuthenticator, MsgRemoveAuthenticator } from '@ritbit/v4-proto/src/codegen/ritbit/accountplus/tx';
11
11
  import { MsgRegisterAffiliate } from '@ritbit/v4-proto/src/codegen/ritbit/affiliates/tx';
12
12
  import { ClobPair_Status } from '@ritbit/v4-proto/src/codegen/ritbit/clob/clob_pair';
@@ -24,9 +24,9 @@ import {
24
24
  MsgDepositToMegavault,
25
25
  MsgWithdrawFromMegavault,
26
26
  } from '@ritbit/v4-proto/src/codegen/ritbit/vault/tx';
27
- import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx';
28
- import { Coin } from 'cosmjs-types/cosmos/base/v1beta1/coin';
29
- import { Any } from 'cosmjs-types/google/protobuf/any';
27
+ import { MsgSend } from '@ritbit/v4-proto/src/codegen/cosmos/bank/v1beta1/tx';
28
+ import { Coin } from '@ritbit/v4-proto/src/codegen/cosmos/base/v1beta1/coin';
29
+ import { Any } from '@ritbit/v4-proto/src/codegen/google/protobuf/any';
30
30
  import Long from 'long';
31
31
  import protobuf from 'protobufjs';
32
32
 
@@ -457,6 +457,7 @@ export class Composer {
457
457
  messages,
458
458
  proposer,
459
459
  metadata,
460
+ expedited,
460
461
  };
461
462
 
462
463
  return {
@@ -377,13 +377,7 @@ export class Get {
377
377
  const requestData = Uint8Array.from(
378
378
  StakingModule.QueryDelegatorDelegationsRequest.encode({
379
379
  delegatorAddr,
380
- pagination: {
381
- key: PAGE_REQUEST.key,
382
- offset: BigInt(PAGE_REQUEST.offset.toString()),
383
- limit: BigInt(PAGE_REQUEST.limit.toString()),
384
- countTotal: PAGE_REQUEST.countTotal,
385
- reverse: PAGE_REQUEST.reverse,
386
- },
380
+ pagination: PAGE_REQUEST,
387
381
  }).finish(),
388
382
  );
389
383
 
@@ -406,13 +400,7 @@ export class Get {
406
400
  const requestData = Uint8Array.from(
407
401
  StakingModule.QueryDelegatorUnbondingDelegationsRequest.encode({
408
402
  delegatorAddr,
409
- pagination: {
410
- key: PAGE_REQUEST.key,
411
- offset: BigInt(PAGE_REQUEST.offset.toString()),
412
- limit: BigInt(PAGE_REQUEST.limit.toString()),
413
- countTotal: PAGE_REQUEST.countTotal,
414
- reverse: PAGE_REQUEST.reverse,
415
- },
403
+ pagination: PAGE_REQUEST,
416
404
  }).finish(),
417
405
  );
418
406
 
@@ -473,13 +461,7 @@ export class Get {
473
461
  const requestData = Uint8Array.from(
474
462
  StakingModule.QueryValidatorsRequest.encode({
475
463
  status,
476
- pagination: {
477
- key: PAGE_REQUEST.key,
478
- offset: BigInt(PAGE_REQUEST.offset.toString()),
479
- limit: BigInt(PAGE_REQUEST.limit.toString()),
480
- countTotal: PAGE_REQUEST.countTotal,
481
- reverse: PAGE_REQUEST.reverse,
482
- },
464
+ pagination: PAGE_REQUEST,
483
465
  }).finish(),
484
466
  );
485
467
 
@@ -509,13 +491,7 @@ export class Get {
509
491
  proposalStatus,
510
492
  voter,
511
493
  depositor,
512
- pagination: {
513
- key: PAGE_REQUEST.key,
514
- offset: BigInt(PAGE_REQUEST.offset.toString()),
515
- limit: BigInt(PAGE_REQUEST.limit.toString()),
516
- countTotal: PAGE_REQUEST.countTotal,
517
- reverse: PAGE_REQUEST.reverse,
518
- },
494
+ pagination: PAGE_REQUEST,
519
495
  }).finish(),
520
496
  );
521
497
  const data: Uint8Array = await this.sendQuery('/cosmos.gov.v1.Query/Proposals', requestData);
@@ -1,4 +1,4 @@
1
- export * as GovV1Module from 'cosmjs-types/cosmos/gov/v1/query';
1
+ export * as GovV1Module from '@ritbit/v4-proto/src/codegen/cosmos/gov/v1/query';
2
2
  export * as StatsModule from '@ritbit/v4-proto/src/codegen/ritbit/stats/query';
3
3
 
4
4
  export * as ClobModule from '@ritbit/v4-proto/src/codegen/ritbit/clob/query';
@@ -8,17 +8,17 @@ export * as SubaccountsModule from '@ritbit/v4-proto/src/codegen/ritbit/subaccou
8
8
  export * as FeeTierModule from '@ritbit/v4-proto/src/codegen/ritbit/feetiers/query';
9
9
  export * as RateLimitModule from '@ritbit/v4-proto/src/codegen/ritbit/ratelimit/query';
10
10
  export * as RewardsModule from '@ritbit/v4-proto/src/codegen/ritbit/rewards/query';
11
- export * as StakingModule from 'cosmjs-types/cosmos/staking/v1beta1/query';
11
+ export * as StakingModule from '@ritbit/v4-proto/src/codegen/cosmos/staking/v1beta1/query';
12
12
  export * as BridgeModule from '@ritbit/v4-proto/src/codegen/ritbit/bridge/query';
13
- export * as DistributionModule from 'cosmjs-types/cosmos/distribution/v1beta1/query';
13
+ export * as DistributionModule from '@ritbit/v4-proto/src/codegen/cosmos/distribution/v1beta1/query';
14
14
  export * as AffiliateModule from '@ritbit/v4-proto/src/codegen/ritbit/affiliates/query';
15
15
  export * as VaultModule from '@ritbit/v4-proto/src/codegen/ritbit/vault/query';
16
16
  export * as ListingModule from '@ritbit/v4-proto/src/codegen/ritbit/listing/query';
17
17
 
18
18
  // Note: cosmos/base/abci is not available in cosmjs-types, keeping from v4-proto
19
19
  // export * from '@ritbit/v4-proto/src/codegen/cosmos/base/abci/v1beta1/abci';
20
- export { ProposalStatus } from 'cosmjs-types/cosmos/gov/v1/gov';
21
- export * from 'cosmjs-types/cosmos/gov/v1/gov';
20
+ export { ProposalStatus } from '@ritbit/v4-proto/src/codegen/cosmos/gov/v1/gov';
21
+ export * from '@ritbit/v4-proto/src/codegen/cosmos/gov/v1/gov';
22
22
  export * from '@ritbit/v4-proto/src/codegen/ritbit/clob/order';
23
23
  export * from '@ritbit/v4-proto/src/codegen/ritbit/clob/tx';
24
24
  export * from '@ritbit/v4-proto/src/codegen/ritbit/delaymsg/tx';
Binary file