|
1 | 1 | /** |
2 | 2 | * @module Common GRPC-Client |
3 | 3 | */ |
4 | | -import type { Upward } from './grpc/upward.js'; |
5 | | -import { Cbor, TokenId } from './plt/index.js'; |
6 | | -import { TokenAccountInfo } from './plt/types.js'; |
7 | | -import * as AccountAddress from './types/AccountAddress.js'; |
| 4 | +import type { Upward } from './grpc/index.js'; |
| 5 | +import type { Cbor, TokenId } from './plt/index.js'; |
| 6 | +import type { TokenAccountInfo } from './plt/types.js'; |
| 7 | +import type * as AccountAddress from './types/AccountAddress.js'; |
8 | 8 | import type * as BlockHash from './types/BlockHash.js'; |
9 | 9 | import type * as CcdAmount from './types/CcdAmount.js'; |
10 | | -import * as ContractAddress from './types/ContractAddress.js'; |
| 10 | +import type * as ContractAddress from './types/ContractAddress.js'; |
11 | 11 | import type * as ContractName from './types/ContractName.js'; |
12 | | -import * as CredentialRegistrationId from './types/CredentialRegistrationId.js'; |
13 | | -import { DataBlob } from './types/DataBlob.js'; |
14 | | -import * as Duration from './types/Duration.js'; |
15 | | -import * as Energy from './types/Energy.js'; |
| 12 | +import type * as CredentialRegistrationId from './types/CredentialRegistrationId.js'; |
| 13 | +import type { DataBlob } from './types/DataBlob.js'; |
| 14 | +import type * as Duration from './types/Duration.js'; |
| 15 | +import type * as Energy from './types/Energy.js'; |
16 | 16 | import type * as InitName from './types/InitName.js'; |
17 | 17 | import type * as ModuleReference from './types/ModuleReference.js'; |
18 | | -import * as Parameter from './types/Parameter.js'; |
| 18 | +import type * as Parameter from './types/Parameter.js'; |
19 | 19 | import type * as ReceiveName from './types/ReceiveName.js'; |
20 | 20 | import type * as ReturnValue from './types/ReturnValue.js'; |
21 | 21 | import type * as SequenceNumber from './types/SequenceNumber.js'; |
22 | | -import * as Timestamp from './types/Timestamp.js'; |
| 22 | +import type * as Timestamp from './types/Timestamp.js'; |
23 | 23 | import type * as TransactionExpiry from './types/TransactionExpiry.js'; |
24 | 24 | import type * as TransactionHash from './types/TransactionHash.js'; |
25 | | -import { RejectReason } from './types/rejectReason.js'; |
26 | | -import { ContractTraceEvent } from './types/transactionEvent.js'; |
| 25 | +import type { RejectReason } from './types/rejectReason.js'; |
| 26 | +import type { ContractTraceEvent } from './types/transactionEvent.js'; |
27 | 27 |
|
28 | 28 | export * from './types/NodeInfo.js'; |
29 | 29 | export * from './types/PeerInfo.js'; |
@@ -886,7 +886,13 @@ export type BakerId = bigint; |
886 | 886 | export type DelegatorId = bigint; |
887 | 887 |
|
888 | 888 | export interface BakerPoolInfo { |
889 | | - openStatus: OpenStatusText; |
| 889 | + /** |
| 890 | + * The status of validator pool |
| 891 | + * |
| 892 | + * **Please note**, this can possibly be unknown if the SDK is not fully compatible with the Concordium |
| 893 | + * node queried, in which case `null` is returned. |
| 894 | + */ |
| 895 | + openStatus: Upward<OpenStatusText>; |
890 | 896 | metadataUrl: UrlString; |
891 | 897 | commissionRates: CommissionRates; |
892 | 898 | } |
@@ -1103,6 +1109,7 @@ export enum AccountInfoType { |
1103 | 1109 | Simple = 'simple', |
1104 | 1110 | Baker = 'baker', |
1105 | 1111 | Delegator = 'delegator', |
| 1112 | + Unknown = 'unknown', |
1106 | 1113 | } |
1107 | 1114 |
|
1108 | 1115 | interface AccountInfoCommon { |
@@ -1171,7 +1178,20 @@ export interface AccountInfoDelegator extends AccountInfoCommon { |
1171 | 1178 | accountDelegation: AccountDelegationDetails; |
1172 | 1179 | } |
1173 | 1180 |
|
1174 | | -export type AccountInfo = AccountInfoSimple | AccountInfoBaker | AccountInfoDelegator; |
| 1181 | +export interface AccountInfoUnknown extends AccountInfoCommon { |
| 1182 | + type: AccountInfoType.Unknown; |
| 1183 | + /** |
| 1184 | + * This will only ever be `null`, which represents a variant of staking info for the account which is |
| 1185 | + * unknown to the SDK, for known staking variants this is represented by either {@linkcode AccountInfoBaker} |
| 1186 | + * or {@linkcode AccountInfoDElegator}. |
| 1187 | + * |
| 1188 | + * **Note**: This field is named `accountBaker` to align with the JSON representation produced by the |
| 1189 | + * corresponding rust SDK. |
| 1190 | + */ |
| 1191 | + accountBaker: Upward<never>; |
| 1192 | +} |
| 1193 | + |
| 1194 | +export type AccountInfo = AccountInfoSimple | AccountInfoBaker | AccountInfoDelegator | AccountInfoUnknown; |
1175 | 1195 |
|
1176 | 1196 | export interface Description { |
1177 | 1197 | name: string; |
@@ -2021,6 +2041,11 @@ export type Cooldown = { |
2021 | 2041 | timestamp: Timestamp.Type; |
2022 | 2042 | /** The amount that is in cooldown and set to be released at the end of the cooldown period */ |
2023 | 2043 | amount: CcdAmount.Type; |
2024 | | - /** The status of the cooldown */ |
2025 | | - status: CooldownStatus; |
| 2044 | + /** |
| 2045 | + * The status of the cooldown |
| 2046 | + * |
| 2047 | + * **Please note**, this can possibly be unknown if the SDK is not fully compatible with the Concordium |
| 2048 | + * node queried, in which case `null` is returned. |
| 2049 | + */ |
| 2050 | + status: Upward<CooldownStatus>; |
2026 | 2051 | }; |
0 commit comments