Skip to content

Conversation

@Ryang-21
Copy link
Contributor

@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Nov 20, 2025
@socket-security
Copy link

socket-security bot commented Nov 20, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedcommander@​14.0.210010010087100

View full report

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Looks awesome so far! Mostly minor comments below, gonna try it out right now too.

@@ -0,0 +1,62 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

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

since this is user-facing we probably want it written in pure JS so our 3 windows users aren't in shambles

Copy link
Member

Choose a reason for hiding this comment

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

Good call. Just want to call out that in most ecosystems and in many regions windows users are more common than other operating systems, so I think there are many more than 3.

Copy link
Contributor

Choose a reason for hiding this comment

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

I know :) it was tongue-in-cheek, we should def do it

* Generate .gitignore
*/
private generateGitignore(): string {
const gitignore = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just fetch and write the official one, instead?

const optionType = this.generateTypeFromTypeDef(
typeDef.option().valueType(),
);
return `${optionType} | undefined`;
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps?

Suggested change
return `${optionType} | undefined`;
return `${optionType} | undefined | null`;

@@ -0,0 +1,4 @@
// Auto-generated by scripts/download-sac-spec.sh
// Do not edit manually - run the script to update
export const SAC_SPEC =
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we download & generate this as part of the generator if the command detects that it's a SAC rather than bundling it in?

Copy link
Member

Choose a reason for hiding this comment

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

I would favor making this deterministic over live fetching. In protocol 23 muxed addresses were added. Live fetching would have broken the cli if it had fetched a sac contract spec that contained a type it didn't know about.

}
if (!args.networkPassphrase) {
throw new WasmFetchError(
"--network-passphrase is required when fetching from network",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can/should we have sensible defaults for the URL given the passphrase, or prefer a simpler --network testnet|pubnet|futurenet option that has these prefilled?

Copy link
Contributor

@Shaptic Shaptic left a comment

Choose a reason for hiding this comment

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

Couple more thoughts after running it on a side-project of mine

* Generate interface method signature
*/
private generateInterfaceMethod(func: any): string {
const name = func.name().toString();
Copy link
Contributor

Choose a reason for hiding this comment

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

We could be careful here to ensure these don't conflict with JS keywords, thoughts? A lot of these will already be covered by Rust when they write the contract, granted, but worth a thought.


const params = this.formatMethodParameters(inputs);

return ` ${name}(${params}): Promise<AssembledTransaction<${outputType}>>;`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also inject the docs pulled from the spec for each method?

Copy link
Member

Choose a reason for hiding this comment

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

💯

const types = typeGenerator.generate();
const client = clientGenerator.generate();

const index = `export { Client } from "./client.js";`;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we export it with the name prefixed? They may have multiple clients so this would provide clarity and avoid conflicts.

Copy link
Member

Choose a reason for hiding this comment

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

We need to balance this with it being drop in replacement for the current binding generation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Good call, we can export twice then and break later

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Size Change: +2.25 MB (+5.29%) 🔍

Total Size: 44.7 MB

Filename Size Change
dist/stellar-sdk-minimal.js 5.91 MB +362 kB (+6.51%) 🔍
dist/stellar-sdk-minimal.min.js 5.04 MB +200 kB (+4.14%)
dist/stellar-sdk-no-axios.js 5.91 MB +362 kB (+6.51%) 🔍
dist/stellar-sdk-no-axios.min.js 5.04 MB +200 kB (+4.14%)
dist/stellar-sdk-no-eventsource.js 6.16 MB +362 kB (+6.24%) 🔍
dist/stellar-sdk-no-eventsource.min.js 5.25 MB +200 kB (+3.97%)
dist/stellar-sdk.js 6.16 MB +362 kB (+6.24%) 🔍
dist/stellar-sdk.min.js 5.25 MB +200 kB (+3.97%)

compressed-size-action

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.

4 participants