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

@rarible/aptos-wallet

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rarible/aptos-wallet - npm Package Compare versions

Comparing version 0.13.68-fix.24 to 0.13.68-fix.25

build/tsconfig.cjs.tsbuildinfo

10

build/domain.d.ts

@@ -1,2 +0,2 @@

import type { PendingTransactionResponse, Account as GenericAccount } from "@aptos-labs/ts-sdk";
import type { Account as GenericAccount } from "@aptos-labs/ts-sdk";
export interface AptosWalletInterface {

@@ -8,6 +8,10 @@ signMessage(message: string): Promise<string>;

}>;
signAndSubmitTransaction(payload: AptosTransaction): Promise<PendingTransactionResponse>;
signAndSubmitTransaction(payload: AptosTransaction): Promise<{
hash: string;
}>;
}
export type ExternalAccount = {
signAndSubmitTransaction: (payload: EntryFunctionPayload) => Promise<PendingTransactionResponse>;
signAndSubmitTransaction: (payload: EntryFunctionPayload) => Promise<{
hash: string;
}>;
signMessage: (payload: SignMessagePayload) => Promise<SignMessageResponse>;

@@ -14,0 +18,0 @@ connect: () => Promise<AccountInfo>;

export * from "./domain";
export * from "./common";
export { AptosGenericSdkWallet } from "./wallets/generic";
export { AptosSdkWallet } from "./wallets/external";

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

tslib_1.__exportStar(require("./domain"), exports);
tslib_1.__exportStar(require("./common"), exports);
var generic_1 = require("./wallets/generic");

@@ -9,0 +8,0 @@ Object.defineProperty(exports, "AptosGenericSdkWallet", { enumerable: true, get: function () { return generic_1.AptosGenericSdkWallet; } });

@@ -5,3 +5,3 @@ import type { AptosTransaction, AptosWalletInterface, ExternalAccount } from "../domain";

constructor(account: ExternalAccount);
signMessage(msg: string): Promise<string>;
signMessage(msg: string): Promise<any>;
getAccountInfo(): Promise<{

@@ -12,3 +12,5 @@ address: string;

getPublicKey(): Promise<string>;
signAndSubmitTransaction(payload: AptosTransaction): Promise<import("@aptos-labs/ts-sdk").PendingTransactionResponse>;
signAndSubmitTransaction(payload: AptosTransaction): Promise<{
hash: string;
}>;
}

@@ -6,9 +6,6 @@ "use strict";

const types_1 = require("@rarible/types");
const common_1 = require("../common");
const sdk_common_1 = require("@rarible/sdk-common");
class AptosSdkWallet {
constructor(account) {
this.account = account;
if (!(0, common_1.isExternalAccount)(this.account)) {
throw new Error("Unrecognized wallet");
}
}

@@ -21,3 +18,6 @@ signMessage(msg) {

});
return signature;
if (Array.isArray(signature)) {
return signature[0];
}
return signature.toString();
});

@@ -29,3 +29,3 @@ }

return {
address,
address: (0, sdk_common_1.normalizeAddress)(address),
publicKey,

@@ -37,3 +37,3 @@ };

return tslib_1.__awaiter(this, void 0, void 0, function* () {
const account = yield this.account.account();
const account = yield this.getAccountInfo();
return account.publicKey;

@@ -44,3 +44,3 @@ });

return tslib_1.__awaiter(this, void 0, void 0, function* () {
return this.account.signAndSubmitTransaction({
const { hash } = yield this.account.signAndSubmitTransaction({
arguments: payload.arguments,

@@ -50,2 +50,3 @@ function: payload.function,

});
return { hash };
});

@@ -52,0 +53,0 @@ }

@@ -9,7 +9,9 @@ import type { Account as GenericAccount, Aptos } from "@aptos-labs/ts-sdk";

getAccountInfo(): Promise<{
address: `0x${string}`;
address: string;
publicKey: string;
}>;
signAndSubmitTransaction(payload: AptosTransaction): Promise<import("@aptos-labs/ts-sdk").PendingTransactionResponse>;
signAndSubmitTransaction(payload: AptosTransaction): Promise<{
hash: string;
}>;
}
export { GenericAccount };

