Skip to content

Instantly share code, notes, and snippets.

@ankushswar1
Last active July 23, 2022 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankushswar1/74d7856032951fb7063e778c41b19188 to your computer and use it in GitHub Desktop.
Save ankushswar1/74d7856032951fb7063e778c41b19188 to your computer and use it in GitHub Desktop.
Privy Quickstart Demo
import {PrivyClient} from '@privy-io/privy-node';
const PRIVY_API_KEY = '<retrieved from the Privy console>';
const PRIVY_API_SECRET = '<retrieved from the Privy console>';
export default async function quickstart() {
const client = new PrivyClient(PRIVY_API_KEY, PRIVY_API_SECRET);
await client.put('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B', 'first-name', 'Vitalik');
const result = await client.get('0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B', 'first-name');
console.log(result.text()); // Vitalik
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment