Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/sign with lab #25

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- run: rustup update
- run: rustup target add ${{ matrix.sys.target }}
- if: matrix.sys.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libudev-dev
- name: Setup vars
run: |
version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "stellar-cli") | .version')"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ jobs:

publish:
uses: stellar/actions/.github/workflows/rust-publish.yml@main
with:
additional-deb-packages: libudev-dev
secrets:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
60 changes: 46 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ default-members = ["cmd/soroban-cli", "cmd/crates/soroban-spec-tools", "cmd/crat
exclude = ["cmd/crates/soroban-test/tests/fixtures/hello"]

[workspace.package]
version = "21.4.1"
version = "21.5.0"
rust-version = "1.79.0"

[workspace.dependencies.soroban-env-host]
Expand All @@ -27,15 +27,15 @@ version = "=21.5.0"
version = "=21.5.0"

[workspace.dependencies.soroban-spec-json]
version = "=21.4.1"
version = "=21.5.0"
path = "./cmd/crates/soroban-spec-json"

[workspace.dependencies.soroban-spec-typescript]
version = "21.4.1"
version = "21.5.0"
path = "./cmd/crates/soroban-spec-typescript"

[workspace.dependencies.soroban-spec-tools]
version = "21.4.1"
version = "21.5.0"
path = "./cmd/crates/soroban-spec-tools"

[workspace.dependencies.soroban-sdk]
Expand All @@ -48,7 +48,7 @@ version = "=21.2.0"
version = "=21.2.0"

[workspace.dependencies.soroban-cli]
version = "=21.4.1"
version = "=21.5.0"
path = "cmd/soroban-cli"

[workspace.dependencies.soroban-rpc]
Expand Down
52 changes: 50 additions & 2 deletions FULL_HELP_DOCS.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ Get Id of builtin Soroban Asset Contract. Deprecated, use `stellar contract id a
* `--asset <ASSET>` — ID of the Stellar classic asset to wrap, e.g. "USDC:G...5"
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand All @@ -139,6 +143,10 @@ Deploy builtin Soroban Asset Contract
* `--asset <ASSET>` — ID of the Stellar classic asset to wrap, e.g. "USDC:G...5"
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -366,6 +374,10 @@ If no keys are specified the contract itself is extended.

* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -396,6 +408,10 @@ Deploy a wasm contract
* `--salt <SALT>` — Custom salt 32-byte salt for the token id
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -459,6 +475,10 @@ Deploy builtin Soroban Asset Contract
* `--asset <ASSET>` — ID of the Stellar classic asset to wrap, e.g. "USDC:G...5"
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand All @@ -480,6 +500,10 @@ Deploy normal Wasm Contract
* `--salt <SALT>` — ID of the Soroban contract
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -680,6 +704,10 @@ Install a WASM file to the ledger without creating a contract instance

* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -721,6 +749,10 @@ stellar contract invoke ... -- --help
* `--is-view` — View the result simulating and do not sign and submit transaction. Deprecated use `--send=no`
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -804,6 +836,10 @@ Print the current value of a contract-data ledger entry

* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -843,6 +879,10 @@ If no keys are specificed the contract itself is restored.
* `--ttl-ledger-only` — Only print the new Time To Live ledger
* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down Expand Up @@ -1315,7 +1355,7 @@ Sign, Simulate, and Send transactions

* `simulate` — Simulate a transaction envelope from stdin
* `hash` — Calculate the hash of a transaction envelope from stdin
* `sign` — Sign a transaction envolope appending the signature to the envelope
* `sign` — Sign a transaction envelope appending the signature to the envelope
* `send` — Send a transaction envelope to the network


Expand All @@ -1330,6 +1370,10 @@ Simulate a transaction envelope from stdin

* `--source-account <SOURCE_ACCOUNT>` — Account where the final transaction originates from. If no `--sign-with-*` flag is passed, passed key will also be used to sign the transaction. Can be an identity (`--source alice`), a secret key (`--source SC36…`), or a seed phrase (`--source "kite urban…"`)
* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand All @@ -1356,13 +1400,17 @@ Calculate the hash of a transaction envelope from stdin

## `stellar tx sign`

Sign a transaction envolope appending the signature to the envelope
Sign a transaction envelope appending the signature to the envelope

**Usage:** `stellar tx sign [OPTIONS]`

###### **Options:**

* `--sign-with-key <SIGN_WITH_KEY>` — Sign with a local key. 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
* `--sign-with-lab` — Sign with laboratory
* `--lab-url <LAB_URL>` — Lab URL for `sign_with_lab`

Default value: `https://lab.stellar.org/transaction/cli-sign`
* `--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`
* `--yes` — If one of `--sign-with-*` flags is provided, don't ask to confirm to sign a transaction
* `--rpc-url <RPC_URL>` — RPC server endpoint
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Stellar CLI (stellar-cli)

![Apache 2.0 licensed](https://img.shields.io/badge/license-apache%202.0-blue.svg)
[![Crates.io Version](https://img.shields.io/crates/v/stellar-cli?label=version&amp;color=04ac5b)](https://crates.io/crates/stellar-cli)

This repo is home to the Stellar CLI, the command-line multi-tool for running and deploying Stellar contracts on the Stellar network.

Expand Down
Loading
Loading