@bonfida/spl-name-service 2.1.3 → 2.3.0

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.
@@ -4,6 +4,7 @@ import { Connection, PublicKey } from "@solana/web3.js";
4
4
  import { Buffer } from "buffer";
5
5
  export declare const NAME_TOKENIZER_ID: PublicKey;
6
6
  export declare const MINT_PREFIX: Buffer;
7
+ export declare const getDomainMint: (domain: PublicKey) => PublicKey;
7
8
  export declare enum Tag {
8
9
  Uninitialized = 0,
9
10
  CentralState = 1,
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Record } from "./types/record";
2
+ import { Record } from "../types/record";
3
3
  import { Connection, PublicKey } from "@solana/web3.js";
4
4
  import { Record as SnsRecord } from "@bonfida/sns-records";
5
5
  /**
@@ -10,14 +10,6 @@ export declare const GUARDIANS: Map<Record, PublicKey>;
10
10
  * Set of records that utilize secp256k1 for verification purposes
11
11
  */
12
12
  export declare const ETH_ROA_RECORDS: Set<Record>;
13
- /**
14
- * This function verifies the staleness of a record.
15
- * @param {Connection} connection - The Solana RPC connection object
16
- * @param {Record} record - The record to be verified.
17
- * @param {string} domain - The domain associated with the record.
18
- * @returns {Promise<boolean>} - Returns a promise that resolves to a boolean indicating whether the record is stale.
19
- */
20
- export declare const verifyStaleness: (connection: Connection, record: Record, domain: string) => Promise<boolean>;
21
13
  /**
22
14
  *
23
15
  * This function verifies the right of association of a record.
@@ -0,0 +1,10 @@
1
+ import { Connection } from "@solana/web3.js";
2
+ import { Record } from "../types/record";
3
+ /**
4
+ * This function verifies the staleness of a record.
5
+ * @param {Connection} connection - The Solana RPC connection object
6
+ * @param {Record} record - The record to be verified.
7
+ * @param {string} domain - The domain associated with the record.
8
+ * @returns {Promise<boolean>} - Returns a promise that resolves to a boolean indicating whether the record is stale.
9
+ */
10
+ export declare const verifyStaleness: (connection: Connection, record: Record, domain: string) => Promise<boolean>;
package/dist/state.d.ts CHANGED
@@ -14,6 +14,7 @@ export declare class NameRegistryState {
14
14
  owner: Uint8Array;
15
15
  class: Uint8Array;
16
16
  });
17
+ static deserialize(data: Buffer): NameRegistryState;
17
18
  static retrieve(connection: Connection, nameAccountKey: PublicKey): Promise<{
18
19
  registry: NameRegistryState;
19
20
  nftOwner: PublicKey | undefined;
package/dist/utils.d.ts CHANGED
@@ -80,6 +80,13 @@ export declare const getAllRegisteredDomains: (connection: Connection) => Promis
80
80
  * @returns The public key of the reverse account
81
81
  */
82
82
  export declare const getReverseKeySync: (domain: string, isSub?: boolean) => PublicKey;
83
+ /**
84
+ * This function can be used to get the reverse key from a domain key
85
+ * @param domainKey The domain key to compute the reverse for
86
+ * @param parent The parent public key
87
+ * @returns The public key of the reverse account
88
+ */
89
+ export declare const getReverseKeyFromDomainKey: (domainKey: PublicKey, parent?: PublicKey) => PublicKey;
83
90
  export declare const check: (bool: boolean, errorType: ErrorType) => void;
84
91
  /**
85
92
  * This function can be used to retrieve all the tokenized domains of an owner
@@ -99,3 +106,4 @@ export declare const getTokenizedDomains: (connection: Connection, owner: Public
99
106
  * @returns price
100
107
  */
101
108
  export declare const getDomainPriceFromName: (name: string) => 20 | 750 | 700 | 640 | 160;
109
+ export declare const deserializeReverse: (data: Buffer | undefined) => string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonfida/spl-name-service",
3
- "version": "2.1.3",
3
+ "version": "2.3.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"