@x1id/resolve 0.18.0 → 0.19.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.
package/README.md CHANGED
@@ -564,6 +564,11 @@ const createIx = buildCreateRecordIx({
564
564
  programId, payer, owner, handle, record,
565
565
  coinType: 60, // ETH, per SLIP-44
566
566
  value: ethAddressBytes,
567
+ // TOKENIZED handle (the default)? pass the holder's NFT associated token
568
+ // account too, or create_record fails NotCurrentAuthority (6018). The verify
569
+ // builders below take the same `holderTokenAccount`. Omit for an untokenized
570
+ // handle. (A delegated writer passes `recordDelegate` instead.)
571
+ holderTokenAccount, // = getAssociatedTokenAddressSync(nftMint, owner)
567
572
  });
568
573
 
569
574
  // 2. build the challenge and have the wallet sign it (personal_sign)
@@ -83,7 +83,7 @@ export declare function splitBtcSignature(sig65: Uint8Array): {
83
83
  header: number;
84
84
  signature: Uint8Array;
85
85
  };
86
- export interface CreateRecordParams {
86
+ export interface CreateRecordParams extends RecordEditAuthorityParams {
87
87
  readonly programId: AddressLike;
88
88
  readonly payer: AddressLike;
89
89
  readonly owner: AddressLike;
@@ -171,6 +171,12 @@ export function buildCreateRecordIx(p) {
171
171
  { pubkey: toBase58(p.record, "record"), isSigner: false, isWritable: true },
172
172
  { pubkey: SYSTEM_PROGRAM, isSigner: false, isWritable: false },
173
173
  ];
174
+ // W165: create_record uses the same `require_current_authority` check as the
175
+ // verify builders, so a TOKENIZED handle (the default) needs the holder's NFT
176
+ // token account (and/or the record-delegate PDA) in the trailing accounts —
177
+ // without it create_record fails NotCurrentAuthority (6018). This was the one
178
+ // record builder missing the tail; now it matches buildVerifyRecord*Ix.
179
+ pushAuthorityTail(keys, p.programId, p);
174
180
  return { programId: toBase58(p.programId, "programId"), keys, data };
175
181
  }
176
182
  export function buildVerifyRecordEthIx(p) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x1id/resolve",
3
- "version": "0.18.0",
3
+ "version": "0.19.0",
4
4
  "description": "Resolve @handles and X1NS names on X1. Never silently picks between namespaces.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",