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

@mysten/zksend

Package Overview
Dependencies
Maintainers
4
Versions
230
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mysten/zksend - npm Package Compare versions

Comparing version 0.0.0-experimental-20240208021912 to 0.0.0-experimental-20240208033317

7

CHANGELOG.md
# @mysten/zksend
## 0.0.0-experimental-20240208021912
## 0.0.0-experimental-20240208033317

@@ -22,2 +22,3 @@ ### Minor Changes

- c6b3066069: Improve zkSend error messages
- a2904e0075: Fix for claimable assets not accounting for cases where claimable balance comes from gas coin
- ea2744b0c3: Add redirect parameter and fix listing assets on links without Sui

@@ -37,4 +38,4 @@ - 44a1f9ea0b: Tweak types of events sent over the bridge

- Updated dependencies [220a766d86]
- @mysten/sui.js@0.0.0-experimental-20240208021912
- @mysten/wallet-standard@0.0.0-experimental-20240208021912
- @mysten/sui.js@0.0.0-experimental-20240208033317
- @mysten/wallet-standard@0.0.0-experimental-20240208033317

@@ -41,0 +42,0 @@ ## 0.1.1

@@ -48,3 +48,5 @@ import { SuiClient } from '@mysten/sui.js/client';

#private;
constructor({ client, keypair, }: ZkSendLinkOptions);
constructor({ client, keypair, }: ZkSendLinkOptions & {
linkAddress?: string;
});
static fromUrl(url: string, options?: Omit<ZkSendLinkOptions, 'keypair'>): Promise<ZkSendLink>;

@@ -51,0 +53,0 @@ loadOwnedData(): Promise<void>;

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

var import_client = require("@mysten/sui.js/client");
var import_cryptography = require("@mysten/sui.js/cryptography");
var import_ed25519 = require("@mysten/sui.js/keypairs/ed25519");

@@ -99,3 +100,3 @@ var import_transactions = require("@mysten/sui.js/transactions");

