@6529-collections/stream-sdk 0.0.0-stage → 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.
Files changed (148) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/LICENSE +201 -0
  3. package/NOTICE +4 -0
  4. package/README.md +413 -2
  5. package/dist/actions/accounts.d.ts +58 -0
  6. package/dist/actions/accounts.js +73 -0
  7. package/dist/actions/content.d.ts +22 -0
  8. package/dist/actions/content.js +45 -0
  9. package/dist/actions/curated.d.ts +177 -0
  10. package/dist/actions/curated.js +279 -0
  11. package/dist/actions/editions.d.ts +100 -0
  12. package/dist/actions/editions.js +161 -0
  13. package/dist/actions/independent.d.ts +149 -0
  14. package/dist/actions/independent.js +274 -0
  15. package/dist/actions/money.d.ts +117 -0
  16. package/dist/actions/money.js +148 -0
  17. package/dist/actions/record.d.ts +144 -0
  18. package/dist/actions/record.js +229 -0
  19. package/dist/actions/sale.d.ts +82 -0
  20. package/dist/actions/sale.js +113 -0
  21. package/dist/actions/shared.d.ts +40 -0
  22. package/dist/actions/shared.js +70 -0
  23. package/dist/actions/vault.d.ts +58 -0
  24. package/dist/actions/vault.js +94 -0
  25. package/dist/constants.d.ts +130 -0
  26. package/dist/constants.js +65 -0
  27. package/dist/display.d.ts +31 -0
  28. package/dist/display.js +28 -0
  29. package/dist/encoding.d.ts +110 -0
  30. package/dist/encoding.js +138 -0
  31. package/dist/errors.d.ts +76 -0
  32. package/dist/errors.js +66 -0
  33. package/dist/files/fetch.d.ts +85 -0
  34. package/dist/files/fetch.js +208 -0
  35. package/dist/files/verify.d.ts +36 -0
  36. package/dist/files/verify.js +125 -0
  37. package/dist/generated/abis/AccessManager.d.ts +1125 -0
  38. package/dist/generated/abis/AccessManager.js +1471 -0
  39. package/dist/generated/abis/Accounts.d.ts +1568 -0
  40. package/dist/generated/abis/Accounts.js +2049 -0
  41. package/dist/generated/abis/ClaimRouter.d.ts +343 -0
  42. package/dist/generated/abis/ClaimRouter.js +452 -0
  43. package/dist/generated/abis/ConsolidationAdapter.d.ts +97 -0
  44. package/dist/generated/abis/ConsolidationAdapter.js +133 -0
  45. package/dist/generated/abis/ContentStore.d.ts +812 -0
  46. package/dist/generated/abis/ContentStore.js +1073 -0
  47. package/dist/generated/abis/EconomicsResolver.d.ts +586 -0
  48. package/dist/generated/abis/EconomicsResolver.js +769 -0
  49. package/dist/generated/abis/Eip712CurationVerifier.d.ts +304 -0
  50. package/dist/generated/abis/Eip712CurationVerifier.js +406 -0
  51. package/dist/generated/abis/EnglishAuction.d.ts +1435 -0
  52. package/dist/generated/abis/EnglishAuction.js +1865 -0
  53. package/dist/generated/abis/GovernedVault.d.ts +468 -0
  54. package/dist/generated/abis/GovernedVault.js +617 -0
  55. package/dist/generated/abis/IndependentEditionAuction.d.ts +2373 -0
  56. package/dist/generated/abis/IndependentEditionAuction.js +3076 -0
  57. package/dist/generated/abis/IndependentStream6529.d.ts +1408 -0
  58. package/dist/generated/abis/IndependentStream6529.js +1834 -0
  59. package/dist/generated/abis/IndependentStreamDeployer.d.ts +141 -0
  60. package/dist/generated/abis/IndependentStreamDeployer.js +188 -0
  61. package/dist/generated/abis/IndependentStreamEditions6529.d.ts +963 -0
  62. package/dist/generated/abis/IndependentStreamEditions6529.js +1253 -0
  63. package/dist/generated/abis/IndependentStreamRegistry.d.ts +1351 -0
  64. package/dist/generated/abis/IndependentStreamRegistry.js +1755 -0
  65. package/dist/generated/abis/PackageRegistry.d.ts +1205 -0
  66. package/dist/generated/abis/PackageRegistry.js +1573 -0
  67. package/dist/generated/abis/RevenueEscrow.d.ts +626 -0
  68. package/dist/generated/abis/RevenueEscrow.js +820 -0
  69. package/dist/generated/abis/SaleStarter.d.ts +48 -0
  70. package/dist/generated/abis/SaleStarter.js +67 -0
  71. package/dist/generated/abis/SepoliaOpenGate.d.ts +317 -0
  72. package/dist/generated/abis/SepoliaOpenGate.js +419 -0
  73. package/dist/generated/abis/SplitLedger.d.ts +1097 -0
  74. package/dist/generated/abis/SplitLedger.js +1438 -0
  75. package/dist/generated/abis/StatementLog.d.ts +958 -0
  76. package/dist/generated/abis/StatementLog.js +1248 -0
  77. package/dist/generated/abis/Stream6529.d.ts +1490 -0
  78. package/dist/generated/abis/Stream6529.js +1941 -0
  79. package/dist/generated/abis/StreamDirectory6529.d.ts +355 -0
  80. package/dist/generated/abis/StreamDirectory6529.js +468 -0
  81. package/dist/generated/abis/StreamEditions6529.d.ts +1240 -0
  82. package/dist/generated/abis/StreamEditions6529.js +1614 -0
  83. package/dist/generated/abis/StreamTerms.d.ts +312 -0
  84. package/dist/generated/abis/StreamTerms.js +409 -0
  85. package/dist/generated/abis/StreamWorkFacts6529.d.ts +810 -0
  86. package/dist/generated/abis/StreamWorkFacts6529.js +1049 -0
  87. package/dist/generated/abis/UniformEditionAuction.d.ts +2372 -0
  88. package/dist/generated/abis/UniformEditionAuction.js +3074 -0
  89. package/dist/generated/abis/WorkDelivery.d.ts +605 -0
  90. package/dist/generated/abis/WorkDelivery.js +786 -0
  91. package/dist/generated/abis/WorkRules.d.ts +1154 -0
  92. package/dist/generated/abis/WorkRules.js +1501 -0
  93. package/dist/generated/abis/index.d.ts +28 -0
  94. package/dist/generated/abis/index.js +31 -0
  95. package/dist/generated/instances.d.ts +7 -0
  96. package/dist/generated/instances.js +9 -0
  97. package/dist/generated/sepoliaR10.d.ts +1391 -0
  98. package/dist/generated/sepoliaR10.js +1545 -0
  99. package/dist/hashing/content.d.ts +42 -0
  100. package/dist/hashing/content.js +54 -0
  101. package/dist/hashing/ids.d.ts +67 -0
  102. package/dist/hashing/ids.js +73 -0
  103. package/dist/hashing/items.d.ts +30 -0
  104. package/dist/hashing/items.js +44 -0
  105. package/dist/hashing/packages.d.ts +35 -0
  106. package/dist/hashing/packages.js +76 -0
  107. package/dist/hashing/vault.d.ts +17 -0
  108. package/dist/hashing/vault.js +37 -0
  109. package/dist/hashing/workState.d.ts +31 -0
  110. package/dist/hashing/workState.js +37 -0
  111. package/dist/index.d.ts +44 -0
  112. package/dist/index.js +47 -0
  113. package/dist/instance.d.ts +236 -0
  114. package/dist/instance.js +99 -0
  115. package/dist/items.d.ts +85 -0
  116. package/dist/items.js +144 -0
  117. package/dist/reads/accounts.d.ts +86 -0
  118. package/dist/reads/accounts.js +121 -0
  119. package/dist/reads/chain.d.ts +54 -0
  120. package/dist/reads/chain.js +133 -0
  121. package/dist/reads/creation.d.ts +139 -0
  122. package/dist/reads/creation.js +256 -0
  123. package/dist/reads/editionSale.d.ts +120 -0
  124. package/dist/reads/editionSale.js +182 -0
  125. package/dist/reads/metadata.d.ts +195 -0
  126. package/dist/reads/metadata.js +191 -0
  127. package/dist/reads/money.d.ts +51 -0
  128. package/dist/reads/money.js +68 -0
  129. package/dist/reads/network.d.ts +137 -0
  130. package/dist/reads/network.js +157 -0
  131. package/dist/reads/sale.d.ts +94 -0
  132. package/dist/reads/sale.js +133 -0
  133. package/dist/reads/vault.d.ts +47 -0
  134. package/dist/reads/vault.js +75 -0
  135. package/dist/reads/work.d.ts +293 -0
  136. package/dist/reads/work.js +338 -0
  137. package/dist/reads/workPage.d.ts +197 -0
  138. package/dist/reads/workPage.js +169 -0
  139. package/dist/signing/messages.d.ts +679 -0
  140. package/dist/signing/messages.js +397 -0
  141. package/dist/testing.d.ts +17 -0
  142. package/dist/testing.js +18 -0
  143. package/dist/types.d.ts +167 -0
  144. package/dist/types.js +14 -0
  145. package/docs/publishing.md +54 -0
  146. package/docs/reference.md +335 -0
  147. package/docs/using-from-a-site.md +175 -0
  148. package/package.json +93 -4
