pinpet-sdk 2.1.27 → 2.1.28
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/pinpet-sdk.cjs.js +14 -4
- package/dist/pinpet-sdk.esm.js +14 -4
- package/dist/pinpet-sdk.js +14 -4
- package/dist/pinpet-sdk.js.map +1 -1
- package/package.json +1 -1
- package/src/modules/token.js +14 -4
package/dist/pinpet-sdk.cjs.js
CHANGED
|
@@ -16929,15 +16929,17 @@ class TokenModule$1 {
|
|
|
16929
16929
|
|
|
16930
16930
|
const transaction = new VersionedTransaction(messageV0);
|
|
16931
16931
|
|
|
16932
|
+
// 9. 用 mint keypair 预签名(调用方只需 payer 签名)
|
|
16933
|
+
transaction.sign([mint]);
|
|
16934
|
+
|
|
16932
16935
|
console.log('CreateAndBuy VersionedTransaction built successfully:');
|
|
16933
16936
|
console.log(' Total instructions:', instructions.length);
|
|
16934
16937
|
console.log(' Compute units:', computeUnits);
|
|
16935
|
-
console.log('
|
|
16938
|
+
console.log(' mint keypair pre-signed, caller only needs payer signature');
|
|
16936
16939
|
|
|
16937
|
-
//
|
|
16940
|
+
// 10. 返回 VersionedTransaction(mint 已预签名)
|
|
16938
16941
|
return {
|
|
16939
|
-
transaction,
|
|
16940
|
-
signers: [mint], // mint keypair 需要签名
|
|
16942
|
+
transaction, // 已包含 mint 签名
|
|
16941
16943
|
accounts: {
|
|
16942
16944
|
// create 的账户
|
|
16943
16945
|
...createResult.accounts,
|
|
@@ -16955,6 +16957,14 @@ class TokenModule$1 {
|
|
|
16955
16957
|
};
|
|
16956
16958
|
}
|
|
16957
16959
|
|
|
16960
|
+
/**
|
|
16961
|
+
* createAndBuy 的别名(功能完全相同)
|
|
16962
|
+
* 保留此方法以保持向后兼容
|
|
16963
|
+
*/
|
|
16964
|
+
async createAndBuySign(params, options = {}) {
|
|
16965
|
+
return this.createAndBuy(params, options);
|
|
16966
|
+
}
|
|
16967
|
+
|
|
16958
16968
|
}
|
|
16959
16969
|
|
|
16960
16970
|
var token = TokenModule$1;
|
package/dist/pinpet-sdk.esm.js
CHANGED
|
@@ -21600,15 +21600,17 @@ class TokenModule$1 {
|
|
|
21600
21600
|
|
|
21601
21601
|
const transaction = new VersionedTransaction(messageV0);
|
|
21602
21602
|
|
|
21603
|
+
// 9. 用 mint keypair 预签名(调用方只需 payer 签名)
|
|
21604
|
+
transaction.sign([mint]);
|
|
21605
|
+
|
|
21603
21606
|
console.log('CreateAndBuy VersionedTransaction built successfully:');
|
|
21604
21607
|
console.log(' Total instructions:', instructions.length);
|
|
21605
21608
|
console.log(' Compute units:', computeUnits);
|
|
21606
|
-
console.log('
|
|
21609
|
+
console.log(' mint keypair pre-signed, caller only needs payer signature');
|
|
21607
21610
|
|
|
21608
|
-
//
|
|
21611
|
+
// 10. 返回 VersionedTransaction(mint 已预签名)
|
|
21609
21612
|
return {
|
|
21610
|
-
transaction,
|
|
21611
|
-
signers: [mint], // mint keypair 需要签名
|
|
21613
|
+
transaction, // 已包含 mint 签名
|
|
21612
21614
|
accounts: {
|
|
21613
21615
|
// create 的账户
|
|
21614
21616
|
...createResult.accounts,
|
|
@@ -21626,6 +21628,14 @@ class TokenModule$1 {
|
|
|
21626
21628
|
};
|
|
21627
21629
|
}
|
|
21628
21630
|
|
|
21631
|
+
/**
|
|
21632
|
+
* createAndBuy 的别名(功能完全相同)
|
|
21633
|
+
* 保留此方法以保持向后兼容
|
|
21634
|
+
*/
|
|
21635
|
+
async createAndBuySign(params, options = {}) {
|
|
21636
|
+
return this.createAndBuy(params, options);
|
|
21637
|
+
}
|
|
21638
|
+
|
|
21629
21639
|
}
|
|
21630
21640
|
|
|
21631
21641
|
var token = TokenModule$1;
|
package/dist/pinpet-sdk.js
CHANGED
|
@@ -21608,15 +21608,17 @@
|
|
|
21608
21608
|
|
|
21609
21609
|
const transaction = new VersionedTransaction(messageV0);
|
|
21610
21610
|
|
|
21611
|
+
// 9. 用 mint keypair 预签名(调用方只需 payer 签名)
|
|
21612
|
+
transaction.sign([mint]);
|
|
21613
|
+
|
|
21611
21614
|
console.log('CreateAndBuy VersionedTransaction built successfully:');
|
|
21612
21615
|
console.log(' Total instructions:', instructions.length);
|
|
21613
21616
|
console.log(' Compute units:', computeUnits);
|
|
21614
|
-
console.log('
|
|
21617
|
+
console.log(' mint keypair pre-signed, caller only needs payer signature');
|
|
21615
21618
|
|
|
21616
|
-
//
|
|
21619
|
+
// 10. 返回 VersionedTransaction(mint 已预签名)
|
|
21617
21620
|
return {
|
|
21618
|
-
transaction,
|
|
21619
|
-
signers: [mint], // mint keypair 需要签名
|
|
21621
|
+
transaction, // 已包含 mint 签名
|
|
21620
21622
|
accounts: {
|
|
21621
21623
|
// create 的账户
|
|
21622
21624
|
...createResult.accounts,
|
|
@@ -21634,6 +21636,14 @@
|
|
|
21634
21636
|
};
|
|
21635
21637
|
}
|
|
21636
21638
|
|
|
21639
|
+
/**
|
|
21640
|
+
* createAndBuy 的别名(功能完全相同)
|
|
21641
|
+
* 保留此方法以保持向后兼容
|
|
21642
|
+
*/
|
|
21643
|
+
async createAndBuySign(params, options = {}) {
|
|
21644
|
+
return this.createAndBuy(params, options);
|
|
21645
|
+
}
|
|
21646
|
+
|
|
21637
21647
|
}
|
|
21638
21648
|
|
|
21639
21649
|
var token = TokenModule$1;
|