@toon-protocol/rig 3.6.0 → 4.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 (34) hide show
  1. package/README.md +112 -152
  2. package/dist/chunk-CDSFVZDV.js +290 -0
  3. package/dist/chunk-CDSFVZDV.js.map +1 -0
  4. package/dist/{chunk-B5ISARMU.js → chunk-GVXBUL3C.js} +15 -2
  5. package/dist/chunk-GVXBUL3C.js.map +1 -0
  6. package/dist/chunk-LTFMPOHU.js +194 -0
  7. package/dist/chunk-LTFMPOHU.js.map +1 -0
  8. package/dist/{chunk-LCYCKWAT.js → chunk-YZRR2UO6.js} +86 -5
  9. package/dist/chunk-YZRR2UO6.js.map +1 -0
  10. package/dist/{chunk-HJDPM37T.js → chunk-ZZBA5VVL.js} +11 -7
  11. package/dist/{chunk-HJDPM37T.js.map → chunk-ZZBA5VVL.js.map} +1 -1
  12. package/dist/cli/rig.js +290 -523
  13. package/dist/cli/rig.js.map +1 -1
  14. package/dist/index.d.ts +3 -115
  15. package/dist/index.js +9 -121
  16. package/dist/index.js.map +1 -1
  17. package/dist/{publisher-BFcnZeJI.d.ts → publisher-CcL96ugq.d.ts} +58 -1
  18. package/dist/standalone/index.d.ts +241 -438
  19. package/dist/standalone/index.js +19 -11
  20. package/dist/standalone-mode-LEAC4A2L.js +390 -0
  21. package/dist/standalone-mode-LEAC4A2L.js.map +1 -0
  22. package/package.json +5 -4
  23. package/dist/chunk-B5ISARMU.js.map +0 -1
  24. package/dist/chunk-IZ6KLYQ6.js +0 -724
  25. package/dist/chunk-IZ6KLYQ6.js.map +0 -1
  26. package/dist/chunk-LCYCKWAT.js.map +0 -1
  27. package/dist/chunk-PWNZWQOH.js +0 -404
  28. package/dist/chunk-PWNZWQOH.js.map +0 -1
  29. package/dist/chunk-UZZ2RN7A.js +0 -469
  30. package/dist/chunk-UZZ2RN7A.js.map +0 -1
  31. package/dist/network-bootstrap-27FYE3N7.js +0 -40
  32. package/dist/network-bootstrap-27FYE3N7.js.map +0 -1
  33. package/dist/standalone-mode-5MNNJC2D.js +0 -928
  34. package/dist/standalone-mode-5MNNJC2D.js.map +0 -1
@@ -1,8 +1,3 @@
1
- import {
2
- EMPTY_BLOB_SHA,
3
- MAX_OBJECT_SIZE,
4
- hashGitObject
5
- } from "./chunk-B5ISARMU.js";
6
1
  import {
7
2
  ARWEAVE_FETCH_TIMEOUT_MS,
8
3
  ARWEAVE_GATEWAYS,
@@ -10,6 +5,12 @@ import {
10
5
  buildRepoRefs,
11
6
  isValidArweaveTxId
12
7
  } from "./chunk-2KJJ7LSO.js";
8
+ import {
9
+ EMPTY_BLOB_SHA,
10
+ MAX_OBJECT_SIZE,
11
+ hashGitObject,
12
+ uploadChargeFor
13
+ } from "./chunk-GVXBUL3C.js";
13
14
 
14
15
  // src/repo-reader.ts
15
16
  import { execFile, spawn } from "child_process";
@@ -1095,7 +1096,10 @@ async function planPush(options) {
1095
1096
  }
1096
1097
  const announceNeeded = !remoteState.announced;
1097
1098
  const totalObjectBytes = objects.reduce((sum, o) => sum + o.size, 0);
1098
- const uploadFee = BigInt(objects.length) * feeRates.uploadFee;
1099
+ const uploadFee = objects.reduce(
1100
+ (sum, o) => sum + uploadChargeFor(feeRates, o.size),
1101
+ 0n
1102
+ );
1099
1103
  const eventCount = 1 + (announceNeeded ? 1 : 0);
1100
1104
  const eventFees = BigInt(eventCount) * feeRates.eventFee;
1101
1105
  return {
@@ -1243,4 +1247,4 @@ export {
1243
1247
  planPush,
1244
1248
  executePush
1245
1249
  };
1246
- //# sourceMappingURL=chunk-HJDPM37T.js.map
1250
+ //# sourceMappingURL=chunk-ZZBA5VVL.js.map