sablier 3.7.1 → 3.7.3

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.3]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.3
13
+ [3.7.2]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.2
12
14
  [3.7.1]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.1
13
15
  [3.7.0]: https://github.com/sablier-labs/sdk/releases/tag/v3.7.0
14
16
  [3.6.0]: https://github.com/sablier-labs/sdk/releases/tag/v3.6.0
@@ -44,6 +46,27 @@ The format is based on [Common Changelog](https://common-changelog.org/).
44
46
  [1.1.0]: https://github.com/sablier-labs/sdk/releases/tag/v1.1.0
45
47
  [1.0.0]: https://github.com/sablier-labs/sdk/releases/tag/v1.0.0
46
48
 
49
+ ## [3.7.3] - 2026-04-10
50
+
51
+ ### Fixed
52
+
53
+ - Fix root `sablier` release-feature helper exports for downstream type-checkers
54
+ ([`93947a7`](https://github.com/sablier-labs/sdk/commit/93947a7))
55
+ - Fix `sablier/evm/releases` and `sablier/evm/releases/features` package exports
56
+ ([`93947a7`](https://github.com/sablier-labs/sdk/commit/93947a7))
57
+
58
+ ## [3.7.2] - 2026-04-10
59
+
60
+ ### Added
61
+
62
+ - Add explicit subpath exports for EVM and Solana modules (`sablier/evm/chains`, `sablier/evm/helpers`,
63
+ `sablier/solana/chains`, etc.) ([`e4574ac`](https://github.com/sablier-labs/sdk/commit/e4574ac))
64
+
65
+ ### Fixed
66
+
67
+ - Fix EVM helpers barrel to use explicit named re-exports, improving type resolution for downstream consumers
68
+ ([`e4574ac`](https://github.com/sablier-labs/sdk/commit/e4574ac))
69
+
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E,GAAG,IAAI,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC;IAElC,IAAI,OAAO,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IAEpD,OAAO,GAAG,MAAM,MAAM,MAAM,EAAE,CAAC;AACjC,CAAC","sourcesContent":["import { getContractExplorerURL as getContractExplorerURLInternal } from \"@/src/internal/utils/explorer-url.js\";\nimport type { Sablier, TruncateAddressOptions } from \"@/src/types.js\";\nimport { getAliasCatalog } from \"./contracts/alias-catalog.js\";\nimport { Protocol } from \"./enums.js\";\n\nexport type {\n EvmReleaseFeatureSetByProtocol,\n EvmReleaseVersionByProtocol,\n PayableEvmProtocol,\n ReleaseFeaturesForProtocol,\n} from \"./releases/features.js\";\nexport {\n evmReleaseFeatures,\n getAirdropsReleaseFeatures,\n getEvmReleaseFeatures,\n getFlowReleaseFeatures,\n getLockupReleaseFeatures,\n hasClaimTo,\n hasOnchainMinFee,\n hasSplitLockupArchitecture,\n hasSponsor,\n isEvmReleasePayable,\n supportsLockupBatch,\n supportsLockupPrbProxy,\n supportsLockupShape,\n usesLockupSplit,\n} from \"./releases/features.js\";\n\n/**\n * Get the explorer URL for a contract. Compatible with Etherscan, Blockscout, etc.\n * @param explorerURL - The base explorer URL, e.g. https://etherscan.io\n * @param contractAddress - The contract object\n * @returns The explorer URL for the contract, e.g. https://etherscan.io/address/0x123...\n */\nexport function getContractExplorerURL(explorerURL: string, contractAddress: Sablier.EVM.Address) {\n return getContractExplorerURLInternal(explorerURL, contractAddress);\n}\n\n/**\n * Constructs a stream/airdrop entity ID for EVM chains in the format used by Sablier indexers.\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * The contract address is lowercased for normalization, as EVM addresses are case-insensitive.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\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\"\n * @example\n * resolveEvmStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n */\nexport function resolveEvmStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n\n const contract = resolveEvmContractByAlias({ alias, chainId, protocol });\n return `${contract.address.toLowerCase()}-${chainId}-${tokenId}`;\n}\n\n/**\n * Resolves an EVM contract by its alias from the alias catalog.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\n * @param opts.protocol - Optional protocol to disambiguate aliases that exist in multiple protocols\n * @returns The resolved contract\n * @throws Error if alias is not found or is ambiguous without protocol specified\n * @example\n * resolveEvmContractByAlias({ alias: \"LL2\", chainId: 1 })\n * // => { address: \"0x...\", name: \"SablierLockupLinear\", ... }\n */\nexport function resolveEvmContractByAlias(opts: {\n alias: string;\n chainId: number;\n protocol?: Sablier.EVM.Protocol;\n}): Sablier.EVM.Contract {\n const { alias, chainId, protocol } = opts;\n const aliasCatalog = getAliasCatalog();\n\n if (protocol) {\n const contract = aliasCatalog[protocol]?.[chainId]?.[alias];\n if (!contract) {\n throw new Error(\n `Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId} for protocol \"${protocol}\"`\n );\n }\n return contract;\n }\n\n const protocols: Sablier.EVM.Protocol[] = [\n Protocol.Airdrops,\n Protocol.Bob,\n Protocol.Flow,\n Protocol.Legacy,\n Protocol.Lockup,\n ];\n\n const matches = protocols\n .map((p) => aliasCatalog[p]?.[chainId]?.[alias])\n .filter(Boolean) as Sablier.EVM.Contract[];\n\n if (matches.length === 0) {\n throw new Error(`Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId}`);\n }\n\n if (matches.length > 1) {\n throw new Error(\n `Sablier SDK: Ambiguous EVM contract alias \"${alias}\" on chain ${chainId}; specify protocol`\n );\n }\n\n return matches[0];\n}\n\n/**\n * Truncate an Ethereum address for display purposes.\n * @param address - The Ethereum address to truncate (0x-prefixed)\n * @param options - Truncation options with start/end character counts (default: 4 each, must be >= 1)\n * @returns Truncated address in format \"0xcafe...beef\" or original if too short\n * @example\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 2, end: 6 }) // \"0x12...345678\"\n * truncateEvmAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateEvmAddress(\n address: Sablier.EVM.Address,\n options?: TruncateAddressOptions\n): string {\n if (!address) {\n return address;\n }\n\n const start = options?.start ?? 4;\n const end = options?.end ?? 4;\n const minLength = 2 + start + end;\n\n if (address.length <= minLength) {\n return address;\n }\n\n const prefix = address.slice(0, 2 + start);\n const suffix = end === 0 ? \"\" : address.slice(-end);\n\n return `${prefix}...${suffix}`;\n}\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/evm/helpers.ts"],"names":[],"mappings":";;;AAsCA,wDAEC;AAkBD,gDAUC;AAeD,8DAyCC;AAaD,gDAoBC;AAzJD,0EAAgH;AAEhH,mEAA+D;AAC/D,yCAAsC;AAQtC,sDAegC;AAd9B,iHAAA,kB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,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IAEpD,OAAO,GAAG,MAAM,MAAM,MAAM,EAAE,CAAC;AACjC,CAAC","sourcesContent":["// NOTE: evm/index.ts uses explicit named re-exports instead of `export *` for\n// this module. When adding or removing a public export here, mirror the change\n// in evm/index.ts. The \"barrel re-exports every helpers symbol\" test in\n// tests/package-exports.test.ts will catch any drift.\nimport { getContractExplorerURL as getContractExplorerURLInternal } from \"@/src/internal/utils/explorer-url.js\";\nimport type { Sablier, TruncateAddressOptions } from \"@/src/types.js\";\nimport { getAliasCatalog } from \"./contracts/alias-catalog.js\";\nimport { Protocol } from \"./enums.js\";\n\nexport type {\n EvmReleaseFeatureSetByProtocol,\n EvmReleaseVersionByProtocol,\n PayableEvmProtocol,\n ReleaseFeaturesForProtocol,\n} from \"./releases/features.js\";\nexport {\n evmReleaseFeatures,\n getAirdropsReleaseFeatures,\n getEvmReleaseFeatures,\n getFlowReleaseFeatures,\n getLockupReleaseFeatures,\n hasClaimTo,\n hasOnchainMinFee,\n hasSplitLockupArchitecture,\n hasSponsor,\n isEvmReleasePayable,\n supportsLockupBatch,\n supportsLockupPrbProxy,\n supportsLockupShape,\n usesLockupSplit,\n} from \"./releases/features.js\";\n\n/**\n * Get the explorer URL for a contract. Compatible with Etherscan, Blockscout, etc.\n * @param explorerURL - The base explorer URL, e.g. https://etherscan.io\n * @param contractAddress - The contract object\n * @returns The explorer URL for the contract, e.g. https://etherscan.io/address/0x123...\n */\nexport function getContractExplorerURL(explorerURL: string, contractAddress: Sablier.EVM.Address) {\n return getContractExplorerURLInternal(explorerURL, contractAddress);\n}\n\n/**\n * Constructs a stream/airdrop entity ID for EVM chains in the format used by Sablier indexers.\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * The contract address is lowercased for normalization, as EVM addresses are case-insensitive.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\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\"\n * @example\n * resolveEvmStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n */\nexport function resolveEvmStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n\n const contract = resolveEvmContractByAlias({ alias, chainId, protocol });\n return `${contract.address.toLowerCase()}-${chainId}-${tokenId}`;\n}\n\n/**\n * Resolves an EVM contract by its alias from the alias catalog.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\n * @param opts.protocol - Optional protocol to disambiguate aliases that exist in multiple protocols\n * @returns The resolved contract\n * @throws Error if alias is not found or is ambiguous without protocol specified\n * @example\n * resolveEvmContractByAlias({ alias: \"LL2\", chainId: 1 })\n * // => { address: \"0x...\", name: \"SablierLockupLinear\", ... }\n */\nexport function resolveEvmContractByAlias(opts: {\n alias: string;\n chainId: number;\n protocol?: Sablier.EVM.Protocol;\n}): Sablier.EVM.Contract {\n const { alias, chainId, protocol } = opts;\n const aliasCatalog = getAliasCatalog();\n\n if (protocol) {\n const contract = aliasCatalog[protocol]?.[chainId]?.[alias];\n if (!contract) {\n throw new Error(\n `Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId} for protocol \"${protocol}\"`\n );\n }\n return contract;\n }\n\n const protocols: Sablier.EVM.Protocol[] = [\n Protocol.Airdrops,\n Protocol.Bob,\n Protocol.Flow,\n Protocol.Legacy,\n Protocol.Lockup,\n ];\n\n const matches = protocols\n .map((p) => aliasCatalog[p]?.[chainId]?.[alias])\n .filter(Boolean) as Sablier.EVM.Contract[];\n\n if (matches.length === 0) {\n throw new Error(`Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId}`);\n }\n\n if (matches.length > 1) {\n throw new Error(\n `Sablier SDK: Ambiguous EVM contract alias \"${alias}\" on chain ${chainId}; specify protocol`\n );\n }\n\n return matches[0];\n}\n\n/**\n * Truncate an Ethereum address for display purposes.\n * @param address - The Ethereum address to truncate (0x-prefixed)\n * @param options - Truncation options with start/end character counts (default: 4 each, must be >= 1)\n * @returns Truncated address in format \"0xcafe...beef\" or original if too short\n * @example\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 2, end: 6 }) // \"0x12...345678\"\n * truncateEvmAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateEvmAddress(\n address: Sablier.EVM.Address,\n options?: TruncateAddressOptions\n): string {\n if (!address) {\n return address;\n }\n\n const start = options?.start ?? 4;\n const end = options?.end ?? 4;\n const minLength = 2 + start + end;\n\n if (address.length <= minLength) {\n return address;\n }\n\n const prefix = address.slice(0, 2 + start);\n const suffix = end === 0 ? \"\" : address.slice(-end);\n\n return `${prefix}...${suffix}`;\n}\n"]}
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.csv = exports.comptroller = exports.chains = void 0;
39
+ exports.usesLockupSplit = exports.truncateEvmAddress = exports.supportsLockupShape = exports.supportsLockupPrbProxy = exports.supportsLockupBatch = exports.resolveEvmStreamId = exports.resolveEvmContractByAlias = exports.isEvmReleasePayable = exports.hasSponsor = exports.hasSplitLockupArchitecture = exports.hasOnchainMinFee = exports.hasClaimTo = exports.getLockupReleaseFeatures = exports.getFlowReleaseFeatures = exports.getEvmReleaseFeatures = exports.getContractExplorerURL = exports.getAirdropsReleaseFeatures = exports.evmReleaseFeatures = exports.csv = exports.comptroller = exports.chains = void 0;
40
40
  var index_js_1 = require("./chains/index.js");
41
41
  Object.defineProperty(exports, "chains", { enumerable: true, get: function () { return index_js_1.chains; } });
42
42
  __exportStar(require("./compatibility.js"), exports);
@@ -45,6 +45,24 @@ Object.defineProperty(exports, "comptroller", { enumerable: true, get: function
45
45
  __exportStar(require("./contracts/index.js"), exports);
46
46
  exports.csv = __importStar(require("./csv/index.js"));
47
47
  __exportStar(require("./enums.js"), exports);
48
- __exportStar(require("./helpers.js"), exports);
48
+ var helpers_js_1 = require("./helpers.js");
49
+ Object.defineProperty(exports, "evmReleaseFeatures", { enumerable: true, get: function () { return helpers_js_1.evmReleaseFeatures; } });
50
+ Object.defineProperty(exports, "getAirdropsReleaseFeatures", { enumerable: true, get: function () { return helpers_js_1.getAirdropsReleaseFeatures; } });
51
+ Object.defineProperty(exports, "getContractExplorerURL", { enumerable: true, get: function () { return helpers_js_1.getContractExplorerURL; } });
52
+ Object.defineProperty(exports, "getEvmReleaseFeatures", { enumerable: true, get: function () { return helpers_js_1.getEvmReleaseFeatures; } });
53
+ Object.defineProperty(exports, "getFlowReleaseFeatures", { enumerable: true, get: function () { return helpers_js_1.getFlowReleaseFeatures; } });
54
+ Object.defineProperty(exports, "getLockupReleaseFeatures", { enumerable: true, get: function () { return helpers_js_1.getLockupReleaseFeatures; } });
55
+ Object.defineProperty(exports, "hasClaimTo", { enumerable: true, get: function () { return helpers_js_1.hasClaimTo; } });
56
+ Object.defineProperty(exports, "hasOnchainMinFee", { enumerable: true, get: function () { return helpers_js_1.hasOnchainMinFee; } });
57
+ Object.defineProperty(exports, "hasSplitLockupArchitecture", { enumerable: true, get: function () { return helpers_js_1.hasSplitLockupArchitecture; } });
58
+ Object.defineProperty(exports, "hasSponsor", { enumerable: true, get: function () { return helpers_js_1.hasSponsor; } });
59
+ Object.defineProperty(exports, "isEvmReleasePayable", { enumerable: true, get: function () { return helpers_js_1.isEvmReleasePayable; } });
60
+ Object.defineProperty(exports, "resolveEvmContractByAlias", { enumerable: true, get: function () { return helpers_js_1.resolveEvmContractByAlias; } });
61
+ Object.defineProperty(exports, "resolveEvmStreamId", { enumerable: true, get: function () { return helpers_js_1.resolveEvmStreamId; } });
62
+ Object.defineProperty(exports, "supportsLockupBatch", { enumerable: true, get: function () { return helpers_js_1.supportsLockupBatch; } });
63
+ Object.defineProperty(exports, "supportsLockupPrbProxy", { enumerable: true, get: function () { return helpers_js_1.supportsLockupPrbProxy; } });
64
+ Object.defineProperty(exports, "supportsLockupShape", { enumerable: true, get: function () { return helpers_js_1.supportsLockupShape; } });
65
+ Object.defineProperty(exports, "truncateEvmAddress", { enumerable: true, get: function () { return helpers_js_1.truncateEvmAddress; } });
66
+ Object.defineProperty(exports, "usesLockupSplit", { enumerable: true, get: function () { return helpers_js_1.usesLockupSplit; } });
49
67
  __exportStar(require("./releases/index.js"), exports);
50
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/evm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA2C;AAAlC,kGAAA,MAAM,OAAA;AACf,qDAAmC;AACnC,mDAAqD;AAA5C,uGAAA,WAAW,OAAA;AACpB,uDAAqC;AACrC,sDAAsC;AACtC,6CAA2B;AAC3B,+CAA6B;AAC7B,sDAAoC","sourcesContent":["export { chains } from \"./chains/index.js\";\nexport * from \"./compatibility.js\";\nexport { comptroller } from \"./comptroller/index.js\";\nexport * from \"./contracts/index.js\";\nexport * as csv from \"./csv/index.js\";\nexport * from \"./enums.js\";\nexport * from \"./helpers.js\";\nexport * from \"./releases/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/evm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA2C;AAAlC,kGAAA,MAAM,OAAA;AACf,qDAAmC;AACnC,mDAAqD;AAA5C,uGAAA,WAAW,OAAA;AACpB,uDAAqC;AACrC,sDAAsC;AACtC,6CAA2B;AAe3B,2CAmBsB;AAlBpB,gHAAA,kBAAkB,OAAA;AAClB,wHAAA,0BAA0B,OAAA;AAC1B,oHAAA,sBAAsB,OAAA;AACtB,mHAAA,qBAAqB,OAAA;AACrB,oHAAA,sBAAsB,OAAA;AACtB,sHAAA,wBAAwB,OAAA;AACxB,wGAAA,UAAU,OAAA;AACV,8GAAA,gBAAgB,OAAA;AAChB,wHAAA,0BAA0B,OAAA;AAC1B,wGAAA,UAAU,OAAA;AACV,iHAAA,mBAAmB,OAAA;AACnB,uHAAA,yBAAyB,OAAA;AACzB,gHAAA,kBAAkB,OAAA;AAClB,iHAAA,mBAAmB,OAAA;AACnB,oHAAA,sBAAsB,OAAA;AACtB,iHAAA,mBAAmB,OAAA;AACnB,gHAAA,kBAAkB,OAAA;AAClB,6GAAA,eAAe,OAAA;AAEjB,sDAAoC","sourcesContent":["export { chains } from \"./chains/index.js\";\nexport * from \"./compatibility.js\";\nexport { comptroller } from \"./comptroller/index.js\";\nexport * from \"./contracts/index.js\";\nexport * as csv from \"./csv/index.js\";\nexport * from \"./enums.js\";\n// Re-export the release-feature helpers explicitly from the `sablier/evm`\n// entrypoint instead of relying only on `export * from \"./helpers.js\"`.\n//\n// Some downstream type-checkers were able to see simple barrel exports such as\n// `enums`, but failed to resolve these helper names through the extra\n// `evm -> helpers -> releases/features` re-export hop. Listing them here keeps\n// the generated `dist/types/evm/index.d.ts` surface direct and easier for\n// consumers to resolve.\nexport type {\n EvmReleaseFeatureSetByProtocol,\n EvmReleaseVersionByProtocol,\n PayableEvmProtocol,\n ReleaseFeaturesForProtocol,\n} from \"./helpers.js\";\nexport {\n evmReleaseFeatures,\n getAirdropsReleaseFeatures,\n getContractExplorerURL,\n getEvmReleaseFeatures,\n getFlowReleaseFeatures,\n getLockupReleaseFeatures,\n hasClaimTo,\n hasOnchainMinFee,\n hasSplitLockupArchitecture,\n hasSponsor,\n isEvmReleasePayable,\n resolveEvmContractByAlias,\n resolveEvmStreamId,\n supportsLockupBatch,\n supportsLockupPrbProxy,\n supportsLockupShape,\n truncateEvmAddress,\n usesLockupSplit,\n} from \"./helpers.js\";\nexport * from \"./releases/index.js\";\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;AAiC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AAC;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/D,OAA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O,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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/evm/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,IAAI,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEhH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,UAA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,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;SAC/C,MAAM,CAAC,OAAO,CAA2B,CAAC;IAE7C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,4CAA4C,KAAK,cAAc,OAAO,EAAE,CAAC,CAAC;IAC5F,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,8CAA8C,KAAK,cAAc,OAAO,oBAAoB,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAaD,MAAM,UAAU,kBAAkB,CAChC,OAA4B,EAC5B,OAAgC;IAEhC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC;IAElC,IAAI,OAAO,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IAEpD,OAAO,GAAG,MAAM,MAAM,MAAM,EAAE,CAAC;AACjC,CAAC","sourcesContent":["import { getContractExplorerURL as getContractExplorerURLInternal } from \"@/src/internal/utils/explorer-url.js\";\nimport type { Sablier, TruncateAddressOptions } from \"@/src/types.js\";\nimport { getAliasCatalog } from \"./contracts/alias-catalog.js\";\nimport { Protocol } from \"./enums.js\";\n\nexport type {\n EvmReleaseFeatureSetByProtocol,\n EvmReleaseVersionByProtocol,\n PayableEvmProtocol,\n ReleaseFeaturesForProtocol,\n} from \"./releases/features.js\";\nexport {\n evmReleaseFeatures,\n getAirdropsReleaseFeatures,\n getEvmReleaseFeatures,\n getFlowReleaseFeatures,\n getLockupReleaseFeatures,\n hasClaimTo,\n hasOnchainMinFee,\n hasSplitLockupArchitecture,\n hasSponsor,\n isEvmReleasePayable,\n supportsLockupBatch,\n supportsLockupPrbProxy,\n supportsLockupShape,\n usesLockupSplit,\n} from \"./releases/features.js\";\n\n/**\n * Get the explorer URL for a contract. Compatible with Etherscan, Blockscout, etc.\n * @param explorerURL - The base explorer URL, e.g. https://etherscan.io\n * @param contractAddress - The contract object\n * @returns The explorer URL for the contract, e.g. https://etherscan.io/address/0x123...\n */\nexport function getContractExplorerURL(explorerURL: string, contractAddress: Sablier.EVM.Address) {\n return getContractExplorerURLInternal(explorerURL, contractAddress);\n}\n\n/**\n * Constructs a stream/airdrop entity ID for EVM chains in the format used by Sablier indexers.\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * The contract address is lowercased for normalization, as EVM addresses are case-insensitive.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\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\"\n * @example\n * resolveEvmStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n */\nexport function resolveEvmStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n\n const contract = resolveEvmContractByAlias({ alias, chainId, protocol });\n return `${contract.address.toLowerCase()}-${chainId}-${tokenId}`;\n}\n\n/**\n * Resolves an EVM contract by its alias from the alias catalog.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\n * @param opts.protocol - Optional protocol to disambiguate aliases that exist in multiple protocols\n * @returns The resolved contract\n * @throws Error if alias is not found or is ambiguous without protocol specified\n * @example\n * resolveEvmContractByAlias({ alias: \"LL2\", chainId: 1 })\n * // => { address: \"0x...\", name: \"SablierLockupLinear\", ... }\n */\nexport function resolveEvmContractByAlias(opts: {\n alias: string;\n chainId: number;\n protocol?: Sablier.EVM.Protocol;\n}): Sablier.EVM.Contract {\n const { alias, chainId, protocol } = opts;\n const aliasCatalog = getAliasCatalog();\n\n if (protocol) {\n const contract = aliasCatalog[protocol]?.[chainId]?.[alias];\n if (!contract) {\n throw new Error(\n `Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId} for protocol \"${protocol}\"`\n );\n }\n return contract;\n }\n\n const protocols: Sablier.EVM.Protocol[] = [\n Protocol.Airdrops,\n Protocol.Bob,\n Protocol.Flow,\n Protocol.Legacy,\n Protocol.Lockup,\n ];\n\n const matches = protocols\n .map((p) => aliasCatalog[p]?.[chainId]?.[alias])\n .filter(Boolean) as Sablier.EVM.Contract[];\n\n if (matches.length === 0) {\n throw new Error(`Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId}`);\n }\n\n if (matches.length > 1) {\n throw new Error(\n `Sablier SDK: Ambiguous EVM contract alias \"${alias}\" on chain ${chainId}; specify protocol`\n );\n }\n\n return matches[0];\n}\n\n/**\n * Truncate an Ethereum address for display purposes.\n * @param address - The Ethereum address to truncate (0x-prefixed)\n * @param options - Truncation options with start/end character counts (default: 4 each, must be >= 1)\n * @returns Truncated address in format \"0xcafe...beef\" or original if too short\n * @example\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 2, end: 6 }) // \"0x12...345678\"\n * truncateEvmAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateEvmAddress(\n address: Sablier.EVM.Address,\n options?: TruncateAddressOptions\n): string {\n if (!address) {\n return address;\n }\n\n const start = options?.start ?? 4;\n const end = options?.end ?? 4;\n const minLength = 2 + start + end;\n\n if (address.length <= minLength) {\n return address;\n }\n\n const prefix = address.slice(0, 2 + start);\n const suffix = end === 0 ? \"\" : address.slice(-end);\n\n return `${prefix}...${suffix}`;\n}\n"]}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/evm/helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,IAAI,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEhH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAQhC,MAAM,UAAU,sBAAsB,CAAC,WAAmB,EAAE,eAAoC;IAC9F,OAAO,8BAA8B,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AACtE,CAAC;AAkBD,MAAM,UAAU,kBAAkB,CAAC,IAKlC;IACC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAEnD,MAAM,QAAQ,GAAG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AK,cAAc,OAAO,oBAAoB,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAaD,MAAM,UAAU,kBAAkB,CAChC,OAA4B,EAC5B,OAAgC;IAEhC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC;IAElC,IAAI,OAAO,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAChC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IAEpD,OAAO,GAAG,MAAM,MAAM,MAAM,EAAE,CAAC;AACjC,CAAC","sourcesContent":["// NOTE: evm/index.ts uses explicit named re-exports instead of `export *` for\n// this module. When adding or removing a public export here, mirror the change\n// in evm/index.ts. The \"barrel re-exports every helpers symbol\" test in\n// tests/package-exports.test.ts will catch any drift.\nimport { getContractExplorerURL as getContractExplorerURLInternal } from \"@/src/internal/utils/explorer-url.js\";\nimport type { Sablier, TruncateAddressOptions } from \"@/src/types.js\";\nimport { getAliasCatalog } from \"./contracts/alias-catalog.js\";\nimport { Protocol } from \"./enums.js\";\n\nexport type {\n EvmReleaseFeatureSetByProtocol,\n EvmReleaseVersionByProtocol,\n PayableEvmProtocol,\n ReleaseFeaturesForProtocol,\n} from \"./releases/features.js\";\nexport {\n evmReleaseFeatures,\n getAirdropsReleaseFeatures,\n getEvmReleaseFeatures,\n getFlowReleaseFeatures,\n getLockupReleaseFeatures,\n hasClaimTo,\n hasOnchainMinFee,\n hasSplitLockupArchitecture,\n hasSponsor,\n isEvmReleasePayable,\n supportsLockupBatch,\n supportsLockupPrbProxy,\n supportsLockupShape,\n usesLockupSplit,\n} from \"./releases/features.js\";\n\n/**\n * Get the explorer URL for a contract. Compatible with Etherscan, Blockscout, etc.\n * @param explorerURL - The base explorer URL, e.g. https://etherscan.io\n * @param contractAddress - The contract object\n * @returns The explorer URL for the contract, e.g. https://etherscan.io/address/0x123...\n */\nexport function getContractExplorerURL(explorerURL: string, contractAddress: Sablier.EVM.Address) {\n return getContractExplorerURLInternal(explorerURL, contractAddress);\n}\n\n/**\n * Constructs a stream/airdrop entity ID for EVM chains in the format used by Sablier indexers.\n * Format: `{contractAddress}-{chainId}-{tokenId}`\n *\n * The contract address is lowercased for normalization, as EVM addresses are case-insensitive.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\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\"\n * @example\n * resolveEvmStreamId({ alias: \"LL2\", chainId: 1, tokenId: 123n })\n * // => \"0xabc...-1-123\"\n */\nexport function resolveEvmStreamId(opts: {\n alias: string;\n chainId: number;\n tokenId: bigint | string | number;\n protocol?: Sablier.EVM.Protocol;\n}): string {\n const { alias, chainId, tokenId, protocol } = opts;\n\n const contract = resolveEvmContractByAlias({ alias, chainId, protocol });\n return `${contract.address.toLowerCase()}-${chainId}-${tokenId}`;\n}\n\n/**\n * Resolves an EVM contract by its alias from the alias catalog.\n *\n * @param opts - Configuration object\n * @param opts.alias - Contract alias (e.g., \"LL2\", \"LK2\", \"FL2\")\n * @param opts.chainId - Chain ID where the contract is deployed\n * @param opts.protocol - Optional protocol to disambiguate aliases that exist in multiple protocols\n * @returns The resolved contract\n * @throws Error if alias is not found or is ambiguous without protocol specified\n * @example\n * resolveEvmContractByAlias({ alias: \"LL2\", chainId: 1 })\n * // => { address: \"0x...\", name: \"SablierLockupLinear\", ... }\n */\nexport function resolveEvmContractByAlias(opts: {\n alias: string;\n chainId: number;\n protocol?: Sablier.EVM.Protocol;\n}): Sablier.EVM.Contract {\n const { alias, chainId, protocol } = opts;\n const aliasCatalog = getAliasCatalog();\n\n if (protocol) {\n const contract = aliasCatalog[protocol]?.[chainId]?.[alias];\n if (!contract) {\n throw new Error(\n `Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId} for protocol \"${protocol}\"`\n );\n }\n return contract;\n }\n\n const protocols: Sablier.EVM.Protocol[] = [\n Protocol.Airdrops,\n Protocol.Bob,\n Protocol.Flow,\n Protocol.Legacy,\n Protocol.Lockup,\n ];\n\n const matches = protocols\n .map((p) => aliasCatalog[p]?.[chainId]?.[alias])\n .filter(Boolean) as Sablier.EVM.Contract[];\n\n if (matches.length === 0) {\n throw new Error(`Sablier SDK: Unknown EVM contract alias \"${alias}\" on chain ${chainId}`);\n }\n\n if (matches.length > 1) {\n throw new Error(\n `Sablier SDK: Ambiguous EVM contract alias \"${alias}\" on chain ${chainId}; specify protocol`\n );\n }\n\n return matches[0];\n}\n\n/**\n * Truncate an Ethereum address for display purposes.\n * @param address - The Ethereum address to truncate (0x-prefixed)\n * @param options - Truncation options with start/end character counts (default: 4 each, must be >= 1)\n * @returns Truncated address in format \"0xcafe...beef\" or original if too short\n * @example\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\") // \"0x1234...5678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 6, end: 6 }) // \"0x123456...345678\"\n * truncateEvmAddress(\"0x1234567890abcdef1234567890abcdef12345678\", { start: 2, end: 6 }) // \"0x12...345678\"\n * truncateEvmAddress(\"0x123\") // \"0x123\" (too short, returns original)\n */\nexport function truncateEvmAddress(\n address: Sablier.EVM.Address,\n options?: TruncateAddressOptions\n): string {\n if (!address) {\n return address;\n }\n\n const start = options?.start ?? 4;\n const end = options?.end ?? 4;\n const minLength = 2 + start + end;\n\n if (address.length <= minLength) {\n return address;\n }\n\n const prefix = address.slice(0, 2 + start);\n const suffix = end === 0 ? \"\" : address.slice(-end);\n\n return `${prefix}...${suffix}`;\n}\n"]}
@@ -4,6 +4,6 @@ export { comptroller } from "./comptroller/index.js";
4
4
  export * from "./contracts/index.js";
5
5
  export * as csv from "./csv/index.js";
6
6
  export * from "./enums.js";
7
- export * from "./helpers.js";
7
+ export { evmReleaseFeatures, getAirdropsReleaseFeatures, getContractExplorerURL, getEvmReleaseFeatures, getFlowReleaseFeatures, getLockupReleaseFeatures, hasClaimTo, hasOnchainMinFee, hasSplitLockupArchitecture, hasSponsor, isEvmReleasePayable, resolveEvmContractByAlias, resolveEvmStreamId, supportsLockupBatch, supportsLockupPrbProxy, supportsLockupShape, truncateEvmAddress, usesLockupSplit, } from "./helpers.js";
8
8
  export * from "./releases/index.js";
9
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/evm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC","sourcesContent":["export { chains } from \"./chains/index.js\";\nexport * from \"./compatibility.js\";\nexport { comptroller } from \"./comptroller/index.js\";\nexport * from \"./contracts/index.js\";\nexport * as csv from \"./csv/index.js\";\nexport * from \"./enums.js\";\nexport * from \"./helpers.js\";\nexport * from \"./releases/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/evm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,cAAc,YAAY,CAAC;AAe3B,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,UAAU,EACV,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,cAAc,qBAAqB,CAAC","sourcesContent":["export { chains } from \"./chains/index.js\";\nexport * from \"./compatibility.js\";\nexport { comptroller } from \"./comptroller/index.js\";\nexport * from \"./contracts/index.js\";\nexport * as csv from \"./csv/index.js\";\nexport * from \"./enums.js\";\n// Re-export the release-feature helpers explicitly from the `sablier/evm`\n// entrypoint instead of relying only on `export * from \"./helpers.js\"`.\n//\n// Some downstream type-checkers were able to see simple barrel exports such as\n// `enums`, but failed to resolve these helper names through the extra\n// `evm -> helpers -> releases/features` re-export hop. Listing them here keeps\n// the generated `dist/types/evm/index.d.ts` surface direct and easier for\n// consumers to resolve.\nexport type {\n EvmReleaseFeatureSetByProtocol,\n EvmReleaseVersionByProtocol,\n PayableEvmProtocol,\n ReleaseFeaturesForProtocol,\n} from \"./helpers.js\";\nexport {\n evmReleaseFeatures,\n getAirdropsReleaseFeatures,\n getContractExplorerURL,\n getEvmReleaseFeatures,\n getFlowReleaseFeatures,\n getLockupReleaseFeatures,\n hasClaimTo,\n hasOnchainMinFee,\n hasSplitLockupArchitecture,\n hasSponsor,\n isEvmReleasePayable,\n resolveEvmContractByAlias,\n resolveEvmStreamId,\n supportsLockupBatch,\n supportsLockupPrbProxy,\n supportsLockupShape,\n truncateEvmAddress,\n usesLockupSplit,\n} from \"./helpers.js\";\nexport * from \"./releases/index.js\";\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,qBA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ED,OAAO,mBAAmB,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC;AAeD,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,OAAgC;IAC/E,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC;QAC7B,CAAC,CAAC,kBAAkB,CAAC,OAA8B,EAAE,OAAO,CAAC;QAC7D,CAAC,CAAC,qBAAqB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAMD,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAC;AAuBxC,MAAM,UAAU,eAAe,CAAC,IAK/B;IACC,MAAM,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,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;AAMnF,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,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,MA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,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. 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":"helpers.d.ts","sourceRoot":"","sources":["../../../src/evm/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAItE,YAAY,EACV,8BAA8B,EAC9B,2BAA2B,EAC3B,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1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AChB,0BAA0B,EAC1B,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAQhC,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,UAE/F;AAkBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,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,CAAC;CACjC,GAAG,MAAM,CAKT;AAeD,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;CACjC,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAqCvB;AAaD,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EAC5B,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAiBR"}
@@ -4,6 +4,7 @@ export { comptroller } from "./comptroller/index.js";
4
4
  export * from "./contracts/index.js";
5
5
  export * as csv from "./csv/index.js";
6
6
  export * from "./enums.js";
7
- export * from "./helpers.js";
7
+ export type { EvmReleaseFeatureSetByProtocol, EvmReleaseVersionByProtocol, PayableEvmProtocol, ReleaseFeaturesForProtocol, } from "./helpers.js";
8
+ export { evmReleaseFeatures, getAirdropsReleaseFeatures, getContractExplorerURL, getEvmReleaseFeatures, getFlowReleaseFeatures, getLockupReleaseFeatures, hasClaimTo, hasOnchainMinFee, hasSplitLockupArchitecture, hasSponsor, isEvmReleasePayable, resolveEvmContractByAlias, resolveEvmStreamId, supportsLockupBatch, supportsLockupPrbProxy, supportsLockupShape, truncateEvmAddress, usesLockupSplit, } from "./helpers.js";
8
9
  export * from "./releases/index.js";
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/evm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/evm/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,gBAAgB,CAAC;AACtC,cAAc,YAAY,CAAC;AAS3B,YAAY,EACV,8BAA8B,EAC9B,2BAA2B,EAC3B,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,EACV,gBAAgB,EAChB,0BAA0B,EAC1B,UAAU,EACV,mBAAmB,EACnB,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,cAAc,qBAAqB,CAAC"}
@@ -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.Version;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI3D,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGlE,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AAGpC,YAAY,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAGzD,KAAK,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;AAC5D,KAAK,mBAAmB,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;AAe7E,wBAAgB,eAAe,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,MAAM,CAQ9D;AAWD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAE1E;AAWD,wBAAgB,cAAc,CAAC,OAAO,E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D;AAWD,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAE1E;AAWD,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAExE;AAyBD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC;AAIxE,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,GAC3B,OAAO,CAAC;AA6BX,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAIzF;AAMD,eAAO,MAAM,QAAQ,wBAAkB,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.1",
10
+ "version": "3.7.3",
11
11
  "type": "module",
12
12
  "author": {
13
13
  "name": "Sablier Labs Ltd",
@@ -60,6 +60,51 @@
60
60
  "import": "./dist/esm/evm/index.js",
61
61
  "default": "./dist/cjs/evm/index.js"
62
62
  },
63
+ "./evm/chains": {
64
+ "types": "./dist/types/evm/chains/index.d.ts",
65
+ "import": "./dist/esm/evm/chains/index.js",
66
+ "default": "./dist/cjs/evm/chains/index.js"
67
+ },
68
+ "./evm/compatibility": {
69
+ "types": "./dist/types/evm/compatibility.d.ts",
70
+ "import": "./dist/esm/evm/compatibility.js",
71
+ "default": "./dist/cjs/evm/compatibility.js"
72
+ },
73
+ "./evm/comptroller": {
74
+ "types": "./dist/types/evm/comptroller/index.d.ts",
75
+ "import": "./dist/esm/evm/comptroller/index.js",
76
+ "default": "./dist/cjs/evm/comptroller/index.js"
77
+ },
78
+ "./evm/contracts": {
79
+ "types": "./dist/types/evm/contracts/index.d.ts",
80
+ "import": "./dist/esm/evm/contracts/index.js",
81
+ "default": "./dist/cjs/evm/contracts/index.js"
82
+ },
83
+ "./evm/csv": {
84
+ "types": "./dist/types/evm/csv/index.d.ts",
85
+ "import": "./dist/esm/evm/csv/index.js",
86
+ "default": "./dist/cjs/evm/csv/index.js"
87
+ },
88
+ "./evm/enums": {
89
+ "types": "./dist/types/evm/enums.d.ts",
90
+ "import": "./dist/esm/evm/enums.js",
91
+ "default": "./dist/cjs/evm/enums.js"
92
+ },
93
+ "./evm/helpers": {
94
+ "types": "./dist/types/evm/helpers.d.ts",
95
+ "import": "./dist/esm/evm/helpers.js",
96
+ "default": "./dist/cjs/evm/helpers.js"
97
+ },
98
+ "./evm/releases": {
99
+ "types": "./dist/types/evm/releases/index.d.ts",
100
+ "import": "./dist/esm/evm/releases/index.js",
101
+ "default": "./dist/cjs/evm/releases/index.js"
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
+ },
63
108
  "./evm/*": {
64
109
  "types": "./dist/types/evm/*/index.d.ts",
65
110
  "import": "./dist/esm/evm/*/index.js",
@@ -70,6 +115,41 @@
70
115
  "import": "./dist/esm/solana/index.js",
71
116
  "default": "./dist/cjs/solana/index.js"
72
117
  },
118
+ "./solana/chains": {
119
+ "types": "./dist/types/solana/chains/index.d.ts",
120
+ "import": "./dist/esm/solana/chains/index.js",
121
+ "default": "./dist/cjs/solana/chains/index.js"
122
+ },
123
+ "./solana/compatibility": {
124
+ "types": "./dist/types/solana/compatibility.d.ts",
125
+ "import": "./dist/esm/solana/compatibility.js",
126
+ "default": "./dist/cjs/solana/compatibility.js"
127
+ },
128
+ "./solana/csv": {
129
+ "types": "./dist/types/solana/csv/index.d.ts",
130
+ "import": "./dist/esm/solana/csv/index.js",
131
+ "default": "./dist/cjs/solana/csv/index.js"
132
+ },
133
+ "./solana/enums": {
134
+ "types": "./dist/types/solana/enums.d.ts",
135
+ "import": "./dist/esm/solana/enums.js",
136
+ "default": "./dist/cjs/solana/enums.js"
137
+ },
138
+ "./solana/helpers": {
139
+ "types": "./dist/types/solana/helpers.d.ts",
140
+ "import": "./dist/esm/solana/helpers.js",
141
+ "default": "./dist/cjs/solana/helpers.js"
142
+ },
143
+ "./solana/programs": {
144
+ "types": "./dist/types/solana/programs/index.d.ts",
145
+ "import": "./dist/esm/solana/programs/index.js",
146
+ "default": "./dist/cjs/solana/programs/index.js"
147
+ },
148
+ "./solana/releases": {
149
+ "types": "./dist/types/solana/releases/index.d.ts",
150
+ "import": "./dist/esm/solana/releases/index.js",
151
+ "default": "./dist/cjs/solana/releases/index.js"
152
+ },
73
153
  "./solana/releases/*/idl": {
74
154
  "types": "./dist/types/solana/releases/*/idl.d.ts",
75
155
  "import": "./dist/esm/solana/releases/*/idl.js",