-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: correct u256 packing * fix: double hash! * chore: setup type generation * fix: e2e build/publish types
- Loading branch information
Showing
80 changed files
with
660 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
/workdir/*.dna | ||
/workdir/*.happ | ||
|
||
/crates/holoom_types/bindings | ||
|
||
node_modules | ||
dist | ||
/packages/client/docs | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,70 @@ | ||
use hdi::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
use ts_rs::TS; | ||
|
||
use crate::{EvmAddress, EvmSignature}; | ||
|
||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)] | ||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, TS)] | ||
#[serde(tag = "type")] | ||
#[ts(export)] | ||
pub enum EvmU256Item { | ||
Uint, | ||
Hex, | ||
} | ||
|
||
#[hdk_entry_helper] | ||
#[derive(Clone, PartialEq)] | ||
#[derive(Clone, PartialEq, TS)] | ||
#[ts(export)] | ||
pub struct EvmSigningOffer { | ||
#[ts(type = "ActionHash")] | ||
pub recipe_ah: ActionHash, | ||
pub u256_items: Vec<EvmU256Item>, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct CreateEvmSigningOfferPayload { | ||
pub identifier: String, | ||
pub evm_signing_offer: EvmSigningOffer, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct EvmSignatureOverRecipeExecutionRequest { | ||
pub request_id: String, | ||
#[ts(type = "ActionHash")] | ||
pub recipe_execution_ah: ActionHash, | ||
#[ts(type = "ActionHash")] | ||
pub signing_offer_ah: ActionHash, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct ResolveEvmSignatureOverRecipeExecutionRequestPayload { | ||
pub request_id: String, | ||
#[ts(type = "AgentPubKey")] | ||
pub requestor: AgentPubKey, | ||
pub signed_u256_array: SignedEvmU256Array, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct RejectEvmSignatureOverRecipeExecutionRequestPayload { | ||
pub request_id: String, | ||
#[ts(type = "AgentPubKey")] | ||
pub requestor: AgentPubKey, | ||
pub reason: String, | ||
} | ||
|
||
pub type EvmU256 = alloy_primitives::U256; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct SignedEvmU256Array { | ||
#[ts(type = "Uint8Array[]")] | ||
pub raw: Vec<EvmU256>, | ||
#[ts(type = "[Uint8Array, Uint8Array, number]")] | ||
pub signature: EvmSignature, | ||
#[ts(type = "Uint8Array")] | ||
pub signer: EvmAddress, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,49 @@ | ||
use hdi::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
use ts_rs::TS; | ||
|
||
#[hdk_entry_helper] | ||
#[derive(Clone, PartialEq)] | ||
#[derive(Clone, PartialEq, TS)] | ||
#[ts(export)] | ||
pub struct ExternalIdAttestation { | ||
pub request_id: String, | ||
#[ts(type = "AgentPubKey")] | ||
pub internal_pubkey: AgentPubKey, | ||
pub external_id: String, | ||
pub display_name: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct SendExternalIdAttestationRequestPayload { | ||
pub request_id: String, | ||
pub code_verifier: String, | ||
pub code: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct IngestExternalIdAttestationRequestPayload { | ||
pub request_id: String, | ||
pub code_verifier: String, | ||
pub code: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct ConfirmExternalIdRequestPayload { | ||
pub request_id: String, | ||
pub external_id: String, | ||
pub display_name: String, | ||
#[ts(type = "AgentPubKey")] | ||
pub requestor: AgentPubKey, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct RejectExternalIdRequestPayload { | ||
pub request_id: String, | ||
#[ts(type = "AgentPubKey")] | ||
pub requestor: AgentPubKey, | ||
pub reason: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,27 @@ | ||
use hdi::prelude::*; | ||
use serde::{Deserialize, Serialize}; | ||
use ts_rs::TS; | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct MetadataItem { | ||
pub name: String, | ||
pub value: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct UpdateMetadataItemPayload { | ||
#[ts(type = "AgentPubKey")] | ||
pub agent_pubkey: AgentPubKey, | ||
pub name: String, | ||
pub value: String, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Debug)] | ||
#[derive(Serialize, Deserialize, Debug, TS)] | ||
#[ts(export)] | ||
pub struct GetMetadataItemValuePayload { | ||
#[ts(type = "AgentPubKey")] | ||
pub agent_pubkey: AgentPubKey, | ||
pub name: String, | ||
} |
Oops, something went wrong.