@misonetwork/sdk 0.1.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/LICENSE +201 -0
- package/README.md +644 -0
- package/dist/client.d.ts +197 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +218 -0
- package/dist/client.js.map +1 -0
- package/dist/contracts/composition_credits/composition_credits.d.ts +181 -0
- package/dist/contracts/composition_credits/composition_credits.d.ts.map +1 -0
- package/dist/contracts/composition_credits/composition_credits.js +109 -0
- package/dist/contracts/composition_credits/composition_credits.js.map +1 -0
- package/dist/contracts/composition_credits/composition_party_role.d.ts +119 -0
- package/dist/contracts/composition_credits/composition_party_role.d.ts.map +1 -0
- package/dist/contracts/composition_credits/composition_party_role.js +139 -0
- package/dist/contracts/composition_credits/composition_party_role.js.map +1 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/composition_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/composition_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts +87 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.d.ts.map +1 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js +80 -0
- package/dist/contracts/composition_royalty_pool/composition_royalty_pool.js.map +1 -0
- package/dist/contracts/cover_art/cover_art.d.ts +85 -0
- package/dist/contracts/cover_art/cover_art.d.ts.map +1 -0
- package/dist/contracts/cover_art/cover_art.js +68 -0
- package/dist/contracts/cover_art/cover_art.js.map +1 -0
- package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts +52 -0
- package/dist/contracts/cover_art/deps/ori/walrus_data.d.ts.map +1 -0
- package/dist/contracts/cover_art/deps/ori/walrus_data.js +37 -0
- package/dist/contracts/cover_art/deps/ori/walrus_data.js.map +1 -0
- package/dist/contracts/miso/composition.d.ts +231 -0
- package/dist/contracts/miso/composition.d.ts.map +1 -0
- package/dist/contracts/miso/composition.js +231 -0
- package/dist/contracts/miso/composition.js.map +1 -0
- package/dist/contracts/miso/deal.d.ts +184 -0
- package/dist/contracts/miso/deal.d.ts.map +1 -0
- package/dist/contracts/miso/deal.js +184 -0
- package/dist/contracts/miso/deal.js.map +1 -0
- package/dist/contracts/miso/deps/bps/bps.d.ts +19 -0
- package/dist/contracts/miso/deps/bps/bps.d.ts.map +1 -0
- package/dist/contracts/miso/deps/bps/bps.js +21 -0
- package/dist/contracts/miso/deps/bps/bps.js.map +1 -0
- package/dist/contracts/miso/recording.d.ts +228 -0
- package/dist/contracts/miso/recording.d.ts.map +1 -0
- package/dist/contracts/miso/recording.js +221 -0
- package/dist/contracts/miso/recording.js.map +1 -0
- package/dist/contracts/miso/release.d.ts +280 -0
- package/dist/contracts/miso/release.d.ts.map +1 -0
- package/dist/contracts/miso/release.js +282 -0
- package/dist/contracts/miso/release.js.map +1 -0
- package/dist/contracts/miso/track.d.ts +118 -0
- package/dist/contracts/miso/track.d.ts.map +1 -0
- package/dist/contracts/miso/track.js +118 -0
- package/dist/contracts/miso/track.js.map +1 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/recording_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/recording_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts +21 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.d.ts.map +1 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.js +20 -0
- package/dist/contracts/recording_credits/deps/sui/vec_set.js.map +1 -0
- package/dist/contracts/recording_credits/recording_credits.d.ts +2313 -0
- package/dist/contracts/recording_credits/recording_credits.d.ts.map +1 -0
- package/dist/contracts/recording_credits/recording_credits.js +270 -0
- package/dist/contracts/recording_credits/recording_credits.js.map +1 -0
- package/dist/contracts/recording_credits/recording_party_role.d.ts +1174 -0
- package/dist/contracts/recording_credits/recording_party_role.d.ts.map +1 -0
- package/dist/contracts/recording_credits/recording_party_role.js +692 -0
- package/dist/contracts/recording_credits/recording_party_role.js.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts +90 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.d.ts.map +1 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js +80 -0
- package/dist/contracts/recording_royalty_pool/recording_royalty_pool.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts +52 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js +37 -0
- package/dist/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts +46 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js +21 -0
- package/dist/contracts/release_cover_art/deps/cover_art/cover_art.js.map +1 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts +33 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js +32 -0
- package/dist/contracts/release_cover_art/deps/per_track/per_track.js.map +1 -0
- package/dist/contracts/release_cover_art/release_cover_art.d.ts +300 -0
- package/dist/contracts/release_cover_art/release_cover_art.d.ts.map +1 -0
- package/dist/contracts/release_cover_art/release_cover_art.js +168 -0
- package/dist/contracts/release_cover_art/release_cover_art.js.map +1 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts +24 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.js +23 -0
- package/dist/contracts/release_credits/deps/miso_credit/credit.js.map +1 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.js +28 -0
- package/dist/contracts/release_credits/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/release_credits/release_credits.d.ts +142 -0
- package/dist/contracts/release_credits/release_credits.d.ts.map +1 -0
- package/dist/contracts/release_credits/release_credits.js +108 -0
- package/dist/contracts/release_credits/release_credits.js.map +1 -0
- package/dist/contracts/release_credits/release_party_role.d.ts +58 -0
- package/dist/contracts/release_credits/release_party_role.d.ts.map +1 -0
- package/dist/contracts/release_credits/release_party_role.js +66 -0
- package/dist/contracts/release_credits/release_party_role.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts +18 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.js +20 -0
- package/dist/contracts/royalty_pool/deps/std/type_name.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts +13 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.js +15 -0
- package/dist/contracts/royalty_pool/deps/sui/balance.js.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts +37 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js +28 -0
- package/dist/contracts/royalty_pool/deps/sui/vec_map.js.map +1 -0
- package/dist/contracts/royalty_pool/pool.d.ts +358 -0
- package/dist/contracts/royalty_pool/pool.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/pool.js +352 -0
- package/dist/contracts/royalty_pool/pool.js.map +1 -0
- package/dist/contracts/royalty_pool/stake.d.ts +202 -0
- package/dist/contracts/royalty_pool/stake.d.ts.map +1 -0
- package/dist/contracts/royalty_pool/stake.js +197 -0
- package/dist/contracts/royalty_pool/stake.js.map +1 -0
- package/dist/contracts/utils/index.d.ts +31 -0
- package/dist/contracts/utils/index.d.ts.map +1 -0
- package/dist/contracts/utils/index.js +162 -0
- package/dist/contracts/utils/index.js.map +1 -0
- package/dist/contracts.d.ts +18 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +26 -0
- package/dist/contracts.js.map +1 -0
- package/dist/cover.d.ts +48 -0
- package/dist/cover.d.ts.map +1 -0
- package/dist/cover.js +68 -0
- package/dist/cover.js.map +1 -0
- package/dist/credits.d.ts +171 -0
- package/dist/credits.d.ts.map +1 -0
- package/dist/credits.js +360 -0
- package/dist/credits.js.map +1 -0
- package/dist/execute.d.ts +49 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +114 -0
- package/dist/execute.js.map +1 -0
- package/dist/extensions/royalty-pool.d.ts +32 -0
- package/dist/extensions/royalty-pool.d.ts.map +1 -0
- package/dist/extensions/royalty-pool.js +33 -0
- package/dist/extensions/royalty-pool.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/internal.d.ts +20 -0
- package/dist/internal.d.ts.map +1 -0
- package/dist/internal.js +48 -0
- package/dist/internal.js.map +1 -0
- package/dist/parsers.d.ts +9 -0
- package/dist/parsers.d.ts.map +1 -0
- package/dist/parsers.js +52 -0
- package/dist/parsers.js.map +1 -0
- package/dist/queries.d.ts +105 -0
- package/dist/queries.d.ts.map +1 -0
- package/dist/queries.js +380 -0
- package/dist/queries.js.map +1 -0
- package/dist/schemas.d.ts +99 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +76 -0
- package/dist/schemas.js.map +1 -0
- package/dist/transactions.d.ts +158 -0
- package/dist/transactions.d.ts.map +1 -0
- package/dist/transactions.js +154 -0
- package/dist/transactions.js.map +1 -0
- package/dist/types.d.ts +204 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/view.d.ts +21 -0
- package/dist/view.d.ts.map +1 -0
- package/dist/view.js +36 -0
- package/dist/view.js.map +1 -0
- package/package.json +111 -0
- package/src/client.ts +278 -0
- package/src/contracts/composition_credits/composition_credits.ts +169 -0
- package/src/contracts/composition_credits/composition_party_role.ts +189 -0
- package/src/contracts/composition_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/composition_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/composition_royalty_pool/composition_royalty_pool.ts +135 -0
- package/src/contracts/cover_art/cover_art.ts +99 -0
- package/src/contracts/cover_art/deps/ori/walrus_data.ts +36 -0
- package/src/contracts/miso/composition.ts +343 -0
- package/src/contracts/miso/deal.ts +257 -0
- package/src/contracts/miso/deps/bps/bps.ts +23 -0
- package/src/contracts/miso/recording.ts +298 -0
- package/src/contracts/miso/release.ts +392 -0
- package/src/contracts/miso/track.ts +153 -0
- package/src/contracts/recording_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/recording_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/recording_credits/deps/sui/vec_set.ts +21 -0
- package/src/contracts/recording_credits/recording_credits.ts +458 -0
- package/src/contracts/recording_credits/recording_party_role.ts +1041 -0
- package/src/contracts/recording_royalty_pool/recording_royalty_pool.ts +138 -0
- package/src/contracts/release_cover_art/deps/0x340057f2174fb59e4626742dd2b46c662237837b6187450cb59e4976ce7eac78/walrus_data.ts +36 -0
- package/src/contracts/release_cover_art/deps/cover_art/cover_art.ts +23 -0
- package/src/contracts/release_cover_art/deps/per_track/per_track.ts +36 -0
- package/src/contracts/release_cover_art/release_cover_art.ts +251 -0
- package/src/contracts/release_credits/deps/miso_credit/credit.ts +27 -0
- package/src/contracts/release_credits/deps/sui/vec_map.ts +33 -0
- package/src/contracts/release_credits/release_credits.ts +156 -0
- package/src/contracts/release_credits/release_party_role.ts +87 -0
- package/src/contracts/royalty_pool/deps/std/type_name.ts +22 -0
- package/src/contracts/royalty_pool/deps/sui/balance.ts +17 -0
- package/src/contracts/royalty_pool/deps/sui/vec_map.ts +33 -0
- package/src/contracts/royalty_pool/pool.ts +577 -0
- package/src/contracts/royalty_pool/stake.ts +317 -0
- package/src/contracts/utils/index.ts +229 -0
- package/src/contracts.ts +30 -0
- package/src/cover.ts +136 -0
- package/src/credits.ts +645 -0
- package/src/execute.ts +141 -0
- package/src/extensions/royalty-pool.ts +85 -0
- package/src/index.ts +17 -0
- package/src/internal.ts +85 -0
- package/src/parsers.ts +80 -0
- package/src/queries.ts +478 -0
- package/src/schemas.ts +96 -0
- package/src/transactions.ts +290 -0
- package/src/types.ts +244 -0
- package/src/view.ts +59 -0
package/package.json
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@misonetwork/sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Typed query helpers and transaction builders for the Miso protocol core on Sui.",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/misonetwork/sdk.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/misonetwork/sdk#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/misonetwork/sdk/issues"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [
|
|
15
|
+
"sui",
|
|
16
|
+
"move",
|
|
17
|
+
"miso",
|
|
18
|
+
"music",
|
|
19
|
+
"blockchain",
|
|
20
|
+
"sdk"
|
|
21
|
+
],
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"module": "./dist/index.js",
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"type": "module",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"scripts": {
|
|
30
|
+
"typecheck": "tsc --noEmit",
|
|
31
|
+
"test": "bun test",
|
|
32
|
+
"codegen": "sui-ts-codegen generate",
|
|
33
|
+
"docs": "typedoc",
|
|
34
|
+
"build": "tsc -p tsconfig.build.json",
|
|
35
|
+
"prepack": "tsc -p tsconfig.build.json",
|
|
36
|
+
"prepare": "tsc -p tsconfig.build.json"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"default": "./dist/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./client": {
|
|
44
|
+
"types": "./dist/client.d.ts",
|
|
45
|
+
"default": "./dist/client.js"
|
|
46
|
+
},
|
|
47
|
+
"./queries": {
|
|
48
|
+
"types": "./dist/queries.d.ts",
|
|
49
|
+
"default": "./dist/queries.js"
|
|
50
|
+
},
|
|
51
|
+
"./cover": {
|
|
52
|
+
"types": "./dist/cover.d.ts",
|
|
53
|
+
"default": "./dist/cover.js"
|
|
54
|
+
},
|
|
55
|
+
"./credits": {
|
|
56
|
+
"types": "./dist/credits.d.ts",
|
|
57
|
+
"default": "./dist/credits.js"
|
|
58
|
+
},
|
|
59
|
+
"./transactions": {
|
|
60
|
+
"types": "./dist/transactions.d.ts",
|
|
61
|
+
"default": "./dist/transactions.js"
|
|
62
|
+
},
|
|
63
|
+
"./execute": {
|
|
64
|
+
"types": "./dist/execute.d.ts",
|
|
65
|
+
"default": "./dist/execute.js"
|
|
66
|
+
},
|
|
67
|
+
"./extensions/royalty-pool": {
|
|
68
|
+
"types": "./dist/extensions/royalty-pool.d.ts",
|
|
69
|
+
"default": "./dist/extensions/royalty-pool.js"
|
|
70
|
+
},
|
|
71
|
+
"./view": {
|
|
72
|
+
"types": "./dist/view.d.ts",
|
|
73
|
+
"default": "./dist/view.js"
|
|
74
|
+
},
|
|
75
|
+
"./types": {
|
|
76
|
+
"types": "./dist/types.d.ts",
|
|
77
|
+
"default": "./dist/types.js"
|
|
78
|
+
},
|
|
79
|
+
"./schemas": {
|
|
80
|
+
"types": "./dist/schemas.d.ts",
|
|
81
|
+
"default": "./dist/schemas.js"
|
|
82
|
+
},
|
|
83
|
+
"./parsers": {
|
|
84
|
+
"types": "./dist/parsers.d.ts",
|
|
85
|
+
"default": "./dist/parsers.js"
|
|
86
|
+
},
|
|
87
|
+
"./package.json": "./package.json"
|
|
88
|
+
},
|
|
89
|
+
"files": [
|
|
90
|
+
"dist",
|
|
91
|
+
"src",
|
|
92
|
+
"README.md",
|
|
93
|
+
"LICENSE",
|
|
94
|
+
"package.json"
|
|
95
|
+
],
|
|
96
|
+
"devDependencies": {
|
|
97
|
+
"@mysten/codegen": "^0.11.14",
|
|
98
|
+
"@mysten/sui": "^2.24.0",
|
|
99
|
+
"@types/bun": "^1.3.14",
|
|
100
|
+
"typedoc": "^0.28.19",
|
|
101
|
+
"typedoc-plugin-markdown": "^4.11.0"
|
|
102
|
+
},
|
|
103
|
+
"peerDependencies": {
|
|
104
|
+
"@mysten/sui": "^2.4.0",
|
|
105
|
+
"typescript": "^5"
|
|
106
|
+
},
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"zod": "^4.3.6"
|
|
109
|
+
},
|
|
110
|
+
"main": "./dist/index.js"
|
|
111
|
+
}
|
package/src/client.ts
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// Copyright (c) Miso Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import type { ClientWithCoreApi, SuiClientRegistration } from "@mysten/sui/client";
|
|
5
|
+
import type { SuiGraphQLClient } from "@mysten/sui/graphql";
|
|
6
|
+
import type { TxThunk } from "./transactions.ts";
|
|
7
|
+
import * as parsers from "./parsers.ts";
|
|
8
|
+
import * as queries from "./queries.ts";
|
|
9
|
+
import * as transactions from "./transactions.ts";
|
|
10
|
+
import * as view from "./view.ts";
|
|
11
|
+
import type { Composition, CompositionAdminCap, Deal, Recording, RecordingAdminCap, Release, ReleaseAdminCap } from "./types.ts";
|
|
12
|
+
|
|
13
|
+
// Generated call modules (type-safe Move calls) and BCS structs.
|
|
14
|
+
import * as composition from "./contracts/miso/composition.ts";
|
|
15
|
+
import * as recording from "./contracts/miso/recording.ts";
|
|
16
|
+
import * as release from "./contracts/miso/release.ts";
|
|
17
|
+
import * as deal from "./contracts/miso/deal.ts";
|
|
18
|
+
import * as track from "./contracts/miso/track.ts";
|
|
19
|
+
|
|
20
|
+
export interface MisoOptions<Name extends string = "miso"> {
|
|
21
|
+
/** Name for the client extension. Defaults to "miso". */
|
|
22
|
+
name?: Name;
|
|
23
|
+
/** The Miso package ID. Required for type-based queries and derivation. */
|
|
24
|
+
misoPackageId: string;
|
|
25
|
+
/**
|
|
26
|
+
* The `ReleaseRegistry` object ID for this deployment.
|
|
27
|
+
*
|
|
28
|
+
* Created once in `release::init` and shared, so it is FIXED for the lifetime
|
|
29
|
+
* of a published package — deployment config, not runtime state. Supply it
|
|
30
|
+
* (alongside `misoPackageId`, from the same deployment manifest) and
|
|
31
|
+
* `getReleaseRegistry()` needs no network call at all. Omit it and the SDK
|
|
32
|
+
* falls back to a GraphQL scan, which is why this is worth configuring.
|
|
33
|
+
*/
|
|
34
|
+
releaseRegistryId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Optional GraphQL client, required ONLY for the global type-discovery reads
|
|
37
|
+
* the Core API cannot express: `getCompositionByShareType`,
|
|
38
|
+
* `getRecordingByShareType`, and `getReleaseRegistry` when
|
|
39
|
+
* `releaseRegistryId` is not configured. Everything else — including every
|
|
40
|
+
* `getOwned*AdminCaps` — goes over the Core API.
|
|
41
|
+
*/
|
|
42
|
+
graphqlClient?: SuiGraphQLClient;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Wraps a builder so the client's `misoPackageId` is injected, dropping it from
|
|
47
|
+
* the caller's params. Explicit call-sites (the free functions in
|
|
48
|
+
* `./transactions`) remain available for full control.
|
|
49
|
+
*/
|
|
50
|
+
function bindPackages<P extends { misoPackageId: string }>(
|
|
51
|
+
fn: (params: P) => TxThunk,
|
|
52
|
+
misoPackageId: string,
|
|
53
|
+
): (params: Omit<P, "misoPackageId">) => TxThunk {
|
|
54
|
+
return (params) => fn({ misoPackageId, ...params } as unknown as P);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Defaults `options.package` to `pkg` for every call-function in a generated module. */
|
|
58
|
+
function bindModulePackage<M extends object>(mod: M, pkg: string): M {
|
|
59
|
+
const out: Record<string, unknown> = {};
|
|
60
|
+
for (const [key, value] of Object.entries({ ...mod })) {
|
|
61
|
+
out[key] =
|
|
62
|
+
typeof value === "function"
|
|
63
|
+
? (options: { package?: string }) => (value as (o: unknown) => unknown)({ package: pkg, ...options })
|
|
64
|
+
: value;
|
|
65
|
+
}
|
|
66
|
+
return out as M;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Creates a Miso client extension for use with `$extend()`.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* const client = new SuiGrpcClient({ network: 'testnet' })
|
|
75
|
+
* .$extend(miso({ misoPackageId: '0x...' }));
|
|
76
|
+
* const composition = await client.miso.getCompositionById('0x...');
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export function miso<const Name extends string = "miso">(
|
|
80
|
+
options: MisoOptions<Name>,
|
|
81
|
+
): SuiClientRegistration<ClientWithCoreApi, Name, MisoClient> {
|
|
82
|
+
const name = (options.name ?? "miso") as Name;
|
|
83
|
+
return {
|
|
84
|
+
name,
|
|
85
|
+
register: (client) => new MisoClient(client, options),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export class MisoClient {
|
|
90
|
+
#client: ClientWithCoreApi;
|
|
91
|
+
#graphqlClient?: SuiGraphQLClient;
|
|
92
|
+
#misoPackageId: string;
|
|
93
|
+
#releaseRegistryId?: string;
|
|
94
|
+
|
|
95
|
+
constructor(client: ClientWithCoreApi, options: Omit<MisoOptions, "name">) {
|
|
96
|
+
this.#client = client;
|
|
97
|
+
this.#graphqlClient = options.graphqlClient;
|
|
98
|
+
this.#misoPackageId = options.misoPackageId;
|
|
99
|
+
this.#releaseRegistryId = options.releaseRegistryId;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// === Composition ===
|
|
103
|
+
|
|
104
|
+
async getCompositionById(compositionId: string): Promise<Composition> {
|
|
105
|
+
return queries.getCompositionById(this.#client, compositionId);
|
|
106
|
+
}
|
|
107
|
+
async getCompositionsByIds(ids: string[]): Promise<Record<string, Composition>> {
|
|
108
|
+
return queries.getCompositionsByIds(this.#client, ids);
|
|
109
|
+
}
|
|
110
|
+
async getCompositionShareType(compositionId: string): Promise<string> {
|
|
111
|
+
return queries.getCompositionShareType(this.#client, compositionId);
|
|
112
|
+
}
|
|
113
|
+
async getCompositionByShareType(shareType: string): Promise<Composition> {
|
|
114
|
+
return queries.getCompositionByShareType(this.#client, this.#requireGraphQL(), shareType, this.#misoPackageId);
|
|
115
|
+
}
|
|
116
|
+
async getCompositionAdminCapById(adminCapId: string): Promise<CompositionAdminCap> {
|
|
117
|
+
return queries.getCompositionAdminCapById(this.#client, adminCapId);
|
|
118
|
+
}
|
|
119
|
+
async getOwnedCompositionAdminCaps(owner: string): Promise<CompositionAdminCap[]> {
|
|
120
|
+
return queries.getOwnedCompositionAdminCaps(this.#client, owner, this.#misoPackageId);
|
|
121
|
+
}
|
|
122
|
+
deriveCompositionAdminCapId(compositionId: string): string {
|
|
123
|
+
return queries.deriveCompositionAdminCapId(compositionId, this.#misoPackageId);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// === Recording ===
|
|
127
|
+
|
|
128
|
+
async getRecordingById(recordingId: string): Promise<Recording> {
|
|
129
|
+
return queries.getRecordingById(this.#client, recordingId);
|
|
130
|
+
}
|
|
131
|
+
async getRecordingsByIds(ids: string[]): Promise<Record<string, Recording>> {
|
|
132
|
+
return queries.getRecordingsByIds(this.#client, ids);
|
|
133
|
+
}
|
|
134
|
+
async getRecordingShareType(recordingId: string): Promise<string> {
|
|
135
|
+
return queries.getRecordingShareType(this.#client, recordingId);
|
|
136
|
+
}
|
|
137
|
+
async getRecordingByShareType(shareType: string): Promise<Recording> {
|
|
138
|
+
return queries.getRecordingByShareType(this.#client, this.#requireGraphQL(), shareType, this.#misoPackageId);
|
|
139
|
+
}
|
|
140
|
+
async getRecordingAdminCapById(adminCapId: string): Promise<RecordingAdminCap> {
|
|
141
|
+
return queries.getRecordingAdminCapById(this.#client, adminCapId);
|
|
142
|
+
}
|
|
143
|
+
async getOwnedRecordingAdminCaps(owner: string): Promise<RecordingAdminCap[]> {
|
|
144
|
+
return queries.getOwnedRecordingAdminCaps(this.#client, owner, this.#misoPackageId);
|
|
145
|
+
}
|
|
146
|
+
deriveRecordingAdminCapId(recordingId: string): string {
|
|
147
|
+
return queries.deriveRecordingAdminCapId(recordingId, this.#misoPackageId);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// === Deal ===
|
|
151
|
+
|
|
152
|
+
async getDealById(dealId: string): Promise<Deal> {
|
|
153
|
+
return queries.getDealById(this.#client, dealId);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// === Release ===
|
|
157
|
+
|
|
158
|
+
async getReleaseById(releaseId: string): Promise<Release> {
|
|
159
|
+
return queries.getReleaseById(this.#client, releaseId);
|
|
160
|
+
}
|
|
161
|
+
async getReleasesByIds(ids: string[]): Promise<Record<string, Release>> {
|
|
162
|
+
return queries.getReleasesByIds(this.#client, ids);
|
|
163
|
+
}
|
|
164
|
+
async getReleaseAdminCapById(adminCapId: string): Promise<ReleaseAdminCap> {
|
|
165
|
+
return queries.getReleaseAdminCapById(this.#client, adminCapId);
|
|
166
|
+
}
|
|
167
|
+
deriveReleaseAdminCapId(releaseId: string): string {
|
|
168
|
+
return queries.deriveReleaseAdminCapId(releaseId, this.#misoPackageId);
|
|
169
|
+
}
|
|
170
|
+
async getOwnedReleaseAdminCaps(owner: string): Promise<ReleaseAdminCap[]> {
|
|
171
|
+
return queries.getOwnedReleaseAdminCaps(this.#client, owner, this.#misoPackageId);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* The deployment's `ReleaseRegistry` object ID.
|
|
175
|
+
*
|
|
176
|
+
* Returns the configured `releaseRegistryId` with no network call. Only when
|
|
177
|
+
* it was not configured does this fall back to a GraphQL scan — a one-time
|
|
178
|
+
* bootstrap for a fresh deployment whose id you have not recorded yet. Prefer
|
|
179
|
+
* configuring it: the registry is created once in `release::init` and never
|
|
180
|
+
* changes, so scanning for it on every call is pure overhead.
|
|
181
|
+
*/
|
|
182
|
+
async getReleaseRegistry(): Promise<string> {
|
|
183
|
+
if (this.#releaseRegistryId) return this.#releaseRegistryId;
|
|
184
|
+
return queries.getReleaseRegistry(this.#requireGraphQL(), this.#misoPackageId);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// === Share Currency ===
|
|
188
|
+
|
|
189
|
+
async getShareCurrencyType(shareCurrencyId: string): Promise<string> {
|
|
190
|
+
return queries.getShareCurrencyType(this.#client, shareCurrencyId);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* The `TreasuryCap<shareType>` owned by `owner`. Takes the share TYPE — if you
|
|
194
|
+
* hold only the `Currency` object id, resolve it first with
|
|
195
|
+
* {@link getShareCurrencyType}.
|
|
196
|
+
*/
|
|
197
|
+
async getShareCurrencyTreasuryCap(shareType: string, owner: string): Promise<string> {
|
|
198
|
+
return queries.getShareCurrencyTreasuryCap(this.#client, shareType, owner);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// === Transaction builders (thunks) ===
|
|
202
|
+
|
|
203
|
+
// Only the `(params) => TxThunk` builders bind here. The primitives that take
|
|
204
|
+
// a `Transaction` directly and return values (`createComposition`,
|
|
205
|
+
// `createRecording`, `createRelease`, `createDeal`) are free functions by
|
|
206
|
+
// design — they thread results into a caller-owned PTB, so there is nothing
|
|
207
|
+
// to bind. Import them from the package root and pass `misoPackageId`
|
|
208
|
+
// explicitly.
|
|
209
|
+
get tx() {
|
|
210
|
+
const miso = this.#misoPackageId;
|
|
211
|
+
return {
|
|
212
|
+
rejectDeal: bindPackages(transactions.rejectDeal, miso),
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// === Simulate-based reads (view) ===
|
|
217
|
+
|
|
218
|
+
get view() {
|
|
219
|
+
const client = this.#client;
|
|
220
|
+
const misoPackageId = this.#misoPackageId;
|
|
221
|
+
return {
|
|
222
|
+
deriveReleaseId: (params: view.DeriveReleaseIdParams) => view.deriveReleaseId(client, misoPackageId, params),
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// === Generated type-safe Move calls (for tx.add) ===
|
|
227
|
+
|
|
228
|
+
get call() {
|
|
229
|
+
const pkg = this.#misoPackageId;
|
|
230
|
+
return {
|
|
231
|
+
composition: bindModulePackage(composition, pkg),
|
|
232
|
+
recording: bindModulePackage(recording, pkg),
|
|
233
|
+
release: bindModulePackage(release, pkg),
|
|
234
|
+
deal: bindModulePackage(deal, pkg),
|
|
235
|
+
track: bindModulePackage(track, pkg),
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// === Generated BCS structs (for parsing object/event content) ===
|
|
240
|
+
|
|
241
|
+
get bcs() {
|
|
242
|
+
return {
|
|
243
|
+
Composition: composition.Composition,
|
|
244
|
+
Recording: recording.Recording,
|
|
245
|
+
Release: release.Release,
|
|
246
|
+
Deal: deal.Deal,
|
|
247
|
+
Track: track.Track,
|
|
248
|
+
CompositionPublishedEvent: composition.CompositionPublishedEvent,
|
|
249
|
+
CompositionRoyaltySetEvent: composition.CompositionRoyaltySetEvent,
|
|
250
|
+
RecordingPublishedEvent: recording.RecordingPublishedEvent,
|
|
251
|
+
ReleasePublishedEvent: release.ReleasePublishedEvent,
|
|
252
|
+
DealCreatedEvent: deal.DealCreatedEvent,
|
|
253
|
+
DealAcceptedEvent: deal.DealAcceptedEvent,
|
|
254
|
+
DealRejectedEvent: deal.DealRejectedEvent,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// === Event parsers ===
|
|
259
|
+
|
|
260
|
+
get parse() {
|
|
261
|
+
return {
|
|
262
|
+
compositionPublishedEvent: parsers.parseCompositionPublishedEvent,
|
|
263
|
+
compositionRoyaltySetEvent: parsers.parseCompositionRoyaltySetEvent,
|
|
264
|
+
recordingPublishedEvent: parsers.parseRecordingPublishedEvent,
|
|
265
|
+
releasePublishedEvent: parsers.parseReleasePublishedEvent,
|
|
266
|
+
dealCreatedEvent: parsers.parseDealCreatedEvent,
|
|
267
|
+
dealAcceptedEvent: parsers.parseDealAcceptedEvent,
|
|
268
|
+
dealRejectedEvent: parsers.parseDealRejectedEvent,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
#requireGraphQL(): SuiGraphQLClient {
|
|
273
|
+
if (!this.#graphqlClient) {
|
|
274
|
+
throw new Error("GraphQL client required. Pass graphqlClient to miso() options.");
|
|
275
|
+
}
|
|
276
|
+
return this.#graphqlClient;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* First-party credits extension for compositions.
|
|
8
|
+
*
|
|
9
|
+
* Attribution (writing credits) is display-oriented and varies across platforms,
|
|
10
|
+
* so it lives here as a dynamic field on the composition rather than in immutable
|
|
11
|
+
* core. The data is attached under `ExtensionKey()` via the composition's
|
|
12
|
+
* cap-gated `uid_mut`, so every mutation is authorized by the composition's admin
|
|
13
|
+
* and credits survive into any lifecycle state (they may be attached before or
|
|
14
|
+
* after the composition is published).
|
|
15
|
+
*
|
|
16
|
+
* This is Miso's canonical credits standard; because it is an extension, other
|
|
17
|
+
* parties may publish their own composition-credits standard against the same
|
|
18
|
+
* `Composition`. Credits are NOT read by the economics — they are attribution.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments, type RawTransactionArgument } from '../utils/index.js';
|
|
22
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
23
|
+
import { type Transaction, type TransactionArgument } from '@mysten/sui/transactions';
|
|
24
|
+
import * as vec_map from './deps/sui/vec_map.js';
|
|
25
|
+
import * as credit from './deps/miso_credit/credit.js';
|
|
26
|
+
import * as composition_party_role from './composition_party_role.js';
|
|
27
|
+
const $moduleName = '@local-pkg/composition_credits::composition_credits';
|
|
28
|
+
export const ExtensionKey = new MoveTuple({ name: `${$moduleName}::ExtensionKey`, fields: [bcs.bool()] });
|
|
29
|
+
export const CompositionCredits = new MoveStruct({ name: `${$moduleName}::CompositionCredits`, fields: {
|
|
30
|
+
/** Map of party IDs to their credit (display name + roles). */
|
|
31
|
+
credits: vec_map.VecMap(bcs.Address, credit.Credit(composition_party_role.CompositionPartyRole))
|
|
32
|
+
} });
|
|
33
|
+
export const CreditAddedEvent = new MoveStruct({ name: `${$moduleName}::CreditAddedEvent`, fields: {
|
|
34
|
+
composition_id: bcs.Address,
|
|
35
|
+
party_id: bcs.Address,
|
|
36
|
+
credit: credit.Credit(composition_party_role.CompositionPartyRole)
|
|
37
|
+
} });
|
|
38
|
+
export const CreditRemovedEvent = new MoveStruct({ name: `${$moduleName}::CreditRemovedEvent`, fields: {
|
|
39
|
+
composition_id: bcs.Address,
|
|
40
|
+
party_id: bcs.Address,
|
|
41
|
+
credit: credit.Credit(composition_party_role.CompositionPartyRole)
|
|
42
|
+
} });
|
|
43
|
+
export interface AddCreditArguments {
|
|
44
|
+
self: RawTransactionArgument<string>;
|
|
45
|
+
cap: RawTransactionArgument<string>;
|
|
46
|
+
party: RawTransactionArgument<string>;
|
|
47
|
+
credit: TransactionArgument;
|
|
48
|
+
}
|
|
49
|
+
export interface AddCreditOptions {
|
|
50
|
+
package?: string;
|
|
51
|
+
arguments: AddCreditArguments | [
|
|
52
|
+
self: RawTransactionArgument<string>,
|
|
53
|
+
cap: RawTransactionArgument<string>,
|
|
54
|
+
party: RawTransactionArgument<string>,
|
|
55
|
+
credit: TransactionArgument
|
|
56
|
+
];
|
|
57
|
+
typeArguments: [
|
|
58
|
+
string
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Adds a credit for a party on the composition, lazily creating the credits record
|
|
63
|
+
* on first use. Each credit must have 1-5 roles, and a party may hold at most one
|
|
64
|
+
* credit. Requires the composition's admin capability.
|
|
65
|
+
*/
|
|
66
|
+
export function addCredit(options: AddCreditOptions) {
|
|
67
|
+
const packageAddress = options.package ?? '@local-pkg/composition_credits';
|
|
68
|
+
const argumentsTypes = [
|
|
69
|
+
null,
|
|
70
|
+
null,
|
|
71
|
+
null,
|
|
72
|
+
null
|
|
73
|
+
] satisfies (string | null)[];
|
|
74
|
+
const parameterNames = ["self", "cap", "party", "credit"];
|
|
75
|
+
return (tx: Transaction) => tx.moveCall({
|
|
76
|
+
package: packageAddress,
|
|
77
|
+
module: 'composition_credits',
|
|
78
|
+
function: 'add_credit',
|
|
79
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
80
|
+
typeArguments: options.typeArguments
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export interface RemoveCreditArguments {
|
|
84
|
+
self: RawTransactionArgument<string>;
|
|
85
|
+
cap: RawTransactionArgument<string>;
|
|
86
|
+
partyId: RawTransactionArgument<string>;
|
|
87
|
+
}
|
|
88
|
+
export interface RemoveCreditOptions {
|
|
89
|
+
package?: string;
|
|
90
|
+
arguments: RemoveCreditArguments | [
|
|
91
|
+
self: RawTransactionArgument<string>,
|
|
92
|
+
cap: RawTransactionArgument<string>,
|
|
93
|
+
partyId: RawTransactionArgument<string>
|
|
94
|
+
];
|
|
95
|
+
typeArguments: [
|
|
96
|
+
string
|
|
97
|
+
];
|
|
98
|
+
}
|
|
99
|
+
/** Removes a party's credit. Requires the composition's admin capability. */
|
|
100
|
+
export function removeCredit(options: RemoveCreditOptions) {
|
|
101
|
+
const packageAddress = options.package ?? '@local-pkg/composition_credits';
|
|
102
|
+
const argumentsTypes = [
|
|
103
|
+
null,
|
|
104
|
+
null,
|
|
105
|
+
'0x2::object::ID'
|
|
106
|
+
] satisfies (string | null)[];
|
|
107
|
+
const parameterNames = ["self", "cap", "partyId"];
|
|
108
|
+
return (tx: Transaction) => tx.moveCall({
|
|
109
|
+
package: packageAddress,
|
|
110
|
+
module: 'composition_credits',
|
|
111
|
+
function: 'remove_credit',
|
|
112
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
113
|
+
typeArguments: options.typeArguments
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export interface HasCreditsArguments {
|
|
117
|
+
self: RawTransactionArgument<string>;
|
|
118
|
+
}
|
|
119
|
+
export interface HasCreditsOptions {
|
|
120
|
+
package?: string;
|
|
121
|
+
arguments: HasCreditsArguments | [
|
|
122
|
+
self: RawTransactionArgument<string>
|
|
123
|
+
];
|
|
124
|
+
typeArguments: [
|
|
125
|
+
string
|
|
126
|
+
];
|
|
127
|
+
}
|
|
128
|
+
/** Returns whether a credits record has been attached to this composition yet. */
|
|
129
|
+
export function hasCredits(options: HasCreditsOptions) {
|
|
130
|
+
const packageAddress = options.package ?? '@local-pkg/composition_credits';
|
|
131
|
+
const argumentsTypes = [
|
|
132
|
+
null
|
|
133
|
+
] satisfies (string | null)[];
|
|
134
|
+
const parameterNames = ["self"];
|
|
135
|
+
return (tx: Transaction) => tx.moveCall({
|
|
136
|
+
package: packageAddress,
|
|
137
|
+
module: 'composition_credits',
|
|
138
|
+
function: 'has_credits',
|
|
139
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
140
|
+
typeArguments: options.typeArguments
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
export interface CreditsArguments {
|
|
144
|
+
self: RawTransactionArgument<string>;
|
|
145
|
+
}
|
|
146
|
+
export interface CreditsOptions {
|
|
147
|
+
package?: string;
|
|
148
|
+
arguments: CreditsArguments | [
|
|
149
|
+
self: RawTransactionArgument<string>
|
|
150
|
+
];
|
|
151
|
+
typeArguments: [
|
|
152
|
+
string
|
|
153
|
+
];
|
|
154
|
+
}
|
|
155
|
+
/** Returns the party-to-credit map. Aborts if no credits are attached. */
|
|
156
|
+
export function credits(options: CreditsOptions) {
|
|
157
|
+
const packageAddress = options.package ?? '@local-pkg/composition_credits';
|
|
158
|
+
const argumentsTypes = [
|
|
159
|
+
null
|
|
160
|
+
] satisfies (string | null)[];
|
|
161
|
+
const parameterNames = ["self"];
|
|
162
|
+
return (tx: Transaction) => tx.moveCall({
|
|
163
|
+
package: packageAddress,
|
|
164
|
+
module: 'composition_credits',
|
|
165
|
+
function: 'credits',
|
|
166
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
167
|
+
typeArguments: options.typeArguments
|
|
168
|
+
});
|
|
169
|
+
}
|