@tari-project/wallet-daemon-signer 0.14.2 → 0.14.4
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/dist/signer.d.ts +4 -5
- package/dist/signer.js +15 -3
- package/package.json +7 -7
package/dist/signer.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { TariPermissions } from "@tari-project/tari-permissions";
|
|
2
2
|
import { TariSigner } from "@tari-project/tari-signer";
|
|
3
3
|
import { WalletDaemonClient } from "@tari-project/wallet_jrpc_client";
|
|
4
|
-
import { AccountData, GetTransactionResultResponse, SubmitTransactionRequest, SubmitTransactionResponse,
|
|
5
|
-
import { AccountGetResponse, AccountsListRequest, AccountsListResponse, ConfidentialViewVaultBalanceRequest, WalletGetInfoResponse } from "@tari-project/typescript-bindings";
|
|
6
|
-
export declare const WalletDaemonNotConnected = "WALLET_DAEMON_NOT_CONNECTED";
|
|
7
|
-
export declare const Unsupported = "UNSUPPORTED";
|
|
4
|
+
import { AccountData, GetTransactionResultResponse, SubmitTransactionRequest, SubmitTransactionResponse, RevealedBalances, TemplateDefinition, Substate, ListSubstatesResponse, ListSubstatesRequest, ListNftsResponse, ListNftsRequest } from "@tari-project/tarijs-types";
|
|
5
|
+
import { AccountGetResponse, AccountsListRequest, AccountsListResponse, ConfidentialViewVaultBalanceRequest, UtxoAddress, WalletGetInfoResponse } from "@tari-project/typescript-bindings";
|
|
8
6
|
export interface WalletDaemonBaseParameters {
|
|
9
7
|
permissions: TariPermissions;
|
|
10
8
|
optionalPermissions?: TariPermissions;
|
|
@@ -41,7 +39,8 @@ export declare class WalletDaemonTariSigner implements TariSigner {
|
|
|
41
39
|
getTransactionResult(transactionId: string): Promise<GetTransactionResultResponse>;
|
|
42
40
|
getPublicKey(branch: string, index: number): Promise<string>;
|
|
43
41
|
getTemplateDefinition(template_address: string): Promise<TemplateDefinition>;
|
|
44
|
-
getConfidentialVaultBalances({ vault_id, view_key_id, maximum_expected_value, minimum_expected_value, }: ConfidentialViewVaultBalanceRequest): Promise<
|
|
42
|
+
getConfidentialVaultBalances({ vault_id, view_key_id, maximum_expected_value, minimum_expected_value, }: ConfidentialViewVaultBalanceRequest): Promise<RevealedBalances>;
|
|
43
|
+
decryptUtxoValue(utxoAddress: UtxoAddress, viewKeyId: number, maximum_expected_value?: null, minimum_expected_value?: null): Promise<RevealedBalances>;
|
|
45
44
|
listSubstates({ filter_by_template, filter_by_type, limit, offset, }: ListSubstatesRequest): Promise<ListSubstatesResponse>;
|
|
46
45
|
getNftsList(req: ListNftsRequest): Promise<ListNftsResponse>;
|
|
47
46
|
getWalletInfo(): Promise<WalletGetInfoResponse>;
|
package/dist/signer.js
CHANGED
|
@@ -4,8 +4,6 @@ import { WalletDaemonClient } from "@tari-project/wallet_jrpc_client";
|
|
|
4
4
|
import { WebRtcRpcTransport } from "./webrtc_transport";
|
|
5
5
|
import { convertStringToTransactionStatus, } from "@tari-project/tarijs-types";
|
|
6
6
|
import { substateIdToString, } from "@tari-project/typescript-bindings";
|
|
7
|
-
export const WalletDaemonNotConnected = "WALLET_DAEMON_NOT_CONNECTED";
|
|
8
|
-
export const Unsupported = "UNSUPPORTED";
|
|
9
7
|
export class WalletDaemonTariSigner {
|
|
10
8
|
signerName = "WalletDaemon";
|
|
11
9
|
params;
|
|
@@ -170,6 +168,16 @@ export class WalletDaemonTariSigner {
|
|
|
170
168
|
});
|
|
171
169
|
return { balances: res.balances };
|
|
172
170
|
}
|
|
171
|
+
async decryptUtxoValue(utxoAddress, viewKeyId, maximum_expected_value = null, minimum_expected_value = null) {
|
|
172
|
+
const res = await this.client.stealthUtxosDecryptValue({
|
|
173
|
+
resource_address: utxoAddress.resource_address,
|
|
174
|
+
utxo_id: utxoAddress.id,
|
|
175
|
+
view_key_id: viewKeyId,
|
|
176
|
+
minimum_expected_value,
|
|
177
|
+
maximum_expected_value,
|
|
178
|
+
});
|
|
179
|
+
return { balances: res.balances };
|
|
180
|
+
}
|
|
173
181
|
async listSubstates({ filter_by_template, filter_by_type, limit, offset, }) {
|
|
174
182
|
const resp = await this.client.substatesList({
|
|
175
183
|
filter_by_template,
|
|
@@ -186,7 +194,11 @@ export class WalletDaemonTariSigner {
|
|
|
186
194
|
return { substates };
|
|
187
195
|
}
|
|
188
196
|
async getNftsList(req) {
|
|
189
|
-
return await this.client.nftsList(
|
|
197
|
+
return await this.client.nftsList({
|
|
198
|
+
account: { ComponentAddress: req.accountAddress },
|
|
199
|
+
limit: req.limit || 100,
|
|
200
|
+
offset: req.offset || 0,
|
|
201
|
+
});
|
|
190
202
|
}
|
|
191
203
|
async getWalletInfo() {
|
|
192
204
|
const resp = await this.client.walletGetInfo();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tari-project/wallet-daemon-signer",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
"author": "The Tari Community",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@tari-project/typescript-bindings": ">=1.17.
|
|
14
|
-
"@tari-project/wallet_jrpc_client": "^1.
|
|
15
|
-
"@tari-project/tari-
|
|
16
|
-
"@tari-project/tari-
|
|
17
|
-
"@tari-project/tari-
|
|
18
|
-
"@tari-project/tarijs-types": "^0.14.
|
|
13
|
+
"@tari-project/typescript-bindings": ">=1.17.2",
|
|
14
|
+
"@tari-project/wallet_jrpc_client": "^1.9.2",
|
|
15
|
+
"@tari-project/tari-permissions": "^0.14.4",
|
|
16
|
+
"@tari-project/tari-signer": "^0.14.4",
|
|
17
|
+
"@tari-project/tari-provider": "^0.14.4",
|
|
18
|
+
"@tari-project/tarijs-types": "^0.14.4"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^22.13.1",
|