Questions tagged [javascript-sdk]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
108 views

Various errors in submitting offers

This is my code: var sourceSecretKey = 'REDACTED'; var sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey); var sourcePublicKey = sourceKeypair.publicKey(); var server = new StellarSdk....
1
vote
1answer
162 views

tx_bad_seq error when funding the account

I am trying to create a Stellar Standalone network using my own network passphrase. I m able to set up stellar-core and horizon in my private network and it is working fine, I m able to get the root ...
1
vote
2answers
106 views

How can I actually use the js-stellar-sdk?

I'm trying to figure it all my self but I cannot find any useful information on how actually use the Documentation provided. For example I see there are classes and inside Account, ...
1
vote
1answer
44 views

What is the default limit on the number of transactions returned for a `Server.transactions` request?

Using the Stellar Javascript SDK, what is the maximum number of transactions that will be returned for a request to server.transactions().forAccount(accountId).call() before I have to worry about ...
1
vote
1answer
38 views

Stellar horizon server - still 'waiting for ingestion'

I am using the IONOS server and I created the Stellar horizon server but I faced this issue: INFO[2020-12-17T21:18:54.302Z] waiting for ingestion system catchup pid=35554 service=ingest ...
1
vote
1answer
84 views

Error “missing path” while running 'gulp test' in js-stellar-base

