@tetherto/wdk-wallet 1.0.0-beta.17 → 1.0.0-beta.19

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/index.js CHANGED
@@ -39,4 +39,4 @@ export { IWalletAccount } from './src/wallet-account.js'
39
39
 
40
40
  export { ISigner } from './src/signer.js'
41
41
 
42
- export { AssertionError, InvalidTokenError, InvalidSignerError, MaximumFeeExceededError, NoSuchElementError, NotImplementedError, ProviderError, ProviderErrorReason, ProviderRequiredError, TimeoutError, TransactionError, TransactionErrorReason, TransferError, TransferErrorReason, UnsupportedOperationError, ValueError, WdkError } from './src/errors.js'
42
+ export { AssertionError, InvalidTokenError, InvalidSignerError, InvalidSignerError as SignerError, MaximumFeeExceededError, NoSuchElementError, NotImplementedError, ProviderError, ProviderErrorReason, ProviderRequiredError, TimeoutError, TransactionError, TransactionErrorReason, TransferError, TransferErrorReason, UnsupportedOperationError, ValueError, WdkError } from './src/errors.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tetherto/wdk-wallet",
3
- "version": "1.0.0-beta.17",
3
+ "version": "1.0.0-beta.19",
4
4
  "description": "A simple package to manage BIP-32 wallets.",
