@ocap/client 1.18.27 → 1.18.30

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/dist/browser.d.ts CHANGED
@@ -15,7 +15,7 @@ export = GraphQLClient;
15
15
  declare class GraphQLClient {
16
16
  config: any;
17
17
  schema: void;
18
- constructor(httpEndpoint: string);
18
+ constructor(endpoint: string, autoInit: boolean = true);
19
19
 
20
20
  getQueries(): string[];
21
21
  getSubscriptions(): string[];
package/dist/client.js CHANGED
@@ -19,14 +19,15 @@ class GraphQLClient extends GraphQLClientBase {
19
19
  * Create an instance of GraphQLClient
20
20
  *
21
21
  * @constructor
22
- * @param {string} [endpoint='http://localhost:8210/api'] - the graphql endpoint
22
+ * @param {string} endpoint the graphql endpoint of the chain
23
+ * @param {boolean} autoInit whether auto warmup context
23
24
  * @see GraphQLClient#getQueries
24
25
  * @see GraphQLClient#getMutations
25
26
  * @see GraphQLClient#getSubscriptions
26
27
  * @see GraphQLClient#getTxSendMethods
27
28
  * @see GraphQLClient#getTxEncodeMethods
28
29
  */
29
- constructor(endpoint = 'http://localhost:8210/api/gql', autoInit = true) {
30
+ constructor(endpoint, autoInit = true) {
30
31
  super(endpoint);
31
32
  createExtensionMethods(this);
32
33
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.js"],"names":["createExtensionMethods","require","GraphQLClientBase","GraphQLClient","constructor","endpoint","autoInit","getContext","catch","err","console","warn","message","module","exports"],"mappings":"AAAA,MAAM,EAAEA,sBAAF,KAA6BC,QAAQ,aAAR,CAAnC;AACA,MAAMC,oBAAoBD,QAAQ,QAAR,CAA1B;;AAEA;;;;;;;;;;;;;AAaA,MAAME,aAAN,SAA4BD,iBAA5B,CAA8C;AAC5C;;;;;;;;;;;AAWAE,cAAYC,WAAW,+BAAvB,EAAwDC,WAAW,IAAnE,EAAyE;AACvE,UAAMD,QAAN;AACAL,2BAAuB,IAAvB;;AAEA;AACA,QAAIM,QAAJ,EAAc;AACZ,WAAKC,UAAL,GAAkBC,KAAlB,CAAyBC,GAAD,IAAS;AAC/BC,gBAAQC,IAAR,CAAa,0BAAb,EAAyCF,IAAIG,OAA7C;AACD,OAFD;AAGD;AACF;AAtB2C;;AAyB9CC,OAAOC,OAAP,GAAiBX,aAAjB","file":"client.js","sourcesContent":["const { createExtensionMethods } = require('./extension');\nconst GraphQLClientBase = require('./base');\n\n/**\n * An http client that can read/write data to a forge powered blockchain node, can be used in both node.js and browser.\n *\n * Please note that, due to internal implementation of google-protobuf, all `repeated fields` names are suffixed with `List`\n *\n * @class\n * @example\n * const GraphQLClient = require('@ocap/client');\n *\n * const client = new GraphQLClient('https://beta.abtnetwork.io/api');\n *\n * const res = await client.getChainInfo();\n */\nclass GraphQLClient extends GraphQLClientBase {\n /**\n * Create an instance of GraphQLClient\n *\n * @constructor\n * @param {string} [endpoint='http://localhost:8210/api'] - the graphql endpoint\n * @see GraphQLClient#getQueries\n * @see GraphQLClient#getMutations\n * @see GraphQLClient#getSubscriptions\n * @see GraphQLClient#getTxSendMethods\n * @see GraphQLClient#getTxEncodeMethods\n */\n constructor(endpoint = 'http://localhost:8210/api/gql', autoInit = true) {\n super(endpoint);\n createExtensionMethods(this);\n\n // warmup the context\n if (autoInit) {\n this.getContext().catch((err) => {\n console.warn('failed to warmup context', err.message);\n });\n }\n }\n}\n\nmodule.exports = GraphQLClient;\n"]}
1
+ {"version":3,"sources":["../src/client.js"],"names":["createExtensionMethods","require","GraphQLClientBase","GraphQLClient","constructor","endpoint","autoInit","getContext","catch","err","console","warn","message","module","exports"],"mappings":"AAAA,MAAM,EAAEA,sBAAF,KAA6BC,QAAQ,aAAR,CAAnC;AACA,MAAMC,oBAAoBD,QAAQ,QAAR,CAA1B;;AAEA;;;;;;;;;;;;;AAaA,MAAME,aAAN,SAA4BD,iBAA5B,CAA8C;AAC5C;;;;;;;;;;;;AAYAE,cAAYC,QAAZ,EAAsBC,WAAW,IAAjC,EAAuC;AACrC,UAAMD,QAAN;AACAL,2BAAuB,IAAvB;;AAEA;AACA,QAAIM,QAAJ,EAAc;AACZ,WAAKC,UAAL,GAAkBC,KAAlB,CAAyBC,GAAD,IAAS;AAC/BC,gBAAQC,IAAR,CAAa,0BAAb,EAAyCF,IAAIG,OAA7C;AACD,OAFD;AAGD;AACF;AAvB2C;;AA0B9CC,OAAOC,OAAP,GAAiBX,aAAjB","file":"client.js","sourcesContent":["const { createExtensionMethods } = require('./extension');\nconst GraphQLClientBase = require('./base');\n\n/**\n * An http client that can read/write data to a forge powered blockchain node, can be used in both node.js and browser.\n *\n * Please note that, due to internal implementation of google-protobuf, all `repeated fields` names are suffixed with `List`\n *\n * @class\n * @example\n * const GraphQLClient = require('@ocap/client');\n *\n * const client = new GraphQLClient('https://beta.abtnetwork.io/api');\n *\n * const res = await client.getChainInfo();\n */\nclass GraphQLClient extends GraphQLClientBase {\n /**\n * Create an instance of GraphQLClient\n *\n * @constructor\n * @param {string} endpoint the graphql endpoint of the chain\n * @param {boolean} autoInit whether auto warmup context\n * @see GraphQLClient#getQueries\n * @see GraphQLClient#getMutations\n * @see GraphQLClient#getSubscriptions\n * @see GraphQLClient#getTxSendMethods\n * @see GraphQLClient#getTxEncodeMethods\n */\n constructor(endpoint, autoInit = true) {\n super(endpoint);\n createExtensionMethods(this);\n\n // warmup the context\n if (autoInit) {\n this.getContext().catch((err) => {\n console.warn('failed to warmup context', err.message);\n });\n }\n }\n}\n\nmodule.exports = GraphQLClient;\n"]}
package/dist/report.html CHANGED
@@ -3,7 +3,7 @@
3
3
  <head>
4
4
  <meta charset="UTF-8"/>
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
- <title>@ocap/client [7 Dec 2022 at 02:21]</title>
6
+ <title>@ocap/client [7 Dec 2022 at 06:47]</title>
7
7
  <link rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABrVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+O1foceMD///+J0/qK1Pr7/v8Xdr/9///W8P4UdL7L7P0Scr2r4Pyj3vwad8D5/f/2/f+55f3E6f34+/2H0/ojfMKpzOd0rNgQcb3F3O/j9f7c8v6g3Pz0/P/w+v/q+P7n9v6T1/uQ1vuE0vqLut/y+v+Z2fvt+f+15Pzv9fuc2/vR7v2V2Pvd6/bg9P7I6/285/2y4/yp3/zp8vk8i8kqgMT7/P31+fyv4vxGkcz6/P6/6P3j7vfS5PNnpNUxhcbO7f7F6v3O4vHK3/DA2u631Ouy0eqXweKJud5wqthfoNMMbLvY8f73+v2dxeR8sNtTmdDx9/zX6PSjyeaCtd1YnNGX2PuQveCGt95Nls42h8dLlM3F4vBtAAAAM3RSTlMAAyOx0/sKBvik8opWGBMOAe3l1snDm2E9LSb06eHcu5JpHbarfHZCN9CBb08zzkdNS0kYaptYAAAFV0lEQVRYw92X51/aYBDHHS2O2qqttVbrqNq9m+TJIAYIShBkWwqIiCgoWvfeq7Z2/s29hyQNyUcR7LveGwVyXy6XH8/9rqxglLfUPLxVduUor3h0rfp2TYvpivk37929TkG037hffoX0+peVtZQc1589rigVUdXS/ABSAyEmGIO/1XfvldSK8vs3OqB6u3m0nxmIrvgB0dj7rr7Y9IbuF68hnfFaiHA/sxqm0wciIG43P60qKv9WXWc1RXGh/mFESFABTSBi0sNAKzqet17eCtOb3kZIDwxEEU0oAIJGYxNBDhBND29e0rtXXbcpuPmED9IhEAAQ/AXEaF8EPmnrrKsv0LvWR3fg5sWDNAFZOgAgaKvZDogHNU9MFwnnYROkc56RD5CjAbQX9Ow4g7upCsvYu55aSI/Nj0H1akgKQEUM94dwK65hYRmFU9MIcH/fqJYOZYcnuJSU/waKDgTOEVaVKhwrTRP5XzgSpAITYzom7UvkhFX5VutmxeNnWDjjswTKTyfgluNDGbUpWissXhF3s7mlSml+czWkg3D0l1nNjGNjz3myOQOa1KM/jOS6ebdbAVTCi4gljHSFrviza7tOgRWcS0MOUX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5VStpanIjQmEhV0/nVt5VOFUvix6awJhPcAaTEShgrG+iGyvb5a0Ndb1YGHFPEwoqAinoaykaID1o1pdPNu7XsnCKQ3R+hwWIIhGvORcJUBYXe3Xa3vq/mF/N9V13ugufMkfXn+KHsRD0B8AAAAASUVORK5CYII=" type="image/x-icon" />
8
8
 
9
9
  <script>
package/docs/README.md CHANGED
@@ -16,7 +16,7 @@ Please note that, due to internal implementation of google-protobuf, all `repeat
16
16
  <!---->
17
17
 
18
18
  * [GraphQLClient](#GraphQLClient)
19
- * [new GraphQLClient(\[endpoint\])](#new_GraphQLClient_new)
19
+ * [new GraphQLClient(endpoint, autoInit)](#new_GraphQLClient_new)
20
20
  * *instance*
21
21
  * [fromUnitToToken(value)](#GraphQLClient+fromUnitToToken) ⇒ `string`
22
22
  * [fromTokenToUnit(amount)](#GraphQLClient+fromTokenToUnit) ⇒ `BN`
@@ -402,13 +402,14 @@ Please note that, due to internal implementation of google-protobuf, all `repeat
402
402
  * [UpgradeNodeTxInput](#GraphQLClient.UpgradeNodeTxInput) : `Object`
403
403
  * [WithdrawTokenV2TxInput](#GraphQLClient.WithdrawTokenV2TxInput) : `Object`
404
404
 
405
- ### new GraphQLClient(\[endpoint])
405
+ ### new GraphQLClient(endpoint, autoInit)
406
406
 
407
407
  Create an instance of GraphQLClient
408
408
 
409
- | Param | Type | Default | Description |
410
- | ---------- | -------- | --------------------------------------------------- | -------------------- |
411
- | [endpoint] | `string` | `&quot;&#x27;http://localhost:8210/api&#x27;&quot;` | the graphql endpoint |
409
+ | Param | Type | Default | Description |
410
+ | -------- | --------- | ------- | --------------------------------- |
411
+ | endpoint | `string` | | the graphql endpoint of the chain |
412
+ | autoInit | `boolean` | `true` | whether auto warmup context |
412
413
 
413
414
  **Example**
414
415
 
package/lib/client.js CHANGED
@@ -21,14 +21,15 @@ class GraphQLClient extends GraphQLClientBase {
21
21
  * Create an instance of GraphQLClient
22
22
  *
23
23
  * @constructor
24
- * @param {string} [endpoint='http://localhost:8210/api'] - the graphql endpoint
24
+ * @param {string} endpoint the graphql endpoint of the chain
25
+ * @param {boolean} autoInit whether auto warmup context
25
26
  * @see GraphQLClient#getQueries
26
27
  * @see GraphQLClient#getMutations
27
28
  * @see GraphQLClient#getSubscriptions
28
29
  * @see GraphQLClient#getTxSendMethods
29
30
  * @see GraphQLClient#getTxEncodeMethods
30
31
  */
31
- constructor(endpoint = 'http://localhost:8210/api/gql', autoInit = true) {
32
+ constructor(endpoint, autoInit = true) {
32
33
  super(endpoint);
33
34
  createExtensionMethods(this);
34
35
 
package/lib/client.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.js"],"names":["createExtensionMethods","require","GraphQLClientBase","GraphQLClient","constructor","endpoint","autoInit","getContext","catch","err","console","warn","message","module","exports"],"mappings":";;AAAA,MAAM,EAAEA,sBAAF,KAA6BC,QAAQ,aAAR,CAAnC;AACA,MAAMC,oBAAoBD,QAAQ,QAAR,CAA1B;;AAEA;;;;;;;;;;;;;AAaA,MAAME,aAAN,SAA4BD,iBAA5B,CAA8C;AAC5C;;;;;;;;;;;AAWAE,cAAYC,WAAW,+BAAvB,EAAwDC,WAAW,IAAnE,EAAyE;AACvE,UAAMD,QAAN;AACAL,2BAAuB,IAAvB;;AAEA;AACA,QAAIM,QAAJ,EAAc;AACZ,WAAKC,UAAL,GAAkBC,KAAlB,CAAyBC,GAAD,IAAS;AAC/BC,gBAAQC,IAAR,CAAa,0BAAb,EAAyCF,IAAIG,OAA7C;AACD,OAFD;AAGD;AACF;AAtB2C;;AAyB9CC,OAAOC,OAAP,GAAiBX,aAAjB","file":"client.js","sourcesContent":["const { createExtensionMethods } = require('./extension');\nconst GraphQLClientBase = require('./base');\n\n/**\n * An http client that can read/write data to a forge powered blockchain node, can be used in both node.js and browser.\n *\n * Please note that, due to internal implementation of google-protobuf, all `repeated fields` names are suffixed with `List`\n *\n * @class\n * @example\n * const GraphQLClient = require('@ocap/client');\n *\n * const client = new GraphQLClient('https://beta.abtnetwork.io/api');\n *\n * const res = await client.getChainInfo();\n */\nclass GraphQLClient extends GraphQLClientBase {\n /**\n * Create an instance of GraphQLClient\n *\n * @constructor\n * @param {string} [endpoint='http://localhost:8210/api'] - the graphql endpoint\n * @see GraphQLClient#getQueries\n * @see GraphQLClient#getMutations\n * @see GraphQLClient#getSubscriptions\n * @see GraphQLClient#getTxSendMethods\n * @see GraphQLClient#getTxEncodeMethods\n */\n constructor(endpoint = 'http://localhost:8210/api/gql', autoInit = true) {\n super(endpoint);\n createExtensionMethods(this);\n\n // warmup the context\n if (autoInit) {\n this.getContext().catch((err) => {\n console.warn('failed to warmup context', err.message);\n });\n }\n }\n}\n\nmodule.exports = GraphQLClient;\n"]}
1
+ {"version":3,"sources":["../src/client.js"],"names":["createExtensionMethods","require","GraphQLClientBase","GraphQLClient","constructor","endpoint","autoInit","getContext","catch","err","console","warn","message","module","exports"],"mappings":";;AAAA,MAAM,EAAEA,sBAAF,KAA6BC,QAAQ,aAAR,CAAnC;AACA,MAAMC,oBAAoBD,QAAQ,QAAR,CAA1B;;AAEA;;;;;;;;;;;;;AAaA,MAAME,aAAN,SAA4BD,iBAA5B,CAA8C;AAC5C;;;;;;;;;;;;AAYAE,cAAYC,QAAZ,EAAsBC,WAAW,IAAjC,EAAuC;AACrC,UAAMD,QAAN;AACAL,2BAAuB,IAAvB;;AAEA;AACA,QAAIM,QAAJ,EAAc;AACZ,WAAKC,UAAL,GAAkBC,KAAlB,CAAyBC,GAAD,IAAS;AAC/BC,gBAAQC,IAAR,CAAa,0BAAb,EAAyCF,IAAIG,OAA7C;AACD,OAFD;AAGD;AACF;AAvB2C;;AA0B9CC,OAAOC,OAAP,GAAiBX,aAAjB","file":"client.js","sourcesContent":["const { createExtensionMethods } = require('./extension');\nconst GraphQLClientBase = require('./base');\n\n/**\n * An http client that can read/write data to a forge powered blockchain node, can be used in both node.js and browser.\n *\n * Please note that, due to internal implementation of google-protobuf, all `repeated fields` names are suffixed with `List`\n *\n * @class\n * @example\n * const GraphQLClient = require('@ocap/client');\n *\n * const client = new GraphQLClient('https://beta.abtnetwork.io/api');\n *\n * const res = await client.getChainInfo();\n */\nclass GraphQLClient extends GraphQLClientBase {\n /**\n * Create an instance of GraphQLClient\n *\n * @constructor\n * @param {string} endpoint the graphql endpoint of the chain\n * @param {boolean} autoInit whether auto warmup context\n * @see GraphQLClient#getQueries\n * @see GraphQLClient#getMutations\n * @see GraphQLClient#getSubscriptions\n * @see GraphQLClient#getTxSendMethods\n * @see GraphQLClient#getTxEncodeMethods\n */\n constructor(endpoint, autoInit = true) {\n super(endpoint);\n createExtensionMethods(this);\n\n // warmup the context\n if (autoInit) {\n this.getContext().catch((err) => {\n console.warn('failed to warmup context', err.message);\n });\n }\n }\n}\n\nmodule.exports = GraphQLClient;\n"]}
package/lib/node.d.ts CHANGED
@@ -15,7 +15,7 @@ export = GraphQLClient;
15
15
  declare class GraphQLClient {
16
16
  config: any;
17
17
  schema: void;
18
- constructor(httpEndpoint: string);
18
+ constructor(endpoint: string, autoInit: boolean = true);
19
19
 
20
20
  getQueries(): string[];
21
21
  getSubscriptions(): string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocap/client",
3
- "version": "1.18.27",
3
+ "version": "1.18.30",
4
4
  "description": "graphql client to read/write data on arcblock blockchain",
5
5
  "keywords": [
6
6
  "graphql",
@@ -30,17 +30,17 @@
30
30
  "lib"
31
31
  ],
32
32
  "dependencies": {
33
- "@arcblock/did": "1.18.27",
34
- "@arcblock/did-util": "1.18.27",
35
- "@arcblock/jwt": "1.18.27",
33
+ "@arcblock/did": "1.18.30",
34
+ "@arcblock/did-util": "1.18.30",
35
+ "@arcblock/jwt": "1.18.30",
36
36
  "@arcblock/sdk-util": "^0.33.0",
37
- "@arcblock/ws": "1.18.27",
38
- "@ocap/asset": "1.18.27",
39
- "@ocap/mcrypto": "1.18.27",
40
- "@ocap/message": "1.18.27",
41
- "@ocap/proto": "1.18.27",
42
- "@ocap/util": "1.18.27",
43
- "@ocap/wallet": "1.18.27",
37
+ "@arcblock/ws": "1.18.30",
38
+ "@ocap/asset": "1.18.30",
39
+ "@ocap/mcrypto": "1.18.30",
40
+ "@ocap/message": "1.18.30",
41
+ "@ocap/proto": "1.18.30",
42
+ "@ocap/util": "1.18.30",
43
+ "@ocap/wallet": "1.18.30",
44
44
  "blueimp-md5": "^2.19.0",
45
45
  "buffer": "6.0.3",
46
46
  "debug": "^4.3.4",
@@ -109,5 +109,5 @@
109
109
  "bugs": {
110
110
  "url": "https://github.com/ArcBlock/asset-chain/issues"
111
111
  },
112
- "gitHead": "f71e1836ecfed490799a2e5cc12f7450b22461a5"
112
+ "gitHead": "553b8b4151c97432b4c18ef0ef849cd65e2704cb"
113
113
  }