-
Notifications
You must be signed in to change notification settings - Fork 757
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from argentlabs/feature/start-adding-types
Feature: Start adding types
- Loading branch information
Showing
8 changed files
with
158 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Docs Bot | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
generate-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
- run: npm ci | ||
- run: npm run docs | ||
- name: Do git actions | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "Docs Bot" | ||
git add --force -- docs/README.md | ||
git commit -m "docs: add generated docs" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Node.js CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: | ||
- 14.x | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci | ||
- run: npm run build --if-present | ||
- run: npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ dist | |
npm-debug.log | ||
.env | ||
.DS_Store | ||
|
||
docs/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
export interface GetContractAddressesResponse { | ||
Starknet: string; | ||
GpsStatementVerifier: string; | ||
} | ||
|
||
export type Status = 'NOT_RECEIVED' | 'RECEIVED' | 'PENDING' | 'REJECTED' | 'ACCEPTED_ONCHAIN'; | ||
export type Type = 'DEPLOY' | 'INVOKE_FUNCTION'; | ||
export type EntryPointType = 'EXTERNAL'; | ||
|
||
export interface Transaction { | ||
type: Type; | ||
contract_address: string; | ||
entry_point_type?: EntryPointType; | ||
entry_point_selector?: string; | ||
calldata?: string[]; | ||
} | ||
|
||
export interface GetBlockResponse { | ||
sequence_number: number; | ||
state_root: string; | ||
block_id: number; | ||
transactions: { | ||
[txid: string]: Transaction; | ||
}; | ||
timestamp: number; | ||
transaction_receipts: { | ||
[txid: string]: { | ||
block_id: number; | ||
transaction_id: number; | ||
l2_to_l1_messages: { | ||
to_address: string; | ||
payload: string[]; | ||
from_address: string; | ||
}[]; | ||
block_number: number; | ||
status: Status; | ||
transaction_index: number; | ||
}; | ||
}; | ||
previous_block_id: number; | ||
status: Status; | ||
} | ||
|
||
export interface Abi { | ||
inputs: { name: string; type: string }[]; | ||
name: string; | ||
outputs: { name: string; type: string }[]; | ||
type: string; | ||
} | ||
|
||
export interface GetCode { | ||
bytecode: string[]; | ||
abi: Abi[]; | ||
} | ||
|
||
export interface GetTransactionStatusResponse { | ||
tx_status: Status; | ||
block_id: number; | ||
} | ||
|
||
export interface GetTransactionResponse { | ||
transaction_index: number; | ||
transaction: Transaction; | ||
block_id: number; | ||
block_number: number; | ||
status: Status; | ||
transaction_id: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters