@walletconnect/pos-client 1.0.0 → 1.0.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.md +95 -0
- package/README.md +9 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +41 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types/client.d.ts +23 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/constants/chains.d.ts +3 -0
- package/dist/types/constants/chains.d.ts.map +1 -0
- package/dist/types/constants/client.d.ts +12 -0
- package/dist/types/constants/client.d.ts.map +1 -0
- package/dist/types/constants/index.d.ts +4 -0
- package/dist/types/constants/index.d.ts.map +1 -0
- package/dist/types/constants/rpc.d.ts +20 -0
- package/dist/types/constants/rpc.d.ts.map +1 -0
- package/dist/types/controllers/engine.d.ts +41 -0
- package/dist/types/controllers/engine.d.ts.map +1 -0
- package/dist/types/controllers/index.d.ts +2 -0
- package/dist/types/controllers/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types/client.d.ts +118 -0
- package/dist/types/types/client.d.ts.map +1 -0
- package/dist/types/types/engine.d.ts +129 -0
- package/dist/types/types/engine.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +4 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +20 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +3 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/misc.d.ts +2 -0
- package/dist/types/utils/misc.d.ts.map +1 -0
- package/dist/types/utils/validator.d.ts +4 -0
- package/dist/types/utils/validator.d.ts.map +1 -0
- package/package.json +49 -7
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { POSClientTypes } from "./index.js";
|
|
2
|
+
export declare namespace UtilsTypes {
|
|
3
|
+
type SupportedNamespace = {
|
|
4
|
+
assetNamespaces: string[];
|
|
5
|
+
capabilities: any;
|
|
6
|
+
events: any[];
|
|
7
|
+
methods: string[];
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
type SupportedNamespaces = SupportedNamespace[];
|
|
11
|
+
type isValidTokenParams = {
|
|
12
|
+
token: POSClientTypes.Token;
|
|
13
|
+
supportedNamespaces: SupportedNamespaces;
|
|
14
|
+
};
|
|
15
|
+
type isValidPaymentIntentParams = {
|
|
16
|
+
paymentIntent: POSClientTypes.PaymentIntent;
|
|
17
|
+
supportedNamespaces: SupportedNamespaces;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/types/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAG5C,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,KAAK,kBAAkB,GAAG;QACxB,eAAe,EAAE,MAAM,EAAE,CAAC;QAC1B,YAAY,EAAE,GAAG,CAAC;QAClB,MAAM,EAAE,GAAG,EAAE,CAAC;QACd,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IAEF,KAAK,mBAAmB,GAAG,kBAAkB,EAAE,CAAC;IAEhD,KAAK,kBAAkB,GAAG;QACxB,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC;QAC5B,mBAAmB,EAAE,mBAAmB,CAAC;KAC1C,CAAC;IAEF,KAAK,0BAA0B,GAAG;QAChC,aAAa,EAAE,cAAc,CAAC,aAAa,CAAC;QAC5C,mBAAmB,EAAE,mBAAmB,CAAC;KAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../src/utils/misc.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,GAAI,CAAC,EAAE,UAAU,MAAM,OAAO,CAAC,CAAC,CAAC,WAIhD,OAAO,CAAC,CAAC,CAgB3B,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { UtilsTypes } from "../types/index.js";
|
|
2
|
+
export declare const isValidToken: (params: UtilsTypes.isValidTokenParams) => boolean;
|
|
3
|
+
export declare const isValidPaymentIntent: (params: UtilsTypes.isValidPaymentIntentParams) => boolean;
|
|
4
|
+
//# sourceMappingURL=validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/utils/validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,eAAO,MAAM,YAAY,GAAI,QAAQ,UAAU,CAAC,kBAAkB,YAwBjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,QAAQ,UAAU,CAAC,0BAA0B,YAOjF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walletconnect/pos-client",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"description": "POS Client for WalletConnect Protocol",
|
|
4
|
+
"version": "1.0.1",
|
|
5
|
+
"private": false,
|
|
6
|
+
"author": "WalletConnect, Inc. <walletconnect.com>",
|
|
7
|
+
"homepage": "https://github.com/walletconnect/walletconnect-monorepo/",
|
|
8
|
+
"license": "Apache-2.0",
|
|
9
|
+
"main": "dist/index.cjs",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"unpkg": "dist/index.umd.js",
|
|
12
|
+
"types": "dist/types/index.d.ts",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/types/index.d.ts",
|
|
17
|
+
"module": "./dist/index.js",
|
|
18
|
+
"default": "./dist/index.cjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"wallet",
|
|
26
|
+
"walletconnect",
|
|
27
|
+
"walletkit",
|
|
28
|
+
"pos"
|
|
29
|
+
],
|
|
30
|
+
"sideEffects": false,
|
|
5
31
|
"scripts": {
|
|
6
|
-
"
|
|
32
|
+
"clean": "rm -rf dist",
|
|
33
|
+
"build:pre": "npm run clean",
|
|
34
|
+
"build:types": "tsc",
|
|
35
|
+
"build:source": "rollup --config rollup.config.js",
|
|
36
|
+
"build": "npm run build:pre; npm run build:source; npm run build:types",
|
|
37
|
+
"test:pre": "rm -rf ./test/tmp",
|
|
38
|
+
"test": "npm run test:pre; vitest run --dir test --reporter=verbose",
|
|
39
|
+
"lint": "eslint -c '../../.eslintrc' --fix './src/**/*.ts'",
|
|
40
|
+
"prettier": "prettier --check '{src,test}/**/*.{js,ts,jsx,tsx}'"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@walletconnect/core": "2.23.1",
|
|
44
|
+
"@walletconnect/jsonrpc-provider": "1.0.14",
|
|
45
|
+
"@walletconnect/jsonrpc-utils": "1.0.8",
|
|
46
|
+
"@walletconnect/logger": "3.0.1",
|
|
47
|
+
"@walletconnect/sign-client": "2.23.1",
|
|
48
|
+
"@walletconnect/types": "2.23.1",
|
|
49
|
+
"@walletconnect/utils": "2.23.1"
|
|
7
50
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"description": ""
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"vitest": "3.2.4"
|
|
53
|
+
}
|
|
12
54
|
}
|