zo-sdk 0.1.87 → 0.1.89

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "zo-sdk",
3
3
  "type": "module",
4
- "version": "0.1.87",
4
+ "version": "0.1.89",
5
5
  "author": "zo",
6
6
  "exports": {
7
7
  ".": {
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "zo_lootbox_v2": {
35
35
  "package": "0xc43002b11b73db988fc354cfc35a8fa774c0a3a2204c8ec79988d0ae51e77b06",
36
- "upgraded_package": "0x77547ac87f4350fcce8762161328db0df925216bcefd02ac7878e9dff069082e",
36
+ "upgraded_package": "0x61225cb90b7a02fed898c387f1e0f9b5ed0f64d8b425a930734e4363c5bc72bc",
37
37
  "upgrade_cap": "0x00adebde014ff3454a9052814b5d2086ed8a33dda5cec0484c2b0d536e7332f2",
38
38
  "admin_cap": "0xbab763e85c75782b33f0d876501fbbd164c9c8a433d510ec03d92773daf7afee",
39
39
  "lootbox_publisher": "0x8b85c57f84e6352e1ea5fe219596d823967dcf7abaaadb1af010fb99362d21f0",
@@ -2920,29 +2920,23 @@ export class ZLPAPI extends BaseAPI implements IZLPAPI {
2920
2920
 
2921
2921
  // Vesting Lootbox Methods (V2)
2922
2922
  public adminIssueVestingLootboxV2(
2923
- coin: string,
2923
+ _coin: string,
2924
2924
  beneficiaries: string[],
2925
2925
  unlockedAmounts: number[],
2926
2926
  lockedAmounts: number[],
2927
2927
  lockDurationsMs: number[],
2928
2928
  tx: Transaction,
2929
2929
  ): void {
2930
- let module = `${this.consts.zoCore.package}::zlp::ZLP`
2931
- let metadata = this.consts.zoCore.zlpMetadata
2932
- if (coin !== 'zlp') {
2933
- module = this.consts.coins[coin].module
2934
- metadata = this.consts.coins[coin].metadata
2935
- }
2930
+ const module = `${this.consts.zoCore.package}::zlp::ZLP`
2936
2931
 
2937
2932
  for (const [i, beneficiary] of beneficiaries.entries()) {
2938
2933
  tx.moveCall({
2939
- target: `${this.sharedConfig.zoLootboxV2.upgradedPackage}::lootbox::admin_issue_vesting_lootbox`,
2934
+ target: `${this.sharedConfig.zoLootboxV2.upgradedPackage}::lootbox::admin_issue_vesting_lootbox_precision`,
2940
2935
  typeArguments: [module],
2941
2936
  arguments: [
2942
2937
  tx.object(this.sharedConfig.zoLootboxV2.adminCap),
2943
2938
  tx.object(this.sharedConfig.zoLootboxV2.lootboxTreasury),
2944
2939
  tx.object(SUI_CLOCK_OBJECT_ID),
2945
- tx.object(metadata),
2946
2940
  tx.pure.u64(unlockedAmounts[i]),
2947
2941
  tx.pure.u64(lockedAmounts[i]),
2948
2942
  tx.pure.u64(lockDurationsMs[i]),
@@ -2998,4 +2992,24 @@ export class ZLPAPI extends BaseAPI implements IZLPAPI {
2998
2992
 
2999
2993
  return tx
3000
2994
  }
2995
+
2996
+ public destroyVestingLootboxV2(
2997
+ coin: string,
2998
+ vestingLootbox: string,
2999
+ ): Transaction {
3000
+ const tx = new Transaction()
3001
+
3002
+ let module = `${this.consts.zoCore.package}::zlp::ZLP`
3003
+ if (coin !== 'zlp') {
3004
+ module = this.consts.coins[coin].module
3005
+ }
3006
+
3007
+ tx.moveCall({
3008
+ target: `${this.sharedConfig.zoLootboxV2.upgradedPackage}::lootbox::destroy_vesting_lootbox`,
3009
+ typeArguments: [module],
3010
+ arguments: [tx.object(vestingLootbox)],
3011
+ })
3012
+
3013
+ return tx
3014
+ }
3001
3015
  }
@@ -192,6 +192,11 @@ export interface IZLPAPI extends IBaseAPI {
192
192
  vestingLootbox: string,
193
193
  ) => Transaction
194
194
 
195
+ destroyVestingLootboxV2: (
196
+ coin: string,
197
+ vestingLootbox: string,
198
+ ) => Transaction
199
+
195
200
  depositPtb: (
196
201
  coin: string,
197
202
  coinObjects: string[],