Socket
Socket
Sign inDemoInstall

starknet

Package Overview
Dependencies
Maintainers
1
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

starknet - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

29

dist/index.d.ts
/**
* 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

@@ -9,3 +10,5 @@ * @returns starknet smart contract address

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L17-L25)
*
* @param invokeTx - transaction to be invoked (WIP)

@@ -18,3 +21,5 @@ * @param 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L27-L31)
*
* @param blockId

@@ -26,3 +31,5 @@ * @returns the block object { block_id, previous_block_id, state_root, status, timestamp, transaction_receipts, transactions }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L33-L36)
*
* @param contractAddress

@@ -35,3 +42,5 @@ * @param 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L38-L46)
*
* @param contractAddress

@@ -45,3 +54,5 @@ * @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52)
*
* @param txId

@@ -53,3 +64,5 @@ * @returns the transaction status object { block_id, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L54-L58)
*
* @param txId

@@ -61,3 +74,5 @@ * @returns the transacton object { transaction_id, status, transaction, block_id?, block_number?, transaction_index?, transaction_failure_reason? }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17)
*
* @param tx - transaction to be invoked (WIP)

@@ -64,0 +79,0 @@ * @returns a confirmation of invoking a function on the starknet contract

@@ -13,2 +13,3 @@ "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

@@ -30,3 +31,5 @@ * @returns starknet smart contract address

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L17-L25)
*
* @param invokeTx - transaction to be invoked (WIP)

@@ -49,3 +52,5 @@ * @param 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L27-L31)
*
* @param blockId

@@ -67,3 +72,5 @@ * @returns the block object { block_id, previous_block_id, state_root, status, timestamp, transaction_receipts, transactions }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L33-L36)
*
* @param contractAddress

@@ -86,3 +93,5 @@ * @param 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L38-L46)
*
* @param contractAddress

@@ -106,3 +115,5 @@ * @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52)
*
* @param txId

@@ -124,3 +135,5 @@ * @returns the transaction status object { block_id, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L54-L58)
*
* @param txId

@@ -142,3 +155,5 @@ * @returns the transacton object { transaction_id, status, transaction, block_id?, block_number?, transaction_index?, transaction_failure_reason? }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17)
*
* @param tx - transaction to be invoked (WIP)

@@ -145,0 +160,0 @@ * @returns a confirmation of invoking a function on the starknet contract

@@ -1,3 +0,3 @@

## starknet
## Starknet.js Docs
- [Home](../wiki/Home)

@@ -1,9 +0,5 @@

# starknet
# Starknet.js Docs
## Table of contents
### Properties
- [default](../wiki/Home#default)
### Functions

@@ -20,21 +16,2 @@

## Properties
### default
• **default**: `Object`
#### Type declaration
| Name | Type |
| :------ | :------ |
| `addTransaction` | (`tx`: `object`) => `Promise`<`object`\> |
| `callContract` | (`invokeTx`: `object`, `blockId`: `number`) => `Promise`<`object`\> |
| `getBlock` | (`blockId`: `number`) => `Promise`<`object`\> |
| `getCode` | (`contractAddress`: `string`, `blockId`: `number`) => `Promise`<`object`\> |
| `getContractAddresses` | () => `Promise`<`object`\> |
| `getStorageAt` | (`contractAddress`: `string`, `key`: `number`, `blockId`: `number`) => `Promise`<`object`\> |
| `getTransaction` | (`txId`: `number`) => `Promise`<`object`\> |
| `getTransactionStatus` | (`txId`: `number`) => `Promise`<`object`\> |
## Functions

@@ -47,4 +24,5 @@

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17)
#### Parameters

@@ -64,3 +42,3 @@

[index.ts:141](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L141)
[index.ts:156](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L156)

@@ -74,4 +52,5 @@ ___

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L17-L25)
#### Parameters

@@ -92,3 +71,3 @@

[index.ts:30](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L30)
[index.ts:33](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L33)

@@ -102,4 +81,5 @@ ___

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L27-L31)
#### Parameters

@@ -119,3 +99,3 @@

[index.ts:47](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L47)
[index.ts:52](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L52)

@@ -129,4 +109,5 @@ ___

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L33-L36)
#### Parameters

@@ -147,3 +128,3 @@

[index.ts:65](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L65)
[index.ts:72](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L72)

@@ -157,2 +138,3 @@ ___

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

@@ -168,3 +150,3 @@

[index.ts:12](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L12)
[index.ts:13](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L13)

@@ -178,4 +160,5 @@ ___

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L38-L46)
#### Parameters

@@ -197,3 +180,3 @@

[index.ts:84](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L84)
[index.ts:93](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L93)

@@ -207,4 +190,5 @@ ___

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L54-L58)
#### Parameters

@@ -224,3 +208,3 @@

[index.ts:124](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L124)
[index.ts:137](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L137)

@@ -234,4 +218,5 @@ ___

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
[Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52)
#### Parameters

@@ -251,2 +236,2 @@

[index.ts:107](https://github.com/seanjameshan/starknet.js/blob/9e4616f/src/index.ts#L107)
[index.ts:118](https://github.com/seanjameshan/starknet.js/blob/4aa4525/src/index.ts#L118)
{
"name": "starknet",
"version": "0.1.1",
"version": "0.1.2",
"description": "JavaScript library for StarkNet",

@@ -12,3 +12,3 @@ "main": "dist/index.js",

"test:watch": "jest --watch",
"docs": "typedoc --theme ./node_modules/typedoc-github-wiki-theme/dist --readme none"
"docs": "typedoc --theme ./node_modules/typedoc-github-wiki-theme/dist --readme none --name 'Starknet.js Docs' --excludeNotDocumented"
},

@@ -15,0 +15,0 @@ "keywords": [

@@ -11,8 +11,9 @@ <!-- logo -->

<p align="center">
<img src='https://img.shields.io/github/package-json/v/seanjameshan/starknet.js?color=blue&label=npm&style=flat' />
<img src='https://img.shields.io/github/package-json/v/seanjameshan/starknet.js?label=npm' />
<img src='https://img.shields.io/bundlephobia/minzip/starknet?color=success&label=size' />
<img src='https://img.shields.io/npm/dt/starknet?color=blueviolet' />
<img src='https://img.shields.io/github/stars/seanjameshan/starknet.js?style=social&color=%23FFB31A' />
<img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square">
<img src="https://img.shields.io/badge/powered_by-StarkWare-navy?style=flat-square">
<!-- <img src='https://img.shields.io/npm/dt/starknet?color=blueviolet' /> -->
<img src="https://img.shields.io/badge/license-MIT-black">
<img src='https://img.shields.io/github/stars/seanjameshan/starknet.js?color=yellow' />
<img src='https://img.shields.io/github/followers/seanjameshan?color=red' />
<img src="https://img.shields.io/badge/powered_by-StarkWare-navy">
</p>

@@ -30,8 +31,8 @@

starknet.getContractAddresses().then((data) => {
console.log(data)
})
console.log(data);
});
```
## 🌐 API
[Click Here](https://github.com/seanjameshan/starknet.js/blob/main/docs)
[Click Here](https://github.com/seanjameshan/starknet.js/blob/main/docs/Home.md)

@@ -38,0 +39,0 @@ ## License

@@ -9,2 +9,3 @@ import axios from 'axios';

* 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

@@ -26,3 +27,5 @@ * @returns starknet smart contract address

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L17-L25)
*
* @param invokeTx - transaction to be invoked (WIP)

@@ -45,3 +48,5 @@ * @param 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L27-L31)
*
* @param blockId

@@ -63,3 +68,5 @@ * @returns the block object { block_id, previous_block_id, state_root, status, timestamp, transaction_receipts, transactions }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L33-L36)
*
* @param contractAddress

@@ -82,3 +89,5 @@ * @param 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L38-L46)
*
* @param contractAddress

@@ -108,3 +117,5 @@ * @param key - from getStorageVarAddress('<STORAGE_VARIABLE_NAME>') (WIP)

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L48-L52)
*
* @param txId

@@ -126,3 +137,5 @@ * @returns the transaction status object { block_id, tx_status: NOT_RECEIVED | RECEIVED | PENDING | REJECTED | ACCEPTED_ONCHAIN }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/feeder_gateway/feeder_gateway_client.py#L54-L58)
*
* @param txId

@@ -144,3 +157,5 @@ * @returns the transacton object { transaction_id, status, transaction, block_id?, block_number?, transaction_index?, transaction_failure_reason? }

* 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
*
* [Reference](https://github.com/starkware-libs/cairo-lang/blob/f464ec4797361b6be8989e36e02ec690e74ef285/src/starkware/starknet/services/api/gateway/gateway_client.py#L13-L17)
*
* @param tx - transaction to be invoked (WIP)

@@ -147,0 +162,0 @@ * @returns a confirmation of invoking a function on the starknet contract

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc