Skip to content

Commit

Permalink
chore(protobuf): add ResetDevice.entropy_check
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonlesisz committed Dec 12, 2024
1 parent 435d651 commit cd5da87
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
23 changes: 22 additions & 1 deletion packages/protobuf/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -4860,6 +4860,10 @@
"options": {
"default": "Bip39"
}
},
"entropy_check": {
"type": "bool",
"id": 11
}
}
},
Expand Down Expand Up @@ -4893,7 +4897,16 @@
}
},
"EntropyRequest": {
"fields": {}
"fields": {
"entropy_commitment": {
"type": "bytes",
"id": 1
},
"prev_entropy": {
"type": "bytes",
"id": 2
}
}
},
"EntropyAck": {
"fields": {
Expand All @@ -4904,6 +4917,12 @@
}
}
},
"ResetDeviceContinue": {
"fields": {}
},
"ResetDeviceFinish": {
"fields": {}
},
"RecoveryDevice": {
"fields": {
"word_count": {
Expand Down Expand Up @@ -6713,6 +6732,8 @@
"BackupDevice": 34,
"EntropyRequest": 35,
"EntropyAck": 36,
"ResetDeviceContinue": 994,
"ResetDeviceFinish": 995,
"PassphraseRequest": 41,
"PassphraseAck": 42,
"RecoveryDevice": 45,
Expand Down
17 changes: 16 additions & 1 deletion packages/protobuf/src/messages-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,7 @@ export const ResetDevice = Type.Object(
skip_backup: Type.Optional(Type.Boolean()),
no_backup: Type.Optional(Type.Boolean()),
backup_type: Type.Optional(EnumEnum_BackupType),
entropy_check: Type.Optional(Type.Boolean()),
},
{ $id: 'ResetDevice' },
);
Expand All @@ -2594,7 +2595,13 @@ export const BackupDevice = Type.Object(
);

export type EntropyRequest = Static<typeof EntropyRequest>;
export const EntropyRequest = Type.Object({}, { $id: 'EntropyRequest' });
export const EntropyRequest = Type.Object(
{
entropy_commitment: Type.Optional(Type.String()),
prev_entropy: Type.Optional(Type.String()),
},
{ $id: 'EntropyRequest' },
);

export type EntropyAck = Static<typeof EntropyAck>;
export const EntropyAck = Type.Object(
Expand All @@ -2604,6 +2611,12 @@ export const EntropyAck = Type.Object(
{ $id: 'EntropyAck' },
);

export type ResetDeviceContinue = Static<typeof ResetDeviceContinue>;
export const ResetDeviceContinue = Type.Object({}, { $id: 'ResetDeviceContinue' });

export type ResetDeviceFinish = Static<typeof ResetDeviceFinish>;
export const ResetDeviceFinish = Type.Object({}, { $id: 'ResetDeviceFinish' });

export enum Enum_WordRequestType {
WordRequestType_Plain = 0,
WordRequestType_Matrix9 = 1,
Expand Down Expand Up @@ -3706,6 +3719,8 @@ export const MessageType = Type.Object(
BackupDevice,
EntropyRequest,
EntropyAck,
ResetDeviceContinue,
ResetDeviceFinish,
WordRequest,
WordAck,
SetU2FCounter,
Expand Down
12 changes: 11 additions & 1 deletion packages/protobuf/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,7 @@ export type ResetDevice = {
skip_backup?: boolean;
no_backup?: boolean;
backup_type?: Enum_BackupType;
entropy_check?: boolean;
};

export type Slip39Group = {
Expand All @@ -1698,12 +1699,19 @@ export type BackupDevice = {
groups?: Slip39Group[];
};

export type EntropyRequest = {};
export type EntropyRequest = {
entropy_commitment?: string;
prev_entropy?: string;
};

export type EntropyAck = {
entropy: string;
};

export type ResetDeviceContinue = {};

export type ResetDeviceFinish = {};

export enum Enum_WordRequestType {
WordRequestType_Plain = 0,
WordRequestType_Matrix9 = 1,
Expand Down Expand Up @@ -2468,6 +2476,8 @@ export type MessageType = {
BackupDevice: BackupDevice;
EntropyRequest: EntropyRequest;
EntropyAck: EntropyAck;
ResetDeviceContinue: ResetDeviceContinue;
ResetDeviceFinish: ResetDeviceFinish;
WordRequest: WordRequest;
WordAck: WordAck;
SetU2FCounter: SetU2FCounter;
Expand Down

0 comments on commit cd5da87

Please sign in to comment.