@dfns/sdk 0.7.10 → 0.7.11

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.
@@ -5,6 +5,7 @@ export declare class NetworksClient {
5
5
  constructor(apiOptions: DfnsApiClientOptions);
6
6
  createCantonValidator(request: T.CreateCantonValidatorRequest): Promise<T.CreateCantonValidatorResponse>;
7
7
  deleteCantonValidator(request: T.DeleteCantonValidatorRequest): Promise<T.DeleteCantonValidatorResponse>;
8
+ getCantonValidator(request: T.GetCantonValidatorRequest): Promise<T.GetCantonValidatorResponse>;
8
9
  getFees(request?: T.GetFeesRequest): Promise<T.GetFeesResponse>;
9
10
  listCantonValidators(request: T.ListCantonValidatorsRequest): Promise<T.ListCantonValidatorsResponse>;
10
11
  readContract(request: T.ReadContractRequest): Promise<T.ReadContractResponse>;
@@ -33,6 +33,17 @@ class NetworksClient {
33
33
  });
34
34
  return response.json();
35
35
  }
36
+ async getCantonValidator(request) {
37
+ const path = (0, url_1.buildPathAndQuery)('/networks/:network/validators/:validatorId', {
38
+ path: request ?? {},
39
+ query: {},
40
+ });
41
+ const response = await (0, fetch_1.simpleFetch)(path, {
42
+ method: 'GET',
43
+ apiOptions: this.apiOptions,
44
+ });
45
+ return response.json();
46
+ }
36
47
  async getFees(request) {
37
48
  const path = (0, url_1.buildPathAndQuery)('/networks/fees', {
38
49
  path: request ?? {},
@@ -8,6 +8,7 @@ export declare class DelegatedNetworksClient {
8
8
  createCantonValidatorComplete(request: T.CreateCantonValidatorRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.CreateCantonValidatorResponse>;
9
9
  deleteCantonValidatorInit(request: T.DeleteCantonValidatorRequest): Promise<UserActionChallengeResponse>;
10
10
  deleteCantonValidatorComplete(request: T.DeleteCantonValidatorRequest, signedChallenge: SignUserActionChallengeRequest): Promise<T.DeleteCantonValidatorResponse>;
11
+ getCantonValidator(request: T.GetCantonValidatorRequest): Promise<T.GetCantonValidatorResponse>;
11
12
  getFees(request?: T.GetFeesRequest): Promise<T.GetFeesResponse>;
12
13
  listCantonValidators(request: T.ListCantonValidatorsRequest): Promise<T.ListCantonValidatorsResponse>;
13
14
  readContract(request: T.ReadContractRequest): Promise<T.ReadContractResponse>;
@@ -62,6 +62,17 @@ class DelegatedNetworksClient {
62
62
  });
63
63
  return response.json();
64
64
  }
65
+ async getCantonValidator(request) {
66
+ const path = (0, url_1.buildPathAndQuery)('/networks/:network/validators/:validatorId', {
67
+ path: request ?? {},
68
+ query: {},
69
+ });
70
+ const response = await (0, fetch_1.simpleFetch)(path, {
71
+ method: 'GET',
72
+ apiOptions: this.apiOptions,
73
+ });
74
+ return response.json();
75
+ }
65
76
  async getFees(request) {
66
77
  const path = (0, url_1.buildPathAndQuery)('/networks/fees', {
67
78
  path: request ?? {},
@@ -29,7 +29,10 @@ export type CreateCantonValidatorParams = {
29
29
  network: "canton" | "canton-devnet" | "canton-testnet";
30
30
  };
31
31
  export type CreateCantonValidatorResponse = {
32
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
32
33
  id: string;
34
+ /** e.g. 'or-30tnh-itmjs-s235s5ontr3r23h2' */
35
+ orgId: string;
33
36
  network: "Canton" | "CantonDevnet" | "CantonTestnet";
34
37
  name?: string | undefined;
35
38
  kind: "Shared" | "Custom";
@@ -41,10 +44,14 @@ export type CreateCantonValidatorRequest = CreateCantonValidatorParams & {
41
44
  };
42
45
  export type DeleteCantonValidatorParams = {
43
46
  network: "canton" | "canton-devnet" | "canton-testnet";
47
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
44
48
  validatorId: string;
45
49
  };
46
50
  export type DeleteCantonValidatorResponse = {
51
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
47
52
  id: string;
53
+ /** e.g. 'or-30tnh-itmjs-s235s5ontr3r23h2' */
54
+ orgId: string;
48
55
  network: "Canton" | "CantonDevnet" | "CantonTestnet";
49
56
  name?: string | undefined;
50
57
  kind: "Shared" | "Custom";
@@ -52,8 +59,25 @@ export type DeleteCantonValidatorResponse = {
52
59
  partyHint: string;
53
60
  };
54
61
  export type DeleteCantonValidatorRequest = DeleteCantonValidatorParams;
62
+ export type GetCantonValidatorParams = {
63
+ network: "canton" | "canton-devnet" | "canton-testnet";
64
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
65
+ validatorId: string;
66
+ };
67
+ export type GetCantonValidatorResponse = {
68
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
69
+ id: string;
70
+ /** e.g. 'or-30tnh-itmjs-s235s5ontr3r23h2' */
71
+ orgId: string;
72
+ network: "Canton" | "CantonDevnet" | "CantonTestnet";
73
+ name?: string | undefined;
74
+ kind: "Shared" | "Custom";
75
+ dateCreated: string;
76
+ partyHint: string;
77
+ };
78
+ export type GetCantonValidatorRequest = GetCantonValidatorParams;
55
79
  export type GetFeesQuery = {
56
- network: "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Adi" | "AdiTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia";
80
+ network: "Bitcoin" | "BitcoinSignet" | "BitcoinTestnet3" | "Adi" | "AdiTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Tsc" | "TscTestnet1";
57
81
  };
58
82
  export type GetFeesResponse = {
59
83
  kind: "Bitcoin";
@@ -73,7 +97,7 @@ export type GetFeesResponse = {
73
97
  };
74
98
  } | {
75
99
  kind: "Eip1559";
76
- network: "Adi" | "AdiTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia";
100
+ network: "Adi" | "AdiTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Tsc" | "TscTestnet1";
77
101
  blockNumber: number;
78
102
  slow: {
79
103
  maxPriorityFeePerGas: string;
@@ -101,7 +125,10 @@ export type ListCantonValidatorsQuery = {
101
125
  };
102
126
  export type ListCantonValidatorsResponse = {
103
127
  items: {
128
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
104
129
  id: string;
130
+ /** e.g. 'or-30tnh-itmjs-s235s5ontr3r23h2' */
131
+ orgId: string;
105
132
  network: "Canton" | "CantonDevnet" | "CantonTestnet";
106
133
  name?: string | undefined;
107
134
  kind: "Shared" | "Custom";
@@ -115,7 +142,7 @@ export type ListCantonValidatorsRequest = ListCantonValidatorsParams & {
115
142
  };
116
143
  export type ReadContractBody = {
117
144
  kind: "Evm";
118
- network: "Adi" | "AdiTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia";
145
+ network: "Adi" | "AdiTestnet" | "ArbitrumOne" | "ArbitrumGoerli" | "ArbitrumSepolia" | "AvalancheC" | "AvalancheCFuji" | "Base" | "BaseGoerli" | "BaseSepolia" | "Bob" | "BobSepolia" | "Bsc" | "BscTestnet" | "Berachain" | "BerachainBArtio" | "BerachainBepolia" | "Celo" | "CeloAlfajores" | "Codex" | "CodexSepolia" | "Ethereum" | "EthereumGoerli" | "EthereumSepolia" | "EthereumHolesky" | "EthereumHoodi" | "FantomOpera" | "FantomTestnet" | "FlareC" | "FlareCCoston2" | "Ink" | "InkSepolia" | "Optimism" | "OptimismGoerli" | "OptimismSepolia" | "Plume" | "PlumeSepolia" | "Polygon" | "PolygonAmoy" | "PolygonMumbai" | "Race" | "RaceSepolia" | "Tsc" | "TscTestnet1";
119
146
  contract: string;
120
147
  data: string;
121
148
  };
@@ -151,10 +178,14 @@ export type UpdateCantonValidatorBody = {
151
178
  };
152
179
  export type UpdateCantonValidatorParams = {
153
180
  network: "canton" | "canton-devnet" | "canton-testnet";
181
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
154
182
  validatorId: string;
155
183
  };
156
184
  export type UpdateCantonValidatorResponse = {
185
+ /** e.g. 'cv-7jeof-m584r-p35ucm37ko3cqgts' */
157
186
  id: string;
187
+ /** e.g. 'or-30tnh-itmjs-s235s5ontr3r23h2' */
188
+ orgId: string;
158
189
  network: "Canton" | "CantonDevnet" | "CantonTestnet";
159
190
  name?: string | undefined;
160
191
  kind: "Shared" | "Custom";