@@ -5,3 +5,3 @@ "use strict";

const tslib_1 = require("tslib");
const common_1 = require("../common");
const sdk_common_1 = require("@rarible/sdk-common");
class AptosGenericSdkWallet {

@@ -11,5 +11,2 @@ constructor(aptos, account) {

this.account = account;
if (!(0, common_1.isGenericAccount)(this.account)) {
throw new Error("Unrecognized wallet");
}
}

@@ -24,3 +21,3 @@ signMessage(msg) {

return {
address: this.account.accountAddress.toString(),
address: (0, sdk_common_1.normalizeAddress)(this.account.accountAddress.toString()),
publicKey: this.account.publicKey.toString(),

@@ -40,6 +37,7 @@ };

});
return this.aptos.signAndSubmitTransaction({
const { hash } = yield this.aptos.signAndSubmitTransaction({
signer: this.account,
transaction: tx,
});
return { hash };
});

@@ -46,0 +44,0 @@ }

{
"name": "@rarible/aptos-wallet",
"version": "0.13.68-fix.24",
"version": "0.13.68-fix.25",
"keywords": [

@@ -9,32 +9,57 @@ "solana",

"license": "Apache-2.0",
"main": "build/index.js",
"types": "build/index.d.ts",
"exports": {
"./package.json": "./package.json",
"./build/": "./build/",
"./esm/": "./esm/",
".": {
"types": {
"require": "./build/index.d.ts",
"import": "./esm/index.d.ts"
},
"require": "./build/index.js",
"import": "./esm/index.js",
"default": "./build/index.js"
},
"./*": {
"types": {
"require": "./build/*.d.ts",
"import": "./esm/*.d.ts"
},
"require": "./build/*.js",
"import": "./esm/*.js",
"default": "./build/*.js"
}
},
"main": "./build/index.js",
"module": "./esm/index.js",
"types": "./build/index.d.ts",
"files": [
"build"
"build",
"umd",
"esm"
],
"scripts": {
"build": "run-s build:*",
"build:esm": "tsc --project tsconfig-build.json",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
"clean": "run-s clean:*",
"clean:build": "rimraf ./build",
"clean:build": "rimraf ./build ./esm",
"clean:tsbuildinfo": "rimraf ./tsconfig.tsbuildinfo",
"test": "echo \"There's no tests yet\"",
"verify": "tsc --noEmit --project tsconfig-build.json"
"verify": "tsc"
},
"dependencies": {
"@aptos-labs/ts-sdk": "^1.5.1",
"@rarible/logger": "^0.9.12",
"@rarible/sdk-common": "^0.13.68-fix.24",
"@rarible/types": "~0.9.26",
"@rarible/utils": "~0.9.10",
"node-fetch": "^2.6.7"
"@rarible/sdk-common": "^0.13.68-fix.25",
"@rarible/types": "~0.9.26"
},
"devDependencies": {
"@types/node-fetch": "^2.6.1",
"aptos": "^1.21.0",
"form-data": "^4.0.0"
},
"peerDependencies": {
"@aptos-labs/ts-sdk": "^1.5.1",
"@aptos-labs/wallet-adapter-core": "~4.1.2",
"tslib": "^2.3.1"
},
"peerDependenciesMeta": {
"@aptos-labs/wallet-adapter-core": {
"optional": true
}
},
"publishConfig": {

@@ -44,3 +69,3 @@ "access": "public",

},
"gitHead": "c11abca98375da2fc8d10ffc5aa93279e854047a"
"gitHead": "30af304a1d5445ab24d60137ae136b2cdf170a2e"
}
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