|
@@ -12,8 +12,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
};
|
|
};
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
const crypto = require("libp2p-crypto");
|
|
const crypto = require("libp2p-crypto");
|
|
|
-const util = require("util");
|
|
|
|
|
-const TextEncoder = util.TextEncoder;
|
|
|
|
|
const ws_1 = __importDefault(require("ws"));
|
|
const ws_1 = __importDefault(require("ws"));
|
|
|
const content_item_1 = require("./content-item");
|
|
const content_item_1 = require("./content-item");
|
|
|
const util_1 = require("./util");
|
|
const util_1 = require("./util");
|
|
@@ -360,7 +358,7 @@ class BankClient {
|
|
|
return this.privateKey;
|
|
return this.privateKey;
|
|
|
}
|
|
}
|
|
|
makePlaintextPayload(message) {
|
|
makePlaintextPayload(message) {
|
|
|
- const messageBytes = new TextEncoder().encode(message);
|
|
|
|
|
|
|
+ const messageBytes = Buffer.from(message, 'utf-8');
|
|
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
|
yield this.bootstrap();
|
|
yield this.bootstrap();
|
|
|
this.privateKey.sign(messageBytes, (signErr, signatureBytes) => __awaiter(this, void 0, void 0, function* () {
|
|
this.privateKey.sign(messageBytes, (signErr, signatureBytes) => __awaiter(this, void 0, void 0, function* () {
|