@ar.io/sdk 4.0.0-solana.25 → 4.0.0-solana.26

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.
@@ -42,7 +42,7 @@ import { Protocol, getAllowDelegateInstructionAsync, getCancelWithdrawalInstruct
42
42
  import { getTransferCheckedInstruction } from '@solana-program/token';
43
43
  import { ARIO_ANT_PROGRAM_ID, TOKEN_DECIMALS } from './constants.js';
44
44
  import { SolanaARIOReadable } from './io-readable.js';
45
- import { getAntRecordPDA, getArioConfigPDA, getArnsRecordPDA, getArnsRegistryPDA, getArnsSettingsPDA, getDelegationPDA, getDemandFactorPDA, getEpochPDA, getEpochSettingsPDA, getGarSettingsPDA, getGatewayPDA, getGatewayRegistryPDA, getObservationPDA, getObserverLookupPDA, getPrimaryNamePDA, getPrimaryNameRequestPDA, getPrimaryNameReversePDA, getReservedNamePDA, getReturnedNamePDA, getVaultPDA, getWithdrawalCounterPDA, getWithdrawalPDA, hashName, } from './pda.js';
45
+ import { getAntConfigPDA, getAntRecordPDA, getArioConfigPDA, getArnsRecordPDA, getArnsRegistryPDA, getArnsSettingsPDA, getDelegationPDA, getDemandFactorPDA, getEpochPDA, getEpochSettingsPDA, getGarSettingsPDA, getGatewayPDA, getGatewayRegistryPDA, getObservationPDA, getObserverLookupPDA, getPrimaryNamePDA, getPrimaryNameRequestPDA, getPrimaryNameReversePDA, getReservedNamePDA, getReturnedNamePDA, getVaultPDA, getWithdrawalCounterPDA, getWithdrawalPDA, hashName, } from './pda.js';
46
46
  import { predictPrescribedObservers, } from './predict-prescribed-observers.js';
47
47
  import { reclaimLookupTablesForSigner, sendAndConfirm, sendWithEphemeralLookupTable, } from './send.js';
48
48
  const addressDecoder = getAddressDecoder();
@@ -1427,14 +1427,16 @@ export class SolanaARIOWriteable extends SolanaARIOReadable {
1427
1427
  * Build the `remaining_accounts` slice + the `antProgramId` arg the
1428
1428
  * four ario-core primary-name instructions consume. Sprint 2/5
1429
1429
  * reshape (ADR-016): ario-core no longer reads MPL Core asset bytes.
1430
- * Authorization is "caller is the AntRecord.owner for this name" via
1431
- * PDA-seed-pinned lookup.
1430
+ * Authorization is "caller is the effective AntRecord owner for this
1431
+ * name", resolved from the `AntRecord` + `AntConfig` PDAs (freshness-
1432
+ * gated against `AntConfig.last_known_owner` — see ario-core BD-097 /
1433
+ * BD-109). Both are program-PDA-pinned lookups.
1432
1434
  *
1433
1435
  * Layouts the on-chain handlers expect:
1434
1436
  * request_primary_name: [arnsRecord, demandFactor]
1435
- * request_and_set_primary_name: [arnsRecord, demandFactor, antRecord]
1436
- * approve_primary_name: [arnsRecord, antRecord]
1437
- * remove_primary_name_for_base_name: [arnsRecord, antRecord(@)]
1437
+ * request_and_set_primary_name: [arnsRecord, demandFactor, antRecord, antConfig]
1438
+ * approve_primary_name: [arnsRecord, antRecord, antConfig]
1439
+ * remove_primary_name_for_base_name: [arnsRecord, antRecord(@), antConfig]
1438
1440
  *
1439
1441
  * `antRecord` keys off the undername part for undernames (e.g.
1440
1442
  * "blog_arweave" → AntRecord at "blog") or the canonical "@" sentinel
@@ -1506,6 +1508,15 @@ export class SolanaARIOWriteable extends SolanaARIOReadable {
1506
1508
  : undername;
1507
1509
  const [antRecordPda] = await getAntRecordPDA(antMint, antUndername, antProgram);
1508
1510
  remaining.push({ address: antRecordPda, role: AccountRole.READONLY });
1511
+ // AntConfig PDA (ANT-level owner snapshot). ario-core reads
1512
+ // `AntConfig.last_known_owner` as the implicit-owner source and to
1513
+ // freshness-gate the per-record `AntRecord.owner` delegate (BD-097 /
1514
+ // BD-109). Derived under the SAME resolved `antProgram` as the
1515
+ // AntRecord above. Required trailing account for all three ANT-auth
1516
+ // variants (and the funding-plan variant, whose validation_account_count
1517
+ // is derived from this array's length downstream).
1518
+ const [antConfigPda] = await getAntConfigPDA(antMint, antProgram);
1519
+ remaining.push({ address: antConfigPda, role: AccountRole.READONLY });
1509
1520
  }
1510
1521
  return { remaining, antProgram };
1511
1522
  }
