Skip to content

Commit 074f5ee

Browse files
Merge pull request #8 from RemarkableTools/dev
Dev to main
2 parents c524061 + a457e37 commit 074f5ee

File tree

6 files changed

+401
-139
lines changed

6 files changed

+401
-139
lines changed

src/Mx.NET.SDK/Mx.NET.SDK.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<RepositoryUrl>https://github.com/RemarkableTools/Mx.NET.SDK</RepositoryUrl>
1212
<RepositoryType>GitHub</RepositoryType>
1313
<Company>Remarkable Tools</Company>
14-
<Version>1.0.5</Version>
14+
<Version>1.0.6</Version>
1515
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1616
<Title>RemarkableTools.Mx</Title>
1717
<PackageReadmeFile>README.md</PackageReadmeFile>

src/Mx.NET.SDK/Provider/IMultiversxProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public interface IMultiversxProvider
129129
/// <param name="from">Number of items to skip for the result set</param>
130130
/// <param name="parameters">Parameters for query</param>
131131
/// <returns><see cref="NFTDto"/></returns>
132-
Task<NFTDto[]> GetAccountNFTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null);
132+
Task<AccountNftDto[]> GetAccountNFTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null);
133133

134134
/// <summary>
135135
/// Returns an array of owned NFTs/SFTs for a given address
@@ -156,7 +156,7 @@ public interface IMultiversxProvider
156156
/// <param name="address">Wallet address in bech32 format</param>
157157
/// <param name="nftIdentifier">Token identifier</param>
158158
/// <returns><see cref="NFTDto"/></returns>
159-
Task<NFTDto> GetAccountNFT(string address, string nftIdentifier);
159+
Task<AccountNftDto> GetAccountNFT(string address, string nftIdentifier);
160160

161161
/// <summary>
162162
/// Returns details about a specific NFT/SFT owned by a given address
@@ -174,7 +174,7 @@ public interface IMultiversxProvider
174174
/// <param name="from">Number of items to skip for the result set</param>
175175
/// <param name="parameters">Parameters for query</param>
176176
/// <returns><see cref="MetaESDTDto"/></returns>
177-
Task<MetaESDTDto[]> GetAccountMetaESDTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null);
177+
Task<AccountMetaESDTDto[]> GetAccountMetaESDTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null);
178178

179179
/// <summary>
180180
/// Returns an array of owned MetaESDTs for a given address
@@ -201,7 +201,7 @@ public interface IMultiversxProvider
201201
/// <param name="address">Wallet address in bech32 format</param>
202202
/// <param name="metaEsdtIdentifier">Token identifier</param>
203203
/// <returns><see cref="MetaESDTDto"/></returns>
204-
Task<MetaESDTDto> GetAccountMetaESDT(string address, string metaEsdtIdentifier);
204+
Task<AccountMetaESDTDto> GetAccountMetaESDT(string address, string metaEsdtIdentifier);
205205

206206
/// <summary>
207207
/// Returns details about a specific MetaESDT owned by a given address

src/Mx.NET.SDK/Provider/MultiversxProvider.cs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ public async Task<AccountTokenRoleDto> GetAccountTokenRole(string address, strin
179179
return result;
180180
}
181181

182-
public async Task<NFTDto[]> GetAccountNFTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null)
182+
public async Task<AccountNftDto[]> GetAccountNFTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null)
183183
{
184-
return await GetAccountNFTsCustom<NFTDto>(address, size, from, parameters);
184+
return await GetAccountNFTsCustom<AccountNftDto>(address, size, from, parameters);
185185
}
186186

