carbon-js-sdk 0.9.0-beta0 → 0.9.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.
Files changed (155) hide show
  1. package/lib/CarbonSDK.js +1 -1
  2. package/lib/codec/Switcheo/carbon/bridge/bridge.d.ts +108 -0
  3. package/lib/codec/Switcheo/carbon/bridge/bridge.js +632 -0
  4. package/lib/codec/Switcheo/carbon/bridge/event.d.ts +187 -0
  5. package/lib/codec/Switcheo/carbon/bridge/event.js +1172 -0
  6. package/lib/codec/Switcheo/carbon/bridge/genesis.d.ts +20 -0
  7. package/lib/codec/Switcheo/carbon/bridge/genesis.js +63 -0
  8. package/lib/codec/Switcheo/carbon/bridge/params.d.ts +28 -0
  9. package/lib/codec/Switcheo/carbon/bridge/params.js +81 -0
  10. package/lib/codec/Switcheo/carbon/bridge/query.d.ts +177 -0
  11. package/lib/codec/Switcheo/carbon/bridge/query.js +639 -0
  12. package/lib/codec/Switcheo/carbon/bridge/tx.d.ts +528 -0
  13. package/lib/codec/Switcheo/carbon/bridge/tx.js +2558 -0
  14. package/lib/codec/Switcheo/carbon/ccm/ccm.d.ts +3 -3
  15. package/lib/codec/Switcheo/carbon/liquidation/liquidation.d.ts +3 -3
  16. package/lib/codec/Switcheo/carbon/liquiditypool/export.d.ts +1 -1
  17. package/lib/codec/Switcheo/carbon/liquiditypool/export.js +4 -2
  18. package/lib/codec/Switcheo/carbon/liquiditypool/query.d.ts +22 -0
  19. package/lib/codec/Switcheo/carbon/liquiditypool/query.js +88 -1
  20. package/lib/codec/Switcheo/carbon/marketstats/params.d.ts +3 -3
  21. package/lib/codec/Switcheo/carbon/oracle/export.d.ts +1 -1
  22. package/lib/codec/Switcheo/carbon/oracle/export.js +4 -2
  23. package/lib/codec/Switcheo/carbon/oracle/query.d.ts +23 -2
  24. package/lib/codec/Switcheo/carbon/oracle/query.js +120 -3
  25. package/lib/codec/alliance/alliance.d.ts +5 -5
  26. package/lib/codec/alliance/delegations.d.ts +8 -8
  27. package/lib/codec/alliance/events.d.ts +6 -6
  28. package/lib/codec/alliance/genesis.d.ts +7 -7
  29. package/lib/codec/alliance/gov.d.ts +5 -5
  30. package/lib/codec/alliance/params.d.ts +4 -4
  31. package/lib/codec/alliance/query.d.ts +24 -24
  32. package/lib/codec/alliance/tx.d.ts +10 -10
  33. package/lib/codec/book/book.d.ts +14 -2
  34. package/lib/codec/book/book.js +80 -13
  35. package/lib/codec/book/query.d.ts +48 -1
  36. package/lib/codec/book/query.js +224 -1
  37. package/lib/codec/broker/amm.d.ts +35 -7
  38. package/lib/codec/broker/amm.js +181 -6
  39. package/lib/codec/broker/event.d.ts +13 -0
  40. package/lib/codec/broker/event.js +89 -1
  41. package/lib/codec/broker/genesis.d.ts +3 -2
  42. package/lib/codec/broker/genesis.js +26 -11
  43. package/lib/codec/broker/incoming_pool_swap.d.ts +23 -0
  44. package/lib/codec/broker/incoming_pool_swap.js +136 -0
  45. package/lib/codec/cdp/event.d.ts +14 -7
  46. package/lib/codec/cdp/event.js +163 -81
  47. package/lib/codec/cdp/params.d.ts +2 -4
  48. package/lib/codec/cdp/params.js +20 -30
  49. package/lib/codec/cdp/query.d.ts +22 -1
  50. package/lib/codec/cdp/query.js +104 -17
  51. package/lib/codec/cdp/tx.d.ts +40 -18
  52. package/lib/codec/cdp/tx.js +115 -31
  53. package/lib/codec/coin/token.d.ts +1 -0
  54. package/lib/codec/coin/token.js +19 -0
  55. package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +3 -3
  56. package/lib/codec/cosmos/circuit/module/v1/module.d.ts +20 -0
  57. package/lib/codec/cosmos/circuit/module/v1/module.js +59 -0
  58. package/lib/codec/cosmos/circuit/v1/query.d.ts +97 -0
  59. package/lib/codec/cosmos/circuit/v1/query.js +333 -0
  60. package/lib/codec/cosmos/circuit/v1/tx.d.ts +128 -0
  61. package/lib/codec/cosmos/circuit/v1/tx.js +371 -0
  62. package/lib/codec/cosmos/circuit/v1/types.d.ts +81 -0
  63. package/lib/codec/cosmos/circuit/v1/types.js +266 -0
  64. package/lib/codec/cosmos/gov/v1/export.d.ts +3 -0
  65. package/lib/codec/cosmos/gov/v1/export.js +49 -0
  66. package/lib/codec/cosmos/msg/textual/v1/textual.d.ts +1 -0
  67. package/lib/codec/cosmos/msg/textual/v1/textual.js +14 -0
  68. package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.d.ts +31 -0
  69. package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.js +154 -0
  70. package/lib/codec/cosmos/store/snapshots/v1/snapshot.d.ts +119 -0
  71. package/lib/codec/cosmos/store/snapshots/v1/snapshot.js +540 -0
  72. package/lib/codec/cosmos/store/streaming/abci/grpc.d.ts +72 -0
  73. package/lib/codec/cosmos/store/streaming/abci/grpc.js +247 -0
  74. package/lib/codec/cosmos/store/v1beta1/commit_info.d.ts +54 -0
  75. package/lib/codec/cosmos/store/v1beta1/commit_info.js +273 -0
  76. package/lib/codec/cosmos/store/v1beta1/listening.d.ts +48 -0
  77. package/lib/codec/cosmos/store/v1beta1/listening.js +220 -0
  78. package/lib/codec/cosmos-models.d.ts +1 -1
  79. package/lib/codec/cosmos-models.js +1 -1
  80. package/lib/codec/crisis/genesis.d.ts +18 -0
  81. package/lib/codec/crisis/genesis.js +46 -0
  82. package/lib/codec/crisis/query.d.ts +43 -0
  83. package/lib/codec/crisis/query.js +103 -0
  84. package/lib/codec/crisis/tx.d.ts +12 -0
  85. package/lib/codec/crisis/tx.js +20 -0
  86. package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.d.ts +50 -0
  87. package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.js +120 -0
  88. package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.d.ts +7 -7
  89. package/lib/codec/ibc/lightclients/localhost/v1/localhost.d.ts +3 -3
  90. package/lib/codec/ibc/lightclients/solomachine/v1/solomachine.d.ts +18 -18
  91. package/lib/codec/index.js +27 -0
  92. package/lib/codec/inflation/inflation.d.ts +6 -2
  93. package/lib/codec/inflation/inflation.js +80 -25
  94. package/lib/codec/liquiditypool/event.d.ts +40 -1
  95. package/lib/codec/liquiditypool/event.js +294 -1
  96. package/lib/codec/liquiditypool/genesis.d.ts +4 -5
  97. package/lib/codec/liquiditypool/genesis.js +34 -49
  98. package/lib/codec/liquiditypool/query.d.ts +2 -51
  99. package/lib/codec/liquiditypool/query.js +18 -265
  100. package/lib/codec/liquiditypool/reward.d.ts +21 -21
  101. package/lib/codec/liquiditypool/reward.js +97 -111
  102. package/lib/codec/market/legacy.d.ts +62 -0
  103. package/lib/codec/market/legacy.js +630 -0
  104. package/lib/codec/oracle/query.d.ts +37 -34
  105. package/lib/codec/oracle/query.js +37 -31
  106. package/lib/codec/position/position.d.ts +2 -0
  107. package/lib/codec/position/position.js +34 -0
  108. package/lib/codec/proofs.d.ts +15 -15
  109. package/lib/codec/query/pagination.d.ts +29 -0
  110. package/lib/codec/query/pagination.js +126 -0
  111. package/lib/codec/subaccount/genesis.d.ts +5 -1
  112. package/lib/codec/subaccount/genesis.js +48 -2
  113. package/lib/codec/subaccount/query.d.ts +135 -21
  114. package/lib/codec/subaccount/query.js +617 -47
  115. package/lib/codec/subaccount/subaccount.d.ts +29 -3
  116. package/lib/codec/subaccount/subaccount.js +234 -31
  117. package/lib/codec/subaccount/tx.d.ts +7 -1
  118. package/lib/codec/subaccount/tx.js +101 -16
  119. package/lib/constant/amino.d.ts +0 -0
  120. package/lib/constant/amino.js +1 -0
  121. package/lib/constant/chainConfig.d.ts +26 -0
  122. package/lib/constant/chainConfig.js +154 -0
  123. package/lib/constant/eip6963Provider.d.ts +26 -0
  124. package/lib/constant/eip6963Provider.js +31 -0
  125. package/lib/constant/signless.d.ts +2 -0
  126. package/lib/constant/signless.js +5 -0
  127. package/lib/modules/feemarket.d.ts +1 -1
  128. package/lib/modules/feemarket.js +2 -2
  129. package/lib/modules/gov.d.ts +3 -25
  130. package/lib/modules/gov.js +12 -160
  131. package/lib/modules/signless.d.ts +24 -0
  132. package/lib/modules/signless.js +108 -0
  133. package/lib/modules/vault.d.ts +56 -0
  134. package/lib/modules/vault.js +128 -0
  135. package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
  136. package/lib/provider/account/EthLedgerAccount/index.js +1 -5
  137. package/lib/provider/amino/types/gov.js +0 -7
  138. package/lib/provider/amino/types/signless.d.ts +12 -0
  139. package/lib/provider/amino/types/signless.js +193 -0
  140. package/lib/provider/eip6963Provider/Eip6963Provider.d.ts +8 -0
  141. package/lib/provider/eip6963Provider/Eip6963Provider.js +23 -0
  142. package/lib/provider/eip6963Provider/index.d.ts +1 -0
  143. package/lib/provider/eip6963Provider/index.js +8 -0
  144. package/lib/provider/rainbowKit/RainbowKitAccount.d.ts +40 -0
  145. package/lib/provider/rainbowKit/RainbowKitAccount.js +322 -0
  146. package/lib/provider/rainbowKit/index.d.ts +1 -0
  147. package/lib/provider/rainbowKit/index.js +8 -0
  148. package/lib/provider/station/StationAccount.d.ts +28 -0
  149. package/lib/provider/station/StationAccount.js +168 -0
  150. package/lib/provider/station/index.d.ts +2 -0
  151. package/lib/provider/station/index.js +10 -0
  152. package/lib/util/gov.js +48 -6
  153. package/lib/util/signless.d.ts +11 -0
  154. package/lib/util/signless.js +92 -0
  155. package/package.json +1 -1
