Skip to content

Instantly share code, notes, and snippets.

View rafinskipg's full-sized avatar
🏠
Working from home

Venture rafinskipg

🏠
Working from home
View GitHub Profile

We have released a new beta version that includes a connection modal. This modal can be customized to support different login methods. It also changes the configuration interface, so you will need to adapt in some places:

import { PhantomProvider, useModal, darkTheme, usePhantom } from "@phantom/react-sdk";
import { AddressType } from "@phantom/browser-sdk";

function App() {
  return (
    <PhantomProvider

Phantom SDK Integration Guide

This guide will help you integrate Phantom's SDK to enable users to connect with Google (user wallets) or via the Phantom browser extension/mobile app.

Overview

When a user clicks the Phantom button in your existing modal, they will have two options:

  1. Continue with Google - Creates a non-custodial user wallet authenticated via Google
  2. Connect via Extension/App - Connects to the user's existing Phantom browser extension or mobile app
title description
Wallet Authentication with JWTs
Implementing wallet authentication with message signing and JWT generation

Wallet Authentication with JWTs

Complete guide for implementing wallet authentication with direct message signing and JWT generation.

Overview

@rafinskipg
rafinskipg / connect.md
Last active October 22, 2025 16:39
Connect with phantom

Integrating Phantom React SDK with a Custom Connect Modal

This guide shows how to integrate the Phantom React SDK into your dapp when you have your own custom connect modal.

Installation

npm install @phantom/react-sdk
# or
yarn add @phantom/react-sdk

Phantom Wallet Authentication Guide

Complete guide for implementing wallet authentication with message signing and JWT generation.


Overview

This authentication system uses cryptographic message signing to verify wallet ownership without requiring passwords. The flow generates a challenge, has the user sign it with their wallet, and returns a JWT token for authenticated API requests.

@rafinskipg
rafinskipg / export.gs
Last active May 25, 2022 12:37
Export Tags MakerDAO Gov Polls
/**
* @OnlyCurrentDoc
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var menuEntries = [
{name: "Export Tags", functionName: "exportSheet"},
{name: "Export Tag Definition", functionName: "exportTagDefinition"}
];

0x1709b2ce35876503e5af34cbfc2716d4fad2cb900d684bb14f1f84f3eeafb6fb

type FileNft = {
path: string,
name: string
}
export async function storeDirectory(files: FileNft[]) {
try {
const client = new NFTStorage({
token: process.env.NFT_STORAGE_KEY as string,
const description = "My nft is cool, this is the image number: 1"
const attributes = [{
trait_type: 'Hair',
value: 'None'
}]
const dataNft = await uploadNFTStorage(`./output/images/${items[i].tokenId}.png`, `${items[i].tokenId}`, description, attributes);
const info: TokenIpfs = {
name: 'Image 1',
type NftResponse = {
url: string,
ipnft: string,
ipfsImage: string,
hostedImage: string
}
export async function uploadNFTStorage(
path: string,