{"version":3,"file":"ws.cjs","names":["BaseGnoProvider","Tm2Client"],"sources":["../../../src/provider/websocket/ws.ts"],"sourcesContent":["import {\n  Tm2Client,\n} from \"@gnolang/tm2-rpc\";\n\nimport {\n  BaseGnoProvider,\n} from \"../provider.js\";\n\n/**\n * Provider based on WebSocket connections\n */\nexport class GnoWSProvider extends BaseGnoProvider {\n  /**\n   * Creates a new instance of the {@link GnoWSProvider}\n   * @param {string} baseURL the WS URL of the node\n   */\n  static async create(baseURL: string): Promise<GnoWSProvider> {\n    return new GnoWSProvider(await Tm2Client.connect(baseURL));\n  }\n\n  /**\n   * Closes the WS connection\n   */\n  closeConnection(): void {\n    this.client.disconnect();\n  }\n}\n"],"mappings":";;;;;;AAWA,IAAa,gBAAb,MAAa,sBAAsBA,iBAAAA,gBAAgB;;;;;CAKjD,aAAa,OAAO,SAAyC;AAC3D,SAAO,IAAI,cAAc,MAAMC,iBAAAA,UAAU,QAAQ,QAAQ,CAAC;;;;;CAM5D,kBAAwB;AACtB,OAAK,OAAO,YAAY"}