@misofm/sdk 0.15.11 → 0.16.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/README.md +145 -53
- package/dist/client.d.ts +156 -48
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +289 -48
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +11 -11
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +9 -9
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/miso_record/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_record/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.js +20 -0
- package/dist/contracts/miso_record/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/miso_record/pressing.d.ts +327 -0
- package/dist/contracts/miso_record/pressing.d.ts.map +1 -0
- package/dist/contracts/miso_record/pressing.js +345 -0
- package/dist/contracts/miso_record/pressing.js.map +1 -0
- package/dist/contracts/miso_record/record.d.ts +190 -0
- package/dist/contracts/miso_record/record.d.ts.map +1 -0
- package/dist/contracts/miso_record/record.js +226 -0
- package/dist/contracts/miso_record/record.js.map +1 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.js +20 -0
- package/dist/contracts/miso_record_shop/deps/std/type_name.js.map +1 -0
- package/dist/contracts/miso_record_shop/listing.d.ts +387 -0
- package/dist/contracts/miso_record_shop/listing.d.ts.map +1 -0
- package/dist/contracts/miso_record_shop/listing.js +380 -0
- package/dist/contracts/miso_record_shop/listing.js.map +1 -0
- package/dist/contracts/miso_record_shop/witness.d.ts +7 -0
- package/dist/contracts/miso_record_shop/witness.d.ts.map +1 -0
- package/dist/contracts/miso_record_shop/witness.js +9 -0
- package/dist/contracts/miso_record_shop/witness.js.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +10 -12
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +8 -10
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts.d.ts +3 -3
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +5 -4
- package/dist/contracts.js.map +1 -1
- package/dist/deployments.d.ts +37 -4
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +40 -2
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mix.d.ts +144 -0
- package/dist/mix.d.ts.map +1 -0
- package/dist/mix.js +656 -0
- package/dist/mix.js.map +1 -0
- package/dist/pressing.d.ts +72 -156
- package/dist/pressing.d.ts.map +1 -1
- package/dist/pressing.js +269 -261
- package/dist/pressing.js.map +1 -1
- package/dist/publication.d.ts +5 -2
- package/dist/publication.d.ts.map +1 -1
- package/dist/publication.js +57 -32
- package/dist/publication.js.map +1 -1
- package/dist/read/catalog.d.ts +8 -5
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +47 -35
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/config.d.ts +6 -4
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +1 -2
- package/dist/read/config.js.map +1 -1
- package/dist/read/index.d.ts +1 -1
- package/dist/read/index.d.ts.map +1 -1
- package/dist/read/index.js +1 -1
- package/dist/read/index.js.map +1 -1
- package/dist/read/internal/scalars.d.ts.map +1 -1
- package/dist/read/internal/scalars.js +4 -3
- package/dist/read/internal/scalars.js.map +1 -1
- package/dist/read/internal/walrus.d.ts.map +1 -1
- package/dist/read/internal/walrus.js +2 -1
- package/dist/read/internal/walrus.js.map +1 -1
- package/dist/read/receipts.d.ts +21 -12
- package/dist/read/receipts.d.ts.map +1 -1
- package/dist/read/receipts.js +159 -56
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/types.d.ts +34 -24
- package/dist/read/types.d.ts.map +1 -1
- package/dist/read/wallet.d.ts.map +1 -1
- package/dist/read/wallet.js +31 -46
- package/dist/read/wallet.js.map +1 -1
- package/dist/vault.d.ts +40 -11
- package/dist/vault.d.ts.map +1 -1
- package/dist/vault.js +94 -22
- package/dist/vault.js.map +1 -1
- package/package.json +10 -3
- package/src/client.ts +386 -72
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +15 -15
- package/src/contracts/miso_record/deps/sui/vec_set.ts +21 -0
- package/src/contracts/miso_record/pressing.ts +522 -0
- package/src/contracts/miso_record/record.ts +338 -0
- package/src/contracts/miso_record_shop/deps/std/type_name.ts +22 -0
- package/src/contracts/miso_record_shop/listing.ts +602 -0
- package/src/contracts/miso_record_shop/witness.ts +11 -0
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +14 -16
- package/src/contracts.ts +5 -4
- package/src/deployments.ts +131 -38
- package/src/index.ts +2 -0
- package/src/mix.ts +910 -0
- package/src/pressing.ts +428 -423
- package/src/publication.ts +62 -33
- package/src/read/catalog.ts +49 -34
- package/src/read/config.ts +7 -7
- package/src/read/index.ts +9 -1
- package/src/read/internal/scalars.ts +4 -2
- package/src/read/internal/walrus.ts +2 -1
- package/src/read/receipts.ts +181 -66
- package/src/read/types.ts +35 -22
- package/src/read/wallet.ts +29 -50
- package/src/vault.ts +142 -32
- package/dist/contracts/miso_pressing/certificate.d.ts +0 -89
- package/dist/contracts/miso_pressing/certificate.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/certificate.js +0 -108
- package/dist/contracts/miso_pressing/certificate.js.map +0 -1
- package/dist/contracts/miso_pressing/deps/std/type_name.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/deps/std/type_name.js.map +0 -1
- package/dist/contracts/miso_pressing/listing.d.ts +0 -434
- package/dist/contracts/miso_pressing/listing.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/listing.js +0 -401
- package/dist/contracts/miso_pressing/listing.js.map +0 -1
- package/dist/contracts/miso_pressing/pressing.d.ts +0 -334
- package/dist/contracts/miso_pressing/pressing.d.ts.map +0 -1
- package/dist/contracts/miso_pressing/pressing.js +0 -298
- package/dist/contracts/miso_pressing/pressing.js.map +0 -1
- package/src/contracts/miso_pressing/certificate.ts +0 -164
- package/src/contracts/miso_pressing/listing.ts +0 -592
- package/src/contracts/miso_pressing/pressing.ts +0 -399
- /package/dist/contracts/{miso_pressing → miso_record}/deps/std/type_name.d.ts +0 -0
- /package/dist/contracts/{miso_pressing → miso_record}/deps/std/type_name.js +0 -0
- /package/src/contracts/{miso_pressing → miso_record}/deps/std/type_name.ts +0 -0
package/src/vault.ts
CHANGED
|
@@ -30,6 +30,9 @@ import * as routedStake from "./contracts/routed_stake/routed_stake.ts";
|
|
|
30
30
|
/** An object id resolved lazily when a transaction thunk is applied. */
|
|
31
31
|
export type ObjectInput = string | TransactionObjectArgument;
|
|
32
32
|
|
|
33
|
+
/** The framework singleton read by `balance::settled_funds_value`. */
|
|
34
|
+
export const SUI_ACCUMULATOR_ROOT_OBJECT_ID = "0xacc";
|
|
35
|
+
|
|
33
36
|
function object(tx: Transaction, value: ObjectInput): TransactionObjectArgument {
|
|
34
37
|
return typeof value === "string" ? tx.object(value) : value;
|
|
35
38
|
}
|
|
@@ -376,7 +379,6 @@ export interface CompositionRoyaltyPoolCrankParams {
|
|
|
376
379
|
readonly vault: TransactionObjectArgument;
|
|
377
380
|
readonly composition: TransactionObjectArgument;
|
|
378
381
|
readonly pool: TransactionObjectArgument;
|
|
379
|
-
readonly accumulatorRoot: TransactionObjectArgument;
|
|
380
382
|
readonly compositionShareType: string;
|
|
381
383
|
readonly currencyType: string;
|
|
382
384
|
readonly pluginPackageId: string;
|
|
@@ -385,6 +387,9 @@ export interface CompositionRoyaltyPoolCrankParams {
|
|
|
385
387
|
/** JSON-safe input for an on-chain u64. Numbers are rejected to prevent rounding. */
|
|
386
388
|
export type U64Input = bigint | string | number;
|
|
387
389
|
|
|
390
|
+
/** An exact scalar or the result of an earlier PTB command returning `u64`. */
|
|
391
|
+
export type U64Argument = U64Input | TransactionArgument;
|
|
392
|
+
|
|
388
393
|
/** Validate an SDK scalar before serializing it as a Move u64. */
|
|
389
394
|
export function asU64(name: string, value: U64Input): bigint {
|
|
390
395
|
if (typeof value === "number" && (!Number.isSafeInteger(value) || value < 0)) {
|
|
@@ -400,20 +405,79 @@ export function asU64(name: string, value: U64Input): bigint {
|
|
|
400
405
|
return parsed;
|
|
401
406
|
}
|
|
402
407
|
|
|
403
|
-
|
|
404
|
-
|
|
408
|
+
function asU64Argument(name: string, value: U64Argument): bigint | TransactionArgument {
|
|
409
|
+
if (
|
|
410
|
+
typeof value === "bigint" ||
|
|
411
|
+
typeof value === "string" ||
|
|
412
|
+
typeof value === "number"
|
|
413
|
+
) {
|
|
414
|
+
return asU64(name, value);
|
|
415
|
+
}
|
|
416
|
+
return value;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/** Read the commit-settled accumulator balance for an address inside this PTB. */
|
|
420
|
+
export function settledFundsValue(
|
|
405
421
|
tx: Transaction,
|
|
406
|
-
params:
|
|
422
|
+
params: {
|
|
423
|
+
readonly address: string | TransactionArgument;
|
|
424
|
+
readonly currencyType: string;
|
|
425
|
+
readonly accumulatorRoot?: ObjectInput;
|
|
426
|
+
},
|
|
427
|
+
): TransactionArgument {
|
|
428
|
+
return tx.moveCall({
|
|
429
|
+
target: "0x2::balance::settled_funds_value",
|
|
430
|
+
typeArguments: [params.currencyType],
|
|
431
|
+
arguments: [
|
|
432
|
+
object(tx, params.accumulatorRoot ?? SUI_ACCUMULATOR_ROOT_OBJECT_ID),
|
|
433
|
+
typeof params.address === "string"
|
|
434
|
+
? tx.pure.address(params.address)
|
|
435
|
+
: params.address,
|
|
436
|
+
],
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** Permissionless crank: redeem an exact Composition amount into its pool. */
|
|
441
|
+
export function redeemAndDepositCompositionRoyaltyPool(
|
|
442
|
+
tx: Transaction,
|
|
443
|
+
params: CompositionRoyaltyPoolCrankParams & {
|
|
444
|
+
readonly value: U64Argument;
|
|
445
|
+
},
|
|
407
446
|
): void {
|
|
408
447
|
tx.add(
|
|
409
|
-
compositionRoyaltyPool.
|
|
448
|
+
compositionRoyaltyPool.redeemAndDeposit({
|
|
410
449
|
package: params.pluginPackageId,
|
|
411
450
|
typeArguments: [params.compositionShareType, params.currencyType],
|
|
412
|
-
arguments: [
|
|
451
|
+
arguments: [
|
|
452
|
+
params.vault,
|
|
453
|
+
params.composition,
|
|
454
|
+
params.pool,
|
|
455
|
+
asU64Argument("value", params.value),
|
|
456
|
+
],
|
|
413
457
|
}),
|
|
414
458
|
);
|
|
415
459
|
}
|
|
416
460
|
|
|
461
|
+
/** Redeem exactly the framework-reported settled Composition funds. */
|
|
462
|
+
export function settleCompositionRoyaltyPool(
|
|
463
|
+
tx: Transaction,
|
|
464
|
+
params: Omit<CompositionRoyaltyPoolCrankParams, "composition"> & {
|
|
465
|
+
readonly compositionId: string;
|
|
466
|
+
readonly accumulatorRoot?: ObjectInput;
|
|
467
|
+
},
|
|
468
|
+
): void {
|
|
469
|
+
const value = settledFundsValue(tx, {
|
|
470
|
+
address: params.compositionId,
|
|
471
|
+
currencyType: params.currencyType,
|
|
472
|
+
accumulatorRoot: params.accumulatorRoot,
|
|
473
|
+
});
|
|
474
|
+
redeemAndDepositCompositionRoyaltyPool(tx, {
|
|
475
|
+
...params,
|
|
476
|
+
composition: tx.object(params.compositionId),
|
|
477
|
+
value,
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
|
|
417
481
|
/** Permissionless crank: receive selected Composition-owned coins into the pool. */
|
|
418
482
|
export function receiveCompositionRoyaltyPool(
|
|
419
483
|
tx: Transaction,
|
|
@@ -512,7 +576,7 @@ export function receivePartyWalletBalance(
|
|
|
512
576
|
/** Redeem an exact Party accumulator amount and return its Balance. */
|
|
513
577
|
export function redeemPartyWalletBalance(
|
|
514
578
|
tx: Transaction,
|
|
515
|
-
params: PartyWalletFundsParams & { readonly value:
|
|
579
|
+
params: PartyWalletFundsParams & { readonly value: U64Argument },
|
|
516
580
|
): TransactionArgument {
|
|
517
581
|
return tx.add(
|
|
518
582
|
partyWallet.redeemBalance({
|
|
@@ -522,31 +586,30 @@ export function redeemPartyWalletBalance(
|
|
|
522
586
|
params.vault,
|
|
523
587
|
params.party,
|
|
524
588
|
params.vaultAdminCap,
|
|
525
|
-
|
|
589
|
+
asU64Argument("value", params.value),
|
|
526
590
|
],
|
|
527
591
|
}),
|
|
528
592
|
);
|
|
529
593
|
}
|
|
530
594
|
|
|
531
|
-
/**
|
|
532
|
-
export function
|
|
595
|
+
/** Redeem exactly the framework-reported settled Party funds. */
|
|
596
|
+
export function settlePartyWalletBalance(
|
|
533
597
|
tx: Transaction,
|
|
534
|
-
params: PartyWalletFundsParams & {
|
|
535
|
-
readonly
|
|
598
|
+
params: Omit<PartyWalletFundsParams, "party"> & {
|
|
599
|
+
readonly partyId: string;
|
|
600
|
+
readonly accumulatorRoot?: ObjectInput;
|
|
536
601
|
},
|
|
537
602
|
): TransactionArgument {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
}),
|
|
549
|
-
);
|
|
603
|
+
const value = settledFundsValue(tx, {
|
|
604
|
+
address: params.partyId,
|
|
605
|
+
currencyType: params.currencyType,
|
|
606
|
+
accumulatorRoot: params.accumulatorRoot,
|
|
607
|
+
});
|
|
608
|
+
return redeemPartyWalletBalance(tx, {
|
|
609
|
+
...params,
|
|
610
|
+
party: tx.object(params.partyId),
|
|
611
|
+
value,
|
|
612
|
+
});
|
|
550
613
|
}
|
|
551
614
|
|
|
552
615
|
export function uninstallRecordingRoyaltyPoolPlugin(
|
|
@@ -602,31 +665,57 @@ export interface RecordingRoyaltyPoolCrankParams {
|
|
|
602
665
|
readonly vault: TransactionObjectArgument;
|
|
603
666
|
readonly recording: TransactionObjectArgument;
|
|
604
667
|
readonly pool: TransactionObjectArgument;
|
|
605
|
-
readonly accumulatorRoot: TransactionObjectArgument;
|
|
606
668
|
readonly recordingShareType: string;
|
|
607
669
|
readonly compositionShareType: string;
|
|
608
670
|
readonly currencyType: string;
|
|
609
671
|
readonly pluginPackageId: string;
|
|
610
672
|
}
|
|
611
673
|
|
|
612
|
-
/** Permissionless crank:
|
|
613
|
-
export function
|
|
674
|
+
/** Permissionless crank: redeem an exact Recording amount into its pool. */
|
|
675
|
+
export function redeemAndDepositRecordingRoyaltyPool(
|
|
614
676
|
tx: Transaction,
|
|
615
|
-
params: RecordingRoyaltyPoolCrankParams
|
|
677
|
+
params: RecordingRoyaltyPoolCrankParams & {
|
|
678
|
+
readonly value: U64Argument;
|
|
679
|
+
},
|
|
616
680
|
): void {
|
|
617
681
|
tx.add(
|
|
618
|
-
recordingRoyaltyPool.
|
|
682
|
+
recordingRoyaltyPool.redeemAndDeposit({
|
|
619
683
|
package: params.pluginPackageId,
|
|
620
684
|
typeArguments: [
|
|
621
685
|
params.recordingShareType,
|
|
622
686
|
params.compositionShareType,
|
|
623
687
|
params.currencyType,
|
|
624
688
|
],
|
|
625
|
-
arguments: [
|
|
689
|
+
arguments: [
|
|
690
|
+
params.vault,
|
|
691
|
+
params.recording,
|
|
692
|
+
params.pool,
|
|
693
|
+
asU64Argument("value", params.value),
|
|
694
|
+
],
|
|
626
695
|
}),
|
|
627
696
|
);
|
|
628
697
|
}
|
|
629
698
|
|
|
699
|
+
/** Redeem exactly the framework-reported settled Recording funds. */
|
|
700
|
+
export function settleRecordingRoyaltyPool(
|
|
701
|
+
tx: Transaction,
|
|
702
|
+
params: Omit<RecordingRoyaltyPoolCrankParams, "recording"> & {
|
|
703
|
+
readonly recordingId: string;
|
|
704
|
+
readonly accumulatorRoot?: ObjectInput;
|
|
705
|
+
},
|
|
706
|
+
): void {
|
|
707
|
+
const value = settledFundsValue(tx, {
|
|
708
|
+
address: params.recordingId,
|
|
709
|
+
currencyType: params.currencyType,
|
|
710
|
+
accumulatorRoot: params.accumulatorRoot,
|
|
711
|
+
});
|
|
712
|
+
redeemAndDepositRecordingRoyaltyPool(tx, {
|
|
713
|
+
...params,
|
|
714
|
+
recording: tx.object(params.recordingId),
|
|
715
|
+
value,
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
|
|
630
719
|
/** Permissionless crank: receive selected Recording-owned coins into the pool. */
|
|
631
720
|
export function receiveRecordingRoyaltyPool(
|
|
632
721
|
tx: Transaction,
|
|
@@ -681,18 +770,39 @@ export function redeemAndDistributeReleaseRevenue(
|
|
|
681
770
|
params: Omit<ReleaseRevenueDistributorPluginParams, "vaultAdminCap"> & {
|
|
682
771
|
readonly release: TransactionObjectArgument;
|
|
683
772
|
readonly currencyType: string;
|
|
684
|
-
readonly value:
|
|
773
|
+
readonly value: U64Argument;
|
|
685
774
|
},
|
|
686
775
|
): void {
|
|
687
776
|
tx.add(
|
|
688
777
|
releaseRevenueDistributor.redeemAndDistribute({
|
|
689
778
|
package: params.pluginPackageId,
|
|
690
779
|
typeArguments: [params.currencyType],
|
|
691
|
-
arguments: [params.vault, params.release,
|
|
780
|
+
arguments: [params.vault, params.release, asU64Argument("value", params.value)],
|
|
692
781
|
}),
|
|
693
782
|
);
|
|
694
783
|
}
|
|
695
784
|
|
|
785
|
+
/** Redeem exactly the framework-reported settled Release funds and route them. */
|
|
786
|
+
export function settleAndDistributeReleaseRevenue(
|
|
787
|
+
tx: Transaction,
|
|
788
|
+
params: Omit<ReleaseRevenueDistributorPluginParams, "vaultAdminCap"> & {
|
|
789
|
+
readonly releaseId: string;
|
|
790
|
+
readonly currencyType: string;
|
|
791
|
+
readonly accumulatorRoot?: ObjectInput;
|
|
792
|
+
},
|
|
793
|
+
): void {
|
|
794
|
+
const value = settledFundsValue(tx, {
|
|
795
|
+
address: params.releaseId,
|
|
796
|
+
currencyType: params.currencyType,
|
|
797
|
+
accumulatorRoot: params.accumulatorRoot,
|
|
798
|
+
});
|
|
799
|
+
redeemAndDistributeReleaseRevenue(tx, {
|
|
800
|
+
...params,
|
|
801
|
+
release: tx.object(params.releaseId),
|
|
802
|
+
value,
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
|
|
696
806
|
/** Permissionless crank: receive release-owned coins and route them by track BPS. */
|
|
697
807
|
export function receiveAndDistributeReleaseRevenue(
|
|
698
808
|
tx: Transaction,
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
/**
|
|
5
|
-
* Immutable provenance for a record pressed by `miso_pressing`.
|
|
6
|
-
*
|
|
7
|
-
* `Certificate` is embedded in `Record<Certificate>`, never attached as a dynamic
|
|
8
|
-
* field. Its private fields and package-only constructor mean an external package
|
|
9
|
-
* cannot construct this certificate or mint the trusted record specialization.
|
|
10
|
-
*/
|
|
11
|
-
import { MoveStruct } from '../utils/index.js';
|
|
12
|
-
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
13
|
-
export declare const Certificate: MoveStruct<{
|
|
14
|
-
/** The object whose derived-UID namespace issued this record. */
|
|
15
|
-
parent_id: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
16
|
-
/** Position in the pressing's run (1-based). */
|
|
17
|
-
number: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
18
|
-
/** The transaction sender that purchased the record from its listing. */
|
|
19
|
-
purchased_by: import("@mysten/sui/bcs").BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
20
|
-
/** The currency type the buyer paid in. */
|
|
21
|
-
purchase_currency: MoveStruct<{
|
|
22
|
-
name: import("@mysten/sui/bcs").BcsType<string, string, "string">;
|
|
23
|
-
}, "std::type_name::TypeName">;
|
|
24
|
-
/** The exact amount paid. Under a floor price this includes any tip above it. */
|
|
25
|
-
purchase_price: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
26
|
-
/** The timestamp stamped from the shared Clock on the pressing path. */
|
|
27
|
-
created_at_ms: import("@mysten/sui/bcs").BcsType<string, string | number | bigint, "u64">;
|
|
28
|
-
}, "@local-pkg/miso_pressing::certificate::Certificate">;
|
|
29
|
-
export interface ParentIdArguments {
|
|
30
|
-
self: TransactionArgument;
|
|
31
|
-
}
|
|
32
|
-
export interface ParentIdOptions {
|
|
33
|
-
package?: string;
|
|
34
|
-
arguments: ParentIdArguments | [
|
|
35
|
-
self: TransactionArgument
|
|
36
|
-
];
|
|
37
|
-
}
|
|
38
|
-
export declare function parentId(options: ParentIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
39
|
-
export interface NumberArguments {
|
|
40
|
-
self: TransactionArgument;
|
|
41
|
-
}
|
|
42
|
-
export interface NumberOptions {
|
|
43
|
-
package?: string;
|
|
44
|
-
arguments: NumberArguments | [
|
|
45
|
-
self: TransactionArgument
|
|
46
|
-
];
|
|
47
|
-
}
|
|
48
|
-
export declare function number(options: NumberOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
49
|
-
export interface PurchasedByArguments {
|
|
50
|
-
self: TransactionArgument;
|
|
51
|
-
}
|
|
52
|
-
export interface PurchasedByOptions {
|
|
53
|
-
package?: string;
|
|
54
|
-
arguments: PurchasedByArguments | [
|
|
55
|
-
self: TransactionArgument
|
|
56
|
-
];
|
|
57
|
-
}
|
|
58
|
-
export declare function purchasedBy(options: PurchasedByOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
59
|
-
export interface PurchaseCurrencyArguments {
|
|
60
|
-
self: TransactionArgument;
|
|
61
|
-
}
|
|
62
|
-
export interface PurchaseCurrencyOptions {
|
|
63
|
-
package?: string;
|
|
64
|
-
arguments: PurchaseCurrencyArguments | [
|
|
65
|
-
self: TransactionArgument
|
|
66
|
-
];
|
|
67
|
-
}
|
|
68
|
-
export declare function purchaseCurrency(options: PurchaseCurrencyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
69
|
-
export interface PurchasePriceArguments {
|
|
70
|
-
self: TransactionArgument;
|
|
71
|
-
}
|
|
72
|
-
export interface PurchasePriceOptions {
|
|
73
|
-
package?: string;
|
|
74
|
-
arguments: PurchasePriceArguments | [
|
|
75
|
-
self: TransactionArgument
|
|
76
|
-
];
|
|
77
|
-
}
|
|
78
|
-
export declare function purchasePrice(options: PurchasePriceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
79
|
-
export interface CreatedAtMsArguments {
|
|
80
|
-
self: TransactionArgument;
|
|
81
|
-
}
|
|
82
|
-
export interface CreatedAtMsOptions {
|
|
83
|
-
package?: string;
|
|
84
|
-
arguments: CreatedAtMsArguments | [
|
|
85
|
-
self: TransactionArgument
|
|
86
|
-
];
|
|
87
|
-
}
|
|
88
|
-
export declare function createdAtMs(options: CreatedAtMsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
89
|
-
//# sourceMappingURL=certificate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../../src/contracts/miso_pressing/certificate.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAA0B,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,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OAAO,EAAE,uBAAuB,IAMrD,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,sBAAsB;IACnC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,oBAAoB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,sBAAsB,GAAG;QAChC,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,IAM/C,IAAI,WAAW,0DAM1B;AACD,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE,mBAAmB,CAAC;CAC7B;AACD,MAAM,WAAW,kBAAkB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,oBAAoB,GAAG;QAC9B,IAAI,EAAE,mBAAmB;KAC5B,CAAC;CACL;AACD,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,IAM3C,IAAI,WAAW,0DAM1B"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
/**************************************************************
|
|
2
|
-
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
-
**************************************************************/
|
|
4
|
-
/**
|
|
5
|
-
* Immutable provenance for a record pressed by `miso_pressing`.
|
|
6
|
-
*
|
|
7
|
-
* `Certificate` is embedded in `Record<Certificate>`, never attached as a dynamic
|
|
8
|
-
* field. Its private fields and package-only constructor mean an external package
|
|
9
|
-
* cannot construct this certificate or mint the trusted record specialization.
|
|
10
|
-
*/
|
|
11
|
-
import { MoveStruct, normalizeMoveArguments } from '../utils/index.js';
|
|
12
|
-
import { bcs } from '@mysten/sui/bcs';
|
|
13
|
-
import {} from '@mysten/sui/transactions';
|
|
14
|
-
import * as type_name from './deps/std/type_name.js';
|
|
15
|
-
const $moduleName = '@local-pkg/miso_pressing::certificate';
|
|
16
|
-
export const Certificate = new MoveStruct({ name: `${$moduleName}::Certificate`, fields: {
|
|
17
|
-
/** The object whose derived-UID namespace issued this record. */
|
|
18
|
-
parent_id: bcs.Address,
|
|
19
|
-
/** Position in the pressing's run (1-based). */
|
|
20
|
-
number: bcs.u64(),
|
|
21
|
-
/** The transaction sender that purchased the record from its listing. */
|
|
22
|
-
purchased_by: bcs.Address,
|
|
23
|
-
/** The currency type the buyer paid in. */
|
|
24
|
-
purchase_currency: type_name.TypeName,
|
|
25
|
-
/** The exact amount paid. Under a floor price this includes any tip above it. */
|
|
26
|
-
purchase_price: bcs.u64(),
|
|
27
|
-
/** The timestamp stamped from the shared Clock on the pressing path. */
|
|
28
|
-
created_at_ms: bcs.u64()
|
|
29
|
-
} });
|
|
30
|
-
export function parentId(options) {
|
|
31
|
-
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
32
|
-
const argumentsTypes = [
|
|
33
|
-
null
|
|
34
|
-
];
|
|
35
|
-
const parameterNames = ["self"];
|
|
36
|
-
return (tx) => tx.moveCall({
|
|
37
|
-
package: packageAddress,
|
|
38
|
-
module: 'certificate',
|
|
39
|
-
function: 'parent_id',
|
|
40
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
export function number(options) {
|
|
44
|
-
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
45
|
-
const argumentsTypes = [
|
|
46
|
-
null
|
|
47
|
-
];
|
|
48
|
-
const parameterNames = ["self"];
|
|
49
|
-
return (tx) => tx.moveCall({
|
|
50
|
-
package: packageAddress,
|
|
51
|
-
module: 'certificate',
|
|
52
|
-
function: 'number',
|
|
53
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
export function purchasedBy(options) {
|
|
57
|
-
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
58
|
-
const argumentsTypes = [
|
|
59
|
-
null
|
|
60
|
-
];
|
|
61
|
-
const parameterNames = ["self"];
|
|
62
|
-
return (tx) => tx.moveCall({
|
|
63
|
-
package: packageAddress,
|
|
64
|
-
module: 'certificate',
|
|
65
|
-
function: 'purchased_by',
|
|
66
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
export function purchaseCurrency(options) {
|
|
70
|
-
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
71
|
-
const argumentsTypes = [
|
|
72
|
-
null
|
|
73
|
-
];
|
|
74
|
-
const parameterNames = ["self"];
|
|
75
|
-
return (tx) => tx.moveCall({
|
|
76
|
-
package: packageAddress,
|
|
77
|
-
module: 'certificate',
|
|
78
|
-
function: 'purchase_currency',
|
|
79
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
export function purchasePrice(options) {
|
|
83
|
-
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
84
|
-
const argumentsTypes = [
|
|
85
|
-
null
|
|
86
|
-
];
|
|
87
|
-
const parameterNames = ["self"];
|
|
88
|
-
return (tx) => tx.moveCall({
|
|
89
|
-
package: packageAddress,
|
|
90
|
-
module: 'certificate',
|
|
91
|
-
function: 'purchase_price',
|
|
92
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
export function createdAtMs(options) {
|
|
96
|
-
const packageAddress = options.package ?? '@local-pkg/miso_pressing';
|
|
97
|
-
const argumentsTypes = [
|
|
98
|
-
null
|
|
99
|
-
];
|
|
100
|
-
const parameterNames = ["self"];
|
|
101
|
-
return (tx) => tx.moveCall({
|
|
102
|
-
package: packageAddress,
|
|
103
|
-
module: 'certificate',
|
|
104
|
-
function: 'created_at_ms',
|
|
105
|
-
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=certific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;AAGhE,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGrD,eAAO,MAAM,QAAQ;IACb;;;;;;;;SAQK;;8BAEL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"type_name.js","sourceRoot":"","sources":["../../../../../src/contracts/miso_pressing/deps/std/type_name.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE,0EAA0E;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,MAAM,WAAW,GAAG,gBAAgB,CAAC;AACrC,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,YAAY,EAAE,MAAM,EAAE;QAC3E;;;;;;;;aAQK;QACL,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE;KACrB,EAAE,CAAC,CAAC"}
|