@@ -22,6 +22,7 @@ using FSignature = FUnsizedData;
2222using TransactionID = FString;
2323
2424class UProvider ;
25+ class USequenceIndexer ;
2526class USequenceRPCManager ;
2627
2728UENUM (Blueprintable)
@@ -38,96 +39,9 @@ class SEQUENCEPLUGIN_API USequenceWallet : public UObject
3839{
3940 GENERATED_BODY ()
4041
41- virtual void Deinitialize () override ;
42- private:
43- UPROPERTY ()
44- USequenceRPCManager * SequenceRPCManager;
45-
46- UPROPERTY ()
47- UIndexer * Indexer;
48-
49- UPROPERTY ()
50- UProvider * Provider;
51-
52- UPROPERTY ()
53- FCredentials_BE Credentials;
54-
55- UPROPERTY ()
56- ESessionState SessionState = ESessionState::Unchecked;
57-
5842public:
5943 USequenceWallet ();
60-
61- /* *
62- * Gets the SequenceWallet SubSystem,
63- * this call will attempt to automatically load stored credentials on disk if any.
64- * @return TOptional<USequenceWallet*> Initialized USequenceWallet
65- */
66- static TOptional<USequenceWallet*> Get ();
6744
68- /* *
69- * Gets the SequenceWallet SubSystem and initialize it with the given credentials
70- * @param Credentials Credentials used to Initiate USequenceWallet
71- * @return TOptional<USequenceWallet*> Initialized USequenceWallet
72- */
73- static TOptional<USequenceWallet*> Get (const FCredentials_BE& Credentials);
74-
75- /* *
76- * Gets the SequenceWallet SubSystem and initializes it with the given credentials & ProviderUrl
77- * @param Credentials Credentials used to Initiate USequenceWallet
78- * @param ProviderUrl ProviderUrl used to Initiate USequenceWallet
79- * @return TOptional<USequenceWallet*> Initialized USequenceWallet
80- */
81- static TOptional<USequenceWallet*> Get (const FCredentials_BE& Credentials, const FString& ProviderUrl);
82-
83- /* *
84- * Gets all networks in the system
85- * @return TArray of all networks
86- */
87- static TArray<FIdNamePair> GetAllNetworks ();
88-
89- /* *
90- * Gets all Network Names supported by sequence
91- * @return A list of all network names in the system
92- */
93- static TArray<FString> GetAllNetworkNames ();
94-
95- /* *
96- * Gets a list of all network Ids support by sequence
97- * @return A list of all network ids in the system
98- */
99- static TArray<int64> GetAllNetworkIds ();
100-
101- /* *
102- * Pass in a network Id and receive the name associated with that Id
103- * @param NetworkIdIn The Id associated with the Network Name
104- * @return The matching network name, OR an empty FString if nothing was found
105- */
106- static FString GetNetworkName (const int64 NetworkIdIn);
107-
108- /* *
109- * Gets the associated Network Id with the given Network Name
110- * @param NetworkNameIn The network's name
111- * @return The associated Id, if none was found returns -1
112- */
113- static int64 GetNetworkId (const FString& NetworkNameIn);
114-
115- /* *
116- * Converts a decimal value like 3.2 and converts it into an amount that the system uses to sendTransactions with
117- * @param AmountIn The User readable decimal amount ie) 3.2
118- * @param DecimalsIn The Decimals value associated with the token, IE) USDC is 6
119- * @return The Converted Decimals amount
120- */
121- static int64 GetSystemReadableAmount (const float AmountIn, const int64 DecimalsIn);
122-
123- /* *
124- * Takes a Received amount and converts it into a user readable amount
125- * @param AmountIn The received System amount
126- * @param DecimalsIn The decimal value associated with the Token IE) USDC is 6
127- * @return The user readable amount
128- */
129- static float GetUserReadableAmount (const int64 AmountIn, const int64 DecimalsIn);
130-
13145 /* *
13246 * Check if the wallet and stored credentials are registered to a valid session with the Sequence API
13347 * @return true if the wallet is signed in to Sequence API
@@ -301,4 +215,7 @@ class SEQUENCEPLUGIN_API USequenceWallet : public UObject
301215
302216 UPROPERTY ()
303217 UCredentialsStorage* CredentialsStorage;
218+
219+ UPROPERTY ()
220+ ESessionState SessionState = ESessionState::Unchecked;
304221};
0 commit comments