Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ChainIntegrityWarrant type #312

Merged
merged 2 commits into from
Dec 18, 2024
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
10 changes: 5 additions & 5 deletions docs/client.chainintegritywarrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export type ChainIntegrityWarrant = {
action_author: AgentPubKey;
action: ActionHashAndSig;
validation_type: ValidationType;
} | {
ChainFork: {
chain_author: AgentPubKey;
action_pair: [ActionHashAndSig, ActionHashAndSig];
};
};
} | {
ChainFork: {
chain_author: AgentPubKey;
action_pair: [ActionHashAndSig, ActionHashAndSig];
};
};
```
Expand Down
36 changes: 18 additions & 18 deletions src/hdk/dht-ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,31 +88,31 @@ export interface Warrant {
/**
* @public
*/
export type ChainIntegrityWarrant = {
/**
* Something invalid was authored on a chain.
* When we receive this warrant, we fetch the Action and validate it
* under every applicable DhtOpType.
*/
InvalidChainOp:
| {
export type ChainIntegrityWarrant =
| {
/**
* Something invalid was authored on a chain.
* When we receive this warrant, we fetch the Action and validate it
* under every applicable DhtOpType.
*/
InvalidChainOp: {
/** The author of the action */
action_author: AgentPubKey;
/** The hash of the action to fetch by */
action: ActionHashAndSig;
/** Whether to run app or sys validation */
validation_type: ValidationType;
}
| {
/** Proof of chain fork. */
ChainFork: {
/** Author of the chain which is forked */
chain_author: AgentPubKey;
/** Two actions of the same seq number which prove the fork */
action_pair: [ActionHashAndSig, ActionHashAndSig];
};
};
};
}
| {
/** Proof of chain fork. */
ChainFork: {
/** Author of the chain which is forked */
chain_author: AgentPubKey;
/** Two actions of the same seq number which prove the fork */
action_pair: [ActionHashAndSig, ActionHashAndSig];
};
};

/**
* @public
Expand Down
Loading