@privy-io/node 0.1.0 → 0.3.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/CHANGELOG.md +49 -0
- package/internal/to-file.d.mts +1 -1
- package/internal/to-file.d.ts +1 -1
- package/internal/to-file.js +1 -1
- package/internal/to-file.mjs +1 -1
- package/lib/cryptography.d.mts +3 -0
- package/lib/cryptography.d.mts.map +1 -1
- package/lib/cryptography.d.ts +3 -0
- package/lib/cryptography.d.ts.map +1 -1
- package/lib/cryptography.js +8 -1
- package/lib/cryptography.js.map +1 -1
- package/lib/cryptography.mjs +7 -1
- package/lib/cryptography.mjs.map +1 -1
- package/package.json +4 -3
- package/public-api/PrivyClient.d.mts +5 -1
- package/public-api/PrivyClient.d.mts.map +1 -1
- package/public-api/PrivyClient.d.ts +5 -1
- package/public-api/PrivyClient.d.ts.map +1 -1
- package/public-api/PrivyClient.js +6 -1
- package/public-api/PrivyClient.js.map +1 -1
- package/public-api/PrivyClient.mjs +6 -1
- package/public-api/PrivyClient.mjs.map +1 -1
- package/public-api/services/webhooks.d.mts +34 -0
- package/public-api/services/webhooks.d.mts.map +1 -0
- package/public-api/services/webhooks.d.ts +34 -0
- package/public-api/services/webhooks.d.ts.map +1 -0
- package/public-api/services/webhooks.js +48 -0
- package/public-api/services/webhooks.js.map +1 -0
- package/public-api/services/webhooks.mjs +43 -0
- package/public-api/services/webhooks.mjs.map +1 -0
- package/resources/transactions.d.mts +1 -1
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +1 -1
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +18 -5
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +18 -5
- package/resources/users.d.ts.map +1 -1
- package/resources/wallets/balance.d.mts +4 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +4 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/transactions.d.mts +6 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +6 -6
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/wallets.d.mts +4 -4
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +4 -4
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs.map +1 -1
- package/src/internal/to-file.ts +1 -1
- package/src/lib/cryptography.ts +9 -1
- package/src/public-api/PrivyClient.ts +9 -0
- package/src/public-api/services/webhooks.ts +63 -0
- package/src/resources/transactions.ts +9 -1
- package/src/resources/users.ts +31 -2
- package/src/resources/wallets/balance.ts +39 -4
- package/src/resources/wallets/transactions.ts +44 -8
- package/src/resources/wallets/wallets.ts +8 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0 (2025-10-16)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.2.0...v0.3.0](https://github.com/privy-io/node-sdk/compare/v0.2.0...v0.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([f002c78](https://github.com/privy-io/node-sdk/commit/f002c78e8a1249dc1c6a69495e02a0efbfcdc905))
|
|
10
|
+
* **api:** api update ([34caf43](https://github.com/privy-io/node-sdk/commit/34caf439505182b862b774e4b771dcaaa14d776f))
|
|
11
|
+
* **api:** api update ([5d63231](https://github.com/privy-io/node-sdk/commit/5d632315153f3f648bd3f453f5348ca35f25401e))
|
|
12
|
+
* **api:** api update ([284162a](https://github.com/privy-io/node-sdk/commit/284162a91efb679a5dcf030bc2e6a68a5fdb3693))
|
|
13
|
+
* **api:** api update ([a7b5ec5](https://github.com/privy-io/node-sdk/commit/a7b5ec5f0f10ce1c44a40f70524268c6aea33886))
|
|
14
|
+
* **api:** api update ([4055914](https://github.com/privy-io/node-sdk/commit/40559144da70a5afc0b9b997823cf05165e51bca))
|
|
15
|
+
* **api:** api update ([b6f4d6e](https://github.com/privy-io/node-sdk/commit/b6f4d6eebd43c468be00579f7f8f870320daf314))
|
|
16
|
+
* webhooks.verify util ([#56](https://github.com/privy-io/node-sdk/issues/56)) ([0f23e53](https://github.com/privy-io/node-sdk/commit/0f23e5366faca133b3655e965628791cad8b5305))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Performance Improvements
|
|
20
|
+
|
|
21
|
+
* faster formatting ([b866fe0](https://github.com/privy-io/node-sdk/commit/b866fe05ec73a5485dcb332f8b2e815cc422b788))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Chores
|
|
25
|
+
|
|
26
|
+
* **internal:** codegen related update ([35154ff](https://github.com/privy-io/node-sdk/commit/35154ffa8c784ae104047cfeab8221f6cb8c4155))
|
|
27
|
+
* **internal:** fix incremental formatting in some cases ([b611502](https://github.com/privy-io/node-sdk/commit/b611502b9fad07ce41aa3eaf15a141b0bcbc353f))
|
|
28
|
+
* **internal:** ignore .eslintcache ([6909614](https://github.com/privy-io/node-sdk/commit/6909614915d431bff125c77e111ca835e986459d))
|
|
29
|
+
* **internal:** remove .eslintcache ([be2bf39](https://github.com/privy-io/node-sdk/commit/be2bf399ee42f898e975297895ccb40a55fa0137))
|
|
30
|
+
* **internal:** remove deprecated `compilerOptions.baseUrl` from tsconfig.json ([5757b21](https://github.com/privy-io/node-sdk/commit/5757b21bfba758c87f3e1f9ee36e563600900fdf))
|
|
31
|
+
* **internal:** use npm pack for build uploads ([828cc5f](https://github.com/privy-io/node-sdk/commit/828cc5fbad880e4f6a313f4040f9dc81176152eb))
|
|
32
|
+
* **jsdoc:** fix [@link](https://github.com/link) annotations to refer only to parts of the package‘s public interface ([bb24639](https://github.com/privy-io/node-sdk/commit/bb246393ecae0eb043149ddb4cb07f25d4833e52))
|
|
33
|
+
|
|
34
|
+
## 0.2.0 (2025-09-23)
|
|
35
|
+
|
|
36
|
+
Full Changelog: [v0.1.0...v0.2.0](https://github.com/privy-io/node-sdk/compare/v0.1.0...v0.2.0)
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
* **api:** api update ([be1cfa2](https://github.com/privy-io/node-sdk/commit/be1cfa236a62f31efba227ff395b3865fb37aac6))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
### Bug Fixes
|
|
44
|
+
|
|
45
|
+
* removes the prefix for private keys during import ([#54](https://github.com/privy-io/node-sdk/issues/54)) ([782093c](https://github.com/privy-io/node-sdk/commit/782093c421650ac0f15ddc0bfe31c9790563b52d))
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Chores
|
|
49
|
+
|
|
50
|
+
* do not install brew dependencies in ./scripts/bootstrap by default ([fd5a84e](https://github.com/privy-io/node-sdk/commit/fd5a84ea8d0fcea2e7eccd5cba74444ead73c17f))
|
|
51
|
+
|
|
3
52
|
## 0.1.0 (2025-09-19)
|
|
4
53
|
|
|
5
54
|
Full Changelog: [v0.1.0-alpha.3...v0.1.0](https://github.com/privy-io/node-sdk/compare/v0.1.0-alpha.3...v0.1.0)
|
package/internal/to-file.d.mts
CHANGED
|
@@ -33,7 +33,7 @@ export interface ResponseLike {
|
|
|
33
33
|
export type ToFileInput = FileLike | ResponseLike | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
|
|
34
34
|
/**
|
|
35
35
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
36
|
-
* @param value the raw content of the file.
|
|
36
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
37
37
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
38
38
|
* @param {Object=} options additional properties
|
|
39
39
|
* @param {string=} options.type the MIME type of the content
|
package/internal/to-file.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface ResponseLike {
|
|
|
33
33
|
export type ToFileInput = FileLike | ResponseLike | Exclude<BlobLikePart, string> | AsyncIterable<BlobLikePart>;
|
|
34
34
|
/**
|
|
35
35
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
36
|
-
* @param value the raw content of the file.
|
|
36
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
37
37
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
38
38
|
* @param {Object=} options additional properties
|
|
39
39
|
* @param {string=} options.type the MIME type of the content
|
package/internal/to-file.js
CHANGED
|
@@ -27,7 +27,7 @@ const isResponseLike = (value) => value != null &&
|
|
|
27
27
|
typeof value.blob === 'function';
|
|
28
28
|
/**
|
|
29
29
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
30
|
-
* @param value the raw content of the file.
|
|
30
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
31
31
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
32
32
|
* @param {Object=} options additional properties
|
|
33
33
|
* @param {string=} options.type the MIME type of the content
|
package/internal/to-file.mjs
CHANGED
|
@@ -24,7 +24,7 @@ const isResponseLike = (value) => value != null &&
|
|
|
24
24
|
typeof value.blob === 'function';
|
|
25
25
|
/**
|
|
26
26
|
* Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats
|
|
27
|
-
* @param value the raw content of the file.
|
|
27
|
+
* @param value the raw content of the file. Can be an {@link Uploadable}, BlobLikePart, or AsyncIterable of BlobLikeParts
|
|
28
28
|
* @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible
|
|
29
29
|
* @param {Object=} options additional properties
|
|
30
30
|
* @param {string=} options.type the MIME type of the content
|
package/lib/cryptography.d.mts
CHANGED
|
@@ -5,4 +5,7 @@ export declare namespace HPKESender {
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export declare function setupHPKESender(): Promise<HPKESender>;
|
|
8
|
+
/** This prefix is no longer used, but we need to support existing keys */
|
|
9
|
+
export declare const WALLET_API_PRIVATE_KEY_PREFIX = "wallet-api:";
|
|
10
|
+
export declare const AUTHORIZATION_PRIVATE_KEY_PREFIX = "wallet-auth:";
|
|
8
11
|
//# sourceMappingURL=cryptography.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptography.d.mts","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cryptography.d.mts","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"AAmFA,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,oBAAoB;QACnC,UAAU,EAAE,UAAU,CAAC;QACvB,eAAe,EAAE,UAAU,CAAC;KAC7B;CACF;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,UAAU,CAAC,CAsB3D;AAED,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,gBAAgB,CAAC;AAC3D,eAAO,MAAM,gCAAgC,iBAAiB,CAAC"}
|
package/lib/cryptography.d.ts
CHANGED
|
@@ -5,4 +5,7 @@ export declare namespace HPKESender {
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
export declare function setupHPKESender(): Promise<HPKESender>;
|
|
8
|
+
/** This prefix is no longer used, but we need to support existing keys */
|
|
9
|
+
export declare const WALLET_API_PRIVATE_KEY_PREFIX = "wallet-api:";
|
|
10
|
+
export declare const AUTHORIZATION_PRIVATE_KEY_PREFIX = "wallet-auth:";
|
|
8
11
|
//# sourceMappingURL=cryptography.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptography.d.ts","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cryptography.d.ts","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"AAmFA,yBAAiB,UAAU,CAAC;IAC1B,UAAiB,oBAAoB;QACnC,UAAU,EAAE,UAAU,CAAC;QACvB,eAAe,EAAE,UAAU,CAAC;KAC7B;CACF;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,UAAU,CAAC,CAsB3D;AAED,0EAA0E;AAC1E,eAAO,MAAM,6BAA6B,gBAAgB,CAAC;AAC3D,eAAO,MAAM,gCAAgC,iBAAiB,CAAC"}
|
package/lib/cryptography.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUTHORIZATION_PRIVATE_KEY_PREFIX = exports.WALLET_API_PRIVATE_KEY_PREFIX = void 0;
|
|
3
4
|
exports.importPKCS8PrivateKey = importPKCS8PrivateKey;
|
|
4
5
|
exports.setupHPKERecipient = setupHPKERecipient;
|
|
5
6
|
exports.setupHPKESender = setupHPKESender;
|
|
@@ -14,8 +15,11 @@ const nist_1 = require("@noble/curves/nist");
|
|
|
14
15
|
* @internal
|
|
15
16
|
*/
|
|
16
17
|
function importPKCS8PrivateKey(privateKey) {
|
|
18
|
+
const strippedPrivateKey = privateKey
|
|
19
|
+
.replace(exports.AUTHORIZATION_PRIVATE_KEY_PREFIX, '')
|
|
20
|
+
.replace(exports.WALLET_API_PRIVATE_KEY_PREFIX, '');
|
|
17
21
|
// We fall back to `Buffer` here as Uint8Array.fromBase64 is not widely supported yet
|
|
18
|
-
const pkcs8Bytes = Buffer.from(
|
|
22
|
+
const pkcs8Bytes = Buffer.from(strippedPrivateKey, 'base64');
|
|
19
23
|
const privateKeyStart = pkcs8Bytes.indexOf(Buffer.from([0x04, 0x20]));
|
|
20
24
|
if (privateKeyStart === -1) {
|
|
21
25
|
throw new Error('Invalid wallet authorization private key');
|
|
@@ -69,4 +73,7 @@ async function setupHPKESender() {
|
|
|
69
73
|
},
|
|
70
74
|
};
|
|
71
75
|
}
|
|
76
|
+
/** This prefix is no longer used, but we need to support existing keys */
|
|
77
|
+
exports.WALLET_API_PRIVATE_KEY_PREFIX = 'wallet-api:';
|
|
78
|
+
exports.AUTHORIZATION_PRIVATE_KEY_PREFIX = 'wallet-auth:';
|
|
72
79
|
//# sourceMappingURL=cryptography.js.map
|
package/lib/cryptography.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptography.js","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cryptography.js","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":";;;AAYA,sDAcC;AAqBD,gDAuBC;AAoBD,0CAsBC;AAhHD,6DAA0D;AAC1D,qCAA0E;AAC1E,6CAA0C;AAG1C;;;;;;GAMG;AACH,SAAgB,qBAAqB,CAAC,UAAkB;IACtD,MAAM,kBAAkB,GAAG,UAAU;SAClC,OAAO,CAAC,wCAAgC,EAAE,EAAE,CAAC;SAC7C,OAAO,CAAC,qCAA6B,EAAE,EAAE,CAAC,CAAC;IAE9C,qFAAqF;IACrF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;IAC7D,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEtE,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,CAAC,eAAe,GAAG,CAAC,EAAE,eAAe,GAAG,EAAE,CAAC,CAAC;IACvF,OAAO,WAAI,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,eAA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,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC;gBAC7C,kBAAkB;aACnB,CAAC,CAAC;YAEH,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAE9C,OAAO;gBACL,UAAU,EAAE,IAAI,UAAU,CAAC,UAAU,CAAC;gBACtC,eAAe,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;aAC5C,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC7D,QAAA,6BAA6B,GAAG,aAAa,CAAC;AAC9C,QAAA,gCAAgC,GAAG,cAAc,CAAC"}
|
package/lib/cryptography.mjs
CHANGED
|
@@ -9,8 +9,11 @@ import { p256 } from '@noble/curves/nist';
|
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
11
|
export function importPKCS8PrivateKey(privateKey) {
|
|
12
|
+
const strippedPrivateKey = privateKey
|
|
13
|
+
.replace(AUTHORIZATION_PRIVATE_KEY_PREFIX, '')
|
|
14
|
+
.replace(WALLET_API_PRIVATE_KEY_PREFIX, '');
|
|
12
15
|
// We fall back to `Buffer` here as Uint8Array.fromBase64 is not widely supported yet
|
|
13
|
-
const pkcs8Bytes = Buffer.from(
|
|
16
|
+
const pkcs8Bytes = Buffer.from(strippedPrivateKey, 'base64');
|
|
14
17
|
const privateKeyStart = pkcs8Bytes.indexOf(Buffer.from([0x04, 0x20]));
|
|
15
18
|
if (privateKeyStart === -1) {
|
|
16
19
|
throw new Error('Invalid wallet authorization private key');
|
|
@@ -64,4 +67,7 @@ export async function setupHPKESender() {
|
|
|
64
67
|
},
|
|
65
68
|
};
|
|
66
69
|
}
|
|
70
|
+
/** This prefix is no longer used, but we need to support existing keys */
|
|
71
|
+
export const WALLET_API_PRIVATE_KEY_PREFIX = 'wallet-api:';
|
|
72
|
+
export const AUTHORIZATION_PRIVATE_KEY_PREFIX = 'wallet-auth:';
|
|
67
73
|
//# sourceMappingURL=cryptography.mjs.map
|
package/lib/cryptography.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cryptography.mjs","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB;OAClD,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,YAAY;OAClE,EAAE,IAAI,EAAE,MAAM,oBAAoB;AAGzC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,qFAAqF;IACrF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"cryptography.mjs","sourceRoot":"","sources":["../src/lib/cryptography.ts"],"names":[],"mappings":"OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB;OAClD,EAAE,WAAW,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,YAAY;OAClE,EAAE,IAAI,EAAE,MAAM,oBAAoB;AAGzC;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,MAAM,kBAAkB,GAAG,UAAU;SAClC,OAAO,CAAC,gCAAgC,EAAE,EAAE,CAAC;SAC7C,OAAO,CAAC,6BAA6B,EAAE,EAAE,CAAC,CAAC;IAE9C,qFAAqF;IACrF,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;IAC7D,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAEtE,IAAI,eAAe,KAAK,CAAC,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,MAAM,eAAe,GAAG,UAAU,CAAC,QAAQ,CAAC,eAAe,GAAG,CAAC,EAAE,eAAe,GAAG,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MAAM,kBAAkB,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;YAC3E,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,mBAAmB,CAAC;gBAC7C,kBAAkB;aACnB,CAAC,CAAC;YAEH,MAAM,UAAU,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAE9C,OAAO;gBACL,UAAU,EAAE,IAAI,UAAU,CAAC,UAAU,CAAC;gBACtC,eAAe,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC;aAC5C,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC1E,MAAM,CAAC,MAAM,6BAA6B,GAAG,aAAa,CAAC;AAC3D,MAAM,CAAC,MAAM,gCAAgC,GAAG,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@privy-io/node",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "The official TypeScript library for the Privy API API",
|
|
5
5
|
"author": "Privy API <support@privy.io>",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"@noble/curves": "^1.9.7",
|
|
32
32
|
"@noble/hashes": "^1.8.0",
|
|
33
33
|
"@scure/base": "^1.2.5",
|
|
34
|
-
"jose": "^6.1.0",
|
|
35
34
|
"canonicalize": "^2.1.0",
|
|
36
|
-
"
|
|
35
|
+
"jose": "^6.1.0",
|
|
36
|
+
"lru-cache": "^11.1.0",
|
|
37
|
+
"svix": ">=1.29.0 <= 1.37.0 || ^1.40.0"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"viem": "^2.24.1"
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ClientOptions } from "../client.mjs";
|
|
2
|
+
import { PrivyWebhooksService } from "./services/webhooks.mjs";
|
|
2
3
|
import { PrivyWalletsService } from "./services/wallets.mjs";
|
|
3
4
|
import { PrivyPoliciesService } from "./services/policies.mjs";
|
|
4
5
|
import { PrivyTransactionsService } from "./services/transactions.mjs";
|
|
@@ -12,9 +13,11 @@ export interface PrivyClientOptions extends InternalClientOptions {
|
|
|
12
13
|
apiUrl?: string;
|
|
13
14
|
authorizationKeyCacheMaxCapacity?: number;
|
|
14
15
|
jwtVerificationKey?: string;
|
|
16
|
+
webhookSigningSecret?: string;
|
|
15
17
|
}
|
|
16
18
|
export declare class PrivyClient {
|
|
17
19
|
private privyApiClient;
|
|
20
|
+
private webhooksService;
|
|
18
21
|
private walletsService;
|
|
19
22
|
private policiesService;
|
|
20
23
|
private transactionsService;
|
|
@@ -22,7 +25,8 @@ export declare class PrivyClient {
|
|
|
22
25
|
private usersService;
|
|
23
26
|
private utilsService;
|
|
24
27
|
private jwtExchangeService;
|
|
25
|
-
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity, defaultHeaders, jwtVerificationKey, ...clientOptions }: PrivyClientOptions);
|
|
28
|
+
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity, defaultHeaders, jwtVerificationKey, webhookSigningSecret, ...clientOptions }: PrivyClientOptions);
|
|
29
|
+
webhooks(): PrivyWebhooksService;
|
|
26
30
|
wallets(): PrivyWalletsService;
|
|
27
31
|
policies(): PrivyPoliciesService;
|
|
28
32
|
transactions(): PrivyTransactionsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivyClient.d.mts","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":"OAAO,EAAE,aAAa,EAAY;OAC3B,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,wBAAwB,EAAE;OAC5B,EAAE,sBAAsB,EAAE;OAC1B,EAAE,iBAAiB,EAAE;OACrB,EAAE,UAAU,EAAE;AAKrB,KAAK,qBAA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,OAAO,CAAC,kBAAkB,CAAqB;gBAO5B,EACjB,KAAK,EACL,SAAS,EACT,MAAM,EACN,gCAA+E,EAC/E,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,aAAa,EACjB,EAAE,kBAAkB;IAgCd,QAAQ,IAAI,oBAAoB;IAIhC,OAAO,IAAI,mBAAmB;IAI9B,QAAQ,IAAI,oBAAoB;IAIhC,YAAY,IAAI,wBAAwB;IAIxC,UAAU,IAAI,sBAAsB;IAIpC,KAAK,IAAI,iBAAiB;IAI1B,KAAK,IAAI,UAAU;CAG3B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ClientOptions } from "../client.js";
|
|
2
|
+
import { PrivyWebhooksService } from "./services/webhooks.js";
|
|
2
3
|
import { PrivyWalletsService } from "./services/wallets.js";
|
|
3
4
|
import { PrivyPoliciesService } from "./services/policies.js";
|
|
4
5
|
import { PrivyTransactionsService } from "./services/transactions.js";
|
|
@@ -12,9 +13,11 @@ export interface PrivyClientOptions extends InternalClientOptions {
|
|
|
12
13
|
apiUrl?: string;
|
|
13
14
|
authorizationKeyCacheMaxCapacity?: number;
|
|
14
15
|
jwtVerificationKey?: string;
|
|
16
|
+
webhookSigningSecret?: string;
|
|
15
17
|
}
|
|
16
18
|
export declare class PrivyClient {
|
|
17
19
|
private privyApiClient;
|
|
20
|
+
private webhooksService;
|
|
18
21
|
private walletsService;
|
|
19
22
|
private policiesService;
|
|
20
23
|
private transactionsService;
|
|
@@ -22,7 +25,8 @@ export declare class PrivyClient {
|
|
|
22
25
|
private usersService;
|
|
23
26
|
private utilsService;
|
|
24
27
|
private jwtExchangeService;
|
|
25
|
-
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity, defaultHeaders, jwtVerificationKey, ...clientOptions }: PrivyClientOptions);
|
|
28
|
+
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity, defaultHeaders, jwtVerificationKey, webhookSigningSecret, ...clientOptions }: PrivyClientOptions);
|
|
29
|
+
webhooks(): PrivyWebhooksService;
|
|
26
30
|
wallets(): PrivyWalletsService;
|
|
27
31
|
policies(): PrivyPoliciesService;
|
|
28
32
|
transactions(): PrivyTransactionsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivyClient.d.ts","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":"OAAO,EAAE,aAAa,EAAY;OAC3B,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,wBAAwB,EAAE;OAC5B,EAAE,sBAAsB,EAAE;OAC1B,EAAE,iBAAiB,EAAE;OACrB,EAAE,UAAU,EAAE;AAKrB,KAAK,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC;AAEpF,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"PrivyClient.d.ts","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":"OAAO,EAAE,aAAa,EAAY;OAC3B,EAAE,oBAAoB,EAAE;OACxB,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,wBAAwB,EAAE;OAC5B,EAAE,sBAAsB,EAAE;OAC1B,EAAE,iBAAiB,EAAE;OACrB,EAAE,UAAU,EAAE;AAKrB,KAAK,qBAAqB,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC;AAEpF,MAAM,WAAW,kBAAmB,SAAQ,qBAAqB;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAID,qBAAa,WAAW;IACtB,OAAO,CAAC,cAAc,CAAW;IACjC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,mBAAmB,CAA2B;IACtD,OAAO,CAAC,iBAAiB,CAAyB;IAClD,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,YAAY,CAAa;IACjC,OAAO,CAAC,kBAAkB,CAAqB;gBAO5B,EACjB,KAAK,EACL,SAAS,EACT,MAAM,EACN,gCAA+E,EAC/E,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,aAAa,EACjB,EAAE,kBAAkB;IAgCd,QAAQ,IAAI,oBAAoB;IAIhC,OAAO,IAAI,mBAAmB;IAI9B,QAAQ,IAAI,oBAAoB;IAIhC,YAAY,IAAI,wBAAwB;IAIxC,UAAU,IAAI,sBAAsB;IAIpC,KAAK,IAAI,iBAAiB;IAI1B,KAAK,IAAI,UAAU;CAG3B"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PrivyClient = void 0;
|
|
4
4
|
const client_1 = require("../client.js");
|
|
5
|
+
const webhooks_1 = require("./services/webhooks.js");
|
|
5
6
|
const wallets_1 = require("./services/wallets.js");
|
|
6
7
|
const policies_1 = require("./services/policies.js");
|
|
7
8
|
const transactions_1 = require("./services/transactions.js");
|
|
@@ -17,7 +18,7 @@ class PrivyClient {
|
|
|
17
18
|
_jwtExchange() {
|
|
18
19
|
return this.jwtExchangeService;
|
|
19
20
|
}
|
|
20
|
-
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity = DEFAULT_AUTHORIZATION_KEY_CACHE_MAX_CAPACITY, defaultHeaders, jwtVerificationKey, ...clientOptions }) {
|
|
21
|
+
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity = DEFAULT_AUTHORIZATION_KEY_CACHE_MAX_CAPACITY, defaultHeaders, jwtVerificationKey, webhookSigningSecret, ...clientOptions }) {
|
|
21
22
|
this.privyApiClient = new client_1.PrivyAPI({
|
|
22
23
|
...clientOptions,
|
|
23
24
|
appID: appId,
|
|
@@ -42,6 +43,10 @@ class PrivyClient {
|
|
|
42
43
|
this.keyQuorumsService = new key_quorums_1.PrivyKeyQuorumsService(this.privyApiClient, this);
|
|
43
44
|
this.usersService = new users_1.PrivyUsersService(this.privyApiClient, appJwks);
|
|
44
45
|
this.utilsService = new utils_1.PrivyUtils(this.privyApiClient, this, appJwks);
|
|
46
|
+
this.webhooksService = new webhooks_1.PrivyWebhooksService(webhookSigningSecret);
|
|
47
|
+
}
|
|
48
|
+
webhooks() {
|
|
49
|
+
return this.webhooksService;
|
|
45
50
|
}
|
|
46
51
|
wallets() {
|
|
47
52
|
return this.walletsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivyClient.js","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AACpD,mDAAyD;AACzD,qDAA2D;AAC3D,6DAAmE;AACnE,2DAAgE;AAChE,+CAAqD;AACrD,+CAA8C;AAC9C,yDAAyD;AACzD,2CAAqC;AACrC,yCAAiD;
|
|
1
|
+
{"version":3,"file":"PrivyClient.js","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":";;;AAAA,yCAAoD;AACpD,qDAA2D;AAC3D,mDAAyD;AACzD,qDAA2D;AAC3D,6DAAmE;AACnE,2DAAgE;AAChE,+CAAqD;AACrD,+CAA8C;AAC9C,yDAAyD;AACzD,2CAAqC;AACrC,yCAAiD;AAajD,MAAM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AAC,CAAC;QAC/E,IAAI,CAAC,YAAY,GAAG,IAAI,yBAAiB,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACxE,IAAI,CAAC,YAAY,GAAG,IAAI,kBAAU,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACvE,IAAI,CAAC,eAAe,GAAG,IAAI,+BAAoB,CAAC,oBAAoB,CAAC,CAAC;IACxE,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;CACF;AApFD,kCAoFC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PrivyAPI } from "../client.mjs";
|
|
2
|
+
import { PrivyWebhooksService } from "./services/webhooks.mjs";
|
|
2
3
|
import { PrivyWalletsService } from "./services/wallets.mjs";
|
|
3
4
|
import { PrivyPoliciesService } from "./services/policies.mjs";
|
|
4
5
|
import { PrivyTransactionsService } from "./services/transactions.mjs";
|
|
@@ -14,7 +15,7 @@ export class PrivyClient {
|
|
|
14
15
|
_jwtExchange() {
|
|
15
16
|
return this.jwtExchangeService;
|
|
16
17
|
}
|
|
17
|
-
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity = DEFAULT_AUTHORIZATION_KEY_CACHE_MAX_CAPACITY, defaultHeaders, jwtVerificationKey, ...clientOptions }) {
|
|
18
|
+
constructor({ appId, appSecret, apiUrl, authorizationKeyCacheMaxCapacity = DEFAULT_AUTHORIZATION_KEY_CACHE_MAX_CAPACITY, defaultHeaders, jwtVerificationKey, webhookSigningSecret, ...clientOptions }) {
|
|
18
19
|
this.privyApiClient = new PrivyAPI({
|
|
19
20
|
...clientOptions,
|
|
20
21
|
appID: appId,
|
|
@@ -39,6 +40,10 @@ export class PrivyClient {
|
|
|
39
40
|
this.keyQuorumsService = new PrivyKeyQuorumsService(this.privyApiClient, this);
|
|
40
41
|
this.usersService = new PrivyUsersService(this.privyApiClient, appJwks);
|
|
41
42
|
this.utilsService = new PrivyUtils(this.privyApiClient, this, appJwks);
|
|
43
|
+
this.webhooksService = new PrivyWebhooksService(webhookSigningSecret);
|
|
44
|
+
}
|
|
45
|
+
webhooks() {
|
|
46
|
+
return this.webhooksService;
|
|
42
47
|
}
|
|
43
48
|
wallets() {
|
|
44
49
|
return this.walletsService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivyClient.mjs","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":"OAAO,EAAiB,QAAQ,EAAE;OAC3B,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,wBAAwB,EAAE;OAC5B,EAAE,sBAAsB,EAAE;OAC1B,EAAE,iBAAiB,EAAE;OACrB,EAAE,UAAU,EAAE;OACd,EAAE,kBAAkB,EAAE;OACtB,EAAE,OAAO,EAAE;OACX,EAAE,kBAAkB,EAAE;
|
|
1
|
+
{"version":3,"file":"PrivyClient.mjs","sourceRoot":"","sources":["../src/public-api/PrivyClient.ts"],"names":[],"mappings":"OAAO,EAAiB,QAAQ,EAAE;OAC3B,EAAE,oBAAoB,EAAE;OACxB,EAAE,mBAAmB,EAAE;OACvB,EAAE,oBAAoB,EAAE;OACxB,EAAE,wBAAwB,EAAE;OAC5B,EAAE,sBAAsB,EAAE;OAC1B,EAAE,iBAAiB,EAAE;OACrB,E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c,CAAC,CAAC;QAC7E,IAAI,CAAC,iBAAiB,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;QAC/E,IAAI,CAAC,YAAY,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACxE,IAAI,CAAC,YAAY,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QACvE,IAAI,CAAC,eAAe,GAAG,IAAI,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;IACxE,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEM,OAAO;QACZ,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,QAAQ;QACb,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,CAAC;IAEM,YAAY;QACjB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;IAEM,UAAU;QACf,OAAO,IAAI,CAAC,iBAAiB,CAAC;IAChC,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;CACF"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PrivyAPIError } from "../../core/error.mjs";
|
|
2
|
+
export declare class PrivyWebhooksService {
|
|
3
|
+
private webhookSigningSecret;
|
|
4
|
+
constructor(webhookSigningSecret?: string);
|
|
5
|
+
/**
|
|
6
|
+
* Verifies a webhook request by checking the signature and asserting the timestamp is within 5
|
|
7
|
+
* minutes of the current time to prevent replay attacks.
|
|
8
|
+
*
|
|
9
|
+
* @param input.payload The raw JSON payload/body of the webhook request. This must be unaltered or signature verification will fail.
|
|
10
|
+
* @param input.headers A JSON object containing the webhook's ID, timestamp, and signature sent in the headers of the webhook request. This object must contain `id`, `timestamp`, and `signature` keys.
|
|
11
|
+
* @param input.signing_secret The webhook secret to use for verifying the webhook request.
|
|
12
|
+
* @returns verified payload if the webhook signature is valid otherwise throws.
|
|
13
|
+
*/
|
|
14
|
+
verify({ payload, svix, signing_secret }: PrivyWebhooksService.VerifyInput): Promise<unknown>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The namespace for types related to the Webhooks service class.
|
|
18
|
+
* @see {@link PrivyWebhooksService} class.
|
|
19
|
+
*/
|
|
20
|
+
export declare namespace PrivyWebhooksService {
|
|
21
|
+
/** The input type for the {@link PrivyWebhooksService.verify} method. */
|
|
22
|
+
type VerifyInput = {
|
|
23
|
+
payload: Object;
|
|
24
|
+
svix: {
|
|
25
|
+
id: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
signature: string;
|
|
28
|
+
};
|
|
29
|
+
signing_secret?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare class InvalidWebhookError extends PrivyAPIError {
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=webhooks.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.d.mts","sourceRoot":"","sources":["../../src/public-api/services/webhooks.ts"],"names":[],"mappings":"OACO,EAAE,aAAa,EAAE;AAExB,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,oBAAoB,CAAqB;gBAErC,oBAAoB,CAAC,EAAE,MAAM;IAIzC;;;;;;;;OAQG;IACG,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,oBAAoB,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAuBpG;AAGD;;;GAGG;AACH,yBAAiB,oBAAoB,CAAC;IACpC,yEAAyE;IACzE,KAAY,WAAW,GAAG;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM,CAAC;YACX,SAAS,EAAE,MAAM,CAAC;YAClB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAA;QACD,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,qBAAa,mBAAoB,SAAQ,aAAa;CAAG"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PrivyAPIError } from "../../core/error.js";
|
|
2
|
+
export declare class PrivyWebhooksService {
|
|
3
|
+
private webhookSigningSecret;
|
|
4
|
+
constructor(webhookSigningSecret?: string);
|
|
5
|
+
/**
|
|
6
|
+
* Verifies a webhook request by checking the signature and asserting the timestamp is within 5
|
|
7
|
+
* minutes of the current time to prevent replay attacks.
|
|
8
|
+
*
|
|
9
|
+
* @param input.payload The raw JSON payload/body of the webhook request. This must be unaltered or signature verification will fail.
|
|
10
|
+
* @param input.headers A JSON object containing the webhook's ID, timestamp, and signature sent in the headers of the webhook request. This object must contain `id`, `timestamp`, and `signature` keys.
|
|
11
|
+
* @param input.signing_secret The webhook secret to use for verifying the webhook request.
|
|
12
|
+
* @returns verified payload if the webhook signature is valid otherwise throws.
|
|
13
|
+
*/
|
|
14
|
+
verify({ payload, svix, signing_secret }: PrivyWebhooksService.VerifyInput): Promise<unknown>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The namespace for types related to the Webhooks service class.
|
|
18
|
+
* @see {@link PrivyWebhooksService} class.
|
|
19
|
+
*/
|
|
20
|
+
export declare namespace PrivyWebhooksService {
|
|
21
|
+
/** The input type for the {@link PrivyWebhooksService.verify} method. */
|
|
22
|
+
type VerifyInput = {
|
|
23
|
+
payload: Object;
|
|
24
|
+
svix: {
|
|
25
|
+
id: string;
|
|
26
|
+
timestamp: string;
|
|
27
|
+
signature: string;
|
|
28
|
+
};
|
|
29
|
+
signing_secret?: string;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare class InvalidWebhookError extends PrivyAPIError {
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=webhooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/public-api/services/webhooks.ts"],"names":[],"mappings":"OACO,EAAE,aAAa,EAAE;AAExB,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,oBAAoB,CAAqB;gBAErC,oBAAoB,CAAC,EAAE,MAAM;IAIzC;;;;;;;;OAQG;IACG,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,EAAE,oBAAoB,CAAC,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC;CAuBpG;AAGD;;;GAGG;AACH,yBAAiB,oBAAoB,CAAC;IACpC,yEAAyE;IACzE,KAAY,WAAW,GAAG;QACxB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE;YACJ,EAAE,EAAE,MAAM,CAAC;YACX,SAAS,EAAE,MAAM,CAAC;YAClB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAA;QACD,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;CACH;AAED,qBAAa,mBAAoB,SAAQ,aAAa;CAAG"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InvalidWebhookError = exports.PrivyWebhooksService = void 0;
|
|
4
|
+
const svix_1 = require("svix");
|
|
5
|
+
const error_1 = require("../../core/error.js");
|
|
6
|
+
class PrivyWebhooksService {
|
|
7
|
+
constructor(webhookSigningSecret) {
|
|
8
|
+
this.webhookSigningSecret = webhookSigningSecret;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Verifies a webhook request by checking the signature and asserting the timestamp is within 5
|
|
12
|
+
* minutes of the current time to prevent replay attacks.
|
|
13
|
+
*
|
|
14
|
+
* @param input.payload The raw JSON payload/body of the webhook request. This must be unaltered or signature verification will fail.
|
|
15
|
+
* @param input.headers A JSON object containing the webhook's ID, timestamp, and signature sent in the headers of the webhook request. This object must contain `id`, `timestamp`, and `signature` keys.
|
|
16
|
+
* @param input.signing_secret The webhook secret to use for verifying the webhook request.
|
|
17
|
+
* @returns verified payload if the webhook signature is valid otherwise throws.
|
|
18
|
+
*/
|
|
19
|
+
async verify({ payload, svix, signing_secret }) {
|
|
20
|
+
const signingSecret = signing_secret ?? this.webhookSigningSecret;
|
|
21
|
+
if (!signingSecret) {
|
|
22
|
+
throw new InvalidWebhookError('Webhook signing secret is required');
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const webhook = new svix_1.Webhook(signingSecret);
|
|
26
|
+
const stringPayload = JSON.stringify(payload);
|
|
27
|
+
const svixHeaders = {
|
|
28
|
+
'svix-id': svix.id,
|
|
29
|
+
'svix-timestamp': svix.timestamp,
|
|
30
|
+
'svix-signature': svix.signature,
|
|
31
|
+
};
|
|
32
|
+
return webhook.verify(stringPayload, svixHeaders);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
if (error instanceof Error) {
|
|
36
|
+
throw new InvalidWebhookError(`Webhook verification failed: ${error.message}`);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
throw new InvalidWebhookError('Webhook verification failed');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.PrivyWebhooksService = PrivyWebhooksService;
|
|
45
|
+
class InvalidWebhookError extends error_1.PrivyAPIError {
|
|
46
|
+
}
|
|
47
|
+
exports.InvalidWebhookError = InvalidWebhookError;
|
|
48
|
+
//# sourceMappingURL=webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/public-api/services/webhooks.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+CAAiD;AAEjD,MAAa,oBAAoB;IAG/B,YAAY,oBAA6B;QACvC,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAoC;QAC9E,MAAM,aAAa,GAAG,cAAc,IAAI,IAAI,CAAC,oBAAoB,CAAC;QAClE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,mBAAmB,CAAC,oCAAoC,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,cAAO,CAAC,aAAa,CAAC,CAAC;YAC3C,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAC9C,MAAM,WAAW,GAAG;gBAClB,SAAS,EAAE,IAAI,CAAC,EAAE;gBAClB,gBAAgB,EAAE,IAAI,CAAC,SAAS;gBAChC,gBAAgB,EAAE,IAAI,CAAC,SAAS;aACjC,CAAC;YACF,OAAO,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,MAAM,IAAI,mBAAmB,CAAC,gCAAgC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAvCD,oDAuCC;AAoBD,MAAa,mBAAoB,SAAQ,qBAAa;CAAG;AAAzD,kDAAyD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Webhook } from 'svix';
|
|
2
|
+
import { PrivyAPIError } from "../../core/error.mjs";
|
|
3
|
+
export class PrivyWebhooksService {
|
|
4
|
+
constructor(webhookSigningSecret) {
|
|
5
|
+
this.webhookSigningSecret = webhookSigningSecret;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Verifies a webhook request by checking the signature and asserting the timestamp is within 5
|
|
9
|
+
* minutes of the current time to prevent replay attacks.
|
|
10
|
+
*
|
|
11
|
+
* @param input.payload The raw JSON payload/body of the webhook request. This must be unaltered or signature verification will fail.
|
|
12
|
+
* @param input.headers A JSON object containing the webhook's ID, timestamp, and signature sent in the headers of the webhook request. This object must contain `id`, `timestamp`, and `signature` keys.
|
|
13
|
+
* @param input.signing_secret The webhook secret to use for verifying the webhook request.
|
|
14
|
+
* @returns verified payload if the webhook signature is valid otherwise throws.
|
|
15
|
+
*/
|
|
16
|
+
async verify({ payload, svix, signing_secret }) {
|
|
17
|
+
const signingSecret = signing_secret ?? this.webhookSigningSecret;
|
|
18
|
+
if (!signingSecret) {
|
|
19
|
+
throw new InvalidWebhookError('Webhook signing secret is required');
|
|
20
|
+
}
|
|
21
|
+
try {
|
|
22
|
+
const webhook = new Webhook(signingSecret);
|
|
23
|
+
const stringPayload = JSON.stringify(payload);
|
|
24
|
+
const svixHeaders = {
|
|
25
|
+
'svix-id': svix.id,
|
|
26
|
+
'svix-timestamp': svix.timestamp,
|
|
27
|
+
'svix-signature': svix.signature,
|
|
28
|
+
};
|
|
29
|
+
return webhook.verify(stringPayload, svixHeaders);
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
if (error instanceof Error) {
|
|
33
|
+
throw new InvalidWebhookError(`Webhook verification failed: ${error.message}`);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
throw new InvalidWebhookError('Webhook verification failed');
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export class InvalidWebhookError extends PrivyAPIError {
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=webhooks.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.mjs","sourceRoot":"","sources":["../../src/public-api/services/webhooks.ts"],"names":[],"mappings":"OAAO,EAAE,OAAO,EAAE,MAAM,MAAM;OACvB,EAAE,aAAa,EAAE;AAExB,MAAM,OAAO,oBAAoB;IAG/B,YAAY,oBAA6B;QACvC,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;IACnD,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAoC;QAC9E,MAAM,aAAa,GAAG,cAAc,IAAI,IAAI,CAAC,oBAAoB,CAAC;QAClE,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,mBAAmB,CAAC,oCAAoC,CAAC,CAAC;QACtE,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;YAC3C,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAC9C,MAAM,WAAW,GAAG;gBAClB,SAAS,EAAE,IAAI,CAAC,EAAE;gBAClB,gBAAgB,EAAE,IAAI,CAAC,SAAS;gBAChC,gBAAgB,EAAE,IAAI,CAAC,SAAS;aACjC,CAAC;YACF,OAAO,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,MAAM,IAAI,mBAAmB,CAAC,gCAAgC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;YACjF,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,mBAAmB,CAAC,6BAA6B,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAoBD,MAAM,OAAO,mBAAoB,SAAQ,aAAa;CAAG"}
|
|
@@ -18,7 +18,7 @@ export interface TransactionGetResponse {
|
|
|
18
18
|
id: string;
|
|
19
19
|
caip2: string;
|
|
20
20
|
created_at: number;
|
|
21
|
-
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced';
|
|
21
|
+
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'finalized' | 'provider_error' | 'pending';
|
|
22
22
|
transaction_hash: string | null;
|
|
23
23
|
wallet_id: string;
|
|
24
24
|
sponsored?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.mts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGzF;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,
|
|
1
|
+
{"version":3,"file":"transactions.d.mts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGzF;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EACF,aAAa,GACb,WAAW,GACX,oBAAoB,GACpB,QAAQ,GACR,UAAU,GACV,WAAW,GACX,gBAAgB,GAChB,SAAS,CAAC;IAEd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,sBAAsB,IAAI,sBAAsB,EAAE,CAAC;CAClE"}
|
|
@@ -18,7 +18,7 @@ export interface TransactionGetResponse {
|
|
|
18
18
|
id: string;
|
|
19
19
|
caip2: string;
|
|
20
20
|
created_at: number;
|
|
21
|
-
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced';
|
|
21
|
+
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'finalized' | 'provider_error' | 'pending';
|
|
22
22
|
transaction_hash: string | null;
|
|
23
23
|
wallet_id: string;
|
|
24
24
|
sponsored?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGzF;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGzF;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IAEX,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,MAAM,CAAC;IAEnB,MAAM,EACF,aAAa,GACb,WAAW,GACX,oBAAoB,GACpB,QAAQ,GACR,UAAU,GACV,WAAW,GACX,gBAAgB,GAChB,SAAS,CAAC;IAEd,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,SAAS,EAAE,MAAM,CAAC;IAElB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,sBAAsB,IAAI,sBAAsB,EAAE,CAAC;CAClE"}
|