@swapkit/plugins 4.0.0 → 4.0.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/chainflip/index.cjs +2 -2
- package/dist/chainflip/index.cjs.map +4 -4
- package/dist/chainflip/index.js +2 -2
- package/dist/chainflip/index.js.map +4 -4
- package/dist/chunk-m8bk80cn.js +5 -0
- package/dist/chunk-m8bk80cn.js.map +10 -0
- package/dist/chunk-r37r7yrc.js +4 -0
- package/dist/chunk-r37r7yrc.js.map +10 -0
- package/dist/evm/index.cjs +2 -2
- package/dist/evm/index.cjs.map +3 -3
- package/dist/evm/index.js +2 -2
- package/dist/evm/index.js.map +3 -3
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +4 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -3
- package/dist/near/index.cjs +2 -2
- package/dist/near/index.cjs.map +3 -3
- package/dist/near/index.js +2 -2
- package/dist/near/index.js.map +3 -3
- package/dist/radix/index.cjs +2 -2
- package/dist/radix/index.cjs.map +3 -3
- package/dist/radix/index.js +2 -2
- package/dist/radix/index.js.map +3 -3
- package/dist/solana/index.cjs +2 -2
- package/dist/solana/index.cjs.map +3 -3
- package/dist/solana/index.js +2 -2
- package/dist/solana/index.js.map +3 -3
- package/dist/thorchain/index.cjs +2 -2
- package/dist/thorchain/index.cjs.map +4 -4
- package/dist/thorchain/index.js +2 -2
- package/dist/thorchain/index.js.map +4 -4
- package/dist/types/chainflip/broker.d.ts +1 -1
- package/dist/types/chainflip/broker.d.ts.map +1 -1
- package/dist/types/chainflip/plugin.d.ts.map +1 -1
- package/dist/types/chainflip/types.d.ts.map +1 -1
- package/dist/types/evm/index.d.ts +3 -3
- package/dist/types/evm/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/near/plugin.d.ts +4 -4
- package/dist/types/near/plugin.d.ts.map +1 -1
- package/dist/types/near/types.d.ts.map +1 -1
- package/dist/types/radix/index.d.ts +1 -1
- package/dist/types/radix/index.d.ts.map +1 -1
- package/dist/types/solana/plugin.d.ts.map +1 -1
- package/dist/types/thorchain/index.d.ts +1 -1
- package/dist/types/thorchain/plugin.d.ts +16 -16
- package/dist/types/thorchain/plugin.d.ts.map +1 -1
- package/dist/types/thorchain/shared.d.ts +2 -2
- package/dist/types/thorchain/types.d.ts.map +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +1 -2
- package/dist/types/utils.d.ts.map +1 -1
- package/package.json +11 -19
- package/dist/chunk-4th4g1de.js +0 -4
- package/dist/chunk-4th4g1de.js.map +0 -10
- package/dist/chunk-f4bjj4r6.js +0 -5
- package/dist/chunk-f4bjj4r6.js.map +0 -10
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ProviderName, type SwapParams } from "@swapkit/helpers";
|
|
2
|
-
import {
|
|
2
|
+
import type { QuoteResponseRoute } from "@swapkit/helpers/api";
|
|
3
3
|
import type { NearAccountInfo, NearNameRegistrationParams } from "./types";
|
|
4
4
|
export declare const NearPlugin: {
|
|
5
5
|
near: (pluginParams: import("..").SwapKitPluginParams) => {
|
|
6
6
|
supportedSwapkitProviders: ProviderName[];
|
|
7
7
|
} & {
|
|
8
|
-
swap(swapParams: SwapParams<"near", QuoteResponseRoute>): Promise<string>;
|
|
9
8
|
nearNames: {
|
|
10
|
-
resolve(name: string): Promise<string | null>;
|
|
11
|
-
isAvailable(name: string): Promise<boolean>;
|
|
12
9
|
getInfo(name: string): Promise<NearAccountInfo | null>;
|
|
10
|
+
isAvailable(name: string): Promise<boolean>;
|
|
13
11
|
lookupNames(accountId: string): Promise<string[]>;
|
|
14
12
|
register(params: NearNameRegistrationParams): Promise<string>;
|
|
13
|
+
resolve(name: string): Promise<string | null>;
|
|
15
14
|
transfer(name: string, newOwner: string): Promise<string>;
|
|
16
15
|
};
|
|
16
|
+
swap(swapParams: SwapParams<"near", QuoteResponseRoute>): Promise<string>;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/near/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/near/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,YAAY,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACpH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI/D,OAAO,KAAK,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAE3E,eAAO,MAAM,UAAU;;;;;0BAGG,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;8BA4CpC,MAAM;mCAKD,MAAM;6BA0BZ,0BAA0B;0BAqB7B,MAAM;2BA6BX,MAAM,YAAY,MAAM;;yBAiBlB,UAAU,CAAC,MAAM,EAAE,kBAAkB,CAAC;;CAuC/D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/near/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/near/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -4,7 +4,7 @@ export declare const RadixPlugin: {
|
|
|
4
4
|
radix: (pluginParams: import("..").SwapKitPluginParams) => {
|
|
5
5
|
supportedSwapkitProviders: ProviderName[];
|
|
6
6
|
} & {
|
|
7
|
-
swap: ({ route: { tx, sellAmount, sellAsset }
|
|
7
|
+
swap: ({ route: { tx, sellAmount, sellAsset } }: SwapParams<"radix", QuoteResponseRoute>) => Promise<string>;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,eAAO,MAAM,WAAW;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radix/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,eAAO,MAAM,WAAW;;;;yDAEqD,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC;;CAiBlH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/solana/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,eAAO,MAAM,YAAY;;;;
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/solana/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,YAAY,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAClG,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG/D,eAAO,MAAM,YAAY;;;;0BAEsB,UAAU,CAAC,QAAQ,EAAE,kBAAkB,CAAC;;CAmBrF,CAAC"}
|
|
@@ -7,16 +7,20 @@ export declare const ThorchainPlugin: {
|
|
|
7
7
|
supportedSwapkitProviders: ProviderName[];
|
|
8
8
|
} & {
|
|
9
9
|
addLiquidity: ({ baseAssetValue, assetValue, baseAssetAddr, assetAddr, isPendingSymmAsset, mode, }: AddLiquidityParams) => Promise<{
|
|
10
|
-
baseAssetTx: string | undefined;
|
|
11
10
|
assetTx: string | undefined;
|
|
11
|
+
baseAssetTx: string | undefined;
|
|
12
12
|
}>;
|
|
13
|
-
addLiquidityPart: ({ assetValue, poolAddress, address, symmetric
|
|
13
|
+
addLiquidityPart: ({ assetValue, poolAddress, address, symmetric }: AddLiquidityPartParams) => Promise<string>;
|
|
14
14
|
approveAssetValue: ({ assetValue }: {
|
|
15
15
|
assetValue: AssetValue;
|
|
16
16
|
}) => Promise<string | boolean | Promise<string>>;
|
|
17
|
+
claimTcy: ({ chain, thorAddress }: {
|
|
18
|
+
chain: Chain;
|
|
19
|
+
thorAddress: string;
|
|
20
|
+
}) => Promise<string>;
|
|
17
21
|
createLiquidity: ({ baseAssetValue, assetValue }: CreateLiquidityParams) => Promise<{
|
|
18
|
-
baseAssetTx: string | undefined;
|
|
19
22
|
assetTx: string | undefined;
|
|
23
|
+
baseAssetTx: string | undefined;
|
|
20
24
|
}>;
|
|
21
25
|
deposit: ({ assetValue, recipient, router, ...rest }: CoreTxParams & {
|
|
22
26
|
router?: string;
|
|
@@ -38,10 +42,6 @@ export declare const ThorchainPlugin: {
|
|
|
38
42
|
name: string;
|
|
39
43
|
ownerAddress: string;
|
|
40
44
|
}) => Promise<string>;
|
|
41
|
-
claimTcy: ({ chain, thorAddress }: {
|
|
42
|
-
chain: Chain;
|
|
43
|
-
thorAddress: string;
|
|
44
|
-
}) => Promise<string>;
|
|
45
45
|
stakeTcyAction: (params: {
|
|
46
46
|
type: "unstake";
|
|
47
47
|
unstakeBps: number;
|
|
@@ -49,7 +49,7 @@ export declare const ThorchainPlugin: {
|
|
|
49
49
|
type: "stake";
|
|
50
50
|
assetValue: AssetValue;
|
|
51
51
|
}) => Promise<string>;
|
|
52
|
-
swap: ({ feeOptionKey, route
|
|
52
|
+
swap: ({ feeOptionKey, route }: SwapParams<"thorchain" | "mayachain", QuoteResponseRoute>) => Promise<string>;
|
|
53
53
|
withdraw: ({ memo, assetValue, percent, from, to }: WithdrawParams) => Promise<string>;
|
|
54
54
|
};
|
|
55
55
|
};
|
|
@@ -58,16 +58,20 @@ export declare const MayachainPlugin: {
|
|
|
58
58
|
supportedSwapkitProviders: ProviderName[];
|
|
59
59
|
} & {
|
|
60
60
|
addLiquidity: ({ baseAssetValue, assetValue, baseAssetAddr, assetAddr, isPendingSymmAsset, mode, }: AddLiquidityParams) => Promise<{
|
|
61
|
-
baseAssetTx: string | undefined;
|
|
62
61
|
assetTx: string | undefined;
|
|
62
|
+
baseAssetTx: string | undefined;
|
|
63
63
|
}>;
|
|
64
|
-
addLiquidityPart: ({ assetValue, poolAddress, address, symmetric
|
|
64
|
+
addLiquidityPart: ({ assetValue, poolAddress, address, symmetric }: AddLiquidityPartParams) => Promise<string>;
|
|
65
65
|
approveAssetValue: ({ assetValue }: {
|
|
66
66
|
assetValue: AssetValue;
|
|
67
67
|
}) => Promise<string | boolean | Promise<string>>;
|
|
68
|
+
claimTcy: ({ chain, thorAddress }: {
|
|
69
|
+
chain: Chain;
|
|
70
|
+
thorAddress: string;
|
|
71
|
+
}) => Promise<string>;
|
|
68
72
|
createLiquidity: ({ baseAssetValue, assetValue }: CreateLiquidityParams) => Promise<{
|
|
69
|
-
baseAssetTx: string | undefined;
|
|
70
73
|
assetTx: string | undefined;
|
|
74
|
+
baseAssetTx: string | undefined;
|
|
71
75
|
}>;
|
|
72
76
|
deposit: ({ assetValue, recipient, router, ...rest }: CoreTxParams & {
|
|
73
77
|
router?: string;
|
|
@@ -89,10 +93,6 @@ export declare const MayachainPlugin: {
|
|
|
89
93
|
name: string;
|
|
90
94
|
ownerAddress: string;
|
|
91
95
|
}) => Promise<string>;
|
|
92
|
-
claimTcy: ({ chain, thorAddress }: {
|
|
93
|
-
chain: Chain;
|
|
94
|
-
thorAddress: string;
|
|
95
|
-
}) => Promise<string>;
|
|
96
96
|
stakeTcyAction: (params: {
|
|
97
97
|
type: "unstake";
|
|
98
98
|
unstakeBps: number;
|
|
@@ -100,7 +100,7 @@ export declare const MayachainPlugin: {
|
|
|
100
100
|
type: "stake";
|
|
101
101
|
assetValue: AssetValue;
|
|
102
102
|
}) => Promise<string>;
|
|
103
|
-
swap: ({ feeOptionKey, route
|
|
103
|
+
swap: ({ feeOptionKey, route }: SwapParams<"thorchain" | "mayachain", QuoteResponseRoute>) => Promise<string>;
|
|
104
104
|
withdraw: ({ memo, assetValue, percent, from, to }: WithdrawParams) => Promise<string>;
|
|
105
105
|
};
|
|
106
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/thorchain/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAEV,KAAK,EAKL,SAAS,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/thorchain/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EAEV,KAAK,EAKL,SAAS,EAWT,YAAY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DA5DnC,cAAc;;CA7S3E,CAAC"}
|
|
@@ -8,9 +8,9 @@ export declare function prepareTxParams({ assetValue, from, memo, ...restTxParam
|
|
|
8
8
|
from: string;
|
|
9
9
|
router?: string;
|
|
10
10
|
}): {
|
|
11
|
-
memo: string;
|
|
12
|
-
from: string;
|
|
13
11
|
assetValue: import("@swapkit/helpers").AssetValue;
|
|
12
|
+
from: string;
|
|
13
|
+
memo: string;
|
|
14
14
|
recipient: string;
|
|
15
15
|
feeOptionKey?: import("@swapkit/helpers").FeeOption;
|
|
16
16
|
feeRate?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/thorchain/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,UAAU,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,KAAK,GAAG,WAAW,GAAG,OAAO,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/thorchain/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EA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AAG,OAAO,eAAe,GAC5C,OAAO,eAAe,GACtB,OAAO,WAAW,GAClB,OAAO,YAAY,GACnB,OAAO,SAAS,GAChB,OAAO,UAAU,CAAC;AAEpB,MAAM,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,mBAAmB,GAAG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,mBAAmB,mBAAmB,CAAC;AACvC,mBAAmB,mBAAmB,CAAC;AAEvC,MAAM,MAAM,SAAS,GAAG,OAAO,eAAe,GAC5C,OAAO,eAAe,GACtB,OAAO,WAAW,GAClB,OAAO,YAAY,GACnB,OAAO,SAAS,GAChB,OAAO,UAAU,CAAC;AAEpB,MAAM,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC;AAEzC,MAAM,MAAM,mBAAmB,GAAG;IAAE,SAAS,EAAE,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAA;CAAE,CAAC"}
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ProviderName } from "@swapkit/helpers";
|
|
2
|
-
import type {
|
|
2
|
+
import type { SwapKitPluginParams } from "./types";
|
|
3
3
|
export declare function createPlugin<const Name extends string, T extends (params: SwapKitPluginParams) => Record<string, unknown>, K extends {
|
|
4
4
|
supportedSwapkitProviders?: (ProviderName | string)[];
|
|
5
5
|
}>({ name, properties, methods }: {
|
|
@@ -7,5 +7,4 @@ export declare function createPlugin<const Name extends string, T extends (param
|
|
|
7
7
|
properties?: K;
|
|
8
8
|
methods: T;
|
|
9
9
|
}): { [key in Name]: (pluginParams: SwapKitPluginParams) => K & ReturnType<T>; };
|
|
10
|
-
export declare function loadPlugin<P extends PluginName>(pluginName: P): Promise<SKPlugins[P]>;
|
|
11
10
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,YAAY,CAC1B,KAAK,CAAC,IAAI,SAAS,MAAM,EACzB,CAAC,SAAS,CAAC,MAAM,EAAE,mBAAmB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClE,CAAC,SAAS;IAAE,yBAAyB,CAAC,EAAE,CAAC,YAAY,GAAG,MAAM,CAAC,EAAE,CAAA;CAAE,EACnE,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,CAAC,CAAA;CAAE,GAK5C,GAAG,GAAG,IAAI,IAAI,kBAJb,mBAAmB,KACO,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAGZ,CAC9D"}
|
package/package.json
CHANGED
|
@@ -4,23 +4,19 @@
|
|
|
4
4
|
"@polkadot/keyring": "~13.5.0",
|
|
5
5
|
"@polkadot/util": "~13.5.0",
|
|
6
6
|
"@solana/web3.js": "~1.98.0",
|
|
7
|
-
"@swapkit/helpers": "4.0.
|
|
8
|
-
"@swapkit/toolboxes": "4.0.
|
|
9
|
-
"ts-pattern": "~5.
|
|
7
|
+
"@swapkit/helpers": "4.0.1",
|
|
8
|
+
"@swapkit/toolboxes": "4.0.1",
|
|
9
|
+
"ts-pattern": "~5.8.0"
|
|
10
10
|
},
|
|
11
|
+
"description": "SwapKit Plugin - Chainflip",
|
|
11
12
|
"devDependencies": {
|
|
12
|
-
"@polkadot/keyring": "13.5.
|
|
13
|
-
"@polkadot/util": "13.5.
|
|
14
|
-
"@solana/web3.js": "1.98.
|
|
15
|
-
"ts-pattern": "5.
|
|
13
|
+
"@polkadot/keyring": "13.5.5",
|
|
14
|
+
"@polkadot/util": "13.5.5",
|
|
15
|
+
"@solana/web3.js": "1.98.4",
|
|
16
|
+
"ts-pattern": "5.8.0"
|
|
16
17
|
},
|
|
17
|
-
"description": "SwapKit Plugin - Chainflip",
|
|
18
18
|
"exports": {
|
|
19
|
-
".": {
|
|
20
|
-
"default": "./dist/index.js",
|
|
21
|
-
"require": "./dist/index.cjs",
|
|
22
|
-
"types": "./dist/types/index.d.ts"
|
|
23
|
-
},
|
|
19
|
+
".": { "default": "./dist/index.js", "require": "./dist/index.cjs", "types": "./dist/types/index.d.ts" },
|
|
24
20
|
"./chainflip": {
|
|
25
21
|
"default": "./dist/chainflip/index.js",
|
|
26
22
|
"require": "./dist/chainflip/index.cjs",
|
|
@@ -56,11 +52,7 @@
|
|
|
56
52
|
"homepage": "https://github.com/swapkit/SwapKit",
|
|
57
53
|
"license": "Apache-2.0",
|
|
58
54
|
"name": "@swapkit/plugins",
|
|
59
|
-
"repository": {
|
|
60
|
-
"directory": "packages/plugins",
|
|
61
|
-
"type": "git",
|
|
62
|
-
"url": "git+https://github.com/swapkit/SwapKit.git"
|
|
63
|
-
},
|
|
55
|
+
"repository": { "directory": "packages/plugins", "type": "git", "url": "git+https://github.com/swapkit/SwapKit.git" },
|
|
64
56
|
"scripts": {
|
|
65
57
|
"build": "bun run ./build.ts",
|
|
66
58
|
"build:clean": "rm -rf dist && bun run ./build.ts",
|
|
@@ -69,5 +61,5 @@
|
|
|
69
61
|
"type-check:go": "tsgo"
|
|
70
62
|
},
|
|
71
63
|
"type": "module",
|
|
72
|
-
"version": "4.0.
|
|
64
|
+
"version": "4.0.2"
|
|
73
65
|
}
|
package/dist/chunk-4th4g1de.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var m=Object.create;var{getPrototypeOf:l,defineProperty:s,getOwnPropertyNames:u,getOwnPropertyDescriptor:c}=Object,p=Object.prototype.hasOwnProperty;var r=(t,i,a)=>{a=t!=null?m(l(t)):{};let n=i||!t||!t.__esModule?s(a,"default",{value:t,enumerable:!0}):a;for(let e of u(t))if(!p.call(n,e))s(n,e,{get:()=>t[e],enumerable:!0});return n},o=new WeakMap,P=(t)=>{var i=o.get(t),a;if(i)return i;if(i=s({},"__esModule",{value:!0}),t&&typeof t==="object"||typeof t==="function")u(t).map((n)=>!p.call(i,n)&&s(i,n,{get:()=>t[n],enumerable:!(a=c(t,n))||a.enumerable}));return o.set(t,i),i};var g=(t,i)=>{for(var a in i)s(t,a,{get:i[a],enumerable:!0,configurable:!0,set:(n)=>i[a]=()=>n})};function h({name:t,properties:i,methods:a}){function n(e){return{...a(e),...i}}return{[t]:n}}async function d(t){let{match:i}=await import("ts-pattern");return await i(t).with("chainflip",async()=>{let{ChainflipPlugin:n}=await import("./chainflip/index.cjs");return n}).with("thorchain",async()=>{let{ThorchainPlugin:n}=await import("./thorchain/index.cjs");return n}).with("radix",async()=>{let{RadixPlugin:n}=await import("./radix/index.cjs");return n}).with("evm",async()=>{let{EVMPlugin:n}=await import("./evm/index.cjs");return n}).with("solana",async()=>{let{SolanaPlugin:n}=await import("./solana/index.cjs");return n}).with("near",async()=>{let{NearPlugin:n}=await import("./near/index.cjs");return n}).exhaustive()}
|
|
2
|
-
|
|
3
|
-
//# debugId=02AEC6FD9069CF5D64756E2164756E21
|
|
4
|
-
//# sourceMappingURL=chunk-4th4g1de.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/utils.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { ProviderName } from \"@swapkit/helpers\";\nimport type { PluginName, SKPlugins, SwapKitPluginParams } from \"./types\";\n\nexport function createPlugin<\n const Name extends string,\n T extends (params: SwapKitPluginParams) => Record<string, unknown>,\n K extends { supportedSwapkitProviders?: (ProviderName | string)[] },\n>({ name, properties, methods }: { name: Name; properties?: K; methods: T }) {\n function plugin(pluginParams: SwapKitPluginParams) {\n return { ...methods(pluginParams), ...properties } as K & ReturnType<T>;\n }\n\n return { [name]: plugin } as { [key in Name]: typeof plugin };\n}\n\nexport async function loadPlugin<P extends PluginName>(pluginName: P) {\n const { match } = await import(\"ts-pattern\");\n\n const plugin = await match(pluginName as PluginName)\n .with(\"chainflip\", async () => {\n const { ChainflipPlugin } = await import(\"./chainflip\");\n return ChainflipPlugin;\n })\n .with(\"thorchain\", async () => {\n const { ThorchainPlugin } = await import(\"./thorchain\");\n return ThorchainPlugin;\n })\n .with(\"radix\", async () => {\n const { RadixPlugin } = await import(\"./radix\");\n return RadixPlugin;\n })\n .with(\"evm\", async () => {\n const { EVMPlugin } = await import(\"./evm\");\n return EVMPlugin;\n })\n .with(\"solana\", async () => {\n const { SolanaPlugin } = await import(\"./solana\");\n return SolanaPlugin;\n })\n .with(\"near\", async () => {\n const { NearPlugin } = await import(\"./near\");\n return NearPlugin;\n })\n .exhaustive();\n\n return plugin as unknown as SKPlugins[P];\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "mqBAGO,SAAS,CAIf,EAAG,OAAM,aAAY,WAAuD,CAC3E,SAAS,CAAM,CAAC,EAAmC,CACjD,MAAO,IAAK,EAAQ,CAAY,KAAM,CAAW,EAGnD,MAAO,EAAG,GAAO,CAAO,EAG1B,eAAsB,CAAgC,CAAC,EAAe,CACpE,IAAQ,SAAU,KAAa,sBA6B/B,OA3Be,MAAM,EAAM,CAAwB,EAChD,KAAK,YAAa,SAAY,CAC7B,IAAQ,mBAAoB,KAAa,iCACzC,OAAO,EACR,EACA,KAAK,YAAa,SAAY,CAC7B,IAAQ,mBAAoB,KAAa,iCACzC,OAAO,EACR,EACA,KAAK,QAAS,SAAY,CACzB,IAAQ,eAAgB,KAAa,6BACrC,OAAO,EACR,EACA,KAAK,MAAO,SAAY,CACvB,IAAQ,aAAc,KAAa,2BACnC,OAAO,EACR,EACA,KAAK,SAAU,SAAY,CAC1B,IAAQ,gBAAiB,KAAa,8BACtC,OAAO,EACR,EACA,KAAK,OAAQ,SAAY,CACxB,IAAQ,cAAe,KAAa,4BACpC,OAAO,EACR,EACA,WAAW",
|
|
8
|
-
"debugId": "02AEC6FD9069CF5D64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-f4bjj4r6.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var u=Object.create;var{getPrototypeOf:p,defineProperty:o,getOwnPropertyNames:m}=Object;var l=Object.prototype.hasOwnProperty;var r=(t,a,i)=>{i=t!=null?u(p(t)):{};let n=a||!t||!t.__esModule?o(i,"default",{value:t,enumerable:!0}):i;for(let s of m(t))if(!l.call(n,s))o(n,s,{get:()=>t[s],enumerable:!0});return n};var e=((t)=>typeof require!=="undefined"?require:typeof Proxy!=="undefined"?new Proxy(t,{get:(a,i)=>(typeof require!=="undefined"?require:a)[i]}):t)(function(t){if(typeof require!=="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});function P({name:t,properties:a,methods:i}){function n(s){return{...i(s),...a}}return{[t]:n}}async function g(t){let{match:a}=await import("ts-pattern");return await a(t).with("chainflip",async()=>{let{ChainflipPlugin:n}=await import("./chainflip/index.js");return n}).with("thorchain",async()=>{let{ThorchainPlugin:n}=await import("./thorchain/index.js");return n}).with("radix",async()=>{let{RadixPlugin:n}=await import("./radix/index.js");return n}).with("evm",async()=>{let{EVMPlugin:n}=await import("./evm/index.js");return n}).with("solana",async()=>{let{SolanaPlugin:n}=await import("./solana/index.js");return n}).with("near",async()=>{let{NearPlugin:n}=await import("./near/index.js");return n}).exhaustive()}
|
|
2
|
-
export{r as a,e as b,P as c,g as d};
|
|
3
|
-
|
|
4
|
-
//# debugId=97D313AFCE5799DA64756E2164756E21
|
|
5
|
-
//# sourceMappingURL=chunk-f4bjj4r6.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/utils.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { ProviderName } from \"@swapkit/helpers\";\nimport type { PluginName, SKPlugins, SwapKitPluginParams } from \"./types\";\n\nexport function createPlugin<\n const Name extends string,\n T extends (params: SwapKitPluginParams) => Record<string, unknown>,\n K extends { supportedSwapkitProviders?: (ProviderName | string)[] },\n>({ name, properties, methods }: { name: Name; properties?: K; methods: T }) {\n function plugin(pluginParams: SwapKitPluginParams) {\n return { ...methods(pluginParams), ...properties } as K & ReturnType<T>;\n }\n\n return { [name]: plugin } as { [key in Name]: typeof plugin };\n}\n\nexport async function loadPlugin<P extends PluginName>(pluginName: P) {\n const { match } = await import(\"ts-pattern\");\n\n const plugin = await match(pluginName as PluginName)\n .with(\"chainflip\", async () => {\n const { ChainflipPlugin } = await import(\"./chainflip\");\n return ChainflipPlugin;\n })\n .with(\"thorchain\", async () => {\n const { ThorchainPlugin } = await import(\"./thorchain\");\n return ThorchainPlugin;\n })\n .with(\"radix\", async () => {\n const { RadixPlugin } = await import(\"./radix\");\n return RadixPlugin;\n })\n .with(\"evm\", async () => {\n const { EVMPlugin } = await import(\"./evm\");\n return EVMPlugin;\n })\n .with(\"solana\", async () => {\n const { SolanaPlugin } = await import(\"./solana\");\n return SolanaPlugin;\n })\n .with(\"near\", async () => {\n const { NearPlugin } = await import(\"./near\");\n return NearPlugin;\n })\n .exhaustive();\n\n return plugin as unknown as SKPlugins[P];\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "0lBAGO,SAAS,CAIf,EAAG,OAAM,aAAY,WAAuD,CAC3E,SAAS,CAAM,CAAC,EAAmC,CACjD,MAAO,IAAK,EAAQ,CAAY,KAAM,CAAW,EAGnD,MAAO,EAAG,GAAO,CAAO,EAG1B,eAAsB,CAAgC,CAAC,EAAe,CACpE,IAAQ,SAAU,KAAa,sBA6B/B,OA3Be,MAAM,EAAM,CAAwB,EAChD,KAAK,YAAa,SAAY,CAC7B,IAAQ,mBAAoB,KAAa,gCACzC,OAAO,EACR,EACA,KAAK,YAAa,SAAY,CAC7B,IAAQ,mBAAoB,KAAa,gCACzC,OAAO,EACR,EACA,KAAK,QAAS,SAAY,CACzB,IAAQ,eAAgB,KAAa,4BACrC,OAAO,EACR,EACA,KAAK,MAAO,SAAY,CACvB,IAAQ,aAAc,KAAa,0BACnC,OAAO,EACR,EACA,KAAK,SAAU,SAAY,CAC1B,IAAQ,gBAAiB,KAAa,6BACtC,OAAO,EACR,EACA,KAAK,OAAQ,SAAY,CACxB,IAAQ,cAAe,KAAa,2BACpC,OAAO,EACR,EACA,WAAW",
|
|
8
|
-
"debugId": "97D313AFCE5799DA64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|