paytonz-node-api-sdk 1.0.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.
Files changed (97) hide show
  1. package/README.md +743 -0
  2. package/lib/CpaySDK.d.ts +30 -0
  3. package/lib/CpaySDK.js +35 -0
  4. package/lib/CpaySDKBase.d.ts +30 -0
  5. package/lib/CpaySDKBase.js +216 -0
  6. package/lib/CryptoNowSDK.d.ts +30 -0
  7. package/lib/CryptoNowSDK.js +35 -0
  8. package/lib/CryptoNowSDKBase.d.ts +30 -0
  9. package/lib/CryptoNowSDKBase.js +216 -0
  10. package/lib/PaytonzSDK.d.ts +28 -0
  11. package/lib/PaytonzSDK.js +33 -0
  12. package/lib/PaytonzSDKBase.d.ts +30 -0
  13. package/lib/PaytonzSDKBase.js +198 -0
  14. package/lib/auth/auth.d.ts +9 -0
  15. package/lib/auth/auth.interface.d.ts +25 -0
  16. package/lib/auth/auth.interface.js +2 -0
  17. package/lib/auth/auth.js +37 -0
  18. package/lib/checkout/checkout.d.ts +24 -0
  19. package/lib/checkout/checkout.interface.d.ts +94 -0
  20. package/lib/checkout/checkout.interface.js +2 -0
  21. package/lib/checkout/checkout.js +215 -0
  22. package/lib/client/client.d.ts +11 -0
  23. package/lib/client/client.interface.d.ts +45 -0
  24. package/lib/client/client.interface.js +2 -0
  25. package/lib/client/client.js +62 -0
  26. package/lib/constant.d.ts +1 -0
  27. package/lib/constant.js +4 -0
  28. package/lib/currency/currency.d.ts +10 -0
  29. package/lib/currency/currency.interface.d.ts +20 -0
  30. package/lib/currency/currency.interface.js +2 -0
  31. package/lib/currency/currency.js +50 -0
  32. package/lib/external/external.d.ts +13 -0
  33. package/lib/external/external.interface.d.ts +59 -0
  34. package/lib/external/external.interface.js +12 -0
  35. package/lib/external/external.js +64 -0
  36. package/lib/external/external.solana.d.ts +9 -0
  37. package/lib/external/external.solana.js +47 -0
  38. package/lib/index.d.ts +5 -0
  39. package/lib/index.js +28 -0
  40. package/lib/interfaces/cpay.interface.d.ts +20 -0
  41. package/lib/interfaces/cpay.interface.js +2 -0
  42. package/lib/interfaces/cryptonow.interface.d.ts +20 -0
  43. package/lib/interfaces/cryptonow.interface.js +2 -0
  44. package/lib/interfaces/paytonz.interface.d.ts +20 -0
  45. package/lib/interfaces/paytonz.interface.js +2 -0
  46. package/lib/multisend/multisend.d.ts +11 -0
  47. package/lib/multisend/multisend.interface.d.ts +28 -0
  48. package/lib/multisend/multisend.interface.js +2 -0
  49. package/lib/multisend/multisend.js +75 -0
  50. package/lib/swap/swap.d.ts +11 -0
  51. package/lib/swap/swap.interface.d.ts +84 -0
  52. package/lib/swap/swap.interface.js +2 -0
  53. package/lib/swap/swap.js +75 -0
  54. package/lib/transaction/transaction.d.ts +9 -0
  55. package/lib/transaction/transaction.interface.d.ts +82 -0
  56. package/lib/transaction/transaction.interface.js +2 -0
  57. package/lib/transaction/transaction.js +34 -0
  58. package/lib/utils/httpClient.d.ts +9 -0
  59. package/lib/utils/httpClient.js +64 -0
  60. package/lib/wallet/wallet.d.ts +16 -0
  61. package/lib/wallet/wallet.interface.d.ts +60 -0
  62. package/lib/wallet/wallet.interface.js +2 -0
  63. package/lib/wallet/wallet.js +107 -0
  64. package/lib/wallet/wallet.signature.d.ts +14 -0
  65. package/lib/wallet/wallet.signature.js +104 -0
  66. package/lib/withdrawal/withdrawal.d.ts +14 -0
  67. package/lib/withdrawal/withdrawal.interface.d.ts +79 -0
  68. package/lib/withdrawal/withdrawal.interface.js +14 -0
  69. package/lib/withdrawal/withdrawal.js +104 -0
  70. package/package.json +26 -0
  71. package/src/PaytonzSDK.ts +41 -0
  72. package/src/PaytonzSDKBase.ts +252 -0
  73. package/src/auth/auth.interface.ts +26 -0
  74. package/src/auth/auth.ts +31 -0
  75. package/src/checkout/checkout.interface.ts +110 -0
  76. package/src/checkout/checkout.ts +279 -0
  77. package/src/constant.ts +1 -0
  78. package/src/currency/currency.interface.ts +21 -0
  79. package/src/currency/currency.ts +60 -0
  80. package/src/external/external.interface.ts +65 -0
  81. package/src/external/external.solana.ts +54 -0
  82. package/src/external/external.ts +73 -0
  83. package/src/index.ts +5 -0
  84. package/src/interfaces/paytonz.interface.ts +23 -0
  85. package/src/multisend/multisend.interface.ts +32 -0
  86. package/src/multisend/multisend.ts +91 -0
  87. package/src/swap/swap.interface.ts +90 -0
  88. package/src/swap/swap.ts +93 -0
  89. package/src/transaction/transaction.interface.ts +76 -0
  90. package/src/transaction/transaction.ts +35 -0
  91. package/src/utils/httpClient.ts +60 -0
  92. package/src/wallet/wallet.interface.ts +67 -0
  93. package/src/wallet/wallet.signature.ts +106 -0
  94. package/src/wallet/wallet.ts +103 -0
  95. package/src/withdrawal/withdrawal.interface.ts +89 -0
  96. package/src/withdrawal/withdrawal.ts +135 -0
  97. package/tsconfig.json +21 -0
