mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-04-25 09:52:12 +00:00
Sig: default tetraplets: get_key_bytes -> get_route_bytes (#138)
This commit is contained in:
parent
e8060cf7c1
commit
56638c8fe2
@ -21,7 +21,7 @@ service Sig("sig"):
|
|||||||
-- and accepts data only from the following sources:
|
-- and accepts data only from the following sources:
|
||||||
-- trust-graph.get_trust_bytes
|
-- trust-graph.get_trust_bytes
|
||||||
-- trust-graph.get_revocation_bytes
|
-- trust-graph.get_revocation_bytes
|
||||||
-- registry.get_key_bytes
|
-- registry.get_route_bytes
|
||||||
-- registry.get_record_bytes
|
-- registry.get_record_bytes
|
||||||
-- registry.get_host_record_bytes
|
-- registry.get_host_record_bytes
|
||||||
-- Argument: data - byte array to sign
|
-- Argument: data - byte array to sign
|
||||||
|
@ -210,7 +210,7 @@ describe('Sig service tests', () => {
|
|||||||
const sig = new Sig(ctx.peerKeyPair);
|
const sig = new Sig(ctx.peerKeyPair);
|
||||||
sig.securityGuard = defaultSigGuard(ctx.peerId);
|
sig.securityGuard = defaultSigGuard(ctx.peerId);
|
||||||
|
|
||||||
const signature = await sig.sign(testData, makeTetraplet(ctx.peerId, 'registry', 'get_key_bytes'));
|
const signature = await sig.sign(testData, makeTetraplet(ctx.peerId, 'registry', 'get_route_bytes'));
|
||||||
|
|
||||||
await expect(signature).toBeDefined();
|
await expect(signature).toBeDefined();
|
||||||
});
|
});
|
||||||
|
@ -67,7 +67,7 @@ export const defaultSigGuard = (peerId: PeerIdB58) => {
|
|||||||
or(
|
or(
|
||||||
allowServiceFn('trust-graph', 'get_trust_bytes'),
|
allowServiceFn('trust-graph', 'get_trust_bytes'),
|
||||||
allowServiceFn('trust-graph', 'get_revocation_bytes'),
|
allowServiceFn('trust-graph', 'get_revocation_bytes'),
|
||||||
allowServiceFn('registry', 'get_key_bytes'),
|
allowServiceFn('registry', 'get_route_bytes'),
|
||||||
allowServiceFn('registry', 'get_record_bytes'),
|
allowServiceFn('registry', 'get_record_bytes'),
|
||||||
allowServiceFn('registry', 'get_host_record_bytes'),
|
allowServiceFn('registry', 'get_host_record_bytes'),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user