Namespace: starknetId
Variables
StarknetIdContract
• Const StarknetIdContract: Object
Type declaration
| Name | Type |
|---|---|
MAINNET | "0x6ac597f8116f886fa1c97a23fa4e08299975ecaf6b598873ca6792b9bbfb678" |
TESTNET_SEPOLIA | "0x154bc2e1af9260b9e66af0e9c46fc757ff893b3ff6a85718a810baf1474" |
Defined in
StarknetIdIdentityContract
• Const StarknetIdIdentityContract: Object
Type declaration
| Name | Type |
|---|---|
MAINNET | "0x05dbdedc203e92749e2e746e2d40a768d966bd243df04a6b712e222bc040a9af" |
TESTNET_SEPOLIA | "0x3697660a0981d734780731949ecb2b4a38d6a58fc41629ed611e8defda" |
Defined in
StarknetIdMulticallContract
• Const StarknetIdMulticallContract: "0x034ffb8f4452df7a613a0210824d6414dbadcddce6c6e19bf4ddc9e22ce5f970"
Defined in
StarknetIdVerifierContract
• Const StarknetIdVerifierContract: Object
Type declaration
| Name | Type |
|---|---|
MAINNET | "0x07d14dfd8ee95b41fce179170d88ba1f0d5a512e13aeb232f19cfeec0a88f8bf" |
TESTNET_SEPOLIA | "0x60B94fEDe525f815AE5E8377A463e121C787cCCf3a36358Aa9B18c12c4D566" |
Defined in
StarknetIdPfpContract
• Const StarknetIdPfpContract: Object
Type declaration
| Name | Type |
|---|---|
MAINNET | "0x070aaa20ec4a46da57c932d9fd89ca5e6bb9ca3188d3df361a32306aff7d59c7" |
TESTNET_SEPOLIA | "0x9e7bdb8dabd02ea8cfc23b1d1c5278e46490f193f87516ed5ff2dfec02" |
Defined in
StarknetIdPopContract
• Const StarknetIdPopContract: Object
Type declaration
| Name | Type |
|---|---|
MAINNET | "0x0293eb2ba9862f762bd3036586d5755a782bd22e6f5028320f1d0405fd47bff4" |
TESTNET_SEPOLIA | "0x15ae88ae054caa74090b89025c1595683f12edf7a4ed2ad0274de3e1d4a" |
Defined in
Functions
useDecoded
▸ useDecoded(encoded): string
Decodes an array of BigInts into a string using the given algorithm.
Parameters
| Name | Type | Description |
|---|---|---|
encoded | bigint[] | The encoded array of BigInts. |
Returns
string
The decoded string.
Example
const result = starknetId.useDecoded([3015206943634620n]);
// result = "starknetjs.stark"
Defined in
useEncoded
▸ useEncoded(decoded): bigint
Encodes a string into a bigint value.
Parameters
| Name | Type | Description |
|---|---|---|
decoded | string | The string to be encoded. |
Returns
bigint
The encoded bigint value.
Example
const result = starknetId.useEncoded('starknet.js');
// result = 3015206943634620n
Defined in
getStarknetIdContract
▸ getStarknetIdContract(chainId): string
Returns the Starknet ID contract address based on the provided chain ID.
Parameters
| Name | Type | Description |
|---|---|---|
chainId | "0x534e5f4d41494e" | "0x534e5f5345504f4c4941" | The chain ID of the Starknet network. |
Returns
string
The Starknet ID contract address.
Throws
Throws an error if the Starknet ID contract is not deployed on the network.
Example
const result = starknetId.getStarknetIdContract(constants.StarknetChainId.SN_SEPOLIA);
// result = "0x154bc2e1af9260b9e66af0e9c46fc757ff893b3ff6a85718a810baf1474"
Defined in
getStarknetIdIdentityContract
▸ getStarknetIdIdentityContract(chainId): string
Returns the Starknet ID identity contract address for the given chain ID.
Parameters
| Name | Type | Description |
|---|---|---|
chainId | "0x534e5f4d41494e" | "0x534e5f5345504f4c4941" | The chain ID for the specified network. |
Returns
string
The Starknet ID identity contract address for the specified network.
Throws
If the Starknet ID verifier contract is not deployed on the network.
Example
const result = starknetId.getStarknetIdIdentityContract(constants.StarknetChainId.SN_SEPOLIA);
// result = "0x3697660a0981d734780731949ecb2b4a38d6a58fc41629ed611e8defda"
Defined in
getStarknetIdMulticallContract
▸ getStarknetIdMulticallContract(chainId): string
Returns the Starknet.id multicall contract address based on the provided chainId.
Parameters
| Name | Type | Description |
|---|---|---|
chainId | "0x534e5f4d41494e" | "0x534e5f5345504f4c4941" | The chainId of the network. |
Returns
string
- The address of the Starknet.id multicall contract.
Throws
- If the Starknet.id multicall contract is not deployed on the network.
Example
const result = starknetId.getStarknetIdMulticallContract(constants.StarknetChainId.SN_SEPOLIA);
// result = "0x034ffb8f4452df7a613a0210824d6414dbadcddce6c6e19bf4ddc9e22ce5f970"