diff --git a/docs/content/references/cli/keytool.mdx b/docs/content/references/cli/keytool.mdx index ce0cde35265..abddb15c748 100644 --- a/docs/content/references/cli/keytool.mdx +++ b/docs/content/references/cli/keytool.mdx @@ -15,42 +15,43 @@ The IOTA CLI `keytool` command provides several command-level access for the man Usage: iota keytool [OPTIONS] Commands: - convert Convert private key from legacy formats (e.g. Hex or Base64) to Bech32 encoded 33 byte `flag || private key` begins with `iotaprivkey` - decode-or-verify-tx Given a Base64 encoded transaction bytes, decode its components. If a signature is provided, verify the signature against the transaction - and output the result. - decode-multi-sig Given a Base64 encoded MultiSig signature, decode its components. If tx_bytes is passed in, verify the multisig - generate Generate a new keypair with key scheme flag {ed25519 | secp256k1 | secp256r1} with optional derivation path, default to - m/44'/4218'/0'/0'/0' for ed25519 or m/54'/4218'/0'/0/0 for secp256k1 or m/74'/4218'/0'/0/0 for secp256r1. Word length can be { word12 | - word15 | word18 | word21 | word24} default to word12 if not specified - import Add a new key to iota.keystore using either the input mnemonic phrase or a private key (from the Wallet), the key scheme flag {ed25519 | - secp256k1 | secp256r1} and an optional derivation path, default to m/44'/4218'/0'/0'/0' for ed25519 or m/54'/4218'/0'/0/0 for secp256k1 - or m/74'/4218'/0'/0/0 for secp256r1. Supports mnemonic phrase of word length 12, 15, 18`, 21, 24 - list List all keys by its IOTA address, Base64 encoded public key, key scheme name in iota.keystore - load-keypair This reads the content at the provided file path. The accepted format can be [enum IotaKeyPair] (Base64 encoded of 33-byte `flag || - privkey`) or `type AuthorityKeyPair` (Base64 encoded `privkey`). This prints out the account keypair as Base64 encoded `flag || - privkey`, the network keypair, worker keypair, protocol keypair as Base64 encoded `privkey` - multi-sig-address To MultiSig IOTA Address. Pass in a list of all public keys `flag || pk` in Base64. See `keytool list` for example public keys - multi-sig-combine-partial-sig Provides a list of participating signatures (`flag || sig || pk` encoded in Base64), threshold, a list of all public keys and a list of - their weights that define the MultiSig address. Returns a valid MultiSig signature and its sender address. The result can be used as - signature field for `iota client execute-signed-tx`. The sum of weights of all signatures must be >= the threshold - multi-sig-combine-partial-sig-legacy - show Read the content at the provided file path. The accepted format can be [enum IotaKeyPair] (Base64 encoded of 33-byte `flag || privkey`) - or `type AuthorityKeyPair` (Base64 encoded `privkey`). It prints its Base64 encoded public key and the key scheme flag - sign Create signature using the private key for for the given address in iota keystore. Any signature commits to a [struct IntentMessage] - consisting of the Base64 encoded of the BCS serialized transaction bytes itself and its intent. If intent is absent, default will be - used - sign-kms Creates a signature by leveraging AWS KMS. Pass in a key-id to leverage Amazon KMS to sign a message and the base64 pubkey. Generate - PubKey from pem using MystenLabs/base64pemkey Any signature commits to a [struct IntentMessage] consisting of the Base64 encoded of the - BCS serialized transaction bytes itself and its intent. If intent is absent, default will be used - unpack This takes [enum IotaKeyPair] of Base64 encoded of 33-byte `flag || privkey`). It outputs the keypair into a file at the current - directory where the address is the filename, and prints out its IOTA address, Base64 encoded public key, the key scheme, and the key - scheme flag - help Print this message or the help of the given subcommand(s) + update-alias Update an old alias to a new one. If a new alias is not provided, a random one will be generated + convert Convert private key in Hex or Base64 to new format (Bech32 encoded 33 byte flag || private key starting with "iotaprivkey"). Hex private key format import and + export are both deprecated in Iota Wallet and Iota CLI Keystore. Use `iota keytool import` if you wish to import a key to Iota Keystore + decode-or-verify-tx Given a Base64 encoded transaction bytes, decode its components. If a signature is provided, verify the signature against the transaction and output the result + decode-multi-sig Given a Base64 encoded MultiSig signature, decode its components. If tx_bytes is passed in, verify the multisig + generate Generate a new keypair with key scheme flag {ed25519 | secp256k1 | secp256r1} with optional derivation path, default to m/44'/4218'/0'/0'/0' for ed25519 or + m/54'/4218'/0'/0/0 for secp256k1 or m/74'/4218'/0'/0/0 for secp256r1. Word length can be { word12 | word15 | word18 | word21 | word24} default to word12 if not + specified + import Add a new key to Iota CLI Keystore using either the input mnemonic phrase or a Bech32 encoded 33-byte `flag || privkey` starting with "iotaprivkey", the key + scheme flag {ed25519 | secp256k1 | secp256r1} and an optional derivation path, default to m/44'/4218'/0'/0'/0' for ed25519 or m/54'/4218'/0'/0/0 for secp256k1 + or m/74'/4218'/0'/0/0 for secp256r1. Supports mnemonic phrase of word length 12, 15, 18, 21, 24. Set an alias for the key with the --alias flag. If no alias is + provided, the tool will automatically generate one + export Output the private key of the given key identity in Iota CLI Keystore as Bech32 encoded string starting with `iotaprivkey` + list List all keys by its Iota address, Base64 encoded public key, key scheme name in iota.keystore + load-keypair This reads the content at the provided file path. The accepted format can be [enum IotaKeyPair] (Base64 encoded of 33-byte `flag || privkey`) or `type + AuthorityKeyPair` (Base64 encoded `privkey`). This prints out the account keypair as Base64 encoded `flag || privkey`, the network keypair, worker keypair, + protocol keypair as Base64 encoded `privkey` + multi-sig-address To MultiSig Iota Address. Pass in a list of all public keys `flag || pk` in Base64. See `keytool list` for example public keys + multi-sig-combine-partial-sig Provides a list of participating signatures (`flag || sig || pk` encoded in Base64), threshold, a list of all public keys and a list of their weights that + define the MultiSig address. Returns a valid MultiSig signature and its sender address. The result can be used as signature field for `iota client + execute-signed-tx`. The sum of weights of all signatures must be >= the threshold + show Read the content at the provided file path. The accepted format can be [enum IotaKeyPair] (Base64 encoded of 33-byte `flag || privkey`) or `type + AuthorityKeyPair` (Base64 encoded `privkey`). It prints its Base64 encoded public key and the key scheme flag + sign Create signature using the private key for for the given address (or its alias) in iota keystore. Any signature commits to a [struct IntentMessage] consisting + of the Base64 encoded of the BCS serialized transaction bytes itself and its intent. If intent is absent, default will be used + sign-kms Creates a signature by leveraging AWS KMS. Pass in a key-id to leverage Amazon KMS to sign a message and the base64 pubkey. Generate PubKey from pem using + MystenLabs/base64pemkey Any signature commits to a [struct IntentMessage] consisting of the Base64 encoded of the BCS serialized transaction bytes itself and + its intent. If intent is absent, default will be used + unpack This takes [enum IotaKeyPair] of Base64 encoded of 33-byte `flag || privkey`). It outputs the keypair into a file at the current directory where the address is + the filename, and prints out its Iota address, Base64 encoded public key, the key scheme, and the key scheme flag + help Print this message or the help of the given subcommand(s) Options: - --keystore-path - --json Return command outputs in json format - -h, --help Print help + --keystore-path + --json Return command outputs in json format + -h, --help Print help + -V, --version Print version ``` ## JSON output @@ -69,18 +70,18 @@ Use the `iota keytool list` command to output all the IOTA addresses that exist $ iota keytool list ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │ ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ │ -│ │ iotaAddress │ 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 │ │ -│ │ publicBase64Key │ AHsXwcxaWNaNtCIIszwu7V2G6HO8aNM1598w/8y0zI5q │ │ -│ │ keyScheme │ ed25519 │ │ -│ │ flag │ 0 │ │ -│ │ peerId │ 7b17c1cc5a58d68db42208b33c2eed5d86e873bc68d335e7df30ffccb4cc8e6a │ │ +│ │ iotaAddress │ 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 │ │ +│ │ publicBase64Key │ AHsXwcxaWNaNtCIIszwu7V2G6HO8aNM1598w/8y0zI5q │ │ +│ │ keyScheme │ ed25519 │ │ +│ │ flag │ 0 │ │ +│ │ peerId │ 7b17c1cc5a58d68db42208b33c2eed5d86e873bc68d335e7df30ffccb4cc8e6a │ │ │ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ │ │ ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ │ -│ │ iotaAddress │ 0x514692f08249c3e9957799ce29074695840422564bff85e424b56de462913e0d │ │ -│ │ publicBase64Key │ AKJCGi8R8TslhYdO2OHIjI6rbr+to1eR+vlOjigLY6SX │ │ -│ │ keyScheme │ ed25519 │ │ -│ │ flag │ 0 │ │ -│ │ peerId │ a2421a2f11f13b2585874ed8e1c88c8eab6ebfada35791faf94e8e280b63a497 │ │ +│ │ iotaAddress │ 0x514692f08249c3e9957799ce29074695840422564bff85e424b56de462913e0d │ │ +│ │ publicBase64Key │ AKJCGi8R8TslhYdO2OHIjI6rbr+to1eR+vlOjigLY6SX │ │ +│ │ keyScheme │ ed25519 │ │ +│ │ flag │ 0 │ │ +│ │ peerId │ a2421a2f11f13b2585874ed8e1c88c8eab6ebfada35791faf94e8e280b63a497 │ │ │ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ``` @@ -92,12 +93,12 @@ To generate a new key pair with the `ed25519` scheme, use the `iota keytool gene ```shell $ iota keytool generate ed25519 ╭─────────────────┬───────────────────────────────────────────────────────────────────────────────────╮ -│ iotaAddress │ 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25 │ -│ publicBase64Key │ AKTAGf9iv0JqeLXXlsr4PUzBXb9VY8lK7xiZMS50GSu6 │ -│ keyScheme │ ed25519 │ -│ flag │ 0 │ -│ mnemonic │ cushion price ability recall payment embody kid media rude mosquito chalk broom │ -│ peerId │ a4c019ff62bf426a78b5d796caf83d4cc15dbf5563c94aef1899312e74192bba │ +│ iotaAddress │ 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25 │ +│ publicBase64Key │ AKTAGf9iv0JqeLXXlsr4PUzBXb9VY8lK7xiZMS50GSu6 │ +│ keyScheme │ ed25519 │ +│ flag │ 0 │ +│ mnemonic │ cushion price ability recall payment embody kid media rude mosquito chalk broom │ +│ peerId │ a4c019ff62bf426a78b5d796caf83d4cc15dbf5563c94aef1899312e74192bba │ ╰─────────────────┴───────────────────────────────────────────────────────────────────────────────────╯ ``` @@ -108,11 +109,11 @@ Use `iota keytool show [filename]` to show the key pair data that is stored in a ```shell $ iota keytool show 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25.key ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ -│ iotaAddress │ 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25 │ -│ publicBase64Key │ AC+AKTAGf9iv0JqeLXXlsr4PUzBXb9VY8lK7xiZMS50GSu6 │ -│ keyScheme │ ed25519 │ -│ flag │ 0 │ -│ peerId │ a4c019ff62bf426a78b5d796caf83d4cc15dbf5563c94aef1899312e74192bba │ +│ iotaAddress │ 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989eaef25 │ +│ publicBase64Key │ AC+AKTAGf9iv0JqeLXXlsr4PUzBXb9VY8lK7xiZMS50GSu6 │ +│ keyScheme │ ed25519 │ +│ flag │ 0 │ +│ peerId │ a4c019ff62bf426a78b5d796caf83d4cc15dbf5563c94aef1899312e74192bba │ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ ``` @@ -121,20 +122,20 @@ $ iota keytool show 0x5d8aa70f17d9343813d3ba6a59ecf5e8a23ffb487938e860999a722989 ```shell $ iota keytool sign --data AAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAAILsR2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== --address 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 -╭──────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ iotaAddress │ 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 │ -│ rawTxData │ AAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAAILsR │ -│ │ 2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== │ -│ intent │ ╭─────────┬─────╮ │ -│ │ │ scope │ 0 │ │ -│ │ │ version │ 0 │ │ -│ │ │ app_id │ 0 │ │ -│ │ ╰─────────┴─────╯ │ -│ rawIntentMsg │ AAAAAAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAA │ -│ │ ILsR2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== │ -│ digest │ +B8Cbr16HfOVT50DoN/QF8HB0+oznm8KAYy8Rm+TQFo= │ -│ iotaSignature │ ANucBEl9TIE0uv+w965DvOjlfDUll7NUtIpJgRhPc3D3y3EtZ4cvaNbm8i5pc7TNIov/qI0FhzIYf2J6PbqoNQ57F8HMWljWjbQiCLM8Lu1dhuhzvGjTNeffMP/MtMyOag== │ -╰──────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ +╭───────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ +│ iotaAddress │ 0x3047f142a84297a42a65fb0a8c7a716d9d1b0bd0413d6bfa5ddfec45df175235 │ +│ rawTxData │ AAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAAILsR │ +│ │ 2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== │ +│ intent │ ╭─────────┬─────╮ │ +│ │ │ scope │ 0 │ │ +│ │ │ version │ 0 │ │ +│ │ │ app_id │ 0 │ │ +│ │ ╰─────────┴─────╯ │ +│ rawIntentMsg │ AAAAAAABACBRRpLwgknD6ZV3mc4pB0aVhAQiVkv/heQktW3kYpE+DQEBAQABAAAwR/FCqEKXpCpl+wqMenFtnRsL0EE9a/pd3+xF3xdSNQEaEUeErlBmGWxz3Bh+9BZh2mzayodzsri7xIZNDHRA3wIAAAAAAAAA │ +│ │ ILsR2d1FIZ5+ADDYZtJ2e9CWlpAxsGd4Y2rZrjlyTUF1MEfxQqhCl6QqZfsKjHpxbZ0bC9BBPWv6Xd/sRd8XUjXoAwAAAAAAAICWmAAAAAAAAA== │ +│ digest │ +B8Cbr16HfOVT50DoN/QF8HB0+oznm8KAYy8Rm+TQFo= │ +│ iotaSignature │ ANucBEl9TIE0uv+w965DvOjlfDUll7NUtIpJgRhPc3D3y3EtZ4cvaNbm8i5pc7TNIov/qI0FhzIYf2J6PbqoNQ57F8HMWljWjbQiCLM8Lu1dhuhzvGjTNeffMP/MtMyOag== │ +╰───────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` ## Help @@ -149,9 +150,10 @@ transaction bytes itself and its intent. If intent is absent, default will be us Usage: iota keytool sign [OPTIONS] --address
--data Options: - --address
- --data - --json Return command outputs in json format - --intent - -h, --help Print help + --address
+ --data + --json Return command outputs in json format + --intent + -h, --help Print help + -V, --version Print version ``` diff --git a/docs/content/references/cli/move.mdx b/docs/content/references/cli/move.mdx index 8c183e920be..18123ff95cc 100644 --- a/docs/content/references/cli/move.mdx +++ b/docs/content/references/cli/move.mdx @@ -60,16 +60,17 @@ To create a new Move project that automatically adds the necessary dependencies $ iota move new smart_contract_test $ ls -l smart_contract_test Move.toml -Sources +sources +tests # display the contents of Move.toml file $ cat smart_contract_test/Move.toml [package] name = "smart_contract_test" -version = "0.0.1" +edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move [dependencies] -IOTA = { git = "https://github.com/iotaledger/iota.git", subdir = "crates/iota-framework/packages/iota-framework", rev = "framework/testnet" } +Iota = { git = "https://github.com/iotaledger/iota.git", subdir = "crates/iota-framework/packages/iota-framework", rev = "framework/testnet" } [addresses] smart_contract_test = "0x0" @@ -138,7 +139,7 @@ Module 0000000000000000000000000000000000000000000000000000000000000000::example ## Help -Each command has its own help section. For example `iota move build –help` displays the following prompt: +Each command has its own help section. For example `iota move build -help` displays the following prompt: ```shell $ iota move build --help