Skip to content

Commit d591149

Browse files
added unit tests for RecordScanner
1 parent 6030766 commit d591149

File tree

5 files changed

+373
-3
lines changed

5 files changed

+373
-3
lines changed

sdk/src/models/record-scanner/recordsResponseFilter.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* @example
66
* const recordsResponseFilter: RecordsResponseFilter = {
77
* block_height: true,
8+
* block_timestamp: true,
89
* checksum: true,
910
* commitment: true,
1011
* record_ciphertext: true,
@@ -14,17 +15,20 @@
1415
* owner: true,
1516
* program_name: true,
1617
* record_name: true,
18+
* sender_ciphertext: true,
1719
* transaction_id: true,
1820
* transition_id: true,
1921
* transaction_index: true,
2022
* transition_index: true,
2123
* }
2224
*/
2325
export type RecordsResponseFilter = {
24-
blockHeight?: boolean;
26+
block_height?: boolean;
27+
block_timestamp?: boolean;
2528
checksum?: boolean;
2629
commitment?: boolean;
2730
record_ciphertext?: boolean;
31+
sender_ciphertext?: boolean;
2832
function_name?: boolean;
2933
nonce?: boolean;
3034
output_index?: boolean;

sdk/src/models/record-scanner/registrationResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* status: "pending",
99
* }
1010
*/
11-
interface RegistrationResponse {
11+
export interface RegistrationResponse {
1212
uuid: string,
1313
job_id?: string,
1414
status?: string

sdk/src/record-scanner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { RecordSearchParams } from "./models/record-provider/recordSearchParams"
88
import { RecordsFilter } from "./models/record-scanner/recordsFilter";
99
import { RecordsResponseFilter } from "./models/record-scanner/recordsResponseFilter";
1010
import { RegistrationRequest } from "./models/record-scanner/registrationRequest";
11+
import { RegistrationResponse } from "./models/record-scanner/registrationResponse";
1112

1213
type RecordScannerOptions = {
1314
url: string;

sdk/tests/data/records.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ const OWNED_CREDITS_RECORDS = [
206206
}
207207
]
208208

209-
const CHECK_SNS_RESPONSE = { '3673836024253895240205884165890003872225300531298514519146928213266356324646field': true }
209+
const CHECK_SNS_RESPONSE = {
210+
'1621694306596217216370326054181178914897851479837084979111511176605457690717field': true,
211+
'5684626152578699086223993752521225507576791345254401210560771329591763880242field': false,
212+
}
210213

211214
const CHECK_TAGS_RESPONSE = {
212215
'2965517500209150226508265073635793457193572667031485750956287906078711930968field': false,

0 commit comments

Comments
 (0)