@hashgraphonline/standards-sdk 0.0.41 → 0.0.43

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.
@@ -1,9 +1,11 @@
1
- import { AccountResponse, HederaMirrorNode, TopicInfo } from '../services/mirror-node';
1
+ import { HederaMirrorNode } from '../services/mirror-node';
2
2
  import { Logger, LogLevel } from '../utils/logger';
3
3
  import { Registration } from './registrations';
4
+ import { AccountResponse, TopicInfo } from '../services/types';
4
5
  export interface HCS10Config {
5
6
  network: 'mainnet' | 'testnet';
6
7
  logLevel?: LogLevel;
8
+ prettyPrint?: boolean;
7
9
  }
8
10
  export interface HCSMessage {
9
11
  p: 'hcs-10';
@@ -26,7 +28,6 @@ export interface HCSMessage {
26
28
  export interface ProfileResponse {
27
29
  profile: any;
28
30
  topicInfo?: TopicInfo;
29
- profileTopicId?: string;
30
31
  success: boolean;
31
32
  error?: string;
32
33
  }
@@ -47,8 +48,6 @@ export declare abstract class HCS10BaseClient extends Registration {
47
48
  }>;
48
49
  requestAccount(account: string): Promise<AccountResponse>;
49
50
  getAccountMemo(accountId: string): Promise<string | null>;
50
- protected getTopicInfoFromMemo(memo: string): Promise<TopicInfo | null>;
51
- getTopicInfo(accountId: string): Promise<TopicInfo | null>;
52
51
  retrieveProfile(accountId: string): Promise<ProfileResponse>;
53
52
  retrieveOutboundConnectTopic(accountId: string): Promise<TopicInfo>;
54
53
  retrieveOutboundMessages(agentAccountId: string): Promise<HCSMessage[]>;
@@ -3,12 +3,13 @@ import { HashinalsWalletConnectSDK } from '@hashgraphonline/hashinal-wc';
3
3
  import { Logger, LogLevel } from '../utils/logger';
4
4
  import { RetrievedInscriptionResult } from '@kiloscribe/inscription-sdk';
5
5
  import { HCS10BaseClient } from './base-client';
6
- import { AgentConfig, RegistrationProgressCallback, AgentCreationState } from './types.d';
6
+ import { AgentConfig, RegistrationProgressCallback, AgentCreationState, HandleConnectionRequestResponse, AgentRegistrationResult, StoreHCS11ProfileResponse, InscribePfpResponse, GetAccountAndSignerResponse } from './types.d';
7
7
  import { AgentBuilder } from './agent-builder';
8
8
  export type BrowserHCSClientConfig = {
9
9
  network: 'mainnet' | 'testnet';
10
10
  hwc: HashinalsWalletConnectSDK;
11
11
  logLevel?: LogLevel;
12
+ prettyPrint?: boolean;
12
13
  guardedRegistryTopicId?: string;
13
14
  guardedRegistryBaseUrl?: string;
14
15
  };
@@ -29,6 +30,15 @@ interface SocialLinks {
29
30
  export type BrowserAgentConfig = Omit<AgentConfig<BrowserHCSClient>, 'privateKey'> & {
30
31
  client: BrowserHCSClient;
31
32
  };
33
+ export type RegisteredAgent = {
34
+ outboundTopicId: string;
35
+ inboundTopicId: string;
36
+ pfpTopicId: string;
37
+ profileTopicId: string;
38
+ error?: string;
39
+ success: boolean;
40
+ state: AgentCreationState;
41
+ };
32
42
  export declare class BrowserHCSClient extends HCS10BaseClient {
33
43
  private hwc;
34
44
  protected logger: Logger;
@@ -49,28 +59,30 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
49
59
  error?: string;
50
60
  }>;
51
61
  getPublicKey(accountId: string): Promise<PublicKey>;
52
- handleConnectionRequest(inboundTopicId: string, requestingAccountId: string, connectionId: number, connectionMemo?: string): Promise<{
53
- connectionTopicId: string;
54
- confirmedConnectionSequenceNumber: number;
55
- operatorId: string;
56
- }>;
62
+ handleConnectionRequest(inboundTopicId: string, requestingAccountId: string, connectionId: number, connectionMemo?: string): Promise<HandleConnectionRequestResponse>;
57
63
  confirmConnection(inboundTopicId: string, connectionTopicId: string, connectedAccountId: string, connectionId: number, operatorId: string, memo: string): Promise<number>;
58
64
  submitMessage(topicId: string, content: string, metadata?: object, memo?: string): Promise<{
59
65
  result?: TransactionReceipt;
60
66
  error?: string;
61
67
  }>;
68
+ /**
69
+ * Creates an agent directly, but does not register.
70
+ * We highly recommend calling createAndRegisterAgent instead.
71
+ *
72
+ * @param pfpBuffer - The buffer containing the PFP image.
73
+ * @param pfpFileName - The name of the file containing the PFP image.
74
+ * @param agentName - The name of the agent.
75
+ * @param agentDescription - The description of the agent.
76
+ * @param capabilities - The capabilities of the agent.
77
+ * @param metadata - The metadata of the agent.
78
+ * @param existingPfpTopicId - The topic ID of the existing PFP.
79
+ * @param options - Optional configuration options.
80
+ * @returns A promise that resolves to the agent creation state.
81
+ */
62
82
  createAgent(pfpBuffer: Buffer, pfpFileName: string, agentName: string, agentDescription: string, capabilities: number[], metadata: AgentMetadata, existingPfpTopicId?: string, options?: {
63
83
  progressCallback?: RegistrationProgressCallback;
64
84
  existingState?: AgentCreationState;
65
- }): Promise<{
66
- outboundTopicId: string;
67
- inboundTopicId: string;
68
- pfpTopicId: string;
69
- profileTopicId: string;
70
- error?: string;
71
- success: boolean;
72
- state: AgentCreationState;
73
- }>;
85
+ }): Promise<RegisteredAgent>;
74
86
  private initializeRegistrationState;
75
87
  private updateStateForCompletedRegistration;
76
88
  registerAgentWithGuardedRegistry(accountId: string, network?: string, options?: {
@@ -78,31 +90,17 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
78
90
  maxAttempts?: number;
79
91
  delayMs?: number;
80
92
  existingState?: AgentCreationState;
81
- }): Promise<{
82
- error?: string;
83
- success: boolean;
84
- transaction?: any;
85
- transactionId?: string;
86
- confirmed?: boolean;
87
- validationErrors?: any[];
88
- state: AgentCreationState;
89
- }>;
93
+ }): Promise<AgentRegistrationResult>;
90
94
  createAndRegisterAgent(builder: AgentBuilder, options?: {
91
95
  progressCallback?: RegistrationProgressCallback;
92
96
  maxAttempts?: number;
93
97
  delayMs?: number;
94
98
  existingState?: AgentCreationState;
95
- }): Promise<BrowserAgentConfig & {
96
- state: AgentCreationState;
97
- }>;
99
+ baseUrl?: string;
100
+ }): Promise<AgentRegistrationResult>;
98
101
  storeHCS11Profile(agentName: string, agentDescription: string, inboundTopicId: string, outboundTopicId: string, capabilities?: number[], metadata?: Record<string, any>, pfpBuffer?: Buffer, pfpFileName?: string, existingPfpTopicId?: string, options?: {
99
102
  progressCallback?: RegistrationProgressCallback;
100
- }): Promise<{
101
- profileTopicId: string;
102
- pfpTopicId?: string;
103
- error?: string;
104
- success: boolean;
105
- }>;
103
+ }): Promise<StoreHCS11ProfileResponse>;
106
104
  createTopic(memo: string, adminKey?: boolean, submitKey?: boolean): Promise<{
107
105
  success: boolean;
108
106
  topicId?: string;
@@ -110,16 +108,17 @@ export declare class BrowserHCSClient extends HCS10BaseClient {
110
108
  }>;
111
109
  private submitPayload;
112
110
  inscribeFile(buffer: Buffer, fileName: string): Promise<RetrievedInscriptionResult>;
113
- getAccountAndSigner(): {
114
- accountId: string;
115
- signer: any;
116
- };
111
+ getAccountAndSigner(): GetAccountAndSignerResponse;
112
+ /**
113
+ * Inscribes a profile picture (PFP) on HCS-11.
114
+ *
115
+ * @param buffer - The buffer containing the PFP image.
116
+ * @param fileName - The name of the file containing the PFP image.
117
+ * @param options - Optional configuration options.
118
+ * @returns A promise that resolves to the topic ID of the inscribed PFP.
119
+ */
117
120
  inscribePfp(buffer: Buffer, fileName: string, options?: {
118
121
  progressCallback?: RegistrationProgressCallback;
119
- }): Promise<{
120
- pfpTopicId: string;
121
- success: boolean;
122
- error?: string;
123
- }>;
122
+ }): Promise<InscribePfpResponse>;
124
123
  }
