web3-banking-system-sdk 1.0.0 → 1.0.2
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/README.md +375 -1
- package/package.json +154 -154
package/README.md
CHANGED
|
@@ -1 +1,375 @@
|
|
|
1
|
-
|
|
1
|
+
# web3-banking-system-sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for building Web3 applications on top of the Banking System API.
|
|
4
|
+
|
|
5
|
+
It wraps the banking REST API (users, accounts, transactions, orders, organizations,
|
|
6
|
+
programs, promotions) and the chain's Cosmos REST gateway (balances, staking,
|
|
7
|
+
rewards) behind one typed, promise-based client — with session credentials,
|
|
8
|
+
headers, payload shaping and response normalization handled for you.
|
|
9
|
+
|
|
10
|
+
- **Typed end to end** — every request payload and response body has a type.
|
|
11
|
+
- **One entry point** — `new API(config, errorHandler)` exposes every domain.
|
|
12
|
+
- **Session handled for you** — access tokens, device and installation IDs live in
|
|
13
|
+
encrypted cookies and are injected into each request.
|
|
14
|
+
- **Never rejects on API errors** — failures come back as a normalized response object.
|
|
15
|
+
- **Tree-shakeable** — `sideEffects: false`, plus per-domain deep imports.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install web3-banking-system-sdk
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Requirements**
|
|
26
|
+
|
|
27
|
+
| | |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Node.js | 18+ (CI builds and publishes on 24) |
|
|
30
|
+
| TypeScript | 5.x — the package ships ES2022 ESM output; use `moduleResolution: "bundler"` or `"node16"` |
|
|
31
|
+
| Runtime | Browser-first. Credential storage uses the CookieStore API with a `document.cookie` fallback; under Node those reads return empty and requests go out unauthenticated. |
|
|
32
|
+
|
|
33
|
+
Runtime dependencies (`axios`, `dayjs`, `js-cookie`, `qs`, `uuid`, `psl`,
|
|
34
|
+
`ua-parser-js`) ship as regular dependencies — nothing extra to install.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Quick start
|
|
39
|
+
|
|
40
|
+
```ts
|
|
41
|
+
import { API } from "web3-banking-system-sdk";
|
|
42
|
+
|
|
43
|
+
const api = new API(
|
|
44
|
+
{
|
|
45
|
+
baseUrl: "https://api.example.com/", // banking REST API
|
|
46
|
+
nodeUrl: "https://node.example.com/", // Cosmos REST gateway
|
|
47
|
+
programId: "1001", // your program identifier
|
|
48
|
+
lang: "en",
|
|
49
|
+
domain: ".example.com", // cookie scope (shared across subdomains)
|
|
50
|
+
},
|
|
51
|
+
(error) => console.error("[sdk]", error), // called for every transport error
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
// 1. Authenticate — credentials are persisted to encrypted cookies on success
|
|
55
|
+
const login = await api.auth.loginUserCredentials({
|
|
56
|
+
email: "jane@example.com",
|
|
57
|
+
password: "••••••••",
|
|
58
|
+
installationId: "<installation-id>",
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
if (!login.success) {
|
|
62
|
+
console.warn(login.message);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 2. Subsequent calls pick up the stored credentials automatically
|
|
67
|
+
const user = await api.user.getUser();
|
|
68
|
+
const account = await api.account.get(user.data.account[0].info.id);
|
|
69
|
+
|
|
70
|
+
// 3. End the session (logs the device out, then clears cookies)
|
|
71
|
+
await api.logout();
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Configuration
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
type APIConfig = {
|
|
78
|
+
baseUrl: string; // banking REST API base URL
|
|
79
|
+
nodeUrl: string; // blockchain (Cosmos REST) base URL
|
|
80
|
+
programId: string; // namespaces cookies, sent with auth payloads
|
|
81
|
+
lang: string; // default language header ("i18next" in localStorage wins if set)
|
|
82
|
+
domain: string; // cookie domain scope
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
type ErrorHandler = (error: unknown) => void;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`api.context` exposes live config — `getBaseUrl()`, `getNodeUrl()`,
|
|
89
|
+
`getProgramId()`, `getLang()` / `setLang()`, `getGeoHelper()`. Call `setLang()`
|
|
90
|
+
when the user switches language mid-session; services read it at request time,
|
|
91
|
+
not at construction.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Responses and error handling
|
|
96
|
+
|
|
97
|
+
Every call resolves to an `ApiResponse<T>`. Nothing rejects — transport errors
|
|
98
|
+
are routed to your `errorHandler` and converted into a normal response.
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
type ApiResponse<T> = {
|
|
102
|
+
data: T; // typed response body, always including `result`
|
|
103
|
+
success: boolean; // result code is Approved (or Create_User_Completed_Partially)
|
|
104
|
+
message: string; // result.friendly_message — safe to show to users
|
|
105
|
+
error: string | null; // result.message when the HTTP status is >= 400
|
|
106
|
+
};
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
const response = await api.user.getAddress();
|
|
111
|
+
|
|
112
|
+
if (response.success) {
|
|
113
|
+
render(response.data);
|
|
114
|
+
} else {
|
|
115
|
+
toast(response.message);
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
For finer-grained checks, use the result helpers and codes:
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
import { ResultHelper, SystemResponses } from "web3-banking-system-sdk";
|
|
123
|
+
|
|
124
|
+
ResultHelper.isApproved(response.data.result); // "0000" / partial-create
|
|
125
|
+
ResultHelper.isAuthenticated(response.data.result); // not Invalid_Token / Token_Is_Not_Active
|
|
126
|
+
|
|
127
|
+
if (response.data.result.code === SystemResponses.Invalid_Token) {
|
|
128
|
+
// re-authenticate with stored device credentials, then retry
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Session lifecycle is the consumer's job
|
|
133
|
+
|
|
134
|
+
The SDK does **not** refresh tokens or retry on expiry. On `Invalid_Token` /
|
|
135
|
+
`Token_Is_Not_Active`, call `api.auth.loginDeviceCredentials(...)` and retry the
|
|
136
|
+
original call; if that fails, call `api.logout()` and redirect to your login
|
|
137
|
+
route. A thin wrapper around your SDK calls is the usual place for this.
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Architecture
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
your app
|
|
145
|
+
│
|
|
146
|
+
▼
|
|
147
|
+
API ──────────► Proxy ──────────► Service ──────────► HTTP
|
|
148
|
+
one instance, orchestration: transport: axios
|
|
149
|
+
every domain `fill*` payload endpoint URLs,
|
|
150
|
+
shaping, cookie interceptors,
|
|
151
|
+
writes, limited request flags
|
|
152
|
+
token minting
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
- **`API`** — builds one `ClientContextProvider`, one `CookiesHelper`, and every
|
|
156
|
+
proxy from them.
|
|
157
|
+
- **Proxy** (`api.user`, `api.auth`, …) — the consumer-facing surface. Takes a
|
|
158
|
+
friendly `I…Data` object, runs it through a `fill*` function to produce the
|
|
159
|
+
wire payload, and persists credentials after successful auth calls.
|
|
160
|
+
- **Service** — a pure axios wrapper per endpoint. Request interceptors inject
|
|
161
|
+
`Authorization`, `Source_Id`, `Time_Zone`, language, installation ID and geo
|
|
162
|
+
coordinates; the response interceptor normalizes the body and wraps it in
|
|
163
|
+
`ApiResponse<T>`.
|
|
164
|
+
- **`ClientContextProvider`** — source of truth for config, read through getters
|
|
165
|
+
at the moment a request is issued, so fresh values always win.
|
|
166
|
+
- **`CookiesHelper`** — AES-256-CBC-encrypted `IID`, `USR`, `DEK`,
|
|
167
|
+
`access_token` and `jwt_token`, namespaced per `programId`. Full reference:
|
|
168
|
+
[`docs/cookies-helper-reference.md`](docs/cookies-helper-reference.md).
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Domain reference
|
|
173
|
+
|
|
174
|
+
### `api.auth`
|
|
175
|
+
|
|
176
|
+
| Method | Purpose |
|
|
177
|
+
|---|---|
|
|
178
|
+
| `loginUserCredentials(data)` | Email/password login |
|
|
179
|
+
| `loginDeviceCredentials(data)` | Silent re-login from stored device credentials |
|
|
180
|
+
| `loginGoogleCredentials(data)` | Google OAuth login |
|
|
181
|
+
| `generateLimitedToken(data)` | Mint a pre-auth (limited) token |
|
|
182
|
+
|
|
183
|
+
All three login methods write credential cookies when the result is approved.
|
|
184
|
+
|
|
185
|
+
### `api.user`
|
|
186
|
+
|
|
187
|
+
The widest surface — profile, security, contact details, documents, devices.
|
|
188
|
+
|
|
189
|
+
- **Reads** — `getUser`, `getPersonalInfo`, `getPreferences`, `getSecurity`,
|
|
190
|
+
`getEmail`, `getPhone`, `getAddress`, `getBankAccount`, `getCreditCard`,
|
|
191
|
+
`getIdentification`, `getDocuments`, `getAccount`, `getCurrency`, `getGroup`,
|
|
192
|
+
`getExternalAuth`, `getHistory`, `getLatestHistory`, `getDeviceHistory`,
|
|
193
|
+
`getSecurityOperations`, `getTermsAndConditions`
|
|
194
|
+
- **Creates** — `createUser`, `createUserWithGoogle`, `createEmail`,
|
|
195
|
+
`createPhone`, `createAddress`, `createBankAccount`, `createCreditCard`,
|
|
196
|
+
`createIdentification`, `createDevice`, `createCurrency`, `createTicket`,
|
|
197
|
+
`createExternalAuth`, `uploadDocument`, `updateProfilePicture`
|
|
198
|
+
- **Updates** — `updateUser`, `updatePersonalInfo`, `updatePreferences`,
|
|
199
|
+
`updateEmail`, `updatePhone`, `updateAddress`, `updateBankAccount`,
|
|
200
|
+
`updateIdentification`, `updateDevice`, `updateExternalAuth`, `updateUserType`,
|
|
201
|
+
`makeEmailPrimary`, `makePhonePrimary`, `makeAddressPrimary`,
|
|
202
|
+
`makeBankAccountPrimary`
|
|
203
|
+
- **Security** — `securityAccess`, `sendEmailOTP`, `sendPhoneOTP`, `verifyEmail`,
|
|
204
|
+
`verifyPhone`, `verifyDevice`, `verifySecurityData`, `confirmEmail`,
|
|
205
|
+
`confirmPhone`, `confirmDevice`, `confirmSecurityData`, `resetPassword`,
|
|
206
|
+
`resetSecurityCode`, `resetSecurityQuestions`, `resetSecurityData`,
|
|
207
|
+
`validateSecurityCode`, `enrollGoogleAuth`, `activateGoogleAuth`,
|
|
208
|
+
`deactivateGoogleAuth`, `deleteGoogleAuth`
|
|
209
|
+
- **Deletes / logout** — `deleteEmail`, `deletePhone`, `deleteAddress`,
|
|
210
|
+
`deleteBankAccount`, `deleteIdentification`, `deleteDevice`, `logoutDevice`
|
|
211
|
+
|
|
212
|
+
`getAddress`, `getBankAccount` and `getIdentification` always request
|
|
213
|
+
sensitive-data disclosure — there is no consumer flag to set.
|
|
214
|
+
|
|
215
|
+
### `api.account`
|
|
216
|
+
|
|
217
|
+
| Method | Purpose |
|
|
218
|
+
|---|---|
|
|
219
|
+
| `get(accountId)` | Account details |
|
|
220
|
+
| `getLimits(accountId)` | Daily / monthly / yearly deposit, withdraw and transfer limits |
|
|
221
|
+
|
|
222
|
+
### `api.transaction`
|
|
223
|
+
|
|
224
|
+
| Method | Purpose |
|
|
225
|
+
|---|---|
|
|
226
|
+
| `inquiryTransaction(params)` | Query transaction history |
|
|
227
|
+
| `createSystemTransaction(data)` | Internal ledger transaction |
|
|
228
|
+
| `createBlockchainTransaction(data)` | On-chain transaction |
|
|
229
|
+
| `createBlockchainTransferTransaction(data)` | On-chain transfer |
|
|
230
|
+
| `createGatewayCryptoTransaction(data)` | Crypto payment-gateway transaction |
|
|
231
|
+
|
|
232
|
+
### `api.limited` — pre-authentication flows
|
|
233
|
+
|
|
234
|
+
Each method mints a fresh limited token automatically, so these work before a
|
|
235
|
+
user is logged in.
|
|
236
|
+
|
|
237
|
+
`checkForgetPassword`, `validateForgetPassword`, `confirmForgetPassword`,
|
|
238
|
+
`validateEmail`, `validatePhone`, `verifyEmail`, `verifyPhone`, `confirmEmail`,
|
|
239
|
+
`confirmPhone`
|
|
240
|
+
|
|
241
|
+
### `api.order`, `api.organization`, `api.program`, `api.promotion`
|
|
242
|
+
|
|
243
|
+
| Domain | Methods |
|
|
244
|
+
|---|---|
|
|
245
|
+
| `order` | `createOrder` |
|
|
246
|
+
| `organization` | `getOrganization`, `createOrganization`, `updateOrganization`, `deleteOrganization`, `uploadDocument`, `userId` |
|
|
247
|
+
| `program` | `get`, `getSystemFeatures`, `getBin`, `getSignUp`, `getProgramSecurity` |
|
|
248
|
+
| `promotion` | `getPromotionByCode`, `getTwitterSpotlightPostIds`, `incrementPromotionParticipants` |
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Blockchain
|
|
253
|
+
|
|
254
|
+
Two deliberately separate surfaces.
|
|
255
|
+
|
|
256
|
+
**`api.blockchain` — writes.** Authenticated transactions submitted through the
|
|
257
|
+
banking backend in your program's context.
|
|
258
|
+
|
|
259
|
+
```ts
|
|
260
|
+
await api.blockchain.send({ /* IBlockchainSendRequestData */ });
|
|
261
|
+
await api.blockchain.multiSend({ /* IBlockchainMultiSendRequestData */ });
|
|
262
|
+
await api.blockchain.delegate({ /* IBlockchainDelegateRequestData */ });
|
|
263
|
+
await api.blockchain.undelegate({ /* IBlockchainUndelegateRequestData */ });
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**`BlockchainAPI` — reads.** Unauthenticated chain state straight off the Cosmos
|
|
267
|
+
REST gateway, with its own base URL.
|
|
268
|
+
|
|
269
|
+
```ts
|
|
270
|
+
import { BlockchainAPI } from "web3-banking-system-sdk/blockchain";
|
|
271
|
+
|
|
272
|
+
const chain = new BlockchainAPI(
|
|
273
|
+
{ baseUrl: "https://node.example.com/" },
|
|
274
|
+
console.error,
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
await chain.getBalance(address);
|
|
278
|
+
await chain.getSpendableBalances(address, { limit: 50, countTotal: true });
|
|
279
|
+
await chain.getBalanceAndFee(params); // balances + delegation + fee in one round trip
|
|
280
|
+
await chain.getTotalSupply();
|
|
281
|
+
await chain.getSupplyByDenom(denom);
|
|
282
|
+
await chain.getValidators();
|
|
283
|
+
await chain.getValidator(validatorAddress);
|
|
284
|
+
await chain.getDelegation(delegatorAddress, validatorAddress);
|
|
285
|
+
await chain.getDelegations(delegatorAddress);
|
|
286
|
+
await chain.getDelegatorValidators(delegatorAddress);
|
|
287
|
+
await chain.getStakingParams();
|
|
288
|
+
await chain.getDelegationRewards(delegatorAddress, validatorAddress);
|
|
289
|
+
await chain.getTotalRewards(delegatorAddress);
|
|
290
|
+
await chain.getAccount(address);
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
Paginated reads take an optional `PaginationParams` (`key`, `offset`, `limit`,
|
|
294
|
+
`countTotal`, `reverse`), flattened into the gateway's dotted query params
|
|
295
|
+
(`pagination.limit`, …). Omit it and the node's defaults apply.
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Helpers, constants and content
|
|
300
|
+
|
|
301
|
+
Exported from the package root (and from `/helpers`, `/constants`, `/enums`):
|
|
302
|
+
|
|
303
|
+
| Helper | Use |
|
|
304
|
+
|---|---|
|
|
305
|
+
| `CookiesHelper` | Encrypted credential cookies (`IID`, `USR`, `DEK`, tokens) |
|
|
306
|
+
| `CipherHelper` | AES-256-CBC encrypt / decrypt |
|
|
307
|
+
| `StorageHelper`, `LocalStorageHelper` | Storage abstraction |
|
|
308
|
+
| `ResponseHelper`, `ResultHelper`, `AxiosHelper` | Response normalization, result codes, header injection |
|
|
309
|
+
| `DateTimeHelper` | Client time zone and date formatting (dayjs) |
|
|
310
|
+
| `DeviceHelper`, `ClientHelper` | Device fingerprint and user-agent parsing |
|
|
311
|
+
| `GeoHelper` | IP / geo coordinates attached to requests |
|
|
312
|
+
| `UserHelper` | User-shape utilities |
|
|
313
|
+
|
|
314
|
+
Constants and reference data:
|
|
315
|
+
|
|
316
|
+
- `Endpoints`, `UserEndpoints`, `BcApiEndpoints`, `HeaderKeys`, `CookieKeys`,
|
|
317
|
+
`SystemResponses`
|
|
318
|
+
- ~70 enums — `TransactionType`, `OrderStatus`, `DocumentType`, `UserType`,
|
|
319
|
+
`SecurityValidationType`, `CountryCode`, and more
|
|
320
|
+
- `countries`, `currencies`, `states` static content
|
|
321
|
+
- Validation regexes
|
|
322
|
+
|
|
323
|
+
---
|
|
324
|
+
|
|
325
|
+
## Deep imports
|
|
326
|
+
|
|
327
|
+
Import a single domain to keep bundles small:
|
|
328
|
+
|
|
329
|
+
```ts
|
|
330
|
+
import { UserProxy } from "web3-banking-system-sdk/user";
|
|
331
|
+
import { AuthProxy } from "web3-banking-system-sdk/auth";
|
|
332
|
+
import { BlockchainAPI } from "web3-banking-system-sdk/blockchain";
|
|
333
|
+
import { TransactionProxy } from "web3-banking-system-sdk/transaction";
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Available subpaths: `/user`, `/auth`, `/account`, `/transaction`, `/blockchain`,
|
|
337
|
+
`/order`, `/organization`, `/limited`, `/program`, `/promotion`, `/helpers`,
|
|
338
|
+
`/constants`, `/enums`, `/structures`, `/regex`.
|
|
339
|
+
|
|
340
|
+
> **Note:** the `./content` and `./utils` subpaths declared in `package.json` do
|
|
341
|
+
> not resolve — the build emits `dist/contents.js` and `dist/utility.js`. Import
|
|
342
|
+
> that content from the package root until the export map is corrected.
|
|
343
|
+
|
|
344
|
+
---
|
|
345
|
+
|
|
346
|
+
## Development
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
npm install
|
|
350
|
+
npm run build # tsc --build → dist/
|
|
351
|
+
npm test # jest (ts-jest, tests/unit/**)
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Only `dist/` is published (`files: ["/dist"]`). Pushing to `main` triggers
|
|
355
|
+
[`.github/workflows/publish.yaml`](.github/workflows/publish.yaml), which builds
|
|
356
|
+
and runs `npm publish`; the automatic version bump is currently commented out,
|
|
357
|
+
so bump `package.json` manually before merging a release.
|
|
358
|
+
|
|
359
|
+
### Codebase rule: type placement
|
|
360
|
+
|
|
361
|
+
Every `type` and `interface` lives under `src/types/`, in a directory mirroring
|
|
362
|
+
the source file that uses it — `src/helper/geoHelper.ts` →
|
|
363
|
+
`src/types/helper/geoHelper.ts`. Never declare a type or interface inline in a
|
|
364
|
+
non-types file. See [`CLAUDE.md`](CLAUDE.md).
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Links
|
|
369
|
+
|
|
370
|
+
- [Changelog](CHANGELOG.md) — including migration notes for the 0.4.0 architecture overhaul
|
|
371
|
+
- [Issues](https://github.com/GGEZLabs/web3-banking-system-sdk/issues)
|
|
372
|
+
|
|
373
|
+
## License
|
|
374
|
+
|
|
375
|
+
ISC © GGEZ1 Foundation DAO LLC
|
package/package.json
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "web3-banking-system-sdk",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "TypeScript SDK used for interacting with the Web3 applications that uses Banking System API. ",
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"module": "dist/index.js",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": "./dist/index.js",
|
|
11
|
-
"require": "./dist/index.js",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./user": {
|
|
15
|
-
"import": "./dist/user.js",
|
|
16
|
-
"require": "./dist/user.js",
|
|
17
|
-
"types": "./dist/user.d.ts"
|
|
18
|
-
},
|
|
19
|
-
"./auth": {
|
|
20
|
-
"import": "./dist/auth.js",
|
|
21
|
-
"require": "./dist/auth.js",
|
|
22
|
-
"types": "./dist/auth.d.ts"
|
|
23
|
-
},
|
|
24
|
-
"./account": {
|
|
25
|
-
"import": "./dist/account.js",
|
|
26
|
-
"require": "./dist/account.js",
|
|
27
|
-
"types": "./dist/account.d.ts"
|
|
28
|
-
},
|
|
29
|
-
"./transaction": {
|
|
30
|
-
"import": "./dist/transaction.js",
|
|
31
|
-
"require": "./dist/transaction.js",
|
|
32
|
-
"types": "./dist/transaction.d.ts"
|
|
33
|
-
},
|
|
34
|
-
"./blockchain": {
|
|
35
|
-
"import": "./dist/blockchain.js",
|
|
36
|
-
"require": "./dist/blockchain.js",
|
|
37
|
-
"types": "./dist/blockchain.d.ts"
|
|
38
|
-
},
|
|
39
|
-
"./order": {
|
|
40
|
-
"import": "./dist/order.js",
|
|
41
|
-
"require": "./dist/order.js",
|
|
42
|
-
"types": "./dist/order.d.ts"
|
|
43
|
-
},
|
|
44
|
-
"./organization": {
|
|
45
|
-
"import": "./dist/organization.js",
|
|
46
|
-
"require": "./dist/organization.js",
|
|
47
|
-
"types": "./dist/organization.d.ts"
|
|
48
|
-
},
|
|
49
|
-
"./limited": {
|
|
50
|
-
"import": "./dist/limited.js",
|
|
51
|
-
"require": "./dist/limited.js",
|
|
52
|
-
"types": "./dist/limited.d.ts"
|
|
53
|
-
},
|
|
54
|
-
"./program": {
|
|
55
|
-
"import": "./dist/program.js",
|
|
56
|
-
"require": "./dist/program.js",
|
|
57
|
-
"types": "./dist/program.d.ts"
|
|
58
|
-
},
|
|
59
|
-
"./promotion": {
|
|
60
|
-
"import": "./dist/promotion.js",
|
|
61
|
-
"require": "./dist/promotion.js",
|
|
62
|
-
"types": "./dist/promotion.d.ts"
|
|
63
|
-
},
|
|
64
|
-
"./helpers": {
|
|
65
|
-
"import": "./dist/helpers.js",
|
|
66
|
-
"require": "./dist/helpers.js",
|
|
67
|
-
"types": "./dist/helpers.d.ts"
|
|
68
|
-
},
|
|
69
|
-
"./constants": {
|
|
70
|
-
"import": "./dist/constants.js",
|
|
71
|
-
"require": "./dist/constants.js",
|
|
72
|
-
"types": "./dist/constants.d.ts"
|
|
73
|
-
},
|
|
74
|
-
"./enums": {
|
|
75
|
-
"import": "./dist/enums.js",
|
|
76
|
-
"require": "./dist/enums.js",
|
|
77
|
-
"types": "./dist/enums.d.ts"
|
|
78
|
-
},
|
|
79
|
-
"./structures": {
|
|
80
|
-
"import": "./dist/structures.js",
|
|
81
|
-
"require": "./dist/structures.js",
|
|
82
|
-
"types": "./dist/structures.d.ts"
|
|
83
|
-
},
|
|
84
|
-
"./regex": {
|
|
85
|
-
"import": "./dist/regex.js",
|
|
86
|
-
"require": "./dist/regex.js",
|
|
87
|
-
"types": "./dist/regex.d.ts"
|
|
88
|
-
},
|
|
89
|
-
"./utils": {
|
|
90
|
-
"import": "./dist/utils.js",
|
|
91
|
-
"require": "./dist/utils.js",
|
|
92
|
-
"types": "./dist/utils.d.ts"
|
|
93
|
-
},
|
|
94
|
-
"./content": {
|
|
95
|
-
"import": "./dist/content.js",
|
|
96
|
-
"require": "./dist/content.js",
|
|
97
|
-
"types": "./dist/content.d.ts"
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"sideEffects": false,
|
|
101
|
-
"files": [
|
|
102
|
-
"/dist"
|
|
103
|
-
],
|
|
104
|
-
"repository": {
|
|
105
|
-
"type": "git",
|
|
106
|
-
"url": "https://github.com/GGEZLabs/web3-banking-system-sdk"
|
|
107
|
-
},
|
|
108
|
-
"bugs": {
|
|
109
|
-
"url": "https://github.com/GGEZLabs/web3-banking-system-sdk/issues"
|
|
110
|
-
},
|
|
111
|
-
"homepage": "https://github.com/GGEZLabs/web3-banking-system-sdk#readme",
|
|
112
|
-
"scripts": {
|
|
113
|
-
"build": "tsc --build",
|
|
114
|
-
"test": "jest --forceExit",
|
|
115
|
-
"prepare": "npm run build",
|
|
116
|
-
"analyze": "node scripts/essentials-analysis.js"
|
|
117
|
-
},
|
|
118
|
-
"keywords": [
|
|
119
|
-
"REST",
|
|
120
|
-
"CRUD",
|
|
121
|
-
"API",
|
|
122
|
-
"endpoints",
|
|
123
|
-
"update",
|
|
124
|
-
"delete",
|
|
125
|
-
"get",
|
|
126
|
-
"post",
|
|
127
|
-
"Node.js"
|
|
128
|
-
],
|
|
129
|
-
"author": "GGEZ1 Foundation DAO LLC",
|
|
130
|
-
"license": "ISC",
|
|
131
|
-
"dependencies": {
|
|
132
|
-
"axios": "^1.11.0",
|
|
133
|
-
"crypto": "^1.0.1",
|
|
134
|
-
"dayjs": "^1.11.10",
|
|
135
|
-
"dotenv": "^16.3.1",
|
|
136
|
-
"js-cookie": "^3.0.5",
|
|
137
|
-
"psl": "^1.15.0",
|
|
138
|
-
"qs": "^6.11.2",
|
|
139
|
-
"ua-parser-js": "^2.0.5",
|
|
140
|
-
"uuid": "^13.0.0"
|
|
141
|
-
},
|
|
142
|
-
"devDependencies": {
|
|
143
|
-
"@types/axios": "^0.14.0",
|
|
144
|
-
"@types/jest": "^29.5.14",
|
|
145
|
-
"@types/js-cookie": "^3.0.6",
|
|
146
|
-
"@types/node": "^20.19.39",
|
|
147
|
-
"@types/qs": "^6.9.9",
|
|
148
|
-
"@types/uuid": "^11.0.0",
|
|
149
|
-
"axios": "^1.11.0",
|
|
150
|
-
"jest": "^29.7.0",
|
|
151
|
-
"ts-jest": "^29.4.5",
|
|
152
|
-
"typescript": "^5.9.3"
|
|
153
|
-
}
|
|
154
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "web3-banking-system-sdk",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "TypeScript SDK used for interacting with the Web3 applications that uses Banking System API. ",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js",
|
|
11
|
+
"require": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./user": {
|
|
15
|
+
"import": "./dist/user.js",
|
|
16
|
+
"require": "./dist/user.js",
|
|
17
|
+
"types": "./dist/user.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./auth": {
|
|
20
|
+
"import": "./dist/auth.js",
|
|
21
|
+
"require": "./dist/auth.js",
|
|
22
|
+
"types": "./dist/auth.d.ts"
|
|
23
|
+
},
|
|
24
|
+
"./account": {
|
|
25
|
+
"import": "./dist/account.js",
|
|
26
|
+
"require": "./dist/account.js",
|
|
27
|
+
"types": "./dist/account.d.ts"
|
|
28
|
+
},
|
|
29
|
+
"./transaction": {
|
|
30
|
+
"import": "./dist/transaction.js",
|
|
31
|
+
"require": "./dist/transaction.js",
|
|
32
|
+
"types": "./dist/transaction.d.ts"
|
|
33
|
+
},
|
|
34
|
+
"./blockchain": {
|
|
35
|
+
"import": "./dist/blockchain.js",
|
|
36
|
+
"require": "./dist/blockchain.js",
|
|
37
|
+
"types": "./dist/blockchain.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./order": {
|
|
40
|
+
"import": "./dist/order.js",
|
|
41
|
+
"require": "./dist/order.js",
|
|
42
|
+
"types": "./dist/order.d.ts"
|
|
43
|
+
},
|
|
44
|
+
"./organization": {
|
|
45
|
+
"import": "./dist/organization.js",
|
|
46
|
+
"require": "./dist/organization.js",
|
|
47
|
+
"types": "./dist/organization.d.ts"
|
|
48
|
+
},
|
|
49
|
+
"./limited": {
|
|
50
|
+
"import": "./dist/limited.js",
|
|
51
|
+
"require": "./dist/limited.js",
|
|
52
|
+
"types": "./dist/limited.d.ts"
|
|
53
|
+
},
|
|
54
|
+
"./program": {
|
|
55
|
+
"import": "./dist/program.js",
|
|
56
|
+
"require": "./dist/program.js",
|
|
57
|
+
"types": "./dist/program.d.ts"
|
|
58
|
+
},
|
|
59
|
+
"./promotion": {
|
|
60
|
+
"import": "./dist/promotion.js",
|
|
61
|
+
"require": "./dist/promotion.js",
|
|
62
|
+
"types": "./dist/promotion.d.ts"
|
|
63
|
+
},
|
|
64
|
+
"./helpers": {
|
|
65
|
+
"import": "./dist/helpers.js",
|
|
66
|
+
"require": "./dist/helpers.js",
|
|
67
|
+
"types": "./dist/helpers.d.ts"
|
|
68
|
+
},
|
|
69
|
+
"./constants": {
|
|
70
|
+
"import": "./dist/constants.js",
|
|
71
|
+
"require": "./dist/constants.js",
|
|
72
|
+
"types": "./dist/constants.d.ts"
|
|
73
|
+
},
|
|
74
|
+
"./enums": {
|
|
75
|
+
"import": "./dist/enums.js",
|
|
76
|
+
"require": "./dist/enums.js",
|
|
77
|
+
"types": "./dist/enums.d.ts"
|
|
78
|
+
},
|
|
79
|
+
"./structures": {
|
|
80
|
+
"import": "./dist/structures.js",
|
|
81
|
+
"require": "./dist/structures.js",
|
|
82
|
+
"types": "./dist/structures.d.ts"
|
|
83
|
+
},
|
|
84
|
+
"./regex": {
|
|
85
|
+
"import": "./dist/regex.js",
|
|
86
|
+
"require": "./dist/regex.js",
|
|
87
|
+
"types": "./dist/regex.d.ts"
|
|
88
|
+
},
|
|
89
|
+
"./utils": {
|
|
90
|
+
"import": "./dist/utils.js",
|
|
91
|
+
"require": "./dist/utils.js",
|
|
92
|
+
"types": "./dist/utils.d.ts"
|
|
93
|
+
},
|
|
94
|
+
"./content": {
|
|
95
|
+
"import": "./dist/content.js",
|
|
96
|
+
"require": "./dist/content.js",
|
|
97
|
+
"types": "./dist/content.d.ts"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"sideEffects": false,
|
|
101
|
+
"files": [
|
|
102
|
+
"/dist"
|
|
103
|
+
],
|
|
104
|
+
"repository": {
|
|
105
|
+
"type": "git",
|
|
106
|
+
"url": "https://github.com/GGEZLabs/web3-banking-system-sdk"
|
|
107
|
+
},
|
|
108
|
+
"bugs": {
|
|
109
|
+
"url": "https://github.com/GGEZLabs/web3-banking-system-sdk/issues"
|
|
110
|
+
},
|
|
111
|
+
"homepage": "https://github.com/GGEZLabs/web3-banking-system-sdk#readme",
|
|
112
|
+
"scripts": {
|
|
113
|
+
"build": "tsc --build",
|
|
114
|
+
"test": "jest --forceExit",
|
|
115
|
+
"prepare": "npm run build",
|
|
116
|
+
"analyze": "node scripts/essentials-analysis.js"
|
|
117
|
+
},
|
|
118
|
+
"keywords": [
|
|
119
|
+
"REST",
|
|
120
|
+
"CRUD",
|
|
121
|
+
"API",
|
|
122
|
+
"endpoints",
|
|
123
|
+
"update",
|
|
124
|
+
"delete",
|
|
125
|
+
"get",
|
|
126
|
+
"post",
|
|
127
|
+
"Node.js"
|
|
128
|
+
],
|
|
129
|
+
"author": "GGEZ1 Foundation DAO LLC",
|
|
130
|
+
"license": "ISC",
|
|
131
|
+
"dependencies": {
|
|
132
|
+
"axios": "^1.11.0",
|
|
133
|
+
"crypto": "^1.0.1",
|
|
134
|
+
"dayjs": "^1.11.10",
|
|
135
|
+
"dotenv": "^16.3.1",
|
|
136
|
+
"js-cookie": "^3.0.5",
|
|
137
|
+
"psl": "^1.15.0",
|
|
138
|
+
"qs": "^6.11.2",
|
|
139
|
+
"ua-parser-js": "^2.0.5",
|
|
140
|
+
"uuid": "^13.0.0"
|
|
141
|
+
},
|
|
142
|
+
"devDependencies": {
|
|
143
|
+
"@types/axios": "^0.14.0",
|
|
144
|
+
"@types/jest": "^29.5.14",
|
|
145
|
+
"@types/js-cookie": "^3.0.6",
|
|
146
|
+
"@types/node": "^20.19.39",
|
|
147
|
+
"@types/qs": "^6.9.9",
|
|
148
|
+
"@types/uuid": "^11.0.0",
|
|
149
|
+
"axios": "^1.11.0",
|
|
150
|
+
"jest": "^29.7.0",
|
|
151
|
+
"ts-jest": "^29.4.5",
|
|
152
|
+
"typescript": "^5.9.3"
|
|
153
|
+
}
|
|
154
|
+
}
|