sablier 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -9,6 +9,8 @@ The format is based on [Common Changelog](https://common-changelog.org/).
9
9
  > Starting with v2.0.0, this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). In v1.x, it
10
10
  > did not always follow Semantic Versioning.
11
11
 
12
+ [3.7.4]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.4
13
+ [3.7.3]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.3
12
14
  [3.7.2]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.2
13
15
  [3.7.1]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.1
14
16
  [3.7.0]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.0
@@ -45,6 +47,22 @@ The format is based on [Common Changelog](https://common-changelog.org/).
45
47
  [1.1.0]: https://github.com/sablier-labs/sdk/releases/tag/v1.1.0
46
48
  [1.0.0]: https://github.com/sablier-labs/sdk/releases/tag/v1.0.0
47
49
 
50
+ ## [3.7.4] - 2026-04-10
51
+
52
+ ### Fixed
53
+
54
+ - Return `false` for unknown versions in `isEvmReleasePayable` instead of throwing a runtime error
55
+ ([`e14a270`](https://github.com/sablier-labs/sdk/commit/e14a270))
56
+
57
+ ## [3.7.3] - 2026-04-10
58
+
59
+ ### Fixed
60
+
61
+ - Fix root `sablier` release-feature helper exports for downstream type-checkers
62
+ ([`93947a7`](https://github.com/sablier-labs/sdk/commit/93947a7))
63
+ - Fix `sablier/evm/releases` and `sablier/evm/releases/features` package exports
64
+ ([`93947a7`](https://github.com/sablier-labs/sdk/commit/93947a7))
65
+
48
66
  ## [3.7.2] - 2026-04-10
49
67
 
50
68
  ### Added
@@ -176,16 +176,11 @@ function isEvmReleasePayable(releaseOrProtocol, version) {
176
176
  if (!isPayableEvmRelease(release)) {
177
177
  return false;
178
178
  }
179
- switch (release.protocol) {
180
- case enums_js_1.Protocol.Airdrops:
181
- return exports.evmReleaseFeatures[enums_js_1.Protocol.Airdrops][release.version].payable;
182
- case enums_js_1.Protocol.Flow:
183
- return exports.evmReleaseFeatures[enums_js_1.Protocol.Flow][release.version].payable;
184
- case enums_js_1.Protocol.Lockup:
185
- return exports.evmReleaseFeatures[enums_js_1.Protocol.Lockup][release.version].payable;
186
- default:
187
- return false;
179
+ const registry = exports.evmReleaseFeatures[release.protocol];
180
+ if (!(release.version in registry)) {
181
+ return false;
188
182
  }
183
+ return registry[release.version].payable;
189
184
  }
190
185
  function supportsLockupBatch(version) {
191
186
  return getLockupReleaseFeatures(version)?.batch ?? false;
@@ -1 +1 @@
1
- {"version":3,"file":"features.js","sourceRoot":"","sources":["../../../../src/evm/releases/features.ts"],"names":[],"mappings":";;;AAiOA,gEAQC;AAKD,sDAKC;AAMD,wDAQC;AAMD,4DAQC;AAMD,gCAEC;AAMD,gCAEC;AAaD,4CAwBC;AAMD,gEAEC;AAgBD,kDAoBC;AAMD,kDAEC;AAMD,wDAEC;AAMD,kDAEC;AAjYD,iDAAuD;AAqDvD,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC1E,UAAU,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAsD,CAAC,CAAC;AAmBnF,QAAA,kBAAkB,GAAG,UAAU,CAAC;IAC3C,CAAC,mBAAQ,CAAC,QAAQ,CAAC,EAAE;QACnB,CAAC,kBAA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C,mBAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;QACtE;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAMD,SAAgB,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC;AAMD,SAAgB,sBAAsB,CAAC,OAA4B;IACjE,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC;AAC9D,CAAC;AAMD,SAAgB,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * @file Canonical capability registry for every shipped EVM release.\n *\n * Release builders attach these feature bags to exported release objects, and\n * helper functions read from the same registry so version-dependent behavior\n * stays defined in one place.\n */\nimport { Protocol, Version } from \"@/src/evm/enums.js\";\nimport type { Sablier } from \"@/src/types.js\";\n\n/* -------------------------------------------------------------------------- */\n/* TYPES */\n/* -------------------------------------------------------------------------- */\n\nexport type EvmReleaseVersionByProtocol = {\n airdrops: Sablier.EVM.Version.Airdrops;\n bob: Sablier.EVM.Version.Bob;\n flow: Sablier.EVM.Version.Flow;\n legacy: Sablier.EVM.Version.Legacy;\n lockup: Sablier.EVM.Version.Lockup;\n};\n\nexport type EvmReleaseFeatureSetByProtocol = {\n airdrops: Sablier.EVM.AirdropsReleaseFeatures;\n bob: Sablier.EVM.EmptyReleaseFeatures;\n flow: Sablier.EVM.FlowReleaseFeatures;\n legacy: Sablier.EVM.EmptyReleaseFeatures;\n lockup: Sablier.EVM.LockupReleaseFeatures;\n};\n\ntype EvmReleaseFeatureRegistry = {\n [TProtocol in keyof EvmReleaseVersionByProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n EvmReleaseFeatureSetByProtocol[TProtocol]\n >;\n};\n\nexport type ReleaseFeaturesForProtocol<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolFeatureSet<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolWithBooleanFeature<TFeature extends PropertyKey> = {\n [TProtocol in keyof EvmReleaseFeatureSetByProtocol]: ProtocolFeatureSet<TProtocol> extends Record<\n TFeature,\n boolean\n >\n ? TProtocol\n : never;\n}[keyof EvmReleaseFeatureSetByProtocol];\n\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\ntype PayableEvmReleaseReference = {\n [TProtocol in PayableEvmProtocol]: {\n protocol: TProtocol;\n version: EvmReleaseVersionByProtocol[TProtocol];\n };\n}[PayableEvmProtocol];\n\nfunction deepFreeze<T>(value: T): T {\n if (typeof value !== \"object\" || value === null || Object.isFrozen(value)) {\n return value;\n }\n\n for (const nestedValue of Object.values(value as Record<string, unknown>)) {\n deepFreeze(nestedValue);\n }\n\n return Object.freeze(value);\n}\n\nconst emptyReleaseFeatures = deepFreeze({} as const satisfies Sablier.EVM.EmptyReleaseFeatures);\n\n/**\n * Protocol/version feature matrix used by both release resolvers and public helpers.\n *\n * Feature glossary:\n * - `claimTo`: Airdrops campaigns can claim to a third-party recipient address.\n * - `sponsor`: Airdrops campaigns can receive sponsor funding after deployment.\n * - `payable`: The release charges native-token fees on supported claim, withdraw, or create flows.\n * - `legacyAbi`: Lockup still uses the pre-unified split ABI layout instead of the consolidated contract surface.\n * - `batch`: Lockup exposes dedicated batch entrypoints for creating or managing multiple streams in one transaction.\n * - `prbProxy`: Lockup integrates with PRBProxy for proxy-based execution.\n * - `shape`: Lockup stores the stream shape as an on-chain parameter.\n * - `minFee`: Flow or Lockup exposes an on-chain minimum fee in wei via `minFeeWei`.\n *\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/airdrops/CHANGELOG.md Airdrops changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/lockup/CHANGELOG.md Lockup changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/flow/CHANGELOG.md Flow changelog}\n */\nexport const evmReleaseFeatures = deepFreeze({\n [Protocol.Airdrops]: {\n [Version.Airdrops.V1_1]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_2]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_3]: { claimTo: false, payable: true, sponsor: false },\n [Version.Airdrops.V2_0]: { claimTo: true, payable: true, sponsor: false },\n [Version.Airdrops.V3_0]: { claimTo: true, payable: true, sponsor: true },\n },\n [Protocol.Bob]: {\n [Version.Bob.V1_0]: emptyReleaseFeatures,\n },\n [Protocol.Flow]: {\n [Version.Flow.V1_0]: { minFee: false, payable: false },\n [Version.Flow.V1_1]: { minFee: false, payable: true },\n [Version.Flow.V2_0]: { minFee: true, payable: true },\n [Version.Flow.V3_0]: { minFee: true, payable: true },\n },\n [Protocol.Legacy]: {\n [Version.Legacy.V1_0]: emptyReleaseFeatures,\n [Version.Legacy.V1_1]: emptyReleaseFeatures,\n },\n [Protocol.Lockup]: {\n [Version.Lockup.V1_0]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: true,\n shape: false,\n },\n [Version.Lockup.V1_1]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V1_2]: {\n batch: false,\n legacyAbi: false,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V2_0]: {\n batch: true,\n legacyAbi: false,\n minFee: false,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V3_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V4_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n },\n} as const satisfies EvmReleaseFeatureRegistry);\n\nexport type PayableEvmProtocol = ProtocolWithBooleanFeature<\"payable\">;\n\n/* -------------------------------------------------------------------------- */\n/* PRIVATE HELPERS */\n/* -------------------------------------------------------------------------- */\n\nconst evmReleaseFeatureRegistry: EvmReleaseFeatureRegistry = evmReleaseFeatures;\n\ntype PayableReleaseFeatureRegistry = {\n [TProtocol in PayableEvmProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n Pick<ProtocolFeatureSet<TProtocol>, \"payable\">\n >;\n};\n\nconst payableReleaseFeatureRegistry = deepFreeze({\n [Protocol.Airdrops]: evmReleaseFeatures[Protocol.Airdrops],\n [Protocol.Flow]: evmReleaseFeatures[Protocol.Flow],\n [Protocol.Lockup]: evmReleaseFeatures[Protocol.Lockup],\n} satisfies PayableReleaseFeatureRegistry);\n\n/**\n * Narrows protocol checks for helpers that only apply to fee-charging releases.\n */\nfunction isPayableEvmProtocol(protocol: Sablier.EVM.Protocol): protocol is PayableEvmProtocol {\n return protocol in payableReleaseFeatureRegistry;\n}\n\n/**\n * Narrows a release descriptor to protocols whose feature bag includes a payable flag.\n */\nfunction isPayableEvmRelease(release: EvmReleaseReference): release is PayableEvmReleaseReference {\n return isPayableEvmProtocol(release.protocol);\n}\n\n/**\n * Normalizes the supported payable helper overloads to the canonical release shape.\n */\nfunction normalizePayableReleaseInput(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): EvmReleaseReference {\n if (typeof releaseOrProtocol !== \"string\") {\n return releaseOrProtocol;\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return { protocol: releaseOrProtocol, version };\n}\n\n/* -------------------------------------------------------------------------- */\n/* FEATURES */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Reads the airdrops capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Airdrops protocol.\n */\nexport function getAirdropsReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.AirdropsReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Airdrops];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Airdrops];\n}\n\n/**\n * Returns the protocol-specific feature bag for a single EVM release.\n */\nexport function getEvmReleaseFeatures<TProtocol extends keyof EvmReleaseFeatureSetByProtocol>(\n protocol: TProtocol,\n version: EvmReleaseVersionByProtocol[TProtocol]\n): ReleaseFeaturesForProtocol<TProtocol> {\n return evmReleaseFeatureRegistry[protocol][version] as ReleaseFeaturesForProtocol<TProtocol>;\n}\n\n/**\n * Reads the flow capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Flow protocol.\n */\nexport function getFlowReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.FlowReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Flow];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Flow];\n}\n\n/**\n * Reads the lockup capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Lockup protocol.\n */\nexport function getLockupReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.LockupReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Lockup];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Lockup];\n}\n\n/**\n * Returns whether the airdrops release supports the `claimTo` function for claiming to a third-party address.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasClaimTo(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.claimTo ?? false;\n}\n\n/**\n * Returns whether the airdrops release supports sponsor-driven claims.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasSponsor(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.sponsor ?? false;\n}\n\n/**\n * Returns whether a Flow or Lockup release exposes an on-chain minimum fee in wei.\n */\nexport function hasOnchainMinFee(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function hasOnchainMinFee(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function hasOnchainMinFee(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n let release: EvmReleaseReference;\n\n if (typeof releaseOrProtocol === \"string\") {\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for hasOnchainMinFee(protocol, version)');\n }\n\n release = { protocol: releaseOrProtocol, version };\n } else {\n release = releaseOrProtocol;\n }\n\n switch (release.protocol) {\n case Protocol.Flow:\n return getFlowReleaseFeatures(release.version)?.minFee ?? false;\n case Protocol.Lockup:\n return getLockupReleaseFeatures(release.version)?.minFee ?? false;\n default:\n return false;\n }\n}\n\n/**\n * Returns whether the lockup release uses the split ABI layout.\n * Returns `false` for non-Lockup versions.\n */\nexport function hasSplitLockupArchitecture(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.legacyAbi ?? false;\n}\n\n/** @deprecated Use {@link hasSplitLockupArchitecture} instead. */\nexport const usesLockupSplit = hasSplitLockupArchitecture;\n\n/**\n * Returns whether a release charges native-token fees on claim or withdraw operations.\n */\nexport function isEvmReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isEvmReleasePayable(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isEvmReleasePayable(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n const release = normalizePayableReleaseInput(releaseOrProtocol, version);\n\n if (!isPayableEvmRelease(release)) {\n return false;\n }\n\n switch (release.protocol) {\n case Protocol.Airdrops:\n return evmReleaseFeatures[Protocol.Airdrops][release.version].payable;\n case Protocol.Flow:\n return evmReleaseFeatures[Protocol.Flow][release.version].payable;\n case Protocol.Lockup:\n return evmReleaseFeatures[Protocol.Lockup][release.version].payable;\n default:\n return false;\n }\n}\n\n/**\n * Returns whether the lockup release exposes batch create or withdraw flows.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupBatch(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.batch ?? false;\n}\n\n/**\n * Returns whether the lockup release integrates with PRBProxy.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupPrbProxy(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.prbProxy ?? false;\n}\n\n/**\n * Returns whether the lockup release stores shape as an on-chain parameter.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupShape(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.shape ?? false;\n}\n"]}
1
+ {"version":3,"file":"features.js","sourceRoot":"","sources":["../../../../src/evm/releases/features.ts"],"names":[],"mappings":";;;AAiOA,gEAQC;AAKD,sDAKC;AAMD,wDAQC;AAMD,4DAQC;AAMD,gCAEC;AAMD,gCAEC;AAaD,4CAwBC;AAMD,gEAEC;AAgBD,kDAgBC;AAMD,kDAEC;AAMD,wDAEC;AAMD,kDAEC;AA7XD,iDAAuD;AAqDvD,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC1E,UAAU,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAsD,CAAC,CAAC;AAmBnF,QAAA,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B,CAAC,OAA4B;IAC9D,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC;AAMD,SAAgB,sBAAsB,CAAC,OAA4B;IACjE,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC;AAC9D,CAAC;AAMD,SAAgB,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * @file Canonical capability registry for every shipped EVM release.\n *\n * Release builders attach these feature bags to exported release objects, and\n * helper functions read from the same registry so version-dependent behavior\n * stays defined in one place.\n */\nimport { Protocol, Version } from \"@/src/evm/enums.js\";\nimport type { Sablier } from \"@/src/types.js\";\n\n/* -------------------------------------------------------------------------- */\n/* TYPES */\n/* -------------------------------------------------------------------------- */\n\nexport type EvmReleaseVersionByProtocol = {\n airdrops: Sablier.EVM.Version.Airdrops;\n bob: Sablier.EVM.Version.Bob;\n flow: Sablier.EVM.Version.Flow;\n legacy: Sablier.EVM.Version.Legacy;\n lockup: Sablier.EVM.Version.Lockup;\n};\n\nexport type EvmReleaseFeatureSetByProtocol = {\n airdrops: Sablier.EVM.AirdropsReleaseFeatures;\n bob: Sablier.EVM.EmptyReleaseFeatures;\n flow: Sablier.EVM.FlowReleaseFeatures;\n legacy: Sablier.EVM.EmptyReleaseFeatures;\n lockup: Sablier.EVM.LockupReleaseFeatures;\n};\n\ntype EvmReleaseFeatureRegistry = {\n [TProtocol in keyof EvmReleaseVersionByProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n EvmReleaseFeatureSetByProtocol[TProtocol]\n >;\n};\n\nexport type ReleaseFeaturesForProtocol<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolFeatureSet<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolWithBooleanFeature<TFeature extends PropertyKey> = {\n [TProtocol in keyof EvmReleaseFeatureSetByProtocol]: ProtocolFeatureSet<TProtocol> extends Record<\n TFeature,\n boolean\n >\n ? TProtocol\n : never;\n}[keyof EvmReleaseFeatureSetByProtocol];\n\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\ntype PayableEvmReleaseReference = {\n [TProtocol in PayableEvmProtocol]: {\n protocol: TProtocol;\n version: EvmReleaseVersionByProtocol[TProtocol];\n };\n}[PayableEvmProtocol];\n\nfunction deepFreeze<T>(value: T): T {\n if (typeof value !== \"object\" || value === null || Object.isFrozen(value)) {\n return value;\n }\n\n for (const nestedValue of Object.values(value as Record<string, unknown>)) {\n deepFreeze(nestedValue);\n }\n\n return Object.freeze(value);\n}\n\nconst emptyReleaseFeatures = deepFreeze({} as const satisfies Sablier.EVM.EmptyReleaseFeatures);\n\n/**\n * Protocol/version feature matrix used by both release resolvers and public helpers.\n *\n * Feature glossary:\n * - `claimTo`: Airdrops campaigns can claim to a third-party recipient address.\n * - `sponsor`: Airdrops campaigns can receive sponsor funding after deployment.\n * - `payable`: The release charges native-token fees on supported claim, withdraw, or create flows.\n * - `legacyAbi`: Lockup still uses the pre-unified split ABI layout instead of the consolidated contract surface.\n * - `batch`: Lockup exposes dedicated batch entrypoints for creating or managing multiple streams in one transaction.\n * - `prbProxy`: Lockup integrates with PRBProxy for proxy-based execution.\n * - `shape`: Lockup stores the stream shape as an on-chain parameter.\n * - `minFee`: Flow or Lockup exposes an on-chain minimum fee in wei via `minFeeWei`.\n *\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/airdrops/CHANGELOG.md Airdrops changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/lockup/CHANGELOG.md Lockup changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/flow/CHANGELOG.md Flow changelog}\n */\nexport const evmReleaseFeatures = deepFreeze({\n [Protocol.Airdrops]: {\n [Version.Airdrops.V1_1]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_2]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_3]: { claimTo: false, payable: true, sponsor: false },\n [Version.Airdrops.V2_0]: { claimTo: true, payable: true, sponsor: false },\n [Version.Airdrops.V3_0]: { claimTo: true, payable: true, sponsor: true },\n },\n [Protocol.Bob]: {\n [Version.Bob.V1_0]: emptyReleaseFeatures,\n },\n [Protocol.Flow]: {\n [Version.Flow.V1_0]: { minFee: false, payable: false },\n [Version.Flow.V1_1]: { minFee: false, payable: true },\n [Version.Flow.V2_0]: { minFee: true, payable: true },\n [Version.Flow.V3_0]: { minFee: true, payable: true },\n },\n [Protocol.Legacy]: {\n [Version.Legacy.V1_0]: emptyReleaseFeatures,\n [Version.Legacy.V1_1]: emptyReleaseFeatures,\n },\n [Protocol.Lockup]: {\n [Version.Lockup.V1_0]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: true,\n shape: false,\n },\n [Version.Lockup.V1_1]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V1_2]: {\n batch: false,\n legacyAbi: false,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V2_0]: {\n batch: true,\n legacyAbi: false,\n minFee: false,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V3_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V4_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n },\n} as const satisfies EvmReleaseFeatureRegistry);\n\nexport type PayableEvmProtocol = ProtocolWithBooleanFeature<\"payable\">;\n\n/* -------------------------------------------------------------------------- */\n/* PRIVATE HELPERS */\n/* -------------------------------------------------------------------------- */\n\nconst evmReleaseFeatureRegistry: EvmReleaseFeatureRegistry = evmReleaseFeatures;\n\ntype PayableReleaseFeatureRegistry = {\n [TProtocol in PayableEvmProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n Pick<ProtocolFeatureSet<TProtocol>, \"payable\">\n >;\n};\n\nconst payableReleaseFeatureRegistry = deepFreeze({\n [Protocol.Airdrops]: evmReleaseFeatures[Protocol.Airdrops],\n [Protocol.Flow]: evmReleaseFeatures[Protocol.Flow],\n [Protocol.Lockup]: evmReleaseFeatures[Protocol.Lockup],\n} satisfies PayableReleaseFeatureRegistry);\n\n/**\n * Narrows protocol checks for helpers that only apply to fee-charging releases.\n */\nfunction isPayableEvmProtocol(protocol: Sablier.EVM.Protocol): protocol is PayableEvmProtocol {\n return protocol in payableReleaseFeatureRegistry;\n}\n\n/**\n * Narrows a release descriptor to protocols whose feature bag includes a payable flag.\n */\nfunction isPayableEvmRelease(release: EvmReleaseReference): release is PayableEvmReleaseReference {\n return isPayableEvmProtocol(release.protocol);\n}\n\n/**\n * Normalizes the supported payable helper overloads to the canonical release shape.\n */\nfunction normalizePayableReleaseInput(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): EvmReleaseReference {\n if (typeof releaseOrProtocol !== \"string\") {\n return releaseOrProtocol;\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return { protocol: releaseOrProtocol, version };\n}\n\n/* -------------------------------------------------------------------------- */\n/* FEATURES */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Reads the airdrops capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Airdrops protocol.\n */\nexport function getAirdropsReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.AirdropsReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Airdrops];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Airdrops];\n}\n\n/**\n * Returns the protocol-specific feature bag for a single EVM release.\n */\nexport function getEvmReleaseFeatures<TProtocol extends keyof EvmReleaseFeatureSetByProtocol>(\n protocol: TProtocol,\n version: EvmReleaseVersionByProtocol[TProtocol]\n): ReleaseFeaturesForProtocol<TProtocol> {\n return evmReleaseFeatureRegistry[protocol][version] as ReleaseFeaturesForProtocol<TProtocol>;\n}\n\n/**\n * Reads the flow capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Flow protocol.\n */\nexport function getFlowReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.FlowReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Flow];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Flow];\n}\n\n/**\n * Reads the lockup capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Lockup protocol.\n */\nexport function getLockupReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.LockupReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Lockup];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Lockup];\n}\n\n/**\n * Returns whether the airdrops release supports the `claimTo` function for claiming to a third-party address.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasClaimTo(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.claimTo ?? false;\n}\n\n/**\n * Returns whether the airdrops release supports sponsor-driven claims.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasSponsor(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.sponsor ?? false;\n}\n\n/**\n * Returns whether a Flow or Lockup release exposes an on-chain minimum fee in wei.\n */\nexport function hasOnchainMinFee(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function hasOnchainMinFee(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function hasOnchainMinFee(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n let release: EvmReleaseReference;\n\n if (typeof releaseOrProtocol === \"string\") {\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for hasOnchainMinFee(protocol, version)');\n }\n\n release = { protocol: releaseOrProtocol, version };\n } else {\n release = releaseOrProtocol;\n }\n\n switch (release.protocol) {\n case Protocol.Flow:\n return getFlowReleaseFeatures(release.version)?.minFee ?? false;\n case Protocol.Lockup:\n return getLockupReleaseFeatures(release.version)?.minFee ?? false;\n default:\n return false;\n }\n}\n\n/**\n * Returns whether the lockup release uses the split ABI layout.\n * Returns `false` for non-Lockup versions.\n */\nexport function hasSplitLockupArchitecture(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.legacyAbi ?? false;\n}\n\n/** @deprecated Use {@link hasSplitLockupArchitecture} instead. */\nexport const usesLockupSplit = hasSplitLockupArchitecture;\n\n/**\n * Returns whether a release charges native-token fees on claim or withdraw operations.\n */\nexport function isEvmReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isEvmReleasePayable(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isEvmReleasePayable(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n const release = normalizePayableReleaseInput(releaseOrProtocol, version);\n\n if (!isPayableEvmRelease(release)) {\n return false;\n }\n\n const registry = evmReleaseFeatures[release.protocol] as Record<string, { payable: boolean }>;\n if (!(release.version in registry)) {\n return false;\n }\n\n return registry[release.version].payable;\n}\n\n/**\n * Returns whether the lockup release exposes batch create or withdraw flows.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupBatch(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.batch ?? false;\n}\n\n/**\n * Returns whether the lockup release integrates with PRBProxy.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupPrbProxy(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.prbProxy ?? false;\n}\n\n/**\n * Returns whether the lockup release stores shape as an on-chain parameter.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupShape(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.shape ?? false;\n}\n"]}
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./data.js"), exports);
18
+ __exportStar(require("./features.js"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/evm/releases/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B","sourcesContent":["export * from \"./data.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/evm/releases/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,gDAA8B","sourcesContent":["export * from \"./data.js\";\nexport * from \"./features.js\";\n"]}
@@ -25,7 +25,6 @@ const enums_js_1 = require("./evm/enums.js");
25
25
  const helpers_js_1 = require("./evm/helpers.js");
26
26
  const chains_js_1 = require("./solana/chains/chains.js");
27
27
  const helpers_js_2 = require("./solana/helpers.js");
28
- __exportStar(require("./evm/helpers.js"), exports);
29
28
  __exportStar(require("./solana/helpers.js"), exports);
30
29
  const MULTI_ECOSYSTEM_PROTOCOLS = new Set([enums_js_1.Protocol.Airdrops, enums_js_1.Protocol.Lockup]);
31
30
  function compareVersions(a, b) {
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA+BA,0CAQC;AAWD,0CAEC;AAWD,wCAEC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AAC,CAAC;IAC/F,CAAC;IAED,OAAO,IAAA,gCAAmB,EAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAeD,SAAgB,eAAe,CAAC,OAAe,EAAE,OAAgC;IAC/E,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;QAC7B,CAAC,CAAC,IAAA,+BAAkB,EAAC,OAA8B,EAAE,OAAO,CAAC;QAC7D,CAAC,CAAC,IAAA,kCAAqB,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAMY,QAAA,QAAQ,GAAG,eAAe,CAAC;AAuBxC,SAAgB,eAAe,CAAC,IAK/B;IACC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACnD,MAAM,aAAa,GAAG,4BAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAGpD,IAAI,QAAQ,IAAI,aAAa,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,QAAuB,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CACb,0BAA0B,QAAQ,gDAAgD,OAAO,EAAE,CAC5F,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,IAAA,kCAAqB,EAAC;YAC3B,KAAK;YACL,OAAO;YACP,QAAQ,EAAE,QAAmC;YAC7C,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAA,+BAAkB,EAAC;QACxB,KAAK;QACL,OAAO;QACP,QAAQ,EAAE,QAAgC;QAC1C,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Protocol as EvmProtocol } from \"./evm/enums.js\";\nimport type { PayableEvmProtocol } from \"./evm/helpers.js\";\nimport { isEvmReleasePayable, resolveEvmStreamId, truncateEvmAddress } from \"./evm/helpers.js\";\nimport { SOLANA_CHAIN_IDS } from \"./solana/chains/chains.js\";\nimport { resolveSolanaStreamId, truncateSolanaAddress } from \"./solana/helpers.js\";\nimport type { Sablier, TruncateAddressOptions } from \"./types.js\";\n\n// Re-export platform-specific helpers\nexport * from \"./evm/helpers.js\";\nexport * from \"./solana/helpers.js\";\n\n// Re-export shared types\nexport type { TruncateAddressOptions } from \"./types.js\";\n\n/** Version type supporting both EVM and Solana protocols */\ntype Version = Sablier.EVM.Version | Sablier.Solana.Version;\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\n\n/** Protocols that exist on both EVM and Solana ecosystems */\nconst MULTI_ECOSYSTEM_PROTOCOLS = new Set([EvmProtocol.Airdrops, EvmProtocol.Lockup]);\n\n/**\n * Compare two semantic version strings.\n * @param a - First version string (e.g., \"v1.0\")\n * @param b - Second version string (e.g., \"v1.0\")\n * @returns -1 if a < b, 0 if a === b, 1 if a > b\n * @example\n * compareVersions(\"v1.0\", \"v2.0\") // -1\n * compareVersions(\"v2.0\", \"v1.0\") // 1\n * compareVersions(\"v1.1\", \"v1.1\") // 0\n */\nexport function compareVersions(a: Version, b: Version): number {\n const [aMajor, aMinor] = a.slice(1).split(\".\").map(Number);\n const [bMajor, bMinor] = b.slice(1).split(\".\").map(Number);\n\n if (aMajor !== bMajor) {\n return aMajor - bMajor;\n }\n return aMinor - bMinor;\n}\n\n/**\n * Check if a version comes before another chronologically.\n * @param version - The version to check\n * @param before - The reference version to compare against\n * @returns true if version comes before the reference version\n * @example\n * isVersionBefore(\"v1.0\", \"v2.0\") // true\n * isVersionBefore(\"v2.0\", \"v1.0\") // false\n */\nexport function isVersionBefore(version: Version, before: Version): boolean {\n return compareVersions(version, before) < 0;\n}\n\n/**\n * Check if a version comes after another chronologically.\n * @param version - The version to check\n * @param after - The reference version to compare against\n * @returns true if version comes after the reference version\n * @example\n * isVersionAfter(\"v2.0\", \"v1.0\") // true\n * isVersionAfter(\"v1.0\", \"v2.0\") // false\n */\nexport function isVersionAfter(version: Version, after: Version): boolean {\n return compareVersions(version, after) > 0;\n}\n\n/**\n * Check if a protocol release charges ETH fees on withdraw/claim operations.\n *\n * Starting from specific versions, Sablier contracts charge a small ETH fee when\n * recipients withdraw or claim tokens from streams and airdrops.\n *\n * @param release - The release object or `{ protocol, version }` pair to check\n * @returns true if the release charges fees\n * @see {@link https://docs.sablier.com/concepts/fees} for fee details\n * @example\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.3\" }) // true\n * isReleasePayable(\"airdrops\", \"v1.2\") // false\n * isReleasePayable(\"airdrops\", \"v1.3\") // true\n * isReleasePayable({ protocol: \"lockup\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"lockup\", version: \"v2.0\" }) // true\n * isReleasePayable(\"lockup\", \"v1.2\") // false\n * isReleasePayable(\"lockup\", \"v2.0\") // true\n * isReleasePayable({ protocol: \"flow\", version: \"v1.0\" }) // false\n * isReleasePayable({ protocol: \"flow\", version: \"v1.1\" }) // true\n * isReleasePayable(\"flow\", \"v1.0\") // false\n * isReleasePayable(\"flow\", \"v1.1\") // true\n */\nexport function isReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isReleasePayable(\n protocol: PayableEvmProtocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isReleasePayable(\n releaseOrProtocol: EvmReleaseReference | PayableEvmProtocol,\n version?: Sablier.EVM.Version\n): boolean {\n if (typeof releaseOrProtocol !== \"string\") {\n return isEvmReleasePayable(releaseOrProtocol);\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return isEvmReleasePayable(releaseOrProtocol, version);\n}\n\n/**\n * Truncate an Ethereum or Solana address for display purposes.\n * Automatically routes to the appropriate typed function based on address format.\n *\n * @param address - The address to truncate (Ethereum 0x-prefixed or Solana base58)\n * @param options - Optional truncation options with start and end character counts (default: 4 each)\n * @returns Truncated address in format \"0xcafe...beef\" or \"DYw8...NSKK\" or original if too short\n * @example\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateAddress(\"DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK\") // \"DYw8...NSKK\"\n * truncateAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateAddress(address: string, options?: TruncateAddressOptions): string {\n return address.startsWith(\"0x\")\n ? truncateEvmAddress(address as Sablier.EVM.Address, options)\n : truncateSolanaAddress(address, options);\n}\n\n/**\n * Convenience alias for {@link truncateAddress}.\n * Also suitable for truncating arbitrary hex strings, not just addresses.\n */\nexport const truncate = truncateAddress;\n\n/**\n * Resolves a stream/airdrop entity ID for use with Sablier indexers.\n * Automatically routes to EVM or Solana based on chain ID.\n *\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract/program alias (e.g., \"LL2\", \"LK2\", \"FL2\" for EVM; \"LL\" for Solana)\n * @param opts.chainId - Chain ID (EVM chains or Solana chains: 900000010, 900000020)\n * @param opts.tokenId - Stream/airdrop token ID\n * @param opts.protocol - Optional protocol to disambiguate aliases\n * @returns Stream ID in format \"0xabc...-1-123\" (EVM) or \"DYw8jC...-900000010-123\" (Solana)\n * @example\n * // EVM\n * resolveStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n *\n * // Solana\n * resolveStreamId({ alias: \"LL\", chainId: 900000010, tokenId: 456n })\n * // => \"DYw8jC...-900000010-456\"\n */\nexport function resolveStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol | Sablier.Solana.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n const isSolanaChain = SOLANA_CHAIN_IDS.has(chainId);\n\n // Validate protocol/chain compatibility\n if (protocol && isSolanaChain && !MULTI_ECOSYSTEM_PROTOCOLS.has(protocol as EvmProtocol)) {\n throw new Error(\n `Sablier SDK: Protocol \"${protocol}\" is EVM-only and not valid for Solana chain ${chainId}`\n );\n }\n\n if (isSolanaChain) {\n return resolveSolanaStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.Solana.Protocol,\n tokenId,\n });\n }\n\n return resolveEvmStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.EVM.Protocol,\n tokenId,\n });\n}\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAgCA,0CAQC;AAWD,0CAEC;AAWD,wCAEC;AAiCD,4CAaC;AAeD,0CAIC;AA6BD,0CA+BC;AA/LD,6CAAyD;AAEzD,iDAA+F;AAC/F,yDAA6D;AAC7D,oDAAmF;AAMnF,sDAAoC;AAUpC,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,mBAAW,CAAC,QAAQ,EAAE,mBAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAYtF,SAAgB,eAAe,CAAC,CAAU,EAAE,CAAU;IACpD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAC3D,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE3D,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IACD,OAAO,MAAM,GAAG,MAAM,CAAC;AACzB,CAAC;AAWD,SAAgB,eAAe,CAAC,OAAgB,EAAE,MAAe;IAC/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B,OAAO,IAAA,kCAAqB,EAAC;YAC3B,KAAK;YACL,OAAO;YACP,QAAQ,EAAE,QAAmC;YAC7C,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAA,+BAAkB,EAAC;QACxB,KAAK;QACL,OAAO;QACP,QAAQ,EAAE,QAAgC;QAC1C,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Protocol as EvmProtocol } from \"./evm/enums.js\";\nimport type { PayableEvmProtocol } from \"./evm/helpers.js\";\nimport { isEvmReleasePayable, resolveEvmStreamId, truncateEvmAddress } from \"./evm/helpers.js\";\nimport { SOLANA_CHAIN_IDS } from \"./solana/chains/chains.js\";\nimport { resolveSolanaStreamId, truncateSolanaAddress } from \"./solana/helpers.js\";\nimport type { Sablier, TruncateAddressOptions } from \"./types.js\";\n\n// Re-export platform-specific helpers. EVM helpers are surfaced from the\n// package root via `src/evm/index.ts`, so keep this barrel Solana-only to avoid\n// duplicate `export *` paths for the same EVM names at `sablier`.\nexport * from \"./solana/helpers.js\";\n\n// Re-export shared types\nexport type { TruncateAddressOptions } from \"./types.js\";\n\n/** Version type supporting both EVM and Solana protocols */\ntype Version = Sablier.EVM.Version | Sablier.Solana.Version;\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\n\n/** Protocols that exist on both EVM and Solana ecosystems */\nconst MULTI_ECOSYSTEM_PROTOCOLS = new Set([EvmProtocol.Airdrops, EvmProtocol.Lockup]);\n\n/**\n * Compare two semantic version strings.\n * @param a - First version string (e.g., \"v1.0\")\n * @param b - Second version string (e.g., \"v1.0\")\n * @returns -1 if a < b, 0 if a === b, 1 if a > b\n * @example\n * compareVersions(\"v1.0\", \"v2.0\") // -1\n * compareVersions(\"v2.0\", \"v1.0\") // 1\n * compareVersions(\"v1.1\", \"v1.1\") // 0\n */\nexport function compareVersions(a: Version, b: Version): number {\n const [aMajor, aMinor] = a.slice(1).split(\".\").map(Number);\n const [bMajor, bMinor] = b.slice(1).split(\".\").map(Number);\n\n if (aMajor !== bMajor) {\n return aMajor - bMajor;\n }\n return aMinor - bMinor;\n}\n\n/**\n * Check if a version comes before another chronologically.\n * @param version - The version to check\n * @param before - The reference version to compare against\n * @returns true if version comes before the reference version\n * @example\n * isVersionBefore(\"v1.0\", \"v2.0\") // true\n * isVersionBefore(\"v2.0\", \"v1.0\") // false\n */\nexport function isVersionBefore(version: Version, before: Version): boolean {\n return compareVersions(version, before) < 0;\n}\n\n/**\n * Check if a version comes after another chronologically.\n * @param version - The version to check\n * @param after - The reference version to compare against\n * @returns true if version comes after the reference version\n * @example\n * isVersionAfter(\"v2.0\", \"v1.0\") // true\n * isVersionAfter(\"v1.0\", \"v2.0\") // false\n */\nexport function isVersionAfter(version: Version, after: Version): boolean {\n return compareVersions(version, after) > 0;\n}\n\n/**\n * Check if a protocol release charges ETH fees on withdraw/claim operations.\n *\n * Starting from specific versions, Sablier contracts charge a small ETH fee when\n * recipients withdraw or claim tokens from streams and airdrops.\n *\n * @param release - The release object or `{ protocol, version }` pair to check\n * @returns true if the release charges fees\n * @see {@link https://docs.sablier.com/concepts/fees} for fee details\n * @example\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.3\" }) // true\n * isReleasePayable(\"airdrops\", \"v1.2\") // false\n * isReleasePayable(\"airdrops\", \"v1.3\") // true\n * isReleasePayable({ protocol: \"lockup\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"lockup\", version: \"v2.0\" }) // true\n * isReleasePayable(\"lockup\", \"v1.2\") // false\n * isReleasePayable(\"lockup\", \"v2.0\") // true\n * isReleasePayable({ protocol: \"flow\", version: \"v1.0\" }) // false\n * isReleasePayable({ protocol: \"flow\", version: \"v1.1\" }) // true\n * isReleasePayable(\"flow\", \"v1.0\") // false\n * isReleasePayable(\"flow\", \"v1.1\") // true\n */\nexport function isReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isReleasePayable(\n protocol: PayableEvmProtocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isReleasePayable(\n releaseOrProtocol: EvmReleaseReference | PayableEvmProtocol,\n version?: Sablier.EVM.Version\n): boolean {\n if (typeof releaseOrProtocol !== \"string\") {\n return isEvmReleasePayable(releaseOrProtocol);\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return isEvmReleasePayable(releaseOrProtocol, version);\n}\n\n/**\n * Truncate an Ethereum or Solana address for display purposes.\n * Automatically routes to the appropriate typed function based on address format.\n *\n * @param address - The address to truncate (Ethereum 0x-prefixed or Solana base58)\n * @param options - Optional truncation options with start and end character counts (default: 4 each)\n * @returns Truncated address in format \"0xcafe...beef\" or \"DYw8...NSKK\" or original if too short\n * @example\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateAddress(\"DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK\") // \"DYw8...NSKK\"\n * truncateAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateAddress(address: string, options?: TruncateAddressOptions): string {\n return address.startsWith(\"0x\")\n ? truncateEvmAddress(address as Sablier.EVM.Address, options)\n : truncateSolanaAddress(address, options);\n}\n\n/**\n * Convenience alias for {@link truncateAddress}.\n * Also suitable for truncating arbitrary hex strings, not just addresses.\n */\nexport const truncate = truncateAddress;\n\n/**\n * Resolves a stream/airdrop entity ID for use with Sablier indexers.\n * Automatically routes to EVM or Solana based on chain ID.\n *\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract/program alias (e.g., \"LL2\", \"LK2\", \"FL2\" for EVM; \"LL\" for Solana)\n * @param opts.chainId - Chain ID (EVM chains or Solana chains: 900000010, 900000020)\n * @param opts.tokenId - Stream/airdrop token ID\n * @param opts.protocol - Optional protocol to disambiguate aliases\n * @returns Stream ID in format \"0xabc...-1-123\" (EVM) or \"DYw8jC...-900000010-123\" (Solana)\n * @example\n * // EVM\n * resolveStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n *\n * // Solana\n * resolveStreamId({ alias: \"LL\", chainId: 900000010, tokenId: 456n })\n * // => \"DYw8jC...-900000010-456\"\n */\nexport function resolveStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol | Sablier.Solana.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n const isSolanaChain = SOLANA_CHAIN_IDS.has(chainId);\n\n // Validate protocol/chain compatibility\n if (protocol && isSolanaChain && !MULTI_ECOSYSTEM_PROTOCOLS.has(protocol as EvmProtocol)) {\n throw new Error(\n `Sablier SDK: Protocol \"${protocol}\" is EVM-only and not valid for Solana chain ${chainId}`\n );\n }\n\n if (isSolanaChain) {\n return resolveSolanaStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.Solana.Protocol,\n tokenId,\n });\n }\n\n return resolveEvmStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.EVM.Protocol,\n tokenId,\n });\n}\n"]}
@@ -161,16 +161,11 @@ export function isEvmReleasePayable(releaseOrProtocol, version) {
161
161
  if (!isPayableEvmRelease(release)) {
162
162
  return false;
163
163
  }
164
- switch (release.protocol) {
165
- case Protocol.Airdrops:
166
- return evmReleaseFeatures[Protocol.Airdrops][release.version].payable;
167
- case Protocol.Flow:
168
- return evmReleaseFeatures[Protocol.Flow][release.version].payable;
169
- case Protocol.Lockup:
170
- return evmReleaseFeatures[Protocol.Lockup][release.version].payable;
171
- default:
172
- return false;
164
+ const registry = evmReleaseFeatures[release.protocol];
165
+ if (!(release.version in registry)) {
166
+ return false;
173
167
  }
168
+ return registry[release.version].payable;
174
169
  }
175
170
  export function supportsLockupBatch(version) {
176
171
  return getLockupReleaseFeatures(version)?.batch ?? false;
@@ -1 +1 @@
1
- {"version":3,"file":"features.js","sourceRoot":"","sources":["../../../../src/evm/releases/features.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqDvD,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC1E,UAAU,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAsD,CAAC,CAAC;AAmBhG,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACnB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3E,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3E,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;QAC1E,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAA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AC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * @file Canonical capability registry for every shipped EVM release.\n *\n * Release builders attach these feature bags to exported release objects, and\n * helper functions read from the same registry so version-dependent behavior\n * stays defined in one place.\n */\nimport { Protocol, Version } from \"@/src/evm/enums.js\";\nimport type { Sablier } from \"@/src/types.js\";\n\n/* -------------------------------------------------------------------------- */\n/* TYPES */\n/* -------------------------------------------------------------------------- */\n\nexport type EvmReleaseVersionByProtocol = {\n airdrops: Sablier.EVM.Version.Airdrops;\n bob: Sablier.EVM.Version.Bob;\n flow: Sablier.EVM.Version.Flow;\n legacy: Sablier.EVM.Version.Legacy;\n lockup: Sablier.EVM.Version.Lockup;\n};\n\nexport type EvmReleaseFeatureSetByProtocol = {\n airdrops: Sablier.EVM.AirdropsReleaseFeatures;\n bob: Sablier.EVM.EmptyReleaseFeatures;\n flow: Sablier.EVM.FlowReleaseFeatures;\n legacy: Sablier.EVM.EmptyReleaseFeatures;\n lockup: Sablier.EVM.LockupReleaseFeatures;\n};\n\ntype EvmReleaseFeatureRegistry = {\n [TProtocol in keyof EvmReleaseVersionByProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n EvmReleaseFeatureSetByProtocol[TProtocol]\n >;\n};\n\nexport type ReleaseFeaturesForProtocol<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolFeatureSet<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolWithBooleanFeature<TFeature extends PropertyKey> = {\n [TProtocol in keyof EvmReleaseFeatureSetByProtocol]: ProtocolFeatureSet<TProtocol> extends Record<\n TFeature,\n boolean\n >\n ? TProtocol\n : never;\n}[keyof EvmReleaseFeatureSetByProtocol];\n\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\ntype PayableEvmReleaseReference = {\n [TProtocol in PayableEvmProtocol]: {\n protocol: TProtocol;\n version: EvmReleaseVersionByProtocol[TProtocol];\n };\n}[PayableEvmProtocol];\n\nfunction deepFreeze<T>(value: T): T {\n if (typeof value !== \"object\" || value === null || Object.isFrozen(value)) {\n return value;\n }\n\n for (const nestedValue of Object.values(value as Record<string, unknown>)) {\n deepFreeze(nestedValue);\n }\n\n return Object.freeze(value);\n}\n\nconst emptyReleaseFeatures = deepFreeze({} as const satisfies Sablier.EVM.EmptyReleaseFeatures);\n\n/**\n * Protocol/version feature matrix used by both release resolvers and public helpers.\n *\n * Feature glossary:\n * - `claimTo`: Airdrops campaigns can claim to a third-party recipient address.\n * - `sponsor`: Airdrops campaigns can receive sponsor funding after deployment.\n * - `payable`: The release charges native-token fees on supported claim, withdraw, or create flows.\n * - `legacyAbi`: Lockup still uses the pre-unified split ABI layout instead of the consolidated contract surface.\n * - `batch`: Lockup exposes dedicated batch entrypoints for creating or managing multiple streams in one transaction.\n * - `prbProxy`: Lockup integrates with PRBProxy for proxy-based execution.\n * - `shape`: Lockup stores the stream shape as an on-chain parameter.\n * - `minFee`: Flow or Lockup exposes an on-chain minimum fee in wei via `minFeeWei`.\n *\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/airdrops/CHANGELOG.md Airdrops changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/lockup/CHANGELOG.md Lockup changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/flow/CHANGELOG.md Flow changelog}\n */\nexport const evmReleaseFeatures = deepFreeze({\n [Protocol.Airdrops]: {\n [Version.Airdrops.V1_1]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_2]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_3]: { claimTo: false, payable: true, sponsor: false },\n [Version.Airdrops.V2_0]: { claimTo: true, payable: true, sponsor: false },\n [Version.Airdrops.V3_0]: { claimTo: true, payable: true, sponsor: true },\n },\n [Protocol.Bob]: {\n [Version.Bob.V1_0]: emptyReleaseFeatures,\n },\n [Protocol.Flow]: {\n [Version.Flow.V1_0]: { minFee: false, payable: false },\n [Version.Flow.V1_1]: { minFee: false, payable: true },\n [Version.Flow.V2_0]: { minFee: true, payable: true },\n [Version.Flow.V3_0]: { minFee: true, payable: true },\n },\n [Protocol.Legacy]: {\n [Version.Legacy.V1_0]: emptyReleaseFeatures,\n [Version.Legacy.V1_1]: emptyReleaseFeatures,\n },\n [Protocol.Lockup]: {\n [Version.Lockup.V1_0]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: true,\n shape: false,\n },\n [Version.Lockup.V1_1]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V1_2]: {\n batch: false,\n legacyAbi: false,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V2_0]: {\n batch: true,\n legacyAbi: false,\n minFee: false,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V3_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V4_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n },\n} as const satisfies EvmReleaseFeatureRegistry);\n\nexport type PayableEvmProtocol = ProtocolWithBooleanFeature<\"payable\">;\n\n/* -------------------------------------------------------------------------- */\n/* PRIVATE HELPERS */\n/* -------------------------------------------------------------------------- */\n\nconst evmReleaseFeatureRegistry: EvmReleaseFeatureRegistry = evmReleaseFeatures;\n\ntype PayableReleaseFeatureRegistry = {\n [TProtocol in PayableEvmProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n Pick<ProtocolFeatureSet<TProtocol>, \"payable\">\n >;\n};\n\nconst payableReleaseFeatureRegistry = deepFreeze({\n [Protocol.Airdrops]: evmReleaseFeatures[Protocol.Airdrops],\n [Protocol.Flow]: evmReleaseFeatures[Protocol.Flow],\n [Protocol.Lockup]: evmReleaseFeatures[Protocol.Lockup],\n} satisfies PayableReleaseFeatureRegistry);\n\n/**\n * Narrows protocol checks for helpers that only apply to fee-charging releases.\n */\nfunction isPayableEvmProtocol(protocol: Sablier.EVM.Protocol): protocol is PayableEvmProtocol {\n return protocol in payableReleaseFeatureRegistry;\n}\n\n/**\n * Narrows a release descriptor to protocols whose feature bag includes a payable flag.\n */\nfunction isPayableEvmRelease(release: EvmReleaseReference): release is PayableEvmReleaseReference {\n return isPayableEvmProtocol(release.protocol);\n}\n\n/**\n * Normalizes the supported payable helper overloads to the canonical release shape.\n */\nfunction normalizePayableReleaseInput(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): EvmReleaseReference {\n if (typeof releaseOrProtocol !== \"string\") {\n return releaseOrProtocol;\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return { protocol: releaseOrProtocol, version };\n}\n\n/* -------------------------------------------------------------------------- */\n/* FEATURES */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Reads the airdrops capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Airdrops protocol.\n */\nexport function getAirdropsReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.AirdropsReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Airdrops];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Airdrops];\n}\n\n/**\n * Returns the protocol-specific feature bag for a single EVM release.\n */\nexport function getEvmReleaseFeatures<TProtocol extends keyof EvmReleaseFeatureSetByProtocol>(\n protocol: TProtocol,\n version: EvmReleaseVersionByProtocol[TProtocol]\n): ReleaseFeaturesForProtocol<TProtocol> {\n return evmReleaseFeatureRegistry[protocol][version] as ReleaseFeaturesForProtocol<TProtocol>;\n}\n\n/**\n * Reads the flow capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Flow protocol.\n */\nexport function getFlowReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.FlowReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Flow];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Flow];\n}\n\n/**\n * Reads the lockup capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Lockup protocol.\n */\nexport function getLockupReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.LockupReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Lockup];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Lockup];\n}\n\n/**\n * Returns whether the airdrops release supports the `claimTo` function for claiming to a third-party address.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasClaimTo(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.claimTo ?? false;\n}\n\n/**\n * Returns whether the airdrops release supports sponsor-driven claims.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasSponsor(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.sponsor ?? false;\n}\n\n/**\n * Returns whether a Flow or Lockup release exposes an on-chain minimum fee in wei.\n */\nexport function hasOnchainMinFee(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function hasOnchainMinFee(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function hasOnchainMinFee(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n let release: EvmReleaseReference;\n\n if (typeof releaseOrProtocol === \"string\") {\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for hasOnchainMinFee(protocol, version)');\n }\n\n release = { protocol: releaseOrProtocol, version };\n } else {\n release = releaseOrProtocol;\n }\n\n switch (release.protocol) {\n case Protocol.Flow:\n return getFlowReleaseFeatures(release.version)?.minFee ?? false;\n case Protocol.Lockup:\n return getLockupReleaseFeatures(release.version)?.minFee ?? false;\n default:\n return false;\n }\n}\n\n/**\n * Returns whether the lockup release uses the split ABI layout.\n * Returns `false` for non-Lockup versions.\n */\nexport function hasSplitLockupArchitecture(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.legacyAbi ?? false;\n}\n\n/** @deprecated Use {@link hasSplitLockupArchitecture} instead. */\nexport const usesLockupSplit = hasSplitLockupArchitecture;\n\n/**\n * Returns whether a release charges native-token fees on claim or withdraw operations.\n */\nexport function isEvmReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isEvmReleasePayable(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isEvmReleasePayable(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n const release = normalizePayableReleaseInput(releaseOrProtocol, version);\n\n if (!isPayableEvmRelease(release)) {\n return false;\n }\n\n switch (release.protocol) {\n case Protocol.Airdrops:\n return evmReleaseFeatures[Protocol.Airdrops][release.version].payable;\n case Protocol.Flow:\n return evmReleaseFeatures[Protocol.Flow][release.version].payable;\n case Protocol.Lockup:\n return evmReleaseFeatures[Protocol.Lockup][release.version].payable;\n default:\n return false;\n }\n}\n\n/**\n * Returns whether the lockup release exposes batch create or withdraw flows.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupBatch(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.batch ?? false;\n}\n\n/**\n * Returns whether the lockup release integrates with PRBProxy.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupPrbProxy(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.prbProxy ?? false;\n}\n\n/**\n * Returns whether the lockup release stores shape as an on-chain parameter.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupShape(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.shape ?? false;\n}\n"]}
1
+ {"version":3,"file":"features.js","sourceRoot":"","sources":["../../../../src/evm/releases/features.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqDvD,SAAS,UAAU,CAAI,KAAQ;IAC7B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,MAAM,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,KAAgC,CAAC,EAAE,CAAC;QAC1E,UAAU,CAAC,WAAW,CAAC,CAAC;IAC1B,CAAC;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAsD,CAAC,CAAC;AAmBhG,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACnB,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3E,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3E,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;QAC1E,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,EAA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ACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC;AAMD,MAAM,UAAU,0BAA0B,CAAC,OAA4B;IACrE,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,SAAS,IAAI,KAAK,CAAC;AAC/D,CAAC;AAGD,MAAM,CAAC,MAAM,eAAe,GAAG,0BAA0B,CAAC;AAa1D,MAAM,UAAU,mBAAmB,CACjC,iBAA6D,EAC7D,OAA6B;IAE7B,MAAM,OAAO,GAAG,4BAA4B,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;IAEzE,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,QAAQ,GAAG,kBAAkB,CAAC,OAAO,CAAC,QAAQ,CAAyC,CAAC;IAC9F,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,IAAI,QAAQ,CAAC,EAAE,CAAC;QACnC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;AAC3C,CAAC;AAMD,MAAM,UAAU,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC;AAMD,MAAM,UAAU,sBAAsB,CAAC,OAA4B;IACjE,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC;AAC9D,CAAC;AAMD,MAAM,UAAU,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,wBAAwB,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,KAAK,CAAC;AAC3D,CAAC","sourcesContent":["/**\n * @file Canonical capability registry for every shipped EVM release.\n *\n * Release builders attach these feature bags to exported release objects, and\n * helper functions read from the same registry so version-dependent behavior\n * stays defined in one place.\n */\nimport { Protocol, Version } from \"@/src/evm/enums.js\";\nimport type { Sablier } from \"@/src/types.js\";\n\n/* -------------------------------------------------------------------------- */\n/* TYPES */\n/* -------------------------------------------------------------------------- */\n\nexport type EvmReleaseVersionByProtocol = {\n airdrops: Sablier.EVM.Version.Airdrops;\n bob: Sablier.EVM.Version.Bob;\n flow: Sablier.EVM.Version.Flow;\n legacy: Sablier.EVM.Version.Legacy;\n lockup: Sablier.EVM.Version.Lockup;\n};\n\nexport type EvmReleaseFeatureSetByProtocol = {\n airdrops: Sablier.EVM.AirdropsReleaseFeatures;\n bob: Sablier.EVM.EmptyReleaseFeatures;\n flow: Sablier.EVM.FlowReleaseFeatures;\n legacy: Sablier.EVM.EmptyReleaseFeatures;\n lockup: Sablier.EVM.LockupReleaseFeatures;\n};\n\ntype EvmReleaseFeatureRegistry = {\n [TProtocol in keyof EvmReleaseVersionByProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n EvmReleaseFeatureSetByProtocol[TProtocol]\n >;\n};\n\nexport type ReleaseFeaturesForProtocol<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolFeatureSet<TProtocol extends keyof EvmReleaseFeatureSetByProtocol> =\n EvmReleaseFeatureSetByProtocol[TProtocol];\n\ntype ProtocolWithBooleanFeature<TFeature extends PropertyKey> = {\n [TProtocol in keyof EvmReleaseFeatureSetByProtocol]: ProtocolFeatureSet<TProtocol> extends Record<\n TFeature,\n boolean\n >\n ? TProtocol\n : never;\n}[keyof EvmReleaseFeatureSetByProtocol];\n\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\ntype PayableEvmReleaseReference = {\n [TProtocol in PayableEvmProtocol]: {\n protocol: TProtocol;\n version: EvmReleaseVersionByProtocol[TProtocol];\n };\n}[PayableEvmProtocol];\n\nfunction deepFreeze<T>(value: T): T {\n if (typeof value !== \"object\" || value === null || Object.isFrozen(value)) {\n return value;\n }\n\n for (const nestedValue of Object.values(value as Record<string, unknown>)) {\n deepFreeze(nestedValue);\n }\n\n return Object.freeze(value);\n}\n\nconst emptyReleaseFeatures = deepFreeze({} as const satisfies Sablier.EVM.EmptyReleaseFeatures);\n\n/**\n * Protocol/version feature matrix used by both release resolvers and public helpers.\n *\n * Feature glossary:\n * - `claimTo`: Airdrops campaigns can claim to a third-party recipient address.\n * - `sponsor`: Airdrops campaigns can receive sponsor funding after deployment.\n * - `payable`: The release charges native-token fees on supported claim, withdraw, or create flows.\n * - `legacyAbi`: Lockup still uses the pre-unified split ABI layout instead of the consolidated contract surface.\n * - `batch`: Lockup exposes dedicated batch entrypoints for creating or managing multiple streams in one transaction.\n * - `prbProxy`: Lockup integrates with PRBProxy for proxy-based execution.\n * - `shape`: Lockup stores the stream shape as an on-chain parameter.\n * - `minFee`: Flow or Lockup exposes an on-chain minimum fee in wei via `minFeeWei`.\n *\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/airdrops/CHANGELOG.md Airdrops changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/lockup/CHANGELOG.md Lockup changelog}\n * @see {@link https://github.com/sablier-labs/evm-monorepo/blob/main/flow/CHANGELOG.md Flow changelog}\n */\nexport const evmReleaseFeatures = deepFreeze({\n [Protocol.Airdrops]: {\n [Version.Airdrops.V1_1]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_2]: { claimTo: false, payable: false, sponsor: false },\n [Version.Airdrops.V1_3]: { claimTo: false, payable: true, sponsor: false },\n [Version.Airdrops.V2_0]: { claimTo: true, payable: true, sponsor: false },\n [Version.Airdrops.V3_0]: { claimTo: true, payable: true, sponsor: true },\n },\n [Protocol.Bob]: {\n [Version.Bob.V1_0]: emptyReleaseFeatures,\n },\n [Protocol.Flow]: {\n [Version.Flow.V1_0]: { minFee: false, payable: false },\n [Version.Flow.V1_1]: { minFee: false, payable: true },\n [Version.Flow.V2_0]: { minFee: true, payable: true },\n [Version.Flow.V3_0]: { minFee: true, payable: true },\n },\n [Protocol.Legacy]: {\n [Version.Legacy.V1_0]: emptyReleaseFeatures,\n [Version.Legacy.V1_1]: emptyReleaseFeatures,\n },\n [Protocol.Lockup]: {\n [Version.Lockup.V1_0]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: true,\n shape: false,\n },\n [Version.Lockup.V1_1]: {\n batch: false,\n legacyAbi: true,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V1_2]: {\n batch: false,\n legacyAbi: false,\n minFee: false,\n payable: false,\n prbProxy: false,\n shape: false,\n },\n [Version.Lockup.V2_0]: {\n batch: true,\n legacyAbi: false,\n minFee: false,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V3_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n [Version.Lockup.V4_0]: {\n batch: true,\n legacyAbi: false,\n minFee: true,\n payable: true,\n prbProxy: false,\n shape: true,\n },\n },\n} as const satisfies EvmReleaseFeatureRegistry);\n\nexport type PayableEvmProtocol = ProtocolWithBooleanFeature<\"payable\">;\n\n/* -------------------------------------------------------------------------- */\n/* PRIVATE HELPERS */\n/* -------------------------------------------------------------------------- */\n\nconst evmReleaseFeatureRegistry: EvmReleaseFeatureRegistry = evmReleaseFeatures;\n\ntype PayableReleaseFeatureRegistry = {\n [TProtocol in PayableEvmProtocol]: Record<\n EvmReleaseVersionByProtocol[TProtocol],\n Pick<ProtocolFeatureSet<TProtocol>, \"payable\">\n >;\n};\n\nconst payableReleaseFeatureRegistry = deepFreeze({\n [Protocol.Airdrops]: evmReleaseFeatures[Protocol.Airdrops],\n [Protocol.Flow]: evmReleaseFeatures[Protocol.Flow],\n [Protocol.Lockup]: evmReleaseFeatures[Protocol.Lockup],\n} satisfies PayableReleaseFeatureRegistry);\n\n/**\n * Narrows protocol checks for helpers that only apply to fee-charging releases.\n */\nfunction isPayableEvmProtocol(protocol: Sablier.EVM.Protocol): protocol is PayableEvmProtocol {\n return protocol in payableReleaseFeatureRegistry;\n}\n\n/**\n * Narrows a release descriptor to protocols whose feature bag includes a payable flag.\n */\nfunction isPayableEvmRelease(release: EvmReleaseReference): release is PayableEvmReleaseReference {\n return isPayableEvmProtocol(release.protocol);\n}\n\n/**\n * Normalizes the supported payable helper overloads to the canonical release shape.\n */\nfunction normalizePayableReleaseInput(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): EvmReleaseReference {\n if (typeof releaseOrProtocol !== \"string\") {\n return releaseOrProtocol;\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return { protocol: releaseOrProtocol, version };\n}\n\n/* -------------------------------------------------------------------------- */\n/* FEATURES */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Reads the airdrops capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Airdrops protocol.\n */\nexport function getAirdropsReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.AirdropsReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Airdrops];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Airdrops];\n}\n\n/**\n * Returns the protocol-specific feature bag for a single EVM release.\n */\nexport function getEvmReleaseFeatures<TProtocol extends keyof EvmReleaseFeatureSetByProtocol>(\n protocol: TProtocol,\n version: EvmReleaseVersionByProtocol[TProtocol]\n): ReleaseFeaturesForProtocol<TProtocol> {\n return evmReleaseFeatureRegistry[protocol][version] as ReleaseFeaturesForProtocol<TProtocol>;\n}\n\n/**\n * Reads the flow capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Flow protocol.\n */\nexport function getFlowReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.FlowReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Flow];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Flow];\n}\n\n/**\n * Reads the lockup capability matrix for one released version.\n * Returns `undefined` when the version does not belong to the Lockup protocol.\n */\nexport function getLockupReleaseFeatures(\n version: Sablier.EVM.Version\n): Sablier.EVM.LockupReleaseFeatures | undefined {\n const registry = evmReleaseFeatures[Protocol.Lockup];\n if (!(version in registry)) {\n return undefined;\n }\n return registry[version as Sablier.EVM.Version.Lockup];\n}\n\n/**\n * Returns whether the airdrops release supports the `claimTo` function for claiming to a third-party address.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasClaimTo(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.claimTo ?? false;\n}\n\n/**\n * Returns whether the airdrops release supports sponsor-driven claims.\n * Returns `false` for non-Airdrops versions.\n */\nexport function hasSponsor(version: Sablier.EVM.Version): boolean {\n return getAirdropsReleaseFeatures(version)?.sponsor ?? false;\n}\n\n/**\n * Returns whether a Flow or Lockup release exposes an on-chain minimum fee in wei.\n */\nexport function hasOnchainMinFee(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function hasOnchainMinFee(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function hasOnchainMinFee(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n let release: EvmReleaseReference;\n\n if (typeof releaseOrProtocol === \"string\") {\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for hasOnchainMinFee(protocol, version)');\n }\n\n release = { protocol: releaseOrProtocol, version };\n } else {\n release = releaseOrProtocol;\n }\n\n switch (release.protocol) {\n case Protocol.Flow:\n return getFlowReleaseFeatures(release.version)?.minFee ?? false;\n case Protocol.Lockup:\n return getLockupReleaseFeatures(release.version)?.minFee ?? false;\n default:\n return false;\n }\n}\n\n/**\n * Returns whether the lockup release uses the split ABI layout.\n * Returns `false` for non-Lockup versions.\n */\nexport function hasSplitLockupArchitecture(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.legacyAbi ?? false;\n}\n\n/** @deprecated Use {@link hasSplitLockupArchitecture} instead. */\nexport const usesLockupSplit = hasSplitLockupArchitecture;\n\n/**\n * Returns whether a release charges native-token fees on claim or withdraw operations.\n */\nexport function isEvmReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isEvmReleasePayable(\n protocol: Sablier.EVM.Protocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isEvmReleasePayable(\n releaseOrProtocol: EvmReleaseReference | Sablier.EVM.Protocol,\n version?: Sablier.EVM.Version\n): boolean {\n const release = normalizePayableReleaseInput(releaseOrProtocol, version);\n\n if (!isPayableEvmRelease(release)) {\n return false;\n }\n\n const registry = evmReleaseFeatures[release.protocol] as Record<string, { payable: boolean }>;\n if (!(release.version in registry)) {\n return false;\n }\n\n return registry[release.version].payable;\n}\n\n/**\n * Returns whether the lockup release exposes batch create or withdraw flows.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupBatch(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.batch ?? false;\n}\n\n/**\n * Returns whether the lockup release integrates with PRBProxy.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupPrbProxy(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.prbProxy ?? false;\n}\n\n/**\n * Returns whether the lockup release stores shape as an on-chain parameter.\n * Returns `false` for non-Lockup versions.\n */\nexport function supportsLockupShape(version: Sablier.EVM.Version): boolean {\n return getLockupReleaseFeatures(version)?.shape ?? false;\n}\n"]}
@@ -1,2 +1,3 @@
1
1
  export * from "./data.js";
2
+ export * from "./features.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/evm/releases/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC","sourcesContent":["export * from \"./data.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/evm/releases/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./data.js\";\nexport * from \"./features.js\";\n"]}
@@ -2,7 +2,6 @@ import { Protocol as EvmProtocol } from "./evm/enums.js";
2
2
  import { isEvmReleasePayable, resolveEvmStreamId, truncateEvmAddress } from "./evm/helpers.js";
3
3
  import { SOLANA_CHAIN_IDS } from "./solana/chains/chains.js";
4
4
  import { resolveSolanaStreamId, truncateSolanaAddress } from "./solana/helpers.js";
5
- export * from "./evm/helpers.js";
6
5
  export * from "./solana/helpers.js";
7
6
  const MULTI_ECOSYSTEM_PROTOCOLS = new Set([EvmProtocol.Airdrops, EvmProtocol.Lockup]);
8
7
  export function compareVersions(a, b) {
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAInF,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AAUpC,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAYtF,MAAM,UAAU,eAAe,CAAC,CAAU,EAAE,CAAU;IACpD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CA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EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IACnD,MAAM,aAAa,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAGpD,IAAI,QAAQ,IAAI,aAAa,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,QAAuB,CAAC,EAAE,CAAC;QACzF,MAAM,IAAI,KAAK,CACb,0BAA0B,QAAQ,gDAAgD,OAAO,EAAE,CAC5F,CAAC;IACJ,CAAC;IAED,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,qBAAqB,CAAC;YAC3B,KAAK;YACL,OAAO;YACP,QAAQ,EAAE,QAAmC;YAC7C,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAED,OAAO,kBAAkB,CAAC;QACxB,KAAK;QACL,OAAO;QACP,QAAQ,EAAE,QAAgC;QAC1C,OAAO;KACR,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { Protocol as EvmProtocol } from \"./evm/enums.js\";\nimport type { PayableEvmProtocol } from \"./evm/helpers.js\";\nimport { isEvmReleasePayable, resolveEvmStreamId, truncateEvmAddress } from \"./evm/helpers.js\";\nimport { SOLANA_CHAIN_IDS } from \"./solana/chains/chains.js\";\nimport { resolveSolanaStreamId, truncateSolanaAddress } from \"./solana/helpers.js\";\nimport type { Sablier, TruncateAddressOptions } from \"./types.js\";\n\n// Re-export platform-specific helpers\nexport * from \"./evm/helpers.js\";\nexport * from \"./solana/helpers.js\";\n\n// Re-export shared types\nexport type { TruncateAddressOptions } from \"./types.js\";\n\n/** Version type supporting both EVM and Solana protocols */\ntype Version = Sablier.EVM.Version | Sablier.Solana.Version;\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\n\n/** Protocols that exist on both EVM and Solana ecosystems */\nconst MULTI_ECOSYSTEM_PROTOCOLS = new Set([EvmProtocol.Airdrops, EvmProtocol.Lockup]);\n\n/**\n * Compare two semantic version strings.\n * @param a - First version string (e.g., \"v1.0\")\n * @param b - Second version string (e.g., \"v1.0\")\n * @returns -1 if a < b, 0 if a === b, 1 if a > b\n * @example\n * compareVersions(\"v1.0\", \"v2.0\") // -1\n * compareVersions(\"v2.0\", \"v1.0\") // 1\n * compareVersions(\"v1.1\", \"v1.1\") // 0\n */\nexport function compareVersions(a: Version, b: Version): number {\n const [aMajor, aMinor] = a.slice(1).split(\".\").map(Number);\n const [bMajor, bMinor] = b.slice(1).split(\".\").map(Number);\n\n if (aMajor !== bMajor) {\n return aMajor - bMajor;\n }\n return aMinor - bMinor;\n}\n\n/**\n * Check if a version comes before another chronologically.\n * @param version - The version to check\n * @param before - The reference version to compare against\n * @returns true if version comes before the reference version\n * @example\n * isVersionBefore(\"v1.0\", \"v2.0\") // true\n * isVersionBefore(\"v2.0\", \"v1.0\") // false\n */\nexport function isVersionBefore(version: Version, before: Version): boolean {\n return compareVersions(version, before) < 0;\n}\n\n/**\n * Check if a version comes after another chronologically.\n * @param version - The version to check\n * @param after - The reference version to compare against\n * @returns true if version comes after the reference version\n * @example\n * isVersionAfter(\"v2.0\", \"v1.0\") // true\n * isVersionAfter(\"v1.0\", \"v2.0\") // false\n */\nexport function isVersionAfter(version: Version, after: Version): boolean {\n return compareVersions(version, after) > 0;\n}\n\n/**\n * Check if a protocol release charges ETH fees on withdraw/claim operations.\n *\n * Starting from specific versions, Sablier contracts charge a small ETH fee when\n * recipients withdraw or claim tokens from streams and airdrops.\n *\n * @param release - The release object or `{ protocol, version }` pair to check\n * @returns true if the release charges fees\n * @see {@link https://docs.sablier.com/concepts/fees} for fee details\n * @example\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.3\" }) // true\n * isReleasePayable(\"airdrops\", \"v1.2\") // false\n * isReleasePayable(\"airdrops\", \"v1.3\") // true\n * isReleasePayable({ protocol: \"lockup\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"lockup\", version: \"v2.0\" }) // true\n * isReleasePayable(\"lockup\", \"v1.2\") // false\n * isReleasePayable(\"lockup\", \"v2.0\") // true\n * isReleasePayable({ protocol: \"flow\", version: \"v1.0\" }) // false\n * isReleasePayable({ protocol: \"flow\", version: \"v1.1\" }) // true\n * isReleasePayable(\"flow\", \"v1.0\") // false\n * isReleasePayable(\"flow\", \"v1.1\") // true\n */\nexport function isReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isReleasePayable(\n protocol: PayableEvmProtocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isReleasePayable(\n releaseOrProtocol: EvmReleaseReference | PayableEvmProtocol,\n version?: Sablier.EVM.Version\n): boolean {\n if (typeof releaseOrProtocol !== \"string\") {\n return isEvmReleasePayable(releaseOrProtocol);\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return isEvmReleasePayable(releaseOrProtocol, version);\n}\n\n/**\n * Truncate an Ethereum or Solana address for display purposes.\n * Automatically routes to the appropriate typed function based on address format.\n *\n * @param address - The address to truncate (Ethereum 0x-prefixed or Solana base58)\n * @param options - Optional truncation options with start and end character counts (default: 4 each)\n * @returns Truncated address in format \"0xcafe...beef\" or \"DYw8...NSKK\" or original if too short\n * @example\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateAddress(\"DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK\") // \"DYw8...NSKK\"\n * truncateAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateAddress(address: string, options?: TruncateAddressOptions): string {\n return address.startsWith(\"0x\")\n ? truncateEvmAddress(address as Sablier.EVM.Address, options)\n : truncateSolanaAddress(address, options);\n}\n\n/**\n * Convenience alias for {@link truncateAddress}.\n * Also suitable for truncating arbitrary hex strings, not just addresses.\n */\nexport const truncate = truncateAddress;\n\n/**\n * Resolves a stream/airdrop entity ID for use with Sablier indexers.\n * Automatically routes to EVM or Solana based on chain ID.\n *\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract/program alias (e.g., \"LL2\", \"LK2\", \"FL2\" for EVM; \"LL\" for Solana)\n * @param opts.chainId - Chain ID (EVM chains or Solana chains: 900000010, 900000020)\n * @param opts.tokenId - Stream/airdrop token ID\n * @param opts.protocol - Optional protocol to disambiguate aliases\n * @returns Stream ID in format \"0xabc...-1-123\" (EVM) or \"DYw8jC...-900000010-123\" (Solana)\n * @example\n * // EVM\n * resolveStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n *\n * // Solana\n * resolveStreamId({ alias: \"LL\", chainId: 900000010, tokenId: 456n })\n * // => \"DYw8jC...-900000010-456\"\n */\nexport function resolveStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol | Sablier.Solana.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n const isSolanaChain = SOLANA_CHAIN_IDS.has(chainId);\n\n // Validate protocol/chain compatibility\n if (protocol && isSolanaChain && !MULTI_ECOSYSTEM_PROTOCOLS.has(protocol as EvmProtocol)) {\n throw new Error(\n `Sablier SDK: Protocol \"${protocol}\" is EVM-only and not valid for Solana chain ${chainId}`\n );\n }\n\n if (isSolanaChain) {\n return resolveSolanaStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.Solana.Protocol,\n tokenId,\n });\n }\n\n return resolveEvmStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.EVM.Protocol,\n tokenId,\n });\n}\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,WAAW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";\nimport { isEvmReleasePayable, resolveEvmStreamId, truncateEvmAddress } from \"./evm/helpers.js\";\nimport { SOLANA_CHAIN_IDS } from \"./solana/chains/chains.js\";\nimport { resolveSolanaStreamId, truncateSolanaAddress } from \"./solana/helpers.js\";\nimport type { Sablier, TruncateAddressOptions } from \"./types.js\";\n\n// Re-export platform-specific helpers. EVM helpers are surfaced from the\n// package root via `src/evm/index.ts`, so keep this barrel Solana-only to avoid\n// duplicate `export *` paths for the same EVM names at `sablier`.\nexport * from \"./solana/helpers.js\";\n\n// Re-export shared types\nexport type { TruncateAddressOptions } from \"./types.js\";\n\n/** Version type supporting both EVM and Solana protocols */\ntype Version = Sablier.EVM.Version | Sablier.Solana.Version;\ntype EvmReleaseReference = Pick<Sablier.EVM.Release, \"protocol\" | \"version\">;\n\n/** Protocols that exist on both EVM and Solana ecosystems */\nconst MULTI_ECOSYSTEM_PROTOCOLS = new Set([EvmProtocol.Airdrops, EvmProtocol.Lockup]);\n\n/**\n * Compare two semantic version strings.\n * @param a - First version string (e.g., \"v1.0\")\n * @param b - Second version string (e.g., \"v1.0\")\n * @returns -1 if a < b, 0 if a === b, 1 if a > b\n * @example\n * compareVersions(\"v1.0\", \"v2.0\") // -1\n * compareVersions(\"v2.0\", \"v1.0\") // 1\n * compareVersions(\"v1.1\", \"v1.1\") // 0\n */\nexport function compareVersions(a: Version, b: Version): number {\n const [aMajor, aMinor] = a.slice(1).split(\".\").map(Number);\n const [bMajor, bMinor] = b.slice(1).split(\".\").map(Number);\n\n if (aMajor !== bMajor) {\n return aMajor - bMajor;\n }\n return aMinor - bMinor;\n}\n\n/**\n * Check if a version comes before another chronologically.\n * @param version - The version to check\n * @param before - The reference version to compare against\n * @returns true if version comes before the reference version\n * @example\n * isVersionBefore(\"v1.0\", \"v2.0\") // true\n * isVersionBefore(\"v2.0\", \"v1.0\") // false\n */\nexport function isVersionBefore(version: Version, before: Version): boolean {\n return compareVersions(version, before) < 0;\n}\n\n/**\n * Check if a version comes after another chronologically.\n * @param version - The version to check\n * @param after - The reference version to compare against\n * @returns true if version comes after the reference version\n * @example\n * isVersionAfter(\"v2.0\", \"v1.0\") // true\n * isVersionAfter(\"v1.0\", \"v2.0\") // false\n */\nexport function isVersionAfter(version: Version, after: Version): boolean {\n return compareVersions(version, after) > 0;\n}\n\n/**\n * Check if a protocol release charges ETH fees on withdraw/claim operations.\n *\n * Starting from specific versions, Sablier contracts charge a small ETH fee when\n * recipients withdraw or claim tokens from streams and airdrops.\n *\n * @param release - The release object or `{ protocol, version }` pair to check\n * @returns true if the release charges fees\n * @see {@link https://docs.sablier.com/concepts/fees} for fee details\n * @example\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"airdrops\", version: \"v1.3\" }) // true\n * isReleasePayable(\"airdrops\", \"v1.2\") // false\n * isReleasePayable(\"airdrops\", \"v1.3\") // true\n * isReleasePayable({ protocol: \"lockup\", version: \"v1.2\" }) // false\n * isReleasePayable({ protocol: \"lockup\", version: \"v2.0\" }) // true\n * isReleasePayable(\"lockup\", \"v1.2\") // false\n * isReleasePayable(\"lockup\", \"v2.0\") // true\n * isReleasePayable({ protocol: \"flow\", version: \"v1.0\" }) // false\n * isReleasePayable({ protocol: \"flow\", version: \"v1.1\" }) // true\n * isReleasePayable(\"flow\", \"v1.0\") // false\n * isReleasePayable(\"flow\", \"v1.1\") // true\n */\nexport function isReleasePayable(release: EvmReleaseReference): boolean;\n/**\n * @deprecated Pass a release object instead. This overload will be removed in the next major version (v4).\n */\nexport function isReleasePayable(\n protocol: PayableEvmProtocol,\n version: Sablier.EVM.Version\n): boolean;\nexport function isReleasePayable(\n releaseOrProtocol: EvmReleaseReference | PayableEvmProtocol,\n version?: Sablier.EVM.Version\n): boolean {\n if (typeof releaseOrProtocol !== \"string\") {\n return isEvmReleasePayable(releaseOrProtocol);\n }\n\n if (!version) {\n throw new Error('Sablier SDK: Missing \"version\" for isEvmReleasePayable(protocol, version)');\n }\n\n return isEvmReleasePayable(releaseOrProtocol, version);\n}\n\n/**\n * Truncate an Ethereum or Solana address for display purposes.\n * Automatically routes to the appropriate typed function based on address format.\n *\n * @param address - The address to truncate (Ethereum 0x-prefixed or Solana base58)\n * @param options - Optional truncation options with start and end character counts (default: 4 each)\n * @returns Truncated address in format \"0xcafe...beef\" or \"DYw8...NSKK\" or original if too short\n * @example\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateAddress(\"DYw8jCTfwHNRJhhmFcbXvVDTqWMEVFBX6ZKUmG5CNSKK\") // \"DYw8...NSKK\"\n * truncateAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateAddress(address: string, options?: TruncateAddressOptions): string {\n return address.startsWith(\"0x\")\n ? truncateEvmAddress(address as Sablier.EVM.Address, options)\n : truncateSolanaAddress(address, options);\n}\n\n/**\n * Convenience alias for {@link truncateAddress}.\n * Also suitable for truncating arbitrary hex strings, not just addresses.\n */\nexport const truncate = truncateAddress;\n\n/**\n * Resolves a stream/airdrop entity ID for use with Sablier indexers.\n * Automatically routes to EVM or Solana based on chain ID.\n *\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract/program alias (e.g., \"LL2\", \"LK2\", \"FL2\" for EVM; \"LL\" for Solana)\n * @param opts.chainId - Chain ID (EVM chains or Solana chains: 900000010, 900000020)\n * @param opts.tokenId - Stream/airdrop token ID\n * @param opts.protocol - Optional protocol to disambiguate aliases\n * @returns Stream ID in format \"0xabc...-1-123\" (EVM) or \"DYw8jC...-900000010-123\" (Solana)\n * @example\n * // EVM\n * resolveStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n *\n * // Solana\n * resolveStreamId({ alias: \"LL\", chainId: 900000010, tokenId: 456n })\n * // => \"DYw8jC...-900000010-456\"\n */\nexport function resolveStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol | Sablier.Solana.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n const isSolanaChain = SOLANA_CHAIN_IDS.has(chainId);\n\n // Validate protocol/chain compatibility\n if (protocol && isSolanaChain && !MULTI_ECOSYSTEM_PROTOCOLS.has(protocol as EvmProtocol)) {\n throw new Error(\n `Sablier SDK: Protocol \"${protocol}\" is EVM-only and not valid for Solana chain ${chainId}`\n );\n }\n\n if (isSolanaChain) {\n return resolveSolanaStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.Solana.Protocol,\n tokenId,\n });\n }\n\n return resolveEvmStreamId({\n alias,\n chainId,\n protocol: protocol as Sablier.EVM.Protocol,\n tokenId,\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../../src/evm/releases/features.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM9C,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC;IACvC,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;IAC/B,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG;IAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;IAC9C,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;IACtC,IAAI,EAAE,OAAO,CAA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AC,QAAQ,EAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAC3B,OAAO,CAAC;AA+BX,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAEhF;AAGD,eAAO,MAAM,eAAe,mCAA6B,CAAC;AAK1D,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC;AAI3E,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,EAC9B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAC3B,OAAO,CAAC;AAuBX,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAEzE;AAMD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAE5E;AAMD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAEzE"}
@@ -1,2 +1,3 @@
1
1
  export * from "./data.js";
2
+ export * from "./features.js";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/evm/releases/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/evm/releases/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
@@ -1,6 +1,5 @@
1
1
  import type { PayableEvmProtocol } from "./evm/helpers.js";
2
2
  import type { Sablier, TruncateAddressOptions } from "./types.js";
3
- export * from "./evm/helpers.js";
4
3
  export * from "./solana/helpers.js";
5
4
  export type { TruncateAddressOptions } from "./types.js";
6
5
  type Version = Sablier.EVM.Version | Sablier.Solana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AkB,CAAC;AAuBxC,wBAAgB,eAAe,CAAC,IAAI,EAAE;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC;CAC3D,GAAG,MAAM,CA0BT"}
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "sideEffects": false,
8
8
  "types": "./dist/types/index.d.ts",
9
9
  "typings": "./dist/types/index.d.ts",
10
- "version": "3.7.2",
10
+ "version": "3.7.4",
11
11
  "type": "module",
12
12
  "author": {
13
13
  "name": "Sablier Labs Ltd",
@@ -100,6 +100,11 @@
100
100
  "import": "./dist/esm/evm/releases/index.js",
101
101
  "default": "./dist/cjs/evm/releases/index.js"
102
102
  },
103
+ "./evm/releases/features": {
104
+ "types": "./dist/types/evm/releases/features.d.ts",
105
+ "import": "./dist/esm/evm/releases/features.js",
106
+ "default": "./dist/cjs/evm/releases/features.js"
107
+ },
103
108
  "./evm/*": {
104
109
  "types": "./dist/types/evm/*/index.d.ts",
105
110
  "import": "./dist/esm/evm/*/index.js",