@chainflip/sdk 0.2.13 → 0.2.15
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/swap.d.mts +10 -3
- package/dist/swap.d.ts +10 -3
- package/dist/swap.js +37 -34
- package/dist/swap.mjs +37 -34
- package/package.json +2 -2
package/dist/swap.d.mts
CHANGED
|
@@ -415,8 +415,8 @@ interface DepositAddressRequest extends QuoteRequest {
|
|
|
415
415
|
interface DepositAddressResponse extends DepositAddressRequest {
|
|
416
416
|
depositChannelId: string;
|
|
417
417
|
depositAddress: string;
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
depositChannelExpiryBlock: bigint;
|
|
419
|
+
estimatedDepositChannelExpiryTime: number | undefined;
|
|
420
420
|
}
|
|
421
421
|
interface SwapStatusRequest {
|
|
422
422
|
id: string;
|
|
@@ -426,7 +426,14 @@ interface CommonStatusFields extends ChainsAndAssets {
|
|
|
426
426
|
depositAddress: string | undefined;
|
|
427
427
|
depositChannelCreatedAt: number | undefined;
|
|
428
428
|
expectedDepositAmount: string | undefined;
|
|
429
|
-
|
|
429
|
+
depositChannelExpiryBlock: bigint;
|
|
430
|
+
estimatedDepositChannelExpiryTime: number | undefined;
|
|
431
|
+
isDepositChanneExpired: boolean;
|
|
432
|
+
ccmDepositReceivedBlockIndex: string | undefined;
|
|
433
|
+
ccmMetadata: {
|
|
434
|
+
gasBudget: `0x${string}`;
|
|
435
|
+
message: string;
|
|
436
|
+
} | undefined;
|
|
430
437
|
}
|
|
431
438
|
type SwapStatusResponse = CommonStatusFields & ({
|
|
432
439
|
state: 'AWAITING_DEPOSIT';
|
package/dist/swap.d.ts
CHANGED
|
@@ -415,8 +415,8 @@ interface DepositAddressRequest extends QuoteRequest {
|
|
|
415
415
|
interface DepositAddressResponse extends DepositAddressRequest {
|
|
416
416
|
depositChannelId: string;
|
|
417
417
|
depositAddress: string;
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
depositChannelExpiryBlock: bigint;
|
|
419
|
+
estimatedDepositChannelExpiryTime: number | undefined;
|
|
420
420
|
}
|
|
421
421
|
interface SwapStatusRequest {
|
|
422
422
|
id: string;
|
|
@@ -426,7 +426,14 @@ interface CommonStatusFields extends ChainsAndAssets {
|
|
|
426
426
|
depositAddress: string | undefined;
|
|
427
427
|
depositChannelCreatedAt: number | undefined;
|
|
428
428
|
expectedDepositAmount: string | undefined;
|
|
429
|
-
|
|
429
|
+
depositChannelExpiryBlock: bigint;
|
|
430
|
+
estimatedDepositChannelExpiryTime: number | undefined;
|
|
431
|
+
isDepositChanneExpired: boolean;
|
|
432
|
+
ccmDepositReceivedBlockIndex: string | undefined;
|
|
433
|
+
ccmMetadata: {
|
|
434
|
+
gasBudget: `0x${string}`;
|
|
435
|
+
message: string;
|
|
436
|
+
} | undefined;
|
|
430
437
|
}
|
|
431
438
|
type SwapStatusResponse = CommonStatusFields & ({
|
|
432
439
|
state: 'AWAITING_DEPOSIT';
|
package/dist/swap.js
CHANGED
|
@@ -4450,7 +4450,7 @@ var init_broker = __esm({
|
|
|
4450
4450
|
}
|
|
4451
4451
|
});
|
|
4452
4452
|
|
|
4453
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
4453
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/observable-ade1bad8.mjs
|
|
4454
4454
|
function identity(x) {
|
|
4455
4455
|
return x;
|
|
4456
4456
|
}
|
|
@@ -4529,7 +4529,7 @@ function observable(subscribe) {
|
|
|
4529
4529
|
}
|
|
4530
4530
|
__name(observable, "observable");
|
|
4531
4531
|
|
|
4532
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
4532
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/observable/index.mjs
|
|
4533
4533
|
function share(_opts) {
|
|
4534
4534
|
return (originalObserver) => {
|
|
4535
4535
|
let refCount = 0;
|
|
@@ -4634,7 +4634,7 @@ function observableToPromise(observable2) {
|
|
|
4634
4634
|
}
|
|
4635
4635
|
__name(observableToPromise, "observableToPromise");
|
|
4636
4636
|
|
|
4637
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
4637
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs
|
|
4638
4638
|
function createChain(opts) {
|
|
4639
4639
|
return observable((observer) => {
|
|
4640
4640
|
function execute(index = 0, op = opts.op) {
|
|
@@ -4658,7 +4658,7 @@ function createChain(opts) {
|
|
|
4658
4658
|
}
|
|
4659
4659
|
__name(createChain, "createChain");
|
|
4660
4660
|
|
|
4661
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
4661
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/transformResult-ace864b8.mjs
|
|
4662
4662
|
function isObject(value) {
|
|
4663
4663
|
return !!value && !Array.isArray(value) && typeof value === "object";
|
|
4664
4664
|
}
|
|
@@ -4711,7 +4711,7 @@ function transformResult(response, runtime) {
|
|
|
4711
4711
|
}
|
|
4712
4712
|
__name(transformResult, "transformResult");
|
|
4713
4713
|
|
|
4714
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
4714
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/TRPCClientError-0de4d231.mjs
|
|
4715
4715
|
function isTRPCClientError(cause) {
|
|
4716
4716
|
return cause instanceof TRPCClientError || /**
|
|
4717
4717
|
* @deprecated
|
|
@@ -4769,7 +4769,7 @@ var _TRPCClientError = class _TRPCClientError extends Error {
|
|
|
4769
4769
|
__name(_TRPCClientError, "TRPCClientError");
|
|
4770
4770
|
var TRPCClientError = _TRPCClientError;
|
|
4771
4771
|
|
|
4772
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
4772
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/codes-c924c3db.mjs
|
|
4773
4773
|
function invert(obj) {
|
|
4774
4774
|
const newObj = /* @__PURE__ */ Object.create(null);
|
|
4775
4775
|
for (const key in obj) {
|
|
@@ -4807,7 +4807,7 @@ var TRPC_ERROR_CODES_BY_KEY = {
|
|
|
4807
4807
|
};
|
|
4808
4808
|
invert(TRPC_ERROR_CODES_BY_KEY);
|
|
4809
4809
|
|
|
4810
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
4810
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/index-f91d720c.mjs
|
|
4811
4811
|
invert(TRPC_ERROR_CODES_BY_KEY);
|
|
4812
4812
|
var noop = /* @__PURE__ */ __name(() => {
|
|
4813
4813
|
}, "noop");
|
|
@@ -4845,7 +4845,7 @@ var createFlatProxy = /* @__PURE__ */ __name((callback) => {
|
|
|
4845
4845
|
});
|
|
4846
4846
|
}, "createFlatProxy");
|
|
4847
4847
|
|
|
4848
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
4848
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/httpUtils-f58ceda1.mjs
|
|
4849
4849
|
var isFunction = /* @__PURE__ */ __name((fn) => typeof fn === "function", "isFunction");
|
|
4850
4850
|
function getFetch(customFetchImpl) {
|
|
4851
4851
|
if (customFetchImpl) {
|
|
@@ -4989,7 +4989,7 @@ function httpRequest(opts) {
|
|
|
4989
4989
|
}
|
|
4990
4990
|
__name(httpRequest, "httpRequest");
|
|
4991
4991
|
|
|
4992
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
4992
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/httpBatchLink-204206a5.mjs
|
|
4993
4993
|
var throwFatalError = /* @__PURE__ */ __name(() => {
|
|
4994
4994
|
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
4995
4995
|
}, "throwFatalError");
|
|
@@ -5219,7 +5219,7 @@ var batchRequester = /* @__PURE__ */ __name((requesterOpts) => {
|
|
|
5219
5219
|
}, "batchRequester");
|
|
5220
5220
|
var httpBatchLink = createHTTPBatchLink(batchRequester);
|
|
5221
5221
|
|
|
5222
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
5222
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/links/httpLink.mjs
|
|
5223
5223
|
function httpLinkFactory(factoryOpts) {
|
|
5224
5224
|
return (opts) => {
|
|
5225
5225
|
const resolvedOpts = resolveHTTPLinkOptions(opts);
|
|
@@ -5271,7 +5271,7 @@ function httpLinkFactory(factoryOpts) {
|
|
|
5271
5271
|
}
|
|
5272
5272
|
__name(httpLinkFactory, "httpLinkFactory");
|
|
5273
5273
|
|
|
5274
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
5274
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/index.mjs
|
|
5275
5275
|
var _TRPCUntypedClient = class _TRPCUntypedClient {
|
|
5276
5276
|
$request({ type, input, path, context = {} }) {
|
|
5277
5277
|
const chain$ = createChain({
|
|
@@ -5481,7 +5481,7 @@ async function readStandardChunks(stream, onChunk) {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
__name(readStandardChunks, "readStandardChunks");
|
|
5483
5483
|
|
|
5484
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5484
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/double-indexed-kv.js
|
|
5485
5485
|
var DoubleIndexedKV = (
|
|
5486
5486
|
/** @class */
|
|
5487
5487
|
function() {
|
|
@@ -5508,7 +5508,7 @@ var DoubleIndexedKV = (
|
|
|
5508
5508
|
}()
|
|
5509
5509
|
);
|
|
5510
5510
|
|
|
5511
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5511
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/registry.js
|
|
5512
5512
|
var Registry = (
|
|
5513
5513
|
/** @class */
|
|
5514
5514
|
function() {
|
|
@@ -5539,7 +5539,7 @@ var Registry = (
|
|
|
5539
5539
|
}()
|
|
5540
5540
|
);
|
|
5541
5541
|
|
|
5542
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5542
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/class-registry.js
|
|
5543
5543
|
var __extends = function() {
|
|
5544
5544
|
var extendStatics = /* @__PURE__ */ __name(function(d, b) {
|
|
5545
5545
|
extendStatics = Object.setPrototypeOf || {
|
|
@@ -5593,7 +5593,7 @@ var ClassRegistry = (
|
|
|
5593
5593
|
}(Registry)
|
|
5594
5594
|
);
|
|
5595
5595
|
|
|
5596
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5596
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/util.js
|
|
5597
5597
|
var __read = function(o, n) {
|
|
5598
5598
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5599
5599
|
if (!m)
|
|
@@ -5667,7 +5667,7 @@ function findArr(record, predicate) {
|
|
|
5667
5667
|
}
|
|
5668
5668
|
__name(findArr, "findArr");
|
|
5669
5669
|
|
|
5670
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5670
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/custom-transformer-registry.js
|
|
5671
5671
|
var CustomTransformerRegistry = (
|
|
5672
5672
|
/** @class */
|
|
5673
5673
|
function() {
|
|
@@ -5690,7 +5690,7 @@ var CustomTransformerRegistry = (
|
|
|
5690
5690
|
}()
|
|
5691
5691
|
);
|
|
5692
5692
|
|
|
5693
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5693
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/is.js
|
|
5694
5694
|
var getType = /* @__PURE__ */ __name(function(payload) {
|
|
5695
5695
|
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
5696
5696
|
}, "getType");
|
|
@@ -5761,7 +5761,7 @@ var isURL = /* @__PURE__ */ __name(function(payload) {
|
|
|
5761
5761
|
return payload instanceof URL;
|
|
5762
5762
|
}, "isURL");
|
|
5763
5763
|
|
|
5764
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5764
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/pathstringifier.js
|
|
5765
5765
|
var escapeKey = /* @__PURE__ */ __name(function(key) {
|
|
5766
5766
|
return key.replace(/\./g, "\\.");
|
|
5767
5767
|
}, "escapeKey");
|
|
@@ -5792,7 +5792,7 @@ var parsePath = /* @__PURE__ */ __name(function(string2) {
|
|
|
5792
5792
|
return result;
|
|
5793
5793
|
}, "parsePath");
|
|
5794
5794
|
|
|
5795
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
5795
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/transformer.js
|
|
5796
5796
|
var __assign = function() {
|
|
5797
5797
|
__assign = Object.assign || function(t) {
|
|
5798
5798
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -6088,7 +6088,7 @@ var untransformValue = /* @__PURE__ */ __name(function(json, type, superJson) {
|
|
|
6088
6088
|
}
|
|
6089
6089
|
}, "untransformValue");
|
|
6090
6090
|
|
|
6091
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
6091
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/accessDeep.js
|
|
6092
6092
|
var getNthKey = /* @__PURE__ */ __name(function(value, n) {
|
|
6093
6093
|
var keys = value.keys();
|
|
6094
6094
|
while (n > 0) {
|
|
@@ -6203,7 +6203,7 @@ var setDeep = /* @__PURE__ */ __name(function(object, path, mapper) {
|
|
|
6203
6203
|
return object;
|
|
6204
6204
|
}, "setDeep");
|
|
6205
6205
|
|
|
6206
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
6206
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/plainer.js
|
|
6207
6207
|
var __read3 = function(o, n) {
|
|
6208
6208
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
6209
6209
|
if (!m)
|
|
@@ -6303,22 +6303,25 @@ function addIdentity(object, path, identities) {
|
|
|
6303
6303
|
}
|
|
6304
6304
|
}
|
|
6305
6305
|
__name(addIdentity, "addIdentity");
|
|
6306
|
-
function generateReferentialEqualityAnnotations(identitites) {
|
|
6306
|
+
function generateReferentialEqualityAnnotations(identitites, dedupe) {
|
|
6307
6307
|
var result = {};
|
|
6308
6308
|
var rootEqualityPaths = void 0;
|
|
6309
6309
|
identitites.forEach(function(paths) {
|
|
6310
6310
|
if (paths.length <= 1) {
|
|
6311
6311
|
return;
|
|
6312
6312
|
}
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6313
|
+
if (!dedupe) {
|
|
6314
|
+
paths = paths.map(function(path) {
|
|
6315
|
+
return path.map(String);
|
|
6316
|
+
}).sort(function(a, b) {
|
|
6317
|
+
return a.length - b.length;
|
|
6318
|
+
});
|
|
6319
|
+
}
|
|
6320
|
+
var _a = __read3(paths), representativePath = _a[0], identicalPaths = _a.slice(1);
|
|
6321
|
+
if (representativePath.length === 0) {
|
|
6319
6322
|
rootEqualityPaths = identicalPaths.map(stringifyPath);
|
|
6320
6323
|
} else {
|
|
6321
|
-
result[stringifyPath(
|
|
6324
|
+
result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
|
|
6322
6325
|
}
|
|
6323
6326
|
});
|
|
6324
6327
|
if (rootEqualityPaths) {
|
|
@@ -6483,7 +6486,7 @@ function copy(target, options = {}) {
|
|
|
6483
6486
|
}
|
|
6484
6487
|
__name(copy, "copy");
|
|
6485
6488
|
|
|
6486
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
6489
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/index.js
|
|
6487
6490
|
var __assign2 = function() {
|
|
6488
6491
|
__assign2 = Object.assign || function(t) {
|
|
6489
6492
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -6550,7 +6553,7 @@ var SuperJSON = (
|
|
|
6550
6553
|
values: output.annotations
|
|
6551
6554
|
});
|
|
6552
6555
|
}
|
|
6553
|
-
var equalityAnnotations = generateReferentialEqualityAnnotations(identities);
|
|
6556
|
+
var equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
|
|
6554
6557
|
if (equalityAnnotations) {
|
|
6555
6558
|
res.meta = __assign2(__assign2({}, res.meta), {
|
|
6556
6559
|
referentialEqualities: equalityAnnotations
|
|
@@ -8361,7 +8364,7 @@ var _SwapSDK = class _SwapSDK {
|
|
|
8361
8364
|
response = {
|
|
8362
8365
|
id: `${result.issuedBlock}-${depositAddressRequest.srcChain}-${result.channelId}`,
|
|
8363
8366
|
depositAddress: result.address,
|
|
8364
|
-
|
|
8367
|
+
srcChainExpiryBlock: result.sourceChainExpiryBlock
|
|
8365
8368
|
};
|
|
8366
8369
|
} else {
|
|
8367
8370
|
response = await this.trpc.openSwapDepositChannel.mutate(depositAddressRequest);
|
|
@@ -8370,8 +8373,8 @@ var _SwapSDK = class _SwapSDK {
|
|
|
8370
8373
|
...depositAddressRequest,
|
|
8371
8374
|
depositChannelId: response.id,
|
|
8372
8375
|
depositAddress: response.depositAddress,
|
|
8373
|
-
|
|
8374
|
-
|
|
8376
|
+
depositChannelExpiryBlock: response.srcChainExpiryBlock,
|
|
8377
|
+
estimatedDepositChannelExpiryTime: response.estimatedExpiryTime
|
|
8375
8378
|
};
|
|
8376
8379
|
}
|
|
8377
8380
|
getStatus(swapStatusRequest, options = {}) {
|
package/dist/swap.mjs
CHANGED
|
@@ -5,7 +5,7 @@ export { Assets, ChainflipNetworks, Chains, assetChains, assetContractIds, asset
|
|
|
5
5
|
import { decodeAddress } from '@polkadot/util-crypto';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
|
|
8
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
8
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/observable-ade1bad8.mjs
|
|
9
9
|
function identity(x) {
|
|
10
10
|
return x;
|
|
11
11
|
}
|
|
@@ -84,7 +84,7 @@ function observable(subscribe) {
|
|
|
84
84
|
}
|
|
85
85
|
__name(observable, "observable");
|
|
86
86
|
|
|
87
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
87
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/observable/index.mjs
|
|
88
88
|
function share(_opts) {
|
|
89
89
|
return (originalObserver) => {
|
|
90
90
|
let refCount = 0;
|
|
@@ -189,7 +189,7 @@ function observableToPromise(observable2) {
|
|
|
189
189
|
}
|
|
190
190
|
__name(observableToPromise, "observableToPromise");
|
|
191
191
|
|
|
192
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
192
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs
|
|
193
193
|
function createChain(opts) {
|
|
194
194
|
return observable((observer) => {
|
|
195
195
|
function execute(index = 0, op = opts.op) {
|
|
@@ -213,7 +213,7 @@ function createChain(opts) {
|
|
|
213
213
|
}
|
|
214
214
|
__name(createChain, "createChain");
|
|
215
215
|
|
|
216
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
216
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/transformResult-ace864b8.mjs
|
|
217
217
|
function isObject(value) {
|
|
218
218
|
return !!value && !Array.isArray(value) && typeof value === "object";
|
|
219
219
|
}
|
|
@@ -266,7 +266,7 @@ function transformResult(response, runtime) {
|
|
|
266
266
|
}
|
|
267
267
|
__name(transformResult, "transformResult");
|
|
268
268
|
|
|
269
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
269
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/TRPCClientError-0de4d231.mjs
|
|
270
270
|
function isTRPCClientError(cause) {
|
|
271
271
|
return cause instanceof TRPCClientError || /**
|
|
272
272
|
* @deprecated
|
|
@@ -324,7 +324,7 @@ var _TRPCClientError = class _TRPCClientError extends Error {
|
|
|
324
324
|
__name(_TRPCClientError, "TRPCClientError");
|
|
325
325
|
var TRPCClientError = _TRPCClientError;
|
|
326
326
|
|
|
327
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
327
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/codes-c924c3db.mjs
|
|
328
328
|
function invert(obj) {
|
|
329
329
|
const newObj = /* @__PURE__ */ Object.create(null);
|
|
330
330
|
for (const key in obj) {
|
|
@@ -362,7 +362,7 @@ var TRPC_ERROR_CODES_BY_KEY = {
|
|
|
362
362
|
};
|
|
363
363
|
invert(TRPC_ERROR_CODES_BY_KEY);
|
|
364
364
|
|
|
365
|
-
// ../../node_modules/.pnpm/@trpc+server@10.
|
|
365
|
+
// ../../node_modules/.pnpm/@trpc+server@10.43.0/node_modules/@trpc/server/dist/index-f91d720c.mjs
|
|
366
366
|
invert(TRPC_ERROR_CODES_BY_KEY);
|
|
367
367
|
var noop = /* @__PURE__ */ __name(() => {
|
|
368
368
|
}, "noop");
|
|
@@ -400,7 +400,7 @@ var createFlatProxy = /* @__PURE__ */ __name((callback) => {
|
|
|
400
400
|
});
|
|
401
401
|
}, "createFlatProxy");
|
|
402
402
|
|
|
403
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
403
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/httpUtils-f58ceda1.mjs
|
|
404
404
|
var isFunction = /* @__PURE__ */ __name((fn) => typeof fn === "function", "isFunction");
|
|
405
405
|
function getFetch(customFetchImpl) {
|
|
406
406
|
if (customFetchImpl) {
|
|
@@ -544,7 +544,7 @@ function httpRequest(opts) {
|
|
|
544
544
|
}
|
|
545
545
|
__name(httpRequest, "httpRequest");
|
|
546
546
|
|
|
547
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
547
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/httpBatchLink-204206a5.mjs
|
|
548
548
|
var throwFatalError = /* @__PURE__ */ __name(() => {
|
|
549
549
|
throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new");
|
|
550
550
|
}, "throwFatalError");
|
|
@@ -774,7 +774,7 @@ var batchRequester = /* @__PURE__ */ __name((requesterOpts) => {
|
|
|
774
774
|
}, "batchRequester");
|
|
775
775
|
var httpBatchLink = createHTTPBatchLink(batchRequester);
|
|
776
776
|
|
|
777
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
777
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/links/httpLink.mjs
|
|
778
778
|
function httpLinkFactory(factoryOpts) {
|
|
779
779
|
return (opts) => {
|
|
780
780
|
const resolvedOpts = resolveHTTPLinkOptions(opts);
|
|
@@ -826,7 +826,7 @@ function httpLinkFactory(factoryOpts) {
|
|
|
826
826
|
}
|
|
827
827
|
__name(httpLinkFactory, "httpLinkFactory");
|
|
828
828
|
|
|
829
|
-
// ../../node_modules/.pnpm/@trpc+client@10.
|
|
829
|
+
// ../../node_modules/.pnpm/@trpc+client@10.43.0_@trpc+server@10.43.0/node_modules/@trpc/client/dist/index.mjs
|
|
830
830
|
var _TRPCUntypedClient = class _TRPCUntypedClient {
|
|
831
831
|
$request({ type, input, path, context = {} }) {
|
|
832
832
|
const chain$ = createChain({
|
|
@@ -1036,7 +1036,7 @@ async function readStandardChunks(stream, onChunk) {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
__name(readStandardChunks, "readStandardChunks");
|
|
1038
1038
|
|
|
1039
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1039
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/double-indexed-kv.js
|
|
1040
1040
|
var DoubleIndexedKV = (
|
|
1041
1041
|
/** @class */
|
|
1042
1042
|
function() {
|
|
@@ -1063,7 +1063,7 @@ var DoubleIndexedKV = (
|
|
|
1063
1063
|
}()
|
|
1064
1064
|
);
|
|
1065
1065
|
|
|
1066
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1066
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/registry.js
|
|
1067
1067
|
var Registry = (
|
|
1068
1068
|
/** @class */
|
|
1069
1069
|
function() {
|
|
@@ -1094,7 +1094,7 @@ var Registry = (
|
|
|
1094
1094
|
}()
|
|
1095
1095
|
);
|
|
1096
1096
|
|
|
1097
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1097
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/class-registry.js
|
|
1098
1098
|
var __extends = function() {
|
|
1099
1099
|
var extendStatics = /* @__PURE__ */ __name(function(d, b) {
|
|
1100
1100
|
extendStatics = Object.setPrototypeOf || {
|
|
@@ -1148,7 +1148,7 @@ var ClassRegistry = (
|
|
|
1148
1148
|
}(Registry)
|
|
1149
1149
|
);
|
|
1150
1150
|
|
|
1151
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1151
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/util.js
|
|
1152
1152
|
var __read = function(o, n) {
|
|
1153
1153
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1154
1154
|
if (!m)
|
|
@@ -1222,7 +1222,7 @@ function findArr(record, predicate) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
__name(findArr, "findArr");
|
|
1224
1224
|
|
|
1225
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1225
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/custom-transformer-registry.js
|
|
1226
1226
|
var CustomTransformerRegistry = (
|
|
1227
1227
|
/** @class */
|
|
1228
1228
|
function() {
|
|
@@ -1245,7 +1245,7 @@ var CustomTransformerRegistry = (
|
|
|
1245
1245
|
}()
|
|
1246
1246
|
);
|
|
1247
1247
|
|
|
1248
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1248
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/is.js
|
|
1249
1249
|
var getType = /* @__PURE__ */ __name(function(payload) {
|
|
1250
1250
|
return Object.prototype.toString.call(payload).slice(8, -1);
|
|
1251
1251
|
}, "getType");
|
|
@@ -1316,7 +1316,7 @@ var isURL = /* @__PURE__ */ __name(function(payload) {
|
|
|
1316
1316
|
return payload instanceof URL;
|
|
1317
1317
|
}, "isURL");
|
|
1318
1318
|
|
|
1319
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1319
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/pathstringifier.js
|
|
1320
1320
|
var escapeKey = /* @__PURE__ */ __name(function(key) {
|
|
1321
1321
|
return key.replace(/\./g, "\\.");
|
|
1322
1322
|
}, "escapeKey");
|
|
@@ -1347,7 +1347,7 @@ var parsePath = /* @__PURE__ */ __name(function(string) {
|
|
|
1347
1347
|
return result;
|
|
1348
1348
|
}, "parsePath");
|
|
1349
1349
|
|
|
1350
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1350
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/transformer.js
|
|
1351
1351
|
var __assign = function() {
|
|
1352
1352
|
__assign = Object.assign || function(t) {
|
|
1353
1353
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -1643,7 +1643,7 @@ var untransformValue = /* @__PURE__ */ __name(function(json, type, superJson) {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
}, "untransformValue");
|
|
1645
1645
|
|
|
1646
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1646
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/accessDeep.js
|
|
1647
1647
|
var getNthKey = /* @__PURE__ */ __name(function(value, n) {
|
|
1648
1648
|
var keys = value.keys();
|
|
1649
1649
|
while (n > 0) {
|
|
@@ -1758,7 +1758,7 @@ var setDeep = /* @__PURE__ */ __name(function(object, path, mapper) {
|
|
|
1758
1758
|
return object;
|
|
1759
1759
|
}, "setDeep");
|
|
1760
1760
|
|
|
1761
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
1761
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/plainer.js
|
|
1762
1762
|
var __read3 = function(o, n) {
|
|
1763
1763
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1764
1764
|
if (!m)
|
|
@@ -1858,22 +1858,25 @@ function addIdentity(object, path, identities) {
|
|
|
1858
1858
|
}
|
|
1859
1859
|
}
|
|
1860
1860
|
__name(addIdentity, "addIdentity");
|
|
1861
|
-
function generateReferentialEqualityAnnotations(identitites) {
|
|
1861
|
+
function generateReferentialEqualityAnnotations(identitites, dedupe) {
|
|
1862
1862
|
var result = {};
|
|
1863
1863
|
var rootEqualityPaths = void 0;
|
|
1864
1864
|
identitites.forEach(function(paths) {
|
|
1865
1865
|
if (paths.length <= 1) {
|
|
1866
1866
|
return;
|
|
1867
1867
|
}
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1868
|
+
if (!dedupe) {
|
|
1869
|
+
paths = paths.map(function(path) {
|
|
1870
|
+
return path.map(String);
|
|
1871
|
+
}).sort(function(a, b) {
|
|
1872
|
+
return a.length - b.length;
|
|
1873
|
+
});
|
|
1874
|
+
}
|
|
1875
|
+
var _a = __read3(paths), representativePath = _a[0], identicalPaths = _a.slice(1);
|
|
1876
|
+
if (representativePath.length === 0) {
|
|
1874
1877
|
rootEqualityPaths = identicalPaths.map(stringifyPath);
|
|
1875
1878
|
} else {
|
|
1876
|
-
result[stringifyPath(
|
|
1879
|
+
result[stringifyPath(representativePath)] = identicalPaths.map(stringifyPath);
|
|
1877
1880
|
}
|
|
1878
1881
|
});
|
|
1879
1882
|
if (rootEqualityPaths) {
|
|
@@ -2038,7 +2041,7 @@ function copy(target, options = {}) {
|
|
|
2038
2041
|
}
|
|
2039
2042
|
__name(copy, "copy");
|
|
2040
2043
|
|
|
2041
|
-
// ../../node_modules/.pnpm/superjson@1.13.
|
|
2044
|
+
// ../../node_modules/.pnpm/superjson@1.13.3/node_modules/superjson/dist/esm/index.js
|
|
2042
2045
|
var __assign2 = function() {
|
|
2043
2046
|
__assign2 = Object.assign || function(t) {
|
|
2044
2047
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -2105,7 +2108,7 @@ var SuperJSON = (
|
|
|
2105
2108
|
values: output.annotations
|
|
2106
2109
|
});
|
|
2107
2110
|
}
|
|
2108
|
-
var equalityAnnotations = generateReferentialEqualityAnnotations(identities);
|
|
2111
|
+
var equalityAnnotations = generateReferentialEqualityAnnotations(identities, this.dedupe);
|
|
2109
2112
|
if (equalityAnnotations) {
|
|
2110
2113
|
res.meta = __assign2(__assign2({}, res.meta), {
|
|
2111
2114
|
referentialEqualities: equalityAnnotations
|
|
@@ -2510,7 +2513,7 @@ var _SwapSDK = class _SwapSDK {
|
|
|
2510
2513
|
response = {
|
|
2511
2514
|
id: `${result.issuedBlock}-${depositAddressRequest.srcChain}-${result.channelId}`,
|
|
2512
2515
|
depositAddress: result.address,
|
|
2513
|
-
|
|
2516
|
+
srcChainExpiryBlock: result.sourceChainExpiryBlock
|
|
2514
2517
|
};
|
|
2515
2518
|
} else {
|
|
2516
2519
|
response = await this.trpc.openSwapDepositChannel.mutate(depositAddressRequest);
|
|
@@ -2519,8 +2522,8 @@ var _SwapSDK = class _SwapSDK {
|
|
|
2519
2522
|
...depositAddressRequest,
|
|
2520
2523
|
depositChannelId: response.id,
|
|
2521
2524
|
depositAddress: response.depositAddress,
|
|
2522
|
-
|
|
2523
|
-
|
|
2525
|
+
depositChannelExpiryBlock: response.srcChainExpiryBlock,
|
|
2526
|
+
estimatedDepositChannelExpiryTime: response.estimatedExpiryTime
|
|
2524
2527
|
};
|
|
2525
2528
|
}
|
|
2526
2529
|
getStatus(swapStatusRequest, options = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainflip/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./swap": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@polkadot/util": "^12.5.1",
|
|
45
45
|
"@polkadot/util-crypto": "^12.5.1",
|
|
46
|
-
"axios": "^1.
|
|
46
|
+
"axios": "^1.6.0",
|
|
47
47
|
"ethers": "6.8.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|