Skip to content

linguistics PR's #1349

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 37 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
f7ec318
update copyright year (#1340)
xiaobei0715 Mar 14, 2025
ac7227d
Update uint256.ts (#1330)
crStiv Mar 14, 2025
11818de
chore: replaced broken discord link (#1326)
Lubov66 Mar 14, 2025
9f9010c
Update L1message.md (#1322)
Danyylka Mar 14, 2025
06b9dc4
chore: fix errors in code (#1321)
Fallengirl Mar 14, 2025
4c34c39
Update rpc.ts
Fallengirl Mar 16, 2025
1e8ff22
Update intro.md
reject-i Mar 17, 2025
04cac91
Update interface.ts
futreall Mar 20, 2025
e1b5151
Update rpc_0_7.ts
leopardracer Mar 29, 2025
e30b090
Update rpc_0_8.ts
leopardracer Mar 29, 2025
0b5db30
Update validate.ts
leopardracer Mar 29, 2025
c154eac
Update typedData.test.ts
leopardracer Mar 29, 2025
801fdfd
Merge branch 'develop' into develop
leopardracer Apr 1, 2025
2ac2c74
Merge branch 'develop' into develop
leopardracer Apr 2, 2025
c4e2340
Merge branch 'develop' into develop
leopardracer Apr 10, 2025
3703e49
Merge branch 'develop' into develop
leopardracer Apr 12, 2025
7e07891
Merge branch 'develop' into develop
leopardracer Apr 17, 2025
10a3d66
Update rpc_0_7.ts
leopardracer May 6, 2025
06d3389
Update rpc_0_8.ts
leopardracer May 6, 2025
5eef6f6
Merge branch 'develop' into develop
leopardracer May 6, 2025
31edd59
Merge branch 'develop' into develop
tabaktoni May 6, 2025
9e97b4b
Merge branch 'linguistics' into develop
tabaktoni May 6, 2025
d6dcc17
Merge branch 'develop' into linguistics
tabaktoni May 6, 2025
e519c83
Merge branch 'linguistics' into develop
tabaktoni May 6, 2025
7ef19ec
Merge pull request #1359 from futreall/develop
tabaktoni May 6, 2025
213bd87
Update CairoUint256.md
vtjl10 Apr 5, 2025
03107b0
Update CairoUint256.md
vtjl10 Apr 5, 2025
e5e7694
Update CairoUint256.md
vtjl10 Apr 5, 2025
c578d71
Merge branch 'linguistics' into develop
tabaktoni May 6, 2025
70b7db2
Merge pull request #1366 from leopardracer/develop
tabaktoni May 6, 2025
7e1cda4
Merge branch 'linguistics' into develop
tabaktoni May 6, 2025
6109488
Merge pull request #1373 from vtjl10/develop
tabaktoni May 6, 2025
fad707c
Merge branch 'develop' into develop
tabaktoni May 6, 2025
c181731
Merge pull request #1354 from reject-i/develop
tabaktoni May 6, 2025
cb91740
Merge branch 'develop' into patch-1
tabaktoni May 6, 2025
0e468d4
Merge branch 'linguistics' into patch-1
tabaktoni May 6, 2025
d3b2540
Merge pull request #1352 from Fallengirl/patch-1
tabaktoni May 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ For major changes that markedly transform the existing API or significantly alte

If you want to contribute but have any questions, concerns or doubts, feel free to ping maintainers. Ideally create a pull request with `WIP` (Work in progress) in its title and ask questions in the pull request description.

You can also ask your query on our dedicated channel for [Starknet.js](https://discord.com/channels/793094838509764618/1270119831559078061) on the [Starknet Discord](https://discord.com/invite/Ft6Xtzdg)
You can also ask your query on our dedicated channel for [Starknet.js](https://discord.com/channels/793094838509764618/1270119831559078061) on the [Starknet Discord](https://discord.com/invite/starknet-community)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ This library would not be possible without these rockstars.

## 📜 License

Copyright (c) 2024 StarkWare
Copyright (c) 2025 StarkWare

Licensed under the [MIT license](https://github.com/starknet-io/starknet.js/blob/main/LICENSE).
2 changes: 1 addition & 1 deletion __tests__/utils/calldata/requestParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ describe('requestParser', () => {
expect(parsedField).toEqual(['1', '27988542884245108']);
});

test('should throw an error for Custon Enum type when there is not active variant', () => {
test('should throw an error for Custom Enum type when there is not active variant', () => {
const args = [new CairoCustomEnum({ test: 'content' })];
const argsIterator = args[Symbol.iterator]();
expect(() =>
Expand Down
4 changes: 2 additions & 2 deletions __tests__/utils/calldata/validate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ describe('validateFields', () => {
expect(result).toBeUndefined();
});

test('should throw an error if tupple validation fails', () => {
test('should throw an error if tuple validation fails', () => {
const error = new Error(`Validate: arg test should be a tuple (defined as object)`);

expect(() =>
Expand Down Expand Up @@ -635,7 +635,7 @@ describe('validateFields', () => {
).toThrow(error);
});

test('should throw an error if value 0 iz provided for any uint type', () => {
test('should throw an error if value 0 is provided for any uint type', () => {
const error = new Error('Validate: value 0 is not authorized in NonZero uint type.');

expect(() =>
Expand Down
2 changes: 1 addition & 1 deletion __tests__/utils/typedData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ describe('typedData', () => {
});

test('should hash messages with revision 1 types', () => {
// necessary to spy dependecy since function spies (hash.computePedersenHash; hash.computePoseidonHash) won't work
// necessary to spy dependency since function spies (hash.computePedersenHash; hash.computePoseidonHash) won't work
const spyPedersen = jest.spyOn(starkCurve, 'pedersen');
const spyPoseidon = jest.spyOn(starkCurve, 'poseidonHashMany');

Expand Down
2 changes: 1 addition & 1 deletion src/provider/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export abstract class ProviderInterface {
* Gets the transaction information from a tx id.
*
* @param transactionHash
* @returns the transaction object \{ transaction_id, status, transaction, block_number?, block_number?, transaction_index?, transaction_failure_reason? \}
* @returns the transaction object \{ transaction_id, status, transaction, block_number?, block_hash?, transaction_index?, transaction_failure_reason? \}
*/
public abstract getTransaction(transactionHash: BigNumberish): Promise<GetTransactionResponse>;

Expand Down
2 changes: 1 addition & 1 deletion src/provider/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class RpcProvider implements ProviderInterface {

/**
* Pause the execution of the script until a specified block is created.
* @param {BlockIdentifier} blockIdentifier bloc number (BigNumberish) or 'pending' or 'latest'.
* @param {BlockIdentifier} blockIdentifier block number (BigNumberish) or 'pending' or 'latest'.
* Use of 'latest" or of a block already created will generate no pause.
* @param {number} [retryInterval] number of milliseconds between 2 requests to the node
* @example
Expand Down
6 changes: 3 additions & 3 deletions src/utils/cairoDataTypes/uint256.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CairoUint256 {
}

/**
* Validate if BigNumberish can be represented as Unit256
* Validate if BigNumberish can be represented as Uint256
*/
static validate(bigNumberish: BigNumberish) {
const bigInt = BigInt(bigNumberish);
Expand All @@ -65,7 +65,7 @@ export class CairoUint256 {
}

/**
* Validate if low and high can be represented as Unit256
* Validate if low and high can be represented as Uint256
*/
static validateProps(low: BigNumberish, high: BigNumberish) {
const bigIntLow = BigInt(low);
Expand All @@ -80,7 +80,7 @@ export class CairoUint256 {
}

/**
* Check if BigNumberish can be represented as Unit256
* Check if BigNumberish can be represented as Uint256
*/
static is(bigNumberish: BigNumberish) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/calldata/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ const validateNonZero = (parameter: any, input: AbiEntry) => {
* };
*
* validateFields(functionAbi, [1n], abiStructs, abiEnums); // Returns void since validation passes
* validateFields(functionAbi, [{}], abiStructs, abiEnums); // Throw an error because paramters are not valid
* validateFields(functionAbi, [{}], abiStructs, abiEnums); // Throw an error because parameters are not valid
*/
export default function validateFields(
abiMethod: FunctionAbi,
Expand Down
2 changes: 1 addition & 1 deletion www/versioned_docs/version-5.24.3/guides/L1message.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ You can exchange messages between L1 & L2 networks:
- L2 Starknet testnet ↔️ L1 Goerli ETH testnet.
- L2 local Starknet devnet ↔️ L1 local ETH testnet (Ganache, ...).

You can find an explanation of the global mechanism [here](https://docs.starknet.io/documentation/architecture_and_concepts/L1-L2_Communication/messaging-mechanism/).
You can find an explanation of the global mechanism [here](https://docs.starknet.io/architecture-and-concepts/network-architecture/messaging-mechanism/).

Most of the code for this messaging process will be written in Cairo, but Starknet.js provides some functionalities for this subject.

Expand Down
2 changes: 1 addition & 1 deletion www/versioned_docs/version-5.24.3/guides/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ For some more extensive examples visit PhilippeR26's <ins>[workshop](https://git

## Contracts used in the guides

You can find the compiled contracts used in these guides in the <ins>[compiled_contracts](https://github.com/starknet-io/starknet.js/tree/develop/www/docs/guides/compiled_contracts)</ins> directory.
You can find the compiled contracts used in these guides in the <ins>[compiled_contracts](https://github.com/starknet-io/starknet.js/tree/develop/www/versioned_docs/version-5.24.3/guides/compiled_contracts)</ins> directory.
6 changes: 3 additions & 3 deletions www/versioned_docs/version-6.11.0/API/classes/CairoUint256.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Initialization from Uint256 object

▸ **validate**(`bigNumberish`): `bigint`

Validate if BigNumberish can be represented as Unit256
Validate if BigNumberish can be represented as Uint256

#### Parameters

Expand All @@ -123,7 +123,7 @@ Validate if BigNumberish can be represented as Unit256

▸ **validateProps**(`low`, `high`): `Object`

Validate if low and high can be represented as Unit256
Validate if low and high can be represented as Uint256

#### Parameters

Expand Down Expand Up @@ -151,7 +151,7 @@ Validate if low and high can be represented as Unit256

▸ **is**(`bigNumberish`): `boolean`

Check if BigNumberish can be represented as Unit256
Check if BigNumberish can be represented as Uint256

#### Parameters

Expand Down
6 changes: 3 additions & 3 deletions www/versioned_docs/version-6.23.1/API/classes/CairoUint256.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Initialization from Uint256 object

▸ **validate**(`bigNumberish`): `bigint`

Validate if BigNumberish can be represented as Unit256
Validate if BigNumberish can be represented as Uint256

#### Parameters

Expand All @@ -123,7 +123,7 @@ Validate if BigNumberish can be represented as Unit256

▸ **validateProps**(`low`, `high`): `Object`

Validate if low and high can be represented as Unit256
Validate if low and high can be represented as Uint256

#### Parameters

Expand Down Expand Up @@ -151,7 +151,7 @@ Validate if low and high can be represented as Unit256

▸ **is**(`bigNumberish`): `boolean`

Check if BigNumberish can be represented as Unit256
Check if BigNumberish can be represented as Uint256

#### Parameters

Expand Down
6 changes: 3 additions & 3 deletions www/versioned_docs/version-6.24.1/API/classes/CairoUint256.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Initialization from Uint256 object

▸ **validate**(`bigNumberish`): `bigint`

Validate if BigNumberish can be represented as Unit256
Validate if BigNumberish can be represented as Uint256

#### Parameters

Expand All @@ -123,7 +123,7 @@ Validate if BigNumberish can be represented as Unit256

▸ **validateProps**(`low`, `high`): `Object`

Validate if low and high can be represented as Unit256
Validate if low and high can be represented as Uint256

#### Parameters

Expand Down Expand Up @@ -151,7 +151,7 @@ Validate if low and high can be represented as Unit256

▸ **is**(`bigNumberish`): `boolean`

Check if BigNumberish can be represented as Unit256
Check if BigNumberish can be represented as Uint256

#### Parameters

Expand Down
Loading