
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@authereum/starkware-provider
Advanced tools
Starkware Provider Library
import StarkwareWallet from '@authereum/starkware-wallet'
import StarkwareProvider from '@authereum/starkware-provider'
import * as ethers from 'ethers'
const rpcProvider = new ethers.providers.JsonRpcProvider(
'https://ropsten.rpc.authereum.com'
)
const starkExAddress = '0x5FedCE831BD3Bdb71F938EC26f984c84f40dB477'
const mnemonic =
'puzzle number lab sense puzzle escape glove faith strike poem acoustic picture grit struggle know tuna soul indoor thumb dune fit job timber motor'
const starkWallet = new StarkwareWallet(mnemonic, rpcProvider)
const privateKey =
'0xb0057716d5917badaf911b193b12b910811c1497b5bada8d7711f758981c3773'
const signerWallet = new ethers.Wallet(privateKey, rpcProvider)
const starkProvider = new StarkwareProvider(
starkWallet,
signerWallet,
starkExAddress
)
const layer = 'starkex'
const application = 'starkexdvf'
const index = '0'
const starkKey = await starkProvider.account(layer, application, index)
console.log(starkKey) // '0x017e159e246999ee9ce7d1103d5d0d52c468bcb385d202ef362de2f878162c48'
Enable account:
const accounts = await starkProvider.enable(layer, application, index)
Get stark key:
const starkKey = await starkProvider.account(layer, application, index)
Deposit ETH:
const txHash = await starkProvider.depositEth({
amount,
quantum,
vaultId,
})
Deposit ERC20:
const txHash = await starkProvider.depositErc20({
amount,
quantum,
tokenAddress,
vaultId,
})
Deposit ERC721:
const txHash = await starkProvider.depositErc721({
tokenId,
tokenAddress,
vaultId,
})
Withdraw ETH:
const txHash = await starkProvider.withdrawEth({
quantum,
recipient,
})
Withdraw ERC20:
const txHash = await starkProvider.withdrawErc20({
tokenAddress,
quantum,
recipient,
})
Withdraw ERC721:
const txHash = await starkProvider.withdrawErc721({
tokenAddress,
tokenId,
recipient,
})
Transfer ETH:
const starkSignature = await starkProvider.transferEth({
vaultId,
to,
quantum,
amount,
nonce,
expirationTimestamp,
condition
}
Transfer ERC20:
const starkSignature = await starkProvider.transferErc20({
vaultId,
to,
tokenAddress,
quantum,
amount,
nonce,
expirationTimestamp,
condition
}
Transfer ERC721:
const starkSignature = await starkProvider.transferErc721({
vaultId,
to,
tokenAddress,
tokenId,
nonce,
expirationTimestamp,
condition
}
Create limit order:
const starkSignature = await starkProvider.createOrder({
sell: {
vaultId,
amount,
data: {
quantum
}
},
buy: {
vaultId,
amount,
data: {
quantum
}
},
nonce,
expirationTimestamp
}
Send transaction:
const txHash = await starkProvider.sendTransaction(tx)
Making RPC calls:
const response = await starkProvider.send('stark_deposit', {
asset: {
type: 'ETH',
data: {
quantum,
},
},
amount,
vaultId,
})
FAQs
Starkware Provider Library
We found that @authereum/starkware-provider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.