@privy-io/api-types 0.7.0 → 0.9.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 +62 -0
- package/client.d.mts +39 -30
- package/client.d.mts.map +1 -1
- package/client.d.ts +39 -30
- package/client.d.ts.map +1 -1
- package/client.js +9 -0
- package/client.js.map +1 -1
- package/client.mjs +9 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/accounts.d.mts +79 -106
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +79 -106
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs.map +1 -1
- package/resources/aggregations.d.mts +18 -392
- package/resources/aggregations.d.mts.map +1 -1
- package/resources/aggregations.d.ts +18 -392
- package/resources/aggregations.d.ts.map +1 -1
- package/resources/aggregations.js.map +1 -1
- package/resources/aggregations.mjs.map +1 -1
- package/resources/apps.d.mts +154 -71
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +154 -71
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +796 -427
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +796 -427
- 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/cross-app.d.mts +14 -13
- package/resources/cross-app.d.mts.map +1 -1
- package/resources/cross-app.d.ts +14 -13
- package/resources/cross-app.d.ts.map +1 -1
- package/resources/embedded-wallets.d.mts +167 -83
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +167 -83
- package/resources/embedded-wallets.d.ts.map +1 -1
- package/resources/embedded-wallets.js.map +1 -1
- package/resources/embedded-wallets.mjs.map +1 -1
- package/resources/funding.d.mts +150 -64
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +150 -64
- package/resources/funding.d.ts.map +1 -1
- package/resources/funding.js.map +1 -1
- package/resources/funding.mjs.map +1 -1
- package/resources/index.d.mts +18 -15
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -15
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +224 -1757
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +224 -1757
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +74 -26
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +74 -26
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +8 -8
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +8 -8
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +52 -1
- package/resources/kraken-embed.d.mts.map +1 -1
- package/resources/kraken-embed.d.ts +52 -1
- package/resources/kraken-embed.d.ts.map +1 -1
- package/resources/policies.d.mts +512 -992
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +512 -992
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +48 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +48 -41
- package/resources/policies.mjs.map +1 -1
- package/resources/shared.d.mts +59 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +59 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +9 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +5 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/swaps.d.mts +108 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +108 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +9 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +5 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transactions.d.mts +150 -98
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +150 -98
- package/resources/transactions.d.ts.map +1 -1
- package/resources/users.d.mts +207 -240
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +207 -240
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js.map +1 -1
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +439 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +439 -0
- package/resources/wallet-actions.d.ts.map +1 -0
- package/resources/wallet-actions.js +9 -0
- package/resources/wallet-actions.js.map +1 -0
- package/resources/wallet-actions.mjs +5 -0
- package/resources/wallet-actions.mjs.map +1 -0
- package/resources/wallets/balance.d.mts +2 -1
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +2 -1
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs.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 +11 -30
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +11 -30
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2435 -923
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2435 -923
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +24 -11
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +24 -11
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +1296 -186
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1296 -186
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs.map +1 -1
- package/resources/yield.d.mts +25 -1
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +25 -1
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +869 -92
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/accounts.ts +93 -120
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +211 -111
- package/src/resources/client-auth.ts +1361 -896
- package/src/resources/cross-app.ts +19 -15
- package/src/resources/embedded-wallets.ts +219 -123
- package/src/resources/funding.ts +263 -173
- package/src/resources/index.ts +447 -65
- package/src/resources/intents.ts +370 -3100
- package/src/resources/key-quorums.ts +100 -32
- package/src/resources/kraken-embed.ts +105 -0
- package/src/resources/policies.ts +648 -1494
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +169 -102
- package/src/resources/users.ts +676 -729
- package/src/resources/wallet-actions.ts +573 -0
- package/src/resources/wallets/balance.ts +2 -1
- package/src/resources/wallets/index.ts +156 -17
- package/src/resources/wallets/transactions.ts +12 -88
- package/src/resources/wallets/wallets.ts +3162 -1109
- package/src/resources/webhooks.ts +1609 -229
- package/src/resources/yield.ts +29 -0
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.mjs","sourceRoot":"","sources":["../src/resources/shared.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,MAAO,SAAQ,WAAW;CAAG"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
export declare class Swaps extends APIResource {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Whether the swap amount refers to the input token or output token.
|
|
6
|
+
*/
|
|
7
|
+
export type SwapAmountType = 'exact_input' | 'exact_output';
|
|
8
|
+
/**
|
|
9
|
+
* Input for requesting a token swap quote.
|
|
10
|
+
*/
|
|
11
|
+
export interface SwapQuoteRequestBody {
|
|
12
|
+
/**
|
|
13
|
+
* Amount in base units (e.g., wei for ETH).
|
|
14
|
+
*/
|
|
15
|
+
amount: string;
|
|
16
|
+
/**
|
|
17
|
+
* Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
|
|
18
|
+
*/
|
|
19
|
+
caip2: string;
|
|
20
|
+
/**
|
|
21
|
+
* Token address to sell, or "native" for the chain's native token.
|
|
22
|
+
*/
|
|
23
|
+
input_token: string;
|
|
24
|
+
/**
|
|
25
|
+
* Token address to buy, or "native" for the chain's native token.
|
|
26
|
+
*/
|
|
27
|
+
output_token: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the swap amount refers to the input token or output token.
|
|
30
|
+
*/
|
|
31
|
+
amount_type?: SwapAmountType;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
|
|
34
|
+
* auto-slippage is used.
|
|
35
|
+
*/
|
|
36
|
+
slippage_bps?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Pricing data for a token swap.
|
|
40
|
+
*/
|
|
41
|
+
export interface SwapQuoteResponse {
|
|
42
|
+
/**
|
|
43
|
+
* Chain identifier.
|
|
44
|
+
*/
|
|
45
|
+
caip2: string;
|
|
46
|
+
/**
|
|
47
|
+
* Estimated amount of output token in base units.
|
|
48
|
+
*/
|
|
49
|
+
est_output_amount: string;
|
|
50
|
+
/**
|
|
51
|
+
* Estimated gas cost in base units of the native token.
|
|
52
|
+
*/
|
|
53
|
+
gas_estimate: string;
|
|
54
|
+
/**
|
|
55
|
+
* Amount of input token in base units.
|
|
56
|
+
*/
|
|
57
|
+
input_amount: string;
|
|
58
|
+
/**
|
|
59
|
+
* Token address being sold.
|
|
60
|
+
*/
|
|
61
|
+
input_token: string;
|
|
62
|
+
/**
|
|
63
|
+
* Minimum output amount accounting for slippage, in base units.
|
|
64
|
+
*/
|
|
65
|
+
minimum_output_amount: string;
|
|
66
|
+
/**
|
|
67
|
+
* Token address being bought.
|
|
68
|
+
*/
|
|
69
|
+
output_token: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Input for executing a token swap.
|
|
73
|
+
*/
|
|
74
|
+
export interface SwapRequestBody {
|
|
75
|
+
/**
|
|
76
|
+
* Amount in base units (e.g., wei for ETH).
|
|
77
|
+
*/
|
|
78
|
+
amount: string;
|
|
79
|
+
/**
|
|
80
|
+
* Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
|
|
81
|
+
*/
|
|
82
|
+
caip2: string;
|
|
83
|
+
/**
|
|
84
|
+
* Token address to sell, or "native" for the chain's native token.
|
|
85
|
+
*/
|
|
86
|
+
input_token: string;
|
|
87
|
+
/**
|
|
88
|
+
* Token address to buy, or "native" for the chain's native token.
|
|
89
|
+
*/
|
|
90
|
+
output_token: string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the swap amount refers to the input token or output token.
|
|
93
|
+
*/
|
|
94
|
+
amount_type?: SwapAmountType;
|
|
95
|
+
/**
|
|
96
|
+
* Address to receive the output tokens. Defaults to the wallet address if not
|
|
97
|
+
* specified.
|
|
98
|
+
*/
|
|
99
|
+
recipient?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
|
|
102
|
+
*/
|
|
103
|
+
slippage_bps?: number;
|
|
104
|
+
}
|
|
105
|
+
export declare namespace Swaps {
|
|
106
|
+
export { type SwapAmountType as SwapAmountType, type SwapQuoteRequestBody as SwapQuoteRequestBody, type SwapQuoteResponse as SwapQuoteResponse, type SwapRequestBody as SwapRequestBody, };
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=swaps.d.mts.map
|
|
@@ -0,0 +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,MAAM,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;AAE5D;;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,cAAc,CAAC;IAE7B;;;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,cAAc,CAAC;IAE7B;;;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,cAAc,IAAI,cAAc,EACrC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
export declare class Swaps extends APIResource {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Whether the swap amount refers to the input token or output token.
|
|
6
|
+
*/
|
|
7
|
+
export type SwapAmountType = 'exact_input' | 'exact_output';
|
|
8
|
+
/**
|
|
9
|
+
* Input for requesting a token swap quote.
|
|
10
|
+
*/
|
|
11
|
+
export interface SwapQuoteRequestBody {
|
|
12
|
+
/**
|
|
13
|
+
* Amount in base units (e.g., wei for ETH).
|
|
14
|
+
*/
|
|
15
|
+
amount: string;
|
|
16
|
+
/**
|
|
17
|
+
* Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
|
|
18
|
+
*/
|
|
19
|
+
caip2: string;
|
|
20
|
+
/**
|
|
21
|
+
* Token address to sell, or "native" for the chain's native token.
|
|
22
|
+
*/
|
|
23
|
+
input_token: string;
|
|
24
|
+
/**
|
|
25
|
+
* Token address to buy, or "native" for the chain's native token.
|
|
26
|
+
*/
|
|
27
|
+
output_token: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the swap amount refers to the input token or output token.
|
|
30
|
+
*/
|
|
31
|
+
amount_type?: SwapAmountType;
|
|
32
|
+
/**
|
|
33
|
+
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
|
|
34
|
+
* auto-slippage is used.
|
|
35
|
+
*/
|
|
36
|
+
slippage_bps?: number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Pricing data for a token swap.
|
|
40
|
+
*/
|
|
41
|
+
export interface SwapQuoteResponse {
|
|
42
|
+
/**
|
|
43
|
+
* Chain identifier.
|
|
44
|
+
*/
|
|
45
|
+
caip2: string;
|
|
46
|
+
/**
|
|
47
|
+
* Estimated amount of output token in base units.
|
|
48
|
+
*/
|
|
49
|
+
est_output_amount: string;
|
|
50
|
+
/**
|
|
51
|
+
* Estimated gas cost in base units of the native token.
|
|
52
|
+
*/
|
|
53
|
+
gas_estimate: string;
|
|
54
|
+
/**
|
|
55
|
+
* Amount of input token in base units.
|
|
56
|
+
*/
|
|
57
|
+
input_amount: string;
|
|
58
|
+
/**
|
|
59
|
+
* Token address being sold.
|
|
60
|
+
*/
|
|
61
|
+
input_token: string;
|
|
62
|
+
/**
|
|
63
|
+
* Minimum output amount accounting for slippage, in base units.
|
|
64
|
+
*/
|
|
65
|
+
minimum_output_amount: string;
|
|
66
|
+
/**
|
|
67
|
+
* Token address being bought.
|
|
68
|
+
*/
|
|
69
|
+
output_token: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Input for executing a token swap.
|
|
73
|
+
*/
|
|
74
|
+
export interface SwapRequestBody {
|
|
75
|
+
/**
|
|
76
|
+
* Amount in base units (e.g., wei for ETH).
|
|
77
|
+
*/
|
|
78
|
+
amount: string;
|
|
79
|
+
/**
|
|
80
|
+
* Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
|
|
81
|
+
*/
|
|
82
|
+
caip2: string;
|
|
83
|
+
/**
|
|
84
|
+
* Token address to sell, or "native" for the chain's native token.
|
|
85
|
+
*/
|
|
86
|
+
input_token: string;
|
|
87
|
+
/**
|
|
88
|
+
* Token address to buy, or "native" for the chain's native token.
|
|
89
|
+
*/
|
|
90
|
+
output_token: string;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the swap amount refers to the input token or output token.
|
|
93
|
+
*/
|
|
94
|
+
amount_type?: SwapAmountType;
|
|
95
|
+
/**
|
|
96
|
+
* Address to receive the output tokens. Defaults to the wallet address if not
|
|
97
|
+
* specified.
|
|
98
|
+
*/
|
|
99
|
+
recipient?: string;
|
|
100
|
+
/**
|
|
101
|
+
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
|
|
102
|
+
*/
|
|
103
|
+
slippage_bps?: number;
|
|
104
|
+
}
|
|
105
|
+
export declare namespace Swaps {
|
|
106
|
+
export { type SwapAmountType as SwapAmountType, type SwapQuoteRequestBody as SwapQuoteRequestBody, type SwapQuoteResponse as SwapQuoteResponse, type SwapRequestBody as SwapRequestBody, };
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=swaps.d.ts.map
|
|
@@ -0,0 +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,MAAM,cAAc,GAAG,aAAa,GAAG,cAAc,CAAC;AAE5D;;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,cAAc,CAAC;IAE7B;;;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,cAAc,CAAC;IAE7B;;;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,cAAc,IAAI,cAAc,EACrC,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Swaps = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class Swaps extends resource_1.APIResource {
|
|
7
|
+
}
|
|
8
|
+
exports.Swaps = Swaps;
|
|
9
|
+
//# sourceMappingURL=swaps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swaps.js","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,MAAa,KAAM,SAAQ,sBAAW;CAAG;AAAzC,sBAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swaps.mjs","sourceRoot":"","sources":["../src/resources/swaps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,KAAM,SAAQ,WAAW;CAAG"}
|
|
@@ -15,123 +15,175 @@ export declare class Transactions extends APIResource {
|
|
|
15
15
|
* );
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
get(transactionID: string, options?: RequestOptions): APIPromise<
|
|
18
|
+
get(transactionID: string, options?: RequestOptions): APIPromise<Transaction>;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* The request body for scanning a transaction.
|
|
22
22
|
*/
|
|
23
23
|
export interface TransactionScanningRequestBody {
|
|
24
24
|
chain_id: string;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
method: string;
|
|
34
|
-
params: Array<unknown>;
|
|
35
|
-
}
|
|
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;
|
|
36
33
|
}
|
|
37
34
|
/**
|
|
38
35
|
* The response from scanning a transaction.
|
|
39
36
|
*/
|
|
40
37
|
export interface TransactionScanningResponseBody {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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.
|
|
55
|
+
*/
|
|
56
|
+
export interface TransactionScanningRpcRequest {
|
|
57
|
+
method: string;
|
|
58
|
+
params: Array<unknown>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A failed validation result from a transaction scan.
|
|
62
|
+
*/
|
|
63
|
+
export interface TransactionScanningValidationErrorResult {
|
|
64
|
+
error: string;
|
|
65
|
+
status: 'Error';
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A successful validation result from a transaction scan.
|
|
69
|
+
*/
|
|
70
|
+
export interface TransactionScanningValidationSuccessResult {
|
|
71
|
+
result_type: string;
|
|
72
|
+
status: 'Success';
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The validation result from a transaction scan.
|
|
76
|
+
*/
|
|
77
|
+
export type TransactionScanningValidationResult = TransactionScanningValidationErrorResult | TransactionScanningValidationSuccessResult;
|
|
78
|
+
/**
|
|
79
|
+
* Information about the moving asset in a transaction scan.
|
|
80
|
+
*/
|
|
81
|
+
export interface TransactionScanningAssetInfo {
|
|
82
|
+
decimals?: number;
|
|
83
|
+
logo_url?: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
symbol?: string;
|
|
86
|
+
type?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The value of an asset in a transaction scan result.
|
|
90
|
+
*/
|
|
91
|
+
export interface TransactionScanningAssetValue {
|
|
92
|
+
usd_price?: string;
|
|
93
|
+
value?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* An asset diff representing assets entering/leaving a wallet.
|
|
97
|
+
*/
|
|
98
|
+
export interface TransactionScanningAssetDiff {
|
|
99
|
+
/**
|
|
100
|
+
* Information about the moving asset in a transaction scan.
|
|
101
|
+
*/
|
|
102
|
+
asset: TransactionScanningAssetInfo;
|
|
103
|
+
in: Array<TransactionScanningAssetValue>;
|
|
104
|
+
out: Array<TransactionScanningAssetValue>;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* An exposure representing assets approved to spend.
|
|
108
|
+
*/
|
|
109
|
+
export interface TransactionScanningExposure {
|
|
110
|
+
/**
|
|
111
|
+
* Information about the moving asset in a transaction scan.
|
|
112
|
+
*/
|
|
113
|
+
asset: TransactionScanningAssetInfo;
|
|
114
|
+
spenders: {
|
|
115
|
+
[key: string]: TransactionScanningAssetValue;
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Decoded calldata from a scanned transaction.
|
|
120
|
+
*/
|
|
121
|
+
export interface TransactionScanningCalldata {
|
|
122
|
+
function_selector: string;
|
|
123
|
+
function_declaration?: string;
|
|
124
|
+
function_signature?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* The parameters of the scanned transaction.
|
|
128
|
+
*/
|
|
129
|
+
export interface TransactionScanningParams {
|
|
130
|
+
block_tag?: string;
|
|
131
|
+
/**
|
|
132
|
+
* Decoded calldata from a scanned transaction.
|
|
133
|
+
*/
|
|
134
|
+
calldata?: TransactionScanningCalldata;
|
|
135
|
+
chain?: string;
|
|
136
|
+
data?: string;
|
|
137
|
+
from?: string;
|
|
138
|
+
gas?: string;
|
|
139
|
+
gas_price?: string;
|
|
140
|
+
to?: string;
|
|
141
|
+
value?: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* A failed simulation result from a transaction scan.
|
|
145
|
+
*/
|
|
146
|
+
export interface TransactionScanningSimulationErrorResult {
|
|
147
|
+
error: string;
|
|
148
|
+
status: 'Error';
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* A successful simulation result from a transaction scan.
|
|
152
|
+
*/
|
|
153
|
+
export interface TransactionScanningSimulationSuccessResult {
|
|
154
|
+
assets_diffs: Array<TransactionScanningAssetDiff>;
|
|
155
|
+
exposures: Array<TransactionScanningExposure>;
|
|
156
|
+
status: 'Success';
|
|
157
|
+
/**
|
|
158
|
+
* The parameters of the scanned transaction.
|
|
159
|
+
*/
|
|
160
|
+
params?: TransactionScanningParams;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* The simulation result from a transaction scan.
|
|
164
|
+
*/
|
|
165
|
+
export type TransactionScanningSimulationResult = TransactionScanningSimulationErrorResult | TransactionScanningSimulationSuccessResult;
|
|
166
|
+
/**
|
|
167
|
+
* A transaction from a Privy wallet.
|
|
168
|
+
*/
|
|
169
|
+
export interface Transaction {
|
|
126
170
|
id: string;
|
|
127
171
|
caip2: string;
|
|
128
172
|
created_at: number;
|
|
129
173
|
status: 'broadcasted' | 'confirmed' | 'execution_reverted' | 'failed' | 'replaced' | 'finalized' | 'provider_error' | 'pending';
|
|
130
174
|
transaction_hash: string | null;
|
|
131
175
|
wallet_id: string;
|
|
176
|
+
reference_id?: string | null;
|
|
132
177
|
sponsored?: boolean;
|
|
178
|
+
user_operation_hash?: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* A list of transactions.
|
|
182
|
+
*/
|
|
183
|
+
export interface TransactionList {
|
|
184
|
+
transactions: Array<Transaction>;
|
|
133
185
|
}
|
|
134
186
|
export declare namespace Transactions {
|
|
135
|
-
export { type TransactionScanningRequestBody as TransactionScanningRequestBody, type TransactionScanningResponseBody as TransactionScanningResponseBody, type
|
|
187
|
+
export { type TransactionScanningRequestBody as TransactionScanningRequestBody, type TransactionScanningResponseBody as TransactionScanningResponseBody, type TransactionScanningMetadata as TransactionScanningMetadata, type TransactionScanningRpcRequest as TransactionScanningRpcRequest, type TransactionScanningValidationErrorResult as TransactionScanningValidationErrorResult, type TransactionScanningValidationSuccessResult as TransactionScanningValidationSuccessResult, type TransactionScanningValidationResult as TransactionScanningValidationResult, type TransactionScanningAssetInfo as TransactionScanningAssetInfo, type TransactionScanningAssetValue as TransactionScanningAssetValue, type TransactionScanningAssetDiff as TransactionScanningAssetDiff, type TransactionScanningExposure as TransactionScanningExposure, type TransactionScanningCalldata as TransactionScanningCalldata, type TransactionScanningParams as TransactionScanningParams, type TransactionScanningSimulationErrorResult as TransactionScanningSimulationErrorResult, type TransactionScanningSimulationSuccessResult as TransactionScanningSimulationSuccessResult, type TransactionScanningSimulationResult as TransactionScanningSimulationResult, type Transaction as Transaction, type TransactionList as TransactionList, };
|
|
136
188
|
}
|
|
137
189
|
//# 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;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,
|
|
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;;GAEG;AACH,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;OASG;IACH,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC;CAG9E;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,2BAA2B,CAAC;IAEtC;;OAEG;IACH,OAAO,EAAE,6BAA6B,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,UAAU,EAAE,mCAAmC,CAAC;IAEhD;;OAEG;IACH,UAAU,EAAE,mCAAmC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,MAAM,CAAC;IAEf,MAAM,EAAE,KAAK,CAAC,OA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