Skip to content

Commit c243074

Browse files
committed
chore: sync with docs repo
1 parent 233901b commit c243074

5 files changed

Lines changed: 9 additions & 2 deletions

File tree

1-Identities-and-Names/name-search-by-name.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ try {
2222
});
2323

2424
for (const [id, doc] of results) {
25-
console.log(doc.toJSON());
2625
const { label, parentDomainName } = doc.toJSON();
2726
console.log(`${label}.${parentDomainName} (ID: ${id.toString()})`);
2827
}

2-Contracts-and-Documents/contract-register-history.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { setupDashClient } from '../setupDashClient.mjs';
55
const { sdk, keyManager } = await setupDashClient();
66
const { identity, identityKey, signer } = await keyManager.getAuth();
77

8+
// Define the document schemas for the contract
89
const documentSchemas = {
910
note: {
1011
type: 'object',
@@ -19,8 +20,10 @@ const documentSchemas = {
1920
};
2021

2122
try {
23+
// Get the next identity nonce for contract creation
2224
const identityNonce = await sdk.identities.nonce(identity.id.toString());
2325

26+
// Create the data contract
2427
const dataContract = new DataContract({
2528
ownerId: identity.id,
2629
identityNonce: (identityNonce || 0n) + 1n,
@@ -37,6 +40,7 @@ try {
3740
documentsMutableContractDefault: true,
3841
});
3942

43+
// Publish the contract to the platform
4044
const publishedContract = await sdk.contracts.publish({
4145
dataContract,
4246
identityKey,

2-Contracts-and-Documents/contract-register-nft.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,18 @@ const documentSchemas = {
6060
};
6161

6262
try {
63+
// Get the next identity nonce for contract creation
6364
const identityNonce = await sdk.identities.nonce(identity.id.toString());
6465

66+
// Create the data contract
6567
const dataContract = new DataContract({
6668
ownerId: identity.id,
6769
identityNonce: (identityNonce || 0n) + 1n,
6870
schemas: documentSchemas,
6971
fullValidation: true,
7072
});
7173

74+
// Publish the contract to the platform
7275
const publishedContract = await sdk.contracts.publish({
7376
dataContract,
7477
identityKey,

2-Contracts-and-Documents/document-submit.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { setupDashClient } from '../setupDashClient.mjs';
55
const { sdk, keyManager } = await setupDashClient();
66
const { identity, identityKey, signer } = await keyManager.getAuth();
77

8-
// Default tutorial contract (public). Replace or override via DATA_CONTRACT_ID.
8+
// Default tutorial contract (testnet). Replace or override via DATA_CONTRACT_ID.
99
const DATA_CONTRACT_ID =
1010
process.env.DATA_CONTRACT_ID ??
1111
'FW3DHrQiG24VqzPY4ARenMgjEPpBNuEQTZckV8hbVCG4';

create-wallet.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// See https://docs.dash.org/projects/platform/en/stable/docs/tutorials/create-and-fund-a-wallet.html
12
import { wallet, PlatformAddressSigner, PrivateKey } from '@dashevo/evo-sdk';
23

34
const network = 'testnet';

0 commit comments

Comments
 (0)