package/README.md ADDED
@@ -0,0 +1,743 @@
1
+ # paytonz-node-sdk
2
+
3
+ ```
4
+ npm i paytonz-node-api-sdk
5
+ ```
6
+
7
+ ```
8
+ import PaytonzSDK from 'paytonz-node-api-sdk';
9
+
10
+ let options = {
11
+ publicKey: 'publicKey',
12
+ privateKey: 'privateKey',
13
+ walletId?: 'walletId',
14
+ passphrase?: 'passphrase'
15
+ }
16
+ const paytonz = new PaytonzSDK(options)
17
+ ```
18
+
19
+ Available Methods:
20
+
21
+ 1. Auth
22
+
23
+ ```
24
+ Create account
25
+
26
+ let options = {
27
+ email: string;
28
+ password: string;
29
+ inviterId?: string;
30
+ roles: string[];
31
+ agent?: string;
32
+ }
33
+
34
+ const result = await paytonz.auth.register(options);
35
+ ```
36
+
37
+ 2. Wallet
38
+
39
+ ```
40
+ Create deposit wallet.
41
+
42
+ let options = {
43
+ currencyId?: string;
44
+ typeWallet?: string; // user, merchant
45
+ privateKey?: string;
46
+ isMnemonic?: boolean;
47
+ setMain?: boolean;
48
+ password?: string;
49
+ isNew?: boolean;
50
+ }
51
+ Available Currencies: See point 5.
52
+ const wallet = await paytonz.wallet.createDepositWallet(options);
53
+ ```
54
+
55
+ ```
56
+ Get wallet info
57
+
58
+ walletId - is required.
59
+ passphrase - is required.
60
+ const walletInfo = await paytonz.wallet.getWalletInfo();
61
+
62
+ ```
63
+
64
+ ```
65
+ Get private key
66
+
67
+ walletId - is required.
68
+ passphrase - is required.
69
+ const pk = await paytonz.wallet.getPrivateKey();
70
+
71
+ ```
72
+
73
+ ```
74
+ Get mnemonic
75
+
76
+ walletId - is required.
77
+ passphrase - is required.
78
+ const pk = await paytonz.wallet.getMnemonic();
79
+
80
+ ```
81
+
82
+ 3. Withdrawal
83
+
84
+ ```
85
+ Estimate transaction fee.
86
+
87
+ let options = {
88
+ to: string;
89
+ amount: string;
90
+ priority?: string;
91
+ currencyToken?: string;
92
+ sign?: string;
93
+ password?: string;
94
+ payerFeePrivateKey?: string; // Only solana
95
+ comment?: string; //Only TON
96
+ }
97
+ walletId - is required.
98
+ passphrase - is required.
99
+ const estimateFee = await paytonz.withdrawal.estimateFee(options);
100
+ ```
101
+
102
+ ```
103
+ Estimate nft transaction fee.
104
+
105
+ let options = {
106
+ to: string;
107
+ amount: string;
108
+ contractAddress: string;
109
+ tokenId: number;
110
+ type: string; //erc721 or erc1155
111
+ sign?: string;
112
+ password?: string;
113
+ payerFeePrivateKey?: string; // Only solana
114
+ }
115
+ walletId - is required.
116
+ passphrase - is required.
117
+ const estimateFee = await paytonz.withdrawal.estimateNftFee(options);
118
+ ```
119
+
120
+ ```
121
+ Estimate max withdrawal.
122
+
123
+ let options = {
124
+ to: string;
125
+ currencyToken?: string;
126
+ sign?: string;
127
+ password?: string;
128
+ payerFeePrivateKey?: string; // Only solana
129
+ priority?: string;
130
+ }
131
+ walletId - is required.
132
+ passphrase - is required.
133
+ const max = await paytonz.withdrawal.estimateMax(options);
134
+ ```
135
+
136
+ ```
137
+ Create withdrawal request.
138
+
139
+ let options = {
140
+ to: string;
141
+ amount: string;
142
+ priority?: string;
143
+ currencyToken?: string;
144
+ sign?: string;
145
+ password?: string;
146
+ payerFeePrivateKey?: string; // Only solana
147
+ idempotencyKey?: string;
148
+ }
149
+ walletId - is required.
150
+ passphrase - is required.
151
+ const withdrawal = await paytonz.withdrawal.create(options);
152
+ ```
153
+
154
+ ```
155
+ Create nft withdrawal request.
156
+
157
+ let options = {
158
+ to: string;
159
+ amount: string;
160
+ contractAddress: string;
161
+ tokenId: number;
162
+ type: string; //erc721 or erc1155
163
+ sign?: string;
164
+ password?: string;
165
+ payerFeePrivateKey?: string; // Only solana
166
+ idempotencyKey?: string;
167
+ }
168
+ walletId - is required.
169
+ passphrase - is required.
170
+ const withdrawal = await paytonz.withdrawal.nftTransfer(options);
171
+ ```
172
+
173
+ ```
174
+ Create InternalTransfer request.
175
+
176
+ let options = {
177
+ to: string;
178
+ amount: string;
179
+ idempotencyKey?: string;
180
+ }
181
+ walletId - is required.
182
+ passphrase - is required.
183
+ const withdrawal = await paytonz.withdrawal.internalTransfer(options);
184
+ ```
185
+
186
+ 4. Available merchant currencies
187
+
188
+ ```
189
+ let options = {
190
+ }
191
+ const currencies = await paytonz.currency.getAvailableCurrencies(options);
192
+ ```
193
+
194
+ 5. Multisend
195
+
196
+ ```
197
+ Estimate system fee.
198
+ let options = {
199
+ currencyToken: string;
200
+ multisendWallets: { address: string; amount: string }[];
201
+ sign?: string;
202
+ password?: string;
203
+ }
204
+ const estimateData = await paytonz.multisend.estimateSystemFee(options);
205
+ ```
206
+
207
+ ```
208
+ Approve.
209
+ let options = {
210
+ estimationId: string;
211
+ sign?: string;
212
+ password?: string;
213
+ idempotencyKey?: string;
214
+ }
215
+ const approveData = await paytonz.multisend.approve(options);
216
+ ```
217
+
218
+ ```
219
+ Estimate miner fee.
220
+ let options = {
221
+ estimationId: string;
222
+ sign?: string;
223
+ password?: string;
224
+ }
225
+ const approveData = await paytonz.multisend.estimateMinerFee(options);
226
+ ```
227
+
228
+ ```
229
+ Create multisend.
230
+ let options = {
231
+ estimationId: string;
232
+ sign?: string;
233
+ password?: string;
234
+ idempotencyKey?: string;
235
+ }
236
+ const result = await paytonz.multisend.create(options);
237
+ ```
238
+
239
+ 6. Checkout
240
+
241
+ ```
242
+ Checkout list.
243
+
244
+ let options = {
245
+ search?: 'string',
246
+ sort?: string,
247
+ order?: string,
248
+ page?: number,
249
+ limit?: number
250
+ }
251
+ const checkoutList = await paytonz.checkout.list(options);
252
+ ```
253
+
254
+ ```
255
+ Create donation checkout.
256
+
257
+ let options = {
258
+ linkImage?: string;
259
+ linkLogoImage?: string;
260
+ metadata?: Record<string, any>;
261
+ accentColor?: string;
262
+ backgroundColor?: string;
263
+ expireTime: number,
264
+ currencies: string[],
265
+ collectName?: boolean,
266
+ collectEmail?: boolean,
267
+ description: string,
268
+ organizationName: string
269
+ }
270
+
271
+ const createDonation = await paytonz.checkout.createDonation(options);
272
+ ```
273
+
274
+ ```
275
+ Create cart checkout.
276
+
277
+ let options = {
278
+ linkImage?: string;
279
+ linkLogoImage?: string;
280
+ metadata?: Record<string, any>;
281
+ accentColor?: string;
282
+ backgroundColor?: string;
283
+ expireTime: number;
284
+ currencies: string[];
285
+ collectName?: boolean;
286
+ collectEmail?: boolean;
287
+ description: string;
288
+ organizationName: string;
289
+ cartName: string;
290
+ fiatCurrency: string;
291
+ }
292
+
293
+ const createDonation = await paytonz.checkout.createCart(options);
294
+ ```
295
+
296
+ ```
297
+ Create sale checkout.
298
+
299
+ let options = {
300
+ linkImage?: string;
301
+ linkLogoImage?: string;
302
+ metadata?: Record<string, any>;
303
+ accentColor?: string;
304
+ backgroundColor?: string;
305
+ expireTime: number;
306
+ currencies: string[];
307
+ collectName?: boolean;
308
+ collectEmail?: boolean;
309
+ description: string;
310
+ productName: string;
311
+ price: string;
312
+ fiatCurrency: string;
313
+ }
314
+
315
+ const createSale = await paytonz.checkout.createSale(options);
316
+ ```
317
+
318
+ ```
319
+ Create sale token checkout.
320
+
321
+ let options = {
322
+ linkImage?: string;
323
+ linkLogoImage?: string;
324
+ metadata?: Record<string, any>;
325
+ accentColor?: string;
326
+ backgroundColor?: string;
327
+ expireTime: number;
328
+ currencies: string[];
329
+ collectName: boolean;
330
+ collectEmail: boolean;
331
+ description: string;
332
+ productName: string;
333
+ price?: string;
334
+ min: string;
335
+ max: string;
336
+ fiatCurrency?: string;
337
+ fixed: string;
338
+ tradedCurrency: string;
339
+ tradedWallet: string;
340
+ }
341
+
342
+ const createSaleToken = await paytonz.checkout.createSaleToken(options);
343
+ ```
344
+
345
+ ```
346
+ Estimate sale token max value.
347
+
348
+ let options = {
349
+ tradedWallet: string;
350
+ tradedCurrency: string;
351
+ checkoutId?: string;
352
+ }
353
+
354
+ const saleTokenEstimateMax = await paytonz.checkout.saleTokenEstimateMax(options);
355
+ ```
356
+
357
+ ```
358
+ Get checkout info.
359
+
360
+ const info = await paytonz.checkout.info(checkoutId: string);
361
+ ```
362
+
363
+ ```
364
+ Delete checkout.
365
+
366
+ const remove = await paytonz.checkout.remove(checkoutId: string);
367
+ ```
368
+
369
+ ```
370
+ Update donation checkout.
371
+
372
+ let options = {
373
+ linkImage?: string;
374
+ linkLogoImage?: string;
375
+ metadata?: Record<string, any>;
376
+ accentColor?: string;
377
+ backgroundColor?: string;
378
+ expireTime: number,
379
+ currencies: string[],
380
+ collectName?: boolean,
381
+ collectEmail?: boolean,
382
+ description: string,
383
+ organizationName: string,
384
+ deleteImage?: boolean;
385
+ deleteLogoImage?: boolean;
386
+ }
387
+
388
+ const updateDonation = await paytonz.checkout.updateDonation(checkoutId, options);
389
+ ```
390
+
391
+ ```
392
+ Update sale checkout.
393
+
394
+ let options = {
395
+ linkImage?: string;
396
+ linkLogoImage?: string;
397
+ metadata?: Record<string, any>;
398
+ accentColor?: string;
399
+ backgroundColor?: string;
400
+ expireTime: number;
401
+ currencies: string[];
402
+ collectName?: boolean;
403
+ collectEmail?: boolean;
404
+ description: string;
405
+ productName: string;
406
+ price: string;
407
+ fiatCurrency: string;
408
+ deleteImage?: boolean;
409
+ deleteLogoImage?: boolean;
410
+ }
411
+
412
+ const updateSale = await paytonz.checkout.updateSale(checkoutId, options);
413
+ ```
414
+
415
+ ```
416
+ Update sale token checkout.
417
+
418
+ let options = {
419
+ linkImage?: string;
420
+ linkLogoImage?: string;
421
+ metadata?: Record<string, any>;
422
+ accentColor?: string;
423
+ backgroundColor?: string;
424
+ expireTime: number;
425
+ currencies: string[];
426
+ collectName: boolean;
427
+ collectEmail: boolean;
428
+ description: string;
429
+ productName: string;
430
+ price?: string;
431
+ min: string;
432
+ max: string;
433
+ fiatCurrency?: string;
434
+ fixed: string;
435
+ tradedCurrency: string;
436
+ tradedWallet: string;
437
+ deleteImage?: boolean;
438
+ deleteLogoImage?: boolean;
439
+ }
440
+
441
+ const updateSaleToken = await paytonz.checkout.updateSaleToken(checkoutId, options);
442
+ ```
443
+
444
+ ```
445
+ Update cart checkout.
446
+
447
+ let options = {
448
+ linkImage?: string;
449
+ linkLogoImage?: string;
450
+ metadata?: Record<string, any>;
451
+ accentColor?: string;
452
+ backgroundColor?: string;
453
+ expireTime: number;
454
+ currencies: string[];
455
+ collectName?: boolean;
456
+ collectEmail?: boolean;
457
+ description: string;
458
+ organizationName: string;
459
+ cartName: string;
460
+ fiatCurrency: string;
461
+ deleteImage?: boolean;
462
+ deleteLogoImage?: boolean;
463
+ }
464
+
465
+ const updateCart = await paytonz.checkout.updateCart(checkoutId, options);
466
+ ```
467
+
468
+ ```
469
+ Get charges list by checkout
470
+
471
+ let options = {
472
+ search?: 'string',
473
+ sort?: string,
474
+ order?: string,
475
+ page?: number,
476
+ limit?: number
477
+ }
478
+
479
+ const updateSaleToken = await paytonz.checkout.chargeList(checkoutId, options);
480
+ ```
481
+
482
+ 7. Transaction
483
+
484
+ ```
485
+ Transaction list.
486
+ walletId - is required.
487
+ passphrase - is required.
488
+
489
+ let options = {
490
+ search?: string;
491
+ from?: number;
492
+ to?: number;
493
+ currencyId?: string;
494
+ fromUSD?: number;
495
+ toUSD?: number;
496
+ type?: string;
497
+ status?: string;
498
+ sort?: string;
499
+ order?: string;
500
+ page?: number;
501
+ limit?: number;
502
+ }
503
+ const transactionList = await paytonz.transaction.list(options);
504
+ ```
505
+
506
+ 8. External call
507
+
508
+ ```
509
+ Read from contract.
510
+ walletId - is required.
511
+ passphrase - is required.
512
+
513
+ let options = {
514
+ abi: Record<string, any>[];
515
+ contractAddress: string;
516
+ method: string;
517
+ args?: any[];
518
+ value?: string;
519
+ options?: Record<string, any>;
520
+ }
521
+ const info = await paytonz.externalCall.read(options);
522
+ ```
523
+
524
+ ```
525
+ Estimate write.
526
+ walletId - is required.
527
+ passphrase - is required.
528
+
529
+ let options = {
530
+ abi: Record<string, any>[];
531
+ contractAddress: string;
532
+ method: string;
533
+ args?: any[];
534
+ value?: string;
535
+ options?: Record<string, any>;
536
+ sign?: string;
537
+ password?: string;
538
+ }
539
+ const info = await paytonz.externalCall.estimateWrite(options);
540
+ ```
541
+
542
+ ```
543
+ Write to the contract.
544
+ walletId - is required.
545
+ passphrase - is required.
546
+
547
+ let options = {
548
+ abi: Record<string, any>[];
549
+ contractAddress: string;
550
+ method: string;
551
+ args?: any[];
552
+ value?: string;
553
+ options?: Record<string, any>;
554
+ sign?: string;
555
+ password?: string;
556
+ idempotencyKey?: string;
557
+ }
558
+ const info = await paytonz.externalCall.write(options);
559
+ ```
560
+
561
+ ```
562
+ Mint Solana Nft
563
+ walletId - is required.
564
+ passphrase - is required.
565
+
566
+ let options = {
567
+ name: string;
568
+ description: string;
569
+ symbol: string;
570
+ attributes?: SolanaMetadataOptions[];
571
+ type: SolanaNftType;
572
+ image?: string;
573
+ sellerFeeBasisPoints?: number;
574
+ collectionAddress?: string;
575
+ storage?: SolanaNftStorageType;
576
+ collectionInfo?: SolanaCollectionInfo;
577
+ payerFeePrivateKey?: string;
578
+ sign?: string;
579
+ password?: string;
580
+ tokenOwner?: string;
581
+ creators?: {address: string; share: number}[]
582
+ imageLink?: srting;
583
+ }
584
+ const result = await paytonz.externalCall.solana.mintNft(options);
585
+ ```
586
+
587
+ ```
588
+ Estimate Mint Solana Nft
589
+ walletId - is required.
590
+ passphrase - is required.
591
+
592
+ let options = {
593
+ name: string;
594
+ description: string;
595
+ symbol: string;
596
+ attributes?: SolanaMetadataOptions[];
597
+ type: SolanaNftType;
598
+ image: string;
599
+ sellerFeeBasisPoints?: number;
600
+ collectionAddress?: string;
601
+ storage?: SolanaNftStorageType;
602
+ collectionInfo?: SolanaCollectionInfo;
603
+ payerFeePrivateKey?: string;
604
+ sign?: string;
605
+ password?: string;
606
+ tokenOwner?: string;
607
+ creators?: {address: string; share: number}[]
608
+ imageLink?: srting;
609
+ }
610
+ const result = await paytonz.externalCall.solana.estimateMintNft(options);
611
+ ```
612
+
613
+ 9. Swap
614
+
615
+ ```
616
+ Estimate swap
617
+ walletId - is not required.
618
+ passphrase - is not required.
619
+
620
+ let options = {
621
+ fromId: string; // currencyId
622
+ toId: string; // currencyId
623
+ amount: string;
624
+ sort?: string; // rate or duration
625
+ type?: string; // fixed or float
626
+ }
627
+ const result = await paytonz.swap.estimate(options);
628
+ ```
629
+
630
+ ```
631
+ Best offer swap
632
+ walletId - is required.
633
+ passphrase - is required.
634
+
635
+ let options = {
636
+ fromId: string; // currencyId
637
+ toId: string; // currencyId
638
+ amount: string;
639
+ type?: string; // fixed or float
640
+ }
641
+ const result = await paytonz.swap.bestOffer(options);
642
+ ```
643
+
644
+ ```
645
+ Create swap
646
+ walletId - is required.
647
+ passphrase - is required.
648
+
649
+ let options = {
650
+ currencyFromId: string; // currencyId
651
+ toId: string; // walletId
652
+ currencyToId: string; // currencyId
653
+ amount: number;
654
+ partner: string;
655
+ fixed: boolean;
656
+ rateId: string;
657
+ sign?: string;
658
+ password?: string;
659
+ idempotencyKey?: string;
660
+ }
661
+ const result = await paytonz.swap.create(options);
662
+ ```
663
+
664
+ ```
665
+ History swap
666
+ walletId - is not required.
667
+ passphrase - is not required.
668
+
669
+ let options = {
670
+ currencyFromId?: string;
671
+ currencyToId?: string;
672
+ search?: string;
673
+ sort?: string;
674
+ order?: string;
675
+ page?: number;
676
+ limit?: number;
677
+ }
678
+ const result = await paytonz.swap.history(options);
679
+ ```
680
+
681
+ 10. Wallet Signature
682
+
683
+ ```
684
+ Enable Signature
685
+ walletId - is required.
686
+ passphrase - is required.
687
+
688
+ let options = {
689
+ sign: string;
690
+ password?: string;
691
+ }
692
+ const result = await paytonz.wallet.signature.on(options);
693
+ ```
694
+
695
+ ```
696
+ Disable Signature
697
+ walletId - is required.
698
+ passphrase - is required.
699
+
700
+ let options = {
701
+ password: string;
702
+ }
703
+ const result = await paytonz.wallet.signature.off(options);
704
+ ```
705
+
706
+ ```
707
+ Download Signature
708
+ walletId - is required.
709
+ passphrase - is required.
710
+
711
+ let options = {
712
+ password: string;
713
+ }
714
+ const result = await paytonz.wallet.signature.download(options);
715
+ ```
716
+
717
+ ```
718
+ Status Signature
719
+ walletId - is required.
720
+ passphrase - is required.
721
+
722
+ const result = await paytonz.wallet.signature.status();
723
+ ```
724
+
725
+ ```
726
+ Change Password Signature
727
+ walletId - is required.
728
+ passphrase - is required.
729
+
730
+ let options = {
731
+ oldPassword?: string;
732
+ password: string;
733
+ }
734
+ const result = await paytonz.wallet.signature.changePassword(options);
735
+ ```
736
+
737
+ ```
738
+ Get Status Password Signature
739
+ walletId - is required.
740
+ passphrase - is required.
741
+
742
+ const result = await paytonz.wallet.signature.passwordStatus();
743
+ ```