near-kit 0.14.0 → 0.16.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.
Files changed (51) hide show
  1. package/dist/core/actions.d.ts +106 -1
  2. package/dist/core/actions.d.ts.map +1 -1
  3. package/dist/core/actions.js +145 -0
  4. package/dist/core/actions.js.map +1 -1
  5. package/dist/core/constants.d.ts +22 -0
  6. package/dist/core/constants.d.ts.map +1 -1
  7. package/dist/core/constants.js +23 -0
  8. package/dist/core/constants.js.map +1 -1
  9. package/dist/core/near.d.ts +53 -2
  10. package/dist/core/near.d.ts.map +1 -1
  11. package/dist/core/near.js +59 -11
  12. package/dist/core/near.js.map +1 -1
  13. package/dist/core/rpc/rpc-schemas.d.ts +1066 -50
  14. package/dist/core/rpc/rpc-schemas.d.ts.map +1 -1
  15. package/dist/core/rpc/rpc-schemas.js +217 -5
  16. package/dist/core/rpc/rpc-schemas.js.map +1 -1
  17. package/dist/core/rpc/rpc.d.ts +98 -1
  18. package/dist/core/rpc/rpc.d.ts.map +1 -1
  19. package/dist/core/rpc/rpc.js +163 -1
  20. package/dist/core/rpc/rpc.js.map +1 -1
  21. package/dist/core/schema.d.ts +3024 -290
  22. package/dist/core/schema.d.ts.map +1 -1
  23. package/dist/core/schema.js +333 -42
  24. package/dist/core/schema.js.map +1 -1
  25. package/dist/core/transaction.d.ts +164 -2
  26. package/dist/core/transaction.d.ts.map +1 -1
  27. package/dist/core/transaction.js +385 -17
  28. package/dist/core/transaction.js.map +1 -1
  29. package/dist/core/types.d.ts +20 -4
  30. package/dist/core/types.d.ts.map +1 -1
  31. package/dist/core/types.js +1 -0
  32. package/dist/core/types.js.map +1 -1
  33. package/dist/index.d.ts +6 -5
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +5 -3
  36. package/dist/index.js.map +1 -1
  37. package/dist/sandbox/sandbox.js +1 -1
  38. package/dist/sandbox/sandbox.js.map +1 -1
  39. package/dist/utils/key.d.ts +65 -1
  40. package/dist/utils/key.d.ts.map +1 -1
  41. package/dist/utils/key.js +137 -1
  42. package/dist/utils/key.js.map +1 -1
  43. package/dist/utils/nep413.d.ts +47 -3
  44. package/dist/utils/nep413.d.ts.map +1 -1
  45. package/dist/utils/nep413.js +33 -6
  46. package/dist/utils/nep413.js.map +1 -1
  47. package/dist/utils/validation.d.ts +8 -2
  48. package/dist/utils/validation.d.ts.map +1 -1
  49. package/dist/utils/validation.js +38 -12
  50. package/dist/utils/validation.js.map +1 -1
  51. package/package.json +8 -7
@@ -31,10 +31,16 @@
31
31
  */
32
32
  import { type Amount, type Gas, type PrivateKey } from "../utils/validation.js";
33
33
  import type { RpcClient } from "./rpc/rpc.js";
34
- import { type DelegateActionPayloadFormat, type SignedDelegateAction } from "./schema.js";
34
+ import { type DelegateActionPayloadFormat, type DelegateV2Action, type SignedDelegateAction } from "./schema.js";
35
35
  import type { FinalExecutionOutcomeMap, KeyStore, PublicKey, SendOptions, Signer, Transaction, TxExecutionStatus, WalletConnection } from "./types.js";
36
36
  /**
37
- * User-friendly access key permission format
37
+ * User-friendly access key permission format.
38
+ *
39
+ * The two `gasKey*` variants add a gas key (protocol v85 / NEAR 2.13): an access
40
+ * key with a prepaid balance for gas and `numNonces` parallel nonce slots. The
41
+ * key is always added with a zero balance; fund it afterwards with
42
+ * {@link TransactionBuilder.transferToGasKey}. A gas function-call key cannot
43
+ * carry an `allowance`.
38
44
  */
