AI Generated; use caution
It would be useful for consumers to be able to import the ScopeConfig and related types.
Background
ScopeConfig is used in public API functions like createDelegation() and createOpenDelegation() as part of the options parameter. Currently, consumers cannot import these types directly, making it difficult to:
- Get proper TypeScript autocomplete when creating delegations
- Understand the structure of scope configurations
- Write type-safe code that works with scopes
Types to Export
1. Essential Scope Types (Primary)
ScopeConfig - Main discriminated union type covering all 9 scope types
Erc20TransferScopeConfig
Erc20StreamingScopeConfig
Erc20PeriodicScopeConfig
NativeTokenTransferScopeConfig
NativeTokenStreamingScopeConfig
NativeTokenPeriodicScopeConfig
Erc721ScopeConfig
OwnershipScopeConfig
FunctionCallScopeConfig
2. Internal utility types (DO NOT EXPORT)
ConvertScopeConfigsToInputs - Allows the type field to accept both ScopeType.X enum and string value
Benefits
Exporting these types will:
- Improve TypeScript DX: Consumers get autocomplete and type validation when creating scopes
- Better Documentation: Types serve as inline documentation for what properties are needed
- Clearer Error Messages: Individual scope types provide better compiler errors than just the union type
- API Completeness: If a type appears in a public API parameter, it should be importable
AI Generated; use caution
It would be useful for consumers to be able to import the ScopeConfig and related types.
Background
ScopeConfigis used in public API functions likecreateDelegation()andcreateOpenDelegation()as part of the options parameter. Currently, consumers cannot import these types directly, making it difficult to:Types to Export
1. Essential Scope Types (Primary)
ScopeConfig- Main discriminated union type covering all 9 scope typesErc20TransferScopeConfigErc20StreamingScopeConfigErc20PeriodicScopeConfigNativeTokenTransferScopeConfigNativeTokenStreamingScopeConfigNativeTokenPeriodicScopeConfigErc721ScopeConfigOwnershipScopeConfigFunctionCallScopeConfig2. Internal utility types (DO NOT EXPORT)
ConvertScopeConfigsToInputs- Allows thetypefield to accept bothScopeType.Xenum and string valueBenefits
Exporting these types will: