@ledgerhq/revault-api 1.48.0 → 1.50.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/lib/index.d.mts CHANGED
@@ -11,8 +11,8 @@ import * as _trpc_server_unstable_core_do_not_import from '@trpc/server/unstable
11
11
  import * as fastify_types_type_provider from 'fastify/types/type-provider';
12
12
  import * as http from 'http';
13
13
  import * as fastify from 'fastify';
14
- import { A as AssetResponse } from './app-types-CPQeirCC.mjs';
15
- export { a as AccountFreshAddress, b as AccountLiveDataResponse, c as AccountResponse, d as AccountSortBy, M as AdminResponse, H as ApproveVaultRequestInput, J as Challenge, D as ChallengeResponse, C as CurrencyResponse, G as GroupResponse, u as GroupSortBy, R as RequestSortBy, S as SoftChallenge, n as TokenResponse, T as TransactionResponse, U as UserResponse, O as UserSortBy, V as VaultRequestCreateInput, x as VaultRequestResponse, W as WhitelistResponse, Y as WhitelistSortBy, E as genTransactionSchemas, z as zAccountFreshAddress, e as zAccountLiveDataResponse, f as zAccountResponse, g as zAccountSortBy, L as zAdminResponse, F as zApproveVaultRequestInput, o as zAssetCapabilitiesResponse, p as zAssetResponse, h as zBalance, B as zChallengeResponse, q as zCurrencyResponse, m as zEstimateFeesResponse, s as zGroupResponse, t as zGroupSortBy, y as zRequestSortBy, I as zRequestTaskResponse, i as zStake, j as zStakeSortBy, k as zStakingValidator, l as zStakingValidatorSortBy, r as zTokenResponse, K as zUserResponse, N as zUserSortBy, v as zVaultRequestCreateInput, w as zVaultRequestResponse, P as zWhitelistAddressResponse, Q as zWhitelistResponse, X as zWhitelistSortBy } from './app-types-CPQeirCC.mjs';
14
+ import { A as AssetResponse } from './app-types-CoSpdjR8.mjs';
15
+ export { a as AccountFreshAddress, b as AccountLiveDataResponse, c as AccountResponse, d as AccountSortBy, M as AdminResponse, H as ApproveVaultRequestInput, J as Challenge, D as ChallengeResponse, C as CurrencyResponse, G as GroupResponse, u as GroupSortBy, R as RequestSortBy, S as SoftChallenge, n as TokenResponse, T as TransactionResponse, U as UserResponse, O as UserSortBy, V as VaultRequestCreateInput, x as VaultRequestResponse, W as WhitelistResponse, Y as WhitelistSortBy, E as genTransactionSchemas, z as zAccountFreshAddress, e as zAccountLiveDataResponse, f as zAccountResponse, g as zAccountSortBy, L as zAdminResponse, F as zApproveVaultRequestInput, o as zAssetCapabilitiesResponse, p as zAssetResponse, h as zBalance, B as zChallengeResponse, q as zCurrencyResponse, m as zEstimateFeesResponse, s as zGroupResponse, t as zGroupSortBy, y as zRequestSortBy, I as zRequestTaskResponse, i as zStake, j as zStakeSortBy, k as zStakingValidator, l as zStakingValidatorSortBy, r as zTokenResponse, K as zUserResponse, N as zUserSortBy, v as zVaultRequestCreateInput, w as zVaultRequestResponse, P as zWhitelistAddressResponse, Q as zWhitelistResponse, X as zWhitelistSortBy } from './app-types-CoSpdjR8.mjs';
16
16
 
17
17
  declare const zGovernableAction: z$1.ZodEnum<{
18
18
  SEND: "SEND";
@@ -202,7 +202,6 @@ declare const zTransactionWithMetaResponse: z__default.ZodDiscriminatedUnion<[z_
202
202
  CANTON_LIKE_WITHDRAW: "CANTON_LIKE_WITHDRAW";
203
203
  CANTON_LIKE_RECEIVE: "CANTON_LIKE_RECEIVE";
204
204
  CANTON_LIKE_PRE_APPROVAL: "CANTON_LIKE_PRE_APPROVAL";
205
- CANTON_LIKE_TAP: "CANTON_LIKE_TAP";
206
205
  }>;
207
206
  reason: z__default.ZodNullable<z__default.ZodString>;
208
207
  note: z__default.ZodNullable<z__default.ZodObject<{
@@ -367,6 +366,7 @@ declare const zTransactionWithMetaResponse: z__default.ZodDiscriminatedUnion<[z_
367
366
  HEDERA_LIKE_SEND_TOKEN: "HEDERA_LIKE_SEND_TOKEN";
368
367
  HEDERA_LIKE_RECEIVE_TOKEN: "HEDERA_LIKE_RECEIVE_TOKEN";
369
368
  HEDERA_LIKE_STAKE: "HEDERA_LIKE_STAKE";
369
+ HEDERA_LIKE_UNSTAKE: "HEDERA_LIKE_UNSTAKE";
370
370
  }>;
371
371
  note: z__default.ZodNullable<z__default.ZodObject<{
372
372
  title: z__default.ZodString;
@@ -609,7 +609,6 @@ declare const zTransactionWithMetaResponse: z__default.ZodDiscriminatedUnion<[z_
609
609
  CANTON_LIKE_WITHDRAW: "CANTON_LIKE_WITHDRAW";
610
610
  CANTON_LIKE_RECEIVE: "CANTON_LIKE_RECEIVE";
611
611
  CANTON_LIKE_PRE_APPROVAL: "CANTON_LIKE_PRE_APPROVAL";
612
- CANTON_LIKE_TAP: "CANTON_LIKE_TAP";
613
612
  }>;
614
613
  reason: z__default.ZodNullable<z__default.ZodString>;
615
614
  note: z__default.ZodNullable<z__default.ZodObject<{
@@ -774,6 +773,7 @@ declare const zTransactionWithMetaResponse: z__default.ZodDiscriminatedUnion<[z_
774
773
  HEDERA_LIKE_SEND_TOKEN: "HEDERA_LIKE_SEND_TOKEN";
775
774
  HEDERA_LIKE_RECEIVE_TOKEN: "HEDERA_LIKE_RECEIVE_TOKEN";
776
775
  HEDERA_LIKE_STAKE: "HEDERA_LIKE_STAKE";
776
+ HEDERA_LIKE_UNSTAKE: "HEDERA_LIKE_UNSTAKE";
777
777
  }>;
778
778
  note: z__default.ZodNullable<z__default.ZodObject<{
779
779
  title: z__default.ZodString;
@@ -1639,7 +1639,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
1639
1639
  deviceUserId: string;
1640
1640
  id: string;
1641
1641
  workspaceName: string;
1642
- state: "INITIAL" | "PENDING" | "COMPLETED";
1642
+ state: "INITIAL" | "PENDING" | "COMPLETED" | "CONSUMED";
1643
1643
  }[];
1644
1644
  meta: {
1645
1645
  [x: string]: unknown;
@@ -1676,7 +1676,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
1676
1676
  deviceUserId: string;
1677
1677
  id: string;
1678
1678
  workspaceName: string;
1679
- state: "INITIAL" | "PENDING" | "COMPLETED";
1679
+ state: "INITIAL" | "PENDING" | "COMPLETED" | "CONSUMED";
1680
1680
  };
1681
1681
  meta: {
1682
1682
  [x: string]: unknown;
@@ -1783,7 +1783,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
1783
1783
  deviceUserId: string;
1784
1784
  id: string;
1785
1785
  workspaceName: string;
1786
- state: "INITIAL" | "PENDING" | "COMPLETED";
1786
+ state: "INITIAL" | "PENDING" | "COMPLETED" | "CONSUMED";
1787
1787
  };
1788
1788
  meta: {
1789
1789
  [x: string]: unknown;
@@ -1846,7 +1846,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
1846
1846
  deviceUserId: string;
1847
1847
  id: string;
1848
1848
  workspaceName: string;
1849
- state: "INITIAL" | "PENDING" | "COMPLETED";
1849
+ state: "INITIAL" | "PENDING" | "COMPLETED" | "CONSUMED";
1850
1850
  };
1851
1851
  meta: {
1852
1852
  [x: string]: unknown;
@@ -1880,7 +1880,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
1880
1880
  deviceUserId: string;
1881
1881
  id: string;
1882
1882
  workspaceName: string;
1883
- state: "INITIAL" | "PENDING" | "COMPLETED";
1883
+ state: "INITIAL" | "PENDING" | "COMPLETED" | "CONSUMED";
1884
1884
  }[];
1885
1885
  meta: {
1886
1886
  [x: string]: unknown;
@@ -2331,7 +2331,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
2331
2331
  id: string;
2332
2332
  workspaceName: string;
2333
2333
  compartmentId: number;
2334
- hsmScriptsVersion: string;
2335
2334
  step: "COMPLETED" | "PENDING_DEVICE_CLAIMS" | "PENDING_WRAPPING_KEY_PROVISIONING" | "PENDING_MASTER_ADMINS_REGISTRATION_INIT" | "PENDING_MASTER_ADMINS_REGISTRATION" | "PENDING_SHARED_OWNERS_REGISTRATION_INIT" | "PENDING_SHARED_OWNERS_REGISTRATION" | "PENDING_REVIEW_BY_MASTER_ADMINS" | "PENDING_SEED_PROVISIONING" | "PENDING_WORKSPACE_INITIALIZATION";
2336
2335
  createdAt: Date;
2337
2336
  }[];
@@ -2913,7 +2912,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
2913
2912
  fee: string;
2914
2913
  senders: string[];
2915
2914
  recipients: string[];
2916
- type: "CANTON_LIKE_SEND" | "CANTON_LIKE_SEND_TOKEN" | "CANTON_LIKE_WITHDRAW" | "CANTON_LIKE_RECEIVE" | "CANTON_LIKE_PRE_APPROVAL" | "CANTON_LIKE_TAP";
2915
+ type: "CANTON_LIKE_SEND" | "CANTON_LIKE_SEND_TOKEN" | "CANTON_LIKE_WITHDRAW" | "CANTON_LIKE_RECEIVE" | "CANTON_LIKE_PRE_APPROVAL";
2917
2916
  reason: string | null;
2918
2917
  note: {
2919
2918
  title: string;
@@ -3035,7 +3034,7 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
3035
3034
  fee: string;
3036
3035
  senders: string[];
3037
3036
  recipients: string[];
3038
- type: "HEDERA_LIKE_SEND" | "HEDERA_LIKE_RECEIVE" | "HEDERA_LIKE_SEND_TOKEN" | "HEDERA_LIKE_RECEIVE_TOKEN" | "HEDERA_LIKE_STAKE";
3037
+ type: "HEDERA_LIKE_SEND" | "HEDERA_LIKE_RECEIVE" | "HEDERA_LIKE_SEND_TOKEN" | "HEDERA_LIKE_RECEIVE_TOKEN" | "HEDERA_LIKE_STAKE" | "HEDERA_LIKE_UNSTAKE";
3039
3038
  note: {
3040
3039
  title: string;
3041
3040
  content: string;
@@ -3259,12 +3258,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
3259
3258
  currency: string;
3260
3259
  recipient: string;
3261
3260
  type: "CANTON_LIKE_PRE_APPROVAL";
3262
- } | {
3263
- amount: string;
3264
- currency: string;
3265
- maxFee: string | null;
3266
- recipient: string;
3267
- type: "CANTON_LIKE_TAP";
3268
3261
  } | {
3269
3262
  amount: string;
3270
3263
  currency: string;
@@ -5894,6 +5887,8 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
5894
5887
  pendingBy?: string | undefined;
5895
5888
  sortBy?: "createdAt" | "updatedAt" | "expiresAt" | "state" | undefined;
5896
5889
  sortOrder?: "asc" | "desc" | undefined;
5890
+ fromDate?: unknown;
5891
+ toDate?: unknown;
5897
5892
  };
5898
5893
  output: {
5899
5894
  page: number;
@@ -6879,12 +6874,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
6879
6874
  currency: string;
6880
6875
  recipient: string;
6881
6876
  type: "CANTON_LIKE_PRE_APPROVAL";
6882
- } | {
6883
- amount: string;
6884
- currency: string;
6885
- maxFee: string | null;
6886
- recipient: string;
6887
- type: "CANTON_LIKE_TAP";
6888
6877
  } | {
6889
6878
  amount: string;
6890
6879
  currency: string;
@@ -9400,12 +9389,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
9400
9389
  currency: string;
9401
9390
  recipient: string;
9402
9391
  type: "CANTON_LIKE_PRE_APPROVAL";
9403
- } | {
9404
- amount: string;
9405
- currency: string;
9406
- maxFee: string | null;
9407
- recipient: string;
9408
- type: "CANTON_LIKE_TAP";
9409
9392
  } | {
9410
9393
  amount: string;
9411
9394
  currency: string;
@@ -11591,12 +11574,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
11591
11574
  currency: string;
11592
11575
  recipient: string;
11593
11576
  type: "CANTON_LIKE_PRE_APPROVAL";
11594
- } | {
11595
- amount: string;
11596
- currency: string;
11597
- maxFee: string | null;
11598
- recipient: string;
11599
- type: "CANTON_LIKE_TAP";
11600
11577
  } | {
11601
11578
  amount: string;
11602
11579
  currency: string;
@@ -13294,12 +13271,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
13294
13271
  currency: string;
13295
13272
  recipient: string;
13296
13273
  type: "CANTON_LIKE_PRE_APPROVAL";
13297
- } | {
13298
- amount: string;
13299
- currency: string;
13300
- maxFee: string | null;
13301
- recipient: string;
13302
- type: "CANTON_LIKE_TAP";
13303
13274
  } | {
13304
13275
  amount: string;
13305
13276
  currency: string;
@@ -15148,6 +15119,121 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
15148
15119
  };
15149
15120
  } & RateLimitMetricsMeta;
15150
15121
  }>;
15122
+ createCantonTransaction: _trpc_server.TRPCMutationProcedure<{
15123
+ input: {
15124
+ accountId: string;
15125
+ transaction: unknown;
15126
+ note?: {
15127
+ title: string;
15128
+ content: string;
15129
+ } | undefined;
15130
+ };
15131
+ output: {
15132
+ type: "CREATE_TRANSACTION";
15133
+ data: {
15134
+ accountId: string;
15135
+ transaction: {
15136
+ currency: string;
15137
+ recipient: string;
15138
+ amount: string;
15139
+ reason: string | null;
15140
+ type: "CANTON_LIKE_SEND";
15141
+ executeBeforeSeconds?: number | undefined;
15142
+ } | {
15143
+ currency: string;
15144
+ recipient: string;
15145
+ amount: string;
15146
+ reason: string | null;
15147
+ type: "CANTON_LIKE_SEND_TOKEN";
15148
+ executeBeforeSeconds?: number | undefined;
15149
+ } | {
15150
+ currency: string;
15151
+ transferProposal: {
15152
+ amount: string;
15153
+ contractId: string;
15154
+ instrumentAdmin: string;
15155
+ instrumentId: string;
15156
+ expiresAtMicros: number;
15157
+ reason: string | null;
15158
+ sender: string;
15159
+ recipient: string;
15160
+ };
15161
+ reason: string | null;
15162
+ type: "CANTON_LIKE_WITHDRAW";
15163
+ } | {
15164
+ currency: string;
15165
+ transferProposal: {
15166
+ amount: string;
15167
+ contractId: string;
15168
+ instrumentAdmin: string;
15169
+ instrumentId: string;
15170
+ expiresAtMicros: number;
15171
+ reason: string | null;
15172
+ sender: string;
15173
+ recipient: string;
15174
+ };
15175
+ verdict: "ACCEPT" | "REJECT";
15176
+ reason: string | null;
15177
+ type: "CANTON_LIKE_RECEIVE";
15178
+ } | {
15179
+ currency: string;
15180
+ recipient: string;
15181
+ type: "CANTON_LIKE_PRE_APPROVAL";
15182
+ };
15183
+ };
15184
+ id: string;
15185
+ legacyId: number;
15186
+ state: "FAILED" | "INITIAL" | "PENDING_APPROVAL" | "EXECUTING" | "EXECUTED" | "ABORTED" | "BLOCKED" | "EXPIRED" | "STUCK";
15187
+ reviewSteps: {
15188
+ stageName: string;
15189
+ quorum: number;
15190
+ }[];
15191
+ currentStepIndex: number;
15192
+ expiresAt: Date;
15193
+ targetId: string | null;
15194
+ note: {
15195
+ title: string;
15196
+ content: string;
15197
+ } | null;
15198
+ reviews: {
15199
+ stepIndex: number;
15200
+ userId: string;
15201
+ groupName: string | null;
15202
+ status: "PENDING" | "APPROVED" | "REJECTED" | "QUEUED" | "OBSOLETE";
15203
+ createdAt: Date;
15204
+ updatedAt: Date;
15205
+ }[];
15206
+ createdAt: Date;
15207
+ updatedAt: Date;
15208
+ createdById: string;
15209
+ expiredAt?: Date | undefined;
15210
+ inflight?: {
15211
+ lastError: string | null;
15212
+ numFailed: number;
15213
+ retryAfter: Date;
15214
+ } | undefined;
15215
+ };
15216
+ meta: {
15217
+ [x: string]: unknown;
15218
+ } & {
15219
+ openapi?: {
15220
+ enabled?: boolean;
15221
+ method: trpc_to_openapi.OpenApiMethod;
15222
+ path: `/${string}`;
15223
+ operationId?: string;
15224
+ summary?: string;
15225
+ description?: string;
15226
+ protect?: boolean;
15227
+ tags?: string[];
15228
+ contentTypes?: trpc_to_openapi.OpenApiContentType[];
15229
+ deprecated?: boolean;
15230
+ requestHeaders?: z.ZodObject;
15231
+ responseHeaders?: z.ZodObject;
15232
+ successDescription?: string;
15233
+ errorResponses?: number[] | Record<number, string>;
15234
+ };
15235
+ } & RateLimitMetricsMeta;
15236
+ }>;
15151
15237
  createAccount: _trpc_server.TRPCMutationProcedure<{
15152
15238
  input: {
15153
15239
  contractAddress: string | null;
@@ -16135,12 +16221,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
16135
16221
  currency: string;
16136
16222
  recipient: string;
16137
16223
  type: "CANTON_LIKE_PRE_APPROVAL";
16138
- } | {
16139
- amount: string;
16140
- currency: string;
16141
- maxFee: string | null;
16142
- recipient: string;
16143
- type: "CANTON_LIKE_TAP";
16144
16224
  } | {
16145
16225
  amount: string;
16146
16226
  currency: string;
@@ -18658,12 +18738,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
18658
18738
  currency: string;
18659
18739
  recipient: string;
18660
18740
  type: "CANTON_LIKE_PRE_APPROVAL";
18661
- } | {
18662
- amount: string;
18663
- currency: string;
18664
- maxFee: string | null;
18665
- recipient: string;
18666
- type: "CANTON_LIKE_TAP";
18667
18741
  } | {
18668
18742
  amount: string;
18669
18743
  currency: string;
@@ -21183,12 +21257,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
21183
21257
  currency: string;
21184
21258
  recipient: string;
21185
21259
  type: "CANTON_LIKE_PRE_APPROVAL";
21186
- } | {
21187
- amount: string;
21188
- currency: string;
21189
- maxFee: string | null;
21190
- recipient: string;
21191
- type: "CANTON_LIKE_TAP";
21192
21260
  } | {
21193
21261
  amount: string;
21194
21262
  currency: string;
@@ -23706,12 +23774,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
23706
23774
  currency: string;
23707
23775
  recipient: string;
23708
23776
  type: "CANTON_LIKE_PRE_APPROVAL";
23709
- } | {
23710
- amount: string;
23711
- currency: string;
23712
- maxFee: string | null;
23713
- recipient: string;
23714
- type: "CANTON_LIKE_TAP";
23715
23777
  } | {
23716
23778
  amount: string;
23717
23779
  currency: string;
@@ -26225,12 +26287,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
26225
26287
  currency: string;
26226
26288
  recipient: string;
26227
26289
  type: "CANTON_LIKE_PRE_APPROVAL";
26228
- } | {
26229
- amount: string;
26230
- currency: string;
26231
- maxFee: string | null;
26232
- recipient: string;
26233
- type: "CANTON_LIKE_TAP";
26234
26290
  } | {
26235
26291
  amount: string;
26236
26292
  currency: string;
@@ -28024,7 +28080,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
28024
28080
  input: {
28025
28081
  workspaceName: string;
28026
28082
  compartmentId: number;
28027
- hsmScriptsVersion: string;
28028
28083
  mode?: "GATE_COMPAT" | "STANDALONE" | undefined;
28029
28084
  };
28030
28085
  output: {
@@ -33906,12 +33961,6 @@ declare const appRouter: _trpc_server.TRPCBuiltRouter<{
33906
33961
  currency: string;
33907
33962
  recipient: string;
33908
33963
  type: "CANTON_LIKE_PRE_APPROVAL";
33909
- } | {
33910
- amount: string;
33911
- currency: string;
33912
- maxFee: string | null;
33913
- recipient: string;
33914
- type: "CANTON_LIKE_TAP";
33915
33964
  } | {
33916
33965
  amount: string;
33917
33966
  currency: string;
@@ -34485,7 +34534,6 @@ type WorkspaceRulesResponse = z__default.infer<typeof zWorkspaceRulesResponse>;
34485
34534
  declare const zOnboardingOpts: z$1.ZodObject<{
34486
34535
  workspaceName: z$1.ZodString;
34487
34536
  compartmentId: z$1.ZodNumber;
34488
- hsmScriptsVersion: z$1.ZodString;
34489
34537
  mode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodEnum<{
34490
34538
  GATE_COMPAT: "GATE_COMPAT";
34491
34539
  STANDALONE: "STANDALONE";
@@ -35352,6 +35400,7 @@ declare const zUserRegistrationResponse: z$1.ZodObject<{
35352
35400
  INITIAL: "INITIAL";
35353
35401
  PENDING: "PENDING";
35354
35402
  COMPLETED: "COMPLETED";
35403
+ CONSUMED: "CONSUMED";
35355
35404
  }>;
35356
35405
  }, z$1.core.$strip>;
35357
35406
  type UserRegistrationResponse = z$1.infer<typeof zUserRegistrationResponse>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/revault-api",
3
- "version": "1.48.0",
3
+ "version": "1.50.0",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "files": [