@reyaxyz/common 0.305.2 → 0.305.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/README.md CHANGED
@@ -6,5 +6,5 @@
6
6
 
7
7
  | Statements | Branches | Functions | Lines |
8
8
  | --------------------------- | ----------------------- | ------------------------- | ----------------- |
9
- | ![Statements](https://img.shields.io/badge/statements-19.88%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-16.89%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-9.54%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-21.53%25-red.svg?style=flat) |
9
+ | ![Statements](https://img.shields.io/badge/statements-20.27%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-17.44%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-9.9%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-21.96%25-red.svg?style=flat) |
10
10
 
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ __exportStar(require("./types"), exports);
18
18
  __exportStar(require("./api-types"), exports);
19
19
  __exportStar(require("./trading-api-types"), exports);
20
20
  __exportStar(require("./incentives-api-types"), exports);
21
+ __exportStar(require("./vltz-api-types"), exports);
21
22
  __exportStar(require("./commands"), exports);
22
23
  __exportStar(require("./utils"), exports);
23
24
  __exportStar(require("./services"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,8CAA4B;AAC5B,sDAAoC;AACpC,yDAAuC;AACvC,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,+CAA6B;AAC7B,iDAA+B","sourcesContent":["export * from './types';\nexport * from './api-types';\nexport * from './trading-api-types';\nexport * from './incentives-api-types';\nexport * from './commands';\nexport * from './utils';\nexport * from './services';\nexport * from './modules';\nexport * from './rest';\nexport * from './decorators';\nexport * from './transactions';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,8CAA4B;AAC5B,sDAAoC;AACpC,yDAAuC;AACvC,mDAAiC;AACjC,6CAA2B;AAC3B,0CAAwB;AACxB,6CAA2B;AAC3B,4CAA0B;AAC1B,yCAAuB;AACvB,+CAA6B;AAC7B,iDAA+B","sourcesContent":["export * from './types';\nexport * from './api-types';\nexport * from './trading-api-types';\nexport * from './incentives-api-types';\nexport * from './vltz-api-types';\nexport * from './commands';\nexport * from './utils';\nexport * from './services';\nexport * from './modules';\nexport * from './rest';\nexport * from './decorators';\nexport * from './transactions';\n"]}
@@ -2,6 +2,7 @@ export * from './types';
2
2
  export * from './api-types';
3
3
  export * from './trading-api-types';
4
4
  export * from './incentives-api-types';
5
+ export * from './vltz-api-types';
5
6
  export * from './commands';
6
7
  export * from './utils';
7
8
  export * from './services';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC"}
@@ -12,4 +12,5 @@ export * from './task-wrapper';
12
12
  export * from './whitelisted-wallets';
13
13
  export * from './stringify';
14
14
  export * from './sbt-helpers';
15
+ export * from './minting-helpers';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,31 @@
1
+ /// <reference types="node" />
2
+ import { MoneyInOutChainId } from '../types';
3
+ type VltzMintingChainIds = MoneyInOutChainId.ethereumMainnet | MoneyInOutChainId.ethereumSepolia;
4
+ export declare const VLTZ_MINTING_DETAILS: Record<VltzMintingChainIds, {
5
+ contractAddress: string;
6
+ rounds: Record<number, {
7
+ mintDeadline: number;
8
+ mintStart: number;
9
+ totalAllocation: number;
10
+ root: string;
11
+ }>;
12
+ }>;
13
+ export declare enum VltzTierName {
14
+ tier1 = "tier1",
15
+ tier2 = "tier2",
16
+ tier3 = "tier3",
17
+ legendary = "legendary",
18
+ easterEgg = "easterEgg"
19
+ }
20
+ export type VltzAllocationInfo = {
21
+ walletAddress: string;
22
+ totalAllocation: number;
23
+ allocationPerBadge: Array<Array<number>>;
24
+ };
25
+ export type VltzLeafInfo = {
26
+ walletAddress: string;
27
+ allocation: string;
28
+ };
29
+ export declare const getVltzLeaf: (walletAddress: string, allocation: string) => Buffer;
30
+ export {};
31
+ //# sourceMappingURL=minting-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minting-helpers.d.ts","sourceRoot":"/","sources":["utils/minting-helpers.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,mBAAmB,GACpB,iBAAiB,CAAC,eAAe,GACjC,iBAAiB,CAAC,eAAe,CAAC;AAGtC,eAAO,MAAM,oBAAoB,EAAE,MAAM,CACvC,mBAAmB,EACnB;IACE,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;QACE,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,MAAM,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;KACd,CACF,CAAC;CACH,CAwBF,CAAC;AAEF,oBAAY,YAAY;IACtB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,WAAW,kBACP,MAAM,cACT,MAAM,KACjB,MAKF,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { AddressParam, ApiEndpoint, PaginatedQueryMeta, PaginatedQueryParams, Stringified } from './api-types';
2
+ import { VltzAllocationInfo } from './utils';
3
+ export type VltzRoundInfo = {
4
+ deadlineMs: number;
5
+ mintedAmount: number;
6
+ totalAllocation: number;
7
+ totalVolume: number;
8
+ leaderboard: {
9
+ data: {
10
+ walletAddress: string;
11
+ volume: number;
12
+ currentAllocation: number;
13
+ }[];
14
+ meta: PaginatedQueryMeta;
15
+ };
16
+ };
17
+ export type VltzWalletInfo = {
18
+ minted: boolean;
19
+ mintedAmountSoFar: number;
20
+ allocationInfo: VltzAllocationInfo;
21
+ merkleRoot: string;
22
+ merkleProof: string[];
23
+ volume: number;
24
+ positionInLeaderboard: number;
25
+ };
26
+ export type VltzApiSource = {
27
+ 'vltz/round/:id': ApiEndpoint<VltzRoundInfo, {
28
+ id: string;
29
+ } & PaginatedQueryParams>;
30
+ 'vltz/wallet/:address/:roundId': ApiEndpoint<VltzWalletInfo, AddressParam & {
31
+ roundId: string;
32
+ }>;
33
+ };
34
+ export type VltzApi = {
35
+ [K in keyof VltzApiSource]: {
36
+ params: VltzApiSource[K]['params'];
37
+ query: VltzApiSource[K]['query'];
38
+ response: Stringified<VltzApiSource[K]['response']>;
39
+ };
40
+ };
41
+ //# sourceMappingURL=vltz-api-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vltz-api-types.d.ts","sourceRoot":"/","sources":["vltz-api-types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,MAAM,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,IAAI,EAAE;YACJ,aAAa,EAAE,MAAM,CAAC;YACtB,MAAM,EAAE,MAAM,CAAC;YACf,iBAAiB,EAAE,MAAM,CAAC;SAC3B,EAAE,CAAC;QACJ,IAAI,EAAE,kBAAkB,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,kBAAkB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,gBAAgB,EAAE,WAAW,CAC3B,aAAa,EACb;QACE,EAAE,EAAE,MAAM,CAAC;KACZ,GAAG,oBAAoB,CACzB,CAAC;IAEF,+BAA+B,EAAE,WAAW,CAC1C,cAAc,EACd,YAAY,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CACnC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;KACnB,CAAC,IAAI,MAAM,aAAa,GAAG;QAC1B,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACnC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QACjC,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;KACrD;CACF,CAAC"}
@@ -28,4 +28,5 @@ __exportStar(require("./task-wrapper"), exports);
28
28
  __exportStar(require("./whitelisted-wallets"), exports);
29
29
  __exportStar(require("./stringify"), exports);
30
30
  __exportStar(require("./sbt-helpers"), exports);
31
+ __exportStar(require("./minting-helpers"), exports);
31
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,sDAAoC;AACpC,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,iDAA+B;AAC/B,wDAAsC;AACtC,8CAA4B;AAC5B,gDAA8B","sourcesContent":["export * from './consts';\nexport * from './points';\nexport * from './calculate';\nexport * from './struct';\nexport * from './cooldown-interval';\nexport * from './network';\nexport * from './number';\nexport * from './retry';\nexport * from './timestamp';\nexport * from './token';\nexport * from './task-wrapper';\nexport * from './whitelisted-wallets';\nexport * from './stringify';\nexport * from './sbt-helpers';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,sDAAoC;AACpC,4CAA0B;AAC1B,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,iDAA+B;AAC/B,wDAAsC;AACtC,8CAA4B;AAC5B,gDAA8B;AAC9B,oDAAkC","sourcesContent":["export * from './consts';\nexport * from './points';\nexport * from './calculate';\nexport * from './struct';\nexport * from './cooldown-interval';\nexport * from './network';\nexport * from './number';\nexport * from './retry';\nexport * from './timestamp';\nexport * from './token';\nexport * from './task-wrapper';\nexport * from './whitelisted-wallets';\nexport * from './stringify';\nexport * from './sbt-helpers';\nexport * from './minting-helpers';\n"]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var _a;
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getVltzLeaf = exports.VltzTierName = exports.VLTZ_MINTING_DETAILS = void 0;
5
+ var ethers_1 = require("ethers");
6
+ var types_1 = require("../types");
7
+ // mapping from round, to network, to details
8
+ exports.VLTZ_MINTING_DETAILS = (_a = {},
9
+ _a[types_1.MoneyInOutChainId.ethereumSepolia] = {
10
+ contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',
11
+ rounds: {
12
+ 1: {
13
+ mintDeadline: 1758751200,
14
+ mintStart: 1756677600,
15
+ totalAllocation: 1000000000, // 1 Billion
16
+ root: '0x',
17
+ },
18
+ },
19
+ },
20
+ _a[types_1.MoneyInOutChainId.ethereumMainnet] = {
21
+ contractAddress: '0x',
22
+ rounds: {
23
+ 1: {
24
+ mintDeadline: 1758751200,
25
+ mintStart: 1758492000,
26
+ totalAllocation: 1000000000, // 1 Billion
27
+ root: '0x',
28
+ },
29
+ },
30
+ },
31
+ _a);
32
+ var VltzTierName;
33
+ (function (VltzTierName) {
34
+ VltzTierName["tier1"] = "tier1";
35
+ VltzTierName["tier2"] = "tier2";
36
+ VltzTierName["tier3"] = "tier3";
37
+ VltzTierName["legendary"] = "legendary";
38
+ VltzTierName["easterEgg"] = "easterEgg";
39
+ })(VltzTierName || (exports.VltzTierName = VltzTierName = {}));
40
+ var getVltzLeaf = function (walletAddress, allocation) {
41
+ var messageHash = ethers_1.ethers.keccak256(ethers_1.ethers.solidityPacked(['address', 'uint256'], [walletAddress, allocation]));
42
+ return Buffer.from(messageHash.slice(2), 'hex');
43
+ };
44
+ exports.getVltzLeaf = getVltzLeaf;
45
+ //# sourceMappingURL=minting-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minting-helpers.js","sourceRoot":"/","sources":["utils/minting-helpers.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,kCAA6C;AAM7C,6CAA6C;AAChC,QAAA,oBAAoB;IAe/B,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,eAAe,EAAE,4CAA4C;QAC7D,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,YAAY,EAAE,UAAU;gBACxB,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,UAAU,EAAE,YAAY;gBACzC,IAAI,EAAE,IAAI;aACX;SACF;KACF;IACD,GAAC,yBAAiB,CAAC,eAAe,IAAG;QACnC,eAAe,EAAE,IAAI;QACrB,MAAM,EAAE;YACN,CAAC,EAAE;gBACD,YAAY,EAAE,UAAU;gBACxB,SAAS,EAAE,UAAU;gBACrB,eAAe,EAAE,UAAU,EAAE,YAAY;gBACzC,IAAI,EAAE,IAAI;aACX;SACF;KACF;QACD;AAEF,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,+BAAe,CAAA;IACf,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;AACzB,CAAC,EANW,YAAY,4BAAZ,YAAY,QAMvB;AAaM,IAAM,WAAW,GAAG,UACzB,aAAqB,EACrB,UAAkB;IAElB,IAAM,WAAW,GAAG,eAAM,CAAC,SAAS,CAClC,eAAM,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC,CAC3E,CAAC;IACF,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC,CAAC;AARW,QAAA,WAAW,eAQtB","sourcesContent":["import { ethers } from 'ethers';\nimport { MoneyInOutChainId } from '../types';\n\ntype VltzMintingChainIds =\n | MoneyInOutChainId.ethereumMainnet\n | MoneyInOutChainId.ethereumSepolia;\n\n// mapping from round, to network, to details\nexport const VLTZ_MINTING_DETAILS: Record<\n VltzMintingChainIds,\n {\n contractAddress: string;\n rounds: Record<\n number,\n {\n mintDeadline: number;\n mintStart: number;\n totalAllocation: number;\n root: string;\n }\n >;\n }\n> = {\n [MoneyInOutChainId.ethereumSepolia]: {\n contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',\n rounds: {\n 1: {\n mintDeadline: 1758751200,\n mintStart: 1756677600,\n totalAllocation: 1000000000, // 1 Billion\n root: '0x',\n },\n },\n },\n [MoneyInOutChainId.ethereumMainnet]: {\n contractAddress: '0x',\n rounds: {\n 1: {\n mintDeadline: 1758751200,\n mintStart: 1758492000,\n totalAllocation: 1000000000, // 1 Billion\n root: '0x',\n },\n },\n },\n};\n\nexport enum VltzTierName {\n tier1 = 'tier1',\n tier2 = 'tier2',\n tier3 = 'tier3',\n legendary = 'legendary',\n easterEgg = 'easterEgg',\n}\n\nexport type VltzAllocationInfo = {\n walletAddress: string;\n totalAllocation: number;\n allocationPerBadge: Array<Array<number>>;\n};\n\nexport type VltzLeafInfo = {\n walletAddress: string;\n allocation: string;\n};\n\nexport const getVltzLeaf = (\n walletAddress: string,\n allocation: string,\n): Buffer => {\n const messageHash = ethers.keccak256(\n ethers.solidityPacked(['address', 'uint256'], [walletAddress, allocation]),\n );\n return Buffer.from(messageHash.slice(2), 'hex');\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vltz-api-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vltz-api-types.js","sourceRoot":"/","sources":["vltz-api-types.ts"],"names":[],"mappings":"","sourcesContent":["import {\n AddressParam,\n ApiEndpoint,\n PaginatedQueryMeta,\n PaginatedQueryParams,\n Stringified,\n} from './api-types';\nimport { VltzAllocationInfo } from './utils';\n\nexport type VltzRoundInfo = {\n deadlineMs: number;\n mintedAmount: number;\n totalAllocation: number;\n totalVolume: number;\n leaderboard: {\n data: {\n walletAddress: string;\n volume: number;\n currentAllocation: number;\n }[];\n meta: PaginatedQueryMeta;\n };\n};\n\nexport type VltzWalletInfo = {\n minted: boolean;\n mintedAmountSoFar: number;\n allocationInfo: VltzAllocationInfo;\n merkleRoot: string;\n merkleProof: string[];\n volume: number;\n positionInLeaderboard: number;\n};\n\nexport type VltzApiSource = {\n 'vltz/round/:id': ApiEndpoint<\n VltzRoundInfo,\n {\n id: string;\n } & PaginatedQueryParams\n >;\n\n 'vltz/wallet/:address/:roundId': ApiEndpoint<\n VltzWalletInfo,\n AddressParam & { roundId: string }\n >;\n};\n\nexport type VltzApi = {\n [K in keyof VltzApiSource]: {\n params: VltzApiSource[K]['params'];\n query: VltzApiSource[K]['query'];\n response: Stringified<VltzApiSource[K]['response']>;\n };\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.305.2",
3
+ "version": "0.305.3",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -44,5 +44,5 @@
44
44
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
45
45
  },
46
46
  "packageManager": "pnpm@8.3.1",
47
- "gitHead": "04a3f263ee78406901b93edddf4b13231ba4bfe0"
47
+ "gitHead": "03ff9e970fec3c0283fbb51751f8f635b66eef65"
48
48
  }
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ export * from './types';
2
2
  export * from './api-types';
3
3
  export * from './trading-api-types';
4
4
  export * from './incentives-api-types';
5
+ export * from './vltz-api-types';
5
6
  export * from './commands';
6
7
  export * from './utils';
7
8
  export * from './services';
@@ -12,3 +12,4 @@ export * from './task-wrapper';
12
12
  export * from './whitelisted-wallets';
13
13
  export * from './stringify';
14
14
  export * from './sbt-helpers';
15
+ export * from './minting-helpers';
@@ -0,0 +1,75 @@
1
+ import { ethers } from 'ethers';
2
+ import { MoneyInOutChainId } from '../types';
3
+
4
+ type VltzMintingChainIds =
5
+ | MoneyInOutChainId.ethereumMainnet
6
+ | MoneyInOutChainId.ethereumSepolia;
7
+
8
+ // mapping from round, to network, to details
9
+ export const VLTZ_MINTING_DETAILS: Record<
10
+ VltzMintingChainIds,
11
+ {
12
+ contractAddress: string;
13
+ rounds: Record<
14
+ number,
15
+ {
16
+ mintDeadline: number;
17
+ mintStart: number;
18
+ totalAllocation: number;
19
+ root: string;
20
+ }
21
+ >;
22
+ }
23
+ > = {
24
+ [MoneyInOutChainId.ethereumSepolia]: {
25
+ contractAddress: '0x7A00255ebcBE36FbF469e0A6265A271749560aE4',
26
+ rounds: {
27
+ 1: {
28
+ mintDeadline: 1758751200,
29
+ mintStart: 1756677600,
30
+ totalAllocation: 1000000000, // 1 Billion
31
+ root: '0x',
32
+ },
33
+ },
34
+ },
35
+ [MoneyInOutChainId.ethereumMainnet]: {
36
+ contractAddress: '0x',
37
+ rounds: {
38
+ 1: {
39
+ mintDeadline: 1758751200,
40
+ mintStart: 1758492000,
41
+ totalAllocation: 1000000000, // 1 Billion
42
+ root: '0x',
43
+ },
44
+ },
45
+ },
46
+ };
47
+
48
+ export enum VltzTierName {
49
+ tier1 = 'tier1',
50
+ tier2 = 'tier2',
51
+ tier3 = 'tier3',
52
+ legendary = 'legendary',
53
+ easterEgg = 'easterEgg',
54
+ }
55
+
56
+ export type VltzAllocationInfo = {
57
+ walletAddress: string;
58
+ totalAllocation: number;
59
+ allocationPerBadge: Array<Array<number>>;
60
+ };
61
+
62
+ export type VltzLeafInfo = {
63
+ walletAddress: string;
64
+ allocation: string;
65
+ };
66
+
67
+ export const getVltzLeaf = (
68
+ walletAddress: string,
69
+ allocation: string,
70
+ ): Buffer => {
71
+ const messageHash = ethers.keccak256(
72
+ ethers.solidityPacked(['address', 'uint256'], [walletAddress, allocation]),
73
+ );
74
+ return Buffer.from(messageHash.slice(2), 'hex');
75
+ };
@@ -0,0 +1,55 @@
1
+ import {
2
+ AddressParam,
3
+ ApiEndpoint,
4
+ PaginatedQueryMeta,
5
+ PaginatedQueryParams,
6
+ Stringified,
7
+ } from './api-types';
8
+ import { VltzAllocationInfo } from './utils';
9
+
10
+ export type VltzRoundInfo = {
11
+ deadlineMs: number;
12
+ mintedAmount: number;
13
+ totalAllocation: number;
14
+ totalVolume: number;
15
+ leaderboard: {
16
+ data: {
17
+ walletAddress: string;
18
+ volume: number;
19
+ currentAllocation: number;
20
+ }[];
21
+ meta: PaginatedQueryMeta;
22
+ };
23
+ };
24
+
25
+ export type VltzWalletInfo = {
26
+ minted: boolean;
27
+ mintedAmountSoFar: number;
28
+ allocationInfo: VltzAllocationInfo;
29
+ merkleRoot: string;
30
+ merkleProof: string[];
31
+ volume: number;
32
+ positionInLeaderboard: number;
33
+ };
34
+
35
+ export type VltzApiSource = {
36
+ 'vltz/round/:id': ApiEndpoint<
37
+ VltzRoundInfo,
38
+ {
39
+ id: string;
40
+ } & PaginatedQueryParams
41
+ >;
42
+
43
+ 'vltz/wallet/:address/:roundId': ApiEndpoint<
44
+ VltzWalletInfo,
45
+ AddressParam & { roundId: string }
46
+ >;
47
+ };
48
+
49
+ export type VltzApi = {
50
+ [K in keyof VltzApiSource]: {
51
+ params: VltzApiSource[K]['params'];
52
+ query: VltzApiSource[K]['query'];
53
+ response: Stringified<VltzApiSource[K]['response']>;
54
+ };
55
+ };