@wuwei-labs/srsly 2.0.0-beta.2 → 2.0.0-beta.21

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 (188) hide show
  1. package/README.md +305 -110
  2. package/dist/cjs/codama/accounts/config.js +88 -0
  3. package/dist/cjs/codama/accounts/config.js.map +1 -0
  4. package/dist/cjs/codama/accounts/contractState.js +17 -39
  5. package/dist/cjs/codama/accounts/contractState.js.map +1 -1
  6. package/dist/cjs/codama/accounts/index.js +1 -1
  7. package/dist/cjs/codama/accounts/index.js.map +1 -1
  8. package/dist/cjs/codama/accounts/rentalState.js +18 -33
  9. package/dist/cjs/codama/accounts/rentalState.js.map +1 -1
  10. package/dist/cjs/codama/accounts/thread.js +15 -32
  11. package/dist/cjs/codama/accounts/thread.js.map +1 -1
  12. package/dist/cjs/codama/errors/srsly.js +24 -3
  13. package/dist/cjs/codama/errors/srsly.js.map +1 -1
  14. package/dist/cjs/codama/instructions/acceptRental.js +202 -224
  15. package/dist/cjs/codama/instructions/acceptRental.js.map +1 -1
  16. package/dist/cjs/codama/instructions/cancelRental.js +100 -136
  17. package/dist/cjs/codama/instructions/cancelRental.js.map +1 -1
  18. package/dist/cjs/codama/instructions/closeContract.js +95 -116
  19. package/dist/cjs/codama/instructions/closeContract.js.map +1 -1
  20. package/dist/cjs/codama/instructions/closeRental.js +119 -132
  21. package/dist/cjs/codama/instructions/closeRental.js.map +1 -1
  22. package/dist/cjs/codama/instructions/createContract.js +127 -143
  23. package/dist/cjs/codama/instructions/createContract.js.map +1 -1
  24. package/dist/cjs/codama/instructions/index.js +2 -1
  25. package/dist/cjs/codama/instructions/index.js.map +1 -1
  26. package/dist/cjs/codama/instructions/initializeConfig.js +131 -0
  27. package/dist/cjs/codama/instructions/initializeConfig.js.map +1 -0
  28. package/dist/cjs/codama/instructions/payRental.js +125 -129
  29. package/dist/cjs/codama/instructions/payRental.js.map +1 -1
  30. package/dist/cjs/codama/instructions/resetRental.js +55 -77
  31. package/dist/cjs/codama/instructions/resetRental.js.map +1 -1
  32. package/dist/cjs/codama/instructions/updateConfig.js +145 -0
  33. package/dist/cjs/codama/instructions/updateConfig.js.map +1 -0
  34. package/dist/cjs/codama/programs/srsly.js +12 -8
  35. package/dist/cjs/codama/programs/srsly.js.map +1 -1
  36. package/dist/cjs/codama/shared/index.js +6 -2
  37. package/dist/cjs/codama/shared/index.js.map +1 -1
  38. package/dist/cjs/codama/types/trigger.js +1 -1
  39. package/dist/cjs/codama/types/trigger.js.map +1 -1
  40. package/dist/cjs/codama/types/triggerContext.js +1 -1
  41. package/dist/cjs/codama/types/triggerContext.js.map +1 -1
  42. package/dist/cjs/contract/close.js +75 -34
  43. package/dist/cjs/contract/close.js.map +1 -1
  44. package/dist/cjs/contract/create.js +59 -43
  45. package/dist/cjs/contract/create.js.map +1 -1
  46. package/dist/cjs/index.js +7 -1
  47. package/dist/cjs/index.js.map +1 -1
  48. package/dist/cjs/package.json +54 -0
  49. package/dist/cjs/rental/accept.js +68 -40
  50. package/dist/cjs/rental/accept.js.map +1 -1
  51. package/dist/cjs/rental/cancel.js +36 -28
  52. package/dist/cjs/rental/cancel.js.map +1 -1
  53. package/dist/cjs/rental/close.js +37 -29
  54. package/dist/cjs/rental/close.js.map +1 -1
  55. package/dist/cjs/rental/reset.js +46 -42
  56. package/dist/cjs/rental/reset.js.map +1 -1
  57. package/dist/cjs/utils/config.js +319 -0
  58. package/dist/cjs/utils/config.js.map +1 -0
  59. package/dist/cjs/utils/constants.js +69 -9
  60. package/dist/cjs/utils/constants.js.map +1 -1
  61. package/dist/cjs/utils/index.js +1 -0
  62. package/dist/cjs/utils/index.js.map +1 -1
  63. package/dist/cjs/utils/profiles.js +96 -95
  64. package/dist/cjs/utils/profiles.js.map +1 -1
  65. package/dist/esm/codama/accounts/config.js +76 -0
  66. package/dist/esm/codama/accounts/config.js.map +1 -0
  67. package/dist/esm/codama/accounts/contractState.js +3 -7
  68. package/dist/esm/codama/accounts/contractState.js.map +1 -1
  69. package/dist/esm/codama/accounts/index.js +1 -1
  70. package/dist/esm/codama/accounts/index.js.map +1 -1
  71. package/dist/esm/codama/accounts/rentalState.js +3 -1
  72. package/dist/esm/codama/accounts/rentalState.js.map +1 -1
  73. package/dist/esm/codama/errors/srsly.js +23 -2
  74. package/dist/esm/codama/errors/srsly.js.map +1 -1
  75. package/dist/esm/codama/instructions/acceptRental.js +30 -39
  76. package/dist/esm/codama/instructions/acceptRental.js.map +1 -1
  77. package/dist/esm/codama/instructions/cancelRental.js +10 -33
  78. package/dist/esm/codama/instructions/cancelRental.js.map +1 -1
  79. package/dist/esm/codama/instructions/closeContract.js +17 -25
  80. package/dist/esm/codama/instructions/closeContract.js.map +1 -1
  81. package/dist/esm/codama/instructions/closeRental.js +19 -19
  82. package/dist/esm/codama/instructions/closeRental.js.map +1 -1
  83. package/dist/esm/codama/instructions/createContract.js +13 -16
  84. package/dist/esm/codama/instructions/createContract.js.map +1 -1
  85. package/dist/esm/codama/instructions/index.js +2 -1
  86. package/dist/esm/codama/instructions/index.js.map +1 -1
  87. package/dist/esm/codama/instructions/initializeConfig.js +121 -0
  88. package/dist/esm/codama/instructions/initializeConfig.js.map +1 -0
  89. package/dist/esm/codama/instructions/payRental.js +34 -25
  90. package/dist/esm/codama/instructions/payRental.js.map +1 -1
  91. package/dist/esm/codama/instructions/resetRental.js +0 -9
  92. package/dist/esm/codama/instructions/resetRental.js.map +1 -1
  93. package/dist/esm/codama/instructions/updateConfig.js +135 -0
  94. package/dist/esm/codama/instructions/updateConfig.js.map +1 -0
  95. package/dist/esm/codama/programs/srsly.js +12 -8
  96. package/dist/esm/codama/programs/srsly.js.map +1 -1
  97. package/dist/esm/contract/close.js +68 -16
  98. package/dist/esm/contract/close.js.map +1 -1
  99. package/dist/esm/contract/create.js +60 -33
  100. package/dist/esm/contract/create.js.map +1 -1
  101. package/dist/esm/index.js +5 -1
  102. package/dist/esm/index.js.map +1 -1
  103. package/dist/esm/package.json +54 -0
  104. package/dist/esm/rental/accept.js +70 -31
  105. package/dist/esm/rental/accept.js.map +1 -1
  106. package/dist/esm/rental/cancel.js +37 -18
  107. package/dist/esm/rental/cancel.js.map +1 -1
  108. package/dist/esm/rental/close.js +38 -19
  109. package/dist/esm/rental/close.js.map +1 -1
  110. package/dist/esm/rental/reset.js +48 -33
  111. package/dist/esm/rental/reset.js.map +1 -1
  112. package/dist/esm/utils/config.js +277 -0
  113. package/dist/esm/utils/config.js.map +1 -0
  114. package/dist/esm/utils/constants.js +60 -7
  115. package/dist/esm/utils/constants.js.map +1 -1
  116. package/dist/esm/utils/index.js +1 -0
  117. package/dist/esm/utils/index.js.map +1 -1
  118. package/dist/esm/utils/profiles.js +39 -19
  119. package/dist/esm/utils/profiles.js.map +1 -1
  120. package/dist/types/codama/accounts/config.d.ts +52 -0
  121. package/dist/types/codama/accounts/config.d.ts.map +1 -0
  122. package/dist/types/codama/accounts/contractState.d.ts +2 -4
  123. package/dist/types/codama/accounts/contractState.d.ts.map +1 -1
  124. package/dist/types/codama/accounts/index.d.ts +1 -1
  125. package/dist/types/codama/accounts/index.d.ts.map +1 -1
  126. package/dist/types/codama/accounts/rentalState.d.ts +2 -0
  127. package/dist/types/codama/accounts/rentalState.d.ts.map +1 -1
  128. package/dist/types/codama/errors/srsly.d.ts +16 -2
  129. package/dist/types/codama/errors/srsly.d.ts.map +1 -1
  130. package/dist/types/codama/instructions/acceptRental.d.ts +41 -34
  131. package/dist/types/codama/instructions/acceptRental.d.ts.map +1 -1
  132. package/dist/types/codama/instructions/cancelRental.d.ts +14 -10
  133. package/dist/types/codama/instructions/cancelRental.d.ts.map +1 -1
  134. package/dist/types/codama/instructions/closeContract.d.ts +29 -21
  135. package/dist/types/codama/instructions/closeContract.d.ts.map +1 -1
  136. package/dist/types/codama/instructions/closeRental.d.ts +20 -12
  137. package/dist/types/codama/instructions/closeRental.d.ts.map +1 -1
  138. package/dist/types/codama/instructions/createContract.d.ts +27 -23
  139. package/dist/types/codama/instructions/createContract.d.ts.map +1 -1
  140. package/dist/types/codama/instructions/index.d.ts +2 -1
  141. package/dist/types/codama/instructions/index.d.ts.map +1 -1
  142. package/dist/types/codama/instructions/initializeConfig.d.ts +60 -0
  143. package/dist/types/codama/instructions/initializeConfig.d.ts.map +1 -0
  144. package/dist/types/codama/instructions/payRental.d.ts +28 -13
  145. package/dist/types/codama/instructions/payRental.d.ts.map +1 -1
  146. package/dist/types/codama/instructions/resetRental.d.ts +3 -3
  147. package/dist/types/codama/instructions/resetRental.d.ts.map +1 -1
  148. package/dist/types/codama/instructions/updateConfig.d.ts +93 -0
  149. package/dist/types/codama/instructions/updateConfig.d.ts.map +1 -0
  150. package/dist/types/codama/programs/srsly.d.ts +11 -8
  151. package/dist/types/codama/programs/srsly.d.ts.map +1 -1
  152. package/dist/types/contract/close.d.ts +20 -24
  153. package/dist/types/contract/close.d.ts.map +1 -1
  154. package/dist/types/contract/create.d.ts +34 -22
  155. package/dist/types/contract/create.d.ts.map +1 -1
  156. package/dist/types/index.d.ts +4 -1
  157. package/dist/types/index.d.ts.map +1 -1
  158. package/dist/types/rental/accept.d.ts +42 -20
  159. package/dist/types/rental/accept.d.ts.map +1 -1
  160. package/dist/types/rental/cancel.d.ts +16 -11
  161. package/dist/types/rental/cancel.d.ts.map +1 -1
  162. package/dist/types/rental/close.d.ts +16 -11
  163. package/dist/types/rental/close.d.ts.map +1 -1
  164. package/dist/types/rental/reset.d.ts +17 -20
  165. package/dist/types/rental/reset.d.ts.map +1 -1
  166. package/dist/types/utils/config.d.ts +167 -0
  167. package/dist/types/utils/config.d.ts.map +1 -0
  168. package/dist/types/utils/constants.d.ts +23 -7
  169. package/dist/types/utils/constants.d.ts.map +1 -1
  170. package/dist/types/utils/index.d.ts +1 -0
  171. package/dist/types/utils/index.d.ts.map +1 -1
  172. package/dist/types/utils/profiles.d.ts +14 -8
  173. package/dist/types/utils/profiles.d.ts.map +1 -1
  174. package/package.json +36 -14
  175. package/target/idl/srsly.json +3279 -0
  176. package/target/types/srsly.ts +1 -0
  177. package/dist/cjs/codama/accounts/fleet.js +0 -94
  178. package/dist/cjs/codama/accounts/fleet.js.map +0 -1
  179. package/dist/cjs/codama/instructions/normalizeAdmin.js +0 -165
  180. package/dist/cjs/codama/instructions/normalizeAdmin.js.map +0 -1
  181. package/dist/esm/codama/accounts/fleet.js +0 -64
  182. package/dist/esm/codama/accounts/fleet.js.map +0 -1
  183. package/dist/esm/codama/instructions/normalizeAdmin.js +0 -142
  184. package/dist/esm/codama/instructions/normalizeAdmin.js.map +0 -1
  185. package/dist/types/codama/accounts/fleet.d.ts +0 -38
  186. package/dist/types/codama/accounts/fleet.d.ts.map +0 -1
  187. package/dist/types/codama/instructions/normalizeAdmin.d.ts +0 -67
  188. package/dist/types/codama/instructions/normalizeAdmin.d.ts.map +0 -1
