Function
setPassword
(
serviceName: string,
account: string,
value: string,
)
Source from the content-addressed store, hash-verified
| 100 | ); |
| 101 | |
| 102 | export const setPassword = ( |
| 103 | serviceName: string, |
| 104 | account: string, |
| 105 | value: string, |
| 106 | ): Effect.Effect<void, KeychainError> => |
| 107 | Effect.flatMap(createEntry(serviceName, account), (entry) => |
| 108 | Effect.try({ |
| 109 | try: () => entry.setPassword(value), |
| 110 | catch: (cause) => |
| 111 | new KeychainError({ |
| 112 | message: "Failed writing secret", |
| 113 | cause, |
| 114 | }), |
| 115 | }).pipe(Effect.asVoid), |
| 116 | ); |
| 117 | |
| 118 | export const deletePassword = ( |
| 119 | serviceName: string, |