-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add amount and metadata validations (#16)
- Loading branch information
Showing
11 changed files
with
878 additions
and
937 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,75 @@ | ||
export const validPayServiceParams = [ | ||
{ | ||
lnUrlOrAddress: | ||
'lnurl1dp68gurn8ghj7urp0yh8xarpva5kueewvaskcmme9e5k7tewwajkcmpdddhx7amw9akxuatjd3cz7atnv4erqgfuvv5', | ||
'lnurl1dp68gurn8ghj7urp0yh8xarpva5kueewvaskcmme9e5k7tewwajkcmpdddhx7amw9akxuatjd3cz7ar9wd6xjmn8h9qlv7', | ||
tokens: 5000, | ||
serviceParams: { | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/user0', | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/testing', | ||
minSendable: 1000, | ||
maxSendable: 500000000, | ||
metadata: | ||
'[["text/plain","Payment to user0"],["text/identifier","user0@pay.staging.galoy.io"]]', | ||
'[["text/plain","Payment to testing"],["text/identifier","testing@pay.staging.galoy.io"]]', | ||
tag: 'payRequest', | ||
}, | ||
serviceInvoice: { | ||
pr: 'lntb13130n1psl9la5pp57pd5fud26tpk5a893yp4snl90mda5sns6uj8589422rw0fndz03qsp5umjxesrm440437ykfjykt2rst8wfdlegg32f0xq5k4val9zvz38sdqqcqzynxqyz5vq9qxpq9qsqrzjqwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cnggqd7qqqq3qqqgqqqqlgqqqqqeqqjqtz9qwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cngqqqq05qqqqqvsqfqvu7u2ke04028p35n2xr9k23m53ggg6rjx045k2kpvysj0q6zhq74cxnh27xa3vdkqq0dypsfeyqys5mtcn0hz3hrdqvyl3n8tndhlpgpzchyh7', | ||
pr: 'lntbs50u1p363g52pp5axkm79jg9llq9suwf8w2gygvaa6z0jtdhl89kjl8vtphnpejk9xqhp5s02v4jhp0nxhkx9qqqraj24ga4cjnfpf3tgr9f2ymq2kx4ap8umscqzpuxqyz5vqsp5vasapyafj0w3lvethpyvqj6224clulvp8dwusxkw79hmdxtnn0dq9qyyssqgz0eqsag9jh7mcy4tvcz9p77ngh946a0a5kakxfjyagdhxv26d8qrum2wtk7709r2n6qlcqnu409a9wjt2tyqdnf2aqx7rhv905lksqptz820d', | ||
routes: [], | ||
successAction: undefined, | ||
}, | ||
preimage: | ||
'4cad8d163234461cb4de6c5ad35e5938f190df261065ef51b9708433466d0c3b', | ||
'507498a304d040752566f69583a2d6a28c6d8fd3469c13786f2e44b18532d7da', | ||
serviceParamsExpected: { | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/user0', | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/testing', | ||
commentAllowed: 0, | ||
description: 'Payment to user0', | ||
description: 'Payment to testing', | ||
domain: 'pay.staging.galoy.io', | ||
fixed: false, | ||
identifier: 'user0@pay.staging.galoy.io', | ||
identifier: 'testing@pay.staging.galoy.io', | ||
image: '', | ||
max: 500000, | ||
metadata: [ | ||
['text/plain', 'Payment to user0'], | ||
['text/identifier', 'user0@pay.staging.galoy.io'], | ||
['text/plain', 'Payment to testing'], | ||
['text/identifier', 'testing@pay.staging.galoy.io'], | ||
], | ||
metadataHash: | ||
'ad2c140d48fb958bc57d6d92536eedf2b21f6e3128c858cc27117b48a6d33abe', | ||
'83d4cacae17ccd7b18a00007d92aa8ed7129a4298ad032a544d8156357a13f37', | ||
min: 1, | ||
}, | ||
}, | ||
{ | ||
lnUrlOrAddress: 'user11@pay.staging.galoy.io', | ||
lnUrlOrAddress: 'testing@pay.staging.galoy.io', | ||
tokens: 10, | ||
serviceParams: { | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/user11', | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/testing', | ||
minSendable: 10000, | ||
maxSendable: 10000, | ||
metadata: | ||
'[["text/plain","Payment to user11"],["text/identifier","user11@pay.staging.galoy.io"]]', | ||
'[["text/plain","Payment to testing"],["text/identifier","testing@pay.staging.galoy.io"]]', | ||
tag: 'payRequest', | ||
}, | ||
serviceInvoice: { | ||
pr: 'lnbc10m1ps79mp5pp5eat0y56jcfym7eruu049280n9yssw5flmzvnp99up995zq4p2r4qdqqcqzpuxqyz5vqsp5r88jwj2er6nlj40748slw3zy3rwaydtu2x4s84yqmgq0w63fxjdq9qyyssqyc58k4lmayagad3upndzny07w777axtcfv4w9dj4q3tjvj877y99t2r7vgtxc3pw0xtk9j7mftvx72fg5m8rjnphcrkf3mnzzg8l6lcprw8apg', | ||
pr: 'lntbs100n1p36njvkpp53dl62nzwkp3d7sxj5pgf5dppgkddgkprdfk823s3st4cy7vsujsshp5s02v4jhp0nxhkx9qqqraj24ga4cjnfpf3tgr9f2ymq2kx4ap8umscqzpuxqyz5vqsp5edcvjjav3k94ndjdgfrs5cr5ygne09dqryuw483xlpd7smxzp5wq9qyyssqky8c279vrlpy87wrj7vt698yltjq7jmcj0hulp09c3engvplkkykr0qm5jg83vqjf7pxw7nq0lce895eq2jyjdr7j2tlap2sh97vznsp5qydfk', | ||
routes: [], | ||
successAction: undefined, | ||
}, | ||
preimage: | ||
'b956cb683997640065bad032aa177e7609c6a6c6289b73c2bf6237cea32fa6c6', | ||
'b7a2a9d3e54566d3b8ef2ac14d828fc336bef5bf3ca60d3e8c2b207283fcfb36', | ||
serviceParamsExpected: { | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/user11', | ||
callback: 'https://pay.staging.galoy.io:443/.well-known/lnurlp/testing', | ||
commentAllowed: 0, | ||
description: 'Payment to user11', | ||
description: 'Payment to testing', | ||
domain: 'pay.staging.galoy.io', | ||
fixed: true, | ||
identifier: 'user11@pay.staging.galoy.io', | ||
identifier: 'testing@pay.staging.galoy.io', | ||
image: '', | ||
min: 10, | ||
max: 10, | ||
metadata: [ | ||
['text/plain', 'Payment to user11'], | ||
['text/identifier', 'user11@pay.staging.galoy.io'], | ||
['text/plain', 'Payment to testing'], | ||
['text/identifier', 'testing@pay.staging.galoy.io'], | ||
], | ||
metadataHash: | ||
'382190a9edf28041fa43931f9f047c04252be80d6ae6483407fa3711df6d4152', | ||
'83d4cacae17ccd7b18a00007d92aa8ed7129a4298ad032a544d8156357a13f37', | ||
}, | ||
}, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.