@shogun-sdk/swap 0.0.2-test.11 → 0.0.2-test.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/core.cjs +6 -5
- package/dist/core.js +6 -5
- package/dist/index.cjs +6 -5
- package/dist/index.js +6 -5
- package/dist/react.cjs +6 -5
- package/dist/react.js +6 -5
- package/dist/wallet-adapter.cjs +4 -3
- package/dist/wallet-adapter.js +4 -3
- package/package.json +1 -1
package/dist/core.cjs
CHANGED
|
@@ -310,14 +310,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
310
310
|
if (!isEVMTransaction(transaction)) {
|
|
311
311
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
|
|
313
|
+
const request = await wallet.prepareTransactionRequest({
|
|
314
|
+
account: wallet.account,
|
|
315
315
|
to: transaction.to,
|
|
316
316
|
data: transaction.data,
|
|
317
317
|
value: transaction.value,
|
|
318
|
-
account: wallet.account?.address,
|
|
319
318
|
chain: wallet.chain
|
|
320
319
|
});
|
|
320
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
321
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
321
322
|
return tx;
|
|
322
323
|
};
|
|
323
324
|
const switchChain = async (chainId) => {
|
|
@@ -675,8 +676,8 @@ async function executeOrder({
|
|
|
675
676
|
accountAddress,
|
|
676
677
|
recipientAddress,
|
|
677
678
|
deadline,
|
|
678
|
-
tokenIn: quote?.tokenIn
|
|
679
|
-
tokenOut: quote?.tokenOut
|
|
679
|
+
tokenIn: quote?.tokenIn,
|
|
680
|
+
tokenOut: quote?.tokenOut
|
|
680
681
|
});
|
|
681
682
|
const adapter = normalizeWallet(wallet);
|
|
682
683
|
if (!adapter) throw new Error("No wallet provided");
|
package/dist/core.js
CHANGED
|
@@ -274,14 +274,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
274
274
|
if (!isEVMTransaction(transaction)) {
|
|
275
275
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
276
276
|
}
|
|
277
|
-
const
|
|
278
|
-
|
|
277
|
+
const request = await wallet.prepareTransactionRequest({
|
|
278
|
+
account: wallet.account,
|
|
279
279
|
to: transaction.to,
|
|
280
280
|
data: transaction.data,
|
|
281
281
|
value: transaction.value,
|
|
282
|
-
account: wallet.account?.address,
|
|
283
282
|
chain: wallet.chain
|
|
284
283
|
});
|
|
284
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
285
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
285
286
|
return tx;
|
|
286
287
|
};
|
|
287
288
|
const switchChain = async (chainId) => {
|
|
@@ -646,8 +647,8 @@ async function executeOrder({
|
|
|
646
647
|
accountAddress,
|
|
647
648
|
recipientAddress,
|
|
648
649
|
deadline,
|
|
649
|
-
tokenIn: quote?.tokenIn
|
|
650
|
-
tokenOut: quote?.tokenOut
|
|
650
|
+
tokenIn: quote?.tokenIn,
|
|
651
|
+
tokenOut: quote?.tokenOut
|
|
651
652
|
});
|
|
652
653
|
const adapter = normalizeWallet(wallet);
|
|
653
654
|
if (!adapter) throw new Error("No wallet provided");
|
package/dist/index.cjs
CHANGED
|
@@ -394,14 +394,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
394
394
|
if (!isEVMTransaction(transaction)) {
|
|
395
395
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
396
396
|
}
|
|
397
|
-
const
|
|
398
|
-
|
|
397
|
+
const request = await wallet.prepareTransactionRequest({
|
|
398
|
+
account: wallet.account,
|
|
399
399
|
to: transaction.to,
|
|
400
400
|
data: transaction.data,
|
|
401
401
|
value: transaction.value,
|
|
402
|
-
account: wallet.account?.address,
|
|
403
402
|
chain: wallet.chain
|
|
404
403
|
});
|
|
404
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
405
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
405
406
|
return tx;
|
|
406
407
|
};
|
|
407
408
|
const switchChain = async (chainId) => {
|
|
@@ -759,8 +760,8 @@ async function executeOrder({
|
|
|
759
760
|
accountAddress,
|
|
760
761
|
recipientAddress,
|
|
761
762
|
deadline,
|
|
762
|
-
tokenIn: quote?.tokenIn
|
|
763
|
-
tokenOut: quote?.tokenOut
|
|
763
|
+
tokenIn: quote?.tokenIn,
|
|
764
|
+
tokenOut: quote?.tokenOut
|
|
764
765
|
});
|
|
765
766
|
const adapter = normalizeWallet(wallet);
|
|
766
767
|
if (!adapter) throw new Error("No wallet provided");
|
package/dist/index.js
CHANGED
|
@@ -355,14 +355,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
355
355
|
if (!isEVMTransaction(transaction)) {
|
|
356
356
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
357
357
|
}
|
|
358
|
-
const
|
|
359
|
-
|
|
358
|
+
const request = await wallet.prepareTransactionRequest({
|
|
359
|
+
account: wallet.account,
|
|
360
360
|
to: transaction.to,
|
|
361
361
|
data: transaction.data,
|
|
362
362
|
value: transaction.value,
|
|
363
|
-
account: wallet.account?.address,
|
|
364
363
|
chain: wallet.chain
|
|
365
364
|
});
|
|
365
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
366
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
366
367
|
return tx;
|
|
367
368
|
};
|
|
368
369
|
const switchChain = async (chainId) => {
|
|
@@ -727,8 +728,8 @@ async function executeOrder({
|
|
|
727
728
|
accountAddress,
|
|
728
729
|
recipientAddress,
|
|
729
730
|
deadline,
|
|
730
|
-
tokenIn: quote?.tokenIn
|
|
731
|
-
tokenOut: quote?.tokenOut
|
|
731
|
+
tokenIn: quote?.tokenIn,
|
|
732
|
+
tokenOut: quote?.tokenOut
|
|
732
733
|
});
|
|
733
734
|
const adapter = normalizeWallet(wallet);
|
|
734
735
|
if (!adapter) throw new Error("No wallet provided");
|
package/dist/react.cjs
CHANGED
|
@@ -234,14 +234,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
234
234
|
if (!isEVMTransaction(transaction)) {
|
|
235
235
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
236
236
|
}
|
|
237
|
-
const
|
|
238
|
-
|
|
237
|
+
const request = await wallet.prepareTransactionRequest({
|
|
238
|
+
account: wallet.account,
|
|
239
239
|
to: transaction.to,
|
|
240
240
|
data: transaction.data,
|
|
241
241
|
value: transaction.value,
|
|
242
|
-
account: wallet.account?.address,
|
|
243
242
|
chain: wallet.chain
|
|
244
243
|
});
|
|
244
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
245
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
245
246
|
return tx;
|
|
246
247
|
};
|
|
247
248
|
const switchChain = async (chainId) => {
|
|
@@ -611,8 +612,8 @@ async function executeOrder({
|
|
|
611
612
|
accountAddress,
|
|
612
613
|
recipientAddress,
|
|
613
614
|
deadline,
|
|
614
|
-
tokenIn: quote?.tokenIn
|
|
615
|
-
tokenOut: quote?.tokenOut
|
|
615
|
+
tokenIn: quote?.tokenIn,
|
|
616
|
+
tokenOut: quote?.tokenOut
|
|
616
617
|
});
|
|
617
618
|
const adapter = normalizeWallet(wallet);
|
|
618
619
|
if (!adapter) throw new Error("No wallet provided");
|
package/dist/react.js
CHANGED
|
@@ -205,14 +205,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
205
205
|
if (!isEVMTransaction(transaction)) {
|
|
206
206
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
|
|
208
|
+
const request = await wallet.prepareTransactionRequest({
|
|
209
|
+
account: wallet.account,
|
|
210
210
|
to: transaction.to,
|
|
211
211
|
data: transaction.data,
|
|
212
212
|
value: transaction.value,
|
|
213
|
-
account: wallet.account?.address,
|
|
214
213
|
chain: wallet.chain
|
|
215
214
|
});
|
|
215
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
216
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
216
217
|
return tx;
|
|
217
218
|
};
|
|
218
219
|
const switchChain = async (chainId) => {
|
|
@@ -589,8 +590,8 @@ async function executeOrder({
|
|
|
589
590
|
accountAddress,
|
|
590
591
|
recipientAddress,
|
|
591
592
|
deadline,
|
|
592
|
-
tokenIn: quote?.tokenIn
|
|
593
|
-
tokenOut: quote?.tokenOut
|
|
593
|
+
tokenIn: quote?.tokenIn,
|
|
594
|
+
tokenOut: quote?.tokenOut
|
|
594
595
|
});
|
|
595
596
|
const adapter = normalizeWallet(wallet);
|
|
596
597
|
if (!adapter) throw new Error("No wallet provided");
|
package/dist/wallet-adapter.cjs
CHANGED
|
@@ -126,14 +126,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
126
126
|
if (!isEVMTransaction(transaction)) {
|
|
127
127
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
|
|
129
|
+
const request = await wallet.prepareTransactionRequest({
|
|
130
|
+
account: wallet.account,
|
|
131
131
|
to: transaction.to,
|
|
132
132
|
data: transaction.data,
|
|
133
133
|
value: transaction.value,
|
|
134
|
-
account: wallet.account?.address,
|
|
135
134
|
chain: wallet.chain
|
|
136
135
|
});
|
|
136
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
137
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
137
138
|
return tx;
|
|
138
139
|
};
|
|
139
140
|
const switchChain = async (chainId) => {
|
package/dist/wallet-adapter.js
CHANGED
|
@@ -102,14 +102,15 @@ var adaptViemWallet = (wallet) => {
|
|
|
102
102
|
if (!isEVMTransaction(transaction)) {
|
|
103
103
|
throw new Error("Expected EVMTransaction but got SolanaTransaction");
|
|
104
104
|
}
|
|
105
|
-
const
|
|
106
|
-
|
|
105
|
+
const request = await wallet.prepareTransactionRequest({
|
|
106
|
+
account: wallet.account,
|
|
107
107
|
to: transaction.to,
|
|
108
108
|
data: transaction.data,
|
|
109
109
|
value: transaction.value,
|
|
110
|
-
account: wallet.account?.address,
|
|
111
110
|
chain: wallet.chain
|
|
112
111
|
});
|
|
112
|
+
const serializedTransaction = await wallet.signTransaction(request);
|
|
113
|
+
const tx = await wallet.sendRawTransaction({ serializedTransaction });
|
|
113
114
|
return tx;
|
|
114
115
|
};
|
|
115
116
|
const switchChain = async (chainId) => {
|