-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add TypeScript declaration files for ABI, config, and types; up…
…date package version to 1.1.1
- Loading branch information
Showing
9 changed files
with
79 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import { methods, defaultContractAddress, defaultABI } from "./src/ABI"; | ||
import type { IEthersError, IExtendedConfig } from "./src/types"; | ||
declare const getTimestamp: (_config?: IExtendedConfig) => Promise<number>, encryptMessage: (message: string, timestamp: number, _config?: IExtendedConfig) => Promise<any>, decryptMessage: (encryptedMessage: string, _config?: IExtendedConfig) => Promise<any>, isActive: (encryptedMsg: string, _config?: IExtendedConfig) => Promise<any>, whenActive: (encryptedMsg: string, _config?: IExtendedConfig) => Promise<number>; | ||
export { methods as default, getTimestamp, encryptMessage, decryptMessage, isActive, whenActive, defaultABI, defaultContractAddress, type IEthersError, type IExtendedConfig, }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export let preset: string; | ||
export let testEnvironment: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export declare const v1_0: ({ | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
})[]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import type { IExtendedConfig } from "../types"; | ||
export declare const defaultABI: ({ | ||
inputs: never[]; | ||
stateMutability: string; | ||
type: string; | ||
name?: undefined; | ||
outputs?: undefined; | ||
} | { | ||
inputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
name: string; | ||
outputs: { | ||
internalType: string; | ||
name: string; | ||
type: string; | ||
}[]; | ||
stateMutability: string; | ||
type: string; | ||
})[]; | ||
export declare const defaultContractAddress: string; | ||
export declare const methods: { | ||
getTimestamp: (_config?: IExtendedConfig) => Promise<number>; | ||
encryptMessage: (message: string, timestamp: number, _config?: IExtendedConfig) => Promise<any>; | ||
decryptMessage: (encryptedMessage: string, _config?: IExtendedConfig) => Promise<any>; | ||
isActive: (encryptedMsg: string, _config?: IExtendedConfig) => Promise<any>; | ||
whenActive: (encryptedMsg: string, _config?: IExtendedConfig) => Promise<number>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
declare const config: { | ||
RPC_URL: string; | ||
CHAIN_ID: number; | ||
CONTRACT_ADDRESS: string; | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { InterfaceAbi, JsonRpcProvider } from "ethers"; | ||
export interface IExtendedConfig { | ||
provider?: JsonRpcProvider; | ||
contractAddress?: string; | ||
rpcUrl?: string; | ||
abi?: InterfaceAbi; | ||
} | ||
export interface IEthersError { | ||
message: string; | ||
revert: { | ||
args: string[]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters