Skip to content

Commit 0ae688c

Browse files
authored
Add stellar tx new revoke-sponsorship and stellar tx op add revoke-sponsorship. (#2215)
1 parent b423b3f commit 0ae688c

9 files changed

Lines changed: 970 additions & 11 deletions

File tree

FULL_HELP_DOCS.md

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,6 +1724,7 @@ Create a new transaction
17241724
* `path-payment-strict-send` — Send a payment with a different asset using path finding, specifying the send amount
17251725
* `path-payment-strict-receive` — Send a payment with a different asset using path finding, specifying the receive amount
17261726
* `payment` — Send asset to destination account
1727+
* `revoke-sponsorship` — Revoke sponsorship of a ledger entry or signer
17271728
* `set-options` — Set account options like flags, signers, and home domain
17281729
* `set-trustline-flags` — Configure authorization and trustline flags for an asset
17291730

@@ -1933,7 +1934,7 @@ Clawback a claimable balance by its balance ID
19331934
* `--hd-path <HD_PATH>` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0`
19341935
* `--sign-with-lab` — Sign with https://lab.stellar.org
19351936
* `--sign-with-ledger` — Sign with a ledger wallet
1936-
* `--balance-id <BALANCE_ID>` — Balance ID of the claimable balance to clawback. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - StrKey format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA
1937+
* `--balance-id <BALANCE_ID>` — Balance ID of the claimable balance to clawback. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA
19371938

19381939

19391940

@@ -2336,6 +2337,41 @@ Send asset to destination account
23362337

23372338

23382339

2340+
## `stellar tx new revoke-sponsorship`
2341+
2342+
Revoke sponsorship of a ledger entry or signer
2343+
2344+
**Usage:** `stellar tx new revoke-sponsorship [OPTIONS] --source-account <SOURCE_ACCOUNT> --account-id <ACCOUNT_ID>`
2345+
2346+
###### **Options:**
2347+
2348+
* `--fee <FEE>` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm
2349+
2350+
Default value: `100`
2351+
* `--cost` — Output the cost execution to stderr
2352+
* `--instructions <INSTRUCTIONS>` — Number of instructions to simulate
2353+
* `--build-only` — Build the transaction and only write the base64 xdr to stdout
2354+
* `--rpc-url <RPC_URL>` — RPC server endpoint
2355+
* `--rpc-header <RPC_HEADERS>` — RPC Header(s) to include in requests to the RPC provider
2356+
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
2357+
* `-n`, `--network <NETWORK>` — Name of network to use from config
2358+
* `-s`, `--source-account <SOURCE_ACCOUNT>` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail
2359+
* `--global` — ⚠️ Deprecated: global config is always on
2360+
* `--config-dir <CONFIG_DIR>` — Location of config directory. By default, it uses `$XDG_CONFIG_HOME/stellar` if set, falling back to `~/.config/stellar` otherwise. Contains configuration files, aliases, and other persistent settings
2361+
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path
2362+
* `--hd-path <HD_PATH>` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0`
2363+
* `--sign-with-lab` — Sign with https://lab.stellar.org
2364+
* `--sign-with-ledger` — Sign with a ledger wallet
2365+
* `--account-id <ACCOUNT_ID>` — Account ID (required for all sponsorship types)
2366+
* `--asset <ASSET>` — Asset for trustline sponsorship (format: CODE:ISSUER)
2367+
* `--data-name <DATA_NAME>` — Data name for data entry sponsorship
2368+
* `--offer-id <OFFER_ID>` — Offer ID for offer sponsorship
2369+
* `--liquidity-pool-id <LIQUIDITY_POOL_ID>` — Pool ID for liquidity pool sponsorship. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
2370+
* `--claimable-balance-id <CLAIMABLE_BALANCE_ID>` — Claimable balance ID for claimable balance sponsorship. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA
2371+
* `--signer-key <SIGNER_KEY>` — Signer key for signer sponsorship
2372+
2373+
2374+
23392375
## `stellar tx new set-options`
23402376

23412377
Set account options like flags, signers, and home domain
@@ -2457,6 +2493,7 @@ Add Operation to a transaction
24572493
* `path-payment-strict-receive` — Send a payment with a different asset using path finding, specifying the receive amount
24582494
* `path-payment-strict-send` — Send a payment with a different asset using path finding, specifying the send amount
24592495
* `payment` — Send asset to destination account
2496+
* `revoke-sponsorship` — Revoke sponsorship of a ledger entry or signer
24602497
* `set-options` — Set account options like flags, signers, and home domain
24612498
* `set-trustline-flags` — Configure authorization and trustline flags for an asset
24622499

@@ -2701,7 +2738,7 @@ Clawback a claimable balance by its balance ID
27012738
* `--hd-path <HD_PATH>` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0`
27022739
* `--sign-with-lab` — Sign with https://lab.stellar.org
27032740
* `--sign-with-ledger` — Sign with a ledger wallet
2704-
* `--balance-id <BALANCE_ID>` — Balance ID of the claimable balance to clawback. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - StrKey format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA
2741+
* `--balance-id <BALANCE_ID>` — Balance ID of the claimable balance to clawback. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA
27052742

27062743

27072744

@@ -3164,6 +3201,46 @@ Send asset to destination account
31643201

31653202

31663203

3204+
## `stellar tx operation add revoke-sponsorship`
3205+
3206+
Revoke sponsorship of a ledger entry or signer
3207+
3208+
**Usage:** `stellar tx operation add revoke-sponsorship [OPTIONS] --source-account <SOURCE_ACCOUNT> --account-id <ACCOUNT_ID> [TX_XDR]`
3209+
3210+
###### **Arguments:**
3211+
3212+
* `<TX_XDR>` — Base-64 transaction envelope XDR or file containing XDR to decode, or stdin if empty
3213+
3214+
###### **Options:**
3215+
3216+
* `--operation-source-account <OPERATION_SOURCE_ACCOUNT>` [alias: `op-source`] — Source account used for the operation
3217+
* `--fee <FEE>` — fee amount for transaction, in stroops. 1 stroop = 0.0000001 xlm
3218+
3219+
Default value: `100`
3220+
* `--cost` — Output the cost execution to stderr
3221+
* `--instructions <INSTRUCTIONS>` — Number of instructions to simulate
3222+
* `--build-only` — Build the transaction and only write the base64 xdr to stdout
3223+
* `--rpc-url <RPC_URL>` — RPC server endpoint
3224+
* `--rpc-header <RPC_HEADERS>` — RPC Header(s) to include in requests to the RPC provider
3225+
* `--network-passphrase <NETWORK_PASSPHRASE>` — Network passphrase to sign the transaction sent to the rpc server
3226+
* `-n`, `--network <NETWORK>` — Name of network to use from config
3227+
* `-s`, `--source-account <SOURCE_ACCOUNT>` [alias: `source`] — Account that where transaction originates from. Alias `source`. Can be an identity (--source alice), a public key (--source GDKW...), a muxed account (--source MDA…), a secret key (--source SC36…), or a seed phrase (--source "kite urban…"). If `--build-only` or `--sim-only` flags were NOT provided, this key will also be used to sign the final transaction. In that case, trying to sign with public key will fail
3228+
* `--global` — ⚠️ Deprecated: global config is always on
3229+
* `--config-dir <CONFIG_DIR>` — Location of config directory. By default, it uses `$XDG_CONFIG_HOME/stellar` if set, falling back to `~/.config/stellar` otherwise. Contains configuration files, aliases, and other persistent settings
3230+
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key or key saved in OS secure storage. Can be an identity (--sign-with-key alice), a secret key (--sign-with-key SC36…), or a seed phrase (--sign-with-key "kite urban…"). If using seed phrase, `--hd-path` defaults to the `0` path
3231+
* `--hd-path <HD_PATH>` — If using a seed phrase to sign, sets which hierarchical deterministic path to use, e.g. `m/44'/148'/{hd_path}`. Example: `--hd-path 1`. Default: `0`
3232+
* `--sign-with-lab` — Sign with https://lab.stellar.org
3233+
* `--sign-with-ledger` — Sign with a ledger wallet
3234+
* `--account-id <ACCOUNT_ID>` — Account ID (required for all sponsorship types)
3235+
* `--asset <ASSET>` — Asset for trustline sponsorship (format: CODE:ISSUER)
3236+
* `--data-name <DATA_NAME>` — Data name for data entry sponsorship
3237+
* `--offer-id <OFFER_ID>` — Offer ID for offer sponsorship
3238+
* `--liquidity-pool-id <LIQUIDITY_POOL_ID>` — Pool ID for liquidity pool sponsorship. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): LAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
3239+
* `--claimable-balance-id <CLAIMABLE_BALANCE_ID>` — Claimable balance ID for claimable balance sponsorship. Accepts multiple formats: - API format with type prefix (72 chars): 000000006f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Direct hash format (64 chars): 6f2179b31311fa8064760b48942c8e166702ba0b8fbe7358c4fd570421840461 - Address format (base32): BAAMLBZI42AD52HKGIZOU7WFVZM6BPEJCLPL44QU2AT6TY3P57I5QDNYIA
3240+
* `--signer-key <SIGNER_KEY>` — Signer key for signer sponsorship
3241+
3242+
3243+
31673244
## `stellar tx operation add set-options`
31683245

31693246
Set account options like flags, signers, and home domain

cmd/crates/soroban-spec-tools/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -848,9 +848,7 @@ pub fn from_json_primitives(v: &Value, t: &ScType) -> Result<ScVal, Error> {
848848
.map_err(|_| Error::InvalidValue(Some(t.clone())))?,
849849
)),
850850

851-
(ScType::Address, Value::String(s)) => sc_address_from_json(s)?,
852-
853-
(ScType::MuxedAddress, Value::String(s)) => sc_address_from_json(s)?,
851+
(ScType::Address | ScType::MuxedAddress, Value::String(s)) => sc_address_from_json(s)?,
854852

855853
// Bytes parsing
856854
(bytes @ ScType::BytesN(_), Value::Number(n)) => {

0 commit comments

Comments
 (0)