@injectivelabs/sdk-ts 1.16.25-alpha.0 → 1.16.25-alpha.2
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/cjs/{DirectEthSecp256k1Wallet-BA7TBpKO.cjs → DirectEthSecp256k1Wallet-DejkKFN1.cjs} +1 -1
- package/dist/cjs/{PrivateKey-72Aogc8C.cjs → PrivateKey-s2WzWlG7.cjs} +15 -0
- package/dist/cjs/client/gql/index.cjs +1 -1
- package/dist/cjs/client/gql/index.d.cts +3 -3
- package/dist/cjs/cosmjs.cjs +2 -2
- package/dist/cjs/exports.cjs +2 -2
- package/dist/cjs/index.cjs +20 -7
- package/dist/cjs/index.d.cts +7561 -6503
- package/dist/esm/{DirectEthSecp256k1Wallet-DomuBAIj.js → DirectEthSecp256k1Wallet-E7liGwDR.js} +1 -1
- package/dist/esm/client/gql/index.d.ts +3 -3
- package/dist/esm/cosmjs.js +2 -2
- package/dist/esm/exports.js +2 -2
- package/dist/esm/index.d.ts +7561 -6503
- package/dist/esm/index.js +20 -8
- package/dist/esm/{tx-DAtz3JQs.js → tx-pQPAzEHk.js} +10 -1
- package/package.json +7 -7
package/dist/cjs/{DirectEthSecp256k1Wallet-BA7TBpKO.cjs → DirectEthSecp256k1Wallet-DejkKFN1.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_PrivateKey = require('./PrivateKey-
|
|
1
|
+
const require_PrivateKey = require('./PrivateKey-s2WzWlG7.cjs');
|
|
2
2
|
const require_defineProperty = require('./defineProperty-Dkg4B6va.cjs');
|
|
3
3
|
let __injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmos/base/v1beta1/coin_pb");
|
|
4
4
|
__injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb = require_PrivateKey.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmos_base_v1beta1_coin_pb);
|
|
@@ -136,6 +136,15 @@ function hexToBase64(hex) {
|
|
|
136
136
|
return uint8ArrayToBase64(hexToUint8Array(hex.startsWith("0x") ? hex.slice(2) : hex));
|
|
137
137
|
}
|
|
138
138
|
/**
|
|
139
|
+
* Convert a base64 string to UTF-8 string
|
|
140
|
+
* @param base64String - Base64 encoded string
|
|
141
|
+
* @returns Decoded UTF-8 string
|
|
142
|
+
* @throws Error if base64 string is invalid
|
|
143
|
+
*/
|
|
144
|
+
function base64ToUtf8(base64String) {
|
|
145
|
+
return toUtf8(base64ToUint8Array(base64String));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
139
148
|
* Convert a string or Uint8Array to Uint8Array using UTF-8 encoding
|
|
140
149
|
* If input is already Uint8Array, returns it as-is
|
|
141
150
|
* @param str - String or Uint8Array to encode
|
|
@@ -2298,6 +2307,12 @@ Object.defineProperty(exports, 'base64ToUint8Array', {
|
|
|
2298
2307
|
return base64ToUint8Array;
|
|
2299
2308
|
}
|
|
2300
2309
|
});
|
|
2310
|
+
Object.defineProperty(exports, 'base64ToUtf8', {
|
|
2311
|
+
enumerable: true,
|
|
2312
|
+
get: function () {
|
|
2313
|
+
return base64ToUtf8;
|
|
2314
|
+
}
|
|
2315
|
+
});
|
|
2301
2316
|
Object.defineProperty(exports, 'binaryToBase64', {
|
|
2302
2317
|
enumerable: true,
|
|
2303
2318
|
get: function () {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_PrivateKey = require('../../PrivateKey-
|
|
1
|
+
const require_PrivateKey = require('../../PrivateKey-s2WzWlG7.cjs');
|
|
2
2
|
const require_defineProperty = require('../../defineProperty-Dkg4B6va.cjs');
|
|
3
3
|
let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
4
4
|
let __apollo_client = require("@apollo/client");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as graphql0 from "graphql";
|
|
2
2
|
|
|
3
3
|
//#region src/client/gql/types.d.ts
|
|
4
4
|
/**
|
|
@@ -36,7 +36,7 @@ declare class ApolloConsumer {
|
|
|
36
36
|
/**
|
|
37
37
|
* @hidden
|
|
38
38
|
*/
|
|
39
|
-
declare const USER_DEPOSITS:
|
|
40
|
-
declare const USER_BRIDGE_DEPOSITS:
|
|
39
|
+
declare const USER_DEPOSITS: graphql0.DocumentNode;
|
|
40
|
+
declare const USER_BRIDGE_DEPOSITS: graphql0.DocumentNode;
|
|
41
41
|
//#endregion
|
|
42
42
|
export { ApolloConsumer, USER_BRIDGE_DEPOSITS, USER_DEPOSITS, UserDeposit, UserDepositResponse };
|
package/dist/cjs/cosmjs.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('./PrivateKey-
|
|
1
|
+
require('./PrivateKey-s2WzWlG7.cjs');
|
|
2
2
|
require('./defineProperty-Dkg4B6va.cjs');
|
|
3
|
-
const require_DirectEthSecp256k1Wallet = require('./DirectEthSecp256k1Wallet-
|
|
3
|
+
const require_DirectEthSecp256k1Wallet = require('./DirectEthSecp256k1Wallet-DejkKFN1.cjs');
|
|
4
4
|
|
|
5
5
|
exports.InjectiveDirectEthSecp256k1Wallet = require_DirectEthSecp256k1Wallet.DirectEthSecp256k1Wallet;
|
|
6
6
|
exports.InjectiveEthSecp256k1Wallet = require_DirectEthSecp256k1Wallet.EthSecp256k1Wallet;
|
package/dist/cjs/exports.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require('./PrivateKey-
|
|
1
|
+
require('./PrivateKey-s2WzWlG7.cjs');
|
|
2
2
|
require('./defineProperty-Dkg4B6va.cjs');
|
|
3
|
-
const require_DirectEthSecp256k1Wallet = require('./DirectEthSecp256k1Wallet-
|
|
3
|
+
const require_DirectEthSecp256k1Wallet = require('./DirectEthSecp256k1Wallet-DejkKFN1.cjs');
|
|
4
4
|
|
|
5
5
|
exports.InjectiveDirectEthSecp256k1Wallet = require_DirectEthSecp256k1Wallet.DirectEthSecp256k1Wallet;
|
|
6
6
|
exports.InjectiveEthSecp256k1Wallet = require_DirectEthSecp256k1Wallet.EthSecp256k1Wallet;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_PrivateKey = require('./PrivateKey-
|
|
1
|
+
const require_PrivateKey = require('./PrivateKey-s2WzWlG7.cjs');
|
|
2
2
|
const require_defineProperty = require('./defineProperty-Dkg4B6va.cjs');
|
|
3
3
|
let __injectivelabs_core_proto_ts_v2_generated_cosmos_tx_v1beta1_tx_pb = require("@injectivelabs/core-proto-ts-v2/generated/cosmos/tx/v1beta1/tx_pb");
|
|
4
4
|
__injectivelabs_core_proto_ts_v2_generated_cosmos_tx_v1beta1_tx_pb = require_PrivateKey.__toESM(__injectivelabs_core_proto_ts_v2_generated_cosmos_tx_v1beta1_tx_pb);
|
|
@@ -8053,6 +8053,7 @@ var IndexerGrpcAuctionTransformer = class IndexerGrpcAuctionTransformer {
|
|
|
8053
8053
|
contract: grpcAuction.contract ? {
|
|
8054
8054
|
id: grpcAuction.contract.id.toString(),
|
|
8055
8055
|
bidTarget: grpcAuction.contract.bidTarget,
|
|
8056
|
+
isBidPlaced: grpcAuction.contract.isBidPlaced,
|
|
8056
8057
|
currentSlots: grpcAuction.contract.currentSlots.toString(),
|
|
8057
8058
|
totalSlots: grpcAuction.contract.totalSlots.toString(),
|
|
8058
8059
|
maxUserAllocation: grpcAuction.contract.maxUserAllocation,
|
|
@@ -9129,6 +9130,7 @@ var IndexerGrpcMegaVaultTransformer = class IndexerGrpcMegaVaultTransformer {
|
|
|
9129
9130
|
static grpcUserStatsToUserStats(stats) {
|
|
9130
9131
|
return {
|
|
9131
9132
|
currentAmount: stats.currentAmount,
|
|
9133
|
+
depositedValue: stats.depositedValue,
|
|
9132
9134
|
currentLpAmount: stats.currentLpAmount,
|
|
9133
9135
|
pnl: stats.pnl ? IndexerGrpcMegaVaultTransformer.grpcPnlStatsToPnlStats(stats.pnl) : void 0
|
|
9134
9136
|
};
|
|
@@ -9147,7 +9149,8 @@ var IndexerGrpcMegaVaultTransformer = class IndexerGrpcMegaVaultTransformer {
|
|
|
9147
9149
|
executedAt: subscription.executedAt.toString(),
|
|
9148
9150
|
createdHeight: subscription.createdHeight.toString(),
|
|
9149
9151
|
executedHeight: subscription.executedHeight.toString(),
|
|
9150
|
-
contractAddress: subscription.contractAddress
|
|
9152
|
+
contractAddress: subscription.contractAddress,
|
|
9153
|
+
log: subscription.log.map(IndexerGrpcMegaVaultTransformer.grpcOperationStatusLogEntryToOperationStatusLogEntry)
|
|
9151
9154
|
};
|
|
9152
9155
|
}
|
|
9153
9156
|
static grpcRedemptionToRedemption(redemption) {
|
|
@@ -9162,7 +9165,8 @@ var IndexerGrpcMegaVaultTransformer = class IndexerGrpcMegaVaultTransformer {
|
|
|
9162
9165
|
executedAt: redemption.executedAt.toString(),
|
|
9163
9166
|
createdHeight: redemption.createdHeight.toString(),
|
|
9164
9167
|
executedHeight: redemption.executedHeight.toString(),
|
|
9165
|
-
contractAddress: redemption.contractAddress
|
|
9168
|
+
contractAddress: redemption.contractAddress,
|
|
9169
|
+
log: redemption.log.map(IndexerGrpcMegaVaultTransformer.grpcOperationStatusLogEntryToOperationStatusLogEntry)
|
|
9166
9170
|
};
|
|
9167
9171
|
}
|
|
9168
9172
|
static grpcOperatorRedemptionBucketToOperatorRedemptionBucket(bucket) {
|
|
@@ -9175,14 +9179,22 @@ var IndexerGrpcMegaVaultTransformer = class IndexerGrpcMegaVaultTransformer {
|
|
|
9175
9179
|
}
|
|
9176
9180
|
static grpcHistoricalTVLToHistoricalTVL(history) {
|
|
9177
9181
|
return {
|
|
9178
|
-
t: history.t,
|
|
9179
|
-
v: history.v
|
|
9182
|
+
t: history.t.toString(),
|
|
9183
|
+
v: history.v.toString()
|
|
9180
9184
|
};
|
|
9181
9185
|
}
|
|
9182
9186
|
static grpcHistoricalPnLToHistoricalPnL(history) {
|
|
9183
9187
|
return {
|
|
9184
|
-
t: history.t,
|
|
9185
|
-
v: history.v
|
|
9188
|
+
t: history.t.toString(),
|
|
9189
|
+
v: history.v.toString()
|
|
9190
|
+
};
|
|
9191
|
+
}
|
|
9192
|
+
static grpcOperationStatusLogEntryToOperationStatusLogEntry(log) {
|
|
9193
|
+
return {
|
|
9194
|
+
status: log.status,
|
|
9195
|
+
txHash: log.txHash,
|
|
9196
|
+
blockTime: log.blockTime.toString(),
|
|
9197
|
+
blockHeight: log.blockHeight.toString()
|
|
9186
9198
|
};
|
|
9187
9199
|
}
|
|
9188
9200
|
};
|
|
@@ -18665,6 +18677,7 @@ exports.accountEthParser = accountEthParser;
|
|
|
18665
18677
|
exports.addHexPrefix = require_PrivateKey.addHexPrefix;
|
|
18666
18678
|
exports.amountToCosmosSdkDecAmount = require_PrivateKey.amountToCosmosSdkDecAmount;
|
|
18667
18679
|
exports.base64ToUint8Array = require_PrivateKey.base64ToUint8Array;
|
|
18680
|
+
exports.base64ToUtf8 = require_PrivateKey.base64ToUtf8;
|
|
18668
18681
|
exports.binaryToBase64 = require_PrivateKey.binaryToBase64;
|
|
18669
18682
|
exports.concatUint8Arrays = require_PrivateKey.concatUint8Arrays;
|
|
18670
18683
|
exports.cosmosSdkDecToBigNumber = require_PrivateKey.cosmosSdkDecToBigNumber;
|