Skip to content

Commit

Permalink
Update felt to padded felt
Browse files Browse the repository at this point in the history
* return padded felt for transaction hash
* Accept a named selector for contract calls
  • Loading branch information
amanusk committed Apr 9, 2024
1 parent 235e308 commit 9245fa6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions wallet-api/wallet_rpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
},
"class_hash": {
"title": "The hash of the declared class",
"$ref": "#/components/schemas/FELT"
"$ref": "#/components/schemas/PADDED_FELT"
}
},
"required": ["transaction_hash", "class_hash"]
Expand Down Expand Up @@ -337,7 +337,7 @@
"TXN_HASH": {
"title": "Transaction hash",
"description": "The transaction hash, as assigned in Starknet",
"$ref": "#/components/schemas/FELT"
"$ref": "#/components/schemas/PADDED_FELT"
},
"ADDRESS": {
"title": "Address",
Expand Down Expand Up @@ -470,12 +470,13 @@
"type": "object",
"properties": {
"contract_address": {
"title": "sender address",
"title": "The contract address to interact with",
"$ref": "#/components/schemas/ADDRESS"
},
"entry_point": {
"title": "Contract entry point",
"$ref": "#/components/schemas/FELT"
"description": "A string correlating the selector name of the contract, e.g. 'transfer'",
"type": "string"
},
"calldata": {
"type": "array",
Expand Down Expand Up @@ -600,7 +601,7 @@
"type": "object",
"properties": {
"types": {
"description": "primaryType represents the top-level type of the object in the message",
"description": "Defines the types of the typed data object",
"type": "array",
"itmes": {
"$ref": "#/components/schemas/STARKNET_TYPE"
Expand Down Expand Up @@ -633,6 +634,13 @@
}
}
},
"PADDED_FELT": {
"type": "string",
"title": "Padded felt",
"$comment": "A felt represented as a string of zero padded hex digits",
"description": "Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.",
"pattern": "^0x(0|[0-7]{1}[a-fA-F0-9]{0,62}$)"
},
"SIERRA_ENTRY_POINT": {
"$ref": "./api/starknet_api_openrpc.json#/components/schemas/SIERRA_ENTRY_POINT"
},
Expand Down

0 comments on commit 9245fa6

Please sign in to comment.