diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 4b6b792..228a189 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -1,7 +1,7 @@ { "openrpc": "1.0.0-rc1", "info": { - "version": "0.44.0", + "version": "0.45.0", "title": "StarkNet Node API", "license": {} }, @@ -619,7 +619,7 @@ { "$ref": "#/components/errors/BLOCK_NOT_FOUND" } - ] + ] }, { "name": "starknet_getNonce", @@ -1129,6 +1129,9 @@ }, { "$ref": "#/components/schemas/DEPLOY_TXN" + }, + { + "ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN" } ] }, @@ -1144,6 +1147,9 @@ }, { "$ref": "#/components/schemas/BROADCASTED_DEPLOY_TXN" + }, + { + "$ref": "#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN" } ] }, @@ -1237,6 +1243,49 @@ } ] }, + "DEPLOY_ACCOUNT_TXN": { + "title": "Deploy Account Transaction", + "description": "Deploys an account contract, charges fee from the pre-funded account addresses", + "allOf": [ + { + "$ref": "#/components/schemas/COMMON_TXN_PROPERTIES" + }, + { + "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_PROPERTIES" + } + ] + }, + "BROADCASTED_DEPLOY_ACCOUNT_TXN": { + "description": "Mempool representation of a deploy account transaction", + "allOf": [ + { + "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" + }, + { + "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_PROPERTIES" + } + ] + }, + "DEPLOY_ACCOUNT_TXN_PROPERTIES": { + "type": "object", + "properties": { + "contract_address_salt": { + "description": "The salt for the address of the deployed contract", + "$ref": "#/components/schemas/FELT" + }, + "constructor_calldata": { + "type": "array", + "description": "The parameters passed to the constructor", + "items": { + "$ref": "#/components/schemas/FELT" + } + }, + "class_hash": { + "description": "The hash of the deployed contract's class", + "$ref": "#/components/schemas/FELT" + } + } + }, "DEPLOY_TXN": { "title": "Deploy Contract Transaction", "description": "The structure of a deploy transaction. Note that this transaction type is deprecated and will no longer be supported in future versions", @@ -1429,7 +1478,7 @@ "$ref": "#/components/schemas/EVENT" } } - }, + }, "required": [ "transaction_hash", "actual_fee", @@ -1449,6 +1498,10 @@ "title": "Declare Transaction Receipt", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" }, + "DEPLOY_ACCOUNT_TXN_RECEIPT": { + "title": "Deploy Account Transaction Receipt", + "$ref": "#/components/schemas/DEPLOY_TXN_RECEIPT" + }, "DEPLOY_TXN_RECEIPT": { "title": "Deploy Transaction Receipt", "allOf": [ @@ -1484,6 +1537,9 @@ { "$ref": "#/components/schemas/DEPLOY_TXN_RECEIPT" }, + { + "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_RECEIPT" + }, { "$ref": "#/components/schemas/PENDING_TXN_RECEIPT" } diff --git a/api/starknet_write_api.json b/api/starknet_write_api.json index 664d4ad..856716b 100644 --- a/api/starknet_write_api.json +++ b/api/starknet_write_api.json @@ -75,7 +75,7 @@ "params": [ { "name": "deploy_transaction", - "description": "The salt used for calculting the contract address", + "description": "The deploy transaction", "schema": { "$ref": "#/components/schemas/BROADCASTED_DEPLOY_TXN" } @@ -103,6 +103,41 @@ "$ref": "#/components/errors/INVALID_CONTRACT_CLASS" } ] + }, + { + "name": "starknet_addDeployAccountTransaction", + "summary": "Submit a new deploy account transaction", + "params": [ + { + "name": "deploy_account_transaction", + "description": "The deploy account transaction", + "schema": { + "$ref": "#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN" + } + } + ], + "result": { + "name": "result", + "description": "The result of the transaction submission", + "schema": { + "type": "object", + "properties": { + "transaction_hash": { + "title": "The hash of the deploy transaction", + "$ref": "#/components/schemas/TXN_HASH" + }, + "contract_address": { + "title": "The address of the new contract", + "$ref": "#/components/schemas/FELT" + } + } + } + }, + "errors": [ + { + "$ref": "#/components/errors/CLASS_HASH_NOT_FOUND" + } + ] } ], "components": { @@ -134,6 +169,9 @@ "BROADCASTED_DEPLOY_TXN": { "$ref": "./api/starknet_api_openrpc.json#/components/schemas/BROADCASTED_DEPLOY_TXN" }, + "BROADCASTED_DEPLOY_ACCOUNT_TXN": { + "$ref": "./api/starknet_api_openrpc.json#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN" + }, "FUNCTION_CALL": { "$ref": "./api/starknet_api_openrpc.json#/components/schemas/FUNCTION_CALL" } @@ -142,6 +180,9 @@ "INVALID_CONTRACT_CLASS": { "code": 50, "message": "Invalid contract class" + }, + "CLASS_HASH_NOT_FOUND": { + "$ref": "./api/starknet_api_openrpc.json#/components/errors/CLASS_HASH_NOT_FOUND" } } }