@spicenet-io/spiceflow-ui 1.4.1 → 1.5.0
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/index.cjs.js +28 -12
- package/dist/index.js +28 -12
- package/dist/types/relayer.d.ts +6 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -52,9 +52,9 @@ const CHAIN_CONFIGS = {
|
|
|
52
52
|
decimals: 6
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
|
-
address: "
|
|
56
|
-
name: "Wrapped BTC",
|
|
57
|
-
symbol: "
|
|
55
|
+
address: "0x4Fc381B6CC6Df8cF1c1bD46D184475bE5b7A3c62",
|
|
56
|
+
name: "Mock Wrapped BTC",
|
|
57
|
+
symbol: "mWBTC",
|
|
58
58
|
decimals: 8
|
|
59
59
|
}
|
|
60
60
|
]
|
|
@@ -126,9 +126,9 @@ const CHAIN_CONFIGS = {
|
|
|
126
126
|
decimals: 6
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
|
-
address: "
|
|
130
|
-
name: "Wrapped BTC",
|
|
131
|
-
symbol: "
|
|
129
|
+
address: "0x4Fc381B6CC6Df8cF1c1bD46D184475bE5b7A3c62",
|
|
130
|
+
name: "Mock Wrapped BTC",
|
|
131
|
+
symbol: "mWBTC",
|
|
132
132
|
decimals: 8
|
|
133
133
|
}
|
|
134
134
|
]
|
|
@@ -3103,14 +3103,21 @@ const SwapWidget = ({
|
|
|
3103
3103
|
if (!intentSignature)
|
|
3104
3104
|
throw new Error("Failed to sign intent authorization");
|
|
3105
3105
|
const submitRequest = {
|
|
3106
|
-
tokenAddress,
|
|
3107
|
-
tokenAmount: viem.parseEther(selectedFromAsset.amount),
|
|
3108
3106
|
address,
|
|
3109
3107
|
authorization: authorizations,
|
|
3110
3108
|
intentAuthorization: {
|
|
3111
3109
|
signature: intentSignature.signature,
|
|
3112
3110
|
chainBatches: hashedChainBatches
|
|
3113
|
-
}
|
|
3111
|
+
},
|
|
3112
|
+
tokenTransfers: [
|
|
3113
|
+
[],
|
|
3114
|
+
[
|
|
3115
|
+
{
|
|
3116
|
+
tokenAddress,
|
|
3117
|
+
tokenAmount: viem.parseEther(selectedFromAsset.amount)
|
|
3118
|
+
}
|
|
3119
|
+
]
|
|
3120
|
+
]
|
|
3114
3121
|
};
|
|
3115
3122
|
const result = await relayerService.submitTransaction(submitRequest);
|
|
3116
3123
|
if (result) {
|
|
@@ -3811,14 +3818,23 @@ const DepositWidget = ({
|
|
|
3811
3818
|
if (!intentSignature)
|
|
3812
3819
|
throw new Error("Failed to sign intent authorization");
|
|
3813
3820
|
const submitRequest = {
|
|
3814
|
-
tokenAddress,
|
|
3815
|
-
tokenAmount: viem.parseEther(selectedDepositAsset.amount),
|
|
3816
3821
|
address,
|
|
3817
3822
|
authorization: authorizations,
|
|
3818
3823
|
intentAuthorization: {
|
|
3819
3824
|
signature: intentSignature.signature,
|
|
3820
3825
|
chainBatches: hashedChainBatches
|
|
3821
|
-
}
|
|
3826
|
+
},
|
|
3827
|
+
tokenTransfers: [
|
|
3828
|
+
[],
|
|
3829
|
+
[
|
|
3830
|
+
{
|
|
3831
|
+
tokenAddress,
|
|
3832
|
+
tokenAmount: viem.parseEther(selectedDepositAsset.amount),
|
|
3833
|
+
sender: address,
|
|
3834
|
+
receiver: "0xeee2b52e7CFe6e2168341a34cEB783b68FEdf1A2"
|
|
3835
|
+
}
|
|
3836
|
+
]
|
|
3837
|
+
]
|
|
3822
3838
|
};
|
|
3823
3839
|
const result = await relayerService.submitTransaction(submitRequest);
|
|
3824
3840
|
if (result) {
|
package/dist/index.js
CHANGED
|
@@ -50,9 +50,9 @@ const CHAIN_CONFIGS = {
|
|
|
50
50
|
decimals: 6
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
address: "
|
|
54
|
-
name: "Wrapped BTC",
|
|
55
|
-
symbol: "
|
|
53
|
+
address: "0x4Fc381B6CC6Df8cF1c1bD46D184475bE5b7A3c62",
|
|
54
|
+
name: "Mock Wrapped BTC",
|
|
55
|
+
symbol: "mWBTC",
|
|
56
56
|
decimals: 8
|
|
57
57
|
}
|
|
58
58
|
]
|
|
@@ -124,9 +124,9 @@ const CHAIN_CONFIGS = {
|
|
|
124
124
|
decimals: 6
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
|
-
address: "
|
|
128
|
-
name: "Wrapped BTC",
|
|
129
|
-
symbol: "
|
|
127
|
+
address: "0x4Fc381B6CC6Df8cF1c1bD46D184475bE5b7A3c62",
|
|
128
|
+
name: "Mock Wrapped BTC",
|
|
129
|
+
symbol: "mWBTC",
|
|
130
130
|
decimals: 8
|
|
131
131
|
}
|
|
132
132
|
]
|
|
@@ -3101,14 +3101,21 @@ const SwapWidget = ({
|
|
|
3101
3101
|
if (!intentSignature)
|
|
3102
3102
|
throw new Error("Failed to sign intent authorization");
|
|
3103
3103
|
const submitRequest = {
|
|
3104
|
-
tokenAddress,
|
|
3105
|
-
tokenAmount: parseEther(selectedFromAsset.amount),
|
|
3106
3104
|
address,
|
|
3107
3105
|
authorization: authorizations,
|
|
3108
3106
|
intentAuthorization: {
|
|
3109
3107
|
signature: intentSignature.signature,
|
|
3110
3108
|
chainBatches: hashedChainBatches
|
|
3111
|
-
}
|
|
3109
|
+
},
|
|
3110
|
+
tokenTransfers: [
|
|
3111
|
+
[],
|
|
3112
|
+
[
|
|
3113
|
+
{
|
|
3114
|
+
tokenAddress,
|
|
3115
|
+
tokenAmount: parseEther(selectedFromAsset.amount)
|
|
3116
|
+
}
|
|
3117
|
+
]
|
|
3118
|
+
]
|
|
3112
3119
|
};
|
|
3113
3120
|
const result = await relayerService.submitTransaction(submitRequest);
|
|
3114
3121
|
if (result) {
|
|
@@ -3809,14 +3816,23 @@ const DepositWidget = ({
|
|
|
3809
3816
|
if (!intentSignature)
|
|
3810
3817
|
throw new Error("Failed to sign intent authorization");
|
|
3811
3818
|
const submitRequest = {
|
|
3812
|
-
tokenAddress,
|
|
3813
|
-
tokenAmount: parseEther(selectedDepositAsset.amount),
|
|
3814
3819
|
address,
|
|
3815
3820
|
authorization: authorizations,
|
|
3816
3821
|
intentAuthorization: {
|
|
3817
3822
|
signature: intentSignature.signature,
|
|
3818
3823
|
chainBatches: hashedChainBatches
|
|
3819
|
-
}
|
|
3824
|
+
},
|
|
3825
|
+
tokenTransfers: [
|
|
3826
|
+
[],
|
|
3827
|
+
[
|
|
3828
|
+
{
|
|
3829
|
+
tokenAddress,
|
|
3830
|
+
tokenAmount: parseEther(selectedDepositAsset.amount),
|
|
3831
|
+
sender: address,
|
|
3832
|
+
receiver: "0xeee2b52e7CFe6e2168341a34cEB783b68FEdf1A2"
|
|
3833
|
+
}
|
|
3834
|
+
]
|
|
3835
|
+
]
|
|
3820
3836
|
};
|
|
3821
3837
|
const result = await relayerService.submitTransaction(submitRequest);
|
|
3822
3838
|
if (result) {
|
package/dist/types/relayer.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { Authorization, Call } from "./authorization";
|
|
2
2
|
export interface RelayerSubmitRequest {
|
|
3
|
-
tokenAddress: string;
|
|
4
|
-
tokenAmount: bigint;
|
|
5
3
|
address: string;
|
|
6
4
|
authorization: Authorization[];
|
|
7
5
|
intentAuthorization: {
|
|
@@ -13,6 +11,12 @@ export interface RelayerSubmitRequest {
|
|
|
13
11
|
recentBlock: bigint;
|
|
14
12
|
}>;
|
|
15
13
|
};
|
|
14
|
+
tokenTransfers: Array<Array<{
|
|
15
|
+
tokenAddress: string;
|
|
16
|
+
tokenAmount: bigint;
|
|
17
|
+
sender?: string;
|
|
18
|
+
receiver?: string;
|
|
19
|
+
}>>;
|
|
16
20
|
}
|
|
17
21
|
export interface RelayerSubmitResponse {
|
|
18
22
|
hash: string;
|