@yeying-community/web3-bs 1.0.15 → 1.0.16

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.
@@ -2042,7 +2042,8 @@
2042
2042
  * 调用钱包插件的 `yeying_encrypt` / `yeying_decrypt` / `yeying_getCipherSuites`
2043
2043
  * EIP-1193 自定义方法。命名安全套件 + 静默执行 + 站点授权模型同 UCAN。
2044
2044
  *
2045
- * 数据密码(password 参数)由 DApp 自行管理与钱包密码独立;
2045
+ * 默认数据密码(password 参数)由 DApp 自行管理与钱包密码独立;
2046
+ * 也可通过 passwordSource 请求钱包插件在钱包内部派生加密密码。
2046
2047
  * plaintext 走 base64 字符串跨 message 边界传输。
2047
2048
  */
2048
2049
  class CipherError extends Error {
@@ -2093,6 +2094,8 @@
2093
2094
  params: [{
2094
2095
  data: options.data,
2095
2096
  password: options.password,
2097
+ passwordSource: options.passwordSource,
2098
+ passwordContext: options.passwordContext,
2096
2099
  suite: options.suite
2097
2100
  }]
2098
2101
  });
@@ -2116,7 +2119,9 @@
2116
2119
  method: 'yeying_decrypt',
2117
2120
  params: [{
2118
2121
  ciphertext: options.ciphertext,
2119
- password: options.password
2122
+ password: options.password,
2123
+ passwordSource: options.passwordSource,
2124
+ passwordContext: options.passwordContext
2120
2125
  }]
2121
2126
  });
2122
2127
  if (!result || typeof result !== 'object' || typeof result.plaintext !== 'string') {