merge 0.4.0

This commit is contained in:
CaiHQ
2023-03-18 15:48:45 +08:00
parent 08da9c63f0
commit d75feb3ee1
3 changed files with 205 additions and 156 deletions

View File

@@ -7,9 +7,9 @@ BDContract SDK for Node.js and browsers.
`npm install @bdware/bdcontract-sdk`
```typescript
import { Client } from '@bdware/bdcontract-sdk'
import { WsClient } from '@bdware/bdcontract-sdk'
import { sm2 } from 'sm-crypto'
const client = new Client(
const client = new WsClient(
url,
(ev) => {
console.log(JSON.stringify(ev))
@@ -42,7 +42,7 @@ function print(string) {
const url = 'ws://021.node.internetapi.cn:21030/SCIDE/SCExecutor'
const client = new bdcontract.Client(
const client = new bdcontract.WsClient(
url,
(ev) => {
console.log(JSON.stringify(ev))
@@ -76,4 +76,4 @@ async function anotherPlace() {
// In another place, wait for login to complete
const success = await client.Loggedin()
}()
```
```