@pafi-dev/issuer 0.35.0 → 0.36.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/dist/http/index.d.cts +112 -0
- package/dist/http/index.d.ts +112 -0
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4093 -0
- package/dist/index.d.ts +4093 -0
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.d.cts +142 -0
- package/dist/nestjs/index.d.ts +142 -0
- package/dist/types-CxVXRHLy.d.cts +64 -0
- package/dist/types-CxVXRHLy.d.ts +64 -0
- package/dist/wallet-auth/index.d.cts +29 -0
- package/dist/wallet-auth/index.d.ts +29 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4247,6 +4247,7 @@ function createNativePtQuoter(config) {
|
|
|
4247
4247
|
cacheTtlMs = 3e4,
|
|
4248
4248
|
fallbackEthPriceUsd = 3e3,
|
|
4249
4249
|
fallbackPtPriceUsdt = 0.1,
|
|
4250
|
+
failClosed = false,
|
|
4250
4251
|
fetchImpl = globalThis.fetch,
|
|
4251
4252
|
now = () => Date.now()
|
|
4252
4253
|
} = config;
|
|
@@ -4271,6 +4272,11 @@ function createNativePtQuoter(config) {
|
|
|
4271
4272
|
ethPriceCache = { value: answer, expiresAt: ts + cacheTtlMs };
|
|
4272
4273
|
return answer;
|
|
4273
4274
|
} catch (err) {
|
|
4275
|
+
if (failClosed) {
|
|
4276
|
+
throw new Error(
|
|
4277
|
+
`[nativePtQuoter] Chainlink unavailable in fail-closed mode: ${err.message}`
|
|
4278
|
+
);
|
|
4279
|
+
}
|
|
4274
4280
|
console.warn("[nativePtQuoter] Chainlink unavailable, using fallback:", err.message);
|
|
4275
4281
|
return BigInt(Math.round(fallbackEthPriceUsd * 1e8));
|
|
4276
4282
|
}
|
|
@@ -4303,6 +4309,11 @@ function createNativePtQuoter(config) {
|
|
|
4303
4309
|
ptPriceCache = { value, expiresAt: ts + cacheTtlMs };
|
|
4304
4310
|
return value;
|
|
4305
4311
|
} catch (err) {
|
|
4312
|
+
if (failClosed) {
|
|
4313
|
+
throw new Error(
|
|
4314
|
+
`[nativePtQuoter] subgraph miss for ${pointTokenAddress} in fail-closed mode: ${err.message}`
|
|
4315
|
+
);
|
|
4316
|
+
}
|
|
4306
4317
|
console.warn("[nativePtQuoter] subgraph unavailable, using fallback:", err.message);
|
|
4307
4318
|
const ptPerUsdtHuman = 1 / fallbackPtPriceUsdt;
|
|
4308
4319
|
return parseBigDecimalTo18(ptPerUsdtHuman.toFixed(18));
|
|
@@ -5226,7 +5237,7 @@ var MemoryRedemptionHistoryStore = class {
|
|
|
5226
5237
|
};
|
|
5227
5238
|
|
|
5228
5239
|
// src/index.ts
|
|
5229
|
-
var PAFI_ISSUER_SDK_VERSION = true ? "0.35.
|
|
5240
|
+
var PAFI_ISSUER_SDK_VERSION = true ? "0.35.1" : "dev";
|
|
5230
5241
|
export {
|
|
5231
5242
|
AdapterMisconfiguredError,
|
|
5232
5243
|
AuthError,
|