@flaunch/sdk 0.4.1 → 0.5.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/abi/InitialPrice.d.ts +336 -0
- package/dist/abi/InitialPrice.d.ts.map +1 -0
- package/dist/clients/FlaunchPositionManagerClient.d.ts +7 -4
- package/dist/clients/FlaunchPositionManagerClient.d.ts.map +1 -1
- package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts +17 -4
- package/dist/clients/FlaunchPositionManagerV1_1Client.d.ts.map +1 -1
- package/dist/clients/FlaunchZapClient.d.ts +50 -20
- package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
- package/dist/clients/InitialPriceClient.d.ts +19 -0
- package/dist/clients/InitialPriceClient.d.ts.map +1 -0
- package/dist/clients/Permit2Client.d.ts +1 -1
- package/dist/helpers/index.cjs +14 -1
- package/dist/helpers/index.cjs.map +1 -1
- package/dist/helpers/index.js +14 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/helpers/ipfs.d.ts.map +1 -1
- package/dist/index.cjs.js +7923 -7412
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7924 -7413
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/sdk/FlaunchSDK.d.ts +49 -3
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/dist/utils/universalRouter.d.ts +3 -0
- package/dist/utils/universalRouter.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/helpers/index.js
CHANGED
|
@@ -8,9 +8,22 @@ const uint256ToBytes32 = (value) => {
|
|
|
8
8
|
return pad$1(encodeAbiParameters([{ type: "uint256", name: "value" }], [value]), { size: 32, dir: "right" });
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
+
// List of public IPFS gateways to cycle through
|
|
12
|
+
const IPFS_GATEWAYS = [
|
|
13
|
+
"https://gateway.pinata.cloud/ipfs/",
|
|
14
|
+
"https://ipfs.io/ipfs/",
|
|
15
|
+
"https://dweb.link/ipfs/",
|
|
16
|
+
];
|
|
17
|
+
// Counter to track the current gateway index
|
|
18
|
+
let currentGatewayIndex = 0;
|
|
11
19
|
const resolveIPFS = (value) => {
|
|
12
20
|
if (value.startsWith("ipfs://")) {
|
|
13
|
-
|
|
21
|
+
const cid = value.slice(7);
|
|
22
|
+
// Get the next gateway and increment the counter
|
|
23
|
+
const gateway = IPFS_GATEWAYS[currentGatewayIndex];
|
|
24
|
+
// Update the counter, cycling back to 0 when we reach the end
|
|
25
|
+
currentGatewayIndex = (currentGatewayIndex + 1) % IPFS_GATEWAYS.length;
|
|
26
|
+
return `${gateway}${cid}`;
|
|
14
27
|
}
|
|
15
28
|
return value;
|
|
16
29
|
};
|