@sly-rentals/core 5.5.2 → 6.0.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 (32) hide show
  1. package/dist/api.json +1644 -1644
  2. package/dist/cjs/instructions/closeContract.js +4 -3
  3. package/dist/cjs/instructions/closeContract.js.map +1 -1
  4. package/dist/cjs/instructions/closeContractThread.js +4 -4
  5. package/dist/cjs/instructions/closeContractThread.js.map +1 -1
  6. package/dist/cjs/instructions/deleteContractThread.js +4 -4
  7. package/dist/cjs/instructions/deleteContractThread.js.map +1 -1
  8. package/dist/cjs/package.json +1 -1
  9. package/dist/cjs/utils/fibers.js +12 -16
  10. package/dist/cjs/utils/fibers.js.map +1 -1
  11. package/dist/cjs/utils/fibers.test.js +21 -28
  12. package/dist/cjs/utils/fibers.test.js.map +1 -1
  13. package/dist/cjs/version.js +1 -1
  14. package/dist/esm/instructions/closeContract.js +6 -5
  15. package/dist/esm/instructions/closeContract.js.map +1 -1
  16. package/dist/esm/instructions/closeContractThread.js +6 -6
  17. package/dist/esm/instructions/closeContractThread.js.map +1 -1
  18. package/dist/esm/instructions/deleteContractThread.js +6 -6
  19. package/dist/esm/instructions/deleteContractThread.js.map +1 -1
  20. package/dist/esm/package.json +1 -1
  21. package/dist/esm/utils/fibers.js +11 -15
  22. package/dist/esm/utils/fibers.js.map +1 -1
  23. package/dist/esm/utils/fibers.test.js +22 -29
  24. package/dist/esm/utils/fibers.test.js.map +1 -1
  25. package/dist/esm/version.js +1 -1
  26. package/dist/types/instructions/closeContract.d.ts.map +1 -1
  27. package/dist/types/instructions/closeContractThread.d.ts.map +1 -1
  28. package/dist/types/instructions/deleteContractThread.d.ts.map +1 -1
  29. package/dist/types/utils/fibers.d.ts +10 -9
  30. package/dist/types/utils/fibers.d.ts.map +1 -1
  31. package/dist/types/version.d.ts +1 -1
  32. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"closeContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/closeContractThread.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,EACjC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAgDjD"}
1
+ {"version":3,"file":"closeContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/closeContractThread.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,6CAA6C;IAC7C,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,MAAM,EAAE,yBAAyB,EACjC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CA4CjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"deleteContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/deleteContractThread.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAAwC,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,0BAA0B,EAClC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CA+CjD"}
1
+ {"version":3,"file":"deleteContractThread.d.ts","sourceRoot":"","sources":["../../../src/instructions/deleteContractThread.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAwB,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAEjE,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,KAAK,EAAE,eAAe,CAAC;IAEvB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAE3B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,0BAA0B,EAClC,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,GAC1B,OAAO,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CA2CjD"}
@@ -4,23 +4,24 @@
4
4
  import { AccountRole, type Address } from '@solana/kit';
5
5
  /**
6
6
  * The fiber accounts a close instruction should carry, given what a thread
7
- * tracks.
7
+ * tracks: one per entry in `fiber_ids`, whether or not the account it names
8
+ * still exists.
8
9
  *
9
10
  * `fiber_ids` records the indices a thread *tracks*, and nothing on chain
10
11
  * keeps that list in agreement with the accounts it names — a fiber account
11
12
  * can be closed out from under a thread that still lists it, which is what
12
13
  * the 2026-08-26 rent sweep did to 623 of them.
13
14
  *
14
- * Passing an index whose account is gone makes the fiber program deserialize
15
- * an empty buffer and fail with `InvalidFiberData`, from the `buf.len() < 8`
16
- * branch rather than the discriminator one. It reads like a schema problem
17
- * and is not one, and no caller can work around it, so a contract tracking a
18
- * destroyed fiber becomes impossible to close by anyone.
15
+ * Reconciling the two is the thread program's job, not ours. It is the only
16
+ * participant that can see the list and the accounts *and* edit the list;
17
+ * dropping an index here asserts it needs no accounting for, which is not
18
+ * ours to assert and which `thread_close` rejects it requires every tracked
19
+ * id to be accounted for and fails with `MissingFiberAccounts` otherwise.
20
+ * Passing the account is how an id whose account is gone gets accounted for.
19
21
  *
20
- * A tracked-but-absent fiber has nothing to close, so dropping it is the
21
- * whole remedy. One `getMultipleAccounts` for the batch.
22
+ * Deriving an address is pure computation, so this needs no RPC.
22
23
  */
23
- export declare function existingFiberAccounts(thread: Address, fiberIds: number[], rpcUrl: string): Promise<{
24
+ export declare function trackedFiberAccounts(thread: Address, fiberIds: number[]): Promise<{
24
25
  address: Address;
25
26
  role: AccountRole.WRITABLE;
26
27
  }[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"fibers.d.ts","sourceRoot":"","sources":["../../../src/utils/fibers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAIxD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAAE,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAA;CAAE,EAAE,CAAC,CAU7D"}
1
+ {"version":3,"file":"fibers.d.ts","sourceRoot":"","sources":["../../../src/utils/fibers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAGxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,OAAO,EACf,QAAQ,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAA;CAAE,EAAE,CAAC,CAM7D"}
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "5.5.2";
1
+ export declare const VERSION = "6.0.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sly-rentals/core",
3
- "version": "5.5.2",
3
+ "version": "6.0.0",
4
4
  "description": "TypeScript SDK for SRSLY",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",