[#60] Wallet tools in SDK
Some checks failed
DCO / DCO (pull_request) Successful in 21s
lint-build / dotnet8.0 (pull_request) Successful in 43s
lint-build / dotnet8.0 (push) Has been cancelled

Signed-off-by: Pavel Gross <p.gross@yadro.com>
This commit is contained in:
Pavel Gross 2025-04-11 15:52:31 +03:00
parent 42f4507638
commit 5f451c8818
14 changed files with 296 additions and 1 deletions

View file

@ -0,0 +1,30 @@
{
"version": "1.0",
"accounts": [
{
"address": "NWeByJPgNC97F83hTUnSbnZSBKaFvk5HNw",
"key": "6PYVCcS2yp89JpcfR61FGhdhhzyYjSErNedmpZErnybNTxUZMRdhzJLrek",
"label": "",
"contract": {
"script": "DCEDJOdiiPy5ABANAYAqFO+XfMpFrQc1YSMERt8Us0TIWLZBVuezJw==",
"parameters": [
{
"name": "parameter0",
"type": "Signature"
}
],
"deployed": false
},
"lock": false,
"isDefault": false
}
],
"scrypt": {
"n": 16384,
"r": 8,
"p": 8
},
"extra": {
"Tokens": null
}
}

View file

@ -0,0 +1,25 @@
using System.Diagnostics.CodeAnalysis;
using System.Text;
using FrostFS.SDK.Client;
namespace FrostFS.SDK.Tests.Unit;
[SuppressMessage("Reliability", "CA2007:Consider calling ConfigureAwait on the awaited task", Justification = "Default Value is correct for tests")]
public class WalletTest : SessionTestsBase
{
[Fact]
public void TestWallet()
{
var password = Encoding.UTF8.GetBytes("");
var d = Directory.GetCurrentDirectory();
var path = ".\\..\\..\\..\\TestData\\wallet.json";
Assert.True(File.Exists(path));
var content = File.ReadAllText(path);
var wif = WalletTools.GetWifFromWallet(content, password);
Assert.Equal("KzPXA6669m2pf18XmUdoR8MnP1pi1PMmefiFujStVFnv7WR5SRmK", wif);
}
}