@betorigami/games 1.12.4 → 1.12.5
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/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11342,7 +11342,7 @@ var Wi=Object.create;var{getPrototypeOf:Xi,defineProperty:x5,getOwnPropertyNames
|
|
|
11342
11342
|
.resultSegment=${this.resultSegment}
|
|
11343
11343
|
></origami-wheel-layout>
|
|
11344
11344
|
</origami-game-layout>
|
|
11345
|
-
`}}c([$()],Ra.prototype,"isManualPlaying",void 0),c([$()],Ra.prototype,"history",void 0),c([$()],Ra.prototype,"wheelRisk",void 0),c([$()],Ra.prototype,"numberOfSegments",void 0),c([$()],Ra.prototype,"targetAngle",void 0),c([$()],Ra.prototype,"resultSegment",void 0),c([$()],Ra.prototype,"isWheelSpinning",void 0),c([n1("origami-wheel-manual")],Ra.prototype,"_wheelManualEl",void 0),c([n1("origami-wheel-auto")],Ra.prototype,"_wheelAutoEl",void 0),Ra=c([W("origami-wheel-game")],Ra);class t5{authToken;baseUrl;constructor(a,i){this.authToken=a,this.baseUrl=i+"/games/plinko"}async startBet(a){try{let i=await fetch(`${this.baseUrl}/play`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`,"X-Origami-Trace":M1()},body:JSON.stringify({currency:a.currency,amount:a.amount,gameInputs:{riskLevel:a.riskLevel,numberOfRows:a.rowCount}})}),r=await i.json();if(i.ok&&!!r.id)return{success:!0,data:r};let e="alerts.gameError";switch(r?.errorCode){case"INSUFFICIENT_BALANCE":e="alerts.insufficientBalance";break;case"LIMIT_REACHED":e="alerts.betLimitReached";break}return{success:!1,error:q(e,a.language)}}catch(i){return{success:!1,error:q("alerts.gameError",a.language)}}}}class h5{edge;constructor(a){this.edge=a}async startBet(a){let{amount:i,currency:r,riskLevel:e,rowCount:n}=a,l=m4[this.edge][e][n],o=
|
|
11345
|
+
`}}c([$()],Ra.prototype,"isManualPlaying",void 0),c([$()],Ra.prototype,"history",void 0),c([$()],Ra.prototype,"wheelRisk",void 0),c([$()],Ra.prototype,"numberOfSegments",void 0),c([$()],Ra.prototype,"targetAngle",void 0),c([$()],Ra.prototype,"resultSegment",void 0),c([$()],Ra.prototype,"isWheelSpinning",void 0),c([n1("origami-wheel-manual")],Ra.prototype,"_wheelManualEl",void 0),c([n1("origami-wheel-auto")],Ra.prototype,"_wheelAutoEl",void 0),Ra=c([W("origami-wheel-game")],Ra);class t5{authToken;baseUrl;constructor(a,i){this.authToken=a,this.baseUrl=i+"/games/plinko"}async startBet(a){try{let i=await fetch(`${this.baseUrl}/play`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.authToken}`,"X-Origami-Trace":M1()},body:JSON.stringify({currency:a.currency,amount:a.amount,gameInputs:{riskLevel:a.riskLevel,numberOfRows:a.rowCount}})}),r=await i.json();if(i.ok&&!!r.id)return{success:!0,data:r};let e="alerts.gameError";switch(r?.errorCode){case"INSUFFICIENT_BALANCE":e="alerts.insufficientBalance";break;case"LIMIT_REACHED":e="alerts.betLimitReached";break}return{success:!1,error:q(e,a.language)}}catch(i){return{success:!1,error:q("alerts.gameError",a.language)}}}}class h5{edge;constructor(a){this.edge=a}async startBet(a){let{amount:i,currency:r,riskLevel:e,rowCount:n}=a,l=m4[this.edge][e][n],o=Array.from({length:n},()=>Math.random()<0.5?0:1),h=o.reduce((k,s)=>k+s,0),t=l[h]??0,d=I(i).mul(t).toString(),u={id:crypto.randomUUID(),tenantId:"origami-casino",userId:"mock-user",tenantUserId:"mock-user",gameId:"PLINKO",currency:r,amount:i,payout:d,afterBalance:"1000",multiplier:t.toString(),clientSeed:"mock-seed",randomValue:"mock-random",proof:"mock-proof",nonce:1,betActions:[{id:crypto.randomUUID(),data:{PLINKO:{riskLevel:e,numberOfRows:n}},type:"START_BET",actionIndex:0,betAmount:i,payoutAmount:null},{id:crypto.randomUUID(),data:{PLINKO:{result:o}},type:"END_BET",actionIndex:1,betAmount:null,payoutAmount:d}]};return await h1(250),{success:!0,data:u}}}var Ii=P`
|
|
11346
11346
|
:host {
|
|
11347
11347
|
width: 100%;
|
|
11348
11348
|
height: 100%;
|