@neuraiproject/neurai-sign-esp32 0.5.8 → 0.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -581,6 +581,7 @@ using JSON messages. Supported commands:
581
581
  | `get_depin_identity` | None (session-gated) | 10s |
582
582
  | `depin_sign` | None (session-gated, rate-limited) | 30s |
583
583
  | `depin_decrypt` | None (session-gated, rate-limited) | 30s |
584
+ | `depin_decrypt_payload` | None (session-gated, rate-limited) | 30s |
584
585
  | `depin_session_end` | None | 10s |
585
586
 
586
587
  `info` reports `key_type` (`"legacy"` | `"pq"`). In PQ mode, `get_address`
@@ -616,6 +617,7 @@ Main class for device interaction.
616
617
  | `getDepinIdentity()` | Read the DePIN chat identity (address + pubkey + path); session-gated, no per-call prompt |
617
618
  | `depinSign(params)` | Sign a DePIN message on-device (DER over the canonical CDepinMessage); session-gated, rate-limited |
618
619
  | `depinDecrypt(depinMessageHex)` | Decrypt a CDepinMessage addressed to this identity → `plaintext_b64`; session-gated |
620
+ | `depinDecryptPayload(encryptedPayloadHex)` | Decrypt a bare ECIES `encrypted_payload_hex` (decomposed server item) → `plaintext_b64`; session-gated |
619
621
  | `depinSessionEnd()` | End the DePIN session (also revoked on lock / disconnect / timeout) |
620
622
  | `signTransaction(opts)` | Build + sign + finalize in one call; auto-routes legacy (PSBT) vs PQ (`sign_tx`) by device mode |
621
623
  | `signPqTransaction(opts)` | Spend from a PQ address: build raw tx + sign via `sign_tx` (used internally by `signTransaction` in PQ mode) |
