Skip to content

Conversation

@Ryang-21
Copy link
Contributor

@Ryang-21 Ryang-21 commented Nov 5, 2025

  • Added examples for Rpc Server methods
  • Added examples for AssembledTransaction usage

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Nov 5, 2025
@Ryang-21 Ryang-21 requested a review from a team November 5, 2025 23:41
@Ryang-21 Ryang-21 changed the title Examples Add Examples Nov 5, 2025
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Size Change: -91.2 kB (-0.22%)

Total Size: 42.2 MB

Filename Size Change
dist/stellar-sdk-minimal.js 5.51 MB -14.9 kB (-0.27%)
dist/stellar-sdk-minimal.min.js 4.82 MB -7.92 kB (-0.16%)
dist/stellar-sdk-no-axios.js 5.51 MB -14.9 kB (-0.27%)
dist/stellar-sdk-no-axios.min.js 4.82 MB -7.92 kB (-0.16%)
dist/stellar-sdk-no-eventsource.js 5.76 MB -14.9 kB (-0.26%)
dist/stellar-sdk-no-eventsource.min.js 5.02 MB -7.92 kB (-0.16%)
dist/stellar-sdk.js 5.76 MB -14.9 kB (-0.26%)
dist/stellar-sdk.min.js 5.02 MB -7.92 kB (-0.16%)

compressed-size-action

Comment on lines +67 to +71
args: [
nativeToScVal(invoker.publicKey(), { type: 'address' }), // from
nativeToScVal(alice.publicKey(), { type: 'address' }), // to
nativeToScVal('100', { type: 'i128' }), // amount
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here's a nicer way I'd like to encourage people to do things

Suggested change
args: [
nativeToScVal(invoker.publicKey(), { type: 'address' }), // from
nativeToScVal(alice.publicKey(), { type: 'address' }), // to
nativeToScVal('100', { type: 'i128' }), // amount
],
args: nativeToScVal([
invoker.publicKey(),
alice.publicKey(),
'100'
], {
type: [ 'address', 'address', 'i128' ]
}).vec(),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't aware you could use it like that. The one problem with .vec() is that its return types use null instead of undefined which args does not take

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not spec.funcArgsToScVals as in the old docs?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean by

its return types use null instead of undefined which args does not take

.vec() returns ScVal[]? which is compatible with build's any[] if you ! it

Why not spec.funcArgsToScVals as in the old docs?

There's no spec in this case from what I can tell

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose to not use Spec functionality as its not essential for AssembledTransaction to work. That might be a wrong choice though. My editor has the return type of .vec() as ScVal[] | null and the AssembledTransaction interface expects undefined


Use `buildWithOp()` when you need to create transactions with operations other than `invokeHostFunction`, such as deploying contracts or extending TTL.

The following `Operations` are allowed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that some of these aren't "real" operations in the list-of-operations sense and rather just convenience methods

const allSigners = tx.needsNonInvokerSigningBy({
includeAlreadySigned: true
});
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we include the actual signing here as well?

IIRC you can't just sign the transaction with all parties as normal (e.g. Transaction.sign(secret)), as Soroban expects only the authorization entry itself to be signed


---

## Multi-Auth Workflows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this section different enough from the one starting on line 175 to be worth including? Seems possibly like duplicate content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

5 participants