Skip to content
Merged
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
38 changes: 32 additions & 6 deletions client/src/generated/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3292,9 +3292,9 @@ impl<S: Stamp> TurnkeyClient<S> {
)
.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,
Expand Down Expand Up @@ -3335,9 +3335,9 @@ impl<S: Stamp> TurnkeyClient<S> {
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,
Expand Down Expand Up @@ -3378,7 +3378,7 @@ impl<S: Stamp> TurnkeyClient<S> {
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(
Expand All @@ -3388,7 +3388,7 @@ impl<S: Stamp> TurnkeyClient<S> {
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(
Expand Down Expand Up @@ -3565,4 +3565,30 @@ impl<S: Stamp> TurnkeyClient<S> {
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<coordinator::GetWalletAddressBalancesResponse, TurnkeyClientError> {
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<coordinator::ListSupportedAssetsResponse, TurnkeyClientError> {
self.process_request(
&request,
"/public/v1/query/list_supported_assets".to_string(),
)
.await
}
}
8 changes: 8 additions & 0 deletions client/src/generated/immutable.activity.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32>,
#[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)]
Expand Down
24 changes: 24 additions & 0 deletions client/src/generated/immutable.models.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,30 @@ pub struct SmartContractInterface {
#[serde(default)]
pub signature: ::core::option::Option<Signature>,
}
#[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 {
Expand Down
27 changes: 27 additions & 0 deletions client/src/generated/services.coordinator.public.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<AssetMetadata>,
}
#[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,
}
1 change: 1 addition & 0 deletions proto/external/errors/v1/errors.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ enum TurnkeyErrorCode {
INVALID_FQDN = 30;
OAUTH_PROVIDER_ALREADY_EXISTS = 31;
EMAIL_SENDING_DISABLED = 32;
ORGANIZATION_MISMATCH = 33;
}
8 changes: 8 additions & 0 deletions proto/immutable/activity/v1/activity.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 12 additions & 0 deletions proto/immutable/models/v1/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
49 changes: 41 additions & 8 deletions proto/services/coordinator/public/v1/public_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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"
};
}
Expand All @@ -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"
};
}
Expand All @@ -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"
};
}
Expand All @@ -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"
};
}
Expand Down Expand Up @@ -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"
};
}
Expand Down Expand Up @@ -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;
}
2 changes: 2 additions & 0 deletions tvc/src/commands/deploy/create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down
8 changes: 8 additions & 0 deletions tvc/src/config/deploy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ pub struct DeployConfig {
pub host_path: String,
#[serde(default)]
pub host_args: Vec<String>,
pub host_container_encrypted_pull_secret: Option<String>,
pub pivot_container_encrypted_pull_secret: Option<String>,
}

impl DeployConfig {
Expand All @@ -33,6 +35,12 @@ impl DeployConfig {
host_container_image_url: "<FILL_IN_HOST_CONTAINER_IMAGE_URL>".to_string(),
host_path: "<FILL_IN_HOST_PATH>".to_string(),
host_args: vec![],
pivot_container_encrypted_pull_secret: Some(
"<REMOVE_ME_IF_PIVOT_CONTAINER_URL_IS_PUBLIC>".to_string(),
),
host_container_encrypted_pull_secret: Some(
"<REMOVE_ME_IF_HOST_CONTAINER_URL_IS_PUBLIC>".to_string(),
),
}
}

Expand Down