@buildonspark/issuer-sdk 0.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 (49) hide show
  1. package/dist/issuer-sdk.d.ts +41 -0
  2. package/dist/issuer-sdk.js +103 -0
  3. package/dist/issuer-sdk.js.map +1 -0
  4. package/dist/proto/common.d.ts +58 -0
  5. package/dist/proto/common.js +350 -0
  6. package/dist/proto/common.js.map +1 -0
  7. package/dist/proto/google/protobuf/descriptor.d.ts +1228 -0
  8. package/dist/proto/google/protobuf/descriptor.js +5070 -0
  9. package/dist/proto/google/protobuf/descriptor.js.map +1 -0
  10. package/dist/proto/google/protobuf/duration.d.ts +99 -0
  11. package/dist/proto/google/protobuf/duration.js +90 -0
  12. package/dist/proto/google/protobuf/duration.js.map +1 -0
  13. package/dist/proto/google/protobuf/empty.d.ts +33 -0
  14. package/dist/proto/google/protobuf/empty.js +46 -0
  15. package/dist/proto/google/protobuf/empty.js.map +1 -0
  16. package/dist/proto/google/protobuf/timestamp.d.ts +128 -0
  17. package/dist/proto/google/protobuf/timestamp.js +90 -0
  18. package/dist/proto/google/protobuf/timestamp.js.map +1 -0
  19. package/dist/proto/mock.d.ts +48 -0
  20. package/dist/proto/mock.js +103 -0
  21. package/dist/proto/mock.js.map +1 -0
  22. package/dist/proto/spark.d.ts +1101 -0
  23. package/dist/proto/spark.js +9565 -0
  24. package/dist/proto/spark.js.map +1 -0
  25. package/dist/proto/spark_authn.d.ts +111 -0
  26. package/dist/proto/spark_authn.js +517 -0
  27. package/dist/proto/spark_authn.js.map +1 -0
  28. package/dist/proto/validate/validate.d.ts +1087 -0
  29. package/dist/proto/validate/validate.js +4437 -0
  30. package/dist/proto/validate/validate.js.map +1 -0
  31. package/dist/services/create.d.ts +1 -0
  32. package/dist/services/create.js +41 -0
  33. package/dist/services/create.js.map +1 -0
  34. package/dist/services/freeze.d.ts +11 -0
  35. package/dist/services/freeze.js +44 -0
  36. package/dist/services/freeze.js.map +1 -0
  37. package/dist/services/spark/token-transactions.d.ts +8 -0
  38. package/dist/services/spark/token-transactions.js +27 -0
  39. package/dist/services/spark/token-transactions.js.map +1 -0
  40. package/dist/services/spark/wallet.d.ts +21 -0
  41. package/dist/services/spark/wallet.js +55 -0
  42. package/dist/services/spark/wallet.js.map +1 -0
  43. package/dist/tests/integration/spark.test.d.ts +1 -0
  44. package/dist/tests/integration/spark.test.js +120 -0
  45. package/dist/tests/integration/spark.test.js.map +1 -0
  46. package/dist/utils/token-hashing.d.ts +2 -0
  47. package/dist/utils/token-hashing.js +45 -0
  48. package/dist/utils/token-hashing.js.map +1 -0
  49. package/package.json +79 -0
@@ -0,0 +1,33 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ /**
4
+ * A generic empty message that you can re-use to avoid defining duplicated
5
+ * empty messages in your APIs. A typical example is to use it as the request
6
+ * or the response type of an API method. For instance:
7
+ *
8
+ * service Foo {
9
+ * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
10
+ * }
11
+ */
12
+ export interface Empty {
13
+ }
14
+ export declare const Empty: MessageFns<Empty>;
15
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
16
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
17
+ $case: string;
18
+ } ? {
19
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
20
+ } & {
21
+ $case: T["$case"];
22
+ } : T extends {} ? {
23
+ [K in keyof T]?: DeepPartial<T[K]>;
24
+ } : Partial<T>;
25
+ export interface MessageFns<T> {
26
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
27
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
28
+ fromJSON(object: any): T;
29
+ toJSON(message: T): unknown;
30
+ create(base?: DeepPartial<T>): T;
31
+ fromPartial(object: DeepPartial<T>): T;
32
+ }
33
+ export {};
@@ -0,0 +1,46 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.1
4
+ // protoc v5.29.3
5
+ // source: google/protobuf/empty.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ export const protobufPackage = "google.protobuf";
9
+ function createBaseEmpty() {
10
+ return {};
11
+ }
12
+ export const Empty = {
13
+ encode(_, writer = new BinaryWriter()) {
14
+ return writer;
15
+ },
16
+ decode(input, length) {
17
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
18
+ let end = length === undefined ? reader.len : reader.pos + length;
19
+ const message = createBaseEmpty();
20
+ while (reader.pos < end) {
21
+ const tag = reader.uint32();
22
+ switch (tag >>> 3) {
23
+ }
24
+ if ((tag & 7) === 4 || tag === 0) {
25
+ break;
26
+ }
27
+ reader.skip(tag & 7);
28
+ }
29
+ return message;
30
+ },
31
+ fromJSON(_) {
32
+ return {};
33
+ },
34
+ toJSON(_) {
35
+ const obj = {};
36
+ return obj;
37
+ },
38
+ create(base) {
39
+ return Empty.fromPartial(base ?? {});
40
+ },
41
+ fromPartial(_) {
42
+ const message = createBaseEmpty();
43
+ return message;
44
+ },
45
+ };
46
+ //# sourceMappingURL=empty.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty.js","sourceRoot":"","sources":["../../../../src/proto/google/protobuf/empty.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,sCAAsC;AAEtC,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAcjD,SAAS,eAAe;IACtB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,CAAC,M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Reader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ export declare const protobufPackage = "google.protobuf";
3
+ /**
4
+ * A Timestamp represents a point in time independent of any time zone or local
5
+ * calendar, encoded as a count of seconds and fractions of seconds at
6
+ * nanosecond resolution. The count is relative to an epoch at UTC midnight on
7
+ * January 1, 1970, in the proleptic Gregorian calendar which extends the
8
+ * Gregorian calendar backwards to year one.
9
+ *
10
+ * All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
11
+ * second table is needed for interpretation, using a [24-hour linear
12
+ * smear](https://developers.google.com/time/smear).
13
+ *
14
+ * The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
15
+ * restricting to that range, we ensure that we can convert to and from [RFC
16
+ * 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
17
+ *
18
+ * # Examples
19
+ *
20
+ * Example 1: Compute Timestamp from POSIX `time()`.
21
+ *
22
+ * Timestamp timestamp;
23
+ * timestamp.set_seconds(time(NULL));
24
+ * timestamp.set_nanos(0);
25
+ *
26
+ * Example 2: Compute Timestamp from POSIX `gettimeofday()`.
27
+ *
28
+ * struct timeval tv;
29
+ * gettimeofday(&tv, NULL);
30
+ *
31
+ * Timestamp timestamp;
32
+ * timestamp.set_seconds(tv.tv_sec);
33
+ * timestamp.set_nanos(tv.tv_usec * 1000);
34
+ *
35
+ * Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
36
+ *
37
+ * FILETIME ft;
38
+ * GetSystemTimeAsFileTime(&ft);
39
+ * UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
40
+ *
41
+ * // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
42
+ * // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
43
+ * Timestamp timestamp;
44
+ * timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
45
+ * timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
46
+ *
47
+ * Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
48
+ *
49
+ * long millis = System.currentTimeMillis();
50
+ *
51
+ * Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
52
+ * .setNanos((int) ((millis % 1000) * 1000000)).build();
53
+ *
54
+ * Example 5: Compute Timestamp from Java `Instant.now()`.
55
+ *
56
+ * Instant now = Instant.now();
57
+ *
58
+ * Timestamp timestamp =
59
+ * Timestamp.newBuilder().setSeconds(now.getEpochSecond())
60
+ * .setNanos(now.getNano()).build();
61
+ *
62
+ * Example 6: Compute Timestamp from current time in Python.
63
+ *
64
+ * timestamp = Timestamp()
65
+ * timestamp.GetCurrentTime()
66
+ *
67
+ * # JSON Mapping
68
+ *
69
+ * In JSON format, the Timestamp type is encoded as a string in the
70
+ * [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
71
+ * format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
72
+ * where {year} is always expressed using four digits while {month}, {day},
73
+ * {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
74
+ * seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
75
+ * are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
76
+ * is required. A proto3 JSON serializer should always use UTC (as indicated by
77
+ * "Z") when printing the Timestamp type and a proto3 JSON parser should be
78
+ * able to accept both UTC and other timezones (as indicated by an offset).
79
+ *
80
+ * For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
81
+ * 01:30 UTC on January 15, 2017.
82
+ *
83
+ * In JavaScript, one can convert a Date object to this format using the
84
+ * standard
85
+ * [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
86
+ * method. In Python, a standard `datetime.datetime` object can be converted
87
+ * to this format using
88
+ * [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
89
+ * the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
90
+ * the Joda Time's [`ISODateTimeFormat.dateTime()`](
91
+ * http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
92
+ * ) to obtain a formatter capable of generating timestamps in this format.
93
+ */
94
+ export interface Timestamp {
95
+ /**
96
+ * Represents seconds of UTC time since Unix epoch
97
+ * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
98
+ * 9999-12-31T23:59:59Z inclusive.
99
+ */
100
+ seconds: number;
101
+ /**
102
+ * Non-negative fractions of a second at nanosecond resolution. Negative
103
+ * second values with fractions must still have non-negative nanos values
104
+ * that count forward in time. Must be from 0 to 999,999,999
105
+ * inclusive.
106
+ */
107
+ nanos: number;
108
+ }
109
+ export declare const Timestamp: MessageFns<Timestamp>;
110
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
111
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
112
+ $case: string;
113
+ } ? {
114
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
115
+ } & {
116
+ $case: T["$case"];
117
+ } : T extends {} ? {
118
+ [K in keyof T]?: DeepPartial<T[K]>;
119
+ } : Partial<T>;
120
+ export interface MessageFns<T> {
121
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
122
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
123
+ fromJSON(object: any): T;
124
+ toJSON(message: T): unknown;
125
+ create(base?: DeepPartial<T>): T;
126
+ fromPartial(object: DeepPartial<T>): T;
127
+ }
128
+ export {};
@@ -0,0 +1,90 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.1
4
+ // protoc v5.29.3
5
+ // source: google/protobuf/timestamp.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ export const protobufPackage = "google.protobuf";
9
+ function createBaseTimestamp() {
10
+ return { seconds: 0, nanos: 0 };
11
+ }
12
+ export const Timestamp = {
13
+ encode(message, writer = new BinaryWriter()) {
14
+ if (message.seconds !== 0) {
15
+ writer.uint32(8).int64(message.seconds);
16
+ }
17
+ if (message.nanos !== 0) {
18
+ writer.uint32(16).int32(message.nanos);
19
+ }
20
+ return writer;
21
+ },
22
+ decode(input, length) {
23
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
24
+ let end = length === undefined ? reader.len : reader.pos + length;
25
+ const message = createBaseTimestamp();
26
+ while (reader.pos < end) {
27
+ const tag = reader.uint32();
28
+ switch (tag >>> 3) {
29
+ case 1: {
30
+ if (tag !== 8) {
31
+ break;
32
+ }
33
+ message.seconds = longToNumber(reader.int64());
34
+ continue;
35
+ }
36
+ case 2: {
37
+ if (tag !== 16) {
38
+ break;
39
+ }
40
+ message.nanos = reader.int32();
41
+ continue;
42
+ }
43
+ }
44
+ if ((tag & 7) === 4 || tag === 0) {
45
+ break;
46
+ }
47
+ reader.skip(tag & 7);
48
+ }
49
+ return message;
50
+ },
51
+ fromJSON(object) {
52
+ return {
53
+ seconds: isSet(object.seconds) ? globalThis.Number(object.seconds) : 0,
54
+ nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0,
55
+ };
56
+ },
57
+ toJSON(message) {
58
+ const obj = {};
59
+ if (message.seconds !== 0) {
60
+ obj.seconds = Math.round(message.seconds);
61
+ }
62
+ if (message.nanos !== 0) {
63
+ obj.nanos = Math.round(message.nanos);
64
+ }
65
+ return obj;
66
+ },
67
+ create(base) {
68
+ return Timestamp.fromPartial(base ?? {});
69
+ },
70
+ fromPartial(object) {
71
+ const message = createBaseTimestamp();
72
+ message.seconds = object.seconds ?? 0;
73
+ message.nanos = object.nanos ?? 0;
74
+ return message;
75
+ },
76
+ };
77
+ function longToNumber(int64) {
78
+ const num = globalThis.Number(int64.toString());
79
+ if (num > globalThis.Number.MAX_SAFE_INTEGER) {
80
+ throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
81
+ }
82
+ if (num < globalThis.Number.MIN_SAFE_INTEGER) {
83
+ throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
84
+ }
85
+ return num;
86
+ }
87
+ function isSet(value) {
88
+ return value !== null && value !== undefined;
89
+ }
90
+ //# sourceMappingURL=timestamp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timestamp.js","sourceRoot":"","sources":["../../../../src/proto/google/protobuf/timestamp.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,0CAA0C;AAE1C,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAErE,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AA6GjD,SAAS,mBAAmB;IAC1B,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;AAClC,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC9C,MAAM,CAAC,OAAkB,EAAE,SAAuB,IAAI,YAAY,EAAE;QAClE,IAAI,OAAO,CAAC,OAAO,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC1C,CAAC;QACD,IAAI,OAAO,CAAC,KAAK,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACzC,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,KAAgC,EAAE,MAAe;QACtD,MAAM,MAAM,GAAG,KAAK,YAAY,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,YAAY,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,CAAC;IAC9E,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,KAAK,CAAC,KAAU;IACvB,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { type CallContext, type CallOptions } from "nice-grpc-common";
3
+ import { Empty } from "./google/protobuf/empty.js";
4
+ export declare const protobufPackage = "mock";
5
+ export interface CleanUpPreimageShareRequest {
6
+ paymentHash: Uint8Array;
7
+ }
8
+ export declare const CleanUpPreimageShareRequest: MessageFns<CleanUpPreimageShareRequest>;
9
+ export type MockServiceDefinition = typeof MockServiceDefinition;
10
+ export declare const MockServiceDefinition: {
11
+ readonly name: "MockService";
12
+ readonly fullName: "mock.MockService";
13
+ readonly methods: {
14
+ readonly clean_up_preimage_share: {
15
+ readonly name: "clean_up_preimage_share";
16
+ readonly requestType: MessageFns<CleanUpPreimageShareRequest>;
17
+ readonly requestStream: false;
18
+ readonly responseType: import("./google/protobuf/empty.js").MessageFns<Empty>;
19
+ readonly responseStream: false;
20
+ readonly options: {};
21
+ };
22
+ };
23
+ };
24
+ export interface MockServiceImplementation<CallContextExt = {}> {
25
+ clean_up_preimage_share(request: CleanUpPreimageShareRequest, context: CallContext & CallContextExt): Promise<DeepPartial<Empty>>;
26
+ }
27
+ export interface MockServiceClient<CallOptionsExt = {}> {
28
+ clean_up_preimage_share(request: DeepPartial<CleanUpPreimageShareRequest>, options?: CallOptions & CallOptionsExt): Promise<Empty>;
29
+ }
30
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
31
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
32
+ $case: string;
33
+ } ? {
34
+ [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]>;
35
+ } & {
36
+ $case: T["$case"];
37
+ } : T extends {} ? {
38
+ [K in keyof T]?: DeepPartial<T[K]>;
39
+ } : Partial<T>;
40
+ export interface MessageFns<T> {
41
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
42
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
43
+ fromJSON(object: any): T;
44
+ toJSON(message: T): unknown;
45
+ create(base?: DeepPartial<T>): T;
46
+ fromPartial(object: DeepPartial<T>): T;
47
+ }
48
+ export {};
@@ -0,0 +1,103 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.6.1
4
+ // protoc v5.29.3
5
+ // source: mock.proto
6
+ /* eslint-disable */
7
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
8
+ import { Empty } from "./google/protobuf/empty.js";
9
+ export const protobufPackage = "mock";
10
+ function createBaseCleanUpPreimageShareRequest() {
11
+ return { paymentHash: new Uint8Array(0) };
12
+ }
13
+ export const CleanUpPreimageShareRequest = {
14
+ encode(message, writer = new BinaryWriter()) {
15
+ if (message.paymentHash.length !== 0) {
16
+ writer.uint32(10).bytes(message.paymentHash);
17
+ }
18
+ return writer;
19
+ },
20
+ decode(input, length) {
21
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
22
+ let end = length === undefined ? reader.len : reader.pos + length;
23
+ const message = createBaseCleanUpPreimageShareRequest();
24
+ while (reader.pos < end) {
25
+ const tag = reader.uint32();
26
+ switch (tag >>> 3) {
27
+ case 1: {
28
+ if (tag !== 10) {
29
+ break;
30
+ }
31
+ message.paymentHash = reader.bytes();
32
+ continue;
33
+ }
34
+ }
35
+ if ((tag & 7) === 4 || tag === 0) {
36
+ break;
37
+ }
38
+ reader.skip(tag & 7);
39
+ }
40
+ return message;
41
+ },
42
+ fromJSON(object) {
43
+ return { paymentHash: isSet(object.paymentHash) ? bytesFromBase64(object.paymentHash) : new Uint8Array(0) };
44
+ },
45
+ toJSON(message) {
46
+ const obj = {};
47
+ if (message.paymentHash.length !== 0) {
48
+ obj.paymentHash = base64FromBytes(message.paymentHash);
49
+ }
50
+ return obj;
51
+ },
52
+ create(base) {
53
+ return CleanUpPreimageShareRequest.fromPartial(base ?? {});
54
+ },
55
+ fromPartial(object) {
56
+ const message = createBaseCleanUpPreimageShareRequest();
57
+ message.paymentHash = object.paymentHash ?? new Uint8Array(0);
58
+ return message;
59
+ },
60
+ };
61
+ export const MockServiceDefinition = {
62
+ name: "MockService",
63
+ fullName: "mock.MockService",
64
+ methods: {
65
+ clean_up_preimage_share: {
66
+ name: "clean_up_preimage_share",
67
+ requestType: CleanUpPreimageShareRequest,
68
+ requestStream: false,
69
+ responseType: Empty,
70
+ responseStream: false,
71
+ options: {},
72
+ },
73
+ },
74
+ };
75
+ function bytesFromBase64(b64) {
76
+ if (globalThis.Buffer) {
77
+ return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
78
+ }
79
+ else {
80
+ const bin = globalThis.atob(b64);
81
+ const arr = new Uint8Array(bin.length);
82
+ for (let i = 0; i < bin.length; ++i) {
83
+ arr[i] = bin.charCodeAt(i);
84
+ }
85
+ return arr;
86
+ }
87
+ }
88
+ function base64FromBytes(arr) {
89
+ if (globalThis.Buffer) {
90
+ return globalThis.Buffer.from(arr).toString("base64");
91
+ }
92
+ else {
93
+ const bin = [];
94
+ arr.forEach((byte) => {
95
+ bin.push(globalThis.String.fromCharCode(byte));
96
+ });
97
+ return globalThis.btoa(bin.join(""));
98
+ }
99
+ }
100
+ function isSet(value) {
101
+ return value !== null && value !== undefined;
102
+ }
103
+ //# sourceMappingURL=mock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mock.js","sourceRoot":"","sources":["../../src/proto/mock.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,YAAY;AACZ,gCAAgC;AAChC,iCAAiC;AACjC,qBAAqB;AAErB,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,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