@privy-io/node 0.10.1 → 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 +50 -0
- package/client.d.mts +37 -19
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -19
- package/client.d.ts.map +1 -1
- package/client.js +29 -10
- package/client.js.map +1 -1
- package/client.mjs +30 -11
- package/client.mjs.map +1 -1
- package/index.d.mts +2 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js.map +1 -1
- package/index.mjs.map +1 -1
- package/package.json +12 -1
- package/public-api/PrivyClient.d.mts +3 -0
- package/public-api/PrivyClient.d.mts.map +1 -1
- package/public-api/PrivyClient.d.ts +3 -0
- package/public-api/PrivyClient.d.ts.map +1 -1
- package/public-api/PrivyClient.js +5 -0
- package/public-api/PrivyClient.js.map +1 -1
- package/public-api/PrivyClient.mjs +5 -0
- package/public-api/PrivyClient.mjs.map +1 -1
- package/public-api/services/apps.d.mts +25 -0
- package/public-api/services/apps.d.mts.map +1 -0
- package/public-api/services/apps.d.ts +25 -0
- package/public-api/services/apps.d.ts.map +1 -0
- package/public-api/services/apps.js +56 -0
- package/public-api/services/apps.js.map +1 -0
- package/public-api/services/apps.mjs +52 -0
- package/public-api/services/apps.mjs.map +1 -0
- package/public-api/services/policies.d.mts +6 -2
- package/public-api/services/policies.d.mts.map +1 -1
- package/public-api/services/policies.d.ts +6 -2
- package/public-api/services/policies.d.ts.map +1 -1
- package/public-api/services/policies.js +6 -0
- package/public-api/services/policies.js.map +1 -1
- package/public-api/services/policies.mjs +6 -0
- package/public-api/services/policies.mjs.map +1 -1
- package/public-api/services/wallets.d.mts +5 -1
- package/public-api/services/wallets.d.mts.map +1 -1
- package/public-api/services/wallets.d.ts +5 -1
- package/public-api/services/wallets.d.ts.map +1 -1
- package/public-api/services/wallets.js +6 -0
- package/public-api/services/wallets.js.map +1 -1
- package/public-api/services/wallets.mjs +6 -0
- package/public-api/services/wallets.mjs.map +1 -1
- package/resources/accounts.d.mts +182 -4
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +182 -4
- package/resources/accounts.d.ts.map +1 -1
- package/resources/apps/allowlist.d.mts +81 -0
- package/resources/apps/allowlist.d.mts.map +1 -0
- package/resources/apps/allowlist.d.ts +81 -0
- package/resources/apps/allowlist.d.ts.map +1 -0
- package/resources/apps/allowlist.js +56 -0
- package/resources/apps/allowlist.js.map +1 -0
- package/resources/apps/allowlist.mjs +52 -0
- package/resources/apps/allowlist.mjs.map +1 -0
- package/resources/apps/apps.d.mts +238 -0
- package/resources/apps/apps.d.mts.map +1 -0
- package/resources/apps/apps.d.ts +238 -0
- package/resources/apps/apps.d.ts.map +1 -0
- package/resources/apps/apps.js +44 -0
- package/resources/apps/apps.js.map +1 -0
- package/resources/apps/apps.mjs +39 -0
- package/resources/apps/apps.mjs.map +1 -0
- package/resources/apps/index.d.mts +3 -0
- package/resources/apps/index.d.mts.map +1 -0
- package/resources/apps/index.d.ts +3 -0
- package/resources/apps/index.d.ts.map +1 -0
- package/resources/apps/index.js +9 -0
- package/resources/apps/index.js.map +1 -0
- package/resources/apps/index.mjs +4 -0
- package/resources/apps/index.mjs.map +1 -0
- package/resources/apps.d.mts +1 -151
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +1 -151
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +2 -5
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +1 -3
- package/resources/apps.mjs.map +1 -1
- package/resources/client-auth.d.mts +144 -1
- package/resources/client-auth.d.mts.map +1 -1
- package/resources/client-auth.d.ts +144 -1
- package/resources/client-auth.d.ts.map +1 -1
- package/resources/index.d.mts +11 -10
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +11 -10
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -2
- package/resources/index.mjs.map +1 -1
- package/resources/intents.d.mts +2815 -31
- package/resources/intents.d.mts.map +1 -1
- package/resources/intents.d.ts +2815 -31
- package/resources/intents.d.ts.map +1 -1
- package/resources/intents.js +156 -0
- package/resources/intents.js.map +1 -1
- package/resources/intents.mjs +156 -0
- package/resources/intents.mjs.map +1 -1
- package/resources/key-quorums.d.mts +45 -2
- package/resources/key-quorums.d.mts.map +1 -1
- package/resources/key-quorums.d.ts +45 -2
- package/resources/key-quorums.d.ts.map +1 -1
- package/resources/key-quorums.js +18 -1
- package/resources/key-quorums.js.map +1 -1
- package/resources/key-quorums.mjs +18 -1
- 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 +63 -56
- package/resources/policies.d.mts.map +1 -1
- package/resources/policies.d.ts +63 -56
- package/resources/policies.d.ts.map +1 -1
- package/resources/policies.js +3 -0
- package/resources/policies.js.map +1 -1
- package/resources/policies.mjs +3 -0
- package/resources/policies.mjs.map +1 -1
- package/resources/transactions.d.mts +3 -0
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +3 -0
- 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 +50 -47
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +50 -47
- 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/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 +9 -6
- package/resources/wallets/transactions.d.mts.map +1 -1
- package/resources/wallets/transactions.d.ts +9 -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 +126 -69
- package/resources/wallets/wallets.d.mts.map +1 -1
- package/resources/wallets/wallets.d.ts +126 -69
- package/resources/wallets/wallets.d.ts.map +1 -1
- package/resources/wallets/wallets.js +11 -5
- package/resources/wallets/wallets.js.map +1 -1
- package/resources/wallets/wallets.mjs +11 -5
- package/resources/wallets/wallets.mjs.map +1 -1
- package/resources/webhooks.d.mts +319 -283
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +319 -283
- 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 +26 -9
- package/resources/yield.d.mts.map +1 -1
- package/resources/yield.d.ts +26 -9
- package/resources/yield.d.ts.map +1 -1
- package/src/client.ts +196 -37
- package/src/index.ts +10 -0
- package/src/public-api/PrivyClient.ts +7 -0
- package/src/public-api/services/apps.ts +85 -0
- package/src/public-api/services/policies.ts +15 -1
- package/src/public-api/services/wallets.ts +14 -0
- package/src/resources/accounts.ts +217 -3
- package/src/resources/apps/allowlist.ts +126 -0
- package/src/resources/apps/apps.ts +391 -0
- package/src/resources/apps/index.ts +20 -0
- package/src/resources/apps.ts +1 -257
- package/src/resources/client-auth.ts +202 -0
- package/src/resources/index.ts +93 -21
- package/src/resources/intents.ts +4579 -40
- package/src/resources/key-quorums.ts +50 -2
- package/src/resources/kraken-embed.ts +85 -0
- package/src/resources/policies.ts +83 -76
- package/src/resources/transactions.ts +3 -0
- package/src/resources/users.ts +66 -63
- package/src/resources/wallets/balance.ts +9 -2
- package/src/resources/wallets/index.ts +4 -2
- package/src/resources/wallets/transactions.ts +10 -4
- package/src/resources/wallets/wallets.ts +171 -93
- package/src/resources/webhooks.ts +454 -438
- package/src/resources/yield.ts +39 -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
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Operations related to key quorums
|
|
6
|
+
*/
|
|
4
7
|
export declare class KeyQuorums extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* Create a new key quorum.
|
|
7
10
|
*
|
|
8
11
|
* @example
|
|
9
12
|
* ```ts
|
|
10
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
13
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
14
|
+
* authorization_threshold: 1,
|
|
15
|
+
* display_name: 'Prod key quorum',
|
|
16
|
+
* public_keys: [
|
|
17
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
18
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
19
|
+
* ],
|
|
20
|
+
* });
|
|
11
21
|
* ```
|
|
12
22
|
*/
|
|
13
23
|
create(body: KeyQuorumCreateParams, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
@@ -29,6 +39,13 @@ export declare class KeyQuorums extends APIResource {
|
|
|
29
39
|
* ```ts
|
|
30
40
|
* const keyQuorum = await client.keyQuorums._update(
|
|
31
41
|
* 'key_quorum_id',
|
|
42
|
+
* {
|
|
43
|
+
* authorization_threshold: 1,
|
|
44
|
+
* display_name: 'Prod key quorum',
|
|
45
|
+
* public_keys: [
|
|
46
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
47
|
+
* ],
|
|
48
|
+
* },
|
|
32
49
|
* );
|
|
33
50
|
* ```
|
|
34
51
|
*/
|
|
@@ -45,6 +62,32 @@ export declare class KeyQuorums extends APIResource {
|
|
|
45
62
|
*/
|
|
46
63
|
get(keyQuorumID: string, options?: RequestOptions): APIPromise<KeyQuorum>;
|
|
47
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Request input for creating or updating a key quorum.
|
|
67
|
+
*/
|
|
68
|
+
export interface KeyQuorumCreateParams {
|
|
69
|
+
/**
|
|
70
|
+
* The number of keys that must sign for an action to be valid. Must be less than
|
|
71
|
+
* or equal to total number of key quorum members.
|
|
72
|
+
*/
|
|
73
|
+
authorization_threshold?: number;
|
|
74
|
+
display_name?: string;
|
|
75
|
+
/**
|
|
76
|
+
* List of key quorum IDs that should be members of this key quorum. Key quorums
|
|
77
|
+
* can only be nested 1 level deep.
|
|
78
|
+
*/
|
|
79
|
+
key_quorum_ids?: Array<string>;
|
|
80
|
+
/**
|
|
81
|
+
* List of P-256 public keys of the keys that should be authorized to sign on the
|
|
82
|
+
* key quorum, in base64-encoded DER format.
|
|
83
|
+
*/
|
|
84
|
+
public_keys?: Array<string>;
|
|
85
|
+
/**
|
|
86
|
+
* List of user IDs of the users that should be authorized to sign on the key
|
|
87
|
+
* quorum.
|
|
88
|
+
*/
|
|
89
|
+
user_ids?: Array<string>;
|
|
90
|
+
}
|
|
48
91
|
/**
|
|
49
92
|
* A key quorum for authorizing wallet operations.
|
|
50
93
|
*/
|
|
@@ -133,6 +176,6 @@ export interface KeyQuorumUpdateParams {
|
|
|
133
176
|
'privy-authorization-signature'?: string;
|
|
134
177
|
}
|
|
135
178
|
export declare namespace KeyQuorums {
|
|
136
|
-
export { type
|
|
179
|
+
export { type KeyQuorumCreateParams as KeyQuorumCreateParams, type KeyQuorum as KeyQuorum, type KeyQuorumDeleteResponse as KeyQuorumDeleteResponse, type KeyQuorumDeleteParams as KeyQuorumDeleteParams, type KeyQuorumUpdateParams as KeyQuorumUpdateParams, };
|
|
137
180
|
}
|
|
138
181
|
//# sourceMappingURL=key-quorums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.d.ts","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"key-quorums.d.ts","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU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|
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const headers_1 = require("../internal/headers.js");
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
|
+
/**
|
|
9
|
+
* Operations related to key quorums
|
|
10
|
+
*/
|
|
8
11
|
class KeyQuorums extends resource_1.APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Create a new key quorum.
|
|
11
14
|
*
|
|
12
15
|
* @example
|
|
13
16
|
* ```ts
|
|
14
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
17
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
18
|
+
* authorization_threshold: 1,
|
|
19
|
+
* display_name: 'Prod key quorum',
|
|
20
|
+
* public_keys: [
|
|
21
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
22
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
23
|
+
* ],
|
|
24
|
+
* });
|
|
15
25
|
* ```
|
|
16
26
|
*/
|
|
17
27
|
create(body, options) {
|
|
@@ -48,6 +58,13 @@ class KeyQuorums extends resource_1.APIResource {
|
|
|
48
58
|
* ```ts
|
|
49
59
|
* const keyQuorum = await client.keyQuorums._update(
|
|
50
60
|
* 'key_quorum_id',
|
|
61
|
+
* {
|
|
62
|
+
* authorization_threshold: 1,
|
|
63
|
+
* display_name: 'Prod key quorum',
|
|
64
|
+
* public_keys: [
|
|
65
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
66
|
+
* ],
|
|
67
|
+
* },
|
|
51
68
|
* );
|
|
52
69
|
* ```
|
|
53
70
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.js","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C,MAAa,UAAW,SAAQ,sBAAW;IACzC
|
|
1
|
+
{"version":3,"file":"key-quorums.js","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAEnD,oDAA8C;AAE9C;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;;;;;;;;OASG;IACH,OAAO,CACL,WAAmB,EACnB,SAAmD,EAAE,EACrD,OAAwB;QAExB,MAAM,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,mBAAmB,WAAW,EAAE,EAAE;YAC/D,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,2BAA2B,IAAI,IAAI,CAAC,CAAC;wBACvC,EAAE,+BAA+B,EAAE,2BAA2B,EAAE;wBAClE,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CACL,WAAmB,EACnB,MAA6B,EAC7B,OAAwB;QAExB,MAAM,EAAE,+BAA+B,EAAE,2BAA2B,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACzF,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,mBAAmB,WAAW,EAAE,EAAE;YAC9D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,2BAA2B,IAAI,IAAI,CAAC,CAAC;wBACvC,EAAE,+BAA+B,EAAE,2BAA2B,EAAE;wBAClE,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,WAAmB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,mBAAmB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF;AAnGD,gCAmGC"}
|
|
@@ -2,13 +2,23 @@
|
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
4
|
import { path } from "../internal/utils/path.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Operations related to key quorums
|
|
7
|
+
*/
|
|
5
8
|
export class KeyQuorums extends APIResource {
|
|
6
9
|
/**
|
|
7
10
|
* Create a new key quorum.
|
|
8
11
|
*
|
|
9
12
|
* @example
|
|
10
13
|
* ```ts
|
|
11
|
-
* const keyQuorum = await client.keyQuorums.create(
|
|
14
|
+
* const keyQuorum = await client.keyQuorums.create({
|
|
15
|
+
* authorization_threshold: 1,
|
|
16
|
+
* display_name: 'Prod key quorum',
|
|
17
|
+
* public_keys: [
|
|
18
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
19
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAErzZtQr/bMIh3Y8f9ZqseB9i/AfjQ\nhu+agbNqXcJy/TfoNqvc/Y3Mh7gIZ8ZLXQEykycx4mYSpqrxp1lBKqsZDQ==',
|
|
20
|
+
* ],
|
|
21
|
+
* });
|
|
12
22
|
* ```
|
|
13
23
|
*/
|
|
14
24
|
create(body, options) {
|
|
@@ -45,6 +55,13 @@ export class KeyQuorums extends APIResource {
|
|
|
45
55
|
* ```ts
|
|
46
56
|
* const keyQuorum = await client.keyQuorums._update(
|
|
47
57
|
* 'key_quorum_id',
|
|
58
|
+
* {
|
|
59
|
+
* authorization_threshold: 1,
|
|
60
|
+
* display_name: 'Prod key quorum',
|
|
61
|
+
* public_keys: [
|
|
62
|
+
* 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEx4aoeD72yykviK+f/ckqE2CItVIG\n1rCnvC3/XZ1HgpOcMEMialRmTrqIK4oZlYd1RfxU3za/C9yjhboIuoPD3g==',
|
|
63
|
+
* ],
|
|
64
|
+
* },
|
|
48
65
|
* );
|
|
49
66
|
* ```
|
|
50
67
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"key-quorums.mjs","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"key-quorums.mjs","sourceRoot":"","sources":["../src/resources/key-quorums.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EA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L,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,WAAmB,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,mBAAmB,WAAW,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import * as KrakenEmbedAPI from "./kraken-embed.mjs";
|
|
3
|
+
export declare class KrakenEmbed extends APIResource {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Query parameters for getting a portfolio summary.
|
|
7
|
+
*/
|
|
8
|
+
export interface KrakenEmbedGetPortfolioSummaryQueryParams {
|
|
9
|
+
'include[current_day_pnl]'?: 'true' | 'false';
|
|
10
|
+
quote?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
14
|
+
* available balance.
|
|
15
|
+
*/
|
|
16
|
+
export interface KrakenEmbedCurrentDayPnl {
|
|
17
|
+
pnl: string;
|
|
18
|
+
since: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* High-level summary of a user's portfolio including total value, available
|
|
22
|
+
* balance, and unrealized P&L.
|
|
23
|
+
*/
|
|
24
|
+
export interface KrakenEmbedGetPortfolioSummaryResponse {
|
|
25
|
+
data: KrakenEmbedGetPortfolioSummaryResponse.Data;
|
|
26
|
+
}
|
|
27
|
+
export declare namespace KrakenEmbedGetPortfolioSummaryResponse {
|
|
28
|
+
interface Data {
|
|
29
|
+
result: Data.Result | null;
|
|
30
|
+
error?: Array<unknown>;
|
|
31
|
+
errors?: Array<unknown>;
|
|
32
|
+
}
|
|
33
|
+
namespace Data {
|
|
34
|
+
interface Result {
|
|
35
|
+
available_balance: string;
|
|
36
|
+
currency: string;
|
|
37
|
+
open_orders: string;
|
|
38
|
+
portfolio_value: string;
|
|
39
|
+
timestamp: string;
|
|
40
|
+
withheld_value: string;
|
|
41
|
+
cost_basis?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
44
|
+
* available balance.
|
|
45
|
+
*/
|
|
46
|
+
current_day_pnl?: Result.CurrentDayPnl;
|
|
47
|
+
lots_upnl?: string | null;
|
|
48
|
+
}
|
|
49
|
+
namespace Result {
|
|
50
|
+
/**
|
|
51
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
52
|
+
* available balance.
|
|
53
|
+
*/
|
|
54
|
+
interface CurrentDayPnl extends KrakenEmbedAPI.KrakenEmbedCurrentDayPnl {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare namespace KrakenEmbed {
|
|
60
|
+
export { type KrakenEmbedGetPortfolioSummaryQueryParams as KrakenEmbedGetPortfolioSummaryQueryParams, type KrakenEmbedCurrentDayPnl as KrakenEmbedCurrentDayPnl, type KrakenEmbedGetPortfolioSummaryResponse as KrakenEmbedGetPortfolioSummaryResponse, };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=kraken-embed.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kraken-embed.d.mts","sourceRoot":"","sources":["../src/resources/kraken-embed.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;AAE1B,qBAAa,WAAY,SAAQ,WAAW;CAAG;AAE/C;;GAEG;AACH,MAAM,WAAW,yCAAyC;IACxD,0BAA0B,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE,sCAAsC,CAAC,IAAI,CAAC;CACnD;AAED,yBAAiB,sCAAsC,CAAC;IACtD,UAAiB,IAAI;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAE3B,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEvB,MAAM,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,MAAM;YACrB,iBAAiB,EAAE,MAAM,CAAC;YAE1B,QAAQ,EAAE,MAAM,CAAC;YAEjB,WAAW,EAAE,MAAM,CAAC;YAEpB,eAAe,EAAE,MAAM,CAAC;YAExB,SAAS,EAAE,MAAM,CAAC;YAElB,cAAc,EAAE,MAAM,CAAC;YAEvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAE3B;;;eAGG;YACH,eAAe,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC;YAEvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B;QAED,UAAiB,MAAM,CAAC;YACtB;;;eAGG;YACH,UAAiB,aAAc,SAAQ,cAAc,CAAC,wBAAwB;aAAG;SAClF;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sCAAsC,IAAI,sCAAsC,GACtF,CAAC;CACH"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import * as KrakenEmbedAPI from "./kraken-embed.js";
|
|
3
|
+
export declare class KrakenEmbed extends APIResource {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Query parameters for getting a portfolio summary.
|
|
7
|
+
*/
|
|
8
|
+
export interface KrakenEmbedGetPortfolioSummaryQueryParams {
|
|
9
|
+
'include[current_day_pnl]'?: 'true' | 'false';
|
|
10
|
+
quote?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
14
|
+
* available balance.
|
|
15
|
+
*/
|
|
16
|
+
export interface KrakenEmbedCurrentDayPnl {
|
|
17
|
+
pnl: string;
|
|
18
|
+
since: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* High-level summary of a user's portfolio including total value, available
|
|
22
|
+
* balance, and unrealized P&L.
|
|
23
|
+
*/
|
|
24
|
+
export interface KrakenEmbedGetPortfolioSummaryResponse {
|
|
25
|
+
data: KrakenEmbedGetPortfolioSummaryResponse.Data;
|
|
26
|
+
}
|
|
27
|
+
export declare namespace KrakenEmbedGetPortfolioSummaryResponse {
|
|
28
|
+
interface Data {
|
|
29
|
+
result: Data.Result | null;
|
|
30
|
+
error?: Array<unknown>;
|
|
31
|
+
errors?: Array<unknown>;
|
|
32
|
+
}
|
|
33
|
+
namespace Data {
|
|
34
|
+
interface Result {
|
|
35
|
+
available_balance: string;
|
|
36
|
+
currency: string;
|
|
37
|
+
open_orders: string;
|
|
38
|
+
portfolio_value: string;
|
|
39
|
+
timestamp: string;
|
|
40
|
+
withheld_value: string;
|
|
41
|
+
cost_basis?: string | null;
|
|
42
|
+
/**
|
|
43
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
44
|
+
* available balance.
|
|
45
|
+
*/
|
|
46
|
+
current_day_pnl?: Result.CurrentDayPnl;
|
|
47
|
+
lots_upnl?: string | null;
|
|
48
|
+
}
|
|
49
|
+
namespace Result {
|
|
50
|
+
/**
|
|
51
|
+
* Current day profit and loss for a portfolio, calculated from the most recent
|
|
52
|
+
* available balance.
|
|
53
|
+
*/
|
|
54
|
+
interface CurrentDayPnl extends KrakenEmbedAPI.KrakenEmbedCurrentDayPnl {
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export declare namespace KrakenEmbed {
|
|
60
|
+
export { type KrakenEmbedGetPortfolioSummaryQueryParams as KrakenEmbedGetPortfolioSummaryQueryParams, type KrakenEmbedCurrentDayPnl as KrakenEmbedCurrentDayPnl, type KrakenEmbedGetPortfolioSummaryResponse as KrakenEmbedGetPortfolioSummaryResponse, };
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=kraken-embed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kraken-embed.d.ts","sourceRoot":"","sources":["../src/resources/kraken-embed.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;AAE1B,qBAAa,WAAY,SAAQ,WAAW;CAAG;AAE/C;;GAEG;AACH,MAAM,WAAW,yCAAyC;IACxD,0BAA0B,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAE9C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,GAAG,EAAE,MAAM,CAAC;IAEZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE,sCAAsC,CAAC,IAAI,CAAC;CACnD;AAED,yBAAiB,sCAAsC,CAAC;IACtD,UAAiB,IAAI;QACnB,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAE3B,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEvB,MAAM,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;KACzB;IAED,UAAiB,IAAI,CAAC;QACpB,UAAiB,MAAM;YACrB,iBAAiB,EAAE,MAAM,CAAC;YAE1B,QAAQ,EAAE,MAAM,CAAC;YAEjB,WAAW,EAAE,MAAM,CAAC;YAEpB,eAAe,EAAE,MAAM,CAAC;YAExB,SAAS,EAAE,MAAM,CAAC;YAElB,cAAc,EAAE,MAAM,CAAC;YAEvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAE3B;;;eAGG;YACH,eAAe,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC;YAEvC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAC3B;QAED,UAAiB,MAAM,CAAC;YACtB;;;eAGG;YACH,UAAiB,aAAc,SAAQ,cAAc,CAAC,wBAAwB;aAAG;SAClF;KACF;CACF;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,yCAAyC,IAAI,yCAAyC,EAC3F,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sCAAsC,IAAI,sCAAsC,GACtF,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.KrakenEmbed = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class KrakenEmbed extends resource_1.APIResource {
|
|
7
|
+
}
|
|
8
|
+
exports.KrakenEmbed = KrakenEmbed;
|
|
9
|
+
//# sourceMappingURL=kraken-embed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kraken-embed.js","sourceRoot":"","sources":["../src/resources/kraken-embed.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,MAAa,WAAY,SAAQ,sBAAW;CAAG;AAA/C,kCAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kraken-embed.mjs","sourceRoot":"","sources":["../src/resources/kraken-embed.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;CAAG"}
|
package/resources/policies.d.mts
CHANGED
|
@@ -3,6 +3,9 @@ import * as PoliciesAPI from "./policies.mjs";
|
|
|
3
3
|
import * as WalletsAPI from "./wallets/wallets.mjs";
|
|
4
4
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
5
5
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Operations related to policies
|
|
8
|
+
*/
|
|
6
9
|
export declare class Policies extends APIResource {
|
|
7
10
|
/**
|
|
8
11
|
* Create a new policy.
|
|
@@ -139,6 +142,61 @@ export declare class Policies extends APIResource {
|
|
|
139
142
|
*/
|
|
140
143
|
getRule(ruleID: string, params: PolicyGetRuleParams, options?: RequestOptions): APIPromise<PolicyGetRuleResponse>;
|
|
141
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
147
|
+
* supported for command names.
|
|
148
|
+
*/
|
|
149
|
+
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
150
|
+
/**
|
|
151
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
152
|
+
* and 'amount' are supported.
|
|
153
|
+
*/
|
|
154
|
+
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
155
|
+
/**
|
|
156
|
+
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
157
|
+
* transaction types.
|
|
158
|
+
*/
|
|
159
|
+
export interface TronTransactionCondition {
|
|
160
|
+
/**
|
|
161
|
+
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
162
|
+
*/
|
|
163
|
+
field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
|
|
164
|
+
field_source: 'tron_transaction';
|
|
165
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
166
|
+
value: string | Array<string>;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
170
|
+
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
171
|
+
* 'in' operators are supported.
|
|
172
|
+
*/
|
|
173
|
+
export interface SuiTransactionCommandCondition {
|
|
174
|
+
field: 'commandName';
|
|
175
|
+
field_source: 'sui_transaction_command';
|
|
176
|
+
/**
|
|
177
|
+
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
178
|
+
* supported for command names.
|
|
179
|
+
*/
|
|
180
|
+
operator: SuiTransactionCommandOperator;
|
|
181
|
+
/**
|
|
182
|
+
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
183
|
+
* 'MergeCoins'
|
|
184
|
+
*/
|
|
185
|
+
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
189
|
+
*/
|
|
190
|
+
export interface SuiTransferObjectsCommandCondition {
|
|
191
|
+
/**
|
|
192
|
+
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
193
|
+
* and 'amount' are supported.
|
|
194
|
+
*/
|
|
195
|
+
field: SuiTransferObjectsCommandField;
|
|
196
|
+
field_source: 'sui_transfer_objects_command';
|
|
197
|
+
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
198
|
+
value: string | Array<string>;
|
|
199
|
+
}
|
|
142
200
|
/**
|
|
143
201
|
* A policy for controlling wallet operations.
|
|
144
202
|
*/
|
|
@@ -294,61 +352,6 @@ export declare namespace Policy {
|
|
|
294
352
|
}
|
|
295
353
|
}
|
|
296
354
|
}
|
|
297
|
-
/**
|
|
298
|
-
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
299
|
-
* supported for command names.
|
|
300
|
-
*/
|
|
301
|
-
export type SuiTransactionCommandOperator = 'eq' | 'in';
|
|
302
|
-
/**
|
|
303
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
304
|
-
* and 'amount' are supported.
|
|
305
|
-
*/
|
|
306
|
-
export type SuiTransferObjectsCommandField = 'recipient' | 'amount';
|
|
307
|
-
/**
|
|
308
|
-
* TRON transaction fields for TransferContract and TriggerSmartContract
|
|
309
|
-
* transaction types.
|
|
310
|
-
*/
|
|
311
|
-
export interface TronTransactionCondition {
|
|
312
|
-
/**
|
|
313
|
-
* Supported TRON transaction fields in format "TransactionType.field_name"
|
|
314
|
-
*/
|
|
315
|
-
field: 'TransferContract.to_address' | 'TransferContract.amount' | 'TriggerSmartContract.contract_address' | 'TriggerSmartContract.call_value' | 'TriggerSmartContract.token_id' | 'TriggerSmartContract.call_token_value';
|
|
316
|
-
field_source: 'tron_transaction';
|
|
317
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
318
|
-
value: string | Array<string>;
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* SUI transaction command attributes, enables allowlisting specific command types.
|
|
322
|
-
* Allowed commands: 'TransferObjects', 'SplitCoins', 'MergeCoins'. Only 'eq' and
|
|
323
|
-
* 'in' operators are supported.
|
|
324
|
-
*/
|
|
325
|
-
export interface SuiTransactionCommandCondition {
|
|
326
|
-
field: 'commandName';
|
|
327
|
-
field_source: 'sui_transaction_command';
|
|
328
|
-
/**
|
|
329
|
-
* Operator to use for SUI transaction command conditions. Only 'eq' and 'in' are
|
|
330
|
-
* supported for command names.
|
|
331
|
-
*/
|
|
332
|
-
operator: SuiTransactionCommandOperator;
|
|
333
|
-
/**
|
|
334
|
-
* Command name(s) to match. Must be one of: 'TransferObjects', 'SplitCoins',
|
|
335
|
-
* 'MergeCoins'
|
|
336
|
-
*/
|
|
337
|
-
value: WalletsAPI.SuiCommandName | Array<WalletsAPI.SuiCommandName>;
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* SUI TransferObjects command attributes, including recipient and amount fields.
|
|
341
|
-
*/
|
|
342
|
-
export interface SuiTransferObjectsCommandCondition {
|
|
343
|
-
/**
|
|
344
|
-
* Supported fields for SUI TransferObjects command conditions. Only 'recipient'
|
|
345
|
-
* and 'amount' are supported.
|
|
346
|
-
*/
|
|
347
|
-
field: SuiTransferObjectsCommandField;
|
|
348
|
-
field_source: 'sui_transfer_objects_command';
|
|
349
|
-
operator: 'eq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'in_condition_set';
|
|
350
|
-
value: string | Array<string>;
|
|
351
|
-
}
|
|
352
355
|
/**
|
|
353
356
|
* A rule that defines the conditions and action to take if the conditions are
|
|
354
357
|
* true.
|
|
@@ -483,6 +486,10 @@ export interface PolicyDeleteRuleResponse {
|
|
|
483
486
|
*/
|
|
484
487
|
success: boolean;
|
|
485
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* A rule that defines the conditions and action to take if the conditions are
|
|
491
|
+
* true.
|
|
492
|
+
*/
|
|
486
493
|
export interface PolicyUpdateRuleResponse {
|
|
487
494
|
id: string;
|
|
488
495
|
/**
|
|
@@ -1339,6 +1346,6 @@ export interface PolicyGetRuleParams {
|
|
|
1339
1346
|
policy_id: string;
|
|
1340
1347
|
}
|
|
1341
1348
|
export declare namespace Policies {
|
|
1342
|
-
export { type
|
|
1349
|
+
export { type SuiTransactionCommandOperator as SuiTransactionCommandOperator, type SuiTransferObjectsCommandField as SuiTransferObjectsCommandField, type TronTransactionCondition as TronTransactionCondition, type SuiTransactionCommandCondition as SuiTransactionCommandCondition, type SuiTransferObjectsCommandCondition as SuiTransferObjectsCommandCondition, type Policy as Policy, type PolicyCreateRuleResponse as PolicyCreateRuleResponse, type PolicyDeleteResponse as PolicyDeleteResponse, type PolicyDeleteRuleResponse as PolicyDeleteRuleResponse, type PolicyUpdateRuleResponse as PolicyUpdateRuleResponse, type PolicyGetRuleResponse as PolicyGetRuleResponse, type PolicyCreateParams as PolicyCreateParams, type PolicyCreateRuleParams as PolicyCreateRuleParams, type PolicyDeleteParams as PolicyDeleteParams, type PolicyDeleteRuleParams as PolicyDeleteRuleParams, type PolicyUpdateParams as PolicyUpdateParams, type PolicyUpdateRuleParams as PolicyUpdateRuleParams, type PolicyGetRuleParams as PolicyGetRuleParams, };
|
|
1343
1350
|
}
|
|
1344
1351
|
//# sourceMappingURL=policies.d.mts.map
|