Skip to content

Commit 5fcbd06

Browse files
authored
Merge branch 'main' into dependabot/github_actions/all-actions-c34daa223c
2 parents b3f46e5 + f183ac3 commit 5fcbd06

5 files changed

Lines changed: 108 additions & 0 deletions

File tree

‎FULL_HELP_DOCS.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ Generate code client bindings for a contract
269269
* `typescript` — Generate a TypeScript / JavaScript package
270270
* `python` — Generate Python bindings
271271
* `java` — Generate Java bindings
272+
* `flutter` — Generate Flutter bindings
273+
* `swift` — Generate Swift bindings
274+
* `php` — Generate PHP bindings
272275

273276

274277

@@ -334,6 +337,30 @@ Generate Java bindings
334337

335338

336339

340+
## `stellar contract bindings flutter`
341+
342+
Generate Flutter bindings
343+
344+
**Usage:** `stellar contract bindings flutter`
345+
346+
347+
348+
## `stellar contract bindings swift`
349+
350+
Generate Swift bindings
351+
352+
**Usage:** `stellar contract bindings swift`
353+
354+
355+
356+
## `stellar contract bindings php`
357+
358+
Generate PHP bindings
359+
360+
**Usage:** `stellar contract bindings php`
361+
362+
363+
337364
## `stellar contract build`
338365

339366
Build a contract from source

‎cmd/soroban-cli/src/commands/contract/bindings.rs‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
pub mod flutter;
12
pub mod java;
23
pub mod json;
4+
pub mod php;
35
pub mod python;
46
pub mod rust;
7+
pub mod swift;
58
pub mod typescript;
69

710
#[derive(Debug, clap::Subcommand)]
@@ -20,6 +23,15 @@ pub enum Cmd {
2023

2124
/// Generate Java bindings
2225
Java(java::Cmd),
26+
27+
/// Generate Flutter bindings
28+
Flutter(flutter::Cmd),
29+
30+
/// Generate Swift bindings
31+
Swift(swift::Cmd),
32+
33+
/// Generate PHP bindings
34+
Php(php::Cmd),
2335
}
2436

2537
#[derive(thiserror::Error, Debug)]
@@ -38,6 +50,15 @@ pub enum Error {
3850

3951
#[error(transparent)]
4052
Java(#[from] java::Error),
53+
54+
#[error(transparent)]
55+
Flutter(#[from] flutter::Error),
56+
57+
#[error(transparent)]
58+
Swift(#[from] swift::Error),
59+
60+
#[error(transparent)]
61+
Php(#[from] php::Error),
4162
}
4263

4364
impl Cmd {
@@ -48,6 +69,9 @@ impl Cmd {
4869
Cmd::Typescript(ts) => ts.run().await?,
4970
Cmd::Python(python) => python.run()?,
5071
Cmd::Java(java) => java.run()?,
72+
Cmd::Flutter(flutter) => flutter.run()?,
73+
Cmd::Swift(swift) => swift.run()?,
74+
Cmd::Php(php) => php.run()?,
5175
}
5276
Ok(())
5377
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use std::fmt::Debug;
2+
3+
use clap::Parser;
4+
5+
#[derive(Parser, Debug, Clone)]
6+
#[group(skip)]
7+
pub struct Cmd {}
8+
9+
#[derive(thiserror::Error, Debug)]
10+
pub enum Error {
11+
#[error("flutter binding generation is not implemented in the stellar-cli, but is available via the tool located here: https://github.com/lightsail-network/stellar-contract-bindings")]
12+
NotImplemented,
13+
}
14+
15+
impl Cmd {
16+
pub fn run(&self) -> Result<(), Error> {
17+
Err(Error::NotImplemented)
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use std::fmt::Debug;
2+
3+
use clap::Parser;
4+
5+
#[derive(Parser, Debug, Clone)]
6+
#[group(skip)]
7+
pub struct Cmd {}
8+
9+
#[derive(thiserror::Error, Debug)]
10+
pub enum Error {
11+
#[error("php binding generation is not implemented in the stellar-cli, but is available via the tool located here: https://github.com/lightsail-network/stellar-contract-bindings")]
12+
NotImplemented,
13+
}
14+
15+
impl Cmd {
16+
pub fn run(&self) -> Result<(), Error> {
17+
Err(Error::NotImplemented)
18+
}
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
use std::fmt::Debug;
2+
3+
use clap::Parser;
4+
5+
#[derive(Parser, Debug, Clone)]
6+
#[group(skip)]
7+
pub struct Cmd {}
8+
9+
#[derive(thiserror::Error, Debug)]
10+
pub enum Error {
11+
#[error("swift binding generation is not implemented in the stellar-cli, but is available via the tool located here: https://github.com/lightsail-network/stellar-contract-bindings")]
12+
NotImplemented,
13+
}
14+
15+
impl Cmd {
16+
pub fn run(&self) -> Result<(), Error> {
17+
Err(Error::NotImplemented)
18+
}
19+
}

0 commit comments

Comments
 (0)