@layerzerolabs/lz-sui-sdk-v2
Version:
334 lines (272 loc) • 6.22 kB
text/typescript
import { SuiClient } from '@mysten/sui/client'
import { Chain, Stage } from '@layerzerolabs/lz-definitions'
/**
* Type representing the options for packages.
*/
export interface PackageOptions {
/**
* The endpoint V2 address.
*/
endpointV2: string
/**
* The zro address.
*/
zro: string
/**
* The utils address.
*/
utils: string
/**
* The call address.
*/
call: string
/**
* The simple message library address.
*/
simpleMessageLib: string
/**
* The ULN-302 address.
*/
uln302: string
/**
* The treasury address.
*/
treasury: string
/**
* The common DVN address.
*/
dvn: string
/**
* The DVN fee lib address.
*/
dvnFeeLib: string
/**
* The common executor address.
*/
executor: string
/**
* The executor fee lib address.
*/
executorFeeLib: string
/**
* The price feed address.
*/
priceFeed: string
/**
* The common oapp address.
*/
oapp: string
/**
* The LayerZero Views address.
*/
layerzeroViews: string
/**
* The dvn layerzero address.
*/
dvnLayerzero: string
/**
* The executor layerzero address.
*/
executorLayerzero: string
/**
* The counter V2 address.
*/
counterV2: string
/**
* The ptb move call address.
*/
ptbMoveCall: string
/**
* The endpoint PTB builder address.
*/
endpointPtbBuilder: string
/**
* The simple message lib PTB builder address.
*/
simpleMessageLibPtbBuilder: string
/**
* The ULN-302 PTB builder address.
*/
uln302PtbBuilder: string
/**
* The DVN PTB builder address.
*/
dvnPtbBuilder: string
/**
* The executor PTB builder address.
*/
executorPtbBuilder: string
/**
* The package whitelist validator address.
*/
packageWhitelistValidator: string
/**
* The blocked message library object address.
*/
blockedMessageLib: string
/**
* The blocked message library PTB builder object address.
*/
blockedMessageLibPtbBuilder: string
/**
* The worker registry address.
*/
workerRegistry: string
/**
* The worker common address.
*/
workerCommon: string
/**
* Allow additional properties beyond the explicitly defined ones
*/
[]: any
}
/**
* Type representing the options for objects.
*/
export interface ObjectOptions {
/**
* The endpoint V2 object address.
*/
endpointV2: string
/**
* The simple message library object address.
*/
simpleMessageLib: string
/**
* The simple message library cap object address.
*/
simpleMessageLibAdminCap: string
/**
* The simple message library PTB builder object address.
*/
simpleMessageLibPtbBuilder: string
/**
* The ULN-302 message library object address.
*/
uln302: string
/**
* The ULN-302 admin cap object address.
*/
uln302AdminCap: string
/**
* The ULN-302 verification object address.
*/
uln302Verification: string
/**
* The ULN-302 PTB builder object address.
*/
uln302PtbBuilder: string
/**
* The treasury object address.
*/
treasury: string
/**
* The treasury admin cap object address.
*/
treasuryAdminCap: string
/**
* The blocked message library object address.
*/
blockedMessageLib: string
/**
* The blocked message library PTB builder object address.
*/
blockedMessageLibPtbBuilder: string
/**
* The counter admin cap object address.
*/
counterAdminCap: string
/**
* The endpoint admin cap object address.
*/
endpointAdminCap: string
/**
* The endpoint PTB builder object address.
*/
endpointPtbBuilder: string
/**
* The endpoint PTB builder admin cap object address.
*/
endpointPtbBuilderAdminCap: string
/**
* The default DVN object address.
*/
dvn: string
/**
* The default DVN callCap object address, used in init_dvn move call
*/
dvnCap: string
/**
* The default DVN fee lib object address.
*/
dvnFeeLib: string
/**
* The default executor object address.
*/
executor: string
/**
* The default executor callCap object address, used in init_executor move call
*/
executorCap: string
/**
* The default executor owner cap object address.
*/
executorOwnerCap: string
/**
* The default executor fee lib object address.
*/
executorFeeLib: string
/**
* The default price feed object address.
*/
priceFeed: string
/**
* The default price feed owner cap object address.
*/
priceFeedOwnerCap: string
/**
* The counter OApp object address.
*/
counter: string
/**
* The OApp core object address.
*/
counterOapp: string
/**
* The default package whitelist validator object address.
*/
packageWhitelistValidator: string
/**
* The worker registry object address.
*/
workerRegistry: string
/**
* Allow additional properties beyond the explicitly defined ones
*/
[]: any
}
/**
* Module options for customizing module creation
*/
export interface ModuleOptions {
/** Custom package ID to use instead of default */
packageId: string
/** Custom objects configuration to use instead of default */
objects: Partial<ObjectOptions>
}
/**
* Options for initializing the SDK.
*/
export interface SdkOptions {
/** The chain for the SDK (default: Chain.SUI) */
chain?: Chain
/** The Sui client for the SDK */
client: SuiClient
/** The stage of the SDK (default: Stage.MAINNET) */
stage?: Stage
/** Custom package addresses to override defaults */
packages?: Partial<PackageOptions>
/** Custom object addresses to override defaults */
objects?: Partial<ObjectOptions>
}