@x1id/resolve 0.16.0 → 0.17.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.
@@ -34,7 +34,7 @@
34
34
  * {@link integratorAccountsForRegister} / {@link integratorAccountsForCreateVoucher}
35
35
  * to build the pair.
36
36
  * - The rate is read from the on-chain `AllowlistEntry`, never trusted from
37
- * the transaction. It is capped at {@link MAX_INTEGRATOR_RATE_BPS} (40%);
37
+ * the transaction. It is capped at {@link MAX_INTEGRATOR_RATE_BPS} (20%);
38
38
  * {@link DEFAULT_INTEGRATOR_RATE_BPS} (20%) applies when `add_integrator`
39
39
  * omits a rate.
40
40
  */
@@ -43,8 +43,12 @@ import type { AddressLike, BuiltInstruction, InstructionKey } from "./delegate.j
43
43
  export declare const INTEGRATOR_SEED = "integrator";
44
44
  /** Default integrator share when `add_integrator` omits a rate: 20%. */
45
45
  export declare const DEFAULT_INTEGRATOR_RATE_BPS = 2000;
46
- /** Hard cap on an integrator's share of a mint fee: 40%. */
47
- export declare const MAX_INTEGRATOR_RATE_BPS = 4000;
46
+ /** Hard cap on an integrator's share of a mint fee: 20%. Mirrors the program's
47
+ * `MAX_INTEGRATOR_RATE_BPS` (lib.rs) — the admin `register_integrator` /
48
+ * `set_integrator_rate` paths `require!(rate <= MAX_INTEGRATOR_RATE_BPS)` and
49
+ * REJECT anything higher, so a looser SDK cap only builds txs the program
50
+ * refuses. (Self-service paths clamp down to it instead of rejecting.) */
51
+ export declare const MAX_INTEGRATOR_RATE_BPS = 2000;
48
52
  /** Anchor instruction discriminator `sha256("global:add_integrator")[0..8]`. */
49
53
  export declare const ADD_INTEGRATOR_DISCRIMINATOR: Uint8Array;
50
54
  /** Anchor instruction discriminator `sha256("global:set_integrator_rate")[0..8]`. */
@@ -34,7 +34,7 @@
34
34
  * {@link integratorAccountsForRegister} / {@link integratorAccountsForCreateVoucher}
35
35
  * to build the pair.
36
36
  * - The rate is read from the on-chain `AllowlistEntry`, never trusted from
37
- * the transaction. It is capped at {@link MAX_INTEGRATOR_RATE_BPS} (40%);
37
+ * the transaction. It is capped at {@link MAX_INTEGRATOR_RATE_BPS} (20%);
38
38
  * {@link DEFAULT_INTEGRATOR_RATE_BPS} (20%) applies when `add_integrator`
39
39
  * omits a rate.
40
40
  */
@@ -43,8 +43,12 @@ import { encodeBase58, decodeBase58_32 } from "./base58.js";
43
43
  export const INTEGRATOR_SEED = "integrator";
44
44
  /** Default integrator share when `add_integrator` omits a rate: 20%. */
45
45
  export const DEFAULT_INTEGRATOR_RATE_BPS = 2_000;
46
- /** Hard cap on an integrator's share of a mint fee: 40%. */
47
- export const MAX_INTEGRATOR_RATE_BPS = 4_000;
46
+ /** Hard cap on an integrator's share of a mint fee: 20%. Mirrors the program's
47
+ * `MAX_INTEGRATOR_RATE_BPS` (lib.rs) — the admin `register_integrator` /
48
+ * `set_integrator_rate` paths `require!(rate <= MAX_INTEGRATOR_RATE_BPS)` and
49
+ * REJECT anything higher, so a looser SDK cap only builds txs the program
50
+ * refuses. (Self-service paths clamp down to it instead of rejecting.) */
51
+ export const MAX_INTEGRATOR_RATE_BPS = 2_000;
48
52
  /** Anchor instruction discriminator `sha256("global:add_integrator")[0..8]`. */
49
53
  export const ADD_INTEGRATOR_DISCRIMINATOR = Uint8Array.from([85, 249, 72, 201, 17, 187, 227, 38]);
50
54
  /** Anchor instruction discriminator `sha256("global:set_integrator_rate")[0..8]`. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x1id/resolve",
3
- "version": "0.16.0",
3
+ "version": "0.17.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",