@xelis/sdk 0.9.3 → 0.9.4

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.9.3",
2
+ "version": "0.9.4",
3
3
  "name": "@xelis/sdk",
4
4
  "description": "Xelis software development kit for JS",
5
5
  "exports": {
@@ -10,6 +10,9 @@
10
10
  "default": "./dist/esm/*.js"
11
11
  }
12
12
  },
13
+ "files": [
14
+ "dist"
15
+ ],
13
16
  "repository": {
14
17
  "type": "git",
15
18
  "url": "git+https://github.com/xelis-project/xelis-js-sdk"
@@ -40,4 +43,4 @@
40
43
  "react": "^18.2.0",
41
44
  "ws": "^8.12.1"
42
45
  }
43
- }
46
+ }
package/create_esm_pkg.js DELETED
@@ -1,13 +0,0 @@
1
- const fs = require('fs')
2
-
3
- // We need to create a package.json for explicitly setting the ESM folder has modern EcmaScript modules.
4
-
5
- const main = () => {
6
- const data = JSON.stringify({
7
- "type": "module"
8
- })
9
-
10
- fs.writeFileSync('./dist/esm/package.json', data)
11
- }
12
-
13
- main()
package/jest.config.js DELETED
@@ -1,6 +0,0 @@
1
- /** @type {import('ts-jest').JestConfigWithTsJest} */
2
- module.exports = {
3
- preset: 'ts-jest',
4
- testEnvironment: 'node',
5
- testMatch: ['**/*.spec.ts'],
6
- }
@@ -1,22 +0,0 @@
1
- const { RPC: DaemonRPC } = require('../dist/cjs/daemon/rpc')
2
- const { WS: DaemonWS } = require('../dist/cjs/daemon/websocket')
3
- const { WS: WalletWS } = require('../dist/cjs/wallet/websocket')
4
- const { TESTNET_NODE_RPC, TESTNET_NODE_WS, LOCAL_NODE_WS } = require('../dist/cjs/config')
5
-
6
- const main = async () => {
7
- const daemonRPC = new DaemonRPC(TESTNET_NODE_RPC)
8
- const res1 = await daemonRPC.getInfo()
9
- console.log(res1)
10
-
11
- const daemonWS = new DaemonWS()
12
- await daemonWS.connect(TESTNET_NODE_WS)
13
- const res2 = await daemonWS.methods.getInfo()
14
- console.log(res2)
15
-
16
- const walletWS = new WalletWS(`test`, `test`)
17
- await walletWS.connect(LOCAL_NODE_WS)
18
- const res3 = await walletWS.methods.getVersion()
19
- console.log(res3)
20
- }
21
-
22
- main()
@@ -1,12 +0,0 @@
1
- import { RPC as DaemonRPC } from '../dist/esm/daemon/rpc.js'
2
- import { TESTNET_NODE_RPC } from '../dist/esm/config.js'
3
-
4
- // need to add "type": "module" in package.json to test
5
-
6
- const main = async () => {
7
- const daemon = new DaemonRPC(TESTNET_NODE_RPC)
8
- const res = await daemon.getInfo()
9
- console.log(res)
10
- }
11
-
12
- main()
package/tsconfig.cjs.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/cjs",
5
- "module": "commonjs"
6
- }
7
- }
package/tsconfig.esm.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/esm",
5
- "module": "ESNext"
6
- }
7
- }
package/tsconfig.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "jsx": "react",
4
- "moduleResolution": "node",
5
- "outDir": "./dist",
6
- "strict": true,
7
- "esModuleInterop": true,
8
- "skipLibCheck": true,
9
- },
10
- "include": [
11
- "./src/**/*"
12
- ],
13
- "exclude": [
14
- "node_modules",
15
- "**/*.spec.ts"
16
- ]
17
- }
@@ -1,8 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./dist/types",
5
- "declaration": true,
6
- "emitDeclarationOnly": true
7
- }
8
- }