@leofcoin/chain 1.4.50 → 1.4.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/chain.js +70 -60
- package/exports/browser/{client-345f1d43-a7ba559a.js → client-345f1d43-54202b18.js} +2 -2
- package/exports/browser/{index-5ed49438-539fe0fa.js → index-5ed49438-165d8320.js} +2 -2
- package/exports/browser/{contract-f76383c3.js → index-640d9f36.js} +218 -200
- package/exports/browser/{messages-c26f8e97-a3403983.js → messages-c26f8e97-1e0a262e.js} +2 -2
- package/exports/browser/{node-browser-8791470c.js → node-browser-63d44d8e.js} +4 -4
- package/exports/browser/node-browser.js +2 -2
- package/exports/browser/workers/block-worker.js +219 -211
- package/exports/browser/workers/machine-worker.js +408 -401
- package/exports/chain.js +59 -58
- package/package.json +3 -3
|
@@ -5313,188 +5313,195 @@ new Mutex();
|
|
|
5313
5313
|
|
|
5314
5314
|
new Mutex();
|
|
5315
5315
|
|
|
5316
|
-
const blockchainCodecs = [
|
|
5317
|
-
{
|
|
5318
|
-
name: 'leofcoin-block',
|
|
5319
|
-
codec: '0x6c62',
|
|
5320
|
-
hashAlg: 'dbl-keccak-512',
|
|
5321
|
-
},
|
|
5322
|
-
{
|
|
5323
|
-
name: 'leofcoin-tx',
|
|
5324
|
-
codec: '0x6c74',
|
|
5325
|
-
hashAlg: 'dbl-keccak-512',
|
|
5326
|
-
},
|
|
5327
|
-
{
|
|
5328
|
-
name: 'leofcoin-itx',
|
|
5329
|
-
codec: '0x6c69',
|
|
5330
|
-
hashAlg: 'keccak-512',
|
|
5331
|
-
},
|
|
5332
|
-
{
|
|
5333
|
-
name: 'leofcoin-pr',
|
|
5334
|
-
codec: '0x6c70',
|
|
5335
|
-
hashAlg: 'keccak-256',
|
|
5336
|
-
},
|
|
5337
|
-
{
|
|
5338
|
-
name: 'contract-message',
|
|
5339
|
-
codec: '0x63636d',
|
|
5340
|
-
hashAlg: 'keccak-256'
|
|
5341
|
-
},
|
|
5342
|
-
{
|
|
5343
|
-
name: 'transaction-message',
|
|
5344
|
-
codec: '0x746d',
|
|
5345
|
-
hashAlg: 'keccak-256'
|
|
5346
|
-
},
|
|
5347
|
-
{
|
|
5348
|
-
name: '
|
|
5349
|
-
codec: '
|
|
5350
|
-
hashAlg: 'keccak-256'
|
|
5351
|
-
},
|
|
5352
|
-
{
|
|
5353
|
-
name: '
|
|
5354
|
-
codec: '
|
|
5355
|
-
hashAlg: 'keccak-256'
|
|
5356
|
-
},
|
|
5357
|
-
{
|
|
5358
|
-
name: 'bw-
|
|
5359
|
-
codec: '
|
|
5360
|
-
hashAlg: 'keccak-256'
|
|
5361
|
-
},
|
|
5362
|
-
{
|
|
5363
|
-
name: '
|
|
5364
|
-
codec: '
|
|
5365
|
-
hashAlg: 'keccak-256'
|
|
5366
|
-
}
|
|
5316
|
+
const blockchainCodecs = [
|
|
5317
|
+
{
|
|
5318
|
+
name: 'leofcoin-block',
|
|
5319
|
+
codec: '0x6c62',
|
|
5320
|
+
hashAlg: 'dbl-keccak-512',
|
|
5321
|
+
},
|
|
5322
|
+
{
|
|
5323
|
+
name: 'leofcoin-tx',
|
|
5324
|
+
codec: '0x6c74',
|
|
5325
|
+
hashAlg: 'dbl-keccak-512',
|
|
5326
|
+
},
|
|
5327
|
+
{
|
|
5328
|
+
name: 'leofcoin-itx',
|
|
5329
|
+
codec: '0x6c69',
|
|
5330
|
+
hashAlg: 'keccak-512',
|
|
5331
|
+
},
|
|
5332
|
+
{
|
|
5333
|
+
name: 'leofcoin-pr',
|
|
5334
|
+
codec: '0x6c70',
|
|
5335
|
+
hashAlg: 'keccak-256',
|
|
5336
|
+
},
|
|
5337
|
+
{
|
|
5338
|
+
name: 'contract-message',
|
|
5339
|
+
codec: '0x63636d',
|
|
5340
|
+
hashAlg: 'keccak-256'
|
|
5341
|
+
},
|
|
5342
|
+
{
|
|
5343
|
+
name: 'transaction-message',
|
|
5344
|
+
codec: '0x746d',
|
|
5345
|
+
hashAlg: 'keccak-256'
|
|
5346
|
+
},
|
|
5347
|
+
{
|
|
5348
|
+
name: 'raw-transaction-message',
|
|
5349
|
+
codec: '0x772746d',
|
|
5350
|
+
hashAlg: 'keccak-256'
|
|
5351
|
+
},
|
|
5352
|
+
{
|
|
5353
|
+
name: 'block-message',
|
|
5354
|
+
codec: '0x626d',
|
|
5355
|
+
hashAlg: 'keccak-256'
|
|
5356
|
+
},
|
|
5357
|
+
{
|
|
5358
|
+
name: 'bw-message',
|
|
5359
|
+
codec: '0x62776d',
|
|
5360
|
+
hashAlg: 'keccak-256'
|
|
5361
|
+
},
|
|
5362
|
+
{
|
|
5363
|
+
name: 'bw-request-message',
|
|
5364
|
+
codec: '0x6277726d',
|
|
5365
|
+
hashAlg: 'keccak-256'
|
|
5366
|
+
},
|
|
5367
|
+
{
|
|
5368
|
+
name: 'validator-message',
|
|
5369
|
+
codec: '0x766d',
|
|
5370
|
+
hashAlg: 'keccak-256'
|
|
5371
|
+
}
|
|
5367
5372
|
];
|
|
5368
5373
|
|
|
5369
|
-
const internalCodecs = [
|
|
5370
|
-
{
|
|
5371
|
-
name: 'disco-hash',
|
|
5372
|
-
codec: '0x30',
|
|
5373
|
-
hashAlg: 'dbl-keccak-256',
|
|
5374
|
-
},
|
|
5375
|
-
{
|
|
5376
|
-
name: 'peernet-peer-response',
|
|
5377
|
-
codec: '0x707072',
|
|
5378
|
-
hashAlg: 'keccak-256',
|
|
5379
|
-
},
|
|
5380
|
-
{
|
|
5381
|
-
name: 'peernet-peer',
|
|
5382
|
-
codec: '0x7070',
|
|
5383
|
-
hashAlg: 'keccak-256',
|
|
5384
|
-
},
|
|
5385
|
-
{
|
|
5386
|
-
name: 'peernet-dht',
|
|
5387
|
-
codec: '0x706468',
|
|
5388
|
-
hashAlg: 'keccak-256',
|
|
5389
|
-
},
|
|
5390
|
-
{
|
|
5391
|
-
name: 'peernet-dht-response',
|
|
5392
|
-
codec: '0x706472',
|
|
5393
|
-
hashAlg: 'keccak-256',
|
|
5394
|
-
},
|
|
5395
|
-
{
|
|
5396
|
-
name: 'peernet-data',
|
|
5397
|
-
codec: '0x706461',
|
|
5398
|
-
hashAlg: 'keccak-256',
|
|
5399
|
-
},
|
|
5400
|
-
{
|
|
5401
|
-
name: 'peernet-data-response',
|
|
5402
|
-
codec: '0x70646172',
|
|
5403
|
-
hashAlg: 'keccak-256',
|
|
5404
|
-
},
|
|
5405
|
-
{
|
|
5406
|
-
name: 'peernet-message',
|
|
5407
|
-
codec: '0x706d65',
|
|
5408
|
-
hashAlg: 'keccak-256',
|
|
5409
|
-
},
|
|
5410
|
-
{
|
|
5411
|
-
name: 'peernet-ps',
|
|
5412
|
-
codec: '707073',
|
|
5413
|
-
hashAlg: 'keccak-256',
|
|
5414
|
-
},
|
|
5415
|
-
{
|
|
5416
|
-
name: 'peernet-response',
|
|
5417
|
-
codec: '0x7072',
|
|
5418
|
-
hashAlg: 'keccak-256',
|
|
5419
|
-
},
|
|
5420
|
-
{
|
|
5421
|
-
name: 'peernet-request',
|
|
5422
|
-
codec: '0x707271',
|
|
5423
|
-
hashAlg: 'keccak-256',
|
|
5424
|
-
},
|
|
5425
|
-
{
|
|
5426
|
-
name: 'peernet-file',
|
|
5427
|
-
codec: '0x7066',
|
|
5428
|
-
hashAlg: 'keccak-256',
|
|
5429
|
-
},
|
|
5430
|
-
{
|
|
5431
|
-
name: 'peernet-file-response',
|
|
5432
|
-
codec: '0x706672',
|
|
5433
|
-
hashAlg: 'keccak-256',
|
|
5434
|
-
}
|
|
5374
|
+
const internalCodecs = [
|
|
5375
|
+
{
|
|
5376
|
+
name: 'disco-hash',
|
|
5377
|
+
codec: '0x30',
|
|
5378
|
+
hashAlg: 'dbl-keccak-256',
|
|
5379
|
+
},
|
|
5380
|
+
{
|
|
5381
|
+
name: 'peernet-peer-response',
|
|
5382
|
+
codec: '0x707072',
|
|
5383
|
+
hashAlg: 'keccak-256',
|
|
5384
|
+
},
|
|
5385
|
+
{
|
|
5386
|
+
name: 'peernet-peer',
|
|
5387
|
+
codec: '0x7070',
|
|
5388
|
+
hashAlg: 'keccak-256',
|
|
5389
|
+
},
|
|
5390
|
+
{
|
|
5391
|
+
name: 'peernet-dht',
|
|
5392
|
+
codec: '0x706468',
|
|
5393
|
+
hashAlg: 'keccak-256',
|
|
5394
|
+
},
|
|
5395
|
+
{
|
|
5396
|
+
name: 'peernet-dht-response',
|
|
5397
|
+
codec: '0x706472',
|
|
5398
|
+
hashAlg: 'keccak-256',
|
|
5399
|
+
},
|
|
5400
|
+
{
|
|
5401
|
+
name: 'peernet-data',
|
|
5402
|
+
codec: '0x706461',
|
|
5403
|
+
hashAlg: 'keccak-256',
|
|
5404
|
+
},
|
|
5405
|
+
{
|
|
5406
|
+
name: 'peernet-data-response',
|
|
5407
|
+
codec: '0x70646172',
|
|
5408
|
+
hashAlg: 'keccak-256',
|
|
5409
|
+
},
|
|
5410
|
+
{
|
|
5411
|
+
name: 'peernet-message',
|
|
5412
|
+
codec: '0x706d65',
|
|
5413
|
+
hashAlg: 'keccak-256',
|
|
5414
|
+
},
|
|
5415
|
+
{
|
|
5416
|
+
name: 'peernet-ps',
|
|
5417
|
+
codec: '707073',
|
|
5418
|
+
hashAlg: 'keccak-256',
|
|
5419
|
+
},
|
|
5420
|
+
{
|
|
5421
|
+
name: 'peernet-response',
|
|
5422
|
+
codec: '0x7072',
|
|
5423
|
+
hashAlg: 'keccak-256',
|
|
5424
|
+
},
|
|
5425
|
+
{
|
|
5426
|
+
name: 'peernet-request',
|
|
5427
|
+
codec: '0x707271',
|
|
5428
|
+
hashAlg: 'keccak-256',
|
|
5429
|
+
},
|
|
5430
|
+
{
|
|
5431
|
+
name: 'peernet-file',
|
|
5432
|
+
codec: '0x7066',
|
|
5433
|
+
hashAlg: 'keccak-256',
|
|
5434
|
+
},
|
|
5435
|
+
{
|
|
5436
|
+
name: 'peernet-file-response',
|
|
5437
|
+
codec: '0x706672',
|
|
5438
|
+
hashAlg: 'keccak-256',
|
|
5439
|
+
}
|
|
5435
5440
|
];
|
|
5436
5441
|
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5444
|
-
|
|
5442
|
+
var social = [{
|
|
5443
|
+
name: 'chat-message',
|
|
5444
|
+
codec: '0x70636d',
|
|
5445
|
+
hashAlg: 'dbl-keccak-256',
|
|
5446
|
+
}];
|
|
5447
|
+
|
|
5448
|
+
const codecs = [
|
|
5449
|
+
...internalCodecs,
|
|
5450
|
+
...blockchainCodecs,
|
|
5451
|
+
...social
|
|
5445
5452
|
];
|
|
5446
5453
|
|
|
5447
|
-
globalThis.peernetCodecs = globalThis.peernetCodecs || {};
|
|
5448
|
-
const addCodec = (codecInput) => {
|
|
5449
|
-
let { hashAlg, codec, name } = codecInput;
|
|
5450
|
-
if (!globalThis.peernetCodecs[name])
|
|
5451
|
-
globalThis.peernetCodecs[name] = {
|
|
5452
|
-
hashAlg,
|
|
5453
|
-
codec: typeof codec === 'string' ? parseInt(codec, 16) : codec
|
|
5454
|
-
};
|
|
5455
|
-
};
|
|
5456
|
-
const getCodec = (name) => {
|
|
5457
|
-
if (typeof name === 'number')
|
|
5458
|
-
return name;
|
|
5459
|
-
return getCodecByName(name).codec;
|
|
5460
|
-
};
|
|
5461
|
-
const getCodecName = (codec) => {
|
|
5462
|
-
return Object.keys(globalThis.peernetCodecs).reduce((p, c) => {
|
|
5463
|
-
const item = globalThis.peernetCodecs[c];
|
|
5464
|
-
if (item.codec === codec)
|
|
5465
|
-
return c;
|
|
5466
|
-
else
|
|
5467
|
-
return p;
|
|
5468
|
-
}, undefined);
|
|
5469
|
-
};
|
|
5470
|
-
const getCodecByName = (name) => globalThis.peernetCodecs[name];
|
|
5471
|
-
const getHashAlg = (name) => {
|
|
5472
|
-
if (typeof name === 'number')
|
|
5473
|
-
return getCodecByName(getCodecName(name)).hashAlg;
|
|
5474
|
-
return getCodecByName(name).hashAlg;
|
|
5475
|
-
};
|
|
5476
|
-
const isCodec = (codec) => {
|
|
5477
|
-
if (codec.codec !== undefined && codec.hashAlg)
|
|
5478
|
-
return true;
|
|
5479
|
-
return false;
|
|
5480
|
-
};
|
|
5481
|
-
const validateCodec = (codec) => {
|
|
5482
|
-
if (codec.codec === undefined ||
|
|
5483
|
-
codec.hashAlg === undefined ||
|
|
5484
|
-
codec.name === undefined)
|
|
5485
|
-
throw new Error(`invalid codecInput: ${codec}`);
|
|
5486
|
-
};
|
|
5487
|
-
for (const codec of codecs) {
|
|
5488
|
-
addCodec(codec);
|
|
5489
|
-
}
|
|
5490
|
-
var utils = {
|
|
5491
|
-
isCodec,
|
|
5492
|
-
addCodec,
|
|
5493
|
-
getCodec,
|
|
5494
|
-
getHashAlg,
|
|
5495
|
-
getCodecName,
|
|
5496
|
-
validateCodec,
|
|
5497
|
-
codecs: globalThis.peernetCodecs
|
|
5454
|
+
globalThis.peernetCodecs = globalThis.peernetCodecs || {};
|
|
5455
|
+
const addCodec = (codecInput) => {
|
|
5456
|
+
let { hashAlg, codec, name } = codecInput;
|
|
5457
|
+
if (!globalThis.peernetCodecs[name])
|
|
5458
|
+
globalThis.peernetCodecs[name] = {
|
|
5459
|
+
hashAlg,
|
|
5460
|
+
codec: typeof codec === 'string' ? parseInt(codec, 16) : codec
|
|
5461
|
+
};
|
|
5462
|
+
};
|
|
5463
|
+
const getCodec = (name) => {
|
|
5464
|
+
if (typeof name === 'number')
|
|
5465
|
+
return name;
|
|
5466
|
+
return getCodecByName(name).codec;
|
|
5467
|
+
};
|
|
5468
|
+
const getCodecName = (codec) => {
|
|
5469
|
+
return Object.keys(globalThis.peernetCodecs).reduce((p, c) => {
|
|
5470
|
+
const item = globalThis.peernetCodecs[c];
|
|
5471
|
+
if (item.codec === codec)
|
|
5472
|
+
return c;
|
|
5473
|
+
else
|
|
5474
|
+
return p;
|
|
5475
|
+
}, undefined);
|
|
5476
|
+
};
|
|
5477
|
+
const getCodecByName = (name) => globalThis.peernetCodecs[name];
|
|
5478
|
+
const getHashAlg = (name) => {
|
|
5479
|
+
if (typeof name === 'number')
|
|
5480
|
+
return getCodecByName(getCodecName(name)).hashAlg;
|
|
5481
|
+
return getCodecByName(name).hashAlg;
|
|
5482
|
+
};
|
|
5483
|
+
const isCodec = (codec) => {
|
|
5484
|
+
if (codec.codec !== undefined && codec.hashAlg)
|
|
5485
|
+
return true;
|
|
5486
|
+
return false;
|
|
5487
|
+
};
|
|
5488
|
+
const validateCodec = (codec) => {
|
|
5489
|
+
if (codec.codec === undefined ||
|
|
5490
|
+
codec.hashAlg === undefined ||
|
|
5491
|
+
codec.name === undefined)
|
|
5492
|
+
throw new Error(`invalid codecInput: ${codec}`);
|
|
5493
|
+
};
|
|
5494
|
+
for (const codec of codecs) {
|
|
5495
|
+
addCodec(codec);
|
|
5496
|
+
}
|
|
5497
|
+
var utils = {
|
|
5498
|
+
isCodec,
|
|
5499
|
+
addCodec,
|
|
5500
|
+
getCodec,
|
|
5501
|
+
getHashAlg,
|
|
5502
|
+
getCodecName,
|
|
5503
|
+
validateCodec,
|
|
5504
|
+
codecs: globalThis.peernetCodecs
|
|
5498
5505
|
};
|
|
5499
5506
|
|
|
5500
5507
|
/**
|
|
@@ -5526,11 +5533,11 @@ let BasicInterface$1 = class BasicInterface {
|
|
|
5526
5533
|
// get Codec(): Codec {}
|
|
5527
5534
|
protoEncode(data) {
|
|
5528
5535
|
// check schema
|
|
5529
|
-
return index.encode(this.proto, data);
|
|
5536
|
+
return index.encode(this.proto, data, false);
|
|
5530
5537
|
}
|
|
5531
5538
|
protoDecode(data) {
|
|
5532
5539
|
// check schema
|
|
5533
|
-
return index.decode(this.proto, data);
|
|
5540
|
+
return index.decode(this.proto, data, false);
|
|
5534
5541
|
}
|
|
5535
5542
|
isHex(string) {
|
|
5536
5543
|
return isHex(string);
|
|
@@ -5927,14 +5934,7 @@ let FormatInterface$1 = class FormatInterface extends BasicInterface$1 {
|
|
|
5927
5934
|
const decoded = {};
|
|
5928
5935
|
if (this.keys?.length > 0) {
|
|
5929
5936
|
for (const key of this.keys) {
|
|
5930
|
-
|
|
5931
|
-
[key]: {
|
|
5932
|
-
enumerable: true,
|
|
5933
|
-
configurable: true,
|
|
5934
|
-
set: (value) => data[key],
|
|
5935
|
-
get: () => data[key]
|
|
5936
|
-
}
|
|
5937
|
-
});
|
|
5937
|
+
decoded[key] = data[key];
|
|
5938
5938
|
}
|
|
5939
5939
|
this.decoded = decoded;
|
|
5940
5940
|
return this.encode(decoded);
|
|
@@ -5942,9 +5942,8 @@ let FormatInterface$1 = class FormatInterface extends BasicInterface$1 {
|
|
|
5942
5942
|
}
|
|
5943
5943
|
};
|
|
5944
5944
|
const FormatInterface = FormatInterface$1;
|
|
5945
|
-
const CodecHash = CodecHash$1;
|
|
5946
5945
|
|
|
5947
|
-
var proto$
|
|
5946
|
+
var proto$6 = {
|
|
5948
5947
|
timestamp: Number(),
|
|
5949
5948
|
from: String(),
|
|
5950
5949
|
to: String(),
|
|
@@ -5960,11 +5959,11 @@ class TransactionMessage extends FormatInterface {
|
|
|
5960
5959
|
}
|
|
5961
5960
|
constructor(buffer) {
|
|
5962
5961
|
const name = 'transaction-message';
|
|
5963
|
-
super(buffer, proto$
|
|
5962
|
+
super(buffer, proto$6, { name });
|
|
5964
5963
|
}
|
|
5965
5964
|
}
|
|
5966
5965
|
|
|
5967
|
-
var proto$
|
|
5966
|
+
var proto$5 = {
|
|
5968
5967
|
address: String(),
|
|
5969
5968
|
reward: BigNumber.from(0)
|
|
5970
5969
|
};
|
|
@@ -5975,11 +5974,11 @@ class ValidatorMessage extends FormatInterface {
|
|
|
5975
5974
|
}
|
|
5976
5975
|
constructor(buffer) {
|
|
5977
5976
|
const name = 'validator-message';
|
|
5978
|
-
super(buffer, proto$
|
|
5977
|
+
super(buffer, proto$5, { name });
|
|
5979
5978
|
}
|
|
5980
5979
|
}
|
|
5981
5980
|
|
|
5982
|
-
var proto$
|
|
5981
|
+
var proto$4 = {
|
|
5983
5982
|
index: Number(),
|
|
5984
5983
|
previousHash: String(),
|
|
5985
5984
|
timestamp: Number(),
|
|
@@ -5995,7 +5994,7 @@ class BlockMessage extends FormatInterface {
|
|
|
5995
5994
|
}
|
|
5996
5995
|
constructor(buffer) {
|
|
5997
5996
|
const name = 'block-message';
|
|
5998
|
-
super(buffer, proto$
|
|
5997
|
+
super(buffer, proto$4, { name });
|
|
5999
5998
|
}
|
|
6000
5999
|
encode() {
|
|
6001
6000
|
const decoded = this.decoded;
|
|
@@ -6027,7 +6026,7 @@ class BlockMessage extends FormatInterface {
|
|
|
6027
6026
|
}
|
|
6028
6027
|
}
|
|
6029
6028
|
|
|
6030
|
-
var proto$
|
|
6029
|
+
var proto$3 = {
|
|
6031
6030
|
up: Number(),
|
|
6032
6031
|
down: Number()
|
|
6033
6032
|
};
|
|
@@ -6038,11 +6037,11 @@ class BWMessage extends FormatInterface {
|
|
|
6038
6037
|
}
|
|
6039
6038
|
constructor(buffer) {
|
|
6040
6039
|
const name = 'bw-message';
|
|
6041
|
-
super(buffer, proto$
|
|
6040
|
+
super(buffer, proto$3, { name });
|
|
6042
6041
|
}
|
|
6043
6042
|
}
|
|
6044
6043
|
|
|
6045
|
-
var proto$
|
|
6044
|
+
var proto$2 = {
|
|
6046
6045
|
};
|
|
6047
6046
|
|
|
6048
6047
|
class BWRequestMessage extends FormatInterface {
|
|
@@ -6051,11 +6050,11 @@ class BWRequestMessage extends FormatInterface {
|
|
|
6051
6050
|
}
|
|
6052
6051
|
constructor(buffer) {
|
|
6053
6052
|
const name = 'bw-request-message';
|
|
6054
|
-
super(buffer, proto$
|
|
6053
|
+
super(buffer, proto$2, { name });
|
|
6055
6054
|
}
|
|
6056
6055
|
}
|
|
6057
6056
|
|
|
6058
|
-
var proto = {
|
|
6057
|
+
var proto$1 = {
|
|
6059
6058
|
creator: String(),
|
|
6060
6059
|
contract: new Uint8Array(),
|
|
6061
6060
|
constructorParameters: Array()
|
|
@@ -6066,8 +6065,27 @@ class ContractMessage extends FormatInterface {
|
|
|
6066
6065
|
return 'ContractMessage';
|
|
6067
6066
|
}
|
|
6068
6067
|
constructor(buffer) {
|
|
6069
|
-
super(buffer, proto, { name: 'contract-message' });
|
|
6068
|
+
super(buffer, proto$1, { name: 'contract-message' });
|
|
6069
|
+
}
|
|
6070
|
+
}
|
|
6071
|
+
|
|
6072
|
+
var proto = {
|
|
6073
|
+
timestamp: Number(),
|
|
6074
|
+
from: String(),
|
|
6075
|
+
to: String(),
|
|
6076
|
+
nonce: Number(),
|
|
6077
|
+
method: String(),
|
|
6078
|
+
params: Array()
|
|
6079
|
+
};
|
|
6080
|
+
|
|
6081
|
+
class RawTransactionMessage extends FormatInterface {
|
|
6082
|
+
get messageName() {
|
|
6083
|
+
return 'RawTransactionMessage';
|
|
6084
|
+
}
|
|
6085
|
+
constructor(buffer) {
|
|
6086
|
+
const name = 'raw-transaction-message';
|
|
6087
|
+
super(buffer, proto, { name });
|
|
6070
6088
|
}
|
|
6071
6089
|
}
|
|
6072
6090
|
|
|
6073
|
-
export { BigNumber as B, ContractMessage as C, Logger as L, TransactionMessage as T, ValidatorMessage as V, arrayify as a, isBytes as b,
|
|
6091
|
+
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, hexZeroPad as h, isBigNumberish as i, version as v };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ContractMessage, T as TransactionMessage,
|
|
1
|
+
import { C as ContractMessage, T as TransactionMessage, c as BlockMessage, d as BWMessage, e as BWRequestMessage, V as ValidatorMessage } from './index-640d9f36.js';
|
|
2
2
|
|
|
3
3
|
var nodeConfig = async (config = {
|
|
4
4
|
network: 'leofcoin:peach',
|
|
@@ -20267,7 +20267,7 @@ class Identity {
|
|
|
20267
20267
|
globalThis.peernet.selectedAccount = new TextDecoder().decode(selected);
|
|
20268
20268
|
}
|
|
20269
20269
|
else {
|
|
20270
|
-
const importee = await import(/* webpackChunkName: "generate-account" */ './index-5ed49438-
|
|
20270
|
+
const importee = await import(/* webpackChunkName: "generate-account" */ './index-5ed49438-165d8320.js');
|
|
20271
20271
|
const { identity, accounts } = await importee.default(password, this.network);
|
|
20272
20272
|
await globalThis.accountStore.put('public', JSON.stringify({ walletId: identity.walletId }));
|
|
20273
20273
|
await globalThis.walletStore.put('version', String(1));
|
|
@@ -20438,7 +20438,7 @@ class Peernet {
|
|
|
20438
20438
|
this.root = options.root;
|
|
20439
20439
|
const { RequestMessage, ResponseMessage, PeerMessage, PeerMessageResponse, PeernetMessage, DHTMessage, DHTMessageResponse, DataMessage, DataMessageResponse, PsMessage, ChatMessage, PeernetFile
|
|
20440
20440
|
// FolderMessageResponse
|
|
20441
|
-
} = await import(/* webpackChunkName: "messages" */ './messages-c26f8e97-
|
|
20441
|
+
} = await import(/* webpackChunkName: "messages" */ './messages-c26f8e97-1e0a262e.js');
|
|
20442
20442
|
/**
|
|
20443
20443
|
* proto Object containing protos
|
|
20444
20444
|
* @type {Object}
|
|
@@ -20517,7 +20517,7 @@ class Peernet {
|
|
|
20517
20517
|
if (this.#starting || this.#started)
|
|
20518
20518
|
return;
|
|
20519
20519
|
this.#starting = true;
|
|
20520
|
-
const importee = await import('./client-345f1d43-
|
|
20520
|
+
const importee = await import('./client-345f1d43-54202b18.js');
|
|
20521
20521
|
/**
|
|
20522
20522
|
* @access public
|
|
20523
20523
|
* @type {PeernetClient}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { N as default } from './node-browser-
|
|
2
|
-
import './
|
|
1
|
+
export { N as default } from './node-browser-63d44d8e.js';
|
|
2
|
+
import './index-640d9f36.js';
|