5
5
  "keywords": [
6
6
  "wdk",
@@ -19,7 +19,7 @@
19
19
  /** @typedef {import('./wallet-account-read-only-multisig.js').MultisigProposal} MultisigProposal */
20
20
 
21
21
  /** @typedef {import('./wallet-account-multisig.js').MultisigTransactionOptions} MultisigTransactionOptions */
22
- /** @typedef {import('./wallet-account-multisig.js').MultisigAutoExecuteResult} MultisigAutoExecuteResult */
22
+ /** @typedef {import('./wallet-account-multisig.js').MultisigInteractionResult} MultisigInteractionResult */
23
23
 
24
24
  /** @typedef {import('./multisig-message-signing-read-only.js').MultisigMessageProposal} MultisigMessageProposal */
25
25
 
@@ -39,8 +39,8 @@ import { NotImplementedError } from './errors.js'
39
39
  */
40
40
 
41
41
  /**
42
- * @typedef {Object} MultisigAutoExecuteResult
43
- * @property {TransactionResult} [transaction] - If auto execute is set to true and the method call triggers the execution of the proposal, this field is set to the corresponding transaction's result (i.e., hash and fee).
42
+ * @typedef {Object} MultisigInteractionResult
43
+ * @property {TransactionResult} [transaction] - The on-chain transaction produced by this call, when the call itself settles on-chain — the execution transaction when a call triggers execution, or, on backends where every proposal/approval is its own on-chain transaction, that call's transaction. Undefined when the call only updates off-chain state. Its presence does not imply the proposal executed; execution is determined solely by `status`.
44
44
  */
45
45
 
46
46
  /** @interface */
@@ -88,7 +88,7 @@ export class IWalletAccountMultisig extends IWalletAccountReadOnlyMultisig {
88
88
  *
89
89
  * @param {Transaction} tx - The transaction.
90
90
  * @param {MultisigTransactionOptions} [transactionOptions] - The multisig transaction's options.
91
- * @returns {Promise<MultisigProposal>} The created proposal; its `status` is `'executed'` when `autoExecute` ran to completion, otherwise `'pending'`.
91
+ * @returns {Promise<MultisigProposal & MultisigInteractionResult>} The created proposal; its `status` is `'executed'` when `autoExecute` ran to completion, otherwise `'pending'`.
92
92
  * @throws {ValueError} If the transaction is not valid.
93
93
  * @throws {ProviderRequiredError} If the method requires a provider.
94
94
  * @throws {ProviderError} If the provider fails to propose the transaction.
@@ -102,7 +102,7 @@ export class IWalletAccountMultisig extends IWalletAccountReadOnlyMultisig {
102
102
  * Approves a pending proposal.
103
103
  *
104
104
  * @param {string} proposalId - The proposal's id.
105
- * @returns {Promise<MultisigProposal>} The multisig proposal.
105
+ * @returns {Promise<MultisigProposal & MultisigInteractionResult>} The multisig proposal.
106
106
  * @throws {ValueError} If the proposal's identifier is not a valid id.
107
107
  * @throws {NoSuchElementError} If no message exists for the given id.
108
108
  * @throws {AccountNotOwnerError} If the account is not an owner of the multisig wallet.
package/types/index.d.ts CHANGED
@@ -16,4 +16,4 @@ export type ProviderErrorOptions = import("./src/errors.js").ProviderErrorOption
16
16
  export type TransactionErrorOptions = import("./src/errors.js").TransactionErrorOptions;
17
17
  export type TransferErrorOptions = import("./src/errors.js").TransferErrorOptions;
18
18
  export { default as WalletAccountReadOnly, IWalletAccountReadOnly, FINALITY } from "./src/wallet-account-read-only.js";
19
- export { AssertionError, InvalidTokenError, InvalidSignerError, MaximumFeeExceededError, NoSuchElementError, NotImplementedError, ProviderError, ProviderErrorReason, ProviderRequiredError, TimeoutError, TransactionError, TransactionErrorReason, TransferError, TransferErrorReason, UnsupportedOperationError, ValueError, WdkError } from "./src/errors.js";
19
+ export { AssertionError, InvalidTokenError, InvalidSignerError, InvalidSignerError as SignerError, MaximumFeeExceededError, NoSuchElementError, NotImplementedError, ProviderError, ProviderErrorReason, ProviderRequiredError, TimeoutError, TransactionError, TransactionErrorReason, TransferError, TransferErrorReason, UnsupportedOperationError, ValueError, WdkError } from "./src/errors.js";
@@ -7,7 +7,7 @@ export type KeyPair = import("../wallet-account.js").KeyPair;
7
7
  export type MultisigInfo = import("./wallet-account-read-only-multisig.js").MultisigInfo;
8
8
  export type MultisigProposal = import("./wallet-account-read-only-multisig.js").MultisigProposal;
9
9
  export type MultisigTransactionOptions = import("./wallet-account-multisig.js").MultisigTransactionOptions;
10
- export type MultisigAutoExecuteResult = import("./wallet-account-multisig.js").MultisigAutoExecuteResult;
10
+ export type MultisigInteractionResult = import("./wallet-account-multisig.js").MultisigInteractionResult;
11
11
  export type MultisigMessageProposal = import("./multisig-message-signing-read-only.js").MultisigMessageProposal;
12
12
  export type MultisigSignature = import("./multisig-message-signing.js").MultisigSignature;
13
13
  export type MultisigOptions = import("./multisig-owner-management.js").MultisigOptions;
@@ -37,7 +37,7 @@ export interface IWalletAccountMultisig extends IWalletAccountReadOnlyMultisig {
37
37
  * @throws {ProviderError} If the provider fails to propose the transaction.
38
38
  * @throws {AccountNotOwnerError} If the account is not an owner of the multisig wallet.
39
39
  */
40
- propose(tx: Transaction, transactionOptions?: MultisigTransactionOptions): Promise<MultisigProposal>;
40
+ propose(tx: Transaction, transactionOptions?: MultisigTransactionOptions): Promise<MultisigProposal & MultisigInteractionResult>;
41
41
  /**
42
42
  * Approves a pending proposal.
43
43
  *
@@ -47,7 +47,7 @@ export interface IWalletAccountMultisig extends IWalletAccountReadOnlyMultisig {
47
47
  * @throws {NoSuchElementError} If no message exists for the given id.
48
48
  * @throws {AccountNotOwnerError} If the account is not an owner of the multisig wallet.
49
49
  */
50
- approveProposal(proposalId: string): Promise<MultisigProposal>;
50
+ approveProposal(proposalId: string): Promise<MultisigProposal & MultisigInteractionResult>;
51
51
  /**
52
52
  * Rejects a pending proposal.
53
53
  *
@@ -92,9 +92,9 @@ export type MultisigTransactionOptions = {
92
92
  */
93
93
  autoExecute?: boolean;
94
94
  };
95
- export type MultisigAutoExecuteResult = {
95
+ export type MultisigInteractionResult = {
96
96
  /**
97
- * - If auto execute is set to true and the method call triggers the execution of the proposal, this field is set to the corresponding transaction's result (i.e., hash and fee).
97
+ * - The on-chain transaction produced by this call, when the call itself settles on-chain — the execution transaction when a call triggers execution, or, on backends where every proposal/approval is its own on-chain transaction, that call's transaction. Undefined when the call only updates off-chain state. Its presence does not imply the proposal executed; execution is determined solely by `status`.
98
98
  */
99
99
  transaction?: TransactionResult;
100
100
  };