Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@blocto/aptos-wallet-adapter-plugin

Package Overview
Dependencies
Maintainers
5
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blocto/aptos-wallet-adapter-plugin - npm Package Compare versions

Comparing version 0.0.7 to 0.1.0

1

dist/index.d.ts

@@ -18,2 +18,3 @@ import { AptosProviderInterface } from '@blocto/sdk';

readonly icon = "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PHBhdGggZD0ibTE5LjQ4MzggMTUuMjQ5Yy4yNzY5IDAgLjUwNDguMjA5OS41MzI1LjQ3ODhsLjAwMjIuMDQyOS0uMDA0My4xMTQyYy0uMzM1IDMuOTgzMy0zLjc5MDQgNy4xMTUxLTguMDAzNyA3LjExNTEtNC4xNzA2IDAtNy41OTg2My0zLjA2ODctNy45OTI2OS02Ljk5NDZsLS4wMTYzOC0uMTgxMS0uMDAxMDYtLjA1MzIuMDAxNzgtLjAzOThjLjAyNTk4LS4yNzA2LjI1NDg3LS40ODIzLjUzMjg5LS40ODIzeiIgZmlsbD0iI2FmZDhmNyIvPjxwYXRoIGQ9Im00LjMwMDA5IDFjMy43ODc1NSAwIDYuODI1ODEgMi45MDkxMSA2LjgyNTgxIDYuNTAyNzd2Ni4zNTM0M2MtLjAwMDQuMjkxNy0uMjM5Mi41Mjg0LS41MzQuNTI4OGwtNi4wNTc1OC4wMDMyYy0uMjk1MTEuMDAwNy0uNTM0MzItLjIzNjEtLjUzNDMyLS41Mjc4bC4wMDAzNi0xMi41NjM3NWMwLS4xNTE0OS4xMTQyNi0uMjc2MjIuMjYxOTktLjI5NDE4eiIgZmlsbD0iIzE4MmE3MSIvPjxwYXRoIGQ9Im0xOS42OTIxIDEyLjIzODMuMDM4OC4xMjgzLS4wMjg4LS4wODQ2Yy4xNjE2LjQ1MzQuMjY2Ni43NzY5LjMxNTMgMS4zNDEzLjAzMzUuMzg3OS0uMjU3LjcyODktLjY0ODUuNzYybC0uMDMwMy4wMDIyLTMuMDgwOS4wMDA3Yy0yLjEwNjMgMC0zLjgyMDQtMS40NzQxLTMuODc1Mi0zLjU0MjNsLS4wMDE0LS4xMDIxdi0zLjQ2NThjMC0uMjAxNTMuMTY5NC0uMzY5NTkuMzc0MS0uMzYwMDcgMy4zMDAzLjE1NDY2IDUuOTk3OCAyLjM0MTUxIDYuOTM2OSA1LjMyMDM3eiIgZmlsbD0iIzM0ODVjNCIvPjwvZz48L3N2Zz4=";
readonly providerName = "bloctoAptos";
provider: AptosProviderInterface | undefined;

@@ -20,0 +21,0 @@ readyState?: WalletReadyState;

@@ -49,2 +49,3 @@ "use strict";

this.icon = "data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGwtcnVsZT0iZXZlbm9kZCI+PHBhdGggZD0ibTE5LjQ4MzggMTUuMjQ5Yy4yNzY5IDAgLjUwNDguMjA5OS41MzI1LjQ3ODhsLjAwMjIuMDQyOS0uMDA0My4xMTQyYy0uMzM1IDMuOTgzMy0zLjc5MDQgNy4xMTUxLTguMDAzNyA3LjExNTEtNC4xNzA2IDAtNy41OTg2My0zLjA2ODctNy45OTI2OS02Ljk5NDZsLS4wMTYzOC0uMTgxMS0uMDAxMDYtLjA1MzIuMDAxNzgtLjAzOThjLjAyNTk4LS4yNzA2LjI1NDg3LS40ODIzLjUzMjg5LS40ODIzeiIgZmlsbD0iI2FmZDhmNyIvPjxwYXRoIGQ9Im00LjMwMDA5IDFjMy43ODc1NSAwIDYuODI1ODEgMi45MDkxMSA2LjgyNTgxIDYuNTAyNzd2Ni4zNTM0M2MtLjAwMDQuMjkxNy0uMjM5Mi41Mjg0LS41MzQuNTI4OGwtNi4wNTc1OC4wMDMyYy0uMjk1MTEuMDAwNy0uNTM0MzItLjIzNjEtLjUzNDMyLS41Mjc4bC4wMDAzNi0xMi41NjM3NWMwLS4xNTE0OS4xMTQyNi0uMjc2MjIuMjYxOTktLjI5NDE4eiIgZmlsbD0iIzE4MmE3MSIvPjxwYXRoIGQ9Im0xOS42OTIxIDEyLjIzODMuMDM4OC4xMjgzLS4wMjg4LS4wODQ2Yy4xNjE2LjQ1MzQuMjY2Ni43NzY5LjMxNTMgMS4zNDEzLjAzMzUuMzg3OS0uMjU3LjcyODktLjY0ODUuNzYybC0uMDMwMy4wMDIyLTMuMDgwOS4wMDA3Yy0yLjEwNjMgMC0zLjgyMDQtMS40NzQxLTMuODc1Mi0zLjU0MjNsLS4wMDE0LS4xMDIxdi0zLjQ2NThjMC0uMjAxNTMuMTY5NC0uMzY5NTkuMzc0MS0uMzYwMDcgMy4zMDAzLjE1NDY2IDUuOTk3OCAyLjM0MTUxIDYuOTM2OSA1LjMyMDM3eiIgZmlsbD0iIzM0ODVjNCIvPjwvZz48L3N2Zz4=";
this.providerName = "bloctoAptos";
this.provider = typeof window !== "undefined" ? window.bloctoAptos : void 0;

