@xchainjs/xchain-solana 1.0.4 → 1.0.6
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/lib/index.esm.js +11 -11
- package/lib/index.js +11 -11
- package/package.json +4 -4
package/lib/index.esm.js
CHANGED
|
@@ -268,8 +268,8 @@ class Client extends BaseXChainClient {
|
|
|
268
268
|
* @param {TxParams} params The transfer options.
|
|
269
269
|
* @returns {TxHash} The transaction hash.
|
|
270
270
|
*/
|
|
271
|
-
transfer(
|
|
272
|
-
return __awaiter(this,
|
|
271
|
+
transfer(_a) {
|
|
272
|
+
return __awaiter(this, arguments, void 0, function* ({ walletIndex, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
273
273
|
return this.roundRobinTransfer({
|
|
274
274
|
walletIndex,
|
|
275
275
|
recipient,
|
|
@@ -298,8 +298,8 @@ class Client extends BaseXChainClient {
|
|
|
298
298
|
* @param {TxParams&Address} params - The transfer options.
|
|
299
299
|
* @returns {Promise<PreparedTx>} The raw unsigned transaction.
|
|
300
300
|
*/
|
|
301
|
-
prepareTx(
|
|
302
|
-
return __awaiter(this,
|
|
301
|
+
prepareTx(_a) {
|
|
302
|
+
return __awaiter(this, arguments, void 0, function* ({ sender, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
303
303
|
return this.roundRobinPrepareTx({
|
|
304
304
|
sender,
|
|
305
305
|
recipient,
|
|
@@ -320,8 +320,8 @@ class Client extends BaseXChainClient {
|
|
|
320
320
|
return Keypair.fromSeed(hd.derive(this.getFullDerivationPath(index)).privateKey);
|
|
321
321
|
}
|
|
322
322
|
parseTransaction(tx) {
|
|
323
|
-
var _a, _b, _c;
|
|
324
323
|
return __awaiter(this, void 0, void 0, function* () {
|
|
324
|
+
var _a, _b, _c;
|
|
325
325
|
const from = [];
|
|
326
326
|
const to = [];
|
|
327
327
|
tx.transaction.message.accountKeys.forEach((accountKey, index) => {
|
|
@@ -579,8 +579,8 @@ class Client extends BaseXChainClient {
|
|
|
579
579
|
* @returns {TxHash} The transaction hash.
|
|
580
580
|
* @throws {Error} if there is no provider able to make the transfer
|
|
581
581
|
*/
|
|
582
|
-
roundRobinTransfer(
|
|
583
|
-
return __awaiter(this,
|
|
582
|
+
roundRobinTransfer(_a) {
|
|
583
|
+
return __awaiter(this, arguments, void 0, function* ({ walletIndex, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
584
584
|
try {
|
|
585
585
|
const senderKeyPair = this.getPrivateKeyPair(walletIndex || 0);
|
|
586
586
|
for (const provider of this.providers) {
|
|
@@ -604,7 +604,7 @@ class Client extends BaseXChainClient {
|
|
|
604
604
|
return this.broadcastTx(bs58.encode(transaction.serialize()));
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
catch (
|
|
607
|
+
catch (_b) { }
|
|
608
608
|
throw Error('No provider able to transfer.');
|
|
609
609
|
});
|
|
610
610
|
}
|
|
@@ -642,8 +642,8 @@ class Client extends BaseXChainClient {
|
|
|
642
642
|
* @returns {Promise<PreparedTx>} The raw unsigned transaction.
|
|
643
643
|
* @throws {Error} if there is no provider able to prepare transaction
|
|
644
644
|
*/
|
|
645
|
-
roundRobinPrepareTx(
|
|
646
|
-
return __awaiter(this,
|
|
645
|
+
roundRobinPrepareTx(_a) {
|
|
646
|
+
return __awaiter(this, arguments, void 0, function* ({ sender, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
647
647
|
try {
|
|
648
648
|
for (const provider of this.providers) {
|
|
649
649
|
const transaction = new Transaction();
|
|
@@ -708,7 +708,7 @@ class Client extends BaseXChainClient {
|
|
|
708
708
|
return { rawUnsignedTx: bs58.encode(transaction.serialize({ verifySignatures: false })) };
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
|
-
catch (
|
|
711
|
+
catch (_b) { }
|
|
712
712
|
throw Error('No provider able to prepare transaction');
|
|
713
713
|
});
|
|
714
714
|
}
|
package/lib/index.js
CHANGED
|
@@ -275,8 +275,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
275
275
|
* @param {TxParams} params The transfer options.
|
|
276
276
|
* @returns {TxHash} The transaction hash.
|
|
277
277
|
*/
|
|
278
|
-
transfer(
|
|
279
|
-
return __awaiter(this,
|
|
278
|
+
transfer(_a) {
|
|
279
|
+
return __awaiter(this, arguments, void 0, function* ({ walletIndex, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
280
280
|
return this.roundRobinTransfer({
|
|
281
281
|
walletIndex,
|
|
282
282
|
recipient,
|
|
@@ -305,8 +305,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
305
305
|
* @param {TxParams&Address} params - The transfer options.
|
|
306
306
|
* @returns {Promise<PreparedTx>} The raw unsigned transaction.
|
|
307
307
|
*/
|
|
308
|
-
prepareTx(
|
|
309
|
-
return __awaiter(this,
|
|
308
|
+
prepareTx(_a) {
|
|
309
|
+
return __awaiter(this, arguments, void 0, function* ({ sender, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
310
310
|
return this.roundRobinPrepareTx({
|
|
311
311
|
sender,
|
|
312
312
|
recipient,
|
|
@@ -327,8 +327,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
327
327
|
return web3_js.Keypair.fromSeed(hd.derive(this.getFullDerivationPath(index)).privateKey);
|
|
328
328
|
}
|
|
329
329
|
parseTransaction(tx) {
|
|
330
|
-
var _a, _b, _c;
|
|
331
330
|
return __awaiter(this, void 0, void 0, function* () {
|
|
331
|
+
var _a, _b, _c;
|
|
332
332
|
const from = [];
|
|
333
333
|
const to = [];
|
|
334
334
|
tx.transaction.message.accountKeys.forEach((accountKey, index) => {
|
|
@@ -586,8 +586,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
586
586
|
* @returns {TxHash} The transaction hash.
|
|
587
587
|
* @throws {Error} if there is no provider able to make the transfer
|
|
588
588
|
*/
|
|
589
|
-
roundRobinTransfer(
|
|
590
|
-
return __awaiter(this,
|
|
589
|
+
roundRobinTransfer(_a) {
|
|
590
|
+
return __awaiter(this, arguments, void 0, function* ({ walletIndex, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
591
591
|
try {
|
|
592
592
|
const senderKeyPair = this.getPrivateKeyPair(walletIndex || 0);
|
|
593
593
|
for (const provider of this.providers) {
|
|
@@ -611,7 +611,7 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
611
611
|
return this.broadcastTx(bs58__default.default.encode(transaction.serialize()));
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
catch (
|
|
614
|
+
catch (_b) { }
|
|
615
615
|
throw Error('No provider able to transfer.');
|
|
616
616
|
});
|
|
617
617
|
}
|
|
@@ -649,8 +649,8 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
649
649
|
* @returns {Promise<PreparedTx>} The raw unsigned transaction.
|
|
650
650
|
* @throws {Error} if there is no provider able to prepare transaction
|
|
651
651
|
*/
|
|
652
|
-
roundRobinPrepareTx(
|
|
653
|
-
return __awaiter(this,
|
|
652
|
+
roundRobinPrepareTx(_a) {
|
|
653
|
+
return __awaiter(this, arguments, void 0, function* ({ sender, recipient, asset, amount, memo, limit, priorityFee, allowOwnerOffCurve, }) {
|
|
654
654
|
try {
|
|
655
655
|
for (const provider of this.providers) {
|
|
656
656
|
const transaction = new web3_js.Transaction();
|
|
@@ -715,7 +715,7 @@ class Client extends xchainClient.BaseXChainClient {
|
|
|
715
715
|
return { rawUnsignedTx: bs58__default.default.encode(transaction.serialize({ verifySignatures: false })) };
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
catch (
|
|
718
|
+
catch (_b) { }
|
|
719
719
|
throw Error('No provider able to prepare transaction');
|
|
720
720
|
});
|
|
721
721
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xchainjs/xchain-solana",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Solana client for XChainJS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Solana",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"@solana/addresses": "^2.1.1",
|
|
39
39
|
"@solana/spl-token": "^0.4.13",
|
|
40
40
|
"@solana/web3.js": "^1.98.2",
|
|
41
|
-
"@xchainjs/xchain-client": "2.0.
|
|
42
|
-
"@xchainjs/xchain-crypto": "1.0.
|
|
43
|
-
"@xchainjs/xchain-util": "2.0.
|
|
41
|
+
"@xchainjs/xchain-client": "2.0.6",
|
|
42
|
+
"@xchainjs/xchain-crypto": "1.0.4",
|
|
43
|
+
"@xchainjs/xchain-util": "2.0.4",
|
|
44
44
|
"bs58": "^6.0.0",
|
|
45
45
|
"micro-key-producer": "^0.7.6"
|
|
46
46
|
},
|