Skip to content

Commit 6a92bbd

Browse files
authored
chore: update dependencies and fix name-related logic (#40)
1 parent aec1c41 commit 6a92bbd

6 files changed

Lines changed: 167 additions & 157 deletions

File tree

1-Identities-and-Names/identity-topup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const client = setupDashClient();
55

66
const topupIdentity = async () => {
77
const identityId = process.env.IDENTITY_ID; // Your identity ID
8-
const topUpAmount = 100000; // Number of duffs
8+
const topUpAmount = 300000; // Number of duffs
99

1010
await client.platform.identities.topUp(identityId, topUpAmount);
1111
return client.platform.identities.get(identityId);

1-Identities-and-Names/identity-update-disable-key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const client = setupDashClient();
55

66
const updateIdentityDisableKey = async () => {
77
const identityId = process.env.IDENTITY_ID;
8-
const keyId = 3; // One of the identity's public key IDs
8+
const keyId = 4; // One of the identity's public key IDs
99

1010
// Retrieve the identity to be updated and the public key to disable
1111
const existingIdentity = await client.platform.identities.get(identityId);

1-Identities-and-Names/name-register.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const registerName = async () => {
99
const identity = await platform.identities.get(process.env.IDENTITY_ID); // Your identity ID
1010
const nameRegistration = await platform.names.register(
1111
`${nameToRegister}.dash`,
12-
{ dashUniqueIdentityId: identity.getId() },
12+
{ identity: identity.getId() },
1313
identity,
1414
);
1515

1-Identities-and-Names/name-resolve-by-record.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const client = setupDashClient();
66
const retrieveNameByRecord = async () => {
77
// Retrieve by a name's identity ID
88
return client.platform.names.resolveByRecord(
9-
'dashUniqueIdentityId',
9+
'identity',
1010
process.env.IDENTITY_ID, // Your identity ID
1111
);
1212
};

0 commit comments

Comments
 (0)