@chainflip/sdk 0.2.11 → 0.2.13
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 +2 -0
- package/dist/swap.d.ts +2 -0
- package/dist/swap.js +13 -12
- package/dist/swap.mjs +13 -12
- package/package.json +1 -1
package/dist/swap.d.mts
CHANGED
|
@@ -416,6 +416,7 @@ interface DepositAddressResponse extends DepositAddressRequest {
|
|
|
416
416
|
depositChannelId: string;
|
|
417
417
|
depositAddress: string;
|
|
418
418
|
sourceChainExpiryBlock: bigint;
|
|
419
|
+
depositChannelExpiryTime: number | undefined;
|
|
419
420
|
}
|
|
420
421
|
interface SwapStatusRequest {
|
|
421
422
|
id: string;
|
|
@@ -425,6 +426,7 @@ interface CommonStatusFields extends ChainsAndAssets {
|
|
|
425
426
|
depositAddress: string | undefined;
|
|
426
427
|
depositChannelCreatedAt: number | undefined;
|
|
427
428
|
expectedDepositAmount: string | undefined;
|
|
429
|
+
depositChannelExpiryTime: number | undefined;
|
|
428
430
|
}
|
|
429
431
|
type SwapStatusResponse = CommonStatusFields & ({
|
|
430
432
|
state: 'AWAITING_DEPOSIT';
|
package/dist/swap.d.ts
CHANGED
|
@@ -416,6 +416,7 @@ interface DepositAddressResponse extends DepositAddressRequest {
|
|
|
416
416
|
depositChannelId: string;
|
|
417
417
|
depositAddress: string;
|
|
418
418
|
sourceChainExpiryBlock: bigint;
|
|
419
|
+
depositChannelExpiryTime: number | undefined;
|
|
419
420
|
}
|
|
420
421
|
interface SwapStatusRequest {
|
|
421
422
|
id: string;
|
|
@@ -425,6 +426,7 @@ interface CommonStatusFields extends ChainsAndAssets {
|
|
|
425
426
|
depositAddress: string | undefined;
|
|
426
427
|
depositChannelCreatedAt: number | undefined;
|
|
427
428
|
expectedDepositAmount: string | undefined;
|
|
429
|
+
depositChannelExpiryTime: number | undefined;
|
|
428
430
|
}
|
|
429
431
|
type SwapStatusResponse = CommonStatusFields & ({
|
|
430
432
|
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.41.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.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.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.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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({
|
|
@@ -8370,7 +8370,8 @@ var _SwapSDK = class _SwapSDK {
|
|
|
8370
8370
|
...depositAddressRequest,
|
|
8371
8371
|
depositChannelId: response.id,
|
|
8372
8372
|
depositAddress: response.depositAddress,
|
|
8373
|
-
sourceChainExpiryBlock: response.sourceChainExpiryBlock
|
|
8373
|
+
sourceChainExpiryBlock: response.sourceChainExpiryBlock,
|
|
8374
|
+
depositChannelExpiryTime: response.depositChannelExpiryTime
|
|
8374
8375
|
};
|
|
8375
8376
|
}
|
|
8376
8377
|
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.41.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.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.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.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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.41.0_@trpc+server@10.41.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({
|
|
@@ -2519,7 +2519,8 @@ var _SwapSDK = class _SwapSDK {
|
|
|
2519
2519
|
...depositAddressRequest,
|
|
2520
2520
|
depositChannelId: response.id,
|
|
2521
2521
|
depositAddress: response.depositAddress,
|
|
2522
|
-
sourceChainExpiryBlock: response.sourceChainExpiryBlock
|
|
2522
|
+
sourceChainExpiryBlock: response.sourceChainExpiryBlock,
|
|
2523
|
+
depositChannelExpiryTime: response.depositChannelExpiryTime
|
|
2523
2524
|
};
|
|
2524
2525
|
}
|
|
2525
2526
|
getStatus(swapStatusRequest, options = {}) {
|