@layerzerolabs/lz-config-types 3.0.74 → 3.0.75-test.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/signer.ts"],"names":[],"mappings":";;;AAkKO,SAAS,mBAAmB,GAAuC,EAAA;AACtE,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA;AAC3E;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,QAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA,KAAQ,UAAc,IAAA,GAAA,IAAO,IAAQ,IAAA,GAAA,CAAA;AAChH;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D;AAEO,SAAS,6BAA6B,GAAiD,EAAA;AAC1F,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D","file":"index.cjs","sourcesContent":["import { ContractNetworksConfig } from '@safe-global/protocol-kit'\ntype ContractNetworkConfig = ContractNetworksConfig[string]\n\n// ------------------ Account/Signer Config ------------------\n\nimport { Signer } from '@layerzerolabs/lz-core'\nimport { Chain, ChainType, Environment, Stage } from '@layerzerolabs/lz-definitions'\n\n/**\n * Interface representing the configuration for a signer item.\n */\nexport interface SignerItemConfig {\n /**\n * The mnemonic for the signer.\n */\n mnemonic?: string\n /**\n * The derivation path for the signer.\n */\n path?: string\n /**\n * The address of the signer.\n */\n address?: string\n /**\n * The private key of the signer.\n */\n pk?: string\n}\n\n/**\n * Interface representing the configuration for a Gnosis item.\n */\nexport interface GnosisItemConfig {\n /**\n * The URL of the Gnosis safe.\n */\n safeUrl: string\n /**\n * The address of the Gnosis safe.\n */\n safeAddress: string\n /**\n * The contract networks configuration for the Gnosis safe (optional).\n * @see {@link ContractNetworksConfig}\n */\n contractNetworks?: { [key: string]: Partial<ContractNetworkConfig> }\n}\n\n/**\n * Interface representing the configuration for a Squads item.\n */\nexport interface SquadsItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface RimosafeItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Type representing the configuration for Gnosis by stage and chain.\n * @see {@link GnosisItemConfig}, {@link SquadsItemConfig}, {@link ChainType}, {@link Chain}\n */\nexport type GnosisStageConfig = {\n [chainOrType in ChainType | Chain]?: { [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig }\n}\n\n/**\n * Type representing the configuration for Gnosis by stage.\n * This type maps stages to their corresponding Gnosis stage configurations.\n */\nexport type GnosisConfig = {\n /**\n * The stage of the configuration.\n * @see {@link Stage}, {@link GnosisStageConfig}\n */\n [stage in Stage]?: GnosisStageConfig\n}\n\n/**\n * Type representing the combined configuration for Gnosis and signer items.\n */\nexport type CombinedGnosisItemConfig = GnosisItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Squads and signer items.\n */\nexport type CombinedSquadsItemConfig = SquadsItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Rimosafe and signer items.\n */\nexport type CombinedRimosafeItemConfig = RimosafeItemConfig & SignerItemConfig\n/**\n * Type representing the configuration for signers by stage, chain, and key name.\n * @example\n * ```json\n * {\n * \"sandbox\": {\n * \"ethereum\": {\n * \"key1\": {\n * \"mnemonic\": \"xxx\",\n * \"path\": \"xxx\"\n * },\n * \"key2\": {\n * \"pk\": \"xxx\",\n * \"path\": \"xxx\"\n * safeUrl: \"xxx\",\n * safeAddress: \"xxx\"\n * }\n * }\n * }\n * }\n *\n * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link ChainType}, {@link Chain}\n * ```\n */\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]:\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedRimosafeItemConfig\n }\n }\n}\n\n/**\n * Interface representing a signer manager.\n * Provides methods to retrieve signers based on the specified chain, stage, environment, and key name.\n */\nexport interface SignerManager {\n /**\n * Retrieves a signer based on the specified chain, stage, environment, and key name.\n *\n * @param {Chain} chain - The chain for which to retrieve the signer.\n * @param {Stage} stage - The stage for which to retrieve the signer.\n * @param {Environment} env - The environment for which to retrieve the signer.\n * @param {string} keyName - The key name for which to retrieve the signer.\n * @returns {Promise<Signer>} A promise that resolves to the signer.\n */\n getSigner(chain: Chain, stage: Stage, env: Environment, keyName: string): Promise<Signer>\n}\n\n/**\n * Checks if the given object is a Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a Gnosis item configuration, false otherwise.\n * @see {@link GnosisItemConfig}\n */\nexport function isGnosisItemConfig(obj: unknown): obj is GnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj\n}\n\n/**\n * Checks if the given object is a combined Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Gnosis item configuration, false otherwise.\n */\nexport function isCombinedGnosisItemConfig(obj: unknown): obj is CombinedGnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj && ('mnemonic' in obj || 'pk' in obj)\n}\n\n/**\n * Checks if the given object is a combined Squads item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Squads item configuration, false otherwise.\n */\nexport function isCombinedSquadsItemConfig(obj: unknown): obj is CombinedSquadsItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedRimosafeItemConfig(obj: unknown): obj is CombinedRimosafeItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n"]}
1
+ {"version":3,"sources":["../src/signer.ts"],"names":[],"mappings":";;;AAsLO,SAAS,mBAAmB,GAAuC,EAAA;AACtE,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA;AAC3E;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,QAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA,KAAQ,UAAc,IAAA,GAAA,IAAO,IAAQ,IAAA,GAAA,CAAA;AAChH;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D;AAEO,SAAS,6BAA6B,GAAiD,EAAA;AAC1F,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D","file":"index.cjs","sourcesContent":["import { ContractNetworksConfig } from '@safe-global/protocol-kit'\ntype ContractNetworkConfig = ContractNetworksConfig[string]\n\n// ------------------ Account/Signer Config ------------------\n\nimport { Signer } from '@layerzerolabs/lz-core'\nimport { Chain, ChainType, Environment, Stage } from '@layerzerolabs/lz-definitions'\n\n/**\n * Interface representing the configuration for a signer item.\n */\nexport interface SignerItemConfig {\n /**\n * The mnemonic for the signer.\n */\n mnemonic?: string\n /**\n * The derivation path for the signer.\n */\n path?: string\n /**\n * The address of the signer.\n */\n address?: string\n /**\n * The private key of the signer.\n */\n pk?: string\n}\n\n/**\n * Interface representing the configuration for a Gnosis item.\n */\nexport interface GnosisItemConfig {\n /**\n * The URL of the Gnosis safe.\n */\n safeUrl: string\n /**\n * The address of the Gnosis safe.\n */\n safeAddress: string\n /**\n * The contract networks configuration for the Gnosis safe (optional).\n * @see {@link ContractNetworksConfig}\n */\n contractNetworks?: { [key: string]: Partial<ContractNetworkConfig> }\n}\n\n/**\n * Interface representing the configuration for a OneSig item.\n */\nexport interface OneSigItemConfig {\n oneSigAddress: string\n\n /**\n * The URL of the OneSig REST API\n */\n oneSigUrl: string\n}\n\n/**\n * Interface representing the configuration for a Squads item.\n */\nexport interface SquadsItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface RimosafeItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Type representing the configuration for Gnosis by stage and chain.\n * @see {@link GnosisItemConfig}, {@link SquadsItemConfig}, {@link ChainType}, {@link Chain}\n */\nexport type GnosisStageConfig = {\n [chainOrType in ChainType | Chain]?: {\n [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig | OneSigItemConfig\n }\n}\n\n/**\n * Type representing the configuration for Gnosis by stage.\n * This type maps stages to their corresponding Gnosis stage configurations.\n */\nexport type GnosisConfig = {\n /**\n * The stage of the configuration.\n * @see {@link Stage}, {@link GnosisStageConfig}\n */\n [stage in Stage]?: GnosisStageConfig\n}\n\n/**\n * Type representing the combined configuration for Gnosis and signer items.\n */\nexport type CombinedGnosisItemConfig = GnosisItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for OneSig and signer items.\n */\nexport type CombinedOneSigItemConfig = OneSigItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Squads and signer items.\n */\nexport type CombinedSquadsItemConfig = SquadsItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Rimosafe and signer items.\n */\nexport type CombinedRimosafeItemConfig = RimosafeItemConfig & SignerItemConfig\n/**\n * Type representing the configuration for signers by stage, chain, and key name.\n * @example\n * ```json\n * {\n * \"sandbox\": {\n * \"ethereum\": {\n * \"key1\": {\n * \"mnemonic\": \"xxx\",\n * \"path\": \"xxx\"\n * },\n * \"key2\": {\n * \"pk\": \"xxx\",\n * \"path\": \"xxx\"\n * safeUrl: \"xxx\",\n * safeAddress: \"xxx\"\n * }\n * }\n * }\n * }\n *\n * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link CombinedOneSigItemConfig}, {@link ChainType}, {@link Chain}\n * ```\n */\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]:\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedRimosafeItemConfig\n | CombinedOneSigItemConfig\n }\n }\n}\n\n/**\n * Interface representing a signer manager.\n * Provides methods to retrieve signers based on the specified chain, stage, environment, and key name.\n */\nexport interface SignerManager {\n /**\n * Retrieves a signer based on the specified chain, stage, environment, and key name.\n *\n * @param {Chain} chain - The chain for which to retrieve the signer.\n * @param {Stage} stage - The stage for which to retrieve the signer.\n * @param {Environment} env - The environment for which to retrieve the signer.\n * @param {string} keyName - The key name for which to retrieve the signer.\n * @returns {Promise<Signer>} A promise that resolves to the signer.\n */\n getSigner(chain: Chain, stage: Stage, env: Environment, keyName: string): Promise<Signer>\n}\n\n/**\n * Checks if the given object is a Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a Gnosis item configuration, false otherwise.\n * @see {@link GnosisItemConfig}\n */\nexport function isGnosisItemConfig(obj: unknown): obj is GnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj\n}\n\n/**\n * Checks if the given object is a combined Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Gnosis item configuration, false otherwise.\n */\nexport function isCombinedGnosisItemConfig(obj: unknown): obj is CombinedGnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj && ('mnemonic' in obj || 'pk' in obj)\n}\n\n/**\n * Checks if the given object is a combined Squads item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Squads item configuration, false otherwise.\n */\nexport function isCombinedSquadsItemConfig(obj: unknown): obj is CombinedSquadsItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedRimosafeItemConfig(obj: unknown): obj is CombinedRimosafeItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n"]}
package/dist/index.d.mts CHANGED
@@ -91,6 +91,16 @@ interface GnosisItemConfig {
91
91
  [key: string]: Partial<ContractNetworkConfig>;
92
92
  };
