diff --git a/__tests__/starknet.test.ts b/__tests__/starknet.test.ts index 0dfdc247f..6a30c018d 100644 --- a/__tests__/starknet.test.ts +++ b/__tests__/starknet.test.ts @@ -27,8 +27,10 @@ const compiledArgentAccount = parse( describe('starknet endpoints', () => { describe('feeder gateway endpoints', () => { - test('getContractAddresses()', () => { - return expect(getContractAddresses()).resolves.not.toThrow(); + test('getContractAddresses()', async () => { + const { GpsStatementVerifier, Starknet } = await getContractAddresses(); + expect(typeof GpsStatementVerifier).toBe('string'); + expect(typeof Starknet).toBe('string'); }); test('getBlock()', () => { return expect(getBlock(870)).resolves.not.toThrow(); @@ -61,7 +63,11 @@ describe('starknet endpoints', () => { getTransactionStatus('0x2086ff26645fb0e31a3e252302f3cb1e7612c60389102e5473dfc89758a3aa9') ).resolves.not.toThrow(); }); - test('getTransaction()', () => { + test('getTransaction()', async () => { + const x = await getTransaction( + '0x2086ff26645fb0e31a3e252302f3cb1e7612c60389102e5473dfc89758a3aa9' + ); + console.log(x); return expect( getTransaction('0x2086ff26645fb0e31a3e252302f3cb1e7612c60389102e5473dfc89758a3aa9') ).resolves.not.toThrow(); diff --git a/src/types.ts b/src/types.ts index 9f53539e1..7211a2959 100644 --- a/src/types.ts +++ b/src/types.ts @@ -58,13 +58,13 @@ export type GetBlockResponse = { state_root: string; block_id: number; transactions: { - [txid: string]: Transaction; + [txHash: string]: Transaction; }; timestamp: number; transaction_receipts: { - [txid: string]: { + [txHash: string]: { block_id: number; - transaction_id: number; + transaction_hash: string; l2_to_l1_messages: { to_address: string; payload: string[]; @@ -90,12 +90,12 @@ export type GetTransactionStatusResponse = { }; export type GetTransactionResponse = { - transaction_index: number; + status: Status; transaction: Transaction; block_id: number; block_number: number; - status: Status; - transaction_id: number; + transaction_index: number; + transaction_hash: string; }; export type AddTransactionResponse = {