diff --git a/client/src/generated/client.rs b/client/src/generated/client.rs index e859c0d..0e77f62 100644 --- a/client/src/generated/client.rs +++ b/client/src/generated/client.rs @@ -3292,9 +3292,9 @@ impl TurnkeyClient { ) .await } - /// Submit a transaction intent for broadcasting. + /// Broadcast EVM transaction /// - /// Submit a transaction intent describing a transaction you would like to broadcast. + /// Submit a transaction intent describing an EVM transaction you would like to broadcast. pub async fn eth_send_transaction( &self, organization_id: String, @@ -3335,9 +3335,9 @@ impl TurnkeyClient { app_proofs: activity.app_proofs, }) } - /// Submit a transaction intent for broadcasting. + /// Broadcast SVM transaction /// - /// Submit a transaction intent describing a transaction you would like to broadcast. + /// Submit a transaction intent describing an SVM transaction you would like to broadcast. pub async fn sol_send_transaction( &self, organization_id: String, @@ -3378,7 +3378,7 @@ impl TurnkeyClient { app_proofs: activity.app_proofs, }) } - /// Get gas usage and limits. + /// Get gas usage /// /// Get gas usage and gas limits for either the parent organization or a sub-organization. pub async fn get_gas_usage( @@ -3388,7 +3388,7 @@ impl TurnkeyClient { self.process_request(&request, "/public/v1/query/get_gas_usage".to_string()) .await } - /// Get nonces for an address. + /// Get nonces /// /// Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions. pub async fn get_nonces( @@ -3565,4 +3565,30 @@ impl TurnkeyClient { app_proofs: activity.app_proofs, }) } + /// Get balances + /// + /// Get non-zero balances of supported assets for a single wallet account address on the specified network. + pub async fn get_wallet_address_balances( + &self, + request: coordinator::GetWalletAddressBalancesRequest, + ) -> Result { + self.process_request( + &request, + "/public/v1/query/get_wallet_address_balances".to_string(), + ) + .await + } + /// List supported assets + /// + /// List supported assets for the specified network + pub async fn list_supported_assets( + &self, + request: coordinator::ListSupportedAssetsRequest, + ) -> Result { + self.process_request( + &request, + "/public/v1/query/list_supported_assets".to_string(), + ) + .await + } } diff --git a/client/src/generated/immutable.activity.v1.rs b/client/src/generated/immutable.activity.v1.rs index d293858..b282308 100644 --- a/client/src/generated/immutable.activity.v1.rs +++ b/client/src/generated/immutable.activity.v1.rs @@ -2037,6 +2037,14 @@ pub struct CreateTvcDeploymentIntent { pub host_args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, #[serde(default)] pub nonce: ::core::option::Option, + #[serde(default)] + pub pivot_container_encrypted_pull_secret: ::core::option::Option< + ::prost::alloc::string::String, + >, + #[serde(default)] + pub host_container_encrypted_pull_secret: ::core::option::Option< + ::prost::alloc::string::String, + >, } #[derive(Debug)] #[derive(::serde::Serialize, ::serde::Deserialize)] diff --git a/client/src/generated/immutable.models.v1.rs b/client/src/generated/immutable.models.v1.rs index c9c1a25..79d2370 100644 --- a/client/src/generated/immutable.models.v1.rs +++ b/client/src/generated/immutable.models.v1.rs @@ -232,6 +232,30 @@ pub struct SmartContractInterface { #[serde(default)] pub signature: ::core::option::Option, } +#[derive(Debug)] +#[derive(::serde::Serialize, ::serde::Deserialize)] +#[serde(rename_all = "camelCase")] +#[derive(Clone, Copy, PartialEq)] +pub struct PolicyBudgetOverride { + #[serde(default)] + pub max_recursion_depth: u32, + #[serde(default)] + pub max_evaluation_steps: u32, + #[serde(default)] + pub timeout_ms: u32, +} +#[derive(Debug)] +#[derive(::serde::Serialize, ::serde::Deserialize)] +#[serde(rename_all = "camelCase")] +#[derive(Clone, Copy, PartialEq)] +pub struct PolicyEvaluationMetrics { + #[serde(default)] + pub max_recursion_depth_reached: u32, + #[serde(default)] + pub max_evaluation_steps_used: u32, + #[serde(default)] + pub max_elapsed_time_ms: u32, +} #[derive(::serde::Serialize, ::serde::Deserialize)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub enum SignatureScheme { diff --git a/client/src/generated/services.coordinator.public.v1.rs b/client/src/generated/services.coordinator.public.v1.rs index e54eab3..db2d23a 100644 --- a/client/src/generated/services.coordinator.public.v1.rs +++ b/client/src/generated/services.coordinator.public.v1.rs @@ -923,3 +923,30 @@ pub struct AssetBalanceDisplay { pub usd: ::prost::alloc::string::String, pub crypto: ::prost::alloc::string::String, } +#[derive(Debug)] +#[derive(::serde::Serialize, ::serde::Deserialize)] +#[serde(rename_all = "camelCase")] +#[derive(Clone, PartialEq)] +pub struct ListSupportedAssetsRequest { + pub organization_id: ::prost::alloc::string::String, + pub caip2: ::prost::alloc::string::String, +} +#[derive(Debug)] +#[derive(::serde::Serialize, ::serde::Deserialize)] +#[serde(rename_all = "camelCase")] +#[derive(Clone, PartialEq)] +pub struct ListSupportedAssetsResponse { + #[serde(default)] + pub assets: ::prost::alloc::vec::Vec, +} +#[derive(Debug)] +#[derive(::serde::Serialize, ::serde::Deserialize)] +#[serde(rename_all = "camelCase")] +#[derive(Clone, PartialEq)] +pub struct AssetMetadata { + pub caip19: ::prost::alloc::string::String, + pub symbol: ::prost::alloc::string::String, + #[serde(default)] + pub decimals: i32, + pub logo_url: ::prost::alloc::string::String, +} diff --git a/proto/external/errors/v1/errors.proto b/proto/external/errors/v1/errors.proto index 9812966..d673d21 100644 --- a/proto/external/errors/v1/errors.proto +++ b/proto/external/errors/v1/errors.proto @@ -44,4 +44,5 @@ enum TurnkeyErrorCode { INVALID_FQDN = 30; OAUTH_PROVIDER_ALREADY_EXISTS = 31; EMAIL_SENDING_DISABLED = 32; + ORGANIZATION_MISMATCH = 33; } diff --git a/proto/immutable/activity/v1/activity.proto b/proto/immutable/activity/v1/activity.proto index 75f7704..1607379 100644 --- a/proto/immutable/activity/v1/activity.proto +++ b/proto/immutable/activity/v1/activity.proto @@ -3885,6 +3885,14 @@ message CreateTvcDeploymentIntent { (google.api.field_behavior) = OPTIONAL, (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Optional nonce to ensure uniqueness of the deployment manifest. If not provided, it defaults to the current Unix timestamp in seconds."} ]; + optional string pivot_container_encrypted_pull_secret = 11 [ + (google.api.field_behavior) = OPTIONAL, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Optional encrypted pull secret to authorize Turnkey to pull the pivot container image. If your image is public, leave this empty."} + ]; + optional string host_container_encrypted_pull_secret = 12 [ + (google.api.field_behavior) = OPTIONAL, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Optional encrypted pull secret to authorize Turnkey to pull the host container image. If your image is public, leave this empty."} + ]; } message CreateTvcManifestApprovalsIntent { diff --git a/proto/immutable/models/v1/models.proto b/proto/immutable/models/v1/models.proto index 5a70fe5..f08b609 100644 --- a/proto/immutable/models/v1/models.proto +++ b/proto/immutable/models/v1/models.proto @@ -172,3 +172,15 @@ message SmartContractInterface { // Signer signature over hash(payload) Signature signature = 2; } + +message PolicyBudgetOverride { + uint32 max_recursion_depth = 1; + uint32 max_evaluation_steps = 2; + uint32 timeout_ms = 3; +} + +message PolicyEvaluationMetrics { + uint32 max_recursion_depth_reached = 1; + uint32 max_evaluation_steps_used = 2; + uint32 max_elapsed_time_ms = 3; +} diff --git a/proto/services/coordinator/public/v1/public_api.proto b/proto/services/coordinator/public/v1/public_api.proto index 71ad1d4..8ca9415 100644 --- a/proto/services/coordinator/public/v1/public_api.proto +++ b/proto/services/coordinator/public/v1/public_api.proto @@ -1598,8 +1598,8 @@ service PublicApiService { body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - description: "Submit a transaction intent describing a transaction you would like to broadcast." - summary: "Submit a transaction intent for broadcasting." + description: "Submit a transaction intent describing an EVM transaction you would like to broadcast." + summary: "Broadcast EVM transaction" tags: "Broadcasting" }; } @@ -1610,8 +1610,8 @@ service PublicApiService { body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - description: "Submit a transaction intent describing a transaction you would like to broadcast." - summary: "Submit a transaction intent for broadcasting." + description: "Submit a transaction intent describing an SVM transaction you would like to broadcast." + summary: "Broadcast SVM transaction" tags: "Broadcasting" }; } @@ -1622,7 +1622,7 @@ service PublicApiService { }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { description: "Get gas usage and gas limits for either the parent organization or a sub-organization." - summary: "Get gas usage and limits." + summary: "Get gas usage" tags: "Broadcasting" }; } @@ -1634,7 +1634,7 @@ service PublicApiService { }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { description: "Get nonce values for an address on a given network. Can fetch the standard on-chain nonce and/or the gas station nonce used for sponsored transactions." - summary: "Get nonces for an address." + summary: "Get nonces" tags: "Broadcasting" }; } @@ -1738,14 +1738,25 @@ service PublicApiService { } rpc GetWalletAddressBalances(GetWalletAddressBalancesRequest) returns (GetWalletAddressBalancesResponse) { - option (google.api.method_visibility).restriction = "INTERNAL"; option (google.api.http) = { post: "/public/v1/query/get_wallet_address_balances" body: "*" }; option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { description: "Get non-zero balances of supported assets for a single wallet account address on the specified network." - summary: "Get balances of supported assets for wallet account address" + summary: "Get balances" + tags: "Wallets" + }; + } + + rpc ListSupportedAssets(ListSupportedAssetsRequest) returns (ListSupportedAssetsResponse) { + option (google.api.http) = { + post: "/public/v1/query/list_supported_assets" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + description: "List supported assets for the specified network" + summary: "List supported assets" tags: "Wallets" }; } @@ -2594,3 +2605,25 @@ message AssetBalanceDisplay { string usd = 1 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "USD value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise."}]; string crypto = 2 [(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Normalized crypto value for display purposes only. Do not do any arithmetic or calculations with these, as the results could be imprecise."}]; } + +message ListSupportedAssetsRequest { + string organization_id = 1 [ + (google.api.field_behavior) = REQUIRED, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "Unique identifier for a given organization."} + ]; + string caip2 = 2 [ + (google.api.field_behavior) = REQUIRED, + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "The network identifier in CAIP-2 format (e.g., 'eip155:1' for Ethereum mainnet)."} + ]; +} + +message ListSupportedAssetsResponse { + repeated AssetMetadata assets = 1; +} + +message AssetMetadata { + string caip19 = 1; + string symbol = 2; + int32 decimals = 3; + string logo_url = 4; +} diff --git a/tvc/src/commands/deploy/create.rs b/tvc/src/commands/deploy/create.rs index 67c8a5a..9392c4e 100644 --- a/tvc/src/commands/deploy/create.rs +++ b/tvc/src/commands/deploy/create.rs @@ -54,6 +54,8 @@ pub async fn run(args: Args) -> Result<()> { host_container_image_url: deploy_config.host_container_image_url.clone(), host_path: deploy_config.host_path.clone(), host_args: deploy_config.host_args.clone(), + pivot_container_encrypted_pull_secret: deploy_config.pivot_container_encrypted_pull_secret, + host_container_encrypted_pull_secret: deploy_config.host_container_encrypted_pull_secret, nonce: None, }; diff --git a/tvc/src/config/deploy.rs b/tvc/src/config/deploy.rs index 255bcd2..5062efc 100644 --- a/tvc/src/config/deploy.rs +++ b/tvc/src/config/deploy.rs @@ -17,6 +17,8 @@ pub struct DeployConfig { pub host_path: String, #[serde(default)] pub host_args: Vec, + pub host_container_encrypted_pull_secret: Option, + pub pivot_container_encrypted_pull_secret: Option, } impl DeployConfig { @@ -33,6 +35,12 @@ impl DeployConfig { host_container_image_url: "".to_string(), host_path: "".to_string(), host_args: vec![], + pivot_container_encrypted_pull_secret: Some( + "".to_string(), + ), + host_container_encrypted_pull_secret: Some( + "".to_string(), + ), } }