93
93
  }
94
+ /**
95
+ * Interface representing the configuration for a OneSig item.
96
+ */
97
+ interface OneSigItemConfig {
98
+ oneSigAddress: string;
99
+ /**
100
+ * The URL of the OneSig REST API
101
+ */
102
+ oneSigUrl: string;
103
+ }
94
104
  /**
95
105
  * Interface representing the configuration for a Squads item.
96
106
  */
@@ -115,7 +125,7 @@ interface RimosafeItemConfig {
115
125
  */
116
126
  type GnosisStageConfig = {
117
127
  [chainOrType in ChainType | Chain]?: {
118
- [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig;
128
+ [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig | OneSigItemConfig;
119
129
  };
120
130
  };
121
131
  /**
@@ -129,6 +139,10 @@ type GnosisConfig = {
129
139
  * Type representing the combined configuration for Gnosis and signer items.
130
140
  */
131
141
  type CombinedGnosisItemConfig = GnosisItemConfig & SignerItemConfig;
142
+ /**
143
+ * Type representing the combined configuration for OneSig and signer items.
144
+ */
145
+ type CombinedOneSigItemConfig = OneSigItemConfig & SignerItemConfig;
132
146
  /**
133
147
  * Type representing the combined configuration for Squads and signer items.
134
148
  */
@@ -158,13 +172,13 @@ type CombinedRimosafeItemConfig = RimosafeItemConfig & SignerItemConfig;
158
172
  * }
159
173
  * }
160
174
  *
161
- * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link ChainType}, {@link Chain}
175
+ * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link CombinedOneSigItemConfig}, {@link ChainType}, {@link Chain}
162
176
  * ```
163
177
  */
164
178
  type SignerConfig = {
165
179
  [stage in Stage]?: {
166
180
  [chainOrType in ChainType | Chain]?: {
167
- [key: string]: SignerItemConfig | CombinedGnosisItemConfig | CombinedSquadsItemConfig | CombinedRimosafeItemConfig;
181
+ [key: string]: SignerItemConfig | CombinedGnosisItemConfig | CombinedSquadsItemConfig | CombinedRimosafeItemConfig | CombinedOneSigItemConfig;
168
182
  };
169
183
  };
170
184
  };
@@ -208,4 +222,4 @@ declare function isCombinedGnosisItemConfig(obj: unknown): obj is CombinedGnosis
208
222
  declare function isCombinedSquadsItemConfig(obj: unknown): obj is CombinedSquadsItemConfig;
209
223
  declare function isCombinedRimosafeItemConfig(obj: unknown): obj is CombinedRimosafeItemConfig;
210
224
 
211
- export { type CombinedGnosisItemConfig, type CombinedRimosafeItemConfig, type CombinedSquadsItemConfig, type GnosisConfig, type GnosisItemConfig, type GnosisStageConfig, type ProviderConfig, type ProviderManager, type ProviderSetting, type RimosafeItemConfig, type SignerConfig, type SignerItemConfig, type SignerManager, type SquadsItemConfig, isCombinedGnosisItemConfig, isCombinedRimosafeItemConfig, isCombinedSquadsItemConfig, isGnosisItemConfig };
225
+ export { type CombinedGnosisItemConfig, type CombinedOneSigItemConfig, type CombinedRimosafeItemConfig, type CombinedSquadsItemConfig, type GnosisConfig, type GnosisItemConfig, type GnosisStageConfig, type OneSigItemConfig, type ProviderConfig, type ProviderManager, type ProviderSetting, type RimosafeItemConfig, type SignerConfig, type SignerItemConfig, type SignerManager, type SquadsItemConfig, isCombinedGnosisItemConfig, isCombinedRimosafeItemConfig, isCombinedSquadsItemConfig, isGnosisItemConfig };
package/dist/index.d.ts CHANGED
@@ -91,6 +91,16 @@ interface GnosisItemConfig {
91
91
  [key: string]: Partial<ContractNetworkConfig>;
92
92
  };
93
93
  }
94
+ /**
95
+ * Interface representing the configuration for a OneSig item.
96
+ */
97
+ interface OneSigItemConfig {
98
+ oneSigAddress: string;
99
+ /**
100
+ * The URL of the OneSig REST API
101
+ */
102
+ oneSigUrl: string;
103
+ }
94
104
  /**
95
105
  * Interface representing the configuration for a Squads item.
96
106
  */
@@ -115,7 +125,7 @@ interface RimosafeItemConfig {
115
125
  */
116
126
  type GnosisStageConfig = {
117
127
  [chainOrType in ChainType | Chain]?: {
118
- [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig;
128
+ [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig | OneSigItemConfig;
119
129
  };
120
130
  };
121
131
  /**
@@ -129,6 +139,10 @@ type GnosisConfig = {
129
139
  * Type representing the combined configuration for Gnosis and signer items.
130
140
  */
131
141
  type CombinedGnosisItemConfig = GnosisItemConfig & SignerItemConfig;
142
+ /**
143
+ * Type representing the combined configuration for OneSig and signer items.
144
+ */
145
+ type CombinedOneSigItemConfig = OneSigItemConfig & SignerItemConfig;
132
146
  /**
133
147
  * Type representing the combined configuration for Squads and signer items.
134
148
  */
@@ -158,13 +172,13 @@ type CombinedRimosafeItemConfig = RimosafeItemConfig & SignerItemConfig;
158
172
  * }
159
173
  * }
160
174
  *
161
- * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link ChainType}, {@link Chain}
175
+ * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link CombinedOneSigItemConfig}, {@link ChainType}, {@link Chain}
162
176
  * ```
