@leofcoin/chain 1.5.48 → 1.5.51
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/exports/browser/{browser-dc41c03f-jgWsLNN0.js → browser-dc41c03f-8RoAu8QY.js} +1 -1
- package/exports/browser/chain.js +8 -4
- package/exports/browser/{client-f193279c-PJq43OyI.js → client-f193279c-xoTAp1Bg.js} +3 -3
- package/exports/browser/{index-81687e93-b2xmOHmO.js → index-81687e93-rKzKdyEa.js} +1 -1
- package/exports/browser/{index-fd97ecae-IP8WPUJ5.js → index-fd97ecae-DMIypRPM.js} +1 -1
- package/exports/browser/{messages-cccb78db-oHb8zKmC.js → messages-cccb78db-bQaa1gST.js} +1 -1
- package/exports/browser/{node-browser-DDilILXh.js → node-browser-cqEqYlW7.js} +3 -4
- package/exports/browser/node-browser.js +1 -1
- package/exports/chain.js +8 -4
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -4760,9 +4760,8 @@ class Chain extends VersionControl {
|
|
|
4760
4760
|
this.#jail = [];
|
|
4761
4761
|
this.#addTransaction = async (message) => {
|
|
4762
4762
|
const transaction = new TransactionMessage(message);
|
|
4763
|
-
|
|
4764
|
-
if (await transactionPoolStore.has(hash))
|
|
4765
|
-
await transactionPoolStore.delete(hash);
|
|
4763
|
+
await transaction.hash();
|
|
4764
|
+
// if (await transactionPoolStore.has(hash)) await transactionPoolStore.delete(hash)
|
|
4766
4765
|
console.log(transaction);
|
|
4767
4766
|
};
|
|
4768
4767
|
// @ts-ignore
|
|
@@ -4940,7 +4939,12 @@ class Chain extends VersionControl {
|
|
|
4940
4939
|
const blockMessage = await new BlockMessage(block);
|
|
4941
4940
|
await Promise.all(blockMessage.decoded.transactions
|
|
4942
4941
|
// @ts-ignore
|
|
4943
|
-
.map(async (transaction) =>
|
|
4942
|
+
.map(async (transaction) => {
|
|
4943
|
+
let hash = transaction.hash;
|
|
4944
|
+
if (!hash)
|
|
4945
|
+
await new TransactionMessage(transaction).hash();
|
|
4946
|
+
(await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash));
|
|
4947
|
+
}));
|
|
4944
4948
|
const hash = await blockMessage.hash();
|
|
4945
4949
|
await globalThis.blockStore.put(hash, blockMessage.encoded);
|
|
4946
4950
|
if (this.lastBlock.index < Number(blockMessage.decoded.index))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as LittlePubSub } from './node-browser-
|
|
1
|
+
import { L as LittlePubSub } from './node-browser-cqEqYlW7.js';
|
|
2
2
|
import './_polyfill-node.child_process-JsWeMPst.js';
|
|
3
3
|
|
|
4
4
|
class Api {
|
|
@@ -206,7 +206,7 @@ class SocketRequestClient {
|
|
|
206
206
|
const init = async () => {
|
|
207
207
|
// @ts-ignore
|
|
208
208
|
if (!globalThis.WebSocket)
|
|
209
|
-
globalThis.WebSocket = (await import('./browser-dc41c03f-
|
|
209
|
+
globalThis.WebSocket = (await import('./browser-dc41c03f-8RoAu8QY.js').then(function (n) { return n.b; })).default.w3cwebsocket;
|
|
210
210
|
const client = new WebSocket(this.#url, this.#protocol);
|
|
211
211
|
client.onmessage = this.onmessage;
|
|
212
212
|
client.onerror = this.onerror;
|
|
@@ -280,7 +280,7 @@ const iceServers = [
|
|
|
280
280
|
credential: 'openrelayproject'
|
|
281
281
|
}
|
|
282
282
|
];
|
|
283
|
-
const SimplePeer = (await import('./index-fd97ecae-
|
|
283
|
+
const SimplePeer = (await import('./index-fd97ecae-DMIypRPM.js').then(function (n) { return n.i; })).default;
|
|
284
284
|
class Peer extends SimplePeer {
|
|
285
285
|
peerId;
|
|
286
286
|
channelName;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as inherits_browserExports, c as commonjsGlobal, g as getDefaultExportFromCjs, r as require$$3 } from './node-browser-
|
|
1
|
+
import { i as inherits_browserExports, c as commonjsGlobal, g as getDefaultExportFromCjs, r as require$$3 } from './node-browser-cqEqYlW7.js';
|
|
2
2
|
import './_polyfill-node.child_process-JsWeMPst.js';
|
|
3
3
|
|
|
4
4
|
var browser$2 = {exports: {}};
|
|
@@ -2,7 +2,6 @@ import { C as ContractMessage, T as TransactionMessage, B as BlockMessage, a as
|
|
|
2
2
|
|
|
3
3
|
var nodeConfig = async (config = {
|
|
4
4
|
network: 'leofcoin:peach',
|
|
5
|
-
networkName: 'leofcoin:peach',
|
|
6
5
|
networkVersion: 'v1.0.0'
|
|
7
6
|
}) => {
|
|
8
7
|
await peernet.addProto('contract-message', ContractMessage);
|
|
@@ -27182,7 +27181,7 @@ class Identity {
|
|
|
27182
27181
|
this.selectedAccount = new TextDecoder().decode(selected);
|
|
27183
27182
|
}
|
|
27184
27183
|
else {
|
|
27185
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-81687e93-
|
|
27184
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-81687e93-rKzKdyEa.js');
|
|
27186
27185
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
27187
27186
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
27188
27187
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -27373,7 +27372,7 @@ class Peernet {
|
|
|
27373
27372
|
this.root = options.root;
|
|
27374
27373
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
27375
27374
|
// FolderMessageResponse
|
|
27376
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-cccb78db-
|
|
27375
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-cccb78db-bQaa1gST.js');
|
|
27377
27376
|
/**
|
|
27378
27377
|
* proto Object containing protos
|
|
27379
27378
|
* @type {Object}
|
|
@@ -27467,7 +27466,7 @@ class Peernet {
|
|
|
27467
27466
|
if (this.#starting || this.#started)
|
|
27468
27467
|
return;
|
|
27469
27468
|
this.#starting = true;
|
|
27470
|
-
const importee = await import('./client-f193279c-
|
|
27469
|
+
const importee = await import('./client-f193279c-xoTAp1Bg.js');
|
|
27471
27470
|
/**
|
|
27472
27471
|
* @access public
|
|
27473
27472
|
* @type {PeernetClient}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { N as default } from './node-browser-
|
|
1
|
+
export { N as default } from './node-browser-cqEqYlW7.js';
|
|
2
2
|
import './_polyfill-node.child_process-JsWeMPst.js';
|
package/exports/chain.js
CHANGED
|
@@ -1171,9 +1171,8 @@ class Chain extends VersionControl {
|
|
|
1171
1171
|
this.#jail = [];
|
|
1172
1172
|
this.#addTransaction = async (message) => {
|
|
1173
1173
|
const transaction = new TransactionMessage(message);
|
|
1174
|
-
|
|
1175
|
-
if (await transactionPoolStore.has(hash))
|
|
1176
|
-
await transactionPoolStore.delete(hash);
|
|
1174
|
+
await transaction.hash();
|
|
1175
|
+
// if (await transactionPoolStore.has(hash)) await transactionPoolStore.delete(hash)
|
|
1177
1176
|
console.log(transaction);
|
|
1178
1177
|
};
|
|
1179
1178
|
// @ts-ignore
|
|
@@ -1351,7 +1350,12 @@ class Chain extends VersionControl {
|
|
|
1351
1350
|
const blockMessage = await new BlockMessage(block);
|
|
1352
1351
|
await Promise.all(blockMessage.decoded.transactions
|
|
1353
1352
|
// @ts-ignore
|
|
1354
|
-
.map(async (transaction) =>
|
|
1353
|
+
.map(async (transaction) => {
|
|
1354
|
+
let hash = transaction.hash;
|
|
1355
|
+
if (!hash)
|
|
1356
|
+
await new TransactionMessage(transaction).hash();
|
|
1357
|
+
(await transactionPoolStore.has(hash)) && (await transactionPoolStore.delete(hash));
|
|
1358
|
+
}));
|
|
1355
1359
|
const hash = await blockMessage.hash();
|
|
1356
1360
|
await globalThis.blockStore.put(hash, blockMessage.encoded);
|
|
1357
1361
|
if (this.lastBlock.index < Number(blockMessage.decoded.index))
|