near-kit 0.15.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.
- package/dist/utils/nep413.d.ts +47 -3
- package/dist/utils/nep413.d.ts.map +1 -1
- package/dist/utils/nep413.js +33 -6
- package/dist/utils/nep413.js.map +1 -1
- package/package.json +4 -4
package/dist/utils/nep413.d.ts
CHANGED
|
@@ -59,9 +59,41 @@ export declare function serializeNep413Message(params: SignMessageParams): Uint8
|
|
|
59
59
|
export interface VerifyNep413Options {
|
|
60
60
|
/**
|
|
61
61
|
* Maximum age in milliseconds for the signature to be considered valid.
|
|
62
|
+
*
|
|
63
|
+
* Only applies when `nonceValidation` is `"timestamp"` (the default), which
|
|
64
|
+
* assumes the nonce embeds a timestamp in its first 8 bytes as produced by
|
|
65
|
+
* `generateNonce()`. Ignored when `nonceValidation` is `"none"`.
|
|
66
|
+
*
|
|
67
|
+
* Passing `Infinity` is a legacy escape hatch that skips timestamp
|
|
68
|
+
* validation entirely, including the future-timestamp rejection — the same
|
|
69
|
+
* effect as `nonceValidation: "none"`, which is the preferred way to opt
|
|
70
|
+
* out. Invalid values (non-numbers, `NaN`, negatives) fall back to the
|
|
71
|
+
* default.
|
|
72
|
+
*
|
|
62
73
|
* @default 300000 (5 minutes)
|
|
63
74
|
*/
|
|
64
75
|
maxAge?: number;
|
|
76
|
+
/**
|
|
77
|
+
* How to validate the nonce.
|
|
78
|
+
*
|
|
79
|
+
* NEP-413 defines the nonce as an arbitrary 32-byte value with no inherent
|
|
80
|
+
* structure. Embedding a timestamp in the first 8 bytes is a near-kit
|
|
81
|
+
* convention (used by `generateNonce()`) for automatic expiration checking,
|
|
82
|
+
* not part of the spec.
|
|
83
|
+
*
|
|
84
|
+
* - `"timestamp"` (default) - Interpret the first 8 bytes of the nonce as a
|
|
85
|
+
* big-endian millisecond timestamp and reject signatures older than
|
|
86
|
+
* `maxAge` or with future timestamps (both checks are skipped when
|
|
87
|
+
* `maxAge` is `Infinity`). Use this for nonces created with
|
|
88
|
+
* `generateNonce()`.
|
|
89
|
+
* - `"none"` - Treat the nonce as opaque bytes per the NEP-413 spec. No
|
|
90
|
+
* timestamp or expiry check is performed and `maxAge` is ignored. Use this
|
|
91
|
+
* for messages signed with a custom nonce scheme. You are then responsible
|
|
92
|
+
* for validating the nonce and preventing replay attacks yourself.
|
|
93
|
+
*
|
|
94
|
+
* @default "timestamp"
|
|
95
|
+
*/
|
|
96
|
+
nonceValidation?: "timestamp" | "none";
|
|
65
97
|
/**
|
|
66
98
|
* Near client instance for verifying that the public key belongs to the account ID
|
|
67
99
|
* and has full access permission.
|
|
@@ -85,7 +117,11 @@ export interface VerifyNep413Options {
|
|
|
85
117
|
/**
|
|
86
118
|
* Verify a NEP-413 signed message
|
|
87
119
|
*
|
|
88
|
-
*
|
|
120
|
+
* By default, assumes the nonce follows the near-kit convention used by
|
|
121
|
+
* `generateNonce()` (first 8 bytes are a big-endian ms timestamp) and checks
|
|
122
|
+
* timestamp expiration (default: 5 minutes). NEP-413 itself treats the nonce
|
|
123
|
+
* as arbitrary 32 bytes, so for messages signed with a custom nonce scheme
|
|
124
|
+
* pass `nonceValidation: "none"` and validate the nonce yourself.
|
|
89
125
|
* You must still track used nonces to prevent replay attacks.
|
|
90
126
|
*
|
|
91
127
|
* When `options.near` is provided, this function also verifies that the public key
|
|
@@ -110,15 +146,23 @@ export interface VerifyNep413Options {
|
|
|
110
146
|
* // With blockchain verification to ensure key belongs to account
|
|
111
147
|
* const near = new Near({ network: "mainnet" })
|
|
112
148
|
* const isValid = await verifyNep413Signature(signedMessage, params, { near })
|
|
149
|
+
*
|
|
150
|
+
* // Custom nonce scheme (e.g. app-defined structure) - skip the timestamp check
|
|
151
|
+
* const isValid = await verifyNep413Signature(signedMessage, params, {
|
|
152
|
+
* nonceValidation: "none", // caller is responsible for nonce/replay checks
|
|
153
|
+
* })
|
|
113
154
|
* ```
|
|
114
155
|
*/
|
|
115
156
|
export declare function verifyNep413Signature(signedMessage: SignedMessage, params: SignMessageParams, options?: VerifyNep413Options): Promise<boolean>;
|
|
116
157
|
/**
|
|
117
158
|
* Generate a nonce for NEP-413 message signing
|
|
118
159
|
*
|
|
119
|
-
*
|
|
160
|
+
* NEP-413 nonces are arbitrary 32-byte values; embedding a timestamp in the
|
|
161
|
+
* first 8 bytes is a near-kit convention that lets `verifyNep413Signature`
|
|
162
|
+
* check expiration automatically. Apps are free to use their own nonce scheme
|
|
163
|
+
* instead - verify those with `nonceValidation: "none"`.
|
|
120
164
|
*
|
|
121
|
-
* @returns 32-byte nonce (8 bytes timestamp + 24 bytes random)
|
|
165
|
+
* @returns 32-byte nonce (8 bytes big-endian ms timestamp + 24 bytes random)
|
|
122
166
|
*
|
|
123
167
|
* @example
|
|
124
168
|
* ```typescript
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nep413.d.ts","sourceRoot":"","sources":["../../src/utils/nep413.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGxE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,aAAa,CAAA;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;UAK9B,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAuB5E;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC
|
|
1
|
+
{"version":3,"file":"nep413.d.ts","sourceRoot":"","sources":["../../src/utils/nep413.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAGxE;;;;;GAKG;AACH,eAAO,MAAM,UAAU,aAAa,CAAA;AAEpC;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB;;;;;UAK9B,CAAA;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,iBAAiB,GAAG,UAAU,CAuB5E;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,CAAA;IAEtC;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,qBAAqB,CACzC,aAAa,EAAE,aAAa,EAC5B,MAAM,EAAE,iBAAiB,EACzB,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,OAAO,CAAC,CA6ElB;AAiCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAa1C"}
|
package/dist/utils/nep413.js
CHANGED
|
@@ -79,7 +79,11 @@ export function serializeNep413Message(params) {
|
|
|
79
79
|
/**
|
|
80
80
|
* Verify a NEP-413 signed message
|
|
81
81
|
*
|
|
82
|
-
*
|
|
82
|
+
* By default, assumes the nonce follows the near-kit convention used by
|
|
83
|
+
* `generateNonce()` (first 8 bytes are a big-endian ms timestamp) and checks
|
|
84
|
+
* timestamp expiration (default: 5 minutes). NEP-413 itself treats the nonce
|
|
85
|
+
* as arbitrary 32 bytes, so for messages signed with a custom nonce scheme
|
|
86
|
+
* pass `nonceValidation: "none"` and validate the nonce yourself.
|
|
83
87
|
* You must still track used nonces to prevent replay attacks.
|
|
84
88
|
*
|
|
85
89
|
* When `options.near` is provided, this function also verifies that the public key
|
|
@@ -104,13 +108,33 @@ export function serializeNep413Message(params) {
|
|
|
104
108
|
* // With blockchain verification to ensure key belongs to account
|
|
105
109
|
* const near = new Near({ network: "mainnet" })
|
|
106
110
|
* const isValid = await verifyNep413Signature(signedMessage, params, { near })
|
|
111
|
+
*
|
|
112
|
+
* // Custom nonce scheme (e.g. app-defined structure) - skip the timestamp check
|
|
113
|
+
* const isValid = await verifyNep413Signature(signedMessage, params, {
|
|
114
|
+
* nonceValidation: "none", // caller is responsible for nonce/replay checks
|
|
115
|
+
* })
|
|
107
116
|
* ```
|
|
108
117
|
*/
|
|
109
118
|
export async function verifyNep413Signature(signedMessage, params, options = {}) {
|
|
110
119
|
try {
|
|
111
|
-
const { maxAge = 5 * 60 * 1000, near } = options; // Default: 5 minutes
|
|
112
|
-
//
|
|
113
|
-
|
|
120
|
+
const { maxAge: rawMaxAge = 5 * 60 * 1000, nonceValidation = "timestamp", near, } = options; // Default: 5 minutes
|
|
121
|
+
// Invalid runtime values (non-numbers, NaN, negatives — possible from
|
|
122
|
+
// plain JS callers) would silently disable or distort the expiry check;
|
|
123
|
+
// fail closed by falling back to the default. Infinity remains a valid
|
|
124
|
+
// opt-out.
|
|
125
|
+
const maxAge = typeof rawMaxAge === "number" &&
|
|
126
|
+
!Number.isNaN(rawMaxAge) &&
|
|
127
|
+
rawMaxAge >= 0
|
|
128
|
+
? rawMaxAge
|
|
129
|
+
: 5 * 60 * 1000;
|
|
130
|
+
// Check timestamp expiration if the nonce follows the near-kit timestamp
|
|
131
|
+
// convention and maxAge is finite. Fail closed: only an explicit "none"
|
|
132
|
+
// opts out, so unexpected values keep the default replay/expiry protection.
|
|
133
|
+
// Non-32-byte nonces skip this check but never verify: they are rejected
|
|
134
|
+
// by serializeNep413Message below.
|
|
135
|
+
if (nonceValidation !== "none" &&
|
|
136
|
+
maxAge !== Infinity &&
|
|
137
|
+
params.nonce.length === 32) {
|
|
114
138
|
// Extract timestamp from first 8 bytes (big-endian uint64)
|
|
115
139
|
const view = new DataView(params.nonce.buffer, params.nonce.byteOffset, params.nonce.byteLength);
|
|
116
140
|
const timestamp = Number(view.getBigUint64(0, false)); // false = big-endian
|
|
@@ -181,9 +205,12 @@ function decodeSignature(signature) {
|
|
|
181
205
|
/**
|
|
182
206
|
* Generate a nonce for NEP-413 message signing
|
|
183
207
|
*
|
|
184
|
-
*
|
|
208
|
+
* NEP-413 nonces are arbitrary 32-byte values; embedding a timestamp in the
|
|
209
|
+
* first 8 bytes is a near-kit convention that lets `verifyNep413Signature`
|
|
210
|
+
* check expiration automatically. Apps are free to use their own nonce scheme
|
|
211
|
+
* instead - verify those with `nonceValidation: "none"`.
|
|
185
212
|
*
|
|
186
|
-
* @returns 32-byte nonce (8 bytes timestamp + 24 bytes random)
|
|
213
|
+
* @returns 32-byte nonce (8 bytes big-endian ms timestamp + 24 bytes random)
|
|
187
214
|
*
|
|
188
215
|
* @example
|
|
189
216
|
* ```typescript
|
package/dist/utils/nep413.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nep413.js","sourceRoot":"","sources":["../../src/utils/nep413.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAA;AAGhC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAAA;AAEpC;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,CAAC,CAAC,MAAM,EA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AAK,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IAExB,OAAO,KAAK,CAAA;AACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "near-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "A simple, intuitive TypeScript library for interacting with NEAR Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"@near-wallet-selector/core": "^10.1.1",
|
|
82
82
|
"@types/bun": "^1.3.14",
|
|
83
83
|
"@types/tar": "^7.0.87",
|
|
84
|
-
"@vitest/coverage-v8": "^4.1.
|
|
85
|
-
"@vitest/ui": "^4.1.
|
|
84
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
85
|
+
"@vitest/ui": "^4.1.9",
|
|
86
86
|
"typescript": "^6.0.3",
|
|
87
|
-
"vitest": "^4.1.
|
|
87
|
+
"vitest": "^4.1.9"
|
|
88
88
|
},
|
|
89
89
|
"dependencies": {
|
|
90
90
|
"@napi-rs/keyring": "^1.3.0",
|