@dashevo/wasm-sdk 2.1.0-dev.5
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/README.md +241 -0
- package/dist/raw/wasm_sdk.d.ts +1110 -0
- package/dist/raw/wasm_sdk.js +4585 -0
- package/dist/raw/wasm_sdk.no_url.js +4585 -0
- package/dist/raw/wasm_sdk_bg.wasm +0 -0
- package/dist/raw/wasm_sdk_bg.wasm.d.ts +238 -0
- package/dist/sdk.d.ts +1110 -0
- package/dist/sdk.js +79 -0
- package/package.json +66 -0
package/dist/sdk.d.ts
ADDED
|
@@ -0,0 +1,1110 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export function verifyIdentityResponse(): Promise<IdentityWasm | undefined>;
|
|
4
|
+
export function verifyDataContract(): Promise<DataContractWasm | undefined>;
|
|
5
|
+
export function verifyDocuments(): Promise<DocumentWasm[]>;
|
|
6
|
+
export function start(): Promise<void>;
|
|
7
|
+
/**
|
|
8
|
+
* Structured error surfaced to JS consumers
|
|
9
|
+
*/
|
|
10
|
+
export enum WasmSdkErrorKind {
|
|
11
|
+
Config = 0,
|
|
12
|
+
Drive = 1,
|
|
13
|
+
DriveProofError = 2,
|
|
14
|
+
Protocol = 3,
|
|
15
|
+
Proof = 4,
|
|
16
|
+
InvalidProvedResponse = 5,
|
|
17
|
+
DapiClientError = 6,
|
|
18
|
+
DapiMocksError = 7,
|
|
19
|
+
CoreError = 8,
|
|
20
|
+
MerkleBlockError = 9,
|
|
21
|
+
CoreClientError = 10,
|
|
22
|
+
MissingDependency = 11,
|
|
23
|
+
TotalCreditsNotFound = 12,
|
|
24
|
+
EpochNotFound = 13,
|
|
25
|
+
TimeoutReached = 14,
|
|
26
|
+
AlreadyExists = 15,
|
|
27
|
+
Generic = 16,
|
|
28
|
+
ContextProviderError = 17,
|
|
29
|
+
Cancelled = 18,
|
|
30
|
+
StaleNode = 19,
|
|
31
|
+
StateTransitionBroadcastError = 20,
|
|
32
|
+
InvalidArgument = 21,
|
|
33
|
+
SerializationError = 22,
|
|
34
|
+
NotFound = 23,
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* The `ReadableStreamType` enum.
|
|
38
|
+
*
|
|
39
|
+
* *This API requires the following crate features to be activated: `ReadableStreamType`*
|
|
40
|
+
*/
|
|
41
|
+
type ReadableStreamType = "bytes";
|
|
42
|
+
export class DataContractWasm {
|
|
43
|
+
private constructor();
|
|
44
|
+
free(): void;
|
|
45
|
+
id(): string;
|
|
46
|
+
toJSON(): any;
|
|
47
|
+
}
|
|
48
|
+
export class DocumentWasm {
|
|
49
|
+
private constructor();
|
|
50
|
+
free(): void;
|
|
51
|
+
id(): string;
|
|
52
|
+
}
|
|
53
|
+
export class IdentityWasm {
|
|
54
|
+
free(): void;
|
|
55
|
+
constructor(platform_version: number);
|
|
56
|
+
setPublicKeys(public_keys: Array<any>): number;
|
|
57
|
+
getBalance(): number;
|
|
58
|
+
setBalance(balance: number): void;
|
|
59
|
+
increaseBalance(amount: number): number;
|
|
60
|
+
reduceBalance(amount: number): number;
|
|
61
|
+
setRevision(revision: number): void;
|
|
62
|
+
getRevision(): number;
|
|
63
|
+
toJSON(): any;
|
|
64
|
+
hash(): Uint8Array;
|
|
65
|
+
getPublicKeyMaxId(): number;
|
|
66
|
+
static fromBuffer(buffer: Uint8Array): IdentityWasm;
|
|
67
|
+
readonly balance: number;
|
|
68
|
+
}
|
|
69
|
+
export class IntoUnderlyingByteSource {
|
|
70
|
+
private constructor();
|
|
71
|
+
free(): void;
|
|
72
|
+
start(controller: ReadableByteStreamController): void;
|
|
73
|
+
pull(controller: ReadableByteStreamController): Promise<any>;
|
|
74
|
+
cancel(): void;
|
|
75
|
+
readonly type: ReadableStreamType;
|
|
76
|
+
readonly autoAllocateChunkSize: number;
|
|
77
|
+
}
|
|
78
|
+
export class IntoUnderlyingSink {
|
|
79
|
+
private constructor();
|
|
80
|
+
free(): void;
|
|
81
|
+
write(chunk: any): Promise<any>;
|
|
82
|
+
close(): Promise<any>;
|
|
83
|
+
abort(reason: any): Promise<any>;
|
|
84
|
+
}
|
|
85
|
+
export class IntoUnderlyingSource {
|
|
86
|
+
private constructor();
|
|
87
|
+
free(): void;
|
|
88
|
+
pull(controller: ReadableStreamDefaultController): Promise<any>;
|
|
89
|
+
cancel(): void;
|
|
90
|
+
}
|
|
91
|
+
export class WasmContext {
|
|
92
|
+
private constructor();
|
|
93
|
+
free(): void;
|
|
94
|
+
}
|
|
95
|
+
export class WasmSdk {
|
|
96
|
+
private constructor();
|
|
97
|
+
free(): void;
|
|
98
|
+
getDataContract(base58_id: string): Promise<DataContractWasm>;
|
|
99
|
+
getDataContractWithProofInfo(base58_id: string): Promise<any>;
|
|
100
|
+
getDataContractHistory(id: string, limit?: number | null, _offset?: number | null, start_at_ms?: bigint | null): Promise<any>;
|
|
101
|
+
getDataContracts(ids: string[]): Promise<any>;
|
|
102
|
+
getDataContractHistoryWithProofInfo(id: string, limit?: number | null, _offset?: number | null, start_at_ms?: bigint | null): Promise<any>;
|
|
103
|
+
getDataContractsWithProofInfo(ids: string[]): Promise<any>;
|
|
104
|
+
getIdentity(base58_id: string): Promise<IdentityWasm>;
|
|
105
|
+
getIdentityWithProofInfo(base58_id: string): Promise<any>;
|
|
106
|
+
getIdentityUnproved(base58_id: string): Promise<IdentityWasm>;
|
|
107
|
+
getIdentityKeys(identity_id: string, key_request_type: string, specific_key_ids?: Uint32Array | null, search_purpose_map?: string | null, limit?: number | null, offset?: number | null): Promise<any>;
|
|
108
|
+
getIdentityNonce(identity_id: string): Promise<any>;
|
|
109
|
+
getIdentityNonceWithProofInfo(identity_id: string): Promise<any>;
|
|
110
|
+
getIdentityContractNonce(identity_id: string, contract_id: string): Promise<any>;
|
|
111
|
+
getIdentityContractNonceWithProofInfo(identity_id: string, contract_id: string): Promise<any>;
|
|
112
|
+
getIdentityBalance(id: string): Promise<any>;
|
|
113
|
+
getIdentitiesBalances(identity_ids: string[]): Promise<any>;
|
|
114
|
+
getIdentityBalanceAndRevision(identity_id: string): Promise<any>;
|
|
115
|
+
getIdentityByPublicKeyHash(public_key_hash: string): Promise<IdentityWasm>;
|
|
116
|
+
getIdentitiesContractKeys(identities_ids: string[], contract_id: string, purposes?: Uint32Array | null): Promise<any>;
|
|
117
|
+
getIdentityByNonUniquePublicKeyHash(public_key_hash: string, start_after?: string | null): Promise<any>;
|
|
118
|
+
getIdentityTokenBalances(identity_id: string, token_ids: string[]): Promise<any>;
|
|
119
|
+
getIdentityKeysWithProofInfo(identity_id: string, key_request_type: string, specific_key_ids?: Uint32Array | null, limit?: number | null, offset?: number | null): Promise<any>;
|
|
120
|
+
getIdentityBalanceWithProofInfo(id: string): Promise<any>;
|
|
121
|
+
getIdentitiesBalancesWithProofInfo(identity_ids: string[]): Promise<any>;
|
|
122
|
+
getIdentityBalanceAndRevisionWithProofInfo(identity_id: string): Promise<any>;
|
|
123
|
+
getIdentityByPublicKeyHashWithProofInfo(public_key_hash: string): Promise<any>;
|
|
124
|
+
getIdentityByNonUniquePublicKeyHashWithProofInfo(public_key_hash: string, start_after?: string | null): Promise<any>;
|
|
125
|
+
getIdentitiesContractKeysWithProofInfo(identities_ids: string[], contract_id: string, purposes?: Uint32Array | null): Promise<any>;
|
|
126
|
+
getIdentityTokenBalancesWithProofInfo(identity_id: string, token_ids: string[]): Promise<any>;
|
|
127
|
+
getDpnsUsernameByName(username: string): Promise<any>;
|
|
128
|
+
getDpnsUsernameByNameWithProofInfo(username: string): Promise<any>;
|
|
129
|
+
getEpochsInfo(start_epoch?: number | null, count?: number | null, ascending?: boolean | null): Promise<any>;
|
|
130
|
+
getFinalizedEpochInfos(start_epoch?: number | null, count?: number | null, ascending?: boolean | null): Promise<any>;
|
|
131
|
+
getEvonodesProposedEpochBlocksByIds(epoch: number, ids: string[]): Promise<any>;
|
|
132
|
+
getEvonodesProposedEpochBlocksByRange(epoch: number, limit?: number | null, start_after?: string | null, order_ascending?: boolean | null): Promise<any>;
|
|
133
|
+
getCurrentEpoch(): Promise<any>;
|
|
134
|
+
getEpochsInfoWithProofInfo(start_epoch?: number | null, count?: number | null, ascending?: boolean | null): Promise<any>;
|
|
135
|
+
getCurrentEpochWithProofInfo(): Promise<any>;
|
|
136
|
+
getFinalizedEpochInfosWithProofInfo(start_epoch?: number | null, count?: number | null, ascending?: boolean | null): Promise<any>;
|
|
137
|
+
getEvonodesProposedEpochBlocksByIdsWithProofInfo(epoch: number, pro_tx_hashes: string[]): Promise<any>;
|
|
138
|
+
getEvonodesProposedEpochBlocksByRangeWithProofInfo(epoch: number, limit?: number | null, start_after?: string | null, order_ascending?: boolean | null): Promise<any>;
|
|
139
|
+
/**
|
|
140
|
+
* Calculate token ID from contract ID and token position
|
|
141
|
+
*
|
|
142
|
+
* This function calculates the unique token ID based on a data contract ID
|
|
143
|
+
* and the position of the token within that contract.
|
|
144
|
+
*
|
|
145
|
+
* # Arguments
|
|
146
|
+
* * `contract_id` - The data contract ID in base58 format
|
|
147
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
148
|
+
*
|
|
149
|
+
* # Returns
|
|
150
|
+
* The calculated token ID in base58 format
|
|
151
|
+
*
|
|
152
|
+
* # Example
|
|
153
|
+
* ```javascript
|
|
154
|
+
* const tokenId = await sdk.calculateTokenId("Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv", 0);
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
static calculateTokenIdFromContract(contract_id: string, token_position: number): string;
|
|
158
|
+
/**
|
|
159
|
+
* Get the current price of a token by contract ID and position
|
|
160
|
+
*
|
|
161
|
+
* This is a convenience function that calculates the token ID from the contract ID
|
|
162
|
+
* and position, then fetches the current pricing schedule for that token.
|
|
163
|
+
*
|
|
164
|
+
* # Arguments
|
|
165
|
+
* * `sdk` - The WasmSdk instance
|
|
166
|
+
* * `contract_id` - The data contract ID in base58 format
|
|
167
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
168
|
+
*
|
|
169
|
+
* # Returns
|
|
170
|
+
* An object containing:
|
|
171
|
+
* - `tokenId`: The calculated token ID
|
|
172
|
+
* - `currentPrice`: The current price of the token
|
|
173
|
+
* - `basePrice`: The base price of the token (may be same as current for single price)
|
|
174
|
+
*
|
|
175
|
+
* # Example
|
|
176
|
+
* ```javascript
|
|
177
|
+
* const priceInfo = await sdk.getTokenPriceByContract(
|
|
178
|
+
* sdk,
|
|
179
|
+
* "Hqyu8WcRwXCTwbNxdga4CN5gsVEGc67wng4TFzceyLUv",
|
|
180
|
+
* 0
|
|
181
|
+
* );
|
|
182
|
+
* console.log(`Token ${priceInfo.tokenId} current price: ${priceInfo.currentPrice}`);
|
|
183
|
+
* ```
|
|
184
|
+
*/
|
|
185
|
+
getTokenPriceByContract(contract_id: string, token_position: number): Promise<any>;
|
|
186
|
+
getIdentitiesTokenBalances(identity_ids: string[], token_id: string): Promise<any>;
|
|
187
|
+
getIdentityTokenInfos(identity_id: string, token_ids: string[]): Promise<any>;
|
|
188
|
+
getIdentitiesTokenInfos(identity_ids: string[], token_id: string): Promise<any>;
|
|
189
|
+
getTokenStatuses(token_ids: string[]): Promise<any>;
|
|
190
|
+
getTokenDirectPurchasePrices(token_ids: string[]): Promise<any>;
|
|
191
|
+
getTokenContractInfo(data_contract_id: string): Promise<any>;
|
|
192
|
+
getTokenPerpetualDistributionLastClaim(identity_id: string, token_id: string): Promise<any>;
|
|
193
|
+
getTokenTotalSupply(token_id: string): Promise<any>;
|
|
194
|
+
getIdentitiesTokenBalancesWithProofInfo(identity_ids: string[], token_id: string): Promise<any>;
|
|
195
|
+
getTokenStatusesWithProofInfo(token_ids: string[]): Promise<any>;
|
|
196
|
+
getTokenTotalSupplyWithProofInfo(token_id: string): Promise<any>;
|
|
197
|
+
getIdentityTokenInfosWithProofInfo(identity_id: string, token_ids: string[]): Promise<any>;
|
|
198
|
+
getIdentitiesTokenInfosWithProofInfo(identity_ids: string[], token_id: string): Promise<any>;
|
|
199
|
+
getTokenDirectPurchasePricesWithProofInfo(token_ids: string[]): Promise<any>;
|
|
200
|
+
getTokenContractInfoWithProofInfo(data_contract_id: string): Promise<any>;
|
|
201
|
+
getTokenPerpetualDistributionLastClaimWithProofInfo(identity_id: string, token_id: string): Promise<any>;
|
|
202
|
+
version(): number;
|
|
203
|
+
static prefetchTrustedQuorumsMainnet(): Promise<void>;
|
|
204
|
+
static prefetchTrustedQuorumsTestnet(): Promise<void>;
|
|
205
|
+
/**
|
|
206
|
+
* Configure tracing/logging level or filter (static, global)
|
|
207
|
+
*
|
|
208
|
+
* Accepts simple levels: "off", "error", "warn", "info", "debug", "trace"
|
|
209
|
+
* or a full EnvFilter string like: "wasm_sdk=debug,rs_dapi_client=warn"
|
|
210
|
+
*/
|
|
211
|
+
static setLogLevel(level_or_filter: string): void;
|
|
212
|
+
/**
|
|
213
|
+
* Create a new data contract on Dash Platform.
|
|
214
|
+
*
|
|
215
|
+
* # Arguments
|
|
216
|
+
*
|
|
217
|
+
* * `owner_id` - The identity ID that will own the contract
|
|
218
|
+
* * `contract_definition` - JSON string containing the contract definition
|
|
219
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
220
|
+
* * `key_id` - Optional key ID to use for signing (if None, will auto-select)
|
|
221
|
+
*
|
|
222
|
+
* # Returns
|
|
223
|
+
*
|
|
224
|
+
* Returns a Promise that resolves to a JsValue containing the created contract
|
|
225
|
+
*/
|
|
226
|
+
contractCreate(owner_id: string, contract_definition: string, private_key_wif: string, key_id?: number | null): Promise<any>;
|
|
227
|
+
/**
|
|
228
|
+
* Update an existing data contract on Dash Platform.
|
|
229
|
+
*
|
|
230
|
+
* # Arguments
|
|
231
|
+
*
|
|
232
|
+
* * `contract_id` - The ID of the contract to update
|
|
233
|
+
* * `owner_id` - The identity ID that owns the contract
|
|
234
|
+
* * `contract_updates` - JSON string containing the updated contract definition
|
|
235
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
236
|
+
* * `key_id` - Optional key ID to use for signing (if None, will auto-select)
|
|
237
|
+
*
|
|
238
|
+
* # Returns
|
|
239
|
+
*
|
|
240
|
+
* Returns a Promise that resolves to a JsValue containing the update result
|
|
241
|
+
*/
|
|
242
|
+
contractUpdate(contract_id: string, owner_id: string, contract_updates: string, private_key_wif: string, key_id?: number | null): Promise<any>;
|
|
243
|
+
getDocuments(data_contract_id: string, document_type: string, where_clause?: string | null, order_by?: string | null, limit?: number | null, start_after?: string | null, start_at?: string | null): Promise<any>;
|
|
244
|
+
getDocumentsWithProofInfo(data_contract_id: string, document_type: string, where_clause?: string | null, order_by?: string | null, limit?: number | null, start_after?: string | null, start_at?: string | null): Promise<any>;
|
|
245
|
+
getDocument(data_contract_id: string, document_type: string, document_id: string): Promise<any>;
|
|
246
|
+
getDocumentWithProofInfo(data_contract_id: string, document_type: string, document_id: string): Promise<any>;
|
|
247
|
+
getDpnsUsernames(identity_id: string, limit?: number | null): Promise<any>;
|
|
248
|
+
getDpnsUsername(identity_id: string): Promise<any>;
|
|
249
|
+
getDpnsUsernamesWithProofInfo(identity_id: string, limit?: number | null): Promise<any>;
|
|
250
|
+
getDpnsUsernameWithProofInfo(identity_id: string): Promise<any>;
|
|
251
|
+
getGroupInfo(data_contract_id: string, group_contract_position: number): Promise<any>;
|
|
252
|
+
getGroupMembers(data_contract_id: string, group_contract_position: number, member_ids?: string[] | null, start_at?: string | null, limit?: number | null): Promise<any>;
|
|
253
|
+
getIdentityGroups(identity_id: string, member_data_contracts?: string[] | null, owner_data_contracts?: string[] | null, moderator_data_contracts?: string[] | null): Promise<any>;
|
|
254
|
+
getGroupInfos(contract_id: string, start_at_info: any, count?: number | null): Promise<any>;
|
|
255
|
+
getGroupActions(contract_id: string, group_contract_position: number, status: string, start_at_info: any, count?: number | null): Promise<any>;
|
|
256
|
+
getGroupActionSigners(contract_id: string, group_contract_position: number, status: string, action_id: string): Promise<any>;
|
|
257
|
+
getGroupsDataContracts(data_contract_ids: string[]): Promise<any>;
|
|
258
|
+
getGroupInfoWithProofInfo(data_contract_id: string, group_contract_position: number): Promise<any>;
|
|
259
|
+
getGroupInfosWithProofInfo(contract_id: string, start_at_info: any, count?: number | null): Promise<any>;
|
|
260
|
+
getGroupMembersWithProofInfo(data_contract_id: string, group_contract_position: number, member_ids?: string[] | null, start_at?: string | null, limit?: number | null): Promise<any>;
|
|
261
|
+
getIdentityGroupsWithProofInfo(identity_id: string, member_data_contracts?: string[] | null, owner_data_contracts?: string[] | null, moderator_data_contracts?: string[] | null): Promise<any>;
|
|
262
|
+
getGroupActionsWithProofInfo(contract_id: string, group_contract_position: number, status: string, start_at_info: any, count?: number | null): Promise<any>;
|
|
263
|
+
getGroupActionSignersWithProofInfo(contract_id: string, group_contract_position: number, status: string, action_id: string): Promise<any>;
|
|
264
|
+
getGroupsDataContractsWithProofInfo(data_contract_ids: string[]): Promise<any>;
|
|
265
|
+
getProtocolVersionUpgradeState(): Promise<any>;
|
|
266
|
+
getProtocolVersionUpgradeVoteStatus(start_pro_tx_hash: string, count: number): Promise<any>;
|
|
267
|
+
getProtocolVersionUpgradeStateWithProofInfo(): Promise<any>;
|
|
268
|
+
getProtocolVersionUpgradeVoteStatusWithProofInfo(start_pro_tx_hash: string, count: number): Promise<any>;
|
|
269
|
+
getStatus(): Promise<any>;
|
|
270
|
+
getCurrentQuorumsInfo(): Promise<any>;
|
|
271
|
+
getTotalCreditsInPlatform(): Promise<any>;
|
|
272
|
+
getPrefundedSpecializedBalance(identity_id: string): Promise<any>;
|
|
273
|
+
waitForStateTransitionResult(state_transition_hash: string): Promise<any>;
|
|
274
|
+
getPathElements(path: string[], keys: string[]): Promise<any>;
|
|
275
|
+
getTotalCreditsInPlatformWithProofInfo(): Promise<any>;
|
|
276
|
+
getPrefundedSpecializedBalanceWithProofInfo(identity_id: string): Promise<any>;
|
|
277
|
+
getPathElementsWithProofInfo(path: string[], keys: string[]): Promise<any>;
|
|
278
|
+
/**
|
|
279
|
+
* Generate a new mnemonic phrase
|
|
280
|
+
*/
|
|
281
|
+
static generateMnemonic(word_count?: number | null, language_code?: string | null): string;
|
|
282
|
+
/**
|
|
283
|
+
* Validate a mnemonic phrase
|
|
284
|
+
*/
|
|
285
|
+
static validateMnemonic(mnemonic: string, language_code?: string | null): boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Derive a seed from a mnemonic phrase
|
|
288
|
+
*/
|
|
289
|
+
static mnemonicToSeed(mnemonic: string, passphrase?: string | null): Uint8Array;
|
|
290
|
+
/**
|
|
291
|
+
* Derive a key from mnemonic phrase using BIP39/BIP44
|
|
292
|
+
*/
|
|
293
|
+
static deriveKeyFromSeedPhrase(mnemonic: string, passphrase: string | null | undefined, network: string): any;
|
|
294
|
+
/**
|
|
295
|
+
* Derive a key from seed phrase with arbitrary path
|
|
296
|
+
*/
|
|
297
|
+
static deriveKeyFromSeedWithPath(mnemonic: string, passphrase: string | null | undefined, path: string, network: string): any;
|
|
298
|
+
/**
|
|
299
|
+
* Create a BIP44 mainnet derivation path
|
|
300
|
+
*/
|
|
301
|
+
static derivationPathBip44Mainnet(account: number, change: number, index: number): any;
|
|
302
|
+
/**
|
|
303
|
+
* Create a BIP44 testnet derivation path
|
|
304
|
+
*/
|
|
305
|
+
static derivationPathBip44Testnet(account: number, change: number, index: number): any;
|
|
306
|
+
/**
|
|
307
|
+
* Create a DIP9 mainnet derivation path
|
|
308
|
+
*/
|
|
309
|
+
static derivationPathDip9Mainnet(feature_type: number, account: number, index: number): any;
|
|
310
|
+
/**
|
|
311
|
+
* Create a DIP9 testnet derivation path
|
|
312
|
+
*/
|
|
313
|
+
static derivationPathDip9Testnet(feature_type: number, account: number, index: number): any;
|
|
314
|
+
/**
|
|
315
|
+
* Create a DIP13 mainnet derivation path (for HD masternode keys)
|
|
316
|
+
*/
|
|
317
|
+
static derivationPathDip13Mainnet(account: number): any;
|
|
318
|
+
/**
|
|
319
|
+
* Create a DIP13 testnet derivation path (for HD masternode keys)
|
|
320
|
+
*/
|
|
321
|
+
static derivationPathDip13Testnet(account: number): any;
|
|
322
|
+
/**
|
|
323
|
+
* Get child public key from extended public key
|
|
324
|
+
*/
|
|
325
|
+
static deriveChildPublicKey(xpub: string, index: number, hardened: boolean): string;
|
|
326
|
+
/**
|
|
327
|
+
* Convert extended private key to extended public key
|
|
328
|
+
*/
|
|
329
|
+
static xprvToXpub(xprv: string): string;
|
|
330
|
+
/**
|
|
331
|
+
* Create a new document on the platform.
|
|
332
|
+
*
|
|
333
|
+
* # Arguments
|
|
334
|
+
*
|
|
335
|
+
* * `data_contract_id` - The ID of the data contract
|
|
336
|
+
* * `document_type` - The name of the document type
|
|
337
|
+
* * `owner_id` - The identity ID of the document owner
|
|
338
|
+
* * `document_data` - The document data as a JSON string
|
|
339
|
+
* * `entropy` - 32 bytes of entropy for the state transition (hex string)
|
|
340
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
341
|
+
*
|
|
342
|
+
* # Returns
|
|
343
|
+
*
|
|
344
|
+
* Returns a Promise that resolves to a JsValue containing the created document
|
|
345
|
+
*/
|
|
346
|
+
documentCreate(data_contract_id: string, document_type: string, owner_id: string, document_data: string, entropy: string, private_key_wif: string): Promise<any>;
|
|
347
|
+
/**
|
|
348
|
+
* Replace an existing document on the platform.
|
|
349
|
+
*
|
|
350
|
+
* # Arguments
|
|
351
|
+
*
|
|
352
|
+
* * `data_contract_id` - The ID of the data contract
|
|
353
|
+
* * `document_type` - The name of the document type
|
|
354
|
+
* * `document_id` - The ID of the document to replace
|
|
355
|
+
* * `owner_id` - The identity ID of the document owner
|
|
356
|
+
* * `document_data` - The new document data as a JSON string
|
|
357
|
+
* * `revision` - The current revision of the document
|
|
358
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
359
|
+
*
|
|
360
|
+
* # Returns
|
|
361
|
+
*
|
|
362
|
+
* Returns a Promise that resolves to a JsValue containing the replaced document
|
|
363
|
+
*/
|
|
364
|
+
documentReplace(data_contract_id: string, document_type: string, document_id: string, owner_id: string, document_data: string, revision: bigint, private_key_wif: string): Promise<any>;
|
|
365
|
+
/**
|
|
366
|
+
* Delete a document from the platform.
|
|
367
|
+
*
|
|
368
|
+
* # Arguments
|
|
369
|
+
*
|
|
370
|
+
* * `data_contract_id` - The ID of the data contract
|
|
371
|
+
* * `document_type` - The name of the document type
|
|
372
|
+
* * `document_id` - The ID of the document to delete
|
|
373
|
+
* * `owner_id` - The identity ID of the document owner
|
|
374
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
375
|
+
*
|
|
376
|
+
* # Returns
|
|
377
|
+
*
|
|
378
|
+
* Returns a Promise that resolves to a JsValue confirming deletion
|
|
379
|
+
*/
|
|
380
|
+
documentDelete(data_contract_id: string, document_type: string, document_id: string, owner_id: string, private_key_wif: string): Promise<any>;
|
|
381
|
+
/**
|
|
382
|
+
* Transfer document ownership to another identity.
|
|
383
|
+
*
|
|
384
|
+
* # Arguments
|
|
385
|
+
*
|
|
386
|
+
* * `data_contract_id` - The ID of the data contract
|
|
387
|
+
* * `document_type` - The name of the document type
|
|
388
|
+
* * `document_id` - The ID of the document to transfer
|
|
389
|
+
* * `owner_id` - The current owner's identity ID
|
|
390
|
+
* * `recipient_id` - The new owner's identity ID
|
|
391
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
392
|
+
*
|
|
393
|
+
* # Returns
|
|
394
|
+
*
|
|
395
|
+
* Returns a Promise that resolves to a JsValue containing the transfer result
|
|
396
|
+
*/
|
|
397
|
+
documentTransfer(data_contract_id: string, document_type: string, document_id: string, owner_id: string, recipient_id: string, private_key_wif: string): Promise<any>;
|
|
398
|
+
/**
|
|
399
|
+
* Purchase a document that has a price set.
|
|
400
|
+
*
|
|
401
|
+
* # Arguments
|
|
402
|
+
*
|
|
403
|
+
* * `data_contract_id` - The ID of the data contract
|
|
404
|
+
* * `document_type` - The name of the document type
|
|
405
|
+
* * `document_id` - The ID of the document to purchase
|
|
406
|
+
* * `buyer_id` - The buyer's identity ID
|
|
407
|
+
* * `price` - The purchase price in credits
|
|
408
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
409
|
+
*
|
|
410
|
+
* # Returns
|
|
411
|
+
*
|
|
412
|
+
* Returns a Promise that resolves to a JsValue containing the purchase result
|
|
413
|
+
*/
|
|
414
|
+
documentPurchase(data_contract_id: string, document_type: string, document_id: string, buyer_id: string, price: bigint, private_key_wif: string): Promise<any>;
|
|
415
|
+
/**
|
|
416
|
+
* Set a price for a document to enable purchases.
|
|
417
|
+
*
|
|
418
|
+
* # Arguments
|
|
419
|
+
*
|
|
420
|
+
* * `data_contract_id` - The ID of the data contract
|
|
421
|
+
* * `document_type` - The name of the document type
|
|
422
|
+
* * `document_id` - The ID of the document
|
|
423
|
+
* * `owner_id` - The owner's identity ID
|
|
424
|
+
* * `price` - The price in credits (0 to remove price)
|
|
425
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
426
|
+
*
|
|
427
|
+
* # Returns
|
|
428
|
+
*
|
|
429
|
+
* Returns a Promise that resolves to a JsValue containing the result
|
|
430
|
+
*/
|
|
431
|
+
documentSetPrice(data_contract_id: string, document_type: string, document_id: string, owner_id: string, price: bigint, private_key_wif: string): Promise<any>;
|
|
432
|
+
/**
|
|
433
|
+
* Create a new identity on Dash Platform.
|
|
434
|
+
*
|
|
435
|
+
* # Arguments
|
|
436
|
+
*
|
|
437
|
+
* * `asset_lock_proof` - The asset lock proof (transaction hex)
|
|
438
|
+
* * `asset_lock_proof_private_key` - The private key that controls the asset lock
|
|
439
|
+
* * `public_keys` - JSON array of public keys to add to the identity. Each key object requirements:
|
|
440
|
+
* - ECDSA_SECP256K1: Requires `privateKeyHex` or `privateKeyWif` for signing
|
|
441
|
+
* - BLS12_381: Requires `privateKeyHex` for signing (WIF format not supported)
|
|
442
|
+
* - ECDSA_HASH160: Accepts either `privateKeyHex` (to derive hash) or `data` field (base64-encoded 20-byte hash)
|
|
443
|
+
*
|
|
444
|
+
* # Implementation Notes
|
|
445
|
+
*
|
|
446
|
+
* This function uses SimpleSigner to provide individual signatures for each public key as required.
|
|
447
|
+
* Each ECDSA_SECP256K1 key will be signed with its corresponding private key (from privateKeyHex or privateKeyWif),
|
|
448
|
+
* and each BLS12_381 key will be signed with its corresponding private key (from privateKeyHex only),
|
|
449
|
+
* ensuring unique signatures per key as required by DPP validation.
|
|
450
|
+
*
|
|
451
|
+
* # Returns
|
|
452
|
+
*
|
|
453
|
+
* Returns a Promise that resolves to a JsValue containing the new identity
|
|
454
|
+
*/
|
|
455
|
+
identityCreate(asset_lock_proof: string, asset_lock_proof_private_key: string, public_keys: string): Promise<any>;
|
|
456
|
+
/**
|
|
457
|
+
* Top up an existing identity with additional credits.
|
|
458
|
+
*
|
|
459
|
+
* # Arguments
|
|
460
|
+
*
|
|
461
|
+
* * `identity_id` - The identity ID to top up
|
|
462
|
+
* * `asset_lock_proof` - The asset lock proof (transaction hex)
|
|
463
|
+
* * `asset_lock_proof_private_key` - The private key that controls the asset lock
|
|
464
|
+
*
|
|
465
|
+
* # Returns
|
|
466
|
+
*
|
|
467
|
+
* Returns a Promise that resolves to a JsValue containing the new balance
|
|
468
|
+
*/
|
|
469
|
+
identityTopUp(identity_id: string, asset_lock_proof: string, asset_lock_proof_private_key: string): Promise<any>;
|
|
470
|
+
/**
|
|
471
|
+
* Transfer credits from one identity to another.
|
|
472
|
+
*
|
|
473
|
+
* # Arguments
|
|
474
|
+
*
|
|
475
|
+
* * `sender_id` - The identity ID of the sender
|
|
476
|
+
* * `recipient_id` - The identity ID of the recipient
|
|
477
|
+
* * `amount` - The amount of credits to transfer
|
|
478
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
479
|
+
* * `key_id` - Optional key ID to use for signing (if None, will auto-select)
|
|
480
|
+
*
|
|
481
|
+
* # Returns
|
|
482
|
+
*
|
|
483
|
+
* Returns a Promise that resolves to a JsValue containing the transfer result
|
|
484
|
+
*/
|
|
485
|
+
identityCreditTransfer(sender_id: string, recipient_id: string, amount: bigint, private_key_wif: string, key_id?: number | null): Promise<any>;
|
|
486
|
+
/**
|
|
487
|
+
* Withdraw credits from an identity to a Dash address.
|
|
488
|
+
*
|
|
489
|
+
* # Arguments
|
|
490
|
+
*
|
|
491
|
+
* * `identity_id` - The identity ID to withdraw from
|
|
492
|
+
* * `to_address` - The Dash address to send the withdrawn credits to
|
|
493
|
+
* * `amount` - The amount of credits to withdraw
|
|
494
|
+
* * `core_fee_per_byte` - Optional core fee per byte (defaults to 1)
|
|
495
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
496
|
+
* * `key_id` - Optional key ID to use for signing (if None, will auto-select)
|
|
497
|
+
*
|
|
498
|
+
* # Returns
|
|
499
|
+
*
|
|
500
|
+
* Returns a Promise that resolves to a JsValue containing the withdrawal result
|
|
501
|
+
*/
|
|
502
|
+
identityCreditWithdrawal(identity_id: string, to_address: string, amount: bigint, core_fee_per_byte: number | null | undefined, private_key_wif: string, key_id?: number | null): Promise<any>;
|
|
503
|
+
/**
|
|
504
|
+
* Update an identity by adding or disabling public keys.
|
|
505
|
+
*
|
|
506
|
+
* # Arguments
|
|
507
|
+
*
|
|
508
|
+
* * `identity_id` - The identity ID to update
|
|
509
|
+
* * `add_public_keys` - JSON array of public keys to add
|
|
510
|
+
* * `disable_public_keys` - Array of key IDs to disable
|
|
511
|
+
* * `private_key_wif` - The private key in WIF format for signing (must be a master key)
|
|
512
|
+
*
|
|
513
|
+
* # Returns
|
|
514
|
+
*
|
|
515
|
+
* Returns a Promise that resolves to a JsValue containing the update result
|
|
516
|
+
*/
|
|
517
|
+
identityUpdate(identity_id: string, add_public_keys: string | null | undefined, disable_public_keys: Uint32Array | null | undefined, private_key_wif: string): Promise<any>;
|
|
518
|
+
/**
|
|
519
|
+
* Submit a masternode vote for a contested resource.
|
|
520
|
+
*
|
|
521
|
+
* # Arguments
|
|
522
|
+
*
|
|
523
|
+
* * `pro_tx_hash` - The ProTxHash of the masternode
|
|
524
|
+
* * `contract_id` - The data contract ID containing the contested resource
|
|
525
|
+
* * `document_type_name` - The document type name (e.g., "domain")
|
|
526
|
+
* * `index_name` - The index name (e.g., "parentNameAndLabel")
|
|
527
|
+
* * `index_values` - JSON array of index values (e.g., ["dash", "username"])
|
|
528
|
+
* * `vote_choice` - The vote choice: "towardsIdentity:<identity_id>", "abstain", or "lock"
|
|
529
|
+
* * `private_key_wif` - The masternode voting key in WIF format
|
|
530
|
+
*
|
|
531
|
+
* # Returns
|
|
532
|
+
*
|
|
533
|
+
* Returns a Promise that resolves to a JsValue containing the vote result
|
|
534
|
+
*/
|
|
535
|
+
masternodeVote(masternode_pro_tx_hash: string, contract_id: string, document_type_name: string, index_name: string, index_values: string, vote_choice: string, voting_key_wif: string): Promise<any>;
|
|
536
|
+
/**
|
|
537
|
+
* Mint new tokens according to the token's configuration.
|
|
538
|
+
*
|
|
539
|
+
* # Arguments
|
|
540
|
+
*
|
|
541
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
542
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
543
|
+
* * `amount` - The amount of tokens to mint
|
|
544
|
+
* * `identity_id` - The identity ID of the minter
|
|
545
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
546
|
+
* * `recipient_id` - Optional recipient identity ID (if None, mints to issuer)
|
|
547
|
+
* * `public_note` - Optional public note for the mint operation
|
|
548
|
+
*
|
|
549
|
+
* # Returns
|
|
550
|
+
*
|
|
551
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
552
|
+
*/
|
|
553
|
+
tokenMint(data_contract_id: string, token_position: number, amount: string, identity_id: string, private_key_wif: string, recipient_id?: string | null, public_note?: string | null): Promise<any>;
|
|
554
|
+
/**
|
|
555
|
+
* Burn tokens, permanently removing them from circulation.
|
|
556
|
+
*
|
|
557
|
+
* # Arguments
|
|
558
|
+
*
|
|
559
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
560
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
561
|
+
* * `amount` - The amount of tokens to burn
|
|
562
|
+
* * `identity_id` - The identity ID of the burner
|
|
563
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
564
|
+
* * `public_note` - Optional public note for the burn operation
|
|
565
|
+
*
|
|
566
|
+
* # Returns
|
|
567
|
+
*
|
|
568
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
569
|
+
*/
|
|
570
|
+
tokenBurn(data_contract_id: string, token_position: number, amount: string, identity_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
571
|
+
/**
|
|
572
|
+
* Transfer tokens between identities.
|
|
573
|
+
*
|
|
574
|
+
* # Arguments
|
|
575
|
+
*
|
|
576
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
577
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
578
|
+
* * `amount` - The amount of tokens to transfer
|
|
579
|
+
* * `sender_id` - The identity ID of the sender
|
|
580
|
+
* * `recipient_id` - The identity ID of the recipient
|
|
581
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
582
|
+
* * `public_note` - Optional public note for the transfer
|
|
583
|
+
*
|
|
584
|
+
* # Returns
|
|
585
|
+
*
|
|
586
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
587
|
+
*/
|
|
588
|
+
tokenTransfer(data_contract_id: string, token_position: number, amount: string, sender_id: string, recipient_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
589
|
+
/**
|
|
590
|
+
* Freeze tokens for a specific identity.
|
|
591
|
+
*
|
|
592
|
+
* # Arguments
|
|
593
|
+
*
|
|
594
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
595
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
596
|
+
* * `identity_to_freeze` - The identity ID whose tokens to freeze
|
|
597
|
+
* * `freezer_id` - The identity ID of the freezer (must have permission)
|
|
598
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
599
|
+
* * `public_note` - Optional public note for the freeze operation
|
|
600
|
+
*
|
|
601
|
+
* # Returns
|
|
602
|
+
*
|
|
603
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
604
|
+
*/
|
|
605
|
+
tokenFreeze(data_contract_id: string, token_position: number, identity_to_freeze: string, freezer_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
606
|
+
/**
|
|
607
|
+
* Unfreeze tokens for a specific identity.
|
|
608
|
+
*
|
|
609
|
+
* # Arguments
|
|
610
|
+
*
|
|
611
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
612
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
613
|
+
* * `identity_to_unfreeze` - The identity ID whose tokens to unfreeze
|
|
614
|
+
* * `unfreezer_id` - The identity ID of the unfreezer (must have permission)
|
|
615
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
616
|
+
* * `public_note` - Optional public note for the unfreeze operation
|
|
617
|
+
*
|
|
618
|
+
* # Returns
|
|
619
|
+
*
|
|
620
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
621
|
+
*/
|
|
622
|
+
tokenUnfreeze(data_contract_id: string, token_position: number, identity_to_unfreeze: string, unfreezer_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
623
|
+
/**
|
|
624
|
+
* Destroy frozen tokens.
|
|
625
|
+
*
|
|
626
|
+
* # Arguments
|
|
627
|
+
*
|
|
628
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
629
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
630
|
+
* * `identity_id` - The identity ID whose frozen tokens to destroy
|
|
631
|
+
* * `destroyer_id` - The identity ID of the destroyer (must have permission)
|
|
632
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
633
|
+
* * `public_note` - Optional public note for the destroy operation
|
|
634
|
+
*
|
|
635
|
+
* # Returns
|
|
636
|
+
*
|
|
637
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
638
|
+
*/
|
|
639
|
+
tokenDestroyFrozen(data_contract_id: string, token_position: number, identity_id: string, destroyer_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
640
|
+
/**
|
|
641
|
+
* Set or update the price for direct token purchases.
|
|
642
|
+
*
|
|
643
|
+
* # Arguments
|
|
644
|
+
*
|
|
645
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
646
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
647
|
+
* * `identity_id` - The identity ID of the actor setting the price
|
|
648
|
+
* * `price_type` - The pricing type: "single" or "tiered"
|
|
649
|
+
* * `price_data` - JSON string with pricing data (single price or tiered pricing map)
|
|
650
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
651
|
+
* * `key_id` - The key ID to use for signing
|
|
652
|
+
* * `public_note` - Optional public note for the price change
|
|
653
|
+
*
|
|
654
|
+
* # Returns
|
|
655
|
+
*
|
|
656
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
657
|
+
*/
|
|
658
|
+
tokenSetPriceForDirectPurchase(data_contract_id: string, token_position: number, identity_id: string, price_type: string, price_data: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
659
|
+
/**
|
|
660
|
+
* Purchase tokens directly at the configured price.
|
|
661
|
+
*
|
|
662
|
+
* # Arguments
|
|
663
|
+
*
|
|
664
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
665
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
666
|
+
* * `amount` - The amount of tokens to purchase
|
|
667
|
+
* * `identity_id` - The identity ID of the purchaser
|
|
668
|
+
* * `total_agreed_price` - The total price in credits for the purchase
|
|
669
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
670
|
+
*
|
|
671
|
+
* # Returns
|
|
672
|
+
*
|
|
673
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
674
|
+
*/
|
|
675
|
+
tokenDirectPurchase(data_contract_id: string, token_position: number, amount: string, identity_id: string, total_agreed_price: string | null | undefined, private_key_wif: string): Promise<any>;
|
|
676
|
+
/**
|
|
677
|
+
* Claim tokens from a distribution
|
|
678
|
+
*
|
|
679
|
+
* # Arguments
|
|
680
|
+
*
|
|
681
|
+
* * `data_contract_id` - ID of the data contract containing the token
|
|
682
|
+
* * `token_position` - Position of the token within the contract
|
|
683
|
+
* * `distribution_type` - Type of distribution: "perpetual" or "preprogrammed"
|
|
684
|
+
* * `identity_id` - Identity ID of the claimant
|
|
685
|
+
* * `private_key_wif` - Private key in WIF format
|
|
686
|
+
* * `public_note` - Optional public note
|
|
687
|
+
*
|
|
688
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
689
|
+
*/
|
|
690
|
+
tokenClaim(data_contract_id: string, token_position: number, distribution_type: string, identity_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
691
|
+
/**
|
|
692
|
+
* Update token configuration settings.
|
|
693
|
+
*
|
|
694
|
+
* # Arguments
|
|
695
|
+
*
|
|
696
|
+
* * `data_contract_id` - The ID of the data contract containing the token
|
|
697
|
+
* * `token_position` - The position of the token in the contract (0-indexed)
|
|
698
|
+
* * `config_item_type` - The type of configuration to update
|
|
699
|
+
* * `config_value` - The new configuration value (JSON string)
|
|
700
|
+
* * `identity_id` - The identity ID of the owner/admin
|
|
701
|
+
* * `private_key_wif` - The private key in WIF format for signing
|
|
702
|
+
* * `public_note` - Optional public note for the configuration change
|
|
703
|
+
*
|
|
704
|
+
* # Returns
|
|
705
|
+
*
|
|
706
|
+
* Returns a Promise that resolves to a JsValue containing the state transition result
|
|
707
|
+
*/
|
|
708
|
+
tokenConfigUpdate(data_contract_id: string, token_position: number, config_item_type: string, config_value: string, identity_id: string, private_key_wif: string, public_note?: string | null): Promise<any>;
|
|
709
|
+
/**
|
|
710
|
+
* Derive a key from seed phrase with extended path supporting 256-bit indices
|
|
711
|
+
* This supports DIP14/DIP15 paths with identity IDs
|
|
712
|
+
*/
|
|
713
|
+
static deriveKeyFromSeedWithExtendedPath(mnemonic: string, passphrase: string | null | undefined, path: string, network: string): any;
|
|
714
|
+
/**
|
|
715
|
+
* Derive a DashPay contact key using DIP15 with full identity IDs
|
|
716
|
+
*/
|
|
717
|
+
static deriveDashpayContactKey(mnemonic: string, passphrase: string | null | undefined, sender_identity_id: string, receiver_identity_id: string, account: number, address_index: number, network: string): any;
|
|
718
|
+
/**
|
|
719
|
+
* Convert a string to homograph-safe characters
|
|
720
|
+
*/
|
|
721
|
+
static dpnsConvertToHomographSafe(input: string): string;
|
|
722
|
+
/**
|
|
723
|
+
* Check if a username is valid according to DPNS rules
|
|
724
|
+
*/
|
|
725
|
+
static dpnsIsValidUsername(label: string): boolean;
|
|
726
|
+
/**
|
|
727
|
+
* Check if a username is contested (requires masternode voting)
|
|
728
|
+
*/
|
|
729
|
+
static dpnsIsContestedUsername(label: string): boolean;
|
|
730
|
+
/**
|
|
731
|
+
* Register a DPNS username
|
|
732
|
+
*/
|
|
733
|
+
dpnsRegisterName(label: string, identity_id: string, public_key_id: number, private_key_wif: string, preorder_callback?: Function | null): Promise<any>;
|
|
734
|
+
/**
|
|
735
|
+
* Check if a DPNS name is available
|
|
736
|
+
*/
|
|
737
|
+
dpnsIsNameAvailable(label: string): Promise<boolean>;
|
|
738
|
+
/**
|
|
739
|
+
* Resolve a DPNS name to an identity ID
|
|
740
|
+
*/
|
|
741
|
+
dpnsResolveName(name: string): Promise<any>;
|
|
742
|
+
getContestedResources(document_type_name: string, data_contract_id: string, index_name: string, start_at_value?: Uint8Array | null, limit?: number | null, _offset?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
743
|
+
getContestedResourceVotersForIdentity(contract_id: string, document_type_name: string, index_name: string, index_values: any[], contestant_id: string, start_at_voter_info?: string | null, limit?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
744
|
+
getContestedResourceIdentityVotes(identity_id: string, limit?: number | null, start_at_vote_poll_id_info?: string | null, order_ascending?: boolean | null): Promise<any>;
|
|
745
|
+
getVotePollsByEndDate(start_time_info?: string | null, end_time_info?: string | null, limit?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
746
|
+
getContestedResourcesWithProofInfo(document_type_name: string, data_contract_id: string, index_name: string, start_at_value?: Uint8Array | null, limit?: number | null, _offset?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
747
|
+
getContestedResourceVoteStateWithProofInfo(data_contract_id: string, document_type_name: string, index_name: string, index_values: any[], _result_type: string, allow_include_locked_and_abstaining_vote_tally?: boolean | null, start_at_identifier_info?: string | null, count?: number | null, _order_ascending?: boolean | null): Promise<any>;
|
|
748
|
+
getContestedResourceVotersForIdentityWithProofInfo(data_contract_id: string, document_type_name: string, index_name: string, index_values: any[], contestant_id: string, start_at_identifier_info?: string | null, count?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
749
|
+
getContestedResourceIdentityVotesWithProofInfo(identity_id: string, limit?: number | null, offset?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
750
|
+
getVotePollsByEndDateWithProofInfo(start_time_ms?: bigint | null, end_time_ms?: bigint | null, limit?: number | null, offset?: number | null, order_ascending?: boolean | null): Promise<any>;
|
|
751
|
+
getContestedResourceVoteState(data_contract_id: string, document_type_name: string, index_name: string, index_values: any[], _result_type: string, allow_include_locked_and_abstaining_vote_tally?: boolean | null, start_at_identifier_info?: string | null, count?: number | null, _order_ascending?: boolean | null): Promise<any>;
|
|
752
|
+
/**
|
|
753
|
+
* Generate a new random key pair
|
|
754
|
+
*/
|
|
755
|
+
static generateKeyPair(network: string): any;
|
|
756
|
+
/**
|
|
757
|
+
* Generate multiple key pairs
|
|
758
|
+
*/
|
|
759
|
+
static generateKeyPairs(network: string, count: number): any[];
|
|
760
|
+
/**
|
|
761
|
+
* Create key pair from private key WIF
|
|
762
|
+
*/
|
|
763
|
+
static keyPairFromWif(private_key_wif: string): any;
|
|
764
|
+
/**
|
|
765
|
+
* Create key pair from private key hex
|
|
766
|
+
*/
|
|
767
|
+
static keyPairFromHex(private_key_hex: string, network: string): any;
|
|
768
|
+
/**
|
|
769
|
+
* Get address from public key
|
|
770
|
+
*/
|
|
771
|
+
static pubkeyToAddress(pubkey_hex: string, network: string): string;
|
|
772
|
+
/**
|
|
773
|
+
* Validate a Dash address
|
|
774
|
+
*/
|
|
775
|
+
static validateAddress(address: string, network: string): boolean;
|
|
776
|
+
/**
|
|
777
|
+
* Sign a message with a private key
|
|
778
|
+
*/
|
|
779
|
+
static signMessage(message: string, private_key_wif: string): string;
|
|
780
|
+
}
|
|
781
|
+
export class WasmSdkBuilder {
|
|
782
|
+
private constructor();
|
|
783
|
+
free(): void;
|
|
784
|
+
/**
|
|
785
|
+
* Get the latest platform version number
|
|
786
|
+
*/
|
|
787
|
+
static getLatestVersionNumber(): number;
|
|
788
|
+
static mainnet(): WasmSdkBuilder;
|
|
789
|
+
static mainnetTrusted(): WasmSdkBuilder;
|
|
790
|
+
static testnet(): WasmSdkBuilder;
|
|
791
|
+
static testnetTrusted(): WasmSdkBuilder;
|
|
792
|
+
build(): WasmSdk;
|
|
793
|
+
withContextProvider(context_provider: WasmContext): WasmSdkBuilder;
|
|
794
|
+
/**
|
|
795
|
+
* Configure platform version to use.
|
|
796
|
+
*
|
|
797
|
+
* Available versions:
|
|
798
|
+
* - 1: Platform version 1
|
|
799
|
+
* - 2: Platform version 2
|
|
800
|
+
* - ... up to latest version
|
|
801
|
+
*
|
|
802
|
+
* Defaults to latest version if not specified.
|
|
803
|
+
*/
|
|
804
|
+
withVersion(version_number: number): WasmSdkBuilder;
|
|
805
|
+
/**
|
|
806
|
+
* Configure request settings for the SDK.
|
|
807
|
+
*
|
|
808
|
+
* Settings include:
|
|
809
|
+
* - connect_timeout_ms: Timeout for establishing connection (in milliseconds)
|
|
810
|
+
* - timeout_ms: Timeout for single request (in milliseconds)
|
|
811
|
+
* - retries: Number of retries in case of failed requests
|
|
812
|
+
* - ban_failed_address: Whether to ban DAPI address if node not responded or responded with error
|
|
813
|
+
*/
|
|
814
|
+
withSettings(connect_timeout_ms?: number | null, timeout_ms?: number | null, retries?: number | null, ban_failed_address?: boolean | null): WasmSdkBuilder;
|
|
815
|
+
withProofs(enable_proofs: boolean): WasmSdkBuilder;
|
|
816
|
+
/**
|
|
817
|
+
* Configure tracing/logging via the builder
|
|
818
|
+
* Returns a new builder with logging configured
|
|
819
|
+
*/
|
|
820
|
+
withLogs(level_or_filter: string): WasmSdkBuilder;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* Structured error surfaced to JS consumers
|
|
824
|
+
*/
|
|
825
|
+
export class WasmSdkError {
|
|
826
|
+
private constructor();
|
|
827
|
+
free(): void;
|
|
828
|
+
/**
|
|
829
|
+
* Error kind (enum)
|
|
830
|
+
*/
|
|
831
|
+
readonly kind: WasmSdkErrorKind;
|
|
832
|
+
/**
|
|
833
|
+
* Backwards-compatible name string for the kind
|
|
834
|
+
*/
|
|
835
|
+
readonly name: string;
|
|
836
|
+
/**
|
|
837
|
+
* Human-readable message
|
|
838
|
+
*/
|
|
839
|
+
readonly message: string;
|
|
840
|
+
/**
|
|
841
|
+
* Optional numeric code. -1 means absent/not applicable
|
|
842
|
+
*/
|
|
843
|
+
readonly code: number;
|
|
844
|
+
/**
|
|
845
|
+
* Whether the error is retryable
|
|
846
|
+
*/
|
|
847
|
+
readonly retriable: boolean;
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
851
|
+
|
|
852
|
+
export interface InitOutput {
|
|
853
|
+
readonly memory: WebAssembly.Memory;
|
|
854
|
+
readonly verifyIdentityResponse: () => any;
|
|
855
|
+
readonly verifyDataContract: () => any;
|
|
856
|
+
readonly verifyDocuments: () => any;
|
|
857
|
+
readonly __wbg_documentwasm_free: (a: number, b: number) => void;
|
|
858
|
+
readonly documentwasm_id: (a: number) => [number, number];
|
|
859
|
+
readonly wasmsdk_getDataContract: (a: number, b: number, c: number) => any;
|
|
860
|
+
readonly wasmsdk_getDataContractWithProofInfo: (a: number, b: number, c: number) => any;
|
|
861
|
+
readonly wasmsdk_getDataContractHistory: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint) => any;
|
|
862
|
+
readonly wasmsdk_getDataContracts: (a: number, b: number, c: number) => any;
|
|
863
|
+
readonly wasmsdk_getDataContractHistoryWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint) => any;
|
|
864
|
+
readonly wasmsdk_getDataContractsWithProofInfo: (a: number, b: number, c: number) => any;
|
|
865
|
+
readonly wasmsdk_getIdentity: (a: number, b: number, c: number) => any;
|
|
866
|
+
readonly wasmsdk_getIdentityWithProofInfo: (a: number, b: number, c: number) => any;
|
|
867
|
+
readonly wasmsdk_getIdentityUnproved: (a: number, b: number, c: number) => any;
|
|
868
|
+
readonly wasmsdk_getIdentityKeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
869
|
+
readonly wasmsdk_getIdentityNonce: (a: number, b: number, c: number) => any;
|
|
870
|
+
readonly wasmsdk_getIdentityNonceWithProofInfo: (a: number, b: number, c: number) => any;
|
|
871
|
+
readonly wasmsdk_getIdentityContractNonce: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
872
|
+
readonly wasmsdk_getIdentityContractNonceWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
873
|
+
readonly wasmsdk_getIdentityBalance: (a: number, b: number, c: number) => any;
|
|
874
|
+
readonly wasmsdk_getIdentitiesBalances: (a: number, b: number, c: number) => any;
|
|
875
|
+
readonly wasmsdk_getIdentityBalanceAndRevision: (a: number, b: number, c: number) => any;
|
|
876
|
+
readonly wasmsdk_getIdentityByPublicKeyHash: (a: number, b: number, c: number) => any;
|
|
877
|
+
readonly wasmsdk_getIdentitiesContractKeys: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
878
|
+
readonly wasmsdk_getIdentityByNonUniquePublicKeyHash: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
879
|
+
readonly wasmsdk_getIdentityTokenBalances: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
880
|
+
readonly wasmsdk_getIdentityKeysWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
881
|
+
readonly wasmsdk_getIdentityBalanceWithProofInfo: (a: number, b: number, c: number) => any;
|
|
882
|
+
readonly wasmsdk_getIdentitiesBalancesWithProofInfo: (a: number, b: number, c: number) => any;
|
|
883
|
+
readonly wasmsdk_getIdentityBalanceAndRevisionWithProofInfo: (a: number, b: number, c: number) => any;
|
|
884
|
+
readonly wasmsdk_getIdentityByPublicKeyHashWithProofInfo: (a: number, b: number, c: number) => any;
|
|
885
|
+
readonly wasmsdk_getIdentityByNonUniquePublicKeyHashWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
886
|
+
readonly wasmsdk_getIdentitiesContractKeysWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
887
|
+
readonly wasmsdk_getIdentityTokenBalancesWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
888
|
+
readonly start: () => void;
|
|
889
|
+
readonly __wbg_wasmsdkerror_free: (a: number, b: number) => void;
|
|
890
|
+
readonly wasmsdkerror_kind: (a: number) => number;
|
|
891
|
+
readonly wasmsdkerror_name: (a: number) => [number, number];
|
|
892
|
+
readonly wasmsdkerror_message: (a: number) => [number, number];
|
|
893
|
+
readonly wasmsdkerror_code: (a: number) => number;
|
|
894
|
+
readonly wasmsdkerror_retriable: (a: number) => number;
|
|
895
|
+
readonly wasmsdk_getDpnsUsernameByName: (a: number, b: number, c: number) => any;
|
|
896
|
+
readonly wasmsdk_getDpnsUsernameByNameWithProofInfo: (a: number, b: number, c: number) => any;
|
|
897
|
+
readonly wasmsdk_getEpochsInfo: (a: number, b: number, c: number, d: number) => any;
|
|
898
|
+
readonly wasmsdk_getFinalizedEpochInfos: (a: number, b: number, c: number, d: number) => any;
|
|
899
|
+
readonly wasmsdk_getEvonodesProposedEpochBlocksByIds: (a: number, b: number, c: number, d: number) => any;
|
|
900
|
+
readonly wasmsdk_getEvonodesProposedEpochBlocksByRange: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
901
|
+
readonly wasmsdk_getCurrentEpoch: (a: number) => any;
|
|
902
|
+
readonly wasmsdk_getEpochsInfoWithProofInfo: (a: number, b: number, c: number, d: number) => any;
|
|
903
|
+
readonly wasmsdk_getCurrentEpochWithProofInfo: (a: number) => any;
|
|
904
|
+
readonly wasmsdk_getFinalizedEpochInfosWithProofInfo: (a: number, b: number, c: number, d: number) => any;
|
|
905
|
+
readonly wasmsdk_getEvonodesProposedEpochBlocksByIdsWithProofInfo: (a: number, b: number, c: number, d: number) => any;
|
|
906
|
+
readonly wasmsdk_getEvonodesProposedEpochBlocksByRangeWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
907
|
+
readonly wasmsdk_calculateTokenIdFromContract: (a: number, b: number, c: number) => [number, number, number, number];
|
|
908
|
+
readonly wasmsdk_getTokenPriceByContract: (a: number, b: number, c: number, d: number) => any;
|
|
909
|
+
readonly wasmsdk_getIdentitiesTokenBalances: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
910
|
+
readonly wasmsdk_getIdentityTokenInfos: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
911
|
+
readonly wasmsdk_getIdentitiesTokenInfos: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
912
|
+
readonly wasmsdk_getTokenStatuses: (a: number, b: number, c: number) => any;
|
|
913
|
+
readonly wasmsdk_getTokenDirectPurchasePrices: (a: number, b: number, c: number) => any;
|
|
914
|
+
readonly wasmsdk_getTokenContractInfo: (a: number, b: number, c: number) => any;
|
|
915
|
+
readonly wasmsdk_getTokenPerpetualDistributionLastClaim: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
916
|
+
readonly wasmsdk_getTokenTotalSupply: (a: number, b: number, c: number) => any;
|
|
917
|
+
readonly wasmsdk_getIdentitiesTokenBalancesWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
918
|
+
readonly wasmsdk_getTokenStatusesWithProofInfo: (a: number, b: number, c: number) => any;
|
|
919
|
+
readonly wasmsdk_getTokenTotalSupplyWithProofInfo: (a: number, b: number, c: number) => any;
|
|
920
|
+
readonly wasmsdk_getIdentityTokenInfosWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
921
|
+
readonly wasmsdk_getIdentitiesTokenInfosWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
922
|
+
readonly wasmsdk_getTokenDirectPurchasePricesWithProofInfo: (a: number, b: number, c: number) => any;
|
|
923
|
+
readonly wasmsdk_getTokenContractInfoWithProofInfo: (a: number, b: number, c: number) => any;
|
|
924
|
+
readonly wasmsdk_getTokenPerpetualDistributionLastClaimWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
925
|
+
readonly __wbg_identitywasm_free: (a: number, b: number) => void;
|
|
926
|
+
readonly identitywasm_new: (a: number) => [number, number, number];
|
|
927
|
+
readonly identitywasm_setPublicKeys: (a: number, b: any) => [number, number, number];
|
|
928
|
+
readonly identitywasm_balance: (a: number) => number;
|
|
929
|
+
readonly identitywasm_setBalance: (a: number, b: number) => void;
|
|
930
|
+
readonly identitywasm_increaseBalance: (a: number, b: number) => number;
|
|
931
|
+
readonly identitywasm_reduceBalance: (a: number, b: number) => number;
|
|
932
|
+
readonly identitywasm_setRevision: (a: number, b: number) => void;
|
|
933
|
+
readonly identitywasm_getRevision: (a: number) => number;
|
|
934
|
+
readonly identitywasm_toJSON: (a: number) => [number, number, number];
|
|
935
|
+
readonly identitywasm_hash: (a: number) => [number, number, number, number];
|
|
936
|
+
readonly identitywasm_getPublicKeyMaxId: (a: number) => number;
|
|
937
|
+
readonly identitywasm_fromBuffer: (a: number, b: number) => [number, number, number];
|
|
938
|
+
readonly __wbg_datacontractwasm_free: (a: number, b: number) => void;
|
|
939
|
+
readonly datacontractwasm_id: (a: number) => [number, number];
|
|
940
|
+
readonly datacontractwasm_toJSON: (a: number) => [number, number, number];
|
|
941
|
+
readonly identitywasm_getBalance: (a: number) => number;
|
|
942
|
+
readonly __wbg_wasmcontext_free: (a: number, b: number) => void;
|
|
943
|
+
readonly __wbg_wasmsdk_free: (a: number, b: number) => void;
|
|
944
|
+
readonly wasmsdk_version: (a: number) => number;
|
|
945
|
+
readonly wasmsdk_prefetchTrustedQuorumsMainnet: () => any;
|
|
946
|
+
readonly wasmsdk_prefetchTrustedQuorumsTestnet: () => any;
|
|
947
|
+
readonly __wbg_wasmsdkbuilder_free: (a: number, b: number) => void;
|
|
948
|
+
readonly wasmsdkbuilder_getLatestVersionNumber: () => number;
|
|
949
|
+
readonly wasmsdkbuilder_mainnet: () => number;
|
|
950
|
+
readonly wasmsdkbuilder_mainnetTrusted: () => [number, number, number];
|
|
951
|
+
readonly wasmsdkbuilder_testnet: () => number;
|
|
952
|
+
readonly wasmsdkbuilder_testnetTrusted: () => [number, number, number];
|
|
953
|
+
readonly wasmsdkbuilder_build: (a: number) => [number, number, number];
|
|
954
|
+
readonly wasmsdkbuilder_withContextProvider: (a: number, b: number) => number;
|
|
955
|
+
readonly wasmsdkbuilder_withVersion: (a: number, b: number) => [number, number, number];
|
|
956
|
+
readonly wasmsdkbuilder_withSettings: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
957
|
+
readonly wasmsdkbuilder_withProofs: (a: number, b: number) => number;
|
|
958
|
+
readonly wasmsdk_setLogLevel: (a: number, b: number) => [number, number];
|
|
959
|
+
readonly wasmsdkbuilder_withLogs: (a: number, b: number, c: number) => [number, number, number];
|
|
960
|
+
readonly wasmsdk_contractCreate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
961
|
+
readonly wasmsdk_contractUpdate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => any;
|
|
962
|
+
readonly wasmsdk_getDocuments: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => any;
|
|
963
|
+
readonly wasmsdk_getDocumentsWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => any;
|
|
964
|
+
readonly wasmsdk_getDocument: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
965
|
+
readonly wasmsdk_getDocumentWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
966
|
+
readonly wasmsdk_getDpnsUsernames: (a: number, b: number, c: number, d: number) => any;
|
|
967
|
+
readonly wasmsdk_getDpnsUsername: (a: number, b: number, c: number) => any;
|
|
968
|
+
readonly wasmsdk_getDpnsUsernamesWithProofInfo: (a: number, b: number, c: number, d: number) => any;
|
|
969
|
+
readonly wasmsdk_getDpnsUsernameWithProofInfo: (a: number, b: number, c: number) => any;
|
|
970
|
+
readonly wasmsdk_getGroupInfo: (a: number, b: number, c: number, d: number) => any;
|
|
971
|
+
readonly wasmsdk_getGroupMembers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
972
|
+
readonly wasmsdk_getIdentityGroups: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
973
|
+
readonly wasmsdk_getGroupInfos: (a: number, b: number, c: number, d: any, e: number) => any;
|
|
974
|
+
readonly wasmsdk_getGroupActions: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: number) => any;
|
|
975
|
+
readonly wasmsdk_getGroupActionSigners: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
976
|
+
readonly wasmsdk_getGroupsDataContracts: (a: number, b: number, c: number) => any;
|
|
977
|
+
readonly wasmsdk_getGroupInfoWithProofInfo: (a: number, b: number, c: number, d: number) => any;
|
|
978
|
+
readonly wasmsdk_getGroupInfosWithProofInfo: (a: number, b: number, c: number, d: any, e: number) => any;
|
|
979
|
+
readonly wasmsdk_getGroupMembersWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
980
|
+
readonly wasmsdk_getIdentityGroupsWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
981
|
+
readonly wasmsdk_getGroupActionsWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: any, h: number) => any;
|
|
982
|
+
readonly wasmsdk_getGroupActionSignersWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => any;
|
|
983
|
+
readonly wasmsdk_getGroupsDataContractsWithProofInfo: (a: number, b: number, c: number) => any;
|
|
984
|
+
readonly wasmsdk_getProtocolVersionUpgradeState: (a: number) => any;
|
|
985
|
+
readonly wasmsdk_getProtocolVersionUpgradeVoteStatus: (a: number, b: number, c: number, d: number) => any;
|
|
986
|
+
readonly wasmsdk_getProtocolVersionUpgradeStateWithProofInfo: (a: number) => any;
|
|
987
|
+
readonly wasmsdk_getProtocolVersionUpgradeVoteStatusWithProofInfo: (a: number, b: number, c: number, d: number) => any;
|
|
988
|
+
readonly wasmsdk_getStatus: (a: number) => any;
|
|
989
|
+
readonly wasmsdk_getCurrentQuorumsInfo: (a: number) => any;
|
|
990
|
+
readonly wasmsdk_getTotalCreditsInPlatform: (a: number) => any;
|
|
991
|
+
readonly wasmsdk_getPrefundedSpecializedBalance: (a: number, b: number, c: number) => any;
|
|
992
|
+
readonly wasmsdk_waitForStateTransitionResult: (a: number, b: number, c: number) => any;
|
|
993
|
+
readonly wasmsdk_getPathElements: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
994
|
+
readonly wasmsdk_getTotalCreditsInPlatformWithProofInfo: (a: number) => any;
|
|
995
|
+
readonly wasmsdk_getPrefundedSpecializedBalanceWithProofInfo: (a: number, b: number, c: number) => any;
|
|
996
|
+
readonly wasmsdk_getPathElementsWithProofInfo: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
997
|
+
readonly wasmsdk_generateMnemonic: (a: number, b: number, c: number) => [number, number, number, number];
|
|
998
|
+
readonly wasmsdk_validateMnemonic: (a: number, b: number, c: number, d: number) => number;
|
|
999
|
+
readonly wasmsdk_mnemonicToSeed: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1000
|
+
readonly wasmsdk_deriveKeyFromSeedPhrase: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1001
|
+
readonly wasmsdk_deriveKeyFromSeedWithPath: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
1002
|
+
readonly wasmsdk_derivationPathBip44Mainnet: (a: number, b: number, c: number) => any;
|
|
1003
|
+
readonly wasmsdk_derivationPathBip44Testnet: (a: number, b: number, c: number) => any;
|
|
1004
|
+
readonly wasmsdk_derivationPathDip9Mainnet: (a: number, b: number, c: number) => any;
|
|
1005
|
+
readonly wasmsdk_derivationPathDip9Testnet: (a: number, b: number, c: number) => any;
|
|
1006
|
+
readonly wasmsdk_derivationPathDip13Mainnet: (a: number) => any;
|
|
1007
|
+
readonly wasmsdk_derivationPathDip13Testnet: (a: number) => any;
|
|
1008
|
+
readonly wasmsdk_deriveChildPublicKey: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1009
|
+
readonly wasmsdk_xprvToXpub: (a: number, b: number) => [number, number, number, number];
|
|
1010
|
+
readonly wasmsdk_documentCreate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => any;
|
|
1011
|
+
readonly wasmsdk_documentReplace: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: bigint, m: number, n: number) => any;
|
|
1012
|
+
readonly wasmsdk_documentDelete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => any;
|
|
1013
|
+
readonly wasmsdk_documentTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => any;
|
|
1014
|
+
readonly wasmsdk_documentPurchase: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint, k: number, l: number) => any;
|
|
1015
|
+
readonly wasmsdk_documentSetPrice: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: bigint, k: number, l: number) => any;
|
|
1016
|
+
readonly wasmsdk_identityCreate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
1017
|
+
readonly wasmsdk_identityTopUp: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
1018
|
+
readonly wasmsdk_identityCreditTransfer: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number) => any;
|
|
1019
|
+
readonly wasmsdk_identityCreditWithdrawal: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: number, i: number, j: number) => any;
|
|
1020
|
+
readonly wasmsdk_identityUpdate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
1021
|
+
readonly wasmsdk_masternodeVote: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => any;
|
|
1022
|
+
readonly wasmsdk_tokenMint: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => any;
|
|
1023
|
+
readonly wasmsdk_tokenBurn: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1024
|
+
readonly wasmsdk_tokenTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => any;
|
|
1025
|
+
readonly wasmsdk_tokenFreeze: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1026
|
+
readonly wasmsdk_tokenUnfreeze: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1027
|
+
readonly wasmsdk_tokenDestroyFrozen: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1028
|
+
readonly wasmsdk_tokenSetPriceForDirectPurchase: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => any;
|
|
1029
|
+
readonly wasmsdk_tokenDirectPurchase: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1030
|
+
readonly wasmsdk_tokenClaim: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1031
|
+
readonly wasmsdk_tokenConfigUpdate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => any;
|
|
1032
|
+
readonly wasmsdk_deriveKeyFromSeedWithExtendedPath: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number];
|
|
1033
|
+
readonly wasmsdk_deriveDashpayContactKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => [number, number, number];
|
|
1034
|
+
readonly wasmsdk_dpnsConvertToHomographSafe: (a: number, b: number) => [number, number];
|
|
1035
|
+
readonly wasmsdk_dpnsIsValidUsername: (a: number, b: number) => number;
|
|
1036
|
+
readonly wasmsdk_dpnsIsContestedUsername: (a: number, b: number) => number;
|
|
1037
|
+
readonly wasmsdk_dpnsRegisterName: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => any;
|
|
1038
|
+
readonly wasmsdk_dpnsIsNameAvailable: (a: number, b: number, c: number) => any;
|
|
1039
|
+
readonly wasmsdk_dpnsResolveName: (a: number, b: number, c: number) => any;
|
|
1040
|
+
readonly wasmsdk_getContestedResources: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1041
|
+
readonly wasmsdk_getContestedResourceVotersForIdentity: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => any;
|
|
1042
|
+
readonly wasmsdk_getContestedResourceIdentityVotes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
1043
|
+
readonly wasmsdk_getVotePollsByEndDate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => any;
|
|
1044
|
+
readonly wasmsdk_getContestedResourcesWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
1045
|
+
readonly wasmsdk_getContestedResourceVoteStateWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => any;
|
|
1046
|
+
readonly wasmsdk_getContestedResourceVotersForIdentityWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => any;
|
|
1047
|
+
readonly wasmsdk_getContestedResourceIdentityVotesWithProofInfo: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
1048
|
+
readonly wasmsdk_getVotePollsByEndDateWithProofInfo: (a: number, b: number, c: bigint, d: number, e: bigint, f: number, g: number, h: number) => any;
|
|
1049
|
+
readonly wasmsdk_getContestedResourceVoteState: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => any;
|
|
1050
|
+
readonly wasmsdk_generateKeyPair: (a: number, b: number) => [number, number, number];
|
|
1051
|
+
readonly wasmsdk_generateKeyPairs: (a: number, b: number, c: number) => [number, number, number, number];
|
|
1052
|
+
readonly wasmsdk_keyPairFromWif: (a: number, b: number) => [number, number, number];
|
|
1053
|
+
readonly wasmsdk_keyPairFromHex: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
1054
|
+
readonly wasmsdk_pubkeyToAddress: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1055
|
+
readonly wasmsdk_validateAddress: (a: number, b: number, c: number, d: number) => number;
|
|
1056
|
+
readonly wasmsdk_signMessage: (a: number, b: number, c: number, d: number) => [number, number, number, number];
|
|
1057
|
+
readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
|
|
1058
|
+
readonly intounderlyingbytesource_type: (a: number) => number;
|
|
1059
|
+
readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number;
|
|
1060
|
+
readonly intounderlyingbytesource_start: (a: number, b: any) => void;
|
|
1061
|
+
readonly intounderlyingbytesource_pull: (a: number, b: any) => any;
|
|
1062
|
+
readonly intounderlyingbytesource_cancel: (a: number) => void;
|
|
1063
|
+
readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void;
|
|
1064
|
+
readonly intounderlyingsource_pull: (a: number, b: any) => any;
|
|
1065
|
+
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
1066
|
+
readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
|
|
1067
|
+
readonly intounderlyingsink_write: (a: number, b: any) => any;
|
|
1068
|
+
readonly intounderlyingsink_close: (a: number) => any;
|
|
1069
|
+
readonly intounderlyingsink_abort: (a: number, b: any) => any;
|
|
1070
|
+
readonly rustsecp256k1_v0_10_0_context_create: (a: number) => number;
|
|
1071
|
+
readonly rustsecp256k1_v0_10_0_context_destroy: (a: number) => void;
|
|
1072
|
+
readonly rustsecp256k1_v0_10_0_default_illegal_callback_fn: (a: number, b: number) => void;
|
|
1073
|
+
readonly rustsecp256k1_v0_10_0_default_error_callback_fn: (a: number, b: number) => void;
|
|
1074
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
1075
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
1076
|
+
readonly __wbindgen_exn_store: (a: number) => void;
|
|
1077
|
+
readonly __externref_table_alloc: () => number;
|
|
1078
|
+
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
1079
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
1080
|
+
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
1081
|
+
readonly __externref_table_dealloc: (a: number) => void;
|
|
1082
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
1083
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3c8cfe14db767e65: (a: number, b: number) => void;
|
|
1084
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h9abe8abae4d8f08e: (a: number, b: number) => void;
|
|
1085
|
+
readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h858a1e33a48810fa: (a: number, b: number) => void;
|
|
1086
|
+
readonly closure5156_externref_shim: (a: number, b: number, c: any) => void;
|
|
1087
|
+
readonly closure6846_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
1088
|
+
readonly __wbindgen_start: () => void;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1092
|
+
/**
|
|
1093
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1094
|
+
* a precompiled `WebAssembly.Module`.
|
|
1095
|
+
*
|
|
1096
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1097
|
+
*
|
|
1098
|
+
* @returns {InitOutput}
|
|
1099
|
+
*/
|
|
1100
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1104
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1105
|
+
*
|
|
1106
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1107
|
+
*
|
|
1108
|
+
* @returns {Promise<InitOutput>}
|
|
1109
|
+
*/
|
|
1110
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|