Last active
July 23, 2022 12:59
-
-
Save ankushswar1/74d7856032951fb7063e778c41b19188 to your computer and use it in GitHub Desktop.
Privy Quickstart Demo
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 {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