@zkp2p/providers 6.0.0 → 7.1.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.
@@ -126,7 +126,17 @@
126
126
  ],
127
127
  "mobile": {
128
128
  "includeAdditionalCookieDomains": [],
129
+ "additionalClientOptions": {
130
+ "cipherSuites": [
131
+ "TLS_CHACHA20_POLY1305_SHA256",
132
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
133
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
134
+ ]
135
+ },
129
136
  "useExternalAction": true,
137
+ "userAgent": {
138
+ "android": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15"
139
+ },
130
140
  "external": {
131
141
  "actionLink": "https://cash.app/{{RECIPIENT_ID}}/{{AMOUNT}}",
132
142
  "appStoreLink": "https://apps.apple.com/us/app/cash-app-mobile-banking/id711923939",
@@ -7,13 +7,13 @@
7
7
  "body": "",
8
8
  "metadata": {
9
9
  "platform": "mercadopago",
10
- "urlRegex": "https://www.mercadopago.com.ar/home",
10
+ "urlRegex": "^https://www\\.mercadopago\\.com\\.ar/home(?:/)?(?:\\?.*)?$",
11
11
  "method": "GET",
12
12
  "fallbackUrlRegex": "",
13
13
  "fallbackMethod": "",
14
14
  "preprocessRegex": "<script\\s+[^>]*id=[\"']__PRELOADED_STATE__[\"'][^>]*>([\\s\\S]*?)</script>",
15
15
  "transactionsExtraction": {
16
- "transactionJsonPathListSelector": "$.pageState.mpHome.result.sections.activities.content.activities_container.results",
16
+ "transactionJsonPathListSelector": "$.pageState.mpHome.result.sections.hs_activities.content.content",
17
17
  "transactionJsonPathSelectors": {
18
18
  "recipient": "$.title",
19
19
  "amount": "$.amount.fraction",
@@ -25,15 +25,15 @@
25
25
  "proofMetadataSelectors": [
26
26
  {
27
27
  "type": "jsonPath",
28
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].title"
28
+ "value": "$.pageState.mpHome.result.sections.hs_activities.content.content[{{INDEX}}].title"
29
29
  },
30
30
  {
31
31
  "type": "jsonPath",
32
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].amount.fraction"
32
+ "value": "$.pageState.mpHome.result.sections.hs_activities.content.content[{{INDEX}}].amount.fraction"
33
33
  },
34
34
  {
35
35
  "type": "jsonPath",
36
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].id"
36
+ "value": "$.pageState.mpHome.result.sections.hs_activities.content.content[{{INDEX}}].id"
37
37
  }
38
38
  ]
39
39
  },
@@ -44,11 +44,11 @@
44
44
  "paramSelectors": [
45
45
  {
46
46
  "type": "jsonPath",
47
- "value": "$.pageState.mpHome.result.sections.activities.content.activities_container.results[{{INDEX}}].id"
47
+ "value": "$.pageState.mpHome.result.sections.hs_activities.content.content[{{INDEX}}].id"
48
48
  },
49
49
  {
50
50
  "type": "regex",
51
- "value": "(mp-home)"
51
+ "value": "from=([^&\\\"]+)"
52
52
  }
53
53
  ],
54
54
  "skipRequestHeaders": [
@@ -89,7 +89,7 @@
89
89
  {
90
90
  "jsonPath": "",
91
91
  "xPath": "",
92
- "regex": "<span class=\"andes-money-amount__fraction\" aria-hidden=\"true\">(.*?)<\/span><span aria-hidden=\"true\">,<\/span><span class=\"andes-money-amount__cents\" aria-hidden=\"true\">(.*?)<\/span>"
92
+ "regex": "<span class=\"andes-money-amount__fraction\" aria-hidden=\"true\">(.*?)</span><span aria-hidden=\"true\">,</span><span class=\"andes-money-amount__cents\" aria-hidden=\"true\">(.*?)</span>"
93
93
  },
94
94
  {
95
95
  "jsonPath": "",
@@ -108,14 +108,22 @@
108
108
  }
109
109
  ],
110
110
  "mobile": {
111
+ "additionalClientOptions": {
112
+ "cipherSuites": [
113
+ "TLS_AES_128_GCM_SHA256",
114
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
115
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
116
+ ]
117
+ },
111
118
  "includeAdditionalCookieDomains": [
112
119
  "mercadolibre.com",
113
120
  "www.mercadolibre.com"
114
121
  ],
115
- "internal": {
116
- "actionLink": "https://www.mercadopago.com.ar/money-out/transfer/",
117
- "actionCompletedUrlRegex": "https://www.mercadopago.com.ar/money-out/transfer/congrats\\?data=\\S+",
118
- "injectedJavaScript": "(function(){const style=document.createElement('style');style.textContent='.zkp2p-icon{position:absolute;right:10px;top:50%;transform:translateY(-50%);width:24px;height:24px;background:#007AFF;border-radius:4px;cursor:pointer;z-index:9999;display:flex;align-items:center;justify-content:center;color:white;font-weight:bold;font-size:12px;}.zkp2p-dropdown{position:absolute;background:#FFF;border:1px solid #E0E0E0;border-radius:6px;box-shadow:0 4px 12px rgba(0,0,0,0.15);z-index:99999;font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",Roboto,\"Helvetica Neue\",Arial,sans-serif;font-size:14px;color:#333;width:auto;min-width:250px;}.zkp2p-dropdown-item{padding:12px 16px;cursor:pointer;}.zkp2p-dropdown-item:hover{background:#F5F5F5;}.zkp2p-dropdown-item:active{background:#E8E8E8;}.zkp2p-dropdown-label{color:#666;font-size:12px;margin-bottom:4px;}.zkp2p-dropdown-value{font-weight:500;color:#333;font-size:16px;}.zkp2p-toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%);background:#333;color:white;padding:10px 20px;border-radius:6px;z-index:999999;font-family:system-ui;}';document.head.appendChild(style);const copyToClipboard=function(text){const textArea=document.createElement('textarea');textArea.value=text;textArea.style.position='fixed';textArea.style.top='-9999px';document.body.appendChild(textArea);textArea.select();textArea.setSelectionRange(0,99999);document.execCommand('copy');document.body.removeChild(textArea);const toast=document.createElement('div');toast.className='zkp2p-toast';toast.textContent='Copied!';document.body.appendChild(toast);setTimeout(()=>toast.remove(),2000);};const createDropdown=function(input,label,value){const rect=input.getBoundingClientRect();const dropdown=document.createElement('div');dropdown.className='zkp2p-dropdown';dropdown.id='zkp2p-dropdown-'+Date.now();dropdown.style.position='absolute';dropdown.style.top=(rect.bottom+window.scrollY+4)+'px';dropdown.style.left=rect.left+'px';dropdown.style.display='block';const item=document.createElement('div');item.className='zkp2p-dropdown-item';item.innerHTML='<div class=\"zkp2p-dropdown-label\">'+label+'</div><div class=\"zkp2p-dropdown-value\">'+value+'</div>';item.addEventListener('click',function(){copyToClipboard(value);dropdown.remove();});dropdown.appendChild(item);document.body.appendChild(dropdown);setTimeout(()=>{document.addEventListener('click',function hideDropdown(e){if(!dropdown.contains(e.target)&&e.target!==input&&!e.target.classList.contains('zkp2p-icon')){dropdown.remove();document.removeEventListener('click',hideDropdown);}});},100);};const addIcon=function(input,label,value){const container=input.closest('.andes-amount-field__input-container')||input.parentElement;container.style.position='relative';const icon=document.createElement('div');icon.className='zkp2p-icon';icon.textContent='Z';icon.addEventListener('click',function(e){e.stopPropagation();const existing=document.querySelector('.zkp2p-dropdown');if(existing)existing.remove();createDropdown(input,label,value);});container.appendChild(icon);createDropdown(input,label,value);};const swap=function(a){try{a=String(a||'');if(!a)return a;return a.split('.').join('#').split(',').join('.').split('#').join(',');}catch(_){return String(a||'');}};const setupFields=function(){const cvuInput=document.querySelector('input[name=\"identification_account\"]');if(cvuInput&&!cvuInput.hasAttribute('data-zkp2p')){cvuInput.setAttribute('data-zkp2p','true');addIcon(cvuInput,'CVU for ZKP2P:','{{RECIPIENT_ID}}');}const amountInput=document.querySelector('#amount-field-input');if(amountInput&&!amountInput.hasAttribute('data-zkp2p')){amountInput.setAttribute('data-zkp2p','true');var swapped=swap('{{AMOUNT}}');addIcon(amountInput,'Amount for ZKP2P:',swapped);}};setTimeout(setupFields,1500);const observer=new MutationObserver(setupFields);observer.observe(document.body,{childList:true,subtree:true});})();"
122
+ "useExternalAction": true,
123
+ "external": {
124
+ "actionLink": "mercadopago://",
125
+ "appStoreLink": "https://apps.apple.com/us/app/mercado-pago-cuenta-digital/id925436649",
126
+ "playStoreLink": "https://play.google.com/store/apps/details?id=com.mercadopago.wallet"
119
127
  }
120
128
  }
121
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zkp2p/providers",
3
- "version": "6.0.0",
3
+ "version": "7.1.0",
4
4
  "description": "Provider JSON templates for ZKP2P",
5
5
  "scripts": {
6
6
  "start": "node index.js"
@@ -7,11 +7,11 @@
7
7
  "body": "",
8
8
  "metadata": {
9
9
  "platform": "paypal",
10
- "urlRegex": "https://www.paypal.com/myaccount/activities/filter/\\?q=ZnJlZV90ZXh0X3NlYXJjaD0mc3RhcnRfZGF0ZT0yMDI1LTAxLTAxJmVuZF9kYXRlPTIwMzAtMTItMzEmdHlwZT0mc3RhdHVzPSZjdXJyZW5jeT0mZmlsdGVyX2lkPSZpc3N1YW5jZV9wcm9kdWN0X25hbWU9JmFzc2V0X25hbWVzPSZhc3NldF9zeW1ib2xzPQ",
10
+ "urlRegex": "^https://www.paypal.com/myaccount/activities/filter/\\?q=.*$",
11
11
  "method": "GET",
12
12
  "fallbackUrlRegex": "",
13
13
  "fallbackMethod": "",
14
- "preprocessRegex": "",
14
+ "preprocessRegex": "<pre[^>]*>([\\s\\S]*?)<\\/pre>",
15
15
  "transactionsExtraction": {
16
16
  "transactionJsonPathListSelector": "$.data.data.activity.transactions",
17
17
  "transactionJsonPathSelectors": {
@@ -97,5 +97,21 @@
97
97
  "jsonPath": "$.data.primitiveTimeCreated",
98
98
  "xPath": ""
99
99
  }
100
- ]
100
+ ],
101
+ "mobile": {
102
+ "includeAdditionalCookieDomains": [],
103
+ "additionalClientOptions": {
104
+ "cipherSuites": [
105
+ "TLS_CHACHA20_POLY1305_SHA256",
106
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
107
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
108
+ ]
109
+ },
110
+ "useExternalAction": true,
111
+ "external": {
112
+ "actionLink": "paypal://",
113
+ "appStoreLink": "https://apps.apple.com/us/app/paypal-pay-send-save/id283646709",
114
+ "playStoreLink": "https://play.google.com/store/apps/details?id=com.paypal.android.p2pmobile&hl=en_US"
115
+ }
116
+ }
101
117
  }
package/providers.json CHANGED
@@ -9,7 +9,7 @@
9
9
  { "id": "mercadopago", "files": ["mercadopago/transfer_mercadopago.json"] },
10
10
  { "id": "monzo", "files": ["monzo/transfer_monzo.json"] },
11
11
  { "id": "paypal", "files": ["paypal/transfer_paypal.json"] },
12
- { "id": "revolut", "files": ["revolut/transfer_revolut.json"] },
12
+ { "id": "revolut", "files": ["revolut/transfer_revolut.json", "revolut/transfer_revolut_crosscurrency.json"] },
13
13
  { "id": "royalbankcanada", "files": ["royalbankcanada/transfer_interac.json"] },
14
14
  { "id": "usbank", "files": ["usbank/transfer_zelle.json"] },
15
15
  { "id": "venmo", "files": ["venmo/transfer_venmo.json"] },
@@ -117,6 +117,13 @@
117
117
  ],
118
118
  "mobile": {
119
119
  "includeAdditionalCookieDomains": [],
120
+ "additionalClientOptions": {
121
+ "cipherSuites": [
122
+ "TLS_CHACHA20_POLY1305_SHA256",
123
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
124
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
125
+ ]
126
+ },
120
127
  "useExternalAction": true,
121
128
  "external": {
122
129
  "actionLink": "https://revolut.me/{{RECIPIENT_ID}}",
@@ -0,0 +1,128 @@
1
+ {
2
+ "actionType": "transfer_revolut_crosscurrency",
3
+ "proofEngine": "reclaim",
4
+ "authLink": "https://app.revolut.com/home",
5
+ "url": "https://app.revolut.com/api/retail/user/current/transactions/last?count=20",
6
+ "method": "GET",
7
+ "body": "",
8
+ "metadata": {
9
+ "shouldReplayRequestInPage": true,
10
+ "metadataUrl": "https://app.revolut.com/api/retail/user/current/transactions/last?count=20",
11
+ "metadataUrlMethod": "GET",
12
+ "metadataUrlBody": "",
13
+ "platform": "revolut",
14
+ "urlRegex": "https://app.revolut.com/api/retail/user/current/transactions/last\\?count=20$",
15
+ "method": "GET",
16
+ "fallbackUrlRegex": "https://app.revolut.com/api/retail/user/current/transactions/last\\?count=20&\\S+",
17
+ "fallbackMethod": "GET",
18
+ "preprocessRegex": "",
19
+ "transactionsExtraction": {
20
+ "transactionJsonPathListSelector": "$",
21
+ "transactionJsonPathSelectors": {
22
+ "recipient": "$.recipient.username",
23
+ "amount": "$.amount",
24
+ "counterpartAmount": "$.counterpart.amount",
25
+ "date": "$.completedDate",
26
+ "paymentId": "$.id",
27
+ "counterpartCurrency": "$.counterpart.currency"
28
+ }
29
+ },
30
+ "proofMetadataSelectors": [
31
+ {
32
+ "type": "jsonPath",
33
+ "value": "$.[{{INDEX}}].counterpart.amount"
34
+ },
35
+ {
36
+ "type": "jsonPath",
37
+ "value": "$.[{{INDEX}}].counterpart.currency"
38
+ },
39
+ {
40
+ "type": "jsonPath",
41
+ "value": "$.[{{INDEX}}].recipient.username"
42
+ },
43
+ {
44
+ "type": "jsonPath",
45
+ "value": "$.[{{INDEX}}].completedDate"
46
+ },
47
+ {
48
+ "type": "jsonPath",
49
+ "value": "$.[{{INDEX}}].state"
50
+ },
51
+ {
52
+ "type": "jsonPath",
53
+ "value": "$.[{{INDEX}}].id"
54
+ }
55
+ ]
56
+ },
57
+ "paramNames": [],
58
+ "paramSelectors": [],
59
+ "skipRequestHeaders": [
60
+ "x-device-id",
61
+ "Cookie"
62
+ ],
63
+ "secretHeaders": [
64
+ "x-device-id",
65
+ "Cookie"
66
+ ],
67
+ "responseMatches": [
68
+ {
69
+ "type": "regex",
70
+ "value": "\"amount\":(?<amount>[0-9\\-]+)"
71
+ },
72
+ {
73
+ "type": "regex",
74
+ "value": "\"completedDate\":(?<completedDate>[0-9]+)"
75
+ },
76
+ {
77
+ "type": "regex",
78
+ "value": "\"currency\":\"(?<currency>[^\"]+)\""
79
+ },
80
+ {
81
+ "type": "regex",
82
+ "value": "\"id\":\"(?<id>[^\"]+)\""
83
+ },
84
+ {
85
+ "type": "regex",
86
+ "value": "\"state\":\"(?<state>[^\"]+)\""
87
+ },
88
+ {
89
+ "type": "regex",
90
+ "value": "\"username\":\"(?<username>[^\"]+)\""
91
+ }
92
+ ],
93
+ "responseRedactions": [
94
+ {
95
+ "jsonPath": "$.[{{INDEX}}].counterpart.amount",
96
+ "xPath": ""
97
+ },
98
+ {
99
+ "jsonPath": "$.[{{INDEX}}].completedDate",
100
+ "xPath": ""
101
+ },
102
+ {
103
+ "jsonPath": "$.[{{INDEX}}].counterpart.currency",
104
+ "xPath": ""
105
+ },
106
+ {
107
+ "jsonPath": "$.[{{INDEX}}].id",
108
+ "xPath": ""
109
+ },
110
+ {
111
+ "jsonPath": "$.[{{INDEX}}].recipient.username",
112
+ "xPath": ""
113
+ },
114
+ {
115
+ "jsonPath": "$.[{{INDEX}}].state",
116
+ "xPath": ""
117
+ }
118
+ ],
119
+ "mobile": {
120
+ "includeAdditionalCookieDomains": [],
121
+ "useExternalAction": true,
122
+ "external": {
123
+ "actionLink": "https://revolut.me/{{RECIPIENT_ID}}",
124
+ "appStoreLink": "https://apps.apple.com/us/app/revolut/id370619147",
125
+ "playStoreLink": "https://play.google.com/store/apps/details?id=com.revolut.revolut"
126
+ }
127
+ }
128
+ }
@@ -96,12 +96,19 @@
96
96
  ],
97
97
  "mobile": {
98
98
  "includeAdditionalCookieDomains": [],
99
+ "additionalClientOptions": {
100
+ "cipherSuites": [
101
+ "TLS_AES_128_GCM_SHA256",
102
+ "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
103
+ "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
104
+ ]
105
+ },
99
106
  "useExternalAction": true,
100
107
  "userAgent": {
101
108
  "ios": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15"
102
109
  },
103
110
  "external": {
104
- "actionLink": "venmo://paycharge?txn=pay&recipients={{RECIPIENT_ID}}&note=🎁&amount={{AMOUNT}}",
111
+ "actionLink": "venmo://paycharge?txn=pay&recipients={{RECIPIENT_ID}}&note=Thx&amount={{AMOUNT}}",
105
112
  "appStoreLink": "https://apps.apple.com/us/app/venmo/id351727428",
106
113
  "playStoreLink": "https://play.google.com/store/apps/details?id=com.venmo"
107
114
  },
@@ -130,6 +130,13 @@
130
130
  ],
131
131
  "mobile": {
132
132
  "includeAdditionalCookieDomains": [],
133
+ "additionalClientOptions": {
134
+ "cipherSuites": [
135
+ "TLS_CHACHA20_POLY1305_SHA256",
136
+ "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
137
+ "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
138
+ ]
139
+ },
133
140
  "userAgent": {
134
141
  "android": "Mozilla/5.0 (Linux; Android 13; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.6367.207 Mobile Safari/537.36",
135
142
  "ios": "Mozilla/5.0 (Macintosh; Intel Mac OS X 13_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15"