@@ -51,0 +52,0 @@ this.readyState = import_wallet_adapter_core.WalletReadyState.Loadable;

6

package.json
{
"name": "@blocto/aptos-wallet-adapter-plugin",
"version": "0.0.7",
"version": "0.1.0",
"description": "Blocto Wallet plugin to use with Aptos Wallet Adapter",

@@ -20,4 +20,4 @@ "author": "Blcoto Wallet",

"dependencies": {
"@aptos-labs/wallet-adapter-core": "0.2.0",
"@blocto/sdk": "^0.3.3",
"@aptos-labs/wallet-adapter-core": "^0.2.2",
"@blocto/sdk": "^0.3.4",
"aptos": "^1.4.0"

@@ -24,0 +24,0 @@ },

@@ -1,45 +0,17 @@

# Aptos wallet plugin template for wallet builders to interact with the Aptos Wallet Adapter
# Blocto Plugin for Aptos Wallet Adapter
This repo provides wallet builders a pre-made class with all required wallet functionality following the [wallet standard](https://aptos.dev/guides/wallet-standard) for easy and fast development to interact with the [Aptos Wallet Adapter](https://github.com/aptos-labs/aptos-wallet-adapter)
A Blocto wallet plugin to be used with [Aptos Wallet Adapter](https://github.com/aptos-labs/aptos-wallet-adapter).
---
## Usage
### Usage
```shell
yarn add @blocto/aptos-wallet-adapter-plugin
```
- `fork` this repo
- run `npm install` or `yarn install`
- Open `src/index.ts`
- Change all `AptosWindow` appereances to `<Your-Wallet-Name>Window`
- Change `AptosWalletName` to be `<Your-Wallet-Name>WalletName`
- Change `url` to match your website url
- Change `icon` to your wallet icon (pay attention to the required format)
or
- Change `window.aptos` to be `window.<your-wallet-name>`
- Make sure the `Window Interface` has `<your-wallet-name>` as a key (instead of `aptos`)
- Open `__tests/index.test.tsx` and change `AptosWallet` to `<Your-Wallet-Name>Wallet`
- Run tests with `npm run test` - all tests should pass
```shell
npm i @blocto/aptos-wallet-adapter-plugin
```
At this point, you have a ready wallet class with all required properties and functions to integrate with the Aptos Wallet Adapter.
### Publish as a Package
Next step is to publish your wallet as a npm package so dapps can install it as a dependency.
- Make sure to update `package.json` name, description, author and any other properties.
- Run `npm install` then `npm run build` - a `dist` folder should be available
- (optional) Run `npm publish --dry-run` to see what would get published (make sure there is a `dist` folder)
Creating and publishing scoped public packages
https://docs.npmjs.com/creating-and-publishing-scoped-public-packages
Creating and publishing unscoped public packages
https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages
### Add your name to the wallets list
Once the package is published, you can create a PR against the [aptos-wallet-adapter](https://github.com/aptos-labs/aptos-wallet-adapter) repo and add your wallet name as a url to the npm package to the [supported wallet list](https://github.com/aptos-labs/aptos-wallet-adapter#supported-wallet-packages) on the README file.
---
> **_Note:_** if your wallet provides function that is not included, you should open a PR against [aptos-wallet-adapter](https://github.com/aptos-labs/aptos-wallet-adapter) in the [core package](https://github.com/aptos-labs/aptos-wallet-adapter/blob/main/packages/wallet-adapter-core/src/WalletCore.ts) so it would support this functionality.
> You can take a look at the `signTransaction` on the wallet [core package](https://github.com/aptos-labs/aptos-wallet-adapter/blob/main/packages/wallet-adapter-core/src/WalletCore.ts)
and follow the instructions [adapter for dapps](https://github.com/aptos-labs/aptos-wallet-adapter/tree/main/packages/wallet-adapter-react)

@@ -44,2 +44,4 @@ import type { AptosProviderInterface as IBloctoAptos } from '@blocto/sdk';

readonly providerName = "bloctoAptos"
provider: IBloctoAptos | undefined =

@@ -46,0 +48,0 @@ typeof window !== "undefined" ? window.bloctoAptos : undefined;

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc