@zkp2p/cash 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3154,20 +3154,12 @@ function createCashClient(options) {
3154
3154
  const { compositeId, escrowAddress, onchainDepositId } = parseDepositId(depositId);
3155
3155
  const groupIds = CASH_ACCESS_GROUP_IDS[environment];
3156
3156
  try {
3157
- const accessPolicy = client.accessPolicy;
3158
- const merchantPolicyParams = {
3157
+ const prepared = client.accessPolicy.prepareConfigurePeerPayMerchantDeposit({
3159
3158
  escrow: escrowAddress,
3160
3159
  depositId: onchainDepositId,
3161
3160
  paymentMethod,
3162
3161
  txOverrides: attribution
3163
- };
3164
- const prepared = accessPolicy.prepareConfigurePeerPayMerchantDeposit ? accessPolicy.prepareConfigurePeerPayMerchantDeposit(merchantPolicyParams) : accessPolicy.prepareConfigureDeposit?.({
3165
- ...merchantPolicyParams,
3166
- enabled: true,
3167
- groupIds,
3168
- takers: []
3169
3162
  });
3170
- if (!prepared) throw new Error("SDK access-policy preparation is unavailable");
3171
3163
  return {
3172
3164
  to: prepared.to,
3173
3165
  data: prepared.data,
@@ -3359,7 +3351,11 @@ function createCashClient(options) {
3359
3351
  mapChainError("resolve same-chain Relay nonce", err)
3360
3352
  );
3361
3353
  }
3362
- const attributedParams2 = { ...params2, txOverrides: attribution };
3354
+ const attributedParams2 = {
3355
+ ...params2,
3356
+ txOverrides: attribution,
3357
+ enableTrustedGroupBypass: false
3358
+ };
3363
3359
  const send2 = async () => {
3364
3360
  try {
3365
3361
  return (await client.createDeposit(attributedParams2)).hash;
@@ -3426,7 +3422,11 @@ function createCashClient(options) {
3426
3422
  const params = await buildDepositParams(client, depositInput);
3427
3423
  const escrow = client.escrowV2Address ?? client.escrowAddress;
3428
3424
  await settleAllowance(client, params.token, owner, escrow, depositInput.amount);
3429
- const attributedParams = { ...params, txOverrides: attribution };
3425
+ const attributedParams = {
3426
+ ...params,
3427
+ txOverrides: attribution,
3428
+ enableTrustedGroupBypass: false
3429
+ };
3430
3430
  const send = async () => {
3431
3431
  try {
3432
3432
  return (await client.createDeposit(attributedParams)).hash;
package/dist/index.js CHANGED
@@ -2661,20 +2661,12 @@ function createCashClient(options) {
2661
2661
  const { compositeId, escrowAddress, onchainDepositId } = parseDepositId(depositId);
2662
2662
  const groupIds = CASH_ACCESS_GROUP_IDS[environment];
2663
2663
  try {
2664
- const accessPolicy = client.accessPolicy;
2665
- const merchantPolicyParams = {
2664
+ const prepared = client.accessPolicy.prepareConfigurePeerPayMerchantDeposit({
2666
2665
  escrow: escrowAddress,
2667
2666
  depositId: onchainDepositId,
2668
2667
  paymentMethod,
2669
2668
  txOverrides: attribution
2670
- };
2671
- const prepared = accessPolicy.prepareConfigurePeerPayMerchantDeposit ? accessPolicy.prepareConfigurePeerPayMerchantDeposit(merchantPolicyParams) : accessPolicy.prepareConfigureDeposit?.({
2672
- ...merchantPolicyParams,
2673
- enabled: true,
2674
- groupIds,
2675
- takers: []
2676
2669
  });
2677
- if (!prepared) throw new Error("SDK access-policy preparation is unavailable");
2678
2670
  return {
2679
2671
  to: prepared.to,
2680
2672
  data: prepared.data,
@@ -2866,7 +2858,11 @@ function createCashClient(options) {
2866
2858
  mapChainError("resolve same-chain Relay nonce", err)
2867
2859
  );
2868
2860
  }
2869
- const attributedParams2 = { ...params2, txOverrides: attribution };
2861
+ const attributedParams2 = {
2862
+ ...params2,
2863
+ txOverrides: attribution,
2864
+ enableTrustedGroupBypass: false
2865
+ };
2870
2866
  const send2 = async () => {
2871
2867
  try {
2872
2868
  return (await client.createDeposit(attributedParams2)).hash;
@@ -2933,7 +2929,11 @@ function createCashClient(options) {
2933
2929
  const params = await buildDepositParams(client, depositInput);
2934
2930
  const escrow = client.escrowV2Address ?? client.escrowAddress;
2935
2931
  await settleAllowance(client, params.token, owner, escrow, depositInput.amount);
2936
- const attributedParams = { ...params, txOverrides: attribution };
2932
+ const attributedParams = {
2933
+ ...params,
2934
+ txOverrides: attribution,
2935
+ enableTrustedGroupBypass: false
2936
+ };
2937
2937
  const send = async () => {
2938
2938
  try {
2939
2939
  return (await client.createDeposit(attributedParams)).hash;
package/dist/tools.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // package.json
4
4
  var package_default = {
5
- version: "0.7.0"};
5
+ version: "0.7.1"};
6
6
 
7
7
  // src/tools/index.ts
8
8
  var bigintString = {
package/dist/tools.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var package_default = {
3
- version: "0.7.0"};
3
+ version: "0.7.1"};
4
4
 
5
5
  // src/tools/index.ts
6
6
  var bigintString = {
@@ -4,7 +4,7 @@
4
4
  "type": "module",
5
5
  "description": "Peer Cash Demo: the express sell flow stored entirely onchain on Base, after zSwap by z0r0z",
6
6
  "dependencies": {
7
- "@zkp2p/cash": "0.7.0",
7
+ "@zkp2p/cash": "0.7.1",
8
8
  "esbuild": "0.28.2",
9
9
  "solc": "0.8.36",
10
10
  "viem": "2.55.18"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/cash",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Peer Cash - offramp-only SDK for routing Relay or NEAR Intents assets to Base USDC, then cashing out to fiat at zero-spread on-chain oracle market rates.",
5
5
  "license": "MIT",
6
6
  "author": "Peer (https://peer.xyz)",
@@ -108,7 +108,7 @@
108
108
  },
109
109
  "dependencies": {
110
110
  "@relayprotocol/relay-sdk": "^7.0.1",
111
- "@zkp2p/sdk": "0.14.5",
111
+ "@zkp2p/sdk": "0.14.6",
112
112
  "zod": "^4.4.3"
113
113
  },
114
114
  "peerDependencies": {