I cloned the js-stellar-base and then ran 'gulp test' and it returned the following error: Using gulpfile /mnt/c/Users/Debchakra/Desktop/js-stellar-base/gulpfile.js [00:01:03] Starting 'test'... [00:...
1
vote
1answer
239 views

Error trying to use stellar-sdk in the browser

I am trying to include stellar-sdk.js (for use on the browser side) like this: import * as stellarModule from './stellar-sdk.js'; The file stellar-sdk.js is present. However, I get this error, when ...
1
vote
1answer
231 views

Trades stream setup

I have setup streams for transactions, payments, operations, and effects with the method from stellar api guide: this.server = new StellarSdk.Server('https://horizon.stellar.org'); this.stream = ...
1
vote
1answer
55 views

How to retrieve Operations for a certain Asset?

I've been reading the js-stellar-sdk and I didn't find a way to retrieve the operations for a certain Asset. How should be this done?
1
vote
1answer
199 views

Need help getting result_codes using JavaScript SDK on Node. Failed to make a payment

I'm using the JavaScript SDK in Node and have run into a problem making payments on the testnet. I catch the error but am unable to parse it to get at the result_codes which show as [Object] when I ...
1
vote
0answers
16 views

How to update Account Sequence

I have to handle a concurrent activation of 2 accounts. I am using a lock mechanism so that I can handle manually the sequence number. I am using bumpSequence operation to try and update the sequence ...
1
vote
0answers
23 views

interact with the private stellar network

I have started my own private stellar network using the below command. docker run --rm -it -p "8000:8000" --name stellar stellar/quickstart --standalone How do I interact with it? How can I create ...
1
vote
1answer
71 views

How to generate public key using SDK in salesforce?

I want to integrate stellar with a Salesforce application. and I am stuck at generating a public key and secret key. I am a little confused regarding SDKs, how can I use an SDK in the apex? Can I ...
1
vote
2answers
159 views

Error while submitting change trust transaction

I created an anchor account which issues USD asset. It worked properly. But now when I modify the program where the anchor issues one more asset called INR and I am creating a trustline for both the ...
1
vote
0answers
29 views

How to filter only the most recent n number of operations of an account for only a specific Asset?

I had a function that returned the most recent 3 payment operations for an account. But I wante to change it so that it would only return the most recent 3 payment operations for only the asset being ...
1
vote
0answers
172 views

Error when trying to install stellar-sdk from npm, “LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libe ay32.lib'”

Anyone know what this means or how to fix it? I ran the command npm install --save stellar-sdk and got this LINK : fatal error LNK1181: cannot open input file 'C:\OpenSSL-Win64\lib\libe ay32.lib' [...
0
votes
1answer
36 views

Key pairs don't match?

Im building a bot that connects Stellar with Telegram but when I generate a new set of key pairs them don't match when I sign in stellarterm. Here is the code: var StellarSdk = require('stellar-sdk'...
0
votes
1answer
27 views

TypeError: sourceAsset.isNative is not a function when calling strictSendPaths

I am trying to call a payment strict send path: var server = new StellarSdk.Server("https://horizon.stellar.org", { allowHttp: false, appName: "Horizon", appVersion: "0.23" }); var ...
0
votes
1answer
45 views

How to pull memo from a public key's historical transactions and save to an array?

Using Stellar's Javascript SDK Goal Output an array containing all the memos: ['324567567', 'anotherMemo', '239210923', '2349028509'] This array will be used to check against a database and ...
0
votes
1answer
37 views

How to catch specific error code on JS SDK connecting to horizon

I use Javascript SDK to connect to Horizon. It works, but I also would like the specific error if it doesn't work. See my code below. How can I access the specific code returned from horizon (e.g. ...
0
votes
1answer
469 views

Send payment issue

I am trying to send a payment on stellar testnet. I have already created both accounts using https://friendbot.stellar.org. So both account have a balance. When I am sending payment it is showing "...
0
votes
1answer
27 views

How do I just get specific fields when displaying transactions for a given account?

I'm using the Javascript SDK. My objective is to get the last 10 transactions for a given account (which is working), but just show specific fields (such as the amount of lumens, and perhaps the memo),...
0
votes
1answer
111 views

How to extract transaction hash out of XDR using Java Script?

iam having an XDR i want to know the transaction hash before i submit that to stellar. i did this in GO by unmarshal the XDR and used the builder to retrieve the hash. Is there nay way that i can do ...
0
votes
1answer
67 views

Why do we receive an undefined Event error when streaming payments via the node.js sdk?

We run a continuous payments stream that receives fairly useless errors on the regular and would like to know what these may stem from and if they can be disregarded. I haven't been able to correlate ...
0
votes
0answers
10 views

Create claimable balance stellar operation, claimant.predicate

How to make sdk.claimant.predicate call with json object.something like this => {"_destination": "destination", "_predicate":{"and":[{"or":[{"...
0
votes
1answer
9 views

Continuous Status 504

I have been developing a Multi-sig based project and keeps on getting the 504 status so many times when making transaction. I have checked out the testnet staus of Horizon network as well and it seems ...
0
votes
1answer
25 views

Cannot install via npm for node on Windows

I'm trying to download the stellar SDK for my angular project but the npm install fails.
0
votes
0answers
20 views

Has anyone else problems using stream of tradeAggregation?

The following '(var es = server.tradeAggregation(base, counter, startTime, endTime, resolution, offset).cursor("now") .stream({ onmessage: callback }) ) results in a 406 error because the ...
0
votes
1answer
46 views

How to submit a signed transaction that has been XDR enveloped?

Hi I was working with Stellar on Javascript for offline signing and to keep the QR code after signing short I enveloped the transaction and converted it to XDR. Using, const signedTx = await ...
0
votes
0answers
43 views

Stellar a viable long-term solution to use on my site?

I just stumbled across Stellar today and it looks very promising. I'm working on a new personal project idea and was searching for a way to build a Venmo-like feature into my app when I discovered ...
0
votes
0answers
151 views

Select failed: pq: relation “signers” does not exist

I have set up private Stellar Core and Horizon with 2 nodes. I am following this tutorial. I am first creating an account and then I am executing the code below. It is showing select failed: pq: ...
0
votes
1answer
150 views

Paying with Custom Tokens

UPDATE: I removed the quotes from BPTOKEN. That was a mistake. I had them removed in the real code but cut and pasted a change before this happened. It has been corrected and the error included. ...
-1
votes
1answer
22 views

Friendbot bad request (400) invalid_field: “addr”

I am trying to create an account on the stellar Test Network. But whenever I make a request and pass in the public key, I always get this error: I am using the Javascript documentation from here
-2
votes
1answer
864 views

TX_BAD_AUTH, no idea why

i'm moving from testnet to pubnet but for some reason my code didn't work with pubnet. here some snippet. Of course sourceAccount,des.publicKey and sourceKeys contain what i'm expeting. sourceAccount ...
-3
votes
4answers
96 views

Example code on Ubuntu+node.js gives error re “await”

Updated: added full code below. I'm trying to run the "Creating a payment transaction" example but the error I get is const account = await server.loadAccount(sourcePublicKey); ^^^^^...

1
2