Comparing version 0.1.0 to 0.1.1
/** | ||
* Gets the smart contract address on the goerli testnet. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L13-L15 | ||
* @returns | ||
* @returns starknet smart contract address | ||
*/ | ||
export declare function getContractAddresses(): Promise<object>; | ||
/** | ||
* Calls a function on the StarkNet contract. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L17-L25 | ||
* @param invokeTx | ||
* @param invokeTx - transaction to be invoked (WIP) | ||
* @param blockId | ||
* @returns | ||
* @returns the result of the function on the smart contract. | ||
*/ | ||
export declare function callContract(invokeTx: object, blockId: number): Promise<object>; | ||
/** | ||
* Gets the block information from a block ID. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L27-L31 | ||
* @param blockId | ||
* @returns | ||
* @returns the block object { block_id, previous_block_id, state_root, status, timestamp, transaction_receipts, transactions } | ||
*/ | ||
export declare function getBlock(blockId: number): Promise<object>; | ||
/** | ||
* Gets the code of the deployed contract. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L33-L36 | ||
* @param contractAddress | ||
* @param blockId | ||
* @returns | ||
* @returns ABI of compiled contract in JSON | ||
*/ | ||
export declare function getCode(contractAddress: string, blockId: number): Promise<object>; | ||
/** | ||
* Gets the contract's storage variable at a specific key. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L38-L46 | ||
* @param contractAddress | ||
* @param key | ||
* @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP) | ||
* @param blockId | ||
* @returns | ||
* @returns the value of the storage variable | ||
*/ | ||
export declare function getStorageAt(contractAddress: string, key: number, blockId: number): Promise<object>; | ||
/** | ||
* Gets the status of a transaction. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52 | ||
* @param txId | ||
* @returns | ||
* @returns the transaction status object { block_id, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN } | ||
*/ | ||
export declare function getTransactionStatus(txId: number): Promise<object>; | ||
/** | ||
* Gets the transaction information from a tx id. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L54-L58 | ||
* @param txId | ||
* @returns | ||
* @returns the transacton object { transaction_id, status, transaction, block_id?, block_number?, transaction_index?, transaction_failure_reason? } | ||
*/ | ||
export declare function getTransaction(txId: number): Promise<object>; | ||
/** | ||
* Invoke a function on the starknet contract | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17 | ||
* @param tx | ||
* @returns | ||
* @param tx - transaction to be invoked (WIP) | ||
* @returns a confirmation of invoking a function on the starknet contract | ||
*/ | ||
@@ -51,0 +59,0 @@ export declare function addTransaction(tx: object): Promise<object>; |
@@ -12,4 +12,5 @@ "use strict"; | ||
/** | ||
* Gets the smart contract address on the goerli testnet. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L13-L15 | ||
* @returns | ||
* @returns starknet smart contract address | ||
*/ | ||
@@ -28,6 +29,7 @@ function getContractAddresses() { | ||
/** | ||
* Calls a function on the StarkNet contract. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L17-L25 | ||
* @param invokeTx | ||
* @param invokeTx - transaction to be invoked (WIP) | ||
* @param blockId | ||
* @returns | ||
* @returns the result of the function on the smart contract. | ||
*/ | ||
@@ -46,5 +48,6 @@ function callContract(invokeTx, blockId) { | ||
/** | ||
* Gets the block information from a block ID. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L27-L31 | ||
* @param blockId | ||
* @returns | ||
* @returns the block object { block_id, previous_block_id, state_root, status, timestamp, transaction_receipts, transactions } | ||
*/ | ||
@@ -63,6 +66,7 @@ function getBlock(blockId) { | ||
/** | ||
* Gets the code of the deployed contract. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L33-L36 | ||
* @param contractAddress | ||
* @param blockId | ||
* @returns | ||
* @returns ABI of compiled contract in JSON | ||
*/ | ||
@@ -81,7 +85,8 @@ function getCode(contractAddress, blockId) { | ||
/** | ||
* Gets the contract's storage variable at a specific key. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L38-L46 | ||
* @param contractAddress | ||
* @param key | ||
* @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP) | ||
* @param blockId | ||
* @returns | ||
* @returns the value of the storage variable | ||
*/ | ||
@@ -100,5 +105,6 @@ function getStorageAt(contractAddress, key, blockId) { | ||
/** | ||
* Gets the status of a transaction. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52 | ||
* @param txId | ||
* @returns | ||
* @returns the transaction status object { block_id, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN } | ||
*/ | ||
@@ -117,5 +123,6 @@ function getTransactionStatus(txId) { | ||
/** | ||
* Gets the transaction information from a tx id. | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L54-L58 | ||
* @param txId | ||
* @returns | ||
* @returns the transacton object { transaction_id, status, transaction, block_id?, block_number?, transaction_index?, transaction_failure_reason? } | ||
*/ | ||
@@ -134,5 +141,6 @@ function getTransaction(txId) { | ||
/** | ||
* Invoke a function on the starknet contract | ||
* https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17 | ||
* @param tx | ||
* @returns | ||
* @param tx - transaction to be invoked (WIP) | ||
* @returns a confirmation of invoking a function on the starknet contract | ||
*/ | ||
@@ -139,0 +147,0 @@ function addTransaction(tx) { |
{ | ||
"name": "starknet", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "JavaScript library for StarkNet", | ||
@@ -11,3 +11,4 @@ "main": "dist/index.js", | ||
"test": "jest", | ||
"test:watch": "jest --watch" | ||
"test:watch": "jest --watch", | ||
"docs": "typedoc --theme ./node_modules/typedoc-github-wiki-theme/dist --readme none" | ||
}, | ||
@@ -23,3 +24,3 @@ "keywords": [ | ||
"author": "Sean Han", | ||
"license": "GPLv3", | ||
"license": "MIT", | ||
"devDependencies": { | ||
@@ -38,2 +39,5 @@ "@babel/preset-env": "^7.15.8", | ||
"prettier": "^2.4.1", | ||
"typedoc": "^0.22.6", | ||
"typedoc-github-wiki-theme": "^0.6.0", | ||
"typedoc-plugin-markdown": "^3.11.3", | ||
"typescript": "^4.4.4" | ||
@@ -40,0 +44,0 @@ }, |
@@ -99,3 +99,12 @@ { | ||
"skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
}, | ||
"include": ["src/**/*"], | ||
"exclude": [ | ||
"node_modules", | ||
"**/*.test.ts" | ||
], | ||
"typedocOptions": { | ||
"entryPoints": ["src/index.ts"], | ||
"out": "docs" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
Copyleft License
License(Experimental) Copyleft license information was found.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
50831
17
0
100
603
0
39
16