For the complete documentation index, see llms.txt. This page is also available as Markdown.

Types and interfaces

Complete reference for all TypeScript types and interfaces used in the Guardian SDK.

🎯 Core Types

Address Types

// Ethereum address type
type Address = `0x${string}`

// Transaction hash type
type Hash = `0x${string}`

// Contract address (branded type for additional safety)
type ContractAddress = Address & { __brand: 'ContractAddress' }

// User address (branded type for additional safety)
type UserAddress = Address & { __brand: 'UserAddress' }

Definition Types

// Contract definition types
type DefinitionType = 
  | 'SecureOwnable'
  | 'EngineBlox'
  | 'RuntimeRBAC'
  | 'Generic'

// Workflow classification types
type WorkflowType = 
  | 'TIME_DELAY_ONLY'     // Traditional two-phase: REQUEST β†’ APPROVE (both time-delay)
  | 'META_TX_ONLY'        // Single meta-transaction: REQUEST_AND_APPROVE
  | 'HYBRID'              // Mixed patterns: REQUEST (time-delay) β†’ APPROVE (meta-tx) OR both options available
  | 'BROKEN'              // Invalid workflow configuration

// Operation types
type OperationType = 
  | 'OWNERSHIP_TRANSFER'
  | 'BROADCASTER_UPDATE'
  | 'RECOVERY_UPDATE'
  | 'TIMELOCK_UPDATE'
  | 'ROLE_CONFIG_BATCH'
  | 'CUSTOM'

// Transaction actions
type TxAction = 
  | 'EXECUTE_TIME_DELAY_REQUEST'
  | 'EXECUTE_TIME_DELAY_APPROVE'
  | 'EXECUTE_TIME_DELAY_CANCEL'
  | 'SIGN_META_REQUEST_AND_APPROVE'
  | 'SIGN_META_APPROVE'
  | 'SIGN_META_CANCEL'
  | 'EXECUTE_META_REQUEST_AND_APPROVE'
  | 'EXECUTE_META_APPROVE'
  | 'EXECUTE_META_CANCEL'

// Transaction statuses
type TxStatus = 
  | 'UNDEFINED'
  | 'PENDING'
  | 'COMPLETED'
  | 'CANCELLED'

// Role types
type RoleType = 
  | 'ADMIN'
  | 'MODERATOR'
  | 'USER'
  | 'CUSTOM'

πŸ” Definitions Types

Definition Contract Types

Definitions Interface

Workflow Type Constants

Definitions Class

πŸ“Š Contract Analysis Types

ContractAnalysis Interface

OperationTypeDefinition Interface

Example:

FunctionSchemaDefinition Interface

Example:

RolePermissionDefinition Interface

Example:

πŸ”„ Workflow Types

Workflow Interface

Example:

Operation Interface

StateTransition Interface

FunctionSchema Interface

RolePermission Interface

Parameter Interface

βœ… Validation Types

ValidationResult Interface

Example:

ComplianceResult Interface

Example:

ComplianceViolation Interface

Example:

πŸ“ˆ Statistics Types

WorkflowStatistics Interface

Example:

πŸ”§ Transaction Types

TransactionOptions Interface

Example:

ExecutionParams Interface

MetaTransactionData Interface

ExecutionResult Interface

πŸ§ͺ Testing Types

TestResult Interface

FuzzResult Interface

EdgeCaseResult Interface

BoundaryResult Interface

🚨 Error Types

GuardianError Class

ContractError Class

ValidationError Class

ComplianceError Class

🎯 Utility Types

Branded Types

Conditional Types

Mapped Types

Template Literal Types

πŸ“ Type Guards

Type Guard Functions

πŸ”„ Type Conversion Utilities

Conversion Functions

πŸ“š Usage Examples

Type-Safe Contract Interaction

Workflow Type Safety

Error Handling with Types


Need more details? Check out the API Reference for complete method documentation.

Last updated

Was this helpful?