Skip to content

Commit

Permalink
feat: add IPNS record
Browse files Browse the repository at this point in the history
  • Loading branch information
dr497 committed Jun 3, 2024
1 parent 57c35d2 commit 725f1a9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/src/record_v2/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const UTF8_ENCODED = new Set<Record>([
Record.TXT,
Record.CNAME,
Record.BTC,
Record.IPNS,
]);

/**
Expand Down
1 change: 1 addition & 0 deletions js/src/types/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export enum Record {
TXT = "TXT",
Background = "background",
BASE = "BASE",
IPNS = "IPNS",
}

export const RECORD_V1_SIZE: Map<Record, number> = new Map([
Expand Down
4 changes: 4 additions & 0 deletions js/tests/records-v2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ test("Records V2 des/ser", () => {
content: "username",
record: Record.Discord,
},
{
content: "k51qzi5uqu5dlvj2baxnqndepeb86cbk3ng7n3i46uzyxzyqj2xjonzllnv0v8",
record: Record.IPNS,
},
];

items.forEach((e) => {
Expand Down

0 comments on commit 725f1a9

Please sign in to comment.