-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update Algorand .NET SDK to 0.2.0.9 - Add Template to start - Fix some minor issue
- Loading branch information
Showing
11 changed files
with
129 additions
and
74 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
Empty file modified
0
Assets/AlgorandUnitySDK/Scenes/Scripts/StartGameCryptoStore.cs
100644 → 100755
Empty file.
Empty file modified
0
Assets/AlgorandUnitySDK/Scenes/Scripts/StartGameCryptoStore.cs.meta
100644 → 100755
Empty file.
66 changes: 66 additions & 0 deletions
66
Assets/AlgorandUnitySDK/Scenes/Scripts/TemplateSDKAlgorand.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
using UnityEngine; | ||
|
||
public class TemplateSDKAlgorand : MonoBehaviour | ||
{ | ||
[TextArea] | ||
public string NewAccount = string.Empty; | ||
public string NewAddress = string.Empty; | ||
//Internal Password | ||
private const string _InternalPassword = "0sIhlNRkMfDH8J9cC0Ky"; | ||
|
||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
//Check if encrypted Playprefs is loaded | ||
if (!PlayerPrefs.HasKey("AlgorandAccountSDK")) | ||
{ | ||
string TestPassPhrase = "course claim donor embark section tribe latin quiz few version solid pizza thought snake often mandate brand act useful reopen speak palace disorder ability amount"; | ||
//Load Algorand Account from encrypted PlayerPrefs | ||
AlgorandManager.Instance.LoadAccountFromPassphrase(TestPassPhrase); | ||
NewAddress = AlgorandManager.Instance.GetAddressAccount(); | ||
//Show Algorand Account Address | ||
Debug.Log(NewAddress); | ||
//Get Mnemonic Algorand Account Passphrase | ||
Debug.Log(AlgorandManager.Instance.GetMnemonicPassphrase()); | ||
NewAccount = AlgorandManager.Instance.GetMnemonicPassphrase(); | ||
//Get Algorand Account Address from AlgorandManager Instances | ||
Debug.Log(AlgorandManager.Instance.GetAddressAccount()); | ||
//Verify Algorand Account Address passed | ||
Debug.Log("Valid Algorand Address: " + AlgorandManager.Instance.AddressIsValid(NewAddress)); | ||
//Show URL ENDPOINT ALGOD | ||
Debug.Log("URL ENDPOINT: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT); | ||
//Show URL ENDPOINT INDEXER | ||
Debug.Log("URL ENPOINT INDEXER: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT_INDEXER); | ||
//Show Token Used | ||
Debug.Log("Token Used: " + AlgorandManager.Instance.ALGOD_TOKEN); | ||
//SaveData | ||
AlgorandManager.Instance.SaveAccountInPlayerPrefs(NewAccount); | ||
} | ||
else | ||
{ | ||
//Delete all PlayPrefs | ||
AlgorandManager.Instance.DeleteAccountFromPlayerPrefs(); | ||
string TestPassPhrase = "course claim donor embark section tribe latin quiz few version solid pizza thought snake often mandate brand act useful reopen speak palace disorder ability amount"; | ||
//Load Algorand Account from encrypted PlayerPrefs | ||
AlgorandManager.Instance.LoadAccountFromPassphrase(TestPassPhrase); | ||
NewAddress = AlgorandManager.Instance.GetAddressAccount(); | ||
//Show Algorand Account Address | ||
Debug.Log(NewAddress); | ||
//Get Mnemonic Algorand Account Passphrase | ||
Debug.Log(AlgorandManager.Instance.GetMnemonicPassphrase()); | ||
NewAccount = AlgorandManager.Instance.GetMnemonicPassphrase(); | ||
//Get Algorand Account Address from AlgorandManager Instances | ||
Debug.Log(AlgorandManager.Instance.GetAddressAccount()); | ||
//Verify Algorand Account Address passed | ||
Debug.Log("Valid Algorand Address: " + AlgorandManager.Instance.AddressIsValid(NewAddress)); | ||
//Show URL ENDPOINT ALGOD | ||
Debug.Log("URL ENDPOINT: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT); | ||
//Show URL ENDPOINT INDEXER | ||
Debug.Log("URL ENPOINT INDEXER: " + AlgorandManager.Instance.ALGOD_URL_ENDPOINT_INDEXER); | ||
//Show Token Used | ||
Debug.Log("Token Used: " + AlgorandManager.Instance.ALGOD_TOKEN); | ||
//SaveData | ||
AlgorandManager.Instance.SaveAccountInPlayerPrefs(NewAccount); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Assets/AlgorandUnitySDK/Scenes/Scripts/TemplateSDKAlgorand.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
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
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