index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <script setup lang="ts">
  2. /* Import modules. */
  3. import { binToHex } from '@nexajs/utils'
  4. import { decodeAddress } from '@nexajs/address'
  5. useHead({
  6. title: 'Fairplay — Nexa Games',
  7. meta: [
  8. { name: 'description', content: 'Nexa Gaming offers a revolutionary blockchain experience.' }
  9. ],
  10. })
  11. const router = useRouter()
  12. const playid = ref(null)
  13. const load = async () => {
  14. let play
  15. play = await $fetch(`/api/plays/${playid.value}`)
  16. .catch(err => console.error(err))
  17. if (typeof play === 'undefined') {
  18. const decoded = decodeAddress(playid.value)
  19. const hash = binToHex(decoded.hash)
  20. const pubKeyHash = hash.slice(8)
  21. play = await $fetch(`/api/plays/${pubKeyHash}`)
  22. .catch(err => console.error(err))
  23. console.log('(re-)PLAY', play)
  24. }
  25. console.log('PLAY', play)
  26. if (play?.id) {
  27. router.push(`/fairplay/${play.id}`)
  28. } else {
  29. alert('Your Play ID is inavlid!')
  30. }
  31. }
  32. </script>
  33. <template>
  34. <main class="max-w-5xl mx-auto my-10 px-3">
  35. <h1 class="text-5xl font-medium">
  36. Fairplay
  37. </h1>
  38. <h3 class="my-5 text-2xl lg:text-3xl lg:w-3/4 font-medium text-indigo-500">
  39. A fair shot at winning is everything a player wants from any gambling game.
  40. </h3>
  41. <div class="flex flex-col lg:flex-row items-start gap-4">
  42. <div class="order-2 lg:order-none">
  43. <p class="my-5">
  44. We all want to play at fair, trustworthy online gambling sites.
  45. </p>
  46. <p class="my-5">
  47. The Crypto gambling community has come up with its own way of proving that games are fair.
  48. As you might expect, with this being specific to Crypto, it doesn’t require you to trust a third party, it makes games totally transparent, and it makes use of advanced cryptography to ensure game outcomes haven’t been tampered with.
  49. Using the provably fair method, you can verify the results for yourself in real time.
  50. </p>
  51. <p class="my-5">
  52. But what exactly is provably fair gambling? How does it work? Why does it make Crypto gambling so transparent? We’re going to explore all of that here.
  53. As you’ll see, the ramifications of provably fair gambling are revolutionary.
  54. </p>
  55. <p class="my-5">
  56. Much like Crypto itself, provably fair solutions work on the problem of trust.
  57. You no longer need a middleman or third party to verify that a casino’s algorithm is fair.
  58. Since you have intervened in the process of a game outcome by providing a seed which changes something, the casino is no longer fully in control.
  59. </p>
  60. <p class="my-5">
  61. You should never trust any online entity at face value.
  62. Luckily for casino players, there are third parties set up with the sole purpose of verifying the published payout figures through testing.
  63. eCOGRA is an example of one such third party.
  64. This organization tests many casino games and published reports on whether or not the claims of the software providers match up with the facts.
  65. </p>
  66. <p class="my-5">
  67. We all want to play at fair, trustworthy online gambling sites.
  68. </p>
  69. <section class="hidden">
  70. <h2 class="text-xl font-medium">
  71. Hashes Lists <em>(by Epoch)</em>
  72. </h2>
  73. <blockquote class="text-sm text-gray-500 w-1/2">
  74. Hashes and attestations may be independently verified by ANY available <span class="text-indigo-500 font-medium">SHA-512</span> or <span class="text-indigo-500 font-medium">SHA-1</span> calculators.
  75. We recommend <NuxtLink to="https://md5file.com/calculator" target="_blank" class="text-blue-500 font-medium hover:underline">https://md5file.com/calculator</NuxtLink> and <NuxtLink to="https://emn178.github.io/online-tools/sha1.html" target="_blank" class="text-blue-500 font-medium hover:underline">https://emn178.github.io/online-tools/sha1.html</NuxtLink> respectively.
  76. </blockquote>
  77. <ol class="mt-5">
  78. <li class="w-fit px-3 py-2 bg-purple-100 border-2 border-purple-300 rounded-lg shadow-md">
  79. <h2 class="text-base text-purple-500 font-medium uppercase">
  80. Epoch #1
  81. </h2>
  82. <div class="pl-5">
  83. <a href="/hashes/0001_public.txt" class="block text-blue-500 font-medium hover:underline">
  84. 0001_public.txt
  85. </a>
  86. <a href="/hashes/0001_public_checksum.txt" class="block text-blue-500 font-medium hover:underline">
  87. 0001_public_checksum.txt
  88. </a>
  89. <NuxtLink to="/epoch/1" class="block text-blue-500 font-medium hover:underline">
  90. Attestation
  91. </NuxtLink>
  92. </div>
  93. <section class="mt-2 w-full lg:w-96 px-3 py-1 border-2 border-purple-900 bg-purple-700 rounded-lg shadow">
  94. <h3 class="text-purple-100 text-lg font-medium">
  95. SHA-512 Proof
  96. </h3>
  97. <h3 class="text-purple-100 font-medium text-xs truncate">
  98. 6cf09a52bf6638df7f3686af6150341bc551648b50c7393bf94b2d105c78f97eca71b048d8f6d18e0e3c26f42b5a46f6e82d6db41c71f9f328c28783de600886
  99. </h3>
  100. </section>
  101. </li>
  102. </ol>
  103. </section>
  104. </div>
  105. <div class="w-full order-1 lg:w-96 py-5 flex flex-col justify-center gap-4">
  106. <input
  107. type="text"
  108. v-model="playid"
  109. placeholder="Type or copy/paste your Play ID here"
  110. class="w-full lg:w-96 py-2 px-5 bg-yellow-100 border-2 border-yellow-300 text-lg text-yellow-900 placeholder-yellow-900 rounded-lg"
  111. />
  112. <button @click="load" class="py-2 bg-blue-200 border-2 border-blue-400 text-2xl font-medium rounded-lg shadow hover:bg-blue-300">
  113. Load Play
  114. </button>
  115. </div>
  116. </div>
  117. </main>
  118. </template>