@@ -0,0 +1,679 @@
1
+ import { type Address, type Hex } from "viem";
2
+ import type { StreamInstance } from "../instance.js";
3
+ import type { ArtistIdentity, PartyAcceptance } from "../types.js";
4
+ /**
5
+ * Every EIP-712 message the 6529 Stream contracts check, as typed data ready for
6
+ * `walletClient.signTypedData` (or `hashTypedData` to get the digest).
7
+ *
8
+ * Each signing contract uses the domain `(name, "1", chainId, itself)`. The tests check
9
+ * every message here against digests and signatures the Solidity code produced and accepted.
10
+ *
11
+ * Source of the type strings: [`Typehashes.sol`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/interfaces/types/Typehashes.sol),
12
+ * and beside their code for `WorkRules`, `SplitLedger` and `StatementLog`.
13
+ */
14
+ /**
15
+ * The EIP-712 domain of one signing contract: its name and version as it was compiled, the
16
+ * chain, and its address. Take it from `signingDomains(instance)`; the names are generated
17
+ * from the contracts' source per instance and are not constants of this library.
18
+ */
19
+ export interface SigningDomain {
20
+ readonly name: string;
21
+ readonly version: string;
22
+ readonly chainId: number;
23
+ readonly verifyingContract: Address;
24
+ }
25
+ /** The signing domain of each contract of an instance. */
26
+ export declare function signingDomains(instance: StreamInstance): {
27
+ readonly packageRegistry: SigningDomain;
28
+ readonly curationVerifier: SigningDomain;
29
+ readonly accounts: SigningDomain;
30
+ readonly workRules: SigningDomain;
31
+ readonly splitLedger: SigningDomain;
32
+ readonly statementLog: SigningDomain;
33
+ };
34
+ /**
35
+ * The proof form the contracts read a wallet's signature in: the wallet's 20 bytes followed
36
+ * by its signature (`abi.encodePacked(wallet, signature)`).
37
+ *
38
+ * Contract: [`Accounts.requireSigned`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/identity/Accounts.sol).
39
+ */
40
+ export declare function walletProof(wallet: Address, signature: Hex): Hex;
41
+ /**
42
+ * A party accepts a package root. The first acceptance of a wallet creates its account with
43
+ * these profile fields; every later one must repeat the stored fields.
44
+ *
45
+ * Type: `PackageAcceptance(bytes32 packageRoot,address account,bytes32 profileId,bytes32 profileDocHash,uint64 deadline)`
46
+ *
47
+ * Contract: checked by [`PackageRegistry.acceptPackage`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/curation/PackageRegistry.sol);
48
+ * the digest is `PackageRegistry.acceptanceDigest`.
49
+ */
50
+ export declare function packageAcceptanceTypedData(packageRegistry: SigningDomain, packageRoot: Hex, acceptance: PartyAcceptance): {
51
+ readonly domain: {
52
+ readonly name: string;
53
+ readonly version: string;
54
+ readonly chainId: number;
55
+ readonly verifyingContract: `0x${string}`;
56
+ };
57
+ readonly types: {
58
+ readonly PackageAcceptance: readonly [{
59
+ readonly name: "packageRoot";
60
+ readonly type: "bytes32";
61
+ }, {
62
+ readonly name: "account";
63
+ readonly type: "address";
64
+ }, {
65
+ readonly name: "profileId";
66
+ readonly type: "bytes32";
67
+ }, {
68
+ readonly name: "profileDocHash";
69
+ readonly type: "bytes32";
70
+ }, {
71
+ readonly name: "deadline";
72
+ readonly type: "uint64";
73
+ }];
74
+ };
75
+ readonly primaryType: "PackageAcceptance";
76
+ readonly message: {
77
+ readonly packageRoot: `0x${string}`;
78
+ readonly account: `0x${string}`;
79
+ readonly profileId: `0x${string}`;
80
+ readonly profileDocHash: `0x${string}`;
81
+ readonly deadline: bigint;
82
+ };
83
+ };
84
+ /** The lead artist's authorization to mint one approved item. */
85
+ export interface MoveToStream {
86
+ readonly packageRoot: Hex;
87
+ readonly itemHash: Hex;
88
+ /** Any unused number; used once per artist. */
89
+ readonly nonce: bigint;
90
+ /** Unix seconds, on the chain's clock. */
91
+ readonly deadline: bigint;
92
+ }
93
+ /**
94
+ * The lead artist moves an approved item to Stream: the signature that lets anyone start the
95
+ * work's sale, once.
96
+ *
97
+ * Type: `MoveToStream(bytes32 packageRoot,bytes32 itemHash,uint256 nonce,uint64 deadline)`
98
+ *
99
+ * Contract: checked by [`PackageRegistry.authorize`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/curation/PackageRegistry.sol)
100
+ * when a sale starts; the digest is `PackageRegistry.moveDigest`.
101
+ */
102
+ export declare function moveToStreamTypedData(packageRegistry: SigningDomain, move: MoveToStream): {
103
+ readonly domain: {
104
+ readonly name: string;
105
+ readonly version: string;
106
+ readonly chainId: number;
107
+ readonly verifyingContract: `0x${string}`;
108
+ };
109
+ readonly types: {
110
+ readonly MoveToStream: readonly [{
111
+ readonly name: "packageRoot";
112
+ readonly type: "bytes32";
113
+ }, {
114
+ readonly name: "itemHash";
115
+ readonly type: "bytes32";
116
+ }, {
117
+ readonly name: "nonce";
118
+ readonly type: "uint256";
119
+ }, {
120
+ readonly name: "deadline";
121
+ readonly type: "uint64";
122
+ }];
123
+ };
124
+ readonly primaryType: "MoveToStream";
125
+ readonly message: {
126
+ readonly packageRoot: `0x${string}`;
127
+ readonly itemHash: `0x${string}`;
128
+ readonly nonce: bigint;
129
+ readonly deadline: bigint;
130
+ };
131
+ };
132
+ /** A curation signer's approval of a package root. */
133
+ export interface PackageApproval {
134
+ readonly packageRoot: Hex;
135
+ /** The hash of the evidence (the vote and its snapshot) the approval rests on. */
136
+ readonly evidenceHash: Hex;
137
+ /** `Eip712CurationVerifier.signerEpoch(signer)` now; the approval counts only while it is unchanged. */
138
+ readonly signerEpoch: bigint;
139
+ }
140
+ /**
141
+ * A curation signer approves a package root. Only an account holding the curation signer role
142
+ * can make a signature the registry accepts.
143
+ *
144
+ * Type: `PackageApproval(bytes32 packageRoot,bytes32 evidenceHash,uint256 signerEpoch)`
145
+ *
146
+ * Contract: checked by [`Eip712CurationVerifier`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/curation/Eip712CurationVerifier.sol)
147
+ * for `PackageRegistry.registerPackage`; the digest is `approvalDigest`. The attestation the
148
+ * registry takes is `abi.encode(signer, signature)`.
149
+ */
150
+ export declare function packageApprovalTypedData(curationVerifier: SigningDomain, approval: PackageApproval): {
151
+ readonly domain: {
152
+ readonly name: string;
153
+ readonly version: string;
154
+ readonly chainId: number;
155
+ readonly verifyingContract: `0x${string}`;
156
+ };
157
+ readonly types: {
158
+ readonly PackageApproval: readonly [{
159
+ readonly name: "packageRoot";
160
+ readonly type: "bytes32";
161
+ }, {
162
+ readonly name: "evidenceHash";
163
+ readonly type: "bytes32";
164
+ }, {
165
+ readonly name: "signerEpoch";
166
+ readonly type: "uint256";
167
+ }];
168
+ };
169
+ readonly primaryType: "PackageApproval";
170
+ readonly message: {
171
+ readonly packageRoot: `0x${string}`;
172
+ readonly evidenceHash: `0x${string}`;
173
+ readonly signerEpoch: bigint;
174
+ };
175
+ };
176
+ /**
177
+ * A wallet agrees to the account the Independent Stream module creates for it when it lists
178
+ * its first contract.
179
+ *
180
+ * Type: `ArtistRegistration(address account,bytes32 profileId,bytes32 profileDocHash,uint64 deadline)`
181
+ *
182
+ * Contract: checked by [`Accounts.registerIndependent`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/identity/Accounts.sol),
183
+ * called from `IndependentStreamRegistry.register`; the digest is `Accounts.registrationDigest`.
184
+ */
185
+ export declare function artistRegistrationTypedData(accounts: SigningDomain, registration: PartyAcceptance): {
186
+ readonly domain: {
187
+ readonly name: string;
188
+ readonly version: string;
189
+ readonly chainId: number;
190
+ readonly verifyingContract: `0x${string}`;
191
+ };
192
+ readonly types: {
193
+ readonly ArtistRegistration: readonly [{
194
+ readonly name: "account";
195
+ readonly type: "address";
196
+ }, {
197
+ readonly name: "profileId";
198
+ readonly type: "bytes32";
199
+ }, {
200
+ readonly name: "profileDocHash";
201
+ readonly type: "bytes32";
202
+ }, {
203
+ readonly name: "deadline";
204
+ readonly type: "uint64";
205
+ }];
206
+ };
207
+ readonly primaryType: "ArtistRegistration";
208
+ readonly message: {
209
+ readonly account: `0x${string}`;
210
+ readonly profileId: `0x${string}`;
211
+ readonly profileDocHash: `0x${string}`;
212
+ readonly deadline: bigint;
213
+ };
214
+ };
215
+ /**
216
+ * An account consents to `what`, for the contract `subject` only. There is no deadline and no
217
+ * nonce in the message: where one is needed it is inside `what` (see `listingSubject`).
218
+ *
219
+ * `what` is a hash: build it with `listingSubject` or `independentConsent` from values the
220
+ * signer can see, never from a value an RPC answered.
221
+ *
222
+ * Type: `Consent(address subject,bytes32 what)`
223
+ *
224
+ * Contract: checked by [`Accounts.requireConsent`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/identity/Accounts.sol),
225
+ * where `subject` is the calling contract; the digest is `Accounts.consentDigest`.
226
+ */
227
+ export declare function consentTypedData(accounts: SigningDomain, consent: {
228
+ readonly subject: Address;
229
+ readonly what: Hex;
230
+ }): {
231
+ readonly domain: {
232
+ readonly name: string;
233
+ readonly version: string;
234
+ readonly chainId: number;
235
+ readonly verifyingContract: `0x${string}`;
236
+ };
237
+ readonly types: {
238
+ readonly Consent: readonly [{
239
+ readonly name: "subject";
240
+ readonly type: "address";
241
+ }, {
242
+ readonly name: "what";
243
+ readonly type: "bytes32";
244
+ }];
245
+ };
246
+ readonly primaryType: "Consent";
247
+ readonly message: {
248
+ readonly subject: `0x${string}`;
249
+ readonly what: `0x${string}`;
250
+ };
251
+ };
252
+ /**
253
+ * An account's own identity change, signed by any wallet of the account.
254
+ *
255
+ * Type: `IdentityChange(uint256 artistId,address root,address payout,bytes32 profileId,bytes32 profileDocHash,uint256 nonce,uint64 deadline)`
256
+ *
257
+ * Contract: checked by [`Accounts`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/identity/Accounts.sol)
258
+ * when the change is staged; the digest is `Accounts.changeDigest`. `nonce` is
259
+ * `Accounts.changeNonce(artistId)`.
260
+ */
261
+ export declare function identityChangeTypedData(accounts: SigningDomain, change: {
262
+ readonly artistId: bigint;
263
+ readonly next: ArtistIdentity;
264
+ readonly nonce: bigint;
265
+ readonly deadline: bigint;
266
+ }): {
267
+ readonly domain: {
268
+ readonly name: string;
269
+ readonly version: string;
270
+ readonly chainId: number;
271
+ readonly verifyingContract: `0x${string}`;
272
+ };
273
+ readonly types: {
274
+ readonly IdentityChange: readonly [{
275
+ readonly name: "artistId";
276
+ readonly type: "uint256";
277
+ }, {
278
+ readonly name: "root";
279
+ readonly type: "address";
280
+ }, {
281
+ readonly name: "payout";
282
+ readonly type: "address";
283
+ }, {
284
+ readonly name: "profileId";
285
+ readonly type: "bytes32";
286
+ }, {
287
+ readonly name: "profileDocHash";
288
+ readonly type: "bytes32";
289
+ }, {
290
+ readonly name: "nonce";
291
+ readonly type: "uint256";
292
+ }, {
293
+ readonly name: "deadline";
294
+ readonly type: "uint64";
295
+ }];
296
+ };
297
+ readonly primaryType: "IdentityChange";
298
+ readonly message: {
299
+ readonly artistId: bigint;
300
+ readonly root: `0x${string}`;
301
+ readonly payout: `0x${string}`;
302
+ readonly profileId: `0x${string}`;
303
+ readonly profileDocHash: `0x${string}`;
304
+ readonly nonce: bigint;
305
+ readonly deadline: bigint;
306
+ };
307
+ };
308
+ /**
309
+ * The new root accepts a replacement of an account's root by the network.
310
+ *
311
+ * Type: `ReplacementAcceptance(uint256 artistId,address root,address payout,bytes32 profileId,bytes32 profileDocHash,bytes32 evidenceHash,uint64 deadline)`
312
+ *
313
+ * Contract: checked by [`Accounts`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/identity/Accounts.sol);
314
+ * the digest is `Accounts.replacementDigest`.
315
+ */
316
+ export declare function replacementAcceptanceTypedData(accounts: SigningDomain, replacement: {
317
+ readonly artistId: bigint;
318
+ readonly next: ArtistIdentity;
319
+ readonly evidenceHash: Hex;
320
+ readonly deadline: bigint;
321
+ }): {
322
+ readonly domain: {
323
+ readonly name: string;
324
+ readonly version: string;
325
+ readonly chainId: number;
326
+ readonly verifyingContract: `0x${string}`;
327
+ };
328
+ readonly types: {
329
+ readonly ReplacementAcceptance: readonly [{
330
+ readonly name: "artistId";
331
+ readonly type: "uint256";
332
+ }, {
333
+ readonly name: "root";
334
+ readonly type: "address";
335
+ }, {
336
+ readonly name: "payout";
337
+ readonly type: "address";
338
+ }, {
339
+ readonly name: "profileId";
340
+ readonly type: "bytes32";
341
+ }, {
342
+ readonly name: "profileDocHash";
343
+ readonly type: "bytes32";
344
+ }, {
345
+ readonly name: "evidenceHash";
346
+ readonly type: "bytes32";
347
+ }, {
348
+ readonly name: "deadline";
349
+ readonly type: "uint64";
350
+ }];
351
+ };
352
+ readonly primaryType: "ReplacementAcceptance";
353
+ readonly message: {
354
+ readonly artistId: bigint;
355
+ readonly root: `0x${string}`;
356
+ readonly payout: `0x${string}`;
357
+ readonly profileId: `0x${string}`;
358
+ readonly profileDocHash: `0x${string}`;
359
+ readonly evidenceHash: `0x${string}`;
360
+ readonly deadline: bigint;
361
+ };
362
+ };
363
+ /** What every work-rules signature names: the work, and the state it was signed for. */
364
+ export interface WorkChange {
365
+ readonly token: Address;
366
+ readonly tokenId: bigint;
367
+ /** `workStateHash` of the work now. The signature is void once the state changes. */
368
+ readonly stateHash: Hex;
369
+ /** Unix seconds, on the chain's clock. */
370
+ readonly deadline: bigint;
371
+ }
372
+ /**
373
+ * Every party agrees to relicense a work. `licenseKey` is `licenseKey(spdxId)` of the new
374
+ * license and `textFileId` the file ID of its text.
375
+ *
376
+ * Type: `Relicense(address token,uint256 tokenId,bytes32 licenseKey,bytes32 textFileId,bytes32 stateHash,uint64 deadline)`
377
+ *
378
+ * Contract: checked by [`WorkRules.relicense`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/records/WorkRules.sol),
379
+ * one signature per party, and the network makes the call.
380
+ */
381
+ export declare function relicenseTypedData(workRules: SigningDomain, change: WorkChange & {
382
+ readonly licenseKey: Hex;
383
+ readonly textFileId: Hex;
384
+ }): {
385
+ readonly domain: {
386
+ readonly name: string;
387
+ readonly version: string;
388
+ readonly chainId: number;
389
+ readonly verifyingContract: `0x${string}`;
390
+ };
391
+ readonly types: {
392
+ readonly Relicense: readonly [{
393
+ readonly name: "token";
394
+ readonly type: "address";
395
+ }, {
396
+ readonly name: "tokenId";
397
+ readonly type: "uint256";
398
+ }, {
399
+ readonly name: "licenseKey";
400
+ readonly type: "bytes32";
401
+ }, {
402
+ readonly name: "textFileId";
403
+ readonly type: "bytes32";
404
+ }, {
405
+ readonly name: "stateHash";
406
+ readonly type: "bytes32";
407
+ }, {
408
+ readonly name: "deadline";
409
+ readonly type: "uint64";
410
+ }];
411
+ };
412
+ readonly primaryType: "Relicense";
413
+ readonly message: {
414
+ readonly token: `0x${string}`;
415
+ readonly tokenId: bigint;
416
+ readonly licenseKey: `0x${string}`;
417
+ readonly textFileId: `0x${string}`;
418
+ readonly stateHash: `0x${string}`;
419
+ readonly deadline: bigint;
420
+ };
421
+ };
422
+ /**
423
+ * Every party agrees to change a work's royalty rate (`rate` out of 100,000).
424
+ *
425
+ * Type: `RoyaltyRateChange(address token,uint256 tokenId,uint24 rate,bytes32 stateHash,uint64 deadline)`
426
+ *
427
+ * Contract: checked by [`WorkRules.setRoyaltyRate`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/records/WorkRules.sol),
428
+ * one signature per party, and the network makes the call.
429
+ */
430
+ export declare function royaltyRateChangeTypedData(workRules: SigningDomain, change: WorkChange & {
431
+ readonly rate: number;
432
+ }): {
433
+ readonly domain: {
434
+ readonly name: string;
435
+ readonly version: string;
436
+ readonly chainId: number;
437
+ readonly verifyingContract: `0x${string}`;
438
+ };
439
+ readonly types: {
440
+ readonly RoyaltyRateChange: readonly [{
441
+ readonly name: "token";
442
+ readonly type: "address";
443
+ }, {
444
+ readonly name: "tokenId";
445
+ readonly type: "uint256";
446
+ }, {
447
+ readonly name: "rate";
448
+ readonly type: "uint24";
449
+ }, {
450
+ readonly name: "stateHash";
451
+ readonly type: "bytes32";
452
+ }, {
453
+ readonly name: "deadline";
454
+ readonly type: "uint64";
455
+ }];
456
+ };
457
+ readonly primaryType: "RoyaltyRateChange";
458
+ readonly message: {
459
+ readonly token: `0x${string}`;
460
+ readonly tokenId: bigint;
461
+ readonly rate: number;
462
+ readonly stateHash: `0x${string}`;
463
+ readonly deadline: bigint;
464
+ };
465
+ };
466
+ /**
467
+ * The lead artist gives up powers over a work for good. `powers` is a mask of `WORK_POWERS`.
468
+ *
469
+ * Type: `RenouncePowers(address token,uint256 tokenId,uint16 powers,bytes32 stateHash,uint64 deadline)`
470
+ *
471
+ * Contract: checked by [`WorkRules.renounce`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/records/WorkRules.sol).
472
+ */
473
+ export declare function renouncePowersTypedData(workRules: SigningDomain, change: WorkChange & {
474
+ readonly powers: number;
475
+ }): {
476
+ readonly domain: {
477
+ readonly name: string;
478
+ readonly version: string;
479
+ readonly chainId: number;
480
+ readonly verifyingContract: `0x${string}`;
481
+ };
482
+ readonly types: {
483
+ readonly RenouncePowers: readonly [{
484
+ readonly name: "token";
485
+ readonly type: "address";
486
+ }, {
487
+ readonly name: "tokenId";
488
+ readonly type: "uint256";
489
+ }, {
490
+ readonly name: "powers";
491
+ readonly type: "uint16";
492
+ }, {
493
+ readonly name: "stateHash";
494
+ readonly type: "bytes32";
495
+ }, {
496
+ readonly name: "deadline";
497
+ readonly type: "uint64";
498
+ }];
499
+ };
500
+ readonly primaryType: "RenouncePowers";
501
+ readonly message: {
502
+ readonly token: `0x${string}`;
503
+ readonly tokenId: bigint;
504
+ readonly powers: number;
505
+ readonly stateHash: `0x${string}`;
506
+ readonly deadline: bigint;
507
+ };
508
+ };
509
+ /** A payee lets someone else send its share of a vault to `recipient`. */
510
+ export interface ReleaseAuthorization {
511
+ /** The split wallet (vault). */
512
+ readonly wallet: Address;
513
+ /** The asset; the zero address for ETH. */
514
+ readonly asset: Address;
515
+ /** The payee's index in the wallet's payee list. */
516
+ readonly payee: bigint;
517
+ /** The signer: the payee's account. */
518
+ readonly account: Address;
519
+ readonly recipient: Address;
520
+ /** The exact amount; `2n ** 256n - 1n` for everything releasable. */
521
+ readonly amount: bigint;
522
+ /** Any unused number; used once per signer. */
523
+ readonly nonce: bigint;
524
+ /** Unix seconds, on the chain's clock. */
525
+ readonly deadline: bigint;
526
+ }
527
+ /**
528
+ * A payee authorizes a release of its share to a recipient, relayed by anyone.
529
+ *
530
+ * Type: `ReleaseAuthorization(address wallet,address asset,uint256 payee,address account,address recipient,uint256 amount,uint256 nonce,uint256 deadline)`
531
+ *
532
+ * Contract: checked by [`SplitLedger.releaseWithAuthorization`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/economics/SplitLedger.sol);
533
+ * the digest is `SplitLedger.releaseDigest`.
534
+ */
535
+ export declare function releaseAuthorizationTypedData(splitLedger: SigningDomain, authorization: ReleaseAuthorization): {
536
+ readonly domain: {
537
+ readonly name: string;
538
+ readonly version: string;
539
+ readonly chainId: number;
540
+ readonly verifyingContract: `0x${string}`;
541
+ };
542
+ readonly types: {
543
+ readonly ReleaseAuthorization: readonly [{
544
+ readonly name: "wallet";
545
+ readonly type: "address";
546
+ }, {
547
+ readonly name: "asset";
548
+ readonly type: "address";
549
+ }, {
550
+ readonly name: "payee";
551
+ readonly type: "uint256";
552
+ }, {
553
+ readonly name: "account";
554
+ readonly type: "address";
555
+ }, {
556
+ readonly name: "recipient";
557
+ readonly type: "address";
558
+ }, {
559
+ readonly name: "amount";
560
+ readonly type: "uint256";
561
+ }, {
562
+ readonly name: "nonce";
563
+ readonly type: "uint256";
564
+ }, {
565
+ readonly name: "deadline";
566
+ readonly type: "uint256";
567
+ }];
568
+ };
569
+ readonly primaryType: "ReleaseAuthorization";
570
+ readonly message: {
571
+ readonly wallet: `0x${string}`;
572
+ readonly asset: `0x${string}`;
573
+ readonly payee: bigint;
574
+ readonly account: `0x${string}`;
575
+ readonly recipient: `0x${string}`;
576
+ readonly amount: bigint;
577
+ readonly nonce: bigint;
578
+ readonly deadline: bigint;
579
+ };
580
+ };
581
+ /** A statement about a token or a work (`IStatementLog.Statement`). */
582
+ export interface Statement {
583
+ /** The token contract, or zero when `id` is a work ID. */
584
+ readonly token: Address;
585
+ readonly id: bigint;
586
+ readonly kind: Hex;
587
+ readonly schema: Hex;
588
+ /** The hash of the statement's document: `algorithm` 1 keccak256, 2 SHA-256, 3 BLAKE3. */
589
+ readonly content: {
590
+ readonly algorithm: number;
591
+ readonly digest: Hex;
592
+ };
593
+ readonly uri: string;
594
+ readonly fileId: Hex;
595
+ readonly supersedes: Hex;
596
+ }
597
+ /**
598
+ * A signer authorizes one statement in a role, relayed by anyone.
599
+ *
600
+ * Type: `Authorization(uint8 role,address signer,uint256 nonce,uint64 deadline,Statement statement)`
601
+ * with `Statement(address token,uint256 id,bytes32 kind,bytes32 schema,HashRef content,string uri,bytes32 fileId,bytes32 supersedes)`
602
+ * and `HashRef(uint16 algorithm,bytes32 digest)`.
603
+ *
604
+ * Contract: checked by [`StatementLog.appendSigned`](https://github.com/6529-Collections/6529-stream/blob/c6d4965861907841519cf3878c9db7052424a9a0/src/records/StatementLog.sol);
605
+ * the digest is `StatementLog.authorizationDigest`.
606
+ */
607
+ export declare function statementAuthorizationTypedData(statementLog: SigningDomain, authorization: {
608
+ /** `STATEMENT_ROLE`. */
609
+ readonly role: number;
610
+ readonly signer: Address;
611
+ readonly nonce: bigint;
612
+ readonly deadline: bigint;
613
+ readonly statement: Statement;
614
+ }): {
615
+ readonly domain: {
616
+ readonly name: string;
617
+ readonly version: string;
618
+ readonly chainId: number;
619
+ readonly verifyingContract: `0x${string}`;
620
+ };
621
+ readonly types: {
622
+ readonly Authorization: readonly [{
623
+ readonly name: "role";
624
+ readonly type: "uint8";
625
+ }, {
626
+ readonly name: "signer";
627
+ readonly type: "address";
628
+ }, {
629
+ readonly name: "nonce";
630
+ readonly type: "uint256";
631
+ }, {
632
+ readonly name: "deadline";
633
+ readonly type: "uint64";
634
+ }, {
635
+ readonly name: "statement";
636
+ readonly type: "Statement";
637
+ }];
638
+ readonly Statement: readonly [{
639
+ readonly name: "token";
640
+ readonly type: "address";
641
+ }, {
642
+ readonly name: "id";
643
+ readonly type: "uint256";
644
+ }, {
645
+ readonly name: "kind";
646
+ readonly type: "bytes32";
647
+ }, {
648
+ readonly name: "schema";
649
+ readonly type: "bytes32";
650
+ }, {
651
+ readonly name: "content";
652
+ readonly type: "HashRef";
653
+ }, {
654
+ readonly name: "uri";
655
+ readonly type: "string";
656
+ }, {
657
+ readonly name: "fileId";
658
+ readonly type: "bytes32";
659
+ }, {
660
+ readonly name: "supersedes";
661
+ readonly type: "bytes32";
662
+ }];
663
+ readonly HashRef: readonly [{
664
+ readonly name: "algorithm";
665
+ readonly type: "uint16";
666
+ }, {
667
+ readonly name: "digest";
668
+ readonly type: "bytes32";
669
+ }];
670
+ };
671
+ readonly primaryType: "Authorization";
672
+ readonly message: {
673
+ readonly role: number;
674
+ readonly signer: `0x${string}`;
675
+ readonly nonce: bigint;
676
+ readonly deadline: bigint;
677
+ readonly statement: Statement;
678
+ };
679
+ };