Giter Club home page Giter Club logo

solanaj's Introduction

solanaj's People

Contributors

ajamaica avatar b1acksun avatar busligisti avatar dependabot[bot] avatar elkinsd96 avatar hoakbuilds avatar itsmelodewyk avatar jacobcreech avatar nfm1337 avatar nickshtefan avatar skynetcap avatar tiago18c avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

solanaj's Issues

Docking jup problem

// deserialize the transaction
const swapTransactionBuf = Buffer.from(swapTransaction, 'base64');
var transaction = VersionedTransaction.deserialize(swapTransactionBuf);
console.log(transaction);

// sign the transaction
transaction.sign([wallet.payer]);

// Execute the transaction
const rawTransaction = transaction.serialize()
const txid = await connection.sendRawTransaction(rawTransaction, {
skipPreflight: true,
maxRetries: 2
});
await connection.confirmTransaction(txid);
console.log(https://solscan.io/tx/${txid});

https://station.jup.ag/docs/apis/swap-api

How to achieve it?

Generate wallet issue

Using the Java version of Solanaj, the public key addresses generated by importing private keys exported from Phantom Wallet and Okx Web3 Wallet are the same, while the public key addresses generated by importing mnemonics exported from Phantom Wallet and Okx Web3 Wallet are different? May I ask what the problem is? How should we solve it?

Not packages published

I'm trying to use this library for experimenting, but I cannot get it to work with maven given that there are not packages published. 😅

Is there a plan to publish the builds? 🤔

getTransaction error

public ConfirmedTransaction getTransaction(String signature, Commitment commitment) throws RpcException {
List params = new ArrayList<>();
params.add(signature);
Map<String, Object> parameterMap = new HashMap<>();

    if (commitment != null) {
        parameterMap.put("commitment", commitment); //update  parameterMap.put("commitment", commitment.getValue());
    }

    parameterMap.put("maxSupportedTransactionVersion", 0);
    params.add(parameterMap);
    return client.call("getTransaction", params, ConfirmedTransaction.class);
}

invalid transaction: Transaction failed to sanitize accounts offsets correctly

Help! To create a token address and call the 'SystemProgram.createAccount' method, what is the meaning of the parameters?
help! 创建token地址调用 'SystemProgram.createAccount' 方法, 参数的意义是什么?

public static TransactionInstruction createAccount(PublicKey fromPublicKey, PublicKey newAccountPublikkey,
long lamports, long space, PublicKey programId)

Version 2.0 Discussion

Requirements:

Architecture:

  • Replace Exception-based code with Optionals, remove try-catch from normal code flow.
  • Evaluate different Websocket libraries
  • Support for importing/signing/sending raw transactions (Base64/bytes)
  • Support for durable nonces
  • Mechanism for auto-reconnect on Websockets + re-subscribe to dropped subscriptions
  • SOCKS proxy support

APIs:

  • Coverage of the newer APIs
  • Support ALTs (Address Lookup Tables)

GetProgramAccounts:

  • Support pagination using dataSize = 0

When using version 1.14, an error occurs when calling the getBlock method

org.p2p.solanaj.rpc.RpcException: Transaction version (0) is not supported by the requesting client. Please try the request again with the following configuration parameter: "maxSupportedTransactionVersion": 0
at org.p2p.solanaj.rpc.RpcClient.call(RpcClient.java:88)
at org.p2p.solanaj.rpc.RpcApi.getBlock(RpcApi.java:522)

sdk not working in release mode but working in debug mode. Throwing NullPointerException while sending transaction in release mode.

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String org.p2p.solanaj.rpc.types.RecentBlockhash$Value.getBlockhash()' on a null object reference
at org.p2p.solanaj.rpc.RpcApi.getRecentBlockhash(RpcApi.java:47)
at org.p2p.solanaj.rpc.RpcApi.getRecentBlockhash(RpcApi.java:37)
at org.p2p.solanaj.rpc.RpcApi.sendTransaction(RpcApi.java:62)
at org.p2p.solanaj.rpc.RpcApi.sendTransaction(RpcApi.java:56)

Instruction for swap on Orca

I want to build the instruction for swapping on DEX Orca.
I don't understand how to build data for SystemProgram.createTransactionInstruction.
If someone can help me with this, or has any useful link.
Thank you.

RewardType.Class Json exception

I am trying on Solana Testnet, and when I use getBlock() method I got Json parsing exception.

public enum RewardType {
    /*FEE, RENT, VOTING, STAKING*/
    Fee, Rent, Voting, Staking
}

exception occurs because of upper case and when I change like this it works.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.