@flaunch/sdk 0.8.2 → 0.8.3-beta.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.
Files changed (41) hide show
  1. package/dist/abi/FlaunchZap.d.ts +106 -102
  2. package/dist/abi/FlaunchZap.d.ts.map +1 -1
  3. package/dist/abi/TreasuryManager.d.ts +106 -0
  4. package/dist/abi/TreasuryManager.d.ts.map +1 -0
  5. package/dist/abi/TreasuryManagerFactory.d.ts +268 -242
  6. package/dist/abi/TreasuryManagerFactory.d.ts.map +1 -1
  7. package/dist/abi/index.cjs +476 -322
  8. package/dist/abi/index.cjs.map +1 -1
  9. package/dist/abi/index.js +476 -322
  10. package/dist/abi/index.js.map +1 -1
  11. package/dist/addresses/index.cjs +23 -6
  12. package/dist/addresses/index.cjs.map +1 -1
  13. package/dist/addresses/index.js +21 -7
  14. package/dist/addresses/index.js.map +1 -1
  15. package/dist/addresses.d.ts +6 -1
  16. package/dist/addresses.d.ts.map +1 -1
  17. package/dist/clients/FlaunchZapClient.d.ts +8 -1
  18. package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
  19. package/dist/clients/TreasuryManagerClient.d.ts +60 -0
  20. package/dist/clients/TreasuryManagerClient.d.ts.map +1 -0
  21. package/dist/clients/TreasuryManagerFactoryClient.d.ts +34 -7
  22. package/dist/clients/TreasuryManagerFactoryClient.d.ts.map +1 -1
  23. package/dist/helpers/index.cjs +61 -0
  24. package/dist/helpers/index.cjs.map +1 -1
  25. package/dist/helpers/index.d.ts +1 -0
  26. package/dist/helpers/index.d.ts.map +1 -1
  27. package/dist/helpers/index.js +62 -2
  28. package/dist/helpers/index.js.map +1 -1
  29. package/dist/helpers/permissions.d.ts +10 -0
  30. package/dist/helpers/permissions.d.ts.map +1 -0
  31. package/dist/index.cjs.js +935 -381
  32. package/dist/index.cjs.js.map +1 -1
  33. package/dist/index.esm.js +933 -383
  34. package/dist/index.esm.js.map +1 -1
  35. package/dist/index.umd.js +1 -1
  36. package/dist/index.umd.js.map +1 -1
  37. package/dist/sdk/FlaunchSDK.d.ts +71 -6
  38. package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
  39. package/dist/types.d.ts +8 -0
  40. package/dist/types.d.ts.map +1 -1
  41. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  export * from "./hex";
2
2
  export * from "./ipfs";
3
3
  export * from "./chainIdToChain";
4
+ export * from "./permissions";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import { hexToBigInt as hexToBigInt$1, pad as pad$1, encodeAbiParameters } from 'viem';
1
+ import { hexToBigInt as hexToBigInt$1, pad as pad$1, encodeAbiParameters, zeroAddress } from 'viem';
2
2
  import axios from 'axios';
3
3
 
4
4
  const bytes32ToUint256 = (value) => {
@@ -5494,5 +5494,65 @@ const chainIdToChain = {
5494
5494
  [baseSepolia.id]: baseSepolia,
5495
5495
  };
5496
5496
 
5497
- export { bytes32ToUint256, chainIdToChain, generateTokenUri, resolveIPFS, uint256ToBytes32, uploadFileToIPFS, uploadImageToIPFS, uploadJsonToIPFS };
5497
+ /**
5498
+ * Enumeration of Flaunch contract versions
5499
+ */
5500
+ var FlaunchVersion;
5501
+ (function (FlaunchVersion) {
5502
+ FlaunchVersion["V1"] = "V1";
5503
+ FlaunchVersion["V1_1"] = "V1_1";
5504
+ FlaunchVersion["V1_1_1"] = "V1_1_1";
5505
+ FlaunchVersion["ANY"] = "ANY";
5506
+ })(FlaunchVersion || (FlaunchVersion = {}));
5507
+ /**
5508
+ * Enumeration of Verifiers for TokenImporter
5509
+ */
5510
+ var Verifier;
5511
+ (function (Verifier) {
5512
+ Verifier["CLANKER"] = "clanker";
5513
+ Verifier["DOPPLER"] = "doppler";
5514
+ Verifier["VIRTUALS"] = "virtuals";
5515
+ Verifier["WHITELIST"] = "whitelist";
5516
+ Verifier["ZORA"] = "zora";
5517
+ })(Verifier || (Verifier = {}));
5518
+ /**
5519
+ * Enumeration of Permissions for TreasuryManagers. Defaults to OPEN.
5520
+ */
5521
+ var Permissions;
5522
+ (function (Permissions) {
5523
+ Permissions["OPEN"] = "open";
5524
+ Permissions["CLOSED"] = "closed";
5525
+ Permissions["WHITELISTED"] = "whitelisted";
5526
+ })(Permissions || (Permissions = {}));
5527
+
5528
+ /** ======== */
5529
+ /** Permissions */
5530
+ const ClosedPermissionsAddress = {
5531
+ [base.id]: "0x0000000000000000000000000000000000000000", // TODO: add mainnet address
5532
+ [baseSepolia.id]: "0x551aeD820CAfaca2f9cD1C637AAc076D05a03AC2",
5533
+ };
5534
+ const WhitelistedPermissionsAddress = {
5535
+ [base.id]: "0x0000000000000000000000000000000000000000", // TODO: add mainnet address
5536
+ [baseSepolia.id]: "0xe8691E8f576A98c41EBB5E984207d4F51386621f",
5537
+ };
5538
+
5539
+ /**
5540
+ * Maps a Permissions enum value to its corresponding contract address
5541
+ * @param permissions - The permissions enum value
5542
+ * @param chainId - The chain ID to get the address for
5543
+ * @returns The corresponding permissions contract address
5544
+ */
5545
+ function getPermissionsAddress(permissions, chainId) {
5546
+ switch (permissions) {
5547
+ case Permissions.CLOSED:
5548
+ return ClosedPermissionsAddress[chainId];
5549
+ case Permissions.WHITELISTED:
5550
+ return WhitelistedPermissionsAddress[chainId];
5551
+ case Permissions.OPEN:
5552
+ default:
5553
+ return zeroAddress;
5554
+ }
5555
+ }
5556
+
5557
+ export { bytes32ToUint256, chainIdToChain, generateTokenUri, getPermissionsAddress, resolveIPFS, uint256ToBytes32, uploadFileToIPFS, uploadImageToIPFS, uploadJsonToIPFS };
5498
5558
  //# sourceMappingURL=index.js.map