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.
- package/lib/CarbonSDK.js +1 -1
- package/lib/codec/Switcheo/carbon/bridge/bridge.d.ts +108 -0
- package/lib/codec/Switcheo/carbon/bridge/bridge.js +632 -0
- package/lib/codec/Switcheo/carbon/bridge/event.d.ts +187 -0
- package/lib/codec/Switcheo/carbon/bridge/event.js +1172 -0
- package/lib/codec/Switcheo/carbon/bridge/genesis.d.ts +20 -0
- package/lib/codec/Switcheo/carbon/bridge/genesis.js +63 -0
- package/lib/codec/Switcheo/carbon/bridge/params.d.ts +28 -0
- package/lib/codec/Switcheo/carbon/bridge/params.js +81 -0
- package/lib/codec/Switcheo/carbon/bridge/query.d.ts +177 -0
- package/lib/codec/Switcheo/carbon/bridge/query.js +639 -0
- package/lib/codec/Switcheo/carbon/bridge/tx.d.ts +528 -0
- package/lib/codec/Switcheo/carbon/bridge/tx.js +2558 -0
- package/lib/codec/Switcheo/carbon/ccm/ccm.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/liquidation/liquidation.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/liquiditypool/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/liquiditypool/export.js +4 -2
- package/lib/codec/Switcheo/carbon/liquiditypool/query.d.ts +22 -0
- package/lib/codec/Switcheo/carbon/liquiditypool/query.js +88 -1
- package/lib/codec/Switcheo/carbon/marketstats/params.d.ts +3 -3
- package/lib/codec/Switcheo/carbon/oracle/export.d.ts +1 -1
- package/lib/codec/Switcheo/carbon/oracle/export.js +4 -2
- package/lib/codec/Switcheo/carbon/oracle/query.d.ts +23 -2
- package/lib/codec/Switcheo/carbon/oracle/query.js +120 -3
- package/lib/codec/alliance/alliance.d.ts +5 -5
- package/lib/codec/alliance/delegations.d.ts +8 -8
- package/lib/codec/alliance/events.d.ts +6 -6
- package/lib/codec/alliance/genesis.d.ts +7 -7
- package/lib/codec/alliance/gov.d.ts +5 -5
- package/lib/codec/alliance/params.d.ts +4 -4
- package/lib/codec/alliance/query.d.ts +24 -24
- package/lib/codec/alliance/tx.d.ts +10 -10
- package/lib/codec/book/book.d.ts +14 -2
- package/lib/codec/book/book.js +80 -13
- package/lib/codec/book/query.d.ts +48 -1
- package/lib/codec/book/query.js +224 -1
- package/lib/codec/broker/amm.d.ts +35 -7
- package/lib/codec/broker/amm.js +181 -6
- package/lib/codec/broker/event.d.ts +13 -0
- package/lib/codec/broker/event.js +89 -1
- package/lib/codec/broker/genesis.d.ts +3 -2
- package/lib/codec/broker/genesis.js +26 -11
- package/lib/codec/broker/incoming_pool_swap.d.ts +23 -0
- package/lib/codec/broker/incoming_pool_swap.js +136 -0
- package/lib/codec/cdp/event.d.ts +14 -7
- package/lib/codec/cdp/event.js +163 -81
- package/lib/codec/cdp/params.d.ts +2 -4
- package/lib/codec/cdp/params.js +20 -30
- package/lib/codec/cdp/query.d.ts +22 -1
- package/lib/codec/cdp/query.js +104 -17
- package/lib/codec/cdp/tx.d.ts +40 -18
- package/lib/codec/cdp/tx.js +115 -31
- package/lib/codec/coin/token.d.ts +1 -0
- package/lib/codec/coin/token.js +19 -0
- package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +3 -3
- package/lib/codec/cosmos/circuit/module/v1/module.d.ts +20 -0
- package/lib/codec/cosmos/circuit/module/v1/module.js +59 -0
- package/lib/codec/cosmos/circuit/v1/query.d.ts +97 -0
- package/lib/codec/cosmos/circuit/v1/query.js +333 -0
- package/lib/codec/cosmos/circuit/v1/tx.d.ts +128 -0
- package/lib/codec/cosmos/circuit/v1/tx.js +371 -0
- package/lib/codec/cosmos/circuit/v1/types.d.ts +81 -0
- package/lib/codec/cosmos/circuit/v1/types.js +266 -0
- package/lib/codec/cosmos/gov/v1/export.d.ts +3 -0
- package/lib/codec/cosmos/gov/v1/export.js +49 -0
- package/lib/codec/cosmos/msg/textual/v1/textual.d.ts +1 -0
- package/lib/codec/cosmos/msg/textual/v1/textual.js +14 -0
- package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.d.ts +31 -0
- package/lib/codec/cosmos/store/internal/kv/v1beta1/kv.js +154 -0
- package/lib/codec/cosmos/store/snapshots/v1/snapshot.d.ts +119 -0
- package/lib/codec/cosmos/store/snapshots/v1/snapshot.js +540 -0
- package/lib/codec/cosmos/store/streaming/abci/grpc.d.ts +72 -0
- package/lib/codec/cosmos/store/streaming/abci/grpc.js +247 -0
- package/lib/codec/cosmos/store/v1beta1/commit_info.d.ts +54 -0
- package/lib/codec/cosmos/store/v1beta1/commit_info.js +273 -0
- package/lib/codec/cosmos/store/v1beta1/listening.d.ts +48 -0
- package/lib/codec/cosmos/store/v1beta1/listening.js +220 -0
- package/lib/codec/cosmos-models.d.ts +1 -1
- package/lib/codec/cosmos-models.js +1 -1
- package/lib/codec/crisis/genesis.d.ts +18 -0
- package/lib/codec/crisis/genesis.js +46 -0
- package/lib/codec/crisis/query.d.ts +43 -0
- package/lib/codec/crisis/query.js +103 -0
- package/lib/codec/crisis/tx.d.ts +12 -0
- package/lib/codec/crisis/tx.js +20 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.d.ts +50 -0
- package/lib/codec/ibc/applications/interchain_accounts/host/v1/tx.js +120 -0
- package/lib/codec/ibc/applications/interchain_accounts/v1/genesis.d.ts +7 -7
- package/lib/codec/ibc/lightclients/localhost/v1/localhost.d.ts +3 -3
- package/lib/codec/ibc/lightclients/solomachine/v1/solomachine.d.ts +18 -18
- package/lib/codec/index.js +27 -0
- package/lib/codec/inflation/inflation.d.ts +6 -2
- package/lib/codec/inflation/inflation.js +80 -25
- package/lib/codec/liquiditypool/event.d.ts +40 -1
- package/lib/codec/liquiditypool/event.js +294 -1
- package/lib/codec/liquiditypool/genesis.d.ts +4 -5
- package/lib/codec/liquiditypool/genesis.js +34 -49
- package/lib/codec/liquiditypool/query.d.ts +2 -51
- package/lib/codec/liquiditypool/query.js +18 -265
- package/lib/codec/liquiditypool/reward.d.ts +21 -21
- package/lib/codec/liquiditypool/reward.js +97 -111
- package/lib/codec/market/legacy.d.ts +62 -0
- package/lib/codec/market/legacy.js +630 -0
- package/lib/codec/oracle/query.d.ts +37 -34
- package/lib/codec/oracle/query.js +37 -31
- package/lib/codec/position/position.d.ts +2 -0
- package/lib/codec/position/position.js +34 -0
- package/lib/codec/proofs.d.ts +15 -15
- package/lib/codec/query/pagination.d.ts +29 -0
- package/lib/codec/query/pagination.js +126 -0
- package/lib/codec/subaccount/genesis.d.ts +5 -1
- package/lib/codec/subaccount/genesis.js +48 -2
- package/lib/codec/subaccount/query.d.ts +135 -21
- package/lib/codec/subaccount/query.js +617 -47
- package/lib/codec/subaccount/subaccount.d.ts +29 -3
- package/lib/codec/subaccount/subaccount.js +234 -31
- package/lib/codec/subaccount/tx.d.ts +7 -1
- package/lib/codec/subaccount/tx.js +101 -16
- package/lib/constant/amino.d.ts +0 -0
- package/lib/constant/amino.js +1 -0
- package/lib/constant/chainConfig.d.ts +26 -0
- package/lib/constant/chainConfig.js +154 -0
- package/lib/constant/eip6963Provider.d.ts +26 -0
- package/lib/constant/eip6963Provider.js +31 -0
- package/lib/constant/signless.d.ts +2 -0
- package/lib/constant/signless.js +5 -0
- package/lib/modules/feemarket.d.ts +1 -1
- package/lib/modules/feemarket.js +2 -2
- package/lib/modules/gov.d.ts +3 -25
- package/lib/modules/gov.js +12 -160
- package/lib/modules/signless.d.ts +24 -0
- package/lib/modules/signless.js +108 -0
- package/lib/modules/vault.d.ts +56 -0
- package/lib/modules/vault.js +128 -0
- package/lib/provider/account/EthLedgerAccount/EthLedgerAccount.js +1 -1
- package/lib/provider/account/EthLedgerAccount/index.js +1 -5
- package/lib/provider/amino/types/gov.js +0 -7
- package/lib/provider/amino/types/signless.d.ts +12 -0
- package/lib/provider/amino/types/signless.js +193 -0
- package/lib/provider/eip6963Provider/Eip6963Provider.d.ts +8 -0
- package/lib/provider/eip6963Provider/Eip6963Provider.js +23 -0
- package/lib/provider/eip6963Provider/index.d.ts +1 -0
- package/lib/provider/eip6963Provider/index.js +8 -0
- package/lib/provider/rainbowKit/RainbowKitAccount.d.ts +40 -0
- package/lib/provider/rainbowKit/RainbowKitAccount.js +322 -0
- package/lib/provider/rainbowKit/index.d.ts +1 -0
- package/lib/provider/rainbowKit/index.js +8 -0
- package/lib/provider/station/StationAccount.d.ts +28 -0
- package/lib/provider/station/StationAccount.js +168 -0
- package/lib/provider/station/index.d.ts +2 -0
- package/lib/provider/station/index.js +10 -0
- package/lib/util/gov.js +48 -6
- package/lib/util/signless.d.ts +11 -0
- package/lib/util/signless.js +92 -0
- 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.
|
|
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 {};
|