@bolt-liquidity-hq/cosmwasm-client 0.1.0-beta.8 → 0.1.0-beta.9
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/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -2
- package/dist/index.d.ts +62 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArchwayClient, SigningArchwayClient } from '@archwayhq/arch3.js';
|
|
2
|
-
import { ChainConfig, ClientConfig,
|
|
2
|
+
import { ChainConfig, ClientConfig, Address, Duration, AssetPairString, Timestamp, OracleAssetPair, Coin, AllowanceMode, BaseClient, OracleConfig, InvertiblePrice, Price, RouterConfig, BaseLiquidityDetails, Pool, PoolConfig, Asset, SwapParams, SwapResult } from '@bolt-liquidity-hq/core';
|
|
3
3
|
import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from '@cosmjs/cosmwasm-stargate';
|
|
4
4
|
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
5
5
|
|
|
@@ -14,6 +14,66 @@ type CosmWasmClientConfig = ClientConfig<CosmWasmChainConfig> & {
|
|
|
14
14
|
};
|
|
15
15
|
type CosmWasmChain = 'archway';
|
|
16
16
|
|
|
17
|
+
type QueryOracleConfigResponse = {
|
|
18
|
+
admin: Address;
|
|
19
|
+
price_threshold_ratio: string;
|
|
20
|
+
price_expire_time: Duration | null;
|
|
21
|
+
};
|
|
22
|
+
type PriceRepresentation = {
|
|
23
|
+
asset_pair: AssetPairString;
|
|
24
|
+
price: string;
|
|
25
|
+
expiry_time: Timestamp;
|
|
26
|
+
};
|
|
27
|
+
type InvertiblePriceRepresentation = PriceRepresentation & {
|
|
28
|
+
is_inverse: boolean;
|
|
29
|
+
};
|
|
30
|
+
type QueryPriceResponse = {
|
|
31
|
+
pair_data: InvertiblePriceRepresentation;
|
|
32
|
+
};
|
|
33
|
+
type QueryPricesResponse = {
|
|
34
|
+
prices: PriceRepresentation[];
|
|
35
|
+
};
|
|
36
|
+
type QueryAssetPairsResponse = {
|
|
37
|
+
list: OracleAssetPair[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type QuerySettlementConfigResponse = {
|
|
41
|
+
price_oracle_contract: Address;
|
|
42
|
+
protocol_fee_recipient: Address;
|
|
43
|
+
protocol_fee: string;
|
|
44
|
+
lp_fee: string;
|
|
45
|
+
allowance_mode: AllowanceMode;
|
|
46
|
+
lps: Address[];
|
|
47
|
+
min_base_out: string;
|
|
48
|
+
};
|
|
49
|
+
type QueryBaseLiquidityResponse = {
|
|
50
|
+
base_liquidity: Coin;
|
|
51
|
+
total_shares: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type QueryRouterConfigResponse = {
|
|
55
|
+
admin: Address;
|
|
56
|
+
default_price_oracle_contract: Address;
|
|
57
|
+
default_protocol_fee_recipient: Address;
|
|
58
|
+
default_protocol_fee: string;
|
|
59
|
+
default_lp_fee: string;
|
|
60
|
+
settlement_code_id: number;
|
|
61
|
+
};
|
|
62
|
+
type MarketRepresentation = {
|
|
63
|
+
market_address: Address;
|
|
64
|
+
base_asset_symbol: string;
|
|
65
|
+
quote_assets_symbols: string[];
|
|
66
|
+
};
|
|
67
|
+
type QueryMarketsResponse = {
|
|
68
|
+
markets: MarketRepresentation[];
|
|
69
|
+
};
|
|
70
|
+
type QueryBaseLiquidityAllResponse = {
|
|
71
|
+
liquidity: Record<Address, QueryBaseLiquidityResponse>;
|
|
72
|
+
};
|
|
73
|
+
type QueryQuotesForUserAllResponse = {
|
|
74
|
+
quotes: Record<Address, Coin[]>;
|
|
75
|
+
};
|
|
76
|
+
|
|
17
77
|
/**
|
|
18
78
|
* Client implementation for interacting with the Bolt Liquidity Outpost on CosmWasm-based blockchains.
|
|
19
79
|
*
|
|
@@ -231,4 +291,4 @@ declare class BoltCosmWasmClient extends BaseClient<OfflineSigner, ExecuteResult
|
|
|
231
291
|
swap(signer: OfflineSigner, params: SwapParams): Promise<SwapResult<ExecuteResult>>;
|
|
232
292
|
}
|
|
233
293
|
|
|
234
|
-
export { BoltCosmWasmClient };
|
|
294
|
+
export { BoltCosmWasmClient, type CosmWasmChain, type CosmWasmChainConfig, type CosmWasmClientConfig, type InvertiblePriceRepresentation, type MarketRepresentation, type PriceRepresentation, type QueryAssetPairsResponse, type QueryBaseLiquidityAllResponse, type QueryBaseLiquidityResponse, type QueryMarketsResponse, type QueryOracleConfigResponse, type QueryPriceResponse, type QueryPricesResponse, type QueryQuotesForUserAllResponse, type QueryRouterConfigResponse, type QuerySettlementConfigResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ArchwayClient, SigningArchwayClient } from '@archwayhq/arch3.js';
|
|
2
|
-
import { ChainConfig, ClientConfig,
|
|
2
|
+
import { ChainConfig, ClientConfig, Address, Duration, AssetPairString, Timestamp, OracleAssetPair, Coin, AllowanceMode, BaseClient, OracleConfig, InvertiblePrice, Price, RouterConfig, BaseLiquidityDetails, Pool, PoolConfig, Asset, SwapParams, SwapResult } from '@bolt-liquidity-hq/core';
|
|
3
3
|
import { CosmWasmClient, SigningCosmWasmClient, ExecuteResult } from '@cosmjs/cosmwasm-stargate';
|
|
4
4
|
import { OfflineSigner } from '@cosmjs/proto-signing';
|
|
5
5
|
|
|
@@ -14,6 +14,66 @@ type CosmWasmClientConfig = ClientConfig<CosmWasmChainConfig> & {
|
|
|
14
14
|
};
|
|
15
15
|
type CosmWasmChain = 'archway';
|
|
16
16
|
|
|
17
|
+
type QueryOracleConfigResponse = {
|
|
18
|
+
admin: Address;
|
|
19
|
+
price_threshold_ratio: string;
|
|
20
|
+
price_expire_time: Duration | null;
|
|
21
|
+
};
|
|
22
|
+
type PriceRepresentation = {
|
|
23
|
+
asset_pair: AssetPairString;
|
|
24
|
+
price: string;
|
|
25
|
+
expiry_time: Timestamp;
|
|
26
|
+
};
|
|
27
|
+
type InvertiblePriceRepresentation = PriceRepresentation & {
|
|
28
|
+
is_inverse: boolean;
|
|
29
|
+
};
|
|
30
|
+
type QueryPriceResponse = {
|
|
31
|
+
pair_data: InvertiblePriceRepresentation;
|
|
32
|
+
};
|
|
33
|
+
type QueryPricesResponse = {
|
|
34
|
+
prices: PriceRepresentation[];
|
|
35
|
+
};
|
|
36
|
+
type QueryAssetPairsResponse = {
|
|
37
|
+
list: OracleAssetPair[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type QuerySettlementConfigResponse = {
|
|
41
|
+
price_oracle_contract: Address;
|
|
42
|
+
protocol_fee_recipient: Address;
|
|
43
|
+
protocol_fee: string;
|
|
44
|
+
lp_fee: string;
|
|
45
|
+
allowance_mode: AllowanceMode;
|
|
46
|
+
lps: Address[];
|
|
47
|
+
min_base_out: string;
|
|
48
|
+
};
|
|
49
|
+
type QueryBaseLiquidityResponse = {
|
|
50
|
+
base_liquidity: Coin;
|
|
51
|
+
total_shares: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type QueryRouterConfigResponse = {
|
|
55
|
+
admin: Address;
|
|
56
|
+
default_price_oracle_contract: Address;
|
|
57
|
+
default_protocol_fee_recipient: Address;
|
|
58
|
+
default_protocol_fee: string;
|
|
59
|
+
default_lp_fee: string;
|
|
60
|
+
settlement_code_id: number;
|
|
61
|
+
};
|
|
62
|
+
type MarketRepresentation = {
|
|
63
|
+
market_address: Address;
|
|
64
|
+
base_asset_symbol: string;
|
|
65
|
+
quote_assets_symbols: string[];
|
|
66
|
+
};
|
|
67
|
+
type QueryMarketsResponse = {
|
|
68
|
+
markets: MarketRepresentation[];
|
|
69
|
+
};
|
|
70
|
+
type QueryBaseLiquidityAllResponse = {
|
|
71
|
+
liquidity: Record<Address, QueryBaseLiquidityResponse>;
|
|
72
|
+
};
|
|
73
|
+
type QueryQuotesForUserAllResponse = {
|
|
74
|
+
quotes: Record<Address, Coin[]>;
|
|
75
|
+
};
|
|
76
|
+
|
|
17
77
|
/**
|
|
18
78
|
* Client implementation for interacting with the Bolt Liquidity Outpost on CosmWasm-based blockchains.
|
|
19
79
|
*
|
|
@@ -231,4 +291,4 @@ declare class BoltCosmWasmClient extends BaseClient<OfflineSigner, ExecuteResult
|
|
|
231
291
|
swap(signer: OfflineSigner, params: SwapParams): Promise<SwapResult<ExecuteResult>>;
|
|
232
292
|
}
|
|
233
293
|
|
|
234
|
-
export { BoltCosmWasmClient };
|
|
294
|
+
export { BoltCosmWasmClient, type CosmWasmChain, type CosmWasmChainConfig, type CosmWasmClientConfig, type InvertiblePriceRepresentation, type MarketRepresentation, type PriceRepresentation, type QueryAssetPairsResponse, type QueryBaseLiquidityAllResponse, type QueryBaseLiquidityResponse, type QueryMarketsResponse, type QueryOracleConfigResponse, type QueryPriceResponse, type QueryPricesResponse, type QueryQuotesForUserAllResponse, type QueryRouterConfigResponse, type QuerySettlementConfigResponse };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolt-liquidity-hq/cosmwasm-client",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.9",
|
|
4
4
|
"description": "Typescript SDK to interact with Bolt Liquidity on CosmWasm based blockchains.",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@archwayhq/arch3.js": "^0.7.5",
|
|
53
53
|
"@cosmjs/cosmwasm-stargate": "^0.33.1",
|
|
54
54
|
"@cosmjs/proto-signing": "^0.33.1",
|
|
55
|
-
"@bolt-liquidity-hq/core": "0.1.0-beta.
|
|
55
|
+
"@bolt-liquidity-hq/core": "0.1.0-beta.9"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {},
|
|
58
58
|
"peerDependencies": {},
|