39
45
  export type AccessKeyPermission = {
40
46
  type: "fullAccess";
@@ -43,6 +49,14 @@ export type AccessKeyPermission = {
43
49
  receiverId: string;
44
50
  methodNames?: string[];
45
51
  allowance?: Amount;
52
+ } | {
53
+ type: "gasKeyFullAccess";
54
+ numNonces: number;
55
+ } | {
56
+ type: "gasKeyFunctionCall";
57
+ numNonces: number;
58
+ receiverId: string;
59
+ methodNames?: string[];
46
60
  };
47
61
  type DelegateSigningOptions = {
48
62
  receiverId?: string;
@@ -75,6 +89,20 @@ export type DelegateActionResult<F extends DelegateActionPayloadFormat = "base64
75
89
  payload: F extends "bytes" ? Uint8Array : string;
76
90
  format: F;
77
91
  };
92
+ type DelegateV2Options<F extends DelegateActionPayloadFormat = "base64"> = DelegateSigningOptions & {
93
+ payloadFormat?: F;
94
+ /**
95
+ * Gas-key nonce slot to sign against. When set, the delegate action's nonce
96
+ * is a `GasKeyNonce { nonce, nonceIndex }` and the per-slot nonce is fetched
97
+ * via `EXPERIMENTAL_view_gas_key_nonces` (unless `nonce` is also given).
98
+ */
99
+ nonceIndex?: number;
100
+ };
101
+ export type DelegateV2ActionResult<F extends DelegateActionPayloadFormat = "base64"> = {
102
+ signedDelegateAction: DelegateV2Action;
103
+ payload: F extends "bytes" ? Uint8Array : string;
104
+ format: F;
105
+ };
78
106
  /**
79
107
  * Fluent builder for constructing and sending NEAR transactions.
80
108
  *
@@ -95,6 +123,16 @@ export declare class TransactionBuilder {
95
123
  private defaultWaitUntil;
96
124
  private ensureKeyStoreReady?;
97
125
  private cachedSignedTx?;
126
+ /**
127
+ * Gas-key nonce index for this transaction. When set, the builder signs a V1
128
+ * transaction whose nonce is a `GasKeyNonce { nonce, nonceIndex }`.
129
+ */
130
+ private gasKeyNonceIndex?;
131
+ /**
132
+ * Opt into strict nonce mode (`nonce === ak_nonce + 1`). Forces a V1
133
+ * transaction even for an ordinary access key.
134
+ */
135
+ private strictNonce;
98
136
  constructor(signerId: string, rpc: RpcClient, keyStore: KeyStore, signer?: Signer, defaultWaitUntil?: TxExecutionStatus, wallet?: WalletConnection, ensureKeyStoreReady?: () => Promise<void>);
99
137
  /**
100
138
  * Invalidate cached signed transaction when builder state changes
@@ -298,6 +336,33 @@ export declare class TransactionBuilder {
298
336
  * Add a delete key action
299
337
  */
300
338
  deleteKey(accountId: string, publicKey: string): this;
339
+ /**
340
+ * Fund a gas key's prepaid balance (protocol v85 / NEAR 2.13).
341
+ *
342
+ * The target gas key must already exist on the receiver account (add it with
343
+ * `.addKey(pk, { type: "gasKeyFullAccess", numNonces })`). The deposit is
344
+ * moved from the signer's account balance into the gas key's balance, where it
345
+ * is reserved to pay for gas when that key signs transactions.
346
+ *
347
+ * @param publicKey - The gas key to fund (e.g. `"ed25519:..."`).
348
+ * @param amount - Amount to add to the gas key balance ({@link Amount}).
349
+ *
350
+ * @remarks
351
+ * If no receiver has been set yet, this also sets the transaction `receiverId`
352
+ * to `signerId` (the account that owns the gas key).
353
+ */
354
+ transferToGasKey(publicKey: string, amount: Amount): this;
355
+ /**
356
+ * Withdraw NEAR from a gas key's balance back to the account (protocol v85 / NEAR 2.13).
357
+ *
358
+ * @param publicKey - The gas key to withdraw from (e.g. `"ed25519:..."`).
359
+ * @param amount - Amount to move from the gas key balance to the account ({@link Amount}).
360
+ *
361
+ * @remarks
362
+ * If no receiver has been set yet, this also sets the transaction `receiverId`
363
+ * to `signerId` (the account that owns the gas key).
364
+ */
365
+ withdrawFromGasKey(publicKey: string, amount: Amount): this;
301
366
  /**
302
367
  * Build and sign a delegate action from the queued actions.
303
368
  *
@@ -307,12 +372,33 @@ export declare class TransactionBuilder {
307
372
  * Add a signed delegate action to this transaction (for relayers).
308
373
  */
309
374
  signedDelegateAction(signedDelegate: SignedDelegateAction): this;
375
+ /**
376
+ * Add a V2 signed delegate action to this transaction, for relayers
377
+ * (gas-key meta-transactions, NEAR 2.13).
378
+ *
379
+ * The receiver is set to the V2 delegate action's sender (the account whose
380
+ * actions are being relayed).
381
+ */
382
+ signedDelegateActionV2(signedDelegate: DelegateV2Action): this;
310
383
  /**
311
384
  * Build and sign a delegate action from the queued actions.
312
385
  *
313
386
  * @returns Structured delegate action plus an encoded payload (`base64` by default)
314
387
  */
315
388
  delegate<F extends DelegateActionPayloadFormat = "base64">(options?: DelegateOptions<F>): Promise<DelegateActionResult<F>>;
389
+ /**
390
+ * Build and sign a V2 delegate action (gas-key meta-transactions, NEAR 2.13).
391
+ *
392
+ * Like {@link delegate} but produces a `DelegateActionV2`, signed under the
393
+ * DISTINCT V2 NEP-461 domain tag. Pass `nonceIndex` to sign against a gas
394
+ * key's nonce slot (the nonce then carries that index); otherwise an ordinary
395
+ * key nonce is used. A relayer wraps the returned payload in a transaction via
396
+ * {@link signedDelegateActionV2}.
397
+ *
398
+ * @returns The structured V2 signed delegate action plus an encoded payload
399
+ * (`base64` by default).
400
+ */
401
+ delegateV2<F extends DelegateActionPayloadFormat = "base64">(options?: DelegateV2Options<F>): Promise<DelegateV2ActionResult<F>>;
316
402
  /**
317
403
  * Override the signing function for this specific transaction.
318
404
  *
@@ -373,6 +459,59 @@ export declare class TransactionBuilder {
373
459
  * Supports both ed25519 and secp256k1 keys.
374
460
  */
375
461
  signWith(key: PrivateKey | Signer): this;
462
+ /**
463
+ * Sign this transaction with a gas key (protocol v85 / NEAR 2.13).
464
+ *
465
+ * Gas keys carry a prepaid gas balance and allocate several independent nonce
466
+ * slots so they can sign transactions in parallel. This selects the nonce
467
+ * slot (`nonceIndex`) to use and switches the builder to the versioned
468
+ * transaction (V1) encoding required to carry a gas-key nonce.
469
+ *
470
+ * The nonce for the chosen slot is fetched and managed independently per
471
+ * `(account, public key, nonce index)`, so concurrent transactions on
472
+ * different indexes of the same gas key do not collide.
473
+ *
474
+ * @param nonceIndex - Which gas-key nonce slot to use. Slots are 0-based, so
475
+ * valid values are `0` to `numNonces - 1` (the slot count the key was added
476
+ * with). An out-of-range slot is rejected when the nonce is fetched.
477
+ *
478
+ * @example
479
+ * ```typescript
480
+ * await near.transaction("alice.near")
481
+ * .signWith(gasKeyPrivateKey)
482
+ * .useGasKey(0)
483
+ * .functionCall("contract.near", "method", {})
484
+ * .send()
485
+ * ```
486
+ *
487
+ * @remarks Combine with {@link signWith} to use the gas key's private key.
488
+ */
489
+ useGasKey(nonceIndex: number): this;
490
+ /**
491
+ * Validate a gas-key nonce index: an integer in the u16 range (`0..=65535`).
492
+ * The slot must also be within the key's allocated slots, which is checked
493
+ * when the nonce is fetched.
494
+ * @internal
495
+ */
496
+ private static validateNonceIndex;
497
+ /**
498
+ * Opt into strict nonce mode (protocol v85 / NEAR 2.13).
499
+ *
500
+ * In strict mode the transaction nonce must be exactly `ak_nonce + 1`,
501
+ * enforcing sequential ordering, instead of the default monotonic rule (any
502
+ * nonce strictly greater than the access key nonce). This switches the builder
503
+ * to the versioned transaction (V1) encoding.
504
+ *
505
+ * @param strict - Whether to enable strict mode (defaults to `true`).
506
+ */
507
+ strictNonceMode(strict?: boolean): this;
508
+ /**
509
+ * Whether this transaction must be encoded as a versioned (V1) transaction.
510
+ * V1 is required to carry a gas-key nonce or to request strict nonce mode;
511
+ * an ordinary transaction stays V0 (tag-less) for backward compatibility.
512
+ * @internal
513
+ */
514
+ private requiresV1;
376
515
  /**
377
516
  * Build the unsigned transaction
378
517
  */
@@ -407,6 +546,29 @@ export declare class TransactionBuilder {
407
546
  * ```
408
547
  */
409
548
  sign(): Promise<this>;
549
+ /**
550
+ * Build and sign a versioned (V1) transaction for the gas-key / strict-nonce
551
+ * path. Produces the cache entry consumed by {@link sign}, including the
552
+ * pre-serialized `[0x01]`-tagged signed bytes.
553
+ * @internal
554
+ */
555
+ private signV1;
556
+ /**
557
+ * Resolve the {@link TransactionNonceBorsh} for a V1 transaction.
558
+ *
559
+ * For a gas key the nonce comes from the chosen nonce slot (queried via
560
+ * `EXPERIMENTAL_view_gas_key_nonces`) and is wrapped as `GasKeyNonce`; each
561
+ * slot is tracked independently so parallel transactions on different slots
562
+ * don't collide. For a strict-nonce ordinary key it's a plain `Nonce`.
563
+ * @internal
564
+ */
565
+ private resolveV1Nonce;
566
+ /**
567
+ * Fetch the current on-chain nonce for a gas key's nonce slot via
568
+ * `EXPERIMENTAL_view_gas_key_nonces`, which returns one nonce per slot.
569
+ * @internal
570
+ */
571
+ private fetchGasKeyNonce;
410
572
  /**
411
573
  * Get the transaction hash (only available after signing).
412
574
  *
@@ -1 +1 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/core/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;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