187187
public async Task<NFT[]> GetAccountNFTsCustom<NFT>(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null)
@@ -190,7 +190,7 @@ public async Task<NFT[]> GetAccountNFTsCustom<NFT>(string address, int size = 10
190190
string args = "";
191191
if (parameters != null)
192192
args = $"&{string.Join("&", parameters.Select(e => $"{e.Key}={e.Value}"))}";
193-
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts?type={ESDTTokenType.NonFungibleESDT},{ESDTTokenType.SemiFungibleESDT}&from={from}&size={size}{args}");
193+
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts?excludeMetaESDT=true&from={from}&size={size}{args}");
194194
var content = await response.Content.ReadAsStringAsync();
195195
if (!response.IsSuccessStatusCode)
196196
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
@@ -204,22 +204,22 @@ public async Task<string> GetAccountNFTsCount(string address, Dictionary<string,
204204
string args = "";
205205
if (parameters != null)
206206
args = $"&{string.Join("&", parameters.Select(e => $"{e.Key}={e.Value}"))}";
207-
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts/count?type={ESDTTokenType.NonFungibleESDT},{ESDTTokenType.SemiFungibleESDT}{args}");
207+
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts/count?excludeMetaESDT=true{args}");
208208
var content = await response.Content.ReadAsStringAsync();
209209
if (!response.IsSuccessStatusCode)
210210
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
211211

212212
return content;
213213
}
214214

215-
public async Task<NFTDto> GetAccountNFT(string address, string nft)
215+
public async Task<AccountNftDto> GetAccountNFT(string address, string nftIdentifier)
216216
{
217-
return await GetAccountNFTCustom<NFTDto>(address, nft);
217+
return await GetAccountNFTCustom<AccountNftDto>(address, nftIdentifier);
218218
}
219219

220-
public async Task<NFT> GetAccountNFTCustom<NFT>(string address, string nft)
220+
public async Task<NFT> GetAccountNFTCustom<NFT>(string address, string nftIdentifier)
221221
{
222-
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts/{nft}");
222+
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts/{nftIdentifier}");
223223
var content = await response.Content.ReadAsStringAsync();
224224
if (!response.IsSuccessStatusCode)
225225
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
@@ -228,9 +228,9 @@ public async Task<NFT> GetAccountNFTCustom<NFT>(string address, string nft)
228228
return result;
229229
}
230230

231-
public async Task<MetaESDTDto[]> GetAccountMetaESDTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null)
231+
public async Task<AccountMetaESDTDto[]> GetAccountMetaESDTs(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null)
232232
{
233-
return await GetAccountMetaESDTsCustom<MetaESDTDto>(address, size, from, parameters);
233+
return await GetAccountMetaESDTsCustom<AccountMetaESDTDto>(address, size, from, parameters);
234234
}
235235

236236
public async Task<MetaESDT[]> GetAccountMetaESDTsCustom<MetaESDT>(string address, int size = 100, int from = 0, Dictionary<string, string> parameters = null)
@@ -261,14 +261,14 @@ public async Task<string> GetAccountMetaESDTsCount(string address, Dictionary<st
261261
return content;
262262
}
263263

264-
public async Task<MetaESDTDto> GetAccountMetaESDT(string address, string nft)
264+
public async Task<AccountMetaESDTDto> GetAccountMetaESDT(string address, string metaEsdtIdentifier)
265265
{
266-
return await GetAccountMetaESDTCustom<MetaESDTDto>(address, nft);
266+
return await GetAccountMetaESDTCustom<AccountMetaESDTDto>(address, metaEsdtIdentifier);
267267
}
268268

269-
public async Task<MetaESDT> GetAccountMetaESDTCustom<MetaESDT>(string address, string nft)
269+
public async Task<MetaESDT> GetAccountMetaESDTCustom<MetaESDT>(string address, string metaEsdtIdentifier)
270270
{
271-
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts/{nft}");
271+
var response = await _httpAPIClient.GetAsync($"accounts/{address}/nfts/{metaEsdtIdentifier}");
272272
var content = await response.Content.ReadAsStringAsync();
273273
if (!response.IsSuccessStatusCode)
274274
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
@@ -522,14 +522,14 @@ public async Task<NFT> GetNFTCustom<NFT>(string nftIdentifier)
522522
return result;
523523
}
524524

525-
public async Task<MetaESDTDto> GetMetaESDT(string nftIdentifier)
525+
public async Task<MetaESDTDto> GetMetaESDT(string metaEsdtIdentifier)
526526
{
527-
return await GetMetaESDTCustom<MetaESDTDto>(nftIdentifier);
527+
return await GetMetaESDTCustom<MetaESDTDto>(metaEsdtIdentifier);
528528
}
529529

