@hinkal/common 0.2.7 → 0.2.9
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/API/API.cjs +1 -1
- package/API/API.d.ts +2 -1
- package/API/API.mjs +27 -26
- package/API/kycCalls.cjs +1 -1
- package/API/kycCalls.d.ts +4 -0
- package/API/kycCalls.mjs +15 -11
- package/API/rewardsPointsCalls.d.ts +3 -0
- package/README.md +61 -0
- package/constants/rewards.constants.cjs +1 -1
- package/constants/rewards.constants.d.ts +1 -0
- package/constants/rewards.constants.mjs +9 -8
- package/constants/server.constants.cjs +1 -1
- package/constants/server.constants.d.ts +2 -0
- package/constants/server.constants.mjs +2 -0
- package/data-structures/Hinkal/hinkalGetRecipientInfo.cjs +1 -1
- package/data-structures/Hinkal/hinkalGetRecipientInfo.mjs +9 -18
- package/index.cjs +1 -1
- package/index.mjs +504 -502
- package/package.json +1 -1
- package/types/hinkal.types.cjs +1 -1
- package/types/hinkal.types.d.ts +6 -0
- package/types/hinkal.types.mjs +10 -9
- package/types/rewards.types.cjs +1 -1
- package/types/rewards.types.d.ts +4 -3
- package/types/rewards.types.mjs +12 -12
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLauncher.mjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.cjs +1 -1
- package/webworker/snarkjsWorker/snarkjsWorkerLogic.mjs +26 -21
package/package.json
CHANGED
package/types/hinkal.types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(a=>(a.BalanceChange="BalanceChange",a.NetworkChange="NetworkChange",a.KycNeeded="KycNeeded",a.AccountChanged="AccountChanged",a.ShowConnect="ShowConnect",a.ShowNetworkPopup="ShowNetworkPopup",a.MerkleTreeUpdated="MerkleTreeUpdated",a.MerkleTreeResetStarted="MerkleTreeResetStarted",a.MerkleTreeResetFinished="MerkleTreeResetFinished",a))(E||{}),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var E=(a=>(a.BalanceChange="BalanceChange",a.NetworkChange="NetworkChange",a.KycNeeded="KycNeeded",a.AccountChanged="AccountChanged",a.ShowConnect="ShowConnect",a.ShowNetworkPopup="ShowNetworkPopup",a.MerkleTreeUpdated="MerkleTreeUpdated",a.MerkleTreeResetStarted="MerkleTreeResetStarted",a.MerkleTreeResetFinished="MerkleTreeResetFinished",a))(E||{}),D=(a=>(a[a.UNISWAP=1]="UNISWAP",a[a.ODOS=2]="ODOS",a[a.ONEINCH=3]="ONEINCH",a[a.PENDLE=4]="PENDLE",a[a.ALL=5]="ALL",a[a.NONE=6]="NONE",a))(D||{}),S=(a=>(a[a.CurveAavePool=0]="CurveAavePool",a))(S||{}),_=(a=>(a[a.Deposit=0]="Deposit",a[a.WithdrawInt=11]="WithdrawInt",a[a.WithdrawUint=12]="WithdrawUint",a[a.WithdrawImbalance=13]="WithdrawImbalance",a[a.Stake=2]="Stake",a[a.Unstake=3]="Unstake",a[a.GetCRV=4]="GetCRV",a))(_||{}),L=(a=>(a[a.StakeLP=0]="StakeLP",a[a.UnStakeLP=1]="UnStakeLP",a[a.ClaimRewardsLP=2]="ClaimRewardsLP",a))(L||{}),h=(a=>(a[a.Deposit=0]="Deposit",a[a.DepositRegular=1]="DepositRegular",a[a.DepositOneInchSingle=2]="DepositOneInchSingle",a[a.DepositOneInchUniswap=3]="DepositOneInchUniswap",a[a.DepositOneInchSolidly=4]="DepositOneInchSolidly",a[a.Withdraw=5]="Withdraw",a[a.WithdrawRegular=6]="WithdrawRegular",a[a.WithdrawOneInchSingle=7]="WithdrawOneInchSingle",a[a.WithdrawOneInchUniswapAndSolidly=8]="WithdrawOneInchUniswapAndSolidly",a[a.WithdrawBoth=9]="WithdrawBoth",a[a.Stake=10]="Stake",a[a.Unstake=11]="Unstake",a[a.GetRewards=12]="GetRewards",a))(h||{}),W=(a=>(a.Ethereum="Ethereum",a.Polygon="Polygon",a))(W||{}),r=(a=>(a[a.Stake=0]="Stake",a[a.Request=1]="Request",a[a.Claim=2]="Claim",a))(r||{}),w=(a=>(a[a.Deposit=0]="Deposit",a[a.Withdraw=1]="Withdraw",a[a.SwapFromYt=2]="SwapFromYt",a[a.SwapToYt=3]="SwapToYt",a[a.SwapPt=4]="SwapPt",a[a.Mint=5]="Mint",a[a.Redeem=6]="Redeem",a[a.Checkpoint=7]="Checkpoint",a[a.PoolRemove=8]="PoolRemove",a))(w||{}),p=(a=>(a[a.AddOrRemoveLiquidity=0]="AddOrRemoveLiquidity",a[a.Checkpoint=1]="Checkpoint",a[a.Invalid=99]="Invalid",a))(p||{}),k=(a=>(a[a.Persist=0]="Persist",a[a.Deposit=1]="Deposit",a[a.Withdraw=2]="Withdraw",a[a.Swap=3]="Swap",a))(k||{}),s=(a=>(a[a.DepositOrStake=0]="DepositOrStake",a[a.Unstake=1]="Unstake",a))(s||{}),U=(a=>(a.WITHDRAW="WITHDRAW",a.SWAP="SWAP",a.CURVE_DEPOSIT="CURVE_DEPOSIT",a.CURVE_WITHDRAW="CURVE_WITHDRAW",a.CURVE_WITHDRAW_INBALANCED="CURVE_WITHDRAW_INBALANCED",a.STAKING="STAKING",a.UNSTAKING="UNSTAKING",a.CLAIMING="CLAIMING",a.BEEFY="BEEFY",a.BEEFY_STAKE="BEEFY_STAKE",a.BEEFY_UNSTAKE="BEEFY_UNSTAKE",a.BEEFY_GET_REWARDS="BEEFY_GET_REWARDS",a.LIDO_STAKE="LIDO_STAKE",a.LIDO_REQUEST="LIDO_REQUEST",a.LIDO_CLAIM="LIDO_CLAIM",a.PENDLE_TRANSACT="PENDLE_TRANSACT",a.PENDLE_YT_IN_SWAP="PENDLE_YT_IN_SWAP",a.PENDLE_YT_OUT_SWAP="PENDLE_YT_OUT_SWAP",a.PENDLE_PT_SWAP="PENDLE_PT_SWAP",a.PENDLE_MINT="PENDLE_MINT",a.PENDLE_REDEEM="PENDLE_REDEEM",a.PENDLE_CLAIM="PENDLE_CLAIM",a.PENDLE_LP="PENDLE_LP",a.PENDLE_LP_CLAIM="PENDLE_LP_CLAIM",a.VOLATILE_WITHDRAW="VOLATILE_WITHDRAW",a.VOLATILE_SWAP="VOLATILE_SWAP",a.EMPORIUM="EMPORIUM",a.NONE="NONE",a))(U||{}),M=(a=>(a[a.NOT_STARTED=0]="NOT_STARTED",a[a.CONNECTED=1]="CONNECTED",a[a.KYC=2]="KYC",a[a.COMPLETED=3]="COMPLETED",a))(M||{});exports.BeefyAction=h;exports.ConvexAction=L;exports.CurveAction=_;exports.EventType=E;exports.HinkalStakeAction=s;exports.INTERACTION=U;exports.IntegrationProvider=D;exports.LidoAction=r;exports.LidoVariant=W;exports.PendleAction=w;exports.PendleLPAction=p;exports.StakeProvider=S;exports.UserProgress=M;exports.VolatileAction=k;
|
package/types/hinkal.types.d.ts
CHANGED
package/types/hinkal.types.mjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a = /* @__PURE__ */ ((E) => (E.BalanceChange = "BalanceChange", E.NetworkChange = "NetworkChange", E.KycNeeded = "KycNeeded", E.AccountChanged = "AccountChanged", E.ShowConnect = "ShowConnect", E.ShowNetworkPopup = "ShowNetworkPopup", E.MerkleTreeUpdated = "MerkleTreeUpdated", E.MerkleTreeResetStarted = "MerkleTreeResetStarted", E.MerkleTreeResetFinished = "MerkleTreeResetFinished", E))(a || {}), D = /* @__PURE__ */ ((E) => (E[E.UNISWAP = 1] = "UNISWAP", E[E.ODOS = 2] = "ODOS", E[E.ONEINCH = 3] = "ONEINCH", E[E.PENDLE = 4] = "PENDLE", E[E.ALL = 5] = "ALL", E[E.NONE = 6] = "NONE", E))(D || {}), S = /* @__PURE__ */ ((E) => (E[E.CurveAavePool = 0] = "CurveAavePool", E))(S || {}), _ = /* @__PURE__ */ ((E) => (E[E.Deposit = 0] = "Deposit", E[E.WithdrawInt = 11] = "WithdrawInt", E[E.WithdrawUint = 12] = "WithdrawUint", E[E.WithdrawImbalance = 13] = "WithdrawImbalance", E[E.Stake = 2] = "Stake", E[E.Unstake = 3] = "Unstake", E[E.GetCRV = 4] = "GetCRV", E))(_ || {}), L = /* @__PURE__ */ ((E) => (E[E.StakeLP = 0] = "StakeLP", E[E.UnStakeLP = 1] = "UnStakeLP", E[E.ClaimRewardsLP = 2] = "ClaimRewardsLP", E))(L || {}), h = /* @__PURE__ */ ((E) => (E[E.Deposit = 0] = "Deposit", E[E.DepositRegular = 1] = "DepositRegular", E[E.DepositOneInchSingle = 2] = "DepositOneInchSingle", E[E.DepositOneInchUniswap = 3] = "DepositOneInchUniswap", E[E.DepositOneInchSolidly = 4] = "DepositOneInchSolidly", E[E.Withdraw = 5] = "Withdraw", E[E.WithdrawRegular = 6] = "WithdrawRegular", E[E.WithdrawOneInchSingle = 7] = "WithdrawOneInchSingle", E[E.WithdrawOneInchUniswapAndSolidly = 8] = "WithdrawOneInchUniswapAndSolidly", E[E.WithdrawBoth = 9] = "WithdrawBoth", E[E.Stake = 10] = "Stake", E[E.Unstake = 11] = "Unstake", E[E.GetRewards = 12] = "GetRewards", E))(h || {}), W = /* @__PURE__ */ ((E) => (E.Ethereum = "Ethereum", E.Polygon = "Polygon", E))(W || {}), w = /* @__PURE__ */ ((E) => (E[E.Stake = 0] = "Stake", E[E.Request = 1] = "Request", E[E.Claim = 2] = "Claim", E))(w || {}), p = /* @__PURE__ */ ((E) => (E[E.Deposit = 0] = "Deposit", E[E.Withdraw = 1] = "Withdraw", E[E.SwapFromYt = 2] = "SwapFromYt", E[E.SwapToYt = 3] = "SwapToYt", E[E.SwapPt = 4] = "SwapPt", E[E.Mint = 5] = "Mint", E[E.Redeem = 6] = "Redeem", E[E.Checkpoint = 7] = "Checkpoint", E[E.PoolRemove = 8] = "PoolRemove", E))(p || {}), r = /* @__PURE__ */ ((E) => (E[E.AddOrRemoveLiquidity = 0] = "AddOrRemoveLiquidity", E[E.Checkpoint = 1] = "Checkpoint", E[E.Invalid = 99] = "Invalid", E))(r || {}), U = /* @__PURE__ */ ((E) => (E[E.Persist = 0] = "Persist", E[E.Deposit = 1] = "Deposit", E[E.Withdraw = 2] = "Withdraw", E[E.Swap = 3] = "Swap", E))(U || {}), M = /* @__PURE__ */ ((E) => (E[E.DepositOrStake = 0] = "DepositOrStake", E[E.Unstake = 1] = "Unstake", E))(M || {}), k = /* @__PURE__ */ ((E) => (E.WITHDRAW = "WITHDRAW", E.SWAP = "SWAP", E.CURVE_DEPOSIT = "CURVE_DEPOSIT", E.CURVE_WITHDRAW = "CURVE_WITHDRAW", E.CURVE_WITHDRAW_INBALANCED = "CURVE_WITHDRAW_INBALANCED", E.STAKING = "STAKING", E.UNSTAKING = "UNSTAKING", E.CLAIMING = "CLAIMING", E.BEEFY = "BEEFY", E.BEEFY_STAKE = "BEEFY_STAKE", E.BEEFY_UNSTAKE = "BEEFY_UNSTAKE", E.BEEFY_GET_REWARDS = "BEEFY_GET_REWARDS", E.LIDO_STAKE = "LIDO_STAKE", E.LIDO_REQUEST = "LIDO_REQUEST", E.LIDO_CLAIM = "LIDO_CLAIM", E.PENDLE_TRANSACT = "PENDLE_TRANSACT", E.PENDLE_YT_IN_SWAP = "PENDLE_YT_IN_SWAP", E.PENDLE_YT_OUT_SWAP = "PENDLE_YT_OUT_SWAP", E.PENDLE_PT_SWAP = "PENDLE_PT_SWAP", E.PENDLE_MINT = "PENDLE_MINT", E.PENDLE_REDEEM = "PENDLE_REDEEM", E.PENDLE_CLAIM = "PENDLE_CLAIM", E.PENDLE_LP = "PENDLE_LP", E.PENDLE_LP_CLAIM = "PENDLE_LP_CLAIM", E.VOLATILE_WITHDRAW = "VOLATILE_WITHDRAW", E.VOLATILE_SWAP = "VOLATILE_SWAP", E.EMPORIUM = "EMPORIUM", E.NONE = "NONE", E))(k || {}), s = /* @__PURE__ */ ((E) => (E[E.NOT_STARTED = 0] = "NOT_STARTED", E[E.CONNECTED = 1] = "CONNECTED", E[E.KYC = 2] = "KYC", E[E.COMPLETED = 3] = "COMPLETED", E))(s || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
h as BeefyAction,
|
|
4
|
+
L as ConvexAction,
|
|
5
5
|
_ as CurveAction,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
a as EventType,
|
|
7
|
+
M as HinkalStakeAction,
|
|
8
8
|
k as INTERACTION,
|
|
9
9
|
D as IntegrationProvider,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
w as LidoAction,
|
|
11
|
+
W as LidoVariant,
|
|
12
|
+
p as PendleAction,
|
|
13
|
+
r as PendleLPAction,
|
|
14
14
|
S as StakeProvider,
|
|
15
|
+
s as UserProgress,
|
|
15
16
|
U as VolatileAction
|
|
16
17
|
};
|
package/types/rewards.types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=(n=>(n.None="None",n.Bronze="Bronze",n.Silver="Silver",n.Gold="Gold",n.Platinum="Platinum",n.Diamond="Diamond",n.Elite="Elite",n))(e||{}),r=(n=>(n.None="None",n.Bronze="Bronze",n.Silver="Silver",n.Gold="Gold",n.Platinum="Platinum",n.Diamond="Diamond",n))(r||{}),i=(n=>(n.Points="POINTS",n.ReferralProgram="REFERRAL",n.LrtPoints="LRT_POINTS",n.LPProgram="LP",n.RewardsHistory="HISTORY",n))(i||{}),t=(n=>(n.InProgress="In Progress",n.Closed="Closed",n))(t||{}),o=(n=>(n.Pending="Pending",n.Submitted="Submitted",n.Unsubmitted="Didn't Submit",n))(o||{}),l=(n=>(n.Pending="Pending",n.Eligible="Eligible",n.Ineligible="Ineligible",n))(l||{}),s=(n=>(n.Pending="Pending",n.Completed="Completed",n.Unsubmitted="Didn't Submit",n))(s||{}),P=(n=>(n.Gold="Gold",n.Silver="Silver",n))(P||{}),m=(n=>(n.CertificationPoints="CertificationPoints",n.TradePoints="TradePoints",n.LPPoints="LPPoints",n.ReferralPoints="ReferralPoints",n.GalxePoints="GalxePoints",n.ZealyPoints="ZealyPoints",n.TaskOnPoints="TaskOnPoints",n.BonusPoints="BonusPoints",n))(m||{}),a=(n=>(n.Season="Season",n.Week="Week",n))(a||{}),d=(n=>(n.PAID="PAID",n.PENDING="PENDING",n))(d||{}),v=(n=>(n[n.Certify=0]="Certify",n[n.CheckActivity=1]="CheckActivity",n))(v||{}),u=(n=>(n[n.Points=0]="Points",n[n.Trader=1]="Trader",n[n.Affiliate=2]="Affiliate",n[n.LP=3]="LP",n[n.History=4]="History",n))(u||{}),S=(n=>(n[n.ReclaimCheck=0]="ReclaimCheck",n[n.IntegrationCheck=1]="IntegrationCheck",n[n.RandomPrizeGold=2]="RandomPrizeGold",n[n.RandomPrizeSilver=3]="RandomPrizeSilver",n))(S||{});const c={Result:{}},k={renzo:0,kelp:0,etherFi:0,zircuit:0};exports.BonusType=S;exports.CertifyType=v;exports.LP_TIER=r;exports.PaymentStatus=d;exports.PointType=m;exports.RafflePrizeType=P;exports.RewardPage=u;exports.RewardsHistoryDistribution=s;exports.RewardsHistoryEligibility=l;exports.RewardsHistorySnapshots=o;exports.RewardsHistoryStatuses=t;exports.RewardsPageTabs=i;exports.TIER_LEVEL=e;exports.Timeline=a;exports.emptyUserPointsBreakdown=k;exports.emptyUserPointsResponse=c;
|
package/types/rewards.types.d.ts
CHANGED
|
@@ -184,9 +184,10 @@ export declare enum RewardPage {
|
|
|
184
184
|
History = 4
|
|
185
185
|
}
|
|
186
186
|
export declare enum BonusType {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
187
|
+
ReclaimCheck = 0,
|
|
188
|
+
IntegrationCheck = 1,
|
|
189
|
+
RandomPrizeGold = 2,
|
|
190
|
+
RandomPrizeSilver = 3
|
|
190
191
|
}
|
|
191
192
|
export type UserPoints = Record<string, number>;
|
|
192
193
|
export type UserPointsTokens = Record<string, UserPoints>;
|
package/types/rewards.types.mjs
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var r = /* @__PURE__ */ ((n) => (n.None = "None", n.Bronze = "Bronze", n.Silver = "Silver", n.Gold = "Gold", n.Platinum = "Platinum", n.Diamond = "Diamond", n.Elite = "Elite", n))(r || {}), i = /* @__PURE__ */ ((n) => (n.None = "None", n.Bronze = "Bronze", n.Silver = "Silver", n.Gold = "Gold", n.Platinum = "Platinum", n.Diamond = "Diamond", n))(i || {}), t = /* @__PURE__ */ ((n) => (n.Points = "POINTS", n.ReferralProgram = "REFERRAL", n.LrtPoints = "LRT_POINTS", n.LPProgram = "LP", n.RewardsHistory = "HISTORY", n))(t || {}), e = /* @__PURE__ */ ((n) => (n.InProgress = "In Progress", n.Closed = "Closed", n))(e || {}), o = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Submitted = "Submitted", n.Unsubmitted = "Didn't Submit", n))(o || {}), l = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Eligible = "Eligible", n.Ineligible = "Ineligible", n))(l || {}), P = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Completed = "Completed", n.Unsubmitted = "Didn't Submit", n))(P || {}),
|
|
2
|
-
const
|
|
1
|
+
var r = /* @__PURE__ */ ((n) => (n.None = "None", n.Bronze = "Bronze", n.Silver = "Silver", n.Gold = "Gold", n.Platinum = "Platinum", n.Diamond = "Diamond", n.Elite = "Elite", n))(r || {}), i = /* @__PURE__ */ ((n) => (n.None = "None", n.Bronze = "Bronze", n.Silver = "Silver", n.Gold = "Gold", n.Platinum = "Platinum", n.Diamond = "Diamond", n))(i || {}), t = /* @__PURE__ */ ((n) => (n.Points = "POINTS", n.ReferralProgram = "REFERRAL", n.LrtPoints = "LRT_POINTS", n.LPProgram = "LP", n.RewardsHistory = "HISTORY", n))(t || {}), e = /* @__PURE__ */ ((n) => (n.InProgress = "In Progress", n.Closed = "Closed", n))(e || {}), o = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Submitted = "Submitted", n.Unsubmitted = "Didn't Submit", n))(o || {}), l = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Eligible = "Eligible", n.Ineligible = "Ineligible", n))(l || {}), P = /* @__PURE__ */ ((n) => (n.Pending = "Pending", n.Completed = "Completed", n.Unsubmitted = "Didn't Submit", n))(P || {}), m = /* @__PURE__ */ ((n) => (n.Gold = "Gold", n.Silver = "Silver", n))(m || {}), v = /* @__PURE__ */ ((n) => (n.CertificationPoints = "CertificationPoints", n.TradePoints = "TradePoints", n.LPPoints = "LPPoints", n.ReferralPoints = "ReferralPoints", n.GalxePoints = "GalxePoints", n.ZealyPoints = "ZealyPoints", n.TaskOnPoints = "TaskOnPoints", n.BonusPoints = "BonusPoints", n))(v || {}), d = /* @__PURE__ */ ((n) => (n.Season = "Season", n.Week = "Week", n))(d || {}), u = /* @__PURE__ */ ((n) => (n.PAID = "PAID", n.PENDING = "PENDING", n))(u || {}), c = /* @__PURE__ */ ((n) => (n[n.Certify = 0] = "Certify", n[n.CheckActivity = 1] = "CheckActivity", n))(c || {}), S = /* @__PURE__ */ ((n) => (n[n.Points = 0] = "Points", n[n.Trader = 1] = "Trader", n[n.Affiliate = 2] = "Affiliate", n[n.LP = 3] = "LP", n[n.History = 4] = "History", n))(S || {}), k = /* @__PURE__ */ ((n) => (n[n.ReclaimCheck = 0] = "ReclaimCheck", n[n.IntegrationCheck = 1] = "IntegrationCheck", n[n.RandomPrizeGold = 2] = "RandomPrizeGold", n[n.RandomPrizeSilver = 3] = "RandomPrizeSilver", n))(k || {});
|
|
2
|
+
const G = {
|
|
3
3
|
Result: {}
|
|
4
|
-
},
|
|
4
|
+
}, C = {
|
|
5
5
|
renzo: 0,
|
|
6
6
|
kelp: 0,
|
|
7
7
|
etherFi: 0,
|
|
8
8
|
zircuit: 0
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
k as BonusType,
|
|
12
|
+
c as CertifyType,
|
|
13
13
|
i as LP_TIER,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
u as PaymentStatus,
|
|
15
|
+
v as PointType,
|
|
16
|
+
m as RafflePrizeType,
|
|
17
|
+
S as RewardPage,
|
|
18
18
|
P as RewardsHistoryDistribution,
|
|
19
19
|
l as RewardsHistoryEligibility,
|
|
20
20
|
o as RewardsHistorySnapshots,
|
|
21
21
|
e as RewardsHistoryStatuses,
|
|
22
22
|
t as RewardsPageTabs,
|
|
23
23
|
r as TIER_LEVEL,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
d as Timeline,
|
|
25
|
+
C as emptyUserPointsBreakdown,
|
|
26
|
+
G as emptyUserPointsResponse
|
|
27
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/snarkjsWorkerLauncher-
|
|
1
|
+
"use strict";const e=""+(typeof document>"u"?require("url").pathToFileURL(__dirname+"/../../assets/snarkjsWorkerLauncher-C4z-FxO0.js").href:new URL("../../assets/snarkjsWorkerLauncher-C4z-FxO0.js",document.currentScript&&document.currentScript.src||document.baseURI).href);module.exports=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const $=require("../workerProxy.cjs"),n=require("../../constants/vite.constants.cjs"),O=require("snarkjs"),v=require("axios");function F(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return i.default=e,Object.freeze(i)}const p=F(O),c=new $.WorkerProxy,y=async e=>new Uint8Array((await v.get(e,{responseType:"arraybuffer"})).data),g=async e=>{const{input:i,wasmFilePath:t,zKeyFilePath:s,chainId:b}=e.payload.data,{hostLocation:{origin:l},constants:{isDevelopment:w,chains:{chainIds:k}}}=e.metadata;let a=t,r=s,u,f;const d=a.startsWith("https://");if(n.isNode&&!d){n.isWebpack?(a=`libs/hardhat/test/circuits/${t}`,r=`libs/hardhat/test/circuits/${s}`):!n.isWebpack&&w&&(a=`test/circuits/${t}`,r=`test/circuits/${s}`);const o=require("path");a=o.resolve(a),r=o.resolve(r)}n.isNode&&d?(u=await y(a),f=await y(r)):b===k.localhost&&!n.isNode&&(a=`${l}/${t}`,r=`${l}/${s}`);try{const{proof:o,publicSignals:h}=await p.groth16.fullProve(i,u??a,f??r),P=await p.groth16.exportSolidityCallData(o,h),m=JSON.parse(`[${P}]`);c.postMessageToMainThread({zkCallData:m,proof:o,publicSignals:h})}catch(o){console.log(o)}};c.attachWorkerSideOnMessage(g);exports.default=c;exports.onWorkerMessage=g;
|
|
@@ -1,31 +1,36 @@
|
|
|
1
|
-
import { WorkerProxy as
|
|
2
|
-
import { isNode as
|
|
3
|
-
import * as
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { WorkerProxy as P } from "../workerProxy.mjs";
|
|
2
|
+
import { isNode as o, isWebpack as p } from "../../constants/vite.constants.mjs";
|
|
3
|
+
import * as u from "snarkjs";
|
|
4
|
+
import b from "axios";
|
|
5
|
+
const m = new P(), y = async (s) => new Uint8Array((await b.get(s, { responseType: "arraybuffer" })).data), x = async (s) => {
|
|
6
|
+
const { input: d, wasmFilePath: r, zKeyFilePath: i, chainId: w } = s.payload.data, {
|
|
6
7
|
hostLocation: { origin: l },
|
|
7
8
|
constants: {
|
|
8
|
-
isDevelopment:
|
|
9
|
+
isDevelopment: g,
|
|
9
10
|
chains: { chainIds: $ }
|
|
10
11
|
}
|
|
11
|
-
} =
|
|
12
|
-
let t =
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
t =
|
|
12
|
+
} = s.metadata;
|
|
13
|
+
let t = r, a = i, n, c;
|
|
14
|
+
const h = t.startsWith("https://");
|
|
15
|
+
if (o && !h) {
|
|
16
|
+
p ? (t = `libs/hardhat/test/circuits/${r}`, a = `libs/hardhat/test/circuits/${i}`) : !p && g && (t = `test/circuits/${r}`, a = `test/circuits/${i}`);
|
|
17
|
+
const e = require("path");
|
|
18
|
+
t = e.resolve(t), a = e.resolve(a);
|
|
18
19
|
}
|
|
19
|
-
|
|
20
|
+
o && h ? (n = await y(t), c = await y(a)) : w === $.localhost && !o && (t = `${l}/${r}`, a = `${l}/${i}`);
|
|
20
21
|
try {
|
|
21
|
-
const { proof:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const { proof: e, publicSignals: f } = await u.groth16.fullProve(
|
|
23
|
+
d,
|
|
24
|
+
n ?? t,
|
|
25
|
+
c ?? a
|
|
26
|
+
), k = await u.groth16.exportSolidityCallData(e, f), F = JSON.parse(`[${k}]`);
|
|
27
|
+
m.postMessageToMainThread({ zkCallData: F, proof: e, publicSignals: f });
|
|
28
|
+
} catch (e) {
|
|
29
|
+
console.log(e);
|
|
25
30
|
}
|
|
26
31
|
};
|
|
27
|
-
|
|
32
|
+
m.attachWorkerSideOnMessage(x);
|
|
28
33
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
m as default,
|
|
35
|
+
x as onWorkerMessage
|
|
31
36
|
};
|