@monerium/sdk 1.1.0 → 2.0.0-alpha.1
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.
- package/LICENSE +21 -0
- package/README.md +14 -79
- package/esm/_dnt.shims.js +76 -0
- package/esm/deps/deno.land/std@0.168.0/encoding/base64.js +140 -0
- package/esm/deps/deno.land/std@0.168.0/encoding/base64url.js +65 -0
- package/esm/mod.js +1 -0
- package/esm/package.json +3 -0
- package/esm/src/client.js +139 -0
- package/esm/src/config.js +13 -0
- package/esm/src/types.js +73 -0
- package/package.json +39 -46
- package/script/_dnt.shims.js +88 -0
- package/script/deps/deno.land/std@0.168.0/encoding/base64.js +168 -0
- package/script/deps/deno.land/std@0.168.0/encoding/base64url.js +93 -0
- package/script/mod.js +5 -0
- package/script/package.json +3 -0
- package/script/src/client.js +166 -0
- package/script/src/config.js +16 -0
- package/script/src/types.js +76 -0
- package/types/_dnt.shims.d.ts +18 -0
- package/types/deps/deno.land/std@0.168.0/encoding/base64.d.ts +11 -0
- package/types/deps/deno.land/std@0.168.0/encoding/base64url.d.ts +10 -0
- package/types/mod.d.ts +1 -0
- package/types/src/client.d.ts +19 -0
- package/types/src/config.d.ts +3 -0
- package/types/src/types.d.ts +266 -0
- package/.eslintignore +0 -13
- package/.eslintrc.cjs +0 -20
- package/.github/workflows/release-please.yml +0 -31
- package/.prettierignore +0 -13
- package/.prettierrc +0 -6
- package/CHANGELOG.md +0 -158
- package/src/app.d.ts +0 -11
- package/src/app.html +0 -12
- package/src/lib/client.ts +0 -341
- package/src/lib/config.ts +0 -59
- package/src/lib/index.ts +0 -1
- package/src/routes/index.svelte +0 -32
- package/src/routes/integration.svelte +0 -45
- package/static/favicon.png +0 -0
- package/svelte.config.js +0 -19
- package/test/index.test.ts +0 -20
- package/tsconfig.json +0 -19
- package/vite.config.js +0 -14
- package/vitest.config.ts +0 -7
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// --- Config --- //
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.OrderKind = exports.Network = exports.Chain = exports.PaymentStandard = exports.Currency = void 0;
|
|
5
|
+
// --- Client Methods --- //
|
|
6
|
+
var Currency;
|
|
7
|
+
(function (Currency) {
|
|
8
|
+
Currency["eur"] = "eur";
|
|
9
|
+
Currency["usd"] = "usd";
|
|
10
|
+
Currency["gbp"] = "gbp";
|
|
11
|
+
Currency["isk"] = "isk";
|
|
12
|
+
})(Currency = exports.Currency || (exports.Currency = {}));
|
|
13
|
+
// -- authContext
|
|
14
|
+
var Method;
|
|
15
|
+
(function (Method) {
|
|
16
|
+
Method["password"] = "password";
|
|
17
|
+
Method["resource"] = "resource";
|
|
18
|
+
Method["jwt"] = "jwt";
|
|
19
|
+
Method["apiKey"] = "apiKey";
|
|
20
|
+
})(Method || (Method = {}));
|
|
21
|
+
var Type;
|
|
22
|
+
(function (Type) {
|
|
23
|
+
Type["corporate"] = "corporate";
|
|
24
|
+
Type["personal"] = "personal";
|
|
25
|
+
})(Type || (Type = {}));
|
|
26
|
+
var Permission;
|
|
27
|
+
(function (Permission) {
|
|
28
|
+
Permission["read"] = "read";
|
|
29
|
+
Permission["write"] = "write";
|
|
30
|
+
})(Permission || (Permission = {}));
|
|
31
|
+
// -- getProfile
|
|
32
|
+
var KYCState;
|
|
33
|
+
(function (KYCState) {
|
|
34
|
+
KYCState["absent"] = "absent";
|
|
35
|
+
KYCState["submitted"] = "submitted";
|
|
36
|
+
KYCState["pending"] = "pending";
|
|
37
|
+
KYCState["confirmed"] = "confirmed";
|
|
38
|
+
})(KYCState || (KYCState = {}));
|
|
39
|
+
var KYCOutcome;
|
|
40
|
+
(function (KYCOutcome) {
|
|
41
|
+
KYCOutcome["approved"] = "approved";
|
|
42
|
+
KYCOutcome["rejected"] = "rejected";
|
|
43
|
+
KYCOutcome["unknown"] = "unknown";
|
|
44
|
+
})(KYCOutcome || (KYCOutcome = {}));
|
|
45
|
+
var PaymentStandard;
|
|
46
|
+
(function (PaymentStandard) {
|
|
47
|
+
PaymentStandard["iban"] = "iban";
|
|
48
|
+
PaymentStandard["scan"] = "scan";
|
|
49
|
+
})(PaymentStandard = exports.PaymentStandard || (exports.PaymentStandard = {}));
|
|
50
|
+
// -- getBalances
|
|
51
|
+
var Chain;
|
|
52
|
+
(function (Chain) {
|
|
53
|
+
Chain["polygon"] = "polygon";
|
|
54
|
+
Chain["ethereum"] = "ethereum";
|
|
55
|
+
Chain["gnosis"] = "gnosis";
|
|
56
|
+
})(Chain = exports.Chain || (exports.Chain = {}));
|
|
57
|
+
var Network;
|
|
58
|
+
(function (Network) {
|
|
59
|
+
Network["mainnet"] = "mainnet";
|
|
60
|
+
Network["chiado"] = "chiado";
|
|
61
|
+
Network["goerli"] = "goerli";
|
|
62
|
+
Network["mumbai"] = "mumbai";
|
|
63
|
+
})(Network = exports.Network || (exports.Network = {}));
|
|
64
|
+
// --getOrders
|
|
65
|
+
var OrderKind;
|
|
66
|
+
(function (OrderKind) {
|
|
67
|
+
OrderKind["redeem"] = "redeem";
|
|
68
|
+
OrderKind["issue"] = "issue";
|
|
69
|
+
})(OrderKind = exports.OrderKind || (exports.OrderKind = {}));
|
|
70
|
+
var OrderState;
|
|
71
|
+
(function (OrderState) {
|
|
72
|
+
OrderState["placed"] = "placed";
|
|
73
|
+
OrderState["pending"] = "pending";
|
|
74
|
+
OrderState["processed"] = "processed";
|
|
75
|
+
OrderState["rejected"] = "rejected";
|
|
76
|
+
})(OrderState || (OrderState = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Deno } from "@deno/shim-deno";
|
|
2
|
+
export { Deno } from "@deno/shim-deno";
|
|
3
|
+
export { crypto, type Crypto, type SubtleCrypto, type AlgorithmIdentifier, type Algorithm, type RsaOaepParams, type BufferSource, type AesCtrParams, type AesCbcParams, type AesGcmParams, type CryptoKey, type KeyAlgorithm, type KeyType, type KeyUsage, type EcdhKeyDeriveParams, type HkdfParams, type HashAlgorithmIdentifier, type Pbkdf2Params, type AesDerivedKeyParams, type HmacImportParams, type JsonWebKey, type RsaOtherPrimesInfo, type KeyFormat, type RsaHashedKeyGenParams, type RsaKeyGenParams, type BigInteger, type EcKeyGenParams, type NamedCurve, type CryptoKeyPair, type AesKeyGenParams, type HmacKeyGenParams, type RsaHashedImportParams, type EcKeyImportParams, type AesKeyAlgorithm, type RsaPssParams, type EcdsaParams } from "@deno/shim-crypto";
|
|
4
|
+
import { fetch, File, FormData, Headers, Request, Response } from "undici";
|
|
5
|
+
export { fetch, File, FormData, Headers, Request, Response, type BodyInit, type HeadersInit, type RequestInit, type ResponseInit } from "undici";
|
|
6
|
+
import { TextEncoder } from "util";
|
|
7
|
+
export { TextEncoder } from "util";
|
|
8
|
+
export declare const dntGlobalThis: Omit<typeof globalThis, "TextEncoder" | "Deno" | "crypto" | "fetch" | "File" | "FormData" | "Headers" | "Request" | "Response"> & {
|
|
9
|
+
Deno: typeof Deno;
|
|
10
|
+
crypto: import("@deno/shim-crypto").Crypto;
|
|
11
|
+
fetch: typeof fetch;
|
|
12
|
+
File: typeof File;
|
|
13
|
+
FormData: typeof FormData;
|
|
14
|
+
Headers: typeof Headers;
|
|
15
|
+
Request: typeof Request;
|
|
16
|
+
Response: typeof Response;
|
|
17
|
+
TextEncoder: typeof TextEncoder;
|
|
18
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CREDIT: https://gist.github.com/enepomnyaschih/72c423f727d395eeaa09697058238727
|
|
3
|
+
* Encodes a given Uint8Array, ArrayBuffer or string into RFC4648 base64 representation
|
|
4
|
+
* @param data
|
|
5
|
+
*/
|
|
6
|
+
export declare function encode(data: ArrayBuffer | string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Decodes a given RFC4648 base64 encoded string
|
|
9
|
+
* @param b64
|
|
10
|
+
*/
|
|
11
|
+
export declare function decode(b64: string): Uint8Array;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encodes a given ArrayBuffer or string into a base64url representation
|
|
3
|
+
* @param data
|
|
4
|
+
*/
|
|
5
|
+
export declare function encode(data: ArrayBuffer | string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Converts given base64url encoded data back to original
|
|
8
|
+
* @param b64url
|
|
9
|
+
*/
|
|
10
|
+
export declare function decode(b64url: string): Uint8Array;
|
package/types/mod.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MoneriumClient } from "./src/client.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as dntShim from "../_dnt.shims.js";
|
|
2
|
+
import type { AuthArgs, AuthContext, Balances, BearerProfile, LinkAddress, NewOrder, Order, OrderFilter, PKCERequestArgs, Profile, SupportingDoc, Token } from "./types.js";
|
|
3
|
+
export declare class MoneriumClient {
|
|
4
|
+
#private;
|
|
5
|
+
codeVerifier?: string;
|
|
6
|
+
bearerProfile?: BearerProfile;
|
|
7
|
+
constructor(env?: "production" | "sandbox");
|
|
8
|
+
auth(args: AuthArgs): Promise<void>;
|
|
9
|
+
pkceRequest(args: PKCERequestArgs): Promise<string>;
|
|
10
|
+
getAuthContext(): Promise<AuthContext>;
|
|
11
|
+
getProfile(profileId: string): Promise<Profile>;
|
|
12
|
+
getBalances(profileId?: string): Promise<Balances> | Promise<Balances[]>;
|
|
13
|
+
getOrders(filter?: OrderFilter): Promise<Order[]>;
|
|
14
|
+
getOrder(orderId: string): Promise<Order>;
|
|
15
|
+
getTokens(): Promise<Token[]>;
|
|
16
|
+
linkAddress(profileId: string, body: LinkAddress): Promise<unknown>;
|
|
17
|
+
placeOrder(order: NewOrder, profileId?: string): Promise<Order>;
|
|
18
|
+
uploadSupportingDocument(document: dntShim.File): Promise<SupportingDoc>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
export type Environment = {
|
|
2
|
+
api: string;
|
|
3
|
+
web: string;
|
|
4
|
+
};
|
|
5
|
+
export type Config = {
|
|
6
|
+
environments: {
|
|
7
|
+
production: Environment;
|
|
8
|
+
sandbox: Environment;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export interface BearerProfile {
|
|
12
|
+
access_token: string;
|
|
13
|
+
token_type: string;
|
|
14
|
+
expires_in: number;
|
|
15
|
+
refresh_token: string;
|
|
16
|
+
profile: string;
|
|
17
|
+
userId: string;
|
|
18
|
+
}
|
|
19
|
+
export declare enum Currency {
|
|
20
|
+
eur = "eur",
|
|
21
|
+
usd = "usd",
|
|
22
|
+
gbp = "gbp",
|
|
23
|
+
isk = "isk"
|
|
24
|
+
}
|
|
25
|
+
export type AuthArgs = Omit<AuthCode, "grant_type"> | Omit<RefreshToken, "grant_type"> | Omit<ClientCredentials, "grant_type">;
|
|
26
|
+
export interface AuthCode {
|
|
27
|
+
grant_type: "authorization_code";
|
|
28
|
+
client_id: string;
|
|
29
|
+
code: string;
|
|
30
|
+
code_verifier: string;
|
|
31
|
+
redirect_uri: string;
|
|
32
|
+
scope?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface RefreshToken {
|
|
35
|
+
grant_type: "refresh_token";
|
|
36
|
+
client_id: string;
|
|
37
|
+
refresh_token: string;
|
|
38
|
+
scope?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface ClientCredentials {
|
|
41
|
+
grant_type: "client_credentials";
|
|
42
|
+
client_id: string;
|
|
43
|
+
client_secret: string;
|
|
44
|
+
scope?: string;
|
|
45
|
+
}
|
|
46
|
+
export type PKCERequestArgs = Omit<PKCERequest, "code_challenge" | "code_challenge_method" | "response_type">;
|
|
47
|
+
export type PKCERequest = {
|
|
48
|
+
client_id: string;
|
|
49
|
+
code_challenge: string;
|
|
50
|
+
code_challenge_method: string;
|
|
51
|
+
response_type: string;
|
|
52
|
+
state: string;
|
|
53
|
+
redirect_uri?: string;
|
|
54
|
+
scope?: string;
|
|
55
|
+
address?: string;
|
|
56
|
+
};
|
|
57
|
+
declare enum Method {
|
|
58
|
+
password = "password",
|
|
59
|
+
resource = "resource",
|
|
60
|
+
jwt = "jwt",
|
|
61
|
+
apiKey = "apiKey"
|
|
62
|
+
}
|
|
63
|
+
declare enum Type {
|
|
64
|
+
corporate = "corporate",
|
|
65
|
+
personal = "personal"
|
|
66
|
+
}
|
|
67
|
+
declare enum Permission {
|
|
68
|
+
read = "read",
|
|
69
|
+
write = "write"
|
|
70
|
+
}
|
|
71
|
+
type AuthProfile = {
|
|
72
|
+
id: string;
|
|
73
|
+
type: Type;
|
|
74
|
+
name: string;
|
|
75
|
+
perms: Permission[];
|
|
76
|
+
};
|
|
77
|
+
export interface AuthContext {
|
|
78
|
+
userId: string;
|
|
79
|
+
email: string;
|
|
80
|
+
name: string;
|
|
81
|
+
roles: "admin"[];
|
|
82
|
+
auth: {
|
|
83
|
+
method: Method;
|
|
84
|
+
subject: string;
|
|
85
|
+
verified: boolean;
|
|
86
|
+
};
|
|
87
|
+
defaultProfile: string;
|
|
88
|
+
profiles: AuthProfile[];
|
|
89
|
+
}
|
|
90
|
+
declare enum KYCState {
|
|
91
|
+
absent = "absent",
|
|
92
|
+
submitted = "submitted",
|
|
93
|
+
pending = "pending",
|
|
94
|
+
confirmed = "confirmed"
|
|
95
|
+
}
|
|
96
|
+
declare enum KYCOutcome {
|
|
97
|
+
approved = "approved",
|
|
98
|
+
rejected = "rejected",
|
|
99
|
+
unknown = "unknown"
|
|
100
|
+
}
|
|
101
|
+
type KYC = {
|
|
102
|
+
state: KYCState;
|
|
103
|
+
outcome: KYCOutcome;
|
|
104
|
+
};
|
|
105
|
+
export declare enum PaymentStandard {
|
|
106
|
+
iban = "iban",
|
|
107
|
+
scan = "scan"
|
|
108
|
+
}
|
|
109
|
+
type Account = {
|
|
110
|
+
address: string;
|
|
111
|
+
currency: Currency;
|
|
112
|
+
standard: PaymentStandard;
|
|
113
|
+
iban?: string;
|
|
114
|
+
sortCode?: string;
|
|
115
|
+
accountNumber?: string;
|
|
116
|
+
network: Network;
|
|
117
|
+
chain: Chain;
|
|
118
|
+
id?: string;
|
|
119
|
+
};
|
|
120
|
+
export interface Profile {
|
|
121
|
+
id: string;
|
|
122
|
+
name: string;
|
|
123
|
+
kyc: KYC;
|
|
124
|
+
accounts: Account[];
|
|
125
|
+
}
|
|
126
|
+
export declare enum Chain {
|
|
127
|
+
polygon = "polygon",
|
|
128
|
+
ethereum = "ethereum",
|
|
129
|
+
gnosis = "gnosis"
|
|
130
|
+
}
|
|
131
|
+
export declare enum Network {
|
|
132
|
+
mainnet = "mainnet",
|
|
133
|
+
chiado = "chiado",
|
|
134
|
+
goerli = "goerli",
|
|
135
|
+
mumbai = "mumbai"
|
|
136
|
+
}
|
|
137
|
+
type Balance = {
|
|
138
|
+
currency: Currency;
|
|
139
|
+
amount: string;
|
|
140
|
+
};
|
|
141
|
+
export interface Balances {
|
|
142
|
+
id: string;
|
|
143
|
+
address: string;
|
|
144
|
+
chain: Chain;
|
|
145
|
+
network: Network;
|
|
146
|
+
balances: Balance[];
|
|
147
|
+
}
|
|
148
|
+
export declare enum OrderKind {
|
|
149
|
+
redeem = "redeem",
|
|
150
|
+
issue = "issue"
|
|
151
|
+
}
|
|
152
|
+
declare enum OrderState {
|
|
153
|
+
placed = "placed",
|
|
154
|
+
pending = "pending",
|
|
155
|
+
processed = "processed",
|
|
156
|
+
rejected = "rejected"
|
|
157
|
+
}
|
|
158
|
+
type Fee = {
|
|
159
|
+
provider: "satchel";
|
|
160
|
+
currency: Currency;
|
|
161
|
+
amount: string;
|
|
162
|
+
};
|
|
163
|
+
type IBAN = {
|
|
164
|
+
standard: PaymentStandard.iban;
|
|
165
|
+
iban: string;
|
|
166
|
+
};
|
|
167
|
+
type SCAN = {
|
|
168
|
+
standard: PaymentStandard.scan;
|
|
169
|
+
sortCode: string;
|
|
170
|
+
accountNumber: string;
|
|
171
|
+
};
|
|
172
|
+
type Individual = {
|
|
173
|
+
firstName: string;
|
|
174
|
+
lastName: string;
|
|
175
|
+
country?: string;
|
|
176
|
+
};
|
|
177
|
+
type Corporation = {
|
|
178
|
+
companyName: string;
|
|
179
|
+
country: string;
|
|
180
|
+
};
|
|
181
|
+
type Counterpart = {
|
|
182
|
+
identifier: IBAN | SCAN;
|
|
183
|
+
details: Individual | Corporation;
|
|
184
|
+
};
|
|
185
|
+
type OrderMetadata = {
|
|
186
|
+
approvedAt: string;
|
|
187
|
+
processedAt: string;
|
|
188
|
+
rejectedAt: string;
|
|
189
|
+
state: OrderState;
|
|
190
|
+
placedBy: string;
|
|
191
|
+
placedAt: string;
|
|
192
|
+
receivedAmount: string;
|
|
193
|
+
sentAmount: string;
|
|
194
|
+
};
|
|
195
|
+
export interface OrderFilter {
|
|
196
|
+
address?: string;
|
|
197
|
+
txHash?: string;
|
|
198
|
+
profile?: string;
|
|
199
|
+
memo?: string;
|
|
200
|
+
accountId?: string;
|
|
201
|
+
state?: OrderState;
|
|
202
|
+
}
|
|
203
|
+
export interface Order {
|
|
204
|
+
id: string;
|
|
205
|
+
profile: string;
|
|
206
|
+
accountId: string;
|
|
207
|
+
address: string;
|
|
208
|
+
kind: OrderKind;
|
|
209
|
+
amount: string;
|
|
210
|
+
currency: Currency;
|
|
211
|
+
totalFee: string;
|
|
212
|
+
fees: Fee[];
|
|
213
|
+
counterpart: Counterpart;
|
|
214
|
+
memo: string;
|
|
215
|
+
rejectedReason: string;
|
|
216
|
+
supportingDocumentId: string;
|
|
217
|
+
meta: OrderMetadata;
|
|
218
|
+
}
|
|
219
|
+
export interface Token {
|
|
220
|
+
currency: Currency;
|
|
221
|
+
ticker: string;
|
|
222
|
+
symbol: string;
|
|
223
|
+
chain: Chain;
|
|
224
|
+
network: Network;
|
|
225
|
+
address: string;
|
|
226
|
+
decimals: number;
|
|
227
|
+
}
|
|
228
|
+
export interface NewOrder {
|
|
229
|
+
kind: OrderKind;
|
|
230
|
+
amount: string;
|
|
231
|
+
signature: string;
|
|
232
|
+
accountId?: string;
|
|
233
|
+
address: string;
|
|
234
|
+
currency: Currency;
|
|
235
|
+
counterpart: Counterpart;
|
|
236
|
+
message: string;
|
|
237
|
+
memo: string;
|
|
238
|
+
supportingDocumentId?: string;
|
|
239
|
+
chain: Chain;
|
|
240
|
+
network: Network;
|
|
241
|
+
}
|
|
242
|
+
type SupportingDocMetadata = {
|
|
243
|
+
uploadedBy: string;
|
|
244
|
+
createdAt: string;
|
|
245
|
+
updatedAt: string;
|
|
246
|
+
};
|
|
247
|
+
export interface SupportingDoc {
|
|
248
|
+
id: string;
|
|
249
|
+
name: string;
|
|
250
|
+
type: string;
|
|
251
|
+
size: number;
|
|
252
|
+
hash: string;
|
|
253
|
+
meta: SupportingDocMetadata;
|
|
254
|
+
}
|
|
255
|
+
interface CurrencyAccounts {
|
|
256
|
+
network: Network;
|
|
257
|
+
chain: Chain;
|
|
258
|
+
currency: Currency;
|
|
259
|
+
}
|
|
260
|
+
export interface LinkAddress {
|
|
261
|
+
address: string;
|
|
262
|
+
message: string;
|
|
263
|
+
signature: string;
|
|
264
|
+
accounts: CurrencyAccounts[];
|
|
265
|
+
}
|
|
266
|
+
export {};
|
package/.eslintignore
DELETED
package/.eslintrc.cjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
parser: '@typescript-eslint/parser',
|
|
4
|
-
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
|
5
|
-
plugins: ['svelte3', '@typescript-eslint'],
|
|
6
|
-
ignorePatterns: ['*.cjs'],
|
|
7
|
-
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
|
8
|
-
settings: {
|
|
9
|
-
'svelte3/typescript': () => require('typescript')
|
|
10
|
-
},
|
|
11
|
-
parserOptions: {
|
|
12
|
-
sourceType: 'module',
|
|
13
|
-
ecmaVersion: 2020
|
|
14
|
-
},
|
|
15
|
-
env: {
|
|
16
|
-
browser: true,
|
|
17
|
-
es2017: true,
|
|
18
|
-
node: true
|
|
19
|
-
}
|
|
20
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
on:
|
|
2
|
-
push:
|
|
3
|
-
branches:
|
|
4
|
-
- main
|
|
5
|
-
name: release-please
|
|
6
|
-
jobs:
|
|
7
|
-
release-please:
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
steps:
|
|
10
|
-
- uses: google-github-actions/release-please-action@v3
|
|
11
|
-
id: release
|
|
12
|
-
with:
|
|
13
|
-
release-type: node
|
|
14
|
-
package-name: release-please-action
|
|
15
|
-
# The logic below handles the npm publication:
|
|
16
|
-
- uses: actions/checkout@v2
|
|
17
|
-
# these if statements ensure that a publication only occurs when
|
|
18
|
-
# a new release is created:
|
|
19
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
20
|
-
- uses: actions/setup-node@v1
|
|
21
|
-
with:
|
|
22
|
-
node-version: 18
|
|
23
|
-
registry-url: 'https://registry.yarnpkg.com'
|
|
24
|
-
scope: '@monerium'
|
|
25
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
26
|
-
- run: yarn install --frozen-lockfile
|
|
27
|
-
if: ${{ steps.release.outputs.release_created }}
|
|
28
|
-
- run: yarn publish --access=public
|
|
29
|
-
env:
|
|
30
|
-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
31
|
-
if: ${{ steps.release.outputs.release_created }}
|
package/.prettierignore
DELETED
package/.prettierrc
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## [1.1.0](https://github.com/monerium/sdk/compare/v1.0.20...v1.1.0) (2022-10-12)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Features
|
|
7
|
-
|
|
8
|
-
* **automated-publish:** finalize and clean up ([f0dd36b](https://github.com/monerium/sdk/commit/f0dd36b020f0642a69d8e298abb661888d316ca4))
|
|
9
|
-
|
|
10
|
-
## [1.0.20](https://github.com/monerium/sdk/compare/v1.0.19...v1.0.20) (2022-10-12)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
### Bug Fixes
|
|
14
|
-
|
|
15
|
-
* **automated-publish:** seems that the token was the problem, reverting back to use yarn ([14b72ee](https://github.com/monerium/sdk/commit/14b72ee579c259b29db80193b2e0bf0bfd4cc3c3))
|
|
16
|
-
* **automated-publish:** seems that the token was the problem, reverting back to use yarn ([e73bf66](https://github.com/monerium/sdk/commit/e73bf66fd3bef20fcdfed7187fa018b693e31dd3))
|
|
17
|
-
|
|
18
|
-
## [1.0.19](https://github.com/monerium/sdk/compare/v1.0.18...v1.0.19) (2022-10-12)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
### Bug Fixes
|
|
22
|
-
|
|
23
|
-
* **automated-publish:** tried adding a new npm token ([ec99f13](https://github.com/monerium/sdk/commit/ec99f1395f8285f5730f02b19a12e0d45dbe2197))
|
|
24
|
-
|
|
25
|
-
## [1.0.18](https://github.com/monerium/sdk/compare/v1.0.17...v1.0.18) (2022-10-12)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### Bug Fixes
|
|
29
|
-
|
|
30
|
-
* **automated-publish:** try adding scope to npmrc ([6d965ca](https://github.com/monerium/sdk/commit/6d965ca8e393e97178895da5f8bbd94608f3ea2d))
|
|
31
|
-
|
|
32
|
-
## [1.0.17](https://github.com/monerium/sdk/compare/v1.0.16...v1.0.17) (2022-10-12)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### Bug Fixes
|
|
36
|
-
|
|
37
|
-
* **automated-publish:** use npm instead of yarn ([5da46ae](https://github.com/monerium/sdk/commit/5da46ae84fdca9a4258eff0e0aa24e5285a77786))
|
|
38
|
-
|
|
39
|
-
## [1.0.16](https://github.com/monerium/sdk/compare/v1.0.15...v1.0.16) (2022-10-12)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Bug Fixes
|
|
43
|
-
|
|
44
|
-
* **automated-publish:** im just doing something at this point, hoping to get a different result ([7465711](https://github.com/monerium/sdk/commit/7465711b68904a35f38d9b9b423dd0557acb4e62))
|
|
45
|
-
|
|
46
|
-
## [1.0.15](https://github.com/monerium/sdk/compare/v1.0.14...v1.0.15) (2022-10-12)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
### Bug Fixes
|
|
50
|
-
|
|
51
|
-
* **automated-publish:** try setting scope and authToken in action, ugh ([4dcf78c](https://github.com/monerium/sdk/commit/4dcf78c5bdd47a1fb0d69e56e2b3767bd290bc0f))
|
|
52
|
-
|
|
53
|
-
## [1.0.14](https://github.com/monerium/sdk/compare/v1.0.13...v1.0.14) (2022-10-12)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### Bug Fixes
|
|
57
|
-
|
|
58
|
-
* typo to trigger rebuild ([3e1ad6a](https://github.com/monerium/sdk/commit/3e1ad6a4d883035be700bddd35b9a76ca06b6944))
|
|
59
|
-
|
|
60
|
-
## [1.0.13](https://github.com/monerium/sdk/compare/v1.0.12...v1.0.13) (2022-10-12)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Bug Fixes
|
|
64
|
-
|
|
65
|
-
* **automated-publish:** push to npm registry, yarn doesnt seem to work ([1d97f2c](https://github.com/monerium/sdk/commit/1d97f2c926b82976a8751808eb6816aade35a949))
|
|
66
|
-
|
|
67
|
-
## [1.0.12](https://github.com/monerium/sdk/compare/v1.0.11...v1.0.12) (2022-10-12)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
### Bug Fixes
|
|
71
|
-
|
|
72
|
-
* **automated-publish:** try adding yarnrc ([d3bb76b](https://github.com/monerium/sdk/commit/d3bb76bc353c2b934010be9b74854ace8578c02f))
|
|
73
|
-
|
|
74
|
-
## [1.0.11](https://github.com/monerium/sdk/compare/v1.0.10...v1.0.11) (2022-10-12)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### Bug Fixes
|
|
78
|
-
|
|
79
|
-
* remove empty cli option ([d0d4642](https://github.com/monerium/sdk/commit/d0d46424d2dabd92d31344498fc9dc42bd57c6cb))
|
|
80
|
-
|
|
81
|
-
## [1.0.10](https://github.com/monerium/sdk/compare/v1.0.9...v1.0.10) (2022-10-12)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
### Bug Fixes
|
|
85
|
-
|
|
86
|
-
* try setting config in action ([2c53b3b](https://github.com/monerium/sdk/commit/2c53b3b67628ec04f51f062bb0a57bf5a792b15c))
|
|
87
|
-
|
|
88
|
-
## [1.0.9](https://github.com/monerium/sdk/compare/v1.0.8...v1.0.9) (2022-10-12)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
### Bug Fixes
|
|
92
|
-
|
|
93
|
-
* try adding registry and scope to npmjs ([af26ff4](https://github.com/monerium/sdk/commit/af26ff4c9173a089e69eabaceebabb1583892c85))
|
|
94
|
-
|
|
95
|
-
## [1.0.8](https://github.com/monerium/sdk/compare/v1.0.7...v1.0.8) (2022-10-12)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### Bug Fixes
|
|
99
|
-
|
|
100
|
-
* **automatic-publish:** try adding the scope to action ([437bf59](https://github.com/monerium/sdk/commit/437bf595b225e92d48fce4c22be2fcdbeef8fdca))
|
|
101
|
-
|
|
102
|
-
## [1.0.7](https://github.com/monerium/sdk/compare/v1.0.6...v1.0.7) (2022-10-12)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### Bug Fixes
|
|
106
|
-
|
|
107
|
-
* pipeline still failing, try adding access as public and include registry in package.json ([a798cb0](https://github.com/monerium/sdk/commit/a798cb0a96dcc8c1f07909cd01678db52daa9925))
|
|
108
|
-
|
|
109
|
-
## [1.0.6](https://github.com/monerium/sdk/compare/v1.0.5...v1.0.6) (2022-10-12)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
### Bug Fixes
|
|
113
|
-
|
|
114
|
-
* add the correct registry-url ([1ace305](https://github.com/monerium/sdk/commit/1ace30584efc3fc1cd85e47eaaae6030d01eff98))
|
|
115
|
-
|
|
116
|
-
## [1.0.5](https://github.com/monerium/sdk/compare/v1.0.4...v1.0.5) (2022-10-12)
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
### Bug Fixes
|
|
120
|
-
|
|
121
|
-
* add any comment to trigger an automated publish ([d64bce4](https://github.com/monerium/sdk/commit/d64bce48b6b241f76232b79d097b507367ccad3e))
|
|
122
|
-
|
|
123
|
-
## [1.0.4](https://github.com/monerium/sdk/compare/v1.0.3...v1.0.4) (2022-10-12)
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
### Bug Fixes
|
|
127
|
-
|
|
128
|
-
* bump node version to 18 to be compatible with Svelte ([58dd71c](https://github.com/monerium/sdk/commit/58dd71c489eeb531d7f91a0d359d6bc4b3e50950))
|
|
129
|
-
|
|
130
|
-
## [1.0.3](https://github.com/monerium/sdk/compare/v1.0.2...v1.0.3) (2022-10-12)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
### Bug Fixes
|
|
134
|
-
|
|
135
|
-
* use yarn instead of npm for pipeline ([046256b](https://github.com/monerium/sdk/commit/046256bda17856b20efd454c63ade47de90170b3))
|
|
136
|
-
|
|
137
|
-
## [1.0.2](https://github.com/monerium/sdk/compare/v1.0.1...v1.0.2) (2022-10-12)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
### Bug Fixes
|
|
141
|
-
|
|
142
|
-
* test if adding id:release will trigger npm publish ([2a091bf](https://github.com/monerium/sdk/commit/2a091bfddbacf8c724d78ca626ff91337b4cec0b))
|
|
143
|
-
|
|
144
|
-
## [1.0.1](https://github.com/monerium/sdk/compare/v1.0.0...v1.0.1) (2022-10-12)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### Bug Fixes
|
|
148
|
-
|
|
149
|
-
* testing auto publish to npm ([77ed6a7](https://github.com/monerium/sdk/commit/77ed6a78d78e62bb22a247344267d390e699e297))
|
|
150
|
-
|
|
151
|
-
## 1.0.0 (2022-10-11)
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
### Features
|
|
155
|
-
|
|
156
|
-
* add client class ([0948c05](https://github.com/monerium/sdk/commit/0948c0562e15f525471463b4104dd1a8bdf616f7))
|
|
157
|
-
* add monerium configuration ([792ce5e](https://github.com/monerium/sdk/commit/792ce5e6590931bedc837384869d38018c66afc2))
|
|
158
|
-
* **pipeline:** add release-please github action ([66a8819](https://github.com/monerium/sdk/commit/66a88190b417ebe44b847fd578311ef5c1b463a2))
|
package/src/app.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// See https://kit.svelte.dev/docs/types#app
|
|
2
|
-
// for information about these interfaces
|
|
3
|
-
// and what to do when importing types
|
|
4
|
-
declare namespace App {
|
|
5
|
-
// interface Locals {}
|
|
6
|
-
// interface Platform {}
|
|
7
|
-
// interface PrivateEnv {}
|
|
8
|
-
// interface PublicEnv {}
|
|
9
|
-
// interface Session {}
|
|
10
|
-
// interface Stuff {}
|
|
11
|
-
}
|
package/src/app.html
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
|
6
|
-
<meta name="viewport" content="width=device-width" />
|
|
7
|
-
%sveltekit.head%
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div>%sveltekit.body%</div>
|
|
11
|
-
</body>
|
|
12
|
-
</html>
|