This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useEffect, useState } from "react"; | |
import Haiex from "haiex-sdk"; | |
const GELATO_KEY = ""; | |
const MAGIC_KEY = ""; | |
const INFURA_KEY = ""; | |
let haiex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"clientNumber":1, | |
"details":{ | |
"officeId":1, | |
"clientType":"Customer", | |
"status":"Active", | |
"isPersonal":true, | |
"isCommercial":false, | |
"isLifeHealth":false, | |
"allowCrossSell":false, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Form":{ | |
"Id":"3", | |
"InternalName":"GayaPLInsuranceForm", | |
"Name":"Gaya PL Insurance Form" | |
}, | |
"$version":8, | |
"$etag":"W/\"datetime'2024-03-12T16%3A33%3A07.8291841Z'\"", | |
"Date":"2024-03-01", | |
"HowDidYouFindUs":"Google", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractObjects = (arrayString) => { | |
const objectPattern = /{[^{}]*}/g; | |
const objects = arrayString.match(objectPattern); | |
if (objects) { | |
const parsedObjects = objects.map((objString) => { | |
try { | |
return JSON.parse(objString); | |
} catch (error) { | |
console.error("Error parsing object:", error); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Stripe = require("stripe"); | |
const { STRIPE_SECRET_KEY } = process.env; | |
const stripe = Stripe(STRIPE_SECRET_KEY); | |
const [planA, planB, planC] = [ | |
"price_1Mj4hPI4ImfNjweeB0fXE9xA", | |
"price_1Mj4hPI4ImfNjweehhxUwzUh", | |
"price_1Mj4hQI4ImfNjweeP0q6iEuK", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const { createPayment, getCaptureById } = require('./moncash-api'); | |
const app = express(); | |
// API route to create payment | |
app.get('/payment/create', createPayment); // Parameters: amount, orderId | |
// API route to get capture by ID | |
app.get('/capture/getById', getCaptureById); // Parameters: orderId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const callElevenLabsTextToSpeechAPI = async (text) => { | |
if (!text) return "Text parameter can't be null"; | |
const [rachel, anntoni] = ["21m00Tcm4TlvDq8ikWAM", "ErXwobaYiN019PkySvjV"]; | |
const url = `https://api.elevenlabs.io/v1/text-to-speech/${rachel}`; | |
const apiKey = process.env.ELEVENLABS_KEY; | |
const headers = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1 | |
yarn add react-native-sse | |
yarn add react-native-url-polyfill | |
//2 | |
import EventSource from "react-native-sse"; | |
import "react-native-url-polyfill/auto"; | |
//3 | |
const OPENAI_KEY = '<your-openai-api-key>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract Fiat is ERC20, ERC20Burnable, Ownable { | |
constructor() ERC20("Fiat", "FIAT") { | |
_mint(msg.sender, 1000 * 10 ** decimals()); |