mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-24 13:21:32 +00:00
feat: support signatures [fixes DXJ-389] (#310)
* feat: support signatures [fixes DXJ-389] * chore(ci): use nox with avm 0.39.1 --------- Co-authored-by: folex <0xdxdy@gmail.com>
This commit is contained in:
@ -18,7 +18,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@fluencelabs/interfaces": "0.7.5",
|
||||
"@fluencelabs/avm": "0.35.4",
|
||||
"@fluencelabs/avm": "https://github.com/fluencelabs/js-client/raw/feat/add-signatures/avm-0.39.1-feat-VM-276-aquavm-keypair-e2816f6-1588-1.0.tgz",
|
||||
"@fluencelabs/marine-js": "0.3.45",
|
||||
"multiformats": "11.0.1",
|
||||
"debug": "4.3.4",
|
||||
|
@ -1,18 +1,7 @@
|
||||
// Uncomment to test on dev nodes
|
||||
// import { krasnodar } from '@fluencelabs/fluence-network-environment';
|
||||
// export const nodes = krasnodar;
|
||||
|
||||
/*
|
||||
* start docker container to run integration tests locally:
|
||||
|
||||
docker run --rm -e RUST_LOG="info" -p 1210:1210 -p 4310:4310 fluencelabs/fluence -t 1210 -w 4310 -k gKdiCSUr1TFGFEgu2t8Ch1XEUsrN5A2UfBLjSZvfci9SPR3NvZpACfcpPGC3eY4zma1pk7UvYv5zb1VjvPHwCjj --local
|
||||
|
||||
*/
|
||||
|
||||
export const nodes = [
|
||||
{
|
||||
multiaddr: '/ip4/127.0.0.1/tcp/4310/ws/p2p/12D3KooWKEprYXUXqoV5xSBeyqrWLpQLLH4PXfvVkDJtmcqmh5V3',
|
||||
peerId: '12D3KooWKEprYXUXqoV5xSBeyqrWLpQLLH4PXfvVkDJtmcqmh5V3',
|
||||
multiaddr: '/ip4/127.0.0.1/tcp/9991/ws/p2p/12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR',
|
||||
peerId: '12D3KooWBM3SdXWqGaawQDGQ6JprtwswEg3FWGvGhmgmMez1vRbR',
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
import { KeyPair } from '../keypair/index.js';
|
||||
|
||||
import type { PeerIdB58 } from '@fluencelabs/interfaces';
|
||||
import { KeyPairFormat } from '@fluencelabs/avm';
|
||||
import {
|
||||
cloneWithNewData,
|
||||
getActualTTL,
|
||||
@ -297,7 +298,7 @@ export abstract class FluencePeer {
|
||||
log_particle.trace('id %s. data: %j', item.particle.id, {
|
||||
initPeerId: item.particle.initPeerId,
|
||||
timestamp: item.particle.timestamp,
|
||||
tttl: item.particle.ttl,
|
||||
ttl: item.particle.ttl,
|
||||
signature: item.particle.signature,
|
||||
});
|
||||
|
||||
@ -389,6 +390,9 @@ export abstract class FluencePeer {
|
||||
currentPeerId: this.keyPair.getPeerId(),
|
||||
timestamp: item.particle.timestamp,
|
||||
ttl: item.particle.ttl,
|
||||
keyFormat: KeyPairFormat.Ed25519,
|
||||
particleId: item.particle.id,
|
||||
secretKeyBytes: this.keyPair.toEd25519PrivateKey(),
|
||||
},
|
||||
item.particle.script,
|
||||
prevData,
|
||||
|
Reference in New Issue
Block a user