163
177
  */
164
178
  type SignerConfig = {
165
179
  [stage in Stage]?: {
166
180
  [chainOrType in ChainType | Chain]?: {
167
- [key: string]: SignerItemConfig | CombinedGnosisItemConfig | CombinedSquadsItemConfig | CombinedRimosafeItemConfig;
181
+ [key: string]: SignerItemConfig | CombinedGnosisItemConfig | CombinedSquadsItemConfig | CombinedRimosafeItemConfig | CombinedOneSigItemConfig;
168
182
  };
169
183
  };
170
184
  };
@@ -208,4 +222,4 @@ declare function isCombinedGnosisItemConfig(obj: unknown): obj is CombinedGnosis
208
222
  declare function isCombinedSquadsItemConfig(obj: unknown): obj is CombinedSquadsItemConfig;
209
223
  declare function isCombinedRimosafeItemConfig(obj: unknown): obj is CombinedRimosafeItemConfig;
210
224
 
211
- export { type CombinedGnosisItemConfig, type CombinedRimosafeItemConfig, type CombinedSquadsItemConfig, type GnosisConfig, type GnosisItemConfig, type GnosisStageConfig, type ProviderConfig, type ProviderManager, type ProviderSetting, type RimosafeItemConfig, type SignerConfig, type SignerItemConfig, type SignerManager, type SquadsItemConfig, isCombinedGnosisItemConfig, isCombinedRimosafeItemConfig, isCombinedSquadsItemConfig, isGnosisItemConfig };
225
+ export { type CombinedGnosisItemConfig, type CombinedOneSigItemConfig, type CombinedRimosafeItemConfig, type CombinedSquadsItemConfig, type GnosisConfig, type GnosisItemConfig, type GnosisStageConfig, type OneSigItemConfig, type ProviderConfig, type ProviderManager, type ProviderSetting, type RimosafeItemConfig, type SignerConfig, type SignerItemConfig, type SignerManager, type SquadsItemConfig, isCombinedGnosisItemConfig, isCombinedRimosafeItemConfig, isCombinedSquadsItemConfig, isGnosisItemConfig };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/signer.ts"],"names":[],"mappings":";AAkKO,SAAS,mBAAmB,GAAuC,EAAA;AACtE,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA;AAC3E;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,QAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA,KAAQ,UAAc,IAAA,GAAA,IAAO,IAAQ,IAAA,GAAA,CAAA;AAChH;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D;AAEO,SAAS,6BAA6B,GAAiD,EAAA;AAC1F,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D","file":"index.mjs","sourcesContent":["import { ContractNetworksConfig } from '@safe-global/protocol-kit'\ntype ContractNetworkConfig = ContractNetworksConfig[string]\n\n// ------------------ Account/Signer Config ------------------\n\nimport { Signer } from '@layerzerolabs/lz-core'\nimport { Chain, ChainType, Environment, Stage } from '@layerzerolabs/lz-definitions'\n\n/**\n * Interface representing the configuration for a signer item.\n */\nexport interface SignerItemConfig {\n /**\n * The mnemonic for the signer.\n */\n mnemonic?: string\n /**\n * The derivation path for the signer.\n */\n path?: string\n /**\n * The address of the signer.\n */\n address?: string\n /**\n * The private key of the signer.\n */\n pk?: string\n}\n\n/**\n * Interface representing the configuration for a Gnosis item.\n */\nexport interface GnosisItemConfig {\n /**\n * The URL of the Gnosis safe.\n */\n safeUrl: string\n /**\n * The address of the Gnosis safe.\n */\n safeAddress: string\n /**\n * The contract networks configuration for the Gnosis safe (optional).\n * @see {@link ContractNetworksConfig}\n */\n contractNetworks?: { [key: string]: Partial<ContractNetworkConfig> }\n}\n\n/**\n * Interface representing the configuration for a Squads item.\n */\nexport interface SquadsItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface RimosafeItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Type representing the configuration for Gnosis by stage and chain.\n * @see {@link GnosisItemConfig}, {@link SquadsItemConfig}, {@link ChainType}, {@link Chain}\n */\nexport type GnosisStageConfig = {\n [chainOrType in ChainType | Chain]?: { [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig }\n}\n\n/**\n * Type representing the configuration for Gnosis by stage.\n * This type maps stages to their corresponding Gnosis stage configurations.\n */\nexport type GnosisConfig = {\n /**\n * The stage of the configuration.\n * @see {@link Stage}, {@link GnosisStageConfig}\n */\n [stage in Stage]?: GnosisStageConfig\n}\n\n/**\n * Type representing the combined configuration for Gnosis and signer items.\n */\nexport type CombinedGnosisItemConfig = GnosisItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Squads and signer items.\n */\nexport type CombinedSquadsItemConfig = SquadsItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Rimosafe and signer items.\n */\nexport type CombinedRimosafeItemConfig = RimosafeItemConfig & SignerItemConfig\n/**\n * Type representing the configuration for signers by stage, chain, and key name.\n * @example\n * ```json\n * {\n * \"sandbox\": {\n * \"ethereum\": {\n * \"key1\": {\n * \"mnemonic\": \"xxx\",\n * \"path\": \"xxx\"\n * },\n * \"key2\": {\n * \"pk\": \"xxx\",\n * \"path\": \"xxx\"\n * safeUrl: \"xxx\",\n * safeAddress: \"xxx\"\n * }\n * }\n * }\n * }\n *\n * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link ChainType}, {@link Chain}\n * ```\n */\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]:\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedRimosafeItemConfig\n }\n }\n}\n\n/**\n * Interface representing a signer manager.\n * Provides methods to retrieve signers based on the specified chain, stage, environment, and key name.\n */\nexport interface SignerManager {\n /**\n * Retrieves a signer based on the specified chain, stage, environment, and key name.\n *\n * @param {Chain} chain - The chain for which to retrieve the signer.\n * @param {Stage} stage - The stage for which to retrieve the signer.\n * @param {Environment} env - The environment for which to retrieve the signer.\n * @param {string} keyName - The key name for which to retrieve the signer.\n * @returns {Promise<Signer>} A promise that resolves to the signer.\n */\n getSigner(chain: Chain, stage: Stage, env: Environment, keyName: string): Promise<Signer>\n}\n\n/**\n * Checks if the given object is a Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a Gnosis item configuration, false otherwise.\n * @see {@link GnosisItemConfig}\n */\nexport function isGnosisItemConfig(obj: unknown): obj is GnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj\n}\n\n/**\n * Checks if the given object is a combined Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Gnosis item configuration, false otherwise.\n */\nexport function isCombinedGnosisItemConfig(obj: unknown): obj is CombinedGnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj && ('mnemonic' in obj || 'pk' in obj)\n}\n\n/**\n * Checks if the given object is a combined Squads item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Squads item configuration, false otherwise.\n */\nexport function isCombinedSquadsItemConfig(obj: unknown): obj is CombinedSquadsItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedRimosafeItemConfig(obj: unknown): obj is CombinedRimosafeItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n"]}
1
+ {"version":3,"sources":["../src/signer.ts"],"names":[],"mappings":";AAsLO,SAAS,mBAAmB,GAAuC,EAAA;AACtE,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAA,OAAO,OAAO,GAAA,KAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA;AAC3E;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,QAAQ,QAAY,IAAA,SAAA,IAAa,OAAO,aAAiB,IAAA,GAAA,KAAQ,UAAc,IAAA,GAAA,IAAO,IAAQ,IAAA,GAAA,CAAA;AAChH;AAQO,SAAS,2BAA2B,GAA+C,EAAA;AACtF,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D;AAEO,SAAS,6BAA6B,GAAiD,EAAA;AAC1F,EAAI,IAAA,GAAA,KAAQ,KAAa,CAAA,IAAA,GAAA,KAAQ,IAAM,EAAA;AACnC,IAAO,OAAA,KAAA;AAAA;AAGX,EAAO,OAAA,OAAO,GAAQ,KAAA,QAAA,IAAY,iBAAqB,IAAA,GAAA;AAC3D","file":"index.mjs","sourcesContent":["import { ContractNetworksConfig } from '@safe-global/protocol-kit'\ntype ContractNetworkConfig = ContractNetworksConfig[string]\n\n// ------------------ Account/Signer Config ------------------\n\nimport { Signer } from '@layerzerolabs/lz-core'\nimport { Chain, ChainType, Environment, Stage } from '@layerzerolabs/lz-definitions'\n\n/**\n * Interface representing the configuration for a signer item.\n */\nexport interface SignerItemConfig {\n /**\n * The mnemonic for the signer.\n */\n mnemonic?: string\n /**\n * The derivation path for the signer.\n */\n path?: string\n /**\n * The address of the signer.\n */\n address?: string\n /**\n * The private key of the signer.\n */\n pk?: string\n}\n\n/**\n * Interface representing the configuration for a Gnosis item.\n */\nexport interface GnosisItemConfig {\n /**\n * The URL of the Gnosis safe.\n */\n safeUrl: string\n /**\n * The address of the Gnosis safe.\n */\n safeAddress: string\n /**\n * The contract networks configuration for the Gnosis safe (optional).\n * @see {@link ContractNetworksConfig}\n */\n contractNetworks?: { [key: string]: Partial<ContractNetworkConfig> }\n}\n\n/**\n * Interface representing the configuration for a OneSig item.\n */\nexport interface OneSigItemConfig {\n oneSigAddress: string\n\n /**\n * The URL of the OneSig REST API\n */\n oneSigUrl: string\n}\n\n/**\n * Interface representing the configuration for a Squads item.\n */\nexport interface SquadsItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface RimosafeItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Type representing the configuration for Gnosis by stage and chain.\n * @see {@link GnosisItemConfig}, {@link SquadsItemConfig}, {@link ChainType}, {@link Chain}\n */\nexport type GnosisStageConfig = {\n [chainOrType in ChainType | Chain]?: {\n [key: string]: GnosisItemConfig | SquadsItemConfig | RimosafeItemConfig | OneSigItemConfig\n }\n}\n\n/**\n * Type representing the configuration for Gnosis by stage.\n * This type maps stages to their corresponding Gnosis stage configurations.\n */\nexport type GnosisConfig = {\n /**\n * The stage of the configuration.\n * @see {@link Stage}, {@link GnosisStageConfig}\n */\n [stage in Stage]?: GnosisStageConfig\n}\n\n/**\n * Type representing the combined configuration for Gnosis and signer items.\n */\nexport type CombinedGnosisItemConfig = GnosisItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for OneSig and signer items.\n */\nexport type CombinedOneSigItemConfig = OneSigItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Squads and signer items.\n */\nexport type CombinedSquadsItemConfig = SquadsItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for Rimosafe and signer items.\n */\nexport type CombinedRimosafeItemConfig = RimosafeItemConfig & SignerItemConfig\n/**\n * Type representing the configuration for signers by stage, chain, and key name.\n * @example\n * ```json\n * {\n * \"sandbox\": {\n * \"ethereum\": {\n * \"key1\": {\n * \"mnemonic\": \"xxx\",\n * \"path\": \"xxx\"\n * },\n * \"key2\": {\n * \"pk\": \"xxx\",\n * \"path\": \"xxx\"\n * safeUrl: \"xxx\",\n * safeAddress: \"xxx\"\n * }\n * }\n * }\n * }\n *\n * @see {@link SignerItemConfig}, {@link CombinedGnosisItemConfig}, {@link CombinedSquadsItemConfig} {@link CombinedRimosafeItemConfig }, {@link CombinedOneSigItemConfig}, {@link ChainType}, {@link Chain}\n * ```\n */\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]:\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedRimosafeItemConfig\n | CombinedOneSigItemConfig\n }\n }\n}\n\n/**\n * Interface representing a signer manager.\n * Provides methods to retrieve signers based on the specified chain, stage, environment, and key name.\n */\nexport interface SignerManager {\n /**\n * Retrieves a signer based on the specified chain, stage, environment, and key name.\n *\n * @param {Chain} chain - The chain for which to retrieve the signer.\n * @param {Stage} stage - The stage for which to retrieve the signer.\n * @param {Environment} env - The environment for which to retrieve the signer.\n * @param {string} keyName - The key name for which to retrieve the signer.\n * @returns {Promise<Signer>} A promise that resolves to the signer.\n */\n getSigner(chain: Chain, stage: Stage, env: Environment, keyName: string): Promise<Signer>\n}\n\n/**\n * Checks if the given object is a Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a Gnosis item configuration, false otherwise.\n * @see {@link GnosisItemConfig}\n */\nexport function isGnosisItemConfig(obj: unknown): obj is GnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj\n}\n\n/**\n * Checks if the given object is a combined Gnosis item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Gnosis item configuration, false otherwise.\n */\nexport function isCombinedGnosisItemConfig(obj: unknown): obj is CombinedGnosisItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'safeUrl' in obj && 'safeAddress' in obj && ('mnemonic' in obj || 'pk' in obj)\n}\n\n/**\n * Checks if the given object is a combined Squads item configuration.\n *\n * @param {unknown} obj - The object to check.\n * @returns {boolean} True if the object is a combined Squads item configuration, false otherwise.\n */\nexport function isCombinedSquadsItemConfig(obj: unknown): obj is CombinedSquadsItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedRimosafeItemConfig(obj: unknown): obj is CombinedRimosafeItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerzerolabs/lz-config-types",
3
- "version": "3.0.74",
3
+ "version": "3.0.75-test.0",
4
4
  "description": "LayerZero Core Library",
5
5
  "license": "BUSL-1.1",
6
6
  "exports": {
@@ -23,14 +23,14 @@
23
23
  "clean-prebuild": "rimraf dist"
24
24
  },
25
25
  "dependencies": {
26
- "@layerzerolabs/lz-core": "^3.0.74",
27
- "@layerzerolabs/lz-definitions": "^3.0.74",
26
+ "@layerzerolabs/lz-core": "^3.0.75-test.0",
27
+ "@layerzerolabs/lz-definitions": "^3.0.75-test.0",
28
28
  "@safe-global/protocol-kit": "^1.3.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@jest/globals": "^29.7.0",
32
- "@layerzerolabs/tsup-config-next": "^3.0.74",
33
- "@layerzerolabs/typescript-config-next": "^3.0.74",
32
+ "@layerzerolabs/tsup-config-next": "^3.0.75-test.0",
33
+ "@layerzerolabs/typescript-config-next": "^3.0.75-test.0",
34
34
  "@types/jest": "^29.5.10",
35
35
  "jest": "^29.7.0",
36
36
  "rimraf": "^5.0.5",