dash-platform-sdk 1.4.0 → 1.5.0-dev.2
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 +15 -15
- package/bundle.min.js +17 -17
- package/package.json +2 -2
- package/proto/generated/platform.client.d.ts +70 -0
- package/proto/generated/platform.client.js +61 -12
- package/proto/generated/platform.d.ts +1025 -0
- package/proto/generated/platform.js +2074 -1
- package/src/DashPlatformSDK.d.ts +2 -0
- package/src/DashPlatformSDK.js +3 -0
- package/src/constants.d.ts +1 -0
- package/src/constants.js +1 -0
- package/src/keyPair/index.d.ts +25 -0
- package/src/keyPair/index.js +33 -0
- package/src/node/{epochs.d.ts → epochInfos.d.ts} +1 -1
- package/src/node/{epochs.js → epochInfos.js} +1 -1
- package/src/node/finalizedEpochInfos.d.ts +21 -0
- package/src/node/finalizedEpochInfos.js +54 -0
- package/src/node/index.d.ts +9 -1
- package/src/node/index.js +11 -1
- package/src/shielded/createStateTransition.d.ts +3 -0
- package/src/shielded/createStateTransition.js +55 -0
- package/src/shielded/getMostRecentShieldedAnchor.d.ts +2 -0
- package/src/shielded/getMostRecentShieldedAnchor.js +36 -0
- package/src/shielded/getShieldedAnchors.d.ts +2 -0
- package/src/shielded/getShieldedAnchors.js +36 -0
- package/src/shielded/getShieldedEncryptedNotes.d.ts +3 -0
- package/src/shielded/getShieldedEncryptedNotes.js +43 -0
- package/src/shielded/getShieldedNotesCount.d.ts +2 -0
- package/src/shielded/getShieldedNotesCount.js +36 -0
- package/src/shielded/getShieldedNullifiers.d.ts +3 -0
- package/src/shielded/getShieldedNullifiers.js +40 -0
- package/src/shielded/getShieldedPoolState.d.ts +2 -0
- package/src/shielded/getShieldedPoolState.js +36 -0
- package/src/shielded/index.d.ts +130 -0
- package/src/shielded/index.js +186 -0
- package/test/unit/KeyPair.spec.js +32 -0
- package/test/unit/Node.spec.js +6 -0
- package/test/unit/Shielded.spec.d.ts +1 -0
- package/test/unit/Shielded.spec.js +236 -0
- package/types.d.ts +85 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash-platform-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-dev.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "Lightweight SDK for accessing Dash Platform blockchain",
|
|
6
6
|
"repository": {
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"@scure/bip39": "^2.0.0",
|
|
60
60
|
"@scure/btc-signer": "^2.0.1",
|
|
61
61
|
"cbor-x": "^1.6.0",
|
|
62
|
-
"pshenmic-dpp": "2.0.0-dev.
|
|
62
|
+
"pshenmic-dpp": "2.0.0-dev.23"
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
|
2
2
|
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
3
|
+
import type { GetShieldedNullifiersResponse } from "./platform.js";
|
|
4
|
+
import type { GetShieldedNullifiersRequest } from "./platform.js";
|
|
5
|
+
import type { GetShieldedNotesCountResponse } from "./platform.js";
|
|
6
|
+
import type { GetShieldedNotesCountRequest } from "./platform.js";
|
|
7
|
+
import type { GetShieldedPoolStateResponse } from "./platform.js";
|
|
8
|
+
import type { GetShieldedPoolStateRequest } from "./platform.js";
|
|
9
|
+
import type { GetMostRecentShieldedAnchorResponse } from "./platform.js";
|
|
10
|
+
import type { GetMostRecentShieldedAnchorRequest } from "./platform.js";
|
|
11
|
+
import type { GetShieldedAnchorsResponse } from "./platform.js";
|
|
12
|
+
import type { GetShieldedAnchorsRequest } from "./platform.js";
|
|
13
|
+
import type { GetShieldedEncryptedNotesResponse } from "./platform.js";
|
|
14
|
+
import type { GetShieldedEncryptedNotesRequest } from "./platform.js";
|
|
3
15
|
import type { GetAddressesInfosResponse } from "./platform.js";
|
|
4
16
|
import type { GetAddressesInfosRequest } from "./platform.js";
|
|
5
17
|
import type { GetAddressInfoResponse } from "./platform.js";
|
|
@@ -24,6 +36,8 @@ import type { GetContestedResourceVoteStateResponse } from "./platform.js";
|
|
|
24
36
|
import type { GetContestedResourceVoteStateRequest } from "./platform.js";
|
|
25
37
|
import type { GetContestedResourcesResponse } from "./platform.js";
|
|
26
38
|
import type { GetContestedResourcesRequest } from "./platform.js";
|
|
39
|
+
import type { GetFinalizedEpochInfosResponse } from "./platform.js";
|
|
40
|
+
import type { GetFinalizedEpochInfosRequest } from "./platform.js";
|
|
27
41
|
import type { GetEpochsInfoResponse } from "./platform.js";
|
|
28
42
|
import type { GetEpochsInfoRequest } from "./platform.js";
|
|
29
43
|
import type { GetIdentityByNonUniquePublicKeyHashResponse } from "./platform.js";
|
|
@@ -114,6 +128,10 @@ export interface IPlatformClient {
|
|
|
114
128
|
* @generated from protobuf rpc: getEpochsInfo
|
|
115
129
|
*/
|
|
116
130
|
getEpochsInfo(input: GetEpochsInfoRequest, options?: RpcOptions): UnaryCall<GetEpochsInfoRequest, GetEpochsInfoResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* @generated from protobuf rpc: getFinalizedEpochInfos
|
|
133
|
+
*/
|
|
134
|
+
getFinalizedEpochInfos(input: GetFinalizedEpochInfosRequest, options?: RpcOptions): UnaryCall<GetFinalizedEpochInfosRequest, GetFinalizedEpochInfosResponse>;
|
|
117
135
|
/**
|
|
118
136
|
* @generated from protobuf rpc: getContestedResources
|
|
119
137
|
*/
|
|
@@ -162,6 +180,30 @@ export interface IPlatformClient {
|
|
|
162
180
|
* @generated from protobuf rpc: getAddressesInfos
|
|
163
181
|
*/
|
|
164
182
|
getAddressesInfos(input: GetAddressesInfosRequest, options?: RpcOptions): UnaryCall<GetAddressesInfosRequest, GetAddressesInfosResponse>;
|
|
183
|
+
/**
|
|
184
|
+
* @generated from protobuf rpc: getShieldedEncryptedNotes
|
|
185
|
+
*/
|
|
186
|
+
getShieldedEncryptedNotes(input: GetShieldedEncryptedNotesRequest, options?: RpcOptions): UnaryCall<GetShieldedEncryptedNotesRequest, GetShieldedEncryptedNotesResponse>;
|
|
187
|
+
/**
|
|
188
|
+
* @generated from protobuf rpc: getShieldedAnchors
|
|
189
|
+
*/
|
|
190
|
+
getShieldedAnchors(input: GetShieldedAnchorsRequest, options?: RpcOptions): UnaryCall<GetShieldedAnchorsRequest, GetShieldedAnchorsResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* @generated from protobuf rpc: getMostRecentShieldedAnchor
|
|
193
|
+
*/
|
|
194
|
+
getMostRecentShieldedAnchor(input: GetMostRecentShieldedAnchorRequest, options?: RpcOptions): UnaryCall<GetMostRecentShieldedAnchorRequest, GetMostRecentShieldedAnchorResponse>;
|
|
195
|
+
/**
|
|
196
|
+
* @generated from protobuf rpc: getShieldedPoolState
|
|
197
|
+
*/
|
|
198
|
+
getShieldedPoolState(input: GetShieldedPoolStateRequest, options?: RpcOptions): UnaryCall<GetShieldedPoolStateRequest, GetShieldedPoolStateResponse>;
|
|
199
|
+
/**
|
|
200
|
+
* @generated from protobuf rpc: getShieldedNotesCount
|
|
201
|
+
*/
|
|
202
|
+
getShieldedNotesCount(input: GetShieldedNotesCountRequest, options?: RpcOptions): UnaryCall<GetShieldedNotesCountRequest, GetShieldedNotesCountResponse>;
|
|
203
|
+
/**
|
|
204
|
+
* @generated from protobuf rpc: getShieldedNullifiers
|
|
205
|
+
*/
|
|
206
|
+
getShieldedNullifiers(input: GetShieldedNullifiersRequest, options?: RpcOptions): UnaryCall<GetShieldedNullifiersRequest, GetShieldedNullifiersResponse>;
|
|
165
207
|
}
|
|
166
208
|
/**
|
|
167
209
|
* @generated from protobuf service org.dash.platform.dapi.v0.Platform
|
|
@@ -230,6 +272,10 @@ export declare class PlatformClient implements IPlatformClient, ServiceInfo {
|
|
|
230
272
|
* @generated from protobuf rpc: getEpochsInfo
|
|
231
273
|
*/
|
|
232
274
|
getEpochsInfo(input: GetEpochsInfoRequest, options?: RpcOptions): UnaryCall<GetEpochsInfoRequest, GetEpochsInfoResponse>;
|
|
275
|
+
/**
|
|
276
|
+
* @generated from protobuf rpc: getFinalizedEpochInfos
|
|
277
|
+
*/
|
|
278
|
+
getFinalizedEpochInfos(input: GetFinalizedEpochInfosRequest, options?: RpcOptions): UnaryCall<GetFinalizedEpochInfosRequest, GetFinalizedEpochInfosResponse>;
|
|
233
279
|
/**
|
|
234
280
|
* @generated from protobuf rpc: getContestedResources
|
|
235
281
|
*/
|
|
@@ -278,4 +324,28 @@ export declare class PlatformClient implements IPlatformClient, ServiceInfo {
|
|
|
278
324
|
* @generated from protobuf rpc: getAddressesInfos
|
|
279
325
|
*/
|
|
280
326
|
getAddressesInfos(input: GetAddressesInfosRequest, options?: RpcOptions): UnaryCall<GetAddressesInfosRequest, GetAddressesInfosResponse>;
|
|
327
|
+
/**
|
|
328
|
+
* @generated from protobuf rpc: getShieldedEncryptedNotes
|
|
329
|
+
*/
|
|
330
|
+
getShieldedEncryptedNotes(input: GetShieldedEncryptedNotesRequest, options?: RpcOptions): UnaryCall<GetShieldedEncryptedNotesRequest, GetShieldedEncryptedNotesResponse>;
|
|
331
|
+
/**
|
|
332
|
+
* @generated from protobuf rpc: getShieldedAnchors
|
|
333
|
+
*/
|
|
334
|
+
getShieldedAnchors(input: GetShieldedAnchorsRequest, options?: RpcOptions): UnaryCall<GetShieldedAnchorsRequest, GetShieldedAnchorsResponse>;
|
|
335
|
+
/**
|
|
336
|
+
* @generated from protobuf rpc: getMostRecentShieldedAnchor
|
|
337
|
+
*/
|
|
338
|
+
getMostRecentShieldedAnchor(input: GetMostRecentShieldedAnchorRequest, options?: RpcOptions): UnaryCall<GetMostRecentShieldedAnchorRequest, GetMostRecentShieldedAnchorResponse>;
|
|
339
|
+
/**
|
|
340
|
+
* @generated from protobuf rpc: getShieldedPoolState
|
|
341
|
+
*/
|
|
342
|
+
getShieldedPoolState(input: GetShieldedPoolStateRequest, options?: RpcOptions): UnaryCall<GetShieldedPoolStateRequest, GetShieldedPoolStateResponse>;
|
|
343
|
+
/**
|
|
344
|
+
* @generated from protobuf rpc: getShieldedNotesCount
|
|
345
|
+
*/
|
|
346
|
+
getShieldedNotesCount(input: GetShieldedNotesCountRequest, options?: RpcOptions): UnaryCall<GetShieldedNotesCountRequest, GetShieldedNotesCountResponse>;
|
|
347
|
+
/**
|
|
348
|
+
* @generated from protobuf rpc: getShieldedNullifiers
|
|
349
|
+
*/
|
|
350
|
+
getShieldedNullifiers(input: GetShieldedNullifiersRequest, options?: RpcOptions): UnaryCall<GetShieldedNullifiersRequest, GetShieldedNullifiersResponse>;
|
|
281
351
|
}
|
|
@@ -109,88 +109,137 @@ export class PlatformClient {
|
|
|
109
109
|
const method = this.methods[13], opt = this._transport.mergeOptions(options);
|
|
110
110
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
111
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* @generated from protobuf rpc: getFinalizedEpochInfos
|
|
114
|
+
*/
|
|
115
|
+
getFinalizedEpochInfos(input, options) {
|
|
116
|
+
const method = this.methods[14], opt = this._transport.mergeOptions(options);
|
|
117
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
118
|
+
}
|
|
112
119
|
/**
|
|
113
120
|
* @generated from protobuf rpc: getContestedResources
|
|
114
121
|
*/
|
|
115
122
|
getContestedResources(input, options) {
|
|
116
|
-
const method = this.methods[
|
|
123
|
+
const method = this.methods[15], opt = this._transport.mergeOptions(options);
|
|
117
124
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
118
125
|
}
|
|
119
126
|
/**
|
|
120
127
|
* @generated from protobuf rpc: getContestedResourceVoteState
|
|
121
128
|
*/
|
|
122
129
|
getContestedResourceVoteState(input, options) {
|
|
123
|
-
const method = this.methods[
|
|
130
|
+
const method = this.methods[16], opt = this._transport.mergeOptions(options);
|
|
124
131
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
125
132
|
}
|
|
126
133
|
/**
|
|
127
134
|
* @generated from protobuf rpc: getTotalCreditsInPlatform
|
|
128
135
|
*/
|
|
129
136
|
getTotalCreditsInPlatform(input, options) {
|
|
130
|
-
const method = this.methods[
|
|
137
|
+
const method = this.methods[17], opt = this._transport.mergeOptions(options);
|
|
131
138
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
132
139
|
}
|
|
133
140
|
/**
|
|
134
141
|
* @generated from protobuf rpc: getStatus
|
|
135
142
|
*/
|
|
136
143
|
getStatus(input, options) {
|
|
137
|
-
const method = this.methods[
|
|
144
|
+
const method = this.methods[18], opt = this._transport.mergeOptions(options);
|
|
138
145
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
139
146
|
}
|
|
140
147
|
/**
|
|
141
148
|
* @generated from protobuf rpc: getIdentityTokenBalances
|
|
142
149
|
*/
|
|
143
150
|
getIdentityTokenBalances(input, options) {
|
|
144
|
-
const method = this.methods[
|
|
151
|
+
const method = this.methods[19], opt = this._transport.mergeOptions(options);
|
|
145
152
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
146
153
|
}
|
|
147
154
|
/**
|
|
148
155
|
* @generated from protobuf rpc: getIdentitiesTokenBalances
|
|
149
156
|
*/
|
|
150
157
|
getIdentitiesTokenBalances(input, options) {
|
|
151
|
-
const method = this.methods[
|
|
158
|
+
const method = this.methods[20], opt = this._transport.mergeOptions(options);
|
|
152
159
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
153
160
|
}
|
|
154
161
|
/**
|
|
155
162
|
* @generated from protobuf rpc: getTokenContractInfo
|
|
156
163
|
*/
|
|
157
164
|
getTokenContractInfo(input, options) {
|
|
158
|
-
const method = this.methods[
|
|
165
|
+
const method = this.methods[21], opt = this._transport.mergeOptions(options);
|
|
159
166
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
160
167
|
}
|
|
161
168
|
/**
|
|
162
169
|
* @generated from protobuf rpc: getTokenDirectPurchasePrices
|
|
163
170
|
*/
|
|
164
171
|
getTokenDirectPurchasePrices(input, options) {
|
|
165
|
-
const method = this.methods[
|
|
172
|
+
const method = this.methods[22], opt = this._transport.mergeOptions(options);
|
|
166
173
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
167
174
|
}
|
|
168
175
|
/**
|
|
169
176
|
* @generated from protobuf rpc: getTokenTotalSupply
|
|
170
177
|
*/
|
|
171
178
|
getTokenTotalSupply(input, options) {
|
|
172
|
-
const method = this.methods[
|
|
179
|
+
const method = this.methods[23], opt = this._transport.mergeOptions(options);
|
|
173
180
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
174
181
|
}
|
|
175
182
|
/**
|
|
176
183
|
* @generated from protobuf rpc: waitForStateTransitionResult
|
|
177
184
|
*/
|
|
178
185
|
waitForStateTransitionResult(input, options) {
|
|
179
|
-
const method = this.methods[
|
|
186
|
+
const method = this.methods[24], opt = this._transport.mergeOptions(options);
|
|
180
187
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
181
188
|
}
|
|
182
189
|
/**
|
|
183
190
|
* @generated from protobuf rpc: getAddressInfo
|
|
184
191
|
*/
|
|
185
192
|
getAddressInfo(input, options) {
|
|
186
|
-
const method = this.methods[
|
|
193
|
+
const method = this.methods[25], opt = this._transport.mergeOptions(options);
|
|
187
194
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
188
195
|
}
|
|
189
196
|
/**
|
|
190
197
|
* @generated from protobuf rpc: getAddressesInfos
|
|
191
198
|
*/
|
|
192
199
|
getAddressesInfos(input, options) {
|
|
193
|
-
const method = this.methods[
|
|
200
|
+
const method = this.methods[26], opt = this._transport.mergeOptions(options);
|
|
201
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* @generated from protobuf rpc: getShieldedEncryptedNotes
|
|
205
|
+
*/
|
|
206
|
+
getShieldedEncryptedNotes(input, options) {
|
|
207
|
+
const method = this.methods[27], opt = this._transport.mergeOptions(options);
|
|
208
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @generated from protobuf rpc: getShieldedAnchors
|
|
212
|
+
*/
|
|
213
|
+
getShieldedAnchors(input, options) {
|
|
214
|
+
const method = this.methods[28], opt = this._transport.mergeOptions(options);
|
|
215
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* @generated from protobuf rpc: getMostRecentShieldedAnchor
|
|
219
|
+
*/
|
|
220
|
+
getMostRecentShieldedAnchor(input, options) {
|
|
221
|
+
const method = this.methods[29], opt = this._transport.mergeOptions(options);
|
|
222
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @generated from protobuf rpc: getShieldedPoolState
|
|
226
|
+
*/
|
|
227
|
+
getShieldedPoolState(input, options) {
|
|
228
|
+
const method = this.methods[30], opt = this._transport.mergeOptions(options);
|
|
229
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* @generated from protobuf rpc: getShieldedNotesCount
|
|
233
|
+
*/
|
|
234
|
+
getShieldedNotesCount(input, options) {
|
|
235
|
+
const method = this.methods[31], opt = this._transport.mergeOptions(options);
|
|
236
|
+
return stackIntercept("unary", this._transport, method, opt, input);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* @generated from protobuf rpc: getShieldedNullifiers
|
|
240
|
+
*/
|
|
241
|
+
getShieldedNullifiers(input, options) {
|
|
242
|
+
const method = this.methods[32], opt = this._transport.mergeOptions(options);
|
|
194
243
|
return stackIntercept("unary", this._transport, method, opt, input);
|
|
195
244
|
}
|
|
196
245
|
}
|