Skip to content

Commit

Permalink
Merge pull request #188 from ainblockchain/release/v1.10.1
Browse files Browse the repository at this point in the history
Upgrade version to 1.10.1
  • Loading branch information
platfowner authored May 23, 2024
2 parents 1ad1814 + 119bc67 commit 4924cf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ainblockchain/ain-js",
"version": "1.10.0",
"version": "1.10.1",
"description": "",
"main": "lib/ain.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions src/ain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ export default class Ain {
/**
* Creates a new Ain object.
* @param {string} providerUrl The endpoint URL of the network provider.
* @param {string} eventHandlerUrl The endpoint URL of the event handler websocket server.
* @param {string | null} eventHandlerUrl The endpoint URL of the event handler websocket server.
* @param {number} chainId The chain ID of the blockchain network.
* @param {AinOptions} ainOptions The options of the class.
*/
constructor(providerUrl: string, eventHandlerUrl?: string, chainId?: number, ainOptions?: AinOptions) {
constructor(providerUrl: string, eventHandlerUrl?: string | null, chainId?: number, ainOptions?: AinOptions) {
this.axiosConfig = ainOptions?.axiosConfig;
this.provider = new Provider(this, providerUrl, this.axiosConfig);
this.eventHandlerUrl = eventHandlerUrl;
Expand All @@ -66,11 +66,11 @@ export default class Ain {
/**
* Sets a new provider.
* @param {string} providerUrl The endpoint URL of the network provider. e.g. http://localhost:8081, https://testnet-api.ainetwork.ai
* @param {string} eventHandlerUrl The endpoint URL of the event handler websocket server. e.g. ws://localhost:5100, wss://testnet-event.ainetwork.ai
* @param {string | null} eventHandlerUrl The endpoint URL of the event handler websocket server. e.g. ws://localhost:5100, wss://testnet-event.ainetwork.ai
* @param {number} chainId The chain ID of the blockchain network. e.g. 0 for local or testnet, and 1 for mainnet
* @param {AxiosRequestConfig} axiosConfig The axios request config.
*/
setProvider(providerUrl: string, eventHandlerUrl?: string, chainId?: number, axiosConfig?: AxiosRequestConfig | undefined) {
setProvider(providerUrl: string, eventHandlerUrl?: string | null, chainId?: number, axiosConfig?: AxiosRequestConfig | undefined) {
if (axiosConfig) {
this.axiosConfig = axiosConfig;
}
Expand Down

0 comments on commit 4924cf6

Please sign in to comment.