zano_web3 10.1.0 → 10.2.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 (108) hide show
  1. package/README.md +17 -142
  2. package/package.json +2 -5
  3. package/web/dist/constants/common/index.d.ts +4 -0
  4. package/web/dist/constants/common/index.js +12 -0
  5. package/web/dist/constants/common/index.js.map +1 -0
  6. package/web/dist/constants/index.d.ts +1 -0
  7. package/web/dist/constants/index.js +2 -0
  8. package/web/dist/constants/index.js.map +1 -0
  9. package/web/dist/index.d.ts +1 -0
  10. package/web/dist/index.js +1 -0
  11. package/web/dist/index.js.map +1 -1
  12. package/web/dist/types/params/companion-requests/accept-ionic-swap/index.d.ts +3 -0
  13. package/web/dist/types/params/companion-requests/accept-ionic-swap/index.js +2 -0
  14. package/web/dist/types/params/companion-requests/accept-ionic-swap/index.js.map +1 -0
  15. package/web/dist/types/params/companion-requests/add-whitelist-asset/index.d.ts +3 -0
  16. package/web/dist/types/params/companion-requests/add-whitelist-asset/index.js +2 -0
  17. package/web/dist/types/params/companion-requests/add-whitelist-asset/index.js.map +1 -0
  18. package/web/dist/types/params/companion-requests/burn-asset/index.d.ts +28 -0
  19. package/web/dist/types/params/companion-requests/burn-asset/index.js +2 -0
  20. package/web/dist/types/params/companion-requests/burn-asset/index.js.map +1 -0
  21. package/web/dist/types/params/companion-requests/create-alias/index.d.ts +3 -0
  22. package/web/dist/types/params/companion-requests/create-alias/index.js +2 -0
  23. package/web/dist/types/params/companion-requests/create-alias/index.js.map +1 -0
  24. package/web/dist/types/params/companion-requests/get-address-by-alias/index.d.ts +3 -0
  25. package/web/dist/types/params/companion-requests/get-address-by-alias/index.js +2 -0
  26. package/web/dist/types/params/companion-requests/get-address-by-alias/index.js.map +1 -0
  27. package/web/dist/types/params/companion-requests/get-ionic-swap-info/index.d.ts +3 -0
  28. package/web/dist/types/params/companion-requests/get-ionic-swap-info/index.js +2 -0
  29. package/web/dist/types/params/companion-requests/get-ionic-swap-info/index.js.map +1 -0
  30. package/web/dist/types/params/companion-requests/index.d.ts +4 -1
  31. package/web/dist/types/params/companion-requests/initialize-ionic-swap/index.d.ts +14 -0
  32. package/web/dist/types/params/companion-requests/initialize-ionic-swap/index.js +2 -0
  33. package/web/dist/types/params/companion-requests/initialize-ionic-swap/index.js.map +1 -0
  34. package/web/dist/types/params/companion-requests/request-message-sign/index.d.ts +3 -0
  35. package/web/dist/types/params/companion-requests/request-message-sign/index.js +2 -0
  36. package/web/dist/types/params/companion-requests/request-message-sign/index.js.map +1 -0
  37. package/web/dist/types/params/companion-requests/request-permissions/index.d.ts +7 -2
  38. package/web/dist/types/params/companion-requests/transfer/index.d.ts +22 -0
  39. package/web/dist/types/params/companion-requests/transfer/index.js +2 -0
  40. package/web/dist/types/params/companion-requests/transfer/index.js.map +1 -0
  41. package/web/dist/types/responses/companion-methods/accept-ionic-swap/index.d.ts +24 -0
  42. package/web/dist/types/responses/companion-methods/accept-ionic-swap/index.js +21 -0
  43. package/web/dist/types/responses/companion-methods/accept-ionic-swap/index.js.map +1 -0
  44. package/web/dist/types/responses/companion-methods/add-whitelist-asset/index.d.ts +48 -0
  45. package/web/dist/types/responses/companion-methods/add-whitelist-asset/index.js +40 -0
  46. package/web/dist/types/responses/companion-methods/add-whitelist-asset/index.js.map +1 -0
  47. package/web/dist/types/responses/companion-methods/burn-asset/index.d.ts +24 -0
  48. package/web/dist/types/responses/companion-methods/burn-asset/index.js +21 -0
  49. package/web/dist/types/responses/companion-methods/burn-asset/index.js.map +1 -0
  50. package/web/dist/types/responses/companion-methods/create-alias/index.d.ts +14 -1
  51. package/web/dist/types/responses/companion-methods/create-alias/index.js +12 -1
  52. package/web/dist/types/responses/companion-methods/create-alias/index.js.map +1 -1
  53. package/web/dist/types/responses/companion-methods/get-address-by-alias/index.d.ts +10 -2
  54. package/web/dist/types/responses/companion-methods/get-address-by-alias/index.js +7 -1
  55. package/web/dist/types/responses/companion-methods/get-address-by-alias/index.js.map +1 -1
  56. package/web/dist/types/responses/companion-methods/get-ionic-swap-info/index.d.ts +49 -0
  57. package/web/dist/types/responses/companion-methods/get-ionic-swap-info/index.js +32 -0
  58. package/web/dist/types/responses/companion-methods/get-ionic-swap-info/index.js.map +1 -0
  59. package/web/dist/types/responses/companion-methods/get-permissions/index.d.ts +21 -0
  60. package/web/dist/types/responses/companion-methods/get-permissions/index.js +10 -0
  61. package/web/dist/types/responses/companion-methods/get-permissions/index.js.map +1 -0
  62. package/web/dist/types/responses/companion-methods/get-wallet-balance/index.d.ts +73 -0
  63. package/web/dist/types/responses/companion-methods/get-wallet-balance/index.js +44 -0
  64. package/web/dist/types/responses/companion-methods/get-wallet-balance/index.js.map +1 -0
  65. package/web/dist/types/responses/companion-methods/get-whitelist/index.d.ts +29 -0
  66. package/web/dist/types/responses/companion-methods/get-whitelist/index.js +17 -0
  67. package/web/dist/types/responses/companion-methods/get-whitelist/index.js.map +1 -0
  68. package/web/dist/types/responses/companion-methods/index.d.ts +9 -0
  69. package/web/dist/types/responses/companion-methods/initialize-ionic-swap/index.d.ts +22 -0
  70. package/web/dist/types/responses/companion-methods/initialize-ionic-swap/index.js +21 -0
  71. package/web/dist/types/responses/companion-methods/initialize-ionic-swap/index.js.map +1 -0
  72. package/web/dist/types/responses/companion-methods/request-message-sign/index.d.ts +6 -2
  73. package/web/dist/types/responses/companion-methods/request-message-sign/index.js +13 -6
  74. package/web/dist/types/responses/companion-methods/request-message-sign/index.js.map +1 -1
  75. package/web/dist/types/responses/companion-methods/transfer/index.d.ts +35 -0
  76. package/web/dist/types/responses/companion-methods/transfer/index.js +25 -0
  77. package/web/dist/types/responses/companion-methods/transfer/index.js.map +1 -0
  78. package/web/dist/zano-wallet.d.ts +43 -6
  79. package/web/dist/zano-wallet.js +359 -14
  80. package/web/dist/zano-wallet.js.map +1 -1
  81. package/web/src/constants/common/index.ts +15 -0
  82. package/web/src/constants/index.ts +5 -0
  83. package/web/src/index.ts +1 -0
  84. package/web/src/types/params/companion-requests/accept-ionic-swap/index.ts +3 -0
  85. package/web/src/types/params/companion-requests/add-whitelist-asset/index.ts +3 -0
  86. package/web/src/types/params/companion-requests/burn-asset/index.ts +31 -0
  87. package/web/src/types/params/companion-requests/create-alias/index.ts +3 -0
  88. package/web/src/types/params/companion-requests/get-address-by-alias/index.ts +3 -0
  89. package/web/src/types/params/companion-requests/get-ionic-swap-info/index.ts +3 -0
  90. package/web/src/types/params/companion-requests/index.ts +4 -1
  91. package/web/src/types/params/companion-requests/initialize-ionic-swap/index.ts +15 -0
  92. package/web/src/types/params/companion-requests/request-message-sign/index.ts +3 -0
  93. package/web/src/types/params/companion-requests/request-permissions/index.ts +9 -2
  94. package/web/src/types/params/companion-requests/transfer/index.ts +17 -0
  95. package/web/src/types/responses/companion-methods/accept-ionic-swap/index.ts +33 -0
  96. package/web/src/types/responses/companion-methods/add-whitelist-asset/index.ts +53 -0
  97. package/web/src/types/responses/companion-methods/burn-asset/index.ts +33 -0
  98. package/web/src/types/responses/companion-methods/create-alias/index.ts +15 -1
  99. package/web/src/types/responses/companion-methods/get-address-by-alias/index.ts +13 -2
  100. package/web/src/types/responses/companion-methods/get-ionic-swap-info/index.ts +45 -0
  101. package/web/src/types/responses/companion-methods/get-permissions/index.ts +24 -0
  102. package/web/src/types/responses/companion-methods/get-wallet-balance/index.ts +57 -0
  103. package/web/src/types/responses/companion-methods/get-whitelist/index.ts +30 -0
  104. package/web/src/types/responses/companion-methods/index.ts +10 -1
  105. package/web/src/types/responses/companion-methods/initialize-ionic-swap/index.ts +31 -0
  106. package/web/src/types/responses/companion-methods/request-message-sign/index.ts +13 -6
  107. package/web/src/types/responses/companion-methods/transfer/index.ts +38 -0
  108. package/web/src/zano-wallet.ts +470 -15
