@zkp2p/cash 0.4.11-rc.5 → 0.5.0

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
@@ -3331,15 +3331,20 @@ function createCashClient(options) {
3331
3331
  const { compositeId, escrowAddress, onchainDepositId } = parseDepositId(depositId);
3332
3332
  const groupIds = CASH_ACCESS_GROUP_IDS[environment];
3333
3333
  try {
3334
- const prepared = client.accessPolicy.prepareConfigureDeposit({
3334
+ const accessPolicy = client.accessPolicy;
3335
+ const merchantPolicyParams = {
3335
3336
  escrow: escrowAddress,
3336
3337
  depositId: onchainDepositId,
3337
3338
  paymentMethod,
3339
+ txOverrides: attribution
3340
+ };
3341
+ const prepared = accessPolicy.prepareConfigurePeerPayMerchantDeposit ? accessPolicy.prepareConfigurePeerPayMerchantDeposit(merchantPolicyParams) : accessPolicy.prepareConfigureDeposit?.({
3342
+ ...merchantPolicyParams,
3338
3343
  enabled: true,
3339
3344
  groupIds,
3340
- takers: [],
3341
- txOverrides: attribution
3345
+ takers: []
3342
3346
  });
3347
+ if (!prepared) throw new Error("SDK access-policy preparation is unavailable");
3343
3348
  return {
3344
3349
  to: prepared.to,
3345
3350
  data: prepared.data,
package/dist/index.js CHANGED
@@ -2836,15 +2836,20 @@ function createCashClient(options) {
2836
2836
  const { compositeId, escrowAddress, onchainDepositId } = parseDepositId(depositId);
2837
2837
  const groupIds = CASH_ACCESS_GROUP_IDS[environment];
2838
2838
  try {
2839
- const prepared = client.accessPolicy.prepareConfigureDeposit({
2839
+ const accessPolicy = client.accessPolicy;
2840
+ const merchantPolicyParams = {
2840
2841
  escrow: escrowAddress,
2841
2842
  depositId: onchainDepositId,
2842
2843
  paymentMethod,
2844
+ txOverrides: attribution
2845
+ };
2846
+ const prepared = accessPolicy.prepareConfigurePeerPayMerchantDeposit ? accessPolicy.prepareConfigurePeerPayMerchantDeposit(merchantPolicyParams) : accessPolicy.prepareConfigureDeposit?.({
2847
+ ...merchantPolicyParams,
2843
2848
  enabled: true,
2844
2849
  groupIds,
2845
- takers: [],
2846
- txOverrides: attribution
2850
+ takers: []
2847
2851
  });
2852
+ if (!prepared) throw new Error("SDK access-policy preparation is unavailable");
2848
2853
  return {
2849
2854
  to: prepared.to,
2850
2855
  data: prepared.data,
package/dist/tools.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  // package.json
4
4
  var package_default = {
5
- version: "0.4.11-rc.5"};
5
+ version: "0.5.0"};
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.4.11-rc.5"};
3
+ version: "0.5.0"};
4
4
 
5
5
  // src/tools/index.ts
6
6
  var bigintString = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/cash",
3
- "version": "0.4.11-rc.5",
3
+ "version": "0.5.0",
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 Chainlink 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.12.2-rc.3",
111
+ "@zkp2p/sdk": "0.12.2-rc.4",
112
112
  "zod": "^4.4.3"
113
113
  },
114
114
  "peerDependencies": {