package/lib/CarbonSDK.js CHANGED
@@ -320,7 +320,7 @@ class CarbonSDK {
320
320
  }
321
321
  disconnect() {
322
322
  var _a;
323
- if ((_a = this.wallet) === null || _a === void 0 ? void 0 : _a.isLedgerSigner()) {
323
+ if ((_a = this.wallet) === null || _a === void 0 ? void 0 : _a.isSigner(wallet_1.CarbonSignerTypes.Ledger)) {
324
324
  this.wallet.signer.ledger.disconnect();
325
325
  }
326
326
  const opts = this.generateOpts();
@@ -0,0 +1,108 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ import { Coin } from "../../../cosmos/base/v1beta1/coin";
4
+ export declare const protobufPackage = "Switcheo.carbon.bridge";
5
+ export interface BridgeState {
6
+ id: string;
7
+ name: string;
8
+ isEnabled: boolean;
9
+ }
10
+ /** each bridge have multiple connections to different chains */
11
+ export interface Connection {
12
+ /** = bridgeId_chainId */
13
+ connectionId: string;
14
+ bridgeId: string;
15
+ chainId: string;
16
+ chainDisplayName: string;
17
+ tokenGatewayAddress: string;
18
+ encoding: string;
19
+ escrowAddress: string;
20
+ isEnabled: boolean;
21
+ }
22
+ /** each connection can have multiple external tokens, which contains the mapping to native denom */
23
+ export interface ExternalTokenMapping {
24
+ connectionId: string;
25
+ isEnabled: boolean;
26
+ isCarbonOwned: boolean;
27
+ externalAddress: string;
28
+ /** corresponding carbon native denom */
29
+ denom: string;
30
+ }
31
+ /** accounts/contracts from external chains can be allowed to execute certain predefined functions on carbon */
32
+ export interface ExternalExecutor {
33
+ connectionId: string;
34
+ externalAddress: string;
35
+ carbonAddress: string;
36
+ }
37
+ /** contracts from external chains that can be executed by carbon */
38
+ export interface ExecutableContract {
39
+ connectionId: string;
40
+ address: string;
41
+ }
42
+ /** RelayFee */
43
+ export interface RelayFee {
44
+ relayerDepositAddress: string;
45
+ fee?: Coin;
46
+ }
47
+ /** WithdrawalDetails */
48
+ export interface WithdrawalDetails {
49
+ connectionId: string;
50
+ sender: string;
51
+ receiver: string;
52
+ coin?: Coin;
53
+ relayFee?: RelayFee;
54
+ }
55
+ export declare const BridgeState: {
56
+ encode(message: BridgeState, writer?: _m0.Writer): _m0.Writer;
57
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): BridgeState;
58
+ fromJSON(object: any): BridgeState;
59
+ toJSON(message: BridgeState): unknown;
60
+ fromPartial(object: DeepPartial<BridgeState>): BridgeState;
61
+ };
62
+ export declare const Connection: {
63
+ encode(message: Connection, writer?: _m0.Writer): _m0.Writer;
64
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Connection;
65
+ fromJSON(object: any): Connection;
66
+ toJSON(message: Connection): unknown;
67
+ fromPartial(object: DeepPartial<Connection>): Connection;
68
+ };
69
+ export declare const ExternalTokenMapping: {
70
+ encode(message: ExternalTokenMapping, writer?: _m0.Writer): _m0.Writer;
71
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExternalTokenMapping;
72
+ fromJSON(object: any): ExternalTokenMapping;
73
+ toJSON(message: ExternalTokenMapping): unknown;
74
+ fromPartial(object: DeepPartial<ExternalTokenMapping>): ExternalTokenMapping;
75
+ };
76
+ export declare const ExternalExecutor: {
77
+ encode(message: ExternalExecutor, writer?: _m0.Writer): _m0.Writer;
78
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExternalExecutor;
79
+ fromJSON(object: any): ExternalExecutor;
80
+ toJSON(message: ExternalExecutor): unknown;
81
+ fromPartial(object: DeepPartial<ExternalExecutor>): ExternalExecutor;
82
+ };
83
+ export declare const ExecutableContract: {
84
+ encode(message: ExecutableContract, writer?: _m0.Writer): _m0.Writer;
85
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ExecutableContract;
86
+ fromJSON(object: any): ExecutableContract;
87
+ toJSON(message: ExecutableContract): unknown;
88
+ fromPartial(object: DeepPartial<ExecutableContract>): ExecutableContract;
89
+ };
90
+ export declare const RelayFee: {
91
+ encode(message: RelayFee, writer?: _m0.Writer): _m0.Writer;
92
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): RelayFee;
93
+ fromJSON(object: any): RelayFee;
94
+ toJSON(message: RelayFee): unknown;
95
+ fromPartial(object: DeepPartial<RelayFee>): RelayFee;
96
+ };
97
+ export declare const WithdrawalDetails: {
98
+ encode(message: WithdrawalDetails, writer?: _m0.Writer): _m0.Writer;
99
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): WithdrawalDetails;
100
+ fromJSON(object: any): WithdrawalDetails;
101
+ toJSON(message: WithdrawalDetails): unknown;
102
+ fromPartial(object: DeepPartial<WithdrawalDetails>): WithdrawalDetails;
103
+ };
104
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
105
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
106
+ [K in keyof T]?: DeepPartial<T[K]>;
107
+ } : Partial<T>;
108
+ export {};