@layerzerolabs/lz-config-types 3.0.98 → 3.0.100

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @layerzerolabs/lz-config-types
2
2
 
3
+ ## 3.0.100
4
+
5
+ ### Patch Changes
6
+
7
+ - 41862e9: Deployed dvn_upgrader of Aptos on testnet and mainnet
8
+ - Updated dependencies [41862e9]
9
+ - @layerzerolabs/lz-core@3.0.100
10
+ - @layerzerolabs/lz-definitions@3.0.100
11
+
12
+ ## 3.0.99
13
+
14
+ ### Patch Changes
15
+
16
+ - 67f6756: fix manual resolves
17
+ - Updated dependencies [67f6756]
18
+ - @layerzerolabs/lz-core@3.0.99
19
+ - @layerzerolabs/lz-definitions@3.0.99
20
+
3
21
  ## 3.0.98
4
22
 
5
23
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/signer.ts"],"names":[],"mappings":";;;AAgNO,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,iCAAiC,GAAqD,EAAA;AAClG,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,gCAAgC,GAAoD,EAAA;AAChG,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 MoveMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface TonMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\nexport type MultisigItemConfig =\n | GnosisItemConfig\n | SquadsItemConfig\n | MoveMultisigItemConfig\n | OneSigItemConfig\n | TonMultisigItemConfig\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]: MultisigItemConfig\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 MoveMultisig and signer items.\n */\nexport type CombinedMoveMultisigItemConfig = MoveMultisigItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for TonMultisig and signer items.\n */\nexport type CombinedTonMultisigItemConfig = TonMultisigItemConfig & 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 */\n\nexport type SignerConfigItemConfig =\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedMoveMultisigItemConfig\n | CombinedOneSigItemConfig\n | CombinedTonMultisigItemConfig\n\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]: SignerConfigItemConfig\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 isCombinedMoveMultisigItemConfig(obj: unknown): obj is CombinedMoveMultisigItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedTonMultisigItemConfig(obj: unknown): obj is CombinedTonMultisigItemConfig {\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":";;;AAqNO,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,iCAAiC,GAAqD,EAAA;AAClG,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,gCAAgC,GAAoD,EAAA;AAChG,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 MoveMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface TonMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n /**\n * The key name of the proposal. (Optional)\n * Please ensure the proposal wallet key has been added to the key.yaml file.\n */\n proposalKeyName?: string\n}\n\nexport type MultisigItemConfig =\n | GnosisItemConfig\n | SquadsItemConfig\n | MoveMultisigItemConfig\n | OneSigItemConfig\n | TonMultisigItemConfig\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]: MultisigItemConfig\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 MoveMultisig and signer items.\n */\nexport type CombinedMoveMultisigItemConfig = MoveMultisigItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for TonMultisig and signer items.\n */\nexport type CombinedTonMultisigItemConfig = TonMultisigItemConfig & 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 */\n\nexport type SignerConfigItemConfig =\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedMoveMultisigItemConfig\n | CombinedOneSigItemConfig\n | CombinedTonMultisigItemConfig\n\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]: SignerConfigItemConfig\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 isCombinedMoveMultisigItemConfig(obj: unknown): obj is CombinedMoveMultisigItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedTonMultisigItemConfig(obj: unknown): obj is CombinedTonMultisigItemConfig {\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
@@ -127,6 +127,11 @@ interface TonMultisigItemConfig {
127
127
  * The address of the multisig.
128
128
  */
129
129
  multisigAddress: string;
130
+ /**
131
+ * The key name of the proposal. (Optional)
132
+ * Please ensure the proposal wallet key has been added to the key.yaml file.
133
+ */
134
+ proposalKeyName?: string;
130
135
  }
131
136
  type MultisigItemConfig = GnosisItemConfig | SquadsItemConfig | MoveMultisigItemConfig | OneSigItemConfig | TonMultisigItemConfig;
132
137
  /**
package/dist/index.d.ts CHANGED
@@ -127,6 +127,11 @@ interface TonMultisigItemConfig {
127
127
  * The address of the multisig.
128
128
  */
129
129
  multisigAddress: string;
130
+ /**
131
+ * The key name of the proposal. (Optional)
132
+ * Please ensure the proposal wallet key has been added to the key.yaml file.
133
+ */
134
+ proposalKeyName?: string;
130
135
  }
131
136
  type MultisigItemConfig = GnosisItemConfig | SquadsItemConfig | MoveMultisigItemConfig | OneSigItemConfig | TonMultisigItemConfig;
132
137
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/signer.ts"],"names":[],"mappings":";AAgNO,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,iCAAiC,GAAqD,EAAA;AAClG,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,gCAAgC,GAAoD,EAAA;AAChG,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 MoveMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface TonMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\nexport type MultisigItemConfig =\n | GnosisItemConfig\n | SquadsItemConfig\n | MoveMultisigItemConfig\n | OneSigItemConfig\n | TonMultisigItemConfig\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]: MultisigItemConfig\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 MoveMultisig and signer items.\n */\nexport type CombinedMoveMultisigItemConfig = MoveMultisigItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for TonMultisig and signer items.\n */\nexport type CombinedTonMultisigItemConfig = TonMultisigItemConfig & 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 */\n\nexport type SignerConfigItemConfig =\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedMoveMultisigItemConfig\n | CombinedOneSigItemConfig\n | CombinedTonMultisigItemConfig\n\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]: SignerConfigItemConfig\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 isCombinedMoveMultisigItemConfig(obj: unknown): obj is CombinedMoveMultisigItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedTonMultisigItemConfig(obj: unknown): obj is CombinedTonMultisigItemConfig {\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":";AAqNO,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,iCAAiC,GAAqD,EAAA;AAClG,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,gCAAgC,GAAoD,EAAA;AAChG,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 MoveMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n}\n\n/**\n * Interface representing the configuration for a Rimosafe item.\n */\nexport interface TonMultisigItemConfig {\n /**\n * The address of the multisig.\n */\n multisigAddress: string\n /**\n * The key name of the proposal. (Optional)\n * Please ensure the proposal wallet key has been added to the key.yaml file.\n */\n proposalKeyName?: string\n}\n\nexport type MultisigItemConfig =\n | GnosisItemConfig\n | SquadsItemConfig\n | MoveMultisigItemConfig\n | OneSigItemConfig\n | TonMultisigItemConfig\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]: MultisigItemConfig\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 MoveMultisig and signer items.\n */\nexport type CombinedMoveMultisigItemConfig = MoveMultisigItemConfig & SignerItemConfig\n\n/**\n * Type representing the combined configuration for TonMultisig and signer items.\n */\nexport type CombinedTonMultisigItemConfig = TonMultisigItemConfig & 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 */\n\nexport type SignerConfigItemConfig =\n | SignerItemConfig\n | CombinedGnosisItemConfig\n | CombinedSquadsItemConfig\n | CombinedMoveMultisigItemConfig\n | CombinedOneSigItemConfig\n | CombinedTonMultisigItemConfig\n\nexport type SignerConfig = {\n [stage in Stage]?: {\n [chainOrType in ChainType | Chain]?: {\n [key: string]: SignerConfigItemConfig\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 isCombinedMoveMultisigItemConfig(obj: unknown): obj is CombinedMoveMultisigItemConfig {\n if (obj === undefined || obj === null) {\n return false\n }\n\n return typeof obj === 'object' && 'multisigAddress' in obj\n}\n\nexport function isCombinedTonMultisigItemConfig(obj: unknown): obj is CombinedTonMultisigItemConfig {\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.98",
3
+ "version": "3.0.100",
4
4
  "description": "LayerZero Core Library",
5
5
  "license": "BUSL-1.1",
6
6
  "exports": {
@@ -23,14 +23,14 @@
23
23
  "clean-prebuild": "rm -rf dist"
24
24
  },
25
25
  "dependencies": {
26
- "@layerzerolabs/lz-core": "^3.0.98",
27
- "@layerzerolabs/lz-definitions": "^3.0.98",
26
+ "@layerzerolabs/lz-core": "^3.0.100",
27
+ "@layerzerolabs/lz-definitions": "^3.0.100",
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.98",
33
- "@layerzerolabs/typescript-config-next": "^3.0.98",
32
+ "@layerzerolabs/tsup-config-next": "^3.0.100",
33
+ "@layerzerolabs/typescript-config-next": "^3.0.100",
34
34
  "@types/jest": "^29.5.10",
35
35
  "jest": "^29.7.0",
36
36
  "ts-jest": "^29.1.1",