UNPKG

@goat-sdk/plugin-betswirl

Version:

<div align="center"> <a href="https://github.com/goat-sdk/goat">

2 lines (1 loc) 1.29 kB
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUPIHVNMVjs = require('./chunk-UPIHVNMV.js');var _chunkGAGGONOHjs = require('./chunk-GAGGONOH.js');var _chunkEI7MMDWYjs = require('./chunk-EI7MMDWY.js');var _core = require('@goat-sdk/core');var _zod = require('zod');var _sdkcore = require('@betswirl/sdk-core');function k(e,b){return _core.createTool.call(void 0, {name:"betswirl_coinToss",description:"Flip a coin on BetSwirl. The player is betting that the rolled face will be the one chosen. The user input also contains the bet amount (in ether unit), and the token symbol.",parameters:_zod.z.object({face:_zod.z.nativeEnum(_sdkcore.COINTOSS_FACE).describe("The face of the coin"),..._chunkGAGGONOHjs.b,..._chunkGAGGONOHjs.c.call(void 0, _sdkcore.CASINO_GAME_TYPE.COINTOSS)})},async t=>{let o=t.face,n=await _chunkUPIHVNMVjs.a.call(void 0, e,t.token),f=_chunkUPIHVNMVjs.b.call(void 0, t.betAmount,n),d=await _chunkUPIHVNMVjs.c.call(void 0, e,_sdkcore.CASINO_GAME_TYPE.COINTOSS,_sdkcore.CoinToss.encodeInput(o),_sdkcore.CoinToss.getMultiplier(o),{betAmount:f,betToken:n,betCount:1,receiver:e.getAddress(),stopGain:0n,stopLoss:0n});return await _chunkUPIHVNMVjs.d.call(void 0, e,d,b)})}_chunkEI7MMDWYjs.a.call(void 0, k,"createCoinTossTool");exports.a = k;