@leofcoin/chain 1.4.84 → 1.4.87
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/chain.js +4 -3
- package/exports/browser/{index-ed6cbdf7-eb75dc7a.js → index-ed6cbdf7-cced6308.js} +2 -2
- package/exports/browser/{index-f4429da1.js → index-fd1bc5f0.js} +2 -2
- package/exports/browser/{messages-35d069e1-9413ac70.js → messages-35d069e1-0b6352ff.js} +2 -2
- package/exports/browser/{node-browser-504c804a.js → node-browser-e89e6592.js} +3 -3
- package/exports/browser/node-browser.js +2 -2
- package/exports/browser/workers/block-worker.js +1 -1
- package/exports/browser/workers/machine-worker.js +1 -1
- package/exports/chain.js +2 -1
- package/exports/workers/block-worker.js +1 -1
- package/exports/workers/machine-worker.js +1 -1
- package/package.json +1 -1
package/exports/browser/chain.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as BigNumber, L as Logger, v as version$1, h as hexZeroPad, i as isBigNumberish, a as arrayify, b as isBytes, C as ContractMessage, T as TransactionMessage, R as RawTransactionMessage, g as getDefaultExportFromCjs, c as BlockMessage, d as BWMessage, e as BWRequestMessage } from './index-
|
|
1
|
+
import { B as BigNumber, L as Logger, v as version$1, h as hexZeroPad, i as isBigNumberish, a as arrayify, b as isBytes, C as ContractMessage, T as TransactionMessage, t as toBase58, R as RawTransactionMessage, g as getDefaultExportFromCjs, c as BlockMessage, d as BWMessage, e as BWRequestMessage } from './index-fd1bc5f0.js';
|
|
2
2
|
|
|
3
3
|
const logger$1 = new Logger(version$1);
|
|
4
4
|
const _constructorGuard = {};
|
|
@@ -466,7 +466,7 @@ const createTransactionHash = async (transaction) => {
|
|
|
466
466
|
return (await transaction.peernetHash).digest;
|
|
467
467
|
};
|
|
468
468
|
const signTransaction = async (transaction, wallet) => {
|
|
469
|
-
const signature = await wallet.sign(await createTransactionHash(transaction));
|
|
469
|
+
const signature = toBase58(await wallet.sign(await createTransactionHash(transaction)));
|
|
470
470
|
const signedTransaction = { ...transaction, signature };
|
|
471
471
|
return signedTransaction;
|
|
472
472
|
};
|
|
@@ -1358,7 +1358,7 @@ class Transaction extends Protocol {
|
|
|
1358
1358
|
* @returns {TransactionMessage}
|
|
1359
1359
|
*/
|
|
1360
1360
|
async promiseTransactions(transactions) {
|
|
1361
|
-
transactions = await Promise.all(transactions.map(tx => new TransactionMessage(tx)));
|
|
1361
|
+
transactions = await Promise.all(transactions.map(tx => new TransactionMessage(tx.encoded || tx)));
|
|
1362
1362
|
return transactions;
|
|
1363
1363
|
}
|
|
1364
1364
|
/**
|
|
@@ -2667,6 +2667,7 @@ class Chain extends State {
|
|
|
2667
2667
|
// block.reward = block.reward.toString()
|
|
2668
2668
|
// block.fees = block.fees.toString()
|
|
2669
2669
|
try {
|
|
2670
|
+
console.log(block.transactions);
|
|
2670
2671
|
block.transactions = await Promise.all(block.transactions
|
|
2671
2672
|
.map(async (transaction) => {
|
|
2672
2673
|
await globalThis.transactionPoolStore.delete(await transaction.hash());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-
|
|
2
|
-
import './index-
|
|
1
|
+
import { M as MultiWallet, e as encrypt, b as base58$1 } from './node-browser-e89e6592.js';
|
|
2
|
+
import './index-fd1bc5f0.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @params {String} network
|
|
@@ -5943,7 +5943,7 @@ var proto$6 = {
|
|
|
5943
5943
|
nonce: Number(),
|
|
5944
5944
|
method: String(),
|
|
5945
5945
|
params: Array(),
|
|
5946
|
-
signature:
|
|
5946
|
+
signature: String()
|
|
5947
5947
|
};
|
|
5948
5948
|
|
|
5949
5949
|
class TransactionMessage extends FormatInterface {
|
|
@@ -6081,4 +6081,4 @@ class RawTransactionMessage extends FormatInterface {
|
|
|
6081
6081
|
}
|
|
6082
6082
|
}
|
|
6083
6083
|
|
|
6084
|
-
export { BigNumber as B, ContractMessage as C, Logger as L, RawTransactionMessage as R, TransactionMessage as T, ValidatorMessage as V, arrayify as a, isBytes as b, BlockMessage as c, BWMessage as d, BWRequestMessage as e, getDefaultExportFromCjs as g, hexZeroPad as h, isBigNumberish as i, version as v };
|
|
6084
|
+
export { BigNumber as B, ContractMessage as C, Logger as L, RawTransactionMessage as R, TransactionMessage as T, ValidatorMessage as V, arrayify as a, isBytes as b, BlockMessage as c, BWMessage as d, BWRequestMessage as e, getDefaultExportFromCjs as g, hexZeroPad as h, isBigNumberish as i, toBase58 as t, version as v };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContractMessage, T as TransactionMessage, c as BlockMessage, d as BWMessage, e as BWRequestMessage, V as ValidatorMessage } from './index-
|
|
1
|
+
import { C as ContractMessage, T as TransactionMessage, c as BlockMessage, d as BWMessage, e as BWRequestMessage, V as ValidatorMessage } from './index-fd1bc5f0.js';
|
|
2
2
|
|
|
3
3
|
var nodeConfig = async (config = {
|
|
4
4
|
network: 'leofcoin:peach',
|
|
@@ -20166,7 +20166,7 @@ class Identity {
|
|
|
20166
20166
|
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
20167
20167
|
}
|
|
20168
20168
|
else {
|
|
20169
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-ed6cbdf7-
|
|
20169
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-ed6cbdf7-cced6308.js');
|
|
20170
20170
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
20171
20171
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
20172
20172
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -20345,7 +20345,7 @@ class Peernet {
|
|
|
20345
20345
|
this.root = options.root;
|
|
20346
20346
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
20347
20347
|
// FolderMessageResponse
|
|
20348
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-35d069e1-
|
|
20348
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-35d069e1-0b6352ff.js');
|
|
20349
20349
|
/**
|
|
20350
20350
|
* proto Object containing protos
|
|
20351
20351
|
* @type {Object}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { N as default } from './node-browser-
|
|
2
|
-
import './index-
|
|
1
|
+
export { N as default } from './node-browser-e89e6592.js';
|
|
2
|
+
import './index-fd1bc5f0.js';
|
package/exports/chain.js
CHANGED
|
@@ -58,7 +58,7 @@ class Transaction extends Protocol {
|
|
|
58
58
|
* @returns {TransactionMessage}
|
|
59
59
|
*/
|
|
60
60
|
async promiseTransactions(transactions) {
|
|
61
|
-
transactions = await Promise.all(transactions.map(tx => new TransactionMessage(tx)));
|
|
61
|
+
transactions = await Promise.all(transactions.map(tx => new TransactionMessage(tx.encoded || tx)));
|
|
62
62
|
return transactions;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -1287,6 +1287,7 @@ class Chain extends State {
|
|
|
1287
1287
|
// block.reward = block.reward.toString()
|
|
1288
1288
|
// block.fees = block.fees.toString()
|
|
1289
1289
|
try {
|
|
1290
|
+
console.log(block.transactions);
|
|
1290
1291
|
block.transactions = await Promise.all(block.transactions
|
|
1291
1292
|
.map(async (transaction) => {
|
|
1292
1293
|
await globalThis.transactionPoolStore.delete(await transaction.hash());
|