@mysten/signers 0.5.9 → 0.6.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mysten/signers",
3
- "version": "0.5.9",
3
+ "version": "0.6.0",
4
4
  "description": "A collection of signers for various providers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Mysten Labs <build@mystenlabs.com>",
@@ -56,8 +56,8 @@
56
56
  "@noble/curves": "=1.9.4",
57
57
  "@noble/hashes": "^1.8.0",
58
58
  "asn1-ts": "^8.0.2",
59
- "@mysten/ledgerjs-hw-app-sui": "0.6.0",
60
- "@mysten/sui": "1.44.0"
59
+ "@mysten/ledgerjs-hw-app-sui": "0.7.0",
60
+ "@mysten/sui": "1.45.0"
61
61
  },
62
62
  "engines": {
63
63
  "node": ">=20"
@@ -11,6 +11,7 @@ import { toBase64 } from '@mysten/sui/utils';
11
11
 
12
12
  import { bcs } from '@mysten/sui/bcs';
13
13
  import { getInputObjects } from './objects.js';
14
+ import type { Resolution } from '@mysten/ledgerjs-hw-app-sui';
14
15
 
15
16
  export { SuiMoveObject } from './bcs.js';
16
17
  export { getInputObjects } from './objects.js';
@@ -68,20 +69,24 @@ export class LedgerSigner extends Signer {
68
69
  * Signs the provided transaction bytes.
69
70
  * @returns The signed transaction bytes and signature.
70
71
  */
71
- override async signTransaction(bytes: Uint8Array): Promise<SignatureWithBytes> {
72
- const transactionOptions = await getInputObjects(
73
- Transaction.from(bytes),
74
- this.#suiClient,
75
- ).catch(() => ({
76
- // Fail gracefully so network errors or serialization issues don't break transaction signing:
77
- bcsObjects: [],
78
- }));
72
+ override async signTransaction(
73
+ bytes: Uint8Array,
74
+ bcsObjects?: Uint8Array[],
75
+ resolution?: Resolution,
76
+ ): Promise<SignatureWithBytes> {
77
+ const transactionOptions = bcsObjects
78
+ ? { bcsObjects }
79
+ : await getInputObjects(Transaction.from(bytes), this.#suiClient).catch(() => ({
80
+ // Fail gracefully so network errors or serialization issues don't break transaction signing:
81
+ bcsObjects: [],
82
+ }));
79
83
 
80
84
  const intentMessage = messageWithIntent('TransactionData', bytes);
81
85
  const { signature } = await this.#ledgerClient.signTransaction(
82
86
  this.#derivationPath,
83
87
  intentMessage,
84
88
  transactionOptions,
89
+ resolution,
85
90
  );
86
91
 
87
92
  return {