Questions tagged [java-sdk]

For questions specifically regarding the Java Software Development Kit (SDK) for Stellar client applications.

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

How to set clawback enabled flag in java sdk?

I am trying to set the clawback enabled flag using java-sdk in stellar, but that particular flag is not getting listed.. only AUTH_REQUIRED_FLAG,AUTH_REVOCABLE_FLAG and AUTH_IMMUTABLE_FLAG are present....
Nithin's user avatar
  • 1
0 votes
1 answer
46 views

Transaction getting Timeout using Java SDK

I'm using the Java SDK for months now but since couple of weeks I'm getting more and more timeouts while launching Payment Operations. org.stellar.sdk.responses....
tiamat's user avatar
  • 101
1 vote
1 answer
65 views

What API to use to get metadata of asset issuers?

I am trying to get the metadata (such as organization name, logo) of asset issuers in the Stellar network. What API should I use that could possibly contain this information when I pass the Public Key,...
Benji's user avatar
  • 11
0 votes
2 answers
200 views

How to check if Stellar's account is valid or exist?

How to check if account does not exist with the Java SDK? and how to know if a public key is valid? I found one way to the first question but is not a clean solution Server server = new Server("...
Musculaa's user avatar
  • 113
0 votes
1 answer
74 views

How to get result of successfully submitted transaction?

I am using the Stellar Java SDK to submit a PathPaymentStrictReceiveOperation transaction. I get back a SubmitTransactionResponse object. I would like to get the results of the (successful) ...
Tony Johnson's user avatar
0 votes
1 answer
112 views

Send Transaction XDR To Other Account Using Stellar

Situation: I am trying to implement the Stellar 2-party multisignature escrow account with time lock & recovery Smart Contract example using the Java SDK. In transaction 3 (unlock transaction), ...
moisu's user avatar
  • 101
0 votes
1 answer
50 views

Unable to create account using Java SDK

I have been successfully creating accounts for months before the reset but I am now running into a problem and not clear what the actual problem is. I am executing the following code: final KeyPair ...
Aubrey Malabie's user avatar
2 votes
1 answer
246 views

`tx_bad_auth` when submit transaction to TestNet

I submit a transaction to the TestNet by using the official horizon API (https://horizon-testnet.stellar.org/), and it returns tx_bad_auth. This is my code: Server server = new Server("...
pizi's user avatar
  • 21
0 votes
1 answer
198 views

How can I view transactions within a specific date range?

Is there any solution for filtering transactions by date? Scenario: I wanna fetch transactions for a specific account in a specific range of date like 2020/04/04 to 2020/05/04 I looked for it a lot in ...
Mehrdad HosseinNejad Yami's user avatar
1 vote
1 answer
40 views

Receiving BaseEncodingException when signing transaction using TestNet : Invalid Input Length

Sending from Account A to B is not working in my implementation. The docs provided by stellar for Java are straight forward but I have been receiving a BaseEncodingException when trying to sign the ...
Bobby Garza's user avatar
2 votes
1 answer
75 views

SEP 0024 Question: Where do the /info response fields referenced below come from?

I'm trying to develop an anchor server and going through the SEP0024 documentation. The documentation says "Provide a full-featured implementation of /info". Where does one find or create the fields ...
Aubrey Malabie's user avatar
-2 votes
1 answer
76 views

How to use manage data operation on Java SDK

I was not able to find any tutorial or an example on manage data operation of Java sdk. I tried to build a sample using the Java API documentation. But it's too complicated. If anyone can show me how ...
dev222's user avatar
  • 1
0 votes
1 answer
60 views

My transaction fails with paymentResult: [paymentLineFull]

I'm using the Stellar Java SDK to perform a Transaction with a PaymentOperation and I run into the following transaction response: (Converted from XDR). I don't know what this error means and how I'd ...
Aubrey Malabie's user avatar
0 votes
1 answer
71 views

Network.usePublicNetwork(); showing syntax error

I have just migrated to AndroidX (which may or may not be related to this issue). However, Network.usePublicNetwork(); is now showing a syntax error: Below are my imports: import org.stellar.sdk....
Christopher Mills's user avatar
2 votes
1 answer
68 views

How can I send lumens over local docker quickstart image using accounts made on local image and not the testnet

I am following the stellar walkthrough for creating two accounts, a source and a destination using the testnet. However, I would like to use my local docker quickstart image to facilitate the ...
Bobby Garza's user avatar
1 vote
1 answer
48 views

Cannot send hashed data through ManageDataOperation

I am trying to send a data hashed using SCryptUtil provided by com.lambdaworks.crypto.SCryptUtil, convert it into array of bytes and send it to the stellar network using ManageDataOperation.Builder ...
Ifham's user avatar
  • 13
3 votes
1 answer
189 views

Retrieve transaction memo text with Java API

I need to retrieve some transactions from a specific account and then read the memo. I've tried a couple of different methods with no success. My first attempt was as below, but I get odd looking memo ...
Frank's user avatar
  • 133
1 vote
1 answer
998 views

"No converter found for return value of type: class org.stellar.sdk.requests.TransactionsRequestBuilder" when getting transaction history

This is my code for transaction history: @RequestMapping(value = EmpRestURIConstants.TRANS_HIS, method = RequestMethod.POST) public @ResponseBody TransactionsRequestBuilder transactionHistory(@...
user9862376's user avatar
1 vote
2 answers
186 views

Exception while send Transaction using Java stellar SDK "TimeBounds has to be set or you must call setTimeout(TIMEOUT_INFINITE)"

I am getting the following Exception while performing send transaction using the Java Stellar SDK. This is my send transaction code: import org.stellar.sdk.AssetTypeNative; import org.stellar.sdk....
user9862376's user avatar
1 vote
2 answers
43 views

How to set managed data on an account

I am new to stellar. I want to add a data to my stellar account as a key value pair. As in "Name"(Key) - "John"(Value). How can I achieve this? Pointing me to a sample code would be really ...
Ifham Pain's user avatar
2 votes
1 answer
145 views

Problem of implementation of Path Payment in a Wallet?

I made a Java implementation of a Path Payment. I created 3 accounts. For example: the first plays the role of issuer. He issued 2 assets (USD, EUR) The second has USD The third, EUR. I created an ...
Wilbau's user avatar
  • 21
5 votes
1 answer
119 views

Stellar Java Sdk key validation?

In JavaScript SDK we have method isValidEd25519PublicKey for Stellar address validation. But in Java SDK there is no such method. How can I validate Stellar address with Java SDK?
Thái Ngô's user avatar
4 votes
1 answer
71 views

Extra 0 byte at end of MemoText String

I extracted a TransactionEnvelope XDR several months ago for testing. It parses fine in the lab and the SDKs. I've tried parsing it by hand and there's something I don't understand. After the ...
Synesso's user avatar
  • 3,367
1 vote
3 answers
88 views

Payment operation listener firing off multiple times for single operation

I have implemented a payment listener in my mainActivity. It is working, except that the majority of the time it is firing off multiple times (usually 2 or 3 times) for a single payment receipt. ...
Christopher Mills's user avatar
0 votes
1 answer
71 views

Multi-sign transaction is not working

I am creating a multi-sign transaction. When I am submitting the transaction to Stellar, response.isSuccess() returns false. Could anyone tell me where I am going wrong? link https://www.stellar.org/...
rajthanga's user avatar
1 vote
1 answer
67 views

Transaction Stream parameter and method not recognized

I'm trying to set up a transaction listening stream. I have taken the Java snippet directly from the docs. Below is the part that is giving me an issue. Server server = new Server("https://horizon-...
Christopher Mills's user avatar
2 votes
1 answer
84 views

Subscribing to incoming transaction does not work

paymentsRequest.stream(new EventListener<OperationResponse>() { @Override public void onEvent(OperationResponse payment) { System.out.println("TEST TEST TEST"); This ...
Lukáš Cyberluke Satin's user avatar
1 vote
2 answers
122 views

Convert transaction XDR to object?

Given a base64 & XDR encoded transaction, how can I convert this into a transaction object? I already saw this answer, but couldn't find the Transaction.fromEnvelopeXdr(...) method.
Elizabeth's user avatar
1 vote
1 answer
60 views

How to access AssetResponse properties of a newly created asset? C# or Java

I'm using the C# SDK. For Example, a new Asset is created. _stellarAsset = Asset.CreateNonNativeAsset("credit_alphanum4", _assetIssuer, _assetCode); This is in a method which returns the asset ...
mrtpain's user avatar
  • 13
4 votes
1 answer
69 views

ManageOfferOperation - Not taking the price I set

I'm using the Java SDK. With the ManageOfferOperation class passing an amount and price but it's not taking the price I set. Instead it always sets a different price, which I believe is the market ...
Paul Janus Calinawan's user avatar
3 votes
1 answer
88 views

paymentsRequest.stream

I'm using the android studio and I'm having trouble with paymantsRequest.stream. it's saying it can't connect to server sent event. (cannot access com.here.oksse.serversentevent) here is the code ...
Ennan's user avatar
  • 73
4 votes
2 answers
114 views

Retrieving operations for a transaction unexpectedly slow?

I am trying to retrieve the operations for the transactions of a given ledger. First retrieve the transactions: List<TransactionResponse> transactionResponses = this.server.horizonServer() ...
Joanes Espanol's user avatar
4 votes
2 answers
467 views

How to Build transaction XDR before sign it

I want to build a transaction and convert that as XDR before sign that transaction. As i found we need to build adn sign the transaction before convert that as XDR specially in java and GO SDK. Is ...
Sharmilan's user avatar
  • 421
1 vote
1 answer
77 views

get Transaction object from xdr base64 string

I have a base64 xdr string of a transaction. How can I convert that to a transaction object, so I can sign it e.g. transaction.sign(...)
mmdc's user avatar
  • 121
3 votes
1 answer
136 views

Random crash upon calling KeyPair.random() on android

I'm trying to use the stellar sdk in an android app. So I downloaded the stellar sdk and generate it's jar and include it in as a external jar in my android app. To get it working I also had to add ...
berrytchaks's user avatar
5 votes
3 answers
164 views

TimeBounds won't execute?

I struggle using the timebounds option for an operation. Use case : I want a transaction to be executed at a precise time, not before, not after. I'm doing my tests on the test network. The ...
Brice Faller's user avatar
6 votes
1 answer
101 views

minTime must be >= maxTime ? Java SDK

I'm trying to add a simple time bounds with the Java SDK to settle a transaction happening at a certain time. Code used : Instant unlockDate = Instant.now().plusSeconds(60 * 2); TimeBounds ...
Brice Faller's user avatar
1 vote
2 answers
486 views

Trading error 400, what's the problem?

I receive an HTTP 400 error from the /transactions endpoint on public Horizon when running this code: try { Network.usePublicNetwork(); Server server = new Server("https://horizon.stellar.org"...
xiao_Great's user avatar
4 votes
4 answers
485 views

How does Java parse XDR information?

I need to get the transaction records. This information seems to be in XDR. How can I parse it in Java?
xiao_Great's user avatar
1 vote
1 answer
56 views

Compliance Server Request

Still new on stellar but am having a challenge when using the default compliance server for Auth_request. Keep on getting the below error. { "code": "invalid_parameter", "message": "Invalid ...
Eugene Chimita's user avatar
2 votes
2 answers
133 views

Java SDK: Transaction object from envelope

In Javascript SDK, transaction can be built, signed and then be converted to envelope xdr/string format. This is very useful for multi sig operations since we can retrieve the transaction object from ...
jagstock's user avatar
  • 539
2 votes
1 answer
354 views

How to setup time bounds for an escrow account?

I am trying to create 2-Party Multisignature Escrow Account with Time Lock & Recovery as in this ref:https://www.stellar.org/developers/guides/walkthroughs/stellar-smart-contracts.html Now, I ...
Patcharaphol Palapol's user avatar
2 votes
1 answer
123 views

Python vs Java(script) for stellar apps. Is it worth learning a new language?

I am starting to get into programming apps for crypto, and I would like to start on the Stellar network. My programming background lies mainly in C and Python, and I am a reasonably competent self ...
KBriggs's user avatar
  • 123
3 votes
1 answer
120 views

Stream stop get new data when finishing fetch all data and new payment was created

I using java-stellar-sdk version 0.2.0 from this: https://github.com/stellar/java-stellar-sdk/releases I did as tutorial example: @Override protected void onCreate(Bundle savedInstanceState) { ...
hungnv39's user avatar
2 votes
1 answer
336 views

How to get Transaction amount from API?

I want to display all transactions of given users. Using the Java API, I presume I would do: server.transactions().forAccount(destination2).execute(); I would then page through the result. Each item ...
Klaus's user avatar
  • 193
5 votes
3 answers
743 views

How to sign the XDR transaction envelop and and post it through java sdk?

I received the XDR envelope of a transaction. I need to sign it and submit using Java SDK. I am able to decode the XDR, but need help on how to sign and submit.
Sharmilan's user avatar
  • 421
5 votes
1 answer
2k views

Convert XDR to text

I want to convert the XDR fromat of the transaction to text using JS or java SDK in stellar.Or if there are any methods outside stellar also fine.
Sharmilan's user avatar
  • 421
4 votes
1 answer
107 views

java sdk leaking threads; my fault or bug?

In the simplest case, when I have a KeyPair key for an account that doesn't yet exist, and call // private Server mServer; // declared and intialized elsewhere mServer.accounts().account(key); it ...
eehouse's user avatar
  • 41
2 votes
2 answers
178 views

Simple Transaction Issue

I am working on a small and very basic project, essentially doing a POC involving stellar transactions. I am a newbie with stellar. I have two clients running the same code, and a 'banker' who ...
caseyjg's user avatar
  • 29
2 votes
1 answer
88 views

Issue with Submit Transaction

Am using Java SDK and Horizon Testnet. Issue is when i submit a transaction using server.submitTransaction method i get following exception, please let me know if you need any more information javax....
Sang's user avatar
  • 31