@privy-io/api-types 0.9.0 → 0.11.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 +46 -0
- package/client.d.mts +40 -43
- package/client.d.mts.map +1 -1
- package/client.d.ts +40 -43
- package/client.d.ts.map +1 -1
- package/client.js +28 -20
- package/client.js.map +1 -1
- package/client.mjs +29 -21
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +128 -86
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +128 -86
- package/resources/accounts.d.ts.map +1 -1
- package/resources/aggregations.d.mts +43 -43
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +43 -43
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/apps.d.mts +169 -135
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +169 -135
- package/resources/apps.d.ts.map +1 -1
- package/resources/client-auth.d.mts +931 -947
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +931 -947
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/client-auth.js.map +1 -1
- package/resources/client-auth.mjs.map +1 -1
- package/resources/embedded-wallets.d.mts +122 -122
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +122 -122
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/fiat.d.mts +110 -0
- package/resources/fiat.d.mts.map +1 -0
- package/resources/fiat.d.ts +110 -0
- package/resources/fiat.d.ts.map +1 -0
- package/resources/fiat.js +9 -0
- package/resources/fiat.js.map +1 -0
- package/resources/fiat.mjs +5 -0
- package/resources/fiat.mjs.map +1 -0
- package/resources/funding.d.mts +86 -86
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +86 -86
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +20 -18
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +20 -18
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -1
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +269 -265
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +269 -265
- package/resources/intents.d.ts.map +1 -1
- package/resources/key-quorums.d.mts +15 -146
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +15 -146
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +0 -92
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +0 -92
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +12 -20
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +12 -20
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/organizations.d.mts +65 -0
- package/resources/organizations.d.mts.map +1 -0
- package/resources/organizations.d.ts +65 -0
- package/resources/organizations.d.ts.map +1 -0
- package/resources/organizations.js +9 -0
- package/resources/organizations.js.map +1 -0
- package/resources/organizations.mjs +5 -0
- package/resources/organizations.mjs.map +1 -0
- package/resources/policies.d.mts +261 -553
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +261 -553
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +0 -229
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +0 -229
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +28 -28
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +28 -28
- package/resources/shared.d.ts.map +1 -1
- package/resources/swaps.d.mts +6 -9
- package/resources/swaps.d.mts.map +1 -1
- package/resources/swaps.d.ts +6 -9
- package/resources/swaps.d.ts.map +1 -1
- package/resources/swaps.js.map +1 -1
- package/resources/swaps.mjs.map +1 -1
- package/resources/transactions.d.mts +80 -96
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +80 -96
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +0 -17
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +0 -17
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +480 -815
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +480 -815
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +0 -272
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +0 -272
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +302 -145
- package/resources/wallet-actions.d.mts.map +1 -1
- package/resources/wallet-actions.d.ts +302 -145
- package/resources/wallet-actions.d.ts.map +1 -1
- package/resources/wallets/index.d.mts +1 -1
- package/resources/wallets/index.d.mts.map +1 -1
- package/resources/wallets/index.d.ts +1 -1
- package/resources/wallets/index.d.ts.map +1 -1
- package/resources/wallets/index.js.map +1 -1
- package/resources/wallets/index.mjs.map +1 -1
- package/resources/wallets/transactions.d.mts +7 -2
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +7 -2
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +1 -1
- package/resources/wallets/transactions.mjs +1 -1
- package/resources/wallets/wallets.d.mts +1592 -1580
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +1592 -1580
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +45 -103
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +45 -103
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +935 -877
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +935 -877
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/yield.d.mts +157 -157
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +157 -157
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +650 -618
- package/src/internal/types.ts +6 -8
- package/src/resources/accounts.ts +157 -103
- package/src/resources/aggregations.ts +55 -55
- package/src/resources/apps.ts +221 -178
- package/src/resources/client-auth.ts +1271 -1315
- package/src/resources/embedded-wallets.ts +160 -160
- package/src/resources/fiat.ts +177 -0
- package/src/resources/funding.ts +130 -130
- package/src/resources/index.ts +551 -542
- package/src/resources/intents.ts +326 -322
- package/src/resources/key-quorums.ts +16 -218
- package/src/resources/kraken-embed.ts +14 -22
- package/src/resources/organizations.ts +82 -0
- package/src/resources/policies.ts +383 -848
- package/src/resources/shared.ts +34 -34
- package/src/resources/swaps.ts +5 -10
- package/src/resources/transactions.ts +116 -136
- package/src/resources/users.ts +693 -1160
- package/src/resources/wallet-actions.ts +392 -185
- package/src/resources/wallets/index.ts +160 -156
- package/src/resources/wallets/transactions.ts +18 -3
- package/src/resources/wallets/wallets.ts +2123 -2113
- package/src/resources/webhooks.ts +1172 -1100
- package/src/resources/yield.ts +188 -188
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
package/resources/shared.d.ts
CHANGED
|
@@ -2,25 +2,32 @@ import { APIResource } from "../core/resource.js";
|
|
|
2
2
|
export declare class Shared extends APIResource {
|
|
3
3
|
}
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
5
|
+
* A monetary value with its currency denomination.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
8
|
-
|
|
7
|
+
export interface CurrencyAmount {
|
|
8
|
+
/**
|
|
9
|
+
* Currency code
|
|
10
|
+
*/
|
|
11
|
+
currency: 'usd';
|
|
12
|
+
/**
|
|
13
|
+
* The monetary value as a string.
|
|
14
|
+
*/
|
|
15
|
+
value: string;
|
|
9
16
|
}
|
|
10
|
-
/**
|
|
11
|
-
* A P-256 (secp256r1) public key.
|
|
12
|
-
*/
|
|
13
|
-
export type P256PublicKey = string;
|
|
14
17
|
/**
|
|
15
18
|
* A unique identifier for a key quorum.
|
|
16
19
|
*/
|
|
17
20
|
export type KeyQuorumID = string;
|
|
18
21
|
/**
|
|
19
|
-
*
|
|
22
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
23
|
+
* not specify an owner.
|
|
20
24
|
*/
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
export type OwnerIDInput = string | null;
|
|
26
|
+
/**
|
|
27
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
28
|
+
* null to remove the current owner.
|
|
29
|
+
*/
|
|
30
|
+
export type OwnerInput = OwnerInputUser | OwnerInputPublicKey;
|
|
24
31
|
/**
|
|
25
32
|
* Owner input specifying a P-256 public key.
|
|
26
33
|
*/
|
|
@@ -31,29 +38,22 @@ export interface OwnerInputPublicKey {
|
|
|
31
38
|
public_key: P256PublicKey;
|
|
32
39
|
}
|
|
33
40
|
/**
|
|
34
|
-
*
|
|
35
|
-
* null to remove the current owner.
|
|
41
|
+
* Owner input specifying a Privy user ID.
|
|
36
42
|
*/
|
|
37
|
-
export
|
|
43
|
+
export interface OwnerInputUser {
|
|
44
|
+
user_id: string;
|
|
45
|
+
}
|
|
38
46
|
/**
|
|
39
|
-
*
|
|
40
|
-
* not specify an owner.
|
|
47
|
+
* A P-256 (secp256r1) public key.
|
|
41
48
|
*/
|
|
42
|
-
export type
|
|
49
|
+
export type P256PublicKey = string;
|
|
43
50
|
/**
|
|
44
|
-
* A
|
|
51
|
+
* A simple success response.
|
|
45
52
|
*/
|
|
46
|
-
export interface
|
|
47
|
-
|
|
48
|
-
* Currency code
|
|
49
|
-
*/
|
|
50
|
-
currency: 'usd';
|
|
51
|
-
/**
|
|
52
|
-
* The monetary value as a string.
|
|
53
|
-
*/
|
|
54
|
-
value: string;
|
|
53
|
+
export interface SuccessResponse {
|
|
54
|
+
success: boolean;
|
|
55
55
|
}
|
|
56
56
|
export declare namespace Shared {
|
|
57
|
-
export { type
|
|
57
|
+
export { type CurrencyAmount as CurrencyAmount, type KeyQuorumID as KeyQuorumID, type OwnerIDInput as OwnerIDInput, type OwnerInput as OwnerInput, type OwnerInputPublicKey as OwnerInputPublicKey, type OwnerInputUser as OwnerInputUser, type P256PublicKey as P256PublicKey, type SuccessResponse as SuccessResponse, };
|
|
58
58
|
}
|
|
59
59
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,MAAO,SAAQ,WAAW;CAAG;AAE1C;;GAEG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,MAAO,SAAQ,WAAW;CAAG;AAE1C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC;IAEhB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC;AAEjC;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,IAAI,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,mBAAmB,CAAC;AAE9D;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC;AAEnC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EACL,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/swaps.d.mts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as WalletsAPI from "./wallets/wallets.mjs";
|
|
2
3
|
export declare class Swaps extends APIResource {
|
|
3
4
|
}
|
|
4
|
-
/**
|
|
5
|
-
* Whether the swap amount refers to the input token or output token.
|
|
6
|
-
*/
|
|
7
|
-
export type SwapAmountType = 'exact_input' | 'exact_output';
|
|
8
5
|
/**
|
|
9
6
|
* Input for requesting a token swap quote.
|
|
10
7
|
*/
|
|
@@ -26,9 +23,9 @@ export interface SwapQuoteRequestBody {
|
|
|
26
23
|
*/
|
|
27
24
|
output_token: string;
|
|
28
25
|
/**
|
|
29
|
-
* Whether the
|
|
26
|
+
* Whether the amount refers to the input token or output token.
|
|
30
27
|
*/
|
|
31
|
-
amount_type?:
|
|
28
|
+
amount_type?: WalletsAPI.AmountType;
|
|
32
29
|
/**
|
|
33
30
|
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
|
|
34
31
|
* auto-slippage is used.
|
|
@@ -89,9 +86,9 @@ export interface SwapRequestBody {
|
|
|
89
86
|
*/
|
|
90
87
|
output_token: string;
|
|
91
88
|
/**
|
|
92
|
-
* Whether the
|
|
89
|
+
* Whether the amount refers to the input token or output token.
|
|
93
90
|
*/
|
|
94
|
-
amount_type?:
|
|
91
|
+
amount_type?: WalletsAPI.AmountType;
|
|
95
92
|
/**
|
|
96
93
|
* Address to receive the output tokens. Defaults to the wallet address if not
|
|
97
94
|
* specified.
|
|
@@ -103,6 +100,6 @@ export interface SwapRequestBody {
|
|
|
103
100
|
slippage_bps?: number;
|
|
104
101
|
}
|
|
105
102
|
export declare namespace Swaps {
|
|
106
|
-
export { type
|
|
103
|
+
export { type SwapQuoteRequestBody as SwapQuoteRequestBody, type SwapQuoteResponse as SwapQuoteResponse, type SwapRequestBody as SwapRequestBody, };
|
|
107
104
|
}
|
|
108
105
|
//# sourceMappingURL=swaps.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaps.d.mts","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,KAAM,SAAQ,WAAW;CAAG;AAEzC;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"swaps.d.mts","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;AAEtB,qBAAa,KAAM,SAAQ,WAAW;CAAG;AAEzC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IAEpC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/swaps.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as WalletsAPI from "./wallets/wallets.js";
|
|
2
3
|
export declare class Swaps extends APIResource {
|
|
3
4
|
}
|
|
4
|
-
/**
|
|
5
|
-
* Whether the swap amount refers to the input token or output token.
|
|
6
|
-
*/
|
|
7
|
-
export type SwapAmountType = 'exact_input' | 'exact_output';
|
|
8
5
|
/**
|
|
9
6
|
* Input for requesting a token swap quote.
|
|
10
7
|
*/
|
|
@@ -26,9 +23,9 @@ export interface SwapQuoteRequestBody {
|
|
|
26
23
|
*/
|
|
27
24
|
output_token: string;
|
|
28
25
|
/**
|
|
29
|
-
* Whether the
|
|
26
|
+
* Whether the amount refers to the input token or output token.
|
|
30
27
|
*/
|
|
31
|
-
amount_type?:
|
|
28
|
+
amount_type?: WalletsAPI.AmountType;
|
|
32
29
|
/**
|
|
33
30
|
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
|
|
34
31
|
* auto-slippage is used.
|
|
@@ -89,9 +86,9 @@ export interface SwapRequestBody {
|
|
|
89
86
|
*/
|
|
90
87
|
output_token: string;
|
|
91
88
|
/**
|
|
92
|
-
* Whether the
|
|
89
|
+
* Whether the amount refers to the input token or output token.
|
|
93
90
|
*/
|
|
94
|
-
amount_type?:
|
|
91
|
+
amount_type?: WalletsAPI.AmountType;
|
|
95
92
|
/**
|
|
96
93
|
* Address to receive the output tokens. Defaults to the wallet address if not
|
|
97
94
|
* specified.
|
|
@@ -103,6 +100,6 @@ export interface SwapRequestBody {
|
|
|
103
100
|
slippage_bps?: number;
|
|
104
101
|
}
|
|
105
102
|
export declare namespace Swaps {
|
|
106
|
-
export { type
|
|
103
|
+
export { type SwapQuoteRequestBody as SwapQuoteRequestBody, type SwapQuoteResponse as SwapQuoteResponse, type SwapRequestBody as SwapRequestBody, };
|
|
107
104
|
}
|
|
108
105
|
//# sourceMappingURL=swaps.d.ts.map
|
package/resources/swaps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaps.d.ts","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,KAAM,SAAQ,WAAW;CAAG;AAEzC;;GAEG;AACH,MAAM,
|
|
1
|
+
{"version":3,"file":"swaps.d.ts","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;AAEtB,qBAAa,KAAM,SAAQ,WAAW;CAAG;AAEzC;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IAEpC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC;IAEpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
package/resources/swaps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaps.js","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"swaps.js","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,MAAa,KAAM,SAAQ,sBAAW;CAAG;AAAzC,sBAAyC"}
|
package/resources/swaps.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swaps.mjs","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"swaps.mjs","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,KAAM,SAAQ,WAAW;CAAG"}
|
|
@@ -1,80 +1,37 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Operations related to transactions
|
|
6
|
-
*/
|
|
7
2
|
export declare class Transactions extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Get a transaction by transaction ID.
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* ```ts
|
|
13
|
-
* const transaction = await client.transactions.get(
|
|
14
|
-
* 'transaction_id',
|
|
15
|
-
* );
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
get(transactionID: string, options?: RequestOptions): APIPromise<Transaction>;
|
|
19
3
|
}
|
|
20
4
|
/**
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
export interface TransactionScanningRequestBody {
|
|
24
|
-
chain_id: string;
|
|
25
|
-
/**
|
|
26
|
-
* Additional information for Blockaid to validate against.
|
|
27
|
-
*/
|
|
28
|
-
metadata: TransactionScanningMetadata;
|
|
29
|
-
/**
|
|
30
|
-
* Raw RPC request to execute with the wallet.
|
|
31
|
-
*/
|
|
32
|
-
request: TransactionScanningRpcRequest;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The response from scanning a transaction.
|
|
36
|
-
*/
|
|
37
|
-
export interface TransactionScanningResponseBody {
|
|
38
|
-
/**
|
|
39
|
-
* The simulation result from a transaction scan.
|
|
40
|
-
*/
|
|
41
|
-
simulation: TransactionScanningSimulationResult;
|
|
42
|
-
/**
|
|
43
|
-
* The validation result from a transaction scan.
|
|
44
|
-
*/
|
|
45
|
-
validation: TransactionScanningValidationResult;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Additional information for Blockaid to validate against.
|
|
49
|
-
*/
|
|
50
|
-
export interface TransactionScanningMetadata {
|
|
51
|
-
domain: string;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Raw RPC request to execute with the wallet.
|
|
5
|
+
* A transaction from a Privy wallet.
|
|
55
6
|
*/
|
|
56
|
-
export interface
|
|
57
|
-
|
|
58
|
-
|
|
7
|
+
export interface Transaction {
|
|
8
|
+
id: string;
|
|
9
|
+
caip2: string;
|
|
10
|
+
created_at: number;
|
|
11
|
+
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'finalized' | 'provider_error' | 'pending';
|
|
12
|
+
transaction_hash: string | null;
|
|
13
|
+
wallet_id: string;
|
|
14
|
+
reference_id?: string | null;
|
|
15
|
+
sponsored?: boolean;
|
|
16
|
+
user_operation_hash?: string;
|
|
59
17
|
}
|
|
60
18
|
/**
|
|
61
|
-
* A
|
|
19
|
+
* A list of transactions.
|
|
62
20
|
*/
|
|
63
|
-
export interface
|
|
64
|
-
|
|
65
|
-
status: 'Error';
|
|
21
|
+
export interface TransactionList {
|
|
22
|
+
transactions: Array<Transaction>;
|
|
66
23
|
}
|
|
67
24
|
/**
|
|
68
|
-
*
|
|
25
|
+
* An asset diff representing assets entering/leaving a wallet.
|
|
69
26
|
*/
|
|
70
|
-
export interface
|
|
71
|
-
|
|
72
|
-
|
|
27
|
+
export interface TransactionScanningAssetDiff {
|
|
28
|
+
/**
|
|
29
|
+
* Information about the moving asset in a transaction scan.
|
|
30
|
+
*/
|
|
31
|
+
asset: TransactionScanningAssetInfo;
|
|
32
|
+
in: Array<TransactionScanningAssetValue>;
|
|
33
|
+
out: Array<TransactionScanningAssetValue>;
|
|
73
34
|
}
|
|
74
|
-
/**
|
|
75
|
-
* The validation result from a transaction scan.
|
|
76
|
-
*/
|
|
77
|
-
export type TransactionScanningValidationResult = TransactionScanningValidationErrorResult | TransactionScanningValidationSuccessResult;
|
|
78
35
|
/**
|
|
79
36
|
* Information about the moving asset in a transaction scan.
|
|
80
37
|
*/
|
|
@@ -93,15 +50,12 @@ export interface TransactionScanningAssetValue {
|
|
|
93
50
|
value?: string;
|
|
94
51
|
}
|
|
95
52
|
/**
|
|
96
|
-
*
|
|
53
|
+
* Decoded calldata from a scanned transaction.
|
|
97
54
|
*/
|
|
98
|
-
export interface
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
asset: TransactionScanningAssetInfo;
|
|
103
|
-
in: Array<TransactionScanningAssetValue>;
|
|
104
|
-
out: Array<TransactionScanningAssetValue>;
|
|
55
|
+
export interface TransactionScanningCalldata {
|
|
56
|
+
function_selector: string;
|
|
57
|
+
function_declaration?: string;
|
|
58
|
+
function_signature?: string;
|
|
105
59
|
}
|
|
106
60
|
/**
|
|
107
61
|
* An exposure representing assets approved to spend.
|
|
@@ -116,12 +70,10 @@ export interface TransactionScanningExposure {
|
|
|
116
70
|
};
|
|
117
71
|
}
|
|
118
72
|
/**
|
|
119
|
-
*
|
|
73
|
+
* Additional information for Blockaid to validate against.
|
|
120
74
|
*/
|
|
121
|
-
export interface
|
|
122
|
-
|
|
123
|
-
function_declaration?: string;
|
|
124
|
-
function_signature?: string;
|
|
75
|
+
export interface TransactionScanningMetadata {
|
|
76
|
+
domain: string;
|
|
125
77
|
}
|
|
126
78
|
/**
|
|
127
79
|
* The parameters of the scanned transaction.
|
|
@@ -140,6 +92,40 @@ export interface TransactionScanningParams {
|
|
|
140
92
|
to?: string;
|
|
141
93
|
value?: string;
|
|
142
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* The request body for scanning a transaction.
|
|
97
|
+
*/
|
|
98
|
+
export interface TransactionScanningRequestBody {
|
|
99
|
+
chain_id: string;
|
|
100
|
+
/**
|
|
101
|
+
* Additional information for Blockaid to validate against.
|
|
102
|
+
*/
|
|
103
|
+
metadata: TransactionScanningMetadata;
|
|
104
|
+
/**
|
|
105
|
+
* Raw RPC request to execute with the wallet.
|
|
106
|
+
*/
|
|
107
|
+
request: TransactionScanningRpcRequest;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The response from scanning a transaction.
|
|
111
|
+
*/
|
|
112
|
+
export interface TransactionScanningResponseBody {
|
|
113
|
+
/**
|
|
114
|
+
* The simulation result from a transaction scan.
|
|
115
|
+
*/
|
|
116
|
+
simulation: TransactionScanningSimulationResult;
|
|
117
|
+
/**
|
|
118
|
+
* The validation result from a transaction scan.
|
|
119
|
+
*/
|
|
120
|
+
validation: TransactionScanningValidationResult;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Raw RPC request to execute with the wallet.
|
|
124
|
+
*/
|
|
125
|
+
export interface TransactionScanningRpcRequest {
|
|
126
|
+
method: string;
|
|
127
|
+
params: Array<unknown>;
|
|
128
|
+
}
|
|
143
129
|
/**
|
|
144
130
|
* A failed simulation result from a transaction scan.
|
|
145
131
|
*/
|
|
@@ -147,6 +133,10 @@ export interface TransactionScanningSimulationErrorResult {
|
|
|
147
133
|
error: string;
|
|
148
134
|
status: 'Error';
|
|
149
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* The simulation result from a transaction scan.
|
|
138
|
+
*/
|
|
139
|
+
export type TransactionScanningSimulationResult = TransactionScanningSimulationErrorResult | TransactionScanningSimulationSuccessResult;
|
|
150
140
|
/**
|
|
151
141
|
* A successful simulation result from a transaction scan.
|
|
152
142
|
*/
|
|
@@ -160,30 +150,24 @@ export interface TransactionScanningSimulationSuccessResult {
|
|
|
160
150
|
params?: TransactionScanningParams;
|
|
161
151
|
}
|
|
162
152
|
/**
|
|
163
|
-
*
|
|
153
|
+
* A failed validation result from a transaction scan.
|
|
164
154
|
*/
|
|
165
|
-
export
|
|
155
|
+
export interface TransactionScanningValidationErrorResult {
|
|
156
|
+
error: string;
|
|
157
|
+
status: 'Error';
|
|
158
|
+
}
|
|
166
159
|
/**
|
|
167
|
-
*
|
|
160
|
+
* The validation result from a transaction scan.
|
|
168
161
|
*/
|
|
169
|
-
export
|
|
170
|
-
id: string;
|
|
171
|
-
caip2: string;
|
|
172
|
-
created_at: number;
|
|
173
|
-
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'finalized' | 'provider_error' | 'pending';
|
|
174
|
-
transaction_hash: string | null;
|
|
175
|
-
wallet_id: string;
|
|
176
|
-
reference_id?: string | null;
|
|
177
|
-
sponsored?: boolean;
|
|
178
|
-
user_operation_hash?: string;
|
|
179
|
-
}
|
|
162
|
+
export type TransactionScanningValidationResult = TransactionScanningValidationErrorResult | TransactionScanningValidationSuccessResult;
|
|
180
163
|
/**
|
|
181
|
-
* A
|
|
164
|
+
* A successful validation result from a transaction scan.
|
|
182
165
|
*/
|
|
183
|
-
export interface
|
|
184
|
-
|
|
166
|
+
export interface TransactionScanningValidationSuccessResult {
|
|
167
|
+
result_type: string;
|
|
168
|
+
status: 'Success';
|
|
185
169
|
}
|
|
186
170
|
export declare namespace Transactions {
|
|
187
|
-
export { type
|
|
171
|
+
export { type Transaction as Transaction, type TransactionList as TransactionList, type TransactionScanningAssetDiff as TransactionScanningAssetDiff, type TransactionScanningAssetInfo as TransactionScanningAssetInfo, type TransactionScanningAssetValue as TransactionScanningAssetValue, type TransactionScanningCalldata as TransactionScanningCalldata, type TransactionScanningExposure as TransactionScanningExposure, type TransactionScanningMetadata as TransactionScanningMetadata, type TransactionScanningParams as TransactionScanningParams, type TransactionScanningRequestBody as TransactionScanningRequestBody, type TransactionScanningResponseBody as TransactionScanningResponseBody, type TransactionScanningRpcRequest as TransactionScanningRpcRequest, type TransactionScanningSimulationErrorResult as TransactionScanningSimulationErrorResult, type TransactionScanningSimulationResult as TransactionScanningSimulationResult, type TransactionScanningSimulationSuccessResult as TransactionScanningSimulationSuccessResult, type TransactionScanningValidationErrorResult as TransactionScanningValidationErrorResult, type TransactionScanningValidationResult as TransactionScanningValidationResult, type TransactionScanningValidationSuccessResult as TransactionScanningValidationSuccessResult, };
|
|
188
172
|
}
|
|
189
173
|
//# sourceMappingURL=transactions.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.mts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"transactions.d.mts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;AAEtB,qBAAa,YAAa,SAAQ,WAAW;CAAG;AAEhD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,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,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,KAAK,CAAC,WAAW,CAA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