@@ -1,12 +1,25 @@
1
1
  import z from 'zod';
2
2
  export declare const createAliasCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3
- data: z.ZodLiteral<true>;
3
+ data: z.ZodObject<{
4
+ result: z.ZodObject<{
5
+ tx_id: z.ZodString;
6
+ }, z.core.$strip>;
7
+ }, z.core.$strip>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ data: z.ZodObject<{
10
+ error: z.ZodObject<{
11
+ code: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>;
13
+ }, z.core.$strip>;
4
14
  }, z.core.$strip>, z.ZodObject<{
5
15
  error: z.ZodString;
6
16
  }, z.core.$strip>]>;
7
17
  export type CreateAliasCompanionResponse = z.infer<typeof createAliasCompanionResponseSchema>;
8
18
  export type CreateAliasResponse = {
9
19
  success: true;
20
+ data: {
21
+ tx_id: string;
22
+ };
10
23
  } | {
11
24
  success: false;
12
25
  error: string;
@@ -1,7 +1,18 @@
1
1
  import z from 'zod';
2
2
  export const createAliasCompanionResponseSchema = z.union([
3
3
  z.object({
4
- data: z.literal(true),
4
+ data: z.object({
5
+ result: z.object({
6
+ tx_id: z.string(),
7
+ })
8
+ }),
9
+ }),
10
+ z.object({
11
+ data: z.object({
12
+ error: z.object({
13
+ code: z.number().optional(),
14
+ })
15
+ }),
5
16
  }),
6
17
  z.object({
7
18
  error: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/create-alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC;IACtD,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;KACxB,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/create-alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC;IACtD,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;gBACb,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;aACpB,CAAC;SACL,CAAC;KACL,CAAC;IACD,CAAC,CAAC,MAAM,CAAC;QACN,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;gBACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC9B,CAAC;SACL,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -1,11 +1,19 @@
1
1
  import z from 'zod';
2
- export declare const getAddressByAliasCompanionResponseSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
2
+ export declare const getAddressByAliasCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3
+ address: z.ZodString;
4
+ comment: z.ZodString;
5
+ tracking_key: z.ZodString;
6
+ }, z.core.$strip>, z.ZodLiteral<"">, z.ZodObject<{
3
7
  error: z.ZodString;
4
8
  }, z.core.$strip>]>;
5
9
  export type GetAddressByAliasCompanionResponse = z.infer<typeof getAddressByAliasCompanionResponseSchema>;
6
10
  export type GetAddressByAliasResponse = {
7
11
  success: true;
8
- data: string;
12
+ data: {
13
+ address: string;
14
+ comment: string;
15
+ tracking_key: string;
16
+ };
9
17
  } | {
10
18
  success: false;
11
19
  error: string;
@@ -1,6 +1,12 @@
1
1
  import z from 'zod';
2
2
  export const getAddressByAliasCompanionResponseSchema = z.union([
3
- z.string(),
3
+ z.object({
4
+ address: z.string(),
5
+ comment: z.string(),
6
+ tracking_key: z.string(),
7
+ }),
8
+ // Error responses
9
+ z.literal(''),
4
10
  z.object({
5
11
  error: z.string(),
6
12
  })
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/get-address-by-alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5D,CAAC,CAAC,MAAM,EAAE;IACV,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/get-address-by-alias/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,KAAK,CAAC;IAC5D,CAAC,CAAC,MAAM,CAAC;QACL,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;QACnB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;KAC3B,CAAC;IAEF,kBAAkB;IAClB,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import z from "zod";
2
+ declare const getIonicSwapProposalInfoCompanionResponseInfoSchema: z.ZodObject<{
3
+ proposal: z.ZodObject<{
4
+ fee_paid_by_a: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
5
+ to_finalizer: z.ZodArray<z.ZodObject<{
6
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
7
+ asset_id: z.ZodString;
8
+ }, z.core.$strip>>;
9
+ to_initiator: z.ZodArray<z.ZodObject<{
10
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
11
+ asset_id: z.ZodString;
12
+ }, z.core.$strip>>;
13
+ }, z.core.$strip>;
14
+ }, z.core.$strip>;
15
+ export declare const getIonicSwapProposalInfoCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
16
+ data: z.ZodObject<{
17
+ result: z.ZodObject<{
18
+ proposal: z.ZodObject<{
19
+ fee_paid_by_a: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
20
+ to_finalizer: z.ZodArray<z.ZodObject<{
21
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
22
+ asset_id: z.ZodString;
23
+ }, z.core.$strip>>;
24
+ to_initiator: z.ZodArray<z.ZodObject<{
25
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
26
+ asset_id: z.ZodString;
27
+ }, z.core.$strip>>;
28
+ }, z.core.$strip>;
29
+ }, z.core.$strip>;
30
+ }, z.core.$strip>;
31
+ }, z.core.$strip>, z.ZodObject<{
32
+ data: z.ZodObject<{
33
+ error: z.ZodObject<{
34
+ code: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strip>;
36
+ }, z.core.$strip>;
37
+ }, z.core.$strip>, z.ZodObject<{
38
+ error: z.ZodString;
39
+ }, z.core.$strip>]>;
40
+ export type GetIonicSwapProposalInfoResponseInfo = z.infer<typeof getIonicSwapProposalInfoCompanionResponseInfoSchema>;
41
+ export type GetIonicSwapProposalInfoCompanionResponse = z.infer<typeof getIonicSwapProposalInfoCompanionResponseSchema>;
42
+ export type GetIonicSwapProposalInfoResponse = {
43
+ success: true;
44
+ data: GetIonicSwapProposalInfoResponseInfo;
45
+ } | {
46
+ success: false;
47
+ error: string;
48
+ };
49
+ export {};
@@ -0,0 +1,32 @@
1
+ import z from "zod";
2
+ const getIonicSwapProposalInfoCompanionResponseInfoSchema = z.object({
3
+ proposal: z.object({
4
+ fee_paid_by_a: z.union([z.string(), z.number()]),
5
+ to_finalizer: z.array(z.object({
6
+ amount: z.union([z.string(), z.number()]),
7
+ asset_id: z.string(),
8
+ })),
9
+ to_initiator: z.array(z.object({
10
+ amount: z.union([z.string(), z.number()]),
11
+ asset_id: z.string(),
12
+ })),
13
+ })
14
+ });
15
+ export const getIonicSwapProposalInfoCompanionResponseSchema = z.union([
16
+ z.object({
17
+ data: z.object({
18
+ result: getIonicSwapProposalInfoCompanionResponseInfoSchema,
19
+ })
20
+ }),
21
+ z.object({
22
+ data: z.object({
23
+ error: z.object({
24
+ code: z.number().optional(),
25
+ })
26
+ }),
27
+ }),
28
+ z.object({
29
+ error: z.string(),
30
+ })
31
+ ]);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/get-ionic-swap-info/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,mDAAmD,GAAG,CAAC,CAAC,MAAM,CAAC;IACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAChD,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;SACvB,CAAC,CAAC;QACH,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;YAC3B,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YACzC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;SACvB,CAAC,CAAC;KACN,CAAC;CACL,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,+CAA+C,GAAG,CAAC,CAAC,KAAK,CAAC;IACnE,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,MAAM,EAAE,mDAAmD;SAC9D,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;gBACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC9B,CAAC;SACL,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import z from "zod";
2
+ export declare const getPermissionsCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3
+ data: z.ZodArray<z.ZodEnum<{
4
+ history: "history";
5
+ general: "general";
6
+ balance: "balance";
7
+ }>>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ error: z.ZodString;
10
+ }, z.core.$strip>]>;
11
+ export type GetPermissionsCompanionResponse = z.infer<typeof getPermissionsCompanionResponseSchema>;
12
+ export type GetPermissionsResponsePermission = 'general' | 'balance' | 'history';
13
+ export type GetPermissionsResponse = {
14
+ success: true;
15
+ data: {
16
+ permissions: GetPermissionsResponsePermission[];
17
+ };
18
+ } | {
19
+ success: false;
20
+ error: string;
21
+ };
@@ -0,0 +1,10 @@
1
+ import z from "zod";
2
+ export const getPermissionsCompanionResponseSchema = z.union([
3
+ z.object({
4
+ data: z.array(z.enum(['general', 'balance', 'history']))
5
+ }),
6
+ z.object({
7
+ error: z.string(),
8
+ })
9
+ ]);
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/get-permissions/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC;IACzD,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;KAC3D,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,73 @@
1
+ import z from "zod";
2
+ declare const getWalletBalanceCompanionResponseBalanceSchema: z.ZodObject<{
3
+ balance: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
4
+ unlocked_balance: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
5
+ balances: z.ZodArray<z.ZodObject<{
6
+ asset_info: z.ZodObject<{
7
+ asset_id: z.ZodString;
8
+ current_supply: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
9
+ decimal_point: z.ZodNumber;
10
+ full_name: z.ZodString;
11
+ hidden_supply: z.ZodCustom<boolean, boolean>;
12
+ meta_info: z.ZodCustom<string, string>;
13
+ owner: z.ZodCustom<string, string>;
14
+ owner_eth_pub_key: z.ZodCustom<string | undefined, string | undefined>;
15
+ ticker: z.ZodString;
16
+ total_max_supply: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
17
+ }, z.core.$strip>;
18
+ awaiting_in: z.ZodCustom<string | number, string | number>;
19
+ awaiting_out: z.ZodCustom<string | number, string | number>;
20
+ outs_amount_max: z.ZodCustom<string | number, string | number>;
21
+ outs_amount_min: z.ZodCustom<string | number, string | number>;
22
+ outs_count: z.ZodCustom<string | number, string | number>;
23
+ total: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
24
+ unlocked: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>;
27
+ export type GetWalletBalanceResponseBalance = z.infer<typeof getWalletBalanceCompanionResponseBalanceSchema>;
28
+ export declare const getWalletBalanceCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
29
+ data: z.ZodObject<{
30
+ result: z.ZodObject<{
31
+ balance: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
32
+ unlocked_balance: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
33
+ balances: z.ZodArray<z.ZodObject<{
34
+ asset_info: z.ZodObject<{
35
+ asset_id: z.ZodString;
36
+ current_supply: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
37
+ decimal_point: z.ZodNumber;
38
+ full_name: z.ZodString;
39
+ hidden_supply: z.ZodCustom<boolean, boolean>;
40
+ meta_info: z.ZodCustom<string, string>;
41
+ owner: z.ZodCustom<string, string>;
42
+ owner_eth_pub_key: z.ZodCustom<string | undefined, string | undefined>;
43
+ ticker: z.ZodString;
44
+ total_max_supply: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
45
+ }, z.core.$strip>;
46
+ awaiting_in: z.ZodCustom<string | number, string | number>;
47
+ awaiting_out: z.ZodCustom<string | number, string | number>;
48
+ outs_amount_max: z.ZodCustom<string | number, string | number>;
49
+ outs_amount_min: z.ZodCustom<string | number, string | number>;
50
+ outs_count: z.ZodCustom<string | number, string | number>;
51
+ total: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
52
+ unlocked: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
53
+ }, z.core.$strip>>;
54
+ }, z.core.$strip>;
55
+ }, z.core.$strip>;
56
+ }, z.core.$strip>, z.ZodObject<{
57
+ data: z.ZodObject<{
58
+ error: z.ZodObject<{
59
+ code: z.ZodOptional<z.ZodNumber>;
60
+ }, z.core.$strip>;
61
+ }, z.core.$strip>;
62
+ }, z.core.$strip>, z.ZodObject<{
63
+ error: z.ZodString;
64
+ }, z.core.$strip>]>;
65
+ export type GetWalletBalanceCompanionResponse = z.infer<typeof getWalletBalanceCompanionResponseSchema>;
66
+ export type GetWalletBalanceResponse = {
67
+ success: true;
68
+ data: GetWalletBalanceResponseBalance;
69
+ } | {
70
+ success: false;
71
+ error: string;
72
+ };
73
+ export {};
@@ -0,0 +1,44 @@
1
+ import z from "zod";
2
+ const getWalletBalanceCompanionResponseBalanceSchema = z.object({
3
+ balance: z.union([z.string(), z.number()]),
4
+ unlocked_balance: z.union([z.string(), z.number()]),
5
+ balances: z.array(z.object({
6
+ asset_info: z.object({
7
+ asset_id: z.string(),
8
+ current_supply: z.union([z.string(), z.number()]),
9
+ decimal_point: z.number(),
10
+ full_name: z.string(),
11
+ hidden_supply: z.custom(),
12
+ meta_info: z.custom(),
13
+ owner: z.custom(),
14
+ owner_eth_pub_key: z.custom(),
15
+ ticker: z.string(),
16
+ total_max_supply: z.union([z.string(), z.number()]),
17
+ }),
18
+ awaiting_in: z.custom(),
19
+ awaiting_out: z.custom(),
20
+ outs_amount_max: z.custom(),
21
+ outs_amount_min: z.custom(),
22
+ outs_count: z.custom(),
23
+ total: z.union([z.string(), z.number()]),
24
+ unlocked: z.union([z.string(), z.number()]),
25
+ })),
26
+ });
27
+ export const getWalletBalanceCompanionResponseSchema = z.union([
28
+ z.object({
29
+ data: z.object({
30
+ result: getWalletBalanceCompanionResponseBalanceSchema,
31
+ }),
32
+ }),
33
+ z.object({
34
+ data: z.object({
35
+ error: z.object({
36
+ code: z.number().optional(),
37
+ })
38
+ }),
39
+ }),
40
+ z.object({
41
+ error: z.string(),
42
+ })
43
+ ]);
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/get-wallet-balance/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,8CAA8C,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACnD,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;QACvB,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC;YACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;YACpB,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;YACjD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;YACzB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;YACrB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAW;YAClC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAU;YAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAU;YACzB,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAsB;YACjD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;YAClB,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;SACtD,CAAC;QACF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAmB;QACxC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAmB;QACzC,eAAe,EAAE,CAAC,CAAC,MAAM,EAAmB;QAC5C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAmB;QAC5C,UAAU,EAAE,CAAC,CAAC,MAAM,EAAmB;QACvC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QACxC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;KAC9C,CAAC,CAAC;CACN,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC;IAC3D,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,MAAM,EAAE,8CAA8C;SACzD,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;gBACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC9B,CAAC;SACL,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ import z from "zod";
2
+ declare const getWhitelistCompanionResponseItemSchema: z.ZodObject<{
3
+ asset_id: z.ZodString;
4
+ ticker: z.ZodString;
5
+ full_name: z.ZodString;
6
+ decimal_point: z.ZodNumber;
7
+ logo: z.ZodOptional<z.ZodString>;
8
+ }, z.core.$strip>;
9
+ export type GetWhitelistResponseItem = z.infer<typeof getWhitelistCompanionResponseItemSchema>;
10
+ export declare const getWhitelistCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
11
+ data: z.ZodArray<z.ZodObject<{
12
+ asset_id: z.ZodString;
13
+ ticker: z.ZodString;
14
+ full_name: z.ZodString;
15
+ decimal_point: z.ZodNumber;
16
+ logo: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ error: z.ZodString;
20
+ }, z.core.$strip>]>;
21
+ export type GetWhitelistCompanionResponse = z.infer<typeof getWhitelistCompanionResponseSchema>;
22
+ export type GetWhitelistResponse = {
23
+ success: true;
24
+ data: GetWhitelistResponseItem[];
25
+ } | {
26
+ success: false;
27
+ error: string;
28
+ };
29
+ export {};
@@ -0,0 +1,17 @@
1
+ import z from "zod";
2
+ const getWhitelistCompanionResponseItemSchema = z.object({
3
+ asset_id: z.string(),
4
+ ticker: z.string(),
5
+ full_name: z.string(),
6
+ decimal_point: z.number(),
7
+ logo: z.string().optional(),
8
+ });
9
+ export const getWhitelistCompanionResponseSchema = z.union([
10
+ z.object({
11
+ data: z.array(getWhitelistCompanionResponseItemSchema),
12
+ }),
13
+ z.object({
14
+ error: z.string(),
15
+ })
16
+ ]);
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/get-whitelist/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,uCAAuC,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC;IACvD,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,uCAAuC,CAAC;KACzD,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -3,3 +3,12 @@ export { GetWalletDataResponse, GetWalletDataResponseWallet } from './get-wallet
3
3
  export { GetAddressByAliasResponse } from './get-address-by-alias';
4
4
  export { CreateAliasResponse } from './create-alias';
5
5
  export { RequestMessageSignResponse, RequestMessageSignData } from './request-message-sign';
6
+ export { InitializeIonicSwapResponse } from './initialize-ionic-swap';
7
+ export { AcceptIonicSwapResponse } from './accept-ionic-swap';
8
+ export { GetPermissionsResponse, GetPermissionsResponsePermission } from './get-permissions';
9
+ export { GetWalletBalanceResponse, GetWalletBalanceResponseBalance } from './get-wallet-balance';
10
+ export { TransferResponse, TransferResponseInfo } from './transfer';
11
+ export { GetIonicSwapProposalInfoResponse, GetIonicSwapProposalInfoResponseInfo } from './get-ionic-swap-info';
12
+ export { GetWhitelistResponse, GetWhitelistResponseItem } from './get-whitelist';
13
+ export { AddWhitelistAssetResponse, AddWhitelistAssetResponseAsset } from './add-whitelist-asset';
14
+ export { BurnAssetResponse } from './burn-asset';
@@ -0,0 +1,22 @@
1
+ import z from "zod";
2
+ export declare const initializeIonicSwapCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3
+ data: z.ZodUnion<readonly [z.ZodObject<{
4
+ result: z.ZodObject<{
5
+ hex_raw_proposal: z.ZodString;
6
+ }, z.core.$strip>;
7
+ }, z.core.$strip>, z.ZodObject<{
8
+ error: z.ZodObject<{
9
+ code: z.ZodOptional<z.ZodNumber>;
10
+ }, z.core.$strip>;
11
+ }, z.core.$strip>]>;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ error: z.ZodString;
14
+ }, z.core.$strip>]>;
15
+ export type InitializeIonicSwapCompanionResponse = z.infer<typeof initializeIonicSwapCompanionResponseSchema>;
16
+ export type InitializeIonicSwapResponse = {
17
+ success: true;
18
+ data: string;
19
+ } | {
20
+ success: false;
21
+ error: string;
22
+ };
@@ -0,0 +1,21 @@
1
+ import z from "zod";
2
+ export const initializeIonicSwapCompanionResponseSchema = z.union([
3
+ z.object({
4
+ data: z.union([
5
+ z.object({
6
+ result: z.object({
7
+ hex_raw_proposal: z.string(),
8
+ })
9
+ }),
10
+ z.object({
11
+ error: z.object({
12
+ code: z.number().optional(),
13
+ })
14
+ })
15
+ ]),
16
+ }),
17
+ z.object({
18
+ error: z.string(),
19
+ })
20
+ ]);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/initialize-ionic-swap/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,CAAC,MAAM,0CAA0C,GAAG,CAAC,CAAC,KAAK,CAAC;IAC9D,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;YACV,CAAC,CAAC,MAAM,CAAC;gBACL,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;oBACb,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE;iBAC/B,CAAC;aACL,CAAC;YACF,CAAC,CAAC,MAAM,CAAC;gBACL,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;oBACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;iBAC9B,CAAC;aACL,CAAC;SACL,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -1,11 +1,15 @@
1
1
  import z from 'zod';
2
2
  export declare const requestMessageSignCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3
- data: z.ZodObject<{
3
+ data: z.ZodUnion<readonly [z.ZodObject<{
4
4
  result: z.ZodObject<{
5
5
  pkey: z.ZodString;
6
6
  sig: z.ZodString;
7
7
  }, z.core.$strip>;
8
- }, z.core.$strip>;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ error: z.ZodObject<{
10
+ code: z.ZodOptional<z.ZodNumber>;
11
+ }, z.core.$strip>;
12
+ }, z.core.$strip>]>;
9
13
  }, z.core.$strip>, z.ZodObject<{
10
14
  error: z.ZodString;
11
15
  }, z.core.$strip>]>;
@@ -1,10 +1,17 @@
1
1
  import z from 'zod';
2
- const requestMessageSignCompanionResponseDataSchema = z.object({
3
- result: z.object({
4
- pkey: z.string(),
5
- sig: z.string(),
6
- })
7
- });
2
+ const requestMessageSignCompanionResponseDataSchema = z.union([
3
+ z.object({
4
+ result: z.object({
5
+ pkey: z.string(),
6
+ sig: z.string(),
7
+ })
8
+ }),
9
+ z.object({
10
+ error: z.object({
11
+ code: z.number().optional(),
12
+ })
13
+ }),
14
+ ]);
8
15
  export const requestMessageSignCompanionResponseSchema = z.union([
9
16
  z.object({
10
17
  data: requestMessageSignCompanionResponseDataSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/request-message-sign/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,6CAA6C,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;QAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;KAChB,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC;IAC7D,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,6CAA6C;KACtD,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/request-message-sign/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1D,CAAC,CAAC,MAAM,CAAC;QACL,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACb,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;YAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;SAClB,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;YACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC9B,CAAC;KACL,CAAC;CACL,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC;IAC7D,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,6CAA6C;KACtD,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import z from "zod";
2
+ declare const transferCompanionResponseInfoSchema: z.ZodObject<{
3
+ tx_hash: z.ZodString;
4
+ tx_size: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
5
+ tx_unsigned_hex: z.ZodCustom<string, string>;
6
+ used_out_ids: z.ZodCustom<number[], number[]>;
7
+ }, z.core.$strip>;
8
+ export type TransferResponseInfo = z.infer<typeof transferCompanionResponseInfoSchema>;
9
+ export declare const transferCompanionResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
10
+ data: z.ZodObject<{
11
+ result: z.ZodObject<{
12
+ tx_hash: z.ZodString;
13
+ tx_size: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
14
+ tx_unsigned_hex: z.ZodCustom<string, string>;
15
+ used_out_ids: z.ZodCustom<number[], number[]>;
16
+ }, z.core.$strip>;
17
+ }, z.core.$strip>;
18
+ }, z.core.$strip>, z.ZodObject<{
19
+ data: z.ZodObject<{
20
+ error: z.ZodObject<{
21
+ code: z.ZodOptional<z.ZodNumber>;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ error: z.ZodString;
26
+ }, z.core.$strip>]>;
27
+ export type TransferCompanionResponse = z.infer<typeof transferCompanionResponseSchema>;
28
+ export type TransferResponse = {
29
+ success: true;
30
+ data: TransferResponseInfo;
31
+ } | {
32
+ success: false;
33
+ error: string;
34
+ };
35
+ export {};
@@ -0,0 +1,25 @@
1
+ import z from "zod";
2
+ const transferCompanionResponseInfoSchema = z.object({
3
+ tx_hash: z.string(),
4
+ tx_size: z.union([z.number(), z.string()]),
5
+ tx_unsigned_hex: z.custom(),
6
+ used_out_ids: z.custom(),
7
+ });
8
+ export const transferCompanionResponseSchema = z.union([
9
+ z.object({
10
+ data: z.object({
11
+ result: transferCompanionResponseInfoSchema,
12
+ }),
13
+ }),
14
+ z.object({
15
+ data: z.object({
16
+ error: z.object({
17
+ code: z.number().optional(),
18
+ })
19
+ }),
20
+ }),
21
+ z.object({
22
+ error: z.string(),
23
+ })
24
+ ]);
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/responses/companion-methods/transfer/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1C,eAAe,EAAE,CAAC,CAAC,MAAM,EAAU;IACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAY;CACrC,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC;IACnD,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,MAAM,EAAE,mCAAmC;SAC9C,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;YACX,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;gBACZ,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC9B,CAAC;SACL,CAAC;KACL,CAAC;IACF,CAAC,CAAC,MAAM,CAAC;QACL,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;KACpB,CAAC;CACL,CAAC,CAAC"}
@@ -1,11 +1,48 @@
1
- import { RequestPermissionsResponse, GetAddressByAliasResponse, CreateAliasResponse, RequestMessageSignResponse, CompanionPermissionsParam } from './types';
1
+ import { RequestPermissionsResponse, GetAddressByAliasResponse, CreateAliasResponse, RequestMessageSignResponse, PermissionsParam, InitializeIonicSwapParams, InitializeIonicSwapResponse, AcceptIonicSwapResponse, GetPermissionsResponse, GetWalletBalanceResponse, TransferParams, TransferResponse, GetIonicSwapProposalInfoResponse, GetWhitelistResponse, AddWhitelistAssetResponse, BurnAssetParams, BurnAssetResponse } from './types';
2
2
  import { GetWalletDataResponse } from './types/responses/companion-methods/get-wallet-data';
3
3
  declare class ZanoWallet {
4
4
  private getZanoWallet;
5
- requestPermissions: (permissions: CompanionPermissionsParam) => Promise<RequestPermissionsResponse>;
6
- getWallet: () => Promise<GetWalletDataResponse>;
7
- getAddressByAlias: (alias: string) => Promise<GetAddressByAliasResponse>;
8
- createAlias: (alias: string) => Promise<CreateAliasResponse>;
9
- requestMessageSign: (message: string) => Promise<RequestMessageSignResponse>;
5
+ requestPermissions: (permissions: PermissionsParam, { timeoutMs }?: {
6
+ timeoutMs?: number | null;
7
+ }) => Promise<RequestPermissionsResponse>;
8
+ getWallet: ({ timeoutMs }?: {
9
+ timeoutMs?: number | null;
10
+ }) => Promise<GetWalletDataResponse>;
11
+ getAddressByAlias: (alias: string, { timeoutMs }?: {
12
+ timeoutMs?: number | null;
13
+ }) => Promise<GetAddressByAliasResponse>;
14
+ createAlias: (alias: string, { timeoutMs }?: {
15
+ timeoutMs?: number | null;
16
+ }) => Promise<CreateAliasResponse>;
17
+ requestMessageSign: (message: string, { timeoutMs }?: {
18
+ timeoutMs?: number | null;
19
+ }) => Promise<RequestMessageSignResponse>;
20
+ initializeIonicSwap: ({ destinationAssetID, destinationAssetAmount, currentAssetID, currentAssetAmount, destinationAddress }: InitializeIonicSwapParams, { timeoutMs }?: {
21
+ timeoutMs?: number | null;
22
+ }) => Promise<InitializeIonicSwapResponse>;
23
+ acceptIonicSwap: (hexRawProposal: string, { timeoutMs }?: {
24
+ timeoutMs?: number | null;
25
+ }) => Promise<AcceptIonicSwapResponse>;
26
+ getPermissions: ({ timeoutMs }?: {
27
+ timeoutMs?: number | null;
28
+ }) => Promise<GetPermissionsResponse>;
29
+ getWalletBalance: ({ timeoutMs }?: {
30
+ timeoutMs?: number | null;
31
+ }) => Promise<GetWalletBalanceResponse>;
32
+ transfer: (params: TransferParams, { timeoutMs }?: {
33
+ timeoutMs?: number | null;
34
+ }) => Promise<TransferResponse>;
35
+ getIonicSwapProposalInfo: (hexRawProposal: string, { timeoutMs }?: {
36
+ timeoutMs?: number | null;
37
+ }) => Promise<GetIonicSwapProposalInfoResponse>;
38
+ getWhitelist: ({ timeoutMs }?: {
39
+ timeoutMs?: number | null;
40
+ }) => Promise<GetWhitelistResponse>;
41
+ addWhitelistAsset: (assetId: string, { timeoutMs }?: {
42
+ timeoutMs?: number | null;
43
+ }) => Promise<AddWhitelistAssetResponse>;
44
+ burnAsset: (params: BurnAssetParams, { timeoutMs }?: {
45
+ timeoutMs?: number | null;
46
+ }) => Promise<BurnAssetResponse>;
10
47
  }
11
48
  export default ZanoWallet;