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?