@privy-io/api-types 0.10.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 +8 -0
- package/client.d.mts +18 -24
- package/client.d.mts.map +1 -1
- package/client.d.ts +18 -24
- package/client.d.ts.map +1 -1
- package/client.js +6 -12
- package/client.js.map +1 -1
- package/client.mjs +6 -12
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/client-auth.d.mts +496 -514
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +496 -514
- 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 +9 -9
- package/resources/embedded-wallets.d.mts.map +1 -1
- package/resources/embedded-wallets.d.ts +9 -9
- 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 +46 -46
- package/resources/funding.d.mts.map +1 -1
- package/resources/funding.d.ts +46 -46
- package/resources/funding.d.ts.map +1 -1
- package/resources/index.d.mts +9 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/key-quorums.d.mts +1 -132
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +1 -132
- 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/policies.d.mts +1 -311
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +1 -311
- 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/transactions.d.mts +28 -44
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +28 -44
- 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 +1 -345
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +1 -345
- 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/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/wallets.d.mts +130 -315
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +130 -315
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +41 -102
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +41 -102
- package/resources/wallets/wallets.mjs.map +1 -1
- package/src/client.ts +106 -152
- package/src/resources/client-auth.ts +743 -787
- package/src/resources/embedded-wallets.ts +14 -14
- package/src/resources/fiat.ts +177 -0
- package/src/resources/funding.ts +65 -65
- package/src/resources/index.ts +86 -106
- package/src/resources/key-quorums.ts +1 -203
- package/src/resources/policies.ts +1 -493
- package/src/resources/transactions.ts +35 -55
- package/src/resources/users.ts +1 -479
- package/src/resources/wallets/index.ts +4 -9
- package/src/resources/wallets/wallets.ts +182 -423
- 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/resources/policies.mjs
CHANGED
|
@@ -1,234 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
-
import { path } from "../internal/utils/path.mjs";
|
|
5
|
-
/**
|
|
6
|
-
* Operations related to policies
|
|
7
|
-
*/
|
|
8
3
|
export class Policies extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Create a new policy.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const policy = await client.policies.create({
|
|
15
|
-
* chain_type: 'ethereum',
|
|
16
|
-
* name: 'x',
|
|
17
|
-
* rules: [
|
|
18
|
-
* {
|
|
19
|
-
* action: 'ALLOW',
|
|
20
|
-
* conditions: [
|
|
21
|
-
* {
|
|
22
|
-
* field: 'to',
|
|
23
|
-
* field_source: 'ethereum_transaction',
|
|
24
|
-
* operator: 'eq',
|
|
25
|
-
* value: 'string',
|
|
26
|
-
* },
|
|
27
|
-
* ],
|
|
28
|
-
* method: 'eth_sendTransaction',
|
|
29
|
-
* name: 'x',
|
|
30
|
-
* },
|
|
31
|
-
* ],
|
|
32
|
-
* version: '1.0',
|
|
33
|
-
* });
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
create(params, options) {
|
|
37
|
-
const { 'privy-idempotency-key': privyIdempotencyKey, ...body } = params;
|
|
38
|
-
return this._client.post('/v1/policies', {
|
|
39
|
-
body,
|
|
40
|
-
...options,
|
|
41
|
-
headers: buildHeaders([
|
|
42
|
-
{ ...(privyIdempotencyKey != null ? { 'privy-idempotency-key': privyIdempotencyKey } : undefined) },
|
|
43
|
-
options?.headers,
|
|
44
|
-
]),
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Create a new rule for a policy.
|
|
49
|
-
*
|
|
50
|
-
* @example
|
|
51
|
-
* ```ts
|
|
52
|
-
* const policyRuleResponse =
|
|
53
|
-
* await client.policies._createRule(
|
|
54
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
55
|
-
* {
|
|
56
|
-
* action: 'ALLOW',
|
|
57
|
-
* conditions: [
|
|
58
|
-
* {
|
|
59
|
-
* field: 'to',
|
|
60
|
-
* field_source: 'ethereum_transaction',
|
|
61
|
-
* operator: 'eq',
|
|
62
|
-
* value: 'string',
|
|
63
|
-
* },
|
|
64
|
-
* ],
|
|
65
|
-
* method: 'eth_sendTransaction',
|
|
66
|
-
* name: 'x',
|
|
67
|
-
* },
|
|
68
|
-
* );
|
|
69
|
-
* ```
|
|
70
|
-
*/
|
|
71
|
-
_createRule(policyID, params, options) {
|
|
72
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, ...body } = params;
|
|
73
|
-
return this._client.post(path `/v1/policies/${policyID}/rules`, {
|
|
74
|
-
body,
|
|
75
|
-
...options,
|
|
76
|
-
headers: buildHeaders([
|
|
77
|
-
{
|
|
78
|
-
...(privyAuthorizationSignature != null ?
|
|
79
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
80
|
-
: undefined),
|
|
81
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
82
|
-
},
|
|
83
|
-
options?.headers,
|
|
84
|
-
]),
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Delete a policy by policy ID.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```ts
|
|
92
|
-
* const successResponse = await client.policies._delete(
|
|
93
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
94
|
-
* );
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
_delete(policyID, params = {}, options) {
|
|
98
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, } = params ?? {};
|
|
99
|
-
return this._client.delete(path `/v1/policies/${policyID}`, {
|
|
100
|
-
...options,
|
|
101
|
-
headers: buildHeaders([
|
|
102
|
-
{
|
|
103
|
-
...(privyAuthorizationSignature != null ?
|
|
104
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
105
|
-
: undefined),
|
|
106
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
107
|
-
},
|
|
108
|
-
options?.headers,
|
|
109
|
-
]),
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Delete a rule by policy ID and rule ID.
|
|
114
|
-
*
|
|
115
|
-
* @example
|
|
116
|
-
* ```ts
|
|
117
|
-
* const successResponse = await client.policies._deleteRule(
|
|
118
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
119
|
-
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
120
|
-
* );
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
_deleteRule(ruleID, params, options) {
|
|
124
|
-
const { policy_id, 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, } = params;
|
|
125
|
-
return this._client.delete(path `/v1/policies/${policy_id}/rules/${ruleID}`, {
|
|
126
|
-
...options,
|
|
127
|
-
headers: buildHeaders([
|
|
128
|
-
{
|
|
129
|
-
...(privyAuthorizationSignature != null ?
|
|
130
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
131
|
-
: undefined),
|
|
132
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
133
|
-
},
|
|
134
|
-
options?.headers,
|
|
135
|
-
]),
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Update a policy by policy ID.
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```ts
|
|
143
|
-
* const policy = await client.policies._update(
|
|
144
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
145
|
-
* );
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
_update(policyID, params, options) {
|
|
149
|
-
const { 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, ...body } = params;
|
|
150
|
-
return this._client.patch(path `/v1/policies/${policyID}`, {
|
|
151
|
-
body,
|
|
152
|
-
...options,
|
|
153
|
-
headers: buildHeaders([
|
|
154
|
-
{
|
|
155
|
-
...(privyAuthorizationSignature != null ?
|
|
156
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
157
|
-
: undefined),
|
|
158
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
159
|
-
},
|
|
160
|
-
options?.headers,
|
|
161
|
-
]),
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Update a rule by policy ID and rule ID.
|
|
166
|
-
*
|
|
167
|
-
* @example
|
|
168
|
-
* ```ts
|
|
169
|
-
* const policyRuleResponse =
|
|
170
|
-
* await client.policies._updateRule(
|
|
171
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
172
|
-
* {
|
|
173
|
-
* policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
174
|
-
* action: 'ALLOW',
|
|
175
|
-
* conditions: [
|
|
176
|
-
* {
|
|
177
|
-
* field: 'to',
|
|
178
|
-
* field_source: 'ethereum_transaction',
|
|
179
|
-
* operator: 'eq',
|
|
180
|
-
* value: 'string',
|
|
181
|
-
* },
|
|
182
|
-
* ],
|
|
183
|
-
* method: 'eth_sendTransaction',
|
|
184
|
-
* name: 'x',
|
|
185
|
-
* },
|
|
186
|
-
* );
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
_updateRule(ruleID, params, options) {
|
|
190
|
-
const { policy_id, 'privy-authorization-signature': privyAuthorizationSignature, 'privy-request-expiry': privyRequestExpiry, ...body } = params;
|
|
191
|
-
return this._client.patch(path `/v1/policies/${policy_id}/rules/${ruleID}`, {
|
|
192
|
-
body,
|
|
193
|
-
...options,
|
|
194
|
-
headers: buildHeaders([
|
|
195
|
-
{
|
|
196
|
-
...(privyAuthorizationSignature != null ?
|
|
197
|
-
{ 'privy-authorization-signature': privyAuthorizationSignature }
|
|
198
|
-
: undefined),
|
|
199
|
-
...(privyRequestExpiry != null ? { 'privy-request-expiry': privyRequestExpiry } : undefined),
|
|
200
|
-
},
|
|
201
|
-
options?.headers,
|
|
202
|
-
]),
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Get a policy by policy ID.
|
|
207
|
-
*
|
|
208
|
-
* @example
|
|
209
|
-
* ```ts
|
|
210
|
-
* const policy = await client.policies.get(
|
|
211
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
212
|
-
* );
|
|
213
|
-
* ```
|
|
214
|
-
*/
|
|
215
|
-
get(policyID, options) {
|
|
216
|
-
return this._client.get(path `/v1/policies/${policyID}`, options);
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Get a rule by policy ID and rule ID.
|
|
220
|
-
*
|
|
221
|
-
* @example
|
|
222
|
-
* ```ts
|
|
223
|
-
* const policyRuleResponse = await client.policies.getRule(
|
|
224
|
-
* 'xxxxxxxxxxxxxxxxxxxxxxxx',
|
|
225
|
-
* { policy_id: 'xxxxxxxxxxxxxxxxxxxxxxxx' },
|
|
226
|
-
* );
|
|
227
|
-
* ```
|
|
228
|
-
*/
|
|
229
|
-
getRule(ruleID, params, options) {
|
|
230
|
-
const { policy_id } = params;
|
|
231
|
-
return this._client.get(path `/v1/policies/${policy_id}/rules/${ruleID}`, options);
|
|
232
|
-
}
|
|
233
4
|
}
|
|
234
5
|
//# sourceMappingURL=policies.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policies.mjs","sourceRoot":"","sources":["../src/resources/policies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"policies.mjs","sourceRoot":"","sources":["../src/resources/policies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,QAAS,SAAQ,WAAW;CAAG"}
|
|
@@ -1,48 +1,5 @@
|
|
|
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
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* The request body for scanning a transaction.
|
|
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
3
|
}
|
|
47
4
|
/**
|
|
48
5
|
* A transaction from a Privy wallet.
|
|
@@ -135,6 +92,33 @@ export interface TransactionScanningParams {
|
|
|
135
92
|
to?: string;
|
|
136
93
|
value?: string;
|
|
137
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
|
+
}
|
|
138
122
|
/**
|
|
139
123
|
* Raw RPC request to execute with the wallet.
|
|
140
124
|
*/
|
|
@@ -184,6 +168,6 @@ export interface TransactionScanningValidationSuccessResult {
|
|
|
184
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,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3C,wCAAwC,GACxC,0CAA0C,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,0CAA0C;IACzD,WAAW,EAAE,MAAM,CAAC;IAEpB,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,0CAA0C,IAAI,0CAA0C,EAC7F,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,0CAA0C,IAAI,0CAA0C,GAC9F,CAAC;CACH"}
|
|
@@ -1,48 +1,5 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
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
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* The request body for scanning a transaction.
|
|
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
3
|
}
|
|
47
4
|
/**
|
|
48
5
|
* A transaction from a Privy wallet.
|
|
@@ -135,6 +92,33 @@ export interface TransactionScanningParams {
|
|
|
135
92
|
to?: string;
|
|
136
93
|
value?: string;
|
|
137
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
|
+
}
|
|
138
122
|
/**
|
|
139
123
|
* Raw RPC request to execute with the wallet.
|
|
140
124
|
*/
|
|
@@ -184,6 +168,6 @@ export interface TransactionScanningValidationSuccessResult {
|
|
|
184
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.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,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AAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,0CAA0C,IAAI,0CAA0C,GAC9F,CAAC;CACH"}
|
|
@@ -3,24 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Transactions = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
|
-
const path_1 = require("../internal/utils/path.js");
|
|
7
|
-
/**
|
|
8
|
-
* Operations related to transactions
|
|
9
|
-
*/
|
|
10
6
|
class Transactions extends resource_1.APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* Get a transaction by transaction ID.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const transaction = await client.transactions.get(
|
|
17
|
-
* 'transaction_id',
|
|
18
|
-
* );
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
get(transactionID, options) {
|
|
22
|
-
return this._client.get((0, path_1.path) `/v1/transactions/${transactionID}`, options);
|
|
23
|
-
}
|
|
24
7
|
}
|
|
25
8
|
exports.Transactions = Transactions;
|
|
26
9
|
//# sourceMappingURL=transactions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;
|
|
1
|
+
{"version":3,"file":"transactions.js","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,MAAa,YAAa,SAAQ,sBAAW;CAAG;AAAhD,oCAAgD"}
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
|
-
import { path } from "../internal/utils/path.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Operations related to transactions
|
|
6
|
-
*/
|
|
7
3
|
export 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, options) {
|
|
19
|
-
return this._client.get(path `/v1/transactions/${transactionID}`, options);
|
|
20
|
-
}
|
|
21
4
|
}
|
|
22
5
|
//# sourceMappingURL=transactions.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAEtB,MAAM,OAAO,YAAa,SAAQ,WAAW;CAAG"}
|