530-
public async Task<MetaESDT> GetMetaESDTCustom<MetaESDT>(string nftIdentifier)
530+
public async Task<MetaESDT> GetMetaESDTCustom<MetaESDT>(string metaEsdtIdentifier)
531531
{
532-
var response = await _httpAPIClient.GetAsync($"nfts/{nftIdentifier}");
532+
var response = await _httpAPIClient.GetAsync($"nfts/{metaEsdtIdentifier}");
533533
var content = await response.Content.ReadAsStringAsync();
534534
if (!response.IsSuccessStatusCode)
535535
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
@@ -538,10 +538,10 @@ public async Task<MetaESDT> GetMetaESDTCustom<MetaESDT>(string nftIdentifier)
538538
return result;
539539
}
540540

541-
public async Task<AddressBalanceDto[]> GetNFTAccounts(string identifier, int size = 100, int from = 0)
541+
public async Task<AddressBalanceDto[]> GetNFTAccounts(string nftIdentifier, int size = 100, int from = 0)
542542
{
543543
size = size > 10000 ? 10000 : size;
544-
var response = await _httpAPIClient.GetAsync($"nfts/{identifier}/accounts?from={from}&size={size}");
544+
var response = await _httpAPIClient.GetAsync($"nfts/{nftIdentifier}/accounts?from={from}&size={size}");
545545
var content = await response.Content.ReadAsStringAsync();
546546
if (!response.IsSuccessStatusCode)
547547
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
@@ -550,20 +550,20 @@ public async Task<AddressBalanceDto[]> GetNFTAccounts(string identifier, int siz
550550
return result;
551551
}
552552

553-
public async Task<string> GetNFTAccountsCounter(string identifier)
553+
public async Task<string> GetNFTAccountsCounter(string nftIdentifier)
554554
{
555-
var response = await _httpAPIClient.GetAsync($"nfts/{identifier}/accounts/count");
555+
var response = await _httpAPIClient.GetAsync($"nfts/{nftIdentifier}/accounts/count");
556556
var content = await response.Content.ReadAsStringAsync();
557557
if (!response.IsSuccessStatusCode)
558558
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
559559

560560
return content;
561561
}
562562

563-
public async Task<AddressBalanceDto[]> GetMetaESDTAccounts(string identifier, int size = 100, int from = 0)
563+
public async Task<AddressBalanceDto[]> GetMetaESDTAccounts(string metaEsdtIdentifier, int size = 100, int from = 0)
564564
{
565565
size = size > 10000 ? 10000 : size;
566-
var response = await _httpAPIClient.GetAsync($"nfts/{identifier}/accounts?from={from}&size={size}");
566+
var response = await _httpAPIClient.GetAsync($"nfts/{metaEsdtIdentifier}/accounts?from={from}&size={size}");
567567
var content = await response.Content.ReadAsStringAsync();
568568
if (!response.IsSuccessStatusCode)
569569
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));
@@ -572,9 +572,9 @@ public async Task<AddressBalanceDto[]> GetMetaESDTAccounts(string identifier, in
572572
return result;
573573
}
574574

575-
public async Task<string> GetMetaESDTAccountsCounter(string identifier)
575+
public async Task<string> GetMetaESDTAccountsCounter(string metaEsdtIdentifier)
576576
{
577-
var response = await _httpAPIClient.GetAsync($"nfts/{identifier}/accounts/count");
577+
var response = await _httpAPIClient.GetAsync($"nfts/{metaEsdtIdentifier}/accounts/count");
578578
var content = await response.Content.ReadAsStringAsync();
579579
if (!response.IsSuccessStatusCode)
580580
throw new APIException(JsonWrapper.Deserialize<APIExceptionResponse>(content));

src/Mx.NET.SDK/TransactionsManager/EGLDTransactionRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static TransactionRequest EGLDTransfer(
3232
}
3333

3434
/// <summary>
35-
/// Create transaction request - EGLD Transfer to Smart Contract with default gas limit
35+
/// Create transaction request - EGLD Transfer to Smart Contract without gas limit
3636
/// </summary>
3737
/// <param name="networkConfig">MultiversX Network Configuration</param>
3838
/// <param name="account">Sender Account</param>

0 commit comments

Comments
 (0)