@misofm/sdk 0.9.0 → 0.10.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 +88 -56
- package/dist/client.d.ts +126 -18
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +210 -44
- package/dist/client.js.map +1 -1
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts +205 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.d.ts.map +1 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js +184 -0
- package/dist/contracts/composition_routed_stake/composition_routed_stake.js.map +1 -0
- package/dist/contracts/composition_routed_stake/witness.d.ts +7 -0
- package/dist/contracts/composition_routed_stake/witness.d.ts.map +1 -0
- package/dist/contracts/composition_routed_stake/witness.js +9 -0
- package/dist/contracts/composition_routed_stake/witness.js.map +1 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +89 -28
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +84 -23
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -1
- package/dist/contracts/composition_royalty_pool/witness.d.ts +6 -0
- package/dist/contracts/composition_royalty_pool/witness.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool/witness.js +8 -0
- package/dist/contracts/composition_royalty_pool/witness.js.map +1 -0
- package/dist/contracts/genre/genre.d.ts +96 -0
- package/dist/contracts/genre/genre.d.ts.map +1 -0
- package/dist/contracts/genre/genre.js +107 -0
- package/dist/contracts/genre/genre.js.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts +194 -0
- package/dist/contracts/recording_advisory/recording_advisory.d.ts.map +1 -0
- package/dist/contracts/recording_advisory/recording_advisory.js +204 -0
- package/dist/contracts/recording_advisory/recording_advisory.js.map +1 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts +6 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.d.ts.map +1 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.js +8 -0
- package/dist/contracts/recording_language/deps/language_code/language_code.js.map +1 -0
- package/dist/contracts/recording_language/recording_language.d.ts +152 -0
- package/dist/contracts/recording_language/recording_language.d.ts.map +1 -0
- package/dist/contracts/recording_language/recording_language.js +149 -0
- package/dist/contracts/recording_language/recording_language.js.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/recording_master_reference/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts +131 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.d.ts.map +1 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js +121 -0
- package/dist/contracts/recording_master_reference/recording_master_reference.js.map +1 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/recording_preview/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/recording_preview/recording_preview.d.ts +104 -0
- package/dist/contracts/recording_preview/recording_preview.d.ts.map +1 -0
- package/dist/contracts/recording_preview/recording_preview.js +94 -0
- package/dist/contracts/recording_preview/recording_preview.js.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +90 -28
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -1
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +84 -23
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -1
- package/dist/contracts/recording_royalty_pool/witness.d.ts +6 -0
- package/dist/contracts/recording_royalty_pool/witness.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool/witness.js +8 -0
- package/dist/contracts/recording_royalty_pool/witness.js.map +1 -0
- package/dist/contracts/release_description/release_description.d.ts +112 -0
- package/dist/contracts/release_description/release_description.d.ts.map +1 -0
- package/dist/contracts/release_description/release_description.js +123 -0
- package/dist/contracts/release_description/release_description.js.map +1 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts +644 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.d.ts.map +1 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js +556 -0
- package/dist/contracts/release_dsp_link/release_dsp_link.js.map +1 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts +33 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.d.ts.map +1 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.js +32 -0
- package/dist/contracts/release_genre/deps/per_track/per_track.js.map +1 -0
- package/dist/contracts/release_genre/release_genre.d.ts +193 -0
- package/dist/contracts/release_genre/release_genre.d.ts.map +1 -0
- package/dist/contracts/release_genre/release_genre.js +207 -0
- package/dist/contracts/release_genre/release_genre.js.map +1 -0
- package/dist/contracts/release_kind/release_kind.d.ts +98 -0
- package/dist/contracts/release_kind/release_kind.d.ts.map +1 -0
- package/dist/contracts/release_kind/release_kind.js +109 -0
- package/dist/contracts/release_kind/release_kind.js.map +1 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts +106 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js +113 -0
- package/dist/contracts/release_revenue_distributor/release_revenue_distributor.js.map +1 -0
- package/dist/contracts/release_revenue_distributor/witness.d.ts +7 -0
- package/dist/contracts/release_revenue_distributor/witness.d.ts.map +1 -0
- package/dist/contracts/release_revenue_distributor/witness.js +9 -0
- package/dist/contracts/release_revenue_distributor/witness.js.map +1 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/release_snapshot_bundle/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts +91 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.d.ts.map +1 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js +91 -0
- package/dist/contracts/release_snapshot_bundle/release_snapshot_bundle.js.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts +54 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js +37 -0
- package/dist/contracts/routed_stake/deps/royalty_pool/stake.js.map +1 -0
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/routed_stake/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/std/type_name.js +20 -0
- package/dist/contracts/routed_stake/deps/std/type_name.js.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts +13 -0
- package/dist/contracts/routed_stake/deps/sui/balance.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/balance.js +15 -0
- package/dist/contracts/routed_stake/deps/sui/balance.js.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.js +28 -0
- package/dist/contracts/routed_stake/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts +356 -0
- package/dist/contracts/routed_stake/routed_stake.d.ts.map +1 -0
- package/dist/contracts/routed_stake/routed_stake.js +311 -0
- package/dist/contracts/routed_stake/routed_stake.js.map +1 -0
- package/dist/contracts/royalty_pool/pool.d.ts +27 -17
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -1
- package/dist/contracts/royalty_pool/pool.js +26 -17
- package/dist/contracts/royalty_pool/pool.js.map +1 -1
- package/dist/contracts/vault/deps/sui/bag.d.ts +35 -0
- package/dist/contracts/vault/deps/sui/bag.d.ts.map +1 -0
- package/dist/contracts/vault/deps/sui/bag.js +37 -0
- package/dist/contracts/vault/deps/sui/bag.js.map +1 -0
- package/dist/contracts/vault/deps/sui/borrow.d.ts +20 -0
- package/dist/contracts/vault/deps/sui/borrow.d.ts.map +1 -0
- package/dist/contracts/vault/deps/sui/borrow.js +21 -0
- package/dist/contracts/vault/deps/sui/borrow.js.map +1 -0
- package/dist/contracts/vault/vault.d.ts +276 -0
- package/dist/contracts/vault/vault.d.ts.map +1 -0
- package/dist/contracts/vault/vault.js +274 -0
- package/dist/contracts/vault/vault.js.map +1 -0
- package/dist/contracts.d.ts +14 -2
- package/dist/contracts.d.ts.map +1 -1
- package/dist/contracts.js +16 -7
- package/dist/contracts.js.map +1 -1
- package/dist/cover.d.ts +17 -3
- package/dist/cover.d.ts.map +1 -1
- package/dist/cover.js +43 -20
- package/dist/cover.js.map +1 -1
- package/dist/credits.d.ts +31 -12
- package/dist/credits.d.ts.map +1 -1
- package/dist/credits.js +41 -25
- package/dist/credits.js.map +1 -1
- package/dist/deployments.d.ts +31 -57
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +5 -53
- package/dist/deployments.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/pressing.d.ts +8 -7
- package/dist/pressing.d.ts.map +1 -1
- package/dist/pressing.js +91 -32
- package/dist/pressing.js.map +1 -1
- package/dist/read/artist.js +3 -3
- package/dist/read/artist.js.map +1 -1
- package/dist/read/catalog.d.ts +14 -9
- package/dist/read/catalog.d.ts.map +1 -1
- package/dist/read/catalog.js +71 -37
- package/dist/read/catalog.js.map +1 -1
- package/dist/read/client.d.ts +4 -2
- package/dist/read/client.d.ts.map +1 -1
- package/dist/read/client.js +15 -4
- package/dist/read/client.js.map +1 -1
- package/dist/read/config.d.ts +14 -11
- package/dist/read/config.d.ts.map +1 -1
- package/dist/read/config.js +10 -37
- package/dist/read/config.js.map +1 -1
- package/dist/read/index.d.ts +2 -2
- 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/receipts.d.ts +24 -7
- package/dist/read/receipts.d.ts.map +1 -1
- package/dist/read/receipts.js +78 -25
- package/dist/read/receipts.js.map +1 -1
- package/dist/read/types.d.ts +43 -25
- package/dist/read/types.d.ts.map +1 -1
- package/dist/read/types.js +2 -2
- package/dist/read/types.js.map +1 -1
- package/dist/recording-extensions.d.ts +37 -0
- package/dist/recording-extensions.d.ts.map +1 -0
- package/dist/recording-extensions.js +61 -0
- package/dist/recording-extensions.js.map +1 -0
- package/dist/release-extensions.d.ts +92 -0
- package/dist/release-extensions.d.ts.map +1 -0
- package/dist/release-extensions.js +175 -0
- package/dist/release-extensions.js.map +1 -0
- package/dist/release-graph.d.ts +17 -26
- package/dist/release-graph.d.ts.map +1 -1
- package/dist/release-graph.js +55 -49
- package/dist/release-graph.js.map +1 -1
- package/dist/transactions.d.ts +43 -24
- package/dist/transactions.d.ts.map +1 -1
- package/dist/transactions.js +48 -27
- package/dist/transactions.js.map +1 -1
- package/dist/vault.d.ts +268 -0
- package/dist/vault.d.ts.map +1 -0
- package/dist/vault.js +389 -0
- package/dist/vault.js.map +1 -0
- package/package.json +17 -11
- package/src/client.ts +428 -61
- package/src/contracts/composition_routed_stake/composition_routed_stake.ts +346 -0
- package/src/contracts/composition_routed_stake/witness.ts +11 -0
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +151 -35
- package/src/contracts/composition_royalty_pool/witness.ts +7 -0
- package/src/contracts/genre/genre.ts +151 -0
- package/src/contracts/recording_advisory/recording_advisory.ts +315 -0
- package/src/contracts/recording_language/deps/language_code/language_code.ts +7 -0
- package/src/contracts/recording_language/recording_language.ts +237 -0
- package/src/contracts/recording_master_reference/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/recording_master_reference/recording_master_reference.ts +181 -0
- package/src/contracts/recording_preview/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/recording_preview/recording_preview.ts +154 -0
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +152 -35
- package/src/contracts/recording_royalty_pool/witness.ts +7 -0
- package/src/contracts/release_description/release_description.ts +167 -0
- package/src/contracts/release_dsp_link/release_dsp_link.ts +813 -0
- package/src/contracts/release_genre/deps/per_track/per_track.ts +36 -0
- package/src/contracts/release_genre/release_genre.ts +314 -0
- package/src/contracts/release_kind/release_kind.ts +153 -0
- package/src/contracts/release_revenue_distributor/release_revenue_distributor.ts +178 -0
- package/src/contracts/release_revenue_distributor/witness.ts +11 -0
- package/src/contracts/release_snapshot_bundle/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/release_snapshot_bundle/release_snapshot_bundle.ts +124 -0
- package/src/contracts/routed_stake/deps/royalty_pool/stake.ts +39 -0
- package/src/contracts/routed_stake/deps/std/type_name.ts +22 -0
- package/src/contracts/routed_stake/deps/sui/balance.ts +17 -0
- package/src/contracts/routed_stake/deps/sui/vec_map.ts +33 -0
- package/src/contracts/routed_stake/routed_stake.ts +508 -0
- package/src/contracts/royalty_pool/pool.ts +34 -24
- package/src/contracts/vault/deps/sui/bag.ts +39 -0
- package/src/contracts/vault/deps/sui/borrow.ts +25 -0
- package/src/contracts/vault/vault.ts +454 -0
- package/src/contracts.ts +17 -9
- package/src/cover.ts +62 -37
- package/src/credits.ts +64 -51
- package/src/deployments.ts +36 -97
- package/src/index.ts +11 -5
- package/src/pressing.ts +135 -39
- package/src/read/artist.ts +3 -3
- package/src/read/catalog.ts +99 -44
- package/src/read/client.ts +20 -4
- package/src/read/config.ts +23 -49
- package/src/read/index.ts +3 -1
- package/src/read/receipts.ts +103 -26
- package/src/read/types.ts +44 -27
- package/src/recording-extensions.ts +102 -0
- package/src/release-extensions.ts +286 -0
- package/src/release-graph.ts +68 -81
- package/src/transactions.ts +79 -53
- package/src/vault.ts +777 -0
- package/dist/contracts/miso_drop/drop.d.ts +0 -550
- package/dist/contracts/miso_drop/drop.d.ts.map +0 -1
- package/dist/contracts/miso_drop/drop.js +0 -523
- package/dist/contracts/miso_drop/drop.js.map +0 -1
- package/dist/contracts/release_registry/release_registry.d.ts +0 -114
- package/dist/contracts/release_registry/release_registry.d.ts.map +0 -1
- package/dist/contracts/release_registry/release_registry.js +0 -119
- package/dist/contracts/release_registry/release_registry.js.map +0 -1
- package/dist/drop.d.ts +0 -127
- package/dist/drop.d.ts.map +0 -1
- package/dist/drop.js +0 -202
- package/dist/drop.js.map +0 -1
- package/dist/extensions/royalty-pool.d.ts +0 -32
- package/dist/extensions/royalty-pool.d.ts.map +0 -1
- package/dist/extensions/royalty-pool.js +0 -33
- package/dist/extensions/royalty-pool.js.map +0 -1
- package/src/contracts/miso_drop/drop.ts +0 -798
- package/src/contracts/release_registry/release_registry.ts +0 -160
- package/src/drop.ts +0 -376
- package/src/extensions/royalty-pool.ts +0 -90
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A simple library that enables hot-potato-locked borrow mechanics.
|
|
6
|
+
*
|
|
7
|
+
* With Programmable transactions, it is possible to borrow a value within a
|
|
8
|
+
* transaction, use it and put back in the end. Hot-potato `Borrow` makes sure the
|
|
9
|
+
* object is returned and was not swapped for another one.
|
|
10
|
+
*/
|
|
11
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
12
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
13
|
+
/** An object wrapping a `T` and providing the borrow API. */
|
|
14
|
+
export declare function Referent<T extends BcsType<any>>(...typeParameters: [
|
|
15
|
+
T
|
|
16
|
+
]): MoveStruct<{
|
|
17
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
18
|
+
value: BcsType<import("@mysten/bcs").InferBcsType<T> | null, import("@mysten/bcs").InferBcsInput<T> | null | undefined, `Option<${T["name"]}>`>;
|
|
19
|
+
}, `0x2::borrow::Referent<${T["name"]}>`>;
|
|
20
|
+
//# sourceMappingURL=borrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borrow.d.ts","sourceRoot":"","sources":["../../../../../src/contracts/vault/deps/sui/borrow.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAO,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,6DAA6D;AAC7D,wBAAgB,QAAQ,CAAC,CAAC,SAAS,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,cAAc,EAAE;IAChE,CAAC;CACJ;;;0CAKA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* A simple library that enables hot-potato-locked borrow mechanics.
|
|
6
|
+
*
|
|
7
|
+
* With Programmable transactions, it is possible to borrow a value within a
|
|
8
|
+
* transaction, use it and put back in the end. Hot-potato `Borrow` makes sure the
|
|
9
|
+
* object is returned and was not swapped for another one.
|
|
10
|
+
*/
|
|
11
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
12
|
+
import { MoveStruct } from '../../../utils/index.js';
|
|
13
|
+
const $moduleName = '0x2::borrow';
|
|
14
|
+
/** An object wrapping a `T` and providing the borrow API. */
|
|
15
|
+
export function Referent(...typeParameters) {
|
|
16
|
+
return new MoveStruct({ name: `${$moduleName}::Referent<${typeParameters[0].name}>`, fields: {
|
|
17
|
+
id: bcs.Address,
|
|
18
|
+
value: bcs.option(typeParameters[0])
|
|
19
|
+
} });
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=borrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"borrow.js","sourceRoot":"","sources":["../../../../../src/contracts/vault/deps/sui/borrow.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;GAMG;AAEH,OAAO,EAAgB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,6DAA6D;AAC7D,MAAM,UAAU,QAAQ,CAAyB,GAAG,cAEnD;IACG,OAAO,IAAI,UAAU,CAAC,EAAE,IAAI,EAAE,GAAG,WAAW,cAAc,cAAc,CAAC,CAAC,CAAC,CAAC,IAAiB,GAAG,EAAE,MAAM,EAAE;YAClG,EAAE,EAAE,GAAG,CAAC,OAAO;YACf,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;SACvC,EAAE,CAAC,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Generic capability custody and plugin authorization.
|
|
6
|
+
*
|
|
7
|
+
* `Vault<Cap>` holds a capability in a Sui `Referent`. An authorized plugin
|
|
8
|
+
* receives the whole capability temporarily, paired with a hot-potato `Borrow`
|
|
9
|
+
* receipt that forces the same capability back into the same vault before the
|
|
10
|
+
* transaction can finish. Plugin authorization is represented by a typed dynamic
|
|
11
|
+
* field in the vault's `Bag`.
|
|
12
|
+
*/
|
|
13
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
14
|
+
import { MoveStruct, MoveTuple, type RawTransactionArgument } from '../utils/index.js';
|
|
15
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
16
|
+
/**
|
|
17
|
+
* Custodies one capability and the typed authorization records for plugins.
|
|
18
|
+
*
|
|
19
|
+
* `Vault` intentionally lacks `store`: only this module can share or destroy it.
|
|
20
|
+
* The wrapped capability is never exposed except through a hot-potato borrow that
|
|
21
|
+
* requires its exact return.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Vault<Cap extends BcsType<any>>(...typeParameters: [
|
|
24
|
+
Cap
|
|
25
|
+
]): MoveStruct<{
|
|
26
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
27
|
+
cap: MoveStruct<{
|
|
28
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
29
|
+
value: BcsType<import("@mysten/bcs").InferBcsType<Cap> | null, import("@mysten/bcs").InferBcsInput<Cap> | null | undefined, `Option<${Cap["name"]}>`>;
|
|
30
|
+
}, `0x2::borrow::Referent<${Cap["name"]}>`>;
|
|
31
|
+
authorized_plugins: MoveStruct<{
|
|
32
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
33
|
+
size: BcsType<string, string | number | bigint, "u64">;
|
|
34
|
+
}, "0x2::bag::Bag">;
|
|
35
|
+
}, `@local-pkg/vault::vault::Vault<${Cap["name"]}>`>;
|
|
36
|
+
export declare const VaultAdminCap: MoveStruct<{
|
|
37
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
38
|
+
vault_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
39
|
+
}, "@local-pkg/vault::vault::VaultAdminCap<phantom Cap>">;
|
|
40
|
+
export declare const AuthorizedPluginKey: MoveTuple<readonly [BcsType<boolean, boolean, "bool">], "@local-pkg/vault::vault::AuthorizedPluginKey<phantom Witness>">;
|
|
41
|
+
export declare const VaultCreatedEvent: MoveStruct<{
|
|
42
|
+
vault_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
43
|
+
vault_admin_cap_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
44
|
+
wrapped_cap_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
45
|
+
authorized_plugins_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
46
|
+
}, "@local-pkg/vault::vault::VaultCreatedEvent<phantom Cap>">;
|
|
47
|
+
export declare const PluginAuthorizedEvent: MoveStruct<{
|
|
48
|
+
vault_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
49
|
+
}, "@local-pkg/vault::vault::PluginAuthorizedEvent<phantom Cap, phantom Witness>">;
|
|
50
|
+
export declare const PluginRevokedEvent: MoveStruct<{
|
|
51
|
+
vault_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
52
|
+
}, "@local-pkg/vault::vault::PluginRevokedEvent<phantom Cap, phantom Witness>">;
|
|
53
|
+
export declare const VaultDestroyedEvent: MoveStruct<{
|
|
54
|
+
vault_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
55
|
+
wrapped_cap_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
56
|
+
}, "@local-pkg/vault::vault::VaultDestroyedEvent<phantom Cap>">;
|
|
57
|
+
export interface NewArguments<Cap extends BcsType<any>> {
|
|
58
|
+
cap: RawTransactionArgument<Cap>;
|
|
59
|
+
}
|
|
60
|
+
export interface NewOptions<Cap extends BcsType<any>> {
|
|
61
|
+
package?: string;
|
|
62
|
+
arguments: NewArguments<Cap> | [
|
|
63
|
+
cap: RawTransactionArgument<Cap>
|
|
64
|
+
];
|
|
65
|
+
typeArguments: [
|
|
66
|
+
string
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
/** Custody `cap` and create its vault-specific administrator capability. */
|
|
70
|
+
export declare function _new<Cap extends BcsType<any>>(options: NewOptions<Cap>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
71
|
+
export interface ShareArguments {
|
|
72
|
+
vault: RawTransactionArgument<string>;
|
|
73
|
+
}
|
|
74
|
+
export interface ShareOptions {
|
|
75
|
+
package?: string;
|
|
76
|
+
arguments: ShareArguments | [
|
|
77
|
+
vault: RawTransactionArgument<string>
|
|
78
|
+
];
|
|
79
|
+
typeArguments: [
|
|
80
|
+
string
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
/** Share a newly-created vault. */
|
|
84
|
+
export declare function share(options: ShareOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
85
|
+
export interface DestroyArguments {
|
|
86
|
+
self: RawTransactionArgument<string>;
|
|
87
|
+
adminCap: RawTransactionArgument<string>;
|
|
88
|
+
}
|
|
89
|
+
export interface DestroyOptions {
|
|
90
|
+
package?: string;
|
|
91
|
+
arguments: DestroyArguments | [
|
|
92
|
+
self: RawTransactionArgument<string>,
|
|
93
|
+
adminCap: RawTransactionArgument<string>
|
|
94
|
+
];
|
|
95
|
+
typeArguments: [
|
|
96
|
+
string
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
/** Destroy an empty vault and return the exact capability it custodied. */
|
|
100
|
+
export declare function destroy(options: DestroyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
101
|
+
export interface AuthorizePluginArguments<Witness extends BcsType<any>> {
|
|
102
|
+
self: RawTransactionArgument<string>;
|
|
103
|
+
adminCap: RawTransactionArgument<string>;
|
|
104
|
+
_: RawTransactionArgument<Witness>;
|
|
105
|
+
}
|
|
106
|
+
export interface AuthorizePluginOptions<Witness extends BcsType<any>> {
|
|
107
|
+
package?: string;
|
|
108
|
+
arguments: AuthorizePluginArguments<Witness> | [
|
|
109
|
+
self: RawTransactionArgument<string>,
|
|
110
|
+
adminCap: RawTransactionArgument<string>,
|
|
111
|
+
_: RawTransactionArgument<Witness>
|
|
112
|
+
];
|
|
113
|
+
typeArguments: [
|
|
114
|
+
string,
|
|
115
|
+
string
|
|
116
|
+
];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Authorize the package identified by its canonical `witness::Witness` type.
|
|
120
|
+
*
|
|
121
|
+
* The witness is consumed here. A plugin should construct it with a package-only
|
|
122
|
+
* `witness::new()` function.
|
|
123
|
+
*/
|
|
124
|
+
export declare function authorizePlugin<Witness extends BcsType<any>>(options: AuthorizePluginOptions<Witness>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
125
|
+
export interface RevokePluginArguments {
|
|
126
|
+
self: RawTransactionArgument<string>;
|
|
127
|
+
adminCap: RawTransactionArgument<string>;
|
|
128
|
+
}
|
|
129
|
+
export interface RevokePluginOptions {
|
|
130
|
+
package?: string;
|
|
131
|
+
arguments: RevokePluginArguments | [
|
|
132
|
+
self: RawTransactionArgument<string>,
|
|
133
|
+
adminCap: RawTransactionArgument<string>
|
|
134
|
+
];
|
|
135
|
+
typeArguments: [
|
|
136
|
+
string,
|
|
137
|
+
string
|
|
138
|
+
];
|
|
139
|
+
}
|
|
140
|
+
/** Revoke a plugin authorization without requiring cooperation from the plugin. */
|
|
141
|
+
export declare function revokePlugin(options: RevokePluginOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
142
|
+
export interface BorrowAsPluginArguments<Witness extends BcsType<any>> {
|
|
143
|
+
self: RawTransactionArgument<string>;
|
|
144
|
+
_: RawTransactionArgument<Witness>;
|
|
145
|
+
}
|
|
146
|
+
export interface BorrowAsPluginOptions<Witness extends BcsType<any>> {
|
|
147
|
+
package?: string;
|
|
148
|
+
arguments: BorrowAsPluginArguments<Witness> | [
|
|
149
|
+
self: RawTransactionArgument<string>,
|
|
150
|
+
_: RawTransactionArgument<Witness>
|
|
151
|
+
];
|
|
152
|
+
typeArguments: [
|
|
153
|
+
string,
|
|
154
|
+
string
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Temporarily lend the full custodied capability to an authorized plugin.
|
|
159
|
+
*
|
|
160
|
+
* `Borrow` has no abilities, so the exact capability must be returned through
|
|
161
|
+
* `put_back` in this transaction.
|
|
162
|
+
*/
|
|
163
|
+
export declare function borrowAsPlugin<Witness extends BcsType<any>>(options: BorrowAsPluginOptions<Witness>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
164
|
+
export interface BorrowAsAdminArguments {
|
|
165
|
+
self: RawTransactionArgument<string>;
|
|
166
|
+
adminCap: RawTransactionArgument<string>;
|
|
167
|
+
}
|
|
168
|
+
export interface BorrowAsAdminOptions {
|
|
169
|
+
package?: string;
|
|
170
|
+
arguments: BorrowAsAdminArguments | [
|
|
171
|
+
self: RawTransactionArgument<string>,
|
|
172
|
+
adminCap: RawTransactionArgument<string>
|
|
173
|
+
];
|
|
174
|
+
typeArguments: [
|
|
175
|
+
string
|
|
176
|
+
];
|
|
177
|
+
}
|
|
178
|
+
/** Temporarily lend the full custodied capability to the vault administrator. */
|
|
179
|
+
export declare function borrowAsAdmin(options: BorrowAsAdminOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
180
|
+
export interface PutBackArguments<Cap extends BcsType<any>> {
|
|
181
|
+
self: RawTransactionArgument<string>;
|
|
182
|
+
cap: RawTransactionArgument<Cap>;
|
|
183
|
+
receipt: TransactionArgument;
|
|
184
|
+
}
|
|
185
|
+
export interface PutBackOptions<Cap extends BcsType<any>> {
|
|
186
|
+
package?: string;
|
|
187
|
+
arguments: PutBackArguments<Cap> | [
|
|
188
|
+
self: RawTransactionArgument<string>,
|
|
189
|
+
cap: RawTransactionArgument<Cap>,
|
|
190
|
+
receipt: TransactionArgument
|
|
191
|
+
];
|
|
192
|
+
typeArguments: [
|
|
193
|
+
string
|
|
194
|
+
];
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Return the exact capability borrowed from this vault.
|
|
198
|
+
*
|
|
199
|
+
* No additional authorization is required: `Borrow` proves the originating
|
|
200
|
+
* referent and capability object ID, and blocking return would harm liveness.
|
|
201
|
+
*/
|
|
202
|
+
export declare function putBack<Cap extends BcsType<any>>(options: PutBackOptions<Cap>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
203
|
+
export interface IdArguments {
|
|
204
|
+
self: RawTransactionArgument<string>;
|
|
205
|
+
}
|
|
206
|
+
export interface IdOptions {
|
|
207
|
+
package?: string;
|
|
208
|
+
arguments: IdArguments | [
|
|
209
|
+
self: RawTransactionArgument<string>
|
|
210
|
+
];
|
|
211
|
+
typeArguments: [
|
|
212
|
+
string
|
|
213
|
+
];
|
|
214
|
+
}
|
|
215
|
+
export declare function id(options: IdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
216
|
+
export interface VaultIdArguments {
|
|
217
|
+
self: RawTransactionArgument<string>;
|
|
218
|
+
}
|
|
219
|
+
export interface VaultIdOptions {
|
|
220
|
+
package?: string;
|
|
221
|
+
arguments: VaultIdArguments | [
|
|
222
|
+
self: RawTransactionArgument<string>
|
|
223
|
+
];
|
|
224
|
+
typeArguments: [
|
|
225
|
+
string
|
|
226
|
+
];
|
|
227
|
+
}
|
|
228
|
+
export declare function vaultId(options: VaultIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
229
|
+
export interface AuthorizedPluginsIdArguments {
|
|
230
|
+
self: RawTransactionArgument<string>;
|
|
231
|
+
}
|
|
232
|
+
export interface AuthorizedPluginsIdOptions {
|
|
233
|
+
package?: string;
|
|
234
|
+
arguments: AuthorizedPluginsIdArguments | [
|
|
235
|
+
self: RawTransactionArgument<string>
|
|
236
|
+
];
|
|
237
|
+
typeArguments: [
|
|
238
|
+
string
|
|
239
|
+
];
|
|
240
|
+
}
|
|
241
|
+
/** The ID under which `AuthorizedPluginKey` records are dynamic fields. */
|
|
242
|
+
export declare function authorizedPluginsId(options: AuthorizedPluginsIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
243
|
+
export interface AuthorizedPluginCountArguments {
|
|
244
|
+
self: RawTransactionArgument<string>;
|
|
245
|
+
}
|
|
246
|
+
export interface AuthorizedPluginCountOptions {
|
|
247
|
+
package?: string;
|
|
248
|
+
arguments: AuthorizedPluginCountArguments | [
|
|
249
|
+
self: RawTransactionArgument<string>
|
|
250
|
+
];
|
|
251
|
+
typeArguments: [
|
|
252
|
+
string
|
|
253
|
+
];
|
|
254
|
+
}
|
|
255
|
+
export declare function authorizedPluginCount(options: AuthorizedPluginCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
256
|
+
export interface IsPluginAuthorizedArguments {
|
|
257
|
+
self: RawTransactionArgument<string>;
|
|
258
|
+
}
|
|
259
|
+
export interface IsPluginAuthorizedOptions {
|
|
260
|
+
package?: string;
|
|
261
|
+
arguments: IsPluginAuthorizedArguments | [
|
|
262
|
+
self: RawTransactionArgument<string>
|
|
263
|
+
];
|
|
264
|
+
typeArguments: [
|
|
265
|
+
string,
|
|
266
|
+
string
|
|
267
|
+
];
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Returns whether this witness type has an authorization record.
|
|
271
|
+
*
|
|
272
|
+
* This deliberately does not validate the witness shape: arbitrary types simply
|
|
273
|
+
* report false, while `authorize_plugin` is the only way to add one.
|
|
274
|
+
*/
|
|
275
|
+
export declare function isPluginAuthorized(options: IsPluginAuthorizedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
276
|
+
//# sourceMappingURL=vault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../../src/contracts/vault/vault.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAO,MAAM,iBAAiB,CAAC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;IACF,aAAa,EAAE;QACX,MAAM;KACT,CAAC;CACL;AACD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,IAM/D,IAAI,WAAW,0DAO1B;AACD,MAAM,WAAW,2BAA2B;IACxC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AACD,MAAM,WAAW,yBAAyB;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,2BAA2B,GAAG;QACrC,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;KACvC,CAAC;IACF,aAAa,EAAE;QACX,MAAM;QACN,MAAM;KACT,CAAC;CACL;AACD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,IAMzD,IAAI,WAAW,0DAO1B"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Generic capability custody and plugin authorization.
|
|
6
|
+
*
|
|
7
|
+
* `Vault<Cap>` holds a capability in a Sui `Referent`. An authorized plugin
|
|
8
|
+
* receives the whole capability temporarily, paired with a hot-potato `Borrow`
|
|
9
|
+
* receipt that forces the same capability back into the same vault before the
|
|
10
|
+
* transaction can finish. Plugin authorization is represented by a typed dynamic
|
|
11
|
+
* field in the vault's `Bag`.
|
|
12
|
+
*/
|
|
13
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
14
|
+
import { MoveStruct, MoveTuple, normalizeMoveArguments } from '../utils/index.js';
|
|
15
|
+
import {} from '@mysten/sui/transactions';
|
|
16
|
+
import * as borrow from './deps/sui/borrow.js';
|
|
17
|
+
import * as bag from './deps/sui/bag.js';
|
|
18
|
+
const $moduleName = '@local-pkg/vault::vault';
|
|
19
|
+
/**
|
|
20
|
+
* Custodies one capability and the typed authorization records for plugins.
|
|
21
|
+
*
|
|
22
|
+
* `Vault` intentionally lacks `store`: only this module can share or destroy it.
|
|
23
|
+
* The wrapped capability is never exposed except through a hot-potato borrow that
|
|
24
|
+
* requires its exact return.
|
|
25
|
+
*/
|
|
26
|
+
export function Vault(...typeParameters) {
|
|
27
|
+
return new MoveStruct({ name: `${$moduleName}::Vault<${typeParameters[0].name}>`, fields: {
|
|
28
|
+
id: bcs.Address,
|
|
29
|
+
cap: borrow.Referent(typeParameters[0]),
|
|
30
|
+
authorized_plugins: bag.Bag
|
|
31
|
+
} });
|
|
32
|
+
}
|
|
33
|
+
export const VaultAdminCap = new MoveStruct({ name: `${$moduleName}::VaultAdminCap<phantom Cap>`, fields: {
|
|
34
|
+
id: bcs.Address,
|
|
35
|
+
vault_id: bcs.Address
|
|
36
|
+
} });
|
|
37
|
+
export const AuthorizedPluginKey = new MoveTuple({ name: `${$moduleName}::AuthorizedPluginKey<phantom Witness>`, fields: [bcs.bool()] });
|
|
38
|
+
export const VaultCreatedEvent = new MoveStruct({ name: `${$moduleName}::VaultCreatedEvent<phantom Cap>`, fields: {
|
|
39
|
+
vault_id: bcs.Address,
|
|
40
|
+
vault_admin_cap_id: bcs.Address,
|
|
41
|
+
wrapped_cap_id: bcs.Address,
|
|
42
|
+
authorized_plugins_id: bcs.Address
|
|
43
|
+
} });
|
|
44
|
+
export const PluginAuthorizedEvent = new MoveStruct({ name: `${$moduleName}::PluginAuthorizedEvent<phantom Cap, phantom Witness>`, fields: {
|
|
45
|
+
vault_id: bcs.Address
|
|
46
|
+
} });
|
|
47
|
+
export const PluginRevokedEvent = new MoveStruct({ name: `${$moduleName}::PluginRevokedEvent<phantom Cap, phantom Witness>`, fields: {
|
|
48
|
+
vault_id: bcs.Address
|
|
49
|
+
} });
|
|
50
|
+
export const VaultDestroyedEvent = new MoveStruct({ name: `${$moduleName}::VaultDestroyedEvent<phantom Cap>`, fields: {
|
|
51
|
+
vault_id: bcs.Address,
|
|
52
|
+
wrapped_cap_id: bcs.Address
|
|
53
|
+
} });
|
|
54
|
+
/** Custody `cap` and create its vault-specific administrator capability. */
|
|
55
|
+
export function _new(options) {
|
|
56
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
57
|
+
const argumentsTypes = [
|
|
58
|
+
`${options.typeArguments[0]}`
|
|
59
|
+
];
|
|
60
|
+
const parameterNames = ["cap"];
|
|
61
|
+
return (tx) => tx.moveCall({
|
|
62
|
+
package: packageAddress,
|
|
63
|
+
module: 'vault',
|
|
64
|
+
function: 'new',
|
|
65
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
66
|
+
typeArguments: options.typeArguments
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/** Share a newly-created vault. */
|
|
70
|
+
export function share(options) {
|
|
71
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
72
|
+
const argumentsTypes = [
|
|
73
|
+
null
|
|
74
|
+
];
|
|
75
|
+
const parameterNames = ["vault"];
|
|
76
|
+
return (tx) => tx.moveCall({
|
|
77
|
+
package: packageAddress,
|
|
78
|
+
module: 'vault',
|
|
79
|
+
function: 'share',
|
|
80
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
81
|
+
typeArguments: options.typeArguments
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Destroy an empty vault and return the exact capability it custodied. */
|
|
85
|
+
export function destroy(options) {
|
|
86
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
87
|
+
const argumentsTypes = [
|
|
88
|
+
null,
|
|
89
|
+
null
|
|
90
|
+
];
|
|
91
|
+
const parameterNames = ["self", "adminCap"];
|
|
92
|
+
return (tx) => tx.moveCall({
|
|
93
|
+
package: packageAddress,
|
|
94
|
+
module: 'vault',
|
|
95
|
+
function: 'destroy',
|
|
96
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
97
|
+
typeArguments: options.typeArguments
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Authorize the package identified by its canonical `witness::Witness` type.
|
|
102
|
+
*
|
|
103
|
+
* The witness is consumed here. A plugin should construct it with a package-only
|
|
104
|
+
* `witness::new()` function.
|
|
105
|
+
*/
|
|
106
|
+
export function authorizePlugin(options) {
|
|
107
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
108
|
+
const argumentsTypes = [
|
|
109
|
+
null,
|
|
110
|
+
null,
|
|
111
|
+
`${options.typeArguments[1]}`
|
|
112
|
+
];
|
|
113
|
+
const parameterNames = ["self", "adminCap", "_"];
|
|
114
|
+
return (tx) => tx.moveCall({
|
|
115
|
+
package: packageAddress,
|
|
116
|
+
module: 'vault',
|
|
117
|
+
function: 'authorize_plugin',
|
|
118
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
119
|
+
typeArguments: options.typeArguments
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/** Revoke a plugin authorization without requiring cooperation from the plugin. */
|
|
123
|
+
export function revokePlugin(options) {
|
|
124
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
125
|
+
const argumentsTypes = [
|
|
126
|
+
null,
|
|
127
|
+
null
|
|
128
|
+
];
|
|
129
|
+
const parameterNames = ["self", "adminCap"];
|
|
130
|
+
return (tx) => tx.moveCall({
|
|
131
|
+
package: packageAddress,
|
|
132
|
+
module: 'vault',
|
|
133
|
+
function: 'revoke_plugin',
|
|
134
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
135
|
+
typeArguments: options.typeArguments
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Temporarily lend the full custodied capability to an authorized plugin.
|
|
140
|
+
*
|
|
141
|
+
* `Borrow` has no abilities, so the exact capability must be returned through
|
|
142
|
+
* `put_back` in this transaction.
|
|
143
|
+
*/
|
|
144
|
+
export function borrowAsPlugin(options) {
|
|
145
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
146
|
+
const argumentsTypes = [
|
|
147
|
+
null,
|
|
148
|
+
`${options.typeArguments[1]}`
|
|
149
|
+
];
|
|
150
|
+
const parameterNames = ["self", "_"];
|
|
151
|
+
return (tx) => tx.moveCall({
|
|
152
|
+
package: packageAddress,
|
|
153
|
+
module: 'vault',
|
|
154
|
+
function: 'borrow_as_plugin',
|
|
155
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
156
|
+
typeArguments: options.typeArguments
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/** Temporarily lend the full custodied capability to the vault administrator. */
|
|
160
|
+
export function borrowAsAdmin(options) {
|
|
161
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
162
|
+
const argumentsTypes = [
|
|
163
|
+
null,
|
|
164
|
+
null
|
|
165
|
+
];
|
|
166
|
+
const parameterNames = ["self", "adminCap"];
|
|
167
|
+
return (tx) => tx.moveCall({
|
|
168
|
+
package: packageAddress,
|
|
169
|
+
module: 'vault',
|
|
170
|
+
function: 'borrow_as_admin',
|
|
171
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
172
|
+
typeArguments: options.typeArguments
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Return the exact capability borrowed from this vault.
|
|
177
|
+
*
|
|
178
|
+
* No additional authorization is required: `Borrow` proves the originating
|
|
179
|
+
* referent and capability object ID, and blocking return would harm liveness.
|
|
180
|
+
*/
|
|
181
|
+
export function putBack(options) {
|
|
182
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
183
|
+
const argumentsTypes = [
|
|
184
|
+
null,
|
|
185
|
+
`${options.typeArguments[0]}`,
|
|
186
|
+
null
|
|
187
|
+
];
|
|
188
|
+
const parameterNames = ["self", "cap", "receipt"];
|
|
189
|
+
return (tx) => tx.moveCall({
|
|
190
|
+
package: packageAddress,
|
|
191
|
+
module: 'vault',
|
|
192
|
+
function: 'put_back',
|
|
193
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
194
|
+
typeArguments: options.typeArguments
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
export function id(options) {
|
|
198
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
199
|
+
const argumentsTypes = [
|
|
200
|
+
null
|
|
201
|
+
];
|
|
202
|
+
const parameterNames = ["self"];
|
|
203
|
+
return (tx) => tx.moveCall({
|
|
204
|
+
package: packageAddress,
|
|
205
|
+
module: 'vault',
|
|
206
|
+
function: 'id',
|
|
207
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
208
|
+
typeArguments: options.typeArguments
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
export function vaultId(options) {
|
|
212
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
213
|
+
const argumentsTypes = [
|
|
214
|
+
null
|
|
215
|
+
];
|
|
216
|
+
const parameterNames = ["self"];
|
|
217
|
+
return (tx) => tx.moveCall({
|
|
218
|
+
package: packageAddress,
|
|
219
|
+
module: 'vault',
|
|
220
|
+
function: 'vault_id',
|
|
221
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
222
|
+
typeArguments: options.typeArguments
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/** The ID under which `AuthorizedPluginKey` records are dynamic fields. */
|
|
226
|
+
export function authorizedPluginsId(options) {
|
|
227
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
228
|
+
const argumentsTypes = [
|
|
229
|
+
null
|
|
230
|
+
];
|
|
231
|
+
const parameterNames = ["self"];
|
|
232
|
+
return (tx) => tx.moveCall({
|
|
233
|
+
package: packageAddress,
|
|
234
|
+
module: 'vault',
|
|
235
|
+
function: 'authorized_plugins_id',
|
|
236
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
237
|
+
typeArguments: options.typeArguments
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
export function authorizedPluginCount(options) {
|
|
241
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
242
|
+
const argumentsTypes = [
|
|
243
|
+
null
|
|
244
|
+
];
|
|
245
|
+
const parameterNames = ["self"];
|
|
246
|
+
return (tx) => tx.moveCall({
|
|
247
|
+
package: packageAddress,
|
|
248
|
+
module: 'vault',
|
|
249
|
+
function: 'authorized_plugin_count',
|
|
250
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
251
|
+
typeArguments: options.typeArguments
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Returns whether this witness type has an authorization record.
|
|
256
|
+
*
|
|
257
|
+
* This deliberately does not validate the witness shape: arbitrary types simply
|
|
258
|
+
* report false, while `authorize_plugin` is the only way to add one.
|
|
259
|
+
*/
|
|
260
|
+
export function isPluginAuthorized(options) {
|
|
261
|
+
const packageAddress = options.package ?? '@local-pkg/vault';
|
|
262
|
+
const argumentsTypes = [
|
|
263
|
+
null
|
|
264
|
+
];
|
|
265
|
+
const parameterNames = ["self"];
|
|
266
|
+
return (tx) => tx.moveCall({
|
|
267
|
+
package: packageAddress,
|
|
268
|
+
module: 'vault',
|
|
269
|
+
function: 'is_plugin_authorized',
|
|
270
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
271
|
+
typeArguments: options.typeArguments
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
//# sourceMappingURL=vault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../../../src/contracts/vault/vault.ts"],"names":[],"mappings":"AAAA;;gEAEgE;AAGhE;;;;;;;;GAQG;AAEH,OAAO,EAAgB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,sBAAsB,EAA+B,MAAM,mBAAm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/contracts.d.ts
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
export * as pressing from "./contracts/miso_pressing/pressing.ts";
|
|
2
2
|
export * as listing from "./contracts/miso_pressing/listing.ts";
|
|
3
3
|
export * as certificate from "./contracts/miso_pressing/certificate.ts";
|
|
4
|
-
export * as releaseRegistry from "./contracts/release_registry/release_registry.ts";
|
|
5
|
-
export * as drop from "./contracts/miso_drop/drop.ts";
|
|
6
4
|
export * as royaltyPool from "./contracts/royalty_pool/pool.ts";
|
|
7
5
|
export * as royaltyPoolStake from "./contracts/royalty_pool/stake.ts";
|
|
6
|
+
export * as vault from "./contracts/vault/vault.ts";
|
|
8
7
|
export * as compositionRoyaltyPool from "./contracts/composition_royalty_pool/composition_royalty_pool.ts";
|
|
9
8
|
export * as recordingRoyaltyPool from "./contracts/recording_royalty_pool/recording_royalty_pool.ts";
|
|
9
|
+
export * as routedStake from "./contracts/routed_stake/routed_stake.ts";
|
|
10
|
+
export * as compositionRoutedStake from "./contracts/composition_routed_stake/composition_routed_stake.ts";
|
|
10
11
|
export * as coverArt from "./contracts/cover_art/cover_art.ts";
|
|
11
12
|
export * as releaseCoverArt from "./contracts/release_cover_art/release_cover_art.ts";
|
|
13
|
+
export * as genre from "./contracts/genre/genre.ts";
|
|
14
|
+
export * as releaseDescription from "./contracts/release_description/release_description.ts";
|
|
15
|
+
export * as releaseDspLink from "./contracts/release_dsp_link/release_dsp_link.ts";
|
|
16
|
+
export * as releaseGenre from "./contracts/release_genre/release_genre.ts";
|
|
17
|
+
export * as releaseKind from "./contracts/release_kind/release_kind.ts";
|
|
18
|
+
export * as releaseRevenueDistributor from "./contracts/release_revenue_distributor/release_revenue_distributor.ts";
|
|
19
|
+
export * as releaseSnapshotBundle from "./contracts/release_snapshot_bundle/release_snapshot_bundle.ts";
|
|
20
|
+
export * as recordingAdvisory from "./contracts/recording_advisory/recording_advisory.ts";
|
|
21
|
+
export * as recordingLanguage from "./contracts/recording_language/recording_language.ts";
|
|
22
|
+
export * as recordingMasterReference from "./contracts/recording_master_reference/recording_master_reference.ts";
|
|
23
|
+
export * as recordingPreview from "./contracts/recording_preview/recording_preview.ts";
|
|
12
24
|
export * as compositionCredits from "./contracts/composition_credits/composition_credits.ts";
|
|
13
25
|
export * as compositionPartyRole from "./contracts/composition_credits/composition_party_role.ts";
|
|
14
26
|
export * as recordingCredits from "./contracts/recording_credits/recording_credits.ts";
|