diff --git a/crates/icepick/workflows/cosmos/broadcast.yaml b/crates/icepick/workflows/cosmos/broadcast.yaml new file mode 100644 index 0000000..ba677de --- /dev/null +++ b/crates/icepick/workflows/cosmos/broadcast.yaml @@ -0,0 +1,37 @@ +name: "broadcast" +inputs: +- "nonce_address" +- "chain_name" +step: +- type: "cosmos-get-chain-info" + inputs: + chain_name: "chain_name" + outputs: + blockchain_config: "blockchain_config" +- type: "cosmos-get-account-data" + inputs: + account_id: "nonce_address" + blockchain_config: "blockchain_config" + outputs: + account_number: "account_number" + sequence_number: "sequence_number" +- type: "internal-save-file" + values: + filename: "account_info.json" + inputs: + account_number: "account_number" + sequence_number: "sequence_number" +- type: "internal-load-file" + values: + filename: "transaction.json" + outputs: + transaction: "transaction" +- type: "cosmos-broadcast" + inputs: + blockchain_config: "blockchain_config" + transaction: "transaction" + outputs: + status: "status" + url: "url" + error: "error" + error_code: "error_code" \ No newline at end of file diff --git a/crates/icepick/workflows/cosmos/transfer.yaml b/crates/icepick/workflows/cosmos/transfer.yaml new file mode 100644 index 0000000..8003492 --- /dev/null +++ b/crates/icepick/workflows/cosmos/transfer.yaml @@ -0,0 +1,43 @@ +name: "transfer" +inputs: +- "from_address" +- "to_address" +- "asset_name" +- "chain_name" +- "asset_amount" +step: +- type: "cosmos-get-chain-info" + inputs: + chain_name: "chain_name" + outputs: + blockchain_config: "blockchain_config" +- type: "internal-load-file" + values: + filename: "account_info.json" + outputs: + account_number: "account_number" + sequence_number: "sequence_number" +- type: "cosmos-transfer" + inputs: + from_address: "from_address" + to_address: "to_address" + amount: "asset_amount" + denom: "asset_name" + blockchain_config: "blockchain_config" + outputs: + fee: "fee" + tx_messages: "tx_messages" +- type: "cosmos-sign" + inputs: + fee: "fee" + tx_messages: "tx_messages" + account_number: "account_number" + sequence_number: "sequence_number" + blockchain_config: "blockchain_config" + outputs: + transaction: "signed_transaction" +- type: "internal-save-file" + values: + filename: "transaction.json" + inputs: + transaction: "signed_transaction" \ No newline at end of file diff --git a/crates/icepick/workflows/sol/broadcast.yaml b/crates/icepick/workflows/sol/broadcast.yaml new file mode 100644 index 0000000..2b3c147 --- /dev/null +++ b/crates/icepick/workflows/sol/broadcast.yaml @@ -0,0 +1,32 @@ +name: "broadcast" +inputs: +- "nonce_address" +- "cluster" +step: +- type: "sol-get-nonce-account-data" + inputs: + nonce_address: "nonce_address" + cluster: "cluster" + outputs: + authority: "nonce_authority" + durable_nonce: "nonce" +- type: "internal-save-file" + values: + filename: "nonce.json" + inputs: + nonce_authority: "nonce_authority" + nonce_data: "nonce" + nonce_address: "nonce_address" +- type: "internal-load-file" + values: + filename: "transaction.json" + outputs: + transaction: "transaction" +- type: "sol-broadcast" + inputs: + cluster: "cluster" + transaction: "transaction" + outputs: + status: "status" + url: "url" + error: "error" \ No newline at end of file diff --git a/crates/icepick/workflows/sol/generate-nonce-account.yaml b/crates/icepick/workflows/sol/generate-nonce-account.yaml new file mode 100644 index 0000000..fda4b17 --- /dev/null +++ b/crates/icepick/workflows/sol/generate-nonce-account.yaml @@ -0,0 +1,62 @@ +name: "generate-nonce-account" +inputs: +- "cluster" +- "authorization_address" +step: +- type: "sol-generate-wallet" +- type: "sol-get-wallet-address" + outputs: + pubkey: "wallet_pubkey" +- type: "sol-await-funds" + inputs: + address: "wallet_pubkey" + cluster: "cluster" + values: + lamports: "1510000" +- type: "sol-get-blockhash" + inputs: + cluster: "cluster" + outputs: + blockhash: "blockhash" +- type: "sol-create-nonce-account-and-signing-key" + inputs: + from_address: "wallet_pubkey" + authorization_address: "authorization_address" + outputs: + transaction: "instructions" + nonce_pubkey: "nonce_pubkey" + nonce_privkey: "private_keys" + derivation_accounts: "derivation_accounts" +- type: "sol-compile" + inputs: + instructions: "instructions" + derivation_accounts: "derivation_accounts" + blockhash: "blockhash" + outputs: + transaction: "unsigned_transaction" +- type: "sol-sign" + inputs: + blockhash: "blockhash" + signing_keys: "private_keys" + transaction: "unsigned_transaction" + outputs: + transaction: "signed_transaction" +- type: "sol-broadcast" + inputs: + cluster: "cluster" + transaction: "signed_transaction" + outputs: + status: "status" + url: "url" + error: "error" +- type: "internal-cat" + inputs: + status: "status" + url: "url" + nonce_account: "nonce_pubkey" + error: "error" + outputs: + status: "status" + url: "url" + nonce_account: "nonce_account" + error: "error" \ No newline at end of file diff --git a/crates/icepick/workflows/sol/transfer.yaml b/crates/icepick/workflows/sol/transfer.yaml new file mode 100644 index 0000000..4788155 --- /dev/null +++ b/crates/icepick/workflows/sol/transfer.yaml @@ -0,0 +1,41 @@ +name: "transfer" +inputs: +- "to_address" +- "from_address" +- "amount" +step: +- type: "internal-load-file" + values: + filename: "nonce.json" + outputs: + nonce_authority: "nonce_authority" + nonce_data: "nonce_data" + nonce_address: "nonce_address" +- type: "sol-transfer" + inputs: + from_address: "from_address" + to_address: "to_address" + amount: "amount" + outputs: + instructions: "instructions" + derivation_accounts: "derivation_accounts" +- type: "sol-compile" + inputs: + instructions: "instructions" + derivation_accounts: "derivation_accounts" + nonce_address: "nonce_address" + nonce_authority: "nonce_authority" + nonce_data: "nonce_data" + outputs: + transaction: "unsigned_transaction" +- type: "sol-sign" + inputs: + blockhash: "nonce_data" + transaction: "unsigned_transaction" + outputs: + transaction: "signed_transaction" +- type: "internal-save-file" + values: + filename: "transaction.json" + inputs: + transaction: "signed_transaction" \ No newline at end of file