@@ -0,0 +1,3279 @@
1
+ {
2
+ "address": "SRSLY1fq9TJqCk1gNSE7VZL2bztvTn9wm4VR8u8jMKT",
3
+ "metadata": {
4
+ "name": "srsly",
5
+ "version": "2.0.0",
6
+ "spec": "0.1.0",
7
+ "description": "Space Rental from SLY"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "accept_rental",
12
+ "docs": [
13
+ "Allows a borrower to accept a rental by providing funds and specifying duration."
14
+ ],
15
+ "discriminator": [
16
+ 192,
17
+ 221,
18
+ 241,
19
+ 212,
20
+ 141,
21
+ 161,
22
+ 36,
23
+ 146
24
+ ],
25
+ "accounts": [
26
+ {
27
+ "name": "config",
28
+ "pda": {
29
+ "seeds": [
30
+ {
31
+ "kind": "const",
32
+ "value": [
33
+ 99,
34
+ 111,
35
+ 110,
36
+ 102,
37
+ 105,
38
+ 103
39
+ ]
40
+ }
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "name": "mint"
46
+ },
47
+ {
48
+ "name": "borrower",
49
+ "writable": true,
50
+ "signer": true
51
+ },
52
+ {
53
+ "name": "borrower_profile"
54
+ },
55
+ {
56
+ "name": "borrower_profile_faction"
57
+ },
58
+ {
59
+ "name": "borrower_token_account",
60
+ "writable": true,
61
+ "pda": {
62
+ "seeds": [
63
+ {
64
+ "kind": "account",
65
+ "path": "borrower"
66
+ },
67
+ {
68
+ "kind": "const",
69
+ "value": [
70
+ 6,
71
+ 221,
72
+ 246,
73
+ 225,
74
+ 215,
75
+ 101,
76
+ 161,
77
+ 147,
78
+ 217,
79
+ 203,
80
+ 225,
81
+ 70,
82
+ 206,
83
+ 235,
84
+ 121,
85
+ 172,
86
+ 28,
87
+ 180,
88
+ 133,
89
+ 237,
90
+ 95,
91
+ 91,
92
+ 55,
93
+ 145,
94
+ 58,
95
+ 140,
96
+ 245,
97
+ 133,
98
+ 126,
99
+ 255,
100
+ 0,
101
+ 169
102
+ ]
103
+ },
104
+ {
105
+ "kind": "account",
106
+ "path": "mint"
107
+ }
108
+ ],
109
+ "program": {
110
+ "kind": "const",
111
+ "value": [
112
+ 140,
113
+ 151,
114
+ 37,
115
+ 143,
116
+ 78,
117
+ 36,
118
+ 137,
119
+ 241,
120
+ 187,
121
+ 61,
122
+ 16,
123
+ 41,
124
+ 20,
125
+ 142,
126
+ 13,
127
+ 131,
128
+ 11,
129
+ 90,
130
+ 19,
131
+ 153,
132
+ 218,
133
+ 255,
134
+ 16,
135
+ 132,
136
+ 4,
137
+ 142,
138
+ 123,
139
+ 216,
140
+ 219,
141
+ 233,
142
+ 248,
143
+ 89
144
+ ]
145
+ }
146
+ }
147
+ },
148
+ {
149
+ "name": "fleet",
150
+ "writable": true,
151
+ "relations": [
152
+ "contract"
153
+ ]
154
+ },
155
+ {
156
+ "name": "game_id"
157
+ },
158
+ {
159
+ "name": "starbase"
160
+ },
161
+ {
162
+ "name": "starbase_player",
163
+ "writable": true
164
+ },
165
+ {
166
+ "name": "contract",
167
+ "writable": true,
168
+ "pda": {
169
+ "seeds": [
170
+ {
171
+ "kind": "const",
172
+ "value": [
173
+ 114,
174
+ 101,
175
+ 110,
176
+ 116,
177
+ 97,
178
+ 108,
179
+ 95,
180
+ 99,
181
+ 111,
182
+ 110,
183
+ 116,
184
+ 114,
185
+ 97,
186
+ 99,
187
+ 116
188
+ ]
189
+ },
190
+ {
191
+ "kind": "account",
192
+ "path": "contract.fleet",
193
+ "account": "ContractState"
194
+ }
195
+ ]
196
+ }
197
+ },
198
+ {
199
+ "name": "rental_state",
200
+ "writable": true,
201
+ "pda": {
202
+ "seeds": [
203
+ {
204
+ "kind": "const",
205
+ "value": [
206
+ 114,
207
+ 101,
208
+ 110,
209
+ 116,
210
+ 97,
211
+ 108,
212
+ 95,
213
+ 115,
214
+ 116,
215
+ 97,
216
+ 116,
217
+ 101
218
+ ]
219
+ },
220
+ {
221
+ "kind": "account",
222
+ "path": "contract"
223
+ },
224
+ {
225
+ "kind": "account",
226
+ "path": "borrower"
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ {
232
+ "name": "rental_authority",
233
+ "pda": {
234
+ "seeds": [
235
+ {
236
+ "kind": "const",
237
+ "value": [
238
+ 114,
239
+ 101,
240
+ 110,
241
+ 116,
242
+ 97,
243
+ 108,
244
+ 95,
245
+ 97,
246
+ 117,
247
+ 116,
248
+ 104,
249
+ 111,
250
+ 114,
251
+ 105,
252
+ 116,
253
+ 121
254
+ ]
255
+ }
256
+ ]
257
+ }
258
+ },
259
+ {
260
+ "name": "rental_token_account",
261
+ "writable": true,
262
+ "pda": {
263
+ "seeds": [
264
+ {
265
+ "kind": "account",
266
+ "path": "rental_state"
267
+ },
268
+ {
269
+ "kind": "const",
270
+ "value": [
271
+ 6,
272
+ 221,
273
+ 246,
274
+ 225,
275
+ 215,
276
+ 101,
277
+ 161,
278
+ 147,
279
+ 217,
280
+ 203,
281
+ 225,
282
+ 70,
283
+ 206,
284
+ 235,
285
+ 121,
286
+ 172,
287
+ 28,
288
+ 180,
289
+ 133,
290
+ 237,
291
+ 95,
292
+ 91,
293
+ 55,
294
+ 145,
295
+ 58,
296
+ 140,
297
+ 245,
298
+ 133,
299
+ 126,
300
+ 255,
301
+ 0,
302
+ 169
303
+ ]
304
+ },
305
+ {
306
+ "kind": "account",
307
+ "path": "mint"
308
+ }
309
+ ],
310
+ "program": {
311
+ "kind": "const",
312
+ "value": [
313
+ 140,
314
+ 151,
315
+ 37,
316
+ 143,
317
+ 78,
318
+ 36,
319
+ 137,
320
+ 241,
321
+ 187,
322
+ 61,
323
+ 16,
324
+ 41,
325
+ 20,
326
+ 142,
327
+ 13,
328
+ 131,
329
+ 11,
330
+ 90,
331
+ 19,
332
+ 153,
333
+ 218,
334
+ 255,
335
+ 16,
336
+ 132,
337
+ 4,
338
+ 142,
339
+ 123,
340
+ 216,
341
+ 219,
342
+ 233,
343
+ 248,
344
+ 89
345
+ ]
346
+ }
347
+ }
348
+ },
349
+ {
350
+ "name": "rental_thread",
351
+ "writable": true,
352
+ "pda": {
353
+ "seeds": [
354
+ {
355
+ "kind": "const",
356
+ "value": [
357
+ 116,
358
+ 104,
359
+ 114,
360
+ 101,
361
+ 97,
362
+ 100
363
+ ]
364
+ },
365
+ {
366
+ "kind": "account",
367
+ "path": "rental_authority"
368
+ },
369
+ {
370
+ "kind": "account",
371
+ "path": "rental_state"
372
+ }
373
+ ]
374
+ }
375
+ },
376
+ {
377
+ "name": "referral_token_account",
378
+ "docs": [
379
+ "Referral token account - defaults to system program if no referral"
380
+ ],
381
+ "optional": true
382
+ },
383
+ {
384
+ "name": "sage_program"
385
+ },
386
+ {
387
+ "name": "antegen_program",
388
+ "address": "AgThdyi1P5RkVeZD2rQahTvs8HePJoGFFxKtvok5s2J1"
389
+ },
390
+ {
391
+ "name": "token_program",
392
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
393
+ },
394
+ {
395
+ "name": "associated_token_program",
396
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
397
+ },
398
+ {
399
+ "name": "system_program",
400
+ "address": "11111111111111111111111111111111"
401
+ }
402
+ ],
403
+ "args": [
404
+ {
405
+ "name": "amount",
406
+ "type": "u64"
407
+ },
408
+ {
409
+ "name": "duration",
410
+ "type": "u64"
411
+ }
412
+ ]
413
+ },
414
+ {
415
+ "name": "cancel_rental",
416
+ "docs": [
417
+ "Cancels an ongoing rental before its scheduled end, marking it as canceled for repayment logic."
418
+ ],
419
+ "discriminator": [
420
+ 97,
421
+ 204,
422
+ 63,
423
+ 8,
424
+ 84,
425
+ 34,
426
+ 28,
427
+ 43
428
+ ],
429
+ "accounts": [
430
+ {
431
+ "name": "borrower",
432
+ "signer": true,
433
+ "relations": [
434
+ "rental_state"
435
+ ]
436
+ },
437
+ {
438
+ "name": "borrower_token_account",
439
+ "writable": true,
440
+ "pda": {
441
+ "seeds": [
442
+ {
443
+ "kind": "account",
444
+ "path": "borrower"
445
+ },
446
+ {
447
+ "kind": "const",
448
+ "value": [
449
+ 6,
450
+ 221,
451
+ 246,
452
+ 225,
453
+ 215,
454
+ 101,
455
+ 161,
456
+ 147,
457
+ 217,
458
+ 203,
459
+ 225,
460
+ 70,
461
+ 206,
462
+ 235,
463
+ 121,
464
+ 172,
465
+ 28,
466
+ 180,
467
+ 133,
468
+ 237,
469
+ 95,
470
+ 91,
471
+ 55,
472
+ 145,
473
+ 58,
474
+ 140,
475
+ 245,
476
+ 133,
477
+ 126,
478
+ 255,
479
+ 0,
480
+ 169
481
+ ]
482
+ },
483
+ {
484
+ "kind": "account",
485
+ "path": "config.atlas_mint",
486
+ "account": "Config"
487
+ }
488
+ ],
489
+ "program": {
490
+ "kind": "const",
491
+ "value": [
492
+ 140,
493
+ 151,
494
+ 37,
495
+ 143,
496
+ 78,
497
+ 36,
498
+ 137,
499
+ 241,
500
+ 187,
501
+ 61,
502
+ 16,
503
+ 41,
504
+ 20,
505
+ 142,
506
+ 13,
507
+ 131,
508
+ 11,
509
+ 90,
510
+ 19,
511
+ 153,
512
+ 218,
513
+ 255,
514
+ 16,
515
+ 132,
516
+ 4,
517
+ 142,
518
+ 123,
519
+ 216,
520
+ 219,
521
+ 233,
522
+ 248,
523
+ 89
524
+ ]
525
+ }
526
+ }
527
+ },
528
+ {
529
+ "name": "rental_thread",
530
+ "pda": {
531
+ "seeds": [
532
+ {
533
+ "kind": "const",
534
+ "value": [
535
+ 116,
536
+ 104,
537
+ 114,
538
+ 101,
539
+ 97,
540
+ 100
541
+ ]
542
+ },
543
+ {
544
+ "kind": "account",
545
+ "path": "rental_authority"
546
+ },
547
+ {
548
+ "kind": "account",
549
+ "path": "rental_state"
550
+ }
551
+ ]
552
+ }
553
+ },
554
+ {
555
+ "name": "contract"
556
+ },
557
+ {
558
+ "name": "rental_state",
559
+ "writable": true,
560
+ "pda": {
561
+ "seeds": [
562
+ {
563
+ "kind": "const",
564
+ "value": [
565
+ 114,
566
+ 101,
567
+ 110,
568
+ 116,
569
+ 97,
570
+ 108,
571
+ 95,
572
+ 115,
573
+ 116,
574
+ 97,
575
+ 116,
576
+ 101
577
+ ]
578
+ },
579
+ {
580
+ "kind": "account",
581
+ "path": "contract"
582
+ },
583
+ {
584
+ "kind": "account",
585
+ "path": "borrower"
586
+ }
587
+ ]
588
+ }
589
+ },
590
+ {
591
+ "name": "rental_token_account",
592
+ "writable": true,
593
+ "pda": {
594
+ "seeds": [
595
+ {
596
+ "kind": "account",
597
+ "path": "rental_state"
598
+ },
599
+ {
600
+ "kind": "const",
601
+ "value": [
602
+ 6,
603
+ 221,
604
+ 246,
605
+ 225,
606
+ 215,
607
+ 101,
608
+ 161,
609
+ 147,
610
+ 217,
611
+ 203,
612
+ 225,
613
+ 70,
614
+ 206,
615
+ 235,
616
+ 121,
617
+ 172,
618
+ 28,
619
+ 180,
620
+ 133,
621
+ 237,
622
+ 95,
623
+ 91,
624
+ 55,
625
+ 145,
626
+ 58,
627
+ 140,
628
+ 245,
629
+ 133,
630
+ 126,
631
+ 255,
632
+ 0,
633
+ 169
634
+ ]
635
+ },
636
+ {
637
+ "kind": "account",
638
+ "path": "config.atlas_mint",
639
+ "account": "Config"
640
+ }
641
+ ],
642
+ "program": {
643
+ "kind": "const",
644
+ "value": [
645
+ 140,
646
+ 151,
647
+ 37,
648
+ 143,
649
+ 78,
650
+ 36,
651
+ 137,
652
+ 241,
653
+ 187,
654
+ 61,
655
+ 16,
656
+ 41,
657
+ 20,
658
+ 142,
659
+ 13,
660
+ 131,
661
+ 11,
662
+ 90,
663
+ 19,
664
+ 153,
665
+ 218,
666
+ 255,
667
+ 16,
668
+ 132,
669
+ 4,
670
+ 142,
671
+ 123,
672
+ 216,
673
+ 219,
674
+ 233,
675
+ 248,
676
+ 89
677
+ ]
678
+ }
679
+ }
680
+ },
681
+ {
682
+ "name": "rental_authority",
683
+ "pda": {
684
+ "seeds": [
685
+ {
686
+ "kind": "const",
687
+ "value": [
688
+ 114,
689
+ 101,
690
+ 110,
691
+ 116,
692
+ 97,
693
+ 108,
694
+ 95,
695
+ 97,
696
+ 117,
697
+ 116,
698
+ 104,
699
+ 111,
700
+ 114,
701
+ 105,
702
+ 116,
703
+ 121
704
+ ]
705
+ }
706
+ ]
707
+ }
708
+ },
709
+ {
710
+ "name": "config",
711
+ "pda": {
712
+ "seeds": [
713
+ {
714
+ "kind": "const",
715
+ "value": [
716
+ 99,
717
+ 111,
718
+ 110,
719
+ 102,
720
+ 105,
721
+ 103
722
+ ]
723
+ }
724
+ ]
725
+ }
726
+ },
727
+ {
728
+ "name": "token_program",
729
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
730
+ }
731
+ ],
732
+ "args": []
733
+ },
734
+ {
735
+ "name": "close_contract",
736
+ "docs": [
737
+ "Closes an existing rental contract, preventing further rentals."
738
+ ],
739
+ "discriminator": [
740
+ 37,
741
+ 244,
742
+ 34,
743
+ 168,
744
+ 92,
745
+ 202,
746
+ 80,
747
+ 106
748
+ ],
749
+ "accounts": [
750
+ {
751
+ "name": "config",
752
+ "pda": {
753
+ "seeds": [
754
+ {
755
+ "kind": "const",
756
+ "value": [
757
+ 99,
758
+ 111,
759
+ 110,
760
+ 102,
761
+ 105,
762
+ 103
763
+ ]
764
+ }
765
+ ]
766
+ }
767
+ },
768
+ {
769
+ "name": "owner",
770
+ "writable": true,
771
+ "signer": true,
772
+ "relations": [
773
+ "contract"
774
+ ]
775
+ },
776
+ {
777
+ "name": "owner_token_account",
778
+ "docs": [
779
+ "Fleet owner's associated token account (optional)."
780
+ ],
781
+ "writable": true,
782
+ "optional": true,
783
+ "pda": {
784
+ "seeds": [
785
+ {
786
+ "kind": "account",
787
+ "path": "owner"
788
+ },
789
+ {
790
+ "kind": "const",
791
+ "value": [
792
+ 6,
793
+ 221,
794
+ 246,
795
+ 225,
796
+ 215,
797
+ 101,
798
+ 161,
799
+ 147,
800
+ 217,
801
+ 203,
802
+ 225,
803
+ 70,
804
+ 206,
805
+ 235,
806
+ 121,
807
+ 172,
808
+ 28,
809
+ 180,
810
+ 133,
811
+ 237,
812
+ 95,
813
+ 91,
814
+ 55,
815
+ 145,
816
+ 58,
817
+ 140,
818
+ 245,
819
+ 133,
820
+ 126,
821
+ 255,
822
+ 0,
823
+ 169
824
+ ]
825
+ },
826
+ {
827
+ "kind": "account",
828
+ "path": "config.atlas_mint",
829
+ "account": "Config"
830
+ }
831
+ ],
832
+ "program": {
833
+ "kind": "const",
834
+ "value": [
835
+ 140,
836
+ 151,
837
+ 37,
838
+ 143,
839
+ 78,
840
+ 36,
841
+ 137,
842
+ 241,
843
+ 187,
844
+ 61,
845
+ 16,
846
+ 41,
847
+ 20,
848
+ 142,
849
+ 13,
850
+ 131,
851
+ 11,
852
+ 90,
853
+ 19,
854
+ 153,
855
+ 218,
856
+ 255,
857
+ 16,
858
+ 132,
859
+ 4,
860
+ 142,
861
+ 123,
862
+ 216,
863
+ 219,
864
+ 233,
865
+ 248,
866
+ 89
867
+ ]
868
+ }
869
+ }
870
+ },
871
+ {
872
+ "name": "rental_token_account",
873
+ "docs": [
874
+ "Rental token escrow account (tracked under current_rental_state)."
875
+ ],
876
+ "writable": true,
877
+ "optional": true,
878
+ "pda": {
879
+ "seeds": [
880
+ {
881
+ "kind": "account",
882
+ "path": "contract.current_rental_state",
883
+ "account": "ContractState"
884
+ },
885
+ {
886
+ "kind": "const",
887
+ "value": [
888
+ 6,
889
+ 221,
890
+ 246,
891
+ 225,
892
+ 215,
893
+ 101,
894
+ 161,
895
+ 147,
896
+ 217,
897
+ 203,
898
+ 225,
899
+ 70,
900
+ 206,
901
+ 235,
902
+ 121,
903
+ 172,
904
+ 28,
905
+ 180,
906
+ 133,
907
+ 237,
908
+ 95,
909
+ 91,
910
+ 55,
911
+ 145,
912
+ 58,
913
+ 140,
914
+ 245,
915
+ 133,
916
+ 126,
917
+ 255,
918
+ 0,
919
+ 169
920
+ ]
921
+ },
922
+ {
923
+ "kind": "account",
924
+ "path": "config.atlas_mint",
925
+ "account": "Config"
926
+ }
927
+ ],
928
+ "program": {
929
+ "kind": "const",
930
+ "value": [
931
+ 140,
932
+ 151,
933
+ 37,
934
+ 143,
935
+ 78,
936
+ 36,
937
+ 137,
938
+ 241,
939
+ 187,
940
+ 61,
941
+ 16,
942
+ 41,
943
+ 20,
944
+ 142,
945
+ 13,
946
+ 131,
947
+ 11,
948
+ 90,
949
+ 19,
950
+ 153,
951
+ 218,
952
+ 255,
953
+ 16,
954
+ 132,
955
+ 4,
956
+ 142,
957
+ 123,
958
+ 216,
959
+ 219,
960
+ 233,
961
+ 248,
962
+ 89
963
+ ]
964
+ }
965
+ }
966
+ },
967
+ {
968
+ "name": "rental_state",
969
+ "docs": [
970
+ "Active rental state, if any."
971
+ ],
972
+ "writable": true,
973
+ "optional": true
974
+ },
975
+ {
976
+ "name": "fleet",
977
+ "writable": true
978
+ },
979
+ {
980
+ "name": "game_id",
981
+ "optional": true
982
+ },
983
+ {
984
+ "name": "starbase",
985
+ "optional": true
986
+ },
987
+ {
988
+ "name": "starbase_player",
989
+ "writable": true,
990
+ "optional": true
991
+ },
992
+ {
993
+ "name": "contract",
994
+ "writable": true,
995
+ "pda": {
996
+ "seeds": [
997
+ {
998
+ "kind": "const",
999
+ "value": [
1000
+ 114,
1001
+ 101,
1002
+ 110,
1003
+ 116,
1004
+ 97,
1005
+ 108,
1006
+ 95,
1007
+ 99,
1008
+ 111,
1009
+ 110,
1010
+ 116,
1011
+ 114,
1012
+ 97,
1013
+ 99,
1014
+ 116
1015
+ ]
1016
+ },
1017
+ {
1018
+ "kind": "account",
1019
+ "path": "contract.fleet",
1020
+ "account": "ContractState"
1021
+ }
1022
+ ]
1023
+ }
1024
+ },
1025
+ {
1026
+ "name": "rental_authority",
1027
+ "pda": {
1028
+ "seeds": [
1029
+ {
1030
+ "kind": "const",
1031
+ "value": [
1032
+ 114,
1033
+ 101,
1034
+ 110,
1035
+ 116,
1036
+ 97,
1037
+ 108,
1038
+ 95,
1039
+ 97,
1040
+ 117,
1041
+ 116,
1042
+ 104,
1043
+ 111,
1044
+ 114,
1045
+ 105,
1046
+ 116,
1047
+ 121
1048
+ ]
1049
+ }
1050
+ ]
1051
+ }
1052
+ },
1053
+ {
1054
+ "name": "sage_program"
1055
+ },
1056
+ {
1057
+ "name": "fee_token_account",
1058
+ "writable": true,
1059
+ "optional": true,
1060
+ "pda": {
1061
+ "seeds": [
1062
+ {
1063
+ "kind": "account",
1064
+ "path": "config.fees_account",
1065
+ "account": "Config"
1066
+ },
1067
+ {
1068
+ "kind": "const",
1069
+ "value": [
1070
+ 6,
1071
+ 221,
1072
+ 246,
1073
+ 225,
1074
+ 215,
1075
+ 101,
1076
+ 161,
1077
+ 147,
1078
+ 217,
1079
+ 203,
1080
+ 225,
1081
+ 70,
1082
+ 206,
1083
+ 235,
1084
+ 121,
1085
+ 172,
1086
+ 28,
1087
+ 180,
1088
+ 133,
1089
+ 237,
1090
+ 95,
1091
+ 91,
1092
+ 55,
1093
+ 145,
1094
+ 58,
1095
+ 140,
1096
+ 245,
1097
+ 133,
1098
+ 126,
1099
+ 255,
1100
+ 0,
1101
+ 169
1102
+ ]
1103
+ },
1104
+ {
1105
+ "kind": "account",
1106
+ "path": "config.atlas_mint",
1107
+ "account": "Config"
1108
+ }
1109
+ ],
1110
+ "program": {
1111
+ "kind": "const",
1112
+ "value": [
1113
+ 140,
1114
+ 151,
1115
+ 37,
1116
+ 143,
1117
+ 78,
1118
+ 36,
1119
+ 137,
1120
+ 241,
1121
+ 187,
1122
+ 61,
1123
+ 16,
1124
+ 41,
1125
+ 20,
1126
+ 142,
1127
+ 13,
1128
+ 131,
1129
+ 11,
1130
+ 90,
1131
+ 19,
1132
+ 153,
1133
+ 218,
1134
+ 255,
1135
+ 16,
1136
+ 132,
1137
+ 4,
1138
+ 142,
1139
+ 123,
1140
+ 216,
1141
+ 219,
1142
+ 233,
1143
+ 248,
1144
+ 89
1145
+ ]
1146
+ }
1147
+ }
1148
+ },
1149
+ {
1150
+ "name": "token_program",
1151
+ "optional": true,
1152
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1153
+ }
1154
+ ],
1155
+ "args": []
1156
+ },
1157
+ {
1158
+ "name": "close_rental",
1159
+ "docs": [
1160
+ "Closes a rental after its duration has ended, removes it from the contract."
1161
+ ],
1162
+ "discriminator": [
1163
+ 179,
1164
+ 188,
1165
+ 113,
1166
+ 211,
1167
+ 41,
1168
+ 232,
1169
+ 51,
1170
+ 51
1171
+ ],
1172
+ "accounts": [
1173
+ {
1174
+ "name": "borrower",
1175
+ "writable": true,
1176
+ "relations": [
1177
+ "rental_state"
1178
+ ]
1179
+ },
1180
+ {
1181
+ "name": "owner_token_account",
1182
+ "writable": true
1183
+ },
1184
+ {
1185
+ "name": "contract"
1186
+ },
1187
+ {
1188
+ "name": "rental_state",
1189
+ "writable": true,
1190
+ "pda": {
1191
+ "seeds": [
1192
+ {
1193
+ "kind": "const",
1194
+ "value": [
1195
+ 114,
1196
+ 101,
1197
+ 110,
1198
+ 116,
1199
+ 97,
1200
+ 108,
1201
+ 95,
1202
+ 115,
1203
+ 116,
1204
+ 97,
1205
+ 116,
1206
+ 101
1207
+ ]
1208
+ },
1209
+ {
1210
+ "kind": "account",
1211
+ "path": "contract"
1212
+ },
1213
+ {
1214
+ "kind": "account",
1215
+ "path": "borrower"
1216
+ }
1217
+ ]
1218
+ }
1219
+ },
1220
+ {
1221
+ "name": "rental_token_account",
1222
+ "writable": true,
1223
+ "pda": {
1224
+ "seeds": [
1225
+ {
1226
+ "kind": "account",
1227
+ "path": "rental_state"
1228
+ },
1229
+ {
1230
+ "kind": "const",
1231
+ "value": [
1232
+ 6,
1233
+ 221,
1234
+ 246,
1235
+ 225,
1236
+ 215,
1237
+ 101,
1238
+ 161,
1239
+ 147,
1240
+ 217,
1241
+ 203,
1242
+ 225,
1243
+ 70,
1244
+ 206,
1245
+ 235,
1246
+ 121,
1247
+ 172,
1248
+ 28,
1249
+ 180,
1250
+ 133,
1251
+ 237,
1252
+ 95,
1253
+ 91,
1254
+ 55,
1255
+ 145,
1256
+ 58,
1257
+ 140,
1258
+ 245,
1259
+ 133,
1260
+ 126,
1261
+ 255,
1262
+ 0,
1263
+ 169
1264
+ ]
1265
+ },
1266
+ {
1267
+ "kind": "account",
1268
+ "path": "config.atlas_mint",
1269
+ "account": "Config"
1270
+ }
1271
+ ],
1272
+ "program": {
1273
+ "kind": "const",
1274
+ "value": [
1275
+ 140,
1276
+ 151,
1277
+ 37,
1278
+ 143,
1279
+ 78,
1280
+ 36,
1281
+ 137,
1282
+ 241,
1283
+ 187,
1284
+ 61,
1285
+ 16,
1286
+ 41,
1287
+ 20,
1288
+ 142,
1289
+ 13,
1290
+ 131,
1291
+ 11,
1292
+ 90,
1293
+ 19,
1294
+ 153,
1295
+ 218,
1296
+ 255,
1297
+ 16,
1298
+ 132,
1299
+ 4,
1300
+ 142,
1301
+ 123,
1302
+ 216,
1303
+ 219,
1304
+ 233,
1305
+ 248,
1306
+ 89
1307
+ ]
1308
+ }
1309
+ }
1310
+ },
1311
+ {
1312
+ "name": "rental_authority",
1313
+ "pda": {
1314
+ "seeds": [
1315
+ {
1316
+ "kind": "const",
1317
+ "value": [
1318
+ 114,
1319
+ 101,
1320
+ 110,
1321
+ 116,
1322
+ 97,
1323
+ 108,
1324
+ 95,
1325
+ 97,
1326
+ 117,
1327
+ 116,
1328
+ 104,
1329
+ 111,
1330
+ 114,
1331
+ 105,
1332
+ 116,
1333
+ 121
1334
+ ]
1335
+ }
1336
+ ]
1337
+ }
1338
+ },
1339
+ {
1340
+ "name": "fee_token_account",
1341
+ "writable": true,
1342
+ "pda": {
1343
+ "seeds": [
1344
+ {
1345
+ "kind": "account",
1346
+ "path": "config.fees_account",
1347
+ "account": "Config"
1348
+ },
1349
+ {
1350
+ "kind": "const",
1351
+ "value": [
1352
+ 6,
1353
+ 221,
1354
+ 246,
1355
+ 225,
1356
+ 215,
1357
+ 101,
1358
+ 161,
1359
+ 147,
1360
+ 217,
1361
+ 203,
1362
+ 225,
1363
+ 70,
1364
+ 206,
1365
+ 235,
1366
+ 121,
1367
+ 172,
1368
+ 28,
1369
+ 180,
1370
+ 133,
1371
+ 237,
1372
+ 95,
1373
+ 91,
1374
+ 55,
1375
+ 145,
1376
+ 58,
1377
+ 140,
1378
+ 245,
1379
+ 133,
1380
+ 126,
1381
+ 255,
1382
+ 0,
1383
+ 169
1384
+ ]
1385
+ },
1386
+ {
1387
+ "kind": "account",
1388
+ "path": "config.atlas_mint",
1389
+ "account": "Config"
1390
+ }
1391
+ ],
1392
+ "program": {
1393
+ "kind": "const",
1394
+ "value": [
1395
+ 140,
1396
+ 151,
1397
+ 37,
1398
+ 143,
1399
+ 78,
1400
+ 36,
1401
+ 137,
1402
+ 241,
1403
+ 187,
1404
+ 61,
1405
+ 16,
1406
+ 41,
1407
+ 20,
1408
+ 142,
1409
+ 13,
1410
+ 131,
1411
+ 11,
1412
+ 90,
1413
+ 19,
1414
+ 153,
1415
+ 218,
1416
+ 255,
1417
+ 16,
1418
+ 132,
1419
+ 4,
1420
+ 142,
1421
+ 123,
1422
+ 216,
1423
+ 219,
1424
+ 233,
1425
+ 248,
1426
+ 89
1427
+ ]
1428
+ }
1429
+ }
1430
+ },
1431
+ {
1432
+ "name": "rental_thread",
1433
+ "writable": true,
1434
+ "pda": {
1435
+ "seeds": [
1436
+ {
1437
+ "kind": "const",
1438
+ "value": [
1439
+ 116,
1440
+ 104,
1441
+ 114,
1442
+ 101,
1443
+ 97,
1444
+ 100
1445
+ ]
1446
+ },
1447
+ {
1448
+ "kind": "account",
1449
+ "path": "rental_authority"
1450
+ },
1451
+ {
1452
+ "kind": "account",
1453
+ "path": "rental_state"
1454
+ }
1455
+ ]
1456
+ }
1457
+ },
1458
+ {
1459
+ "name": "config",
1460
+ "pda": {
1461
+ "seeds": [
1462
+ {
1463
+ "kind": "const",
1464
+ "value": [
1465
+ 99,
1466
+ 111,
1467
+ 110,
1468
+ 102,
1469
+ 105,
1470
+ 103
1471
+ ]
1472
+ }
1473
+ ]
1474
+ }
1475
+ },
1476
+ {
1477
+ "name": "antegen_program",
1478
+ "address": "AgThdyi1P5RkVeZD2rQahTvs8HePJoGFFxKtvok5s2J1"
1479
+ },
1480
+ {
1481
+ "name": "token_program",
1482
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1483
+ },
1484
+ {
1485
+ "name": "system_program",
1486
+ "address": "11111111111111111111111111111111"
1487
+ }
1488
+ ],
1489
+ "args": []
1490
+ },
1491
+ {
1492
+ "name": "create_contract",
1493
+ "docs": [
1494
+ "Creates a new rental contract, defining the rental terms such as rate, duration, and payment frequency."
1495
+ ],
1496
+ "discriminator": [
1497
+ 244,
1498
+ 48,
1499
+ 244,
1500
+ 178,
1501
+ 216,
1502
+ 88,
1503
+ 122,
1504
+ 52
1505
+ ],
1506
+ "accounts": [
1507
+ {
1508
+ "name": "config",
1509
+ "pda": {
1510
+ "seeds": [
1511
+ {
1512
+ "kind": "const",
1513
+ "value": [
1514
+ 99,
1515
+ 111,
1516
+ 110,
1517
+ 102,
1518
+ 105,
1519
+ 103
1520
+ ]
1521
+ }
1522
+ ]
1523
+ }
1524
+ },
1525
+ {
1526
+ "name": "mint"
1527
+ },
1528
+ {
1529
+ "name": "owner",
1530
+ "writable": true,
1531
+ "signer": true
1532
+ },
1533
+ {
1534
+ "name": "owner_token_account",
1535
+ "writable": true,
1536
+ "pda": {
1537
+ "seeds": [
1538
+ {
1539
+ "kind": "account",
1540
+ "path": "owner"
1541
+ },
1542
+ {
1543
+ "kind": "const",
1544
+ "value": [
1545
+ 6,
1546
+ 221,
1547
+ 246,
1548
+ 225,
1549
+ 215,
1550
+ 101,
1551
+ 161,
1552
+ 147,
1553
+ 217,
1554
+ 203,
1555
+ 225,
1556
+ 70,
1557
+ 206,
1558
+ 235,
1559
+ 121,
1560
+ 172,
1561
+ 28,
1562
+ 180,
1563
+ 133,
1564
+ 237,
1565
+ 95,
1566
+ 91,
1567
+ 55,
1568
+ 145,
1569
+ 58,
1570
+ 140,
1571
+ 245,
1572
+ 133,
1573
+ 126,
1574
+ 255,
1575
+ 0,
1576
+ 169
1577
+ ]
1578
+ },
1579
+ {
1580
+ "kind": "account",
1581
+ "path": "mint"
1582
+ }
1583
+ ],
1584
+ "program": {
1585
+ "kind": "const",
1586
+ "value": [
1587
+ 140,
1588
+ 151,
1589
+ 37,
1590
+ 143,
1591
+ 78,
1592
+ 36,
1593
+ 137,
1594
+ 241,
1595
+ 187,
1596
+ 61,
1597
+ 16,
1598
+ 41,
1599
+ 20,
1600
+ 142,
1601
+ 13,
1602
+ 131,
1603
+ 11,
1604
+ 90,
1605
+ 19,
1606
+ 153,
1607
+ 218,
1608
+ 255,
1609
+ 16,
1610
+ 132,
1611
+ 4,
1612
+ 142,
1613
+ 123,
1614
+ 216,
1615
+ 219,
1616
+ 233,
1617
+ 248,
1618
+ 89
1619
+ ]
1620
+ }
1621
+ }
1622
+ },
1623
+ {
1624
+ "name": "fleet",
1625
+ "writable": true
1626
+ },
1627
+ {
1628
+ "name": "owner_profile"
1629
+ },
1630
+ {
1631
+ "name": "game_id"
1632
+ },
1633
+ {
1634
+ "name": "contract",
1635
+ "writable": true,
1636
+ "pda": {
1637
+ "seeds": [
1638
+ {
1639
+ "kind": "const",
1640
+ "value": [
1641
+ 114,
1642
+ 101,
1643
+ 110,
1644
+ 116,
1645
+ 97,
1646
+ 108,
1647
+ 95,
1648
+ 99,
1649
+ 111,
1650
+ 110,
1651
+ 116,
1652
+ 114,
1653
+ 97,
1654
+ 99,
1655
+ 116
1656
+ ]
1657
+ },
1658
+ {
1659
+ "kind": "account",
1660
+ "path": "fleet"
1661
+ }
1662
+ ]
1663
+ }
1664
+ },
1665
+ {
1666
+ "name": "rental_authority",
1667
+ "pda": {
1668
+ "seeds": [
1669
+ {
1670
+ "kind": "const",
1671
+ "value": [
1672
+ 114,
1673
+ 101,
1674
+ 110,
1675
+ 116,
1676
+ 97,
1677
+ 108,
1678
+ 95,
1679
+ 97,
1680
+ 117,
1681
+ 116,
1682
+ 104,
1683
+ 111,
1684
+ 114,
1685
+ 105,
1686
+ 116,
1687
+ 121
1688
+ ]
1689
+ }
1690
+ ]
1691
+ }
1692
+ },
1693
+ {
1694
+ "name": "token_program",
1695
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1696
+ },
1697
+ {
1698
+ "name": "associated_token_program",
1699
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1700
+ },
1701
+ {
1702
+ "name": "system_program",
1703
+ "address": "11111111111111111111111111111111"
1704
+ },
1705
+ {
1706
+ "name": "sage_program"
1707
+ }
1708
+ ],
1709
+ "args": [
1710
+ {
1711
+ "name": "rate",
1712
+ "type": "u64"
1713
+ },
1714
+ {
1715
+ "name": "duration_min",
1716
+ "type": "u64"
1717
+ },
1718
+ {
1719
+ "name": "duration_max",
1720
+ "type": "u64"
1721
+ },
1722
+ {
1723
+ "name": "payments_feq",
1724
+ "type": "string"
1725
+ },
1726
+ {
1727
+ "name": "owner_key_index",
1728
+ "type": "u16"
1729
+ }
1730
+ ]
1731
+ },
1732
+ {
1733
+ "name": "initialize_config",
1734
+ "docs": [
1735
+ "Initializes the SRSLY program configuration account"
1736
+ ],
1737
+ "discriminator": [
1738
+ 208,
1739
+ 127,
1740
+ 21,
1741
+ 1,
1742
+ 194,
1743
+ 190,
1744
+ 196,
1745
+ 70
1746
+ ],
1747
+ "accounts": [
1748
+ {
1749
+ "name": "config",
1750
+ "writable": true,
1751
+ "pda": {
1752
+ "seeds": [
1753
+ {
1754
+ "kind": "const",
1755
+ "value": [
1756
+ 99,
1757
+ 111,
1758
+ 110,
1759
+ 102,
1760
+ 105,
1761
+ 103
1762
+ ]
1763
+ }
1764
+ ]
1765
+ }
1766
+ },
1767
+ {
1768
+ "name": "authority",
1769
+ "writable": true,
1770
+ "signer": true
1771
+ },
1772
+ {
1773
+ "name": "system_program",
1774
+ "address": "11111111111111111111111111111111"
1775
+ }
1776
+ ],
1777
+ "args": [
1778
+ {
1779
+ "name": "fees_account",
1780
+ "type": "pubkey"
1781
+ },
1782
+ {
1783
+ "name": "atlas_mint",
1784
+ "type": "pubkey"
1785
+ }
1786
+ ]
1787
+ },
1788
+ {
1789
+ "name": "pay_rental",
1790
+ "docs": [
1791
+ "Handles recurring rental payments via an automated thread."
1792
+ ],
1793
+ "discriminator": [
1794
+ 114,
1795
+ 15,
1796
+ 111,
1797
+ 207,
1798
+ 115,
1799
+ 207,
1800
+ 108,
1801
+ 169
1802
+ ],
1803
+ "accounts": [
1804
+ {
1805
+ "name": "borrower",
1806
+ "writable": true
1807
+ },
1808
+ {
1809
+ "name": "owner",
1810
+ "writable": true
1811
+ },
1812
+ {
1813
+ "name": "owner_token_account",
1814
+ "writable": true
1815
+ },
1816
+ {
1817
+ "name": "fleet",
1818
+ "writable": true
1819
+ },
1820
+ {
1821
+ "name": "game_id"
1822
+ },
1823
+ {
1824
+ "name": "starbase"
1825
+ },
1826
+ {
1827
+ "name": "starbase_player",
1828
+ "writable": true
1829
+ },
1830
+ {
1831
+ "name": "contract",
1832
+ "writable": true,
1833
+ "pda": {
1834
+ "seeds": [
1835
+ {
1836
+ "kind": "const",
1837
+ "value": [
1838
+ 114,
1839
+ 101,
1840
+ 110,
1841
+ 116,
1842
+ 97,
1843
+ 108,
1844
+ 95,
1845
+ 99,
1846
+ 111,
1847
+ 110,
1848
+ 116,
1849
+ 114,
1850
+ 97,
1851
+ 99,
1852
+ 116
1853
+ ]
1854
+ },
1855
+ {
1856
+ "kind": "account",
1857
+ "path": "contract.fleet",
1858
+ "account": "ContractState"
1859
+ }
1860
+ ]
1861
+ }
1862
+ },
1863
+ {
1864
+ "name": "rental_state",
1865
+ "writable": true
1866
+ },
1867
+ {
1868
+ "name": "rental_authority",
1869
+ "pda": {
1870
+ "seeds": [
1871
+ {
1872
+ "kind": "const",
1873
+ "value": [
1874
+ 114,
1875
+ 101,
1876
+ 110,
1877
+ 116,
1878
+ 97,
1879
+ 108,
1880
+ 95,
1881
+ 97,
1882
+ 117,
1883
+ 116,
1884
+ 104,
1885
+ 111,
1886
+ 114,
1887
+ 105,
1888
+ 116,
1889
+ 121
1890
+ ]
1891
+ }
1892
+ ]
1893
+ }
1894
+ },
1895
+ {
1896
+ "name": "rental_token_account",
1897
+ "writable": true,
1898
+ "pda": {
1899
+ "seeds": [
1900
+ {
1901
+ "kind": "account",
1902
+ "path": "rental_state"
1903
+ },
1904
+ {
1905
+ "kind": "const",
1906
+ "value": [
1907
+ 6,
1908
+ 221,
1909
+ 246,
1910
+ 225,
1911
+ 215,
1912
+ 101,
1913
+ 161,
1914
+ 147,
1915
+ 217,
1916
+ 203,
1917
+ 225,
1918
+ 70,
1919
+ 206,
1920
+ 235,
1921
+ 121,
1922
+ 172,
1923
+ 28,
1924
+ 180,
1925
+ 133,
1926
+ 237,
1927
+ 95,
1928
+ 91,
1929
+ 55,
1930
+ 145,
1931
+ 58,
1932
+ 140,
1933
+ 245,
1934
+ 133,
1935
+ 126,
1936
+ 255,
1937
+ 0,
1938
+ 169
1939
+ ]
1940
+ },
1941
+ {
1942
+ "kind": "account",
1943
+ "path": "config.atlas_mint",
1944
+ "account": "Config"
1945
+ }
1946
+ ],
1947
+ "program": {
1948
+ "kind": "const",
1949
+ "value": [
1950
+ 140,
1951
+ 151,
1952
+ 37,
1953
+ 143,
1954
+ 78,
1955
+ 36,
1956
+ 137,
1957
+ 241,
1958
+ 187,
1959
+ 61,
1960
+ 16,
1961
+ 41,
1962
+ 20,
1963
+ 142,
1964
+ 13,
1965
+ 131,
1966
+ 11,
1967
+ 90,
1968
+ 19,
1969
+ 153,
1970
+ 218,
1971
+ 255,
1972
+ 16,
1973
+ 132,
1974
+ 4,
1975
+ 142,
1976
+ 123,
1977
+ 216,
1978
+ 219,
1979
+ 233,
1980
+ 248,
1981
+ 89
1982
+ ]
1983
+ }
1984
+ }
1985
+ },
1986
+ {
1987
+ "name": "rental_thread",
1988
+ "writable": true,
1989
+ "signer": true
1990
+ },
1991
+ {
1992
+ "name": "fee_token_account",
1993
+ "writable": true,
1994
+ "pda": {
1995
+ "seeds": [
1996
+ {
1997
+ "kind": "account",
1998
+ "path": "config.fees_account",
1999
+ "account": "Config"
2000
+ },
2001
+ {
2002
+ "kind": "const",
2003
+ "value": [
2004
+ 6,
2005
+ 221,
2006
+ 246,
2007
+ 225,
2008
+ 215,
2009
+ 101,
2010
+ 161,
2011
+ 147,
2012
+ 217,
2013
+ 203,
2014
+ 225,
2015
+ 70,
2016
+ 206,
2017
+ 235,
2018
+ 121,
2019
+ 172,
2020
+ 28,
2021
+ 180,
2022
+ 133,
2023
+ 237,
2024
+ 95,
2025
+ 91,
2026
+ 55,
2027
+ 145,
2028
+ 58,
2029
+ 140,
2030
+ 245,
2031
+ 133,
2032
+ 126,
2033
+ 255,
2034
+ 0,
2035
+ 169
2036
+ ]
2037
+ },
2038
+ {
2039
+ "kind": "account",
2040
+ "path": "config.atlas_mint",
2041
+ "account": "Config"
2042
+ }
2043
+ ],
2044
+ "program": {
2045
+ "kind": "const",
2046
+ "value": [
2047
+ 140,
2048
+ 151,
2049
+ 37,
2050
+ 143,
2051
+ 78,
2052
+ 36,
2053
+ 137,
2054
+ 241,
2055
+ 187,
2056
+ 61,
2057
+ 16,
2058
+ 41,
2059
+ 20,
2060
+ 142,
2061
+ 13,
2062
+ 131,
2063
+ 11,
2064
+ 90,
2065
+ 19,
2066
+ 153,
2067
+ 218,
2068
+ 255,
2069
+ 16,
2070
+ 132,
2071
+ 4,
2072
+ 142,
2073
+ 123,
2074
+ 216,
2075
+ 219,
2076
+ 233,
2077
+ 248,
2078
+ 89
2079
+ ]
2080
+ }
2081
+ }
2082
+ },
2083
+ {
2084
+ "name": "referral_token_account",
2085
+ "docs": [
2086
+ "Referral token account - optional, can be any valid token account"
2087
+ ],
2088
+ "optional": true
2089
+ },
2090
+ {
2091
+ "name": "config",
2092
+ "pda": {
2093
+ "seeds": [
2094
+ {
2095
+ "kind": "const",
2096
+ "value": [
2097
+ 99,
2098
+ 111,
2099
+ 110,
2100
+ 102,
2101
+ 105,
2102
+ 103
2103
+ ]
2104
+ }
2105
+ ]
2106
+ }
2107
+ },
2108
+ {
2109
+ "name": "sage_program"
2110
+ },
2111
+ {
2112
+ "name": "antegen_program",
2113
+ "address": "AgThdyi1P5RkVeZD2rQahTvs8HePJoGFFxKtvok5s2J1"
2114
+ },
2115
+ {
2116
+ "name": "token_program",
2117
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
2118
+ }
2119
+ ],
2120
+ "args": [],
2121
+ "returns": {
2122
+ "defined": {
2123
+ "name": "ThreadResponse"
2124
+ }
2125
+ }
2126
+ },
2127
+ {
2128
+ "name": "reset_rental",
2129
+ "docs": [
2130
+ "Resets a rental in the event of an early cancellation or contract ending."
2131
+ ],
2132
+ "discriminator": [
2133
+ 139,
2134
+ 185,
2135
+ 76,
2136
+ 32,
2137
+ 61,
2138
+ 143,
2139
+ 163,
2140
+ 183
2141
+ ],
2142
+ "accounts": [
2143
+ {
2144
+ "name": "fleet",
2145
+ "writable": true
2146
+ },
2147
+ {
2148
+ "name": "game_id"
2149
+ },
2150
+ {
2151
+ "name": "starbase"
2152
+ },
2153
+ {
2154
+ "name": "starbase_player",
2155
+ "writable": true
2156
+ },
2157
+ {
2158
+ "name": "rental_state"
2159
+ },
2160
+ {
2161
+ "name": "contract",
2162
+ "writable": true
2163
+ },
2164
+ {
2165
+ "name": "rental_authority",
2166
+ "pda": {
2167
+ "seeds": [
2168
+ {
2169
+ "kind": "const",
2170
+ "value": [
2171
+ 114,
2172
+ 101,
2173
+ 110,
2174
+ 116,
2175
+ 97,
2176
+ 108,
2177
+ 95,
2178
+ 97,
2179
+ 117,
2180
+ 116,
2181
+ 104,
2182
+ 111,
2183
+ 114,
2184
+ 105,
2185
+ 116,
2186
+ 121
2187
+ ]
2188
+ }
2189
+ ]
2190
+ }
2191
+ },
2192
+ {
2193
+ "name": "sage_program"
2194
+ }
2195
+ ],
2196
+ "args": []
2197
+ },
2198
+ {
2199
+ "name": "update_config",
2200
+ "docs": [
2201
+ "Updates the SRSLY program configuration"
2202
+ ],
2203
+ "discriminator": [
2204
+ 29,
2205
+ 158,
2206
+ 252,
2207
+ 191,
2208
+ 10,
2209
+ 83,
2210
+ 219,
2211
+ 99
2212
+ ],
2213
+ "accounts": [
2214
+ {
2215
+ "name": "config",
2216
+ "writable": true,
2217
+ "pda": {
2218
+ "seeds": [
2219
+ {
2220
+ "kind": "const",
2221
+ "value": [
2222
+ 99,
2223
+ 111,
2224
+ 110,
2225
+ 102,
2226
+ 105,
2227
+ 103
2228
+ ]
2229
+ }
2230
+ ]
2231
+ }
2232
+ },
2233
+ {
2234
+ "name": "authority",
2235
+ "signer": true,
2236
+ "relations": [
2237
+ "config"
2238
+ ]
2239
+ }
2240
+ ],
2241
+ "args": [
2242
+ {
2243
+ "name": "params",
2244
+ "type": {
2245
+ "defined": {
2246
+ "name": "ConfigUpdateParams"
2247
+ }
2248
+ }
2249
+ }
2250
+ ]
2251
+ }
2252
+ ],
2253
+ "accounts": [
2254
+ {
2255
+ "name": "Config",
2256
+ "discriminator": [
2257
+ 155,
2258
+ 12,
2259
+ 170,
2260
+ 224,
2261
+ 30,
2262
+ 250,
2263
+ 204,
2264
+ 130
2265
+ ]
2266
+ },
2267
+ {
2268
+ "name": "ContractState",
2269
+ "discriminator": [
2270
+ 190,
2271
+ 138,
2272
+ 10,
2273
+ 223,
2274
+ 189,
2275
+ 116,
2276
+ 222,
2277
+ 115
2278
+ ]
2279
+ },
2280
+ {
2281
+ "name": "RentalState",
2282
+ "discriminator": [
2283
+ 97,
2284
+ 162,
2285
+ 29,
2286
+ 222,
2287
+ 251,
2288
+ 251,
2289
+ 180,
2290
+ 244
2291
+ ]
2292
+ },
2293
+ {
2294
+ "name": "Thread",
2295
+ "discriminator": [
2296
+ 186,
2297
+ 27,
2298
+ 154,
2299
+ 111,
2300
+ 51,
2301
+ 36,
2302
+ 159,
2303
+ 90
2304
+ ]
2305
+ }
2306
+ ],
2307
+ "errors": [
2308
+ {
2309
+ "code": 6000,
2310
+ "name": "InvalidDurationMinimum",
2311
+ "msg": "Invalid duration minimum. Must be between 1 and the duration maximum."
2312
+ },
2313
+ {
2314
+ "code": 6001,
2315
+ "name": "InvalidDurationMaximum",
2316
+ "msg": "Invalid duration maximum. Must be greater than or equal to the duration minimum."
2317
+ },
2318
+ {
2319
+ "code": 6002,
2320
+ "name": "InvalidRateCalculation",
2321
+ "msg": "The contract rate multiplied by duration exceeds the payment amount."
2322
+ },
2323
+ {
2324
+ "code": 6003,
2325
+ "name": "FleetAlreadyRented",
2326
+ "msg": "Fleet is already rented (sub_profile is not empty)."
2327
+ },
2328
+ {
2329
+ "code": 6004,
2330
+ "name": "InvalidRate",
2331
+ "msg": "Invalid rental rate. Must be greater than or equal to 0."
2332
+ },
2333
+ {
2334
+ "code": 6005,
2335
+ "name": "InvalidPaymentFrequency",
2336
+ "msg": "Invalid payment frequency. Must be one of: @hourly, @daily, @weekly, @monthly."
2337
+ },
2338
+ {
2339
+ "code": 6006,
2340
+ "name": "InvalidSubProfileInvalidator",
2341
+ "msg": "Invalid sub_profile invalidator."
2342
+ },
2343
+ {
2344
+ "code": 6007,
2345
+ "name": "InsufficientCancellationNotice",
2346
+ "msg": "Rental time remaining is less than minimum cancellation notice required."
2347
+ },
2348
+ {
2349
+ "code": 6008,
2350
+ "name": "ContractClosed",
2351
+ "msg": "The contract is closed."
2352
+ },
2353
+ {
2354
+ "code": 6009,
2355
+ "name": "DevOnlyFrequency",
2356
+ "msg": "This frequency is only allowed in development."
2357
+ },
2358
+ {
2359
+ "code": 6010,
2360
+ "name": "ExpectedDailyFrequency",
2361
+ "msg": "Expected daily frequency but contract is set differently."
2362
+ },
2363
+ {
2364
+ "code": 6011,
2365
+ "name": "InvalidThreadContext",
2366
+ "msg": "Thread has invalid context set."
2367
+ },
2368
+ {
2369
+ "code": 6012,
2370
+ "name": "RentalIsActive",
2371
+ "msg": "Rental is still active."
2372
+ },
2373
+ {
2374
+ "code": 6013,
2375
+ "name": "RentalStateExists",
2376
+ "msg": "Rental reset requires rental state to not exist."
2377
+ },
2378
+ {
2379
+ "code": 6014,
2380
+ "name": "UnsupportedMigrationVersion",
2381
+ "msg": "Unsupported migration version encountered."
2382
+ },
2383
+ {
2384
+ "code": 6015,
2385
+ "name": "InvalidFeeRate",
2386
+ "msg": "Invalid fee rate. Service fee must be <= 50%, referral fee <= 100%, base_bps > 0."
2387
+ },
2388
+ {
2389
+ "code": 6016,
2390
+ "name": "InvalidRentalDuration",
2391
+ "msg": "Invalid rental duration. Min > 0, max > min, max <= 1 year."
2392
+ },
2393
+ {
2394
+ "code": 6017,
2395
+ "name": "UnauthorizedConfigUpdate",
2396
+ "msg": "Only the config authority can update settings."
2397
+ },
2398
+ {
2399
+ "code": 6018,
2400
+ "name": "InvalidAtlasConversionRate",
2401
+ "msg": "Invalid ATLAS conversion rate. Must be greater than 0."
2402
+ },
2403
+ {
2404
+ "code": 6019,
2405
+ "name": "AccountOwnedByWrongProgram",
2406
+ "msg": "Account is owned by a different program than expected."
2407
+ },
2408
+ {
2409
+ "code": 6020,
2410
+ "name": "InvalidOwnerProfile",
2411
+ "msg": "Fleet owner profile does not match the provided owner profile."
2412
+ }
2413
+ ],
2414
+ "types": [
2415
+ {
2416
+ "name": "ClockData",
2417
+ "docs": [
2418
+ "The clock object, representing a specific moment in time recorded by a Solana cluster."
2419
+ ],
2420
+ "type": {
2421
+ "kind": "struct",
2422
+ "fields": [
2423
+ {
2424
+ "name": "slot",
2425
+ "docs": [
2426
+ "The current slot."
2427
+ ],
2428
+ "type": "u64"
2429
+ },
2430
+ {
2431
+ "name": "epoch",
2432
+ "docs": [
2433
+ "The bank epoch."
2434
+ ],
2435
+ "type": "u64"
2436
+ },
2437
+ {
2438
+ "name": "unix_timestamp",
2439
+ "docs": [
2440
+ "The current unix timestamp."
2441
+ ],
2442
+ "type": "i64"
2443
+ }
2444
+ ]
2445
+ }
2446
+ },
2447
+ {
2448
+ "name": "Config",
2449
+ "docs": [
2450
+ "Admin-configurable settings for the SRSLY program"
2451
+ ],
2452
+ "type": {
2453
+ "kind": "struct",
2454
+ "fields": [
2455
+ {
2456
+ "name": "version",
2457
+ "type": "u8"
2458
+ },
2459
+ {
2460
+ "name": "bump",
2461
+ "type": "u8"
2462
+ },
2463
+ {
2464
+ "name": "authority",
2465
+ "type": "pubkey"
2466
+ },
2467
+ {
2468
+ "name": "stardust_to_atlas",
2469
+ "type": "u64"
2470
+ },
2471
+ {
2472
+ "name": "service_fee_bps",
2473
+ "type": "u64"
2474
+ },
2475
+ {
2476
+ "name": "referral_fee_bps",
2477
+ "type": "u64"
2478
+ },
2479
+ {
2480
+ "name": "base_bps",
2481
+ "type": "u64"
2482
+ },
2483
+ {
2484
+ "name": "rental_duration_min_seconds",
2485
+ "type": "u64"
2486
+ },
2487
+ {
2488
+ "name": "rental_duration_max_seconds",
2489
+ "type": "u64"
2490
+ },
2491
+ {
2492
+ "name": "fees_account",
2493
+ "type": "pubkey"
2494
+ },
2495
+ {
2496
+ "name": "atlas_mint",
2497
+ "type": "pubkey"
2498
+ },
2499
+ {
2500
+ "name": "default_payment_frequency",
2501
+ "type": {
2502
+ "defined": {
2503
+ "name": "PaymentFrequency"
2504
+ }
2505
+ }
2506
+ },
2507
+ {
2508
+ "name": "allowed_frequencies",
2509
+ "type": {
2510
+ "vec": {
2511
+ "defined": {
2512
+ "name": "PaymentFrequency"
2513
+ }
2514
+ }
2515
+ }
2516
+ }
2517
+ ]
2518
+ }
2519
+ },
2520
+ {
2521
+ "name": "ConfigUpdateParams",
2522
+ "type": {
2523
+ "kind": "struct",
2524
+ "fields": [
2525
+ {
2526
+ "name": "authority",
2527
+ "type": {
2528
+ "option": "pubkey"
2529
+ }
2530
+ },
2531
+ {
2532
+ "name": "stardust_to_atlas",
2533
+ "type": {
2534
+ "option": "u64"
2535
+ }
2536
+ },
2537
+ {
2538
+ "name": "service_fee_bps",
2539
+ "type": {
2540
+ "option": "u64"
2541
+ }
2542
+ },
2543
+ {
2544
+ "name": "referral_fee_bps",
2545
+ "type": {
2546
+ "option": "u64"
2547
+ }
2548
+ },
2549
+ {
2550
+ "name": "base_bps",
2551
+ "type": {
2552
+ "option": "u64"
2553
+ }
2554
+ },
2555
+ {
2556
+ "name": "rental_duration_min_seconds",
2557
+ "type": {
2558
+ "option": "u64"
2559
+ }
2560
+ },
2561
+ {
2562
+ "name": "rental_duration_max_seconds",
2563
+ "type": {
2564
+ "option": "u64"
2565
+ }
2566
+ },
2567
+ {
2568
+ "name": "fees_account",
2569
+ "type": {
2570
+ "option": "pubkey"
2571
+ }
2572
+ },
2573
+ {
2574
+ "name": "atlas_mint",
2575
+ "type": {
2576
+ "option": "pubkey"
2577
+ }
2578
+ },
2579
+ {
2580
+ "name": "default_payment_frequency",
2581
+ "type": {
2582
+ "option": {
2583
+ "defined": {
2584
+ "name": "PaymentFrequency"
2585
+ }
2586
+ }
2587
+ }
2588
+ },
2589
+ {
2590
+ "name": "allowed_frequencies",
2591
+ "type": {
2592
+ "option": {
2593
+ "vec": {
2594
+ "defined": {
2595
+ "name": "PaymentFrequency"
2596
+ }
2597
+ }
2598
+ }
2599
+ }
2600
+ }
2601
+ ]
2602
+ }
2603
+ },
2604
+ {
2605
+ "name": "ContractState",
2606
+ "docs": [
2607
+ "* **Rental Contract State**\n *\n * This account stores the details of a fleet rental contract, which includes:\n * - Rental price (`rate`)\n * - Duration constraints (`duration_min`, `duration_max`)\n * - Payment frequency (`payments_feq`)\n * - Ownership details (`owner`, `owner_token_account`)\n * - Current rental status (`current_rental_state`)\n * - Fleet and game identifiers"
2608
+ ],
2609
+ "type": {
2610
+ "kind": "struct",
2611
+ "fields": [
2612
+ {
2613
+ "name": "version",
2614
+ "type": "u8"
2615
+ },
2616
+ {
2617
+ "name": "to_close",
2618
+ "type": "bool"
2619
+ },
2620
+ {
2621
+ "name": "rate",
2622
+ "type": "u64"
2623
+ },
2624
+ {
2625
+ "name": "duration_min",
2626
+ "type": "u64"
2627
+ },
2628
+ {
2629
+ "name": "duration_max",
2630
+ "type": "u64"
2631
+ },
2632
+ {
2633
+ "name": "payments_feq",
2634
+ "type": "string"
2635
+ },
2636
+ {
2637
+ "name": "fleet",
2638
+ "type": "pubkey"
2639
+ },
2640
+ {
2641
+ "name": "game_id",
2642
+ "type": "pubkey"
2643
+ },
2644
+ {
2645
+ "name": "current_rental_state",
2646
+ "type": "pubkey"
2647
+ },
2648
+ {
2649
+ "name": "owner",
2650
+ "type": "pubkey"
2651
+ },
2652
+ {
2653
+ "name": "owner_token_account",
2654
+ "type": "pubkey"
2655
+ },
2656
+ {
2657
+ "name": "owner_profile",
2658
+ "type": "pubkey"
2659
+ },
2660
+ {
2661
+ "name": "bump",
2662
+ "type": "u8"
2663
+ }
2664
+ ]
2665
+ }
2666
+ },
2667
+ {
2668
+ "name": "Equality",
2669
+ "docs": [
2670
+ "Operators for describing how to compare two values to one another."
2671
+ ],
2672
+ "repr": {
2673
+ "kind": "rust"
2674
+ },
2675
+ "type": {
2676
+ "kind": "enum",
2677
+ "variants": [
2678
+ {
2679
+ "name": "GreaterThanOrEqual"
2680
+ },
2681
+ {
2682
+ "name": "LessThanOrEqual"
2683
+ }
2684
+ ]
2685
+ }
2686
+ },
2687
+ {
2688
+ "name": "ExecContext",
2689
+ "docs": [
2690
+ "The execution context of a particular transaction thread."
2691
+ ],
2692
+ "type": {
2693
+ "kind": "struct",
2694
+ "fields": [
2695
+ {
2696
+ "name": "exec_index",
2697
+ "docs": [
2698
+ "Index of the next instruction to be executed."
2699
+ ],
2700
+ "type": "u64"
2701
+ },
2702
+ {
2703
+ "name": "execs_since_reimbursement",
2704
+ "docs": [
2705
+ "Number of execs since the last tx reimbursement.",
2706
+ "To be deprecated in v3 since we now reimburse for every transaction."
2707
+ ],
2708
+ "type": "u64"
2709
+ },
2710
+ {
2711
+ "name": "execs_since_slot",
2712
+ "docs": [
2713
+ "Number of execs in this slot."
2714
+ ],
2715
+ "type": "u64"
2716
+ },
2717
+ {
2718
+ "name": "last_exec_at",
2719
+ "docs": [
2720
+ "Slot of the last exec"
2721
+ ],
2722
+ "type": "u64"
2723
+ },
2724
+ {
2725
+ "name": "last_exec_timestamp",
2726
+ "docs": [
2727
+ "Unix timestamp of last exec"
2728
+ ],
2729
+ "type": "i64"
2730
+ },
2731
+ {
2732
+ "name": "trigger_context",
2733
+ "docs": [
2734
+ "Context for the triggering condition"
2735
+ ],
2736
+ "type": {
2737
+ "defined": {
2738
+ "name": "TriggerContext"
2739
+ }
2740
+ }
2741
+ }
2742
+ ]
2743
+ }
2744
+ },
2745
+ {
2746
+ "name": "PaymentFrequency",
2747
+ "type": {
2748
+ "kind": "enum",
2749
+ "variants": [
2750
+ {
2751
+ "name": "Hourly"
2752
+ },
2753
+ {
2754
+ "name": "Daily"
2755
+ },
2756
+ {
2757
+ "name": "DailyOld"
2758
+ },
2759
+ {
2760
+ "name": "Weekly"
2761
+ },
2762
+ {
2763
+ "name": "Monthly"
2764
+ },
2765
+ {
2766
+ "name": "Decasecond"
2767
+ },
2768
+ {
2769
+ "name": "Minute"
2770
+ }
2771
+ ]
2772
+ }
2773
+ },
2774
+ {
2775
+ "name": "RentalState",
2776
+ "docs": [
2777
+ "* **Rental State Account**\n *\n * This account stores data for an **active** rental session, including:\n * - The renter's (`borrower`) public key\n * - Payment details, including rate and total duration\n * - Start and end timestamps\n * - Whether the rental was cancelled early"
2778
+ ],
2779
+ "type": {
2780
+ "kind": "struct",
2781
+ "fields": [
2782
+ {
2783
+ "name": "version",
2784
+ "type": "u8"
2785
+ },
2786
+ {
2787
+ "name": "borrower",
2788
+ "type": "pubkey"
2789
+ },
2790
+ {
2791
+ "name": "thread",
2792
+ "type": "pubkey"
2793
+ },
2794
+ {
2795
+ "name": "contract",
2796
+ "type": "pubkey"
2797
+ },
2798
+ {
2799
+ "name": "owner_token_account",
2800
+ "type": "pubkey"
2801
+ },
2802
+ {
2803
+ "name": "referral_token_account",
2804
+ "type": "pubkey"
2805
+ },
2806
+ {
2807
+ "name": "rate",
2808
+ "type": "f64"
2809
+ },
2810
+ {
2811
+ "name": "start_time",
2812
+ "type": "i64"
2813
+ },
2814
+ {
2815
+ "name": "end_time",
2816
+ "type": "i64"
2817
+ },
2818
+ {
2819
+ "name": "cancelled",
2820
+ "type": "bool"
2821
+ },
2822
+ {
2823
+ "name": "bump",
2824
+ "type": "u8"
2825
+ }
2826
+ ]
2827
+ }
2828
+ },
2829
+ {
2830
+ "name": "SerializableAccount",
2831
+ "docs": [
2832
+ "Account metadata needed to execute an instruction on Solana."
2833
+ ],
2834
+ "type": {
2835
+ "kind": "struct",
2836
+ "fields": [
2837
+ {
2838
+ "name": "pubkey",
2839
+ "docs": [
2840
+ "An account's public key"
2841
+ ],
2842
+ "type": "pubkey"
2843
+ },
2844
+ {
2845
+ "name": "is_signer",
2846
+ "docs": [
2847
+ "True if an Instruction requires a Transaction signature matching `pubkey`."
2848
+ ],
2849
+ "type": "bool"
2850
+ },
2851
+ {
2852
+ "name": "is_writable",
2853
+ "docs": [
2854
+ "True if the `pubkey` can be loaded as a read-write account."
2855
+ ],
2856
+ "type": "bool"
2857
+ }
2858
+ ]
2859
+ }
2860
+ },
2861
+ {
2862
+ "name": "SerializableInstruction",
2863
+ "docs": [
2864
+ "The data needed execute an instruction on Solana."
2865
+ ],
2866
+ "type": {
2867
+ "kind": "struct",
2868
+ "fields": [
2869
+ {
2870
+ "name": "program_id",
2871
+ "docs": [
2872
+ "Pubkey of the instruction processor that executes this instruction"
2873
+ ],
2874
+ "type": "pubkey"
2875
+ },
2876
+ {
2877
+ "name": "accounts",
2878
+ "docs": [
2879
+ "Metadata for what accounts should be passed to the instruction processor"
2880
+ ],
2881
+ "type": {
2882
+ "vec": {
2883
+ "defined": {
2884
+ "name": "SerializableAccount"
2885
+ }
2886
+ }
2887
+ }
2888
+ },
2889
+ {
2890
+ "name": "data",
2891
+ "docs": [
2892
+ "Opaque data passed to the instruction processor"
2893
+ ],
2894
+ "type": "bytes"
2895
+ }
2896
+ ]
2897
+ }
2898
+ },
2899
+ {
2900
+ "name": "Thread",
2901
+ "docs": [
2902
+ "Tracks the current state of a transaction thread on Solana."
2903
+ ],
2904
+ "type": {
2905
+ "kind": "struct",
2906
+ "fields": [
2907
+ {
2908
+ "name": "authority",
2909
+ "docs": [
2910
+ "The owner of this thread."
2911
+ ],
2912
+ "type": "pubkey"
2913
+ },
2914
+ {
2915
+ "name": "bump",
2916
+ "docs": [
2917
+ "The bump, used for PDA validation."
2918
+ ],
2919
+ "type": "u8"
2920
+ },
2921
+ {
2922
+ "name": "created_at",
2923
+ "docs": [
2924
+ "The cluster clock at the moment the thread was created."
2925
+ ],
2926
+ "type": {
2927
+ "defined": {
2928
+ "name": "ClockData"
2929
+ }
2930
+ }
2931
+ },
2932
+ {
2933
+ "name": "exec_context",
2934
+ "docs": [
2935
+ "The context of the thread's current execution state."
2936
+ ],
2937
+ "type": {
2938
+ "option": {
2939
+ "defined": {
2940
+ "name": "ExecContext"
2941
+ }
2942
+ }
2943
+ }
2944
+ },
2945
+ {
2946
+ "name": "fee",
2947
+ "docs": [
2948
+ "The number of lamports to payout to workers per execution."
2949
+ ],
2950
+ "type": "u64"
2951
+ },
2952
+ {
2953
+ "name": "id",
2954
+ "docs": [
2955
+ "The id of the thread, given by the authority."
2956
+ ],
2957
+ "type": "bytes"
2958
+ },
2959
+ {
2960
+ "name": "instructions",
2961
+ "docs": [
2962
+ "The instructions to be executed."
2963
+ ],
2964
+ "type": {
2965
+ "vec": {
2966
+ "defined": {
2967
+ "name": "SerializableInstruction"
2968
+ }
2969
+ }
2970
+ }
2971
+ },
2972
+ {
2973
+ "name": "name",
2974
+ "docs": [
2975
+ "The name of the thread."
2976
+ ],
2977
+ "type": "string"
2978
+ },
2979
+ {
2980
+ "name": "next_instruction",
2981
+ "docs": [
2982
+ "The next instruction to be executed."
2983
+ ],
2984
+ "type": {
2985
+ "option": {
2986
+ "defined": {
2987
+ "name": "SerializableInstruction"
2988
+ }
2989
+ }
2990
+ }
2991
+ },
2992
+ {
2993
+ "name": "paused",
2994
+ "docs": [
2995
+ "Whether or not the thread is currently paused."
2996
+ ],
2997
+ "type": "bool"
2998
+ },
2999
+ {
3000
+ "name": "rate_limit",
3001
+ "docs": [
3002
+ "The maximum number of execs allowed per slot."
3003
+ ],
3004
+ "type": "u64"
3005
+ },
3006
+ {
3007
+ "name": "trigger",
3008
+ "docs": [
3009
+ "The triggering event to kickoff a thread."
3010
+ ],
3011
+ "type": {
3012
+ "defined": {
3013
+ "name": "Trigger"
3014
+ }
3015
+ }
3016
+ }
3017
+ ]
3018
+ }
3019
+ },
3020
+ {
3021
+ "name": "ThreadResponse",
3022
+ "docs": [
3023
+ "A response value target programs can return to update the thread."
3024
+ ],
3025
+ "type": {
3026
+ "kind": "struct",
3027
+ "fields": [
3028
+ {
3029
+ "name": "close_to",
3030
+ "docs": [
3031
+ "If set, the thread will automatically close and return lamports to the provided address.",
3032
+ "If dynamic_instruction is also set, close_to will take precedence and the dynamic instruction will not be executed."
3033
+ ],
3034
+ "type": {
3035
+ "option": "pubkey"
3036
+ }
3037
+ },
3038
+ {
3039
+ "name": "dynamic_instruction",
3040
+ "docs": [
3041
+ "A dynamic instruction to execute next.",
3042
+ "If close_to is also set, it will take precedence and the dynamic instruction will not be executed."
3043
+ ],
3044
+ "type": {
3045
+ "option": {
3046
+ "defined": {
3047
+ "name": "SerializableInstruction"
3048
+ }
3049
+ }
3050
+ }
3051
+ },
3052
+ {
3053
+ "name": "trigger",
3054
+ "docs": [
3055
+ "Value to update the thread trigger to."
3056
+ ],
3057
+ "type": {
3058
+ "option": {
3059
+ "defined": {
3060
+ "name": "Trigger"
3061
+ }
3062
+ }
3063
+ }
3064
+ }
3065
+ ]
3066
+ }
3067
+ },
3068
+ {
3069
+ "name": "Trigger",
3070
+ "docs": [
3071
+ "The triggering conditions of a thread."
3072
+ ],
3073
+ "type": {
3074
+ "kind": "enum",
3075
+ "variants": [
3076
+ {
3077
+ "name": "Account",
3078
+ "fields": [
3079
+ {
3080
+ "name": "address",
3081
+ "docs": [
3082
+ "The address of the account to monitor."
3083
+ ],
3084
+ "type": "pubkey"
3085
+ },
3086
+ {
3087
+ "name": "offset",
3088
+ "docs": [
3089
+ "The byte offset of the account data to monitor."
3090
+ ],
3091
+ "type": "u64"
3092
+ },
3093
+ {
3094
+ "name": "size",
3095
+ "docs": [
3096
+ "The size of the byte slice to monitor (must be less than 1kb)"
3097
+ ],
3098
+ "type": "u64"
3099
+ }
3100
+ ]
3101
+ },
3102
+ {
3103
+ "name": "Cron",
3104
+ "fields": [
3105
+ {
3106
+ "name": "schedule",
3107
+ "docs": [
3108
+ "The schedule in cron syntax. Value must be parsable by the `solana_cron` package."
3109
+ ],
3110
+ "type": "string"
3111
+ },
3112
+ {
3113
+ "name": "skippable",
3114
+ "docs": [
3115
+ "Boolean value indicating whether triggering moments may be skipped if they are missed (e.g. due to network downtime).",
3116
+ "If false, any \"missed\" triggering moments will simply be executed as soon as the network comes back online."
3117
+ ],
3118
+ "type": "bool"
3119
+ }
3120
+ ]
3121
+ },
3122
+ {
3123
+ "name": "Now"
3124
+ },
3125
+ {
3126
+ "name": "Slot",
3127
+ "fields": [
3128
+ {
3129
+ "name": "slot",
3130
+ "type": "u64"
3131
+ }
3132
+ ]
3133
+ },
3134
+ {
3135
+ "name": "Epoch",
3136
+ "fields": [
3137
+ {
3138
+ "name": "epoch",
3139
+ "type": "u64"
3140
+ }
3141
+ ]
3142
+ },
3143
+ {
3144
+ "name": "Timestamp",
3145
+ "fields": [
3146
+ {
3147
+ "name": "unix_ts",
3148
+ "type": "i64"
3149
+ }
3150
+ ]
3151
+ },
3152
+ {
3153
+ "name": "Pyth",
3154
+ "fields": [
3155
+ {
3156
+ "name": "price_feed",
3157
+ "docs": [
3158
+ "The address of the price feed to monitor."
3159
+ ],
3160
+ "type": "pubkey"
3161
+ },
3162
+ {
3163
+ "name": "equality",
3164
+ "docs": [
3165
+ "The equality operator (gte or lte) used to compare prices."
3166
+ ],
3167
+ "type": {
3168
+ "defined": {
3169
+ "name": "Equality"
3170
+ }
3171
+ }
3172
+ },
3173
+ {
3174
+ "name": "limit",
3175
+ "docs": [
3176
+ "The limit price to compare the Pyth feed to."
3177
+ ],
3178
+ "type": "i64"
3179
+ }
3180
+ ]
3181
+ }
3182
+ ]
3183
+ }
3184
+ },
3185
+ {
3186
+ "name": "TriggerContext",
3187
+ "docs": [
3188
+ "The event which allowed a particular transaction thread to be triggered."
3189
+ ],
3190
+ "type": {
3191
+ "kind": "enum",
3192
+ "variants": [
3193
+ {
3194
+ "name": "Account",
3195
+ "fields": [
3196
+ {
3197
+ "name": "data_hash",
3198
+ "docs": [
3199
+ "The account's data hash."
3200
+ ],
3201
+ "type": "u64"
3202
+ }
3203
+ ]
3204
+ },
3205
+ {
3206
+ "name": "Cron",
3207
+ "fields": [
3208
+ {
3209
+ "name": "started_at",
3210
+ "docs": [
3211
+ "The threshold moment the schedule was waiting for."
3212
+ ],
3213
+ "type": "i64"
3214
+ }
3215
+ ]
3216
+ },
3217
+ {
3218
+ "name": "Now"
3219
+ },
3220
+ {
3221
+ "name": "Slot",
3222
+ "fields": [
3223
+ {
3224
+ "name": "started_at",
3225
+ "docs": [
3226
+ "The threshold slot the schedule was waiting for."
3227
+ ],
3228
+ "type": "u64"
3229
+ }
3230
+ ]
3231
+ },
3232
+ {
3233
+ "name": "Epoch",
3234
+ "fields": [
3235
+ {
3236
+ "name": "started_at",
3237
+ "docs": [
3238
+ "The threshold epoch the schedule was waiting for."
3239
+ ],
3240
+ "type": "u64"
3241
+ }
3242
+ ]
3243
+ },
3244
+ {
3245
+ "name": "Timestamp",
3246
+ "fields": [
3247
+ {
3248
+ "name": "started_at",
3249
+ "docs": [
3250
+ "The threshold moment the schedule was waiting for."
3251
+ ],
3252
+ "type": "i64"
3253
+ }
3254
+ ]
3255
+ },
3256
+ {
3257
+ "name": "Pyth",
3258
+ "fields": [
3259
+ {
3260
+ "name": "price",
3261
+ "type": "i64"
3262
+ }
3263
+ ]
3264
+ }
3265
+ ]
3266
+ }
3267
+ }
3268
+ ],
3269
+ "constants": [
3270
+ {
3271
+ "name": "THREAD_SEED",
3272
+ "docs": [
3273
+ "Global seed prefix for PDAs in the program."
3274
+ ],
3275
+ "type": "bytes",
3276
+ "value": "[116, 104, 114, 101, 97, 100]"
3277
+ }
3278
+ ]
3279
+ }