125
124
  export {};
@@ -64,8 +64,44 @@ export interface RegistrationStatusResponse {
64
64
  error?: string;
65
65
  }
66
66
  export declare abstract class Registration {
67
+ /**
68
+ * Checks the status of a registration request.
69
+ *
70
+ * @param transactionId - The transaction ID of the registration.
71
+ * @param network - The network to use for the registration.
72
+ * @param baseUrl - The base URL of the guarded registry.
73
+ * @param logger - The logger to use for logging.
74
+ * @returns A promise that resolves to the registration status response.
75
+ */
67
76
  protected checkRegistrationStatus(transactionId: string, network: string, baseUrl: string, logger?: Logger): Promise<RegistrationStatusResponse>;
77
+ /**
78
+ * Waits for a registration to be confirmed.
79
+ *
80
+ * @param transactionId - The transaction ID of the registration.
81
+ * @param network - The network to use for the registration.
82
+ * @param baseUrl - The base URL of the guarded registry.
83
+ * @param maxAttempts - The maximum number of attempts to check the registration status.
84
+ * @param delayMs - The delay in milliseconds between attempts.
85
+ * @param logger - The logger to use for logging.
86
+ * @returns A promise that resolves to true if the registration is confirmed, false otherwise.
87
+ */
68
88
  waitForRegistrationConfirmation(transactionId: string, network: string, baseUrl: string, maxAttempts?: number, delayMs?: number, logger?: Logger): Promise<boolean>;
89
+ /**
90
+ * Executes a registration request for an agent.
91
+ *
92
+ * @param accountId - The account ID of the agent to register.
93
+ * @param network - The network to use for the registration.
94
+ * @param baseUrl - The base URL of the guarded registry.
95
+ * @param logger - The logger to use for logging.
96
+ * @returns A promise that resolves to the registration result.
97
+ */
69
98
  executeRegistration(accountId: string, network?: string, baseUrl?: string, logger?: Logger): Promise<RegistrationResult>;
99
+ /**
100
+ * Finds registrations based on the provided options.
101
+ *
102
+ * @param options - The options for searching registrations.
103
+ * @param baseUrl - The base URL of the guarded registry.
104
+ * @returns A promise that resolves to the registration search result.
105
+ */
70
106
  findRegistrations(options?: RegistrationSearchOptions, baseUrl?: string): Promise<RegistrationSearchResult>;
71
107
  }
@@ -83,7 +83,7 @@ export declare class HCS10Client extends HCS10BaseClient {
83
83
  * @param pfpFileName Optional profile picture filename
84
84
  * @returns Response with topic IDs and transaction ID
85
85
  */
86
- storeHCS11Profile(agentName: string, agentDescription: string, inboundTopicId: string, outboundTopicId: string, capabilities: number[], metadata: AgentMetadata, pfpBuffer?: Buffer, pfpFileName?: string): Promise<StoreHCS11ProfileResponse>;
86
+ storeHCS11Profile(agentName: string, agentDescription: string, inboundTopicId: string, outboundTopicId: string, capabilities: number[], metadata: AgentMetadata, pfpBuffer?: Buffer, pfpFileName?: string, existingPfpTopicId?: string): Promise<StoreHCS11ProfileResponse>;
87
87
  private setupFees;
88
88
  /**
89
89
  * Handles a connection request from another account
@@ -2,6 +2,7 @@ import { AccountId, Client, Signer } from '@hashgraph/sdk';
2
2
  import { LogLevel } from '../utils/logger';
3
3
  import { DAppSigner } from '@hashgraph/hedera-wallet-connect';
4
4
  import { RegistrationProgressCallback } from '../hcs-10/types.d';
5
+ import { TopicInfo } from '../services/types';
5
6
  export declare enum ProfileType {
6
7
  PERSONAL = 0,
7
8
  AI_AGENT = 1
@@ -114,6 +115,7 @@ export declare class HCS11Client {
114
115
  private auth;
115
116
  private network;
116
117
  private logger;
118
+ private mirrorNode;
117
119
  constructor(config: HCS11ClientConfig);
118
120
  getClient(): Client;
119
121
  getOperatorId(): string;
@@ -149,16 +151,40 @@ export declare class HCS11Client {
149
151
  inscribeImage(buffer: Buffer, fileName: string, options?: InscribeImageOptions): Promise<InscribeImageResponse>;
150
152
  inscribeProfile(profile: HCS11Profile, options?: InscribeProfileOptions): Promise<InscribeProfileResponse>;
151
153
  updateAccountMemoWithProfile(accountId: string | AccountId, profileTopicId: string): Promise<TransactionResult>;
154
+ /**
155
+ * Creates and inscribes a profile.
156
+ *
157
+ * @param profile - The profile to create and inscribe.
158
+ * @param updateAccountMemo - Whether to update the account memo with the profile.
159
+ * @param options - Optional configuration options.
160
+ * @returns A promise that resolves to the inscription result.
161
+ */
152
162
  createAndInscribeProfile(profile: HCS11Profile, updateAccountMemo?: boolean, options?: InscribeProfileOptions): Promise<InscribeProfileResponse>;
163
+ /**
164
+ * Gets the capabilities from the capability names.
165
+ *
166
+ * @param capabilityNames - The capability names to get the capabilities for.
167
+ * @returns The capabilities.
168
+ */
153
169
  getCapabilitiesFromTags(capabilityNames: string[]): Promise<number[]>;
170
+ /**
171
+ * Gets the agent type from the metadata.
172
+ *
173
+ * @param metadata - The metadata of the agent.
174
+ * @returns The agent type.
175
+ */
154
176
  getAgentTypeFromMetadata(metadata: AIAgentMetadata): AIAgentType;
177
+ /**
178
+ * Fetches a profile from the account memo.
179
+ *
180
+ * @param accountId - The account ID of the agent to fetch the profile for.
181
+ * @param network - The network to use for the fetch.
182
+ * @returns A promise that resolves to the profile.
183
+ */
155
184
  fetchProfileByAccountId(accountId: string | AccountId, network?: string): Promise<{
156
185
  success: boolean;
157
186
  profile?: HCS11Profile;
158
187
  error?: string;
159
- topicInfo?: {
160
- inboundTopicId?: string;
161
- outboundTopicId?: string;
162
- };
188
+ topicInfo?: TopicInfo;
163
189
  }>;
164
190
  }
@@ -5,5 +5,3 @@ export * from './hcs-11';
5
5
  export * from './utils';
6
6
  export * from './inscribe';
7
7
  export * from './services';
8
- export declare const isBrowser: boolean;
9
- export declare const isServer: boolean;
@@ -7,8 +7,6 @@ export interface RetrievedInscriptionResult extends SDKRetrievedInscriptionResul
7
7
  url?: string;
8
8
  metadata?: Record<string, unknown>;
9
9
  message?: string;
10
- messages_processed?: number;
11
- total_messages?: number;
12
10
  }
13
11
  export type { HederaClientConfig };
14
12
  export interface AuthConfig {
@@ -1,146 +1,20 @@
1
1
  import { PublicKey } from '@hashgraph/sdk';
2
2
  import { Logger } from '../utils/logger';
3
3
  import { HCSMessage } from '../hcs-10/base-client';
4
- export interface Balance {
5
- balance: number;
6
- timestamp: string;
7
- tokens: TokenBalance[];
8
- }
9
- export interface TokenBalance {
10
- token_id: string;
11
- balance: number;
12
- }
13
- export interface Key {
14
- _type: string;
15
- key: string;
16
- }
17
- export interface AccountResponse {
18
- account: string;
19
- alias: string;
20
- auto_renew_period: number;
21
- balance: Balance;
22
- created_timestamp: string;
23
- decline_reward: boolean;
24
- deleted: boolean;
25
- ethereum_nonce: number;
26
- evm_address: string;
27
- expiry_timestamp: string;
28
- key: Key;
29
- max_automatic_token_associations: number;
30
- memo: string;
31
- pending_reward: number;
32
- receiver_sig_required: boolean;
33
- staked_account_id: string | null;
34
- staked_node_id: string | null;
35
- stake_period_start: string | null;
36
- transactions: Transaction[];
37
- links: Links;
38
- }
39
- export interface Transaction {
40
- bytes: string | null;
41
- charged_tx_fee: number;
42
- consensus_timestamp: string;
43
- entity_id: string | null;
44
- max_fee: string;
45
- memo_base64: string;
46
- name: string;
47
- nft_transfers: NftTransfer[];
48
- node: string;
49
- nonce: number;
50
- parent_consensus_timestamp: string | null;
51
- result: string;
52
- scheduled: boolean;
53
- staking_reward_transfers: Transfer[];
54
- token_transfers: TokenTransfer[];
55
- transaction_hash: string;
56
- transaction_id: string;
57
- transfers: Transfer[];
58
- valid_duration_seconds: string;
59
- valid_start_timestamp: string;
60
- }
61
- export interface Transfer {
62
- account: string;
63
- amount: number;
64
- is_approval: boolean;
65
- }
66
- export interface TokenTransfer {
67
- token_id: string;
68
- account: string;
69
- amount: string;
70
- is_approval: boolean;
71
- }
72
- export interface NftTransfer {
73
- receiver_account_id: string;
74
- sender_account_id: string;
75
- serial_number: number;
76
- is_approval: boolean;
77
- }
78
- export interface Links {
79
- next: string;
80
- }
81
- export type NetworkType = 'mainnet' | 'testnet';
82
- export interface TopicInfo {
83
- inboundTopic: string;
84
- outboundTopic: string;
85
- }
86
- export interface TopicMessage {
87
- consensus_timestamp: string;
88
- topic_id: string;
89
- message: string;
90
- sequence_number: number;
91
- running_hash: string;
92
- running_hash_version: number;
93
- payer_account_id: string;
94
- }
95
- export interface TopicMessagesResponse {
96
- messages: TopicMessage[];
97
- links: {
98
- next?: string;
99
- };
100
- }
101
- export interface TopicResponse {
102
- admin_key: Key;
103
- auto_renew_account: string;
104
- auto_renew_period: number;
105
- created_timestamp: string;
106
- custom_fees: CustomFees;
107
- deleted: boolean;
108
- fee_exempt_key_list: Key[];
109
- fee_schedule_key: Key;
110
- memo: string;
111
- submit_key: Key;
112
- timestamp: Timestamp;
113
- topic_id: string;
114
- }
115
- export interface Key {
116
- _type: string;
117
- key: string;
118
- }
119
- export interface CustomFees {
120
- created_timestamp: string;
121
- fixed_fees: FixedFee[];
122
- }
123
- export interface FixedFee {
124
- amount: number;
125
- collector_account_id: string;
126
- denominating_token_id: string;
127
- }
128
- export interface Timestamp {
129
- from: string;
130
- to: string;
131
- }
4
+ import { AccountResponse, CustomFees, NetworkType, TopicResponse } from './types';
132
5
  export declare class HederaMirrorNode {
133
6
  private network;
134
7
  private baseUrl;
135
- private logger?;
8
+ private logger;
136
9
  private isServerEnvironment;
137
- constructor(network: NetworkType, logger?: Logger);
10
+ constructor(network: NetworkType, logger: Logger);
138
11
  private getMirrorNodeUrl;
139
12
  getBaseUrl(): string;
140
13
  getPublicKey(accountId: string): Promise<PublicKey>;
141
14
  getAccountMemo(accountId: string): Promise<string | null>;
142
15
  getTopicInfo(topicId: string): Promise<TopicResponse>;
143
16
  getTopicFees(topicId: string): Promise<CustomFees | null>;
17
+ getHBARPrice(date: Date): Promise<number | null>;
144
18
  getTopicMessages(topicId: string): Promise<HCSMessage[]>;
145
19
  requestAccount(accountId: string): Promise<AccountResponse>;
146
20
  checkKeyListAccess(keyBytes: Buffer, userPublicKey: PublicKey): Promise<boolean>;
@@ -0,0 +1,139 @@
1
+ export interface Balance {
2
+ balance: number;
3
+ timestamp: string;
4
+ tokens: TokenBalance[];
5
+ }
6
+ export interface TokenBalance {
7
+ token_id: string;
8
+ balance: number;
9
+ }
10
+ export interface Key {
11
+ _type: string;
12
+ key: string;
13
+ }
14
+ export interface AccountResponse {
15
+ account: string;
16
+ alias: string;
17
+ auto_renew_period: number;
18
+ balance: Balance;
19
+ created_timestamp: string;
20
+ decline_reward: boolean;
21
+ deleted: boolean;
22
+ ethereum_nonce: number;
23
+ evm_address: string;
24
+ expiry_timestamp: string;
25
+ key: Key;
26
+ max_automatic_token_associations: number;
27
+ memo: string;
28
+ pending_reward: number;
29
+ receiver_sig_required: boolean;
30
+ staked_account_id: string | null;
31
+ staked_node_id: string | null;
32
+ stake_period_start: string | null;
33
+ transactions: Transaction[];
34
+ links: Links;
35
+ }
36
+ export interface Transaction {
37
+ bytes: string | null;
38
+ charged_tx_fee: number;
39
+ consensus_timestamp: string;
40
+ entity_id: string | null;
41
+ max_fee: string;
42
+ memo_base64: string;
43
+ name: string;
44
+ nft_transfers: NftTransfer[];
45
+ node: string;
46
+ nonce: number;
47
+ parent_consensus_timestamp: string | null;
48
+ result: string;
49
+ scheduled: boolean;
50
+ staking_reward_transfers: Transfer[];
51
+ token_transfers: TokenTransfer[];
52
+ transaction_hash: string;
53
+ transaction_id: string;
54
+ transfers: Transfer[];
55
+ valid_duration_seconds: string;
56
+ valid_start_timestamp: string;
57
+ }
58
+ export interface Transfer {
59
+ account: string;
60
+ amount: number;
61
+ is_approval: boolean;
62
+ }
63
+ export interface TokenTransfer {
64
+ token_id: string;
65
+ account: string;
66
+ amount: string;
67
+ is_approval: boolean;
68
+ }
69
+ export interface NftTransfer {
70
+ receiver_account_id: string;
71
+ sender_account_id: string;
72
+ serial_number: number;
73
+ is_approval: boolean;
74
+ }
75
+ export interface Links {
76
+ next: string;
77
+ }
78
+ export type NetworkType = 'mainnet' | 'testnet';
79
+ export interface TopicInfo {
80
+ inboundTopic: string;
81
+ outboundTopic: string;
82
+ profileTopicId: string;
83
+ }
84
+ export interface TopicMessage {
85
+ consensus_timestamp: string;
86
+ topic_id: string;
87
+ message: string;
88
+ sequence_number: number;
89
+ running_hash: string;
90
+ running_hash_version: number;
91
+ payer_account_id: string;
92
+ }
93
+ export interface TopicMessagesResponse {
94
+ messages: TopicMessage[];
95
+ links: {
96
+ next?: string;
97
+ };
98
+ }
99
+ export interface TopicResponse {
100
+ admin_key: Key;
101
+ auto_renew_account: string;
102
+ auto_renew_period: number;
103
+ created_timestamp: string;
104
+ custom_fees: CustomFees;
105
+ deleted: boolean;
106
+ fee_exempt_key_list: Key[];
107
+ fee_schedule_key: Key;
108
+ memo: string;
109
+ submit_key: Key;
110
+ timestamp: Timestamp;
111
+ topic_id: string;
112
+ }
113
+ export interface Key {
114
+ _type: string;
115
+ key: string;
116
+ }
117
+ export interface CustomFees {
118
+ created_timestamp: string;
119
+ fixed_fees: FixedFee[];
120
+ }
121
+ export interface FixedFee {
122
+ amount: number;
123
+ collector_account_id: string;
124
+ denominating_token_id: string;
125
+ }
126
+ export interface Timestamp {
127
+ from: string;
128
+ to: string;
129
+ }
130
+ export interface TRate {
131
+ cent_equivalent: number;
132
+ expiration_time: number;
133
+ hbar_equivalent: number;
134
+ }
135
+ export interface HBARPrice {
136
+ current_rate: TRate;
137
+ next_rate: TRate;
138
+ timestamp: string;
139
+ }