starknet 4.17.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +2 -10
- package/dist/index.d.ts +27 -9
- package/dist/index.global.js +30 -13
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +30 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -1
- package/.babelrc +0 -6
- package/.commitlintrc +0 -22
- package/.eslintignore +0 -2
- package/.eslintrc +0 -28
- package/.prettierrc +0 -6
- package/.releaserc +0 -28
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -52
- package/__mocks__/Account.json +0 -25486
- package/__mocks__/ERC20.json +0 -40027
- package/__mocks__/TestDapp.json +0 -12962
- package/__mocks__/contract.json +0 -33191
- package/__mocks__/l1l2_compiled.json +0 -10107
- package/__mocks__/multicall.json +0 -8139
- package/__mocks__/naming_compiled.json +0 -53283
- package/__mocks__/starknetId_compiled.json +0 -44703
- package/__mocks__/typedDataExample.json +0 -35
- package/__mocks__/typedDataSessionExample.json +0 -42
- package/__mocks__/typedDataStructArrayExample.json +0 -44
- package/__tests__/account.test.ts +0 -345
- package/__tests__/contract.test.ts +0 -249
- package/__tests__/defaultProvider.test.ts +0 -177
- package/__tests__/fixtures.ts +0 -84
- package/__tests__/jest.setup.ts +0 -30
- package/__tests__/rpcProvider.test.ts +0 -132
- package/__tests__/sequencerProvider.test.ts +0 -123
- package/__tests__/utils/__snapshots__/ellipticalCurve.test.ts.snap +0 -5
- package/__tests__/utils/__snapshots__/utils.browser.test.ts.snap +0 -5
- package/__tests__/utils/__snapshots__/utils.test.ts.snap +0 -5
- package/__tests__/utils/address.test.ts +0 -45
- package/__tests__/utils/ellipticalCurve.test.ts +0 -91
- package/__tests__/utils/merkle.test.ts +0 -256
- package/__tests__/utils/shortString.test.ts +0 -22
- package/__tests__/utils/starknetId.test.ts +0 -53
- package/__tests__/utils/transactionHash.test.ts +0 -17
- package/__tests__/utils/typedData.test.ts +0 -223
- package/__tests__/utils/uint256.test.ts +0 -32
- package/__tests__/utils/utils.browser.test.ts +0 -29
- package/__tests__/utils/utils.test.ts +0 -141
- package/img/logo.svg +0 -17
- package/index.d.ts +0 -2683
- package/index.global.js +0 -23192
- package/index.global.js.map +0 -1
- package/index.js +0 -4910
- package/index.js.map +0 -1
- package/index.mjs +0 -4852
- package/index.mjs.map +0 -1
- package/src/account/default.ts +0 -501
- package/src/account/index.ts +0 -2
- package/src/account/interface.ts +0 -309
- package/src/constants.ts +0 -2065
- package/src/contract/contractFactory.ts +0 -88
- package/src/contract/default.ts +0 -425
- package/src/contract/index.ts +0 -3
- package/src/contract/interface.ts +0 -106
- package/src/index.ts +0 -26
- package/src/provider/default.ts +0 -187
- package/src/provider/errors.ts +0 -14
- package/src/provider/index.ts +0 -9
- package/src/provider/interface.ts +0 -281
- package/src/provider/rpc.ts +0 -482
- package/src/provider/sequencer.ts +0 -523
- package/src/provider/utils.ts +0 -100
- package/src/signer/default.ts +0 -99
- package/src/signer/index.ts +0 -2
- package/src/signer/interface.ts +0 -77
- package/src/types/account.ts +0 -43
- package/src/types/api/index.ts +0 -10
- package/src/types/api/openrpc.ts +0 -607
- package/src/types/api/rpc.ts +0 -45
- package/src/types/api/sequencer.ts +0 -369
- package/src/types/contract.ts +0 -5
- package/src/types/index.ts +0 -8
- package/src/types/lib.ts +0 -143
- package/src/types/provider.ts +0 -134
- package/src/types/signer.ts +0 -24
- package/src/utils/address.ts +0 -44
- package/src/utils/calldata.ts +0 -250
- package/src/utils/ellipticCurve.ts +0 -120
- package/src/utils/encode.ts +0 -66
- package/src/utils/events.ts +0 -32
- package/src/utils/fetchPonyfill.ts +0 -5
- package/src/utils/hash.ts +0 -235
- package/src/utils/json.ts +0 -15
- package/src/utils/merkle.ts +0 -69
- package/src/utils/number.ts +0 -98
- package/src/utils/provider.ts +0 -28
- package/src/utils/responseParser/index.ts +0 -28
- package/src/utils/responseParser/rpc.ts +0 -70
- package/src/utils/responseParser/sequencer.ts +0 -135
- package/src/utils/shortString.ts +0 -21
- package/src/utils/stark.ts +0 -57
- package/src/utils/starknetId.ts +0 -116
- package/src/utils/transaction.ts +0 -56
- package/src/utils/typedData/index.ts +0 -247
- package/src/utils/typedData/types.ts +0 -37
- package/src/utils/typedData/utils.ts +0 -16
- package/src/utils/uint256.ts +0 -32
- package/src/utils/url.ts +0 -53
- package/tsconfig.eslint.json +0 -4
- package/tsup.config.ts +0 -9
- package/www/README.md +0 -41
- package/www/babel.config.js +0 -3
- package/www/code-examples/account.js +0 -65
- package/www/code-examples/amm.js +0 -44
- package/www/code-examples/erc20.js +0 -13
- package/www/code-examples/package-lock.json +0 -336
- package/www/code-examples/package.json +0 -15
- package/www/docs/API/_category_.json +0 -5
- package/www/docs/API/account.md +0 -463
- package/www/docs/API/changelog.md +0 -15
- package/www/docs/API/contract.md +0 -135
- package/www/docs/API/contractFactory.md +0 -45
- package/www/docs/API/index.md +0 -3
- package/www/docs/API/provider.md +0 -725
- package/www/docs/API/signer.md +0 -105
- package/www/docs/API/utils.md +0 -374
- package/www/docusaurus.config.js +0 -130
- package/www/guides/account.md +0 -140
- package/www/guides/cra.md +0 -3
- package/www/guides/erc20.md +0 -163
- package/www/guides/intro.md +0 -63
- package/www/package-lock.json +0 -20405
- package/www/package.json +0 -43
- package/www/sidebars.js +0 -31
- package/www/src/components/HomepageFeatures/index.tsx +0 -67
- package/www/src/components/HomepageFeatures/styles.module.css +0 -10
- package/www/src/css/custom.css +0 -39
- package/www/src/pages/index.module.css +0 -23
- package/www/src/pages/index.tsx +0 -40
- package/www/src/pages/markdown-page.md +0 -7
- package/www/static/.nojekyll +0 -0
- package/www/static/img/docusaurus.png +0 -0
- package/www/static/img/favicon.ico +0 -0
- package/www/static/img/logo.svg +0 -17
- package/www/static/img/starknet-1.png +0 -0
- package/www/static/img/starknet-2.png +0 -0
- package/www/static/img/starknet-3.png +0 -0
- package/www/static/img/tutorial/docsVersionDropdown.png +0 -0
- package/www/static/img/tutorial/localeDropdown.png +0 -0
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// Install the latest version of starknet with npm install starknet@next and import starknet
|
|
2
|
-
import * as starknet from 'starknet';
|
|
3
|
-
|
|
4
|
-
// Generate public and private key pair.
|
|
5
|
-
|
|
6
|
-
const keyPair = starknet.ec.genKeyPair();
|
|
7
|
-
const starkKey = starknet.ec.getStarkKey(keyPair);
|
|
8
|
-
const starkKeyInt = starknet.number.toBN(starknet.encode.removeHexPrefix(starkKey), 16);
|
|
9
|
-
|
|
10
|
-
const { address: walletAddressLocal } = await provider.deployContract({
|
|
11
|
-
contract: COMPILED_WALLET_CONTRACT_JSON,
|
|
12
|
-
constructorCallData: [starkKeyInt],
|
|
13
|
-
addressSalt: 0,
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
walletAddress = walletAddressLocal;
|
|
17
|
-
|
|
18
|
-
const { code: codeErc20, address: erc20AddressLocal } = await defaultProvider.deployContract({
|
|
19
|
-
contract: compiledErc20,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const erc20Address = erc20AddressLocal;
|
|
23
|
-
const erc20 = new Contract(compiledErc20.abi, erc20Address);
|
|
24
|
-
|
|
25
|
-
const { code: codeErc20Mint, transaction_hash: txErc20Mint } = await erc20.invoke('mint', {
|
|
26
|
-
recipient: walletAddress,
|
|
27
|
-
amount: '1000',
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const balanceBeforeTransfer = await erc20.call('balance_of', {
|
|
31
|
-
user: walletAddress,
|
|
32
|
-
}).res;
|
|
33
|
-
|
|
34
|
-
console.log(number.toBN(res).toString());
|
|
35
|
-
|
|
36
|
-
const { nonce } = await wallet.call('get_nonce');
|
|
37
|
-
const msgHash = encode.addHexPrefix(
|
|
38
|
-
hash.hashMessage(
|
|
39
|
-
wallet.connectedTo,
|
|
40
|
-
erc20Address,
|
|
41
|
-
stark.getSelectorFromName('transfer'),
|
|
42
|
-
[erc20Address, '10'],
|
|
43
|
-
nonce.toString()
|
|
44
|
-
)
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
const signature = ec.sign(starkKeyPair, msgHash);
|
|
48
|
-
const { code, transaction_hash } = await wallet.invoke(
|
|
49
|
-
'execute',
|
|
50
|
-
{
|
|
51
|
-
to: erc20Address,
|
|
52
|
-
selector: stark.getSelectorFromName('transfer'),
|
|
53
|
-
calldata: [erc20Address, '10'],
|
|
54
|
-
nonce: nonce.toString(),
|
|
55
|
-
},
|
|
56
|
-
signature
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
await defaultProvider.waitForTx(transaction_hash);
|
|
60
|
-
|
|
61
|
-
const balanceAfterTransfer = await erc20.call('balance_of', {
|
|
62
|
-
user: walletAddress,
|
|
63
|
-
}).res;
|
|
64
|
-
|
|
65
|
-
console.log('Balance after transfer', balanceAfterTransfer);
|
package/www/code-examples/amm.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { defaultProvider, stark } from 'starknet';
|
|
2
|
-
const { getSelectorFromName } = stark;
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* !! IMPORTANT NOTE !! When fees are introduced all function invocations will go through the account account contract and this example will be deprecated.
|
|
6
|
-
**/
|
|
7
|
-
|
|
8
|
-
const CONTRACT_ADDRESS = '0x03e19baa6cb2078631bcdb34844f3f7879449a544c9ce722681a54af08cff4b9';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* invokeFunction() example
|
|
12
|
-
**/
|
|
13
|
-
|
|
14
|
-
/** Reset the liquidity pool **/
|
|
15
|
-
const addLiquidityResponse = await defaultProvider.LEGACYinvokeFunction({
|
|
16
|
-
contractAddress: CONTRACT_ADDRESS,
|
|
17
|
-
entrypoint: 'init_pool',
|
|
18
|
-
calldata: ['1000000', '1000000'],
|
|
19
|
-
});
|
|
20
|
-
console.log(addLiquidityResponse);
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* callContract() example
|
|
24
|
-
**/
|
|
25
|
-
|
|
26
|
-
/** Get the balance of the liquidity pool of token A **/
|
|
27
|
-
const poolBalanceTokenA = await defaultProvider.callContract({
|
|
28
|
-
contractAddress: CONTRACT_ADDRESS,
|
|
29
|
-
entrypoint: 'get_pool_token_balance',
|
|
30
|
-
calldata: ['1'], // Account 1 (no account implemented)
|
|
31
|
-
});
|
|
32
|
-
const balanceA = poolBalanceTokenA.result[0];
|
|
33
|
-
console.log('token a liquidity pool balance: ', parseInt(balanceA, 16));
|
|
34
|
-
|
|
35
|
-
/** Get the balance of the liquidity pool of token B **/
|
|
36
|
-
const poolBalanceTokenB = await defaultProvider.callContract({
|
|
37
|
-
contractAddress: CONTRACT_ADDRESS,
|
|
38
|
-
entrypoint: 'get_pool_token_balance',
|
|
39
|
-
calldata: ['2'],
|
|
40
|
-
});
|
|
41
|
-
const balanceB = poolBalanceTokenB.result[0];
|
|
42
|
-
console.log('token b liquidity pool balance: ', parseInt(balanceB, 16));
|
|
43
|
-
|
|
44
|
-
/** Make a swap */
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as starknet from 'starknet';
|
|
2
|
-
|
|
3
|
-
const keyPair = starknet.ec.genKeyPair();
|
|
4
|
-
const starkKey = starknet.ec.getStarkKey(keyPair);
|
|
5
|
-
const starkKeyInt = starknet.number.toBN(starknet.encode.removeHexPrefix(starkKey), 16);
|
|
6
|
-
|
|
7
|
-
const deployWalletTx = await provider.deployContract({
|
|
8
|
-
contract: COMPILED_WALLET_CONTRACT_JSON,
|
|
9
|
-
constructorCallData: [starkKeyInt],
|
|
10
|
-
addressSalt: 0,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
await defaultProvider.waitForTx(deployWalletTx.transaction_hash);
|
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "code-examples",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"lockfileVersion": 2,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"packages": {
|
|
7
|
-
"": {
|
|
8
|
-
"name": "code-examples",
|
|
9
|
-
"version": "1.0.0",
|
|
10
|
-
"license": "ISC",
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"starknet": "^3.3.0"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"node_modules/@noble/hashes": {
|
|
16
|
-
"version": "0.5.9",
|
|
17
|
-
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-0.5.9.tgz",
|
|
18
|
-
"integrity": "sha512-7lN1Qh6d8DUGmfN36XRsbN/WcGIPNtTGhkw26vWId/DlCIGsYJJootTtPGghTLcn/AaXPx2Q0b3cacrwXa7OVw=="
|
|
19
|
-
},
|
|
20
|
-
"node_modules/@noble/secp256k1": {
|
|
21
|
-
"version": "1.5.5",
|
|
22
|
-
"resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.5.5.tgz",
|
|
23
|
-
"integrity": "sha512-sZ1W6gQzYnu45wPrWx8D3kwI2/U29VYTx9OjbDAd7jwRItJ0cSTMPRL/C8AWZFn9kWFLQGqEXVEE86w4Z8LpIQ==",
|
|
24
|
-
"funding": [
|
|
25
|
-
{
|
|
26
|
-
"type": "individual",
|
|
27
|
-
"url": "https://paulmillr.com/funding/"
|
|
28
|
-
}
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"node_modules/axios": {
|
|
32
|
-
"version": "0.23.0",
|
|
33
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-0.23.0.tgz",
|
|
34
|
-
"integrity": "sha512-NmvAE4i0YAv5cKq8zlDoPd1VLKAqX5oLuZKs8xkJa4qi6RGn0uhCYFjWtHHC9EM/MwOwYWOs53W+V0aqEXq1sg==",
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"follow-redirects": "^1.14.4"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"node_modules/bignumber.js": {
|
|
40
|
-
"version": "9.0.2",
|
|
41
|
-
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz",
|
|
42
|
-
"integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==",
|
|
43
|
-
"engines": {
|
|
44
|
-
"node": "*"
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
"node_modules/bn.js": {
|
|
48
|
-
"version": "5.2.0",
|
|
49
|
-
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
|
|
50
|
-
"integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
|
|
51
|
-
},
|
|
52
|
-
"node_modules/brorand": {
|
|
53
|
-
"version": "1.1.0",
|
|
54
|
-
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
|
55
|
-
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
|
|
56
|
-
},
|
|
57
|
-
"node_modules/elliptic": {
|
|
58
|
-
"version": "6.5.4",
|
|
59
|
-
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
|
60
|
-
"integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
|
|
61
|
-
"dependencies": {
|
|
62
|
-
"bn.js": "^4.11.9",
|
|
63
|
-
"brorand": "^1.1.0",
|
|
64
|
-
"hash.js": "^1.0.0",
|
|
65
|
-
"hmac-drbg": "^1.0.1",
|
|
66
|
-
"inherits": "^2.0.4",
|
|
67
|
-
"minimalistic-assert": "^1.0.1",
|
|
68
|
-
"minimalistic-crypto-utils": "^1.0.1"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
"node_modules/elliptic/node_modules/bn.js": {
|
|
72
|
-
"version": "4.12.0",
|
|
73
|
-
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
|
|
74
|
-
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
|
|
75
|
-
},
|
|
76
|
-
"node_modules/ethereum-cryptography": {
|
|
77
|
-
"version": "0.2.5",
|
|
78
|
-
"resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.2.5.tgz",
|
|
79
|
-
"integrity": "sha512-aWvqiegXgSTwbuDE1DDnM7taLteLcHVHh5nMZnnD2dwlvH6w5bOxcdXW20oS+1aLDorDlrK1c82stB8jsLDN5Q==",
|
|
80
|
-
"dependencies": {
|
|
81
|
-
"@noble/hashes": "^0.5.7",
|
|
82
|
-
"@noble/secp256k1": "^1.4.0",
|
|
83
|
-
"micro-base": "^0.10.1"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
"node_modules/follow-redirects": {
|
|
87
|
-
"version": "1.14.9",
|
|
88
|
-
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
|
|
89
|
-
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
|
|
90
|
-
"funding": [
|
|
91
|
-
{
|
|
92
|
-
"type": "individual",
|
|
93
|
-
"url": "https://github.com/sponsors/RubenVerborgh"
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"engines": {
|
|
97
|
-
"node": ">=4.0"
|
|
98
|
-
},
|
|
99
|
-
"peerDependenciesMeta": {
|
|
100
|
-
"debug": {
|
|
101
|
-
"optional": true
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
"node_modules/hash.js": {
|
|
106
|
-
"version": "1.1.7",
|
|
107
|
-
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
|
|
108
|
-
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
|
|
109
|
-
"dependencies": {
|
|
110
|
-
"inherits": "^2.0.3",
|
|
111
|
-
"minimalistic-assert": "^1.0.1"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
"node_modules/hmac-drbg": {
|
|
115
|
-
"version": "1.0.1",
|
|
116
|
-
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
|
117
|
-
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
|
|
118
|
-
"dependencies": {
|
|
119
|
-
"hash.js": "^1.0.3",
|
|
120
|
-
"minimalistic-assert": "^1.0.0",
|
|
121
|
-
"minimalistic-crypto-utils": "^1.0.1"
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"node_modules/inherits": {
|
|
125
|
-
"version": "2.0.4",
|
|
126
|
-
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
|
127
|
-
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
|
128
|
-
},
|
|
129
|
-
"node_modules/json-bigint": {
|
|
130
|
-
"version": "1.0.0",
|
|
131
|
-
"resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
|
|
132
|
-
"integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
|
|
133
|
-
"dependencies": {
|
|
134
|
-
"bignumber.js": "^9.0.0"
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
"node_modules/micro-base": {
|
|
138
|
-
"version": "0.10.2",
|
|
139
|
-
"resolved": "https://registry.npmjs.org/micro-base/-/micro-base-0.10.2.tgz",
|
|
140
|
-
"integrity": "sha512-lqqJrT7lfJtDmmiQ4zRLZuIJBk96t0RAc5pCrrWpL9zDeH5i/SUL85mku9HqzTI/OCZ8EQ3aicbMW+eK5Nyu5w==",
|
|
141
|
-
"deprecated": "Switch to @scure/base for audited version of the lib & updates"
|
|
142
|
-
},
|
|
143
|
-
"node_modules/minimalistic-assert": {
|
|
144
|
-
"version": "1.0.1",
|
|
145
|
-
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
|
146
|
-
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
|
|
147
|
-
},
|
|
148
|
-
"node_modules/minimalistic-crypto-utils": {
|
|
149
|
-
"version": "1.0.1",
|
|
150
|
-
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
|
151
|
-
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
|
|
152
|
-
},
|
|
153
|
-
"node_modules/pako": {
|
|
154
|
-
"version": "2.0.4",
|
|
155
|
-
"resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz",
|
|
156
|
-
"integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg=="
|
|
157
|
-
},
|
|
158
|
-
"node_modules/starknet": {
|
|
159
|
-
"version": "3.3.0",
|
|
160
|
-
"resolved": "https://registry.npmjs.org/starknet/-/starknet-3.3.0.tgz",
|
|
161
|
-
"integrity": "sha512-PsdrnD1dNIbMAePRU3yeDsY1d9m7CaZI6VYKxpgZX+tlb45Zntz4F98bMFo/vvoLCfuubkLmHbNZfc76bcgcRQ==",
|
|
162
|
-
"dependencies": {
|
|
163
|
-
"axios": "^0.23.0",
|
|
164
|
-
"bn.js": "^5.2.0",
|
|
165
|
-
"elliptic": "^6.5.4",
|
|
166
|
-
"ethereum-cryptography": "^0.2.0",
|
|
167
|
-
"hash.js": "^1.1.7",
|
|
168
|
-
"json-bigint": "^1.0.0",
|
|
169
|
-
"minimalistic-assert": "^1.0.1",
|
|
170
|
-
"pako": "^2.0.4",
|
|
171
|
-
"superstruct": "^0.15.3",
|
|
172
|
-
"url-join": "^4.0.1"
|
|
173
|
-
}
|
|
174
|
-
},
|
|
175
|
-
"node_modules/superstruct": {
|
|
176
|
-
"version": "0.15.4",
|
|
177
|
-
"resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.4.tgz",
|
|
178
|
-
"integrity": "sha512-eOoMeSbP9ZJChNOm/9RYjE+F36rYR966AAqeG3xhQB02j2sfAUXDp4EQ/7bAOqnlJnuFDB8yvOu50SocvKpUEw=="
|
|
179
|
-
},
|
|
180
|
-
"node_modules/url-join": {
|
|
181
|
-
"version": "4.0.1",
|
|
182
|
-
"resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
|
|
183
|
-
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
"dependencies": {
|
|
187
|
-
"@noble/hashes": {
|
|
188
|
-
"version": "0.5.9",
|
|
189
|
-
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-0.5.9.tgz",
|
|
190
|
-
"integrity": "sha512-7lN1Qh6d8DUGmfN36XRsbN/WcGIPNtTGhkw26vWId/DlCIGsYJJootTtPGghTLcn/AaXPx2Q0b3cacrwXa7OVw=="
|
|
191
|
-
},
|
|
192
|
-
"@noble/secp256k1": {
|
|
193
|
-
"version": "1.5.5",
|
|
194
|
-
"resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.5.5.tgz",
|
|
195
|
-
"integrity": "sha512-sZ1W6gQzYnu45wPrWx8D3kwI2/U29VYTx9OjbDAd7jwRItJ0cSTMPRL/C8AWZFn9kWFLQGqEXVEE86w4Z8LpIQ=="
|
|
196
|
-
},
|
|
197
|
-
"axios": {
|
|
198
|
-
"version": "0.23.0",
|
|
199
|
-
"resolved": "https://registry.npmjs.org/axios/-/axios-0.23.0.tgz",
|
|
200
|
-
"integrity": "sha512-NmvAE4i0YAv5cKq8zlDoPd1VLKAqX5oLuZKs8xkJa4qi6RGn0uhCYFjWtHHC9EM/MwOwYWOs53W+V0aqEXq1sg==",
|
|
201
|
-
"requires": {
|
|
202
|
-
"follow-redirects": "^1.14.4"
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
"bignumber.js": {
|
|
206
|
-
"version": "9.0.2",
|
|
207
|
-
"resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz",
|
|
208
|
-
"integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw=="
|
|
209
|
-
},
|
|
210
|
-
"bn.js": {
|
|
211
|
-
"version": "5.2.0",
|
|
212
|
-
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
|
|
213
|
-
"integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw=="
|
|
214
|
-
},
|
|
215
|
-
"brorand": {
|
|
216
|
-
"version": "1.1.0",
|
|
217
|
-
"resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
|
|
218
|
-
"integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8="
|
|
219
|
-
},
|
|
220
|
-
"elliptic": {
|
|
221
|
-
"version": "6.5.4",
|
|
222
|
-
"resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
|
|
223
|
-
"integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
|
|
224
|
-
"requires": {
|
|
225
|
-
"bn.js": "^4.11.9",
|
|
226
|
-
"brorand": "^1.1.0",
|
|
227
|
-
"hash.js": "^1.0.0",
|
|
228
|
-
"hmac-drbg": "^1.0.1",
|
|
229
|
-
"inherits": "^2.0.4",
|
|
230
|
-
"minimalistic-assert": "^1.0.1",
|
|
231
|
-
"minimalistic-crypto-utils": "^1.0.1"
|
|
232
|
-
},
|
|
233
|
-
"dependencies": {
|
|
234
|
-
"bn.js": {
|
|
235
|
-
"version": "4.12.0",
|
|
236
|
-
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
|
|
237
|
-
"integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA=="
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
"ethereum-cryptography": {
|
|
242
|
-
"version": "0.2.5",
|
|
243
|
-
"resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.2.5.tgz",
|
|
244
|
-
"integrity": "sha512-aWvqiegXgSTwbuDE1DDnM7taLteLcHVHh5nMZnnD2dwlvH6w5bOxcdXW20oS+1aLDorDlrK1c82stB8jsLDN5Q==",
|
|
245
|
-
"requires": {
|
|
246
|
-
"@noble/hashes": "^0.5.7",
|
|
247
|
-
"@noble/secp256k1": "^1.4.0",
|
|
248
|
-
"micro-base": "^0.10.1"
|
|
249
|
-
}
|
|
250
|
-
},
|
|
251
|
-
"follow-redirects": {
|
|
252
|
-
"version": "1.14.9",
|
|
253
|
-
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
|
|
254
|
-
"integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w=="
|
|
255
|
-
},
|
|
256
|
-
"hash.js": {
|
|
257
|
-
"version": "1.1.7",
|
|
258
|
-
"resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
|
|
259
|
-
"integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
|
|
260
|
-
"requires": {
|
|
261
|
-
"inherits": "^2.0.3",
|
|
262
|
-
"minimalistic-assert": "^1.0.1"
|
|
263
|
-
}
|
|
264
|
-
},
|
|
265
|
-
"hmac-drbg": {
|
|
266
|
-
"version": "1.0.1",
|
|
267
|
-
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
|
268
|
-
"integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
|
|
269
|
-
"requires": {
|
|
270
|
-
"hash.js": "^1.0.3",
|
|
271
|
-
"minimalistic-assert": "^1.0.0",
|
|
272
|
-
"minimalistic-crypto-utils": "^1.0.1"
|
|
273
|
-
}
|
|
274
|
-
},
|
|
275
|
-
"inherits": {
|
|
276
|
-
"version": "2.0.4",
|
|
277
|
-
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
|
278
|
-
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
|
279
|
-
},
|
|
280
|
-
"json-bigint": {
|
|
281
|
-
"version": "1.0.0",
|
|
282
|
-
"resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz",
|
|
283
|
-
"integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==",
|
|
284
|
-
"requires": {
|
|
285
|
-
"bignumber.js": "^9.0.0"
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"micro-base": {
|
|
289
|
-
"version": "0.10.2",
|
|
290
|
-
"resolved": "https://registry.npmjs.org/micro-base/-/micro-base-0.10.2.tgz",
|
|
291
|
-
"integrity": "sha512-lqqJrT7lfJtDmmiQ4zRLZuIJBk96t0RAc5pCrrWpL9zDeH5i/SUL85mku9HqzTI/OCZ8EQ3aicbMW+eK5Nyu5w=="
|
|
292
|
-
},
|
|
293
|
-
"minimalistic-assert": {
|
|
294
|
-
"version": "1.0.1",
|
|
295
|
-
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
|
296
|
-
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
|
|
297
|
-
},
|
|
298
|
-
"minimalistic-crypto-utils": {
|
|
299
|
-
"version": "1.0.1",
|
|
300
|
-
"resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
|
|
301
|
-
"integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo="
|
|
302
|
-
},
|
|
303
|
-
"pako": {
|
|
304
|
-
"version": "2.0.4",
|
|
305
|
-
"resolved": "https://registry.npmjs.org/pako/-/pako-2.0.4.tgz",
|
|
306
|
-
"integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg=="
|
|
307
|
-
},
|
|
308
|
-
"starknet": {
|
|
309
|
-
"version": "3.3.0",
|
|
310
|
-
"resolved": "https://registry.npmjs.org/starknet/-/starknet-3.3.0.tgz",
|
|
311
|
-
"integrity": "sha512-PsdrnD1dNIbMAePRU3yeDsY1d9m7CaZI6VYKxpgZX+tlb45Zntz4F98bMFo/vvoLCfuubkLmHbNZfc76bcgcRQ==",
|
|
312
|
-
"requires": {
|
|
313
|
-
"axios": "^0.23.0",
|
|
314
|
-
"bn.js": "^5.2.0",
|
|
315
|
-
"elliptic": "^6.5.4",
|
|
316
|
-
"ethereum-cryptography": "^0.2.0",
|
|
317
|
-
"hash.js": "^1.1.7",
|
|
318
|
-
"json-bigint": "^1.0.0",
|
|
319
|
-
"minimalistic-assert": "^1.0.1",
|
|
320
|
-
"pako": "^2.0.4",
|
|
321
|
-
"superstruct": "^0.15.3",
|
|
322
|
-
"url-join": "^4.0.1"
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
"superstruct": {
|
|
326
|
-
"version": "0.15.4",
|
|
327
|
-
"resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.15.4.tgz",
|
|
328
|
-
"integrity": "sha512-eOoMeSbP9ZJChNOm/9RYjE+F36rYR966AAqeG3xhQB02j2sfAUXDp4EQ/7bAOqnlJnuFDB8yvOu50SocvKpUEw=="
|
|
329
|
-
},
|
|
330
|
-
"url-join": {
|
|
331
|
-
"version": "4.0.1",
|
|
332
|
-
"resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz",
|
|
333
|
-
"integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA=="
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "code-examples",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [],
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "ISC",
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"starknet": "^3.3.0"
|
|
14
|
-
}
|
|
15
|
-
}
|