Skip to main content

Installation

arseedingsdk4j serves as a java SDK for Arseeding nodes, facilitating developers to develop java backend services.

Repository: :arseedingsdk4j

maven:

<dependency>
<groupId>com.github.permadao</groupId>
<artifactId>arseedingsdk4j-sdk</artifactId>
<version>${latest-version}</version>
</dependency>

Usage

When using the Web3infra service, you will need to have an Ethereum wallet or Arweave wallet. The wallet will be used to sign your data and will also be used to pay for the fees consumed by the storage. Then start sdk client

Ethereum wallet creation

use wallet file

String fileName = "your file";
Wallet ethereumWallet1 =
EthereumWallet.loadEthereumWallet("your password", new File(fileName));

use private key

Wallet ethereumWallet2 =
EthereumWallet.loadEthereumWallet("your private key");

Arweave Wallet Creation

Arweave wallets can be created using java, the official Arweave SDK currently recommended by Arweave, which is installed as follows:

Wallet arweaveWallet = 
ArweaveWallet.loadArWallet("your file path");

Sdk Client Creation

ArSeedingService arSeedingService =
new HttpArSeedingService(arseedUrl, payUrl);
ArSDK arSDK = ArHttpSDK.buildArHttpSDK(arSeedingService, ethereumWallet);

See above for details on payUrl and arseedUrl.

More

See Bundle use case, Manifest use case for more details on how to use the SDK.