Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cedd339
refactor: use identifiers in evo sdk
shumkov Nov 6, 2025
5beb013
refactor: camel case params
shumkov Nov 6, 2025
f3b254a
refactor: use query for usernames
shumkov Nov 10, 2025
7c4535d
refactor: user IdentifierLike type
shumkov Nov 10, 2025
5296d24
refactor: group action signers query
shumkov Nov 10, 2025
5eed770
refactor: identity stuff to queries
shumkov Nov 10, 2025
80c1772
refactor: cleanups params
shumkov Nov 10, 2025
c94636c
revert: unnecessary changes
shumkov Nov 11, 2025
65a29b0
style: formatting
shumkov Nov 11, 2025
d5520c5
refactor: remove unnecessary `as any`
shumkov Nov 11, 2025
edb82d1
refactor: rename opts to params
shumkov Nov 11, 2025
c08dede
fix: wrongly expectd 0x for hex strings
shumkov Nov 11, 2025
93ef9d6
test: fix tests and lint warnings
shumkov Nov 11, 2025
86d8fc0
test: fix tests and lint warnings
shumkov Nov 11, 2025
ae1238c
Merge branch 'wasm-sdk-params2' of github.com:dashpay/platform into w…
shumkov Nov 11, 2025
e7c15c4
tests: update evo sdk tests for new API
shumkov Nov 11, 2025
a26b97d
fix: derivation path
shumkov Nov 12, 2025
110f75e
chore: some fixes
shumkov Nov 12, 2025
b849bce
refactor: remove unused dependency and formatting
shumkov Nov 12, 2025
19e91ea
refactor: DerivationPath
shumkov Nov 12, 2025
6c7130f
refactor: SeedPhraseKeyInfo and PathDerivedKeyInfo
shumkov Nov 12, 2025
841229c
refactor: typed returns
shumkov Nov 14, 2025
15e586e
refactor: sdk params and return objects
shumkov Nov 14, 2025
36dd0f2
Merge branch 'v2.2-dev' into wasm-sdk-params3
shumkov Nov 17, 2025
b3e1546
fix: duplicate structs after merge conflicts
shumkov Nov 17, 2025
825639c
fix: js-yaml prototype pollution
shumkov Nov 17, 2025
020d2bd
fix: invalid types
shumkov Nov 17, 2025
07dbdfb
fix: compilation warnings
shumkov Nov 17, 2025
23d6d79
refactor: clippy warnings
shumkov Nov 17, 2025
ea858bd
Merge branch 'v2.2-dev' into wasm-sdk-params3
shumkov Nov 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 16 additions & 34 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added .yarn/cache/fsevents-patch-19706e7e35-10.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@
"brace-expansion": "^2.0.2",
"cipher-base": "^1.0.5",
"sha.js": "^2.4.12",
"tmp": "^0.2.4"
"tmp": "^0.2.4",
"js-yaml": "^4.1.1"
},
"dependencies": {
"dompurify": "^3.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/dashmate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"hasbin": "^1.2.3",
"is-wsl": "2.2.0",
"jayson": "^4.1.0",
"js-yaml": "^4.1.0",
"js-yaml": "^4.1.1",
"listr2": "5.0.7",
"lodash": "^4.17.21",
"memory-streams": "^0.1.3",
Expand Down
10 changes: 5 additions & 5 deletions packages/js-evo-sdk/src/contracts/facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ export class ContractsFacade {
return w.getDataContract(contractId);
}

async fetchWithProof(contractId: wasm.IdentifierLike): Promise<any> {
async fetchWithProof(contractId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.DataContract>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDataContractWithProofInfo(contractId);
}

async getHistory(query: wasm.DataContractHistoryQuery): Promise<any> {
async getHistory(query: wasm.DataContractHistoryQuery): Promise<Map<bigint, wasm.DataContract>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDataContractHistory(query);
}

async getHistoryWithProof(query: wasm.DataContractHistoryQuery): Promise<any> {
async getHistoryWithProof(query: wasm.DataContractHistoryQuery): Promise<wasm.ProofMetadataResponseTyped<Map<bigint, wasm.DataContract>>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDataContractHistoryWithProofInfo(query);
}

async getMany(contractIds: wasm.IdentifierLike[]): Promise<any> {
async getMany(contractIds: wasm.IdentifierLike[]): Promise<Map<wasm.Identifier, wasm.DataContract | undefined>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDataContracts(contractIds);
}

async getManyWithProof(contractIds: wasm.IdentifierLike[]): Promise<any> {
async getManyWithProof(contractIds: wasm.IdentifierLike[]): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, wasm.DataContract | undefined>>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDataContractsWithProofInfo(contractIds);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/js-evo-sdk/src/documents/facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ export class DocumentsFacade {
}

// Query many documents
async query(query: wasm.DocumentsQuery): Promise<any> {
async query(query: wasm.DocumentsQuery): Promise<Map<wasm.Identifier, wasm.Document | undefined>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDocuments(query);
}

async queryWithProof(query: wasm.DocumentsQuery): Promise<any> {
async queryWithProof(query: wasm.DocumentsQuery): Promise<wasm.ProofMetadataResponseTyped<Map<wasm.Identifier, wasm.Document | undefined>>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDocumentsWithProofInfo(query);
}

async get(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<any> {
async get(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<wasm.Document | undefined> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDocument(contractId, type, documentId);
}

async getWithProof(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<any> {
async getWithProof(contractId: wasm.IdentifierLike, type: string, documentId: wasm.IdentifierLike): Promise<wasm.ProofMetadataResponseTyped<wasm.Document | undefined>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDocumentWithProofInfo(contractId, type, documentId);
}
Expand Down
16 changes: 8 additions & 8 deletions packages/js-evo-sdk/src/dpns/facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,43 @@ export class DpnsFacade {
return w.dpnsIsNameAvailable(label);
}

async resolveName(name: string): Promise<any> {
async resolveName(name: string): Promise<string | undefined> {
const w = await this.sdk.getWasmSdkConnected();
return w.dpnsResolveName(name);
}

async registerName(args: { label: string; identityId: wasm.IdentifierLike; publicKeyId: number; privateKeyWif: string; onPreorder?: Function }): Promise<any> {
async registerName(args: { label: string; identityId: wasm.IdentifierLike; publicKeyId: number; privateKeyWif: string; onPreorder?: Function }): Promise<wasm.RegisterDpnsNameResult> {
const { label, identityId, publicKeyId, privateKeyWif, onPreorder } = args;
const w = await this.sdk.getWasmSdkConnected();
return w.dpnsRegisterName(label, identityId, publicKeyId, privateKeyWif, onPreorder ?? null);
}

async usernames(query: wasm.DpnsUsernamesQuery): Promise<any> {
async usernames(query: wasm.DpnsUsernamesQuery): Promise<string[]> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDpnsUsernames(query);
}

async username(identityId: wasm.IdentifierLike): Promise<any> {
async username(identityId: wasm.IdentifierLike): Promise<string | undefined> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDpnsUsername(identityId);
}

async usernamesWithProof(query: wasm.DpnsUsernamesQuery): Promise<any> {
async usernamesWithProof(query: wasm.DpnsUsernamesQuery): Promise<wasm.DpnsUsernamesProofResponse> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDpnsUsernamesWithProofInfo(query);
}

async usernameWithProof(identityId: wasm.IdentifierLike): Promise<any> {
async usernameWithProof(identityId: wasm.IdentifierLike): Promise<wasm.DpnsUsernameProofResponse> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDpnsUsernameWithProofInfo(identityId);
}

async getUsernameByName(username: string): Promise<any> {
async getUsernameByName(username: string): Promise<wasm.DpnsUsernameInfo> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDpnsUsernameByName(username);
}

async getUsernameByNameWithProof(username: string): Promise<any> {
async getUsernameByNameWithProof(username: string): Promise<wasm.ProofMetadataResponseTyped<wasm.DpnsUsernameInfo>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getDpnsUsernameByNameWithProofInfo(username);
}
Expand Down
24 changes: 14 additions & 10 deletions packages/js-evo-sdk/src/epoch/facade.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as wasm from '../wasm.js';
import type { EvoSDK } from '../sdk.js';
import type {
EpochsQuery,
Expand All @@ -9,45 +10,48 @@ export class EpochFacade {
private sdk: EvoSDK;
constructor(sdk: EvoSDK) { this.sdk = sdk; }

async epochsInfo(query: EpochsQuery = {}): Promise<any> {
async epochsInfo(query: EpochsQuery = {}): Promise<Map<number, wasm.ExtendedEpochInfo | undefined>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getEpochsInfo(query);
}

async epochsInfoWithProof(query: EpochsQuery = {}): Promise<any> {
async epochsInfoWithProof(query: EpochsQuery = {}): Promise<wasm.ProofMetadataResponseTyped<Map<number, wasm.ExtendedEpochInfo | undefined>>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getEpochsInfoWithProofInfo(query);
}

async finalizedInfos(query: FinalizedEpochsQuery): Promise<any> {
async finalizedInfos(query: FinalizedEpochsQuery): Promise<Map<number, wasm.FinalizedEpochInfo | undefined>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getFinalizedEpochInfos(query);
}

async finalizedInfosWithProof(query: FinalizedEpochsQuery): Promise<any> {
async finalizedInfosWithProof(query: FinalizedEpochsQuery): Promise<wasm.ProofMetadataResponseTyped<Map<number, wasm.FinalizedEpochInfo | undefined>>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getFinalizedEpochInfosWithProofInfo(query);
}

async current(): Promise<any> { const w = await this.sdk.getWasmSdkConnected(); return w.getCurrentEpoch(); }
async currentWithProof(): Promise<any> { const w = await this.sdk.getWasmSdkConnected(); return w.getCurrentEpochWithProofInfo(); }
async current(): Promise<wasm.ExtendedEpochInfo> { const w = await this.sdk.getWasmSdkConnected(); return w.getCurrentEpoch(); }
async currentWithProof(): Promise<wasm.ProofMetadataResponseTyped<wasm.ExtendedEpochInfo>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getCurrentEpochWithProofInfo();
}

async evonodesProposedBlocksByIds(epoch: number, ids: string[]): Promise<any> {
async evonodesProposedBlocksByIds(epoch: number, ids: string[]): Promise<Map<wasm.Identifier, bigint>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getEvonodesProposedEpochBlocksByIds(epoch, ids);
}

async evonodesProposedBlocksByIdsWithProof(epoch: number, ids: string[]): Promise<any> {
async evonodesProposedBlocksByIdsWithProof(epoch: number, ids: string[]): Promise<wasm.ProofMetadataResponseTyped<unknown>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getEvonodesProposedEpochBlocksByIdsWithProofInfo(epoch, ids);
}

async evonodesProposedBlocksByRange(query: EvonodeProposedBlocksRangeQuery): Promise<any> {
async evonodesProposedBlocksByRange(query: EvonodeProposedBlocksRangeQuery): Promise<Map<wasm.Identifier, bigint>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getEvonodesProposedEpochBlocksByRange(query);
}

async evonodesProposedBlocksByRangeWithProof(query: EvonodeProposedBlocksRangeQuery): Promise<any> {
async evonodesProposedBlocksByRangeWithProof(query: EvonodeProposedBlocksRangeQuery): Promise<wasm.ProofMetadataResponseTyped<unknown>> {
const w = await this.sdk.getWasmSdkConnected();
return w.getEvonodesProposedEpochBlocksByRangeWithProofInfo(query);
}
Expand Down
Loading
Loading