Add getMerkleProofForFile
This commit is contained in:
parent
9edcc2e897
commit
207b308173
@ -1,7 +1,7 @@
|
|||||||
import { INotification } from '~/models/notification.model';
|
import { INotification } from '~/models/notification.model';
|
||||||
import { IProcess } from '~/models/process.model';
|
import { IProcess } from '~/models/process.model';
|
||||||
import { initWebsocket, sendMessage } from '../websockets';
|
import { initWebsocket, sendMessage } from '../websockets';
|
||||||
import { ApiReturn, Device, HandshakeMessage, Member, OutPointProcessMap, Process, ProcessState, RoleDefinition, SecretsStore, UserDiff } from '../../pkg/sdk_client';
|
import { ApiReturn, Device, HandshakeMessage, Member, MerkleProofResult, OutPointProcessMap, Process, ProcessState, RoleDefinition, SecretsStore, UserDiff } from '../../pkg/sdk_client';
|
||||||
import ModalService from './modal.service';
|
import ModalService from './modal.service';
|
||||||
import Database from './database.service';
|
import Database from './database.service';
|
||||||
import { navigate } from '../router';
|
import { navigate } from '../router';
|
||||||
@ -1414,6 +1414,10 @@ export default class Services {
|
|||||||
return this.sdkClient.hash_value(fileBlob, commitedIn, label);
|
return this.sdkClient.hash_value(fileBlob, commitedIn, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getMerkleProofForFile(processState: ProcessState, attributeName: string): MerkleProofResult {
|
||||||
|
return this.sdkClient.get_merkle_proof(processState, attributeName);
|
||||||
|
}
|
||||||
|
|
||||||
public getLastCommitedState(process: Process): ProcessState | null {
|
public getLastCommitedState(process: Process): ProcessState | null {
|
||||||
if (process.states.length === 0) return null;
|
if (process.states.length === 0) return null;
|
||||||
const processTip = process.states[process.states.length - 1].commited_in;
|
const processTip = process.states[process.states.length - 1].commited_in;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user