@skip-go/client 1.6.0-alpha.1 → 1.6.0-alpha.3
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 +1 -1
- package/dist/cjs/api/getAssets.cjs +0 -16
- package/dist/cjs/api/getAssetsBetweenChains.cjs +0 -12
- package/dist/cjs/api/getBridges.cjs +0 -12
- package/dist/cjs/api/getChains.cjs +0 -12
- package/dist/cjs/api/getVenues.cjs +0 -12
- package/dist/cjs/api/postAssetsFromSource.cjs +0 -13
- package/dist/cjs/api/postBalances.cjs +0 -12
- package/dist/cjs/api/postIbcOriginAssets.cjs +0 -12
- package/dist/cjs/api/postMessages.cjs +0 -12
- package/dist/cjs/api/postMessagesDirect.cjs +0 -12
- package/dist/cjs/api/postRecommendAssets.cjs +0 -12
- package/dist/cjs/api/postRoute.cjs +0 -12
- package/dist/cjs/api/postSubmitTransaction.cjs +0 -12
- package/dist/cjs/api/postTrackTransaction.cjs +0 -12
- package/dist/cjs/api/postTransactionStatus.cjs +0 -12
- package/dist/cjs/chunk-2QPPD3BB.cjs +0 -210
- package/dist/cjs/chunk-2SA3OAIJ.cjs +0 -18
- package/dist/cjs/chunk-4BWE7SOV.cjs +0 -68
- package/dist/cjs/chunk-4GHUZDDP.cjs +0 -16
- package/dist/cjs/chunk-4ZIVDKQN.cjs +0 -387
- package/dist/cjs/chunk-A3UNNRKD.cjs +0 -574
- package/dist/cjs/chunk-A5S6SIYN.cjs +0 -12
- package/dist/cjs/chunk-AQTXZWLA.cjs +0 -55
- package/dist/cjs/chunk-ASDMDYTC.cjs +0 -11
- package/dist/cjs/chunk-ATW6UNT5.cjs +0 -136
- package/dist/cjs/chunk-AUTOIM57.cjs +0 -22
- package/dist/cjs/chunk-AVWWCQ5P.cjs +0 -2264
- package/dist/cjs/chunk-CIZTNJ3K.cjs +0 -24
- package/dist/cjs/chunk-CK6CQWQU.cjs +0 -49
- package/dist/cjs/chunk-EAZQ2ECA.cjs +0 -185
- package/dist/cjs/chunk-F3EB2AQG.cjs +0 -28
- package/dist/cjs/chunk-FCTBCHOT.cjs +0 -12
- package/dist/cjs/chunk-GDDD6R2X.cjs +0 -459
- package/dist/cjs/chunk-IJIBMN2F.cjs +0 -12
- package/dist/cjs/chunk-JRXPJ45U.cjs +0 -12
- package/dist/cjs/chunk-LJF74VNZ.cjs +0 -214
- package/dist/cjs/chunk-LJV45UGL.cjs +0 -582
- package/dist/cjs/chunk-MUJBB64F.cjs +0 -291
- package/dist/cjs/chunk-NCFH5MGF.cjs +0 -39
- package/dist/cjs/chunk-NM4PISTQ.cjs +0 -3359
- package/dist/cjs/chunk-OJISEAMX.cjs +0 -13
- package/dist/cjs/chunk-OVKHTOBP.cjs +0 -99
- package/dist/cjs/chunk-PDNKS5R2.cjs +0 -13
- package/dist/cjs/chunk-TEH6UMUR.cjs +0 -280
- package/dist/cjs/chunk-UXW4XVHF.cjs +0 -15
- package/dist/cjs/chunk-WVMDZODS.cjs +0 -1495
- package/dist/cjs/chunk-YX56UXDX.cjs +0 -189
- package/dist/cjs/index.cjs +0 -349
- package/dist/cjs/public-functions/executeMultipleRoutes.cjs +0 -27
- package/dist/cjs/public-functions/executeRoute.cjs +0 -27
- package/dist/cjs/public-functions/getCosmosGasAmountForMessage.cjs +0 -16
- package/dist/cjs/public-functions/getEvmGasAmountForMessage.cjs +0 -11
- package/dist/cjs/public-functions/getFeeInfoForChain.cjs +0 -14
- package/dist/cjs/public-functions/getRecommendedGasPrice.cjs +0 -15
- package/dist/cjs/public-functions/getRouteWithGasOnReceive.cjs +0 -41
- package/dist/cjs/public-functions/getSigningStargateClient.cjs +0 -15
- package/dist/cjs/public-functions/setApiOptions.cjs +0 -12
- package/dist/cjs/public-functions/setClientOptions.cjs +0 -16
- package/dist/cjs/public-functions/subscribeToRouteStatus.cjs +0 -26
- package/dist/cjs/public-functions/validateCosmosGasBalance.cjs +0 -18
- package/dist/cjs/public-functions/waitForTransaction.cjs +0 -18
- package/dist/esm/api/getAssets.d.ts +0 -19
- package/dist/esm/api/getAssets.js +0 -3
- package/dist/esm/api/getAssetsBetweenChains.d.ts +0 -56
- package/dist/esm/api/getAssetsBetweenChains.js +0 -3
- package/dist/esm/api/getBridges.d.ts +0 -55
- package/dist/esm/api/getBridges.js +0 -3
- package/dist/esm/api/getChains.d.ts +0 -41
- package/dist/esm/api/getChains.js +0 -3
- package/dist/esm/api/getVenues.d.ts +0 -13
- package/dist/esm/api/getVenues.js +0 -3
- package/dist/esm/api/postAssetsFromSource.d.ts +0 -22
- package/dist/esm/api/postAssetsFromSource.js +0 -4
- package/dist/esm/api/postBalances.d.ts +0 -35
- package/dist/esm/api/postBalances.js +0 -3
- package/dist/esm/api/postIbcOriginAssets.d.ts +0 -32
- package/dist/esm/api/postIbcOriginAssets.js +0 -3
- package/dist/esm/api/postMessages.d.ts +0 -101
- package/dist/esm/api/postMessages.js +0 -3
- package/dist/esm/api/postMessagesDirect.d.ts +0 -617
- package/dist/esm/api/postMessagesDirect.js +0 -3
- package/dist/esm/api/postRecommendAssets.d.ts +0 -40
- package/dist/esm/api/postRecommendAssets.js +0 -3
- package/dist/esm/api/postRoute.d.ts +0 -507
- package/dist/esm/api/postRoute.js +0 -3
- package/dist/esm/api/postSubmitTransaction.d.ts +0 -17
- package/dist/esm/api/postSubmitTransaction.js +0 -3
- package/dist/esm/api/postTrackTransaction.d.ts +0 -12
- package/dist/esm/api/postTrackTransaction.js +0 -3
- package/dist/esm/api/postTransactionStatus.d.ts +0 -639
- package/dist/esm/api/postTransactionStatus.js +0 -3
- package/dist/esm/apiState-1VvikVK-.d.ts +0 -8
- package/dist/esm/callbacks-1e6BnDot.d.ts +0 -158
- package/dist/esm/chunk-3DIX6KRJ.js +0 -566
- package/dist/esm/chunk-3JHLVPRG.js +0 -10
- package/dist/esm/chunk-5WYMRZIO.js +0 -97
- package/dist/esm/chunk-6QW6MRVQ.js +0 -53
- package/dist/esm/chunk-A4HQEGYV.js +0 -432
- package/dist/esm/chunk-A5NZMSTI.js +0 -10
- package/dist/esm/chunk-CGJRRAFS.js +0 -22
- package/dist/esm/chunk-DMJMN4J3.js +0 -379
- package/dist/esm/chunk-E4NRDAVO.js +0 -65
- package/dist/esm/chunk-ETBJVFQP.js +0 -10
- package/dist/esm/chunk-F2LQB2DP.js +0 -3323
- package/dist/esm/chunk-F66EKL3W.js +0 -203
- package/dist/esm/chunk-GV2QOWB4.js +0 -26
- package/dist/esm/chunk-GZJLX2CP.js +0 -2258
- package/dist/esm/chunk-HNU2Y3JI.js +0 -13
- package/dist/esm/chunk-J24LYWJE.js +0 -130
- package/dist/esm/chunk-KZKAL5ZN.js +0 -16
- package/dist/esm/chunk-N4PTRCNT.js +0 -11
- package/dist/esm/chunk-NUHMTWHP.js +0 -180
- package/dist/esm/chunk-OMOVHXSC.js +0 -212
- package/dist/esm/chunk-P36PE4CR.js +0 -37
- package/dist/esm/chunk-PZ2624FK.js +0 -187
- package/dist/esm/chunk-QYXGDTUU.js +0 -47
- package/dist/esm/chunk-R2GHDOWX.js +0 -272
- package/dist/esm/chunk-RTDD7HZ3.js +0 -275
- package/dist/esm/chunk-SXBG57J3.js +0 -20
- package/dist/esm/chunk-TGTOO2ZQ.js +0 -14
- package/dist/esm/chunk-UHCKOKBM.js +0 -9
- package/dist/esm/chunk-ULUX2CVU.js +0 -557
- package/dist/esm/chunk-UN46DUOV.js +0 -11
- package/dist/esm/chunk-XNU3TKKM.js +0 -10
- package/dist/esm/chunk-ZVFYCNA5.js +0 -1492
- package/dist/esm/client-types-Bz-WqtM3.d.ts +0 -114
- package/dist/esm/generateApi-Bi3W_Sti.d.ts +0 -56
- package/dist/esm/index.d.ts +0 -1859
- package/dist/esm/index.js +0 -32
- package/dist/esm/public-functions/executeMultipleRoutes.d.ts +0 -80
- package/dist/esm/public-functions/executeMultipleRoutes.js +0 -18
- package/dist/esm/public-functions/executeRoute.d.ts +0 -12
- package/dist/esm/public-functions/executeRoute.js +0 -18
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.d.ts +0 -8
- package/dist/esm/public-functions/getCosmosGasAmountForMessage.js +0 -3
- package/dist/esm/public-functions/getEvmGasAmountForMessage.d.ts +0 -14
- package/dist/esm/public-functions/getEvmGasAmountForMessage.js +0 -2
- package/dist/esm/public-functions/getFeeInfoForChain.d.ts +0 -9
- package/dist/esm/public-functions/getFeeInfoForChain.js +0 -5
- package/dist/esm/public-functions/getRecommendedGasPrice.d.ts +0 -9
- package/dist/esm/public-functions/getRecommendedGasPrice.js +0 -6
- package/dist/esm/public-functions/getRouteWithGasOnReceive.d.ts +0 -20
- package/dist/esm/public-functions/getRouteWithGasOnReceive.js +0 -32
- package/dist/esm/public-functions/getSigningStargateClient.d.ts +0 -13
- package/dist/esm/public-functions/getSigningStargateClient.js +0 -6
- package/dist/esm/public-functions/setApiOptions.d.ts +0 -9
- package/dist/esm/public-functions/setApiOptions.js +0 -3
- package/dist/esm/public-functions/setClientOptions.d.ts +0 -11
- package/dist/esm/public-functions/setClientOptions.js +0 -7
- package/dist/esm/public-functions/subscribeToRouteStatus.d.ts +0 -12
- package/dist/esm/public-functions/subscribeToRouteStatus.js +0 -5
- package/dist/esm/public-functions/validateCosmosGasBalance.d.ts +0 -44
- package/dist/esm/public-functions/validateCosmosGasBalance.js +0 -9
- package/dist/esm/public-functions/waitForTransaction.d.ts +0 -1279
- package/dist/esm/public-functions/waitForTransaction.js +0 -5
- package/dist/esm/setClientOptions-QO8p3yRr.d.ts +0 -76
- package/dist/esm/swaggerTypes-Cvh0GDv-.d.ts +0 -2050
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
import { MsgDepositForBurn, MsgDepositForBurnWithCaller, MsgExecute, MsgInitiateTokenDeposit, BaseVestingAccount, Timestamp, Period } from './chunk-F2LQB2DP.js';
|
|
2
|
-
import { toTimestamp, fromTimestamp, fromJsonTimestamp, isSet } from './chunk-RTDD7HZ3.js';
|
|
3
|
-
import '@cosmjs/stargate';
|
|
4
|
-
import { toUtf8 } from '@cosmjs/encoding';
|
|
5
|
-
import { MsgSend } from 'cosmjs-types/cosmos/bank/v1beta1/tx.js';
|
|
6
|
-
import { MsgExecuteContract } from 'cosmjs-types/cosmwasm/wasm/v1/tx.js';
|
|
7
|
-
import { MsgTransfer } from 'cosmjs-types/ibc/applications/transfer/v1/tx.js';
|
|
8
|
-
import _m0 from 'protobufjs/minimal.js';
|
|
9
|
-
|
|
10
|
-
function createBaseClawbackVestingAccount() {
|
|
11
|
-
return {
|
|
12
|
-
baseVestingAccount: void 0,
|
|
13
|
-
funderAddress: "",
|
|
14
|
-
startTime: /* @__PURE__ */ new Date(),
|
|
15
|
-
lockupPeriods: [],
|
|
16
|
-
vestingPeriods: []
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
var ClawbackVestingAccount = {
|
|
20
|
-
typeUrl: "/evmos.vesting.v2.ClawbackVestingAccount",
|
|
21
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
22
|
-
if (message.baseVestingAccount !== void 0) {
|
|
23
|
-
BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(10).fork()).ldelim();
|
|
24
|
-
}
|
|
25
|
-
if (message.funderAddress !== "") {
|
|
26
|
-
writer.uint32(18).string(message.funderAddress);
|
|
27
|
-
}
|
|
28
|
-
if (message.startTime !== void 0) {
|
|
29
|
-
Timestamp.encode(toTimestamp(message.startTime), writer.uint32(26).fork()).ldelim();
|
|
30
|
-
}
|
|
31
|
-
for (const v of message.lockupPeriods) {
|
|
32
|
-
Period.encode(v, writer.uint32(34).fork()).ldelim();
|
|
33
|
-
}
|
|
34
|
-
for (const v of message.vestingPeriods) {
|
|
35
|
-
Period.encode(v, writer.uint32(42).fork()).ldelim();
|
|
36
|
-
}
|
|
37
|
-
return writer;
|
|
38
|
-
},
|
|
39
|
-
decode(input, length) {
|
|
40
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
41
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
42
|
-
const message = createBaseClawbackVestingAccount();
|
|
43
|
-
while (reader.pos < end) {
|
|
44
|
-
const tag = reader.uint32();
|
|
45
|
-
switch (tag >>> 3) {
|
|
46
|
-
case 1:
|
|
47
|
-
message.baseVestingAccount = BaseVestingAccount.decode(reader, reader.uint32());
|
|
48
|
-
break;
|
|
49
|
-
case 2:
|
|
50
|
-
message.funderAddress = reader.string();
|
|
51
|
-
break;
|
|
52
|
-
case 3:
|
|
53
|
-
message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
54
|
-
break;
|
|
55
|
-
case 4:
|
|
56
|
-
message.lockupPeriods.push(Period.decode(reader, reader.uint32()));
|
|
57
|
-
break;
|
|
58
|
-
case 5:
|
|
59
|
-
message.vestingPeriods.push(Period.decode(reader, reader.uint32()));
|
|
60
|
-
break;
|
|
61
|
-
default:
|
|
62
|
-
reader.skipType(tag & 7);
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return message;
|
|
67
|
-
},
|
|
68
|
-
fromJSON(object) {
|
|
69
|
-
return {
|
|
70
|
-
baseVestingAccount: isSet(object.baseVestingAccount) ? BaseVestingAccount.fromJSON(object.baseVestingAccount) : void 0,
|
|
71
|
-
funderAddress: isSet(object.funderAddress) ? String(object.funderAddress) : "",
|
|
72
|
-
startTime: isSet(object.startTime) ? fromJsonTimestamp(object.startTime) : void 0,
|
|
73
|
-
lockupPeriods: Array.isArray(object?.lockupPeriods) ? object.lockupPeriods.map((e) => Period.fromJSON(e)) : [],
|
|
74
|
-
vestingPeriods: Array.isArray(object?.vestingPeriods) ? object.vestingPeriods.map((e) => Period.fromJSON(e)) : []
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
toJSON(message) {
|
|
78
|
-
const obj = {};
|
|
79
|
-
message.baseVestingAccount !== void 0 && (obj.baseVestingAccount = message.baseVestingAccount ? BaseVestingAccount.toJSON(message.baseVestingAccount) : void 0);
|
|
80
|
-
message.funderAddress !== void 0 && (obj.funderAddress = message.funderAddress);
|
|
81
|
-
message.startTime !== void 0 && (obj.startTime = message.startTime.toISOString());
|
|
82
|
-
if (message.lockupPeriods) {
|
|
83
|
-
obj.lockupPeriods = message.lockupPeriods.map((e) => e ? Period.toJSON(e) : void 0);
|
|
84
|
-
} else {
|
|
85
|
-
obj.lockupPeriods = [];
|
|
86
|
-
}
|
|
87
|
-
if (message.vestingPeriods) {
|
|
88
|
-
obj.vestingPeriods = message.vestingPeriods.map((e) => e ? Period.toJSON(e) : void 0);
|
|
89
|
-
} else {
|
|
90
|
-
obj.vestingPeriods = [];
|
|
91
|
-
}
|
|
92
|
-
return obj;
|
|
93
|
-
},
|
|
94
|
-
fromPartial(object) {
|
|
95
|
-
const message = createBaseClawbackVestingAccount();
|
|
96
|
-
message.baseVestingAccount = object.baseVestingAccount !== void 0 && object.baseVestingAccount !== null ? BaseVestingAccount.fromPartial(object.baseVestingAccount) : void 0;
|
|
97
|
-
message.funderAddress = object.funderAddress ?? "";
|
|
98
|
-
message.startTime = object.startTime ?? void 0;
|
|
99
|
-
message.lockupPeriods = object.lockupPeriods?.map((e) => Period.fromPartial(e)) || [];
|
|
100
|
-
message.vestingPeriods = object.vestingPeriods?.map((e) => Period.fromPartial(e)) || [];
|
|
101
|
-
return message;
|
|
102
|
-
},
|
|
103
|
-
fromAmino(object) {
|
|
104
|
-
const message = createBaseClawbackVestingAccount();
|
|
105
|
-
if (object.base_vesting_account !== void 0 && object.base_vesting_account !== null) {
|
|
106
|
-
message.baseVestingAccount = BaseVestingAccount.fromAmino(object.base_vesting_account);
|
|
107
|
-
}
|
|
108
|
-
if (object.funder_address !== void 0 && object.funder_address !== null) {
|
|
109
|
-
message.funderAddress = object.funder_address;
|
|
110
|
-
}
|
|
111
|
-
if (object.start_time !== void 0 && object.start_time !== null) {
|
|
112
|
-
message.startTime = fromTimestamp(Timestamp.fromAmino(object.start_time));
|
|
113
|
-
}
|
|
114
|
-
message.lockupPeriods = object.lockup_periods?.map((e) => Period.fromAmino(e)) || [];
|
|
115
|
-
message.vestingPeriods = object.vesting_periods?.map((e) => Period.fromAmino(e)) || [];
|
|
116
|
-
return message;
|
|
117
|
-
},
|
|
118
|
-
toAmino(message) {
|
|
119
|
-
const obj = {};
|
|
120
|
-
obj.base_vesting_account = message.baseVestingAccount ? BaseVestingAccount.toAmino(message.baseVestingAccount) : void 0;
|
|
121
|
-
obj.funder_address = message.funderAddress === "" ? void 0 : message.funderAddress;
|
|
122
|
-
obj.start_time = message.startTime ? Timestamp.toAmino(toTimestamp(message.startTime)) : void 0;
|
|
123
|
-
if (message.lockupPeriods) {
|
|
124
|
-
obj.lockup_periods = message.lockupPeriods.map((e) => e ? Period.toAmino(e) : void 0);
|
|
125
|
-
} else {
|
|
126
|
-
obj.lockup_periods = message.lockupPeriods;
|
|
127
|
-
}
|
|
128
|
-
if (message.vestingPeriods) {
|
|
129
|
-
obj.vesting_periods = message.vestingPeriods.map((e) => e ? Period.toAmino(e) : void 0);
|
|
130
|
-
} else {
|
|
131
|
-
obj.vesting_periods = message.vestingPeriods;
|
|
132
|
-
}
|
|
133
|
-
return obj;
|
|
134
|
-
},
|
|
135
|
-
fromAminoMsg(object) {
|
|
136
|
-
return ClawbackVestingAccount.fromAmino(object.value);
|
|
137
|
-
},
|
|
138
|
-
toAminoMsg(message) {
|
|
139
|
-
return {
|
|
140
|
-
type: "vesting/ClawbackVestingAccount",
|
|
141
|
-
value: ClawbackVestingAccount.toAmino(message)
|
|
142
|
-
};
|
|
143
|
-
},
|
|
144
|
-
fromProtoMsg(message) {
|
|
145
|
-
return ClawbackVestingAccount.decode(message.value);
|
|
146
|
-
},
|
|
147
|
-
toProto(message) {
|
|
148
|
-
return ClawbackVestingAccount.encode(message).finish();
|
|
149
|
-
},
|
|
150
|
-
toProtoMsg(message) {
|
|
151
|
-
return {
|
|
152
|
-
typeUrl: "/evmos.vesting.v2.ClawbackVestingAccount",
|
|
153
|
-
value: ClawbackVestingAccount.encode(message).finish()
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
|
|
158
|
-
// src/private-functions/cosmos/getEncodeObjectFromCosmosMessage.ts
|
|
159
|
-
function getEncodeObjectFromCosmosMessage(message) {
|
|
160
|
-
const msgJson = JSON.parse(message.msg ?? "");
|
|
161
|
-
if (message.msgTypeUrl === "/ibc.applications.transfer.v1.MsgTransfer") {
|
|
162
|
-
return {
|
|
163
|
-
typeUrl: "/ibc.applications.transfer.v1.MsgTransfer",
|
|
164
|
-
value: MsgTransfer.fromJSON({
|
|
165
|
-
sourcePort: msgJson.source_port,
|
|
166
|
-
sourceChannel: msgJson.source_channel,
|
|
167
|
-
token: msgJson.token,
|
|
168
|
-
sender: msgJson.sender,
|
|
169
|
-
receiver: msgJson.receiver,
|
|
170
|
-
timeoutHeight: msgJson.timeout_height,
|
|
171
|
-
timeoutTimestamp: msgJson.timeout_timestamp,
|
|
172
|
-
memo: msgJson.memo
|
|
173
|
-
})
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
if (message.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract") {
|
|
177
|
-
return {
|
|
178
|
-
typeUrl: message.msgTypeUrl,
|
|
179
|
-
value: MsgExecuteContract.fromPartial({
|
|
180
|
-
sender: msgJson.sender,
|
|
181
|
-
contract: msgJson.contract,
|
|
182
|
-
msg: toUtf8(JSON.stringify(msgJson.msg)),
|
|
183
|
-
funds: msgJson.funds
|
|
184
|
-
})
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
if (message.msgTypeUrl === "/cosmos.bank.v1beta1.MsgSend") {
|
|
188
|
-
return {
|
|
189
|
-
typeUrl: message.msgTypeUrl,
|
|
190
|
-
value: MsgSend.fromPartial({
|
|
191
|
-
fromAddress: msgJson.from_address,
|
|
192
|
-
toAddress: msgJson.to_address,
|
|
193
|
-
amount: msgJson.amount
|
|
194
|
-
})
|
|
195
|
-
};
|
|
196
|
-
}
|
|
197
|
-
if (message.msgTypeUrl === "/circle.cctp.v1.MsgDepositForBurn") {
|
|
198
|
-
return {
|
|
199
|
-
typeUrl: message.msgTypeUrl,
|
|
200
|
-
value: MsgDepositForBurn.fromAmino(msgJson)
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
if (message.msgTypeUrl === "/circle.cctp.v1.MsgDepositForBurnWithCaller") {
|
|
204
|
-
return {
|
|
205
|
-
typeUrl: message.msgTypeUrl,
|
|
206
|
-
value: MsgDepositForBurnWithCaller.fromAmino(msgJson)
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
if (message.msgTypeUrl === "/initia.move.v1.MsgExecute") {
|
|
210
|
-
return {
|
|
211
|
-
typeUrl: message.msgTypeUrl,
|
|
212
|
-
value: MsgExecute.fromPartial({
|
|
213
|
-
sender: msgJson.sender,
|
|
214
|
-
moduleAddress: msgJson.module_address,
|
|
215
|
-
moduleName: msgJson.module_name,
|
|
216
|
-
functionName: msgJson.function_name,
|
|
217
|
-
args: msgJson.args
|
|
218
|
-
})
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
if (message.msgTypeUrl === "/opinit.ophost.v1.MsgInitiateTokenDeposit") {
|
|
222
|
-
return {
|
|
223
|
-
typeUrl: message.msgTypeUrl,
|
|
224
|
-
value: MsgInitiateTokenDeposit.fromPartial({
|
|
225
|
-
sender: msgJson.sender,
|
|
226
|
-
to: msgJson.to,
|
|
227
|
-
amount: msgJson.amount,
|
|
228
|
-
bridgeId: msgJson.bridge_id
|
|
229
|
-
})
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
if (message.msgTypeUrl === "/evmos.vesting.v2.ClawbackVestingAccount") {
|
|
233
|
-
return {
|
|
234
|
-
typeUrl: message.msgTypeUrl,
|
|
235
|
-
value: ClawbackVestingAccount.fromPartial({
|
|
236
|
-
baseVestingAccount: msgJson.base_vesting_account,
|
|
237
|
-
funderAddress: msgJson.funder_address,
|
|
238
|
-
lockupPeriods: msgJson.lockup_periods,
|
|
239
|
-
startTime: msgJson.start_time,
|
|
240
|
-
vestingPeriods: msgJson.vesting_periods
|
|
241
|
-
})
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
return {
|
|
245
|
-
typeUrl: message.msgTypeUrl ?? "",
|
|
246
|
-
value: msgJson
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// src/public-functions/getCosmosGasAmountForMessage.ts
|
|
251
|
-
var DEFAULT_GAS_MULTIPLIER = 1.5;
|
|
252
|
-
async function getCosmosGasAmountForMessage(client, signerAddress, chainId, messages, encodedMsgs, multiplier = DEFAULT_GAS_MULTIPLIER) {
|
|
253
|
-
if (!messages && !encodedMsgs) {
|
|
254
|
-
throw new Error("Either message or encodedMsg must be provided");
|
|
255
|
-
}
|
|
256
|
-
const _encodedMsgs = messages?.map((message) => getEncodeObjectFromCosmosMessage(message));
|
|
257
|
-
encodedMsgs = encodedMsgs || _encodedMsgs;
|
|
258
|
-
if (!encodedMsgs) {
|
|
259
|
-
throw new Error("Either message or encodedMsg must be provided");
|
|
260
|
-
}
|
|
261
|
-
if (chainId.includes("evmos") || chainId.includes("injective") || chainId.includes("dymension") || chainId.includes("sunrise-1") || process?.env.NODE_ENV === "test") {
|
|
262
|
-
if (messages?.find((i) => i.msgTypeUrl === "/cosmwasm.wasm.v1.MsgExecuteContract")) {
|
|
263
|
-
return "2400000";
|
|
264
|
-
}
|
|
265
|
-
return "280000";
|
|
266
|
-
}
|
|
267
|
-
const estimatedGas = await client.simulate(signerAddress, encodedMsgs, "");
|
|
268
|
-
const estimatedGasWithBuffer = estimatedGas * multiplier;
|
|
269
|
-
return Math.ceil(estimatedGasWithBuffer).toFixed(0);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
export { DEFAULT_GAS_MULTIPLIER, getCosmosGasAmountForMessage, getEncodeObjectFromCosmosMessage };
|
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import _m0 from 'protobufjs/minimal.js';
|
|
2
|
-
import Long from 'long';
|
|
3
|
-
export { default as Long } from 'long';
|
|
4
|
-
import '@keplr-wallet/unit';
|
|
5
|
-
|
|
6
|
-
// src/codegen/helpers.ts
|
|
7
|
-
if (_m0.util.Long !== Long) {
|
|
8
|
-
_m0.util.Long = Long;
|
|
9
|
-
_m0.configure();
|
|
10
|
-
}
|
|
11
|
-
var globalThis = (() => {
|
|
12
|
-
if (typeof globalThis !== "undefined") return globalThis;
|
|
13
|
-
if (typeof self !== "undefined") return self;
|
|
14
|
-
if (typeof window !== "undefined") return window;
|
|
15
|
-
if (typeof global !== "undefined") return global;
|
|
16
|
-
throw "Unable to locate global object";
|
|
17
|
-
})();
|
|
18
|
-
var atob = globalThis.atob || ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
|
|
19
|
-
function bytesFromBase64(b64) {
|
|
20
|
-
const bin = atob(b64);
|
|
21
|
-
const arr = new Uint8Array(bin.length);
|
|
22
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
23
|
-
arr[i] = bin.charCodeAt(i);
|
|
24
|
-
}
|
|
25
|
-
return arr;
|
|
26
|
-
}
|
|
27
|
-
var btoa = globalThis.btoa || ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
|
|
28
|
-
function base64FromBytes(arr) {
|
|
29
|
-
const bin = [];
|
|
30
|
-
arr.forEach((byte) => {
|
|
31
|
-
bin.push(String.fromCharCode(byte));
|
|
32
|
-
});
|
|
33
|
-
return btoa(bin.join(""));
|
|
34
|
-
}
|
|
35
|
-
function isSet(value) {
|
|
36
|
-
return value !== null && value !== void 0;
|
|
37
|
-
}
|
|
38
|
-
function toTimestamp(date) {
|
|
39
|
-
const seconds = numberToLong(date.getTime() / 1e3);
|
|
40
|
-
const nanos = date.getTime() % 1e3 * 1e6;
|
|
41
|
-
return {
|
|
42
|
-
seconds,
|
|
43
|
-
nanos
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function fromTimestamp(t) {
|
|
47
|
-
let millis = t.seconds.toNumber() * 1e3;
|
|
48
|
-
millis += t.nanos / 1e6;
|
|
49
|
-
return new Date(millis);
|
|
50
|
-
}
|
|
51
|
-
var timestampFromJSON = (object) => {
|
|
52
|
-
return {
|
|
53
|
-
seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO,
|
|
54
|
-
nanos: isSet(object.nanos) ? Number(object.nanos) : 0
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
function fromJsonTimestamp(o) {
|
|
58
|
-
if (o instanceof Date) {
|
|
59
|
-
return toTimestamp(o);
|
|
60
|
-
} else if (typeof o === "string") {
|
|
61
|
-
return toTimestamp(new Date(o));
|
|
62
|
-
} else {
|
|
63
|
-
return timestampFromJSON(o);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
function numberToLong(number) {
|
|
67
|
-
return Long.fromNumber(number);
|
|
68
|
-
}
|
|
69
|
-
function createBaseAny() {
|
|
70
|
-
return {
|
|
71
|
-
$typeUrl: "/google.protobuf.Any",
|
|
72
|
-
typeUrl: "",
|
|
73
|
-
value: new Uint8Array()
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
var Any = {
|
|
77
|
-
typeUrl: "/google.protobuf.Any",
|
|
78
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
79
|
-
if (message.typeUrl !== "") {
|
|
80
|
-
writer.uint32(10).string(message.typeUrl);
|
|
81
|
-
}
|
|
82
|
-
if (message.value.length !== 0) {
|
|
83
|
-
writer.uint32(18).bytes(message.value);
|
|
84
|
-
}
|
|
85
|
-
return writer;
|
|
86
|
-
},
|
|
87
|
-
decode(input, length) {
|
|
88
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
89
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
90
|
-
const message = createBaseAny();
|
|
91
|
-
while (reader.pos < end) {
|
|
92
|
-
const tag = reader.uint32();
|
|
93
|
-
switch (tag >>> 3) {
|
|
94
|
-
case 1:
|
|
95
|
-
message.typeUrl = reader.string();
|
|
96
|
-
break;
|
|
97
|
-
case 2:
|
|
98
|
-
message.value = reader.bytes();
|
|
99
|
-
break;
|
|
100
|
-
default:
|
|
101
|
-
reader.skipType(tag & 7);
|
|
102
|
-
break;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return message;
|
|
106
|
-
},
|
|
107
|
-
fromJSON(object) {
|
|
108
|
-
return {
|
|
109
|
-
typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "",
|
|
110
|
-
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array()
|
|
111
|
-
};
|
|
112
|
-
},
|
|
113
|
-
toJSON(message) {
|
|
114
|
-
const obj = {};
|
|
115
|
-
message.typeUrl !== void 0 && (obj.typeUrl = message.typeUrl);
|
|
116
|
-
message.value !== void 0 && (obj.value = base64FromBytes(message.value !== void 0 ? message.value : new Uint8Array()));
|
|
117
|
-
return obj;
|
|
118
|
-
},
|
|
119
|
-
fromPartial(object) {
|
|
120
|
-
const message = createBaseAny();
|
|
121
|
-
message.typeUrl = object.typeUrl ?? "";
|
|
122
|
-
message.value = object.value ?? new Uint8Array();
|
|
123
|
-
return message;
|
|
124
|
-
},
|
|
125
|
-
fromAmino(object) {
|
|
126
|
-
return {
|
|
127
|
-
typeUrl: object.type,
|
|
128
|
-
value: object.value
|
|
129
|
-
};
|
|
130
|
-
},
|
|
131
|
-
toAmino(message) {
|
|
132
|
-
const obj = {};
|
|
133
|
-
obj.type = message.typeUrl;
|
|
134
|
-
obj.value = message.value;
|
|
135
|
-
return obj;
|
|
136
|
-
},
|
|
137
|
-
fromAminoMsg(object) {
|
|
138
|
-
return Any.fromAmino(object.value);
|
|
139
|
-
},
|
|
140
|
-
fromProtoMsg(message) {
|
|
141
|
-
return Any.decode(message.value);
|
|
142
|
-
},
|
|
143
|
-
toProto(message) {
|
|
144
|
-
return Any.encode(message).finish();
|
|
145
|
-
},
|
|
146
|
-
toProtoMsg(message) {
|
|
147
|
-
return {
|
|
148
|
-
typeUrl: "/google.protobuf.Any",
|
|
149
|
-
value: Any.encode(message).finish()
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
function createBaseBaseAccount() {
|
|
154
|
-
return {
|
|
155
|
-
address: "",
|
|
156
|
-
pubKey: void 0,
|
|
157
|
-
accountNumber: Long.UZERO,
|
|
158
|
-
sequence: Long.UZERO
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
var BaseAccount = {
|
|
162
|
-
typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
|
|
163
|
-
encode(message, writer = _m0.Writer.create()) {
|
|
164
|
-
if (message.address !== "") {
|
|
165
|
-
writer.uint32(10).string(message.address);
|
|
166
|
-
}
|
|
167
|
-
if (message.pubKey !== void 0) {
|
|
168
|
-
Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim();
|
|
169
|
-
}
|
|
170
|
-
if (!message.accountNumber.isZero()) {
|
|
171
|
-
writer.uint32(24).uint64(message.accountNumber);
|
|
172
|
-
}
|
|
173
|
-
if (!message.sequence.isZero()) {
|
|
174
|
-
writer.uint32(32).uint64(message.sequence);
|
|
175
|
-
}
|
|
176
|
-
return writer;
|
|
177
|
-
},
|
|
178
|
-
decode(input, length) {
|
|
179
|
-
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
|
180
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
181
|
-
const message = createBaseBaseAccount();
|
|
182
|
-
while (reader.pos < end) {
|
|
183
|
-
const tag = reader.uint32();
|
|
184
|
-
switch (tag >>> 3) {
|
|
185
|
-
case 1:
|
|
186
|
-
message.address = reader.string();
|
|
187
|
-
break;
|
|
188
|
-
case 2:
|
|
189
|
-
message.pubKey = Any.decode(reader, reader.uint32());
|
|
190
|
-
break;
|
|
191
|
-
case 3:
|
|
192
|
-
message.accountNumber = reader.uint64();
|
|
193
|
-
break;
|
|
194
|
-
case 4:
|
|
195
|
-
message.sequence = reader.uint64();
|
|
196
|
-
break;
|
|
197
|
-
default:
|
|
198
|
-
reader.skipType(tag & 7);
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
return message;
|
|
203
|
-
},
|
|
204
|
-
fromJSON(object) {
|
|
205
|
-
return {
|
|
206
|
-
address: isSet(object.address) ? String(object.address) : "",
|
|
207
|
-
pubKey: isSet(object.pubKey) ? Any.fromJSON(object.pubKey) : void 0,
|
|
208
|
-
accountNumber: isSet(object.accountNumber) ? Long.fromValue(object.accountNumber) : Long.UZERO,
|
|
209
|
-
sequence: isSet(object.sequence) ? Long.fromValue(object.sequence) : Long.UZERO
|
|
210
|
-
};
|
|
211
|
-
},
|
|
212
|
-
toJSON(message) {
|
|
213
|
-
const obj = {};
|
|
214
|
-
message.address !== void 0 && (obj.address = message.address);
|
|
215
|
-
message.pubKey !== void 0 && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : void 0);
|
|
216
|
-
message.accountNumber !== void 0 && (obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
|
217
|
-
message.sequence !== void 0 && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
|
218
|
-
return obj;
|
|
219
|
-
},
|
|
220
|
-
fromPartial(object) {
|
|
221
|
-
const message = createBaseBaseAccount();
|
|
222
|
-
message.address = object.address ?? "";
|
|
223
|
-
message.pubKey = object.pubKey !== void 0 && object.pubKey !== null ? Any.fromPartial(object.pubKey) : void 0;
|
|
224
|
-
message.accountNumber = object.accountNumber !== void 0 && object.accountNumber !== null ? Long.fromValue(object.accountNumber) : Long.UZERO;
|
|
225
|
-
message.sequence = object.sequence !== void 0 && object.sequence !== null ? Long.fromValue(object.sequence) : Long.UZERO;
|
|
226
|
-
return message;
|
|
227
|
-
},
|
|
228
|
-
fromAmino(object) {
|
|
229
|
-
const message = createBaseBaseAccount();
|
|
230
|
-
if (object.address !== void 0 && object.address !== null) {
|
|
231
|
-
message.address = object.address;
|
|
232
|
-
}
|
|
233
|
-
if (object.pub_key !== void 0 && object.pub_key !== null) {
|
|
234
|
-
message.pubKey = Any.fromAmino(object.pub_key);
|
|
235
|
-
}
|
|
236
|
-
if (object.account_number !== void 0 && object.account_number !== null) {
|
|
237
|
-
message.accountNumber = Long.fromString(object.account_number);
|
|
238
|
-
}
|
|
239
|
-
if (object.sequence !== void 0 && object.sequence !== null) {
|
|
240
|
-
message.sequence = Long.fromString(object.sequence);
|
|
241
|
-
}
|
|
242
|
-
return message;
|
|
243
|
-
},
|
|
244
|
-
toAmino(message) {
|
|
245
|
-
const obj = {};
|
|
246
|
-
obj.address = message.address === "" ? void 0 : message.address;
|
|
247
|
-
obj.pub_key = message.pubKey ? Any.toAmino(message.pubKey) : void 0;
|
|
248
|
-
obj.account_number = !message.accountNumber.isZero() ? message.accountNumber?.toString() : void 0;
|
|
249
|
-
obj.sequence = !message.sequence.isZero() ? message.sequence?.toString() : void 0;
|
|
250
|
-
return obj;
|
|
251
|
-
},
|
|
252
|
-
fromAminoMsg(object) {
|
|
253
|
-
return BaseAccount.fromAmino(object.value);
|
|
254
|
-
},
|
|
255
|
-
toAminoMsg(message) {
|
|
256
|
-
return {
|
|
257
|
-
type: "cosmos-sdk/BaseAccount",
|
|
258
|
-
value: BaseAccount.toAmino(message)
|
|
259
|
-
};
|
|
260
|
-
},
|
|
261
|
-
fromProtoMsg(message) {
|
|
262
|
-
return BaseAccount.decode(message.value);
|
|
263
|
-
},
|
|
264
|
-
toProto(message) {
|
|
265
|
-
return BaseAccount.encode(message).finish();
|
|
266
|
-
},
|
|
267
|
-
toProtoMsg(message) {
|
|
268
|
-
return {
|
|
269
|
-
typeUrl: "/cosmos.auth.v1beta1.BaseAccount",
|
|
270
|
-
value: BaseAccount.encode(message).finish()
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
export { BaseAccount, base64FromBytes, bytesFromBase64, fromJsonTimestamp, fromTimestamp, isSet, toTimestamp };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { pollingApi } from './chunk-F66EKL3W.js';
|
|
2
|
-
|
|
3
|
-
// src/api/postTrackTransaction.ts
|
|
4
|
-
var trackTransaction = ({
|
|
5
|
-
maxRetries,
|
|
6
|
-
retryInterval,
|
|
7
|
-
backoffMultiplier = 2.5,
|
|
8
|
-
...trackTxRequest
|
|
9
|
-
}) => {
|
|
10
|
-
return pollingApi({
|
|
11
|
-
methodName: "track",
|
|
12
|
-
path: "v2/tx/track",
|
|
13
|
-
method: "post",
|
|
14
|
-
maxRetries,
|
|
15
|
-
retryInterval,
|
|
16
|
-
backoffMultiplier
|
|
17
|
-
})(trackTxRequest);
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export { trackTransaction };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { transformAssetsMap } from './chunk-J24LYWJE.js';
|
|
2
|
-
import { api } from './chunk-F66EKL3W.js';
|
|
3
|
-
|
|
4
|
-
// src/api/postAssetsFromSource.ts
|
|
5
|
-
var assetsFromSource = api({
|
|
6
|
-
methodName: "assetsFromSource",
|
|
7
|
-
method: "post",
|
|
8
|
-
path: "v2/fungible/assets_from_source",
|
|
9
|
-
transformResponse(response) {
|
|
10
|
-
return transformAssetsMap(response.destAssets);
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export { assetsFromSource };
|