@dashevo/evo-sdk 3.0.0-dev.5 → 3.0.0-dev.6
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/addresses/facade.d.ts +34 -0
- package/dist/addresses/facade.js +45 -0
- package/dist/dpns/facade.d.ts +2 -2
- package/dist/evo-sdk.module.js +1 -1
- package/dist/evo-sdk.module.js.map +1 -1
- package/dist/group/facade.d.ts +2 -2
- package/dist/sdk.d.ts +3 -0
- package/dist/sdk.js +3 -0
- package/dist/voting/facade.d.ts +2 -4
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as wasm from '../wasm.js';
|
|
2
|
+
import type { EvoSDK } from '../sdk.js';
|
|
3
|
+
export declare class AddressesFacade {
|
|
4
|
+
private sdk;
|
|
5
|
+
constructor(sdk: EvoSDK);
|
|
6
|
+
/**
|
|
7
|
+
* Fetches information about a Platform address including its nonce and balance.
|
|
8
|
+
*
|
|
9
|
+
* @param address - The platform address to query (PlatformAddress, Uint8Array, or bech32m string)
|
|
10
|
+
* @returns PlatformAddressInfo containing address, nonce, and balance, or undefined if not found
|
|
11
|
+
*/
|
|
12
|
+
get(address: wasm.PlatformAddressLike): Promise<wasm.PlatformAddressInfo | undefined>;
|
|
13
|
+
/**
|
|
14
|
+
* Fetches information about a Platform address with proof.
|
|
15
|
+
*
|
|
16
|
+
* @param address - The platform address to query (PlatformAddress, Uint8Array, or bech32m string)
|
|
17
|
+
* @returns ProofMetadataResponse containing PlatformAddressInfo with proof information
|
|
18
|
+
*/
|
|
19
|
+
getWithProof(address: wasm.PlatformAddressLike): Promise<wasm.ProofMetadataResponseTyped<wasm.PlatformAddressInfo>>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetches information about multiple Platform addresses.
|
|
22
|
+
*
|
|
23
|
+
* @param addresses - Array of platform addresses to query
|
|
24
|
+
* @returns Map of PlatformAddress to PlatformAddressInfo (or undefined for unfunded addresses)
|
|
25
|
+
*/
|
|
26
|
+
getMany(addresses: wasm.PlatformAddressLike[]): Promise<Map<wasm.PlatformAddress, wasm.PlatformAddressInfo | undefined>>;
|
|
27
|
+
/**
|
|
28
|
+
* Fetches information about multiple Platform addresses with proof.
|
|
29
|
+
*
|
|
30
|
+
* @param addresses - Array of platform addresses to query
|
|
31
|
+
* @returns ProofMetadataResponse containing Map of PlatformAddress to PlatformAddressInfo
|
|
32
|
+
*/
|
|
33
|
+
getManyWithProof(addresses: wasm.PlatformAddressLike[]): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.PlatformAddress, wasm.PlatformAddressInfo | undefined>>>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export class AddressesFacade {
|
|
2
|
+
constructor(sdk) {
|
|
3
|
+
this.sdk = sdk;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Fetches information about a Platform address including its nonce and balance.
|
|
7
|
+
*
|
|
8
|
+
* @param address - The platform address to query (PlatformAddress, Uint8Array, or bech32m string)
|
|
9
|
+
* @returns PlatformAddressInfo containing address, nonce, and balance, or undefined if not found
|
|
10
|
+
*/
|
|
11
|
+
async get(address) {
|
|
12
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
13
|
+
return w.getAddressInfo(address);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Fetches information about a Platform address with proof.
|
|
17
|
+
*
|
|
18
|
+
* @param address - The platform address to query (PlatformAddress, Uint8Array, or bech32m string)
|
|
19
|
+
* @returns ProofMetadataResponse containing PlatformAddressInfo with proof information
|
|
20
|
+
*/
|
|
21
|
+
async getWithProof(address) {
|
|
22
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
23
|
+
return w.getAddressInfoWithProofInfo(address);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Fetches information about multiple Platform addresses.
|
|
27
|
+
*
|
|
28
|
+
* @param addresses - Array of platform addresses to query
|
|
29
|
+
* @returns Map of PlatformAddress to PlatformAddressInfo (or undefined for unfunded addresses)
|
|
30
|
+
*/
|
|
31
|
+
async getMany(addresses) {
|
|
32
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
33
|
+
return w.getAddressesInfos(addresses);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Fetches information about multiple Platform addresses with proof.
|
|
37
|
+
*
|
|
38
|
+
* @param addresses - Array of platform addresses to query
|
|
39
|
+
* @returns ProofMetadataResponse containing Map of PlatformAddress to PlatformAddressInfo
|
|
40
|
+
*/
|
|
41
|
+
async getManyWithProof(addresses) {
|
|
42
|
+
const w = await this.sdk.getWasmSdkConnected();
|
|
43
|
+
return w.getAddressesInfosWithProofInfo(addresses);
|
|
44
|
+
}
|
|
45
|
+
}
|
package/dist/dpns/facade.d.ts
CHANGED
|
@@ -17,8 +17,8 @@ export declare class DpnsFacade {
|
|
|
17
17
|
}): Promise<wasm.RegisterDpnsNameResult>;
|
|
18
18
|
usernames(query: wasm.DpnsUsernamesQuery): Promise<string[]>;
|
|
19
19
|
username(identityId: wasm.IdentifierLike): Promise<string | undefined>;
|
|
20
|
-
usernamesWithProof(query: wasm.DpnsUsernamesQuery): Promise<wasm.
|
|
21
|
-
usernameWithProof(identityId: wasm.IdentifierLike): Promise<wasm.
|
|
20
|
+
usernamesWithProof(query: wasm.DpnsUsernamesQuery): Promise<wasm.ProofMetadataResponseTyped<Array<string>>>;
|
|
21
|
+
usernameWithProof(identityId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<string | null>>;
|
|
22
22
|
getUsernameByName(username: string): Promise<wasm.DpnsUsernameInfo>;
|
|
23
23
|
getUsernameByNameWithProof(username: string): Promise<wasm.ProofMetadataResponseTyped<wasm.DpnsUsernameInfo>>;
|
|
24
24
|
}
|