link.pathname = __privateGet(this, _path);
link.hash = __privateGet(this, _keypair).export().privateKey;
link.hash = (0, import_utils.toB64)((0, import_cryptography.decodeSuiPrivateKey)(__privateGet(this, _keypair).getSecretKey()).secretKey);
if (__privateGet(this, _redirect)) {

@@ -231,3 +232,5 @@ link.searchParams.set("redirect_url", __privateGet(this, _redirect).url);

const txb = this.createClaimTransaction(normalizedAddress, options);
txb.setGasPayment([]);
if (__privateGet(this, _gasCoin)) {
txb.setGasPayment([]);
}
const dryRun = await __privateGet(this, _client2).dryRunTransactionBlock({

@@ -310,6 +313,7 @@ transactionBlock: await txb.build({ client: __privateGet(this, _client2) })

let nextCursor;
const owner = __privateGet(this, _keypair2).toSuiAddress();
do {
const ownedObjects = await __privateGet(this, _client2).getOwnedObjects({
cursor: nextCursor,
owner: __privateGet(this, _keypair2).toSuiAddress(),
owner,
options: {

@@ -333,3 +337,3 @@ showType: true

coinType: SUI_COIN_TYPE,
owner: __privateGet(this, _keypair2).toSuiAddress()
owner
});

@@ -340,2 +344,3 @@ __privateSet(this, _gasCoin, coins.data.find((coin) => BigInt(coin.balance) % 1000n === 987n));

loadInitialTransactionData_fn = async function() {
const address = __privateGet(this, _keypair2).toSuiAddress();
const result = await __privateGet(this, _client2).queryTransactionBlocks({

@@ -345,3 +350,3 @@ limit: 1,

filter: {
ToAddress: __privateGet(this, _keypair2).toSuiAddress()
ToAddress: address
},

@@ -353,3 +358,2 @@ options: {

});
const address = __privateGet(this, _keypair2).toSuiAddress();
result.data[0]?.objectChanges?.forEach((objectChange) => {

@@ -356,0 +360,0 @@ if (ownedAfterChange(objectChange, address)) {

@@ -48,3 +48,5 @@ import { SuiClient } from '@mysten/sui.js/client';

#private;
constructor({ client, keypair, }: ZkSendLinkOptions);
constructor({ client, keypair, }: ZkSendLinkOptions & {
linkAddress?: string;
});
static fromUrl(url: string, options?: Omit<ZkSendLinkOptions, 'keypair'>): Promise<ZkSendLink>;

@@ -51,0 +53,0 @@ loadOwnedData(): Promise<void>;

@@ -25,2 +25,3 @@ var __accessCheck = (obj, member, msg) => {

import { getFullnodeUrl, SuiClient } from "@mysten/sui.js/client";
import { decodeSuiPrivateKey } from "@mysten/sui.js/cryptography";
import { Ed25519Keypair } from "@mysten/sui.js/keypairs/ed25519";

@@ -34,3 +35,4 @@ import { TransactionBlock } from "@mysten/sui.js/transactions";

parseStructTag,
SUI_TYPE_ARG
SUI_TYPE_ARG,
toB64
} from "@mysten/sui.js/utils";

@@ -83,3 +85,3 @@ const DEFAULT_ZK_SEND_LINK_OPTIONS = {

link.pathname = __privateGet(this, _path);
link.hash = __privateGet(this, _keypair).export().privateKey;
link.hash = toB64(decodeSuiPrivateKey(__privateGet(this, _keypair).getSecretKey()).secretKey);
if (__privateGet(this, _redirect)) {

@@ -215,3 +217,5 @@ link.searchParams.set("redirect_url", __privateGet(this, _redirect).url);

const txb = this.createClaimTransaction(normalizedAddress, options);
txb.setGasPayment([]);
if (__privateGet(this, _gasCoin)) {
txb.setGasPayment([]);
}
const dryRun = await __privateGet(this, _client2).dryRunTransactionBlock({

@@ -294,6 +298,7 @@ transactionBlock: await txb.build({ client: __privateGet(this, _client2) })

let nextCursor;
const owner = __privateGet(this, _keypair2).toSuiAddress();
do {
const ownedObjects = await __privateGet(this, _client2).getOwnedObjects({
cursor: nextCursor,
owner: __privateGet(this, _keypair2).toSuiAddress(),
owner,
options: {

@@ -317,3 +322,3 @@ showType: true

coinType: SUI_COIN_TYPE,
owner: __privateGet(this, _keypair2).toSuiAddress()
owner
});

@@ -324,2 +329,3 @@ __privateSet(this, _gasCoin, coins.data.find((coin) => BigInt(coin.balance) % 1000n === 987n));

loadInitialTransactionData_fn = async function() {
const address = __privateGet(this, _keypair2).toSuiAddress();
const result = await __privateGet(this, _client2).queryTransactionBlocks({

@@ -329,3 +335,3 @@ limit: 1,

filter: {
ToAddress: __privateGet(this, _keypair2).toSuiAddress()
ToAddress: address
},

@@ -337,3 +343,2 @@ options: {

});
const address = __privateGet(this, _keypair2).toSuiAddress();
result.data[0]?.objectChanges?.forEach((objectChange) => {

@@ -340,0 +345,0 @@ if (ownedAfterChange(objectChange, address)) {

{
"name": "@mysten/zksend",
"version": "0.0.0-experimental-20240208021912",
"version": "0.0.0-experimental-20240208033317",
"description": "TODO: Write Description",

@@ -40,4 +40,4 @@ "license": "Apache-2.0",

"valibot": "^0.25.0",
"@mysten/sui.js": "0.0.0-experimental-20240208021912",
"@mysten/wallet-standard": "0.0.0-experimental-20240208021912"
"@mysten/sui.js": "0.0.0-experimental-20240208033317",
"@mysten/wallet-standard": "0.0.0-experimental-20240208033317"
},

@@ -44,0 +44,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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