dash 3.22.0-dev.3 → 3.22.0-dev.7
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
CHANGED
|
@@ -77,20 +77,20 @@ client.getWalletAccount().then(async (account) => {
|
|
|
77
77
|
## Dependencies
|
|
78
78
|
|
|
79
79
|
The Dash SDK works using multiple dependencies that might interest you:
|
|
80
|
-
- [Wallet-Lib](https://github.com/dashevo/wallet-lib) - Wallet management for handling, signing and broadcasting transactions (BIP-44 HD).
|
|
80
|
+
- [Wallet-Lib](https://github.com/dashevo/platform/tree/master/packages/wallet-lib) - Wallet management for handling, signing and broadcasting transactions (BIP-44 HD).
|
|
81
81
|
- [Dashcore-Lib](https://github.com/dashevo/dashcore-lib) - Provides the main L1 blockchain primitives (Block, Transaction,...).
|
|
82
|
-
- [DAPI-Client](https://github.com/dashevo/dapi-client) - Client library for accessing DAPI endpoints.
|
|
83
|
-
- [DPP](https://github.com/dashevo/js-dpp) - Implementation (JS) of Dash Platform Protocol.
|
|
82
|
+
- [DAPI-Client](https://github.com/dashevo/platform/tree/master/packages/js-dapi-client) - Client library for accessing DAPI endpoints.
|
|
83
|
+
- [DPP](https://github.com/dashevo/platform/tree/master/packages/js-dpp) - Implementation (JS) of Dash Platform Protocol.
|
|
84
84
|
|
|
85
85
|
Some features might be more extensive in those libs, as Dash SDK only wraps around them to provide a single interface that is easy to use (and thus has less features).
|
|
86
86
|
|
|
87
87
|
## Documentation
|
|
88
88
|
|
|
89
|
-
More extensive documentation available at https://dashevo.github.io/
|
|
89
|
+
More extensive documentation available at https://dashevo.github.io/platform/SDK/.
|
|
90
90
|
|
|
91
91
|
## Contributing
|
|
92
92
|
|
|
93
|
-
Feel free to dive in! [Open an issue](https://github.com/dashevo/
|
|
93
|
+
Feel free to dive in! [Open an issue](https://github.com/dashevo/platform/issues/new/choose) or submit PRs.
|
|
94
94
|
|
|
95
95
|
## License
|
|
96
96
|
|
|
@@ -69,6 +69,9 @@ var wallet_lib_1 = require("@dashevo/wallet-lib");
|
|
|
69
69
|
var DAPIClientTransport_1 = __importDefault(require("@dashevo/wallet-lib/src/transport/DAPIClientTransport/DAPIClientTransport"));
|
|
70
70
|
var Platform_1 = require("./Platform");
|
|
71
71
|
var dapi_client_1 = __importDefault(require("@dashevo/dapi-client"));
|
|
72
|
+
var systemIds_1 = require("@dashevo/dpns-contract/lib/systemIds");
|
|
73
|
+
var systemIds_2 = require("@dashevo/dashpay-contract/lib/systemIds");
|
|
74
|
+
var systemIds_3 = require("@dashevo/masternode-reward-shares-contract/lib/systemIds");
|
|
72
75
|
var ClientApps_1 = require("./ClientApps");
|
|
73
76
|
/**
|
|
74
77
|
* Client class that wraps all components together to allow integrated payments on both the Dash Network (layer 1)
|
|
@@ -120,11 +123,14 @@ var Client = /** @class */ (function (_super) {
|
|
|
120
123
|
_this.defaultAccountIndex = ((_a = _this.options.wallet) === null || _a === void 0 ? void 0 : _a.defaultAccountIndex) || 0;
|
|
121
124
|
_this.apps = new ClientApps_1.ClientApps(Object.assign({
|
|
122
125
|
dpns: {
|
|
123
|
-
contractId:
|
|
126
|
+
contractId: systemIds_1.contractId,
|
|
124
127
|
},
|
|
125
128
|
dashpay: {
|
|
126
|
-
contractId:
|
|
129
|
+
contractId: systemIds_2.contractId,
|
|
127
130
|
},
|
|
131
|
+
masternodeRewardShares: {
|
|
132
|
+
contractId: systemIds_3.contractId,
|
|
133
|
+
}
|
|
128
134
|
}, _this.options.apps));
|
|
129
135
|
_this.platform = new Platform_1.Platform({
|
|
130
136
|
client: _this,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Client.js","sourceRoot":"","sources":["../../../../src/SDK/Client/Client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAAsC;AACtC,kDAAsD;AACtD,kIAA2G;AAC3G,uCAAsC;AAEtC,qEAA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B,MAAM,EAAE,KAAI;YACZ,OAAO,EAAE,KAAI,CAAC,OAAO;YACrB,oBAAoB,EAAE,KAAI,CAAC,OAAO,CAAC,oBAAoB;SAC1D,CAAC,CAAC;;IACP,CAAC;IAED;;;;;OAKG;IACG,iCAAgB,GAAtB,UAAuB,OAA6B;QAA7B,wBAAA,EAAA,YAA6B;;;gBAChD,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;oBACd,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;iBAChF;gBAED,OAAO,cACH,KAAK,EAAE,IAAI,CAAC,mBAAmB,IAC5B,OAAO,CACb,CAAA;gBAED,sBAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAC;;;KAC1C;IAED;;;OAGG;IACG,2BAAU,GAAhB;;;;;6BACQ,IAAI,CAAC,MAAM,EAAX,wBAAW;wBACX,qBAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAA;;wBAA9B,SAA8B,CAAC;;;;;;KAEtC;IAED;;;;OAIG;IACH,8BAAa,GAAb;QACI,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED;;;;;;;OAOG;IACH,wBAAO,GAAP;QACI,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IACL,aAAC;AAAD,CAAC,AArID,CAA4B,qBAAY,GAqIvC;AArIY,wBAAM;AAuInB,kBAAe,MAAM,CAAC"}
|
|
@@ -11,4 +11,4 @@ const signed = account.sign(message, pk);
|
|
|
11
11
|
const verify = message.verify(pk.toAddress().toString(), signed.toString());
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
See [code snippet](https://github.com/dashevo/
|
|
14
|
+
See [code snippet](https://github.com/dashevo/platform/blob/master/packages/js-dash-sdk/examples/node/sign-and-verify-messages.js).
|
|
@@ -4,4 +4,4 @@ When Dash.Client is initiated with a `mnemonic` property, a wallet instance is a
|
|
|
4
4
|
|
|
5
5
|
In order to ensure the sync-up with the network has happened, you will need to wait for the method `client.isReady()` to resolve.
|
|
6
6
|
|
|
7
|
-
You will find else where the [complete documentation of Wallet-lib](https://github.com/dashevo/wallet-lib), as we only cover the most basic pieces in this documentation.
|
|
7
|
+
You will find else where the [complete documentation of Wallet-lib](https://github.com/dashevo/platform/tree/master/packages/wallet-lib), as we only cover the most basic pieces in this documentation.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash",
|
|
3
|
-
"version": "3.22.0-dev.
|
|
3
|
+
"version": "3.22.0-dev.7",
|
|
4
4
|
"description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"unpkg": "dist/dash.min.js",
|
|
@@ -34,11 +34,14 @@
|
|
|
34
34
|
},
|
|
35
35
|
"homepage": "https://github.com/dashevo/DashJS#readme",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@dashevo/dapi-client": "~0.22.0-dev.
|
|
38
|
-
"@dashevo/dashcore-lib": "~0.19.
|
|
39
|
-
"@dashevo/
|
|
40
|
-
"@dashevo/
|
|
41
|
-
"@dashevo/
|
|
37
|
+
"@dashevo/dapi-client": "~0.22.0-dev.7",
|
|
38
|
+
"@dashevo/dashcore-lib": "~0.19.29",
|
|
39
|
+
"@dashevo/dashpay-contract": "~0.22.0-dev.7",
|
|
40
|
+
"@dashevo/dpns-contract": "~0.22.0-dev.7",
|
|
41
|
+
"@dashevo/dpp": "~0.22.0-dev.7",
|
|
42
|
+
"@dashevo/grpc-common": "~0.22.0-dev.7",
|
|
43
|
+
"@dashevo/masternode-reward-shares-contract": "~0.22.0-dev.7",
|
|
44
|
+
"@dashevo/wallet-lib": "~7.22.0-dev.7",
|
|
42
45
|
"bs58": "^4.0.1",
|
|
43
46
|
"node-inspect-extracted": "^1.0.8"
|
|
44
47
|
},
|
package/src/SDK/Client/Client.ts
CHANGED
|
@@ -4,6 +4,9 @@ import DAPIClientTransport from "@dashevo/wallet-lib/src/transport/DAPIClientTra
|
|
|
4
4
|
import { Platform } from './Platform';
|
|
5
5
|
import { Network } from "@dashevo/dashcore-lib";
|
|
6
6
|
import DAPIClient from "@dashevo/dapi-client";
|
|
7
|
+
import { contractId as dpnsContractId } from "@dashevo/dpns-contract/lib/systemIds";
|
|
8
|
+
import { contractId as dashpayContractId } from "@dashevo/dashpay-contract/lib/systemIds";
|
|
9
|
+
import { contractId as masternodeRewardSharesContractId } from "@dashevo/masternode-reward-shares-contract/lib/systemIds";
|
|
7
10
|
import { ClientApps, ClientAppsOptions } from "./ClientApps";
|
|
8
11
|
|
|
9
12
|
export interface WalletOptions extends Wallet.IWalletOptions {
|
|
@@ -107,11 +110,14 @@ export class Client extends EventEmitter {
|
|
|
107
110
|
|
|
108
111
|
this.apps = new ClientApps(Object.assign({
|
|
109
112
|
dpns: {
|
|
110
|
-
contractId:
|
|
113
|
+
contractId: dpnsContractId,
|
|
111
114
|
},
|
|
112
115
|
dashpay: {
|
|
113
|
-
contractId:
|
|
116
|
+
contractId: dashpayContractId,
|
|
114
117
|
},
|
|
118
|
+
masternodeRewardShares: {
|
|
119
|
+
contractId: masternodeRewardSharesContractId,
|
|
120
|
+
}
|
|
115
121
|
}, this.options.apps));
|
|
116
122
|
|
|
117
123
|
this.platform = new Platform({
|