sablier 3.3.5 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/evm/helpers.js +11 -15
- package/dist/cjs/evm/helpers.js.map +1 -1
- package/dist/cjs/evm/releases/features.js +118 -0
- package/dist/cjs/evm/releases/features.js.map +1 -0
- package/dist/cjs/evm/releases/resolvers.js +3 -0
- package/dist/cjs/evm/releases/resolvers.js.map +1 -1
- package/dist/cjs/evm/types.js.map +1 -1
- package/dist/cjs/helpers.js +8 -2
- package/dist/cjs/helpers.js.map +1 -1
- package/dist/esm/evm/helpers.js +2 -15
- package/dist/esm/evm/helpers.js.map +1 -1
- package/dist/esm/evm/releases/features.js +105 -0
- package/dist/esm/evm/releases/features.js.map +1 -0
- package/dist/esm/evm/releases/resolvers.js +3 -0
- package/dist/esm/evm/releases/resolvers.js.map +1 -1
- package/dist/esm/evm/types.js.map +1 -1
- package/dist/esm/helpers.js +8 -2
- package/dist/esm/helpers.js.map +1 -1
- package/dist/types/evm/helpers.d.ts +2 -9
- package/dist/types/evm/helpers.d.ts.map +1 -1
- package/dist/types/evm/releases/airdrops/index.d.ts +14637 -14567
- package/dist/types/evm/releases/airdrops/index.d.ts.map +1 -1
- package/dist/types/evm/releases/airdrops/v1.1/index.d.ts +650 -636
- package/dist/types/evm/releases/airdrops/v1.1/index.d.ts.map +1 -1
- package/dist/types/evm/releases/airdrops/v1.2/index.d.ts +1313 -1299
- package/dist/types/evm/releases/airdrops/v1.2/index.d.ts.map +1 -1
- package/dist/types/evm/releases/airdrops/v1.3/index.d.ts +2855 -2841
- package/dist/types/evm/releases/airdrops/v1.3/index.d.ts.map +1 -1
- package/dist/types/evm/releases/airdrops/v2.0/index.d.ts +4190 -4176
- package/dist/types/evm/releases/airdrops/v2.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/airdrops/v3.0/index.d.ts +5564 -5550
- package/dist/types/evm/releases/airdrops/v3.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/bob/index.d.ts +2605 -2591
- package/dist/types/evm/releases/bob/index.d.ts.map +1 -1
- package/dist/types/evm/releases/bob/v1.0/index.d.ts +2605 -2591
- package/dist/types/evm/releases/bob/v1.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/features.d.ts +123 -0
- package/dist/types/evm/releases/features.d.ts.map +1 -0
- package/dist/types/evm/releases/flow/index.d.ts +7040 -6984
- package/dist/types/evm/releases/flow/index.d.ts.map +1 -1
- package/dist/types/evm/releases/flow/v1.0/index.d.ts +1781 -1767
- package/dist/types/evm/releases/flow/v1.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/flow/v1.1/index.d.ts +1813 -1799
- package/dist/types/evm/releases/flow/v1.1/index.d.ts.map +1 -1
- package/dist/types/evm/releases/flow/v2.0/index.d.ts +1717 -1703
- package/dist/types/evm/releases/flow/v2.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/flow/v3.0/index.d.ts +1701 -1687
- package/dist/types/evm/releases/flow/v3.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/legacy/index.d.ts +1508 -1480
- package/dist/types/evm/releases/legacy/index.d.ts.map +1 -1
- package/dist/types/evm/releases/legacy/v1.0/index.d.ts +1236 -1222
- package/dist/types/evm/releases/legacy/v1.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/legacy/v1.1/index.d.ts +261 -247
- package/dist/types/evm/releases/legacy/v1.1/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/index.d.ts +20544 -20460
- package/dist/types/evm/releases/lockup/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/v1.0/index.d.ts +3846 -3832
- package/dist/types/evm/releases/lockup/v1.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/v1.1/index.d.ts +3997 -3983
- package/dist/types/evm/releases/lockup/v1.1/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/v1.2/index.d.ts +5791 -5777
- package/dist/types/evm/releases/lockup/v1.2/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/v2.0/index.d.ts +2347 -2333
- package/dist/types/evm/releases/lockup/v2.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/v3.0/index.d.ts +2220 -2206
- package/dist/types/evm/releases/lockup/v3.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/lockup/v4.0/index.d.ts +2477 -2463
- package/dist/types/evm/releases/lockup/v4.0/index.d.ts.map +1 -1
- package/dist/types/evm/releases/resolvers.d.ts +13 -3
- package/dist/types/evm/releases/resolvers.d.ts.map +1 -1
- package/dist/types/evm/types.d.ts +20 -3
- package/dist/types/evm/types.d.ts.map +1 -1
- package/dist/types/helpers.d.ts +2 -0
- package/dist/types/helpers.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Protocol, Version } from "../../evm/enums.js";
|
|
2
|
+
function deepFreeze(value) {
|
|
3
|
+
if (typeof value !== "object" || value === null || Object.isFrozen(value)) {
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
for (const nestedValue of Object.values(value)) {
|
|
7
|
+
deepFreeze(nestedValue);
|
|
8
|
+
}
|
|
9
|
+
return Object.freeze(value);
|
|
10
|
+
}
|
|
11
|
+
const emptyReleaseFeatures = deepFreeze({});
|
|
12
|
+
export const evmReleaseFeatures = deepFreeze({
|
|
13
|
+
[Protocol.Airdrops]: {
|
|
14
|
+
[Version.Airdrops.V1_1]: { claimTo: false, payable: false, sponsor: false },
|
|
15
|
+
[Version.Airdrops.V1_2]: { claimTo: false, payable: false, sponsor: false },
|
|
16
|
+
[Version.Airdrops.V1_3]: { claimTo: false, payable: true, sponsor: false },
|
|
17
|
+
[Version.Airdrops.V2_0]: { claimTo: true, payable: true, sponsor: false },
|
|
18
|
+
[Version.Airdrops.V3_0]: { claimTo: true, payable: true, sponsor: true },
|
|
19
|
+
},
|
|
20
|
+
[Protocol.Bob]: {
|
|
21
|
+
[Version.Bob.V1_0]: emptyReleaseFeatures,
|
|
22
|
+
},
|
|
23
|
+
[Protocol.Flow]: {
|
|
24
|
+
[Version.Flow.V1_0]: { payable: false },
|
|
25
|
+
[Version.Flow.V1_1]: { payable: true },
|
|
26
|
+
[Version.Flow.V2_0]: { payable: true },
|
|
27
|
+
[Version.Flow.V3_0]: { payable: true },
|
|
28
|
+
},
|
|
29
|
+
[Protocol.Legacy]: {
|
|
30
|
+
[Version.Legacy.V1_0]: emptyReleaseFeatures,
|
|
31
|
+
[Version.Legacy.V1_1]: emptyReleaseFeatures,
|
|
32
|
+
},
|
|
33
|
+
[Protocol.Lockup]: {
|
|
34
|
+
[Version.Lockup.V1_0]: { batch: false, legacyAbi: true, payable: false, prbProxy: true },
|
|
35
|
+
[Version.Lockup.V1_1]: { batch: false, legacyAbi: true, payable: false, prbProxy: false },
|
|
36
|
+
[Version.Lockup.V1_2]: { batch: false, legacyAbi: false, payable: false, prbProxy: false },
|
|
37
|
+
[Version.Lockup.V2_0]: { batch: true, legacyAbi: false, payable: true, prbProxy: false },
|
|
38
|
+
[Version.Lockup.V3_0]: { batch: true, legacyAbi: false, payable: true, prbProxy: false },
|
|
39
|
+
[Version.Lockup.V4_0]: { batch: true, legacyAbi: false, payable: true, prbProxy: false },
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
const evmReleaseFeatureRegistry = evmReleaseFeatures;
|
|
43
|
+
const payableReleaseFeatureRegistry = deepFreeze({
|
|
44
|
+
[Protocol.Airdrops]: evmReleaseFeatures[Protocol.Airdrops],
|
|
45
|
+
[Protocol.Flow]: evmReleaseFeatures[Protocol.Flow],
|
|
46
|
+
[Protocol.Lockup]: evmReleaseFeatures[Protocol.Lockup],
|
|
47
|
+
});
|
|
48
|
+
function isPayableEvmProtocol(protocol) {
|
|
49
|
+
return protocol in payableReleaseFeatureRegistry;
|
|
50
|
+
}
|
|
51
|
+
function isPayableEvmRelease(release) {
|
|
52
|
+
return isPayableEvmProtocol(release.protocol);
|
|
53
|
+
}
|
|
54
|
+
function normalizePayableReleaseInput(releaseOrProtocol, version) {
|
|
55
|
+
if (typeof releaseOrProtocol !== "string") {
|
|
56
|
+
return releaseOrProtocol;
|
|
57
|
+
}
|
|
58
|
+
if (!version) {
|
|
59
|
+
throw new Error('Sablier SDK: Missing "version" for isEvmReleasePayable(protocol, version)');
|
|
60
|
+
}
|
|
61
|
+
return { protocol: releaseOrProtocol, version };
|
|
62
|
+
}
|
|
63
|
+
export function getEvmReleaseFeatures(protocol, version) {
|
|
64
|
+
return evmReleaseFeatureRegistry[protocol][version];
|
|
65
|
+
}
|
|
66
|
+
export function getAirdropsReleaseFeatures(version) {
|
|
67
|
+
return getEvmReleaseFeatures(Protocol.Airdrops, version);
|
|
68
|
+
}
|
|
69
|
+
export function getFlowReleaseFeatures(version) {
|
|
70
|
+
return getEvmReleaseFeatures(Protocol.Flow, version);
|
|
71
|
+
}
|
|
72
|
+
export function getLockupReleaseFeatures(version) {
|
|
73
|
+
return getEvmReleaseFeatures(Protocol.Lockup, version);
|
|
74
|
+
}
|
|
75
|
+
export function isEvmReleasePayable(releaseOrProtocol, version) {
|
|
76
|
+
const release = normalizePayableReleaseInput(releaseOrProtocol, version);
|
|
77
|
+
if (!isPayableEvmRelease(release)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
const protocolRegistry = payableReleaseFeatureRegistry[release.protocol];
|
|
81
|
+
if (!protocolRegistry) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
const releaseFeatures = protocolRegistry[release.version];
|
|
85
|
+
if (!releaseFeatures) {
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
return releaseFeatures.payable;
|
|
89
|
+
}
|
|
90
|
+
export function hasClaimTo(version) {
|
|
91
|
+
return getAirdropsReleaseFeatures(version).claimTo;
|
|
92
|
+
}
|
|
93
|
+
export function hasSponsor(version) {
|
|
94
|
+
return getAirdropsReleaseFeatures(version).sponsor;
|
|
95
|
+
}
|
|
96
|
+
export function supportsLockupBatch(version) {
|
|
97
|
+
return getLockupReleaseFeatures(version).batch;
|
|
98
|
+
}
|
|
99
|
+
export function supportsLockupPrbProxy(version) {
|
|
100
|
+
return getLockupReleaseFeatures(version).prbProxy;
|
|
101
|
+
}
|
|
102
|
+
export function usesLockupSplit(version) {
|
|
103
|
+
return getLockupReleaseFeatures(version).legacyAbi;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=features.js.map
|
|
@@ -0,0 +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;AAKhG,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,EAA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AC;IACf,CAAC;IAED,MAAM,gBAAgB,GAAG,6BAA6B,CAAC,OAAO,CAAC,QAAQ,CAE1D,CAAC;IAEd,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1D,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,eAAe,CAAC,OAAO,CAAC;AACjC,CAAC;AAKD,MAAM,UAAU,UAAU,CAAC,OAAqC;IAC9D,OAAO,0BAA0B,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;AACrD,CAAC;AAKD,MAAM,UAAU,UAAU,CAAC,OAAqC;IAC9D,OAAO,0BAA0B,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;AACrD,CAAC;AAKD,MAAM,UAAU,mBAAmB,CAAC,OAAmC;IACrE,OAAO,wBAAwB,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC;AAKD,MAAM,UAAU,sBAAsB,CAAC,OAAmC;IACxE,OAAO,wBAAwB,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;AACpD,CAAC;AAKD,MAAM,UAAU,eAAe,CAAC,OAAmC;IACjE,OAAO,wBAAwB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;AACrD,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 */\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]: { payable: false },\n [Version.Flow.V1_1]: { payable: true },\n [Version.Flow.V2_0]: { payable: true },\n [Version.Flow.V3_0]: { 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]: { batch: false, legacyAbi: true, payable: false, prbProxy: true },\n [Version.Lockup.V1_1]: { batch: false, legacyAbi: true, payable: false, prbProxy: false },\n [Version.Lockup.V1_2]: { batch: false, legacyAbi: false, payable: false, prbProxy: false },\n [Version.Lockup.V2_0]: { batch: true, legacyAbi: false, payable: true, prbProxy: false },\n [Version.Lockup.V3_0]: { batch: true, legacyAbi: false, payable: true, prbProxy: false },\n [Version.Lockup.V4_0]: { batch: true, legacyAbi: false, payable: true, prbProxy: false },\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 * 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 airdrops capability matrix for one released version.\n */\nexport function getAirdropsReleaseFeatures(\n version: Sablier.EVM.Version.Airdrops\n): Sablier.EVM.AirdropsReleaseFeatures {\n return getEvmReleaseFeatures(Protocol.Airdrops, version);\n}\n\n/**\n * Reads the flow capability matrix for one released version.\n */\nexport function getFlowReleaseFeatures(\n version: Sablier.EVM.Version.Flow\n): Sablier.EVM.FlowReleaseFeatures {\n return getEvmReleaseFeatures(Protocol.Flow, version);\n}\n\n/**\n * Reads the lockup capability matrix for one released version.\n */\nexport function getLockupReleaseFeatures(\n version: Sablier.EVM.Version.Lockup\n): Sablier.EVM.LockupReleaseFeatures {\n return getEvmReleaseFeatures(Protocol.Lockup, version);\n}\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 protocolRegistry = payableReleaseFeatureRegistry[release.protocol] as\n | Record<Sablier.EVM.Version, { payable: boolean }>\n | undefined;\n\n if (!protocolRegistry) {\n return false;\n }\n\n const releaseFeatures = protocolRegistry[release.version];\n\n if (!releaseFeatures) {\n return false;\n }\n\n return releaseFeatures.payable;\n}\n\n/**\n * Returns whether the airdrops release supports the `claimTo` function for claiming to a third-party address.\n */\nexport function hasClaimTo(version: Sablier.EVM.Version.Airdrops): boolean {\n return getAirdropsReleaseFeatures(version).claimTo;\n}\n\n/**\n * Returns whether the airdrops release supports sponsor-driven claims.\n */\nexport function hasSponsor(version: Sablier.EVM.Version.Airdrops): boolean {\n return getAirdropsReleaseFeatures(version).sponsor;\n}\n\n/**\n * Returns whether the lockup release exposes batch create or withdraw flows.\n */\nexport function supportsLockupBatch(version: Sablier.EVM.Version.Lockup): boolean {\n return getLockupReleaseFeatures(version).batch;\n}\n\n/**\n * Returns whether the lockup release integrates with PRBProxy.\n */\nexport function supportsLockupPrbProxy(version: Sablier.EVM.Version.Lockup): boolean {\n return getLockupReleaseFeatures(version).prbProxy;\n}\n\n/**\n * Returns whether the lockup release uses the split ABI layout.\n */\nexport function usesLockupSplit(version: Sablier.EVM.Version.Lockup): boolean {\n return getLockupReleaseFeatures(version).legacyAbi;\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { chainsQueries } from "../../evm/chains/queries.js";
|
|
2
2
|
import { createContractMapper, createStandardDeploymentResolver, } from "../../internal/factories/resolver.js";
|
|
3
3
|
import { getNestedValues } from "../../internal/utils/nested-values.js";
|
|
4
|
+
import { getEvmReleaseFeatures } from "./features.js";
|
|
4
5
|
const contractMapper = createContractMapper(chainsQueries);
|
|
5
6
|
const standardDeploymentResolver = createStandardDeploymentResolver(contractMapper, "contracts");
|
|
6
7
|
function createLockupV1Deployment(params) {
|
|
@@ -28,6 +29,7 @@ export const resolvers = {
|
|
|
28
29
|
return {
|
|
29
30
|
...params,
|
|
30
31
|
contractNames: getNestedValues(params.manifest),
|
|
32
|
+
features: getEvmReleaseFeatures(params.protocol, params.version),
|
|
31
33
|
kind: "lockupV1",
|
|
32
34
|
};
|
|
33
35
|
},
|
|
@@ -35,6 +37,7 @@ export const resolvers = {
|
|
|
35
37
|
return {
|
|
36
38
|
...params,
|
|
37
39
|
contractNames: getNestedValues(params.manifest),
|
|
40
|
+
features: getEvmReleaseFeatures(params.protocol, params.version),
|
|
38
41
|
kind: "standard",
|
|
39
42
|
};
|
|
40
43
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolvers.js","sourceRoot":"","sources":["../../../../src/evm/releases/resolvers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,oBAAoB,EACpB,gCAAgC,GACjC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"resolvers.js","sourceRoot":"","sources":["../../../../src/evm/releases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gBACL,GAAG,MAAM;gBACT,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAC/C,QAAQ,EAAE,qBAAqB,CAAiB,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC;gBAChF,IAAI,EAAE,UAAU;aACjB,CAAC;QACJ,CAAC;QAKD,QAAQ,EAAE,CAKR,MAGC,EACoC,EAAE;YACvC,OAAO;gBACL,GAAG,MAAM;gBACT,aAAa,EAAE,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC;gBAC/C,QAAQ,EAAE,qBAAqB,CAAY,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC;gBAC3E,IAAI,EAAE,UAAU;aACjB,CAAC;QACJ,CAAC;KACF;CACF,CAAC","sourcesContent":["import { chainsQueries } from \"@/src/evm/chains/queries.js\";\nimport {\n createContractMapper,\n createStandardDeploymentResolver,\n} from \"@/src/internal/factories/resolver.js\";\nimport { getNestedValues } from \"@/src/internal/utils/nested-values.js\";\nimport type { AliasMap } from \"@/src/shared/types.js\";\nimport type { Sablier } from \"@/src/types.js\";\nimport type { EvmReleaseVersionByProtocol, ReleaseFeaturesForProtocol } from \"./features.js\";\nimport { getEvmReleaseFeatures } from \"./features.js\";\n\n/* -------------------------------------------------------------------------- */\n/* TYPES */\n/* -------------------------------------------------------------------------- */\n\ntype DeploymentBaseParams = {\n protocol: Sablier.EVM.Protocol;\n version: Sablier.EVM.Version;\n chainId: number;\n aliasMap: AliasMap;\n};\n\ntype DeploymentLockupV1Params = DeploymentBaseParams & {\n contractMap: {\n core: Sablier.EVM.ContractMap;\n periphery: Sablier.EVM.ContractMap;\n };\n};\n\ntype DeploymentStandardParams = DeploymentBaseParams & {\n contractMap: Sablier.EVM.ContractMap;\n};\n\ntype ReleaseParams<T> = Omit<T, \"kind\" | \"contractNames\" | \"features\" | \"protocol\" | \"version\">;\n\ntype StandardRelease<\n TProtocol extends keyof EvmReleaseVersionByProtocol,\n TAbiMap extends Sablier.EVM.AbiMap,\n> = Sablier.EVM.Release.Standard<TAbiMap, ReleaseFeaturesForProtocol<TProtocol>>;\n\ntype LockupProtocol = Extract<keyof EvmReleaseVersionByProtocol, \"lockup\">;\n\ntype LockupV1Release<TAbiMap extends Sablier.EVM.AbiMap> = Sablier.EVM.Release.LockupV1<\n TAbiMap,\n ReleaseFeaturesForProtocol<LockupProtocol>\n>;\n\n/* -------------------------------------------------------------------------- */\n/* PLATFORM SETUP */\n/* -------------------------------------------------------------------------- */\n\nconst contractMapper = createContractMapper<\n Sablier.EVM.Contract,\n Sablier.EVM.Protocol,\n Sablier.EVM.Version,\n Sablier.EVM.Address\n>(chainsQueries);\n\nconst standardDeploymentResolver = createStandardDeploymentResolver<\n Sablier.EVM.Deployment,\n Sablier.EVM.Contract,\n Sablier.EVM.Protocol,\n Sablier.EVM.Version,\n Sablier.EVM.Address\n>(contractMapper, \"contracts\");\n\n/* -------------------------------------------------------------------------- */\n/* EVM-SPECIFIC RESOLVERS */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Creates a LockupV1 deployment with separate core and periphery contracts\n */\nfunction createLockupV1Deployment(\n params: DeploymentLockupV1Params\n): Sablier.EVM.Deployment.LockupV1 {\n const { contractMap, ...baseParams } = params;\n\n // Create standard deployment with merged contracts\n const mergedContracts = { ...contractMap.core, ...contractMap.periphery };\n const deployment = standardDeploymentResolver({\n ...baseParams,\n contractMap: mergedContracts,\n }) as Sablier.EVM.Deployment.LockupV1;\n\n // Add separated core and periphery contracts\n deployment.core = contractMapper(contractMap.core, baseParams);\n deployment.periphery = contractMapper(contractMap.periphery, baseParams);\n\n return deployment;\n}\n\n/* -------------------------------------------------------------------------- */\n/* RESOLVERS */\n/* -------------------------------------------------------------------------- */\n\nexport const resolvers = {\n deployment: {\n /**\n * Creates a LockupV1 deployment with separate core and periphery contracts\n */\n lockupV1: (params: DeploymentLockupV1Params): Sablier.EVM.Deployment.LockupV1 => {\n return createLockupV1Deployment(params);\n },\n\n /**\n * Creates a standard deployment with all contracts in a single array\n */\n standard: (params: DeploymentStandardParams): Sablier.EVM.Deployment => {\n return standardDeploymentResolver(params);\n },\n },\n\n release: {\n /**\n * Creates a LockupV1 release with contract names extracted from manifest\n */\n lockupV1: <\n TAbiMap extends Sablier.EVM.AbiMap,\n TVersion extends EvmReleaseVersionByProtocol[LockupProtocol],\n >(\n params: ReleaseParams<LockupV1Release<TAbiMap>> & {\n protocol: LockupProtocol;\n version: TVersion;\n }\n ): LockupV1Release<TAbiMap> => {\n return {\n ...params,\n contractNames: getNestedValues(params.manifest),\n features: getEvmReleaseFeatures<LockupProtocol>(params.protocol, params.version),\n kind: \"lockupV1\",\n };\n },\n\n /**\n * Creates a standard release with contract names extracted from manifest\n */\n standard: <\n TProtocol extends keyof EvmReleaseVersionByProtocol,\n TAbiMap extends Sablier.EVM.AbiMap,\n TVersion extends EvmReleaseVersionByProtocol[TProtocol],\n >(\n params: ReleaseParams<StandardRelease<TProtocol, TAbiMap>> & {\n protocol: TProtocol;\n version: TVersion;\n }\n ): StandardRelease<TProtocol, TAbiMap> => {\n return {\n ...params,\n contractNames: getNestedValues(params.manifest),\n features: getEvmReleaseFeatures<TProtocol>(params.protocol, params.version),\n kind: \"standard\",\n };\n },\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/evm/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AliasMap, Repository, Shared } from \"@/src/shared/types.js\";\nimport type * as enums from \"./enums.js\";\n\nexport namespace EVM {\n /** Ethereum address in the format 0x followed by 40 hex characters. */\n export type Address = `0x${string}`;\n\n export type AbiMap = { [contractName: string]: readonly object[] };\n export type Chain = Shared.Chain & {\n /** Whether this is a zkEVM like zkSync. */\n isZK: boolean;\n rpc: Shared.Chain[\"rpc\"] & {\n /** Alchemy RPC URL generator. */\n alchemy?: (apiKey: string) => string;\n /** Infura RPC URL generator. */\n infura?: (apiKey: string) => string;\n /** RouteMesh RPC URL generator. */\n routemesh?: (apiKey: string) => string;\n };\n };\n\n /**\n * The base contract type for EVM chains.\n */\n export type Contract = Shared.Contract<Address, Protocol, Version>;\n\n /**\n * Reverse mapping of contracts so that we can look up contracts by address.\n */\n export type ContractCatalog = {\n [protocol in Protocol]: {\n [chainId: number]: {\n [address: Address]: Contract;\n };\n };\n };\n\n /**\n * Reverse mapping of contracts by alias for O(1) lookup.\n */\n export type AliasCatalog = {\n [protocol in Protocol]: {\n [chainId: number]: {\n [alias: string]: Contract;\n };\n };\n };\n\n /** @internal */\n export type ContractMap = Shared.ContractMap<Address>;\n\n export type Protocol = `${enums.Protocol}` | enums.Protocol;\n\n export type CompilerSettings = {\n /** The EVM version such as shanghai, paris, etc. */\n evmVersion: string;\n /** Whether the optimizer is enabled. */\n optimizer: boolean;\n /** The number of optimizer runs. */\n optimizerRuns: number;\n /** Optional salt used for CREATE2 deployment. None implies deployment using CREATE. */\n salt?: string;\n /** The solc version used. */\n solcVersion: `v${number}.${number}.${number}`;\n /** Whether the IR is used. */\n viaIR: boolean;\n /** Optional zk version used, only valid for zkEVM chains. */\n zkVersion?: `v${number}.${number}.${number}`;\n };\n\n /* -------------------------------------------------------------------------- */\n /* DEPLOYMENT */\n /* -------------------------------------------------------------------------- */\n\n export namespace Deployment {\n export type Standard = {\n chainId: number;\n contracts: Contract[];\n /** TODO: Compiler settings for the contract. Not implemented yet. */\n compilerSettings?: CompilerSettings;\n };\n\n export type LockupV1 = Standard & {\n core: Contract[];\n periphery: Contract[];\n };\n }\n\n export type Deployment = Deployment.Standard | Deployment.LockupV1;\n\n /* -------------------------------------------------------------------------- */\n /* MANIFEST */\n /* -------------------------------------------------------------------------- */\n\n /**\n * Contract names for a given protocol and version.\n * Note that this may contain both deployed contracts and abstract contracts that are not deployed.\n */\n export namespace Manifest {\n export type LockupV1 = {\n core: Standard;\n periphery: Standard;\n };\n\n export type Standard = Shared.Manifest;\n }\n\n export type Manifest = Manifest.LockupV1 | Manifest.Standard;\n\n /* -------------------------------------------------------------------------- */\n /* RELEASE */\n /* -------------------------------------------------------------------------- */\n\n /**\n * A collection of deployments for a given protocol and version.\n */\n export namespace Release {\n type Common
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/evm/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AliasMap, Repository, Shared } from \"@/src/shared/types.js\";\nimport type * as enums from \"./enums.js\";\n\nexport namespace EVM {\n /** Ethereum address in the format 0x followed by 40 hex characters. */\n export type Address = `0x${string}`;\n\n export type AbiMap = { [contractName: string]: readonly object[] };\n export type Chain = Shared.Chain & {\n /** Whether this is a zkEVM like zkSync. */\n isZK: boolean;\n rpc: Shared.Chain[\"rpc\"] & {\n /** Alchemy RPC URL generator. */\n alchemy?: (apiKey: string) => string;\n /** Infura RPC URL generator. */\n infura?: (apiKey: string) => string;\n /** RouteMesh RPC URL generator. */\n routemesh?: (apiKey: string) => string;\n };\n };\n\n /**\n * The base contract type for EVM chains.\n */\n export type Contract = Shared.Contract<Address, Protocol, Version>;\n\n /**\n * Reverse mapping of contracts so that we can look up contracts by address.\n */\n export type ContractCatalog = {\n [protocol in Protocol]: {\n [chainId: number]: {\n [address: Address]: Contract;\n };\n };\n };\n\n /**\n * Reverse mapping of contracts by alias for O(1) lookup.\n */\n export type AliasCatalog = {\n [protocol in Protocol]: {\n [chainId: number]: {\n [alias: string]: Contract;\n };\n };\n };\n\n /** @internal */\n export type ContractMap = Shared.ContractMap<Address>;\n\n export type Protocol = `${enums.Protocol}` | enums.Protocol;\n\n export type CompilerSettings = {\n /** The EVM version such as shanghai, paris, etc. */\n evmVersion: string;\n /** Whether the optimizer is enabled. */\n optimizer: boolean;\n /** The number of optimizer runs. */\n optimizerRuns: number;\n /** Optional salt used for CREATE2 deployment. None implies deployment using CREATE. */\n salt?: string;\n /** The solc version used. */\n solcVersion: `v${number}.${number}.${number}`;\n /** Whether the IR is used. */\n viaIR: boolean;\n /** Optional zk version used, only valid for zkEVM chains. */\n zkVersion?: `v${number}.${number}.${number}`;\n };\n\n /* -------------------------------------------------------------------------- */\n /* DEPLOYMENT */\n /* -------------------------------------------------------------------------- */\n\n export namespace Deployment {\n export type Standard = {\n chainId: number;\n contracts: Contract[];\n /** TODO: Compiler settings for the contract. Not implemented yet. */\n compilerSettings?: CompilerSettings;\n };\n\n export type LockupV1 = Standard & {\n core: Contract[];\n periphery: Contract[];\n };\n }\n\n export type Deployment = Deployment.Standard | Deployment.LockupV1;\n\n /* -------------------------------------------------------------------------- */\n /* MANIFEST */\n /* -------------------------------------------------------------------------- */\n\n /**\n * Contract names for a given protocol and version.\n * Note that this may contain both deployed contracts and abstract contracts that are not deployed.\n */\n export namespace Manifest {\n export type LockupV1 = {\n core: Standard;\n periphery: Standard;\n };\n\n export type Standard = Shared.Manifest;\n }\n\n export type Manifest = Manifest.LockupV1 | Manifest.Standard;\n\n /* -------------------------------------------------------------------------- */\n /* RELEASE */\n /* -------------------------------------------------------------------------- */\n\n export type AirdropsReleaseFeatures = {\n payable: boolean;\n claimTo: boolean;\n sponsor: boolean;\n };\n\n export type FlowReleaseFeatures = {\n payable: boolean;\n };\n\n export type LockupReleaseFeatures = {\n payable: boolean;\n prbProxy: boolean;\n batch: boolean;\n legacyAbi: boolean;\n };\n\n export type EmptyReleaseFeatures = Record<never, never>;\n\n export type EvmReleaseFeatures =\n | AirdropsReleaseFeatures\n | FlowReleaseFeatures\n | LockupReleaseFeatures\n | EmptyReleaseFeatures;\n\n /**\n * A collection of deployments for a given protocol and version.\n */\n export namespace Release {\n type Common<\n TAbiMap extends AbiMap = AbiMap,\n TFeatures extends EvmReleaseFeatures = EvmReleaseFeatures,\n > = {\n abi: TAbiMap;\n /** A map of contract names to their aliases, used in the Sablier Interface and the Graph. */\n aliases?: AliasMap;\n /** An array of contract names. */\n contractNames: string[];\n /** Release capabilities keyed to the owning protocol. */\n features: TFeatures;\n /** Whether this is the latest release for this protocol. */\n isLatest: boolean;\n /** The kind of release. */\n kind: \"standard\" | \"lockupV1\";\n /** The Sablier protocol released, e.g. `airdrops`. */\n protocol: Protocol;\n /** Repository information for the release. */\n repository?: Repository;\n /** The version of the release, e.g., `v1.3`. */\n version: Version;\n };\n\n /**\n * Lockup v1.x release used to separate Lockup contracts into core and periphery sub-categories.\n * @see https://github.com/sablier-labs/v2-periphery\n */\n export type LockupV1<\n TAbiMap extends AbiMap = AbiMap,\n TFeatures extends EvmReleaseFeatures = EvmReleaseFeatures,\n > = Common<TAbiMap, TFeatures> & {\n deployments: Deployment.LockupV1[];\n kind: \"lockupV1\";\n manifest: Manifest.LockupV1;\n };\n\n export type Standard<\n TAbiMap extends AbiMap = AbiMap,\n TFeatures extends EvmReleaseFeatures = EvmReleaseFeatures,\n > = Common<TAbiMap, TFeatures> & {\n deployments: Deployment.Standard[];\n kind: \"standard\";\n manifest: Manifest.Standard;\n };\n }\n\n export type Release = Release.Standard | Release.LockupV1;\n\n /* -------------------------------------------------------------------------- */\n /* VERSION */\n /* -------------------------------------------------------------------------- */\n\n export namespace Version {\n export type Airdrops = `${enums.Version.Airdrops}` | enums.Version.Airdrops;\n\n export type Bob = `${enums.Version.Bob}` | enums.Version.Bob;\n\n export type Flow = `${enums.Version.Flow}` | enums.Version.Flow;\n\n export type Legacy = `${enums.Version.Legacy}` | enums.Version.Legacy;\n\n export type Lockup = `${enums.Version.Lockup}` | enums.Version.Lockup;\n }\n export type Version =\n | Version.Airdrops\n | Version.Bob\n | Version.Flow\n | Version.Legacy\n | Version.Lockup;\n}\n"]}
|
package/dist/esm/helpers.js
CHANGED
|
@@ -19,8 +19,14 @@ export function isVersionBefore(version, before) {
|
|
|
19
19
|
export function isVersionAfter(version, after) {
|
|
20
20
|
return compareVersions(version, after) > 0;
|
|
21
21
|
}
|
|
22
|
-
export function isReleasePayable(
|
|
23
|
-
|
|
22
|
+
export function isReleasePayable(releaseOrProtocol, version) {
|
|
23
|
+
if (typeof releaseOrProtocol !== "string") {
|
|
24
|
+
return isEvmReleasePayable(releaseOrProtocol);
|
|
25
|
+
}
|
|
26
|
+
if (!version) {
|
|
27
|
+
throw new Error('Sablier SDK: Missing "version" for isEvmReleasePayable(protocol, version)');
|
|
28
|
+
}
|
|
29
|
+
return isEvmReleasePayable(releaseOrProtocol, version);
|
|
24
30
|
}
|
|
25
31
|
export function truncateAddress(address, options) {
|
|
26
32
|
return address.startsWith("0x")
|
package/dist/esm/helpers.js.map
CHANGED
|
@@ -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;
|
|
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,EA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,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,13 +1,7 @@
|
|
|
1
1
|
import type { Sablier, TruncateAddressOptions } from "../types.js";
|
|
2
|
-
|
|
2
|
+
export type { PayableEvmProtocol } from "./releases/features.js";
|
|
3
|
+
export { getAirdropsReleaseFeatures, getFlowReleaseFeatures, getLockupReleaseFeatures, hasClaimTo, hasSponsor, isEvmReleasePayable, supportsLockupBatch, supportsLockupPrbProxy, usesLockupSplit, } from "./releases/features.js";
|
|
3
4
|
export declare function getContractExplorerURL(explorerURL: string, contractAddress: Sablier.EVM.Address): string;
|
|
4
|
-
declare const MIN_PAYABLE_VERSIONS: {
|
|
5
|
-
readonly airdrops: Version.Airdrops.V1_3;
|
|
6
|
-
readonly flow: Version.Flow.V1_1;
|
|
7
|
-
readonly lockup: Version.Lockup.V2_0;
|
|
8
|
-
};
|
|
9
|
-
export type PayableEvmProtocol = keyof typeof MIN_PAYABLE_VERSIONS;
|
|
10
|
-
export declare function isEvmReleasePayable(protocol: PayableEvmProtocol, version: Sablier.EVM.Version): boolean;
|
|
11
5
|
export declare function resolveEvmStreamId(opts: {
|
|
12
6
|
alias: string;
|
|
13
7
|
chainId: number;
|
|
@@ -20,5 +14,4 @@ export declare function resolveEvmContractByAlias(opts: {
|
|
|
20
14
|
protocol?: Sablier.EVM.Protocol;
|
|
21
15
|
}): Sablier.EVM.Contract;
|
|
22
16
|
export declare function truncateEvmAddress(address: Sablier.EVM.Address, options?: TruncateAddressOptions): string;
|
|
23
|
-
export {};
|
|
24
17
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -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;
|
|
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,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,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"}
|