Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions sdk-js-express/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ require("reflect-metadata");

const WebSocket = require("ws");
const express = require("express");
const { DCoreSdk, Credentials, ChainObject, Address } = require("dcorejs-sdk");
const {Credentials, ChainObject, DCoreSdk, Address} = require("dcorejs-sdk");

const httpApi = DCoreSdk.createForHttp({ baseUrl: "https://testnet.dcore.io/" });
const socketApi = DCoreSdk.createForWebSocket(() => new WebSocket("wss://testnet-socket.dcore.io/"));
const httpApi = DCoreSdk.createApiPromise({baseUrl: "https://testnet.dcore.io/"});
const socketApi = DCoreSdk.createApiPromise(undefined, () => new WebSocket("wss://testnet-socket.dcore.io/"));
const registrar = new Credentials(ChainObject.parse("1.2.27"), "5Hxwqx6JJUBYWjQNt8DomTNJ6r6YK8wDJym4CMAH1zGctFyQtzt");

const app = express();
Expand Down Expand Up @@ -44,4 +44,4 @@ app.post("/accounts", async (req, res) => {
}
});

app.listen(port, () => console.log(`DCore app listening on port ${port}!`));
app.listen(port, () => console.log(`DCore app listening on port ${port}!`));
2 changes: 1 addition & 1 deletion sdk-js-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "mike@decent.ch",
"license": "ISC",
"dependencies": {
"dcorejs-sdk": "^2.5.4",
"dcorejs-sdk": "^3.0.2",
"express": "^4.17.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.5.2",
Expand Down
2 changes: 1 addition & 1 deletion sdk-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"class-transformer": "^0.2.0",
"dcorejs-sdk": "^3.0.1",
"dcorejs-sdk": "^3.0.2",
"rxjs": "^6.5.3"
}
}
3 changes: 1 addition & 2 deletions sdk-ts/src/example.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import "reflect-metadata";
import { serialize } from "class-transformer";
import { AssetAmount, ChainObject, Credentials, OperationHistory, TransactionConfirmation } from "dcorejs-sdk";
import { DCoreSdk } from 'dcorejs-sdk/dist/DCoreSdk';
import { AssetAmount, ChainObject, Credentials, DCoreSdk, OperationHistory, TransactionConfirmation } from "dcorejs-sdk";
import { create } from "rxjs-spy";

const el = <T extends HTMLElement>(id: string) => document.getElementById(id) as T;
Expand Down