Skip to content

Instantly share code, notes, and snippets.

View ajtransak's full-sized avatar

NULL ajtransak

  • NULL
  • NULL
  • 00:27 (UTC -12:00)
View GitHub Profile
@ajtransak
ajtransak / index.html
Created February 6, 2025 06:07
Transak IFRAME Logout Events
<!-- This code embeds a Transak iframe in a webpage and provides a "Logout" button that,
when clicked, sends a postMessage event to the iframe to request a logout. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Transak Iframe Logout</title>
</head>
@ajtransak
ajtransak / offRampStreamSDK.js
Created December 20, 2024 13:12
Transak Sandbox
import React, { useEffect } from "react";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import { Transak } from "@transak/transak-sdk";
import config from "../config";
export default function OffRampStreamSDK() {
useEffect(() => {
const transakConfig = {
apiKey: config.apiKeyGlobalStaging,
@ajtransak
ajtransak / offRampStreamIFrame.js
Created December 20, 2024 13:11
Transak Sandbox
import React, { useEffect, useState } from "react";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import config from "../config";
export default function OffRampStreamIFrame() {
const [iframeSrc, setIframeSrc] = useState("");
useEffect(() => {
const baseUrl = "https://global-stg.transak.com";
@ajtransak
ajtransak / customisingThemeSDK.js
Created December 20, 2024 13:10
Transak Sandbox
import React, { useEffect } from "react";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import { Transak } from "@transak/transak-sdk";
import config from "../config";
export default function CustomisingThemeSDK() {
useEffect(() => {
const transakConfig = {
apiKey: config.apiKeyGlobalStaging,
@ajtransak
ajtransak / customisingThemeIFrame.js
Created December 20, 2024 13:10
Transak Playground
import React, { useEffect, useState } from "react";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import config from "../config";
export default function CustomisingThemeIFrame() {
const [iframeSrc, setIframeSrc] = useState("");
useEffect(() => {
const baseUrl = "https://global-stg.transak.com";
@ajtransak
ajtransak / index.js
Created September 24, 2024 13:47
Filter Networks for Crypto Symbol
const axios = require('axios');
const fs = require('fs');
const cryptoList = [
"SOL", "DAI", "EGLD", "ZIL", "ONE", "XLM", "SHIB", "VET", "ICP", "TON",
"PEPE", "CRO", "ATOM", "APE", "FLOW", "MNT", "XTZ", "MANA", "ALGO", "KSM",
"XEM", "NOT", "SEI", "HBAR", "SUSHI", "NEAR", "MKR", "BONK", "APT", "SUI",
"XDC", "CELO", "CHZ", "OSMO", "ZEN", "STX", "IOTA", "IMX", "KDA", "WRX",
"AR", "FLR", "GMX", "GLMR", "IOTX", "GLM", "KAVA", "ROSE", "ASTR", "INJ",
"CKB", "WAXP", "SUPER", "VRA", "ELF", "MASK", "VTHO", "LOOKS", "HIVE",
@ajtransak
ajtransak / WebhookJavaMavenApplication.java
Created August 29, 2024 10:09
Webhook Maven Decryption
package com.transak.webhookjavamaven;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.security.Keys;
import javax.crypto.SecretKey;
@ajtransak
ajtransak / webhookEventsIFrame.js
Last active December 20, 2024 13:08
Transak Sandbox
import React, { useEffect } from "react";
import { toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import config from "../config";
const logAndToast = (eventName, data, toastType = "info") => {
console.log(`${eventName}:`, JSON.stringify(data, null, 2));
toast[toastType](eventName, { position: "bottom-right", autoClose: 2000 });
@ajtransak
ajtransak / redirect.js
Last active October 16, 2024 13:16
Transak Sandbox
import React, { useState } from "react";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import Checkbox from "@mui/material/Checkbox";
import FormControlLabel from "@mui/material/FormControlLabel";
import config from "../config";
export default function Redirect() {
const [walletRedirection, setWalletRedirection] = useState(false);
@ajtransak
ajtransak / webhookEventsSDK.js
Last active December 20, 2024 13:09
Transak Sandbox
import React, { useEffect } from "react";
import { toast } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box";
import { Transak } from "@transak/transak-sdk";
import config from "../config";
function logAndToast(eventName, data, toastType = "info") {
console.log(`${eventName}:`, data);