@privy-io/api-types 0.6.1 → 0.8.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 +72 -0
- package/client.d.mts +53 -29
- package/client.d.mts.map +1 -1
- package/client.d.ts +53 -29
- package/client.d.ts.map +1 -1
- package/client.js +32 -7
- package/client.js.map +1 -1
- package/client.mjs +34 -9
- package/client.mjs.map +1 -1
- package/package.json +12 -1
- package/resources/accounts.d.mts +146 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +146 -4
- 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 +197 -70
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +197 -70
- 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 +975 -463
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +975 -463
- 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 +165 -81
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +165 -81
- 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 -14
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +18 -14
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +6 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +446 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +446 -31
- 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 +108 -17
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +108 -17
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +26 -9
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +26 -9
- package/resources/key-quorums.mjs.map +1 -1
- package/resources/kraken-embed.d.mts +62 -0
- package/resources/kraken-embed.d.mts.map +1 -0
- package/resources/kraken-embed.d.ts +62 -0
- package/resources/kraken-embed.d.ts.map +1 -0
- package/resources/kraken-embed.js +9 -0
- package/resources/kraken-embed.js.map +1 -0
- package/resources/kraken-embed.mjs +5 -0
- package/resources/kraken-embed.mjs.map +1 -0
- package/resources/policies.d.mts +342 -926
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +342 -926
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +51 -41
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +51 -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 +158 -93
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +158 -93
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +3 -0
- package/resources/transactions.js.map +1 -1
- package/resources/transactions.mjs +3 -0
- package/resources/transactions.mjs.map +1 -1
- package/resources/users.d.mts +64 -94
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +64 -94
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/wallet-actions.d.mts +187 -0
- package/resources/wallet-actions.d.mts.map +1 -0
- package/resources/wallet-actions.d.ts +187 -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 +7 -4
- package/resources/wallets/balance.d.mts.map +1 -1
- package/resources/wallets/balance.d.ts +7 -4
- package/resources/wallets/balance.d.ts.map +1 -1
- package/resources/wallets/balance.js +3 -0
- package/resources/wallets/balance.js.map +1 -1
- package/resources/wallets/balance.mjs +3 -0
- 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 +10 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +10 -6
- package/resources/wallets/transactions.d.ts.map +1 -1
- package/resources/wallets/transactions.js +3 -0
- package/resources/wallets/transactions.js.map +1 -1
- package/resources/wallets/transactions.mjs +3 -0
- package/resources/wallets/transactions.mjs.map +1 -1
- package/resources/wallets/wallets.d.mts +2399 -936
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +2399 -936
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +28 -10
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +28 -10
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +780 -339
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +780 -339
- 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 +50 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +50 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +884 -99
- package/src/resources/accounts.ts +179 -3
- package/src/resources/aggregations.ts +18 -702
- package/src/resources/apps.ts +250 -85
- package/src/resources/client-auth.ts +1453 -786
- 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 +444 -61
- package/src/resources/intents.ts +575 -37
- package/src/resources/key-quorums.ts +137 -21
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +582 -1550
- package/src/resources/shared.ts +79 -0
- package/src/resources/swaps.ts +136 -0
- package/src/resources/transactions.ts +188 -91
- package/src/resources/users.ts +82 -132
- package/src/resources/wallet-actions.ts +251 -0
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +146 -16
- package/src/resources/wallets/transactions.ts +12 -4
- package/src/resources/wallets/wallets.ts +2922 -974
- package/src/resources/webhooks.ts +970 -454
- package/src/resources/yield.ts +68 -10
- 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,79 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
|
|
5
|
+
export class Shared extends APIResource {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A simple success response.
|
|
9
|
+
*/
|
|
10
|
+
export interface SuccessResponse {
|
|
11
|
+
success: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A P-256 (secp256r1) public key.
|
|
16
|
+
*/
|
|
17
|
+
export type P256PublicKey = string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* A unique identifier for a key quorum.
|
|
21
|
+
*/
|
|
22
|
+
export type KeyQuorumID = string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Owner input specifying a Privy user ID.
|
|
26
|
+
*/
|
|
27
|
+
export interface OwnerInputUser {
|
|
28
|
+
user_id: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Owner input specifying a P-256 public key.
|
|
33
|
+
*/
|
|
34
|
+
export interface OwnerInputPublicKey {
|
|
35
|
+
/**
|
|
36
|
+
* A P-256 (secp256r1) public key.
|
|
37
|
+
*/
|
|
38
|
+
public_key: P256PublicKey;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The owner of the resource, specified as a Privy user ID, a P-256 public key, or
|
|
43
|
+
* null to remove the current owner.
|
|
44
|
+
*/
|
|
45
|
+
export type OwnerInput = OwnerInputUser | OwnerInputPublicKey;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The key quorum ID to set as the owner of the resource. If you provide this, do
|
|
49
|
+
* not specify an owner.
|
|
50
|
+
*/
|
|
51
|
+
export type OwnerIDInput = string | null;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* A monetary value with its currency denomination.
|
|
55
|
+
*/
|
|
56
|
+
export interface CurrencyAmount {
|
|
57
|
+
/**
|
|
58
|
+
* Currency code
|
|
59
|
+
*/
|
|
60
|
+
currency: 'usd';
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The monetary value as a string.
|
|
64
|
+
*/
|
|
65
|
+
value: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export declare namespace Shared {
|
|
69
|
+
export {
|
|
70
|
+
type SuccessResponse as SuccessResponse,
|
|
71
|
+
type P256PublicKey as P256PublicKey,
|
|
72
|
+
type KeyQuorumID as KeyQuorumID,
|
|
73
|
+
type OwnerInputUser as OwnerInputUser,
|
|
74
|
+
type OwnerInputPublicKey as OwnerInputPublicKey,
|
|
75
|
+
type OwnerInput as OwnerInput,
|
|
76
|
+
type OwnerIDInput as OwnerIDInput,
|
|
77
|
+
type CurrencyAmount as CurrencyAmount,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
|
|
5
|
+
export class Swaps extends APIResource {}
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Whether the swap amount refers to the input token or output token.
|
|
9
|
+
*/
|
|
10
|
+
export type SwapAmountType = 'exact_input' | 'exact_output';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Input for requesting a token swap quote.
|
|
14
|
+
*/
|
|
15
|
+
export interface SwapQuoteRequest {
|
|
16
|
+
/**
|
|
17
|
+
* Amount in base units (e.g., wei for ETH).
|
|
18
|
+
*/
|
|
19
|
+
amount: string;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
|
|
23
|
+
*/
|
|
24
|
+
caip2: string;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Token address to sell, or "native" for the chain's native token.
|
|
28
|
+
*/
|
|
29
|
+
input_token: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Token address to buy, or "native" for the chain's native token.
|
|
33
|
+
*/
|
|
34
|
+
output_token: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Whether the swap amount refers to the input token or output token.
|
|
38
|
+
*/
|
|
39
|
+
amount_type?: SwapAmountType;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%). If omitted,
|
|
43
|
+
* auto-slippage is used.
|
|
44
|
+
*/
|
|
45
|
+
slippage_bps?: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Pricing data for a token swap.
|
|
50
|
+
*/
|
|
51
|
+
export interface SwapQuoteResponse {
|
|
52
|
+
/**
|
|
53
|
+
* Chain identifier.
|
|
54
|
+
*/
|
|
55
|
+
caip2: string;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Estimated amount of output token in base units.
|
|
59
|
+
*/
|
|
60
|
+
est_output_amount: string;
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Estimated gas cost in base units of the native token.
|
|
64
|
+
*/
|
|
65
|
+
gas_estimate: string;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Amount of input token in base units.
|
|
69
|
+
*/
|
|
70
|
+
input_amount: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Token address being sold.
|
|
74
|
+
*/
|
|
75
|
+
input_token: string;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Minimum output amount accounting for slippage, in base units.
|
|
79
|
+
*/
|
|
80
|
+
minimum_output_amount: string;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Token address being bought.
|
|
84
|
+
*/
|
|
85
|
+
output_token: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Input for executing a token swap.
|
|
90
|
+
*/
|
|
91
|
+
export interface SwapRequest {
|
|
92
|
+
/**
|
|
93
|
+
* Amount in base units (e.g., wei for ETH).
|
|
94
|
+
*/
|
|
95
|
+
amount: string;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Chain identifier (e.g., "eip155:1" for Ethereum mainnet).
|
|
99
|
+
*/
|
|
100
|
+
caip2: string;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Token address to sell, or "native" for the chain's native token.
|
|
104
|
+
*/
|
|
105
|
+
input_token: string;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Token address to buy, or "native" for the chain's native token.
|
|
109
|
+
*/
|
|
110
|
+
output_token: string;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Whether the swap amount refers to the input token or output token.
|
|
114
|
+
*/
|
|
115
|
+
amount_type?: SwapAmountType;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Address to receive the output tokens. Defaults to the wallet address if not
|
|
119
|
+
* specified.
|
|
120
|
+
*/
|
|
121
|
+
recipient?: string;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Maximum slippage tolerance in basis points (e.g., 50 for 0.5%).
|
|
125
|
+
*/
|
|
126
|
+
slippage_bps?: number;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export declare namespace Swaps {
|
|
130
|
+
export {
|
|
131
|
+
type SwapAmountType as SwapAmountType,
|
|
132
|
+
type SwapQuoteRequest as SwapQuoteRequest,
|
|
133
|
+
type SwapQuoteResponse as SwapQuoteResponse,
|
|
134
|
+
type SwapRequest as SwapRequest,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
@@ -5,6 +5,9 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
import { path } from '../internal/utils/path';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Operations related to transactions
|
|
10
|
+
*/
|
|
8
11
|
export class Transactions extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Get a transaction by transaction ID.
|
|
@@ -27,151 +30,226 @@ export class Transactions extends APIResource {
|
|
|
27
30
|
export interface TransactionScanningRequestBody {
|
|
28
31
|
chain_id: string;
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Additional information for Blockaid to validate against.
|
|
35
|
+
*/
|
|
36
|
+
metadata: TransactionScanningMetadata;
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Raw RPC request to execute with the wallet.
|
|
40
|
+
*/
|
|
41
|
+
request: TransactionScanningRpcRequest;
|
|
33
42
|
}
|
|
34
43
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
44
|
+
/**
|
|
45
|
+
* The response from scanning a transaction.
|
|
46
|
+
*/
|
|
47
|
+
export interface TransactionScanningResponseBody {
|
|
48
|
+
/**
|
|
49
|
+
* The simulation result from a transaction scan.
|
|
50
|
+
*/
|
|
51
|
+
simulation: TransactionScanningSimulationResult;
|
|
39
52
|
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
/**
|
|
54
|
+
* The validation result from a transaction scan.
|
|
55
|
+
*/
|
|
56
|
+
validation: TransactionScanningValidationResult;
|
|
57
|
+
}
|
|
42
58
|
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Additional information for Blockaid to validate against.
|
|
61
|
+
*/
|
|
62
|
+
export interface TransactionScanningMetadata {
|
|
63
|
+
domain: string;
|
|
45
64
|
}
|
|
46
65
|
|
|
47
66
|
/**
|
|
48
|
-
*
|
|
67
|
+
* Raw RPC request to execute with the wallet.
|
|
49
68
|
*/
|
|
50
|
-
export interface
|
|
51
|
-
|
|
69
|
+
export interface TransactionScanningRpcRequest {
|
|
70
|
+
method: string;
|
|
52
71
|
|
|
53
|
-
|
|
72
|
+
params: Array<unknown>;
|
|
54
73
|
}
|
|
55
74
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
/**
|
|
76
|
+
* A failed validation result from a transaction scan.
|
|
77
|
+
*/
|
|
78
|
+
export interface TransactionScanningValidationErrorResult {
|
|
79
|
+
error: string;
|
|
59
80
|
|
|
60
|
-
|
|
61
|
-
|
|
81
|
+
status: 'Error';
|
|
82
|
+
}
|
|
62
83
|
|
|
63
|
-
|
|
64
|
-
|
|
84
|
+
/**
|
|
85
|
+
* A successful validation result from a transaction scan.
|
|
86
|
+
*/
|
|
87
|
+
export interface TransactionScanningValidationSuccessResult {
|
|
88
|
+
result_type: string;
|
|
65
89
|
|
|
66
|
-
|
|
90
|
+
status: 'Success';
|
|
91
|
+
}
|
|
67
92
|
|
|
68
|
-
|
|
93
|
+
/**
|
|
94
|
+
* The validation result from a transaction scan.
|
|
95
|
+
*/
|
|
96
|
+
export type TransactionScanningValidationResult =
|
|
97
|
+
| TransactionScanningValidationErrorResult
|
|
98
|
+
| TransactionScanningValidationSuccessResult;
|
|
69
99
|
|
|
70
|
-
|
|
71
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Information about the moving asset in a transaction scan.
|
|
102
|
+
*/
|
|
103
|
+
export interface TransactionScanningAssetInfo {
|
|
104
|
+
decimals?: number;
|
|
72
105
|
|
|
73
|
-
|
|
74
|
-
export interface AssetsDiff {
|
|
75
|
-
asset: AssetsDiff.Asset;
|
|
106
|
+
logo_url?: string;
|
|
76
107
|
|
|
77
|
-
|
|
108
|
+
name?: string;
|
|
78
109
|
|
|
79
|
-
|
|
80
|
-
}
|
|
110
|
+
symbol?: string;
|
|
81
111
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
decimals?: number;
|
|
112
|
+
type?: string;
|
|
113
|
+
}
|
|
85
114
|
|
|
86
|
-
|
|
115
|
+
/**
|
|
116
|
+
* The value of an asset in a transaction scan result.
|
|
117
|
+
*/
|
|
118
|
+
export interface TransactionScanningAssetValue {
|
|
119
|
+
usd_price?: string;
|
|
87
120
|
|
|
88
|
-
|
|
121
|
+
value?: string;
|
|
122
|
+
}
|
|
89
123
|
|
|
90
|
-
|
|
124
|
+
/**
|
|
125
|
+
* An asset diff representing assets entering/leaving a wallet.
|
|
126
|
+
*/
|
|
127
|
+
export interface TransactionScanningAssetDiff {
|
|
128
|
+
/**
|
|
129
|
+
* Information about the moving asset in a transaction scan.
|
|
130
|
+
*/
|
|
131
|
+
asset: TransactionScanningAssetInfo;
|
|
91
132
|
|
|
92
|
-
|
|
93
|
-
}
|
|
133
|
+
in: Array<TransactionScanningAssetValue>;
|
|
94
134
|
|
|
95
|
-
|
|
96
|
-
|
|
135
|
+
out: Array<TransactionScanningAssetValue>;
|
|
136
|
+
}
|
|
97
137
|
|
|
98
|
-
|
|
99
|
-
|
|
138
|
+
/**
|
|
139
|
+
* An exposure representing assets approved to spend.
|
|
140
|
+
*/
|
|
141
|
+
export interface TransactionScanningExposure {
|
|
142
|
+
/**
|
|
143
|
+
* Information about the moving asset in a transaction scan.
|
|
144
|
+
*/
|
|
145
|
+
asset: TransactionScanningAssetInfo;
|
|
100
146
|
|
|
101
|
-
|
|
102
|
-
|
|
147
|
+
spenders: { [key: string]: TransactionScanningAssetValue };
|
|
148
|
+
}
|
|
103
149
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Decoded calldata from a scanned transaction.
|
|
152
|
+
*/
|
|
153
|
+
export interface TransactionScanningCalldata {
|
|
154
|
+
function_selector: string;
|
|
107
155
|
|
|
108
|
-
|
|
109
|
-
asset: Exposure.Asset;
|
|
156
|
+
function_declaration?: string;
|
|
110
157
|
|
|
111
|
-
|
|
112
|
-
|
|
158
|
+
function_signature?: string;
|
|
159
|
+
}
|
|
113
160
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
161
|
+
/**
|
|
162
|
+
* The parameters of the scanned transaction.
|
|
163
|
+
*/
|
|
164
|
+
export interface TransactionScanningParams {
|
|
165
|
+
block_tag?: string;
|
|
117
166
|
|
|
118
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Decoded calldata from a scanned transaction.
|
|
169
|
+
*/
|
|
170
|
+
calldata?: TransactionScanningCalldata;
|
|
119
171
|
|
|
120
|
-
|
|
172
|
+
chain?: string;
|
|
121
173
|
|
|
122
|
-
|
|
174
|
+
data?: string;
|
|
123
175
|
|
|
124
|
-
|
|
125
|
-
}
|
|
176
|
+
from?: string;
|
|
126
177
|
|
|
127
|
-
|
|
128
|
-
usd_price?: string;
|
|
178
|
+
gas?: string;
|
|
129
179
|
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
}
|
|
180
|
+
gas_price?: string;
|
|
133
181
|
|
|
134
|
-
|
|
135
|
-
block_tag?: string;
|
|
182
|
+
to?: string;
|
|
136
183
|
|
|
137
|
-
|
|
184
|
+
value?: string;
|
|
185
|
+
}
|
|
138
186
|
|
|
139
|
-
|
|
187
|
+
/**
|
|
188
|
+
* A failed simulation result from a transaction scan.
|
|
189
|
+
*/
|
|
190
|
+
export interface TransactionScanningSimulationErrorResult {
|
|
191
|
+
error: string;
|
|
140
192
|
|
|
141
|
-
|
|
193
|
+
status: 'Error';
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* A successful simulation result from a transaction scan.
|
|
198
|
+
*/
|
|
199
|
+
export interface TransactionScanningSimulationSuccessResult {
|
|
200
|
+
assets_diffs: Array<TransactionScanningAssetDiff>;
|
|
201
|
+
|
|
202
|
+
exposures: Array<TransactionScanningExposure>;
|
|
142
203
|
|
|
143
|
-
|
|
204
|
+
status: 'Success';
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* The parameters of the scanned transaction.
|
|
208
|
+
*/
|
|
209
|
+
params?: TransactionScanningParams;
|
|
210
|
+
}
|
|
144
211
|
|
|
145
|
-
|
|
212
|
+
/**
|
|
213
|
+
* The simulation result from a transaction scan.
|
|
214
|
+
*/
|
|
215
|
+
export type TransactionScanningSimulationResult =
|
|
216
|
+
| TransactionScanningSimulationErrorResult
|
|
217
|
+
| TransactionScanningSimulationSuccessResult;
|
|
146
218
|
|
|
147
|
-
|
|
219
|
+
/**
|
|
220
|
+
* A list of transactions.
|
|
221
|
+
*/
|
|
222
|
+
export interface TransactionList {
|
|
223
|
+
transactions: Array<TransactionList.Transaction>;
|
|
224
|
+
}
|
|
148
225
|
|
|
149
|
-
|
|
226
|
+
export namespace TransactionList {
|
|
227
|
+
export interface Transaction {
|
|
228
|
+
id: string;
|
|
150
229
|
|
|
151
|
-
|
|
152
|
-
}
|
|
230
|
+
caip2: string;
|
|
153
231
|
|
|
154
|
-
|
|
155
|
-
export interface Calldata {
|
|
156
|
-
function_selector: string;
|
|
232
|
+
created_at: number;
|
|
157
233
|
|
|
158
|
-
|
|
234
|
+
status:
|
|
235
|
+
| 'broadcasted'
|
|
236
|
+
| 'confirmed'
|
|
237
|
+
| 'execution_reverted'
|
|
238
|
+
| 'failed'
|
|
239
|
+
| 'replaced'
|
|
240
|
+
| 'finalized'
|
|
241
|
+
| 'provider_error'
|
|
242
|
+
| 'pending';
|
|
159
243
|
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
244
|
+
transaction_hash: string | null;
|
|
164
245
|
|
|
165
|
-
|
|
166
|
-
error: string;
|
|
246
|
+
wallet_id: string;
|
|
167
247
|
|
|
168
|
-
|
|
169
|
-
}
|
|
248
|
+
reference_id?: string | null;
|
|
170
249
|
|
|
171
|
-
|
|
172
|
-
result_type: string;
|
|
250
|
+
sponsored?: boolean;
|
|
173
251
|
|
|
174
|
-
|
|
252
|
+
user_operation_hash?: string;
|
|
175
253
|
}
|
|
176
254
|
}
|
|
177
255
|
|
|
@@ -196,13 +274,32 @@ export interface TransactionGetResponse {
|
|
|
196
274
|
|
|
197
275
|
wallet_id: string;
|
|
198
276
|
|
|
277
|
+
reference_id?: string | null;
|
|
278
|
+
|
|
199
279
|
sponsored?: boolean;
|
|
280
|
+
|
|
281
|
+
user_operation_hash?: string;
|
|
200
282
|
}
|
|
201
283
|
|
|
202
284
|
export declare namespace Transactions {
|
|
203
285
|
export {
|
|
204
286
|
type TransactionScanningRequestBody as TransactionScanningRequestBody,
|
|
205
287
|
type TransactionScanningResponseBody as TransactionScanningResponseBody,
|
|
288
|
+
type TransactionScanningMetadata as TransactionScanningMetadata,
|
|
289
|
+
type TransactionScanningRpcRequest as TransactionScanningRpcRequest,
|
|
290
|
+
type TransactionScanningValidationErrorResult as TransactionScanningValidationErrorResult,
|
|
291
|
+
type TransactionScanningValidationSuccessResult as TransactionScanningValidationSuccessResult,
|
|
292
|
+
type TransactionScanningValidationResult as TransactionScanningValidationResult,
|
|
293
|
+
type TransactionScanningAssetInfo as TransactionScanningAssetInfo,
|
|
294
|
+
type TransactionScanningAssetValue as TransactionScanningAssetValue,
|
|
295
|
+
type TransactionScanningAssetDiff as TransactionScanningAssetDiff,
|
|
296
|
+
type TransactionScanningExposure as TransactionScanningExposure,
|
|
297
|
+
type TransactionScanningCalldata as TransactionScanningCalldata,
|
|
298
|
+
type TransactionScanningParams as TransactionScanningParams,
|
|
299
|
+
type TransactionScanningSimulationErrorResult as TransactionScanningSimulationErrorResult,
|
|
300
|
+
type TransactionScanningSimulationSuccessResult as TransactionScanningSimulationSuccessResult,
|
|
301
|
+
type TransactionScanningSimulationResult as TransactionScanningSimulationResult,
|
|
302
|
+
type TransactionList as TransactionList,
|
|
206
303
|
type TransactionGetResponse as TransactionGetResponse,
|
|
207
304
|
};
|
|
208
305
|
}
|