@tetherto/wdk-wallet 1.0.0-beta.14 → 1.0.0-beta.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.
- package/index.js +7 -1
- package/package.json +5 -1
- package/src/errors.js +41 -0
- package/src/multisig/index.js +30 -0
- package/src/multisig/multisig-owner-management.js +77 -0
- package/src/multisig/wallet-account-multisig.js +155 -0
- package/src/multisig/wallet-account-read-only-multisig.js +112 -0
- package/src/protocols/index.js +21 -0
- package/src/protocols/sda-protocol.js +556 -0
- package/src/wallet-account-read-only-simple.js +77 -0
- package/src/wallet-account-read-only.js +3 -51
- package/types/index.d.ts +4 -4
- package/types/src/errors.d.ts +26 -0
- package/types/src/multisig/index.d.ts +11 -0
- package/types/src/multisig/multisig-owner-management.d.ts +49 -0
- package/types/src/multisig/wallet-account-multisig.d.ts +107 -0
- package/types/src/multisig/wallet-account-read-only-multisig.d.ts +103 -0
- package/types/src/protocols/index.d.ts +19 -0
- package/types/src/protocols/sda-protocol.d.ts +640 -0
- package/types/src/wallet-account-read-only-simple.d.ts +46 -0
- package/types/src/wallet-account-read-only.d.ts +2 -36
|
@@ -1,33 +1,5 @@
|
|
|
1
1
|
/** @interface */
|
|
2
|
-
export interface IWalletAccountReadOnly {
|
|
3
|
-
/**
|
|
4
|
-
* Returns the account's address.
|
|
5
|
-
*
|
|
6
|
-
* @returns {Promise<string>} The account's address.
|
|
7
|
-
*/
|
|
8
|
-
getAddress(): Promise<string>;
|
|
9
|
-
/**
|
|
10
|
-
* Verifies a message's signature.
|
|
11
|
-
*
|
|
12
|
-
* @param {string} message - The original message.
|
|
13
|
-
* @param {string} signature - The signature to verify.
|
|
14
|
-
* @returns {Promise<boolean>} True if the signature is valid.
|
|
15
|
-
* @throws {Error} If the read-only wallet account class is not able to provide an implementation for the method.
|
|
16
|
-
*/
|
|
17
|
-
verify(message: string, signature: string): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns the account's native token balance.
|
|
20
|
-
*
|
|
21
|
-
* @returns {Promise<bigint>} The native token balance.
|
|
22
|
-
*/
|
|
23
|
-
getBalance(): Promise<bigint>;
|
|
24
|
-
/**
|
|
25
|
-
* Returns the account balance for a specific token.
|
|
26
|
-
*
|
|
27
|
-
* @param {string} tokenAddress - The smart contract address of the token.
|
|
28
|
-
* @returns {Promise<bigint>} The token balance.
|
|
29
|
-
*/
|
|
30
|
-
getTokenBalance(tokenAddress: string): Promise<bigint>;
|
|
2
|
+
export interface IWalletAccountReadOnly extends IWalletAccountReadOnlySimple {
|
|
31
3
|
/**
|
|
32
4
|
* Quotes the costs of a send transaction operation.
|
|
33
5
|
*
|
|
@@ -42,13 +14,6 @@ export interface IWalletAccountReadOnly {
|
|
|
42
14
|
* @returns {Promise<Omit<TransferResult, 'hash'>>} The transfer's quotes.
|
|
43
15
|
*/
|
|
44
16
|
quoteTransfer(options: TransferOptions): Promise<Omit<TransferResult, "hash">>;
|
|
45
|
-
/**
|
|
46
|
-
* Returns a transaction's receipt.
|
|
47
|
-
*
|
|
48
|
-
* @param {string} hash - The transaction's hash.
|
|
49
|
-
* @returns {Promise<unknown | null>} The receipt, or null if the transaction has not been included in a block yet.
|
|
50
|
-
*/
|
|
51
|
-
getTransactionReceipt(hash: string): Promise<unknown | null>;
|
|
52
17
|
}
|
|
53
18
|
/**
|
|
54
19
|
* @abstract
|
|
@@ -170,3 +135,4 @@ export type TransferResult = {
|
|
|
170
135
|
*/
|
|
171
136
|
fee: bigint;
|
|
172
137
|
};
|
|
138
|
+
import { IWalletAccountReadOnlySimple } from './wallet-account-read-only-simple.js';
|