@@ -13164,6 +13164,20 @@ var NeuraiSignESP32Bundle = (function () {
13164
13164
  this.assertSuccess(response);
13165
13165
  return response;
13166
13166
  }
13167
+ /**
13168
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
13169
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
13170
+ * server responses) — without the surrounding CDepinMessage framing. Use this
13171
+ * when you have the decomposed server item rather than a full serialized
13172
+ * message (the common case for a chat client). Returns the plaintext
13173
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
13174
+ * Requires an active session and the `depin_message` capability.
13175
+ */
13176
+ async depinDecryptPayload(encryptedPayloadHex) {
13177
+ const response = await this.serial.sendCommand({ action: "depin_decrypt_payload", encrypted_payload: encryptedPayloadHex }, 35000);
13178
+ this.assertSuccess(response);
13179
+ return response;
13180
+ }
13167
13181
  /**
13168
13182
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
13169
13183
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
package/dist/browser.js CHANGED
@@ -13161,6 +13161,20 @@ class NeuraiESP32 {
13161
13161
  this.assertSuccess(response);
13162
13162
  return response;
13163
13163
  }
13164
+ /**
13165
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
13166
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
13167
+ * server responses) — without the surrounding CDepinMessage framing. Use this
13168
+ * when you have the decomposed server item rather than a full serialized
13169
+ * message (the common case for a chat client). Returns the plaintext
13170
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
13171
+ * Requires an active session and the `depin_message` capability.
13172
+ */
13173
+ async depinDecryptPayload(encryptedPayloadHex) {
13174
+ const response = await this.serial.sendCommand({ action: "depin_decrypt_payload", encrypted_payload: encryptedPayloadHex }, 35000);
13175
+ this.assertSuccess(response);
13176
+ return response;
13177
+ }
13164
13178
  /**
13165
13179
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
13166
13180
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
package/dist/index.cjs CHANGED
@@ -13163,6 +13163,20 @@ class NeuraiESP32 {
13163
13163
  this.assertSuccess(response);
13164
13164
  return response;
13165
13165
  }
13166
+ /**
13167
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
13168
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
13169
+ * server responses) — without the surrounding CDepinMessage framing. Use this
13170
+ * when you have the decomposed server item rather than a full serialized
13171
+ * message (the common case for a chat client). Returns the plaintext
13172
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
13173
+ * Requires an active session and the `depin_message` capability.
13174
+ */
13175
+ async depinDecryptPayload(encryptedPayloadHex) {
13176
+ const response = await this.serial.sendCommand({ action: "depin_decrypt_payload", encrypted_payload: encryptedPayloadHex }, 35000);
13177
+ this.assertSuccess(response);
13178
+ return response;
13179
+ }
13166
13180
  /**
13167
13181
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
13168
13182
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
package/dist/index.d.ts CHANGED
@@ -520,6 +520,16 @@ declare class NeuraiESP32 {
520
520
  * @param depinMessageHex Hex of the complete serialized CDepinMessage.
521
521
  */
522
522
  depinDecrypt(depinMessageHex: string): Promise<IDepinDecryptResponse>;
523
+ /**
524
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
525
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
526
+ * server responses) — without the surrounding CDepinMessage framing. Use this
527
+ * when you have the decomposed server item rather than a full serialized
528
+ * message (the common case for a chat client). Returns the plaintext
529
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
530
+ * Requires an active session and the `depin_message` capability.
531
+ */
532
+ depinDecryptPayload(encryptedPayloadHex: string): Promise<IDepinDecryptResponse>;
523
533
  /**
524
534
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
525
535
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
package/dist/index.js CHANGED
@@ -13161,6 +13161,20 @@ class NeuraiESP32 {
13161
13161
  this.assertSuccess(response);
13162
13162
  return response;
13163
13163
  }
13164
+ /**
13165
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
13166
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
13167
+ * server responses) — without the surrounding CDepinMessage framing. Use this
13168
+ * when you have the decomposed server item rather than a full serialized
13169
+ * message (the common case for a chat client). Returns the plaintext
13170
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
13171
+ * Requires an active session and the `depin_message` capability.
13172
+ */
13173
+ async depinDecryptPayload(encryptedPayloadHex) {
13174
+ const response = await this.serial.sendCommand({ action: "depin_decrypt_payload", encrypted_payload: encryptedPayloadHex }, 35000);
13175
+ this.assertSuccess(response);
13176
+ return response;
13177
+ }
13164
13178
  /**
13165
13179
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
13166
13180
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
@@ -520,6 +520,16 @@ declare class NeuraiESP32 {
520
520
  * @param depinMessageHex Hex of the complete serialized CDepinMessage.
521
521
  */
522
522
  depinDecrypt(depinMessageHex: string): Promise<IDepinDecryptResponse>;
523
+ /**
524
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
525
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
526
+ * server responses) — without the surrounding CDepinMessage framing. Use this
527
+ * when you have the decomposed server item rather than a full serialized
528
+ * message (the common case for a chat client). Returns the plaintext
529
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
530
+ * Requires an active session and the `depin_message` capability.
531
+ */
532
+ depinDecryptPayload(encryptedPayloadHex: string): Promise<IDepinDecryptResponse>;
523
533
  /**
524
534
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
525
535
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
@@ -13161,6 +13161,20 @@ class NeuraiESP32 {
13161
13161
  this.assertSuccess(response);
13162
13162
  return response;
13163
13163
  }
13164
+ /**
13165
+ * Decrypt a BARE ECIES payload — the `encrypted_payload_hex` a DePIN server
13166
+ * returns per message (and the format of privacy-wrapped `{ encrypted }`
13167
+ * server responses) — without the surrounding CDepinMessage framing. Use this
13168
+ * when you have the decomposed server item rather than a full serialized
13169
+ * message (the common case for a chat client). Returns the plaintext
13170
+ * base64-encoded, or a `not_for_us` device error if not a recipient.
13171
+ * Requires an active session and the `depin_message` capability.
13172
+ */
13173
+ async depinDecryptPayload(encryptedPayloadHex) {
13174
+ const response = await this.serial.sendCommand({ action: "depin_decrypt_payload", encrypted_payload: encryptedPayloadHex }, 35000);
13175
+ this.assertSuccess(response);
13176
+ return response;
13177
+ }
13164
13178
  /**
13165
13179
  * End the current DePIN session: auto-sign/decrypt stops and the identity is
13166
13180
  * no longer revealed until a new {@link depinSessionBegin} approval. Safe to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuraiproject/neurai-sign-esp32",
3
- "version": "0.5.8",
3
+ "version": "0.5.9",
4
4
  "description": "Create and sign PSBTs for Neurai via ESP32 hardware wallet",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",