Skip to content

vision-consensus/vision-java-sdk

develop
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
abi
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

vision-java-sdk

The VISION JAVA client library.

How to use

Gradle Setting

Add repo setting:

repositories {
    maven {
        url  "xxxxxx"
    }
}

Then add abi as dependency.

dependencies {
    ....

    implementation 'org.vision.visionjsdk:abi:0.1.1'
    implementation 'org.vision.visionjsdk:client:0.1.1'

    ....
}

Maven Settings

<dependency>
  <groupId>org.vision.visionjsdk</groupId>
  <artifactId>abi</artifactId>
  <version>0.1.1</version>
  <type>pom</type>
</dependency>

Construct Smart Contract Function Demo

Refer demo project.

/*
import java.math.BigInteger;
import java.util.*;

import FunctionEncoder;
import org.vision.visionjsdk.abi.datatypes.*;
import Bytes10;
import Uint256;
import Uint32;
*/


// Function(name, input, output)
Function function =
        new Function(
                "sam",
                Arrays.asList(
                        new DynamicBytes("dave".getBytes()),
                        new Bool(true),
                        new Address("VBZsQtsKdzFU5fLyHWeduQLHAw6HvSDd7i"),
                        new DynamicArray<>(
                                new Uint(BigInteger.ONE),
                                new Uint(BigInteger.valueOf(2)),
                                new Uint(BigInteger.valueOf(3)))),
                Collections.emptyList());
String encodedHex = FunctionEncoder.encode(function);

About

No description, website, or topics provided.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE.web3j

Stars

Watchers

Forks

Packages

No packages published

Languages