
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
azero-wallet-adapter
Advanced tools
azero-wallet-adapterpnpm add azero-wallet-adapter
Follow the integration guide below for method usage and parameter handling.
(Note: For all methods, params is the data required by each method. It has
different types depending on the function being called.)
The getAccount method doesn't need any parameters.
import { getAccount, isSuccess } from 'azero-wallet-adapter';
const result: Result<GetAccountResult> = await getAccount();
if (isSuccess(result)) {
console.log(result.data); // {address: "account address"}
} else {
console.error(result.error);
}
This method requires the SignAndSendTransactionRequestParams type for its
params. The response type is Result<SignAndSendExtrinsicTransactionResult>.
The payload includes the transaction (hex string) and payload (
SignerPayloadJSON type).
import {
signAndSendExtrinsicTransactionPayload,
SignAndSendTransactionRequestParams,
isSuccess
} from 'azero-wallet-adapter';
mport
const txParams: SignAndSendTransactionRequestParams = {transaction: /*...*/, payload: /*...*/}
signAndSendExtrinsicTransactionPayload(txParams).then(result => {
if (isSuccess(result)) {
// handle result transaction
} else {
// handle error
}
});
Like the previous method, but only signs the payload without sending it. This
works with the SignSignerPayloadRequestParams.
import {
signSignerPayload,
SignSignerPayloadRequestParams,
isSuccess
} from 'azero-wallet-adapter';
const signParams: SignSignerPayloadRequestParams = {payload: /*...*/};
signSignerPayload(signParams).then(result => {
if (isSuccess(result)) {
// handle result transaction
} else {
// handle error
}
});
This function requires the TransferNativeAssetRequestParams type for its
parameters.
import {
transferNativeAsset,
TransferNativeAssetRequestParams,
isSuccess
} from 'azero-wallet-adapter';
const transferParams: TransferNativeAssetRequestParams = {
recipient: /*...*/,
amount: /*...*/
};
transferNativeAsset(transferParams).then(result => {
if (isSuccess(result)) {
// handle result transaction
} else {
// handle error
}
});
To set the RPC URL, you can use the setRpcUrl with SetRpcUrlRequestParams as
its parameters.
import {
setRpcUrl,
SetRpcUrlRequestParams,
isSuccess,
} from 'azero-wallet-adapter';
const rpcParams: SetRpcUrlRequestParams = { rpcUrl: 'http://my-rpc-url' };
setRpcUrl(rpcParams).then((result) => {
if (isSuccess(result)) {
// execute callback after RPC URL is set
} else {
// handle error
}
});
This project is licensed under the GPL-3.0 License.
FAQs
Access Aleph Zero Wallet snap through a typed API
The npm package azero-wallet-adapter receives a total of 41 weekly downloads. As such, azero-wallet-adapter popularity was classified as not popular.
We found that azero-wallet-adapter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.