@@ -1662,7 +1673,7 @@ export class SolanaARIOWriteable extends SolanaARIOReadable {
1662
1673
  *
1663
1674
  * Mirrors the on-chain `approve_primary_name` instruction
1664
1675
  * (`programs/ario-core/src/instructions/primary_name.rs`).
1665
- * remaining_accounts: [arns_record(base), ant_record(undername | @)].
1676
+ * remaining_accounts: [arns_record(base), ant_record(undername | @), ant_config].
1666
1677
  */
1667
1678
  async approvePrimaryName(params, _options) {
1668
1679
  const { baseName } = splitPrimaryName(params.name);
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '4.0.0-solana.25';
17
+ export const version = '4.0.0-solana.26';
@@ -350,14 +350,16 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
350
350
  * Build the `remaining_accounts` slice + the `antProgramId` arg the
351
351
  * four ario-core primary-name instructions consume. Sprint 2/5
352
352
  * reshape (ADR-016): ario-core no longer reads MPL Core asset bytes.
353
- * Authorization is "caller is the AntRecord.owner for this name" via
354
- * PDA-seed-pinned lookup.
353
+ * Authorization is "caller is the effective AntRecord owner for this
354
+ * name", resolved from the `AntRecord` + `AntConfig` PDAs (freshness-
355
+ * gated against `AntConfig.last_known_owner` — see ario-core BD-097 /
356
+ * BD-109). Both are program-PDA-pinned lookups.
355
357
  *
356
358
  * Layouts the on-chain handlers expect:
357
359
  * request_primary_name: [arnsRecord, demandFactor]
358
- * request_and_set_primary_name: [arnsRecord, demandFactor, antRecord]
359
- * approve_primary_name: [arnsRecord, antRecord]
360
- * remove_primary_name_for_base_name: [arnsRecord, antRecord(@)]
360
+ * request_and_set_primary_name: [arnsRecord, demandFactor, antRecord, antConfig]
361
+ * approve_primary_name: [arnsRecord, antRecord, antConfig]
362
+ * remove_primary_name_for_base_name: [arnsRecord, antRecord(@), antConfig]
361
363
  *
362
364
  * `antRecord` keys off the undername part for undernames (e.g.
363
365
  * "blog_arweave" → AntRecord at "blog") or the canonical "@" sentinel
@@ -400,7 +402,7 @@ export declare class SolanaARIOWriteable extends SolanaARIOReadable {
400
402
  *
401
403
  * Mirrors the on-chain `approve_primary_name` instruction
402
404
  * (`programs/ario-core/src/instructions/primary_name.rs`).
403
- * remaining_accounts: [arns_record(base), ant_record(undername | @)].
405
+ * remaining_accounts: [arns_record(base), ant_record(undername | @), ant_config].
404
406
  */
405
407
  approvePrimaryName(params: {
406
408
  initiator: Address;
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "4.0.0-solana.24";
16
+ export declare const version = "4.0.0-solana.25";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "4.0.0-solana.25",
3
+ "version": "4.0.0-solana.26",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"