Skip to content

SKD for integration Aptos features to .NET and Unity platforms

License

Notifications You must be signed in to change notification settings

jamis-portto/aptos-sdk

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mirage Aptos SDK

SKD for integration Aptos features to .NET and Unity platforms

Aptos is a layer 1 blockchain bringing a paradigm shift to Web3 through better technology and user experience. Built with Move to create a home for developers building next-gen applications.

Installation

Build package

.NET

NuGet (coming soon)

dotnet add package AptosSDK --version 0.1.0

Paket

You can reference the library in the paket.dependencies file:

paket git [email protected]:mirage-xyz/aptos-sdk.git

To read more about Paket options read the link below.

You can build package

dotnet build

or download it from releases;

References

To get references documentation please follow the link.

Examples

Transfer coins

string NodeUrl = "https://fullnode.devnet.aptoslabs.com";
string FaucetUrl = "https://faucet.devnet.aptoslabs.com";

Client client = new Client(NodeUrl);
FaucetClient faucetClient = new FaucetClient(FaucetUrl, _client);
TokenClient tokenClient = new TokenClient(_client);

var from = new Account();
var to = new Account();

await _faucetClient.FundAccount(from, TopUpAmount);

var pendingTransaction = await _coinClient.Transfer(from, to, 1000);

var awaiter = new TransactionAwaiter(_client);
var transaction = await awaiter.WaitForTransactionWithResult(pendingTransaction.Hash);

Create and transfer token

Create collection

var description = "Collection for test";
var uri = "https://mirage.xyz/";
var collectionName = "Mirage Aptos SDK";

var transaction = await tokenClient.CreateCollection(from, collectionName, description, uri);

var collectionData = await _tokenClient.GetCollectionData(_from.Address, _collectionName);

Create token

var tokenName = "Mirages's first token";
var tokenDescription = "Mirages's simple token";
var transaction = await tokenClient.CreateToken(
	from,
	collectionName,
	tokenName,
	tokenDescription,
	1,
	"https://mirage.xyz/_next/static/videos/video-desktop-8511e2ee740953e08e74b95f401399f7.webm"
);

var tokenData = await tokenClient.GetTokenData(_from.Address, _collectionName, _tokenName);

To get more examples check examples project.

About

SKD for integration Aptos features to .NET and Unity platforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 94.0%
  • CSS 3.6%
  • JavaScript 2.4%