# Workflow & References

### Workflow / Script References <a href="#heading-h.3znysh7" id="heading-h.3znysh7"></a>

**Puppy Gaming/Scripts/Plugins/solana.jslib**

This file contains all the code needed for the WebGL player and also the code needed to log into the wallet from the selected chain, then loading all the wallets NFTs and finally grabbing the metadata from them and sending them to the `CryptoReceiver` GameObject in your scene. The functions in this file are commented for easier understanding.

**Puppy Gaming/Prefabs/CryptoReceiver.cs**

The `CryptoReceiver` prefab should be placed in your first Scene when the player would be logging into their wallet, it will persist across scenes so no need to add it anywhere else.

The `CryptoReceiver` script receives the data from the Login request process and puts the metadata from each NFT into a `CryptoNFT` ScriptableObject and then instantiates that object in the `MyNFTs` List from the `ReceiveNFT()` function. This list can be accessed by any other script with `CryptoReceiver.CR.myNFTs`

The current accessible data from a `CryptoNFT` object is;

`.nftName` - The NFTs name,

`.spritelink` - The image URL for the NFT,

`.description` - The collections description.

(more metadata to be added)

It also creates a list of NFT Public Addresses that can be found in `CryptoReceiver.CR.myTokens` which helps if you don’t need to grab metadata and just want to use the Addresses for comparisons.

You can get the user’s Wallet Address from `CryptoReceiver.CR.walletAddress` and a shortened version of the address for in-game display like ‘AaAa….BbBb’ from `CryptoReceiver.CR.shortAddress`

You can check whether the address has been collected with `CryptoReceiver.CR.isConnected` bool


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://puppy-gaming.gitbook.io/simple-crypto-webgl-templates/workflow-and-references.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
