@mictonode/widget 0.3.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/.github/FUNDING.yml +3 -0
- package/.github/workflows/npm-publish.yml +34 -0
- package/.prettierrc.json +9 -0
- package/.vscode/extensions.json +3 -0
- package/README.md +41 -0
- package/dist/main-172a6585.js +404361 -0
- package/dist/ping-widget.js +13 -0
- package/dist/ping-widget.umd.cjs +96 -0
- package/dist/query.lcd-2adf1c0c.js +129 -0
- package/dist/query.rpc.Query-b53908e7.js +2316 -0
- package/dist/tx.rpc.msg-d234ff40.js +37 -0
- package/dist/tx.rpc.msg-f7a80a78.js +21 -0
- package/example/.vscode/extensions.json +3 -0
- package/example/README.md +7 -0
- package/example/index.html +12 -0
- package/example/package.json +19 -0
- package/example/pnpm-lock.yaml +465 -0
- package/example/public/cdn.html +19 -0
- package/example/src/App.vue +73 -0
- package/example/src/main.js +4 -0
- package/example/vite.config.js +7 -0
- package/index.html +12 -0
- package/lib/components/ConnectWallet/index.vue +267 -0
- package/lib/components/TokenConvert/index.vue +1033 -0
- package/lib/components/TokenConvert/tokens.ts +37 -0
- package/lib/components/TxDialog/index.vue +432 -0
- package/lib/components/TxDialog/messages/Delegate.vue +194 -0
- package/lib/components/TxDialog/messages/Deposit.vue +97 -0
- package/lib/components/TxDialog/messages/MsgDelegate.ts +0 -0
- package/lib/components/TxDialog/messages/Redelegate.vue +189 -0
- package/lib/components/TxDialog/messages/Send.vue +142 -0
- package/lib/components/TxDialog/messages/Transfer.vue +248 -0
- package/lib/components/TxDialog/messages/Unbond.vue +137 -0
- package/lib/components/TxDialog/messages/Vote.vue +63 -0
- package/lib/components/TxDialog/messages/Withdraw.vue +56 -0
- package/lib/components/TxDialog/messages/WithdrawCommission.vue +75 -0
- package/lib/components/TxDialog/wasm/ClearAdmin.vue +56 -0
- package/lib/components/TxDialog/wasm/ExecuteContract.vue +99 -0
- package/lib/components/TxDialog/wasm/InstantiateContract.vue +109 -0
- package/lib/components/TxDialog/wasm/MigrateContract.vue +77 -0
- package/lib/components/TxDialog/wasm/MigrateContract2.vue +77 -0
- package/lib/components/TxDialog/wasm/StoreCode.vue +101 -0
- package/lib/components/TxDialog/wasm/UpdateAdmin.vue +75 -0
- package/lib/main.css +7 -0
- package/lib/main.ts +23 -0
- package/lib/utils/TokenUnitConverter.ts +45 -0
- package/lib/utils/format.ts +16 -0
- package/lib/utils/http.ts +223 -0
- package/lib/utils/type.ts +77 -0
- package/lib/wallet/EthermintMessageAdapter.ts +136 -0
- package/lib/wallet/UniClient.ts +152 -0
- package/lib/wallet/Wallet.ts +138 -0
- package/lib/wallet/wallets/InitiaWallet.ts +189 -0
- package/lib/wallet/wallets/KeplerWallet.ts +158 -0
- package/lib/wallet/wallets/LeapWallet.ts +142 -0
- package/lib/wallet/wallets/LedgerWallet.ts +203 -0
- package/lib/wallet/wallets/MetamaskSnapWallet.ts +105 -0
- package/lib/wallet/wallets/MetamaskWallet.ts +173 -0
- package/lib/wallet/wallets/OKXWallet.ts +202 -0
- package/lib/wallet/wallets/UnisatWallet.ts +198 -0
- package/package.json +102 -0
- package/postcss.config.js +6 -0
- package/src/App.vue +241 -0
- package/src/main.ts +4 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +34 -0
- package/tsconfig.json +25 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +62 -0
- package/vue-shim.d.ts +6 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { _ as e, s as n } from "./main-172a6585.js";
|
|
2
|
+
import "@initia/initia.proto/ibc/applications/fetchprice/v1/tx";
|
|
3
|
+
import "@initia/initia.proto/ibc/applications/fetchprice/v1/types";
|
|
4
|
+
import "@initia/initia.proto/slinky/marketmap/v1/tx";
|
|
5
|
+
import "@initia/initia.proto/slinky/oracle/v1/tx";
|
|
6
|
+
import "@initia/initia.proto/slinky/types/v1/currency_pair";
|
|
7
|
+
import "@initia/initia.proto/slinky/oracle/v1/genesis";
|
|
8
|
+
import "@initia/initia.proto/slinky/marketmap/v1/market";
|
|
9
|
+
import "@initia/initia.proto/slinky/marketmap/v1/params";
|
|
10
|
+
class y {
|
|
11
|
+
constructor({
|
|
12
|
+
requestClient: i
|
|
13
|
+
}) {
|
|
14
|
+
e(this, "req", void 0), this.req = i, this.pools = this.pools.bind(this), this.params = this.params.bind(this), this.userPositions = this.userPositions.bind(this), this.liquidityPerTickRange = this.liquidityPerTickRange.bind(this), this.liquidityNetInDirection = this.liquidityNetInDirection.bind(this), this.claimableSpreadRewards = this.claimableSpreadRewards.bind(this), this.claimableIncentives = this.claimableIncentives.bind(this), this.positionById = this.positionById.bind(this), this.poolAccumulatorRewards = this.poolAccumulatorRewards.bind(this), this.incentiveRecords = this.incentiveRecords.bind(this), this.tickAccumulatorTrackers = this.tickAccumulatorTrackers.bind(this), this.cFMMPoolIdLinkFromConcentratedPoolId = this.cFMMPoolIdLinkFromConcentratedPoolId.bind(this);
|
|
15
|
+
}
|
|
16
|
+
/* Pools returns all concentrated liquidity pools */
|
|
17
|
+
async pools(i = {
|
|
18
|
+
pagination: void 0
|
|
19
|
+
}) {
|
|
20
|
+
const o = {
|
|
21
|
+
params: {}
|
|
22
|
+
};
|
|
23
|
+
typeof (i == null ? void 0 : i.pagination) < "u" && n(o, i.pagination);
|
|
24
|
+
const t = "osmosis/concentratedliquidity/v1beta1/pools";
|
|
25
|
+
return await this.req.get(t, o);
|
|
26
|
+
}
|
|
27
|
+
/* Params returns concentrated liquidity module params. */
|
|
28
|
+
async params(i = {}) {
|
|
29
|
+
const o = "osmosis/concentratedliquidity/v1beta1/params";
|
|
30
|
+
return await this.req.get(o);
|
|
31
|
+
}
|
|
32
|
+
/* UserPositions returns all concentrated postitions of some address. */
|
|
33
|
+
async userPositions(i) {
|
|
34
|
+
const o = {
|
|
35
|
+
params: {}
|
|
36
|
+
};
|
|
37
|
+
typeof (i == null ? void 0 : i.poolId) < "u" && (o.params.pool_id = i.poolId), typeof (i == null ? void 0 : i.pagination) < "u" && n(o, i.pagination);
|
|
38
|
+
const t = `osmosis/concentratedliquidity/v1beta1/positions/${i.address}`;
|
|
39
|
+
return await this.req.get(t, o);
|
|
40
|
+
}
|
|
41
|
+
/* LiquidityPerTickRange returns the amount of liquidity per every tick range
|
|
42
|
+
existing within the given pool */
|
|
43
|
+
async liquidityPerTickRange(i) {
|
|
44
|
+
const o = {
|
|
45
|
+
params: {}
|
|
46
|
+
};
|
|
47
|
+
typeof (i == null ? void 0 : i.poolId) < "u" && (o.params.pool_id = i.poolId);
|
|
48
|
+
const t = "osmosis/concentratedliquidity/v1beta1/liquidity_per_tick_range";
|
|
49
|
+
return await this.req.get(t, o);
|
|
50
|
+
}
|
|
51
|
+
/* LiquidityNetInDirection returns liquidity net in the direction given.
|
|
52
|
+
Uses the bound if specified, if not uses either min tick / max tick
|
|
53
|
+
depending on the direction. */
|
|
54
|
+
async liquidityNetInDirection(i) {
|
|
55
|
+
const o = {
|
|
56
|
+
params: {}
|
|
57
|
+
};
|
|
58
|
+
typeof (i == null ? void 0 : i.poolId) < "u" && (o.params.pool_id = i.poolId), typeof (i == null ? void 0 : i.tokenIn) < "u" && (o.params.token_in = i.tokenIn), typeof (i == null ? void 0 : i.startTick) < "u" && (o.params.start_tick = i.startTick), typeof (i == null ? void 0 : i.useCurTick) < "u" && (o.params.use_cur_tick = i.useCurTick), typeof (i == null ? void 0 : i.boundTick) < "u" && (o.params.bound_tick = i.boundTick), typeof (i == null ? void 0 : i.useNoBound) < "u" && (o.params.use_no_bound = i.useNoBound);
|
|
59
|
+
const t = "osmosis/concentratedliquidity/v1beta1/liquidity_net_in_direction";
|
|
60
|
+
return await this.req.get(t, o);
|
|
61
|
+
}
|
|
62
|
+
/* ClaimableSpreadRewards returns the amount of spread rewards that can be
|
|
63
|
+
claimed by a position with the given id. */
|
|
64
|
+
async claimableSpreadRewards(i) {
|
|
65
|
+
const o = {
|
|
66
|
+
params: {}
|
|
67
|
+
};
|
|
68
|
+
typeof (i == null ? void 0 : i.positionId) < "u" && (o.params.position_id = i.positionId);
|
|
69
|
+
const t = "osmosis/concentratedliquidity/v1beta1/claimable_spread_rewards";
|
|
70
|
+
return await this.req.get(t, o);
|
|
71
|
+
}
|
|
72
|
+
/* ClaimableIncentives returns the amount of incentives that can be claimed
|
|
73
|
+
and how many would be forfeited by a position with the given id. */
|
|
74
|
+
async claimableIncentives(i) {
|
|
75
|
+
const o = {
|
|
76
|
+
params: {}
|
|
77
|
+
};
|
|
78
|
+
typeof (i == null ? void 0 : i.positionId) < "u" && (o.params.position_id = i.positionId);
|
|
79
|
+
const t = "osmosis/concentratedliquidity/v1beta1/claimable_incentives";
|
|
80
|
+
return await this.req.get(t, o);
|
|
81
|
+
}
|
|
82
|
+
/* PositionById returns a position with the given id. */
|
|
83
|
+
async positionById(i) {
|
|
84
|
+
const o = {
|
|
85
|
+
params: {}
|
|
86
|
+
};
|
|
87
|
+
typeof (i == null ? void 0 : i.positionId) < "u" && (o.params.position_id = i.positionId);
|
|
88
|
+
const t = "osmosis/concentratedliquidity/v1beta1/position_by_id";
|
|
89
|
+
return await this.req.get(t, o);
|
|
90
|
+
}
|
|
91
|
+
/* PoolAccumulatorRewards returns the pool-global accumulator rewards.
|
|
92
|
+
Contains spread factor rewards and uptime rewards. */
|
|
93
|
+
async poolAccumulatorRewards(i) {
|
|
94
|
+
const o = {
|
|
95
|
+
params: {}
|
|
96
|
+
};
|
|
97
|
+
typeof (i == null ? void 0 : i.poolId) < "u" && (o.params.pool_id = i.poolId);
|
|
98
|
+
const t = "osmosis/concentratedliquidity/v1beta1/pool_accum_rewards";
|
|
99
|
+
return await this.req.get(t, o);
|
|
100
|
+
}
|
|
101
|
+
/* IncentiveRecords returns the incentive records for a given poolId */
|
|
102
|
+
async incentiveRecords(i) {
|
|
103
|
+
const o = {
|
|
104
|
+
params: {}
|
|
105
|
+
};
|
|
106
|
+
typeof (i == null ? void 0 : i.poolId) < "u" && (o.params.pool_id = i.poolId), typeof (i == null ? void 0 : i.pagination) < "u" && n(o, i.pagination);
|
|
107
|
+
const t = "osmosis/concentratedliquidity/v1beta1/incentive_records";
|
|
108
|
+
return await this.req.get(t, o);
|
|
109
|
+
}
|
|
110
|
+
/* TickAccumulatorTrackers returns the tick accumulator trackers.
|
|
111
|
+
Contains spread factor and uptime accumulator trackers. */
|
|
112
|
+
async tickAccumulatorTrackers(i) {
|
|
113
|
+
const o = {
|
|
114
|
+
params: {}
|
|
115
|
+
};
|
|
116
|
+
typeof (i == null ? void 0 : i.poolId) < "u" && (o.params.pool_id = i.poolId), typeof (i == null ? void 0 : i.tickIndex) < "u" && (o.params.tick_index = i.tickIndex);
|
|
117
|
+
const t = "osmosis/concentratedliquidity/v1beta1/tick_accum_trackers";
|
|
118
|
+
return await this.req.get(t, o);
|
|
119
|
+
}
|
|
120
|
+
/* CFMMPoolIdLinkFromConcentratedPoolId returns the pool id of the CFMM
|
|
121
|
+
pool that is linked with the given concentrated pool. */
|
|
122
|
+
async cFMMPoolIdLinkFromConcentratedPoolId(i) {
|
|
123
|
+
const o = `osmosis/concentratedliquidity/v1beta1/cfmm_pool_id_link_from_concentrated/${i.concentratedPoolId}`;
|
|
124
|
+
return await this.req.get(o);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
export {
|
|
128
|
+
y as LCDQueryClient
|
|
129
|
+
};
|